summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>2001-04-21 00:04:30 +0000
committercvs2svn <cvs2svn@FreeBSD.org>2001-04-21 00:04:30 +0000
commite3c26b9cfe2a5c4c3745ad5cf70dab80b1c9ec1a (patch)
tree274d78dda9e82e7da35b9c84245a4651ce8a4145
parent8242c1a553f8cb4d0c19aaa78e0edc891625d968 (diff)
downloadsrc-test2-e3c26b9cfe2a5c4c3745ad5cf70dab80b1c9ec1a.tar.gz
src-test2-e3c26b9cfe2a5c4c3745ad5cf70dab80b1c9ec1a.zip
This commit was manufactured by cvs2svn to create branch 'RELENG_4_3'.
Notes
Notes: svn path=/releng/4.3/; revision=75750
-rw-r--r--contrib/file/Magdir/dyadic12
-rw-r--r--contrib/file/Magdir/editors9
-rw-r--r--contrib/file/Magdir/hitachi-sh18
-rw-r--r--contrib/file/Magdir/parix12
-rw-r--r--contrib/file/Magdir/tuxedo7
-rw-r--r--contrib/groff/FREEBSD-Xlist1
-rw-r--r--contrib/groff/contrib/mm/ChangeLog521
-rw-r--r--contrib/groff/contrib/mm/Makefile.sim66
-rw-r--r--contrib/groff/contrib/mm/Makefile.sub55
-rw-r--r--contrib/groff/contrib/mm/NOTES105
-rw-r--r--contrib/groff/contrib/mm/README37
-rw-r--r--contrib/groff/contrib/mm/examples/APP352
-rw-r--r--contrib/groff/contrib/mm/examples/B1B291
-rw-r--r--contrib/groff/contrib/mm/examples/COVER235
-rw-r--r--contrib/groff/contrib/mm/examples/IND4191
-rw-r--r--contrib/groff/contrib/mm/examples/LT1058
-rw-r--r--contrib/groff/contrib/mm/examples/LT.se1062
-rw-r--r--contrib/groff/contrib/mm/examples/ML169
-rw-r--r--contrib/groff/contrib/mm/examples/MOVE175
-rw-r--r--contrib/groff/contrib/mm/examples/MUL535
-rw-r--r--contrib/groff/contrib/mm/examples/NCOL196
-rw-r--r--contrib/groff/contrib/mm/examples/ND17
-rw-r--r--contrib/groff/contrib/mm/examples/README32
-rw-r--r--contrib/groff/contrib/mm/examples/References975
-rw-r--r--contrib/groff/contrib/mm/examples/SETR109
-rw-r--r--contrib/groff/contrib/mm/groff_mm.man1897
-rw-r--r--contrib/groff/contrib/mm/groff_mmse.man82
-rw-r--r--contrib/groff/contrib/mm/m.tmac3477
-rw-r--r--contrib/groff/contrib/mm/mm/0.MT146
-rw-r--r--contrib/groff/contrib/mm/mm/4.MT81
-rw-r--r--contrib/groff/contrib/mm/mm/5.MT34
-rw-r--r--contrib/groff/contrib/mm/mm/ms.cov84
-rw-r--r--contrib/groff/contrib/mm/mm/se_ms.cov3
-rw-r--r--contrib/groff/contrib/mm/mmroff.man48
-rwxr-xr-xcontrib/groff/contrib/mm/mmroff.pl134
-rw-r--r--contrib/groff/contrib/mm/mse.tmac184
-rw-r--r--contrib/groff/font/devX100-12/CB308
-rw-r--r--contrib/groff/font/devX100-12/CBI308
-rw-r--r--contrib/groff/font/devX100-12/CI308
-rw-r--r--contrib/groff/font/devX100-12/CR308
-rw-r--r--contrib/groff/font/devX100-12/DESC9
-rw-r--r--contrib/groff/font/devX100-12/HB308
-rw-r--r--contrib/groff/font/devX100-12/HBI308
-rw-r--r--contrib/groff/font/devX100-12/HI308
-rw-r--r--contrib/groff/font/devX100-12/HR308
-rw-r--r--contrib/groff/font/devX100-12/Makefile.sub2
-rw-r--r--contrib/groff/font/devX100-12/NB308
-rw-r--r--contrib/groff/font/devX100-12/NBI308
-rw-r--r--contrib/groff/font/devX100-12/NI308
-rw-r--r--contrib/groff/font/devX100-12/NR308
-rw-r--r--contrib/groff/font/devX100-12/S226
-rw-r--r--contrib/groff/font/devX100-12/TB308
-rw-r--r--contrib/groff/font/devX100-12/TBI308
-rw-r--r--contrib/groff/font/devX100-12/TI308
-rw-r--r--contrib/groff/font/devX100-12/TR308
-rw-r--r--contrib/groff/font/devX100/CB308
-rw-r--r--contrib/groff/font/devX100/CBI308
-rw-r--r--contrib/groff/font/devX100/CI308
-rw-r--r--contrib/groff/font/devX100/CR308
-rw-r--r--contrib/groff/font/devX100/DESC9
-rw-r--r--contrib/groff/font/devX100/HB308
-rw-r--r--contrib/groff/font/devX100/HBI308
-rw-r--r--contrib/groff/font/devX100/HI308
-rw-r--r--contrib/groff/font/devX100/HR308
-rw-r--r--contrib/groff/font/devX100/Makefile.sub2
-rw-r--r--contrib/groff/font/devX100/NB308
-rw-r--r--contrib/groff/font/devX100/NBI308
-rw-r--r--contrib/groff/font/devX100/NI308
-rw-r--r--contrib/groff/font/devX100/NR308
-rw-r--r--contrib/groff/font/devX100/S226
-rw-r--r--contrib/groff/font/devX100/TB308
-rw-r--r--contrib/groff/font/devX100/TBI308
-rw-r--r--contrib/groff/font/devX100/TI308
-rw-r--r--contrib/groff/font/devX100/TR308
-rw-r--r--contrib/groff/font/devX75-12/CB308
-rw-r--r--contrib/groff/font/devX75-12/CBI308
-rw-r--r--contrib/groff/font/devX75-12/CI308
-rw-r--r--contrib/groff/font/devX75-12/CR308
-rw-r--r--contrib/groff/font/devX75-12/DESC9
-rw-r--r--contrib/groff/font/devX75-12/HB308
-rw-r--r--contrib/groff/font/devX75-12/HBI308
-rw-r--r--contrib/groff/font/devX75-12/HI308
-rw-r--r--contrib/groff/font/devX75-12/HR308
-rw-r--r--contrib/groff/font/devX75-12/Makefile.sub2
-rw-r--r--contrib/groff/font/devX75-12/NB308
-rw-r--r--contrib/groff/font/devX75-12/NBI308
-rw-r--r--contrib/groff/font/devX75-12/NI308
-rw-r--r--contrib/groff/font/devX75-12/NR308
-rw-r--r--contrib/groff/font/devX75-12/S226
-rw-r--r--contrib/groff/font/devX75-12/TB308
-rw-r--r--contrib/groff/font/devX75-12/TBI308
-rw-r--r--contrib/groff/font/devX75-12/TI308
-rw-r--r--contrib/groff/font/devX75-12/TR308
-rw-r--r--contrib/groff/font/devX75/CB308
-rw-r--r--contrib/groff/font/devX75/CBI308
-rw-r--r--contrib/groff/font/devX75/CI308
-rw-r--r--contrib/groff/font/devX75/CR308
-rw-r--r--contrib/groff/font/devX75/DESC9
-rw-r--r--contrib/groff/font/devX75/HB308
-rw-r--r--contrib/groff/font/devX75/HBI308
-rw-r--r--contrib/groff/font/devX75/HI308
-rw-r--r--contrib/groff/font/devX75/HR308
-rw-r--r--contrib/groff/font/devX75/Makefile.sub2
-rw-r--r--contrib/groff/font/devX75/NB308
-rw-r--r--contrib/groff/font/devX75/NBI308
-rw-r--r--contrib/groff/font/devX75/NI308
-rw-r--r--contrib/groff/font/devX75/NR308
-rw-r--r--contrib/groff/font/devX75/S226
-rw-r--r--contrib/groff/font/devX75/TB308
-rw-r--r--contrib/groff/font/devX75/TBI308
-rw-r--r--contrib/groff/font/devX75/TI308
-rw-r--r--contrib/groff/font/devX75/TR308
-rw-r--r--contrib/groff/font/devascii/DESC.proto8
-rw-r--r--contrib/groff/font/devascii/Makefile.sub31
-rw-r--r--contrib/groff/font/devascii/R.proto167
-rw-r--r--contrib/groff/font/devcp1047/DESC.proto8
-rw-r--r--contrib/groff/font/devcp1047/Makefile.sub32
-rw-r--r--contrib/groff/font/devcp1047/R.proto356
-rw-r--r--contrib/groff/font/devdvi/B358
-rw-r--r--contrib/groff/font/devdvi/BI365
-rw-r--r--contrib/groff/font/devdvi/CW160
-rw-r--r--contrib/groff/font/devdvi/CWI160
-rw-r--r--contrib/groff/font/devdvi/DESC.in10
-rw-r--r--contrib/groff/font/devdvi/EX144
-rw-r--r--contrib/groff/font/devdvi/H307
-rw-r--r--contrib/groff/font/devdvi/HB307
-rw-r--r--contrib/groff/font/devdvi/HI308
-rw-r--r--contrib/groff/font/devdvi/I366
-rw-r--r--contrib/groff/font/devdvi/MI136
-rw-r--r--contrib/groff/font/devdvi/Makefile.sub11
-rw-r--r--contrib/groff/font/devdvi/R441
-rw-r--r--contrib/groff/font/devdvi/S153
-rw-r--r--contrib/groff/font/devdvi/SA143
-rw-r--r--contrib/groff/font/devdvi/SB132
-rwxr-xr-xcontrib/groff/font/devdvi/generate/CompileFonts15
-rw-r--r--contrib/groff/font/devdvi/generate/Makefile107
-rw-r--r--contrib/groff/font/devdvi/generate/cork.map206
-rw-r--r--contrib/groff/font/devdvi/generate/msam.map127
-rw-r--r--contrib/groff/font/devdvi/generate/msbm.map121
-rw-r--r--contrib/groff/font/devdvi/generate/texb.map127
-rw-r--r--contrib/groff/font/devdvi/generate/texex.map100
-rw-r--r--contrib/groff/font/devdvi/generate/texi.map127
-rw-r--r--contrib/groff/font/devdvi/generate/texmi.map32
-rw-r--r--contrib/groff/font/devdvi/generate/texr.map127
-rw-r--r--contrib/groff/font/devdvi/generate/texsy.map100
-rw-r--r--contrib/groff/font/devdvi/generate/textt.map126
-rw-r--r--contrib/groff/font/devhtml/DESC.proto12
-rw-r--r--contrib/groff/font/devhtml/Makefile.sub34
-rw-r--r--contrib/groff/font/devhtml/R.proto315
-rw-r--r--contrib/groff/font/devlatin1/DESC.proto8
-rw-r--r--contrib/groff/font/devlatin1/Makefile.sub32
-rw-r--r--contrib/groff/font/devlatin1/R.proto357
-rw-r--r--contrib/groff/font/devlbp/CB272
-rw-r--r--contrib/groff/font/devlbp/CI272
-rw-r--r--contrib/groff/font/devlbp/CR272
-rw-r--r--contrib/groff/font/devlbp/DESC.in9
-rw-r--r--contrib/groff/font/devlbp/EB272
-rw-r--r--contrib/groff/font/devlbp/EI272
-rw-r--r--contrib/groff/font/devlbp/ER272
-rw-r--r--contrib/groff/font/devlbp/HB491
-rw-r--r--contrib/groff/font/devlbp/HBI492
-rw-r--r--contrib/groff/font/devlbp/HI492
-rw-r--r--contrib/groff/font/devlbp/HNB491
-rw-r--r--contrib/groff/font/devlbp/HNBI491
-rw-r--r--contrib/groff/font/devlbp/HNI491
-rw-r--r--contrib/groff/font/devlbp/HNR491
-rw-r--r--contrib/groff/font/devlbp/HR491
-rw-r--r--contrib/groff/font/devlbp/Makefile.sub18
-rw-r--r--contrib/groff/font/devlbp/TB513
-rw-r--r--contrib/groff/font/devlbp/TBI493
-rw-r--r--contrib/groff/font/devlbp/TI521
-rw-r--r--contrib/groff/font/devlbp/TR517
-rw-r--r--contrib/groff/font/devlj4/ALBB790
-rw-r--r--contrib/groff/font/devlj4/ALBR805
-rw-r--r--contrib/groff/font/devlj4/AOB748
-rw-r--r--contrib/groff/font/devlj4/AOI813
-rw-r--r--contrib/groff/font/devlj4/AOR735
-rw-r--r--contrib/groff/font/devlj4/CB350
-rw-r--r--contrib/groff/font/devlj4/CBI351
-rw-r--r--contrib/groff/font/devlj4/CI351
-rw-r--r--contrib/groff/font/devlj4/CLARENDON351
-rw-r--r--contrib/groff/font/devlj4/CORONET351
-rw-r--r--contrib/groff/font/devlj4/CR350
-rw-r--r--contrib/groff/font/devlj4/DESC.in9
-rw-r--r--contrib/groff/font/devlj4/GB749
-rw-r--r--contrib/groff/font/devlj4/GBI752
-rw-r--r--contrib/groff/font/devlj4/GI686
-rw-r--r--contrib/groff/font/devlj4/GR872
-rw-r--r--contrib/groff/font/devlj4/LGB350
-rw-r--r--contrib/groff/font/devlj4/LGI351
-rw-r--r--contrib/groff/font/devlj4/LGR350
-rw-r--r--contrib/groff/font/devlj4/MARIGOLD351
-rw-r--r--contrib/groff/font/devlj4/Makefile.sub33
-rw-r--r--contrib/groff/font/devlj4/OB817
-rw-r--r--contrib/groff/font/devlj4/OBI810
-rw-r--r--contrib/groff/font/devlj4/OI923
-rw-r--r--contrib/groff/font/devlj4/OR899
-rw-r--r--contrib/groff/font/devlj4/S195
-rw-r--r--contrib/groff/font/devlj4/TB991
-rw-r--r--contrib/groff/font/devlj4/TBI1045
-rw-r--r--contrib/groff/font/devlj4/TI1131
-rw-r--r--contrib/groff/font/devlj4/TR878
-rw-r--r--contrib/groff/font/devlj4/UB829
-rw-r--r--contrib/groff/font/devlj4/UBI779
-rw-r--r--contrib/groff/font/devlj4/UCB790
-rw-r--r--contrib/groff/font/devlj4/UCBI698
-rw-r--r--contrib/groff/font/devlj4/UCI840
-rw-r--r--contrib/groff/font/devlj4/UCR759
-rw-r--r--contrib/groff/font/devlj4/UI983
-rw-r--r--contrib/groff/font/devlj4/UR880
-rw-r--r--contrib/groff/font/devlj4/generate/Makefile170
-rw-r--r--contrib/groff/font/devlj4/generate/special.map178
-rw-r--r--contrib/groff/font/devlj4/generate/text.map344
-rw-r--r--contrib/groff/font/devps/AB574
-rw-r--r--contrib/groff/font/devps/ABI575
-rw-r--r--contrib/groff/font/devps/AI575
-rw-r--r--contrib/groff/font/devps/AR574
-rw-r--r--contrib/groff/font/devps/BMB441
-rw-r--r--contrib/groff/font/devps/BMBI444
-rw-r--r--contrib/groff/font/devps/BMI437
-rw-r--r--contrib/groff/font/devps/BMR433
-rw-r--r--contrib/groff/font/devps/CB339
-rw-r--r--contrib/groff/font/devps/CBI340
-rw-r--r--contrib/groff/font/devps/CI340
-rw-r--r--contrib/groff/font/devps/CR339
-rw-r--r--contrib/groff/font/devps/DESC.in11
-rw-r--r--contrib/groff/font/devps/HB561
-rw-r--r--contrib/groff/font/devps/HBI562
-rw-r--r--contrib/groff/font/devps/HI630
-rw-r--r--contrib/groff/font/devps/HNB561
-rw-r--r--contrib/groff/font/devps/HNBI562
-rw-r--r--contrib/groff/font/devps/HNI630
-rw-r--r--contrib/groff/font/devps/HNR629
-rw-r--r--contrib/groff/font/devps/HR629
-rw-r--r--contrib/groff/font/devps/Makefile.sub35
-rw-r--r--contrib/groff/font/devps/NB473
-rw-r--r--contrib/groff/font/devps/NBI594
-rw-r--r--contrib/groff/font/devps/NI535
-rw-r--r--contrib/groff/font/devps/NR522
-rw-r--r--contrib/groff/font/devps/PB461
-rw-r--r--contrib/groff/font/devps/PBI463
-rw-r--r--contrib/groff/font/devps/PI465
-rw-r--r--contrib/groff/font/devps/PR466
-rw-r--r--contrib/groff/font/devps/S227
-rw-r--r--contrib/groff/font/devps/SS194
-rw-r--r--contrib/groff/font/devps/TB548
-rw-r--r--contrib/groff/font/devps/TBI531
-rw-r--r--contrib/groff/font/devps/TI544
-rw-r--r--contrib/groff/font/devps/TR536
-rw-r--r--contrib/groff/font/devps/ZCMI494
-rw-r--r--contrib/groff/font/devps/ZD193
-rw-r--r--contrib/groff/font/devps/ZDR193
-rw-r--r--contrib/groff/font/devps/download5
-rw-r--r--contrib/groff/font/devps/generate/Makefile227
-rwxr-xr-xcontrib/groff/font/devps/generate/afmname44
-rw-r--r--contrib/groff/font/devps/generate/dingbats.map2
-rw-r--r--contrib/groff/font/devps/generate/dingbats.rmap1
-rw-r--r--contrib/groff/font/devps/generate/lgreekmap28
-rw-r--r--contrib/groff/font/devps/generate/symbol.sed33
-rw-r--r--contrib/groff/font/devps/generate/symbolchars60
-rw-r--r--contrib/groff/font/devps/generate/symbolsl.afm203
-rw-r--r--contrib/groff/font/devps/generate/textmap453
-rw-r--r--contrib/groff/font/devps/prologue.ps228
-rw-r--r--contrib/groff/font/devps/psstrip.sed7
-rw-r--r--contrib/groff/font/devps/symbol.afm212
-rw-r--r--contrib/groff/font/devps/symbolmap513
-rw-r--r--contrib/groff/font/devps/symbolsl.ps41
-rw-r--r--contrib/groff/font/devps/text.enc231
-rw-r--r--contrib/groff/font/devps/zapfdr.afm222
-rw-r--r--contrib/groff/font/devps/zapfdr.ps225
-rw-r--r--contrib/groff/font/devutf8/DESC.proto8
-rw-r--r--contrib/groff/font/devutf8/Makefile.sub32
-rw-r--r--contrib/groff/font/devutf8/NOTES75
-rw-r--r--contrib/groff/font/devutf8/R.proto473
-rw-r--r--contrib/groff/src/devices/grodvi/Makefile.sub6
-rw-r--r--contrib/groff/src/devices/grodvi/dvi.cc912
-rw-r--r--contrib/groff/src/devices/grodvi/grodvi.man174
-rw-r--r--contrib/groff/src/devices/grohtml/Makefile.sub16
-rw-r--r--contrib/groff/src/devices/grohtml/grohtml.man137
-rw-r--r--contrib/groff/src/devices/grohtml/html-chars.h27
-rw-r--r--contrib/groff/src/devices/grohtml/html-text.cc829
-rw-r--r--contrib/groff/src/devices/grohtml/html-text.h109
-rw-r--r--contrib/groff/src/devices/grohtml/html.h96
-rw-r--r--contrib/groff/src/devices/grohtml/output.cc335
-rw-r--r--contrib/groff/src/devices/grohtml/post-html.cc2933
-rw-r--r--contrib/groff/src/devices/grolbp/Makefile.sub6
-rw-r--r--contrib/groff/src/devices/grolbp/charset.h69
-rw-r--r--contrib/groff/src/devices/grolbp/grolbp.man357
-rw-r--r--contrib/groff/src/devices/grolbp/lbp.cc765
-rw-r--r--contrib/groff/src/devices/grolbp/lbp.h511
-rw-r--r--contrib/groff/src/devices/grolj4/Makefile.sub6
-rw-r--r--contrib/groff/src/devices/grolj4/grolj4.man144
-rw-r--r--contrib/groff/src/devices/grolj4/lj4.cc710
-rw-r--r--contrib/groff/src/devices/grops/Makefile.sub12
-rw-r--r--contrib/groff/src/devices/grops/TODO29
-rw-r--r--contrib/groff/src/devices/grops/grops.man861
-rw-r--r--contrib/groff/src/devices/grops/ps.cc1570
-rw-r--r--contrib/groff/src/devices/grops/ps.h122
-rw-r--r--contrib/groff/src/devices/grops/psfig.diff106
-rw-r--r--contrib/groff/src/devices/grops/psrm.cc1118
-rw-r--r--contrib/groff/src/devices/grotty/Makefile.sub6
-rw-r--r--contrib/groff/src/devices/grotty/TODO3
-rw-r--r--contrib/groff/src/devices/grotty/grotty.man275
-rw-r--r--contrib/groff/src/devices/grotty/tty.cc509
-rw-r--r--contrib/groff/src/include/Makefile.sub42
-rw-r--r--contrib/groff/src/include/assert.h39
-rw-r--r--contrib/groff/src/include/cmap.h56
-rw-r--r--contrib/groff/src/include/cset.h75
-rw-r--r--contrib/groff/src/include/device.h21
-rw-r--r--contrib/groff/src/include/driver.h35
-rw-r--r--contrib/groff/src/include/errarg.h46
-rw-r--r--contrib/groff/src/include/error.h58
-rw-r--r--contrib/groff/src/include/font.h116
-rw-r--r--contrib/groff/src/include/getopt.h169
-rw-r--r--contrib/groff/src/include/groff-getopt.h68
-rw-r--r--contrib/groff/src/include/html-strings.h31
-rw-r--r--contrib/groff/src/include/htmlindicate.h59
-rw-r--r--contrib/groff/src/include/index.h42
-rw-r--r--contrib/groff/src/include/lib.h133
-rw-r--r--contrib/groff/src/include/macropath.h23
-rw-r--r--contrib/groff/src/include/nonposix.h136
-rw-r--r--contrib/groff/src/include/posix.h51
-rw-r--r--contrib/groff/src/include/printer.h77
-rw-r--r--contrib/groff/src/include/ptable.h168
-rw-r--r--contrib/groff/src/include/refid.h35
-rw-r--r--contrib/groff/src/include/search.h96
-rw-r--r--contrib/groff/src/include/searchpath.h30
-rw-r--r--contrib/groff/src/include/stringclass.h195
-rw-r--r--contrib/groff/src/libs/libbib/Makefile.sub14
-rw-r--r--contrib/groff/src/libs/libbib/common.cc38
-rw-r--r--contrib/groff/src/libs/libbib/index.cc641
-rw-r--r--contrib/groff/src/libs/libbib/linear.cc503
-rw-r--r--contrib/groff/src/libs/libbib/map.c71
-rw-r--r--contrib/groff/src/libs/libbib/search.cc132
-rw-r--r--contrib/groff/src/libs/libdriver/Makefile.sub7
-rw-r--r--contrib/groff/src/libs/libdriver/input.cc504
-rw-r--r--contrib/groff/src/libs/libdriver/printer.cc271
-rw-r--r--contrib/groff/src/libs/libgroff/Makefile.sub84
-rw-r--r--contrib/groff/src/libs/libgroff/assert.cc34
-rw-r--r--contrib/groff/src/libs/libgroff/change_lf.cc37
-rw-r--r--contrib/groff/src/libs/libgroff/cmap.cc62
-rw-r--r--contrib/groff/src/libs/libgroff/cset.cc108
-rw-r--r--contrib/groff/src/libs/libgroff/device.cc36
-rw-r--r--contrib/groff/src/libs/libgroff/errarg.cc118
-rw-r--r--contrib/groff/src/libs/libgroff/error.cc137
-rw-r--r--contrib/groff/src/libs/libgroff/fatal.cc27
-rw-r--r--contrib/groff/src/libs/libgroff/filename.cc1
-rw-r--r--contrib/groff/src/libs/libgroff/fmod.c28
-rw-r--r--contrib/groff/src/libs/libgroff/font.cc938
-rw-r--r--contrib/groff/src/libs/libgroff/fontfile.cc66
-rw-r--r--contrib/groff/src/libs/libgroff/getcwd.c54
-rw-r--r--contrib/groff/src/libs/libgroff/getopt.c1055
-rw-r--r--contrib/groff/src/libs/libgroff/getopt1.c188
-rw-r--r--contrib/groff/src/libs/libgroff/htmlindicate.cc97
-rw-r--r--contrib/groff/src/libs/libgroff/iftoa.c65
-rw-r--r--contrib/groff/src/libs/libgroff/illegal.cc62
-rw-r--r--contrib/groff/src/libs/libgroff/itoa.c43
-rw-r--r--contrib/groff/src/libs/libgroff/lf.cc62
-rw-r--r--contrib/groff/src/libs/libgroff/lineno.cc1
-rw-r--r--contrib/groff/src/libs/libgroff/macropath.cc30
-rw-r--r--contrib/groff/src/libs/libgroff/matherr.c45
-rw-r--r--contrib/groff/src/libs/libgroff/nametoindex.cc118
-rw-r--r--contrib/groff/src/libs/libgroff/new.cc68
-rw-r--r--contrib/groff/src/libs/libgroff/prime.cc26
-rw-r--r--contrib/groff/src/libs/libgroff/progname.cc1
-rw-r--r--contrib/groff/src/libs/libgroff/ptable.cc52
-rw-r--r--contrib/groff/src/libs/libgroff/putenv.c95
-rw-r--r--contrib/groff/src/libs/libgroff/searchpath.cc132
-rw-r--r--contrib/groff/src/libs/libgroff/strerror.c41
-rw-r--r--contrib/groff/src/libs/libgroff/string.cc311
-rw-r--r--contrib/groff/src/libs/libgroff/strsave.cc31
-rw-r--r--contrib/groff/src/libs/libgroff/strtol.c128
-rw-r--r--contrib/groff/src/libs/libgroff/tmpfile.cc186
-rw-r--r--contrib/groff/src/preproc/eqn/Makefile.sub59
-rw-r--r--contrib/groff/src/preproc/eqn/TODO49
-rw-r--r--contrib/groff/src/preproc/eqn/box.cc611
-rw-r--r--contrib/groff/src/preproc/eqn/box.h277
-rw-r--r--contrib/groff/src/preproc/eqn/delim.cc381
-rw-r--r--contrib/groff/src/preproc/eqn/eqn.h51
-rw-r--r--contrib/groff/src/preproc/eqn/eqn.man882
-rw-r--r--contrib/groff/src/preproc/eqn/eqn.y331
-rw-r--r--contrib/groff/src/preproc/eqn/lex.cc1165
-rw-r--r--contrib/groff/src/preproc/eqn/limit.cc195
-rw-r--r--contrib/groff/src/preproc/eqn/list.cc237
-rw-r--r--contrib/groff/src/preproc/eqn/main.cc419
-rw-r--r--contrib/groff/src/preproc/eqn/mark.cc121
-rw-r--r--contrib/groff/src/preproc/eqn/neqn.man21
-rw-r--r--contrib/groff/src/preproc/eqn/neqn.sh24
-rw-r--r--contrib/groff/src/preproc/eqn/other.cc601
-rw-r--r--contrib/groff/src/preproc/eqn/over.cc196
-rw-r--r--contrib/groff/src/preproc/eqn/pbox.h141
-rw-r--r--contrib/groff/src/preproc/eqn/pile.cc293
-rw-r--r--contrib/groff/src/preproc/eqn/script.cc221
-rw-r--r--contrib/groff/src/preproc/eqn/special.cc115
-rw-r--r--contrib/groff/src/preproc/eqn/sqrt.cc179
-rw-r--r--contrib/groff/src/preproc/eqn/text.cc528
-rw-r--r--contrib/groff/src/preproc/grn/Makefile.sub17
-rw-r--r--contrib/groff/src/preproc/grn/README60
-rw-r--r--contrib/groff/src/preproc/grn/gprint.h84
-rw-r--r--contrib/groff/src/preproc/grn/grn.man636
-rw-r--r--contrib/groff/src/preproc/grn/hdb.cc326
-rw-r--r--contrib/groff/src/preproc/grn/hgraph.cc1043
-rw-r--r--contrib/groff/src/preproc/grn/hpoint.cc49
-rw-r--r--contrib/groff/src/preproc/grn/main.cc905
-rw-r--r--contrib/groff/src/preproc/html/Makefile.sub7
-rw-r--r--contrib/groff/src/preproc/html/pre-html.cc1160
-rw-r--r--contrib/groff/src/preproc/html/pre-html.h37
-rw-r--r--contrib/groff/src/preproc/html/pushbackbuffer.cc337
-rw-r--r--contrib/groff/src/preproc/html/pushbackbuffer.h54
-rw-r--r--contrib/groff/src/preproc/pic/Makefile.sub31
-rw-r--r--contrib/groff/src/preproc/pic/TODO37
-rw-r--r--contrib/groff/src/preproc/pic/common.cc497
-rw-r--r--contrib/groff/src/preproc/pic/common.h70
-rw-r--r--contrib/groff/src/preproc/pic/lex.cc1940
-rw-r--r--contrib/groff/src/preproc/pic/main.cc635
-rw-r--r--contrib/groff/src/preproc/pic/object.cc1833
-rw-r--r--contrib/groff/src/preproc/pic/object.h217
-rw-r--r--contrib/groff/src/preproc/pic/output.h79
-rw-r--r--contrib/groff/src/preproc/pic/pic.h104
-rw-r--r--contrib/groff/src/preproc/pic/pic.man883
-rw-r--r--contrib/groff/src/preproc/pic/pic.y1812
-rw-r--r--contrib/groff/src/preproc/pic/position.h47
-rw-r--r--contrib/groff/src/preproc/pic/tex.cc412
-rw-r--r--contrib/groff/src/preproc/pic/text.h28
-rw-r--r--contrib/groff/src/preproc/pic/troff.cc504
-rw-r--r--contrib/groff/src/preproc/refer/Makefile.sub23
-rw-r--r--contrib/groff/src/preproc/refer/TODO124
-rw-r--r--contrib/groff/src/preproc/refer/command.cc807
-rw-r--r--contrib/groff/src/preproc/refer/command.h36
-rw-r--r--contrib/groff/src/preproc/refer/label.y1177
-rw-r--r--contrib/groff/src/preproc/refer/ref.cc1160
-rw-r--r--contrib/groff/src/preproc/refer/ref.h120
-rw-r--r--contrib/groff/src/preproc/refer/refer.cc1234
-rw-r--r--contrib/groff/src/preproc/refer/refer.h78
-rw-r--r--contrib/groff/src/preproc/refer/refer.man1302
-rw-r--r--contrib/groff/src/preproc/refer/token.cc378
-rw-r--r--contrib/groff/src/preproc/refer/token.h88
-rw-r--r--contrib/groff/src/preproc/soelim/Makefile.sub6
-rw-r--r--contrib/groff/src/preproc/soelim/TODO1
-rw-r--r--contrib/groff/src/preproc/soelim/soelim.cc347
-rw-r--r--contrib/groff/src/preproc/soelim/soelim.man85
-rw-r--r--contrib/groff/src/preproc/tbl/Makefile.sub12
-rw-r--r--contrib/groff/src/preproc/tbl/main.cc1528
-rw-r--r--contrib/groff/src/preproc/tbl/table.cc2778
-rw-r--r--contrib/groff/src/preproc/tbl/table.h152
-rw-r--r--contrib/groff/src/preproc/tbl/tbl.man178
-rw-r--r--contrib/groff/src/roff/groff/Makefile.sub8
-rw-r--r--contrib/groff/src/roff/groff/groff.cc731
-rw-r--r--contrib/groff/src/roff/groff/groff.man492
-rw-r--r--contrib/groff/src/roff/groff/pipeline.c411
-rw-r--r--contrib/groff/src/roff/groff/pipeline.h30
-rw-r--r--contrib/groff/src/roff/grog/Makefile.sub26
-rw-r--r--contrib/groff/src/roff/grog/grog.man86
-rw-r--r--contrib/groff/src/roff/grog/grog.pl183
-rw-r--r--contrib/groff/src/roff/grog/grog.sh91
-rw-r--r--contrib/groff/src/roff/nroff/Makefile.sub20
-rw-r--r--contrib/groff/src/roff/troff/Makefile.sub48
-rw-r--r--contrib/groff/src/roff/troff/TODO134
-rw-r--r--contrib/groff/src/roff/troff/charinfo.h171
-rw-r--r--contrib/groff/src/roff/troff/column.cc732
-rw-r--r--contrib/groff/src/roff/troff/dictionary.cc212
-rw-r--r--contrib/groff/src/roff/troff/dictionary.h92
-rw-r--r--contrib/groff/src/roff/troff/div.cc1161
-rw-r--r--contrib/groff/src/roff/troff/div.h156
-rw-r--r--contrib/groff/src/roff/troff/env.cc3439
-rw-r--r--contrib/groff/src/roff/troff/env.h350
-rw-r--r--contrib/groff/src/roff/troff/hvunits.h340
-rw-r--r--contrib/groff/src/roff/troff/input.cc6891
-rw-r--r--contrib/groff/src/roff/troff/input.h92
-rw-r--r--contrib/groff/src/roff/troff/node.cc5621
-rw-r--r--contrib/groff/src/roff/troff/node.h584
-rw-r--r--contrib/groff/src/roff/troff/number.cc692
-rw-r--r--contrib/groff/src/roff/troff/reg.cc473
-rw-r--r--contrib/groff/src/roff/troff/reg.h76
-rw-r--r--contrib/groff/src/roff/troff/request.h84
-rw-r--r--contrib/groff/src/roff/troff/symbol.cc150
-rw-r--r--contrib/groff/src/roff/troff/symbol.h73
-rw-r--r--contrib/groff/src/roff/troff/token.h218
-rw-r--r--contrib/groff/src/roff/troff/troff.h88
-rw-r--r--contrib/groff/src/roff/troff/troff.man2462
-rw-r--r--contrib/groff/src/utils/addftinfo/Makefile.sub11
-rw-r--r--contrib/groff/src/utils/addftinfo/addftinfo.cc218
-rw-r--r--contrib/groff/src/utils/addftinfo/addftinfo.man107
-rw-r--r--contrib/groff/src/utils/addftinfo/guess.cc490
-rw-r--r--contrib/groff/src/utils/addftinfo/guess.h44
-rw-r--r--contrib/groff/src/utils/afmtodit/Makefile.sub23
-rw-r--r--contrib/groff/src/utils/afmtodit/afmtodit.man225
-rw-r--r--contrib/groff/src/utils/afmtodit/afmtodit.pl331
-rw-r--r--contrib/groff/src/utils/hpftodit/Makefile.sub6
-rw-r--r--contrib/groff/src/utils/hpftodit/hpftodit.cc827
-rw-r--r--contrib/groff/src/utils/hpftodit/hpftodit.man155
-rw-r--r--contrib/groff/src/utils/indxbib/Makefile.sub31
-rw-r--r--contrib/groff/src/utils/indxbib/dirnamemax.c49
-rw-r--r--contrib/groff/src/utils/indxbib/eign133
-rw-r--r--contrib/groff/src/utils/indxbib/indxbib.cc805
-rw-r--r--contrib/groff/src/utils/indxbib/indxbib.man207
-rw-r--r--contrib/groff/src/utils/indxbib/signal.c63
-rw-r--r--contrib/groff/src/utils/lkbib/Makefile.sub6
-rw-r--r--contrib/groff/src/utils/lkbib/lkbib.cc137
-rw-r--r--contrib/groff/src/utils/lkbib/lkbib.man110
-rw-r--r--contrib/groff/src/utils/lookbib/Makefile.sub7
-rw-r--r--contrib/groff/src/utils/lookbib/lookbib.cc140
-rw-r--r--contrib/groff/src/utils/lookbib/lookbib.man78
-rw-r--r--contrib/groff/src/utils/pfbtops/Makefile.sub6
-rw-r--r--contrib/groff/src/utils/pfbtops/pfbtops.c131
-rw-r--r--contrib/groff/src/utils/pfbtops/pfbtops.man44
-rw-r--r--contrib/groff/src/utils/tfmtodit/Makefile.sub6
-rw-r--r--contrib/groff/src/utils/tfmtodit/tfmtodit.cc874
-rw-r--r--contrib/groff/src/utils/tfmtodit/tfmtodit.man175
-rw-r--r--contrib/groff/src/xditview/ChangeLog413
-rw-r--r--contrib/groff/src/xditview/DESC9
-rw-r--r--contrib/groff/src/xditview/Dvi.c573
-rw-r--r--contrib/groff/src/xditview/Dvi.h46
-rw-r--r--contrib/groff/src/xditview/DviChar.c664
-rw-r--r--contrib/groff/src/xditview/DviChar.h37
-rw-r--r--contrib/groff/src/xditview/DviP.h233
-rw-r--r--contrib/groff/src/xditview/FontMap17
-rw-r--r--contrib/groff/src/xditview/GXditview-ad.h52
-rw-r--r--contrib/groff/src/xditview/GXditview.ad57
-rw-r--r--contrib/groff/src/xditview/INSTALL20
-rw-r--r--contrib/groff/src/xditview/Imakefile.in104
-rw-r--r--contrib/groff/src/xditview/Menu.h46
-rw-r--r--contrib/groff/src/xditview/README14
-rw-r--r--contrib/groff/src/xditview/TODO17
-rw-r--r--contrib/groff/src/xditview/XFontName.c256
-rw-r--r--contrib/groff/src/xditview/XFontName.h45
-rw-r--r--contrib/groff/src/xditview/ad2c62
-rw-r--r--contrib/groff/src/xditview/device.c600
-rw-r--r--contrib/groff/src/xditview/device.h21
-rw-r--r--contrib/groff/src/xditview/draw.c721
-rw-r--r--contrib/groff/src/xditview/font.c471
-rw-r--r--contrib/groff/src/xditview/gray1.bm4
-rw-r--r--contrib/groff/src/xditview/gray2.bm4
-rw-r--r--contrib/groff/src/xditview/gray3.bm4
-rw-r--r--contrib/groff/src/xditview/gray4.bm4
-rw-r--r--contrib/groff/src/xditview/gray5.bm4
-rw-r--r--contrib/groff/src/xditview/gray6.bm4
-rw-r--r--contrib/groff/src/xditview/gray7.bm4
-rw-r--r--contrib/groff/src/xditview/gray8.bm4
-rw-r--r--contrib/groff/src/xditview/gxditview.man246
-rw-r--r--contrib/groff/src/xditview/lex.c103
-rw-r--r--contrib/groff/src/xditview/page.c88
-rw-r--r--contrib/groff/src/xditview/parse.c335
-rw-r--r--contrib/groff/src/xditview/xdit.bm14
-rw-r--r--contrib/groff/src/xditview/xdit_mask.bm14
-rw-r--r--contrib/groff/src/xditview/xditview.c594
-rw-r--r--contrib/groff/src/xditview/xtotroff.c311
-rw-r--r--contrib/groff/tmac/X.tmac48
-rw-r--r--contrib/groff/tmac/Xps.tmac46
-rw-r--r--contrib/groff/tmac/a4.tmac12
-rw-r--r--contrib/groff/tmac/an-old.tmac478
-rw-r--r--contrib/groff/tmac/an.tmac3
-rw-r--r--contrib/groff/tmac/andoc.tmac14
-rw-r--r--contrib/groff/tmac/doc-old.tmac1858
-rw-r--r--contrib/groff/tmac/doc.tmac6189
-rw-r--r--contrib/groff/tmac/dvi.tmac147
-rw-r--r--contrib/groff/tmac/e.tmac1663
-rw-r--r--contrib/groff/tmac/groff_mwww.man275
-rw-r--r--contrib/groff/tmac/html.tmac47
-rw-r--r--contrib/groff/tmac/hyphen.us4449
-rw-r--r--contrib/groff/tmac/latin1.tmac103
-rw-r--r--contrib/groff/tmac/lbp.tmac15
-rw-r--r--contrib/groff/tmac/lj4.tmac20
-rw-r--r--contrib/groff/tmac/man.tmac3
-rw-r--r--contrib/groff/tmac/mandoc.tmac3
-rw-r--r--contrib/groff/tmac/mdoc.tmac3
-rw-r--r--contrib/groff/tmac/me.tmac3
-rw-r--r--contrib/groff/tmac/ms.tmac3
-rw-r--r--contrib/groff/tmac/mwww.tmac3
-rw-r--r--contrib/groff/tmac/pic.tmac12
-rw-r--r--contrib/groff/tmac/ps.tmac54
-rw-r--r--contrib/groff/tmac/psatk.tmac63
-rw-r--r--contrib/groff/tmac/psfig.tmac89
-rw-r--r--contrib/groff/tmac/psold.tmac61
-rw-r--r--contrib/groff/tmac/pspic.tmac60
-rw-r--r--contrib/groff/tmac/s.tmac1934
-rw-r--r--contrib/groff/tmac/safer.tmac5
-rw-r--r--contrib/groff/tmac/trace.tmac29
-rw-r--r--contrib/groff/tmac/tty-char.tmac204
-rw-r--r--contrib/groff/tmac/tty.tmac50
-rw-r--r--contrib/groff/tmac/www.tmac211
-rw-r--r--contrib/libpcap/.cvsignore10
-rw-r--r--contrib/libpcap/LICENSE19
-rw-r--r--contrib/libpcap/README.aix46
-rw-r--r--contrib/libpcap/README.linux70
-rw-r--r--contrib/libpcap/TODO38
-rw-r--r--contrib/libpcap/bpf_dump.c65
-rw-r--r--contrib/libpcap/config.h.in95
-rw-r--r--contrib/libpcap/lbl/os-osf4.h28
-rw-r--r--contrib/libpcap/llc.h66
-rw-r--r--contrib/libpcap/sll.h124
-rw-r--r--contrib/tcpdump/.cvsignore11
-rw-r--r--contrib/tcpdump/LICENSE19
-rw-r--r--contrib/tcpdump/Makefile-devel-adds22
-rw-r--r--contrib/tcpdump/PLATFORMS8
-rw-r--r--contrib/tcpdump/TODO6
-rw-r--r--contrib/tcpdump/ah.h57
-rw-r--r--contrib/tcpdump/chdlc.h27
-rw-r--r--contrib/tcpdump/esp.h68
-rw-r--r--contrib/tcpdump/ether.h59
-rw-r--r--contrib/tcpdump/icmp6.h412
-rw-r--r--contrib/tcpdump/ip.h159
-rw-r--r--contrib/tcpdump/ip6.h195
-rw-r--r--contrib/tcpdump/missing/snprintf.c628
-rw-r--r--contrib/tcpdump/missing/strlcat.c78
-rw-r--r--contrib/tcpdump/missing/strlcpy.c75
-rw-r--r--contrib/tcpdump/nameser.h254
-rw-r--r--contrib/tcpdump/print-bxxp.c82
-rw-r--r--contrib/tcpdump/print-cdp.c187
-rw-r--r--contrib/tcpdump/print-cnfp.c181
-rw-r--r--contrib/tcpdump/print-igmp.c307
-rw-r--r--contrib/tcpdump/print-radius.c838
-rw-r--r--contrib/tcpdump/print-sll.c238
-rw-r--r--contrib/tcpdump/print-stp.c106
-rw-r--r--contrib/tcpdump/print-timed.c119
-rw-r--r--contrib/tcpdump/print-vrrp.c120
-rw-r--r--contrib/tcpdump/slcompress.h87
-rw-r--r--contrib/tcpdump/slip.h34
-rw-r--r--contrib/tcpdump/sll.h127
-rw-r--r--contrib/tcpdump/tcp.h75
-rw-r--r--contrib/tcpdump/timed.h92
-rw-r--r--contrib/tcpdump/udp.h46
-rw-r--r--crypto/openssl/STATUS92
-rw-r--r--crypto/openssl/TABLE2301
-rw-r--r--crypto/openssl/certs/expired/rsa-ssca.pem19
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod38
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_add_session.pod65
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_flush_sessions.pod49
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_get_ex_new_index.pod53
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_get_verify_mode.pod50
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_sess_set_get_cb.pod81
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_set_default_passwd_cb.pod70
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_set_session_id_context.pod82
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_set_timeout.pod55
-rw-r--r--crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod284
-rw-r--r--crypto/openssl/doc/ssl/SSL_SESSION_get_ex_new_index.pod61
-rw-r--r--crypto/openssl/doc/ssl/SSL_SESSION_get_time.pod63
-rw-r--r--crypto/openssl/doc/ssl/SSL_get_ex_data_X509_STORE_CTX_idx.pod61
-rw-r--r--crypto/openssl/doc/ssl/SSL_get_ex_new_index.pod59
-rw-r--r--crypto/openssl/doc/ssl/SSL_load_client_CA_file.pod62
-rw-r--r--etc/isdn/holidays.D34
-rw-r--r--etc/primes71
-rw-r--r--games/morse/morse.6168
-rw-r--r--gnu/usr.bin/groff/contrib/Makefile5
-rw-r--r--gnu/usr.bin/groff/contrib/Makefile.inc6
-rw-r--r--gnu/usr.bin/groff/contrib/mm/Makefile33
-rw-r--r--gnu/usr.bin/groff/font/Makefile7
-rw-r--r--gnu/usr.bin/groff/font/Makefile.dev11
-rw-r--r--gnu/usr.bin/groff/font/Makefile.inc6
-rw-r--r--gnu/usr.bin/groff/font/Makefile.tty30
-rw-r--r--gnu/usr.bin/groff/font/devX100-12/Makefile7
-rw-r--r--gnu/usr.bin/groff/font/devX100/Makefile7
-rw-r--r--gnu/usr.bin/groff/font/devX75-12/Makefile7
-rw-r--r--gnu/usr.bin/groff/font/devX75/Makefile7
-rw-r--r--gnu/usr.bin/groff/font/devascii/Makefile6
-rw-r--r--gnu/usr.bin/groff/font/devcp1047/Makefile6
-rw-r--r--gnu/usr.bin/groff/font/devdvi/Makefile16
-rw-r--r--gnu/usr.bin/groff/font/devhtml/Makefile7
-rw-r--r--gnu/usr.bin/groff/font/devkoi8-r/DESC.proto8
-rw-r--r--gnu/usr.bin/groff/font/devkoi8-r/Makefile6
-rw-r--r--gnu/usr.bin/groff/font/devlatin1/Makefile6
-rw-r--r--gnu/usr.bin/groff/font/devlbp/Makefile18
-rw-r--r--gnu/usr.bin/groff/font/devlj4/Makefile25
-rw-r--r--gnu/usr.bin/groff/font/devps/Makefile35
-rw-r--r--gnu/usr.bin/groff/font/devutf8/Makefile6
-rw-r--r--gnu/usr.bin/groff/src/Makefile5
-rw-r--r--gnu/usr.bin/groff/src/devices/Makefile5
-rw-r--r--gnu/usr.bin/groff/src/devices/Makefile.inc6
-rw-r--r--gnu/usr.bin/groff/src/devices/grodvi/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/devices/grohtml/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/devices/grolbp/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/devices/grolj4/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/devices/grops/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/devices/grotty/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/include/defs.h12
-rw-r--r--gnu/usr.bin/groff/src/libs/Makefile5
-rw-r--r--gnu/usr.bin/groff/src/libs/Makefile.inc6
-rw-r--r--gnu/usr.bin/groff/src/libs/libbib/Makefile8
-rw-r--r--gnu/usr.bin/groff/src/libs/libdriver/Makefile8
-rw-r--r--gnu/usr.bin/groff/src/libs/libgroff/Makefile22
-rw-r--r--gnu/usr.bin/groff/src/preproc/Makefile8
-rw-r--r--gnu/usr.bin/groff/src/preproc/Makefile.inc6
-rw-r--r--gnu/usr.bin/groff/src/preproc/eqn/Makefile16
-rw-r--r--gnu/usr.bin/groff/src/preproc/grn/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/preproc/html/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/preproc/pic/Makefile13
-rw-r--r--gnu/usr.bin/groff/src/preproc/refer/Makefile10
-rw-r--r--gnu/usr.bin/groff/src/preproc/soelim/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/preproc/tbl/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/roff/Makefile5
-rw-r--r--gnu/usr.bin/groff/src/roff/Makefile.inc6
-rw-r--r--gnu/usr.bin/groff/src/roff/groff/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/roff/grog/Makefile7
-rw-r--r--gnu/usr.bin/groff/src/roff/nroff/Makefile7
-rw-r--r--gnu/usr.bin/groff/src/roff/psroff/Makefile6
-rw-r--r--gnu/usr.bin/groff/src/roff/psroff/psroff.146
-rw-r--r--gnu/usr.bin/groff/src/roff/psroff/psroff.sh2
-rw-r--r--gnu/usr.bin/groff/src/roff/troff/Makefile19
-rw-r--r--gnu/usr.bin/groff/src/utils/Makefile5
-rw-r--r--gnu/usr.bin/groff/src/utils/Makefile.inc6
-rw-r--r--gnu/usr.bin/groff/src/utils/addftinfo/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/utils/afmtodit/Makefile7
-rw-r--r--gnu/usr.bin/groff/src/utils/hpftodit/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/utils/indxbib/Makefile13
-rw-r--r--gnu/usr.bin/groff/src/utils/lkbib/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/utils/lookbib/Makefile9
-rw-r--r--gnu/usr.bin/groff/src/utils/pfbtops/Makefile8
-rw-r--r--gnu/usr.bin/groff/src/utils/tfmtodit/Makefile9
-rw-r--r--gnu/usr.bin/groff/tmac/hyphen.us-ru4833
-rw-r--r--lib/libc/gen/fmtcheck.c253
-rw-r--r--lib/libpcap/config.h100
-rw-r--r--release/scripts/driver-copy2.pl78
-rw-r--r--release/scripts/driver-remove.pl58
-rw-r--r--sbin/ffsinfo/Makefile19
-rw-r--r--sbin/growfs/Makefile21
-rw-r--r--sbin/growfs/debug.h137
-rw-r--r--secure/lib/libcrypt/blowfish.c783
-rw-r--r--secure/lib/libcrypt/blowfish.h86
-rw-r--r--secure/lib/libcrypt/crypt-blowfish.c380
-rw-r--r--share/colldef/la_LN.US-ASCII.src6
-rw-r--r--share/colldef/map.ISO8859-1174
-rw-r--r--share/colldef/map.ISO8859-15174
-rw-r--r--share/colldef/map.ISO8859-2174
-rw-r--r--share/colldef/map.ISO8859-4175
-rw-r--r--share/colldef/map.ISO8859-5175
-rw-r--r--share/colldef/map.ISO8859-7175
-rw-r--r--share/colldef/ru_RU.CP866.src39
-rw-r--r--share/colldef/ru_RU.KOI8-R.src39
-rw-r--r--share/man/man9/DECLARE_MODULE.9113
-rw-r--r--share/man/man9/DEVICE_IDENTIFY.997
-rw-r--r--share/man/man9/DEV_MODULE.9103
-rw-r--r--share/man/man9/MODULE_DEPEND.962
-rw-r--r--share/man/man9/MODULE_VERSION.958
-rw-r--r--share/man/man9/module.993
-rw-r--r--share/monetdef/af_ZA.ISO8859-1.src36
-rw-r--r--share/monetdef/da_DK.ISO8859-1.src36
-rw-r--r--share/monetdef/en_AU.ISO8859-1.src36
-rw-r--r--share/monetdef/en_CA.ISO8859-1.src36
-rw-r--r--share/monetdef/en_GB.ISO8859-1.src36
-rw-r--r--share/monetdef/en_NZ.ISO8859-1.src36
-rw-r--r--share/monetdef/en_US.ISO8859-1.src36
-rw-r--r--share/monetdef/et_EE.ISO8859-15.src36
-rw-r--r--share/monetdef/fr_CA.ISO8859-1.src36
-rw-r--r--share/monetdef/hu_HU.ISO8859-2.src36
-rw-r--r--share/monetdef/is_IS.ISO8859-1.src36
-rw-r--r--share/monetdef/ja_JP.eucJP.src36
-rw-r--r--share/monetdef/ko_KR.eucKR.src36
-rw-r--r--share/monetdef/no_NO.ISO8859-1.src36
-rw-r--r--share/monetdef/pl_PL.ISO8859-2.src36
-rw-r--r--share/monetdef/ru_RU.CP866.src36
-rw-r--r--share/monetdef/ru_RU.ISO8859-5.src36
-rw-r--r--share/monetdef/ru_RU.KOI8-R.src36
-rw-r--r--share/monetdef/sv_SE.ISO8859-1.src36
-rw-r--r--share/monetdef/uk_UA.KOI8-U.src36
-rw-r--r--share/monetdef/zh_CN.eucCN.src36
-rw-r--r--share/monetdef/zh_TW.Big5.src36
-rw-r--r--share/msgdef/af_ZA.ISO8859-1.src10
-rw-r--r--share/msgdef/cs_CZ.ISO8859-2.src14
-rw-r--r--share/msgdef/da_DK.ISO8859-1.src10
-rw-r--r--share/msgdef/de_DE.ISO8859-1.src10
-rw-r--r--share/msgdef/el_GR.ISO8859-7.src14
-rw-r--r--share/msgdef/en_US.ISO8859-1.src10
-rw-r--r--share/msgdef/et_EE.ISO8859-15.src10
-rw-r--r--share/msgdef/fi_FI.ISO8859-1.src10
-rw-r--r--share/msgdef/fr_FR.ISO8859-1.src10
-rw-r--r--share/msgdef/hu_HU.ISO8859-2.src14
-rw-r--r--share/msgdef/is_IS.ISO8859-1.src10
-rw-r--r--share/msgdef/ja_JP.eucJP.src10
-rw-r--r--share/msgdef/ko_KR.eucKR.src10
-rw-r--r--share/msgdef/nl_NL.ISO8859-1.src10
-rw-r--r--share/msgdef/no_NO.ISO8859-1.src10
-rw-r--r--share/msgdef/pl_PL.ISO8859-2.src14
-rw-r--r--share/msgdef/ru_RU.CP866.src14
-rw-r--r--share/msgdef/ru_RU.ISO8859-5.src14
-rw-r--r--share/msgdef/ru_RU.KOI8-R.src14
-rw-r--r--share/msgdef/sv_SE.ISO8859-1.src10
-rw-r--r--share/msgdef/uk_UA.KOI8-U.src14
-rw-r--r--share/msgdef/zh_CN.eucCN.src14
-rw-r--r--share/msgdef/zh_TW.Big5.src14
-rw-r--r--share/numericdef/af_ZA.ISO8859-1.src12
-rw-r--r--share/numericdef/cs_CZ.ISO8859-2.src12
-rw-r--r--share/numericdef/da_DK.ISO8859-1.src12
-rw-r--r--share/numericdef/de_DE.ISO8859-1.src12
-rw-r--r--share/numericdef/el_GR.ISO8859-7.src12
-rw-r--r--share/numericdef/en_US.ISO8859-1.src12
-rw-r--r--share/numericdef/et_EE.ISO8859-15.src12
-rw-r--r--share/numericdef/fi_FI.ISO8859-1.src12
-rw-r--r--share/numericdef/fr_FR.ISO8859-1.src12
-rw-r--r--share/numericdef/hu_HU.ISO8859-2.src12
-rw-r--r--share/numericdef/is_IS.ISO8859-1.src12
-rw-r--r--share/numericdef/ja_JP.eucJP.src12
-rw-r--r--share/numericdef/ko_KR.eucKR.src12
-rw-r--r--share/numericdef/nl_NL.ISO8859-1.src12
-rw-r--r--share/numericdef/no_NO.ISO8859-1.src12
-rw-r--r--share/numericdef/pl_PL.ISO8859-2.src12
-rw-r--r--share/numericdef/ru_RU.CP866.src12
-rw-r--r--share/numericdef/ru_RU.ISO8859-5.src12
-rw-r--r--share/numericdef/ru_RU.KOI8-R.src12
-rw-r--r--share/numericdef/sv_SE.ISO8859-1.src12
-rw-r--r--share/numericdef/uk_UA.KOI8-U.src12
-rw-r--r--share/numericdef/zh_CN.eucCN.src12
-rw-r--r--share/numericdef/zh_TW.Big5.src12
-rw-r--r--share/syscons/fonts/cp866u-8x14.fnt84
-rw-r--r--share/syscons/fonts/cp866u-8x16.fnt96
-rw-r--r--share/syscons/fonts/cp866u-8x8.fnt50
-rw-r--r--share/syscons/fonts/koi8-u-8x14.fnt84
-rw-r--r--share/syscons/fonts/koi8-u-8x16.fnt96
-rw-r--r--share/syscons/fonts/koi8-u-8x8.fnt50
-rw-r--r--share/syscons/keymaps/gr.elot.acc.kbd281
-rw-r--r--share/syscons/keymaps/gr.us101.acc.kbd281
-rw-r--r--share/syscons/keymaps/pl_PL.ISO8859-2.kbd116
-rw-r--r--share/syscons/keymaps/ua.koi8-u.shift.alt.kbd254
-rw-r--r--share/syscons/scrnmaps/koi8-u2cp866u64
-rw-r--r--share/timedef/cs_CZ.ISO8859-2.src105
-rw-r--r--share/timedef/da_DK.ISO8859-1.src102
-rw-r--r--share/timedef/de_AT.ISO8859-1.src102
-rw-r--r--share/timedef/de_DE.ISO8859-1.src102
-rw-r--r--share/timedef/en_GB.ISO8859-1.src102
-rw-r--r--share/timedef/en_US.ISO8859-1.src102
-rw-r--r--share/timedef/es_ES.ISO8859-1.src102
-rw-r--r--share/timedef/et_EE.ISO8859-15.src102
-rw-r--r--share/timedef/fi_FI.ISO8859-1.src101
-rw-r--r--share/timedef/fr_FR.ISO8859-1.src102
-rw-r--r--share/timedef/hr_HR.ISO8859-2.src102
-rw-r--r--share/timedef/hu_HU.ISO8859-2.src101
-rw-r--r--share/timedef/is_IS.ISO8859-1.src102
-rw-r--r--share/timedef/it_IT.ISO8859-1.src102
-rw-r--r--share/timedef/ja_JP.eucJP.src105
-rw-r--r--share/timedef/ko_KR.eucKR.src108
-rw-r--r--share/timedef/la_LN.ISO8859-1.src104
-rw-r--r--share/timedef/lt_LT.ISO8859-4.src101
-rw-r--r--share/timedef/nl_NL.ISO8859-1.src101
-rw-r--r--share/timedef/no_NO.ISO8859-1.src102
-rw-r--r--share/timedef/pl_PL.ISO8859-2.src99
-rw-r--r--share/timedef/pt_PT.ISO8859-1.src103
-rw-r--r--share/timedef/ru_RU.CP866.src102
-rw-r--r--share/timedef/ru_RU.ISO8859-5.src102
-rw-r--r--share/timedef/ru_RU.KOI8-R.src102
-rw-r--r--share/timedef/sl_SI.ISO8859-2.src102
-rw-r--r--share/timedef/sv_SE.ISO8859-1.src101
-rw-r--r--share/timedef/tr_TR.ISO8859-9.src104
-rw-r--r--share/timedef/zh_CN.eucCN.src102
-rw-r--r--sys/contrib/ipfilter/netinet/fil.c2132
-rw-r--r--sys/contrib/ipfilter/netinet/ip_auth.c543
-rw-r--r--sys/contrib/ipfilter/netinet/ip_auth.h63
-rw-r--r--sys/contrib/ipfilter/netinet/ip_compat.h1013
-rw-r--r--sys/contrib/ipfilter/netinet/ip_fil.c1763
-rw-r--r--sys/contrib/ipfilter/netinet/ip_fil.h634
-rw-r--r--sys/contrib/ipfilter/netinet/ip_frag.c576
-rw-r--r--sys/contrib/ipfilter/netinet/ip_frag.h69
-rw-r--r--sys/contrib/ipfilter/netinet/ip_ftp_pxy.c786
-rw-r--r--sys/contrib/ipfilter/netinet/ip_log.c507
-rw-r--r--sys/contrib/ipfilter/netinet/ip_nat.c2739
-rw-r--r--sys/contrib/ipfilter/netinet/ip_nat.h309
-rw-r--r--sys/contrib/ipfilter/netinet/ip_proxy.c452
-rw-r--r--sys/contrib/ipfilter/netinet/ip_proxy.h157
-rw-r--r--sys/contrib/ipfilter/netinet/ip_raudio_pxy.c308
-rw-r--r--sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c174
-rw-r--r--sys/contrib/ipfilter/netinet/ip_state.c1901
-rw-r--r--sys/contrib/ipfilter/netinet/ip_state.h196
-rw-r--r--sys/contrib/ipfilter/netinet/ipl.h17
-rw-r--r--sys/contrib/ipfilter/netinet/mlfk_ipl.c196
-rw-r--r--sys/crypto/rijndael/rijndael.h3
-rw-r--r--sys/dev/ar/if_ar.h51
-rw-r--r--sys/dev/ar/if_ar_isa.c239
-rw-r--r--sys/dev/ar/if_ar_pci.c170
-rw-r--r--sys/dev/ar/if_arregs.h227
-rw-r--r--sys/dev/fxp/if_fxpvar.h151
-rw-r--r--sys/dev/ic/hd64570.h372
-rw-r--r--sys/dev/mii/acphy.c353
-rw-r--r--sys/dev/mii/acphyreg.h77
-rw-r--r--sys/dev/mii/e1000phy.c473
-rw-r--r--sys/dev/mii/e1000phyreg.h286
-rw-r--r--sys/dev/mii/inphyreg.h35
-rw-r--r--sys/dev/mii/lxtphy.c392
-rw-r--r--sys/dev/mii/lxtphyreg.h90
-rw-r--r--sys/dev/mii/qsphy.c366
-rw-r--r--sys/dev/mii/qsphyreg.h88
-rw-r--r--sys/dev/mii/tdkphyreg.h82
-rw-r--r--sys/dev/rp/rp_isa.c502
-rw-r--r--sys/dev/rp/rp_pci.c368
-rw-r--r--sys/dev/rp/rpreg.h1015
-rw-r--r--sys/dev/sound/pci/vibes.c929
-rw-r--r--sys/dev/sound/pci/vibes.h203
-rw-r--r--sys/dev/sr/if_sr.h51
-rw-r--r--sys/dev/sr/if_sr_isa.c440
-rw-r--r--sys/dev/sr/if_sr_pci.c248
-rw-r--r--sys/dev/sr/if_srregs.h199
-rw-r--r--sys/dev/usb/rio500_usb.h58
-rw-r--r--sys/fs/smbfs/smbfs.h105
-rw-r--r--sys/fs/smbfs/smbfs_node.h100
-rw-r--r--sys/fs/smbfs/smbfs_smb.c1273
-rw-r--r--sys/fs/smbfs/smbfs_subr.c326
-rw-r--r--sys/fs/smbfs/smbfs_subr.h187
-rw-r--r--sys/gnu/ext2fs/alpha-bitops.h255
-rw-r--r--sys/i386/include/i4b_isppp.h253
-rw-r--r--sys/i386/include/pci_cfgreg.h53
-rw-r--r--sys/i4b/driver/i4b_ing.c881
-rw-r--r--sys/i4b/driver/i4b_ispppsubr.c4679
-rw-r--r--sys/i4b/layer1/i4b_hdlc.h393
-rw-r--r--sys/i4b/layer1/i4b_l1dmux.c455
-rw-r--r--sys/i4b/layer1/i4b_l1lib.c76
-rw-r--r--sys/i4b/layer1/ifpi/i4b_ifpi_ext.h61
-rw-r--r--sys/i4b/layer1/ifpi/i4b_ifpi_isac.c666
-rw-r--r--sys/i4b/layer1/ifpi/i4b_ifpi_l1.c244
-rw-r--r--sys/i4b/layer1/ifpi/i4b_ifpi_l1fsm.c517
-rw-r--r--sys/i4b/layer1/ifpi/i4b_ifpi_pci.c1498
-rw-r--r--sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c1393
-rw-r--r--sys/i4b/layer1/ifpnp/i4b_ifpnp_ext.h62
-rw-r--r--sys/i4b/layer1/ifpnp/i4b_ifpnp_isac.c666
-rw-r--r--sys/i4b/layer1/ifpnp/i4b_ifpnp_l1.c244
-rw-r--r--sys/i4b/layer1/ifpnp/i4b_ifpnp_l1fsm.c517
-rw-r--r--sys/i4b/layer1/ihfc/i4b_ihfc.h337
-rw-r--r--sys/i4b/layer1/ihfc/i4b_ihfc_drv.c1760
-rw-r--r--sys/i4b/layer1/ihfc/i4b_ihfc_drv.h230
-rw-r--r--sys/i4b/layer1/ihfc/i4b_ihfc_ext.h62
-rw-r--r--sys/i4b/layer1/ihfc/i4b_ihfc_l1if.c517
-rw-r--r--sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c441
-rw-r--r--sys/i4b/layer1/isic/i4b_asuscom_ipac.c233
-rw-r--r--sys/i4b/layer1/isic/i4b_avm_a1.c410
-rw-r--r--sys/i4b/layer1/isic/i4b_bchan.c405
-rw-r--r--sys/i4b/layer1/isic/i4b_ctx_s0P.c249
-rw-r--r--sys/i4b/layer1/isic/i4b_diva.c398
-rw-r--r--sys/i4b/layer1/isic/i4b_drn_ngo.c260
-rw-r--r--sys/i4b/layer1/isic/i4b_dynalink.c233
-rw-r--r--sys/i4b/layer1/isic/i4b_elsa_pcc16.c391
-rw-r--r--sys/i4b/layer1/isic/i4b_elsa_qs1i.c237
-rw-r--r--sys/i4b/layer1/isic/i4b_elsa_qs1p.c353
-rw-r--r--sys/i4b/layer1/isic/i4b_hscx.c663
-rw-r--r--sys/i4b/layer1/isic/i4b_hscx.h297
-rw-r--r--sys/i4b/layer1/isic/i4b_ipac.h204
-rw-r--r--sys/i4b/layer1/isic/i4b_isac.c660
-rw-r--r--sys/i4b/layer1/isic/i4b_isac.h388
-rw-r--r--sys/i4b/layer1/isic/i4b_isic.c499
-rw-r--r--sys/i4b/layer1/isic/i4b_isic.h329
-rw-r--r--sys/i4b/layer1/isic/i4b_isic_ext.h48
-rw-r--r--sys/i4b/layer1/isic/i4b_isic_isa.c209
-rw-r--r--sys/i4b/layer1/isic/i4b_isic_pnp.c323
-rw-r--r--sys/i4b/layer1/isic/i4b_itk_ix1.c397
-rw-r--r--sys/i4b/layer1/isic/i4b_l1.c254
-rw-r--r--sys/i4b/layer1/isic/i4b_l1fsm.c512
-rw-r--r--sys/i4b/layer1/isic/i4b_siemens_isurf.c230
-rw-r--r--sys/i4b/layer1/isic/i4b_sws.c212
-rw-r--r--sys/i4b/layer1/isic/i4b_tel_s016.c370
-rw-r--r--sys/i4b/layer1/isic/i4b_tel_s0163.c375
-rw-r--r--sys/i4b/layer1/isic/i4b_tel_s08.c303
-rw-r--r--sys/i4b/layer1/isic/i4b_usr_sti.c498
-rw-r--r--sys/i4b/layer1/itjc/i4b_hdlc.h412
-rw-r--r--sys/i4b/layer1/itjc/i4b_itjc_ext.h59
-rw-r--r--sys/i4b/layer1/itjc/i4b_itjc_isac.c552
-rw-r--r--sys/i4b/layer1/itjc/i4b_itjc_l1.c243
-rw-r--r--sys/i4b/layer1/itjc/i4b_itjc_l1fsm.c520
-rw-r--r--sys/i4b/layer1/itjc/i4b_itjc_pci.c2134
-rw-r--r--sys/i4b/layer1/iwic/i4b_iwic.h222
-rw-r--r--sys/i4b/layer1/iwic/i4b_iwic_bchan.c771
-rw-r--r--sys/i4b/layer1/iwic/i4b_iwic_dchan.c473
-rw-r--r--sys/i4b/layer1/iwic/i4b_iwic_ext.h48
-rw-r--r--sys/i4b/layer1/iwic/i4b_iwic_fsm.c228
-rw-r--r--sys/i4b/layer1/iwic/i4b_iwic_l1if.c153
-rw-r--r--sys/i4b/layer1/iwic/i4b_iwic_pci.c317
-rw-r--r--sys/i4b/layer1/iwic/i4b_w6692.h262
-rw-r--r--sys/kern/md4c.c285
-rw-r--r--sys/kern/subr_mchain.c547
-rw-r--r--sys/libkern/iconv.c479
-rw-r--r--sys/libkern/iconv_converter_if.m68
-rw-r--r--sys/libkern/iconv_xlat.c124
-rw-r--r--sys/modules/ar/Makefile8
-rw-r--r--sys/modules/libmchain/Makefile8
-rw-r--r--sys/modules/netgraph/sync_ar/Makefile11
-rw-r--r--sys/modules/netgraph/sync_sr/Makefile11
-rw-r--r--sys/modules/nmdm/Makefile12
-rw-r--r--sys/modules/smbfs/Makefile62
-rw-r--r--sys/modules/sound/driver/vibes/Makefile9
-rw-r--r--sys/modules/sr/Makefile8
-rw-r--r--sys/netgraph/ng_eiface.h84
-rw-r--r--sys/netsmb/netbios.h138
-rw-r--r--sys/netsmb/smb.h388
-rw-r--r--sys/netsmb/smb_conn.c874
-rw-r--r--sys/netsmb/smb_conn.h464
-rw-r--r--sys/netsmb/smb_crypt.c146
-rw-r--r--sys/netsmb/smb_dev.h200
-rw-r--r--sys/netsmb/smb_iod.c709
-rw-r--r--sys/netsmb/smb_rq.c752
-rw-r--r--sys/netsmb/smb_rq.h151
-rw-r--r--sys/netsmb/smb_smb.c660
-rw-r--r--sys/netsmb/smb_subr.c359
-rw-r--r--sys/netsmb/smb_subr.h198
-rw-r--r--sys/netsmb/smb_tran.h89
-rw-r--r--sys/netsmb/smb_trantcp.h88
-rw-r--r--sys/netsmb/smb_usr.c355
-rw-r--r--sys/sys/iconv.h156
-rw-r--r--sys/sys/mchain.h155
-rw-r--r--sys/sys/md4.h47
-rw-r--r--usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all15
-rw-r--r--usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.msk16
-rw-r--r--usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox34
-rw-r--r--usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan42
-rw-r--r--usr.bin/ee/FREEBSD-upgrade28
-rw-r--r--usr.bin/ee/nls/de_DE.ISO8859-1/ee.msg185
-rw-r--r--usr.bin/ee/nls/en_US.US-ASCII/ee.msg185
-rw-r--r--usr.bin/ee/nls/fr_FR.ISO8859-1/ee.msg185
-rw-r--r--usr.bin/ee/nls/pl_PL.ISO8859-2/ee.msg187
-rw-r--r--usr.bin/ee/nls/uk_UA.KOI8-U/ee.msg185
-rw-r--r--usr.bin/makewhatis/makewhatis.local.sh58
-rw-r--r--usr.bin/usbhidctl/usbhidctl.192
-rw-r--r--usr.sbin/i4b/isdnphone/audio.c159
-rw-r--r--usr.sbin/i4b/isdnphone/defs.h189
-rw-r--r--usr.sbin/i4b/isdnphone/display.c246
-rw-r--r--usr.sbin/i4b/isdnphone/isdn.c191
-rw-r--r--usr.sbin/i4b/isdnphone/main.c451
-rw-r--r--usr.sbin/i4b/isdntrace/unknownl3.c106
-rw-r--r--usr.sbin/i4b/ispppcontrol/ispppcontrol.c315
-rw-r--r--usr.sbin/kgzip/aouthdr.c79
-rw-r--r--usr.sbin/kgzip/aouthdr.h59
-rw-r--r--usr.sbin/ppp/atm.h35
1015 files changed, 0 insertions, 298397 deletions
diff --git a/contrib/file/Magdir/dyadic b/contrib/file/Magdir/dyadic
deleted file mode 100644
index e8a9d25d8c0f..000000000000
--- a/contrib/file/Magdir/dyadic
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#------------------------------------------------------------------------------
-# Dyadic: file(1) magic for Dyalog APL.
-#
-0 byte 0xaa
->1 byte <4 Dyalog APL
->>1 byte 0x00 incomplete workspace
->>1 byte 0x01 component file
->>1 byte 0x02 external variable
->>1 byte 0x03 workspace
->>2 byte x version %d
->>3 byte x .%d
diff --git a/contrib/file/Magdir/editors b/contrib/file/Magdir/editors
deleted file mode 100644
index c529d0dfab88..000000000000
--- a/contrib/file/Magdir/editors
+++ /dev/null
@@ -1,9 +0,0 @@
-
-#------------------------------------------------------------------------------
-# T602 editor documents
-# by David Necas <yeti@physics.muni.cz>
-0 string @CT\ T602 document data,
->4 string 0 Kamenicky
->4 string 1 CP 852
->4 string 2 KOI8-CS
->4 string >2 unknown encoding
diff --git a/contrib/file/Magdir/hitachi-sh b/contrib/file/Magdir/hitachi-sh
deleted file mode 100644
index 136c03838b33..000000000000
--- a/contrib/file/Magdir/hitachi-sh
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#------------------------------------------------------------------------------
-# hitach-sh: file(1) magic for Hitachi Super-H
-#
-# Super-H COFF
-#
-0 beshort 0x0500 Hitachi SH big-endian COFF
->18 beshort&0x0002 =0x0000 object
->18 beshort&0x0002 =0x0002 executable
->18 beshort&0x0008 =0x0000 \b, stripped
->18 beshort&0x0008 =0x0008 \b, not stripped
-#
-0 leshort 0x0550 Hitachi SH little-endian COFF
->18 leshort&0x0002 =0x0000 object
->18 leshort&0x0002 =0x0002 executable
->18 leshort&0x0008 =0x0000 \b, stripped
->18 leshort&0x0008 =0x0008 \b, not stripped
-
diff --git a/contrib/file/Magdir/parix b/contrib/file/Magdir/parix
deleted file mode 100644
index 09965d122ccb..000000000000
--- a/contrib/file/Magdir/parix
+++ /dev/null
@@ -1,12 +0,0 @@
-
-#------------------------------------------------------------------------------
-#
-# Parix COFF executables
-# From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
-#
-0 beshort&0xfff 0xACE PARIX
->0 byte&0xf0 0x80 T800
->0 byte&0xf0 0x90 T9000
->19 byte&0x02 0x02 executable
->19 byte&0x02 0x00 object
->19 byte&0x0c 0x00 not stripped
diff --git a/contrib/file/Magdir/tuxedo b/contrib/file/Magdir/tuxedo
deleted file mode 100644
index 119afa6a6bab..000000000000
--- a/contrib/file/Magdir/tuxedo
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-#------------------------------------------------------------------------------
-# tuxedo: file(1) magic for BEA TUXEDO data files
-#
-# from Ian Springer <ispringer@hotmail.com>
-#
-0 string \0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0 BEA TUXEDO DES mask data
diff --git a/contrib/groff/FREEBSD-Xlist b/contrib/groff/FREEBSD-Xlist
deleted file mode 100644
index 9ff94d3cf46b..000000000000
--- a/contrib/groff/FREEBSD-Xlist
+++ /dev/null
@@ -1 +0,0 @@
-*/arch
diff --git a/contrib/groff/contrib/mm/ChangeLog b/contrib/groff/contrib/mm/ChangeLog
deleted file mode 100644
index ab3ed838b8ba..000000000000
--- a/contrib/groff/contrib/mm/ChangeLog
+++ /dev/null
@@ -1,521 +0,0 @@
-Mon Mar 5 09:30:18 2001 Jörgen Hägg (jh@axis.com)
-
- * S didn't reset to default point size
- * (dummy line to force cvs update...)
-
-Sat Jan 06 10:30:00 2001 Werner Lemberg (wl@gnu.org)
-
- * Fixed assignment of page offset given as a command line argument.
-
-Fri Nov 17 05:34:17 2000 Jörgen Hägg (jh@axis.com)
-
- * Renamed tmac.m and tmac.mse to m.tmac and mse.tmac
-
-Thu Sep 14 05:52:48 2000 Jörgen Hägg (jh@axis.com)
-
- * New Changelog-format, it will show changes better.
- Easier for other to use. (Somehow I didn't really
- understand why the e-mail address was supposed to be
- 'jh at axis.com' in the Changelog. :-)
-
-Thu Sep 7 06:17:42 2000 Jörgen Hägg (jh at axis.com)
-
- * version 2.0
- * Had to do something about my version numbering.
- The main CVS archive was not in sync with mine.
- So, now it is 2.0. :-)
-
-Sat Jun 17 23:00:00 2000 Eli Zaretskii (eliz@is.elta.co.il)
-
- * Makefile.sim (.man.n): Replace `;' with `|', since DOS/Windows
- path lists use the semicolon as a separator.
-
-Sun Jun 4 21:39:00 2000 Kaneda Hiroshi (vanitas at ma3.seikyou.ne.jp)
-
- * Fixing a lot of typos in groff_mm.man
-
-Sun Jan 30 22:52:20 2000 Jörgen Hägg (jh at axis.com)
-
- * version 1.34
- * Changed the version number in the CVS repository
- * MC had a bug in column calculation, (thanks to T. Kurt Bond)
-
-Fri Sep 3 07:33:14 1999 Jörgen Hägg (jh at axis.com)
-
- * version 1.33
- * At last! I finally tracked down the PGFORM bug!
- It didn't setup the @pl, @ll and @po as it should, now it does.
- * mgm_ref/mgm_roff renamed to mmroff [-x]
- * fixed y2k-bug in \*[DT]
- * \n[cov*year] removed, hope noone used that.
- * ISODATE added with Iso as command line flag
- (iso-date suggested by Paul Eggert)
- * Added ISODATE to tmac.mse and removed local settings
- of new-date.
- * INITI syntax changed and enhanced. Index processing is now
- done with mmroff.
- * A few examples has been added, new subdirectory 'examples'.
- * Fixed bug with SETR, header references are now only saved
- when Ref > 0
- * Problem with register H1h fixed
- * Added test for missing abstract in 4.MT
- * Updated Makefile.sub, using tmac_m_prefix.
-
-Mon Mar 15 22:22:42 1999 Jörgen Hägg (jh at axis.com)
-
- * OK, let's release this as a beta, 1.33 will be better. :-)
- * version 1.32
- * fixed .el-error
- * Added number variable Hss
- * Changed Hps1 and Hps2 to units
- * added hd*h1-text to be used in user defined macro TP.
- * -U needed for SETR (I really need 'mv', 'echo', 'rm'
- and 'test' builtin!)
- * Rewritten the reference system, SETR now prints to stderr
- if the number register Qrf > 0. Store in the filename
- that is the argument to .INITR
- The old behaviour is returned if number register Initr > 0.
- * Fixed bug with List of XXXX, long lines messed up the result.
- * added number register H1dot.
- * added string variable H1txt
- * added string variable Tcst
- * added number register Dsp.
- * added alias APPX for user-defined appendix title.
- * added string variable Apptxt
- * added H1h for use in TP in headers
- * added macro EPIC
- * added macro PIC (safe replacement for PSPIC)
- * fixed Hps-bug, should be 1, not 1v.
- * fixed bug with APPSK, variable not set.
-
-Wed Feb 4 15:46:04 1998 Jörgen Hägg (jh at axis.se)
-
- * version 1.31
- * .LI will now honor a space mark.
- * Another fix for .AU to let it be used without arguments.
- * uninitialized eq*label fixed
-
-Fri Sep 6 07:13:07 1996 Jörgen Hägg (jh at axis.se)
-
- * version 1.30
- * This is more like a beta-release, bugs might pop up. :-)
- * last line in TOC was not correctly terminated (missing .br)
- * changed the indentation for displays, it will now
- indent to the current indent, not the one at the definition
- of the display.
- * Equation marks should now work better, indentation also.
- * included these bug fixes from Larry Jones:
- * The documentation for the argument to .AS was incorrect for MT 4.
- * \*(EM should be a double-dash for nroff.
- * \nS is in points, not units.
- * If \nO isn't set, the default page offset should be .75i for nroff
- and .963i for troff.
- * .S D should set the point size to \nS, not 10.
- * .S was setting the vertical spacing based on the old point size
- instead of the new point size.
- * Got rid of a spurrious .br that prevented run-in headings from
- working.
- * Reset the .SP counters in pg@header so that spacing on one page
- won't affect spacing on subsequent pages.
- * Allow .AU and .AF with no arguments (real mm does, even though it
- isn't documented).
- * Do .init@reset first thing to initialize the default environment.
- * For MT 4, the title should be 4 points larger than the default size,
- not 12 point.
- * The cover environment needs to be initialized.
- * Printing the abstract on the first page needs to be controlled by
- the .AS argument.
- * Heading eject should be suppressed if the heading immediately
- follows the first page stuff (title, author, etc.).
- * support for table of contents numbering style (.nr Oc)
- * changes the troff empty line height from .25v to .5v
- * fixed section page numbering
- * fixed a really nasty bug in footnotes that could cause you
- to lose the page footer completely if the very first
- footnote on the page occurred at just the wrong place
-
-
-Wed May 15 07:39:32 1996 Jörgen Hägg (jh at axis.se)
-
- * version 1.29
- * Syntax and scaling errror fixed, (thanks to Frazer Williams)
- * DF/DE will now do a line-break before printing the display.
- * Updated the manual for TB,FG,EX and EC.
- * Added support for the ms- (and mgs-)macro .IX
- * Added indexmacro IX, INITI, IND and INDP, support for
- TXIND, TYIND and TZIND.
- * PGFORM will now always really reset to the default
- values for unspecified arguments.
- * Floating displays tested and repaired, it should
- now (finanlly) work exactly as the original (I hope :-).
- * Should now set year correctly even after 2000.
- * Stupid bug in PGNH fixed.
- * Corrected line length for figure caption (FG and friends)
-
-
-Mon Apr 24 07:37:52 1995 Jörgen Hägg (jh at axis.se)
-
- * version 1.28
- * Added AVL (AV without date)
- * Fixed nroff scaling for W and L.
- * Added support for register E and roman/bold
- for all Subject/Date/From strings.
- * Added support for register C (1-4), (for DRAFTs and other types)
- * Will protest if not used with groff.
- * Change of the internal number registers @ps and @vs, they
- are now in units, and is set in the new macros .@ps and .@vs.
- @ps and @vs is now corrected to the real point and vertical size.
- * Macro EQ has now correct pointsize.
- * Figures should now get the right page number in the index.
- * User-defined macros can now be defined for list of
- figures, tables, equations and exhibits (T{X,Y}{FG,TB,EC,EX}.
- * Space may be omitted between prefix and mark in automatic lists (.AL)
- See .LI
-
-Tue Jan 10 07:51:37 1995 Jörgen Hägg (jh at axis.se)
-
- * version 1.27
- * Manual updated
- * More bugs fixed in DS/DF
- * added alias for :g
- * LC can now be used without argument (as the manual says. :-)
- * Register :R now supported (RS/RF)
- * footnote line was printed even if there was no room for
- any footnotes. Fixed.
- * Fixed 1C so that it can be used without page eject
- * Added support for EOP (TPs twin)
- * Hyphenation turned off by default. (Hy == 0)
-
-Fri Nov 4 08:14:50 1994 Jörgen Hägg (jh at axis.se)
-
- * version 1.25
- * DS/DF separated and several bugs fixed. Watch out for new though. :-)
- * string DT was emptied by mistake in the previous version.
- * RD made prettier.
- * typo in AV and let@print-head fixed.
-
-Mon Oct 31 08:19:24 1994 Jörgen Hägg (jh at axis.se)
-
- * version 1.24
- * Bug fixed and format extended in .SG and .FC.
- * date is always printed unless .ND without argument is used.
- (I wonder what's the right thing to do, this might change.)
- * Swedish letter-standards implemented in tmac.mse.
- * .ND can be used to turn off the date. (Empty argument)
-
-Mon Oct 31 08:14:09 1994 Jörgen Hägg (jh at axis.se)
-
- * version 1.23
- * An attempt to get in sync with RCS. This is the distributed
- version.
-
-Thu Oct 27 08:29:34 1994 Jörgen Hägg (jh at axis.se)
-
- * version 1.22
- * (version 1.21 lost... :-)
- * Letter macros added!!
- * The following macros are added:
- * AV, FC, IA ,IE, LT, LO, NE, NS, SG, WA, WE
- * nP also added.
-
-Tue Dec 14 16:26:36 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.20
- * spelling-corrections
- * Makefile.sim updated to the correct version, and a uninstall
- target added.
- * @cur-lib removed from tmac.m (obsolete)
- * fixed check for references i .TC, .RP now resets the flag correctly.
- * floating display should now be printed if there is space.
- * first version using RCS. I've been avoiding version control until it
- became necessary.
- * WC WD now works in two-column-mode.
-
-Tue Sep 7 08:37:00 1993 Jörgen Hägg (jh at efd.lth.se)
-
- * version 1.19
- * .lt is called in the header for .TP also.
- * Variable Pgps added to control the header and footer point-size.
- * Error-text printed with .APP removed.
- * Error with .FG, .TB, .EC and .EX indentation fixed.
- * header and footer line-length is not changed by MC or 2C.
- * Default for page-length and page-offset is now taken from
- \n[.p] and \n[.o].
- * Argument to .ab (abort) is supplied.
- * Argument to .1C added.
- * Argument to .PGFORM added.
- * RP/RS/RF totally rewritten. Should work with 2C now.
-
-Fri Apr 23 10:37:25 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.18
- * Height of display is now more exactly calculated.
- * tabs and blankspaces where wrong in .VERBON.
- * error in manual for escape-character in VERBON.
- * Makefile.sub: installed tmac.m as tmac.m and tmac.mse
- * Installation of tmac.mse now supports TMAC_M.
- * bug with N fixed.
-
-Mon Apr 5 09:36:01 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.17
- * MULB preserves size.
- * bug in VERBON fixed, causing strange errors.
- * section-page footer fixed.
- * added support for numberregister S
- * fixed bug with floating displays wich made floats to
- generate space on a page, but broke page anyway.
- * end-of-page trap reinstalled.
-
-Mon Mar 29 10:53:13 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.16
- * MUL* now use the previous font and family.
- * extra blank page at end-of-text eliminated.
-
-Mon Mar 8 10:27:47 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.15
- * Didn't restore pointsize to current size in .H.
- * B1/B2 did not work with indent. (MULE and friends)
- * fixed old problem with trailing empty pages.
-
-Fri Mar 5 15:20:49 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.14
- * Sigh. Amazing what a missing \} can do. If the string
- HP was set, then all text disappeared...
-
-Fri Mar 5 14:12:43 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.13
- * Fixed bug with handling ps/vs in .H. (again, sigh... )
-
-Wed Mar 3 09:21:20 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.12
- * Line-break added to PGFORM.
- * added more features to VERBON
- * .S is not used anymore in H, it caused confusion with
- normal text, but it will still set .vs.
- * SK was broken, will now produce the requested number of
- empty pages.
- * dotted lines added to LIST OF FIGURES adn friends.
- Also better linespacing.
-
-Mon Feb 22 12:41:06 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.11
- * missing left-parenthesis gave ") .sp" when N=4.
- * N=4 removed user-specified header also.
- * MOVE made linelength pageoffset wider than wanted.
- * fixed (again) parenthesis in RP.
-
-Thu Jan 21 12:10:39 1993 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.10
- * changed PROG_PREFIX to g in the manual-pages.
- * Better check if new page is needed in .H, when Ej>0.
- * Usage of variable Lsp now more complete.
- * Space added in TOC when mark is equal to size.
- * Usermacro HY moved after font-calulations.
- * .S used instead of .ps, which will use .vs correct.
- * Now possible to set Hps1/2 inside HX.
- * .FD "" 1 is now fixed.
- * section-page numbering bug fixed.
- * several bugs in VERBON/OFF fixed.
-
-Tue Dec 8 16:43:15 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.09
- * N==4 gives no default header
-
-Sat Nov 21 14:28:20 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.08
- * Escape-character disabled between
- VERBON/VERBOFF (turned on by an argument).
- Pointsize and fontchange also added as arguments.
- * MULB, MULN and MULE added to get multicolumn output
- with different width.
- * Number register N can now use 1-5.
- * Register Sectp and Sectf added.
- * Register P is now updated correctly for "section-page" numbering.
-
-Thu Nov 19 11:19:33 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.07
- * .OP fixed to eject a blank page if not odd.
-
-Fri Nov 13 09:46:09 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.06
- * Macro TL rewritten. TL depends now on a following .AU.
- * NOTES updated.
- * .lt is now used more frequent when linelength is changed.
- * macro AST added.
- * removed PH/EH/OH not needed in ?.MT.
-
-Wed Oct 28 14:35:43 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.05
- * .VM implemented.
- * Possible bug in page heading fixed. Changed .sp to 'sp in HEADER.
-
-Thu Aug 20 13:56:31 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.04
- * page-break in .EQ moved.
- * changed unit for footer-size and header-size from units to lines.
- Fixes problems with .S and page-breaks.
- * \n[%] is now treated as a string, wich makes it possible
- to assign new formats to it. Unfortunately, it was necessary
- to change the page-number-variable in GETPN to a string.
- * Makefile.sub included. (Thank you, James)
-
-Thu May 7 16:14:10 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.03
- * Typo and centering in DS/DE fixed.
- Even and odd pageheaders were reversed.
- * LI: pad and mark-indent was lost in some earlier versions. Now fixed.
- * fixed bug in reference to .FG, .TB, ...
- * APP did not clear headercounters.
- * Pointsize in titles is now only set at the beginning and
- when PH, PF, OH, OF, EH and EF are used.
-
-Thu May 6 16:01:35 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.02
- * OP fixed.
-
-Fri Mar 6 09:36:09 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.01
- * two .LI without text between should not be printed
- on the same row. Now fixed.
- * figure titles and friends fixed, now possible with many .FG
- in a DS/DE. Didn't always position correctly in previous version,
- but is now always printed as it should.
- * Makefile fixed for Ultrix.
- * DS/DF could not handle empty arguments correct
- * Missing .br i EQ added.
-
-Sat Jan 25 15:47:21 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 1.00
- * No betaversion anymore!
- * Fixed headernumbers within appendixes.
- * DS did not keep the same font as before DS.
- * mmse did a line break.
-
-Fri Jan 24 14:38:16 1992 Joergen Haegg (jh at efd.lth.se)
-
- * version 0.16
- * bug in TC, multiple line headers did not wrap correctly.
- * added support for mm/locale and mm/language_locale.
- * cov*default-firm in locale sets name of firm in the MT covers.
- * cov*location-xxxx in locale sets location xxxx to the contents
- of cov*location-xxxx. Used in the MT covers.
- * hanging indent in lists fixed.
- * use larger empty lines if .nroff is defined.
- * macros, like .P, can now be used inside abstracts.
- * .S do not reset indentation anymore.
- * .RS aA now sets a string, not an integer.
- * appendix with .APP or .APPSK added.
-
-Thu Nov 28 22:00:59 1991 Joergen Haegg (jh at efd.lth.se)
-
- * version 0.15
- * Fixed .AU in MT 0-3, added support for variable Au.
- * Bug in the positioning of the foot-notes.
- * lists not indented properly.
- * Hps1 and Hps2 added.
- * COVER had to have an argument.
- * table of contents can now have multiline header.
- * .HU now increments headingvariable H?
- * added the inclusion of a locale file.
-
-Sat Nov 23 14:40:17 1991 Joergen Haegg (jh at efd.lth.se)
-
- * version 0.14
- * bug when using -rO fixed.
- * MT 1-4 added.
- * default is now MT 1
- * .EQ/.EN can be used outside of .DS/.DE without complaints. But
- I don't recommend it. Neither does the DWB books.
- * LI don't break lines now if arg too big.
- * PGFORM did not reset indent.
- * Added the numbervariable Hps.
- * Rewritten and added MT 0-5 + "string".
- * Added TM.
- * Indent to AS added
-
-Wed Nov 6 15:18:40 1991 Joergen Haegg (jh at efd.lth.se)
-
- * version 0.13
- * ds*format nod defined if PS/PE is used without DS/DE.
- * GETST added, fourth argument to EX, FG, TB and EC added.
-
-Mon Nov 4 13:38:01 1991 Joergen Haegg (jh at efd.lth.se)
-
- * version 0.12
- * Fixed C,D,P,+-size in .S
-
-Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
- * Next version will have ChangeLog entries...
- * Bug in INITR fixed.
- * VERBON/VERBOFF added to include programlistings
- * Bug in .DE fixed, addition overflow
-Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
- * spelling error in month-names.
- * WC should work now (no warranty :-)
- * FD almost finished, some details missing.
- * incorrect calculation of foot-notes fixed.
- * DS/DE did not break page when the size was smaller than the paper
- * Forward/backward referencesystem added. Se .INITR in README.
- * mgmsw changed name to mgmse.
-Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
- * embarrassing bug in .P fixed
- * .H did always eject page, now fixed.
- * lost floating displays now found.
- * accents added (from mgs)
- * empty line in .EQ/.EN removed
- * indentation in .TC corrected.
- * indentation of DS/DE in lists fixed.
- * .TB and friends now work inside DS/DE and outside.
- * .WC partially implemented (WF and WD). Still working on it.
- * .mso used if version>=1.02
-Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
- * register P was not working.
- * support for register Fg, Tb, Ec and Ex.
- * list items was left on the previous page at a page break.
- * tlevel in .TC now defaults to 2.
- * string DT, EM and Tm supported.
- * new macro: PGNH, see comments.
- * bug in MOVE fixed.
- * pagenumber in .TC fixed.
- * a blank page was ejected if Ej==1, now fixed
- * bug in floating display fixed (did break and SP wrong)
- * bug in .SP fixed, no lines is now printed at top of page
- * There are still problems with footnotes and displays in two column mode.
-Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
- * register P added (same as %)
- * bug in floating displays fixed
- * MOVE added
- * MT added, see comment below
- * COVER/COVEND added
- * fixed bug in figure titles
- * extended S, se comment below
- * MT 0 added
- * ms-cover added (COVER ms)
-Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
- * bugs in RD and comb. fonts fixed
-Sun Jan 1 00:00:00 1991 Joergen Haegg (jh at efd.lth.se)
- * HC added
- * Combined fonts (IB,BI...)
- * HM added
- * RD added
- * OP added
- * TP&PX supported
- * warnings for unimplemented macros
diff --git a/contrib/groff/contrib/mm/Makefile.sim b/contrib/groff/contrib/mm/Makefile.sim
deleted file mode 100644
index e1d4a142b73f..000000000000
--- a/contrib/groff/contrib/mm/Makefile.sim
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# $Id: Makefile.sim,v 2.1 2000/11/17 04:26:02 jhaegg Exp $
-#
-# To install mgm separately as gm.tmac:
-# make -f Makefile.sub tmacdir=/usr/local/lib/groff/tmac srcdir=. \
-# INSTALL_DATA='install -m 644' tmac_m=gm install
-#
-# or as m.tmac:
-#
-# tmacdir is the destination for your groff/tmac-directory, srcdir is
-# this directory and INSTALL_DATA is the command to install a file with.
-# If you dont have 'install': use 'cp'.
-
-
-# change this to whatever you like
-tmacdir=/usr/local/lib/groff/tmac
-#tmac_m = gm
-tmac_m = m
-indexdir = xx
-install = install -m 644
-
-# Do not change anything below this line
-srcdir = .
-version = 1.32
-mdate = 1999-09-03
-
-.SUFFIXES: .n .man
-
-all:
-
-
-install: groff_mm.n groff_mmse.n
- $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \
- INSTALL_DATA='$(install)' tmac_m=$(tmac_m) install
-
- uninstall: groff_mm.n groff_mmse.n
- $(MAKE) -f Makefile.sub tmacdir=$(tmacdir) srcdir=$(srcdir) \
- INSTALL_DATA='$(install)' tmac_m=$(tmac_m) uninstall_sub
-
-
-.man.n:
- @echo Making $@ from $<
- @-rm -f $@
- @sed -e "s|@HYPHENFILE@|$(hyphenfile)|g" \
- -e "s|@FONTDIR@|$(fontdir)|g" \
- -e "s|@FONTPATH@|$(fontpath)|g" \
- -e "s|@MACRODIR@|$(tmacdir)|g" \
- -e "s|@MACROPATH@|$(tmacpath)|g" \
- -e "s|@DEVICE@|$(DEVICE)|g" \
- -e "s|@DEFAULT_INDEX@|$(indexdir)/$(indexname)|g" \
- -e "s|@DEFAULT_INDEX_NAME@|$(indexname)|g" \
- -e "s|@INDEX_SUFFIX@|$(indexext)|g" \
- -e "s|@COMMON_WORDS_FILE@|$(common_words_file)|g" \
- -e "s|@MAN1EXT@|$(man1ext)|g" \
- -e "s|@MAN5EXT@|$(man5ext)|g" \
- -e "s|@MAN7EXT@|$(man7ext)|g" \
- -e "s|@TMAC_S@|$(tmac_s)|g" \
- -e "s|@TMAC_M@|$(tmac_m)|g" \
- -e "s|@TMAC_MDIR@|$(tmacdir)/mm|g" \
- -e "s|@BROKEN_SPOOLER_FLAGS@|$(BROKEN_SPOOLER_FLAGS)|g" \
- -e "s|@VERSION@|$(version)|g" \
- -e "s|@MDATE@|$(mdate)|g" \
- -e "s|@g@|$(g)|g" \
- -e "s!@G@;`echo $(g) | tr [a-z] [A-Z]`!g" \
- $< >$@
-
diff --git a/contrib/groff/contrib/mm/Makefile.sub b/contrib/groff/contrib/mm/Makefile.sub
deleted file mode 100644
index 87cf0504fe4d..000000000000
--- a/contrib/groff/contrib/mm/Makefile.sub
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# $Id: Makefile.sub,v 2.1 2000/11/17 04:26:02 jhaegg Exp $
-#
-PROG=mmroff
-MAN7=\
- groff_mm.n \
- groff_mmse.n \
- mmroff.n
-FILES=0.MT 5.MT 4.MT ms.cov se_ms.cov
-# Local configuration files with default values.
-LOCALE = locale se_locale
-CLEANADD=temp
-
-all: mmroff
-
-install: install_mm
-
-install_mm: install_mmroff install_m
- -test -d $(tmacdir)/mm || $(mkinstalldirs) $(tmacdir)/mm
- -for f in $(FILES); do \
- rm -f $(tmacdir)/mm/$$f; \
- $(INSTALL_DATA) $(srcdir)/mm/$$f $(tmacdir)/mm/$$f; \
- done
- -for f in $(LOCALE); do \
- test -f $(tmacdir)/mm/$$f || touch $(tmacdir)/mm/$$f; \
- done
-
-install_m:
- -test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir)
- -rm -f $(tmacdir)/tmac.$(tmac_m_prefix)m
- -rm -f $(tmacdir)/$(tmac_m_prefix)m.tmac
- $(INSTALL_DATA) $(srcdir)/m.tmac $(tmacdir)/$(tmac_m_prefix)m.tmac
- @sed -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \
- $(srcdir)/mse.tmac > $(tmacdir)/$(tmac_m_prefix)mse.tmac
-install_mmroff : mmroff
- -test -d $(bindir) || $(mkinstalldirs) $(bindir)
- -rm -f $(bindir)/mmroff
- $(INSTALL_SCRIPT) mmroff $(bindir)/mmroff
-
-mmroff: mmroff.pl
- -rm -f $@
- -sed -e 's;/usr/bin/perl;$(PERLPATH);' $(srcdir)/mmroff.pl >$@
- -chmod +x $@
-
-
-uninstall_sub:
- -for f in $(FILES); do rm -f $(tmacdir)/mm/$$f; done
- -for f in $(LOCALE); do \
- test -s $(tmacdir)/mm/$$f || rm -f $(tmacdir)/mm/$$f; \
- done
- -rm -f $(tmacdir)/tmac.$(tmac_m_prefix)m
- -rm -f $(tmacdir)/$(tmac_m_prefix)m.tmac
- -rm -f $(tmacdir)/$(tmac_m_prefix)mse.tmac
- -rmdir $(tmacdir)/mm
- -rm -f $(bindir)/mmroff
diff --git a/contrib/groff/contrib/mm/NOTES b/contrib/groff/contrib/mm/NOTES
deleted file mode 100644
index 7643c10067c7..000000000000
--- a/contrib/groff/contrib/mm/NOTES
+++ /dev/null
@@ -1,105 +0,0 @@
-######################################################################
-$Id: NOTES,v 2.0 2000/09/14 03:40:24 jhaegg Exp $
-
-Beware!
-This may be old information. Trust only the source. :-)
-
-Implementation notes. (Or how to make your own national mm)
-
-Different commands:
-
-COVER [arg]
-MT [arg [addressee]]
-The arg is part of a filename in mm/*.MT or mm/*.cov.
-This file is read when the macro is executed. Therefore it must be
-put before any text output.
-In each file there are definitions of all extra macros needed for the
-cover sheet. MT files is only for compatibility reasons, and has several
-limits due to that it don't know when the cover starts, and cannot
-change sizes. Use COVER for new coversheet macros.
-
-But with MT it is possible to write all of the AT&T covers.
-An example can be found in mm/0.MT.
-
-When writing a new cover using COVER, have in mind that the cover
-should print the page with the COVEND macro. This macro
-should be defined by the new macrofile.
-
-Here is a part of ms.cov:
-> .\"-----------------
-> .de COVEND
-> .sp |4.2c
-> .cov@print-title
-> .cov@print-authors
-> .cov@print-firm
-> .cov@print-abstract
-> .cov@print-date
-This is important, since COVER disables the page header.
-> .pg@enable-top-trap
-Should begin with page one (normally).
-> .bp 1
-And enable the trap at the page footer.
-> .pg@enable-trap
-> ..
-
-#########################
-
-Variables for covers:
-I = integer
-S = string
-D = diversion
-M = macro
-
-Name Type Desc.
-cov*au I The number of authors.
-
-cov*title M Title collected with .TL.
-
-cov*au!x!y S Author(s) given to .AU
-cov*at!x!y S Author(s) title given to .AT
- x is the author-index [1-cov*au],
- y is the argument-index [1-9].
- Look at the table with indexes.
-
-cov*firm I Author(s) firm.
-
-cov*abs-arg I Argument to abstract.
-
-cov*abs-ind I Indent for abstract.
-
-cov*abs-name S The string 'ABSTRACT', changed with .AST
-
-cov*abstract M The abstract.
-
-cov*new-date S The date (todays date if ND is not used)
-
-cov*mt-type S MT type
-cov*mt-addresse S MT addressee
-
-
-##########################
-Argument-index for cov*au:
-
-Index Desc.
-1 name
-2 initials
-3 location
-4 department
-5 extension
-6 room
-7 arg 7
-8 arg 8
-9 arg 9
-
-The location is set to the contents of string cov*location-xxxx
-if location is equal to xxxx and cov*location-xxxx is defined
-in the file locale.
-
-
-Argument-index for cov*at:
-
-Index Desc.
-1 title 1
-. .
-. .
-9 title 9
diff --git a/contrib/groff/contrib/mm/README b/contrib/groff/contrib/mm/README
deleted file mode 100644
index 15901ddc974a..000000000000
--- a/contrib/groff/contrib/mm/README
+++ /dev/null
@@ -1,37 +0,0 @@
-
-$Id: README,v 2.1 2000/11/17 04:27:03 jhaegg Exp $
-
-This is mgm, a macro package for groff.
-
-It is supposed to be compatible with the DWB mm macros,
-and has several extensions.
-
-Send bug reports to jh@axis.com with a description of the problem
-and a sample of text which reproduces the error.
-
-Don't forget to mention the version of mgm (look in the beginning
-of m.tmac) and the version of groff.
-
-Any new ideas or improvements are welcome.
-
-Newest version is available here or at the groff CVS repository.
-ftp://ftp.axis.se/pub/groff/mm<something>.gz
-
-You can install mgm as a separate package without the configure in groff
-with the following command:
-
-make -f Makefile.sim install
-
-This README should be bigger :-)
-
-/Jörgen Hägg
-
-Thanks to everyone who have sent me bug-reports and fixes.
-
-
-Yes, my version numbering differs from the groff CVS, but I
-like mine better. :-)
-
-More likely, I'm too lazy to change it, but someday I'll
-try to sync them...
-The step to 2.0 is an attempt, let's see if it works.
diff --git a/contrib/groff/contrib/mm/examples/APP b/contrib/groff/contrib/mm/examples/APP
deleted file mode 100644
index 82352e58c3e4..000000000000
--- a/contrib/groff/contrib/mm/examples/APP
+++ /dev/null
@@ -1,352 +0,0 @@
-.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
-granary
-grapheme
-graphic
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-.H 2 "grapefruit grapevine graph grapheme graphic graphite"
-granary
-grand
-graphic
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-.H 3 "grapple"
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-.H 1 "Graves gravestone graveyard gravid gravitate gravy gray"
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-.H 1 "Greenfield greengrocer greenhouse greenish Greenland Greensboro"
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-.H 1 "greensward greenware Greenwich greenwood Greer greet"
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-.APP "" "Graves app a gravestone graveyard gravid gravitate gravy gray"
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-.APP "" "Greenfield app b greengrocer greenhouse greenish Greenland Greensboro"
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
-.H 2 "grandniece grandpa grandparent grandson grandstand granite granitic"
-.H 2 "granny granola grant grantee grantor granular granulate"
-.H 2 "granule Granville grape"
-.H 2 "grapefruit grapevine graph grapheme graphic graphite"
-.H 3 "grapple"
-grandfather
-grandiloquent
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-.APP ABC "greensward app abc greenware Greenwich greenwood Greer greet"
-graven
-Graves
-.APP "" "handstand app f handwrite handwritten handy handyman handymen"
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-.APPSK "" 10 "Handel app c 10 handhold handicap handicapped handicapper"
-.APPSK "" 23 "handicapping app d 23 handicraftsmen handiwork"
-.APPSK "" 99 "handmade app e 99 handset handshake handsome handspike"
-.nr Aph 0
-.APP "" "handstand app f handwrite handwritten handy handyman handymen"
-headsmen
-headstand
-headstone
-headstrong
-headwall
-headwater
-headway
-headwind
-.H 2 "graybeard grayish Grayson graywacke graze grease greasy great greatcoat"
-.H 2 "greater grebe Grecian Greece greed greedy Greek green Greenbelt Greenberg"
-.H 2 "Greenblatt Greenbriar Greene greenery"
-.H 3 "Greenfield greengrocer greenhouse greenish Greenland Greensboro"
-.H 3 "greensward greenware Greenwich greenwood Greer greet"
-heady
-heal
-Healey
-health
-healthful
-healthy
-Healy
-heap
-hear
-heard
-hearken
-hearsay
-hearse
-Hearst
-heart
-heartbeat
-heartbreak
-hearten
-heartfelt
-hearth
-hearty
-heat
-heater
-heath
-heathen
-heathenish
-Heathkit
-heave
-heaven
-heavenward
-heavy
-heavyweight
-Hebe
-hebephrenic
-Hebraic
-Hebrew
-Hecate
-hecatomb
-heck
-heckle
-Heckman
-hectic
-hector
-.APP "" "hang hangable app f hangar hangman hangmen hangout hangover hank"
-Hecuba
-he'd
-hedge
-.H 2 "graybeard grayish Grayson graywacke graze grease greasy great greatcoat"
-hedgehog
-hedonism
-hedonist
-heed
-heel
-.H 2 "greater grebe Grecian Greece greed greedy Greek green Greenbelt Greenberg"
-heft
-hefty
-Hegelian
-hegemony
-Heidelberg
-heigh
-height
-heighten
-Heine
-Heinrich
-Heinz
-heir
-heiress
-Heisenberg
-held
-Helen
-Helena
-Helene
-Helga
-helical
-helicopter
-heliocentric
-heliotrope
-helium
-helix
-he'll
-hell
-hellbender
-hellebore
-Hellenic
-hellfire
-hellgrammite
-hellish
-hello
-helm
-helmet
-Helmholtz
-helmsman
-helmsmen
-Helmut
-help
-helpful
-helpmate
-.APP "" "Hankel app g Hanley Hanlon Hanna Hannah Hannibal Hanoi Hanover"
-Helsinki
-Helvetica
-hem
-hematite
-Hemingway
-hemisphere
-hemispheric
-hemlock
-hemoglobin
-hemolytic
-hemorrhage
-hemorrhoid
-hemosiderin
-hemp
-Hempstead
-hen
-henbane
-hence
-henceforth
-henchman
-henchmen
-.H 2 "greater grebe Grecian Greece greed greedy Greek green Greenbelt Greenberg"
-Henderson
-Hendrick
-Hendricks
-Hendrickson
-henequen
-Henley
-henpeck
-Henri
-Henrietta
-henry
-hepatica
-hepatitis
-Hepburn
-heptane
-her
-Hera
-Heraclitus
-herald
-herb
-Herbert
-Herculean
-Hercules
-herd
-herdsman
-here
-hereabout
-hereafter
-hereby
-hereditary
-.TC
diff --git a/contrib/groff/contrib/mm/examples/B1B2 b/contrib/groff/contrib/mm/examples/B1B2
deleted file mode 100644
index a2bb3add57d9..000000000000
--- a/contrib/groff/contrib/mm/examples/B1B2
+++ /dev/null
@@ -1,91 +0,0 @@
-abetting
-abeyance
-abeyant
-abhorred
-abhorrent
-abide
-Abidjan
-Abigail
-abject
-ablate
-ablaze
-able
-ablution
-Abner
-abnormal
-Abo
-aboard
-abode
-abolish
-.B1
-abolition
-abominable
-abominate
-aboriginal
-AAA
-ABORIGINE
-ABORNING
-ABORT
-ABOUND
-ABOUT
-ABOVE
-ABOVEBOARD
-ABOVEGROUND
-abovementioned
-abrade
-Abraham
-Abram
-Abramson
-abrasion
-abrasive
-abreact
-.B2
-abreast
-abrogate
-abrupt
-abscess
-abscissa
-abscissae
-absence
-absent
-absentee
-absenteeism
-absentia
-absentminded
-absinthe
-absolute
-absolution
-absolve
-absorb
-absorbent
-absorption
-absorptive
-abstain
-abstention
-abstract
-abstracter
-abstractor
-ABSURD
-ABUILDING
-ABUNDANT
-ABUSABLE
-ABUSE
-ABUSIVE
-ABUT
-ABUTTED
-ABUTTING
-ABYSMAL
-ABYSS
-ABYSSINIA
-AC
-ACADEME
-ACADEMIA
-ACADEMIC
-ACADEMICIAN
-ACADEMY
-ACADIA
-ACANTHUS
-ACAPULCO
-ACCEDE
-ACCELERATE
-ACCELEROMETER
diff --git a/contrib/groff/contrib/mm/examples/COVER b/contrib/groff/contrib/mm/examples/COVER
deleted file mode 100644
index d23597f0a897..000000000000
--- a/contrib/groff/contrib/mm/examples/COVER
+++ /dev/null
@@ -1,235 +0,0 @@
-.COVER
-.ND 911123
-.TL "charge" "filing"
-This is a test
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-.AU "Nisse Svensson" "DGY" "BF" "Computer Center" "5488" "5-2115" "nisse@vira.sture.elm"
-.AF "MT GRANDSTAND GRANITE GRANITIC"
-.AS 1 10
-grant
-grantee
-grantor
-granular
-granulate
-granule
-Granville
-grape
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-greater
-grebe
-Grecian
-.AE
-.COVEND
-Greece
-greed
-greedy
-Greek
-green
-Greenbelt
-Greenberg
-Greenblatt
-Greenbriar
-Greene
-greenery
-Greenfield
-greengrocer
-greenhouse
-greenish
-Greenland
-Greensboro
-greensward
-greenware
-Greenwich
-greenwood
-Greer
-greet
-Greg
-gregarious
-Gregg
-Gregory
-gremlin
-grenade
-Grendel
-Grenoble
-Gresham
-Greta
-Gretchen
-grew
-grey
-greyhound
-greylag
-grid
-griddle
-gridiron
-grief
-grievance
-grieve
-grievous
-griffin
-Griffith
-grill
-grille
-grilled
-grillwork
-grim
-grimace
-Grimaldi
-grime
-Grimes
-Grimm
-grin
-grind
-grindstone
-grip
-gripe
-grippe
-grisly
-grist
-gristmill
-Griswold
-grit
-gritty
-grizzle
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-grandstand
-granite
-granitic
-granny
-granola
-grant
-grantee
-grantor
-granular
-granulate
-granule
-Granville
-grape
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-greater
-grebe
-Grecian
-Greece
-greed
-greedy
-Greek
-green
-Greenbelt
-Greenberg
-Greenblatt
-Greenbriar
-Greene
-greenery
-Greenfield
-greengrocer
-greenhouse
-greenish
-Greenland
-Greensboro
-greensward
-greenware
diff --git a/contrib/groff/contrib/mm/examples/IND b/contrib/groff/contrib/mm/examples/IND
deleted file mode 100644
index fbf6c43a031a..000000000000
--- a/contrib/groff/contrib/mm/examples/IND
+++ /dev/null
@@ -1,4191 +0,0 @@
-.de foo
-a=\\$1, b=\\$2
-.br
-..
-.INITI N ind-data
-.H 1 "halve"
-.IND granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-.IND grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-grandstand
-granite
-granitic
-granny
-granola
-grant
-grantee
-grantor
-granular
-.IND granulate
-granule
-Granville
-grape
-.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-.H 1 "halo halocarbon halogen Halpern Halsey Halstead halt halvah"
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-.IND grave
-gravel
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-greater
-.H 1 "Han Hancock hand handbag handbook handclasp handcuff Handel handful"
-grebe
-Grecian
-Greece
-greed
-greedy
-.IND Greek
-green
-Greenbelt
-Greenberg
-.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
-Greenblatt
-Greenbriar
-Greene
-greenery
-Greenfield
-greengrocer
-greenhouse
-greenish
-Greenland
-Greensboro
-greensward
-.H 1 "handgun"
-greenware
-Greenwich
-greenwood
-Greer
-greet
-Greg
-gregarious
-Gregg
-Gregory
-.IND gremlin
-grenade
-Grendel
-Grenoble
-Gresham
-Greta
-Gretchen
-grew
-grey
-greyhound
-greylag
-grid
-griddle
-gridiron
-grief
-grievance
-grieve
-grievous
-griffin
-Griffith
-grill
-grille
-grilled
-grillwork
-grim
-.IND grimace
-Grimaldi
-grime
-Grimes
-Grimm
-grin
-grind
-grindstone
-grip
-gripe
-grippe
-grisly
-grist
-gristmill
-Griswold
-grit
-gritty
-grizzle
-grizzly
-groan
-groat
-grocer
-grocery
-groggy
-.IND groin
-grommet
-groom
-groove
-grope
-grosbeak
-gross
-.H 1 "handicapped handicapper handicapping handicraft handicraftsman"
-Grosset
-Grossman
-Grosvenor
-grotesque
-Groton
-ground
-groundsel
-groundskeep
-groundwork
-group
-groupoid
-grout
-grove
-grovel
-Grover
-grow
-growl
-grown
-grownup
-.IND growth
-grub
-grubby
-grudge
-gruesome
-gruff
-grumble
-Grumman
-grunt
-gryphon
-g's
-GSA
-GU
-Guam
-guanidine
-guanine
-guano
-guarantee
-guaranteeing
-guarantor
-guaranty
-guard
-guardhouse
-.IND Guardia
-guardian
-Guatemala
-.IND gubernatorial
-Guelph
-Guenther
-guerdon
-guernsey
-guerrilla
-guess
-guesswork
-guest
-guffaw
-Guggenheim
-Guiana
-guidance
-guide
-guidebook
-guideline
-guidepost
-guiding
-guignol
-guild
-.H 1 "handicraftsmen handiwork handkerchief handle"
-guildhall
-guile
-Guilford
-guillemot
-guillotine
-guilt
-.IND guilty
-guinea
-guise
-guitar
-gules
-gulf
-.H 1 "handleable handlebar handline handmade handmaiden handout"
-gull
-Gullah
-gullet
-gullible
-gully
-gulp
-gum
-gumbo
-gumdrop
-gummy
-gumption
-gumshoe
-gun
-Gunderson
-.IND gunfight
-gunfire
-gunflint
-gunk
-gunky
-gunman
-.IND gunmen
-gunnery
-gunny
-gunplay
-gunpowder
-gunshot
-gunsling
-Gunther
-gurgle
-Gurkha
-guru
-Gus
-gush
-gusset
-gust
-Gustafson
-Gustav
-Gustave
-Gustavus
-gusto
-gusty
-gut
-.H 1 "handset"
-Gutenberg
-Guthrie
-gutsy
-guttural
-.IND guy
-Guyana
-guzzle
-Gwen
-Gwyn
-gym
-gymnasium
-gymnast
-gymnastic
-gymnosperm
-gyp
-gypsite
-gypsum
-gypsy
-gyrate
-gyrfalcon
-gyro
-.IND gyrocompass
-gyroscope
-h
-ha
-Haag
-Haas
-habeas
-haberdashery
-Haberman
-.IND Habib
-habit
-habitant
-habitat
-habitation
-habitual
-habituate
-hacienda
-hack
-hackberry
-Hackett
-hackle
-hackmatack
-.H 1 "handshake handsome handspike handstand handwaving handwrite handwritten"
-hackney
-hackneyed
-hacksaw
-had
-Hadamard
-Haddad
-haddock
-Hades
-Hadley
-hadn't
-Hadrian
-hadron
-hafnium
-.IND Hagen
-Hager
-haggard
-haggle
-Hagstrom
-Hague
-Hahn
-Haifa
-haiku
-hail
-hailstone
-hailstorm
-Haines
-hair
-.IND haircut
-hairdo
-hairpin
-hairy
-Haiti
-Haitian
-Hal
-halcyon
-hale
-Haley
-half
-halfback
-.IND halfhearted
-halfway
-halibut
-halide
-.H 1 "handy handyman handymen Haney Hanford hang hangable hangar"
-Halifax
-halite
-hall
-hallelujah
-Halley
-hallmark
-hallow
-Halloween
-hallucinate
-hallway
-halma
-halo
-halocarbon
-halogen
-Halpern
-Halsey
-Halstead
-halt
-halvah
-halve
-Halverson
-ham
-.IND Hamal
-Hamburg
-hamburger
-Hamilton
-hamlet
-Hamlin
-hammerhead
-hammock
-Hammond
-hamper
-Hampshire
-.IND Hampton
-hamster
-Han
-.H 1 "hangman hangmen hangout hangover hank Hankel Hanley"
-Hancock
-hand
-handbag
-handbook
-handclasp
-handcuff
-Handel
-handful
-handgun
-handhold
-handicap
-handicapped
-.IND handicapper
-handicapping
-handicraft
-handicraftsman
-handicraftsmen
-handiwork
-handkerchief
-handle
-handleable
-handlebar
-handline
-handmade
-handmaiden
-handout
-handset
-handshake
-handsome
-handspike
-handstand
-handwaving
-.H 1 "Hanlon Hanna Hannah Hannibal Hanoi Hanover Hanoverian Hans"
-handwrite
-handwritten
-handy
-handyman
-handymen
-Haney
-.IND Hanford
-hang
-hangable
-hangar
-hangman
-hangmen
-hangout
-hangover
-.IND hank
-Hankel
-Hanley
-Hanlon
-Hanna
-Hannah
-Hannibal
-Hanoi
-Hanover
-Hanoverian
-Hans
-Hansel
-Hansen
-hansom
-Hanson
-Hanukkah
-hap
-.H 1 "Hansel"
-haphazard
-.IND haploid
-haploidy
-haplology
-happen
-happenstance
-happy
-Hapsburg
-harangue
-harass
-Harbin
-harbinger
-Harcourt
-hard
-hardbake
-hardboard
-hardboiled
-hardcopy
-harden
-hardhat
-Hardin
-.H 1 "Hansen hansom Hanson Hanukkah hap haphazard haploid haploidy"
-Harding
-hardscrabble
-hardtack
-hardtop
-hardware
-hardwood
-.IND hardworking
-hardy
-hare
-harelip
-harem
-.IND hark
-Harlan
-Harlem
-Harley
-harm
-harmful
-Harmon
-harmonic
-harmonica
-harmonious
-.H 1 "haplology happen happenstance happy Hapsburg harangue harass Harbin"
-harmony
-harness
-Harold
-harp
-harpoon
-harpsichord
-Harpy
-Harriet
-Harriman
-Harrington
-Harris
-.IND Harrisburg
-Harrison
-harrow
-harry
-harsh
-harshen
-hart
-Hartford
-Hartley
-Hartman
-Harvard
-harvest
-harvestman
-Harvey
-hash
-hashish
-hasn't
-hasp
-hassle
-hast
-haste
-hasten
-Hastings
-hasty
-hat
-hatch
-.IND hatchet
-hatchway
-.IND hate
-hateful
-hater
-Hatfield
-hath
-Hathaway
-hatred
-Hatteras
-Hattie
-Hattiesburg
-Haugen
-haughty
-haul
-haulage
-haunch
-haunt
-Hausdorff
-Havana
-have
-haven
-haven't
-Havilland
-havoc
-haw
-.IND Hawaii
-Hawaiian
-hawk
-Hawkins
-Hawley
-hawthorn
-.H 2 "hammock Hammond hamper Hampshire Hampton hamster"
-Hawthorne
-hay
-Hayden
-Haydn
-Hayes
-hayfield
-Haynes
-Hays
-haystack
-Hayward
-hayward
-hazard
-hazardous
-haze
-hazel
-hazelnut
-hazy
-he
-head
-.IND headache
-.IND headboard
-headdress
-headland
-headlight
-headline
-headmaster
-headphone
-headquarter
-headquarters
-headroom
-headset
-headsman
-headsmen
-headstand
-headstone
-headstrong
-headwall
-headwater
-headway
-headwind
-heady
-heal
-Healey
-health
-healthful
-healthy
-.IND Healy
-heap
-hear
-heard
-hearken
-hearsay
-hearse
-Hearst
-heart
-heartbeat
-heartbreak
-hearten
-heartfelt
-hearth
-hearty
-heat
-heater
-heath
-heathen
-heathenish
-Heathkit
-heave
-.IND heaven
-heavenward
-heavy
-heavyweight
-.IND Hebe
-hebephrenic
-Hebraic
-Hebrew
-Hecate
-hecatomb
-heck
-heckle
-Heckman
-hectic
-hector
-Hecuba
-he'd
-hedge
-hedgehog
-hedonism
-hedonist
-heed
-heel
-heft
-hefty
-Hegelian
-hegemony
-Heidelberg
-heigh
-height
-.IND heighten
-Heine
-Heinrich
-Heinz
-heir
-heiress
-Heisenberg
-held
-Helen
-Helena
-Helene
-Helga
-helical
-helicopter
-heliocentric
-heliotrope
-helium
-helix
-he'll
-.IND hell
-hellbender
-hellebore
-Hellenic
-hellfire
-hellgrammite
-hellish
-.IND hello
-helm
-helmet
-.H 1 "Halverson ham Hamal Hamburg hamburger Hamilton hamlet Hamlin hammerhead"
-Helmholtz
-helmsman
-helmsmen
-Helmut
-help
-helpful
-helpmate
-Helsinki
-Helvetica
-hem
-hematite
-Hemingway
-hemisphere
-hemispheric
-hemlock
-hemoglobin
-hemolytic
-hemorrhage
-hemorrhoid
-hemosiderin
-hemp
-Hempstead
-hen
-.IND henbane
-hence
-henceforth
-henchman
-henchmen
-Henderson
-Hendrick
-Hendricks
-Hendrickson
-henequen
-Henley
-henpeck
-Henri
-Henrietta
-henry
-hepatica
-.IND hepatitis
-Hepburn
-heptane
-her
-Hera
-Heraclitus
-herald
-herb
-Herbert
-Herculean
-.IND Hercules
-herd
-herdsman
-here
-hereabout
-hereafter
-hereby
-hereditary
-heredity
-Hereford
-herein
-hereinabove
-hereinafter
-hereinbelow
-hereof
-heresy
-heretic
-hereto
-heretofore
-hereunder
-hereunto
-herewith
-heritable
-heritage
-Herkimer
-Herman
-.IND Hermann
-hermeneutic
-Hermes
-hermetic
-Hermite
-hermitian
-Hermosa
-Hernandez
-hero
-Herodotus
-heroes
-heroic
-heroin
-.IND heroine
-heroism
-heron
-herpes
-herpetology
-Herr
-herringbone
-Herschel
-herself
-Hershel
-Hershey
-hertz
-Hertzog
-.IND hesitant
-hesitate
-hesitater
-Hesperus
-Hess
-Hesse
-Hessian
-Hester
-heterocyclic
-heterodyne
-heterogamous
-heterogeneity
-heterogeneous
-heterosexual
-heterostructure
-heterozygous
-Hetman
-Hettie
-Hetty
-Heublein
-heuristic
-Heusen
-Heuser
-hew
-Hewett
-Hewitt
-.IND Hewlett
-hewn
-hex
-hexachloride
-hexadecimal
-hexafluoride
-hexagon
-hexagonal
-hexameter
-hexane
-.IND hey
-heyday
-hi
-Hiatt
-hiatus
-Hiawatha
-hibachi
-Hibbard
-hibernate
-Hibernia
-hick
-Hickey
-Hickman
-hickory
-Hicks
-hid
-.IND hidalgo
-hidden
-hide
-hideaway
-hideous
-hideout
-hierarchal
-hierarchic
-hierarchy
-hieratic
-hieroglyphic
-Hieronymus
-hifalutin
-Higgins
-high
-highball
-highboy
-highest
-highfalutin
-highhanded
-highland
-highlight
-highroad
-hightail
-highway
-highwayman
-.IND highwaymen
-hijack
-hijinks
-hike
-hilarious
-hilarity
-Hilbert
-.IND Hildebrand
-hill
-hillbilly
-Hillcrest
-Hillel
-hillman
-hillmen
-hillock
-hillside
-hilltop
-hilly
-hilt
-Hilton
-hilum
-him
-Himalaya
-himself
-hind
-hindmost
-.IND hindrance
-hindsight
-Hindu
-Hinduism
-Hines
-hinge
-Hinman
-hint
-hinterland
-hip
-hippo
-Hippocrates
-Hippocratic
-hippodrome
-hippopotamus
-hippy
-hipster
-Hiram
-hire
-hireling
-Hiroshi
-Hiroshima
-Hirsch
-hirsute
-his
-Hispanic
-.IND hiss
-histamine
-histidine
-histochemic
-.IND histochemistry
-histogram
-histology
-historian
-historic
-historiography
-history
-histrionic
-hit
-Hitachi
-hitch
-Hitchcock
-.H 1 "harbinger"
-hither
-hitherto
-Hitler
-hive
-ho
-hoagie
-Hoagland
-hoagy
-hoar
-hoard
-.IND hoarfrost
-hoarse
-hob
-Hobart
-Hobbes
-hobble
-Hobbs
-hobby
-hobbyhorse
-hobgoblin
-hobo
-Hoboken
-hoc
-hock
-hockey
-hocus
-hodge
-hodgepodge
-Hodges
-Hodgkin
-hoe
-Hoff
-Hoffman
-hog
-hogan
-hogging
-.IND hoi
-.IND Hokan
-Holbrook
-Holcomb
-hold
-holden
-holdout
-holdover
-holdup
-hole
-holeable
-holiday
-Holland
-Hollandaise
-holler
-Hollerith
-Hollingsworth
-Hollister
-hollow
-Holloway
-hollowware
-holly
-hollyhock
-Hollywood
-Holm
-Holman
-.IND Holmdel
-Holmes
-holmium
-holocaust
-Holocene
-hologram
-holography
-Holst
-Holstein
-holster
-holt
-Holyoke
-.IND holystone
-.INDP
-inject injudicious Injun injunct injunction injure injurious injury
-injustice ink inkling inlaid inland inlay inlet Inman inmate inn innards
-innate inner innermost innkeeper innocent innocuous innovate innuendo
-innumerable inoculate inoffensive inoperable inoperative inopportune
-inordinate inorganic input inputting inquest inquire inquiry inquisition
-inquisitive inquisitor inroad insane insatiable inscribe inscription
-inscrutable insect insecticide insecure inseminate insensible insensitive
-inseparable insert inset inshore inside insidious insight insightful
-insignia insignificant insincere insinuate insipid insist insistent
-insofar insolent insoluble insolvable insolvent insomnia insomniac
-insouciant inspect inspector inspiration inspire instable install
-installation instalment instance instant instantaneous instantiate
-.INITI H ind-data2
-.H 1 "halve"
-.IND granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-.IND grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-grandstand
-granite
-granitic
-granny
-granola
-grant
-grantee
-grantor
-granular
-.IND granulate
-granule
-Granville
-grape
-.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-.H 1 "halo halocarbon halogen Halpern Halsey Halstead halt halvah"
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-.IND grave
-gravel
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-greater
-.H 1 "Han Hancock hand handbag handbook handclasp handcuff Handel handful"
-grebe
-Grecian
-Greece
-greed
-greedy
-.IND Greek
-green
-Greenbelt
-Greenberg
-.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
-Greenblatt
-Greenbriar
-Greene
-greenery
-Greenfield
-greengrocer
-greenhouse
-greenish
-Greenland
-Greensboro
-greensward
-.H 1 "handgun"
-greenware
-Greenwich
-greenwood
-Greer
-greet
-Greg
-gregarious
-Gregg
-Gregory
-.IND gremlin
-grenade
-Grendel
-Grenoble
-Gresham
-Greta
-Gretchen
-grew
-grey
-greyhound
-greylag
-grid
-griddle
-gridiron
-grief
-grievance
-grieve
-grievous
-griffin
-Griffith
-grill
-grille
-grilled
-grillwork
-grim
-.IND grimace
-Grimaldi
-grime
-Grimes
-Grimm
-grin
-grind
-grindstone
-grip
-gripe
-grippe
-grisly
-grist
-gristmill
-Griswold
-grit
-gritty
-grizzle
-grizzly
-groan
-groat
-grocer
-grocery
-groggy
-.IND groin
-grommet
-groom
-groove
-grope
-grosbeak
-gross
-.H 1 "handicapped handicapper handicapping handicraft handicraftsman"
-Grosset
-Grossman
-Grosvenor
-grotesque
-Groton
-ground
-groundsel
-groundskeep
-groundwork
-group
-groupoid
-grout
-grove
-grovel
-Grover
-grow
-growl
-grown
-grownup
-.IND growth
-grub
-grubby
-grudge
-gruesome
-gruff
-grumble
-Grumman
-grunt
-gryphon
-g's
-GSA
-GU
-Guam
-guanidine
-guanine
-guano
-guarantee
-guaranteeing
-guarantor
-guaranty
-guard
-guardhouse
-.IND Guardia
-guardian
-Guatemala
-.IND gubernatorial
-Guelph
-Guenther
-guerdon
-guernsey
-guerrilla
-guess
-guesswork
-guest
-guffaw
-Guggenheim
-Guiana
-guidance
-guide
-guidebook
-guideline
-guidepost
-guiding
-guignol
-guild
-.H 1 "handicraftsmen handiwork handkerchief handle"
-guildhall
-guile
-Guilford
-guillemot
-guillotine
-guilt
-.IND guilty
-guinea
-guise
-guitar
-gules
-gulf
-.H 1 "handleable handlebar handline handmade handmaiden handout"
-gull
-Gullah
-gullet
-gullible
-gully
-gulp
-gum
-gumbo
-gumdrop
-gummy
-gumption
-gumshoe
-gun
-Gunderson
-.IND gunfight
-gunfire
-gunflint
-gunk
-gunky
-gunman
-.IND gunmen
-gunnery
-gunny
-gunplay
-gunpowder
-gunshot
-gunsling
-Gunther
-gurgle
-Gurkha
-guru
-Gus
-gush
-gusset
-gust
-Gustafson
-Gustav
-Gustave
-Gustavus
-gusto
-gusty
-gut
-.H 1 "handset"
-Gutenberg
-Guthrie
-gutsy
-guttural
-.IND guy
-Guyana
-guzzle
-Gwen
-Gwyn
-gym
-gymnasium
-gymnast
-gymnastic
-gymnosperm
-gyp
-gypsite
-gypsum
-gypsy
-gyrate
-gyrfalcon
-gyro
-.IND gyrocompass
-gyroscope
-h
-ha
-Haag
-Haas
-habeas
-haberdashery
-Haberman
-.IND Habib
-habit
-habitant
-habitat
-habitation
-habitual
-habituate
-hacienda
-hack
-hackberry
-Hackett
-hackle
-hackmatack
-.H 1 "handshake handsome handspike handstand handwaving handwrite handwritten"
-hackney
-hackneyed
-hacksaw
-had
-Hadamard
-Haddad
-haddock
-Hades
-Hadley
-hadn't
-Hadrian
-hadron
-hafnium
-.IND Hagen
-Hager
-haggard
-haggle
-Hagstrom
-Hague
-Hahn
-Haifa
-haiku
-hail
-hailstone
-hailstorm
-Haines
-hair
-.IND haircut
-hairdo
-hairpin
-hairy
-Haiti
-Haitian
-Hal
-halcyon
-hale
-Haley
-half
-halfback
-.IND halfhearted
-halfway
-halibut
-halide
-.H 1 "handy handyman handymen Haney Hanford hang hangable hangar"
-Halifax
-halite
-hall
-hallelujah
-Halley
-hallmark
-hallow
-Halloween
-hallucinate
-hallway
-halma
-halo
-halocarbon
-halogen
-Halpern
-Halsey
-Halstead
-halt
-halvah
-halve
-Halverson
-ham
-.IND Hamal
-Hamburg
-hamburger
-Hamilton
-hamlet
-Hamlin
-hammerhead
-hammock
-Hammond
-hamper
-Hampshire
-.IND Hampton
-hamster
-Han
-.H 1 "hangman hangmen hangout hangover hank Hankel Hanley"
-Hancock
-hand
-handbag
-handbook
-handclasp
-handcuff
-Handel
-handful
-handgun
-handhold
-handicap
-handicapped
-.IND handicapper
-handicapping
-handicraft
-handicraftsman
-handicraftsmen
-handiwork
-handkerchief
-handle
-handleable
-handlebar
-handline
-handmade
-handmaiden
-handout
-handset
-handshake
-handsome
-handspike
-handstand
-handwaving
-.H 1 "Hanlon Hanna Hannah Hannibal Hanoi Hanover Hanoverian Hans"
-handwrite
-handwritten
-handy
-handyman
-handymen
-Haney
-.IND Hanford
-hang
-hangable
-hangar
-hangman
-hangmen
-hangout
-hangover
-.IND hank
-Hankel
-Hanley
-Hanlon
-Hanna
-Hannah
-Hannibal
-Hanoi
-Hanover
-Hanoverian
-Hans
-Hansel
-Hansen
-hansom
-Hanson
-Hanukkah
-hap
-.H 1 "Hansel"
-haphazard
-.IND haploid
-haploidy
-haplology
-happen
-happenstance
-happy
-Hapsburg
-harangue
-harass
-Harbin
-harbinger
-Harcourt
-hard
-hardbake
-hardboard
-hardboiled
-hardcopy
-harden
-hardhat
-Hardin
-.H 1 "Hansen hansom Hanson Hanukkah hap haphazard haploid haploidy"
-Harding
-hardscrabble
-hardtack
-hardtop
-hardware
-hardwood
-.IND hardworking
-hardy
-hare
-harelip
-harem
-.IND hark
-Harlan
-Harlem
-Harley
-harm
-harmful
-Harmon
-harmonic
-harmonica
-harmonious
-.H 1 "haplology happen happenstance happy Hapsburg harangue harass Harbin"
-harmony
-harness
-Harold
-harp
-harpoon
-harpsichord
-Harpy
-Harriet
-Harriman
-Harrington
-Harris
-.IND Harrisburg
-Harrison
-harrow
-harry
-harsh
-harshen
-hart
-Hartford
-Hartley
-Hartman
-Harvard
-harvest
-harvestman
-Harvey
-hash
-hashish
-hasn't
-hasp
-hassle
-hast
-haste
-hasten
-Hastings
-hasty
-hat
-hatch
-.IND hatchet
-hatchway
-.IND hate
-hateful
-hater
-Hatfield
-hath
-Hathaway
-hatred
-Hatteras
-Hattie
-Hattiesburg
-Haugen
-haughty
-haul
-haulage
-haunch
-haunt
-Hausdorff
-Havana
-have
-haven
-haven't
-Havilland
-havoc
-haw
-.IND Hawaii
-Hawaiian
-hawk
-Hawkins
-Hawley
-hawthorn
-.H 2 "hammock Hammond hamper Hampshire Hampton hamster"
-Hawthorne
-hay
-Hayden
-Haydn
-Hayes
-hayfield
-Haynes
-Hays
-haystack
-Hayward
-hayward
-hazard
-hazardous
-haze
-hazel
-hazelnut
-hazy
-he
-head
-.IND headache
-.IND headboard
-headdress
-headland
-headlight
-headline
-headmaster
-headphone
-headquarter
-headquarters
-headroom
-headset
-headsman
-headsmen
-headstand
-headstone
-headstrong
-headwall
-headwater
-headway
-headwind
-heady
-heal
-Healey
-health
-healthful
-healthy
-.IND Healy
-heap
-hear
-heard
-hearken
-hearsay
-hearse
-Hearst
-heart
-heartbeat
-heartbreak
-hearten
-heartfelt
-hearth
-hearty
-heat
-heater
-heath
-heathen
-heathenish
-Heathkit
-heave
-.IND heaven
-heavenward
-heavy
-heavyweight
-.IND Hebe
-hebephrenic
-Hebraic
-Hebrew
-Hecate
-hecatomb
-heck
-heckle
-Heckman
-hectic
-hector
-Hecuba
-he'd
-hedge
-hedgehog
-hedonism
-hedonist
-heed
-heel
-heft
-hefty
-Hegelian
-hegemony
-Heidelberg
-heigh
-height
-.IND heighten
-Heine
-Heinrich
-Heinz
-heir
-heiress
-Heisenberg
-held
-Helen
-Helena
-Helene
-Helga
-helical
-helicopter
-heliocentric
-heliotrope
-helium
-helix
-he'll
-.IND hell
-hellbender
-hellebore
-Hellenic
-hellfire
-hellgrammite
-hellish
-.IND hello
-helm
-helmet
-.H 1 "Halverson ham Hamal Hamburg hamburger Hamilton hamlet Hamlin hammerhead"
-Helmholtz
-helmsman
-helmsmen
-Helmut
-help
-helpful
-helpmate
-Helsinki
-Helvetica
-hem
-hematite
-Hemingway
-hemisphere
-hemispheric
-hemlock
-hemoglobin
-hemolytic
-hemorrhage
-hemorrhoid
-hemosiderin
-hemp
-Hempstead
-hen
-.IND henbane
-hence
-henceforth
-henchman
-henchmen
-Henderson
-Hendrick
-Hendricks
-Hendrickson
-henequen
-Henley
-henpeck
-Henri
-Henrietta
-henry
-hepatica
-.IND hepatitis
-Hepburn
-heptane
-her
-Hera
-Heraclitus
-herald
-herb
-Herbert
-Herculean
-.IND Hercules
-herd
-herdsman
-here
-hereabout
-hereafter
-hereby
-hereditary
-heredity
-Hereford
-herein
-hereinabove
-hereinafter
-hereinbelow
-hereof
-heresy
-heretic
-hereto
-heretofore
-hereunder
-hereunto
-herewith
-heritable
-heritage
-Herkimer
-Herman
-.IND Hermann
-hermeneutic
-Hermes
-hermetic
-Hermite
-hermitian
-Hermosa
-Hernandez
-hero
-Herodotus
-heroes
-heroic
-heroin
-.IND heroine
-heroism
-heron
-herpes
-herpetology
-Herr
-herringbone
-Herschel
-herself
-Hershel
-Hershey
-hertz
-Hertzog
-.IND hesitant
-hesitate
-hesitater
-Hesperus
-Hess
-Hesse
-Hessian
-Hester
-heterocyclic
-heterodyne
-heterogamous
-heterogeneity
-heterogeneous
-heterosexual
-heterostructure
-heterozygous
-Hetman
-Hettie
-Hetty
-Heublein
-heuristic
-Heusen
-Heuser
-hew
-Hewett
-Hewitt
-.IND Hewlett
-hewn
-hex
-hexachloride
-hexadecimal
-hexafluoride
-hexagon
-hexagonal
-hexameter
-hexane
-.IND hey
-heyday
-hi
-Hiatt
-hiatus
-Hiawatha
-hibachi
-Hibbard
-hibernate
-Hibernia
-hick
-Hickey
-Hickman
-hickory
-Hicks
-hid
-.IND hidalgo
-hidden
-hide
-hideaway
-hideous
-hideout
-hierarchal
-hierarchic
-hierarchy
-hieratic
-hieroglyphic
-Hieronymus
-hifalutin
-Higgins
-high
-highball
-highboy
-highest
-highfalutin
-highhanded
-highland
-highlight
-highroad
-hightail
-highway
-highwayman
-.IND highwaymen
-hijack
-hijinks
-hike
-hilarious
-hilarity
-Hilbert
-.IND Hildebrand
-hill
-hillbilly
-Hillcrest
-Hillel
-hillman
-hillmen
-hillock
-hillside
-hilltop
-hilly
-hilt
-Hilton
-hilum
-him
-Himalaya
-himself
-hind
-hindmost
-.IND hindrance
-hindsight
-Hindu
-Hinduism
-Hines
-hinge
-Hinman
-hint
-hinterland
-hip
-hippo
-Hippocrates
-Hippocratic
-hippodrome
-hippopotamus
-hippy
-hipster
-Hiram
-hire
-hireling
-Hiroshi
-Hiroshima
-Hirsch
-hirsute
-his
-Hispanic
-.IND hiss
-histamine
-histidine
-histochemic
-.IND histochemistry
-histogram
-histology
-historian
-historic
-historiography
-history
-histrionic
-hit
-Hitachi
-hitch
-Hitchcock
-.H 1 "harbinger"
-hither
-hitherto
-Hitler
-hive
-ho
-hoagie
-Hoagland
-hoagy
-hoar
-hoard
-.IND hoarfrost
-hoarse
-hob
-Hobart
-Hobbes
-hobble
-Hobbs
-hobby
-hobbyhorse
-hobgoblin
-hobo
-Hoboken
-hoc
-hock
-hockey
-hocus
-hodge
-hodgepodge
-Hodges
-Hodgkin
-hoe
-Hoff
-Hoffman
-hog
-hogan
-hogging
-.IND hoi
-.IND Hokan
-Holbrook
-Holcomb
-hold
-holden
-holdout
-holdover
-holdup
-hole
-holeable
-holiday
-Holland
-Hollandaise
-holler
-Hollerith
-Hollingsworth
-Hollister
-hollow
-Holloway
-hollowware
-holly
-hollyhock
-Hollywood
-Holm
-Holman
-.IND Holmdel
-Holmes
-holmium
-holocaust
-Holocene
-hologram
-holography
-Holst
-Holstein
-holster
-holt
-Holyoke
-.IND holystone
-.INDP
-inject injudicious Injun injunct injunction injure injurious injury
-injustice ink inkling inlaid inland inlay inlet Inman inmate inn innards
-innate inner innermost innkeeper innocent innocuous innovate innuendo
-innumerable inoculate inoffensive inoperable inoperative inopportune
-inordinate inorganic input inputting inquest inquire inquiry inquisition
-.INITI B ind-data3
-.H 1 "halve"
-.IND granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-.IND grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-grandstand
-granite
-granitic
-granny
-granola
-grant
-grantee
-grantor
-granular
-.IND granulate
-granule
-Granville
-grape
-.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-.H 1 "halo halocarbon halogen Halpern Halsey Halstead halt halvah"
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-.IND grave
-gravel
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-greater
-.H 1 "Han Hancock hand handbag handbook handclasp handcuff Handel handful"
-grebe
-Grecian
-Greece
-greed
-greedy
-.IND Greek
-green
-Greenbelt
-Greenberg
-.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
-Greenblatt
-Greenbriar
-Greene
-greenery
-Greenfield
-greengrocer
-greenhouse
-greenish
-Greenland
-Greensboro
-greensward
-.H 1 "handgun"
-greenware
-Greenwich
-greenwood
-Greer
-greet
-Greg
-gregarious
-Gregg
-Gregory
-.IND gremlin
-grenade
-Grendel
-Grenoble
-Gresham
-Greta
-Gretchen
-grew
-grey
-greyhound
-greylag
-grid
-griddle
-gridiron
-grief
-grievance
-grieve
-grievous
-griffin
-Griffith
-grill
-grille
-grilled
-grillwork
-grim
-.IND grimace
-Grimaldi
-grime
-Grimes
-Grimm
-grin
-grind
-grindstone
-grip
-gripe
-grippe
-grisly
-grist
-gristmill
-Griswold
-grit
-gritty
-grizzle
-grizzly
-groan
-groat
-grocer
-grocery
-groggy
-.IND groin
-grommet
-groom
-groove
-grope
-grosbeak
-gross
-.H 1 "handicapped handicapper handicapping handicraft handicraftsman"
-Grosset
-Grossman
-Grosvenor
-grotesque
-Groton
-ground
-groundsel
-groundskeep
-groundwork
-group
-groupoid
-grout
-grove
-grovel
-Grover
-grow
-growl
-grown
-grownup
-.IND growth
-grub
-grubby
-grudge
-gruesome
-gruff
-grumble
-Grumman
-grunt
-gryphon
-g's
-GSA
-GU
-Guam
-guanidine
-guanine
-guano
-guarantee
-guaranteeing
-guarantor
-guaranty
-guard
-guardhouse
-.IND Guardia
-guardian
-Guatemala
-.IND gubernatorial
-Guelph
-Guenther
-guerdon
-guernsey
-guerrilla
-guess
-guesswork
-guest
-guffaw
-Guggenheim
-Guiana
-guidance
-guide
-guidebook
-guideline
-guidepost
-guiding
-guignol
-guild
-.H 1 "handicraftsmen handiwork handkerchief handle"
-guildhall
-guile
-Guilford
-guillemot
-guillotine
-guilt
-.IND guilty
-guinea
-guise
-guitar
-gules
-gulf
-.H 1 "handleable handlebar handline handmade handmaiden handout"
-gull
-Gullah
-gullet
-gullible
-gully
-gulp
-gum
-gumbo
-gumdrop
-gummy
-gumption
-gumshoe
-gun
-Gunderson
-.IND gunfight
-gunfire
-gunflint
-gunk
-gunky
-gunman
-.IND gunmen
-gunnery
-gunny
-gunplay
-gunpowder
-gunshot
-gunsling
-Gunther
-gurgle
-Gurkha
-guru
-Gus
-gush
-gusset
-gust
-Gustafson
-Gustav
-Gustave
-Gustavus
-gusto
-gusty
-gut
-.H 1 "handset"
-Gutenberg
-Guthrie
-gutsy
-guttural
-.IND guy
-Guyana
-guzzle
-Gwen
-Gwyn
-gym
-gymnasium
-gymnast
-gymnastic
-gymnosperm
-gyp
-gypsite
-gypsum
-gypsy
-gyrate
-gyrfalcon
-gyro
-.IND gyrocompass
-gyroscope
-h
-ha
-Haag
-Haas
-habeas
-haberdashery
-Haberman
-.IND Habib
-habit
-habitant
-habitat
-habitation
-habitual
-habituate
-hacienda
-hack
-hackberry
-Hackett
-hackle
-hackmatack
-.H 1 "handshake handsome handspike handstand handwaving handwrite handwritten"
-hackney
-hackneyed
-hacksaw
-had
-Hadamard
-Haddad
-haddock
-Hades
-Hadley
-hadn't
-Hadrian
-hadron
-hafnium
-.IND Hagen
-Hager
-haggard
-haggle
-Hagstrom
-Hague
-Hahn
-Haifa
-haiku
-hail
-hailstone
-hailstorm
-Haines
-hair
-.IND haircut
-hairdo
-hairpin
-hairy
-Haiti
-Haitian
-Hal
-halcyon
-hale
-Haley
-half
-halfback
-.IND halfhearted
-halfway
-halibut
-halide
-.H 1 "handy handyman handymen Haney Hanford hang hangable hangar"
-Halifax
-halite
-hall
-hallelujah
-Halley
-hallmark
-hallow
-Halloween
-hallucinate
-hallway
-halma
-halo
-halocarbon
-halogen
-Halpern
-Halsey
-Halstead
-halt
-halvah
-halve
-Halverson
-ham
-.IND Hamal
-Hamburg
-hamburger
-Hamilton
-hamlet
-Hamlin
-hammerhead
-hammock
-Hammond
-hamper
-Hampshire
-.IND Hampton
-hamster
-Han
-.H 1 "hangman hangmen hangout hangover hank Hankel Hanley"
-Hancock
-hand
-handbag
-handbook
-handclasp
-handcuff
-Handel
-handful
-handgun
-handhold
-handicap
-handicapped
-.IND handicapper
-handicapping
-handicraft
-handicraftsman
-handicraftsmen
-handiwork
-handkerchief
-handle
-handleable
-handlebar
-handline
-handmade
-handmaiden
-handout
-handset
-handshake
-handsome
-handspike
-handstand
-handwaving
-.H 1 "Hanlon Hanna Hannah Hannibal Hanoi Hanover Hanoverian Hans"
-handwrite
-handwritten
-handy
-handyman
-handymen
-Haney
-.IND Hanford
-hang
-hangable
-hangar
-hangman
-hangmen
-hangout
-hangover
-.IND hank
-Hankel
-Hanley
-Hanlon
-Hanna
-Hannah
-Hannibal
-Hanoi
-Hanover
-Hanoverian
-Hans
-Hansel
-Hansen
-hansom
-Hanson
-Hanukkah
-hap
-.H 1 "Hansel"
-haphazard
-.IND haploid
-haploidy
-haplology
-happen
-happenstance
-happy
-Hapsburg
-harangue
-harass
-Harbin
-harbinger
-Harcourt
-hard
-hardbake
-hardboard
-hardboiled
-hardcopy
-harden
-hardhat
-Hardin
-.H 1 "Hansen hansom Hanson Hanukkah hap haphazard haploid haploidy"
-Harding
-hardscrabble
-hardtack
-hardtop
-hardware
-hardwood
-.IND hardworking
-hardy
-hare
-harelip
-harem
-.IND hark
-Harlan
-Harlem
-Harley
-harm
-harmful
-Harmon
-harmonic
-harmonica
-harmonious
-.H 1 "haplology happen happenstance happy Hapsburg harangue harass Harbin"
-harmony
-harness
-Harold
-harp
-harpoon
-harpsichord
-Harpy
-Harriet
-Harriman
-Harrington
-Harris
-.IND Harrisburg
-Harrison
-harrow
-harry
-harsh
-harshen
-hart
-Hartford
-Hartley
-Hartman
-Harvard
-harvest
-harvestman
-Harvey
-hash
-hashish
-hasn't
-hasp
-hassle
-hast
-haste
-hasten
-Hastings
-hasty
-hat
-hatch
-.IND hatchet
-hatchway
-.IND hate
-hateful
-hater
-Hatfield
-hath
-Hathaway
-hatred
-Hatteras
-Hattie
-Hattiesburg
-Haugen
-haughty
-haul
-haulage
-haunch
-haunt
-Hausdorff
-Havana
-have
-haven
-haven't
-Havilland
-havoc
-haw
-.IND Hawaii
-Hawaiian
-hawk
-Hawkins
-Hawley
-hawthorn
-.H 2 "hammock Hammond hamper Hampshire Hampton hamster"
-Hawthorne
-hay
-Hayden
-Haydn
-Hayes
-hayfield
-Haynes
-Hays
-haystack
-Hayward
-hayward
-hazard
-hazardous
-haze
-hazel
-hazelnut
-hazy
-he
-head
-.IND headache
-.IND headboard
-headdress
-headland
-headlight
-headline
-headmaster
-headphone
-headquarter
-headquarters
-headroom
-headset
-headsman
-headsmen
-headstand
-headstone
-headstrong
-headwall
-headwater
-headway
-headwind
-heady
-heal
-Healey
-health
-healthful
-healthy
-.IND Healy
-heap
-hear
-heard
-hearken
-hearsay
-hearse
-Hearst
-heart
-heartbeat
-heartbreak
-hearten
-heartfelt
-hearth
-hearty
-heat
-heater
-heath
-heathen
-heathenish
-Heathkit
-heave
-.IND heaven
-heavenward
-heavy
-heavyweight
-.IND Hebe
-hebephrenic
-Hebraic
-Hebrew
-Hecate
-hecatomb
-heck
-heckle
-Heckman
-hectic
-hector
-Hecuba
-he'd
-hedge
-hedgehog
-hedonism
-hedonist
-heed
-heel
-heft
-hefty
-Hegelian
-hegemony
-Heidelberg
-heigh
-height
-.IND heighten
-Heine
-Heinrich
-Heinz
-heir
-heiress
-Heisenberg
-held
-Helen
-Helena
-Helene
-Helga
-helical
-helicopter
-heliocentric
-heliotrope
-helium
-helix
-he'll
-.IND hell
-hellbender
-hellebore
-Hellenic
-hellfire
-hellgrammite
-hellish
-.IND hello
-helm
-helmet
-.H 1 "Halverson ham Hamal Hamburg hamburger Hamilton hamlet Hamlin hammerhead"
-Helmholtz
-helmsman
-helmsmen
-Helmut
-help
-helpful
-helpmate
-Helsinki
-Helvetica
-hem
-hematite
-Hemingway
-hemisphere
-hemispheric
-hemlock
-hemoglobin
-hemolytic
-hemorrhage
-hemorrhoid
-hemosiderin
-hemp
-Hempstead
-hen
-.IND henbane
-hence
-henceforth
-henchman
-henchmen
-Henderson
-Hendrick
-Hendricks
-Hendrickson
-henequen
-Henley
-henpeck
-Henri
-Henrietta
-henry
-hepatica
-.IND hepatitis
-Hepburn
-heptane
-her
-Hera
-Heraclitus
-herald
-herb
-Herbert
-Herculean
-.IND Hercules
-herd
-herdsman
-here
-hereabout
-hereafter
-hereby
-hereditary
-heredity
-Hereford
-herein
-hereinabove
-hereinafter
-hereinbelow
-hereof
-heresy
-heretic
-hereto
-heretofore
-hereunder
-hereunto
-herewith
-heritable
-heritage
-Herkimer
-Herman
-.IND Hermann
-hermeneutic
-Hermes
-hermetic
-Hermite
-hermitian
-Hermosa
-Hernandez
-hero
-Herodotus
-heroes
-heroic
-heroin
-.IND heroine
-heroism
-heron
-herpes
-herpetology
-Herr
-herringbone
-Herschel
-herself
-Hershel
-Hershey
-hertz
-Hertzog
-.IND hesitant
-hesitate
-hesitater
-Hesperus
-Hess
-Hesse
-Hessian
-Hester
-heterocyclic
-heterodyne
-heterogamous
-heterogeneity
-heterogeneous
-heterosexual
-heterostructure
-heterozygous
-Hetman
-Hettie
-Hetty
-Heublein
-heuristic
-Heusen
-Heuser
-hew
-Hewett
-Hewitt
-.IND Hewlett
-hewn
-hex
-hexachloride
-hexadecimal
-hexafluoride
-hexagon
-hexagonal
-hexameter
-hexane
-.IND hey
-heyday
-hi
-Hiatt
-hiatus
-Hiawatha
-hibachi
-Hibbard
-hibernate
-Hibernia
-hick
-Hickey
-Hickman
-hickory
-Hicks
-hid
-.IND hidalgo
-hidden
-hide
-hideaway
-hideous
-hideout
-hierarchal
-hierarchic
-hierarchy
-hieratic
-hieroglyphic
-Hieronymus
-hifalutin
-Higgins
-high
-highball
-highboy
-highest
-highfalutin
-highhanded
-highland
-highlight
-highroad
-hightail
-highway
-highwayman
-.IND highwaymen
-hijack
-hijinks
-hike
-hilarious
-hilarity
-Hilbert
-.IND Hildebrand
-hill
-hillbilly
-Hillcrest
-Hillel
-hillman
-hillmen
-hillock
-hillside
-hilltop
-hilly
-hilt
-Hilton
-hilum
-him
-Himalaya
-himself
-hind
-hindmost
-.IND hindrance
-hindsight
-Hindu
-Hinduism
-Hines
-hinge
-Hinman
-hint
-hinterland
-hip
-hippo
-Hippocrates
-Hippocratic
-hippodrome
-hippopotamus
-hippy
-hipster
-Hiram
-hire
-hireling
-Hiroshi
-Hiroshima
-Hirsch
-hirsute
-his
-Hispanic
-.IND hiss
-histamine
-histidine
-histochemic
-.IND histochemistry
-histogram
-histology
-historian
-historic
-historiography
-history
-histrionic
-hit
-Hitachi
-hitch
-Hitchcock
-.H 1 "harbinger"
-hither
-hitherto
-Hitler
-hive
-ho
-hoagie
-Hoagland
-hoagy
-hoar
-hoard
-.IND hoarfrost
-hoarse
-hob
-Hobart
-Hobbes
-hobble
-Hobbs
-hobby
-hobbyhorse
-hobgoblin
-hobo
-Hoboken
-hoc
-hock
-hockey
-hocus
-hodge
-hodgepodge
-Hodges
-Hodgkin
-hoe
-Hoff
-Hoffman
-hog
-hogan
-hogging
-.IND hoi
-.IND Hokan
-Holbrook
-Holcomb
-hold
-holden
-holdout
-holdover
-holdup
-hole
-holeable
-holiday
-Holland
-Hollandaise
-holler
-Hollerith
-Hollingsworth
-Hollister
-hollow
-Holloway
-hollowware
-holly
-hollyhock
-Hollywood
-Holm
-Holman
-.IND Holmdel
-Holmes
-holmium
-holocaust
-Holocene
-hologram
-holography
-Holst
-Holstein
-holster
-holt
-Holyoke
-.IND holystone
-.INDP
-inject injudicious Injun injunct injunction injure injurious injury
-injustice ink inkling inlaid inland inlay inlet Inman inmate inn innards
-innate inner innermost innkeeper innocent innocuous innovate innuendo
-innumerable inoculate inoffensive inoperable inoperative inopportune
-inordinate inorganic input inputting inquest inquire inquiry inquisition
-.INITI B ind-data4 foo
-.H 1 "halve"
-.IND granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-.IND grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-grandstand
-granite
-granitic
-granny
-granola
-grant
-grantee
-grantor
-granular
-.IND granulate
-granule
-Granville
-grape
-.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-.H 1 "halo halocarbon halogen Halpern Halsey Halstead halt halvah"
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-.IND grave
-gravel
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-greater
-.H 1 "Han Hancock hand handbag handbook handclasp handcuff Handel handful"
-grebe
-Grecian
-Greece
-greed
-greedy
-.IND Greek
-green
-Greenbelt
-Greenberg
-.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
-Greenblatt
-Greenbriar
-Greene
-greenery
-Greenfield
-greengrocer
-greenhouse
-greenish
-Greenland
-Greensboro
-greensward
-.H 1 "handgun"
-greenware
-Greenwich
-greenwood
-Greer
-greet
-Greg
-gregarious
-Gregg
-Gregory
-.IND gremlin
-grenade
-Grendel
-Grenoble
-Gresham
-Greta
-Gretchen
-grew
-grey
-greyhound
-greylag
-grid
-griddle
-gridiron
-grief
-grievance
-grieve
-grievous
-griffin
-Griffith
-grill
-grille
-grilled
-grillwork
-grim
-.IND grimace
-Grimaldi
-grime
-Grimes
-Grimm
-grin
-grind
-grindstone
-grip
-gripe
-grippe
-grisly
-grist
-gristmill
-Griswold
-grit
-gritty
-grizzle
-grizzly
-groan
-groat
-grocer
-grocery
-groggy
-.IND groin
-grommet
-groom
-groove
-grope
-grosbeak
-gross
-.H 1 "handicapped handicapper handicapping handicraft handicraftsman"
-Grosset
-Grossman
-Grosvenor
-grotesque
-Groton
-ground
-groundsel
-groundskeep
-groundwork
-group
-groupoid
-grout
-grove
-grovel
-Grover
-grow
-growl
-grown
-grownup
-.IND growth
-grub
-grubby
-grudge
-gruesome
-gruff
-grumble
-Grumman
-grunt
-gryphon
-g's
-GSA
-GU
-Guam
-guanidine
-guanine
-guano
-guarantee
-guaranteeing
-guarantor
-guaranty
-guard
-guardhouse
-.IND Guardia
-guardian
-Guatemala
-.IND gubernatorial
-Guelph
-Guenther
-guerdon
-guernsey
-guerrilla
-guess
-guesswork
-guest
-guffaw
-Guggenheim
-Guiana
-guidance
-guide
-guidebook
-guideline
-guidepost
-guiding
-guignol
-guild
-.H 1 "handicraftsmen handiwork handkerchief handle"
-guildhall
-guile
-Guilford
-guillemot
-guillotine
-guilt
-.IND guilty
-guinea
-guise
-guitar
-gules
-gulf
-.H 1 "handleable handlebar handline handmade handmaiden handout"
-gull
-Gullah
-gullet
-gullible
-gully
-gulp
-gum
-gumbo
-gumdrop
-gummy
-gumption
-gumshoe
-gun
-Gunderson
-.IND gunfight
-gunfire
-gunflint
-gunk
-gunky
-gunman
-.IND gunmen
-gunnery
-gunny
-gunplay
-gunpowder
-gunshot
-gunsling
-Gunther
-gurgle
-Gurkha
-guru
-Gus
-gush
-gusset
-gust
-Gustafson
-Gustav
-Gustave
-Gustavus
-gusto
-gusty
-gut
-.H 1 "handset"
-Gutenberg
-Guthrie
-gutsy
-guttural
-.IND guy
-Guyana
-guzzle
-Gwen
-Gwyn
-gym
-gymnasium
-gymnast
-gymnastic
-gymnosperm
-gyp
-gypsite
-gypsum
-gypsy
-gyrate
-gyrfalcon
-gyro
-.IND gyrocompass
-gyroscope
-h
-ha
-Haag
-Haas
-habeas
-haberdashery
-Haberman
-.IND Habib
-habit
-habitant
-habitat
-habitation
-habitual
-habituate
-hacienda
-hack
-hackberry
-Hackett
-hackle
-hackmatack
-.H 1 "handshake handsome handspike handstand handwaving handwrite handwritten"
-hackney
-hackneyed
-hacksaw
-had
-Hadamard
-Haddad
-haddock
-Hades
-Hadley
-hadn't
-Hadrian
-hadron
-hafnium
-.IND Hagen
-Hager
-haggard
-haggle
-Hagstrom
-Hague
-Hahn
-Haifa
-haiku
-hail
-hailstone
-hailstorm
-Haines
-hair
-.IND haircut
-hairdo
-hairpin
-hairy
-Haiti
-Haitian
-Hal
-halcyon
-hale
-Haley
-half
-halfback
-.IND halfhearted
-halfway
-halibut
-halide
-.H 1 "handy handyman handymen Haney Hanford hang hangable hangar"
-Halifax
-halite
-hall
-hallelujah
-Halley
-hallmark
-hallow
-Halloween
-hallucinate
-hallway
-halma
-halo
-halocarbon
-halogen
-Halpern
-Halsey
-Halstead
-halt
-halvah
-halve
-Halverson
-ham
-.IND Hamal
-Hamburg
-hamburger
-Hamilton
-hamlet
-Hamlin
-hammerhead
-hammock
-Hammond
-hamper
-Hampshire
-.IND Hampton
-hamster
-Han
-.H 1 "hangman hangmen hangout hangover hank Hankel Hanley"
-Hancock
-hand
-handbag
-handbook
-handclasp
-handcuff
-Handel
-handful
-handgun
-handhold
-handicap
-handicapped
-.IND handicapper
-handicapping
-handicraft
-handicraftsman
-handicraftsmen
-handiwork
-handkerchief
-handle
-handleable
-handlebar
-handline
-handmade
-handmaiden
-handout
-handset
-handshake
-handsome
-handspike
-handstand
-handwaving
-.H 1 "Hanlon Hanna Hannah Hannibal Hanoi Hanover Hanoverian Hans"
-handwrite
-handwritten
-handy
-handyman
-handymen
-Haney
-.IND Hanford
-hang
-hangable
-hangar
-hangman
-hangmen
-hangout
-hangover
-.IND hank
-Hankel
-Hanley
-Hanlon
-Hanna
-Hannah
-Hannibal
-Hanoi
-Hanover
-Hanoverian
-Hans
-Hansel
-Hansen
-hansom
-Hanson
-Hanukkah
-hap
-.H 1 "Hansel"
-haphazard
-.IND haploid
-haploidy
-haplology
-happen
-happenstance
-happy
-Hapsburg
-harangue
-harass
-Harbin
-harbinger
-Harcourt
-hard
-hardbake
-hardboard
-hardboiled
-hardcopy
-harden
-hardhat
-Hardin
-.H 1 "Hansen hansom Hanson Hanukkah hap haphazard haploid haploidy"
-Harding
-hardscrabble
-hardtack
-hardtop
-hardware
-hardwood
-.IND hardworking
-hardy
-hare
-harelip
-harem
-.IND hark
-Harlan
-Harlem
-Harley
-harm
-harmful
-Harmon
-harmonic
-harmonica
-harmonious
-.H 1 "haplology happen happenstance happy Hapsburg harangue harass Harbin"
-harmony
-harness
-Harold
-harp
-harpoon
-harpsichord
-Harpy
-Harriet
-Harriman
-Harrington
-Harris
-.IND Harrisburg
-Harrison
-harrow
-harry
-harsh
-harshen
-hart
-Hartford
-Hartley
-Hartman
-Harvard
-harvest
-harvestman
-Harvey
-hash
-hashish
-hasn't
-hasp
-hassle
-hast
-haste
-hasten
-Hastings
-hasty
-hat
-hatch
-.IND hatchet
-hatchway
-.IND hate
-hateful
-hater
-Hatfield
-hath
-Hathaway
-hatred
-Hatteras
-Hattie
-Hattiesburg
-Haugen
-haughty
-haul
-haulage
-haunch
-haunt
-Hausdorff
-Havana
-have
-haven
-haven't
-Havilland
-havoc
-haw
-.IND Hawaii
-Hawaiian
-hawk
-Hawkins
-Hawley
-hawthorn
-.H 2 "hammock Hammond hamper Hampshire Hampton hamster"
-Hawthorne
-hay
-Hayden
-Haydn
-Hayes
-hayfield
-Haynes
-Hays
-haystack
-Hayward
-hayward
-hazard
-hazardous
-haze
-hazel
-hazelnut
-hazy
-he
-head
-.IND headache
-.IND headboard
-headdress
-headland
-headlight
-headline
-headmaster
-headphone
-headquarter
-headquarters
-headroom
-headset
-headsman
-headsmen
-headstand
-headstone
-headstrong
-headwall
-headwater
-headway
-headwind
-heady
-heal
-Healey
-health
-healthful
-healthy
-.IND Healy
-heap
-hear
-heard
-hearken
-hearsay
-hearse
-Hearst
-heart
-heartbeat
-heartbreak
-hearten
-heartfelt
-hearth
-hearty
-heat
-heater
-heath
-heathen
-heathenish
-Heathkit
-heave
-.IND heaven
-heavenward
-heavy
-heavyweight
-.IND Hebe
-hebephrenic
-Hebraic
-Hebrew
-Hecate
-hecatomb
-heck
-heckle
-Heckman
-hectic
-hector
-Hecuba
-he'd
-hedge
-hedgehog
-hedonism
-hedonist
-heed
-heel
-heft
-hefty
-Hegelian
-hegemony
-Heidelberg
-heigh
-height
-.IND heighten
-Heine
-Heinrich
-Heinz
-heir
-heiress
-Heisenberg
-held
-Helen
-Helena
-Helene
-Helga
-helical
-helicopter
-heliocentric
-heliotrope
-helium
-helix
-he'll
-.IND hell
-hellbender
-hellebore
-Hellenic
-hellfire
-hellgrammite
-hellish
-.IND hello
-helm
-helmet
-.H 1 "Halverson ham Hamal Hamburg hamburger Hamilton hamlet Hamlin hammerhead"
-Helmholtz
-helmsman
-helmsmen
-Helmut
-help
-helpful
-helpmate
-Helsinki
-Helvetica
-hem
-hematite
-Hemingway
-hemisphere
-hemispheric
-hemlock
-hemoglobin
-hemolytic
-hemorrhage
-hemorrhoid
-hemosiderin
-hemp
-Hempstead
-hen
-.IND henbane
-hence
-henceforth
-henchman
-henchmen
-Henderson
-Hendrick
-Hendricks
-Hendrickson
-henequen
-Henley
-henpeck
-Henri
-Henrietta
-henry
-hepatica
-.IND hepatitis
-Hepburn
-heptane
-her
-Hera
-Heraclitus
-herald
-herb
-Herbert
-Herculean
-.IND Hercules
-herd
-herdsman
-here
-hereabout
-hereafter
-hereby
-hereditary
-heredity
-Hereford
-herein
-hereinabove
-hereinafter
-hereinbelow
-hereof
-heresy
-heretic
-hereto
-heretofore
-hereunder
-hereunto
-herewith
-heritable
-heritage
-Herkimer
-Herman
-.IND Hermann
-hermeneutic
-Hermes
-hermetic
-Hermite
-hermitian
-Hermosa
-Hernandez
-hero
-Herodotus
-heroes
-heroic
-heroin
-.IND heroine
-heroism
-heron
-herpes
-herpetology
-Herr
-herringbone
-Herschel
-herself
-Hershel
-Hershey
-hertz
-Hertzog
-.IND hesitant
-hesitate
-hesitater
-Hesperus
-Hess
-Hesse
-Hessian
-Hester
-heterocyclic
-heterodyne
-heterogamous
-heterogeneity
-heterogeneous
-heterosexual
-heterostructure
-heterozygous
-Hetman
-Hettie
-Hetty
-Heublein
-heuristic
-Heusen
-Heuser
-hew
-Hewett
-Hewitt
-.IND Hewlett
-hewn
-hex
-hexachloride
-hexadecimal
-hexafluoride
-hexagon
-hexagonal
-hexameter
-hexane
-.IND hey
-heyday
-hi
-Hiatt
-hiatus
-Hiawatha
-hibachi
-Hibbard
-hibernate
-Hibernia
-hick
-Hickey
-Hickman
-hickory
-Hicks
-hid
-.IND hidalgo
-hidden
-hide
-hideaway
-hideous
-hideout
-hierarchal
-hierarchic
-hierarchy
-hieratic
-hieroglyphic
-Hieronymus
-hifalutin
-Higgins
-high
-highball
-highboy
-highest
-highfalutin
-highhanded
-highland
-highlight
-highroad
-hightail
-highway
-highwayman
-.IND highwaymen
-hijack
-hijinks
-hike
-hilarious
-hilarity
-Hilbert
-.IND Hildebrand
-hill
-hillbilly
-Hillcrest
-Hillel
-hillman
-hillmen
-hillock
-hillside
-hilltop
-hilly
-hilt
-Hilton
-hilum
-him
-Himalaya
-himself
-hind
-hindmost
-.IND hindrance
-hindsight
-Hindu
-Hinduism
-Hines
-hinge
-Hinman
-hint
-hinterland
-hip
-hippo
-Hippocrates
-Hippocratic
-hippodrome
-hippopotamus
-hippy
-hipster
-Hiram
-hire
-hireling
-Hiroshi
-Hiroshima
-Hirsch
-hirsute
-his
-Hispanic
-.IND hiss
-histamine
-histidine
-histochemic
-.IND histochemistry
-histogram
-histology
-historian
-historic
-historiography
-history
-histrionic
-hit
-Hitachi
-hitch
-Hitchcock
-.H 1 "harbinger"
-hither
-hitherto
-Hitler
-hive
-ho
-hoagie
-Hoagland
-hoagy
-hoar
-hoard
-.IND hoarfrost
-hoarse
-hob
-Hobart
-Hobbes
-hobble
-Hobbs
-hobby
-hobbyhorse
-hobgoblin
-hobo
-Hoboken
-hoc
-hock
-hockey
-hocus
-hodge
-hodgepodge
-Hodges
-Hodgkin
-hoe
-Hoff
-Hoffman
-hog
-hogan
-hogging
-.IND hoi
-.IND Hokan
-Holbrook
-Holcomb
-hold
-holden
-holdout
-holdover
-holdup
-hole
-holeable
-holiday
-Holland
-Hollandaise
-holler
-Hollerith
-Hollingsworth
-Hollister
-hollow
-Holloway
-hollowware
-holly
-hollyhock
-Hollywood
-Holm
-Holman
-.IND Holmdel
-Holmes
-holmium
-holocaust
-Holocene
-hologram
-holography
-Holst
-Holstein
-holster
-holt
-Holyoke
-.IND holystone
-.INDP
-inject injudicious Injun injunct injunction injure injurious injury
-injustice ink inkling inlaid inland inlay inlet Inman inmate inn innards
-innate inner innermost innkeeper innocent innocuous innovate innuendo
-innumerable inoculate inoffensive inoperable inoperative inopportune
-inordinate inorganic input inputting inquest inquire inquiry inquisition
diff --git a/contrib/groff/contrib/mm/examples/LT b/contrib/groff/contrib/mm/examples/LT
deleted file mode 100644
index cf063897371c..000000000000
--- a/contrib/groff/contrib/mm/examples/LT
+++ /dev/null
@@ -1,1058 +0,0 @@
-.ND 1994-10-26
-.\" .WA "Nisse Nilsson" notitle
-.\" .WE
-.WA "Sven Olsson" title
-Return address
-Street
-City, State Zip Code
-Text
-.WE
-.IA "Inside address" title
-Addressee name XXXXXXX
-Title XXXXXXXXXXXXXXX
-Company xxxxxxxxxxxx
-Street xxxxxxxxxxxxxx
-City, State Zip Code
-Text xxxxxxxxxxxxxxxxxx
-.IE
-.LO CN
-.LO RN "referens"
-.LO AT Attention
-.LO SA "Hej hopp"
-.LO SJ "Subject line"
-.LT BL
-hepp
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-grandstand
-granite
-granitic
-granny
-granola
-grant
-grantee
-grantor
-granular
-granulate
-granule
-Granville
-grape
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-greater
-grebe
-Grecian
-Greece
-greed
-greedy
-Greek
-green
-Greenbelt
-Greenberg
-Greenblatt
-Greenbriar
-Greene
-greenery
-Greenfield
-greengrocer
-greenhouse
-greenish
-Greenland
-Greensboro
-greensward
-greenware
-Greenwich
-greenwood
-Greer
-greet
-Greg
-gregarious
-Gregg
-Gregory
-gremlin
-grenade
-Grendel
-Grenoble
-Gresham
-Greta
-Gretchen
-grew
-grey
-greyhound
-greylag
-grid
-griddle
-gridiron
-grief
-grievance
-grieve
-grievous
-griffin
-Griffith
-grill
-grille
-grilled
-grillwork
-grim
-grimace
-Grimaldi
-grime
-Grimes
-Grimm
-grin
-grind
-grindstone
-grip
-.P
-gripe
-grippe
-grisly
-grist
-gristmill
-Griswold
-grit
-gritty
-grizzle
-grizzly
-groan
-groat
-grocer
-grocery
-groggy
-groin
-grommet
-groom
-groove
-grope
-grosbeak
-gross
-Grosset
-Grossman
-Grosvenor
-grotesque
-Groton
-ground
-groundsel
-groundskeep
-groundwork
-group
-groupoid
-grout
-grove
-grovel
-Grover
-grow
-growl
-grown
-grownup
-growth
-grub
-grubby
-grudge
-gruesome
-gruff
-grumble
-Grumman
-grunt
-gryphon
-g's
-GSA
-GU
-Guam
-guanidine
-guanine
-guano
-guarantee
-guaranteeing
-guarantor
-guaranty
-guard
-guardhouse
-Guardia
-guardian
-Guatemala
-gubernatorial
-Guelph
-Guenther
-guerdon
-guernsey
-guerrilla
-guess
-guesswork
-guest
-guffaw
-Guggenheim
-Guiana
-guidance
-guide
-guidebook
-guideline
-guidepost
-guiding
-guignol
-guild
-guildhall
-guile
-Guilford
-guillemot
-guillotine
-guilt
-guilty
-guinea
-guise
-guitar
-gules
-gulf
-gull
-Gullah
-gullet
-gullible
-gully
-gulp
-gum
-gumbo
-gumdrop
-gummy
-gumption
-gumshoe
-gun
-Gunderson
-gunfight
-gunfire
-gunflint
-gunk
-gunky
-gunman
-gunmen
-gunnery
-gunny
-gunplay
-gunpowder
-gunshot
-gunsling
-Gunther
-gurgle
-Gurkha
-guru
-Gus
-gush
-gusset
-gust
-Gustafson
-Gustav
-Gustave
-Gustavus
-gusto
-gusty
-gut
-Gutenberg
-Guthrie
-gutsy
-guttural
-guy
-.P
-Guyana
-guzzle
-Gwen
-Gwyn
-gym
-gymnasium
-gymnast
-gymnastic
-gymnosperm
-gyp
-gypsite
-gypsum
-gypsy
-gyrate
-gyrfalcon
-gyro
-gyrocompass
-gyroscope
-h
-ha
-Haag
-Haas
-habeas
-haberdashery
-Haberman
-Habib
-habit
-habitant
-habitat
-habitation
-habitual
-habituate
-hacienda
-hack
-hackberry
-Hackett
-hackle
-hackmatack
-hackney
-hackneyed
-hacksaw
-had
-Hadamard
-Haddad
-haddock
-Hades
-Hadley
-hadn't
-Hadrian
-hadron
-hafnium
-Hagen
-Hager
-haggard
-haggle
-Hagstrom
-Hague
-Hahn
-Haifa
-haiku
-hail
-hailstone
-hailstorm
-Haines
-hair
-haircut
-hairdo
-hairpin
-hairy
-Haiti
-Haitian
-Hal
-halcyon
-hale
-Haley
-half
-halfback
-halfhearted
-halfway
-halibut
-halide
-Halifax
-halite
-hall
-hallelujah
-Halley
-hallmark
-hallow
-Halloween
-hallucinate
-hallway
-halma
-halo
-halocarbon
-halogen
-Halpern
-Halsey
-Halstead
-halt
-halvah
-halve
-Halverson
-ham
-Hamal
-Hamburg
-hamburger
-Hamilton
-hamlet
-Hamlin
-hammerhead
-hammock
-Hammond
-hamper
-Hampshire
-Hampton
-hamster
-Han
-Hancock
-hand
-handbag
-handbook
-handclasp
-handcuff
-Handel
-handful
-handgun
-handhold
-handicap
-handicapped
-handicapper
-handicapping
-handicraft
-handicraftsman
-handicraftsmen
-handiwork
-handkerchief
-handle
-handleable
-handlebar
-handline
-handmade
-handmaiden
-handout
-handset
-handshake
-handsome
-handspike
-handstand
-handwaving
-handwrite
-handwritten
-handy
-handyman
-handymen
-Haney
-Hanford
-hang
-hangable
-hangar
-hangman
-hangmen
-hangout
-hangover
-hank
-Hankel
-Hanley
-Hanlon
-Hanna
-Hannah
-Hannibal
-Hanoi
-Hanover
-Hanoverian
-Hans
-Hansel
-Hansen
-hansom
-Hanson
-Hanukkah
-hap
-haphazard
-haploid
-haploidy
-haplology
-happen
-happenstance
-happy
-Hapsburg
-harangue
-harass
-Harbin
-harbinger
-Harcourt
-hard
-hardbake
-hardboard
-hardboiled
-hardcopy
-harden
-hardhat
-Hardin
-Harding
-hardscrabble
-hardtack
-hardtop
-hardware
-hardwood
-hardworking
-hardy
-hare
-harelip
-harem
-hark
-Harlan
-Harlem
-Harley
-harm
-harmful
-Harmon
-harmonic
-harmonica
-harmonious
-harmony
-harness
-Harold
-harp
-harpoon
-harpsichord
-Harpy
-Harriet
-Harriman
-Harrington
-Harris
-Harrisburg
-Harrison
-harrow
-harry
-harsh
-harshen
-hart
-Hartford
-Hartley
-Hartman
-Harvard
-.P
-harvest
-harvestman
-Harvey
-hash
-hashish
-hasn't
-hasp
-hassle
-hast
-haste
-hasten
-Hastings
-hasty
-hat
-hatch
-hatchet
-hatchway
-hate
-hateful
-hater
-Hatfield
-hath
-Hathaway
-hatred
-Hatteras
-Hattie
-Hattiesburg
-Haugen
-haughty
-haul
-haulage
-haunch
-haunt
-Hausdorff
-Havana
-have
-haven
-haven't
-Havilland
-havoc
-haw
-Hawaii
-Hawaiian
-hawk
-Hawkins
-Hawley
-hawthorn
-Hawthorne
-hay
-Hayden
-Haydn
-Hayes
-hayfield
-Haynes
-Hays
-haystack
-Hayward
-hayward
-hazard
-hazardous
-haze
-hazel
-hazelnut
-hazy
-he
-head
-headache
-headboard
-headdress
-headland
-headlight
-headline
-headmaster
-headphone
-headquarter
-headquarters
-headroom
-headset
-headsman
-headsmen
-headstand
-headstone
-headstrong
-headwall
-headwater
-headway
-headwind
-heady
-heal
-Healey
-health
-healthful
-healthy
-Healy
-heap
-hear
-heard
-hearken
-hearsay
-hearse
-Hearst
-heart
-heartbeat
-heartbreak
-hearten
-heartfelt
-hearth
-hearty
-heat
-heater
-heath
-heathen
-heathenish
-Heathkit
-heave
-heaven
-heavenward
-heavy
-heavyweight
-Hebe
-hebephrenic
-Hebraic
-Hebrew
-Hecate
-hecatomb
-heck
-heckle
-Heckman
-hectic
-hector
-Hecuba
-he'd
-hedge
-hedgehog
-hedonism
-hedonist
-heed
-heel
-heft
-hefty
-Hegelian
-hegemony
-Heidelberg
-heigh
-height
-heighten
-Heine
-Heinrich
-Heinz
-heir
-heiress
-Heisenberg
-held
-Helen
-Helena
-Helene
-Helga
-helical
-helicopter
-heliocentric
-heliotrope
-helium
-helix
-he'll
-hell
-hellbender
-hellebore
-Hellenic
-hellfire
-hellgrammite
-hellish
-hello
-helm
-helmet
-Helmholtz
-helmsman
-helmsmen
-Helmut
-help
-helpful
-helpmate
-Helsinki
-Helvetica
-hem
-hematite
-Hemingway
-hemisphere
-hemispheric
-hemlock
-hemoglobin
-hemolytic
-hemorrhage
-hemorrhoid
-hemosiderin
-hemp
-Hempstead
-hen
-henbane
-hence
-henceforth
-henchman
-henchmen
-Henderson
-Hendrick
-Hendricks
-Hendrickson
-henequen
-Henley
-henpeck
-Henri
-Henrietta
-henry
-hepatica
-hepatitis
-Hepburn
-heptane
-her
-Hera
-Heraclitus
-herald
-herb
-Herbert
-Herculean
-Hercules
-herd
-herdsman
-here
-hereabout
-hereafter
-hereby
-hereditary
-heredity
-Hereford
-herein
-hereinabove
-hereinafter
-hereinbelow
-hereof
-heresy
-heretic
-hereto
-heretofore
-hereunder
-hereunto
-.P
-herewith
-heritable
-heritage
-Herkimer
-Herman
-Hermann
-hermeneutic
-Hermes
-hermetic
-Hermite
-hermitian
-Hermosa
-Hernandez
-hero
-Herodotus
-heroes
-heroic
-heroin
-heroine
-heroism
-heron
-herpes
-herpetology
-Herr
-herringbone
-Herschel
-herself
-Hershel
-Hershey
-hertz
-Hertzog
-hesitant
-hesitate
-hesitater
-Hesperus
-Hess
-Hesse
-Hessian
-Hester
-heterocyclic
-heterodyne
-heterogamous
-heterogeneity
-heterogeneous
-heterosexual
-heterostructure
-heterozygous
-Hetman
-Hettie
-Hetty
-Heublein
-heuristic
-Heusen
-Heuser
-hew
-Hewett
-Hewitt
-Hewlett
-hewn
-hex
-hexachloride
-hexadecimal
-hexafluoride
-hexagon
-hexagonal
-hexameter
-hexane
-hey
-heyday
-hi
-Hiatt
-hiatus
-Hiawatha
-hibachi
-Hibbard
-hibernate
-Hibernia
-hick
-Hickey
-Hickman
-hickory
-Hicks
-hid
-hidalgo
-hidden
-hide
-hideaway
-hideous
-hideout
-hierarchal
-hierarchic
-hierarchy
-hieratic
-hieroglyphic
-Hieronymus
-hifalutin
-Higgins
-high
-highball
-highboy
-highest
-highfalutin
-highhanded
-highland
-highlight
-highroad
-hightail
-highway
-highwayman
-highwaymen
-hijack
-hijinks
-hike
-hilarious
-hilarity
-Hilbert
-Hildebrand
-hill
-hillbilly
-Hillcrest
-Hillel
-hillman
-hillmen
-hillock
-hillside
-hilltop
-hilly
-hilt
-Hilton
-hilum
-him
-Himalaya
-himself
-hind
-hindmost
-hindrance
-hindsight
-Hindu
-Hinduism
-Hines
-hinge
-Hinman
-hint
-hinterland
-hip
-hippo
-Hippocrates
-Hippocratic
-hippodrome
-hippopotamus
-hippy
-hipster
-Hiram
-hire
-hireling
-Hiroshi
-Hiroshima
-Hirsch
-hirsute
-his
-Hispanic
-hiss
-histamine
-histidine
-histochemic
-histochemistry
-histogram
-histology
-historian
-historic
-historiography
-history
-histrionic
-hit
-Hitachi
-hitch
-Hitchcock
-hither
-hitherto
-Hitler
-hive
-ho
-hoagie
-Hoagland
-hoagy
-hoar
-hoard
-hoarfrost
-hoarse
-hob
-Hobart
-Hobbes
-hobble
-Hobbs
-hobby
-.P
-hobbyhorse
-hobgoblin
-hobo
-Hoboken
-hoc
-hock
-hockey
-hocus
-hodge
-hodgepodge
-Hodges
-Hodgkin
-hoe
-Hoff
-Hoffman
-hog
-hogan
-hogging
-hoi
-Hokan
-Holbrook
-Holcomb
-hold
-holden
-holdout
-holdover
-holdup
-hole
-holeable
-holiday
-Holland
-Hollandaise
-holler
-Hollerith
-Hollingsworth
-Hollister
-hollow
-Holloway
-hollowware
-holly
-hollyhock
-Hollywood
-Holm
-Holman
-Holmdel
-Holmes
-holmium
-holocaust
-Holocene
-hologram
-holography
-Holst
-Holstein
-holster
-holt
-Holyoke
-holystone
-.FC
-.SG
-.NS 7
-text text text
-text text text
-.NS 12
-Holyoke
-holystone
-.NS
-holt
-.NE
diff --git a/contrib/groff/contrib/mm/examples/LT.se b/contrib/groff/contrib/mm/examples/LT.se
deleted file mode 100644
index bfbd77f5543e..000000000000
--- a/contrib/groff/contrib/mm/examples/LT.se
+++ /dev/null
@@ -1,1062 +0,0 @@
-.\" groff -mmse LT.se
-.ND 1994-10-26
-.WA "Sven Olsson" title
-Return address
-Street
-City, State Zip Code
-Text
-.WE
-.IA "Inside address" title
-Addressee name XXXXXXX
-Title XXXXXXXXXXXXXXX
-Company xxxxxxxxxxxx
-Street xxxxxxxxxxxxxx
-City, State Zip Code
-Text xxxxxxxxxxxxxxxxxx
-.IE
-.LO DNAMN Dokumentnamn
-.LO MDAT 1994-01-01
-.LO BIL 2
-.LO KOMP Kompletteringsuppgift
-.LO DBET dokumentnummer
-.LO BET ärendebeteckning
-.LO MBET "Mottagarens b"
-.LO SIDOR 22
-.\" vänster eller högerställt brev
-.\" .LT SVH
-.LT SVV
-hepp
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-grandstand
-granite
-granitic
-granny
-granola
-grant
-grantee
-grantor
-granular
-granulate
-granule
-Granville
-grape
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-greater
-grebe
-Grecian
-Greece
-greed
-greedy
-Greek
-green
-Greenbelt
-Greenberg
-Greenblatt
-Greenbriar
-Greene
-greenery
-Greenfield
-greengrocer
-greenhouse
-greenish
-Greenland
-Greensboro
-greensward
-greenware
-Greenwich
-greenwood
-Greer
-greet
-Greg
-gregarious
-Gregg
-Gregory
-gremlin
-grenade
-Grendel
-Grenoble
-Gresham
-Greta
-Gretchen
-grew
-grey
-greyhound
-greylag
-grid
-griddle
-gridiron
-grief
-grievance
-grieve
-grievous
-griffin
-Griffith
-grill
-grille
-grilled
-grillwork
-grim
-grimace
-Grimaldi
-grime
-Grimes
-Grimm
-grin
-grind
-grindstone
-grip
-.P
-gripe
-grippe
-grisly
-grist
-gristmill
-Griswold
-grit
-gritty
-grizzle
-grizzly
-groan
-groat
-grocer
-grocery
-groggy
-groin
-grommet
-groom
-groove
-grope
-grosbeak
-gross
-Grosset
-Grossman
-Grosvenor
-grotesque
-Groton
-ground
-groundsel
-groundskeep
-groundwork
-group
-groupoid
-grout
-grove
-grovel
-Grover
-grow
-growl
-grown
-grownup
-growth
-grub
-grubby
-grudge
-gruesome
-gruff
-grumble
-Grumman
-grunt
-gryphon
-g's
-GSA
-GU
-Guam
-guanidine
-guanine
-guano
-guarantee
-guaranteeing
-guarantor
-guaranty
-guard
-guardhouse
-Guardia
-guardian
-Guatemala
-gubernatorial
-Guelph
-Guenther
-guerdon
-guernsey
-guerrilla
-guess
-guesswork
-guest
-guffaw
-Guggenheim
-Guiana
-guidance
-guide
-guidebook
-guideline
-guidepost
-guiding
-guignol
-guild
-guildhall
-guile
-Guilford
-guillemot
-guillotine
-guilt
-guilty
-guinea
-guise
-guitar
-gules
-gulf
-gull
-Gullah
-gullet
-gullible
-gully
-gulp
-gum
-gumbo
-gumdrop
-gummy
-gumption
-gumshoe
-gun
-Gunderson
-gunfight
-gunfire
-gunflint
-gunk
-gunky
-gunman
-gunmen
-gunnery
-gunny
-gunplay
-gunpowder
-gunshot
-gunsling
-Gunther
-gurgle
-Gurkha
-guru
-Gus
-gush
-gusset
-gust
-Gustafson
-Gustav
-Gustave
-Gustavus
-gusto
-gusty
-gut
-Gutenberg
-Guthrie
-gutsy
-guttural
-guy
-.P
-Guyana
-guzzle
-Gwen
-Gwyn
-gym
-gymnasium
-gymnast
-gymnastic
-gymnosperm
-gyp
-gypsite
-gypsum
-gypsy
-gyrate
-gyrfalcon
-gyro
-gyrocompass
-gyroscope
-h
-ha
-Haag
-Haas
-habeas
-haberdashery
-Haberman
-Habib
-habit
-habitant
-habitat
-habitation
-habitual
-habituate
-hacienda
-hack
-hackberry
-Hackett
-hackle
-hackmatack
-hackney
-hackneyed
-hacksaw
-had
-Hadamard
-Haddad
-haddock
-Hades
-Hadley
-hadn't
-Hadrian
-hadron
-hafnium
-Hagen
-Hager
-haggard
-haggle
-Hagstrom
-Hague
-Hahn
-Haifa
-haiku
-hail
-hailstone
-hailstorm
-Haines
-hair
-haircut
-hairdo
-hairpin
-hairy
-Haiti
-Haitian
-Hal
-halcyon
-hale
-Haley
-half
-halfback
-halfhearted
-halfway
-halibut
-halide
-Halifax
-halite
-hall
-hallelujah
-Halley
-hallmark
-hallow
-Halloween
-hallucinate
-hallway
-halma
-halo
-halocarbon
-halogen
-Halpern
-Halsey
-Halstead
-halt
-halvah
-halve
-Halverson
-ham
-Hamal
-Hamburg
-hamburger
-Hamilton
-hamlet
-Hamlin
-hammerhead
-hammock
-Hammond
-hamper
-Hampshire
-Hampton
-hamster
-Han
-Hancock
-hand
-handbag
-handbook
-handclasp
-handcuff
-Handel
-handful
-handgun
-handhold
-handicap
-handicapped
-handicapper
-handicapping
-handicraft
-handicraftsman
-handicraftsmen
-handiwork
-handkerchief
-handle
-handleable
-handlebar
-handline
-handmade
-handmaiden
-handout
-handset
-handshake
-handsome
-handspike
-handstand
-handwaving
-handwrite
-handwritten
-handy
-handyman
-handymen
-Haney
-Hanford
-hang
-hangable
-hangar
-hangman
-hangmen
-hangout
-hangover
-hank
-Hankel
-Hanley
-Hanlon
-Hanna
-Hannah
-Hannibal
-Hanoi
-Hanover
-Hanoverian
-Hans
-Hansel
-Hansen
-hansom
-Hanson
-Hanukkah
-hap
-haphazard
-haploid
-haploidy
-haplology
-happen
-happenstance
-happy
-Hapsburg
-harangue
-harass
-Harbin
-harbinger
-Harcourt
-hard
-hardbake
-hardboard
-hardboiled
-hardcopy
-harden
-hardhat
-Hardin
-Harding
-hardscrabble
-hardtack
-hardtop
-hardware
-hardwood
-hardworking
-hardy
-hare
-harelip
-harem
-hark
-Harlan
-Harlem
-Harley
-harm
-harmful
-Harmon
-harmonic
-harmonica
-harmonious
-harmony
-harness
-Harold
-harp
-harpoon
-harpsichord
-Harpy
-Harriet
-Harriman
-Harrington
-Harris
-Harrisburg
-Harrison
-harrow
-harry
-harsh
-harshen
-hart
-Hartford
-Hartley
-Hartman
-Harvard
-.P
-harvest
-harvestman
-Harvey
-hash
-hashish
-hasn't
-hasp
-hassle
-hast
-haste
-hasten
-Hastings
-hasty
-hat
-hatch
-hatchet
-hatchway
-hate
-hateful
-hater
-Hatfield
-hath
-Hathaway
-hatred
-Hatteras
-Hattie
-Hattiesburg
-Haugen
-haughty
-haul
-haulage
-haunch
-haunt
-Hausdorff
-Havana
-have
-haven
-haven't
-Havilland
-havoc
-haw
-Hawaii
-Hawaiian
-hawk
-Hawkins
-Hawley
-hawthorn
-Hawthorne
-hay
-Hayden
-Haydn
-Hayes
-hayfield
-Haynes
-Hays
-haystack
-Hayward
-hayward
-hazard
-hazardous
-haze
-hazel
-hazelnut
-hazy
-he
-head
-headache
-headboard
-headdress
-headland
-headlight
-headline
-headmaster
-headphone
-headquarter
-headquarters
-headroom
-headset
-headsman
-headsmen
-headstand
-headstone
-headstrong
-headwall
-headwater
-headway
-headwind
-heady
-heal
-Healey
-health
-healthful
-healthy
-Healy
-heap
-hear
-heard
-hearken
-hearsay
-hearse
-Hearst
-heart
-heartbeat
-heartbreak
-hearten
-heartfelt
-hearth
-hearty
-heat
-heater
-heath
-heathen
-heathenish
-Heathkit
-heave
-heaven
-heavenward
-heavy
-heavyweight
-Hebe
-hebephrenic
-Hebraic
-Hebrew
-Hecate
-hecatomb
-heck
-heckle
-Heckman
-hectic
-hector
-Hecuba
-he'd
-hedge
-hedgehog
-hedonism
-hedonist
-heed
-heel
-heft
-hefty
-Hegelian
-hegemony
-Heidelberg
-heigh
-height
-heighten
-Heine
-Heinrich
-Heinz
-heir
-heiress
-Heisenberg
-held
-Helen
-Helena
-Helene
-Helga
-helical
-helicopter
-heliocentric
-heliotrope
-helium
-helix
-he'll
-hell
-hellbender
-hellebore
-Hellenic
-hellfire
-hellgrammite
-hellish
-hello
-helm
-helmet
-Helmholtz
-helmsman
-helmsmen
-Helmut
-help
-helpful
-helpmate
-Helsinki
-Helvetica
-hem
-hematite
-Hemingway
-hemisphere
-hemispheric
-hemlock
-hemoglobin
-hemolytic
-hemorrhage
-hemorrhoid
-hemosiderin
-hemp
-Hempstead
-hen
-henbane
-hence
-henceforth
-henchman
-henchmen
-Henderson
-Hendrick
-Hendricks
-Hendrickson
-henequen
-Henley
-henpeck
-Henri
-Henrietta
-henry
-hepatica
-hepatitis
-Hepburn
-heptane
-her
-Hera
-Heraclitus
-herald
-herb
-Herbert
-Herculean
-Hercules
-herd
-herdsman
-here
-hereabout
-hereafter
-hereby
-hereditary
-heredity
-Hereford
-herein
-hereinabove
-hereinafter
-hereinbelow
-hereof
-heresy
-heretic
-hereto
-heretofore
-hereunder
-hereunto
-.P
-herewith
-heritable
-heritage
-Herkimer
-Herman
-Hermann
-hermeneutic
-Hermes
-hermetic
-Hermite
-hermitian
-Hermosa
-Hernandez
-hero
-Herodotus
-heroes
-heroic
-heroin
-heroine
-heroism
-heron
-herpes
-herpetology
-Herr
-herringbone
-Herschel
-herself
-Hershel
-Hershey
-hertz
-Hertzog
-hesitant
-hesitate
-hesitater
-Hesperus
-Hess
-Hesse
-Hessian
-Hester
-heterocyclic
-heterodyne
-heterogamous
-heterogeneity
-heterogeneous
-heterosexual
-heterostructure
-heterozygous
-Hetman
-Hettie
-Hetty
-Heublein
-heuristic
-Heusen
-Heuser
-hew
-Hewett
-Hewitt
-Hewlett
-hewn
-hex
-hexachloride
-hexadecimal
-hexafluoride
-hexagon
-hexagonal
-hexameter
-hexane
-hey
-heyday
-hi
-Hiatt
-hiatus
-Hiawatha
-hibachi
-Hibbard
-hibernate
-Hibernia
-hick
-Hickey
-Hickman
-hickory
-Hicks
-hid
-hidalgo
-hidden
-hide
-hideaway
-hideous
-hideout
-hierarchal
-hierarchic
-hierarchy
-hieratic
-hieroglyphic
-Hieronymus
-hifalutin
-Higgins
-high
-highball
-highboy
-highest
-highfalutin
-highhanded
-highland
-highlight
-highroad
-hightail
-highway
-highwayman
-highwaymen
-hijack
-hijinks
-hike
-hilarious
-hilarity
-Hilbert
-Hildebrand
-hill
-hillbilly
-Hillcrest
-Hillel
-hillman
-hillmen
-hillock
-hillside
-hilltop
-hilly
-hilt
-Hilton
-hilum
-him
-Himalaya
-himself
-hind
-hindmost
-hindrance
-hindsight
-Hindu
-Hinduism
-Hines
-hinge
-Hinman
-hint
-hinterland
-hip
-hippo
-Hippocrates
-Hippocratic
-hippodrome
-hippopotamus
-hippy
-hipster
-Hiram
-hire
-hireling
-Hiroshi
-Hiroshima
-Hirsch
-hirsute
-his
-Hispanic
-hiss
-histamine
-histidine
-histochemic
-histochemistry
-histogram
-histology
-historian
-historic
-historiography
-history
-histrionic
-hit
-Hitachi
-hitch
-Hitchcock
-hither
-hitherto
-Hitler
-hive
-ho
-hoagie
-Hoagland
-hoagy
-hoar
-hoard
-hoarfrost
-hoarse
-hob
-Hobart
-Hobbes
-hobble
-Hobbs
-hobby
-.P
-hobbyhorse
-hobgoblin
-hobo
-Hoboken
-hoc
-hock
-hockey
-hocus
-hodge
-hodgepodge
-Hodges
-Hodgkin
-hoe
-Hoff
-Hoffman
-hog
-hogan
-hogging
-hoi
-Hokan
-Holbrook
-Holcomb
-hold
-holden
-holdout
-holdover
-holdup
-hole
-holeable
-holiday
-Holland
-Hollandaise
-holler
-Hollerith
-Hollingsworth
-Hollister
-hollow
-Holloway
-hollowware
-holly
-hollyhock
-Hollywood
-Holm
-Holman
-Holmdel
-Holmes
-holmium
-holocaust
-Holocene
-hologram
-holography
-Holst
-Holstein
-holster
-holt
-Holyoke
-holystone
-.FC
-.SG
-.NS 7
-text text text
-text text text
-.NS 12
-Holyoke
-holystone
-.NS
-holt
-.NE
diff --git a/contrib/groff/contrib/mm/examples/ML b/contrib/groff/contrib/mm/examples/ML
deleted file mode 100644
index bbfca3def549..000000000000
--- a/contrib/groff/contrib/mm/examples/ML
+++ /dev/null
@@ -1,169 +0,0 @@
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-grandnephew
-grandniece
-grandpa
-.ML MARK
-.LI "LOCALMARK"
-granola
-grant
-grantee
-grantor
-granular
-granulate
-granule
-Granville
-grape
-grapefruit
-grapevine
-.LI
-.DS
-Where shall we put this.
-Where shall we put this.
-Where shall we put this.
-.DE
-.LI
-granola
-grant
-grantee
-grantor
-granular
-granulate
-granule
-Granville
-grape
-grapefruit
-grapevine
-.LI
-.DS
-Where shall we put this.
-.DE
-.LI
-graphic
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-.LI
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-.LI
-gratuity
-grave
-gravel
-.LE
-.SP 3
-.ML $ 1c
-.LI
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-.LI
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-.LI
-greater
-grebe
-Grecian
-Greece
-greed
-greedy
-Greek
-green
-.LI
-Greenbelt
-Greenberg
-Greenblatt
-Greenbriar
-Greene
-greenery
-.LE
-.SP 3
-.ML X 1c 1
-.LI
-Greenfield
-greengrocer
-grandson
-grandstand
-granite
-granitic
-granny
-graph
-.LI
-grapheme
-greenhouse
-greenish
-Greenland
-Greensboro
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-.LI
-grandma
-grandmother
-grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-grandstand
-granite
-granitic
-granny
-.LI
-granola
-grant
-grantee
-grantor
-granular
-granulate
-granule
-Granville
-grape
-grapefruit
-.LI
-grapevine
-graph
-grapheme
-graphic
-graphite
-grapple
-grasp
-grass
-grassland
-.LE
diff --git a/contrib/groff/contrib/mm/examples/MOVE b/contrib/groff/contrib/mm/examples/MOVE
deleted file mode 100644
index 0f0399cc7a35..000000000000
--- a/contrib/groff/contrib/mm/examples/MOVE
+++ /dev/null
@@ -1,175 +0,0 @@
-.PH "'hej'hopp'i skogen'"
-.PF "'livet'är'härligt'"
-.OH "'ojämn'%'sida'"
-.EH "'ojämn'%'sida'"
-.OF "'ojämn'%'sida'"
-.EF "'ojämn'%'sida'"
-10th
-1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-a
-AAA
-AAAS
-Aarhus
-Aaron
-AAU
-ABA
-Ababa
-aback
-abacus
-abalone
-abandon
-abase
-abash
-abate
-abater
-abbas
-abbe
-abbey
-abbot
-Abbott
-abbreviate
-abc
-abdicate
-abdomen
-abdominal
-abet
-abetted
-abetting
-abeyance
-abeyant
-abhorred
-abhorrent
-abide
-Abidjan
-Abigail
-abject
-ablate
-ablaze
-able
-ablution
-Abner
-.MOVE 50 20
-abnormal
-Abo
-aboard
-abode
-abolish
-abolition
-abominable
-abominate
-aboriginal
-AAA
-ABORIGINE
-ABORNING
-ABORT
-ABOUND
-ABOUT
-ABOVE
-ABOVEBOARD
-ABOVEGROUND
-abovementioned
-abrade
-Abraham
-Abram
-Abramson
-abrasion
-abrasive
-abreact
-abreast
-BBB
-ABRIDGE
-ABRIDGMENT
-ABROAD
-abrogate
-abrupt
-abscess
-abscissa
-abscissae
-absence
-absent
-absentee
-absenteeism
-absentia
-absentminded
-.MOVE 30 10
-absinthe
-absolute
-absolution
-absolve
-absorb
-absorbent
-absorption
-absorptive
-abstain
-abstention
-abstinent
-abstract
-abstracter
-abstractor
-CCC
-ABSTRUSE
-ABSURD
-ABUILDING
-ABUNDANT
-ABUSABLE
-ABUSE
-ABUSIVE
-ABUT
-ABUTTED
-ABUTTING
-ABYSMAL
-ABYSS
-ABYSSINIA
-AC
-ACADEME
-ACADEMIA
-ACADEMIC
-ACADEMICIAN
-ACADEMY
-ACADIA
-ACANTHUS
-ACAPULCO
-ACCEDE
-ACCELERATE
-ACCELEROMETER
-ACCENT
-ACCENTUAL
-ACCENTUATE
-ACCEPT
-ACCEPTANT
-acceptor
-access
-.MOVE 62 0 20
-accessible
-accession
-accessory
-accident
-accidental
-accipiter
-acclaim
-acclamation
-acclimate
-accolade
-accommodate
-accompaniment
-accompanist
-accompany
-accomplice
-accomplish
-accord
-accordant
-DDD
-ACCORDION
-ACCOST
-ACCOUNT
-ACCOUNTANT
-ACCRA
-.PGFORM
diff --git a/contrib/groff/contrib/mm/examples/MUL b/contrib/groff/contrib/mm/examples/MUL
deleted file mode 100644
index ae91fae0d404..000000000000
--- a/contrib/groff/contrib/mm/examples/MUL
+++ /dev/null
@@ -1,535 +0,0 @@
-inject
-injudicious
-Injun
-injunct
-injunction
-injure
-injurious
-injury
-injustice
-ink
-inkling
-inlaid
-inland
-inlay
-inlet
-Inman
-inmate
-inn
-innards
-innate
-inner
-innermost
-innkeeper
-innocent
-innocuous
-innovate
-innuendo
-innumerable
-inoculate
-inoffensive
-inoperable
-inoperative
-inopportune
-inordinate
-inorganic
-input
-inputting
-inquest
-inquire
-inquiry
-inquisition
-inquisitive
-inquisitor
-inroad
-insane
-insatiable
-inscribe
-inscription
-inscrutable
-insect
-insecticide
-insecure
-inseminate
-insensible
-insensitive
-inseparable
-insert
-inset
-inshore
-inside
-insidious
-insight
-insightful
-insignia
-insignificant
-insincere
-insinuate
-insipid
-insist
-insistent
-insofar
-insolent
-insoluble
-insolvable
-insolvent
-insomnia
-insomniac
-insouciant
-inspect
-inspector
-inspiration
-inspire
-instable
-install
-installation
-instalment
-instance
-instant
-instantaneous
-instantiate
-instead
-instep
-instigate
-instill
-instillation
-instinct
-instinctual
-institute
-institution
-instruct
-instructor
-instrument
-instrumentation
-insubordinate
-insubstantial
-insufferable
-insufficient
-insular
-insulate
-insulin
-insult
-insuperable
-insupportable
-insuppressible
-insurance
-insure
-insurgent
-insurmountable
-insurrect
-insurrection
-intact
-intake
-intangible
-integer
-integrable
-.MULB 4c 1 5c 1 4c 1 3c
-Grenoble
-Gresham
-Greta
-Gretchen
-grew
-grieve
-grievous
-griffin
-Griffith
-grill
-grille
-grilled
-grillwork
-grim
-grimace
-Grimaldi
-grime
-Grimes
-Grimm
-grin
-grind
-grindstone
-grip
-gripe
-grippe
-grisly
-grist
-gristmill
-Griswold
-grit
-gritty
-grizzle
-grizzly
-groan
-groat
-grocer
-grocery
-groggy
-groin
-grommet
-groom
-groove
-grope
-grosbeak
-gross
-.MULN
-h
-ha
-Haag
-Haas
-habeas
-haberdashery
-Haberman
-Habib
-habit
-habitant
-habitat
-habitation
-habitual
-habituate
-hacienda
-hack
-hackberry
-Hackett
-hackle
-hackmatack
-hackney
-hackneyed
-hacksaw
-had
-Hadamard
-Haddad
-haddock
-Hades
-Hadley
-hadn't
-Hadrian
-hadron
-hafnium
-Hagen
-Hager
-haggard
-haggle
-Hagstrom
-Hague
-Hahn
-Haifa
-haiku
-hail
-hailstone
-hailstorm
-Haines
-hair
-haircut
-hairdo
-hairpin
-hairy
-Haiti
-Haitian
-Hal
-halcyon
-hale
-Haley
-half
-halfback
-halfhearted
-halfway
-halibut
-halide
-Halifax
-halite
-hall
-hallelujah
-Halley
-hallmark
-hallow
-Halloween
-hallucinate
-hallway
-halma
-halo
-halocarbon
-halogen
-Halpern
-Halsey
-Halstead
-halt
-halvah
-halve
-Halverson
-ham
-Hamal
-Hamburg
-hamburger
-Hamilton
-hamlet
-Hamlin
-hammerhead
-hammock
-Hammond
-hamper
-Hampshire
-Hampton
-hamster
-Han
-Hancock
-hand
-handbag
-handbook
-handclasp
-handcuff
-.MULN
-coliform
-coliseum
-collaborate
-collage
-collagen
-collapse
-collapsible
-collar
-collarbone
-collard
-collate
-collateral
-colleague
-collect
-collectible
-collector
-college
-collegial
-collegian
-collegiate
-collet
-collide
-collie
-Collier
-collimate
-collinear
-Collins
-collision
-collocation
-colloidal
-Colloq
-colloquia
-colloquial
-colloquium
-colloquy
-command
-commandant
-commandeer
-commando
-commemorate
-commend
-commendation
-commendatory
-commensurable
-commensurate
-comment
-commentary
-commentator
-commerce
-commercial
-commingle
-commiserate
-commissariat
-commissary
-commission
-commit
-committable
-committal
-committed
-committee
-committeeman
-committeemen
-committeewoman
-committeewomen
-committing
-commodious
-commodity
-commodore
-common
-commonality
-.MULN
-locoweed
-lunch
-luncheon
-lunchroom
-lunchtime
-Lund
-Lundberg
-Lundquist
-lung
-lunge
-lupine
-Lura
-lurch
-lure
-lurid
-lurk
-Lusaka
-luscious
-lush
-lust
-lustful
-lustrous
-lusty
-lutanist
-lute
-lutetium
-Luther
-Lutheran
-Lutz
-lymphocyte
-lymphoma
-lynch
-Lynchburg
-Lynn
-lynx
-Lyon
-Lyons
-Lyra
-lyric
-lyricism
-Lysenko
-lysergic
-lysine
-.MULE
-m
-ma
-Mabel
-Mac
-macabre
-macaque
-MacArthur
-Macassar
-Macbeth
-MacDonald
-MacDougall
-mace
-Macedon
-Macedonia
-MacGregor
-Mach
-Machiavelli
-machination
-machine
-machinelike
-machinery
-machismo
-macho
-macintosh
-mack
-MacKenzie
-mackerel
-Mackey
-Mackinac
-Mackinaw
-mackintosh
-MacMillan
-Macon
-macrame
-macro
-macromolecular
-macromolecule
-macrophage
-macroprocessor
-macroscopic
-macrostructure
-mad
-Madagascar
-madam
-Madame
-madcap
-madden
-Maddox
-made
-Madeira
-Madeleine
-Madeline
-madhouse
-Madison
-madman
-madmen
-Madonna
-Madras
-Madrid
-madrigal
-Madsen
-madstone
-Mae
-Maelstrom
-maestro
-Mafia
-magazine
-Magdalene
-magenta
-Maggie
-maggot
-maggoty
-magi
-magic
-magician
-magisterial
-magistrate
-magma
-magna
-magnanimity
-magnanimous
-magnate
-magnesia
-magnesite
-magnesium
-magnet
-magnetic
-magnetite
-magneto
-magnetron
-magnificent
-magnify
-magnitude
-magnolia
-magnum
-Magnuson
-Magog
-magpie
-Magruder
-Mahayana
-Mahayanist
-mahogany
-Mahoney
-maid
-maiden
-maidenhair
-maidservant
-Maier
-mail
-mailbox
-mailman
-mailmen
-maim
-main
-Maine
-mainland
-mainline
-mainstay
-mainstream
-maintain
-maintenance
-maitre
-majestic
-majesty
-major
-make
-makeshift
-makeup
-Malabar
-maladapt
-maladaptive
-maladjust
-maladroit
-malady
-Malagasy
-malaise
-malaprop
-malaria
-malarial
-Malawi
-Malay
-Malaysia
diff --git a/contrib/groff/contrib/mm/examples/NCOL b/contrib/groff/contrib/mm/examples/NCOL
deleted file mode 100644
index 82c6f8d50812..000000000000
--- a/contrib/groff/contrib/mm/examples/NCOL
+++ /dev/null
@@ -1,196 +0,0 @@
-granary
-grand
-grandchild
-grandchildren
-granddaughter
-grandeur
-grandfather
-grandiloquent
-grandiose
-grandma
-grandmother
-grandnephew
-grandniece
-grandpa
-grandparent
-grandson
-grandstand
-granite
-granitic
-granny
-granola
-grant
-grantee
-grantor
-granular
-granulate
-granule
-Granville
-grape
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-graphite
-grapple
-grasp
-grass
-grassland
-grassy
-.MC 3c
-grata
-grate
-grateful
-grater
-gratify
-gratis
-gratitude
-gratuitous
-gratuity
-grave
-gravel
-graven
-Graves
-gravestone
-graveyard
-gravid
-gravitate
-gravy
-gray
-graybeard
-grayish
-Grayson
-graywacke
-graze
-grease
-greasy
-great
-greatcoat
-greater
-grebe
-Grecian
-Greece
-greed
-greedy
-.NCOL
-Greek
-green
-Greenbelt
-Greenberg
-Greenblatt
-Greenbriar
-Greene
-greenery
-Greenfield
-greengrocer
-greenhouse
-greenish
-Greenland
-Greensboro
-greensward
-greenware
-Greenwich
-greenwood
-Greer
-greet
-Greg
-gregarious
-Gregg
-Gregory
-gremlin
-grenade
-Grendel
-Grenoble
-Gresham
-Greta
-Gretchen
-grew
-grey
-greyhound
-greylag
-grid
-griddle
-gridiron
-grief
-grievance
-grieve
-grievous
-griffin
-Griffith
-grill
-grille
-grilled
-grillwork
-.NCOL
-grim
-grimace
-Grimaldi
-grime
-Grimes
-Grimm
-grin
-grind
-grindstone
-grip
-gripe
-grippe
-grisly
-grist
-gristmill
-Griswold
-grit
-gritty
-grizzle
-grizzly
-groan
-groat
-grocer
-grocery
-groggy
-groin
-grommet
-groom
-groove
-grope
-grosbeak
-gross
-Grosset
-Grossman
-Grosvenor
-grotesque
-Groton
-ground
-groundsel
-groundskeep
-groundwork
-group
-groupoid
-grout
-grove
-grovel
-Grover
-grow
-growl
-grown
-grownup
-growth
-grub
-grubby
-grudge
-gruesome
-gruff
-grumble
-Grumman
-grunt
-gryphon
-g's
-GSA
-GU
-Guam
-guanidine
-guanine
-guano
-guarantee
-guaranteeing
-guarantor
diff --git a/contrib/groff/contrib/mm/examples/ND b/contrib/groff/contrib/mm/examples/ND
deleted file mode 100644
index 4b3694a37261..000000000000
--- a/contrib/groff/contrib/mm/examples/ND
+++ /dev/null
@@ -1,17 +0,0 @@
-.nf
-----------------------------------------------------------------------
-.ce
-Testing
-----------------------------------------------------------------------
-Date = \*[DT]
-.ISODATE
-Date = \*[DT]
-.ISODATE 0
-
-.ND "13 August 1992"
-Date = \*[DT]
-
-.ISODATE
-.ND "14 August 1992"
-Date = \*[DT]
-----------------------------------------------------------------------
diff --git a/contrib/groff/contrib/mm/examples/README b/contrib/groff/contrib/mm/examples/README
deleted file mode 100644
index cb6980f85327..000000000000
--- a/contrib/groff/contrib/mm/examples/README
+++ /dev/null
@@ -1,32 +0,0 @@
-
-This directory contains examples of my enhancements to MM.
-
-APP The appendix macro
-B1B2 Box macro with text
-COVER My general cover macro, this example is using
- ms.cov.
-IND A general indexing method, see manual for INITI
-LT The letter macro
-LT.se A swedish example with the extra
- swedish macros for getting a letter conforming
- to swedish standard letter, both left and right adjusted.
-ML Marked list, an extended list type
-MOVE The MOVE macro, how to begin to print on an exact position.
-MUL Enhanced multicolumn mode.
-NCOL Start on next column. (Not for MUL*)
-ND New date, with iso date example
-References How to use references
-SETR General reference system, see manual for INITR
-
-
-Examples that I should have:
-
-PIC How to include postscript pictures, see manual for PIC
-VERBON Begin verbatim output
-
-
-And remember, check the manual for all string and number registers,
-I've made shure that mgm will be useful in several languages
-and all english output can be redefined.
-Check the manual for groff_mse (swedish format) and the
-macro file, tmac.mse.
diff --git a/contrib/groff/contrib/mm/examples/References b/contrib/groff/contrib/mm/examples/References
deleted file mode 100644
index 72f648220903..000000000000
--- a/contrib/groff/contrib/mm/examples/References
+++ /dev/null
@@ -1,975 +0,0 @@
-.PH "'this'is'a header'"
-.PF "'this'is'a footer'"
-.OH "'odd'%'page'"
-.EH "'even'%'page'"
-.OF "'odd'%'page'"
-.EF "'even'%'page'"
-10th
-1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-a
-AAA
-.B
-AAAS
-Aarhus
-Aaron
-.R
-AAU
-ABA
-Ababa
-aback
-abacus
-abalone
-abandon
-abase
-.H 1 "hej hopp"
-abash
-abate
-abater
-abbas
-abbe
-abbey
-abbot
-Abbott
-abbreviate
-abc
-abdicate
-abdomen
-abet
-abetted
-abetting
-abeyance
-abeyant
-.H 2 "hej hopp"
-abhorred
-abhorrent
-abide
-Abidjan
-Abigail
-abject
-ablate
-ablaze
-able
-ablution
-Abner
-abnormal
-.H 2 "hej hopp"
-Abo
-aboard
-abode
-abolish
-.HU "hej hopp"
-.B1
-abolition
-abominable
-abominate\*(Rf
-aboriginal
-.RS
-AAA
-ABORIGINE
-ABORNING
-ABORT
-ABOUND
-ABOUT
-ABOVE
-ABOVEBOARD
-ABOVEGROUND
-.RF
-abovementioned
-abrade
-Abraham\*(Rf
-Abram\*(Rf
-Abramson\*(Rf
-abrasion\*(Rf
-abrasive\*(Rf
-abreact\*(Rf
-.B2
-abreast\*(Rf
-.RS
-BBB
-ABRIDGE
-ABRIDGMENT
-ABROAD
-.RF
-abrogate
-abrupt
-abscess\*(Rf
-abscissa\*(Rf
-abscissae\*(Rf
-absence\*(Rf
-absent
-absentee
-absenteeism
-absentia
-.H 3 "hej hopp"
-absentminded
-absinthe
-absolute
-absolution
-absolve
-absorb
-absorbent
-absorption
-absorptive
-abstain
-abstention
-abstinent\*(Rf
-abstract
-abstracter
-abstractor
-.RS nisse
-CCC
-ABSTRUSE
-ABSURD
-ABUILDING
-ABUNDANT
-ABUSABLE
-ABUSE
-ABUSIVE
-ABUT
-ABUTTED
-ABUTTING
-ABYSMAL
-ABYSS
-ABYSSINIA
-AC
-ACADEME
-ACADEMIA
-ACADEMIC
-ACADEMICIAN
-ACADEMY
-ACADIA
-ACANTHUS
-ACAPULCO
-ACCEDE
-ACCELERATE
-ACCELEROMETER
-ACCENT
-ACCENTUAL
-ACCENTUATE
-ACCEPT
-ACCEPTANT
-.RF
-acceptor
-access
-accessible
-accession
-Ref \*[nisse]
-accessory
-.H 4 "hej hopp"
-accident
-accidental
-accipiter
-acclaim
-acclamation
-acclimate
-accolade
-accommodate
-accompaniment
-accompanist
-accompany
-accomplice
-accomplish\*(Rf
-accord
-accordant
-.RS
-DDD
-ACCORDION
-ACCOST
-ACCOUNT
-ACCOUNTANT
-ACCRA
-ACCREDIT
-ACCREDITATE
-ACCREDITATION
-ACCRETION
-ACCRUAL
-ACCRUE
-.RF
-acculturate
-accumulate
-accuracy
-accurate
-accusation
-accusative
-accusatory
-accuse
-accustom
-ace
-acerbic
-acerbity
-acetate
-acetic
-acetone
-acetylene
-ache
-achieve
-Achilles
-aching
-achromatic
-acid
-acidic
-acidulous
-.H 5 "hej hopp"
-Ackerman
-Ackley
-acknowledge
-acknowledgeable
-ACM
-acme
-acolyte
-acorn
-acoustic
-acquaint
-acquaintance
-acquiesce
-acquiescent
-acquire
-acquisition
-acquisitive
-acquit
-acquittal
-acquitting
-acre
-acreage
-acrid
-acrimonious
-acrimony
-acrobacy
-acrobat
-acrobatic
-acronym
-acropolis
-across
-acrylate
-acrylic
-ACS
-act
-Actaeon
-actinic
-actinide
-actinium
-actinolite
-actinometer
-activate
-activation
-activism
-Acton
-actor
-actress
-Acts
-actual
-actuarial
-actuate
-.H 6 "hej hopp"
-acuity
-acumen
-acute
-acyclic
-ad
-Ada
-adage
-adagio
-Adair
-Adam
-adamant
-Adams
-Adamson
-adapt
-adaptation
-adaptive
-add
-added
-addend
-addenda
-addendum
-addict
-Addis
-Addison
-addition
-additional
-additive
-addle
-address
-addressee
-Addressograph
-adduce
-Adelaide
-Adele
-Adelia
-Aden
-adenine
-adenoma
-adenosine
-adept
-adequacy
-adequate
-adhere
-adherent
-adhesion
-adhesive
-adiabatic
-adieu
-adipic
-Adirondack
-.H 7 "hej hopp"
-adjacent
-adject
-adjectival
-adjective
-adjoin
-adjoint
-adjourn
-adjudge
-adjudicate
-adjunct
-adjust
-adjutant
-Adkins
-Adler
-administer
-administrable
-administrate
-administratrix
-admiral
-admiralty
-admiration
-admire
-admissible
-admission
-admit
-admittance
-admitted
-admitting
-admix
-admixture
-admonish
-admonition
-ado
-adobe
-adolescent
-Adolph
-Adolphus
-Adonis
-adopt
-adoption
-adoptive
-adore
-adorn
-adposition
-adrenal
-adrenaline
-Adrian
-Adriatic
-Adrienne
-adrift
-adroit
-adsorb
-adsorbate
-adsorption
-adsorptive
-adulate
-adult
-adulterate
-adulterous
-adultery
-adulthood
-advance
-advantage
-advantageous
-advent
-adventitious
-adventure
-adventurous
-adverb
-adverbial
-adversary
-adverse
-advert
-advertise
-advice
-advisable
-advise
-advisee
-advisor
-advisory
-advocacy
-advocate
-Aegean
-aegis
-Aeneas
-Aeneid
-aeolian
-Aeolus
-aerate
-aerial
-Aerobacter
-aerobic
-aerodynamic
-aerogene
-aeronautic
-aerosol
-aerospace
-Aeschylus
-aesthete
-aesthetic
-10th
-1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-a
-AAA
-AAAS
-Aarhus
-Aaron
-AAU
-ABA
-Ababa
-aback
-abacus
-abalone
-abandon
-abase
-.H 1 "hej hopp"
-abash
-abate
-abater
-abbas
-abbe
-abbey
-abbot
-Abbott
-abbreviate
-abc
-abdicate
-abdomen
-abdominal
-abduct
-Abe
-abed
-Abel
-Abelian
-Abelson
-Aberdeen
-Abernathy
-aberrant
-aberrate
-abet
-abetted
-abetting
-abeyance
-abeyant
-.H 2 "hej hopp"
-abhorred
-abhorrent
-abide
-Abidjan
-Abigail
-abject
-ablate
-ablaze
-able
-ablution
-Abner
-abnormal
-Abo
-aboard
-abode
-abolish
-abolition
-abominable
-abominate
-aboriginal
-aborigine
-aborning
-abort
-abound
-about
-above
-aboveboard
-aboveground
-abovementioned
-abrade
-Abraham
-Abram
-Abramson
-abrasion
-abrasive
-abreact
-abreast
-abridge
-abridgment
-abroad
-abrogate
-abrupt
-abscess
-abscissa
-abscissae
-absence
-absent
-absentee
-absenteeism
-absentia
-.H 3 "hej hopp"
-absentminded
-absinthe
-absolute
-absolution
-absolve
-absorb
-absorbent
-absorption
-absorptive
-abstain
-abstention
-abstinent
-abstract
-abstracter
-abstractor
-abstruse
-absurd
-abuilding
-abundant
-abusable
-abuse
-abusive
-abut
-abutted
-abutting
-abysmal
-abyss
-Abyssinia
-AC
-academe
-academia
-academic
-academician
-academy
-Acadia
-acanthus
-Acapulco
-accede
-accelerate
-accelerometer
-accent
-accentual
-accentuate
-accept
-acceptant
-acceptor
-access
-accessible
-accession
-accessory
-.H 4 "hej hopp"
-accident
-accidental
-accipiter
-acclaim
-acclamation
-acclimate
-accolade
-accommodate
-accompaniment
-accompanist
-accompany
-accomplice
-accomplish
-accord
-accordant
-accordion
-accost
-account
-accountant
-Accra
-accredit
-accreditate
-accreditation
-accretion
-accrual
-accrue
-acculturate
-accumulate
-accuracy
-accurate
-accusation
-accusative
-accusatory
-accuse
-accustom
-ace
-acerbic
-acerbity
-acetate
-acetic
-acetone
-acetylene
-ache
-achieve
-Achilles
-aching
-achromatic
-acid
-acidic
-acidulous
-.H 5 "hej hopp"
-Ackerman
-Ackley
-acknowledge
-acknowledgeable
-ACM
-acme
-acolyte
-acorn
-acoustic
-acquaint
-acquaintance
-acquiesce
-acquiescent
-acquire
-acquisition
-acquisitive
-acquit
-acquittal
-acquitting
-acre
-acreage
-acrid
-acrimonious
-acrimony
-acrobacy
-acrobat
-acrobatic
-acronym
-acropolis
-across
-acrylate
-acrylic
-ACS
-act
-Actaeon
-actinic
-actinide
-actinium
-actinolite
-actinometer
-activate
-activation
-activism
-Acton
-actor
-actress
-Acts
-actual
-actuarial
-actuate
-.H 6 "hej hopp"
-acuity
-acumen
-acute
-acyclic
-ad
-Ada
-adage
-adagio
-Adair
-Adam
-adamant
-Adams
-Adamson
-adapt
-adaptation
-adaptive
-add
-added
-addend
-addenda
-addendum
-addict
-Addis
-Addison
-addition
-additional
-additive
-addle
-address
-addressee
-Addressograph
-adduce
-Adelaide
-Adele
-Adelia
-Aden
-adenine
-adenoma
-adenosine
-adept
-adequacy
-adequate
-adhere
-adherent
-adhesion
-adhesive
-adiabatic
-adieu
-adipic
-Adirondack
-.H 7 "hej hopp"
-adjacent
-adject
-adjectival
-adjective
-adjoin
-adjoint
-adjourn
-adjudge
-adjudicate
-adjunct
-adjust
-adjutant
-Adkins
-Adler
-administer
-administrable
-administrate
-administratrix
-admiral
-admiralty
-admiration
-admire
-admissible
-admission
-admit
-admittance
-admitted
-admitting
-admix
-admixture
-admonish
-admonition
-ado
-adobe
-adolescent
-Adolph
-Adolphus
-Adonis
-adopt
-adoption
-adoptive
-adore
-adorn
-adposition
-adrenal
-adrenaline
-Adrian
-Adriatic
-Adrienne
-adrift
-adroit
-adsorb
-adsorbate
-adsorption
-adsorptive
-adulate
-adult
-adulterate
-adulterous
-adultery
-adulthood
-advance
-advantage
-advantageous
-advent
-adventitious
-adverse
-advert
-advertise
-advice
-advisable
-advise
-advisee
-advisor
-advisory
-advocacy
-advocate
-Aegean
-aegis
-Aeneas
-Aeneid
-aeolian
-Aeolus
-aerate
-aerial
-Aerobacter
-aerobic
-aerodynamic
-aerogene
-aeronautic
-aerosol
-aerospace
-Aeschylus
-aesthete
-aesthetic
-.H 1 "hej hopp"
-acuity
-acumen
-acute
-acyclic
-ad
-Ada
-adage
-adagio
-Adair
-Adam
-adamant
-Adams
-Adamson
-adapt
-adaptation
-adaptive
-add
-added
-addend
-addenda
-addendum
-addict
-Addis
-Addison
-addition
-additional
-additive
-addle
-address
-addressee
-Addressograph
-adduce
-Adelaide
-Adele
-Adelia
-Aden
-adenine
-adenoma
-adenosine
-adept
-adequacy
-adequate
-adhere
-adherent
-adhesion
-adhesive
-adiabatic
-adieu
-adipic
-Adirondack
-.H 2 "hej hopp"
-adjacent
-adject
-adjectival
-adjective
-adjoin
-adjoint
-adjourn
-adjudge
-adjudicate
-.H 2 "hej hopp"
-adjunct
-adjust
-adjutant
-Adkins
-Adler
-administer
-administrable
-administrate
-administratrix
-admiral
-admiralty
-admiration
-admire
-admissible
-admission
-admit
-admittance
-admitted
-admitting
-admix
-admixture
-admonish
-admonition
-ado
-adobe
-adolescent
-Adolph
-Adolphus
-Adonis
-adopt
-adoption
-adoptive
-adore
-adorn
-adposition
-adrenal
-adrenaline
-Adrian
-Adriatic
-Adrienne
-adrift
-adroit
-adsorb
-adsorbate
-adsorption
-adsorptive
-adulate
-adult
-adulterate
-adulterous
-adultery
-adulthood
-advance
-advantage
-advantageous
-advent
-adventitious
-adverse
-advert
-advertise
-advice
-advisable
-advise
-advisee
-advisor
-advisory
-advocacy
-advocate
-Aegean
-aegis
-Aeneas
-Aeneid
-aeolian
-Aeolus
-aerate
-aerial
-Aerobacter
-aerobic
-aerodynamic
-aerogene
-aeronautic
-aerosol
-aerospace
-Aeschylus
-aesthete
-aesthetic
-.RP 0 1
-.TC
diff --git a/contrib/groff/contrib/mm/examples/SETR b/contrib/groff/contrib/mm/examples/SETR
deleted file mode 100644
index 0a922415895e..000000000000
--- a/contrib/groff/contrib/mm/examples/SETR
+++ /dev/null
@@ -1,109 +0,0 @@
-.nr Cl 6
-.INITR setr
-.H 1 " granary grand grandchild grandchildren granddaughter grandeur"
-.SETR ref1
-.H 2 "grandfather grandiloquent grandiose grandma grandmother grandnephew"
-.H 2 "grandniece grandpa grandparent grandson grandstand granite granitic"
-.H 2 "granny granola grant grantee grantor granular granulate"
-.SETR ref2
-.H 2 "granule Granville grape"
-grant
-grantee
-grantor
-granular
-granulate
-.br
-granule
-.B
-REF 9:
-.GETHN ref9
-, page number
-.GETPN ref9
-.R
-Granville
-grape
-.br
-grapefruit
-grapevine
-graph
-grapheme
-graphic
-graphite
-\fBExhibit\fP
-.GETHN ex1
-
-grapple
-grasp
-grass
-grassland
-grassy
-grata
-grate
-.H 2 "grapefruit grapevine graph grapheme graphic graphite"
-.H 3 "grapple"
-.SETR ref3
-.H 3 "grasp grass grassland grassy grata grate grateful"
-.H 3 "grater gratify gratis gratitude"
-.H 4 "gratuitous gratuity grave"
-.H 4 "gravel graven"
-.SETR ref4
-.H 1 "Graves gravestone graveyard gravid gravitate gravy gray"
-.H 2 "graybeard grayish Grayson graywacke graze grease greasy great greatcoat"
-.H 2 "greater grebe Grecian Greece greed greedy Greek green Greenbelt Greenberg"
-.H 2 "Greenblatt Greenbriar Greene greenery"
-.SETR ref5
-.H 1 "Greenfield greengrocer greenhouse greenish Greenland Greensboro"
-.H 1 "greensward greenware Greenwich greenwood Greer greet"
-grant
-grantee
-.DS
-
-Advertisements contain the only truths to be relied on in a newspaper.
- -- Thomas Jefferson
-.EX fortune "" "" ex1
-.DE
-grantor
-granular
-.GETR ref1
-granulate
-granule
-.H 2 "Using variables"
-.B
-REF 2:
-.GETHN ref2 c
-.GETPN ref2 bbb
-\*c, page number \*[bbb]
-.R
-Granville
-grape
-grapefruit
-grapevine
-graph
-grapheme
-.H 2 "Greg gregarious Gregg Gregory gremlin grenade Grendel"
-.H 2 "Grenoble Gresham Greta Gretchen"
-.SETR ref6
-.H 2 "grew"
-.H 1 "grey greyhound greylag grid griddle gridiron grief"
-.H 1 "grievance grieve grievous griffin Griffith grill grille grilled grillwork"
-.H 3 "grim grimace Grimaldi grime Grimes Grimm grin grind grindstone"
-.H 3 "grip gripe grippe grisly grist gristmill Griswold grit"
-.SETR ref7
-.H 3 "gritty grizzle grizzly groan groat grocer grocery groggy groin"
-.H 1 "grommet groom groove grope grosbeak gross Grosset Grossman Grosvenor grotesque"
-.H 1 "Groton ground groundsel groundskeep groundwork group groupoid"
-.H 4 "grout grove grovel Grover grow growl grown grownup growth grub grubby"
-.H 4 "grudge gruesome gruff grumble Grumman grunt gryphon g's"
-.SETR ref8
-.H 4 "GSA GU Guam guanidine guanine guano guarantee guaranteeing guarantor"
-.H 4 "guaranty"
-.H 1 "guard guardhouse Guardia guardian Guatemala gubernatorial Guelph Guenther"
-.H 1 "guerdon guernsey guerrilla guess guesswork guest guffaw Guggenheim"
-.SETR ref9
-.H 1 "Guiana guidance guide guidebook guideline guidepost guiding"
-.H 1 "guignol"
-.GETR ref6
-.H 1 "guild guildhall guile Guilford guillemot guillotine guilt"
-.SETR ref10
-.H 1 "guilty guinea guise guitar gules gulf gull Gullah"
-.H 1 "gullet gullible gully gulp gum gumbo gumdrop gummy gumption"
diff --git a/contrib/groff/contrib/mm/groff_mm.man b/contrib/groff/contrib/mm/groff_mm.man
deleted file mode 100644
index 6af75c66de15..000000000000
--- a/contrib/groff/contrib/mm/groff_mm.man
+++ /dev/null
@@ -1,1897 +0,0 @@
-.\"
-.\" $Id: groff_mm.man,v 2.1 2001/04/13 09:03:52 wlemb Exp $
-.\"
-.de T2
-.ne 2v
-.ti -.5i
-\\$1
-.sp -1
-..
-.de T3
-.ne 2v
-.ti -.5i
-\fB\\$1\fP
-.br
-..
-.TH GROFF_MM @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-groff_mm \- groff mm macros
-.SH SYNOPSIS
-.B groff
-.B \-m@TMAC_M_PREFIX@m
-[
-.IR options .\|.\|.
-]
-[
-.IR files .\|.\|.
-]
-.SH DESCRIPTION
-The groff mm macros are intended to be compatible with the DWB mm macros
-with the following limitations:
-.TP
-.B \(bu
-no Bell Labs localisms implemented.
-.TP
-.B \(bu
-the macros OK and PM is not implemented.
-.TP
-.B \(bu
-groff mm does not support cut marks
-.LP
-\fBm@TMAC_M_PREFIX@m\fP is intended to be international. Therefore it is
-possible to write short national macrofiles which change all
-english text to the preferred language. Use \fBm@TMAC_M_PREFIX@mse\fP as an example.
-.\"########################################################################
-.LP
-A file called \fBlocale\fP or \fIlang\fP\fB_locale\fP is read
-after the initiation of the global variables. It is therefore
-possible to localize the macros with companyname and so on.
-.sp
-In this manual square brackets is used to show optional arguments.
-.sp 3
-\fBNumber registers and strings\fP
-.br
-Many macros can be controlled by number registers and strings.
-A number register is assigned with the \fBnr\fP command:
-.br
-\fB\&.nr\fP \fIXXX\fP \fI[+-]n [i]\fP
-.br
-\fBXXX\fP is the name of the register, \fBn\fP is the value to
-be assigned, and \fBi\fP is increment value for auto-increment.
-\fBn\fP can have a plus or minus sign as prefix if an increment
-or decrement of the current value is wanted. (Auto-increment or decrement
-occurs if the number register is used with a plus or minus sign,
-\fB\en+[XXX]\fP or \fB\en-[XXX]\fP.)
-.sp
-Strings is defined with \fBds\fP.
-.br
-\fB\&.ds\fP \fIYYY string\fP
-.br
-The string is assigned everything to the end of the line, even blanks.
-Initial blanks in \fIstring\fP should be prefixed with
-a double-quote. (Strings are used in the text as \fB\e*[YYY]\fP.)
-.sp
-\fBSpecial formatting of number registers\fP
-.br
-A number register is printed with normal digits if no format has been
-given.
-Set the format with \fBaf\fP:
-.br
-\fB\&.af\fP \fIR c\fP
-.br
-\fIR\fP is the name of the register, \fIc\fP is the format.
-.in +.5i
-.T2 \fBForm\fP
-\fBSequence\fP
-.T2 1
-0, 1, 2, 3, ...
-.T2 001
-000, 001, 002, 003, ...
-.T2 i
-0, i, ii, iii, iv, ...
-.T2 I
-0, I, II, III, IV, ...
-.T2 a
-0, a, b, c, ..., z, aa, ab, ...
-.T2 A
-0, A, B, C, ..., Z, AA, AB, ...
-.in
-
-.LP
-\fBMacros:\fP
-.TP
-.B ")E level text"
-Adds \fBtext\fP (heading-text) to the table of contents
-with \fBlevel\fP either 0
-or between 1-7. See also \fB.H\fP. This macro is used for customized
-table of contents.
-.TP
-.B "1C [1]"
-Begin one column processing. An \fB1\fP as argument disables the page-break.
-Use wide footnotes, small footnotes may be overprinted.
-.TP
-.B 2C
-Begin two column processing. Splits the page in two columns. It is
-a special case of \fBMC\fP. See also \fB1C\fP.
-.TP
-.B AE
-Abstract end, see \fBAS\fP.
-.TP
-.B "AF [name of firm]"
-Authors firm, should be called before \fBAU\fP, see also \fBCOVER\fP.
-.TP
-.B "AL [type [text-indent [1]]]"
-Start autoincrement list. Items are numbered beginning on one.
-The \fItype\fP argument controls the type of numbers.
-.in +.5i
-.T2 Arg
-Description
-.T2 1
-Arabic (the default)
-.T2 A
-Upper-case letters (A-Z)
-.T2 a
-Lower-case letters (a-z)
-.T2 I
-Upper-case roman
-.T2 i
-Lower-case roman
-.in
-\fIText-indent\fP sets the indent and overrides \fBLi\fP.
-A third argument will prohibit printing of a blank line before each
-item.
-.TP
-.B "APP name text"
-Begin an appendix with name \fIname\fP. Automatic naming occurs if
-\fIname\fP is "". The appendixes starts with \fBA\fP if auto is used.
-An new page is ejected, and a header is also produced if the number
-variable \fBAph\fP is non-zero. This is the default.
-The appendix always appear in the 'List of contents' with correct
-pagenumber. The name \fIAPPENDIX\fP can be changed by setting
-the string \fBApp\fP to the desired text.
-The string \fBApptxt\fP contains the current appendix text.
-.TP
-.B "APPSK name pages text"
-Same as \fB.APP\fP, but the pagenr is incremented with \fIpages\fP.
-This is used when diagrams or other non-formatted documents are
-included as appendixes.
-.TP
-.B "AS [arg [indent]]"
-Abstract start. Indent is specified in 'ens', but scaling is allowed.
-Argument \fIarg\fP controls where the abstract is printed.
-.in +.5i
-.T2 Arg
-Placement
-.T2 0
-Abstract will be printed on page 1 and on the cover sheet if
-used in the released-paper style (\fBMT 4\fP), otherwise
-it will be printed on page 1 without a cover sheet.
-.T2 1
-Abstract will only be printed on the cover sheet (\fBMT 4\fP only).
-.T2 2
-Abstract will be printed only on the cover sheet (other than \fBMT 4\fP only).
-The cover sheet is printed without need for \fBCS\fP.
-.in
-Abstract is not printed at all in external letters (\fBMT 5\fP).
-The \fIindent\fP controls the indentation of both margins, otherwise
-will normal text indent be used.
-.TP
-.B "AST [title]"
-Abstract title. Default is \fBABSTRACT\fP.
-Sets the text above the abstract text.
-.TP
-.B "AT title1 [title2 ...]"
-Authors title. \fBAT\fP must appear just after each \fBAU\fP.
-The title will show up after the name in the signature block.
-.TP
-.B "AU [name [initials [loc [dept [ext [room [arg [arg [arg]]]]]]]]]"
-Author information, specifies the author of the memo or paper, and
-will be printed on the cover sheet and on other similar places.
-\fBAU\fP must not appear before \fBTL\fP. The author information
-can contain initials, location, department, telephone extension,
-room number or name and up to three extra arguments.
-.TP
-.B "AV [name [1]]"
-Approval signature, generates an approval line with place for
-signature and date. The string \fBAPPROVED:\fP can be changed
-with variable \fBLetapp\fP, and the string \fBDate\fP in \fBLetdate\fP.
-.TP
-.B "AVL [name]"
-Letter signature, generates a line with place for signature.
-.TP
-.B "B [bold-text [prev-font-text [bold...]]]"
-Begin boldface.
-No limit on the number of arguments.
-All arguments will be concatenated to one word, the first, third and so
-on will be printed in boldface.
-.TP
-.B B1
-Begin box (as the ms macro).
-Draws a box around the text. The text will be indented one character,
-and the right margin will be one character shorter.
-.TP
-.B B2
-End box. Finish the box started by \fBB1\fP.
-.TP
-.B BE
-End bottom block, see \fBBS\fP.
-.TP
-.B "BI [bold-text [italic-text [bold-text [...]]]]"
-Bold-italic.
-No limit on the number of arguments, see \fBB\fP.
-.TP
-.B "BL [text-indent [1]]"
-Start bullet list, initialize a list with a bullet and a space
-in the beginning of each list item (see \fBLI\fP).
-\fIText-indent\fP
-overrides the default indentation of the list items set by
-number register \fBPi\fP.
-A third argument will prohibit printing of a blank line before each
-item.
-.TP
-.B "BR [bold-text [roman-text [bold-text [...]]]]"
-Bold-roman.
-No limit on the number of arguments.
-.TP
-.B BS
-Bottom block start. Begins the definition of a text block which is
-printed at the bottom of each page. Block ends with \fBBE\fP.
-.TP
-.B "BVL text-indent [mark-indent [1]]"
-Start of
-broken variable-item list.
-Broken variable-item list has no fixed mark, it assumes that
-every \fBLI\fP has a mark instead.
-The text will always begin at the next line after the mark.
-\fIText-indent\fP sets the indent to the text, and \fImark-indent\fP
-the distance from the current indent to the mark.
-A third argument will prohibit printing of a blank line before each
-item.
-.TP
-.B "COVER [arg]"
-\&\fBCOVER\fP begins a coversheet definition. It is important
-that \fB.COVER\fP appears before any normal text.
-\&\fB.COVER\fP uses \fIarg\fP to build the filename
-@TMAC_MDIR@/\fIarg\fP.cov. Therefore it is possible to create unlimited
-types of coversheets.
-\fIms.cov\fP is supposed to look like the \fBms\fP coversheet.
-\&\fB.COVER\fP requires a \fB.COVEND\fP at the end of the coverdefinition.
-Always use this order of the covermacros:
-.nf
-\&.COVER
-\&.TL
-\&.AF
-\&.AU
-\&.AT
-\&.AS
-\&.AE
-\&.COVEND
-.fi
-However, only \fB.TL\fP and \fB.AU\fP are required.
-.TP
-.B COVEND
-This finish the cover description and prints the cover-page.
-It is defined in the cover file.
-.TP
-.B DE
-Display end. Ends a block of text, display, that begins
-with \fBDS\fP or \fBDF\fP.
-.TP
-.B "DF [format [fill [rindent]]]"
-Begin floating display (no nesting allowed).
-A floating display is saved in a queue and is printed in the
-order entered. \fIFormat\fP, \fIfill\fP and \fIrindent\fP is the same
-as in \fBDS\fP.
-Floating displays are controlled by the two number registers \fBDe\fP
-and \fBDf\fP.
-.sp
-\fBDe register\fP
-.in +.5i
-.T2 0
-Nothing special, this is the default.
-.T2 1
-A page eject will occur after each printed display, giving only
-one display per page and no text following it.
-.in
-.sp
-\fBDf register\fP
-.in +.5i
-.T2 0
-Displays are printed at the end of each section (when section-page
-numbering is active) or at the end of the document.
-.T2 1
-A new display will be printed on the current page if there is enough
-space, otherwise it will be printed at the end of the document.
-.T2 2
-One display will be printed at the top of each page or column
-(in multi-column mode).
-.T2 3
-Print one display if there is enough space for it, otherwise it will
-be printed at the top of the next page or column.
-.T2 4
-Print as many displays that will fit in a new page or column.
-A page break will occur between each display if \fBDe\fP is not zero.
-.T2 5
-Fill the current page with displays and the rest beginning at a new page
-or column. (This is the default.)
-A page break will occur between each display
-if \fBDe\fP is not zero.
-.in
-.TP
-.B "DL [text-indent [1 [1]]]"
-Dash list start. Begins a list where each item is printed
-after a dash. \fIText-indent\fP changes the default indentation
-of the list items set by
-number register \fBPi\fP.
-A second argument prevents the empty line between each list item
-to be printed. See \fBLI\fP.
-A third argument will prohibit printing of a blank line before each
-item.
-.TP
-.B "DS [format [fill [rindent]]]"
-Static display start.
-Begins collection of text until \fBDE\fP.
-The text is printed together on the same page, unless it is longer
-than the height of the page.
-\fBDS\fP can be nested to a unlimited depth (reasonably :-).
-.sp
-\fBformat\fP
-.in +.5i
-.ds x "
-.T2 """"""
-No indentation.
-.T2 none
-No indentation.
-.T2 L
-No indentation.
-.T2 I
-Indent text with the value of number register \fBSi\fP.
-.T2 C
-Center each line
-.T2 CB
-Center the whole display as a block.
-.T2 R
-Right adjust the lines.
-.T2 RB
-Right adjust the whole display as a block
-.in
-.sp
-L, I, C and CB can also be specified as 0, 1, 2 or 3 for compatibility
-reasons. (Don't use it. :-)
-.sp
-\fBfill\fP
-.in +.5i
-.T2 """"""
-Line-filling turned off.
-.T2 none
-Line-filling turned off.
-.T2 N
-Line-filling turned off.
-.T2 F
-Line-filling turned on.
-.in
-.sp
-N and F can also be specified as 0 or 1.
-An empty line will normally be printed before and after the
-display. Setting number register \fBDs\fP to 0 will prevent this.
-\fIRindent\fP shortens the line length by that amount.
-.TP
-.B "EC [title [override [flag [refname]]]]"
-Equation title.
-Sets a title for an equation. The \fIoverride\fP argument
-change the numbering.
-.sp
-\fBflag\fP
-.in +.5i
-.T2 none
-\fIoverride\fP is a prefix to the number.
-.T2 0
-\fIoverride\fP is a prefix to the number.
-.T2 1
-\fIoverride\fP is a suffix to the number.
-.T2 2
-\fIoverride\fP replaces the number.
-.in
-\fBEC\fP uses the number register \fBEc\fP as counter.
-It is possible to use \fB.af\fP to change the format of the number.
-If number register \fBOf\fP is 1, then the format of title
-will use a dash instead of a dot after the number.
-.br
-The string \fBLe\fP controls the title of the
-List of Equations, default is \fILIST OF EQUATIONS\fP.
-The List of Equations will only be printed if number register \fBLe\fP
-is 1, default 0.
-The string \fBLiec\fP contains the word \fIEquation\fP, wich
-is printed before the number.
-If \fIrefname\fP is used, then the equation number is saved with
-\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP.
-.br
-Special handling of the title will occur if
-\fBEC\fP is used inside \fBDS\fP/\fBDE\fP, it will not be
-affected by the format of \fBDS\fP.
-.TP
-.B "EF [arg]"
-Even-page footer, printed just above the normal page footer
-on even pages, see \fBPF\fP.
-.TP
-.B "EH [arg]"
-Even-page header, printed just below the normal page header
-on even pages, see \fBPH\fP.
-.TP
-.B EN
-Equation end, see \fBEQ\fP.
-.TP
-.B EOP
-End of page user-defined macro. This macro will be called
-instead of the normal printing of the footer. The macro
-will be executed in a separate environment, without any
-trap active. See \fBTP\fP.
-.sp
-\fBStrings available to EOP\fP
-.in +.5i
-.T2 EOPf
-Argument from \fBPF\fP.
-.T2 EOPef
-Argument from \fBEF\fP.
-.T2 EOPof
-Argument from \fBOF\fP.
-.in
-.TP
-.B "EPIC width height [name]"
-\fBEPIC\fP draws a box with the given \fIwidth\fP and \fIheight\fP, it will
-also print the text \fIname\fP or a default string if
-\fIname\fP is not specified..
-This is used to include external pictures, just give the size
-of the picture.
-See \fBPIC\fP
-.TP
-.B "EQ [label]"
-Equation start.
-\fBEQ\fP/\fBEN\fP are the delimiters for equations written for \fBeqn\fP.
-\fBEQ\fP/\fBEN\fP must be inside a \fBDS\fP/\fBDE\fP-pair, except
-when \fBEQ\fP is only used to set options in \fBeqn\fP.
-The \fIlabel\fP will appear at the right margin of the equation, unless
-number register \fBEq\fP is 1. Then the label will appear at the
-left margin.
-.TP
-.B "EX [title [override [flag [refname]]]]"
-Exhibit title, arguments are the same as for \fBEC\fP.
-\fBEX\fP uses the number register \fBEx\fP as counter.
-The string \fBLx\fP controls the title of the
-List of Exhibits, default is \fILIST OF EXHIBITS\fP.
-The List of Exhibits will only be printed if number register \fBLx\fP
-is 1, default 1.
-The string \fBLiex\fP contains the word \fIExhibit\fP, which
-is printed before the number.
-If \fIrefname\fP is used, then the exhibit number is saved with
-\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP.
-.br
-Special handling of the title will occur if
-\fBEX\fP is used inside \fBDS\fP/\fBDE\fP, it will not be
-affected by the format of \fBDS\fP.
-.TP
-.B "FC [closing]"
-Prints \fIYours\ very\ truly,\fP as a formal closing of a letter or
-memorandum. The argument replaces the defualt string.
-The default is stored in string variable \fBLetfc\fP.
-.TP
-.B "FD [arg [1]]"
-Footnote default format.
-Controls the hyphenation (hyphen), right margin justification (adjust),
-indentation of footnote text (indent). It can also change the label
-justification (ljust).
-.sp
-.ne 14v
-.nf
-.ta .5i +.8i +.8i +.8i +.8i
-\fBarg hyphen adjust indent ljust\fP
-0 no yes yes left
-1 yes yes yes left
-2 no no yes left
-3 yes no yes left
-4 no yes no left
-5 yes yes no left
-6 no no no left
-7 yes no no left
-8 no yes yes right
-9 yes yes yes right
-10 no no yes right
-11 yes no yes right
-.sp
-.fi
-.DT
-Argument greater than or equal to 11 is considered as arg 0.
-Default for m@TMAC_M_PREFIX@m is 10.
-.TP
-.B FE
-Footnote end.
-.TP
-.B "FG [title [override [flag [refname]]]]"
-Figure title, arguments are the same as for \fBEC\fP.
-\fBFG\fP uses the number register \fBFg\fP as counter.
-The string \fBLf\fP controls the title of the
-List of Figures, default is \fILIST OF FIGURES\fP.
-The List of Figures will only be printed if number register \fBLf\fP
-is 1, default 1.
-The string \fBLifg\fP contains the word \fIFigure\fP, wich
-is printed before the number.
-If \fIrefname\fP is used, then the figure number is saved with
-\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP.
-.br
-Special handling of the title will occur if
-\fBFG\fP is used inside \fBDS\fP/\fBDE\fP, it will not be
-affected by the format of \fBDS\fP.
-.TP
-.B "FS [label]"
-Footnote start.
-The footnote is ended by \fBFE\fP. Footnotes is normally automatically
-numbered, the number is available in string \fBF\fP.
-Just add \fB\e*F\fP in the text. By adding \fIlabel\fP, it is possible
-to have other number or names on the footnotes.
-Footnotes in displays is now possible.
-An empty line separates footnotes, the height of the line
-is controlled by number register \fBFs\fP, default value is 1.
-.TP
-.B "GETHN refname [varname]"
-Includes the headernumber where the corresponding \fBSETR\fP \fIrefname\fP
-was placed. Will be X.X.X. in pass 1. See \fBINITR\fP.
-If \fIvarname\fP is used, \fBGETHN\fP sets the stringvariable \fIvarname\fP to the
-headernumber.
-.TP
-.B "GETPN refname [varname]"
-Includes the pagenumber where the corresponding \fBSETR\fP \fIrefname\fP
-was placed. Will be 9999 in pass 1. See \fBINITR\fP.
-If \fIvarname\fP is used, \fBGETPN\fP sets the stringvariable \fIvarname\fP
-to the pagenumber.
-.TP
-.B "GETR refname"
-Combines \fBGETHN\fP and \fBGETPN\fP with the text 'chapter' and ', page'.
-The string \fIQrf\fP contains the text for reference:
-.ti +.5i
-\&.ds Qrf See chapter \e\e*[Qrfh], page \e\e*[Qrfp].
-.br
-\fIQrf\fP may be changed to support other languages.
-Strings \fIQrfh\fP and \fIQrfp\fP are set by \fBGETR\fP
-and contains the page and headernumber.
-.TP
-.B "GETST refname [varname]"
-Includes the string saved with the second argument to \fB.SETR\fP.
-Will be dummystring in pass 1.
-If varname is used, \fBGETST\fP sets the stringvariable \fIvarname\fP to the
-saved string. See \fBINITR\fP.
-.TP
-.B "H level [heading-text [heading-suffix]]"
-Numbered section heading.
-Section headers can have a level between 1 and 7, level 1 is the
-top level. The text is given in \fIheading-text\fP, and must be
-surrounded by double quotes if it contains spaces.
-\fBHeading-suffix\fP is added to the header in the text but not in
-the table of contents. This is normally used for footnote marks
-and similar things. Don't use \fB\e*F\fP in \fIheading-suffix\fP, it won't
-work. A manual label must be used, see \fBFS\fP.
-.sp
-An eventual paragraph, \fBP\fP, directly after \fBH\fP will be
-ignored, \fBH\fP is taking care of spacing and indentation.
-.sp
-\fBPage ejection before heading\fP
-.br
-Number register \fBEj\fP controls page ejection before the heading.
-Normally, a level one heading gets two blank lines before it, higher levels
-gets only one. A new page is ejected before each
-first-level heading if number register \fBEj\fP is 1.
-All levels below or equal the value of \fBEj\fP gets a new page.
-Default value for \fBEj\fP is 0.
-.sp
-\fBHeading break level\fP
-.br
-A line break occurs after the heading if the heading level is less
-or equal to number register \fBHb\fP.
-Default value 2.
-.sp
-\fBHeading space level\fP
-.br
-A blank line is inserted after the heading if the heading level is less
-or equal to number register \fBHs\fP.
-Default value 2.
-.sp
-Text will follow the heading on the same line if the level is greater
-than both \fBHb\fP and \fBHs\fP.
-.sp
-\fBPost-heading indent\fP
-.br
-Indentation of the text after the heading is controlled by number
-register \fBHi\fP, default value 0.
-.sp
-\fBHi\fP
-.in +.5i
-.T2 0
-The text will be left-justified.
-.T2 1
-Indentation of the text will follow the value of number register \fBPt\fP,
-see \fBP\fP.
-.T2 2
-The text will be lined up with the first word of the heading.
-.in
-.sp
-\fBCentered section headings\fP
-.br
-All headings whose level is equal or below number register \fBHc\fP
-and also less than or equal to \fBHb\fP or \fBHs\fP
-is centerered.
-.sp
-\fBFont control of the heading\fP
-.br
-The font of each heading level is controlled by string \fBHF\fP.
-It contains a fontnumber or fontname for each level. Default
-is \fB2\ 2\ 2\ 2\ 2\ 2\ 2\fP (all headings in italic).
-Could also be written as \fBI\ I\ I\ I\ I\ I\ I\fP.
-All omitted values are presumed to be a 1.
-.sp
-\fBPoint size control\fP.
-.br
-String \fBHP\fP controls the pointsize of each heading, in the
-same way as \fBHF\fP controls the font.
-A value of 0 selects the default point size.
-Default value is \fB0\ 0\ 0\ 0\ 0\ 0\ 0\fP. Beware that only the
-point size changes, not the vertical size.
-That can be controlled by the user specified macro \fBHX\fP and/or
-\fBHZ\fP.
-.sp
-\fBHeading counters\fP
-.br
-Seven number registers, named \fBH1\fP thru \fBH7\fP contains
-the counter for each heading level.
-The values are printed using arabic numerals, this can be changed
-with the macro \fBHM\fP (see below).
-All marks are concatenated before printing. To avoid this, set
-number register \fBHt\fP to 1. That will only print the current
-heading counter at each heading.
-.sp
-\fBAutomatic table of contents\fP
-.br
-All headings whose level is equal or below number register \fBCl\fP
-is saved to be printed in the table of contents. Default value is 2.
-.sp
-\fBSpecial control of the heading, user-defined macros\fP.
-.br
-These macros can be defined by the user to get a finer control
-of vertical spacing, fonts or other features.
-Argument \fIlevel\fP is the level-argument to \fBH\fP, but
-0 for unnumbered headings (see \fBHU\fP).
-Argument \fIrlevel\fP is the real level, it is
-set to number register \fBHu\fP for unnumbered headings.
-Argument \fIheading-text\fP is the text argument to \fBH\fP and \fBHU\fP.
-.sp
-\fBHX\ \fP\fIlevel\ rlevel\ heading-text\fP
-.br
-\fBHX\fP is called just before the printing of the heading.
-The following register is available for \fBHX\fP.
-\fBHX\fP may alter \fB}0\fP, \fB}2\fP and \fB;3\fP.
-.in +.5i
-.T3 "string }0"
-Contains the heading mark plus two spaces if \fIrlevel\fP is non-zero,
-otherwise empty.
-.T3 "register ;0"
-Contains the position of the text after the heading.
-0 means that the text should follow the heading on the same line, 1
-means that a line break should occur before the text and
-2 means that a blank line should separate the heading and the text.
-.T3 "string }2"
-Contains two spaces if register \fB;0\fP is 0. It is used to
-separate the heading from the text. The string
-is empty if \fB;0\fP is non-zero.
-.T3 "register ;3"
-Contains the needed space in units after the heading.
-Default is 2v.
-
-Can be used to change things like numbering (\fB}0\fP),
-vertical spacing (\fB}2\fP)
-and the needed space after the heading.
-.in
-.sp
-\fBHY\ \fP\fIdlevel\ rlevel\ heading-text\fP
-.br
-\fBHY\fP is called after size and font calculations and
-might be used to change indentation.
-.sp
-\fBHZ\ \fP\fIdlevel\ rlevel\ heading-text\fP
-.br
-\fBHZ\fP is called after the printing of the heading, just before
-\fBH\fP or \fBHU\fP exits.
-Could be used to change the page header according to the section heading.
-.TP
-.B "HC [hyphenation-character]"
-Set hyphenation character.
-Default value is \e%.
-Resets to the default if called without argument.
-Hyphenation can be turned off by setting number
-register \fBHy\fP to 0 in the beginning of the file.
-.TP
-.B "HM [arg1 [arg2 [... [arg7]]]]"
-Heading mark style.
-Controls the type of marking for printing of the heading counters.
-Default is 1 for all levels.
-.sp
-\fBArgument\fP
-.in +.5i
-.T2 1
-Arabic numerals.
-.T2 0001
-Arabic numerals with leading zeroes, one or more.
-.T2 A
-Upper-case alphabetic
-.T2 a
-Lower-case alphabetic
-.T2 I
-Upper-case roman numerals
-.T2 i
-lower-case roman numerals
-.T2 \fIempty\fP
-Arabic numerals.
-.in
-.TP
-.B "HU heading-text"
-Unnumbered section header.
-\fBHU\fP behavies like \fBH\fP at the level in number register \fBHu\fP.
-See \fBH\fP.
-.TP
-.B "HX dlevel rlevel heading-text"
-Userdefined heading exit.
-Called just before printing the header.
-See \fBH\fP.
-.TP
-.B "HY dlevel rlevel heading-text"
-Userdefined heading exit.
-Called just before printing the header.
-See \fBH\fP.
-.TP
-.B "HZ dlevel rlevel heading-text"
-Userdefined heading exit.
-Called just after printing the header.
-See \fBH\fP.
-.TP
-.B "I [italic-text [prev-font-text [italic-text [...]]]]"
-Italic.
-Changes the font to italic if called without arguments.
-With one argument it will set the word in italic.
-With two argument it will concatenate them and set the first
-word in italic and the second in the previous font.
-There is no limit on the number of argument, all will be concatenated.
-.TP
-.B "IA [addressee-name [title]]"
-Begins specification of the addressee and addressee's address in
-letter style.
-Several names can be specified with empty \fBIA\fP/\fBIE\fP-pairs, but
-only one address.
-See \fBLT\fP.
-.TP
-.B "IB [italic-text [bold-text [italic-text [...]]]]"
-Italic-bold.
-Even arguments is printed in italic, odd in boldface.
-See \fBI\fP.
-.TP
-.B IE
-Ends the address-specification after \fPIA\fP.
-.TP
-.B "INITI type filename [macro]"
-Initialize the new index system, sets the filename to collect
-index lines in with \fBIND\fP. Argument \fItype\fP selects
-the type of index, page number, header marks or both.
-The default is \fIN\fP.
-
-It is also possible to create a macro that is responsible
-for formatting each row. Add the name of the macro as argument 3.
-The macro will be called with the index as argument(s).
-.sp
-\fBtype\fP
-.in +.5i
-.T2 N
-Page numbers
-.T2 H
-Header marks
-.T2 B
-Both page numbers and header marks, tab separated
-.in
-.TP
-.B "INITR filename"
-Initialize the refencemacros. References will be written to
-\fIfilename.tmp\fP and \fIfilename.qrf\fP. Requires two passes with groff.
-The first looks for references and the second includes them.
-\fBINITR\fP can be used several times, but it is only the first
-occurrence of \fBINITR\fP that is active.
-Option \fB-U\fP might be needed if \fBunsafe\fP-errors occur.
-See also \fBSETR\fP, \fBGETPN\fP and \fBGETHN\fP.
-.TP
-.B "IND arg1 [arg2 [...]]"
-\fBIND\fP writes a line in the index file selected by \fBINITI\fP
-with all arguments and the page number or header mark separated by tabs.
-.in +.5i
-\fBExamples\fP
-.br
-arg1\etpage number
-.br
-arg1\etarg2\etpage number
-.br
-arg1\etheader mark
-.br
-arg1\etpage number\etheader mark
-.in
-.TP
-.B "INDP"
-\fBINDP\fP prints the index by running the command specified
-by string variable \fBIndcmd\fP, normally \fIsort\ -t\et\fP.
-\fBINDP\fP reads the output from the command to form
-the index, normally in two columns (can be changed by defining \fBTYIND\fP).
-The index is printed with string variable \fBIndex\fP as header,
-default is \fBINDEX\fP. One-column processing is
-returned after the list. \fBINDP\fP will call the
-user-defined macros \fBTXIND\fP, \fBTYIND\fP and \fBTZIND\fP if defined.
-\fBTXIND\fP is called before printing \fBINDEX\fP, \fBTYIND\fP
-is called instead of printing \fBINDEX\fP. \fBTZIND\fP is called
-after the printing and should take care of restoring to normal
-operation again.
-.TP
-.B "ISODATE [0]"
-\fBISODATE\fP changes the predefined date string in \fBDT\fP to
-ISO-format, ie YYYY-MM-DD. This can also be done by
-adding \fB-rIso=1\fP on the command line.
-Reverts to old date format if argument is \fB0\fP.
-.TP
-.B "IR [italic-text [roman-text [italic-text [...]]]]"
-Italic-roman.
-Even arguments is printed in italic, odd in roman.
-See \fBI\fP.
-.TP
-.B "LB text-indent mark-indent pad type [mark [LI-space [LB-space]]]"
-List begin macro.
-This is the common macro used for all lists.
-\fIText-indent\fP is the number of spaces to indent the text from the
-current indent.
-.sp
-\fIPad\fP and \fImark-indent\fP controls where to put the mark.
-The mark is placed within the mark area, and \fImark-indent\fP
-sets the number of spaces before this area. It is normally 0.
-The mark area ends where the text begins. The start of the text
-is still controlled by \fItext-indent\fP.
-.sp
-The mark is left justified whitin the mark area if \fIpad\fP is 0.
-If \fIpad\fP is greater than 0, then \fImark-indent\fP is ignored, and
-the mark is placed \fIpad\fP spaces before the text.
-This will right justify the mark.
-.sp
-If \fItype\fP is 0 the list will have either a hanging indent or, if
-argument \fImark\fP is given, the string \fImark\fP as mark.
-.sp
-If \fItype\fP is greater than 0 automatic numbering will occur, arabic
-if \fImark\fP is empty. \fIMark\fP can then be any of \fB1\fP, \fBA\fP,
-\fBa\fP, \fBI\fP or \fBi\fP.
-.sp
-\fIType\fP selects one of six possible ways to display the mark.
-.br
-\fBtype\fP
-.in +.6i
-.T2 1
-x.
-.T2 2
-x)
-.T2 3
-(x)
-.T2 4
-[x]
-.T2 5
-<x>
-.T2 6
-{x}
-.in
-.sp
-Every item in the list will get \fILI-space\fP number of blank lines
-before them. Default is 1.
-.sp
-\fBLB\fP itself will print \fILB-space\fP blank lines. Default is 0.
-.TP
-.B "LC [list-level]"
-List-status clear.
-Terminates all current active lists down to \fIlist-level\fP, or 0
-if no argmuent is given. This is used by \fBH\fP to clear any
-active list.
-.TP
-.B "LE [1]"
-List end.
-Terminate the current list. \fBLE\fP outputs a blank line
-if an argument is given.
-.TP
-.B "LI [mark [1]]"
-List item precedes every item in a list. Without argument \fBLI\fP
-will print the mark determined by the current list type. By giving
-\fBLI\fP one argument, it will use that as the mark instead.
-Two arguments to \fBLI\fP will make \fImark\fP a prefix to
-the current mark.
-There will be no separating space between the prefix
-and the mark if the second argument is \fB2\fP instead of \fB1\fP.
-This behaviour can also be achieved by setting number register
-\fBLimsp\fP to zero.
-A zero length \fImark\fP will make a hanging
-indent instead.
-.sp
-A blank line is normally printed before the list item. This behaviour
-can be controlled by number register \fBLs\fP. Pre-spacing
-will occur for each list-level less than or equal to \fBLs\fP.
-Default value is 99. (Nesting of lists is unlimited. :-)
-.sp
-The indentation can be changed thru number register \fBLi\fP.
-Default is 6.
-.sp
-All lists begins with a list initialization macro, \fBLB\fP.
-There are, however, seven predefined listtypes to
-make lists easier to use. They all call \fBLB\fP with different
-default values.
-.in +.5i
-.T2 \fBAL\fP
-Automatically Incremented List
-.T2 \fBML\fP
-Marked List
-.T2 \fBVL\fP
-Variable-Item List
-.T2 \fBBL\fP
-Bullet List
-.T2 \fBDL\fP
-Dash List
-.T2 \fBRL\fP
-Reference List
-.T2 \fBBVL\fP
-Broken Varable List.
-.in
-These lists are described at other places in this manual. See also \fBLB\fP.
-.TP
-.B "LT [arg]"
-Formats a letter in one of four different styles depending
-on the argument.
-See also \fBINTERNALS\fP.
-.in +.5i
-.T2 \fBArg
-Style\fP
-.T2 BL
-Blocked. Date line, return address, writer's address and closing
-begins at the center of the line. All other lines begin at the left margin.
-.T2 SB
-Semi-blocked. Same as blocked, except that the first line in every
-paragraph is indented five spaces.
-.T2 FB
-Full-blocked. All lines begin at the left margin.
-.T2 SP
-Simplified. Almost the same as the full-blocked style. Subject and
-the writer's identification are printed in all-capital.
-.in
-.TP
-.B "LO type [arg]"
-Specify options in letter (see \fB.LT\fP).
-This is a list of the standard options:
-.in +.5i
-.T2 CN
-Confidential notation. Prints \fBCONFIDENTIAL\fP on the second line
-below the date line. Any argument replaces \fBCONFIDENTIAL\fP.
-See also string variable \fBLetCN\fP.
-.T2 RN
-Reference notation. Prints \fBIn reference to:\fP and the argument
-two lines below the date line.
-See also string variable \fBLetRN\fP.
-.T2 AT
-Attention. Prints \fBATTENTION:\fP and the argument below the inside address.
-See also string variable \fBLetAT\fP.
-.T2 SA
-Salutation. Prints \fBTo Whom It May Concern:\fP or the argument if
-it was present. The salutation is printed two lines below the inside address.
-See also string variable \fBLetSA\fP.
-.T2 SJ
-Subject line. Prints the argument as subject prefixed with \fBSUBJECT:\fP
-two lines below the inside address, except in letter type \fBSP\fP.
-Then the subject is printed in all-captial without any prefix.
-See also string variable \fBLetSJ\fP.
-.in
-.TP
-.B "MC column-size [column-separation] "
-Begin multiple columns. Return to normal with \fB1C\fP.
-\fBMC\fP will create as many columns as the current line length permits.
-\fIColumn-size\fP is the width of each column, and \fIcolumn-separation\fP
-is the space between two columns. Default separation is the
-column-size/15.
-See also \fB1C\fP.
-.TP
-.B "ML mark [text-indent [1]]"
-Marked list start. The \fImark\fP argument will be printed before
-each list item.
-\fIText-indent\fP sets the indent and overrides \fBLi\fP.
-A third argument will prohibit printing of a blank line before each
-item.
-.TP
-.B "MT [arg [addressee]]"
-Memorandum type.
-The \fIarg\fP is part of a filename in \fI@TMAC_MDIR@/*.MT\fP.
-Memorandum type 0 thru 5 are supported, including \fI"string"\fP.
-\fIAddressee\fP just sets a variable, used in the AT&T macros.
-.br
-\fBarg\fP
-.in +.5i
-.T2 0
-Normal memorandum, no type printed
-.T2 1
-Memorandum with \fIMEMORANDUM FOR FILE\fP printed
-.T2 2
-Memorandum with \fIPROGRAMMER'S NOTES\fP printed
-.T2 3
-Memorandum with \fIENGINEER'S NOTES\fP printed
-.T2 4
-Released paper style
-.T2 5
-External letter style
-.in
-See also \fBCOVER\fP/\fBCOVEND\fP, a more flexible type of front page.
-.TP
-.B "MOVE y-pos [x-pos [line-length]]"
-Move to a position, pageoffset set to \fIx-pos\fP.
-If \fIline-length\fP is not given, the difference between
-current and new pageoffset is used.
-Use \fBPGFORM\fP without arguments to return to normal.
-.TP
-.B "MULB cw1 space1 [cw2 space2 [cw3 ...]]"
-Begin a special multi-column mode. Every columns width must be specified.
-Also the space between the columns must be specified. The last column
-does not need any space-definition. \fBMULB\fP starts a diversion and \fBMULE\fP
-ends the diversion and prints the columns.
-The unit for width and space is 'n', but \fBMULB\fP accepts all
-normal unitspecifications like 'c' and 'i'.
-\fBMULB\fP operates in a separate environment.
-.TP
-.B "MULN"
-Begin the next column. This is the only way to switch column.
-.TP
-.B "MULE"
-End the multi-column mode and print the columns.
-.TP
-.B "nP [type]"
-Print numbered paragraph with header level two. See \fB.P\fP.
-.TP
-.B "NCOL"
-Force printing to the next column, don't use this together with
-the \fBMUL*\fP macros, see \fB2C\fP.
-.TP
-.B "NS [arg [1]]"
-Prints different types of notations. The argument selects between
-the predefined type of notations. If the second argument is available,
-then the argument becomes the entire notation.
-If the argument doesn't exist in the predefined, it will be
-printed as \fBCopy (\fP\fIarg\fP\fB) to\fP.
-It is possible to add more standard notations, see the string variable
-\fBLetns\fP and \fBLetnsdef\fP.
-.nf
-.in +.5i
-.T2 \fBArg
-Notation\fP
-.T2 \fInone\fP
-Copy To
-.T2 """""
-Copy To
-.T2 1
-Copy To (with att.) to
-.T2 2
-Copy To (without att.) to
-.T2 3
-Att.
-.T2 4
-Atts.
-.T2 5
-Enc.
-.T2 6
-Encs.
-.T2 7
-Under separate cover
-.T2 8
-Letter to
-.T2 9
-Memorandum to
-.T2 10
-Copy (with atts.) to
-.T2 11
-Copy (without atts.) to
-.T2 12
-Abstract Only to
-.T2 13
-Complete Memorandum to
-.T2 14
-CC
-.in
-.fi
-.TP
-.B "ND new-date"
-New date. Override the current date. Date is not
-printed if \fInew-date\fP is an empty string.
-.TP
-.B "OF [arg]"
-Odd-page footer, a line printed just above the normal footer.
-See \fBEF\fP and \fBPF\fP.
-.TP
-.B "OH [arg]"
-Odd-page header, a line printed just below the normal header.
-See \fBEH\fP and \fBPH\fP.
-.TP
-.B OP
-Make sure that the following text is printed at the top
-of an odd-numbered page. Will not output an empty page
-if currently at the top of an odd page.
-.TP
-.B "P [type]"
-Begin new paragraph.
-\fBP\fP without argument will produce left justified text, even
-the first line of the paragraph. This is the same as setting
-\fItype\fP to 0. If the argument is 1, then the first line
-of text following \fBP\fP will be indented by the number of
-spaces in number register \fBPi\fP, normally 5.
-.sp
-Instead of giving 1 as argument to \fBP\fP it is possible to set the
-paragraph type in number register \fBPt\fP. Using 0 and 1
-will be the same as adding that value to \fBP\fP.
-A value of 2 will indent all paragraphs, except after
-headings, lists and displays.
-.sp
-The space between two paragraphs is controlled by number register \fBPs\fP,
-and is 1 by default (one blank line).
-.TP
-.B "PGFORM [linelength [pagelength [pageoffset [1]]]]"
-Sets linelength, pagelength and/or pageoffset.
-This macro can be used for special formatting, like letterheads
-and other.
-It is normally the first command in a file, though it's not necessary.
-\fBPGFORM\fP can be used without arguments
-to reset everything after a \fBMOVE\fP.
-A line-break is done unless the fourth argument is given.
-This can be used to avoid the pagenumber on the first page while setting
-new width and length.
-(It seems as if this macro sometimes doesn't work too well.
-Use the command line arguments
-to change linelength, pagelength and pageoffset instead. Sorry.)
-.TP
-.B PGNH
-No header is printed on the next page. Used to get rid of
-the header in letters or other special texts.
-This macro must be used before any text to inhibit the pageheader
-on the first page.
-.TP
-.B PIC [-L] [-C] [-R] [-I n] filename [width [height]]
-\fBPIC\fP includes a Postscript file in the document.
-The macro depends on \fBmmroff\fP and \fBINITR\fP.
-\fB-L\fP, \fB-C\fP, \fB-R\fP and \fB-I n\fP adjusts the picture
-or indents it. The optionally \fIwidth\fP and \fIheight\fP
-can also be given to resize the picture.
-.TP
-.B PE
-Picture end.
-Ends a picture for \fB@TMAC_M_PREFIX@pic\fP, see the manual for \fB@TMAC_M_PREFIX@pic\fP.
-.TP
-.B "PF [arg]"
-Page footer.
-\fBPF\fP sets the line to be printed at the bottom of each page.
-Normally empty. See \fBPH\fP for the argument specification.
-.TP
-.B "PH [arg]"
-Page header, a line printed at the top of each page.
-The argument should be specified as "'left-part'center-part'right-part'",
-where left-, center- and right-part is printed left-justified, centered
-and right justified. The character \fB%\fP is changed to the current
-page number. The default page-header is "''- % -''", the page
-number between two dashes.
-.TP
-.B PS
-Picture start (from pic). Begins a picture for \fB@g@pic\fP, see
-the manual.
-.TP
-.B PX
-Page-header user-defined exit.
-\fBPX\fP is called just after the printing of the page header
-in \fIno-space\fP mode.
-.TP
-.B R
-Roman.
-Return to roman font, see also \fBI\fP.
-.TP
-.B "RB [roman-text [bold-text [roman-text [...]]]]"
-Roman-bold.
-Even arguments is printed in roman, odd in boldface.
-See \fBI\fP.
-.TP
-.B "RD [prompt [diversion [string]]]"
-Read from standard input to diversion and/or string.
-The text will be saved in a diversion named \fIdiversion\fP.
-Recall the text by writing the name of the diversion after a dot
-on an empty line. A string will also be defined if
-\fIstring\fP is given. \fIDiversion\fP and/or \fIprompt\fP can
-be empty ("").
-.TP
-.B RF
-Reference end. Ends a reference definition and returns to normal
-processing. See \fBRS\fP.
-.TP
-.B "RI [roman-text [italic-text [roman-text [...]]]]"
-Even arguments are printed in roman, odd in italic.
-See \fBI\fP.
-.TP
-.B "RL [text-indent [1]]"
-Reference list start.
-Begins a list where each item is preceded with a automatically
-incremented number between
-square brackets.
-\fIText-indent\fP changes the default indentation.
-.TP
-.B "RP [arg1 [arg2]]"
-Produce reference page.
-\fBRP\fP can be used if a reference page is wanted somewhere in the
-document. It is not needed if \fBTC\fP is used to produce
-a table of content. The reference page will then be printed automatically.
-.sp
-The reference counter will not be reset if \fIarg1\fP is 1.
-.sp
-\fIArg2\fP tells \fBRP\fP whether to eject a page or not.
-.br
-\fBArg2\fP
-.in +.5i
-.T2 0
-The reference page will be printed on a separate page.
-This is
-the default.
-.T2 1
-Do not eject page after the list.
-.T2 2
-Do not eject page before the list.
-.T2 3
-Do not eject page before and after the list.
-.in
-The reference items will be separated by a blank line.
-Setting number register \fBLs\fP to 0 will suppress the line.
-.sp
-The string \fBRp\fP contains the reference page title and
-is normally set to \fIREFERENCES\fP.
-.TP
-.B "RS [string-name]"
-\fBRS\fP begins an automatically numbered reference definition.
-Put the string \fB\e*(Rf\fP where the reference mark
-should be and write the reference between \fBRS\fP/\fBRF\fP
-at next new line after the reference mark. The reference number
-is stored in number register \fB:R\fP.
-If \fIstring-name\fP is given, a string with that name
-will be defined and contain the current reference mark.
-The string can be referenced as \fB\e*[\fIstring-name\fP]\fP later in
-the text.
-.TP
-.B "S [size [spacing]]"
-Set point size and vertical spacing. If any argument is equal 'P', then
-the previous value is used. A 'C' means current value, and 'D' default value.
-If '+' or '-' is used before the value, then increment or decrement of
-the current value will be done.
-.TP
-.B "SA [arg]"
-Set right-margin justification.
-Justification is normally turned on.
-No argumenent or \fB0\fP turns off justification, a \fB1\fP turns on
-justification.
-.TP
-.B "SETR refname [string]"
-Remember the current header and page-number as \fIrefname\fP.
-Saves \fIstring\fP if \fIstring\fP is defined. \fIstring\fP is retrieved
-with \fB.GETST\fP.
-See \fBINITR\fP.
-.TP
-.B "SG [arg [1]]"
-Signature line. Prints the authors name(s) after the formal closing.
-The argument will be appended to the reference data, printed
-at either the first or last author. The reference data is the location,
-department and initials specified with \fB.AU\fP.
-It will be printed at the first author if the second argument is given,
-otherwise at the last.
-No reference data will be printed if the author(s) is specifed
-thru \fB.WA\fP/\fB.WE\fP.
-See \fBINTERNALS\fP.
-.TP
-.B "SK [pages]"
-Skip pages.
-If \fIpages\fP is \fB0\fP or omitted, a skip to the next page
-will occur unless it is already at the top of a page.
-Otherwise it will skip \fIpages\fP pages.
-.TP
-.B "SM string1 [string2 [string3]]"
-Make a string smaller.
-If \fIstring2\fP is given, \fIstring1\fP will be smaller and \fIstring2\fP
-normal, concatenated with \fIstring1\fP. With three argument, all is
-concatenated, but only \fIstring2\fP is made smaller.
-.TP
-.B "SP [lines]"
-Space vertically. \fIlines\fP can have any scalingfactor, like \fI3i\fP or
-\fI8v\fP. Several \fBSP\fP in a line will only produce the
-maximum number of lines, not the sum. \fBSP\fP will also be ignored
-until the first textline in a page. Add a \fB\e&\fP before \fBSP\fP
-to avoid this.
-.TP
-.B TAB
-reset tabs to every 5n. Normally used to reset any previous tabpositions.
-.TP
-.B "TB [title [override [flag [refname]]]]"
-Table title, arguments are the same as for \fBEC\fP.
-\fBTB\fP uses the number register \fBTb\fP as counter.
-The string \fBLt\fP controls the title of the
-List of Tables, default is \fILIST OF TABLES\fP.
-The List of Tables will only be printed if number register \fBLt\fP
-is 1, default 1.
-The string \fBLitb\fP contains the word \fITABLE\fP, wich
-is printed before the number.
-.br
-Special handling of the title will occur if
-\fBTB\fP is used inside \fBDS\fP/\fBDE\fP, it will not be
-affected by the format of \fBDS\fP.
-.TP
-.B "TC [slevel [spacing [tlevel [tab [h1 [h2 [h3 [h4 [h5]]]]]]]]]"
-Table of contents.
-This macro is normally used at the last line of the document.
-It generates a table of contents with headings up to the level
-controlled by number register \fBCl\fP. Note that \fBCl\fP controls
-the saving of headings, it has nothing to do with \fBTC\fP.
-Headings with level less than or equal to \fIslevel\fP will get
-\fIspacing\fP number of lines before them.
-Headings with level less than or equal to \fItlevel\fP will have
-their page numbers right justified with dots or spaces separating
-the text and the page number. Spaces is used if \fItab\fP
-is greater than zero, otherwise dots.
-Other headings will have the
-page number directly at the end of the heading text (\fIragged right\fP).
-.sp
-The rest of the arguments will be printed, centered, before the
-table of contents.
-.sp
-The user-defined macros \fBTX\fP and \fBTY\fP are used if \fBTC\fP is called
-with at most four arguments. \fBTX\fP is called before the printing
-of \fICONTENTS\fP, and \fBTY\fP is called instead of printing \fICONTENTS\fP.
-.sp
-Equivalent macros can be defined for list of figures, tables, equations
-and excibits by defining \fBTXxx\fP or \fBTYxx\fP, where \fBxx\fP
-is \fBFg\fP, \fBTB\fP, \fBEC\fP or \fBEX\fP.
-.sp
-String \fBCi\fP can be set to control the indentations for each heading-level.
-It must be scaled, like \fB.ds\ Ci\ .25i\ .5i\ .75i\ 1i\ 1i\fP.
-The indentation is normally controlled by the maxlength of headings
-in each level.
-.sp
-All texts can be redefined, new stringvariables
-\fILifg\fP, \fILitb\fP, \fILiex\fP, \fILiec\fP and \fILicon\fP contain
-"Figure", "TABLE", "Exhibit", "Equation" and "CONTENTS".
-These can be redefined to other languages.
-.TP
-.B TE
-Table end. See \fBTS\fP.
-.TP
-.B "TH [N]"
-Table header. See \fBTS\fP.
-\fBTH\fP ends the header of the table. This header will
-be printed again if a page-break occurs.
-Argument \fIN\fP isn't implemented yet.
-.TP
-.B TL [charging-case number(s) [filing-case number(s)]]
-Begin title of memorandum.
-All text up to the next \fBAU\fP is included in the title.
-\fICharging-case number\fP and \fIfiling-case\fP are saved
-for use in the front page processing.
-.TP
-.B TM [num1 [num2 [...]]]
-Technical memorandumnumbers used in \fB.MT\fP. Unlimited number
-of arguments may be given.
-.TP
-.B TP
-Top of page user-defined macro.
-This macro is called instead of the normal page header. It is
-possible to get complete control over the header.
-Note that header and footer is printed in a separate environment.
-Linelength is preserved though.
-.TP
-.B "TS [H]"
-Table start. This is the start of a table specification
-to \fB@g@tbl\fP. See separate manual for \fB@g@tbl\fP.
-\fBTS\fP ends with \fBTE\fP.
-Argument \fIH\fP tells \fBm@TMAC_M_PREFIX@m\fP that the table
-has a header. See \fBTH\fP.
-.TP
-.B TX
-Userdefined table of contents exit.
-This macro is called just before \fBTC\fP prints the word \fICONTENTS\fP.
-See \fBTC\fP.
-.TP
-.B TY
-Userdefined table of contents exit (no "CONTENTS").
-This macro is called instead of printing \fICONTENTS\fP.
-See \fBTC\fP.
-.TP
-.B VERBON [flag [pointsize [font]]]
-Begin verbatim output using courier font.
-Usually for printing programs.
-All character has equal width.
-The pointsize can be changed with
-the second argument. By specifying the font-argument
-it is possible to use another font instead of courier.
-\fIflag\fP controls several special features.
-It contains the sum of all wanted features.
-.in +.5i
-.T2 Value
-Description
-.T2 1
-Disable the escape-character (\e). This is normally turned on during
-verbose output.
-.T2 2
-Add an empty line before the verbose text.
-.T2 4
-Add an empty line after the verbose text.
-.T2 8
-Print the verbose text with numbered lines. This adds four digitsized
-spaces in the beginning of each line. Finer control is available with
-the string-variable \fBVerbnm\fP. It contains all arguments to the
-\fBtroff\fP-command \fB.nm\fP, normally '1'.
-.T2 16
-Indent the verbose text with five 'n':s. This is controlled by the
-number-variable \fBVerbin\fP (in units).
-.in
-.TP
-.B VERBOFF
-End verbatim output.
-.TP
-.B "VL text-indent [mark-indent [1]]"
-Variable-item list has no fixed mark, it assumes that
-every \fBLI\fP have a mark instead.
-\fIText-indent\fP sets the indent to the text, and \fImark-indent\fP
-the distance from the current indent to the mark.
-A third argument will prohibit printing of a blank line before each
-item.
-.TP
-.B "VM [top [bottom]]"
-Vertical margin.
-.TP
-.B "WA [writer-name [title]]"
-Begins specification of the writer and writer's address.
-Several names can be specified with empty \fBWA\fP/\fBWE\fP-pairs, but
-only one address.
-.TP
-.B WE
-Ends the address-specification after \fP.WA\fP.
-.TP
-.B "WC [format]"
-Footnote and display width control.
-.in +.5i
-.T2 N
-Set default mode, \fB-WF\fP, \fB-FF\fP, \fB-WD\fP and \fBFB\fP.
-.T2 WF
-Wide footnotes, wide also in two-column mode.
-.T2 -WF
-Normal footnote width, follow column mode.
-.T2 FF
-All footnotes gets the same width as the first footnote encountered.
-.T2 -FF
-Normal footnotes, width follows \fBWF\fP and \fB-WF\fP.
-.T2 WD
-Wide displays, wide also in two-column mode.
-.T2 -WD
-Normal display width, follow column mode.
-.T2 FB
-Floating displays generates a line break when printed on the current page.
-.T2 -FB
-Floating displays does not generate line break.
-.in
-.sp 3
-.LP
-.\"########################################################################
-.LP
-.B "Strings used in m@TMAC_M_PREFIX@m:"
-.TP
-.B App
-A string containing the word "APPENDIX".
-.TP
-.B Apptxt
-.TP
-The current appendix text.
-.B "EM"
-Em dash string
-.TP
-.B H1txt
-Will be updated by \fB.H\fP and \fB.HU\fP to the current heading text.
-Also updated in table of contents & friends.
-.TP
-.B HF
-Fontlist for headings, normally "2 2 2 2 2 2 2".
-Nonnumeric fontnames may also be used.
-.TP
-.B HP
-Pointsize list for headings. Normally "0 0 0 0 0 0 0" which is the same as
-"10 10 10 10 10 10 10".
-.TP
-.B Index
-.TP
-Contains \fIINDEX\fP.
-.B Indcmd
-.TP
-Contains the index command, \fIsort\ -t\et\fP.
-.B Lifg
-String containing \fIFigure\fP.
-.TP
-.B Litb
-String containing \fITABLE\fP.
-.TP
-.B Liex
-String containing \fIExhibit\fP.
-.TP
-.B Liec
-String containing \fIEquation\fP.
-.TP
-.B Licon
-String containing \fICONTENTS\fP.
-.TP
-.B Lf
-Contains "LIST OF FIGURES".
-.TP
-.B Lt
-Contains "LIST OF TABLES".
-.TP
-.B Lx
-Contains "LIST OF EXHIBITS".
-.TP
-.B Le
-Contains "LIST OF EQUATIONS".
-.TP
-.B Letfc
-Contains "Yours very truly,", used in \fB.FC\fP.
-.TP
-.B Letapp
-Contains "APPROVED:", used in \fB.AV\fP.
-.TP
-.B Letdate
-Contains "Date", used in \fB.AV\fP.
-.TP
-.B LetCN
-Contains "CONFIDENTIAL", used in \fB.LO CN\fP.
-.TP
-.B LetSA
-Contains "To Whom It May Concern:", used in \fB.LO SA\fP.
-.TP
-.B LetAT
-Contains "ATTENTION:", used in \fB.LO AT\fP.
-.TP
-.B LetSJ
-Contains "SUBJECT:", used in \fB.LO SJ\fP.
-.TP
-.B LetRN
-Contains "In reference to:", used in \fB.LO RN\fP.
-.TP
-.B Letns
-is an array containing the different strings used in \fB.NS\fP.
-It is really a number of stringvariables prefixed with \fBLetns!\fP.
-If the argument doesn't exist, it will be included
-between \fB()\fP with \fBLetns!copy\fP as prefix and \fBLetns!to\fP as suffix.
-Observe the space after \fBcopy\fP and before \fBto\fP.
-.nf
-.ta 1.5i
-\fBName Value\fP
-Letns!0 Copy to
-Letns!1 Copy (with att.) to
-Letns!2 Copy (without att.) to
-Letns!3 Att.
-Letns!4 Atts.
-Letns!5 Enc.
-Letns!6 Encs.
-Letns!7 Under separate cover
-Letns!8 Letter to
-Letns!9 Memorandum to
-Letns!10 Copy (with atts.) to
-Letns!11 Copy (without atts.) to
-Letns!12 Abstract Only to
-Letns!13 Complete Memorandum to
-Letns!14 CC
-Letns!copy Copy "
-Letns!to " to
-.fi
-.TP
-.B Letnsdef
-Defines the standard-notation used when no argument is given
-to \fB.NS\fP. Default is \fB0\fP.
-.TP
-.B "MO1 - MO12"
-Strings containing \fIJanuary\fP thru \fIDecember\fP.
-.TP
-.B Qrf
-String containing "See chapter \e\e*[Qrfh], page \e\en[Qrfp].".
-.TP
-.B Rp
-Contains "REFERENCES".
-.TP
-.B Tcst
-Contains current status of table of contents and list of XXXX.
-Empty outside \fB.TC\fP.
-Useful in user-defined macros like \fB.TP\fP.
-.nf
-.ta 1.5i
-\fBValue Meaning\fP
-co Table of contents
-fg List of figures
-tb List of tables
-ec List of equations
-ex List of exhibits
-ap Appendix
-.fi
-.ta
-.TP
-.B Tm
-Contains \e(tm, trade mark.
-.TP
-.B Verbnm
-Argument to \fB.nm\fP in \fB.VERBON\fP, default: \fB1\fP.
-.\"-----------------------------------
-.LP
-.B "Number variables used in m@TMAC_M_PREFIX@m:"
-.TP
-.B Aph
-Print an appendix-page for every new appendix
-if this numbervariable is non-zero.
-No output will occur if \fBAph\fP is zero, but there will always
-be an appendix-entry in the 'List of contents'.
-.TP
-.B Cl
-Contents level [0:7], contents saved if heading level <= Cl, default 2.
-.TP
-.B Cp
-Eject page between LIST OF XXXX if Cp == 0, default 0.
-.TP
-.B D
-Debugflag, values >0 produces varying degree of debug. A value of 1
-gives information about the progress of formatting, default 0.
-.TP
-.B De
-Eject after floating display is output [0:1], default 0.
-.TP
-.B Dsp
-Controls the space output before and after static displays
-if defined. Otherwise is the value of Lsp used.
-.TP
-.B Df
-Floating keep output [0:5], default 5.
-.TP
-.B Ds
-\fBLsp\fP space before and after display if == 1 [0:1], default 1.
-.TP
-.B Ej
-Eject page, default 0.
-.TP
-.B Eq
-Equation lable adjust 0=left, 1=right. Default 0.
-.TP
-.B Fs
-Footnote spacing, default 1.
-.TP
-.B "H1-H7"
-Heading counters
-.TP
-.B H1dot
-Append a dot after the level one heading number if > 0. Default is 1.
-.TP
-.B H1h
-.TP
-Copy of number register \fBH1\fP, but it is incremented
-just before the page break. Useful in user defined header macros.
-.B Hb
-Heading break level [0:7], default 2.
-.TP
-.B Hc
-Heading centering level, [0:7]. Default 0.
-.TP
-.B Hi
-Heading temporary indent [0:2], default 1.
-.br
-0\ ->\ 0 indent, left margin
-.br
-1\ ->\ indent to right , like .P 1
-.br
-2\ ->\ indent to line up with text part of preceding heading
-.TP
-.B Hps
-Numbervariable with the heading pre-space level. If the heading-level
-is less than or equal to \fBHps\fP, then two lines will precede the
-section heading instead of one. Default is first level only.
-The real amount of lines is controlled by the variables \fBHps1\fP and
-\fBHps2\fP.
-.TP
-.B Hps1
-This is the number of lines preceding \fB.H\fP when the heading-level
-is greater than \fBHps\fP. Value is in units, normally 0.5.
-.TP
-.B Hps2
-This is the number of lines preceding \fB.H\fP when the heading-level
-is less than or equal to \fBHps\fP. Value is in units, normally 1.
-.TP
-.B Hs
-Heading space level [0:7], default 2.
-.TP
-.B Hss
-This is the number of lines that follows \fB.H\fP when the heading-level
-is less than or equal to \fBHs\fP. Value is in units, normally 1.
-.TP
-.B Ht
-Heading numbering type, default 0.
-0 -> multiple (1.1.1 ...)
-.br
-1 -> single
-.TP
-.B Hu
-Unnumbered heading level, default 2.
-.TP
-.B Hy
-Hyphenation in body, default 1.
-.br
-0\ ->\ no hyphenation
-.br
-1\ ->\ hyphenation 14 on
-.TP
-.B Iso
-Set this variable to 1 on the command line to get ISO-formatted date string.
-(\fB-rIso=1\fP)
-Useless inside a document.
-.TP
-.B Letwam
-Max lines in return-address, used in \fB.WA\fP/\fB.WE\fP. Default 14.
-.TP
-.B "Lf, Lt, Lx, Le"
-Enables (1) or disables (0) the printing of List of figures,
-List of tables, List of exhibits and List of equations.
-Default: Lf=1, Lt=1, Lx=1, Le=0.
-.TP
-.B Li
-List indent, used by .AL, default 6.
-.TP
-.B Limsp
-Flag for space between prefix and mark in automatic lists (.AL).
-.br
-0\ ==\ no space
-.br
-1\ ==\ space
-.TP
-.B Ls
-List space, if current listlevel > Ls then no spacing will occur around lists.
-Default 99.
-.TP
-.B Lsp
-The size of an empty line. Normally 0.5v, but it is 1v
-if \fBn\fP is set (\fB.nroff\fP).
-.TP
-.B N
-Numbering style [0:5], default 0.
-.br
-0\ ==\ (default) normal header for all pages.
-.br
-1\ ==\ header replaces footer on first page, header is empty.
-.br
-2\ ==\ page header is removed on the first page.
-.br
-3\ ==\ "section-page" numbering enabled.
-.br
-4\ ==\ page header is removed on the first page.
-.br
-5\ ==\ "section-page" and "section-figure" numbering enabled.
-See also the number-register Sectf and Sectp.
-.TP
-.B Np
-Numbered paragraphs, default 0.
-.br
-0\ ==\ not numbered
-.br
-1\ ==\ numbered in first level headings.
-.TP
-.B Of
-Format of figure,table,exhibit,equation titles, default 0.
-.br
-0\ =\ ". "
-.br
-1\ =\ " - "
-.TP
-.B P
-Current page-number, normally the same as % unless "section-page" numbering
-is enabled.
-.TP
-.B Pi
-paragraph indent, default 5.
-.TP
-.B Pgps
-Controls whether header and footer pointsize should follow the current
-setting or just change when the header and footer is defined.
-.in +.5i
-.ti -.5i
-.T2 Value
-Description
-.T2 0
-Pointsize will only change to the current setting when \fB.PH\fP, \fB.PF\fP,
-\&\fB.OH\fP, \fP.EH\fP, \fB.OF\fP or \fB.OE\fP is executed.
-.T2 1
-Pointsize will change after every \fB.S\fP. This is the default.
-.in
-.TP
-.B Ps
-paragraph spacing, default 1.
-.TP
-.B Pt
-Paragraph type, default 0.
-.br
-0\ ==\ left-justified
-.br
-1\ ==\ indented .P
-.br
-2\ ==\ indented .P except after .H, .DE or .LE.
-.TP
-.B Sectf
-Flag controlling "section-figures". A non-zero value enables this.
-See also register N.
-.TP
-.B Sectp
-Flag controlling "section-page-numbers". A non-zero value enables this.
-See also register N.
-.TP
-.B Si
-Display indent, default 5.
-.TP
-.B Verbin
-Indent for \fB.VERBON\fP, default 5n.
-.TP
-.B .mgm
-Always 1.
-.LP
-.SH INTERNALS
-The letter macros is using different submacros depending on
-the letter type. The name of the submacro has the letter type
-as suffix. It is therefore possible to define other letter types, either
-in the national macro-file, or as local additions.
-\&\fB.LT\fP will set the number variables \fBPt\fP and \fBPi\fP to 0 and 5.
-The following strings and macros must be defined for a new letter type:
-.TP
-\fBlet@init_\fP\fItype\fP
-This macro is called directly by \fB.LT\fP. It is supposed to initialize
-variables and other stuff.
-.TP
-\fBlet@head_\fP\fItype\fP
-This macro prints the letter head, and is called instead of the
-normal page header. It is supposed to remove the alias \fBlet@header\fP,
-otherwise it will be called for all pages.
-.TP
-\fBlet@sg_\fP\fItype\ name\ title\ n\ flag\ [arg1\ [arg2\ [...]]]\fP
-\&\fB.SG\fP is calling this macro only for letters, memorandums has
-its own processing. \fIname\fP and \fItitle\fP is specified
-thru \fB.WA\fP/\fB.WB\fP. \fIn\fP is the counter, 1-max, and
-\fIflag\fP is true for the last name. Any other argument to \fB.SG\fP
-is appended.
-.TP
-\fBlet@fc_\fP\fItype\ closing\fP
-This macro is called by \fB.FC\fP, and has the
-formal closing as argument.
-.LP
-\&\fB.LO\fP is implemented as a general option-macro. \fB.LO\fP demands
-that a string named \fBLet\fP\fItype\fP is defined, where \fItype\fP
-is the letter type.
-\&\fB.LO\fP will then assign the argument to the string
-variable \fBlet*lo-\fP\fItype\fP.
-.LP
-.\".SH BUGS
-.SH AUTHOR
-Jörgen Hägg, Lund, Sweden <jh@axis.se>.
-.SH FILES
-.TP
-.B @MACRODIR@/tmac.@TMAC_M_PREFIX@m
-.TP
-.B @TMAC_MDIR@/*.cov
-.TP
-.B @TMAC_MDIR@/*.MT
-.TP
-.B @TMAC_MDIR@/locale
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR @g@tbl (@MAN1EXT@),
-.BR @g@pic (@MAN1EXT@),
-.BR @g@eqn (@MAN1EXT@)
-.br
-.BR mm (@MAN7EXT@)
-.BR m@TMAC_M_PREFIX@mse (@MAN7EXT@)
diff --git a/contrib/groff/contrib/mm/groff_mmse.man b/contrib/groff/contrib/mm/groff_mmse.man
deleted file mode 100644
index 1e1f4a0d7408..000000000000
--- a/contrib/groff/contrib/mm/groff_mmse.man
+++ /dev/null
@@ -1,82 +0,0 @@
-.\"
-.\" $Id: groff_mmse.man,v 2.0 2000/09/14 03:40:24 jhaegg Exp $
-.\" Skrivet av Jörgen Hägg, Lund, Sverige
-.\"
-.TH GROFF_MMSE @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAMN
-groff_mmse \- svenska mm makro för groff
-.SH SYNTAX
-.B groff
-.B \-m@TMAC_M_PREFIX@mse
-[
-.IR flaggor .\|.\|.
-]
-[
-.IR filer .\|.\|.
-]
-.SH BESKRIVNING
-\fBm@TMAC_M_PREFIX@mse\fP är en svensk variant av \fBm@TMAC_M_PREFIX@m\fP. Alla texter
-är översatta. En A4 sida får text som är 13 cm bred, 3.5 cm indragning
-samt är 28.5 cm hög.
-Det finns stöd för brevuppställning enligt svensk standard
-för vänster och högerjusterad text.
-.LP
-\fBCOVER\fP kan använda \fIse_ms\fP som argument. Detta ger ett
-svenskt försättsblad.
-Se \fBgroff_mm(@MAN7EXT@)\fP för övriga detaljer.
-.SH BREV
-Tillgängliga brevtyper:
-.TP
-.B ".LT SVV"
-Vänsterställd löptext med adressat i position T0 (vänsterställt).
-.TP
-.B ".LT SVH"
-Högerställd löptext med adressat i position T4 (passar
-fönsterkuvert).
-.LP
-Följande extra LO-variabler används.
-.TP
-.B ".LO DNAMN\fI namn\fP"
-Anger dokumentets namn.
-.TP
-.br
-.B ".LO MDAT\fI datum\fP"
-Mottagarens datum, anges under \fBErt datum:\fP (\fBLetMDAT\fP).
-.TP
-.br
-.B ".LO BIL\fI sträng\fP"
-Anger bilaga, nummer eller sträng med \fBBilaga\fP (\fBLetBIL\fP)
-som prefix.
-.TP
-.br
-.B ".LO KOMP\fI text\fP"
-Anger kompletteringsuppgift.
-.TP
-.br
-.B ".LO DBET\fI beteckning\fP"
-Anger dokumentbeteckning eller dokumentnummer.
-.TP
-.br
-.B ".LO BET\fI beteckning\fP"
-Anger beteckning (ärendebeteckning i form av diarienummer eller liknande).
-.TP
-.br
-.B ".LO SIDOR\fI antal\fP"
-Anger totala antalet sidor och skrivs ut efter sidnumret inom
-parenteser.
-.LP
-Om makrot \fB.TP\fP är definierat anropas det efter utskrift av brevhuvudet.
-Där lägger man lämpligen in postadress och annat som brevfot.
-.SH "SKRIVET AV"
-Jörgen Hägg, Lund, Sweden <Jorgen.Hagg@axis.se>
-.SH FILER
-.B @MACRODIR@/tmac.@TMAC_M_PREFIX@mse
-.B @TMAC_MDIR@/se_*.cov
-.SH "SE OCKSÅ"
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR @g@tbl (@MAN1EXT@),
-.BR @g@pic (@MAN1EXT@),
-.BR @g@eqn (@MAN1EXT@)
-.br
-.BR m@TMAC_M_PREFIX@m (@MAN7EXT@)
diff --git a/contrib/groff/contrib/mm/m.tmac b/contrib/groff/contrib/mm/m.tmac
deleted file mode 100644
index af60f769359e..000000000000
--- a/contrib/groff/contrib/mm/m.tmac
+++ /dev/null
@@ -1,3477 +0,0 @@
-.\"
-.de @revision
-.ds RE \\$2
-..
-.\"
-.\" $Id: m.tmac,v 2.3 2001/03/05 09:56:29 jhaegg Exp $
-.@revision $Revision: 2.3 $
-.ig
-
-Copyright (C) 1991-2000 Free Software Foundation, Inc.
-mgm is written by Jörgen Hägg <jh@axis.com>
-
-mgm is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-mgm is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Please send bugreports with examples to jh@axis.com.
-
-Naming convention stolen from mgs.
-Local names module*name
-Extern names module@name
-Env.var environ:name
-Index array!index
-..
-.if !\n(.g .ab These mm macros require groff.
-.if \n(.C .ab The groff mm macros do not work in compatibility mode.
-.warn
-.\" ######## init #######
-.\" Contents level [0:7], contents saved if heading level <= Cl
-.nr Cl 2
-.\" Eject page between LIST OF XXXX if Cp == 0
-.nr Cp 0
-.\" Debugflag
-.if !r D .nr D 0
-.\" Eject after floating display is output [0:1]
-.nr De 0
-.\" Floating keep output [0;5]
-.nr Df 5
-.\" space before and after display if == 1 [0:1]
-.nr Ds 1
-.\" Eject page
-.nr Ej 0
-.\" Equation label adjust 0=left, 1=right
-.nr Eq 0
-.\" Em dash string
-.ie n .ds EM " --
-.el .ds EM \(em
-.\" Footnote spacing
-.nr Fs 1
-.\" H1-H7 heading counters
-.nr H1 0 1
-.nr H2 0 1
-.nr H3 0 1
-.nr H4 0 1
-.nr H5 0 1
-.nr H6 0 1
-.nr H7 0 1
-.\" Heading break level [0:7]
-.nr Hb 2
-.\" heading centering level, [0:7]
-.nr Hc 0
-.\" header format
-.ds HF 2 2 2 2 2 2 2
-.\" heading temp. indent [0:2]
-.\" 0 -> 0 indent, left margin
-.\" 1 -> indent to right , like .P 1
-.\" 2 -> indent to line up with text part of preceding heading
-.nr Hi 1
-.\" header pointsize
-.ds HP 0 0 0 0 0 0 0
-.\" heading space level [0:7]
-.nr Hs 2
-.\" heading numbering type
-.\" 0 -> multiple (1.1.1 ...)
-.\" 1 -> single
-.nr Ht 0
-.\" Unnumbered heading level
-.nr Hu 2
-.\" hyphenation in body
-.\" 0 -> no hyphenation
-.\" 1 -> hyphenation 14 on
-.nr Hy 0
-.\" text for toc, selfexplanatory. Look in the new variable section
-.ds Lf LIST OF FIGURES
-.nr Lf 1
-.ds Lt LIST OF TABLES
-.nr Lt 1
-.ds Lx LIST OF EXHIBITS
-.nr Lx 1
-.ds Le LIST OF EQUATIONS
-.nr Le 0
-.\" List indent, used by .AL
-.nr Li 6
-.\" List space, if listlevel > Ls then no spacing will occur around lists.
-.nr Ls 99
-.\" Numbering style [0:5]
-.if !r N .nr N 0
-.\" numbered paragraphs
-.\" 0 == not numbered
-.\" 1 == numbered in first level headings.
-.nr Np 0
-.\" Format of figure,table,exhibit,equation titles.
-.\" 0= ". ", 1=" - "
-.nr Of 0
-.\" Table of contents page numbering style
-.nr Oc 0
-.\" Page-number, normally same as %.
-.nr P 0
-.\" paragraph indent
-.nr Pi 5
-.\" paragraph spacing
-.nr Ps 1
-.\" paragraph type
-.\" 0 == left-justified
-.\" 1 == indented .P
-.\" 2 == indented .P except after .H, .DE or .LE.
-.nr Pt 0
-.\" Reference title
-.ds Rp REFERENCES
-.\" Display indent
-.nr Si 5
-.\"
-.\" Current state of TOC, empty outside TC, inside
-.\" it will be set to co,fg,tb,ec,ex or ap.
-.ds Tcst
-.\"
-.ds Tm \(tm
-.\"
-.\"---------------------------------------------
-.\" Internal global variables
-.\"
-.\" This is for cover macro .MT
-.\" .ds @language
-.\"
-.nr @copy_type 0
-.if r C .nr @copy_type \n[C]
-.\" >0 if Subject/Date/From should be bold, roman otherwise
-.ie n .ds @sdf_font R
-.el .ds @sdf_font B
-.if \n[@copy_type]=4 \{\
-. ls 2
-. nr Pi 10
-. nr Pt 1
-.\}
-.\"
-.\"
-.if r E \{\
-. ie \n[E] .ds @sdf_font B
-. el .ds @sdf_font R
-.\}
-.\"
-.\" Current pointsize and vertical space, always in points.
-.if !r S .nr S 10
-.ps \n[S]
-.vs \n[S]+2
-.\"
-.nr @ps \n[.ps]
-.nr @vs \n[.v]
-.if \n[D]>1 .tm @ps=\n[@ps], @vs=\n[@vs]
-.if \n[D]>3 .tm INIT: l:\n[.l] p:\n[.p] o:\n[.o]
-.\"
-.\" Page length
-.if r L \{\
-. ie n .pl \n[L]u
-. el .pl \n[L]u
-.\}
-.nr @pl \n[.p]
-.\"
-.\" page width
-.ie r W \{\
-. ie n .ll \n[W]u
-. el .ll \n[W]u
-.\}
-.el .ll 6i
-.nr @ll \n[.l]
-.nr @cur-ll \n[@ll]
-.lt \n[@ll]u
-.\"
-.\" page offset
-.ie r O .po \n[O]u
-.el \{\
-. ie n .po .75i
-. el .po .963i
-.\}
-.\"
-.nr @po \n[.o]
-.\"
-.\" non-zero if escape mechanism is turned off. Used by VERBON/OFF
-.nr @verbose-flag 0
-.\"---------------------------------------------
-.\" New variables
-.\"
-.\" Appendix name
-.ds App APPENDIX
-.\" print appendixheader, 0 == don't
-.nr Aph 1
-.\"
-.\" Current appendix text
-.ds Apptext
-.\" Controls the space before and after static displays if defined.
-.\" Lsp is used otherwise
-.\" .nr Dsp 1v
-.\"
-.\" Add a dot after level one heading number if >0
-.nr H1dot 1
-.\"
-.\" header prespace level. If level <= Hps, then two lines will be printed
-.\" before the header instead of one.
-.nr Hps 1
-.\"
-.\" These variables controls the number of lines preceding .H.
-.\" Hps1 is the number of lines when level > Hps
-.nr Hps1 0.5
-.if n .nr Hps1 1
-.\"
-.\" Hps2 is the number of lines when level <= Hps
-.nr Hps2 1
-.if n .nr Hps2 2
-.\"
-.\" Hss is the number of lines (Lsp) after the header.
-.nr Hss 1
-.\"
-.\" H1txt will be updated by .H and .HU, containing the heading text.
-.\" Will also be updated in table of contents & friends
-.\"
-.ds H1txt
-.\"
-.\" header text for the index
-.ds Index INDEX
-.\" command to sort the index
-.ds Indcmd sort
-.\"
-.\" flag for mkindex
-.if !r Idxf .nr Idxf 0
-.\" Change these in the national configuration file
-.ds Lifg Figure
-.ds Litb TABLE
-.ds Liex Exhibit
-.ds Liec Equation
-.ds Licon CONTENTS
-.\" Flag for space between mark and prefix 1==space, 0==no space
-.\" Can also be controlled by using '.LI mark 2'
-.nr Limsp 1
-.\"
-.\" Lsp controls the height of an empty line. Normally 0.5v
-.\" Normally used for nroff compatibility.
-.nr Lsp 0.5v
-.if n .nr Lsp 1v
-.ds MO1 January
-.ds MO2 February
-.ds MO3 March
-.ds MO4 April
-.ds MO5 May
-.ds MO6 June
-.ds MO7 July
-.ds MO8 August
-.ds MO9 September
-.ds MO10 October
-.ds MO11 November
-.ds MO12 December
-.\" for GETR
-.ds Qrf See chapter \\*[Qrfh], page \\*[Qrfp].
-.\"
-.\" header- and footer-size will only change to the current
-.\" if Pgps is > 0.
-.nr Pgps 1
-.\"
-.\" section-page if Sectp > 0
-.nr Sectp 0
-.if (\n[N]=3):(\n[N]=5) \{\
-. nr Sectp 1
-. nr Ej 1
-.\}
-.\" section-figure if Sectf > 0
-.nr Sectf 0
-.if \n[N]=5 .nr Sectf 1
-.\"
-.\" argument to .nm in .VERBON.
-.ds Verbnm "1
-.\" indent for VERBON
-.nr Verbin 5n
-.\"
-.\" Letter section
-.\" Formal closing (.FC)
-.ds Letfc Yours very truly,
-.\"
-.\" Approval line
-.ds Letapp APPROVED:
-.\" Approval date-string
-.ds Letdate Date
-.\"
-.ds LetCN CONFIDENTIAL\" Confidential default
-.ds LetSA To Whom It May Concern:\" Salutation default
-.ds LetAT ATTENTION:\" Attention string
-.ds LetSJ SUBJECT:\" Subject string
-.ds LetRN In reference to:\" Reference string
-.\"
-.\" Copy to (.NS)
-.ds Letnsdef 0
-.ds Letns!copy Copy \" space!
-.ds Letns!to " to
-.ds Letns!0 Copy to
-.ds Letns!1 Copy (with att.) to
-.ds Letns!2 Copy (without att.) to
-.ds Letns!3 Att.
-.ds Letns!4 Atts.
-.ds Letns!5 Enc.
-.ds Letns!6 Encs.
-.ds Letns!7 Under separate cover
-.ds Letns!8 Letter to
-.ds Letns!9 Memorandum to
-.ds Letns!10 Copy (with atts.) to
-.ds Letns!11 Copy (without atts.) to
-.ds Letns!12 Abstract Only to
-.ds Letns!13 Complete Memorandum to
-.ds Letns!14 CC:
-.\"
-.\" Text printed below the footer. Controlled by @copy_type (C).
-.ds Pg_type!0
-.ds Pg_type!1 OFFICIAL FILE COPY
-.ds Pg_type!2 DATE FILE COPY
-.ds Pg_type!3 D\ R\ A\ F\ T
-.ds Pg_type!4 D\ R\ A\ F\ T
-.\" Max lines in return address
-.nr Letwam 14
-.\"--------------------------
-.\" test for mgm macro. This can be used if the text must test
-.\" what macros is used.
-.nr .mgm 1
-.\"
-.\" Due to security problems with groff I had to rewrite
-.\" the reference system. It's not as elegant as before, you
-.\" have to run groff with '-z -rRef=1' and put stderr into the filename
-.\" for .INITR
-.\"
-.\" Output references to stderr if non-zero
-.ie !r Ref \{\
-. nr Ref 0
-.\}
-.el .warn 0
-.\"
-.\"---------------------------------------------
-.\" set local variables.
-.ie d @language .mso mm/\*[@language]_locale
-.el .mso mm/locale
-.\"---------------------------------------------
-.if \n[D] .tm Groff mm, version \*[RE].
-.\" ####### module init ######
-.\" reset all things
-.de init@reset
-.ie \\n[misc@adjust] 'ad
-.el 'na
-.ie \\n[Hy] 'hy 14
-.el 'nh
-'in 0
-'ti 0
-.ps \\n[@ps]u
-.vs \\n[@vs]u
-..
-.de @warning
-'tm WARNING:(\\n[.F]) input line \\n[.c]:\\$*
-.if \\n[D] .backtrace
-..
-.de @error
-'tm ******************
-'tm ERROR:(\\n[.F]) input line \\n[.c]:\\$*
-.if \\n[D] .backtrace
-'tm ******************
-.ab "Input aborted, syntax error"
-..
-.de misc@toupper
-.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
-.br
-\\$1
-.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
-.br
-..
-.\" ####### module debug #################################
-.de debug
-'tm \\$1:\\n[.F]:\\n[c.] ll=\\n[.l] vs=\\n[.v] ps=\\n[.s],\\n[.ps] \
-in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%]
-..
-.de debug-all
-.nr debug*n 1n
-.nr debug*m 1m
-'tm \\$1:\\n[.F]:\\n[c.] ll=\\n[.l] vs=\\n[.v] ps=\\n[.s] in=\\n[.i]\
- ad=\\n[.j] fi=\\n[.u] pl=\\n[.p] page=\\n[%] .o=\\n[.o]
-'tm _______ .d=\\n[.d] .f=\\n[.f] .h=\\n[.h] .k=\\n[.k] .n=\\n[.n]\
- .p=\\n[.p] .t=\\n[.t] .z=\\n[.z] nl=\\n[nl] dn=\\n[dn] n=\\n[debug*n]
-..
-.\" ####### module par #################################
-.nr par@ind-flag 1 \" indent on following P if Pt=2
-.nr hd*last-pos -1
-.nr hd*last-hpos -1
-.nr par*number 0 1
-.af par*number 01
-.nr par*number2 0 1
-.af par*number2 01
-.nr par*num-count 0 1
-.af par*num-count 01
-.\" reset numbered paragraphs, arg1 = headerlevel
-.de par@reset-num
-.if \\$1<3 .nr par*num-count 0
-.if (\\$1=1)&(\\n[Np]=1) .nr par*number 0
-..
-.\"------------
-.\" paragraph
-.de P
-.\" skip P if previous heading
-.ie !((\\n[nl]=\\n[hd*last-pos]):(\\n[nl]=(\\n[hd*last-pos]-.5v))) \{\
-. if \\n[D]>2 .tm Paragraph nl=\\n[nl]
-. par@doit \\$*
-. if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c
-.\}
-.el .if !(\\n[hd*last-hpos]=\\n[.k]) \{\
-. if \\n[D]>2 .tm Paragraph nl=\\n[nl]
-. par@doit \\$*
-. if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c
-.\}
-.nr par@ind-flag 1
-..
-.\"------------
-.de nP
-.\" skip P if previous heading
-.ie !((\\n[nl]=\\n[hd*last-pos]):(\\n[nl]=(\\n[hd*last-pos]-.5v))) \{\
-. if \\n[D]>2 .tm Paragraph nl=\\n[nl]
-. par@doit \\$*
-\\n[H2].\\n+[par*number2]\ \ \c
-.\}
-.el .if !(\\n[hd*last-hpos]=\\n[.k]) \{\
-. if \\n[D]>2 .tm Paragraph nl=\\n[nl]
-. par@doit \\$*
-\\n[H2].\\n+[par*number2]\ \ \c
-.\}
-.nr par@ind-flag 1
-..
-.\"------------
-.de par@doit
-.SP (u;\\n[Ps]*\\n[Lsp])
-.ie \\n[.$] \{\
-. if \\$1=1 .ti +\\n[Pi]n
-.\}
-.el \{\
-. if \\n[Pt]=1 .ti +\\n[Pi]n
-. if (\\n[Pt]=2)&\\n[par@ind-flag] .ti +\\n[Pi]n
-.\}
-..
-.\" ####### module line #######################################
-.de SP
-.br
-.if !r line*lp\\n[.z] .nr line*lp\\n[.z] 0
-.if !r line*ac\\n[.z] .nr line*ac\\n[.z] 0
-.ie \\n[.$] .nr line*temp (v;\\$1)
-.el .nr line*temp 1v
-.\"
-.ie \\n[line*lp\\n[.z]]=\\n[.d] \{\
-. \" go here if no output since the last .SP
-. nr line*output \\n[line*temp]-\\n[line*ac\\n[.z]]
-. if \\n[line*output]<0 .nr line*output 0
-. nr line*ac\\n[.z] +\\n[line*output]
-.\}
-.el \{\
-. nr line*ac\\n[.z] \\n[line*temp]
-. nr line*output \\n[line*temp]
-. \" no extra space in the beginning of a page
-. if (\\n[.d]<0):(\\n[pg*head-mark]=\\n[.d]) .nr line*output 0
-.\}
-.if \\n[line*output] .sp \\n[line*output]u
-.nr line*lp\\n[.z] \\n[.d]
-..
-.\" ######## module misc ###############
-.nr misc@adjust 14
-.de SA
-.if \\n[.$] \{\
-. if \\$1-1 .@error "SA: bad arg: \\$1"
-. nr misc@adjust 0\\$1
-.\}
-.ie \\n[misc@adjust] 'ad
-.el 'na
-..
-.\"-------------
-.\" switch environment, keep all important settings.
-.de misc@ev-keep
-.nr misc*ll \\n[.l]
-.ev \\$1
-.ll \\n[misc*ll]u
-.lt \\n[misc*ll]u
-..
-.\"-------------
-.\" .misc@push stackname value
-.de misc@push
-.ie d misc*st-\\$1 .ds misc*st-\\$1 \\$2 \\*[misc*st-\\$1]
-.el .ds misc*st-\\$1 \\$2
-..
-.\"-------------
-.\" .misc@pop stackname
-.\" value returned in the string misc*pop
-.de misc@pop
-.misc@pop-set misc*st-\\$1 \\*[misc*st-\\$1]
-..
-.\"-------------
-.de misc@pop-set
-.ds misc*st-name \\$1
-.shift
-.if \\n[.$]<1 .@error "stack \\*[misc*st-name] empty"
-.ds misc*pop \\$1
-.shift
-.ds \\*[misc*st-name] \\$*
-..
-.\"-------------
-.\" .misc@pop-nr stackname varname
-.de misc@pop-nr
-.misc@pop \\$1
-.nr \\$2 \\*[misc*pop]
-..
-.\"-------------
-.\" .misc@pop-ds stackname varname
-.de misc@pop-ds
-.misc@pop \\$1
-.ds \\$2 \\*[misc*pop]
-..
-.\"-----------
-.\" reset tabs
-.de TAB
-.ta T 5n
-..
-.\"-------------
-.\" .PGFORM linelength [ pagelength [ pageoffset [1]]]
-.de PGFORM
-.\" Break here to avoid problems with new linesetting of the previous line.
-.\" Hope this doesn't break anything else :-)
-.\" Don't break if arg_4 is a '1'.
-.if \\n[D]>2 .tm PGFORM: \\$*
-.if ''\\$4' .br
-.if \\n[D]>3 .tm PGFORM: IN l:\\n[.l] p:\\n[.p] o:\\n[.o]
-.ie !''\\$1' \{\
-. ll \\$1
-. nr @ll \\n[.l]
-. nr @cur-ll \\n[@ll]
-. lt \\n[@ll]u
-.\}
-.el \{\
-. ll \\n[@ll]u
-. lt \\n[@ll]u
-.\}
-.\"
-.ie !''\\$2' \{\
-. pl \\$2
-. nr @pl \\n[.p]
-.\}
-.el .pl \\n[@pl]u
-.\"
-.ie !''\\$3' \{\
-. po \\$3
-. nr @po \\n[.o]
-.\}
-.el .po \\n[@po]u
-.if \\n[D]>3 .tm PGFORM: OUT l:\\n[.l] p:\\n[.p] o:\\n[.o]
-.if \\n[D]>2 .tm PGFORM: ll=\\n[@ll], pl=\\n[@pl], po=\\n[@po]
-'in 0
-.pg@move-trap
-.if \\n[D]>2 \{\
-. tm Traps:
-. ptr
-.\}
-..
-.\"-------------
-.\" .MOVE y [[x] linelength]
-.\" move to line y, indent to x
-.de MOVE
-.if !\\n[.$] .@error "MOVE y [x]: no arguments"
-.if \\n[nl]<0 \c
-.\" move to Y-pos
-.sp |(v;\\$1)
-.\" calc linelength
-.ie \\n[.$]>2 .nr pg*i (n;\\$3)
-.el \{\
-. ie \\n[.$]>1 .nr pg*i (n;\\n[@ll]u-\\$2)
-. el .nr pg*i \\n[@ll]u
-.\}
-.\" move to X-pos, if any
-.if !''\\$2' .po \\$2
-.\" set linelength
-.ll \\n[pg*i]u
-..
-.\"-------------
-.de SM
-.if !\\n[.$] .@error "SM: no arguments"
-.if \\n[.$]=1 \s-1\\$1\s0
-.if \\n[.$]=2 \s-1\\$1\s0\\$2
-.if \\n[.$]=3 \\$1\s-1\\$2\s0\\$3
-..
-.\"-------------
-.nr misc*S-ps \n[@ps]
-.nr misc*S-vs \n[@vs]
-.nr misc*S-ps1 \n[@ps]
-.nr misc*S-vs1 \n[@vs]
-.ds misc*a
-.ds misc*b
-.de S
-.ie !\\n[.$] \{\
-. ds misc*a P
-. ds misc*b P
-.\}
-.el \{\
-. ie \\n[.$]=1 .ds misc*b D
-. el \{\
-. ie \w@\\$2@=0 .ds misc*b C
-. el .ds misc*b \\$2
-. \}
-. ie \w@\\$1@=0 .ds misc*a C
-. el .ds misc*a \\$1
-.\}
-.\"
-.\" set point size
-.if !'\\*[misc*a]'C' \{\
-. ie '\\*[misc*a]'P' .ps \\n[misc*S-ps]u
-. el \{\
-. ie '\\*[misc*a]'D' .ps \\n[S]
-. el .ps \\*[misc*a]
-. if \\n[D]>2 .tm S: .ps \\*[misc*a]
-. \}
-.\}
-.\"
-.\" set vertical spacing
-.if !'\\*[misc*b]'C' \{\
-. ie '\\*[misc*b]'P' .vs \\n[misc*S-vs]u
-. el \{\
-. ie '\\*[misc*b]'D' .vs \\n[.ps]u+2p
-. el .vs \\*[misc*b]
-. if \\n[D]>2 .tm S: .vs \\*[misc*b]
-. \}
-.\}
-.nr @ps \\n[.ps]
-.nr @vs \\n[.v]
-.\"
-.if \\n[D]>1 .tm S(\\$*): ma:\\*[misc*a], mb:\\*[misc*b] => ps:\\n[@ps]u, vs:\\n[@vs]u
-.nr misc*S-ps \\n[misc*S-ps1]
-.nr misc*S-vs \\n[misc*S-vs1]
-.nr misc*S-ps1 \\n[@ps]
-.nr misc*S-vs1 \\n[@vs]
-.pg@move-trap
-..
-.\"------------
-.de HC
-.ev 0
-.hc \\$1
-.ev
-.ev 1
-.hc \\$1
-.ev
-.ev 2
-.hc \\$1
-.ev
-..
-.\"------------
-.de RD
-.di misc*rd
-'fl
-.rd \\$1\t
-.br
-.di
-.ie !''\\$3' \{\
-. di misc*rd2
-. ds \\$3 "\\*[misc*rd]
-. br
-. di
-.\}
-.if !''\\$2' .rn misc*rd \\$2
-.rm misc*rd misc*rd2
-..
-.\"------------
-.\" VERBON [flag [pointsize [font]]]
-.\" flag
-.\" bit function
-.\" 0 escape on
-.\" 1 add an empty line before verbose text
-.\" 2 add an empty line after verbose text
-.\" 3 numbered lines (controlled by the string Verbnm)
-.\" 4 indent text by the numbervariable Verbin.
-.de VERBON
-.br
-.nr misc*verb 0\\$1
-.if (0\\n[misc*verb]%4)/2 .SP \\n[Lsp]u
-.misc@ev-keep misc*verb-ev
-.nf
-.if (0\\n[misc*verb]%16)/8 .nm \\*[Verbnm]
-.ie !'\\$3'' .ft \\$3
-.el .ft CR
-.ie 0\\$2 \{\
-. ss \\$2
-. ps \\$2
-. vs \\$2
-.\}
-.el .ss 12
-.ta T 8u*\w@n@u
-.if (0\\n[misc*verb]%32)/16 .in +\\n[Verbin]u
-.if 0\\n[misc*verb]%2 \{\
-. eo
-. nr @verbose-flag 1 \" tell pageheader to set ec/eo
-.\}
-..
-.de VERBOFF
-.ec
-.br
-.if (0\\n[misc*verb]%8)/4 .SP \\n[Lsp]u
-.if (0\\n[misc*verb]%16)/8 .nm
-.if (0\\n[misc*verb]%32)/16 .in
-.ev
-.nr @verbose-flag 0
-..
-.\" ######## module pict #################
-.nr pict*width 0
-.nr pict*height 0
-.nr pict*mode 0
-.nr pict*ind 0
-.nr pict*id 0 1
-.\" I assume that the number variable pict*id is the same
-.\" between two runs.
-.de PIC
-.br
-.nr pict*ind 0
-.nr pict*box 0
-.while \\n[.$]>0 \{\
-. if '-B'\\$1' \{\
-. nr pict*box 1
-. shift
-. continue
-. \}
-. if '-L'\\$1' \{\
-. nr pict*mode 0
-. shift
-. continue
-. \}
-. if '-R'\\$1' \{\
-. nr pict*mode 1
-. shift
-. continue
-. \}
-. if '-I'\\$1' \{\
-. nr pict*ind (m;\\$2)
-. nr pict*mode 2
-. shift 2
-. continue
-. \}
-. if '-C'\\$1' \{\
-. nr pict*mode 3
-. shift
-. continue
-. \}
-. ds pict*f \\$1
-. nr pict*id +1
-. shift
-. if \\n[.$]>0 \{\
-. nr pict*width (i;\\$1)
-. shift
-. \}
-. if \\n[.$]>0 \{\
-. nr pict*height (i;\\$1)
-. shift
-. \}
-.\}
-.if \\n[Ref]>0 \{\
-. tm .\\\\" PIC id \\n[pict*id]
-. tm .\\\\" PIC file \\*[pict*f]
-.\}
-.if d pict*file!\\n[pict*id] \{\
-. ds pict*f \\*[pict*file!\\n[pict*id]]
-. nr pict*llx \\n[pict*llx!\\n[pict*id]]
-. nr pict*lly \\n[pict*lly!\\n[pict*id]]
-. nr pict*urx \\n[pict*urx!\\n[pict*id]]
-. nr pict*ury \\n[pict*ury!\\n[pict*id]]
-. \"
-. nr pict*w (p;\\n[pict*urx]-\\n[pict*llx])
-. if \\n[pict*w]<0 .nr pict*w 0-\\n[pict*w]
-. nr pict*h (p;\\n[pict*ury]-\\n[pict*lly])
-. if \\n[pict*h]<0 .nr pict*h 0-\\n[pict*h]
-. if \\n[pict*width]>0 \{\
-. nr pict*rs (u;1000*\\n[pict*width]/\\n[pict*w])
-. nr pict*w (u;\\n[pict*w]*\\n[pict*rs]/1000)
-. nr pict*h (u;\\n[pict*h]*\\n[pict*rs]/1000)
-. \}
-. if \\n[pict*height]>0 \{\
-. nr pict*rs (u;1000*\\n[pict*height]/\\n[pict*h])
-. nr pict*h (u;\\n[pict*h]*\\n[pict*rs]/1000)
-. \}
-. if '0'\\n[pict*mode]' \{\
-. nr pict*in \\n[.i]u
-. \}
-. if '1'\\n[pict*mode]' \{\
-. nr pict*in (u;\\n[.l]-\\n[.i]-\\n[pict*w])
-. \}
-. if '2'\\n[pict*mode]' \{\
-. nr pict*in \\n[pict*ind]u
-. \}
-. if '3'\\n[pict*mode]' \{\
-. nr pict*in (u;(\\n[.l]-\\n[.i]-\\n[pict*w])/2)
-. \}
-. ds pict*h "
-. if \\n[pict*h]>0 .ds pict*h \\n[pict*h]
-. \"
-. ne \\n[pict*h]u
-. \"
-. \" these lines are copied and modified from tmac.pspic.
-. \" Originally written by James Clark
-. br
-. ie \\n[pict*box]>0 \{\
-\h'\\n[pict*in]u'\
-\Z'\D'p 0 \\n[pict*h]u \\n[pict*w]u 0 0 -\\n[pict*h]u''\
-\v'\\n[pict*h]u'\X'ps: import \\*[pict*f] \
-\\n[pict*llx] \\n[pict*lly] \\n[pict*urx] \\n[pict*ury] \\n[pict*w] \\n[pict*h]'
-.\}
-. el \{\
-\h'\\n[pict*in]u'\
-\X'ps: invis'\
-\Z'\D'p 0 \\n[pict*h]u \\n[pict*w]u 0 0 -\\n[pict*h]u''\
-\X'ps: endinvis'\
-\v'\\n[pict*h]u'\X'ps: import \\*[pict*f] \
-\\n[pict*llx] \\n[pict*lly] \\n[pict*urx] \\n[pict*ury] \\n[pict*w] \\n[pict*h]'
-. \}
-. br
-. sp \\n[pict*h]u
-.\}
-..
-.\" external picture
-.de EPIC
-.if \\n[.$]< 2 .@error "EPIC: Not enough arguments"
-.nr pict*w \\$1
-.nr pict*h \\$2
-.ds pict*name "External picture
-.if !''$3' .ds pict*name \\$3
-\&
-.br
-.ne \\n[pict*h]u
-.sp \\n[pict*h]u
-.nr pict*ind (u;(\\n[.l]-\\n[.i]-\\n[pict*w])/2)
-.in +\\n[pict*ind]u
-\D'l \\n[pict*w]u 0'\
-\D'l 0 -\\n[pict*h]u'\
-\D'l -\\n[pict*w]u 0'\
-\D'l 0 \\n[pict*h]u'\
-\v'-(u;\\n[pict*h]/2)'\
-\h'(u;(\\n[pict*w]-\w'\\*[pict*name]'/2))'\\*[pict*name]
-.in
-..
-.\" ######## module acc #################
-.\"-----------
-.\" accents. These are copied from mgs, written by James Clark.
-.de acc@over-def
-.ds \\$1 \Z'\v'(u;\w'x'*0+\En[rst]-\En[.cht])'\
-\h'(u;-\En[skw]+(-\En[.w]-\w'\\$2'/2)+\En[.csk])'\\$2'
-..
-.de acc@under-def
-.ds \\$1 \Z'\v'\En[.cdp]u'\h'(u;-\En[.w]-\w'\\$2'/2)'\\$2'
-..
-.acc@over-def ` \`
-.acc@over-def ' \'
-.acc@over-def ^ ^
-.acc@over-def ~ ~
-.acc@over-def : \(ad
-.acc@over-def ; \(ad
-.acc@under-def , \(ac
-.\" ######## module uni #################
-.\" unimplemented macros
-.de OK
-'tm "OK: not implemented"
-..
-.de PM
-'tm "PM: not implemented"
-..
-.\" ######## module hd #################
-.\" support for usermacro
-.nr hd*h1-page 1 \" last page-number for level 1 header.
-.nr hd*htype 0
-.ds hd*sect-pg
-.ds hd*mark
-.ds hd*suf-space
-.nr hd*need 0
-.aln ;0 hd*htype
-.als }0 hd*mark
-.als }2 hd*suf-space
-.aln ;3 hd*need
-.\"-------------
-.\" .hd@split varable index name val1 val2 ...
-.de hd@split
-.if \\$2>(\\n[.$]-3) .@error "\\$3 must have at least \\$2 values (\\*[\\$3]).
-.nr hd*sp-tmp \\$2+3
-.ds \\$1 \\$[\\n[hd*sp-tmp]]
-..
-.de HU
-.H 0 "\\$1"
-..
-.\"-------------
-.de H
-.if !r hd*cur-bline .nr hd*cur-bline \\n[nl]
-.br
-.df@print-float 2\" $$$ could be wrong...
-.\" terminate all lists
-.LC
-.init@reset
-.nr hd*level 0\\$1
-.nr hd*arg1 0\\$1
-.if !\\n[hd*level] .nr hd*level \\n[Hu]
-.\"
-.\" clear lower counters
-.nr hd*i 1 1
-.while \\n+[hd*i]<8 .if \\n[hd*level]<\\n[hd*i] .nr H\\n[hd*i] 0 1
-.\"
-.\" save last text for use in TP
-.if \\n[hd*level]=1 .ds H1txt \\$2\\$3
-.\"
-.\" This is a little fix to be able to get correct H1 heading number
-.\" in page headers. Special attention was needed when other formats are used.
-.ie !''\\g[H1]' \{\
-. ds hd*format \\g[H1]
-. af H1 0
-. nr H1h \\n[H1] 1
-. af H1 \\*[hd*format]
-.\}
-.el .nr H1h \\n[H1] 1
-.if \\n[hd*level]=1 .nr H1h +1
-.\"
-.\" Check if it's time for new page. Only if text has
-.\" appeared before.
-.if \\n[Ej]&(\\n[Ej]>=\\n[hd*level])&(\\n[nl]>\\n[hd*cur-bline]) .pg@next-page
-.\"
-.\" increment current counter
-.nr H\\n[hd*level] +1
-.\"
-.\" update pagenumber if section-page is used
-.if (\\n[hd*level]=1)&(\\n[Sectp]>0) .hd@set-page 1
-.\"
-.\" hd*mark is the text written to the left of the header.
-.ds hd*mark \\n[H1].
-.\"
-.if \\n[hd*level]>1 .as hd*mark \\n[H2]
-.\"
-.nr hd*i 2 1
-.while \\n+[hd*i]<8 .if \\n[hd*level]>(\\n[hd*i]-1) .as hd*mark .\\n[H\\n[hd*i]]
-.if \\n[Ht] .ds hd*mark \\n[H\\n[hd*level]].
-.\"
-.\" special case, no dot after level one heading if not H1dot true
-.if (\\n[hd*level]=1)&(\\n[H1dot]=0) .ds hd*mark \\n[H1]
-.\"
-.as hd*mark \ \ \" add spaces between mark and heading
-.if !\\n[hd*arg1] .ds hd*mark\" no mark for unnumbered
-.\"
-.if \\n[D]>1 .tm At header \\*[hd*mark] "\\$2"
-.nr hd*htype 0 \" hd*htype = check break and space
-. \" 0 = run-in, 1 = break only, 2 = space
-.if \\n[hd*level]<=\\n[Hb] .nr hd*htype 1
-.if \\n[hd*level]<=\\n[Hs] .nr hd*htype 2
-. \" two spaces if hd*htype == 0
-.ie (\\n[hd*htype]=0)&(\w@\\$2@) .ds hd*suf-space " \"
-.el .ds hd*suf-space
-.nr hd*need 2v \" hd*need = header need space
-.\"---------- user macro HX ------------
-.\" User exit macro to override numbering.
-.\" May change hd*mark (}0), hd*suf-space (}2) and hd*need (;3)
-.\" Can also change Hps1/2.
-.if d HX .HX \\n[hd*level] \\n[hd*arg1] "\\$2\\$3"
-.\"--------------------------------------
-.\" pre-space
-.ie \\n[hd*level]<=\\n[Hps] .SP (u;\\n[Hps2])
-.el .SP (u;\\n[Hps1])
-.\"
-.par@reset-num \\n[hd*level]\" reset numbered paragraph
-.\" start diversion to measure size of header
-.di hd*div
-\\*[hd*mark]\\$2\\$3\\*[hd*suf-space]
-.br
-.di
-.rm hd*div
-.if \\n[hd*htype] .na \" no adjust if run-in
-.if \\n[hd*htype]<2 .nr hd*need +\\n[Lsp]u \" add some extra space
-.ne \\n[hd*need]u+\\n[dn]u+.5p-1v \" this is the needed space for a header
-.\"
-.\" size and font calculations
-.hd@split hd*font \\n[hd*level] HF \\*[HF]\" get font for this level
-.ft \\*[hd*font]\" set new font
-.hd@split hd*new-ps \\n[hd*level] HP \\*[HP]\" get point size
-.ie (\\*[hd*new-ps]=0):(\w@\\*[hd*new-ps]@=0) \{\
-. if \\n[hd*htype] \{\
-. if '\\*[hd*font]'3' \{\
-. ps -1
-. vs -1
-. \}
-. if '\\*[hd*font]'B' \{\
-. ps -1
-. vs -1
-. \}
-. \}
-.\}
-.el \{\
-. ps \\*[hd*new-ps]
-. vs \\*[hd*new-ps]+2
-.\}
-.\"
-.\"---------- user macro HY -------------
-.\" user macro to reset indents
-.if d HY .HY \\n[hd*level] \\n[hd*arg1] "\\$2\\$3"
-.\"--------------------------------------
-.nr hd*mark-size \w@\\*[hd*mark]@
-.if (\\n[hd*level]<=\\n[Hc])&\\n[hd*htype] .ce\" center if level<=Hc
-.\"
-.\" finally, output the header
-\\*[hd*mark]\&\c
-.\" and the rest of the header
-.ie \\n[hd*htype] \{\
-\\$2\\$3
-. br
-.\}
-.el \\$2\\$3\\*[hd*suf-space]\&\c
-.ft 1
-.\" restore pointsize and vertical size.
-.ps \\n[@ps]u
-.vs \\n[@vs]u
-.\"
-.\" table of contents
-.if (\\n[hd*level]<=\\n[Cl])&\w@\\$2@ .toc@entry \\n[hd*level] "\\$2"
-.\" set adjust to previous value
-.SA
-.\" do break or space
-.if \\n[hd*htype] .br
-.if \\n[hd*htype]>1 .SP (u;\\n[Lsp]*\\n[Hss])
-.if \\n[hd*htype] \{\
-. \" indent if Hi=1 and Pt=1
-. if (\\n[Hi]=1)&(\\n[Pt]=1) .ti +\\n[Pi]n
-. \" indent size of mark if Hi=2
-. if \\n[hd*htype]&(\\n[Hi]>1) .ti +\\n[hd*mark-size]u
-.\}
-.nr par@ind-flag 0 \" no indent on .P if Pt=2
-.\"
-.\" check if it is time to reset footnotes
-.if (\\n[hd*level]=1)&\\n[ft*clear-at-header] .nr ft*nr 0 1
-.\"
-.\" check if it is time to reset indexes
-.if (\\n[hd*level]=1)&\\n[Sectf] \{\
-. nr lix*fg-nr 0 1
-. nr lix*tb-nr 0 1
-. nr lix*ec-nr 0 1
-. nr lix*ex-nr 0 1
-.\}
-.\"---------- user macro HZ ----------
-.if d HZ .HZ \\n[hd*level] \\n[hd*arg1] "\\$2\\$3"
-.nr hd*last-pos \\n[nl]
-.nr hd*last-hpos \\n[.k]
-.nr par@ind-flag 0
-..
-.\"--------
-.de HM
-.nr hd*i 0 1
-.while \\n+[hd*i]<8 .af H\\n[hd*i] \\$[\\n[hd*i]] 1
-..
-.\"----------------------
-.\" set page-nr, called from header
-.\"
-.de hd@set-page
-.\"
-.ie \\n[.$]>0 .nr P \\$1
-.el .nr P +1
-.\" Set section-page-string
-.ds hd*sect-pg \\n[H1]-\\n[P]
-.if \\n[Sectp]>1 .if '\\n[H1]'0' .ds hd*sect-pg "
-..
-.\"########### module pg ####################
-.\" set end of text trap
-.wh 0 pg@header
-.em pg@end-of-text
-.\"
-.ds pg*header ''- \\nP -''
-.ds pg*footer
-.if \n[N]=4 .ds pg*header ''''
-.if (\n[N]=3):(\n[N]=5) \{\
-. ds pg*header ''''
-. ds pg*footer ''\\*[hd*sect-pg]''
-.\}
-.ds pg*even-footer
-.ds pg*odd-footer
-.ds pg*even-header
-.ds pg*odd-header
-.\"
-.nr pg*top-margin 0
-.nr pg*foot-margin 0
-.nr pg*block-size 0
-.nr pg*footer-size 5\" 1v+footer+even/odd footer+2v
-.nr pg*header-size 7\" 3v+header+even/odd header+2v
-.nr pg*extra-footer-size 0
-.nr pg*extra-header-size 0
-.nr ft*note-size 0
-.nr pg*cur-column 0
-.nr pg*cols-per-page 1
-.nr pg*cur-po \n[@po]
-.nr pg*head-mark 0
-.\"
-.nr pg*ps \n[@ps]
-.nr pg*vs \n[@vs]
-.\"-------------------------
-.\" footer TRAPS: set, enable and disable
-.de pg@set-new-trap
-.nr pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v+\\n[pg*extra-footer-size]u)
-.\"
-.if \\n[D]>2 .tm pg*foot-trap \\n[@pl]u-(\\n[pg*block-size]u+\\n[ft*note-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v+\\n[pg*extra-footer-size]u) = \\n[pg*foot-trap]
-.\"
-.\" last-pos points to the position of the footer and bottom
-.\" block below foot-notes.
-.nr pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v)
-.if \\n[D]>2 .tm pg*last-pos \\n[@pl]u-(\\n[pg*block-size]u+\\n[pg*foot-margin]u+\\n[pg*footer-size]v) = \\n[pg*last-pos]
-..
-.de pg@enable-trap
-.wh \\n[pg*foot-trap]u pg@footer
-.if \\n[D]>2 .tm pg@enable-trap .t=\\n[.t] nl=\\n[nl]
-.if \\n[D]>2 .ptr
-..
-.de pg@disable-trap
-.ch pg@footer
-..
-.\" move to new trap (if changed).
-.de pg@move-trap
-.pg@disable-trap
-.pg@set-new-trap
-.pg@enable-trap
-..
-.de pg@enable-top-trap
-.\" set trap for pageheader.
-.nr pg*top-enabled 1
-..
-.de pg@disable-top-trap
-.\" remove trap for pageheader.
-.nr pg*top-enabled 0
-..
-.\" no header on the next page
-.de PGNH
-.nr pg*top-enabled (-1)
-..
-.\" set first trap for pagefooter
-.pg@enable-top-trap
-.pg@set-new-trap
-.pg@enable-trap
-.\"-------------------------
-.\" stop output and begin on next page. Fix footnotes and all that.
-.de pg@next-page
-.\".debug next-page
-.ne 999i \" activate trap
-.\" .pg@footer
-..
-.\"-------------------------
-.\" support for PX, TP and EOP.
-.als }t pg*header
-.als }e pg*even-header
-.als }o pg*odd-header
-.als TPh pg*header
-.als TPeh pg*even-header
-.als TPoh pg*odd-header
-.\"
-.als EOPf pg*footer
-.als EOPef pg*even-footer
-.als EOPof pg*odd-footer
-.\"------------------------------------------------------------
-.\" HEADER
-.de pg@header
-.if \\n[D]>1 .tm Page# \\n[%] (\\n[.F]:\\n[c.])
-.if \\n[Idxf] \{\
-.tl '<pagenr\ \\n[%]>'''
-.\}
-.\" assign current page-number to P
-.hd@set-page
-.\" reset spacing
-.nr line*lp\\n[.z] 0
-.nr line*ac\\n[.z] 0
-.\"
-.\" suppress pageheader if pagenumber == 1 and N == [124]
-.if \\n[pg*top-enabled] \{\
-.\" must be fixed!!
-.\". pg@disable-top-trap
-. if \\n[pg*extra-header-size] 'sp \\n[pg*extra-header-size]u
-. if \\n[pg*top-margin] 'sp \\n[pg*top-margin]u
-. ev pg*tl-ev
-. pg@set-env
-. ie d let@header .let@header
-. el \{\
-. ie d TP .TP
-. el \{\
-' sp 3
-. ie ((\\n[%]=1)&((\\n[N]=1):(\\n[N]=2))) .sp
-. el .tl \\*[pg*header]
-. ie o .tl \\*[pg*odd-header]
-. el .tl \\*[pg*even-header]
-' sp 2
-. \}
-. \}
-. ev
-. \" why no-space??
-. if d PX \{\
-. ns
-. PX
-. rs
-. \}
-. \" check for pending footnotes
-. ft@check-old
-. \"
-. \" back to normal text processing
-. pg@enable-trap
-. \" mark for multicolumn
-. nr pg*head-mark \\n[nl]u
-. \" reset NCOL pointer at each new page.
-. nr pg*last-ncol 0
-. \" set multicolumn
-. \"
-. pg@set-po
-. \" print floating displays
-. df@print-float 4
-. tbl@top-hook
-. ns
-.\}
-.if \\n[pg*top-enabled]<0 .nr pg*top-enabled 1
-.nr hd*cur-bline \\n[nl] \" .H needs to know if output has occured
-..
-.\"---------------------------------------------------------
-.\" FOOTER
-.de pg@footer
-.ec
-.if \\n[D]>2 .tm Footer# \\n[%] (\\n[.F]:\\n[c.])
-.pg@disable-trap
-.\".debug footer
-.tbl@bottom-hook
-.\" increment pageoffset for MC
-.\" move to the exact start of footer.
-'sp |\\n[pg*foot-trap]u+1v
-.\"
-.if \\n[D]>3 .tm FOOTER after .sp
-.\" print footnotes
-.if d ft*div .ft@print
-.\"
-.pg@inc-po
-.if !\\n[pg*cur-column] .pg@print-footer
-.\" next column
-.pg@set-po
-.pg@enable-trap
-.if \\n[@verbose-flag] .eo \" to help VERBON/VERBOFF
-..
-.\"-------------------------
-.de pg@print-footer
-.\" jump to the position just below the foot-notes.
-'sp |\\n[pg*last-pos]u+1v
-.\" check if there are any bottom block
-.if d pg*block-div .pg@block
-.\"
-.\" print the footer and eject new page
-.ev pg*tl-ev
-.pg@set-env
-.\" user defined end-of-page macro
-.ie d EOP .EOP
-.el \{\
-. ie o .tl \\*[pg*odd-footer]
-. el .tl \\*[pg*even-footer]
-. ie (\\n[%]=1)&(\\n[N]=1) .tl \\*[pg*header]
-. el .tl \\*[pg*footer]
-. tl ''\\*[Pg_type!\\n[@copy_type]]''
-.\}
-.ev
-.\" be sure that floating displays and footnotes will be
-.\" printed at the end of the document.
-.ie (\\n[df*fnr]>=\\n[df*o-fnr]):\\n[ft*exist] \{\
-. ev ne
-' bp
-. ev
-.\}
-.el 'bp
-..
-.\"-------------------------
-.\"
-.\" Initialize the title environment
-.de pg@set-env
-'na
-'nh
-'in 0
-'ti 0
-.ie \\n[Pgps] \{\
-. ps \\n[@ps]u
-. vs \\n[@vs]u
-.\}
-.el \{\
-. ps \\n[pg*ps]u
-. vs \\n[pg*vs]u
-.\}
-.lt \\n[@ll]u
-..
-.\"-------------------------
-.de PH
-.ds pg*header "\\$1
-.pg@set-new-size
-..
-.de PF
-.ds pg*footer "\\$1
-.pg@set-new-size
-..
-.de OH
-.ds pg*odd-header "\\$1
-.pg@set-new-size
-..
-.de EH
-.ds pg*even-header "\\$1
-.pg@set-new-size
-..
-.de OF
-.ds pg*odd-footer "\\$1
-.pg@set-new-size
-..
-.de EF
-.ds pg*even-footer "\\$1
-.pg@set-new-size
-..
-.de pg@clear-hd
-.ds pg*even-header
-.ds pg*odd-header
-.ds pg*header
-..
-.de pg@clear-ft
-.ds pg*even-footer
-.ds pg*odd-footer
-.ds pg*footer
-..
-.de pg@set-new-size
-.nr pg*ps \\n[@ps]
-.nr pg*vs \\n[@vs]
-.pg@move-trap
-..
-.\"-------------------------
-.\" end of page processing
-.de pg@footnotes
-.\".debug footnotes
-.\" output footnotes. set trap for block
-.\"
-..
-.\"-------------------------
-.\" print bottom block
-.de pg@block
-.ev pg*block-ev
-'nf
-'in 0
-.ll 100i
-.pg*block-div
-.br
-.ev
-..
-.\"-------------------------
-.\" define bottom block
-.de BS
-.misc@ev-keep pg*block-ev
-.init@reset
-.br
-.di pg*block-div
-..
-.\"-------------------------
-.de BE
-.br
-.di
-.nr pg*block-size \\n[dn]u
-.ev
-.pg@move-trap
-..
-.\"-------------------------
-.\" print out all pending text
-.de pg@end-of-text
-.if \\n[D]>2 .tm ---------- End of text processing ----------------
-.df@eot-print
-.ref@eot-print
-..
-.\"-------------------------
-.\" set top and bottom margins
-.de VM
-.if \\n[.$]=0 \{\
-. nr pg*extra-footer-size 0
-. nr pg*extra-header-size 0
-.\}
-.if \\n[.$]>0 .nr pg*extra-header-size (v;\\$1)
-.if \\n[.$]>1 .nr pg*extra-footer-size (v;\\$2)
-.if \\n[D]>2 \{\
-. tm extra top \\n[pg*extra-footer-size]
-. tm extra bottom \\n[pg*extra-header-size]
-.\}
-.pg@move-trap
-..
-.\"---------------------
-.\" multicolumn output.
-.de pg@set-po
-.if \\n[pg*cols-per-page]>1 \{\
-. ll \\n[pg*column-size]u
-.\}
-..
-.de pg@inc-po
-.if \\n[pg*cols-per-page]>1 \{\
-. ie \\n+[pg*cur-column]>=\\n[pg*cols-per-page] \{\
-. nr pg*cur-column 0 1
-. nr pg*cur-po \\n[@po]u
-. po \\n[@po]u
-. ll \\n[@ll]u
-. \}
-. el \{\
-. nr pg*cur-po +(\\n[pg*column-size]u+\\n[pg*column-sep]u)
-. po \\n[pg*cur-po]u
-' sp |\\n[pg*head-mark]u
-. tbl@top-hook
-. \}
-.\}
-..
-.\" An argument disables the page-break.
-.de 1C
-.br
-.if \\n[pg*cols-per-page]<=1 .@error "1C: multicolumn mode not active"
-.nr pg*cols-per-page 1
-.nr pg*column-sep 0
-.nr pg*column-size \\n[@ll]
-.nr pg*ncol-i \\n[pg*cur-column]\" temp variable
-.nr pg*cur-column 0 1
-.nr pg*cur-po \\n[@po]u
-.PGFORM
-.ie !'\\$1'1' .SK
-.el \{\
-. if d ft*div \{\
-. if \\n[pg*ncol-i]>0 \{\
-. @warning 1C: footnotes will be messy
-. \}
-. \}
-. if \\n[pg*last-ncol]>0 \{\
-. sp |\\n[pg*last-ncol]u
-. nr pg*last-ncol 0
-. \}
-.\}
-..
-.de 2C
-.br
-.nr pg*head-mark \\n[nl]u
-.if \\n[pg*cols-per-page]>1 .@error "2C: multicolumn mode already active"
-.nr pg*cols-per-page 2
-.nr pg*column-sep \\n[@ll]/15
-.nr pg*column-size (\\n[@ll]u*7)/15
-.nr pg*cur-column 0 1
-.nr pg*cur-po \\n[@po]u
-.ll \\n[pg*column-size]u
-.\" .lt \\n[pg*column-size]u
-..
-.\" MC column-size [ column-separation ]
-.de MC
-.br
-.nr pg*head-mark \\n[nl]u
-.if \\n[pg*cols-per-page]>1 .@error "MC: multicolumn mode already active"
-.ie ''\\$1' .nr pg*column-size \\n[.l]
-.el .nr pg*column-size (n;\\$1)
-.ie ''\\$2' .nr pg*column-sep \\n[pg*column-size]/15
-.el .nr pg*column-sep (n;\\$2)
-.\"
-.\" calculate the number of columns/page
-.nr pg*cols-per-page 0
-.nr pg*i \\n[pg*column-size]
-.while \\n[pg*i]<=\\n[.l] \{\
-. nr pg*cols-per-page \\n[pg*cols-per-page]+1
-. nr pg*i \\n[pg*i]+\\n[pg*column-sep]+\\n[pg*column-size]
-.\}
-.nr pg*cur-column 0 1
-.nr pg*cur-po \\n[@po]u
-.ll \\n[pg*column-size]u
-.\" .lt \\n[pg*column-size]u
-..
-.\" begin a new column
-.de NCOL
-.br
-.if \\n[nl]>\\n[pg*last-ncol] .nr pg*last-ncol \\n[nl]
-.pg@footer
-..
-.\" skip pages
-.de SK
-.br
-.bp
-.nr pg*i 0 1
-.\" force new page by writing something invisible.
-.while \\n+[pg*i]<=(0\\$1) \{\
-\&
-. bp
-.\}
-..
-.\"-------------------------------
-.\" MULB width1 space1 width2 space2 width3 space3 ...
-.de MULB
-.br
-.nr pg*i 0 1
-.nr pg*mul-x 0 1
-.nr pg*mul-ind 0
-.nr pg*mul-last 0
-.while \\n[.$] \{\
-. nr pg*mul!\\n+[pg*i] (n;0\\$1)
-. nr pg*muls!\\n[pg*i] (n;0\\$2)
-. shift 2
-.\}
-.nr pg*mul-max-col \\n[pg*i]
-.ds pg*mul-fam \\n[.fam]
-.nr pg*mul-font \\n[.f]
-.ev pg*mul-ev
-.ps \\n[@ps]u
-.vs \\n[@vs]u
-.fam \\*[pg*mul-fam]
-.ft \\n[pg*mul-font]
-.fi
-.hy 14
-.di pg*mul-div
-.MULN
-..
-.\"-----------
-.de MULN
-.if \\n[pg*mul-x]>=\\n[pg*mul-max-col] .@error "MULN: Undefined columnwidth"
-.br
-.if \\n[.d]>\\n[pg*mul-last] .nr pg*mul-last \\n[.d]
-.rt +0
-.in \\n[pg*mul-ind]u
-.ll (u;\\n[.i]+\\n[pg*mul!\\n+[pg*mul-x]])u
-.nr pg*mul-ind +(u;\\n[pg*mul!\\n[pg*mul-x]]+\\n[pg*muls!\\n[pg*mul-x]])
-..
-.\"-----------
-.\" MULE
-.de MULE
-.br
-.if \\n[.d]>\\n[pg*mul-last] .nr pg*mul-last \\n[.d]
-.di
-.ev
-.ne \\n[pg*mul-last]u
-.nf
-.mk
-.pg*mul-div
-.rt
-.sp \\n[pg*mul-last]u
-.fi
-..
-.\"-----------
-.de OP
-.br
-.ie o .if !\\n[pg*head-mark]=\\n[nl] \{\
-. bp +1
-. bp +1
-.\}
-.el .bp
-..
-.\"########### module footnotes ###################
-.nr ft*note-size 0
-.nr ft*busy 0
-.nr ft*nr 0 1
-.nr ft*wide 0
-.nr ft*hyphen 0\" hyphenation value
-.nr ft*adjust 1\" >0 if adjust true
-.nr ft*indent 1\" >0 if text indent true (not imp. $$$)
-.nr ft*just 0\" 0=left justification, 1=right (not imp. $$$)
-.nr ft*exist 0\" not zero if there are any footnotes to be printed
-.nr ft*clear-at-header 0\" >0 if footnotes should be reset at first level head.
-.\"
-.ds F \v'-.4m'\s-3\\n+[ft*nr]\s0\v'.4m'
-.\"
-.\"-----------------
-.\" init footnote environment
-.de ft@init
-.\" indentcontrol not implemented $$$
-.\" label justification not implemented $$$
-'in 0
-'fi
-.ie \\n[ft*adjust] 'ad
-.el 'na
-.ie \\n[ft*hyphen] 'hy 14
-.el 'hy 0
-.ll \\n[@cur-ll]u
-.lt \\n[@cur-ll]u
-.ps (p;\\n[@ps]u-2)
-.vs (p;\\n[@vs]u-1)
-..
-.\"-----------------
-.\" set footnote format
-.\" no support for two column processing (yet). $$$
-.de FD
-.if \\n[.$]=0 .@error "FD: bad arg \\$1"
-.ie \\n[.$]=2 .nr ft*clear-at-header 1
-.el .nr ft*clear-at-header 0
-.\"
-.if !'\\$1'' \{\
-. ie \\$1>11 .nr ft*format 0
-. el .nr ft*format \\$1
-. \"
-. nr ft*hyphen (\\n[ft*format]%2)*14
-. nr ft*format \\n[ft*format]/2
-. \"
-. nr ft*adjust 1-(\\n[ft*format]%2)
-. nr ft*format \\n[ft*format]/2
-. \"
-. nr ft*indent 1-(\\n[ft*format]%2)
-. nr ft*format \\n[ft*format]/2
-. \"
-. nr ft*just \\n[ft*format]%2
-.\}
-..
-.\"---------------
-.\" Footnote and display width control $$$
-.de WC
-.nr ft*i 0 1
-.while \\n+[ft*i]<=\\n[.$] \{\
-. ds ft*x \\$[\\n[ft*i]]
-. if '\\*[ft*x]'N' \{\
-. nr ft*wide 0
-. nr ft*first-fn 0
-. nr ds*wide 0
-. nr ds*float-break 1
-. \}
-. if '\\*[ft*x]'-WF' .nr ft*wide 0
-. if '\\*[ft*x]'WF' .nr ft*wide 1
-. if '\\*[ft*x]'-FF' .nr ft*first-fn 0
-. if '\\*[ft*x]'FF' .nr ft*first-fn 1
-. if '\\*[ft*x]'-WD' \{\
-. nr ds*wide 0
-. if r ft*df-save \{\
-. nr Df \\n[ft*df-save]
-. rm ft*df-save
-. \}
-. \}
-. if '\\*[ft*x]'WD' \{\
-. nr ds*wide 1
-. nr ft*df-save \\n[Df]
-. nr Df 4
-. \}
-. if '\\*[ft*x]'-FB' .nr ds*float-break 0
-. if '\\*[ft*x]'FB' .nr ds*float-break 1
-. if \\n[D]>1 .tm WC WF=\\n[ft*wide] WD=\\n[ds*wide]
-.\}
-..
-.\"-----------------
-.\" begin footnote
-.\" Change environment, switch to diversion and print the foot-note mark.
-.de FS
-.if \\n[ft*busy] .@error "FS: missing FE"
-.nr ft*busy 1
-.ev ft*ev
-.ft@init
-.if !\\n[ft*wide] .pg@set-po
-.di ft*tmp-div
-.nr ft*space (u;\\n[Fs]*\\n[Lsp])
-.sp \\n[ft*space]u
-.\" print mark
-.ie \\n[.$] .ds ft*mark \\$1
-.el .ds ft*mark \\n[ft*nr].
-\\*[ft*mark]
-.in +.75c
-.sp -1
-.nr ft*exist 1
-..
-.\"-----------------
-.\" init footnote diversion
-.de ft@init-footnote
-.di ft*div
-\l'20n'
-.br
-.di
-.nr ft*note-size \\n[dn]
-..
-.\"-----------------
-.\" end footnote
-.\" End the diversion, back to previous environment, and adjust
-.\" the trap to the new foot-note size.
-.de FE
-.nr ft*busy 0
-.br
-.di
-'in 0
-'nf
-.if \\n[@pl]u<\\n[dn]u .@error "FE: too big footnote"
-.if !d ft*div .nr dn +1v
-.if \\n[D]>3 .tm FE: foot-trap=\\n[pg*foot-trap] .d=\\n[.d] dn=\\n[dn]
-.ie (\\n[pg*foot-trap]u-\\n[.d]u)<\\n[dn]u \{\
-. da ft*next-div
-. ft*tmp-div
-. br
-. di
-.\}
-.el \{\
-. if !d ft*div .ft@init-footnote
-. da ft*div
-. ft*tmp-div
-. di
-. nr ft*note-size +\\n[dn]
-.\}
-.rm ft*tmp-div
-.ev
-.pg@move-trap
-..
-.\"-----------------
-.\" print footnotes, see pg@footer
-.de ft@print
-.ev ft*print-ev
-'nf
-'in 0
-.ll 100i
-.ft*div
-.br
-.ev
-.rm ft*div
-.nr ft*note-size 0
-.pg@move-trap
-..
-.\"-----------------
-.\" check if any pending footnotes, see pg@header
-.de ft@check-old
-.if d ft*next-div \{\
-. ev ft*ev
-. ft@init
-. ft@init-footnote
-. nf
-. in 0
-. da ft*div
-. ft*next-div
-. di
-. nr ft*note-size +\\n[dn]
-. rm ft*next-div
-. ev
-. nr ft*exist 0
-. pg@move-trap
-.\}
-..
-.\"########### module display ###################
-.nr ds*wide 0\" >0 if wide displays wanted
-.nr df*fnr 0 1\" floating display counter
-.nr df*o-fnr 1\" floating display counter, already printed
-.nr ds*snr 0 1\" static display counter
-.nr ds*lvl 0 1\" display level
-.nr ds*float-busy 0\" >0 if printing float
-.nr df*float 0 >0 if previous display was floating
-.\"--------------------------------------------
-.de DE
-.ie \\n[df*float] .df@end \\$@
-.el .ds@end \\$@
-..
-.\"--------------------------------------------
-.\" floating display start
-.\" nested DF/DE is not allowed.
-.de DF
-.if \\n[df*float] .@error "DF:nested floating is not allowed. Use DS."
-.ds@set-format \\$@
-.\"
-.nr df*old-ll \\n[.l]
-.nr ds*ftmp \\n[.f]
-.misc@ev-keep df*ev
-.ft \\n[ds*ftmp]
-.\"
-.init@reset
-.di df*div
-'in 0
-.\"
-.ds@set-new-ev \\n[df*old-ll]
-.SP \\n[Lsp]u
-.nr df*float 1
-..
-.\"--------------------------------------------
-.de df@end
-.br
-.SP \\n[Lsp]u
-.di
-.nr df*width!\\n+[df*fnr] \\n[dl]
-.nr df*height!\\n[df*fnr] \\n[dn]
-.nr df*wide!\\n[df*fnr] \\n[ds*wide]
-.nr df*format!\\n[df*fnr] \\n[ds*format]
-.ev
-.if \\n[D]>2 .tm DF:fnr=\\n[df*fnr] w=\\n[dl] h=\\n[dn] wide=\\n[ds*wide] \
- form=\\n[ds*format]
-.\" move div to the floating display list
-.rn df*div df*fdiv!\\n[df*fnr]
-.\"
-.nr par@ind-flag 0
-.\" print float if queue is empty and the display fits into
-.\" the current page
-.if ((\\n[df*fnr]>=\\n[df*o-fnr])&(\\n[dn]<\\n[.t])) .df@print-float 1
-.nr df*float 0
-..
-.\"-------------
-.\" called by end-of-text
-.de df@eot-print
-.br
-.if \\n[df*o-fnr]<=\\n[df*fnr] \{\
-. if \\n[D]>2 .tm Print remaining displays.
-.\" still some floats left, make non-empty environment
-. misc@ev-keep ne
-. init@reset
-\c
-. df@print-float 3
-. ev
-.\}
-..
-.\"---------------
-.\" print according to Df and De.
-.\" .df@print-float type
-.\" type called from
-.\" 1 .DE
-.\" 2 end of section
-.\" 3 end of document
-.\" 4 beginning of new page
-.\"
-.de df@print-float
-.if \\n[Df]>5 .@error "Df=\\n[Df], max value is 5"
-.if !\\n[ds*float-busy] \{\
-. nr ds*float-busy 1
-.\" at .DE
-. if \\n[D]>3 .tm print-float: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]]
-. \" Df = 1 or 5
-. if (\\$1=1)&((\\n[Df]=1):(\\n[Df]=5)) \{\
-. if \\n[.t]>\\n[df*height!\\n[df*o-fnr]] \{\
-. \" Print only new displays.
-. if \\n[df*o-fnr]=\\n[df*fnr] \{\
-. br
-. ds@print-one-float
-. \}
-. \}
-. \}
-. \" Df = 3
-. if (\\$1=1)&(\\n[Df]=3) \{\
-. if \\n[.t]>\\n[df*height!\\n[df*o-fnr]] \{\
-. br
-. ds@print-one-float
-. \}
-. \}
-.\" print all if Df<2 and end of section
-. if (\\$1=2)&(\\n[Sectp]>0)&(\\n[Df]<2) \{\
-. br
-. ds@print-all-floats
-. \}
-.\" print all if end of document. Where should they go instead?
-. if \\$1=3 \{\
-. br
-. ds@print-all-floats
-.\}
-.\" new page
-. if (\\$1=4)&(\\n[Df]>1) \{\
-. if \\n[Df]=2 .ds@print-one-float
-. if \\n[Df]=3 .ds@print-one-float
-. if \\n[Df]>3 \{\
-. ie \\n[De] .ds@print-all-floats
-. el .ds@print-this-page
-. \}
-. \}
-. nr ds*float-busy 0
-.\}
-..
-.\"---------------
-.\" DF out
-.\" print a floating diversion
-.de ds@output-float
-.nr df*old-ll \\n[.l]
-.nr df*old-in \\n[.i]
-.ev ds*fev
-.nf
-.nr df*i \\n[df*o-fnr]
-.nr df*f \\n[df*format!\\n[df*i]]
-.\"
-.in \\n[df*old-in]u
-.if \\n[df*f]=1 'in +\\n[Si]n
-.if \\n[df*f]>=2 'in 0
-.if \\n[df*f]=2 'ce 9999
-.if \\n[df*f]=3 'in (u;(\\n[.l]-\\n[df*width!\\n[df*i]])/2)
-.if \\n[df*f]=4 'rj 9999
-.if \\n[df*f]=5 'in (u;\\n[.l]-\\n[df*width!\\n[df*i]])
-.\"
-.\"
-.df*fdiv!\\n[df*o-fnr]
-.\"
-.if \\n[df*f]=2 'ce 0
-.if \\n[df*f]=4 'rj 0
-.ev
-.rm df*fdiv!\\n[df*i]
-.rm df*height!\\n[df*i]
-.rm df*format!\\n[df*i]
-.if \\n[df*wide!\\n[df*i]] .nr pg*head-mark \\n[nl]u
-.nr df*o-fnr +1
-..
-.\"---------------
-.\" print one floating display if there is one.
-.de ds@print-one-float
-.if \\n[df*o-fnr]<=\\n[df*fnr] \{\
-. if \\n[D]>3 .tm print-one-float: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]]
-. if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .pg@next-page
-. ds@output-float
-. if \\n[De] .pg@next-page
-.\}
-..
-.\"---------------
-.\" print all queued floats.
-.\" if De>0 do a page eject between the floats.
-.de ds@print-all-floats
-.while \\n[df*o-fnr]<=\\n[df*fnr] \{\
-. if \\n[D]>3 .tm print-all-floats: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]]
-. if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .pg@next-page
-. br
-\c
-. ds@output-float
-. if \\n[De] .pg@next-page
-.\}
-..
-.\"---------------
-.\" print as many floats as will fit on the current page
-.de ds@print-this-page
-.while \\n[df*o-fnr]<=\\n[df*fnr] \{\
-. if \\n[D]>3 .tm print-this-page: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]]
-. if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .break
-. ds@output-float
-.\}
-..
-.\"---------------------------------------------------
-.\" get format of the display
-.de ds@set-format
-.ie \\n[.$] \{\
-. ie r ds*format!\\$1 .nr ds*format \\n[ds*format!\\$1]
-. el .@error "DS/DF:wrong format:\\$1"
-.\}
-.el .nr ds*format 0
-.if \\n[D]>2 .tm set format=\\n[ds*format]
-.\" fill or not to fill, that is the...
-.nr ds*fill 0
-.ie \\n[.$]>1 \{\
-. ie r ds*fill!\\$2 .nr ds*fill \\n[ds*fill!\\$2]
-. el .@error "\\*[ds*type]:wrong fill:\\$2"
-.\}
-.if \\n[D]>2 .tm set fill=\\n[ds*fill]
-.nr ds*rindent 0
-.if \\n[.$]>2 .nr ds*rindent \\$3
-.if \\n[D]>2 .tm set indent=\\n[ds*rindent]
-..
-.\"-----------------------------
-.\" .ds@set-new-ev previous-line-length
-.de ds@set-new-ev
-.ll \\$1u
-.lt \\$1u
-.if \\n[ds*rindent] \{\
-. ll -\\n[ds*rindent]n
-. lt -\\n[ds*rindent]n
-.\}
-.if \\n[ds*wide] \{\
-. ll \\n[@ll]u
-. lt \\n[@ll]u
-.\}
-.\"
-.ie \\n[ds*fill] 'fi
-.el 'nf
-..
-.\"--------------------------------------------------------
-.nr ds*format 0\" dummy value for .En/.EQ
-.nr ds*format! 0\" no indent
-.nr ds*format!0 0\" no indent
-.nr ds*format!L 0\" no indent
-.nr ds*format!I 1\" indent
-.nr ds*format!1 1\" indent
-.nr ds*format!C 2\" center each line
-.nr ds*format!2 2\" center each line
-.nr ds*format!CB 3\" center as block
-.nr ds*format!3 3\" center as block
-.nr ds*format!R 4\" right justify each line
-.nr ds*format!4 4\" right justify each line
-.nr ds*format!RB 5\" right justify as block
-.nr ds*format!5 5\" right justify as block
-.\"---------------
-.nr ds*fill! 0\" no fill
-.nr ds*fill!N 0\" no fill
-.nr ds*fill!0 0\" no fill
-.nr ds*fill!F 1\" fill on
-.nr ds*fill!1 1\" fill on
-.\"--------------------------------------------
-.\" static display start
-.\" nested DS/DE is allowed. No limit on depth.
-.de DS
-.br
-.nr ds*lvl +1
-.ds@set-format \\$@
-.\"
-.nr ds*old-ll \\n[.l]
-.nr ds*old-in \\n[.i]
-.misc@push ds-ll \\n[.l]
-.misc@push ds-form \\n[ds*format]
-.nr ds*i \\n[.i]
-.nr ds*ftmp \\n[.f]
-.misc@ev-keep ds*ev!\\n+[ds*snr]
-.ft \\n[ds*ftmp]
-.\"
-.init@reset
-.\" indent in a diversion doesn't seem like a good idea.
-'in 0
-.di ds*div!\\n[ds*snr]
-.\"
-.ds@set-new-ev \\n[ds*old-ll]
-.nr df*float 0
-..
-.\"--------------------------------------------
-.de ds@end
-.if \\n-[ds*lvl]<0 .@error "DE: no corresponding DS"
-.br
-.di
-.\" **********
-.nr ds*width \\n[dl]
-.nr ds*height \\n[dn]
-.misc@pop-nr ds-ll ds*old-ll
-.misc@pop-nr ds-form ds*format
-.\"
-.\" **********
-'nf
-.\" calculate needed space
-.nr ds*need \\n[ds*height]
-.nr ds*i \\n[pg*foot-trap]-\\n[pg*header-size]v-\\n[pg*extra-header-size]v
-.if (\\n[ds*height]>\\n[ds*i])&(\\n[.t]<(\\n[ds*i]/2)) .nr ds*need \\n[.t]u+1v
-.if (\\n[ds*height]<\\n[ds*i])&(\\n[.t]<(\\n[ds*height])) .nr ds*need \\n[.t]u+1v
-.\" Eject page if display will fit one page and
-.\" there are less than half of the page left.
-.if \\n[ds*need] .ne \\n[ds*need]u
-.\"
-.\" check if pending equation label
-.eq@check \\n[ds*need]
-'in \\n[ds*old-in]u
-.if \\n[ds*format]=1 'in \\n[ds*old-in]u+\\n[Si]n
-.if \\n[ds*format]>=2 'in 0
-.if \\n[ds*format]=2 'ce 9999
-.if \\n[ds*format]=3 'in (u;(\\n[.l]-\\n[ds*width])/2)
-.if \\n[ds*format]=4 'rj 9999
-.if \\n[ds*format]=5 'in (u;\\n[.l]-\\n[ds*width])
-.\" **********
-.\"
-.\" Print static display
-.nr ds*i \\n[Lsp]
-.if r Dsp .nr ds*i \\n[Dsp]
-.\"
-.if \\n[Ds] .SP \\n[ds*i]u
-.ds*div!\\n[ds*snr]
-.if \\n[Ds] .SP \\n[ds*i]u
-.\"
-.if \\n[ds*format]=2 'ce 0
-.if \\n[ds*format]=4 'rj 0
-.rm ds*div!\\n[ds*snr]
-.nr ds*snr -1
-.nr par@ind-flag 0
-.ev
-..
-.\"########### module list ###################
-.\" .LI text-indent mark-indent pad type [mark [LI-space [LB-space] ] ]
-.\"
-.nr li*tind 0
-.nr li*mind 0
-.nr li*pad 0
-.nr li*type 0
-.ds li*mark 0
-.nr li*li-spc 0
-.nr li*lvl 0 1
-.aln :g li*lvl
-.nr li*cur-vpos 0
-.\"--------------------------
-.\" the major list-begin macro.
-.\" If type == -1 a 'break' will occur.
-.de LB
-.if \\n[.$]<4 .@error "LB: not enough arguments, min 4"
-.misc@push cind \\n[.i]
-.misc@push tind \\n[li*tind]
-.misc@push mind \\n[li*mind]
-.misc@push pad \\n[li*pad]
-.misc@push type \\n[li*type]
-.misc@push li-spc \\n[li*li-spc]
-.ds li*mark-list!\\n[li*lvl] \\*[li*mark]
-.nr li*lvl +1
-.\"
-.nr li*tind (n;0\\$1)\" text-indent
-.nr li*mind (n;0\\$2)\" mark-indent
-.nr li*pad (n;0\\$3)\" pad
-.nr li*type 0\\$4\" type
-.ds li*mark \\$5\" mark
-.ie !'\\$6'' .nr li*li-spc \\$6\" LI-space
-.el .nr li*li-spc 1
-.ie !'\\$7'' .nr li*lb-spc \\$6\" LB-space
-.el .nr li*lb-spc 0
-.\" init listcounter
-.nr li*cnt!\\n[li*lvl] 0 1
-.\" assign format
-.af li*cnt!\\n[li*lvl] 1
-.if \\n[li*type] .if !'\\*[li*mark]'' .af li*cnt!\\n[li*lvl] \\*[li*mark]
-.\"
-.if \\n[li*lb-spc] .SP (u;\\n[li*lb-spc]*\\n[Lsp])
-.in +\\n[li*tind]u
-..
-.\"---------------
-.de LI
-.if \\n[li*lvl]<1 .@error "LI:no lists active"
-.if \\n[li*li-spc]&(\\n[Ls]>=\\n[li*lvl]) .SP (u;\\n[li*li-spc]*\\n[Lsp])
-.ne 2v
-.\"
-.ds li*c-mark \\*[li*mark]
-.nr li*cnt!\\n[li*lvl] +1
-.if \\n[li*type]=1 .ds li*c-mark \\n[li*cnt!\\n[li*lvl]].
-.if \\n[li*type]=2 .ds li*c-mark \\n[li*cnt!\\n[li*lvl]])
-.if \\n[li*type]=3 .ds li*c-mark (\\n[li*cnt!\\n[li*lvl]])
-.if \\n[li*type]=4 .ds li*c-mark [\\n[li*cnt!\\n[li*lvl]]]
-.if \\n[li*type]=5 .ds li*c-mark <\\n[li*cnt!\\n[li*lvl]]>
-.if \\n[li*type]=6 .ds li*c-mark {\\n[li*cnt!\\n[li*lvl]]}
-.if \\n[.$]=1 .ds li*c-mark \\$1
-.ie \\n[.$]=2 \{\
-. ie (\\$2=2):(\\n[Limsp]=0) .ds li*c-mark \\$1\\*[li*c-mark]
-. el .ds li*c-mark \\$1\ \\*[li*c-mark]
-.\}
-.\"
-.\" determine where the text begins
-.nr li*text-begin \\n[li*tind]>?\w@\\*[li*c-mark]\ @
-.nr x \w@\\*[li*c-mark]\ @
-.\"
-.\" determine where the mark begin
-.ie !\\n[li*pad] .nr li*in \\n[li*mind]
-.el .nr li*in \\n[li*text-begin]-\\n[li*pad]-\w@\\*[li*c-mark]@
-.if !\\n[li*in] .nr li*in 0
-.\"
-.ti -\\n[li*tind]u
-.\" no indentation if hanging indent
-.if (\w@\\*[li*c-mark]@=0)&((\\n[.$]=0):(\w@\\$1@=0)) .nr li*text-begin 0
-\Z'\&\h'\\n[li*in]u'\\*[li*c-mark]'\h'\\n[li*text-begin]u'\&\c
-.if \\n[li*type]=-1 .br
-..
-.\"
-.\"-------------
-.de li@pop
-.nr li*lvl -1
-.misc@pop-nr cind li*tmp
-.in \\n[li*tmp]u
-.misc@pop-nr tind li*tind
-.misc@pop-nr mind li*mind
-.misc@pop-nr pad li*pad
-.misc@pop-nr type li*type
-.misc@pop-nr li-spc li*li-spc
-.ds li*mark \\*[li*mark-list!\\n[li*lvl]]
-..
-.de LE
-.if \\n[li*lvl]<1 .@error "LE:mismatched"
-.li@pop
-.if '\\$1'1' .SP \\n[Lsp]u
-..
-.\"-------------
-.\" list status clear.
-.\" terminate all lists to level i
-.de LC
-.ie \\n[.$]<1 .nr li*i 0
-.el .nr li*i \\$1
-.if \\n[li*i]>\\n[li*lvl] .@error "LC: incorrect argument: \\n[li*i] (too big)"
-.while \\n[li*lvl]>\\n[li*i] .li@pop
-.nr par@ind-flag 0
-..
-.\"-------------
-.de AL
-.if \\n[.$]>3 .@error "AL: too many arguments"
-.if \\n[D]>2 .tm AL $*
-.ie \\n[.$]<=1 .LB \\n[Li] 0 2 1 "\\$1"
-.el \{\
-. ie \\n[.$]=2 .LB 0\\$2 0 2 1 "\\$1"
-. el \{\
-. ie !'\\$2'' .LB \\$2 0 2 1 "\\$1" 0 1
-. el .LB \\n[Li] 0 2 1 "\\$1" 0 1
-. \}
-.\}
-..
-.de ML
-.if \\n[.$]>3 .@error "ML: too many arguments"
-.if \\n[D]>2 .tm ML $*
-.nr li*ml-width \w@\\$1@u+1n
-.if \\n[.$]<2 .LB \\n[li*ml-width]u 0 1 0 "\\$1"
-.if \\n[.$]=2 .LB 0\\$2 0 1 0 "\\$1"
-.if \\n[.$]=3 \{\
-. ie '\\$2'' .LB \\n[li*ml-width]u 0 1 0 "\\$1" 0 1
-. el .LB \\n[Li] 0 1 0 "\\$1" 0 1
-.\}
-..
-.de VL
-.if \\n[D]>2 .tm VL $*
-.if \\n[.$]>3 .@error "VL: too many arguments"
-.if \\n[.$]<1 .@error "VL: missing text-indent"
-.ie \\n[.$]<3 .LB 0\\$1 0\\$2 0 0
-.el .LB 0\\$1 0\\$2 0 0 \& 0 1
-..
-.\" Bullet (for .BL)
-.de BL
-.if \\n[D]>2 .tm BL $*
-.ds BU \s-2\(bu\s0
-.if \\n[.$]>2 .@error "BL: too many arguments"
-.if \\n[.$]<1 .LB \\n[Pi] 0 1 0 \\*[BU]
-.if \\n[.$]=1 .LB 0\\$1 0 1 0 \\*[BU]
-.if \\n[.$]=2 \{\
-. ie '\\$1'' .LB \\n[Pi] 0 1 0 \\*[BU] 0 1
-. el .LB 0\\$1 0 1 0 \\*[BU] 0 1
-.\}
-..
-.de DL
-.if \\n[D]>2 .tm DL $*
-.if \\n[.$]>2 .@error "DL: too many arguments"
-.if \\n[.$]<1 .LB \\n[Pi] 0 1 0 \(em
-.if \\n[.$]=1 .LB 0\\$1 0 1 0 \(em
-.if \\n[.$]=2 \{\
-. ie '\\$1'' .LB \\n[Pi] 0 1 0 \(em 0 1
-. el .LB 0\\$1 0 1 0 \(em 0 1
-.\}
-..
-.de RL
-.if \\n[D]>2 .tm RL $*
-.if \\n[.$]>2 .@error "RL: too many arguments"
-.if \\n[.$]<1 .LB 6 0 2 4
-.if \\n[.$]=1 .LB 0\\$1 0 2 4
-.if \\n[.$]=2 \{\
-. ie '\\$1'' .LB 6 0 2 4 1 0 1
-. el .LB 0\\$1 0 2 4 1 0 1
-.\}
-..
-.\" Broken Variable List. As .VL but text begin on the next line
-.de BVL
-.if \\n[D]>2 .tm BVL $*
-.if \\n[.$]>3 .@error "BVL: too many arguments"
-.if \\n[.$]<1 .@error "BVL: missing text-indent"
-.ie \\n[.$]<3 .LB 0\\$1 0\\$2 0 -1
-.el .LB 0\\$1 0\\$2 0 -1 \& 0 1
-..
-.\" ####### module tbl #######################################
-.\" This module is copied from groff_ms and modified for mgm.
-.\" Yes, it does not resemble the original anymore :-).
-.\" Don't know if I missed something important.
-.\" Groff_ms is written by James Clark.
-.nr tbl*have-header 0
-.nr tbl*header-written 0
-.de TS
-.br
-.if ''\\n[.z]' .SP
-.if '\\$1'H' .di tbl*header-div
-..
-.de tbl@top-hook
-.if \\n[tbl*have-header] \{\
-. ie \\n[.t]-\\n[tbl*header-ht]-1v .tbl@print-header
-. el .sp \\n[.t]u
-.\}
-..
-.de tbl@bottom-hook
-.if \\n[tbl*have-header] \{\
-. nr T. 1
-.\" draw bottom and side lines of boxed tables.
-. T#
-.\}
-.nr tbl*header-written 0
-..
-.de tbl@print-header
-.ev tbl*ev
-'nf
-.tbl*header-div
-.ev
-.mk #T
-.nr tbl*header-written 1
-..
-.de TH
-.if '\\$1'N' @error TH: N not implemented yet. Sorry.
-.ie '\\n[.z]'tbl*header-div' \{\
-. nr T. 0
-. T#
-. br
-. di
-. nr tbl*header-ht \\n[dn]
-. ne \\n[dn]u+1v
-. nr tbl*have-header 1
-. ie '\\$1'N' .if !\\n[tbl*header-written] .tbl@print-header
-. el .tbl@print-header
-.\}
-.el .@error ".TH without .TS H"
-..
-.de TE
-.ie '\\n(.z'tbl*header-div' .@error ".TS H but no .TH before .TE"
-.el \{\
-. nr tbl*have-header 0
-.\}
-.\" reset tabs
-.TAB
-..
-.de T&
-..
-.\" ####### module pic #######################################
-.de PS
-.nr pic*in 0
-.br
-.SP .5
-.ie \\n[.$]<2 .@error "PS: bad arguments. Probably not processed with pic."
-.el \{\
-. if !\\n[ds*lvl] .ne (u;\\$1)+1v
-.\" should be contained between .DS/.DE
-.if r ds*format \{\
-. if \\n[ds*lvl]&((\\n[ds*format]=2):(\\n[ds*format]=3)) \{\
-. nr pic*in \\n[.i]
-.\" . in +(u;\\n[.l]-\\n[.i]-\\$2/2)
-. \}
-. \}
-.\}
-..
-.de PE
-.init@reset
-.SP .5
-..
-.\" ####### module eq #######################################
-.\"
-.nr eq*number 0 1
-.ds eq*label
-.de EQ
-.ds eq*label "\\$1
-..
-.de eq@check
-.if !'\\*[eq*label]'' \{\
-. mk
-' sp (u;\\$1/2-.45v)
-. ie (\\n[Eq]%2) \{\
-. \" label to the left
-\h'|0'\\*[eq*label]\c
-. \}
-. el \{\
-. \" label to the right
-\h'|\\n[.l]u'\\*[eq*label]
-. \}
-. rt
-.\}
-.ds eq*label
-..
-.de EN
-..
-.\"########### module toc ###################
-.\" table of contents
-.nr toc*slevel 1
-.nr toc*spacing \n[Lsp]u
-.nr toc*tlevel 2
-.nr toc*tab 0
-.\"-----------
-.\" Table of contents with friends (module lix)
-.de TC
-.br
-.\" print any pending displays and references
-.df@print-float 3
-.if \\n[ref*flag] .RP 0 1
-.\"
-.if \w@\\$1@>0 .nr toc*slevel \\$1
-.if \w@\\$2@>0 .nr toc*spacing (u;\\$2*\\n[Lsp])
-.if \w@\\$3@>0 .nr toc*tlevel \\$3
-.if \w@\\$4@>0 .nr toc*tab \\$4
-.if \\n[pg*cols-per-page]>1 .1C
-.ds H1txt \\*[Licon]
-.ds Tcst co
-.pg@clear-hd
-.EF ""
-.OF ""
-.pg@next-page
-.\"-------------
-.if d Ci .toc@read-Ci \\*[Ci]
-.nf
-.in 0
-.ie \\n[Oc] .hd@set-page 1
-.el \{\
-. nr toc*pn 1 1
-. af toc*pn i
-. aln ;g toc*pn
-. PF "''\\\\\\\\n[toc*pn]''"
-. am pg@header
-. nr toc*pn +1
-\\..
-.\}
-.nr toc*i 4 1
-.while \\n+[toc*i]<10 \{\
-. if !'\\$\\n[toc*i]'' \{\
-. ce
-\\$\\n[toc*i]
-. br
-. \}
-.\}
-.if \\n[.$]<=4 .if d TX .TX
-.ie d TY .if \\n[.$]<=4 .TY
-.el \{\
-. ce
-\\*[Licon]
-. br
-. SP 3
-.\}
-.if d toc*list .toc*list
-.br
-.\" print LIST OF XXX
-.if d lix*dsfg .lix@print-ds fg FG "\\*[Lf]" \\n[.$]
-.if d lix*dstb .lix@print-ds tb TB "\\*[Lt]" \\n[.$]
-.if d lix*dsec .lix@print-ds ec EC "\\*[Le]" \\n[.$]
-.if d lix*dsex .lix@print-ds ex EX "\\*[Lx]" \\n[.$]
-..
-.\"-----------
-.\" .toc@read-Ci lev1 lev2 lev3 lev4 ... lev7
-.de toc@read-Ci
-.nr toc*i 0 1
-.while \\n+[toc*i]<8 \{\
-. nr toc*hl!\\n[toc*i] \\$\\n[toc*i]
-.\}
-..
-.\"-----------
-.de toc@entry
-.ie \\n[Sectp] \{\
-. toc@save \\$1 "\\*[hd*mark]" "\\$2" \\*[hd*sect-pg]
-.\}
-.el .toc@save \\$1 "\\*[hd*mark]" "\\$2" \\n[%]
-..
-.als )E toc@entry
-.\"-----------
-.de toc@save
-.\" collect maxsize of mark if string Ci don't exist.
-.if !d Ci \{\
-. if !r toc*hl!\\$1 .nr toc*hl!\\$1 0
-. if \\n[toc*hl!\\$1]<=\w@\\$2@ \{\
-. nr toc*hl!\\$1 \w@\\$2@u
-. \}
-.\}
-.am toc*list
-.\" .toc@set level headernumber text pagenr
-.toc@set \\$1 "\\$2" "\\$3" \\$4
-\\..
-..
-.\"-----------
-.\" level mark text pagenumber
-.de toc@set
-.if \\$1<=\\n[toc*slevel] .SP \\n[toc*spacing]u
-.na
-.fi
-.nr toc*ind 0
-.nr toc*i 0 1
-.ie d Ci \{\
-. nr toc*ind +\\n[toc*hl!\\$1]u
-.\}
-.el \{\
-. while \\n+[toc*i]<\\$1 \{\
-. nr toc*ind +\\n[toc*hl!\\n[toc*i]]u
-. \}
-.\}
-.nr toc*text \\n[toc*ind]u+\\n[toc*hl!\\$1]u
-.in \\n[toc*text]u
-.ti -\\n[toc*hl!\\$1]u
-.\"
-.\" length of headernum space
-.nr toc*i \\n[toc*hl!\\$1]-\w@\\$2@
-.\"
-.ll \\n[@ll]u-\w@\\$4@u-2m
-.ne 2v
-.\" ragged right ---------------------------------
-.ie \\$1>\\n[toc*tlevel] \{\
-\\$2
-. sp -1
-\\$3\ \ \ \\$4
-. br
-.\}
-.el \{\
-. \" unnumbered heading --------------------
-. ie '\\$2'' \{\
-. in \\n[toc*ind]u
-\\$3\h'1m'
-. \}
-. \" normal heading ------------------------
-. el \{\
-\\$2
-. sp -1
-\\$3\h'1m'
-. \}
-. ll \\n[@ll]u
-. sp -1
-. nr toc*sep (u;\\n[.l]-\\n[.n]-\\n[.i]-\w@\\$4@)-1m
-\h'|\\n[.n]u'\l'\\n[toc*sep]u.'\h'1m'\\$4
-.\}
-.ll \\n[@ll]u
-..
-.\"########################### module lix ############################
-.\" LIST OF figures, tables, exhibits and equations
-.nr lix*fg-nr 0 1
-.nr lix*tb-nr 0 1
-.nr lix*ec-nr 0 1
-.nr lix*ex-nr 0 1
-.aln Fg lix*fg-nr
-.aln Tb lix*tb-nr
-.aln Ec lix*ec-nr
-.aln Ex lix*ex-nr
-.\"------------
-.de FG
-.lix@print-line fg Lf \\n+[lix*fg-nr] "\\$1" "\\$2" "\\$3" "\\$4"
-..
-.de TB
-.lix@print-line tb Lt \\n+[lix*tb-nr] "\\$1" "\\$2" "\\$3" "\\$4"
-..
-.de EC
-.lix@print-line ec Le \\n+[lix*ec-nr] "\\$1" "\\$2" "\\$3" "\\$4"
-..
-.de EX
-.lix@print-line ex Lx \\n+[lix*ex-nr] "\\$1" "\\$2" "\\$3" "\\$4"
-..
-.\"------------
-.\" print line with 'figure' in the text
-.\" type stringvar number text override flag refname
-.de lix@print-line
-.ds lix*text "\\$4
-.\"
-.ie \\n[Sectf] .ds lix*numb \\n[H1]-\\$3
-.el .ds lix*numb \\$3
-.\"
-.ie !\\n[Of] .ds lix*ds-form .\ \ \"
-.el .ds lix*ds-form "\ \(em\ \"
-.nr lix*in \\n[.i]
-.ds lix*label \\*[Li\\$1]\ \\*[lix*numb]\\*[lix*ds-form]
-.if !'\\$5'' \{\
-. if !0\\$6 .ds lix*label \\*[Li\\$1]\ \\$5\\*[lix*numb]\\*[lix*ds-form]
-. if 0\\$6=1 .ds lix*label \\*[Li\\$1]\ \\*[lix*numb]\\$5\\*[lix*ds-form]
-. if 0\\$6=2 .ds lix*label \\*[Li\\$1]\ \\$5\\*[lix*ds-form]
-.\}
-.\" print line if not between DS/DE
-.ie \\n[ds*lvl]<1&\\n[df*float]=0 \{\
-. lix@print-text "\\*[lix*label]" "\\*[lix*text]" \\$1 \\$2 \\$7
-.\}
-.el \{\
-. lix@embedded-text "\\*[lix*label]" "\\*[lix*text]" \\$1 \\$2 \\$7
-.\}
-.\"
-..
-.\"-----------
-.\" label text type stringvar refname
-.de lix@print-text
-.ie \\n[Sectp] .ds lix*pgnr \\*[hd*sect-pg]
-.el .ds lix*pgnr \\n[%]
-.SP \\n[Lsp]u
-.misc@ev-keep lix
-.init@reset
-.br
-.ie (\w@\\$1\\$2@)>(\\n[.l]-\\n[.i]) \{\
-. in +\w@\\$1@u
-. ti 0
-.\}
-.el .ce 1
-\fB\\$1\fP\\$2
-.br
-.ev
-.\" save line for LIST OF XXX, wth is the width of the label
-.if !r lix*wth\\$3 .nr lix*wth\\$3 0
-.\" find the maximum width
-.if \w@\\*[lix*label]@>\\n[lix*wth\\$3] .nr lix*wth\\$3 \w@\\*[lix*label]@
-.if \\n[\\$4] .lix@ds-save \\$3 \\*[lix*pgnr] "\\*[lix*text]" "\\*[lix*label]"
-.\" save reference to the figure
-.if !'\\$5'' .SETR \\$5 \\*[lix*numb]
-..
-.\" hide printout until diversion is evaluated
-.de lix@embedded-text
-\!.ie \\\\n[Sectp] .ds lix*pgnr \\\\*[hd*sect-pg]
-\!.el .ds lix*pgnr \\\\n[%]
-\!.SP \\\\n[Lsp]u
-\!.misc@ev-keep lix
-\!.ll \\n[.l]u
-\!.init@reset
-\!.fi
-\!.ie (\w@\\$1\\$2@)>(\\\\n[.l]-\\\\n[.i]) \{\
-. in +\w@\\$1@u
-\!. ti 0
-\!\fB\\$1\fP\\$2
-\!.\}
-\!.el \{\
-. ce 1
-\!\fB\\$1\fP\\$2
-\!.\}
-\!.br
-\!.ev
-.\" save line for LIST OF XXX, wth is the width of the label
-\!.if !r lix*wth\\$3 .nr lix*wth\\$3 0
-.\" find the maximum width
-\!.if \w@\\*[lix*label]@>\\\\n[lix*wth\\$3] .nr lix*wth\\$3 \w@\\*[lix*label]@
-\!.if \\\\n[\\$4] .lix@ds-save \\$3 \\\\*[lix*pgnr] "\\*[lix*text]" "\\*[lix*label]"
-.\" save reference to the figure
-\!.if !'\\$5'' .SETR \\$5 \\*[lix*numb]
-..
-.\"------------
-.\" print complete list of XXXX
-.de lix@print-ds
-.\" arg: fg,tb,ec,ex text
-.ds H1txt \\$3
-.ds Tcst \\$1
-.if !\\n[Cp] .pg@next-page
-.\" print LIST OF XXXX
-.\" execute user-defined macros
-.if \\$4<=4 .if d TX\\$2 .TX\\$2
-.ie d TY\\$2 .if \\$4<=4 .TY\\$2
-.el \{\
-. ce
-\\$3
-. SP 3
-.\}
-.in \\n[lix*wth\\$1]u
-.fi
-.lix*ds\\$1
-..
-.\"------------
-.\" save line of list in macro
-.de lix@ds-save
-.\" type pagenumber text
-.am lix*ds\\$1
-.lix@dsln \\$1 \\$2 "\\$3" "\\$4" \\$5
-\\..
-..
-.\"------------
-.\" print appended macro
-.\" lix@dsln type pagenumber text headernr
-.de lix@dsln
-.nr lix*i \\n[lix*wth\\$1]-\w@\\$4@
-.ne 4v
-.ll \\n[@ll]u-\w@\\$4@u-\w@\\$2@u-2m
-.ti -\\n[lix*wth\\$1]u
-\\$4
-.sp -1
-\\$3\h'1m'
-.sp -1
-.ll
-.nr lix*sep (u;\\n[.l]-\\n[.n]-\\n[.i]-\w@\\$2@)-1m
-\h'|\\n[.n]u'\l'\\n[lix*sep]u.'\h'1m'\\$2
-.SP \\n[toc*spacing]u
-..
-.\"########################### module fnt ############################
-.\" some font macros.
-.de R
-.ft R
-.ul 0
-..
-.\"-----------
-.de fnt@switch
-.ul 0
-.ds fnt*tmp
-.nr fnt*prev \\n[.f]
-.nr fnt*i 2 1
-.while \\n+[fnt*i]<=\\n[.$] \{\
-. if \\n[fnt*i]>3 .as fnt*tmp \,
-. ie (\\n[fnt*i]%2)=1 .as fnt*tmp \\$1\\$[\\n[fnt*i]]
-. el .as fnt*tmp \\$2\\$[\\n[fnt*i]]
-. if \\n[fnt*i]<\\n[.$] .as fnt*tmp \/
-.\}
-\&\\*[fnt*tmp]\f[\\n[fnt*prev]]
-..
-.\"-----------
-.de B
-.ie \\n[.$] .fnt@switch \fB \f[\\n[.f]] \\$@
-.el .ft B
-..
-.de I
-.ie \\n[.$] .fnt@switch \fI \f[\\n[.f]] \\$@
-.el .ft I
-..
-.de IB
-.if \\n[.$] .fnt@switch \fI \fB \\$@
-..
-.de BI
-.if \\n[.$] .fnt@switch \fB \fI \\$@
-..
-.de IR
-.if \\n[.$] .fnt@switch \fI \fR \\$@
-..
-.de RI
-.if \\n[.$] .fnt@switch \fR \fI \\$@
-..
-.de RB
-.if \\n[.$] .fnt@switch \fR \fB \\$@
-..
-.de BR
-.if \\n[.$] .fnt@switch \fB \fR \\$@
-..
-.\"########################### module box ############################
-.\" draw a box around some text. Text will be kept on the same page.
-.\"
-.nr box*ll 0
-.\" .B1 and .B2 works like .DS
-.de B1
-.if \\n[box*ll] .@error "B1: missing B2"
-.nr box*ll \\n[.l]
-.nr box*ind \\n[.i]
-.nr box*hyp \\n[.hy]
-.nr box*wid \\n[.l]-\\n[.i]
-.\"
-.\" jump to new environment.
-.ev box*ev
-.di box*div
-.ps \\n[@ps]u
-.vs \\n[@vs]u
-.in 1n
-.ll (u;\\n[box*wid]-1n)
-.hy \\n[.hy]
-..
-.de B2
-.if !\\n[box*ll] .@error "B2: missing B1"
-.br
-.di
-.nr box*height \\n[dn]
-.ne \\n[dn]u+1v
-.ll \\n[box*ll]u
-.in \\n[box*ind]u
-.nr box*y-pos \\n[.d]u
-.nf
-.box*div
-.fi
-\v'-1v+.25m'\
-\D'l \\n[box*wid]u 0'\
-\D'l 0 -\\n[box*height]u'\
-\D'l -\\n[box*wid]u 0'\
-\D'l 0 \\n[box*height]u'
-.br
-.sp -1
-.ev
-.sp .20v
-.in \\n[box*ind]u
-.ll \\n[box*ll]u
-.rm box*div
-.nr box*ll 0
-..
-.\"########################### module ref ############################
-.nr ref*nr 0 1
-.aln :R ref*nr
-.nr ref*nr-width 5n
-.nr ref*flag 0 \" for end-of-text
-.ds Rf \v'-.4m'\s-3[\\n+[ref*nr]]\s0\v'.4m'
-.\"
-.\" start reference
-.\"------------
-.de RS
-.if !''\\$1' .ds \\$1 \v'-.4m'\s-3[\\n[ref*nr]]\s0\v'.4m'
-.nr ref*flag 1
-.am ref*mac
-.ref@start-print \\n[ref*nr]
-\\..
-.eo
-.am ref*mac RF
-..
-.\"------------
-.de RF
-.ec
-.am ref*mac
-.ref@stop-print
-\\..
-..
-.\"------------
-.de ref@start-print
-.di ref*div
-.in \\n[ref*nr-width]u
-.ti -(\w@\\$1.@u+1n)
-\\$1.
-.sp -1
-..
-.de ref@stop-print
-.br
-.di
-.ne \\n[dn]u
-.ev ref*ev2
-.nf
-.ref*div
-.ev
-.rm ref*div
-.if \\n[Ls] .SP \\n[Lsp]u
-..
-.\"-----------
-.de RP
-.if !d ref*mac .@error "RP: No references!"
-.nr ref*i 0\\$2
-.if \\n[ref*i]<2 .SK
-.SP 2
-.ref@print-refs
-.if 0\\$1<1 .nr ref*nr 0 1
-.if ((\\n[ref*i]=0):(\\n[ref*i]=2)) .SK
-..
-.\"-----------
-.\" called by end-of-text!
-.de ref@eot-print
-.\".if \\n[ref*flag] \{
-.if d ref*mac \{\
-. if \\n[D]>2 .tm Print references, called by eot
-. nr ref*flag 0
-. br
-. misc@ev-keep ne
-. init@reset
-\c
-' bp
-. ev
-. ref@print-refs
-.\}
-..
-.\"-----------
-.\" prints the references
-.de ref@print-refs
-.toc@save 1 "" "\\*[Rp]" \\n[%]
-.ce
-\fI\\*[Rp]\fP
-.sp
-.nr ref*ll \\n[.l]
-.misc@ev-keep ref*ev
-.ll \\n[ref*ll]u
-.in 0
-.ref*mac
-.in
-.rm ref*mac
-.ev
-.nr ref*flag 0 1
-..
-.\"########################### module app ############################
-.\"
-.nr app*nr 0 1
-.af app*nr A
-.nr app*dnr 0 1
-.nr app*flag 0
-.\"------------
-.\" .APP name text
-.\" name == "" -> autonumber
-.de APP
-.\" .if \\n[.$]<2 .@error "APP: too few arguments"
-.app@set-ind "\\$1"
-.\"
-.ds Tcst ap
-.ds Apptxt \\$2
-.\"
-.ie \\n[Aph] .app@header \\*[app*ind] "\\$2"
-.el .bp
-.app@index "\\*[app*ind]" "\\$2"
-..
-.\"------------
-.\" .APPSK name pages text
-.\" name == "" -> autonumber
-.de APPSK
-.if \\n[.$]<2 .@error "APPSK: too few arguments"
-.app@set-ind "\\$1"
-.\"
-.ds Tcst ap
-.ds Apptxt \\$3
-.\"
-.ie \\n[Aph] .app@header \\*[app*ind] "\\$3"
-.el .bp
-.app@index "\\*[app*ind]" "\\$3"
-.pn +\\$2
-..
-.\"------------
-.de app@set-ind
-.ie \w@\\$1@ .ds app*ind \\$1
-.el \{\
-. if !\\n[app*flag] \{\
-. nr H1 0 1
-. af H1 A
-. af H1h A
-. nr app*flag 1
-. \}
-. ds app*ind \\n+[app*nr]
-. nr H1 \\n+[app*dnr]
-. nr H1h \\n[app*dnr]
-.\}
-.\" clear lower counters
-.nr app*i 1 1
-.while \\n+[app*i]<8 .nr H\\n[app*i] 0 1
-..
-.\"------------
-.de app@index
-.toc@save 1 "" "\\*[App] \\$1: \\$2" \\n[%]
-..
-.\"------------
-.\" app@heaer name text
-.de app@header
-.bp
-.SP (u;\\n[Lsp]*4)
-.ce 1
-\s+4\fB\\*[App]\ \\$1\fP\s0
-.SP (u;\\n[Lsp]*2)
-.if \w@\\$2@<\\n[.l] .ce 1
-\fB\s+2\\$2\s0\fP
-.SP (u;\\n[Lsp]*4)
-..
-.als APPX app@header
-.\"########################### module cov ############################
-.\" title stored in diversion cov*title
-.\" abstract stored in diversion cov*abstract
-.\" arg to abstract stored in cov*abs-arg
-.\" indent stored in cov*abs-ind
-.\" number of authors stored in cov*au
-.\" author(s) stored in cov*au!x!y
-.\" author(s) title stored in cov*at!x!y
-.\" x is the author-index [1-cov*au], y is the argument-index [1-9].
-.\" author(s) firm stored in cov*firm
-.\" new date (if .ND exists) is stored in cov*new-date
-.\"
-.\"
-.ds cov*abs-name ABSTRACT
-.\"
-.nr cov*au 0
-.de TL
-.rm IA IE WA WE LO LT
-.if \\n[.$]>0 .ds cov*title-charge-case \\$1
-.if \\n[.$]>1 .ds cov*title-file-case \\$2
-.pg@disable-top-trap
-.eo
-.de cov*title AU
-..
-.\"-------------------
-.de cov@title-end
-.ec
-..
-.\"-------------------
-.\" .AU name [initials [loc [dept [ext [room [arg [arg [arg]]]]]]]]
-.de AU
-.cov@title-end
-.pg@disable-top-trap
-.nr cov*au +1
-.nr cov*i 0 1
-.ds cov*au!\\n[cov*au]!1
-.while \\n[.$]>=\\n+[cov*i] \{\
-. ds cov*au!\\n[cov*au]!\\n[cov*i] "\\$[\\n[cov*i]]
-.\}
-.if (\\n[.$]>=3)&(\w@\\$3@) \{\
-. if d cov*location-\\$3] \{\
-. ds cov*au!3!\\n[cov*au] \\*[cov*location-\\$3]
-. \}
-.\}
-..
-.\"-------------------
-.\" .AT title1 [title2 [... [title9] ]]]]
-.\" Well, thats all that COVEND look for.
-.\" Must appear directly after .AU
-.de AT
-.if \\n[.$]<1 .@error "AT: no arguments"
-.nr cov*i 0 1
-.while \\n[.$]>=\\n+[cov*i] \{\
-. ds cov*at!\\n[cov*au]!\\n[cov*i] "\\$[\\n[cov*i]]
-.\}
-..
-.\"-------------------
-.de AF
-.cov@title-end
-.ds cov*firm \\$1
-..
-.de AST
-.ds cov*abs-name \\$1
-..
-.de AS
-.pg@disable-top-trap
-.if d cov*abstract .@error "AS: only one abstract allowed"
-.if !''\\n[.z]' .@error "AS: no diversion allowed (previous .AS?)"
-.nr cov*abs-arg 0\\$1
-.nr cov*abs-ind (n;0\\$2)
-.de cov*abstract AE
-..
-.de AE
-..
-.\" fixed for 2000, now uses \n[year].
-.de ISODATE
-. \" support for ISO-date
-. nr cov*mm \\n[mo]
-. nr cov*dd \\n[dy]
-. af cov*mm 01
-. af cov*dd 01
-. ie '0'\\$1' \{\
-. ds cov*new-date \\*[MO\\n[mo]] \\n[dy], \\n[year]
-. \}
-. el \{\
-. ds cov*new-date \\n[year]-\\n[cov*mm]-\\n[cov*dd]
-. \}
-..
-.ISODATE 0
-.als DT cov*new-date
-.de ND
-.ds cov*new-date \\$1
-..
-.\" switch to ISO-date if register Iso exist: YYYY-MM-DD
-.if r Iso .ISODATE 1
-.\"-------------------
-.\" save technical numbers.
-.de TM
-.nr cov*i 0 1
-.while \\n[.$]>=\\n+[cov*i] .ds cov*mt-tm!\\n[cov*i] \\$[\\n[cov*i]]
-.nr cov*mt-tm-max \\n[.$]
-..
-.\"-----------------------
-.\" cover sheet
-.\" the file must have the following last lines (somewhere):
-.\" .pg@enable-top-trap
-.\" .bp 1
-.\" .pg@enable-trap
-.ds cov*mt-file!0 0.MT
-.ds cov*mt-file!1 0.MT
-.ds cov*mt-file!2 0.MT
-.ds cov*mt-file!3 0.MT
-.ds cov*mt-file!4 4.MT
-.ds cov*mt-file!5 5.MT
-.ds cov*mt-file!6 0.MT
-.\"------------
-.de MT
-.ie \\n[.$] \{\
-. ie d cov*mt-file!\\$1 .ds cov*mt-type \\$1
-. el .ds cov*mt-type 6
-.\}
-.el .ds cov*mt-type 1
-.ds cov*mt-addresse "\\$2
-.ds cov*mt-type-text "\\$1
-.ie d @language .ds cov*str mm/\\*[@language]_
-.el .ds cov*str mm/
-.mso \\*[cov*str]\\*[cov*mt-file!\\*[cov*mt-type]]
-..
-.de COVER
-.ie !\\n[.$] .ds cov*cov-type ms
-.el .ds cov*cov-type \\$1
-.pg@disable-top-trap
-.ie d @language .ds cov*str mm/\\*[@language]_\\*[cov*cov-type].cov
-.el .ds cov*str mm/\\*[cov*cov-type].cov
-.mso \\*[cov*str]
-..
-.\"########################### module qrf ############################
-.\" forward and backward reference thru special files.
-.\"
-.\" check if stderr-method is wanted
-.\" This was needed when I discovered that groff was considered unsafe
-.\" and groff -U didn't work. It's a workaround like the original
-.\" index method, but not in my view elegant enough.
-.\"
-.\" init reference system
-.de INITR
-.ds qrf*file \\$1.qrf
-.nr qrf*pass 2
-.if \\n[D]>1 .tm INITR: source \\*[qrf*file]
-.ie \\n[Ref] \{\
-. tm .\\\\" Rfilename: \\*[qrf*file]
-.\}
-.el 'so \\*[qrf*file]
-..
-.\"---------------
-.\" set a reference.
-.de SETR
-.if \\n[.$]<1 .@error "SETR:reference name missing"
-.if !r qrf*pass .tm "SETR: No .INITR in this file"
-.if \\n[Ref] \{\
-. ds qrf*name qrf*ref-\\$1
-. if \\n[D]>2 .tm SETR: ref \\*[qrf*name]=\\*[hd*mark],\\n[%]
-. \" heading-number
-. ds \\*[qrf*name]-hn \\*[hd*mark]
-. \" page-number
-. ds \\*[qrf*name]-pn \\n[%]
-. \"
-. if \\n[Ref] \{\
-. tm .ds \\*[qrf*name]-hn \\*[hd*mark]
-. tm .ds \\*[qrf*name]-pn \\n[%]
-. if !'\\$2'' .tm .ds \\*[qrf*name]-xx \\$2
-. \}
-.\}
-..
-.\"---------------
-.\" get misc-string
-.\" If two arg -> set var. arg to misc-string.
-.de GETST
-.if \\n[.$]<1 .@error "GETST:reference name missing"
-.if !r qrf*pass .tm "GETST: No .INITR in this file"
-.ds qrf*name qrf*ref-\\$1
-. if d \\*[qrf*name]-xx \{\
-. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-xx]
-. el \\*[\\*[qrf*name]-xx]\c
-. \}
-.\}
-..
-.\"---------------
-.\" get header-number
-.\" If two arg -> set var. arg to header-number.
-.de GETHN
-.if \\n[.$]<1 .@error "GETHN:reference name missing"
-.if !r qrf*pass .tm "GETHN: No .INITR in this file"
-.ds qrf*name qrf*ref-\\$1
-.if d \\*[qrf*name]-hn \{\
-. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-hn]
-. el \\*[\\*[qrf*name]-hn]\c
-.\}
-..
-.\"---------------
-.\" get page-number
-.\" If two arg -> set var. arg to page-number.
-.de GETPN
-.if \\n[.$]<1 .@error "GETPN:reference name missing"
-.if !r qrf*pass .tm "GETPN: No .INITR in this file"
-.ds qrf*name qrf*ref-\\$1
-.if d \\*[qrf*name]-pn \{\
-. ie \\n[.$]>1 .ds \\$2 \\*[\\*[qrf*name]-pn]
-. el \\*[\\*[qrf*name]-pn]\c
-.\}
-..
-.\"----------
-.de GETR
-.if \\n[.$]<1 .@error "GETR:reference name missing"
-.ie !r qrf*pass \{\
-. tm "GETR: No .INITR in this file"
-.\}
-.el \{\
-. GETHN \\$1 Qrfh
-. GETPN \\$1 Qrfp
-\\*[Qrf]
-.\}
-..
-.\"########################### module ind ############################
-.\" Support for mgs-style indexing, borrowed from mgs.
-.de IX
-.tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[%]
-..
-.\"--------------------
-.\" Another type of index system
-.\" INITI type filename [macro]
-.de INITI
-.if \\n[.$]<1 .@error "INITI:type missing"
-.\" ignore if INITI has already been used
-.if \\n[.$]>1 \{\
-. if d ind*file .@error "INITI:file already set"
-. ds ind*file \\$2.ind
-. if \\n[D]>1 .tm INITI: source \\*[ind*file]
-.\}
-.if !d ind*file .@error "INITI:file not specified"
-.ds ind*type \\$1
-.if \\n[Ref] \{\
-. if \\n[.$]>2 .tm .\\\\" Imacro: \\$3
-.\}
-..
-.\"---------------
-.de IND
-.if !d ind*file .@error "IND: No active INITI"
-.if \\n[D]>1 .tm IND: type=\\*[ind*type]
-.ds ind*ref
-.if '\\*[ind*type]'N' .ds ind*ref \\n[%]
-.if '\\*[ind*type]'H' .ds ind*ref \\*[hd*mark]
-.if '\\*[ind*type]'B' .ds ind*ref \\*[hd*mark]\t\\n[%]
-.if '\\*[ind*ref]'' .@error "IND:wrong index type: \\*[ind*ref]"
-.\"
-.ds ind*line \\$1
-.while \\n[.$]>0 \{\
-. shift
-. as ind*line \t\\$1
-.\}
-.as ind*line \\*[ind*ref]
-.if \\n[Ref] .tm .\\\\" IND \\*[ind*line]
-..
-.\" print index
-.de INDP
-.ie \\n[Ref] .tm .\\\\" Index: \\*[ind*file]
-.el \{\
-. if !\\n[Cp] .pg@next-page
-. \" print INDEX
-. \" execute user-defined macros
-. if d TXIND .TXIND
-. ie d TYIND .TYIND
-. el \{\
-. SK
-. ce
-\\*[Index]
-. SP 3
-. 2C
-. nf
-. \}
-' so \\*[ind*file]
-. ie d TZIND .TZIND
-. el \{\
-. fi
-. 1C
-. \}
-.\}
-.rm ind*file
-..
-.\"########################### module let ############################
-.\" Letter macros
-.\"------------------------
-.\" Formal closing
-.de FC
-.df@print-float 3
-.ie \\n[.$] .ds let*i \\$1
-.el .ds let*i \\*[Letfc]
-.ie d let*type .let@fc_\\*[let*type] "\\*[let*i]" \\$@
-.el .let@mt-closing "\\*[let*i]" \\$@
-..
-.\"-------
-.de let@mt-closing
-.ne 5v
-.in (u;\\n[.l]/2)
-.sp
-\\$1
-.in
-..
-.\"------------------------
-.\" Signature line
-.de SG
-.ie d let*type .let*lt-sign \\$@
-.el .let*mt-sign \\$@
-..
-.\"------------------------
-.de let*lt-sign
-.if !d let@sg_\\*[let*type] .@error "SG: letter type \\*[let*type] undefined"
-.df@print-float 3
-.nr let*i 0 1
-.nr let*j 0
-.while \\n+[let*i]<=\\n[let*wa-n] \{\
-.if \\n[let*i]=\\n[let*wa-n] .nr let*j 1
-.let@sg_\\*[let*type] "\\*[let*wa-name!\\n[let*i]]" "\\*[let*wa-title!\\n[let*i]]" \\n[let*i] \\n[let*j] \\$@
-.\}
-..
-.\"------------------------
-.\" Memorandum signature
-.de let*mt-sign
-.df@print-float 3
-.ne \\n[cov*au]u*4v
-.ie \\n[.$]>1 .nr let*k 1
-.el .nr let*k \\n[cov*au]
-.ds let*tmp \\*[cov*au!\\n[let*k]!3]-\\*[cov*au!\\n[let*k]!4]-
-.nr let*i 0 1
-.while \\n+[let*i]<=\\n[cov*au] \{\
-. if \\n[let*i]>1 .as let*tmp /
-. as let*tmp \\*[cov*au!\\n[let*k]!2]
-.\}
-.if !''\\$1' .as let*tmp -\\$1
-.in (u;\\n[.l]/2)
-.nf
-.nr let*i 0 1
-.while \\n+[let*i]<=\\n[cov*au] \{\
-. SP 3v
-. if \\n[let*i]=\\n[let*k] \{\
-\Z'\h'-(u;\\n[.l]/2)'\\*[let*tmp]'\c
-. \}
-\\*[cov*au!\\n[let*i]!1]
-.\}
-.fi
-.in
-..
-.\"------------------------
-.\" Approval signature
-.de AV
-.ne 6v
-.nf
-.sp
-.ie \\n[.$]<2 \\*[Letapp]
-.el .sp
-.sp 2
-.ie n ______________________________ ______________
-.el \D'l 25m 0'\h'4m'\D'l 12m 0'
-\Z'\\$1'\h'29m'\f[\\*[@sdf_font]]\\*[Letdate]\fP
-.fi
-..
-.\"------------------------
-.\" Letter signature
-.de AVL
-.ne 6v
-.nf
-.sp 3
-.ie n ______________________________
-.el \D'l 25m 0'
-\Z'\\$1'
-.fi
-..
-.\"------------------------
-.\" Letter type
-.\" let@header is called from the header. It is supposed
-.\" to remove the alias itself.
-.de LT
-.rm AF AS AE AT AU CS OK TL MT
-.ds let*type BL
-.nr Pi 5
-.nr Pt 0
-.if !''\\$1' .ds let*type \\$1
-.if !d let@head_\\*[let*type] .@error "LT: unknown letter type \\$1"
-.shift
-.als let@header let@head_\\*[let*type]
-.let@init_\\*[let*type] \\$@
-.if \n[D]>1 .tm Letter type \\*[let*type]
-..
-.\"-----------
-.\" Blocked letter
-.de let@init_BL
-..
-.de let@head_BL
-.rm let@header
-.let@print-head 1
-..
-.de let@sg_BL
-.ne 5v
-.nf
-.in (u;\\n[.l]/2)
-.sp 3v
-\\$1
-\\$2
-.in
-.if \\$4 .sp
-.if \w'\\$5'&\\$4 \\$5
-.fi
-..
-.als let@fc_BL let@mt-closing
-.\"-----------
-.\" Semiblocked letter
-.de let@init_SB
-.nr Pt 1
-..
-.de let@head_SB
-.rm let@header
-.let@print-head 1
-..
-.als let@sg_SB let@sg_BL
-.als let@fc_SB let@mt-closing
-.\"-----------
-.\" Full-blocked letter
-.de let@init_FB
-..
-.de let@head_FB
-.rm let@header
-.let@print-head
-..
-.de let@sg_FB
-.ne 5v
-.nf
-.sp 3v
-\\$1
-\\$2
-.if \\$4 .sp
-.if \w'\\$5'&\\$4 \\$5
-.fi
-..
-.de let@fc_FB
-.ne 5v
-.sp
-\\$1
-..
-.\"-----------
-.\" Simplified letter
-.de let@init_SP
-..
-.de let@head_SP
-.rm let@header
-.let@print-head
-..
-.de let@sg_SP
-.nf
-.if \\$3=1 .sp
-.sp
-.misc@toupper "\\$1, \\$2"
-.if \\$4 .sp
-.if \w'\\$5'&\\$4 \\$5
-.fi
-..
-.de let@fc_SP
-.sp 2
-..
-.\"--------------------------------------
-.\" Print the letter-head
-.de let@print-head
-.nf
-.sp |11
-.if '1'\\$1' .in (u;\\n[.l]/2)
-.\" ---- WA
-.ie d let@wa-div .let@wa-div
-.el .sp 3
-.\" ---- datum
-\\*[cov*new-date]
-.sp
-.if '1'\\$1' .if !d let*lo-CN .if !d let*lo-RN .sp 2
-.\" ---- Confidential
-.if d let*lo-CN \{\
-. ti 0
-. ie !''\\*[let*lo-CN]' \\*[let*lo-CN]
-. el \\*[LetCN]
-. sp
-.\}
-.\" ---- Reference
-.if d let*lo-RN \{\
-\\*[LetRN] \\*[let*lo-RN]
-. sp
-.\}
-.\" ---- IA
-.sp
-.in 0
-.nr let*i 0 1
-.while \\n+[let*i]<=\\n[let*ia-n] \{\
-\\*[let*ia-name!\\n[let*i]]
-\\*[let*ia-title!\\n[let*i]]
-.\}
-.if d let@ia-div .let@ia-div
-.\" ---- Attention
-.if d let*lo-AT \{\
-. sp
-\\*[LetAT] \\*[let*lo-AT]
-.\}
-.\" ---- Salutation
-.if !'\\*[let*type]'SP' .if d let*lo-SA \{\
-. sp
-. ti 0
-. ie !''\\*[let*lo-SA]' \\*[let*lo-SA]
-. el \\*[LetSA]
-.\}
-.\" ---- Subject
-.if d let*lo-SJ \{\
-. ie '\\*[let*type]'SP' \{\
-. sp 2
-. misc@toupper \\*[let*lo-SJ]
-. sp
-. \}
-. el \{\
-. sp
-. if '\\*[let*type]'SB' .ti +5m
-\\*[LetSJ] \f[\\*[@sdf_font]]\\*[let*lo-SJ]\fP
-. \}
-.\}
-..
-.\"-------------------
-.\" .IA [name [title]]
-.nr let*ia-n 0 1
-.de IA
-.if \\n[.$] .ds let*ia-name!\\n+[let*ia-n] \\$1
-.if \\n[.$]>1 .ds let*ia-title!\\n[let*ia-n] \\$2
-.ev let@ev
-'nf
-.di let@ia-div
-.eo
-..
-.de IE
-.di
-.ec
-.ev
-..
-.\"-------------------
-.\" .WA [name [title]]
-.nr let*wa-n 0 1
-.de WA
-.if \\n[.$] .ds let*wa-name!\\n+[let*wa-n] \\$1
-.if \\n[.$]>1 .ds let*wa-title!\\n[let*wa-n] \\$2
-.ev let@ev
-'nf
-.di let@wa-div
-.it \\n[Letwam] let@wa-drain
-.eo
-..
-.\"------
-.de let@wa-drain
-.it
-.di
-.di let@wa-junk
-..
-.\"------
-.de WE
-.it
-.ec
-.di
-.ev
-.if d let@wa-junk .rm let@wa-junk
-..
-.\"-------------------
-.\" Copy to
-.de NS
-.sp
-.ie !''\\$2' .ds let*str \\$1
-.el \{\
-. ie \\n[.$]>0 \{\
-. ie !\w'\\$1' .ds let*str \\*[Letns!\\*[Letnsdef]]
-. el \{\
-. ie d Letns!\\$1 .ds let*str \\*[Letns!\\$1]
-. el .ds let*str \\*[Letns!copy](\\$1)\\*[Letns!to]
-. \}
-. \}
-. el .ds let*str \\*[Letns!\\*[Letnsdef]]
-.\}
-.ne 2
-.nf
-\\*[let*str]
-..
-.de NE
-.fi
-..
-.\"-------------------
-.\" Letter options
-.de LO
-.rm AF AS AE AT AU CS OK TL MT
-.if ''\\$1' .@error "LO: missing option"
-.if !d Let\\$1 .@error "LO: unknown option (\\$1)"
-.ds let*lo-\\$1 \\$2
-.if \n[D]>1 .tm Letter option \\$1 \\$2
-..
-.\"--------------------
-.\" Start with a clean slate
-.init@reset
diff --git a/contrib/groff/contrib/mm/mm/0.MT b/contrib/groff/contrib/mm/mm/0.MT
deleted file mode 100644
index 61f1a969c06b..000000000000
--- a/contrib/groff/contrib/mm/mm/0.MT
+++ /dev/null
@@ -1,146 +0,0 @@
-.\"------------
-.\" $Id: 0.MT,v 2.0 2000/09/14 03:40:25 jhaegg Exp $
-.\" Cover sheet. Memorandum type 0-3 and "string".
-.\"------------
-.if !r Au .nr Au 1
-.nr cov*mt0-ind 1.1c
-.de cov@print-title
-.MOVE 4.8c 1.5c
-.S 8
-subject:
-.sp -1.1
-.S
-.PGFORM
-.ft \\*[@sdf_font]
-.ll 9c
-.fi
-.cov*title
-.ft
-.ll
-.nf
-.if d cov*title-charge-case \fBCharge Case \\*[cov*title-charge-case]\fP
-.if d cov*title-file-case \fBFile Case \\*[cov*title-file-case]\fP
-.fi
-..
-.\"------------
-.de cov@print-authors
-.MOVE 5.7c 13.3c
-.nf
-.S 8
-\\$1:
-.br
-.S
-.sp -1
-.in 0.8c
-.ft \\*[@sdf_font]
-.nr cov*i 0 1
-.while \\n+[cov*i]<=\\n[cov*au] \{\
-. cov@print-au1 \\n[cov*i] 1
-. if \\n[Au] \{\
-. cov@print-au2 \\n[cov*i] 3 4
-. cov@print-au2 \\n[cov*i] 6 5
-. cov@print-au1 \\n[cov*i] 7
-. cov@print-au1 \\n[cov*i] 8
-. cov@print-au1 \\n[cov*i] 9
-. \}
-. if \\n[cov*i]<\\n[cov*au] .SP 1
-.\}
-.ft
-.if r cov*mt-tm-max \{\
-. SP 1
-. nr cov*i 0 1
-. ft \\*[@sdf_font]
-TM
-. in 1.5c
-. sp -1
-. while \\n+[cov*i]<\\n[cov*mt-tm-max] \\*[cov*mt-tm!\\n[cov*i]]
-. in
-. ft
-.\}
-.fi
-.PGFORM
-..
-.\"------------
-.\" index arg1
-.de cov@print-au1
-.if d cov*au!\\$1!\\$2 \\*[cov*au!\\$1!\\$2]
-..
-.\"------------
-.de cov@print-au2
-.\" index arg1 arg2
-.if d cov*au!\\$1!\\$2 \\*[cov*au!\\$1!\\$2] \c
-.if \\$3=5 .if d cov*au!\\$1!\\$3 x\c
-.if d cov*au!\\$1!\\$3 \\*[cov*au!\\$1!\\$3]\c
-.br
-..
-.\"------------
-.de cov@print-date
-.MOVE 4.8c 13.3c
-.S 8
-.nf
-\\$1:
-.br
-.S
-.sp -1
-.in 0.8c
-\f[\\*[@sdf_font]]\\*[cov*new-date]\fP
-.br
-.fi
-.PGFORM
-..
-.\"------------
-.de cov@print-firm
-.if d cov*firm \{\
-. MOVE 2.8c 0 17.7c
-. S 18
-. rj 1
-\fB\\*[cov*firm]\fP
-. S
-. PGFORM
-.\}
-..
-.\"------------
-.de cov@print-abstract
-.SP 3
-.if d cov*abstract \{\
-. misc@ev-keep cov*ev
-. if \\n[cov*abs-ind]>0 \{\
-. in +\\n[cov*abs-ind]u
-. ll -\\n[cov*abs-ind]u
-. \}
-. ce
-\fI\\$1\fP
-. SP 1.5
-. fi
-. cov*abstract
-. br
-. ev
-.\}
-..
-.\"-----------------
-.ds cov*mt0-txt!1 MEMORANDUM FOR FILE
-.ds cov*mt0-txt!2 PROGRAMMER'S NOTES
-.ds cov*mt0-txt!3 ENGINEER'S NOTES
-.if d cov*default-firm .if !d cov*firm .ds cov*firm \\*[cov*default-firm]
-.\"
-.if !d cov*mt-printed \{\
-. cov@print-firm
-. cov@print-title subject
-. cov@print-date date
-. cov@print-authors from
-. cov@print-abstract \\*[cov*abs-name]
-. SP 3
-. if (\*[cov*mt-type]>=1)&(\*[cov*mt-type]<=3) \{\
-. ce
-\fI\*[cov*mt0-txt!\*[cov*mt-type]]\fP
-. SP 1.5
-. \}
-. if \*[cov*mt-type]=6 \{\
-. ce
-\fI\*[cov*mt-type-text]\fP
-. SP 1.5
-. \}
-. pg@enable-top-trap
-. pg@enable-trap
-. ds cov*mt-printed
-.\}
diff --git a/contrib/groff/contrib/mm/mm/4.MT b/contrib/groff/contrib/mm/mm/4.MT
deleted file mode 100644
index c8b6f37df183..000000000000
--- a/contrib/groff/contrib/mm/mm/4.MT
+++ /dev/null
@@ -1,81 +0,0 @@
-.\"------------
-.\" $Id: 4.MT,v 2.0 2000/09/14 03:40:25 jhaegg Exp $
-.\" Cover sheet. Memorandum type 4
-.\"------------
-.de cov@print-title
-.if !d cov*title .@error title (.TL) not defined!
-.MOVE 2.4c
-.S +4
-.ad c
-.fi
-.B
-.cov*title
-.br
-.S
-.R
-.ad b
-.PGFORM
-..
-.\"------------
-.de cov@print-authors
-.SP 0.5
-.I
-.nr cov*i 0 1
-.while \\n+[cov*i]<=\\n[cov*au] \{\
-.ce
-\\*[cov*au!\\n[cov*i]!1]
-.br
-.\}
-.R
-.PGFORM
-..
-.\"------------
-.de cov@print-firm
-.if !d cov*firm .@error firm (.AF) not defined!
-.SP 0.5
-.ce
-\\*[cov*firm]
-..
-.\"------------
-.de cov@print-abstract
-.SP 2
-.if d cov*abstract \{\
-. misc@ev-keep cov*ev
-. init@reset
-. if \\n[cov*abs-ind]>0 \{\
-. in +\\n[cov*abs-ind]u
-. ll -\\n[cov*abs-ind]u
-. \}
-. ce
-\fI\\*[cov*abs-name]\fP
-. SP 2
-. fi
-. cov*abstract
-. br
-. ev
-.\}
-..
-.\"-----------------
-.if d cov*default-firm .if !d cov*firm .ds cov*firm \\*[cov*default-firm]
-.if !d cov*mt-printed \{\
-. cov@print-title
-. cov@print-authors
-. cov@print-firm
-. if d cov*abstract \{\
-. if !\n[cov*abs-arg] .cov@print-abstract
-. \}
-. SP 3
-. nr hd*cur-bline \n[nl]
-. ds cov*mt-printed
-. pg@enable-top-trap
-. pg@enable-trap
-.\}
-.de CS
-.pg@disable-top-trap
-.SK
-.cov@print-title
-.cov@print-authors
-.cov@print-firm
-.cov@print-abstract
-..
-
diff --git a/contrib/groff/contrib/mm/mm/5.MT b/contrib/groff/contrib/mm/mm/5.MT
deleted file mode 100644
index a274d234bd00..000000000000
--- a/contrib/groff/contrib/mm/mm/5.MT
+++ /dev/null
@@ -1,34 +0,0 @@
-.\"------------
-.\" $Id: 5.MT,v 2.0 2000/09/14 03:40:25 jhaegg Exp $
-.\" Cover sheet. Memorandum type 5
-.\"------------
-.nr cov*mt0-ind 1.1c
-.de cov@print-title
-.B
-.ll 9c
-.fi
-.cov*title
-.R
-.ll
-.nf
-.if d cov*title-charge-case \fBCharge Case \\*[cov*title-charge-case]\fP
-.if d cov*title-file-case \fBFile Case \\*[cov*title-file-case]\fP
-.fi
-..
-.\"------------
-.de cov@print-date
-.rj 1
-\f[\\*[@sdf_font]]\\*[cov*new-date]\fP
-.br
-..
-.\"------------
-.if !d cov*mt-printed \{\
-. SP 1.9c
-. cov@print-title
-. SP 1.2c
-. cov@print-date
-. SP 3
-. pg@enable-top-trap
-. pg@enable-trap
-. ds cov*mt-printed
-.\}
diff --git a/contrib/groff/contrib/mm/mm/ms.cov b/contrib/groff/contrib/mm/mm/ms.cov
deleted file mode 100644
index 25d4579e2f7c..000000000000
--- a/contrib/groff/contrib/mm/mm/ms.cov
+++ /dev/null
@@ -1,84 +0,0 @@
-.\"------------
-.\" $Id: ms.cov,v 2.0 2000/09/14 03:40:25 jhaegg Exp $
-.\" Cover sheet. Mostly like ms cover.
-.\"------------
-.de cov@print-title
-.in 0
-.misc@ev-keep cov*ev
-.init@reset
-.ad c
-.hy 0
-.fi
-.B
-.cov*title
-.br
-.ad b
-.R
-.ev
-..
-.\"------------
-.de cov@print-authors
-.SP
-.nr cov*i 0 1
-.while \\n+[cov*i]<=\\n[cov*au] \{\
-. ce
-\fI\\*[cov*au!\\n[cov*i]!1]\fP
-. nr cov*j 0 1
-. while \\n+[cov*j]<=9 \{\
-. if d cov*at!\\n[cov*i]!\\n[cov*j] \{\
-. if \w'\\*[cov*at!\\n[cov*i]!\\n[cov*j]]' \{\
-. ce
-\s-1\\*[cov*at!\\n[cov*i]!\\n[cov*j]]\s0
-. .\}
-. \}
-. \}
-.\}
-..
-.\"------------
-.de cov@print-firm
-.SP .5
-.ce
-\\*[cov*firm]
-..
-.\"------------
-.de cov@print-abstract
-.SP 2
-.if d cov*abstract \{\
-. misc@ev-keep cov*ev
-. init@reset
-. if \\n[cov*abs-ind]>0 \{\
-. in +\\n[cov*abs-ind]u
-. ll -\\n[cov*abs-ind]u
-. \}
-. ce
-\fI\\$1\fP
-. SP 1.5
-. fi
-. cov*abstract
-. br
-. ev
-.\}
-..
-.\"------------
-.de cov@print-date
-.SP 2
-\f[\\*[@sdf_font]]\\*[cov*new-date]\fP
-..
-.\"-----------------
-.de COVEND
-.br
-.if d cov*default-firm .if !d cov*firm .ds cov*firm \\*[cov*default-firm]
-.sp |4.2c
-.cov@print-title
-.cov@print-authors
-.cov@print-firm
-.cov@print-abstract \\*[cov*abs-name]
-.cov@print-date
-.pg@enable-top-trap
-.bp 1
-.pg@enable-trap
-.if d cov*abs-arg .if \\n[cov*abs-arg] \{\
-. cov@print-abstract ABSTRACT
-. SP 2
-.\}
-..
diff --git a/contrib/groff/contrib/mm/mm/se_ms.cov b/contrib/groff/contrib/mm/mm/se_ms.cov
deleted file mode 100644
index 2d16d48e8132..000000000000
--- a/contrib/groff/contrib/mm/mm/se_ms.cov
+++ /dev/null
@@ -1,3 +0,0 @@
-.\" $Id: se_ms.cov,v 2.0 2000/09/14 03:40:25 jhaegg Exp $
-.mso mm/ms.cov
-.nr cur*abstract-ll 11c
diff --git a/contrib/groff/contrib/mm/mmroff.man b/contrib/groff/contrib/mm/mmroff.man
deleted file mode 100644
index efe79b45c53b..000000000000
--- a/contrib/groff/contrib/mm/mmroff.man
+++ /dev/null
@@ -1,48 +0,0 @@
-.\"
-.\" $Id: mmroff.man,v 2.0 2000/09/14 03:40:24 jhaegg Exp $
-.\"
-.TH MMROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-mmroff \- reference preprocessor
-.SH SYNOPSIS
-.B mmroff
-[
-.I -x
-]
-.I groff_arguments
-.SH DESCRIPTION
-\fBmmroff\fP is a simple preprocessor for \fBgroff\fP, it is
-used for expanding references in \fBm@TMAC_M_PREFIX@m\fP, see
-\fBgroff_mm(@MAN7EXT@)\fP.
-\fBgroff\fP is executed twice, first with \fB-z\fP and \fB-rRef=1\fR
-to collect all references and then to do the real processing
-when the reference file is up to date.
-.TP
-\fB\-x\fR
-Just create the reference file. This can be used to refresh
-the reference file, it isn't always needed to have accurate
-references and by using this option \fBgroff\fP will only
-be run once.
-.\".SH BUGS
-.SH AUTHOR
-Jörgen Hägg, Lund, Sweden <jh@axis.se>.
-.SH FILES
-.TP
-.B @MACRODIR@/tmac.@TMAC_M_PREFIX@m
-.TP
-.B @TMAC_MDIR@/*.cov
-.TP
-.B @TMAC_MDIR@/*.MT
-.TP
-.B @TMAC_MDIR@/locale
-.SH "SEE ALSO"
-.BR groff_mm(@MAN7EXT@),
-.BR groff_mmse(@MAN7EXT@),
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR @g@tbl (@MAN1EXT@),
-.BR @g@pic (@MAN1EXT@),
-.BR @g@eqn (@MAN1EXT@)
-.br
-.BR mm (@MAN7EXT@)
-.BR m@TMAC_M_PREFIX@mse (@MAN7EXT@)
diff --git a/contrib/groff/contrib/mm/mmroff.pl b/contrib/groff/contrib/mm/mmroff.pl
deleted file mode 100755
index 69b6105b2925..000000000000
--- a/contrib/groff/contrib/mm/mmroff.pl
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-# runs groff in safe mode, that seems to be the default
-# installation now. That means that I have to fix all nice
-# features outside groff. Sigh.
-# I do agree however that the previous way opened a whole bunch
-# of security holes.
-
-my $no_exec;
-# check for -x and remove it
-if (grep(/^-x$/, @ARGV)) {
- $no_exec++;
- @ARGV = grep(!/^-x$/, @ARGV);
-}
-
-my $check_macro = "groff -rRef=1 -z @ARGV";
-my $run_macro = "groff @ARGV";
-
-my (%cur, $rfilename, $max_height, $imacro, $max_width, @out, @indi);
-open(MACRO, "$check_macro 2>&1 |") || die "run $check_macro:$!";
-while(<MACRO>) {
- if (m#^\.\\" Rfilename: (\S+)#) {
- # remove all directories just to be more secure
- ($rfilename = $1) =~ s#.*/##;
- next;
- }
- if (m#^\.\\" Imacro: (\S+)#) {
- # remove all directories just to be more secure
- ($imacro = $1) =~ s#.*/##;
- next;
- }
- if (m#^\.\\" Index: (\S+)#) {
- # remove all directories just to be more secure
- my $f;
- ($f = $1) =~ s#.*/##;
- &print_index($f, \@indi, $imacro);
- @indi = ();
- $imacro = '';
- next;
- }
- my $x;
- if (($x) = m#^\.\\" IND (.+)#) {
- $x =~ s#\\##g;
- my @x = split(/\t/, $x);
- grep(s/\s+$//, @x);
- push(@indi, join("\t", @x));
- next;
- }
- if (m#^\.\\" PIC id (\d+)#) {
- %cur = ('id', $1);
- next;
- }
- if (m#^\.\\" PIC file (\S+)#) {
- &psbb($1);
- &ps_calc($1);
- next;
- }
- if (m#^\.\\" PIC (\w+)\s+(\S+)#) {
- eval "\$cur{'$1'} = '$2'";
- next;
- }
- s#\\ \\ $##;
- push(@out, $_);
-}
-close(MACRO);
-
-
-if ($rfilename && @out) {
- push(@out, ".nr pict*max-height $max_height\n") if defined $max_height;
- push(@out, ".nr pict*max-width $max_width\n") if defined $max_width;
-
- open(OUT, ">$rfilename") || "create $rfilename:$!";
- my $i;
- for $i (@out) {
- print OUT $i;
- }
- close(OUT);
-}
-
-exit 0 if $no_exec;
-exit system($run_macro);
-
-sub print_index {
- my ($f, $ind, $macro) = @_;
-
- open(OUT, ">$f") || "create $f:$!";
- my $i;
- for $i (sort @$ind) {
- if ($macro) {
- $i = '.'.$macro.' "'.join('" "', split(/\t/, $i)).'"';
- }
- print OUT "$i\n";
- }
- close(OUT);
-}
-
-sub ps_calc {
- my ($f) = @_;
-
- my $w = abs($cur{'llx'}-$cur{'urx'});
- my $h = abs($cur{'lly'}-$cur{'ury'});
- $max_width = $w if $w > $max_width;
- $max_height = $h if $h > $max_height;
-
- my $id = $cur{'id'};
- push(@out, ".ds pict*file!$id $f\n");
- push(@out, ".ds pict*id!$f $id\n");
- push(@out, ".nr pict*llx!$id $cur{'llx'}\n");
- push(@out, ".nr pict*lly!$id $cur{'lly'}\n");
- push(@out, ".nr pict*urx!$id $cur{'urx'}\n");
- push(@out, ".nr pict*ury!$id $cur{'ury'}\n");
- push(@out, ".nr pict*w!$id $w\n");
- push(@out, ".nr pict*h!$id $h\n");
-}
-
-
-sub psbb {
- my ($f) = @_;
-
- unless (open(IN, $f)) {
- print STDERR "Warning: Postscript file $f:$!";
- next;
- }
- while(<IN>) {
- if (/^%%BoundingBox:\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
- $cur{'llx'} = $1;
- $cur{'lly'} = $2;
- $cur{'urx'} = $3;
- $cur{'ury'} = $4;
- }
- }
- close(IN);
-}
diff --git a/contrib/groff/contrib/mm/mse.tmac b/contrib/groff/contrib/mm/mse.tmac
deleted file mode 100644
index de78cb84c417..000000000000
--- a/contrib/groff/contrib/mm/mse.tmac
+++ /dev/null
@@ -1,184 +0,0 @@
-.\" $Id: mse.tmac,v 2.1 2000/11/17 04:26:02 jhaegg Exp $
-.\"
-.\" swedish version of mm
-.\" See m.tmac for version-information.
-.ds @language se
-.mso m.tmac
-.ISODATE
-.\"
-.ds App Bilaga
-.ds Lf Figurer
-.ds Lt Tabeller
-.ds Lx Uppställningar
-.ds Le Ekvationer
-.\" Page length
-.if !r L .nr @pl 28.5c
-.\" page width
-.if !r W .nr @ll 13c
-.\" page offset
-.if !r O .nr @po 3.5c
-.\" set the above parameters
-.ll \n[@ll]u
-.po \n[@po]u
-.pl \n[@pl]u
-.ds Lifg Figur
-.ds Litb Tabell
-.ds Liex Uppställning
-.ds Liec Ekvation
-.ds Licon Innehållsförteckning
-.ds Qrf Se kapitel \\*[Qrfh], sidan \\*[Qrfp].
-.ds Rp Referenser
-.ds Letfc Vänliga hälsningar
-.ds Letapp Godkänd av:
-.ds Letdate datum
-.ds Letconf KONFIDENTIELLT
-.ds Letsal Till vederbörande:
-.ds Letatt ATTENTION:
-.ds Letsubj Innehåll:
-.ds Letref Refererande till:
-.\"
-.ds Letns!copy Kopia \" space!
-.ds Letns!to " till
-.ds Letns!0 Kopia till
-.ds Letns!1 Kopia (med att.) till
-.ds Letns!2 Kopia (utan att.) till
-.ds Letns!3 Att.
-.ds Letns!4 Atts.
-.ds Letns!5 Enc.
-.ds Letns!6 Encs.
-.ds Letns!7 Annat försättsblad
-.ds Letns!8 Brev till
-.ds Letns!9 Dokument till
-.ds Letns!10 Kopia (med atts.) till
-.ds Letns!11 Kopia (utan atts.) till
-.ds Letns!12 Endast abstract till
-.ds Letns!13 Hela dokumentet till
-.ds Letns!14 CC:
-.\"
-.ds MO1 januari
-.ds MO2 februari
-.ds MO3 mars
-.ds MO4 april
-.ds MO5 maj
-.ds MO6 juni
-.ds MO7 juli
-.ds MO8 augusti
-.ds MO9 september
-.ds MO10 oktober
-.ds MO11 november
-.ds MO12 december
-.nr pg*footer-size 4\" 1v+footer+even/odd footer+1v
-.\"------------------------------------------------
-.\" Dokumentnamn
-.ds LetDNAMN
-.\" Mottagarens datum
-.ds LetMDAT Ert datum:
-.\" Bilaga
-.ds LetBIL Bilaga \"
-.\" Kompletteringsuppgift
-.ds LetKOMP
-.\" Dokumentbeteckning eller dokumentnummer
-.ds LetDBET
-.\" Beteckning (ärendebeteckning i form av diarienummer e.d.
-.ds LetBET Beteckning:
-.\" Mottagarens beteckning.
-.ds LetMBET Er beteckning:
-.\" Antal sidor
-.ds LetSIDOR
-.\" Svensk standard med högerställd löptext. ---------------------
-.de let@init_SVH
-.in 4.57c
-.ll 17.57c
-..
-.de let@head_SVH
-.rm let@header
-.let@print_SV H
-..
-.de let@sg_SVH
-..
-.de let@fc_SVH
-..
-.\" Svensk standard med vänsterställd löptext. ---------------------
-.de let@init_SVV
-..
-.de let@head_SVV
-.rm let@header
-.let@print_SV V
-..
-.de let@sg_SVV
-..
-.de let@fc_SVV
-..
-.\"--------------------------------
-.de let@print_SV
-.nf
-.\" pos T0 -----------------------------------
-.in 0
-.sp |3
-.if d let@wa-div .let@wa-div
-.\"----- addressat
-.if '\\$1'V' .if d let@ia-div \{\
-. sp |10
-. let@ia-div
-.\}
-.\" pos T4 -----------------------------------
-.in 9.14c
-.\"----- kompletteringsuppgift
-.if d let*lo-KOMP \{\
-. sp |2
-\\*[let*lo-KOMP]
-.\}
-.\"----- dokumentnamn
-.if d let*lo-DNAMN \{\
-. sp |3
-\\*[let*lo-DNAMN]
-.\}
-.\"----- datum
-.if d cov*new-date \{\
-. sp |5
-Datum:
-\\*[cov*new-date]
-.\}
-.\"----- mottagarens datum
-.if d let*lo-MDAT \{\
-. sp |7
-\\*[LetMDAT]
-\\*[let*lo-MDAT]
-.\}
-.\"----- addressat
-.if '\\$1'H' .if d let@ia-div \{\
-. sp |10
-. let@ia-div
-.\}
-.\" pos T6 -----------------------------------
-.in 13.72c
-.\"----- mottagarens beteck.
-.if d let*lo-MBET \{\
-. sp |7
-\\*[LetMBET]
-\\*[let*lo-MBET]
-.\}
-.\"----- dokumentbeteck.
-.if d let*lo-BET \{\
-. sp |3
-\\*[LetBET]
-\\*[let*lo-BET]
-.\}
-.\" pos T7 -----------------------------------
-.in 16c
-.\"----- bilaga
-.if d let*lo-BIL \{\
-. sp |2
-\\*[LetBIL]\\*[let*lo-BIL]
-.\}
-.\"
-.\"----- sidnummer
-.sp |3
-.ie d let*lo-SIDOR \\n[%] (\\*[let*lo-SIDOR])
-.el \\n[%]
-.\"
-.\" Ta hand om special
-.if d TP .TP
-.sp |17
-..
-.\" -----------------------------------
diff --git a/contrib/groff/font/devX100-12/CB b/contrib/groff/font/devX100-12/CB
deleted file mode 100644
index d151ee33da26..000000000000
--- a/contrib/groff/font/devX100-12/CB
+++ /dev/null
@@ -1,308 +0,0 @@
-name CB
-spacewidth 10
-charset
---- 10,1 0 040
-! 10,11 0 041
-" 10,11 0 042
-dq "
-# 10,11,1 0 043
-sh "
-$ 10,12,1 0 044
-Do "
-% 10,11 0 045
-& 10,9 0 046
-' 10,11 0 047
-cq "
-( 10,11,2 0 050
-) 10,11,2 0 051
-* 10,11 0 052
-+ 10,9 0 053
-, 10,2,3 0 054
-\- 10,6 0 055
-. 10,2 0 056
-/ 10,12,2 0 057
-sl "
-0 10,11 0 060
-1 10,11 0 061
-2 10,11 0 062
-3 10,11 0 063
-4 10,11 0 064
-5 10,11 0 065
-6 10,11 0 066
-7 10,11 0 067
-8 10,11 0 070
-9 10,11 0 071
-: 10,7 0 072
-; 10,7,3 0 073
-< 10,9 0 074
-= 10,7 0 075
-eq "
-> 10,9 0 076
-? 10,10 0 077
-@ 10,11,1 0 0100
-at "
-A 10,10 0 0101
-B 10,10 0 0102
-C 10,10 0 0103
-D 10,10 0 0104
-E 10,10 0 0105
-F 10,10 0 0106
-G 10,10 0 0107
-H 10,10 0 0110
-I 10,10 0 0111
-J 10,10 0 0112
-K 10,10 0 0113
-L 10,10 0 0114
-M 10,10 0 0115
-N 10,10 0 0116
-O 10,10 0 0117
-P 10,10 0 0120
-Q 10,10,2 0 0121
-R 10,10 0 0122
-S 10,10 0 0123
-T 10,10 0 0124
-U 10,10 0 0125
-V 10,10 0 0126
-W 10,10 0 0127
-X 10,10 0 0130
-Y 10,10 0 0131
-Z 10,10 0 0132
-[ 10,11,2 0 0133
-lB "
-\ 10,12,2 0 0134
-rs "
-] 10,11,2 0 0135
-rB "
-^ 10,11 0 0136
-a^ "
-ha "
-_ 10,0,3 0 0137
-` 10,11 0 0140
-oq "
-a 10,7 0 0141
-b 10,11 0 0142
-c 10,7 0 0143
-d 10,11 0 0144
-e 10,7 0 0145
-f 10,11 0 0146
-g 10,7,3 0 0147
-h 10,11 0 0150
-i 10,10 0 0151
-j 10,10,3 0 0152
-k 10,11 0 0153
-l 10,11 0 0154
-m 10,7 0 0155
-n 10,7 0 0156
-o 10,7 0 0157
-p 10,7,3 0 0160
-q 10,7,3 0 0161
-r 10,7 0 0162
-s 10,7 0 0163
-t 10,9 0 0164
-u 10,7 0 0165
-v 10,7 0 0166
-w 10,7 0 0167
-x 10,7 0 0170
-y 10,7,3 0 0171
-z 10,7 0 0172
-{ 10,11,2 0 0173
-lC "
-| 10,11,2 0 0174
-or "
-ba "
-} 10,11,2 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 10,7,3 0 0241
-¡ "
-ct 10,10 0 0242
-¢ "
-Po 10,10 0 0243
-£ "
-Cs 10,8 0 0244
-¤ "
-Ye 10,10 0 0245
-¥ "
-bb 10,11,2 0 0246
-¦ "
-sc 10,11,1 0 0247
-§ "
-ad 10,10 0 0250
-¨ "
-co 10,10 0 0251
-© "
-Of 10,10 0 0252
-ª "
-Fo 10,7 0 0253
-« "
-no 10,7 0 0254
-¬ "
-- 10,6 0 0255
-hy "
-­ "
-rg 10,10 0 0256
-® "
-a- 10,10 0 0257
-¯ "
-de 10,11 0 0260
-° "
-+- 10,9 0 0261
-± "
-S2 10,11 0 0262
-² "
-S3 10,11 0 0263
-³ "
-aa 10,11 0 0264
-´ "
-µ 10,7,3 0 0265
-ps 10,11,1 0 0266
-¶ "
-pc 10,6 0 0267
-· "
-ac 10,1,3 0 0270
-¸ "
-S1 10,11 0 0271
-¹ "
-Om 10,10 0 0272
-º "
-Fc 10,7 0 0273
-» "
-14 10,11 0 0274
-¼ "
-12 10,11 0 0275
-½ "
-34 10,11 0 0276
-¾ "
-r? 10,7,3 0 0277
-¿ "
-`A 10,14 0 0300
-À "
-'A 10,14 0 0301
-Á "
-^A 10,14 0 0302
-Â "
-~A 10,13 0 0303
-Ã "
-:A 10,13 0 0304
-Ä "
-oA 10,14 0 0305
-Å "
-AE 10,10 0 0306
-Æ "
-,C 10,10,3 0 0307
-Ç "
-`E 10,14 0 0310
-È "
-'E 10,14 0 0311
-É "
-^E 10,14 0 0312
-Ê "
-:E 10,13 0 0313
-Ë "
-`I 10,14 0 0314
-Ì "
-'I 10,14 0 0315
-Í "
-^I 10,14 0 0316
-Î "
-:I 10,13 0 0317
-Ï "
--D 10,10 0 0320
-Ð "
-~N 10,13 0 0321
-Ñ "
-`O 10,14 0 0322
-Ò "
-'O 10,14 0 0323
-Ó "
-^O 10,14 0 0324
-Ô "
-~O 10,13 0 0325
-Õ "
-:O 10,13 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 10,11,1 0 0330
-Ø "
-`U 10,14 0 0331
-Ù "
-'U 10,14 0 0332
-Ú "
-^U 10,14 0 0333
-Û "
-:U 10,13 0 0334
-Ü "
-'Y 10,14 0 0335
-Ý "
-TP 10,10 0 0336
-Þ "
-ss 10,11 0 0337
-ß "
-`a 10,11 0 0340
-à "
-'a 10,11 0 0341
-á "
-^a 10,11 0 0342
-â "
-~a 10,10 0 0343
-ã "
-:a 10,10 0 0344
-ä "
-oa 10,12 0 0345
-å "
-ae 10,7 0 0346
-æ "
-,c 10,7,3 0 0347
-ç "
-`e 10,11 0 0350
-è "
-'e 10,11 0 0351
-é "
-^e 10,11 0 0352
-ê "
-:e 10,10 0 0353
-ë "
-`i 10,11 0 0354
-ì "
-'i 10,11 0 0355
-í "
-^i 10,11 0 0356
-î "
-:i 10,10 0 0357
-ï "
-Sd 10,12 0 0360
-ð "
-~n 10,10 0 0361
-ñ "
-`o 10,11 0 0362
-ò "
-'o 10,11 0 0363
-ó "
-^o 10,11 0 0364
-ô "
-~o 10,10 0 0365
-õ "
-:o 10,10 0 0366
-ö "
-di 10,9 0 0367
-÷ "
-/o 10,8,1 0 0370
-ø "
-`u 10,11 0 0371
-ù "
-'u 10,11 0 0372
-ú "
-^u 10,11 0 0373
-û "
-:u 10,10 0 0374
-ü "
-'y 10,11,3 0 0375
-ý "
-Tp 10,11,3 0 0376
-þ "
-:y 10,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/CBI b/contrib/groff/font/devX100-12/CBI
deleted file mode 100644
index f298973000ea..000000000000
--- a/contrib/groff/font/devX100-12/CBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name CBI
-spacewidth 10
-charset
---- 10,1 0 040
-! 10,11 0 041
-" 10,11 0 042
-dq "
-# 10,11,1 0 043
-sh "
-$ 10,12,1 0 044
-Do "
-% 10,11 0 045
-& 10,9 0 046
-' 10,11 0 047
-cq "
-( 10,11,2 0 050
-) 10,11,2 0 051
-* 10,11 0 052
-+ 10,9 0 053
-, 10,2,3 0 054
-\- 10,6 0 055
-. 10,2 0 056
-/ 10,12,2 0 057
-sl "
-0 10,11 0 060
-1 10,11 0 061
-2 10,11 0 062
-3 10,11 0 063
-4 10,11 0 064
-5 10,11 0 065
-6 10,11 0 066
-7 10,11 0 067
-8 10,11 0 070
-9 10,11 0 071
-: 10,7 0 072
-; 10,7,3 0 073
-< 10,9 0 074
-= 10,7 0 075
-eq "
-> 10,9 0 076
-? 10,10 0 077
-@ 10,11,1 0 0100
-at "
-A 10,10 0 0101
-B 10,10 0 0102
-C 10,10 0 0103
-D 10,10 0 0104
-E 10,10 0 0105
-F 10,10 0 0106
-G 10,10 0 0107
-H 10,10 0 0110
-I 10,10 0 0111
-J 10,10 0 0112
-K 10,10 0 0113
-L 10,10 0 0114
-M 10,10 0 0115
-N 10,10 0 0116
-O 10,10 0 0117
-P 10,10 0 0120
-Q 10,10,2 0 0121
-R 10,10 0 0122
-S 10,10 0 0123
-T 10,10 0 0124
-U 10,10 0 0125
-V 10,10 0 0126
-W 10,10 0 0127
-X 10,10 0 0130
-Y 10,10 0 0131
-Z 10,10 0 0132
-[ 10,11,2 0 0133
-lB "
-\ 10,12,2 0 0134
-rs "
-] 10,11,2 0 0135
-rB "
-^ 10,11 0 0136
-a^ "
-ha "
-_ 10,0,3 0 0137
-` 10,11 0 0140
-oq "
-a 10,7 0 0141
-b 10,11 0 0142
-c 10,7 0 0143
-d 10,11 0 0144
-e 10,7 0 0145
-f 10,11 0 0146
-g 10,7,3 0 0147
-h 10,11 0 0150
-i 10,10 0 0151
-j 10,10,3 0 0152
-k 10,11 0 0153
-l 10,11 0 0154
-m 10,7 0 0155
-n 10,7 0 0156
-o 10,7 0 0157
-p 10,7,3 0 0160
-q 10,7,3 0 0161
-r 10,7 0 0162
-s 10,7 0 0163
-t 10,9 0 0164
-u 10,7 0 0165
-v 10,7 0 0166
-w 10,7 0 0167
-x 10,7 0 0170
-y 10,7,3 0 0171
-z 10,7 0 0172
-{ 10,11,2 0 0173
-lC "
-| 10,11,2 0 0174
-or "
-ba "
-} 10,11,2 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 10,7,4 0 0241
-¡ "
-ct 10,10 0 0242
-¢ "
-Po 10,10 0 0243
-£ "
-Cs 10,8 0 0244
-¤ "
-Ye 10,10 0 0245
-¥ "
-bb 10,11,2 0 0246
-¦ "
-sc 10,11,1 0 0247
-§ "
-ad 10,10 0 0250
-¨ "
-co 10,10 0 0251
-© "
-Of 10,10 0 0252
-ª "
-Fo 10,7 0 0253
-« "
-no 10,7 0 0254
-¬ "
-- 10,6 0 0255
-hy "
-­ "
-rg 10,10 0 0256
-® "
-a- 10,9 0 0257
-¯ "
-de 10,11 0 0260
-° "
-+- 10,10 0 0261
-± "
-S2 10,11 0 0262
-² "
-S3 10,11 0 0263
-³ "
-aa 10,11 0 0264
-´ "
-µ 10,7,3 0 0265
-ps 10,11,1 0 0266
-¶ "
-pc 10,6 0 0267
-· "
-ac 10,0,3 0 0270
-¸ "
-S1 10,11 0 0271
-¹ "
-Om 10,10 0 0272
-º "
-Fc 10,7 0 0273
-» "
-14 10,11 0 0274
-¼ "
-12 10,11 0 0275
-½ "
-34 10,11 0 0276
-¾ "
-r? 10,7,4 0 0277
-¿ "
-`A 10,14 0 0300
-À "
-'A 10,14 0 0301
-Á "
-^A 10,14 0 0302
-Â "
-~A 10,13 0 0303
-Ã "
-:A 10,13 0 0304
-Ä "
-oA 10,14 0 0305
-Å "
-AE 10,10 0 0306
-Æ "
-,C 10,10,3 0 0307
-Ç "
-`E 10,14 0 0310
-È "
-'E 10,14 0 0311
-É "
-^E 10,14 0 0312
-Ê "
-:E 10,13 0 0313
-Ë "
-`I 10,14 0 0314
-Ì "
-'I 10,14 0 0315
-Í "
-^I 10,14 0 0316
-Î "
-:I 10,13 0 0317
-Ï "
--D 10,10 0 0320
-Ð "
-~N 10,13 0 0321
-Ñ "
-`O 10,14 0 0322
-Ò "
-'O 10,14 0 0323
-Ó "
-^O 10,14 0 0324
-Ô "
-~O 10,13 0 0325
-Õ "
-:O 10,13 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 10,10 0 0330
-Ø "
-`U 10,14 0 0331
-Ù "
-'U 10,14 0 0332
-Ú "
-^U 10,14 0 0333
-Û "
-:U 10,13 0 0334
-Ü "
-'Y 10,14 0 0335
-Ý "
-TP 10,10 0 0336
-Þ "
-ss 10,11 0 0337
-ß "
-`a 10,11 0 0340
-à "
-'a 10,11 0 0341
-á "
-^a 10,11 0 0342
-â "
-~a 10,10 0 0343
-ã "
-:a 10,10 0 0344
-ä "
-oa 10,11 0 0345
-å "
-ae 10,7 0 0346
-æ "
-,c 10,7,3 0 0347
-ç "
-`e 10,11 0 0350
-è "
-'e 10,11 0 0351
-é "
-^e 10,11 0 0352
-ê "
-:e 10,10 0 0353
-ë "
-`i 10,11 0 0354
-ì "
-'i 10,11 0 0355
-í "
-^i 10,11 0 0356
-î "
-:i 10,10 0 0357
-ï "
-Sd 10,12 0 0360
-ð "
-~n 10,10 0 0361
-ñ "
-`o 10,11 0 0362
-ò "
-'o 10,11 0 0363
-ó "
-^o 10,11 0 0364
-ô "
-~o 10,10 0 0365
-õ "
-:o 10,10 0 0366
-ö "
-di 10,9 0 0367
-÷ "
-/o 10,8,1 0 0370
-ø "
-`u 10,11 0 0371
-ù "
-'u 10,11 0 0372
-ú "
-^u 10,11 0 0373
-û "
-:u 10,10 0 0374
-ü "
-'y 10,11,3 0 0375
-ý "
-Tp 10,11,3 0 0376
-þ "
-:y 10,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/CI b/contrib/groff/font/devX100-12/CI
deleted file mode 100644
index 3f1437f621b2..000000000000
--- a/contrib/groff/font/devX100-12/CI
+++ /dev/null
@@ -1,308 +0,0 @@
-name CI
-spacewidth 10
-charset
---- 10,1 0 040
-! 10,11 0 041
-" 10,11 0 042
-dq "
-# 10,11,1 0 043
-sh "
-$ 10,12,1 0 044
-Do "
-% 10,11 0 045
-& 10,9 0 046
-' 10,11 0 047
-cq "
-( 10,11,2 0 050
-) 10,11,2 0 051
-* 10,10 0 052
-+ 10,9 0 053
-, 10,2,2 0 054
-\- 10,5 0 055
-. 10,2 0 056
-/ 10,11,2 0 057
-sl "
-0 10,11 0 060
-1 10,11 0 061
-2 10,11 0 062
-3 10,11 0 063
-4 10,11 0 064
-5 10,11 0 065
-6 10,11 0 066
-7 10,11 0 067
-8 10,11 0 070
-9 10,11 0 071
-: 10,7 0 072
-; 10,7,2 0 073
-< 10,9 0 074
-= 10,7 0 075
-eq "
-> 10,9 0 076
-? 10,10 0 077
-@ 10,11,1 0 0100
-at "
-A 10,10 0 0101
-B 10,10 0 0102
-C 10,10 0 0103
-D 10,10 0 0104
-E 10,10 0 0105
-F 10,10 0 0106
-G 10,10 0 0107
-H 10,10 0 0110
-I 10,10 0 0111
-J 10,10 0 0112
-K 10,10 0 0113
-L 10,10 0 0114
-M 10,10 0 0115
-N 10,10 0 0116
-O 10,10 0 0117
-P 10,10 0 0120
-Q 10,10,2 0 0121
-R 10,10 0 0122
-S 10,10 0 0123
-T 10,10 0 0124
-U 10,10 0 0125
-V 10,10 0 0126
-W 10,10 0 0127
-X 10,10 0 0130
-Y 10,10 0 0131
-Z 10,10 0 0132
-[ 10,11,2 0 0133
-lB "
-\ 10,11,2 0 0134
-rs "
-] 10,11,2 0 0135
-rB "
-^ 10,11 0 0136
-a^ "
-ha "
-_ 10,0,3 0 0137
-` 10,11 0 0140
-oq "
-a 10,7 0 0141
-b 10,10 0 0142
-c 10,7 0 0143
-d 10,10 0 0144
-e 10,7 0 0145
-f 10,10 0 0146
-g 10,7,3 0 0147
-h 10,10 0 0150
-i 10,11 0 0151
-j 10,11,3 0 0152
-k 10,10 0 0153
-l 10,10 0 0154
-m 10,7 0 0155
-n 10,7 0 0156
-o 10,7 0 0157
-p 10,7,3 0 0160
-q 10,7,3 0 0161
-r 10,7 0 0162
-s 10,7 0 0163
-t 10,9 0 0164
-u 10,7 0 0165
-v 10,7 0 0166
-w 10,7 0 0167
-x 10,7 0 0170
-y 10,7,3 0 0171
-z 10,7 0 0172
-{ 10,11,2 0 0173
-lC "
-| 10,10,2 0 0174
-or "
-ba "
-} 10,11,2 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 10,7,4 0 0241
-¡ "
-ct 10,10 0 0242
-¢ "
-Po 10,10 0 0243
-£ "
-Cs 10,8 0 0244
-¤ "
-Ye 10,10 0 0245
-¥ "
-bb 10,11,2 0 0246
-¦ "
-sc 10,11,1 0 0247
-§ "
-ad 10,10 0 0250
-¨ "
-co 10,10 0 0251
-© "
-Of 10,10 0 0252
-ª "
-Fo 10,7 0 0253
-« "
-no 10,6 0 0254
-¬ "
-- 10,5 0 0255
-hy "
-­ "
-rg 10,10 0 0256
-® "
-a- 10,10 0 0257
-¯ "
-de 10,11 0 0260
-° "
-+- 10,9 0 0261
-± "
-S2 10,11 0 0262
-² "
-S3 10,11 0 0263
-³ "
-aa 10,11 0 0264
-´ "
-µ 10,7,3 0 0265
-ps 10,11,1 0 0266
-¶ "
-pc 10,6 0 0267
-· "
-ac 10,0,3 0 0270
-¸ "
-S1 10,11 0 0271
-¹ "
-Om 10,10 0 0272
-º "
-Fc 10,7 0 0273
-» "
-14 10,11 0 0274
-¼ "
-12 10,11 0 0275
-½ "
-34 10,11 0 0276
-¾ "
-r? 10,7,3 0 0277
-¿ "
-`A 10,14 0 0300
-À "
-'A 10,14 0 0301
-Á "
-^A 10,14 0 0302
-Â "
-~A 10,13 0 0303
-Ã "
-:A 10,13 0 0304
-Ä "
-oA 10,14 0 0305
-Å "
-AE 10,10 0 0306
-Æ "
-,C 10,10,3 0 0307
-Ç "
-`E 10,14 0 0310
-È "
-'E 10,14 0 0311
-É "
-^E 10,14 0 0312
-Ê "
-:E 10,13 0 0313
-Ë "
-`I 10,14 0 0314
-Ì "
-'I 10,14 0 0315
-Í "
-^I 10,14 0 0316
-Î "
-:I 10,13 0 0317
-Ï "
--D 10,10 0 0320
-Ð "
-~N 10,13 0 0321
-Ñ "
-`O 10,14 0 0322
-Ò "
-'O 10,14 0 0323
-Ó "
-^O 10,14 0 0324
-Ô "
-~O 10,13 0 0325
-Õ "
-:O 10,13 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 10,10 0 0330
-Ø "
-`U 10,14 0 0331
-Ù "
-'U 10,14 0 0332
-Ú "
-^U 10,14 0 0333
-Û "
-:U 10,13 0 0334
-Ü "
-'Y 10,14 0 0335
-Ý "
-TP 10,10 0 0336
-Þ "
-ss 10,11 0 0337
-ß "
-`a 10,11 0 0340
-à "
-'a 10,11 0 0341
-á "
-^a 10,11 0 0342
-â "
-~a 10,10 0 0343
-ã "
-:a 10,10 0 0344
-ä "
-oa 10,11 0 0345
-å "
-ae 10,7 0 0346
-æ "
-,c 10,7,3 0 0347
-ç "
-`e 10,11 0 0350
-è "
-'e 10,11 0 0351
-é "
-^e 10,11 0 0352
-ê "
-:e 10,10 0 0353
-ë "
-`i 10,11 0 0354
-ì "
-'i 10,11 0 0355
-í "
-^i 10,11 0 0356
-î "
-:i 10,10 0 0357
-ï "
-Sd 10,11 0 0360
-ð "
-~n 10,10 0 0361
-ñ "
-`o 10,11 0 0362
-ò "
-'o 10,11 0 0363
-ó "
-^o 10,11 0 0364
-ô "
-~o 10,10 0 0365
-õ "
-:o 10,10 0 0366
-ö "
-di 10,8 0 0367
-÷ "
-/o 10,8,1 0 0370
-ø "
-`u 10,11 0 0371
-ù "
-'u 10,11 0 0372
-ú "
-^u 10,11 0 0373
-û "
-:u 10,10 0 0374
-ü "
-'y 10,11,3 0 0375
-ý "
-Tp 10,11,3 0 0376
-þ "
-:y 10,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/CR b/contrib/groff/font/devX100-12/CR
deleted file mode 100644
index 895c5dd4cdbc..000000000000
--- a/contrib/groff/font/devX100-12/CR
+++ /dev/null
@@ -1,308 +0,0 @@
-name CR
-spacewidth 10
-charset
---- 10,1 0 040
-! 10,11 0 041
-" 10,11 0 042
-dq "
-# 10,11,1 0 043
-sh "
-$ 10,12,1 0 044
-Do "
-% 10,11 0 045
-& 10,9 0 046
-' 10,11 0 047
-cq "
-( 10,11,2 0 050
-) 10,11,2 0 051
-* 10,11 0 052
-+ 10,9 0 053
-, 10,2,2 0 054
-\- 10,5 0 055
-. 10,2 0 056
-/ 10,11,2 0 057
-sl "
-0 10,11 0 060
-1 10,11 0 061
-2 10,11 0 062
-3 10,11 0 063
-4 10,11 0 064
-5 10,11 0 065
-6 10,11 0 066
-7 10,11 0 067
-8 10,11 0 070
-9 10,11 0 071
-: 10,7 0 072
-; 10,7,2 0 073
-< 10,9 0 074
-= 10,7 0 075
-eq "
-> 10,9 0 076
-? 10,10 0 077
-@ 10,11,1 0 0100
-at "
-A 10,10 0 0101
-B 10,10 0 0102
-C 10,10 0 0103
-D 10,10 0 0104
-E 10,10 0 0105
-F 10,10 0 0106
-G 10,10 0 0107
-H 10,10 0 0110
-I 10,10 0 0111
-J 10,10 0 0112
-K 10,10 0 0113
-L 10,10 0 0114
-M 10,10 0 0115
-N 10,10 0 0116
-O 10,10 0 0117
-P 10,10 0 0120
-Q 10,10,2 0 0121
-R 10,10 0 0122
-S 10,10 0 0123
-T 10,10 0 0124
-U 10,10 0 0125
-V 10,10 0 0126
-W 10,10 0 0127
-X 10,10 0 0130
-Y 10,10 0 0131
-Z 10,10 0 0132
-[ 10,11,2 0 0133
-lB "
-\ 10,11,2 0 0134
-rs "
-] 10,11,2 0 0135
-rB "
-^ 10,11 0 0136
-a^ "
-ha "
-_ 10,0,3 0 0137
-` 10,11 0 0140
-oq "
-a 10,7 0 0141
-b 10,10 0 0142
-c 10,7 0 0143
-d 10,10 0 0144
-e 10,7 0 0145
-f 10,10 0 0146
-g 10,7,3 0 0147
-h 10,10 0 0150
-i 10,10 0 0151
-j 10,10,3 0 0152
-k 10,10 0 0153
-l 10,10 0 0154
-m 10,7 0 0155
-n 10,7 0 0156
-o 10,7 0 0157
-p 10,7,3 0 0160
-q 10,7,3 0 0161
-r 10,7 0 0162
-s 10,7 0 0163
-t 10,9 0 0164
-u 10,7 0 0165
-v 10,7 0 0166
-w 10,7 0 0167
-x 10,7 0 0170
-y 10,7,3 0 0171
-z 10,7 0 0172
-{ 10,11,2 0 0173
-lC "
-| 10,10,2 0 0174
-or "
-ba "
-} 10,11,2 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 10,7,3 0 0241
-¡ "
-ct 10,10 0 0242
-¢ "
-Po 10,10 0 0243
-£ "
-Cs 10,8 0 0244
-¤ "
-Ye 10,10 0 0245
-¥ "
-bb 10,10,2 0 0246
-¦ "
-sc 10,11,1 0 0247
-§ "
-ad 10,10 0 0250
-¨ "
-co 10,10 0 0251
-© "
-Of 10,10 0 0252
-ª "
-Fo 10,7 0 0253
-« "
-no 10,6 0 0254
-¬ "
-- 10,5 0 0255
-hy "
-­ "
-rg 10,10 0 0256
-® "
-a- 10,9 0 0257
-¯ "
-de 10,11 0 0260
-° "
-+- 10,9 0 0261
-± "
-S2 10,11 0 0262
-² "
-S3 10,11 0 0263
-³ "
-aa 10,11 0 0264
-´ "
-µ 10,7,3 0 0265
-ps 10,11,1 0 0266
-¶ "
-pc 10,6 0 0267
-· "
-ac 10,1,3 0 0270
-¸ "
-S1 10,11 0 0271
-¹ "
-Om 10,10 0 0272
-º "
-Fc 10,7 0 0273
-» "
-14 10,11 0 0274
-¼ "
-12 10,11 0 0275
-½ "
-34 10,11 0 0276
-¾ "
-r? 10,7,3 0 0277
-¿ "
-`A 10,14 0 0300
-À "
-'A 10,14 0 0301
-Á "
-^A 10,14 0 0302
-Â "
-~A 10,13 0 0303
-Ã "
-:A 10,13 0 0304
-Ä "
-oA 10,14 0 0305
-Å "
-AE 10,10 0 0306
-Æ "
-,C 10,10,3 0 0307
-Ç "
-`E 10,14 0 0310
-È "
-'E 10,14 0 0311
-É "
-^E 10,14 0 0312
-Ê "
-:E 10,13 0 0313
-Ë "
-`I 10,14 0 0314
-Ì "
-'I 10,14 0 0315
-Í "
-^I 10,14 0 0316
-Î "
-:I 10,13 0 0317
-Ï "
--D 10,10 0 0320
-Ð "
-~N 10,13 0 0321
-Ñ "
-`O 10,14 0 0322
-Ò "
-'O 10,14 0 0323
-Ó "
-^O 10,14 0 0324
-Ô "
-~O 10,13 0 0325
-Õ "
-:O 10,13 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 10,10 0 0330
-Ø "
-`U 10,14 0 0331
-Ù "
-'U 10,14 0 0332
-Ú "
-^U 10,14 0 0333
-Û "
-:U 10,13 0 0334
-Ü "
-'Y 10,14 0 0335
-Ý "
-TP 10,10 0 0336
-Þ "
-ss 10,11 0 0337
-ß "
-`a 10,11 0 0340
-à "
-'a 10,11 0 0341
-á "
-^a 10,11 0 0342
-â "
-~a 10,10 0 0343
-ã "
-:a 10,10 0 0344
-ä "
-oa 10,12 0 0345
-å "
-ae 10,7 0 0346
-æ "
-,c 10,7,3 0 0347
-ç "
-`e 10,11 0 0350
-è "
-'e 10,11 0 0351
-é "
-^e 10,11 0 0352
-ê "
-:e 10,10 0 0353
-ë "
-`i 10,11 0 0354
-ì "
-'i 10,11 0 0355
-í "
-^i 10,11 0 0356
-î "
-:i 10,10 0 0357
-ï "
-Sd 10,11 0 0360
-ð "
-~n 10,10 0 0361
-ñ "
-`o 10,11 0 0362
-ò "
-'o 10,11 0 0363
-ó "
-^o 10,11 0 0364
-ô "
-~o 10,10 0 0365
-õ "
-:o 10,10 0 0366
-ö "
-di 10,8 0 0367
-÷ "
-/o 10,8,1 0 0370
-ø "
-`u 10,11 0 0371
-ù "
-'u 10,11 0 0372
-ú "
-^u 10,11 0 0373
-û "
-:u 10,10 0 0374
-ü "
-'y 10,11,3 0 0375
-ý "
-Tp 10,11,3 0 0376
-þ "
-:y 10,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/DESC b/contrib/groff/font/devX100-12/DESC
deleted file mode 100644
index ead70b97f03a..000000000000
--- a/contrib/groff/font/devX100-12/DESC
+++ /dev/null
@@ -1,9 +0,0 @@
-styles R I B BI
-fonts 6 0 0 0 0 0 S
-sizes 8 10 12 14 18 24 0
-res 100
-X11
-hor 1
-vert 1
-unitwidth 12
-postpro gxditview
diff --git a/contrib/groff/font/devX100-12/HB b/contrib/groff/font/devX100-12/HB
deleted file mode 100644
index 9e91e0b9049b..000000000000
--- a/contrib/groff/font/devX100-12/HB
+++ /dev/null
@@ -1,308 +0,0 @@
-name HB
-spacewidth 5
-charset
---- 5,1 0 040
-! 6,12 0 041
-" 8,12 0 042
-dq "
-# 9,12 0 043
-sh "
-$ 9,13,1 0 044
-Do "
-% 14,12 0 045
-& 12,12 0 046
-' 5,12 0 047
-cq "
-( 6,12,3 0 050
-) 6,12,3 0 051
-* 6,12 0 052
-+ 10,8 0 053
-, 4,2,3 0 054
-\- 10,5 0 055
-. 4,2 0 056
-/ 5,12 0 057
-sl "
-0 9,12 0 060
-1 9,12 0 061
-2 9,12 0 062
-3 9,12 0 063
-4 9,12 0 064
-5 9,12 0 065
-6 9,12 0 066
-7 9,12 0 067
-8 9,12 0 070
-9 9,12 0 071
-: 5,8 0 072
-; 5,8,3 0 073
-< 10,8 0 074
-= 10,7 0 075
-eq "
-> 10,8 0 076
-? 10,12 0 077
-@ 16,12,2 0 0100
-at "
-A 12,12 0 0101
-B 12,12 0 0102
-C 12,12 0 0103
-D 12,12 0 0104
-E 11,12 0 0105
-F 10,12 0 0106
-G 13,12 0 0107
-H 12,12 0 0110
-I 4,12 0 0111
-J 9,12 0 0112
-K 12,12 0 0113
-L 10,12 0 0114
-M 13,12 0 0115
-N 12,12 0 0116
-O 13,12 0 0117
-P 11,12 0 0120
-Q 13,12,1 0 0121
-R 12,12 0 0122
-S 11,12 0 0123
-T 10,12 0 0124
-U 12,12 0 0125
-V 11,12 0 0126
-W 15,12 0 0127
-X 11,12 0 0130
-Y 11,12 0 0131
-Z 10,12 0 0132
-[ 6,12,3 0 0133
-lB "
-\ 5,12 0 0134
-rs "
-] 6,12,3 0 0135
-rB "
-^ 10,12 0 0136
-a^ "
-ha "
-_ 9,0,3 0 0137
-` 5,12 0 0140
-oq "
-a 9,9 0 0141
-b 10,12 0 0142
-c 9,9 0 0143
-d 10,12 0 0144
-e 9,9 0 0145
-f 5,12 0 0146
-g 10,9,4 0 0147
-h 10,12 0 0150
-i 4,12 0 0151
-j 5,12,4 0 0152
-k 9,12 0 0153
-l 5,12 0 0154
-m 14,9 0 0155
-n 10,9 0 0156
-o 10,9 0 0157
-p 10,9,4 0 0160
-q 10,9,4 0 0161
-r 6,9 0 0162
-s 9,9 0 0163
-t 6,11 0 0164
-u 10,9 0 0165
-v 9,9 0 0166
-w 13,9 0 0167
-x 9,9 0 0170
-y 9,9,4 0 0171
-z 8,9 0 0172
-{ 6,12,3 0 0173
-lC "
-| 4,12,4 0 0174
-or "
-ba "
-} 6,12,3 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 6,9,3 0 0241
-¡ "
-ct 9,10,1 0 0242
-¢ "
-Po 9,12 0 0243
-£ "
-Cs 9,9 0 0244
-¤ "
-Ye 9,12 0 0245
-¥ "
-bb 5,12,4 0 0246
-¦ "
-sc 9,12,3 0 0247
-§ "
-ad 6,12 0 0250
-¨ "
-co 12,12 0 0251
-© "
-Of 6,12 0 0252
-ª "
-Fo 9,8 0 0253
-« "
-no 10,7 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,12 0 0256
-® "
-a- 6,11 0 0257
-¯ "
-de 7,12 0 0260
-° "
-+- 10,11 0 0261
-± "
-S2 6,12 0 0262
-² "
-S3 6,12 0 0263
-³ "
-aa 6,13 0 0264
-´ "
-µ 10,9,3 0 0265
-ps 9,12,3 0 0266
-¶ "
-pc 5,6 0 0267
-· "
-ac 6,0,4 0 0270
-¸ "
-S1 6,12 0 0271
-¹ "
-Om 6,12 0 0272
-º "
-Fc 9,8 0 0273
-» "
-14 14,12 0 0274
-¼ "
-12 14,12 0 0275
-½ "
-34 14,12 0 0276
-¾ "
-r? 10,9,3 0 0277
-¿ "
-`A 12,16 0 0300
-À "
-'A 12,16 0 0301
-Á "
-^A 12,16 0 0302
-Â "
-~A 12,15 0 0303
-Ã "
-:A 12,15 0 0304
-Ä "
-oA 12,16 0 0305
-Å "
-AE 16,12 0 0306
-Æ "
-,C 12,12,4 0 0307
-Ç "
-`E 11,16 0 0310
-È "
-'E 11,16 0 0311
-É "
-^E 11,16 0 0312
-Ê "
-:E 11,15 0 0313
-Ë "
-`I 4,16 0 0314
-Ì "
-'I 4,16 0 0315
-Í "
-^I 4,16 0 0316
-Î "
-:I 4,15 0 0317
-Ï "
--D 12,12 0 0320
-Ð "
-~N 12,15 0 0321
-Ñ "
-`O 13,16 0 0322
-Ò "
-'O 13,16 0 0323
-Ó "
-^O 13,16 0 0324
-Ô "
-~O 13,15 0 0325
-Õ "
-:O 13,15 0 0326
-Ö "
-mu 10,9 0 0327
-× "
-/O 13,12 0 0330
-Ø "
-`U 12,16 0 0331
-Ù "
-'U 12,16 0 0332
-Ú "
-^U 12,16 0 0333
-Û "
-:U 12,15 0 0334
-Ü "
-'Y 11,16 0 0335
-Ý "
-TP 11,12 0 0336
-Þ "
-ss 10,12 0 0337
-ß "
-`a 9,13 0 0340
-à "
-'a 9,13 0 0341
-á "
-^a 9,13 0 0342
-â "
-~a 9,12 0 0343
-ã "
-:a 9,12 0 0344
-ä "
-oa 9,13 0 0345
-å "
-ae 15,9 0 0346
-æ "
-,c 9,9,4 0 0347
-ç "
-`e 9,13 0 0350
-è "
-'e 9,13 0 0351
-é "
-^e 9,13 0 0352
-ê "
-:e 9,12 0 0353
-ë "
-`i 4,13 0 0354
-ì "
-'i 4,13 0 0355
-í "
-^i 4,13 0 0356
-î "
-:i 4,12 0 0357
-ï "
-Sd 10,12 0 0360
-ð "
-~n 10,12 0 0361
-ñ "
-`o 10,13 0 0362
-ò "
-'o 10,13 0 0363
-ó "
-^o 10,13 0 0364
-ô "
-~o 10,12 0 0365
-õ "
-:o 10,12 0 0366
-ö "
-di 10,8 0 0367
-÷ "
-/o 10,9 0 0370
-ø "
-`u 10,13 0 0371
-ù "
-'u 10,13 0 0372
-ú "
-^u 10,13 0 0373
-û "
-:u 10,12 0 0374
-ü "
-'y 9,13,4 0 0375
-ý "
-Tp 10,12,4 0 0376
-þ "
-:y 9,12,4 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/HBI b/contrib/groff/font/devX100-12/HBI
deleted file mode 100644
index 12011ca5838a..000000000000
--- a/contrib/groff/font/devX100-12/HBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name HBI
-spacewidth 5
-charset
---- 5,1 0 040
-! 6,12 0 041
-" 8,12 0 042
-dq "
-# 9,12 0 043
-sh "
-$ 9,13,1 0 044
-Do "
-% 14,12 0 045
-& 12,12 0 046
-' 5,12 0 047
-cq "
-( 6,12,3 0 050
-) 6,12,3 0 051
-* 6,12 0 052
-+ 10,8 0 053
-, 4,2,3 0 054
-\- 10,5 0 055
-. 4,2 0 056
-/ 5,12 0 057
-sl "
-0 10,12 0 060
-1 9,12 0 061
-2 10,12 0 062
-3 9,12 0 063
-4 9,12 0 064
-5 9,12 0 065
-6 9,12 0 066
-7 9,12 0 067
-8 9,12 0 070
-9 9,12 0 071
-: 5,8 0 072
-; 5,8,3 0 073
-< 10,8 0 074
-= 10,7 0 075
-eq "
-> 10,8 0 076
-? 10,12 0 077
-@ 16,12,2 0 0100
-at "
-A 12,12 0 0101
-B 12,12 0 0102
-C 12,12 0 0103
-D 12,12 0 0104
-E 11,12 0 0105
-F 10,12 0 0106
-G 13,12 0 0107
-H 12,12 0 0110
-I 4,12 0 0111
-J 9,12 0 0112
-K 12,12 0 0113
-L 10,12 0 0114
-M 13,12 0 0115
-N 12,12 0 0116
-O 13,12 0 0117
-P 11,12 0 0120
-Q 13,12,1 0 0121
-R 12,12 0 0122
-S 11,12 0 0123
-T 10,12 0 0124
-U 12,12 0 0125
-V 11,12 0 0126
-W 15,12 0 0127
-X 11,12 0 0130
-Y 11,12 0 0131
-Z 10,12 0 0132
-[ 6,12,3 0 0133
-lB "
-\ 5,12 0 0134
-rs "
-] 6,12,3 0 0135
-rB "
-^ 10,12 0 0136
-a^ "
-ha "
-_ 9,0,3 0 0137
-` 5,12 0 0140
-oq "
-a 9,9 0 0141
-b 10,12 0 0142
-c 9,9 0 0143
-d 10,12 0 0144
-e 9,9 0 0145
-f 5,12 0 0146
-g 10,9,4 0 0147
-h 10,12 0 0150
-i 4,12 0 0151
-j 5,12,4 0 0152
-k 9,12 0 0153
-l 5,12 0 0154
-m 14,9 0 0155
-n 10,9 0 0156
-o 10,9 0 0157
-p 10,9,4 0 0160
-q 10,9,4 0 0161
-r 6,9 0 0162
-s 9,9 0 0163
-t 6,12 0 0164
-u 10,9 0 0165
-v 9,9 0 0166
-w 13,9 0 0167
-x 9,9 0 0170
-y 9,9,4 0 0171
-z 8,9 0 0172
-{ 6,12,3 0 0173
-lC "
-| 3,12,4 0 0174
-or "
-ba "
-} 6,12,3 0 0175
-rC "
-~ 10,5 0 0176
-a~ "
-ap "
-ti "
-r! 6,9,3 0 0241
-¡ "
-ct 9,10,1 0 0242
-¢ "
-Po 9,12 0 0243
-£ "
-Cs 9,9 0 0244
-¤ "
-Ye 9,12 0 0245
-¥ "
-bb 5,12,4 0 0246
-¦ "
-sc 9,12,3 0 0247
-§ "
-ad 6,12 0 0250
-¨ "
-co 12,12 0 0251
-© "
-Of 6,12 0 0252
-ª "
-Fo 9,8 0 0253
-« "
-no 10,7 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,12 0 0256
-® "
-a- 6,11 0 0257
-¯ "
-de 7,12 0 0260
-° "
-+- 10,11 0 0261
-± "
-S2 6,12 0 0262
-² "
-S3 6,12 0 0263
-³ "
-aa 6,13 0 0264
-´ "
-µ 10,9,4 0 0265
-ps 9,12,3 0 0266
-¶ "
-pc 5,6 0 0267
-· "
-ac 6,0,4 0 0270
-¸ "
-S1 6,12 0 0271
-¹ "
-Om 6,12 0 0272
-º "
-Fc 9,8 0 0273
-» "
-14 14,12 0 0274
-¼ "
-12 14,12 0 0275
-½ "
-34 14,12 0 0276
-¾ "
-r? 10,9,3 0 0277
-¿ "
-`A 12,16 0 0300
-À "
-'A 12,16 0 0301
-Á "
-^A 12,16 0 0302
-Â "
-~A 12,15 0 0303
-Ã "
-:A 12,15 0 0304
-Ä "
-oA 12,15 0 0305
-Å "
-AE 17,12 0 0306
-Æ "
-,C 12,12,4 0 0307
-Ç "
-`E 11,16 0 0310
-È "
-'E 11,16 0 0311
-É "
-^E 11,16 0 0312
-Ê "
-:E 11,15 0 0313
-Ë "
-`I 4,16 0 0314
-Ì "
-'I 4,16 0 0315
-Í "
-^I 4,16 0 0316
-Î "
-:I 4,15 0 0317
-Ï "
--D 12,12 0 0320
-Ð "
-~N 12,15 0 0321
-Ñ "
-`O 13,16 0 0322
-Ò "
-'O 13,16 0 0323
-Ó "
-^O 13,16 0 0324
-Ô "
-~O 13,15 0 0325
-Õ "
-:O 13,15 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 13,12 0 0330
-Ø "
-`U 12,16 0 0331
-Ù "
-'U 12,16 0 0332
-Ú "
-^U 12,16 0 0333
-Û "
-:U 12,15 0 0334
-Ü "
-'Y 11,16 0 0335
-Ý "
-TP 11,12 0 0336
-Þ "
-ss 10,12 0 0337
-ß "
-`a 9,13 0 0340
-à "
-'a 9,13 0 0341
-á "
-^a 9,13 0 0342
-â "
-~a 9,12 0 0343
-ã "
-:a 9,12 0 0344
-ä "
-oa 9,13 0 0345
-å "
-ae 15,9 0 0346
-æ "
-,c 9,9,4 0 0347
-ç "
-`e 9,13 0 0350
-è "
-'e 9,13 0 0351
-é "
-^e 9,13 0 0352
-ê "
-:e 9,12 0 0353
-ë "
-`i 4,13 0 0354
-ì "
-'i 4,13 0 0355
-í "
-^i 4,13 0 0356
-î "
-:i 4,12 0 0357
-ï "
-Sd 10,13 0 0360
-ð "
-~n 10,12 0 0361
-ñ "
-`o 10,13 0 0362
-ò "
-'o 10,13 0 0363
-ó "
-^o 10,13 0 0364
-ô "
-~o 10,12 0 0365
-õ "
-:o 10,12 0 0366
-ö "
-di 10,8 0 0367
-÷ "
-/o 10,9 0 0370
-ø "
-`u 10,13 0 0371
-ù "
-'u 10,13 0 0372
-ú "
-^u 10,13 0 0373
-û "
-:u 10,12 0 0374
-ü "
-'y 9,13,4 0 0375
-ý "
-Tp 10,12,4 0 0376
-þ "
-:y 9,12,4 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/HI b/contrib/groff/font/devX100-12/HI
deleted file mode 100644
index c5be9f966f2b..000000000000
--- a/contrib/groff/font/devX100-12/HI
+++ /dev/null
@@ -1,308 +0,0 @@
-name HI
-spacewidth 5
-charset
---- 5,1 0 040
-! 5,12 0 041
-" 6,12 0 042
-dq "
-# 9,12 0 043
-sh "
-$ 9,13,1 0 044
-Do "
-% 14,12 0 045
-& 11,12 0 046
-' 4,12 0 047
-cq "
-( 6,12,3 0 050
-) 6,12,3 0 051
-* 6,12 0 052
-+ 10,9 0 053
-, 4,2,2 0 054
-\- 10,5 0 055
-. 4,2 0 056
-/ 5,12 0 057
-sl "
-0 9,12 0 060
-1 9,12 0 061
-2 9,12 0 062
-3 9,12 0 063
-4 9,12 0 064
-5 9,12 0 065
-6 9,12 0 066
-7 9,12 0 067
-8 9,12 0 070
-9 9,12 0 071
-: 4,9 0 072
-; 4,9,2 0 073
-< 10,9 0 074
-= 10,6 0 075
-eq "
-> 10,9 0 076
-? 9,12 0 077
-@ 17,12,1 0 0100
-at "
-A 11,12 0 0101
-B 11,12 0 0102
-C 12,12 0 0103
-D 12,12 0 0104
-E 11,12 0 0105
-F 10,12 0 0106
-G 13,12 0 0107
-H 12,12 0 0110
-I 4,12 0 0111
-J 8,12 0 0112
-K 11,12 0 0113
-L 9,12 0 0114
-M 13,12 0 0115
-N 12,12 0 0116
-O 13,12 0 0117
-P 11,12 0 0120
-Q 13,12,1 0 0121
-R 12,12 0 0122
-S 11,12 0 0123
-T 10,12 0 0124
-U 12,12 0 0125
-V 11,12 0 0126
-W 16,12 0 0127
-X 11,12 0 0130
-Y 11,12 0 0131
-Z 10,12 0 0132
-[ 5,12,3 0 0133
-lB "
-\ 5,12 0 0134
-rs "
-] 5,12,3 0 0135
-rB "
-^ 8,12 0 0136
-a^ "
-ha "
-_ 9,0,3 0 0137
-` 4,12 0 0140
-oq "
-a 9,9 0 0141
-b 9,12 0 0142
-c 8,9 0 0143
-d 9,12 0 0144
-e 9,9 0 0145
-f 5,12 0 0146
-g 9,9,4 0 0147
-h 9,12 0 0150
-i 3,12 0 0151
-j 4,12,4 0 0152
-k 8,12 0 0153
-l 4,12 0 0154
-m 14,9 0 0155
-n 9,9 0 0156
-o 9,9 0 0157
-p 9,9,4 0 0160
-q 9,9,4 0 0161
-r 5,9 0 0162
-s 8,9 0 0163
-t 5,11 0 0164
-u 9,9 0 0165
-v 8,9 0 0166
-w 12,9 0 0167
-x 8,9 0 0170
-y 8,9,4 0 0171
-z 8,9 0 0172
-{ 6,12,3 0 0173
-lC "
-| 3,12,4 0 0174
-or "
-ba "
-} 6,12,3 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 6,9,3 0 0241
-¡ "
-ct 9,10,1 0 0242
-¢ "
-Po 9,12 0 0243
-£ "
-Cs 9,10 0 0244
-¤ "
-Ye 9,12 0 0245
-¥ "
-bb 4,12,4 0 0246
-¦ "
-sc 9,12,3 0 0247
-§ "
-ad 5,12 0 0250
-¨ "
-co 12,12 0 0251
-© "
-Of 6,12 0 0252
-ª "
-Fo 9,8 0 0253
-« "
-no 10,6 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,12 0 0256
-® "
-a- 6,11 0 0257
-¯ "
-de 7,12 0 0260
-° "
-+- 10,11 0 0261
-± "
-S2 6,12 0 0262
-² "
-S3 6,12 0 0263
-³ "
-aa 6,13 0 0264
-´ "
-µ 9,9,4 0 0265
-ps 9,12,3 0 0266
-¶ "
-pc 5,7 0 0267
-· "
-ac 6,0,4 0 0270
-¸ "
-S1 6,12 0 0271
-¹ "
-Om 6,12 0 0272
-º "
-Fc 9,8 0 0273
-» "
-14 14,12 0 0274
-¼ "
-12 14,13 0 0275
-½ "
-34 14,12 0 0276
-¾ "
-r? 10,9,3 0 0277
-¿ "
-`A 11,16 0 0300
-À "
-'A 11,16 0 0301
-Á "
-^A 11,16 0 0302
-Â "
-~A 11,15 0 0303
-Ã "
-:A 11,15 0 0304
-Ä "
-oA 11,15 0 0305
-Å "
-AE 16,12 0 0306
-Æ "
-,C 12,12,3 0 0307
-Ç "
-`E 11,16 0 0310
-È "
-'E 11,16 0 0311
-É "
-^E 11,16 0 0312
-Ê "
-:E 11,15 0 0313
-Ë "
-`I 4,16 0 0314
-Ì "
-'I 4,16 0 0315
-Í "
-^I 4,16 0 0316
-Î "
-:I 4,15 0 0317
-Ï "
--D 12,12 0 0320
-Ð "
-~N 12,15 0 0321
-Ñ "
-`O 13,16 0 0322
-Ò "
-'O 13,16 0 0323
-Ó "
-^O 13,16 0 0324
-Ô "
-~O 13,15 0 0325
-Õ "
-:O 13,15 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 13,12 0 0330
-Ø "
-`U 12,16 0 0331
-Ù "
-'U 12,16 0 0332
-Ú "
-^U 12,16 0 0333
-Û "
-:U 12,15 0 0334
-Ü "
-'Y 11,16 0 0335
-Ý "
-TP 11,12 0 0336
-Þ "
-ss 10,12 0 0337
-ß "
-`a 9,13 0 0340
-à "
-'a 9,13 0 0341
-á "
-^a 9,13 0 0342
-â "
-~a 9,12 0 0343
-ã "
-:a 9,12 0 0344
-ä "
-oa 9,13 0 0345
-å "
-ae 15,9 0 0346
-æ "
-,c 8,9,3 0 0347
-ç "
-`e 9,13 0 0350
-è "
-'e 9,13 0 0351
-é "
-^e 9,13 0 0352
-ê "
-:e 9,12 0 0353
-ë "
-`i 4,13 0 0354
-ì "
-'i 4,13 0 0355
-í "
-^i 4,13 0 0356
-î "
-:i 4,12 0 0357
-ï "
-Sd 9,12 0 0360
-ð "
-~n 9,12 0 0361
-ñ "
-`o 9,13 0 0362
-ò "
-'o 9,13 0 0363
-ó "
-^o 9,13 0 0364
-ô "
-~o 9,12 0 0365
-õ "
-:o 9,12 0 0366
-ö "
-di 10,9 0 0367
-÷ "
-/o 10,9 0 0370
-ø "
-`u 9,13 0 0371
-ù "
-'u 9,13 0 0372
-ú "
-^u 9,13 0 0373
-û "
-:u 9,12 0 0374
-ü "
-'y 8,13,4 0 0375
-ý "
-Tp 9,12,4 0 0376
-þ "
-:y 8,12,4 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/HR b/contrib/groff/font/devX100-12/HR
deleted file mode 100644
index 55d6bf5e3a91..000000000000
--- a/contrib/groff/font/devX100-12/HR
+++ /dev/null
@@ -1,308 +0,0 @@
-name HR
-spacewidth 5
-charset
---- 5,1 0 040
-! 5,12 0 041
-" 6,12 0 042
-dq "
-# 9,11 0 043
-sh "
-$ 9,13,2 0 044
-Do "
-% 14,12 0 045
-& 11,12 0 046
-' 4,12 0 047
-cq "
-( 6,12,4 0 050
-) 6,12,4 0 051
-* 6,12 0 052
-+ 10,9 0 053
-, 4,2,2 0 054
-\- 10,5 0 055
-. 4,2 0 056
-/ 5,12 0 057
-sl "
-0 9,12 0 060
-1 9,12 0 061
-2 9,12 0 062
-3 9,12 0 063
-4 9,12 0 064
-5 9,12 0 065
-6 9,12 0 066
-7 9,12 0 067
-8 9,12 0 070
-9 9,12 0 071
-: 4,9 0 072
-; 4,9,2 0 073
-< 10,9 0 074
-= 10,6 0 075
-eq "
-> 10,9 0 076
-? 9,12 0 077
-@ 17,12,2 0 0100
-at "
-A 11,12 0 0101
-B 11,12 0 0102
-C 12,12 0 0103
-D 12,12 0 0104
-E 11,12 0 0105
-F 10,12 0 0106
-G 13,12 0 0107
-H 12,12 0 0110
-I 4,12 0 0111
-J 8,12 0 0112
-K 11,12 0 0113
-L 9,12 0 0114
-M 13,12 0 0115
-N 12,12 0 0116
-O 13,12 0 0117
-P 11,12 0 0120
-Q 13,12,1 0 0121
-R 12,12 0 0122
-S 11,12 0 0123
-T 10,12 0 0124
-U 12,12 0 0125
-V 11,12 0 0126
-W 15,12 0 0127
-X 11,12 0 0130
-Y 11,12 0 0131
-Z 10,12 0 0132
-[ 5,12,3 0 0133
-lB "
-\ 5,12 0 0134
-rs "
-] 5,12,3 0 0135
-rB "
-^ 8,12 0 0136
-a^ "
-ha "
-_ 9,0,3 0 0137
-` 4,12 0 0140
-oq "
-a 9,9 0 0141
-b 9,12 0 0142
-c 8,9 0 0143
-d 9,12 0 0144
-e 9,9 0 0145
-f 5,12 0 0146
-g 9,9,4 0 0147
-h 9,12 0 0150
-i 3,12 0 0151
-j 4,12,4 0 0152
-k 8,12 0 0153
-l 3,12 0 0154
-m 14,9 0 0155
-n 9,9 0 0156
-o 9,9 0 0157
-p 9,9,4 0 0160
-q 9,9,4 0 0161
-r 5,9 0 0162
-s 8,9 0 0163
-t 5,11 0 0164
-u 9,9 0 0165
-v 8,9 0 0166
-w 12,9 0 0167
-x 8,9 0 0170
-y 8,9,3 0 0171
-z 8,9 0 0172
-{ 6,12,4 0 0173
-lC "
-| 4,12,4 0 0174
-or "
-ba "
-} 6,12,4 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 6,9,3 0 0241
-¡ "
-ct 9,11,2 0 0242
-¢ "
-Po 9,12 0 0243
-£ "
-Cs 9,10 0 0244
-¤ "
-Ye 9,12 0 0245
-¥ "
-bb 4,12,4 0 0246
-¦ "
-sc 9,12,3 0 0247
-§ "
-ad 5,12 0 0250
-¨ "
-co 12,12 0 0251
-© "
-Of 6,12 0 0252
-ª "
-Fo 9,8 0 0253
-« "
-no 10,6 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,12 0 0256
-® "
-a- 6,11 0 0257
-¯ "
-de 7,12 0 0260
-° "
-+- 10,11 0 0261
-± "
-S2 6,12 0 0262
-² "
-S3 6,12 0 0263
-³ "
-aa 6,13 0 0264
-´ "
-µ 9,9,4 0 0265
-ps 9,12,3 0 0266
-¶ "
-pc 5,6 0 0267
-· "
-ac 6,0,4 0 0270
-¸ "
-S1 6,12 0 0271
-¹ "
-Om 6,12 0 0272
-º "
-Fc 9,8 0 0273
-» "
-14 14,12 0 0274
-¼ "
-12 14,13 0 0275
-½ "
-34 14,12 0 0276
-¾ "
-r? 10,9,3 0 0277
-¿ "
-`A 11,16 0 0300
-À "
-'A 11,16 0 0301
-Á "
-^A 11,16 0 0302
-Â "
-~A 11,15 0 0303
-Ã "
-:A 11,15 0 0304
-Ä "
-oA 11,15 0 0305
-Å "
-AE 16,12 0 0306
-Æ "
-,C 12,12,4 0 0307
-Ç "
-`E 11,16 0 0310
-È "
-'E 11,16 0 0311
-É "
-^E 11,16 0 0312
-Ê "
-:E 11,15 0 0313
-Ë "
-`I 4,16 0 0314
-Ì "
-'I 4,16 0 0315
-Í "
-^I 4,16 0 0316
-Î "
-:I 4,15 0 0317
-Ï "
--D 12,12 0 0320
-Ð "
-~N 12,15 0 0321
-Ñ "
-`O 13,16 0 0322
-Ò "
-'O 13,16 0 0323
-Ó "
-^O 13,16 0 0324
-Ô "
-~O 13,15 0 0325
-Õ "
-:O 13,15 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 13,13,1 0 0330
-Ø "
-`U 12,16 0 0331
-Ù "
-'U 12,16 0 0332
-Ú "
-^U 12,16 0 0333
-Û "
-:U 12,15 0 0334
-Ü "
-'Y 11,16 0 0335
-Ý "
-TP 11,12 0 0336
-Þ "
-ss 10,12 0 0337
-ß "
-`a 9,13 0 0340
-à "
-'a 9,13 0 0341
-á "
-^a 9,13 0 0342
-â "
-~a 9,12 0 0343
-ã "
-:a 9,12 0 0344
-ä "
-oa 9,13 0 0345
-å "
-ae 15,9 0 0346
-æ "
-,c 8,9,4 0 0347
-ç "
-`e 9,13 0 0350
-è "
-'e 9,13 0 0351
-é "
-^e 9,13 0 0352
-ê "
-:e 9,12 0 0353
-ë "
-`i 4,13 0 0354
-ì "
-'i 4,13 0 0355
-í "
-^i 4,13 0 0356
-î "
-:i 4,12 0 0357
-ï "
-Sd 9,12 0 0360
-ð "
-~n 9,12 0 0361
-ñ "
-`o 9,13 0 0362
-ò "
-'o 9,13 0 0363
-ó "
-^o 9,13 0 0364
-ô "
-~o 9,12 0 0365
-õ "
-:o 9,12 0 0366
-ö "
-di 10,9 0 0367
-÷ "
-/o 10,10 0 0370
-ø "
-`u 9,13 0 0371
-ù "
-'u 9,13 0 0372
-ú "
-^u 9,13 0 0373
-û "
-:u 9,12 0 0374
-ü "
-'y 8,13,3 0 0375
-ý "
-Tp 9,12,4 0 0376
-þ "
-:y 8,12,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/Makefile.sub b/contrib/groff/font/devX100-12/Makefile.sub
deleted file mode 100644
index d0747579afe5..000000000000
--- a/contrib/groff/font/devX100-12/Makefile.sub
+++ /dev/null
@@ -1,2 +0,0 @@
-DEV=X100-12
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
diff --git a/contrib/groff/font/devX100-12/NB b/contrib/groff/font/devX100-12/NB
deleted file mode 100644
index 975de355780e..000000000000
--- a/contrib/groff/font/devX100-12/NB
+++ /dev/null
@@ -1,308 +0,0 @@
-name NB
-spacewidth 4
-charset
---- 4,1 0 040
-! 5,12 0 041
-" 6,12 0 042
-dq "
-# 10,12 0 043
-sh "
-$ 10,14,1 0 044
-Do "
-% 14,12 0 045
-& 14,12 0 046
-' 4,12 0 047
-cq "
-( 6,12,2 0 050
-) 6,12,2 0 051
-* 8,12 0 052
-+ 10,8 0 053
-, 5,3,3 0 054
-\- 10,5 0 055
-. 5,3 0 056
-/ 5,12 0 057
-sl "
-0 10,12 0 060
-1 9,12 0 061
-2 9,12 0 062
-3 10,12 0 063
-4 9,12 0 064
-5 10,12 0 065
-6 9,12 0 066
-7 9,12 0 067
-8 9,12 0 070
-9 10,12 0 071
-: 5,8 0 072
-; 5,8,3 0 073
-< 10,9 0 074
-= 10,7 0 075
-eq "
-> 10,9 0 076
-? 8,12 0 077
-@ 12,12,1 0 0100
-at "
-A 13,12 0 0101
-B 13,12 0 0102
-C 13,12 0 0103
-D 14,12 0 0104
-E 12,12 0 0105
-F 12,12 0 0106
-G 14,12 0 0107
-H 15,12 0 0110
-I 7,12 0 0111
-J 11,12 0 0112
-K 13,12 0 0113
-L 12,12 0 0114
-M 16,12 0 0115
-N 14,12 0 0116
-O 14,12 0 0117
-P 13,12 0 0120
-Q 14,12,3 0 0121
-R 14,12 0 0122
-S 11,12 0 0123
-T 12,12 0 0124
-U 14,12 0 0125
-V 13,12 0 0126
-W 16,12 0 0127
-X 12,12 0 0130
-Y 12,12 0 0131
-Z 11,12 0 0132
-[ 6,12,2 0 0133
-lB "
-\ 10,12 0 0134
-rs "
-] 7,12,2 0 0135
-rB "
-^ 10,12 0 0136
-a^ "
-ha "
-_ 8,0,2 0 0137
-` 4,12 0 0140
-oq "
-a 10,8 0 0141
-b 11,12 0 0142
-c 9,8 0 0143
-d 11,12 0 0144
-e 10,8 0 0145
-f 7,12 0 0146
-g 10,9,3 0 0147
-h 11,12 0 0150
-i 6,12 0 0151
-j 6,12,3 0 0152
-k 11,12 0 0153
-l 6,12 0 0154
-m 16,8 0 0155
-n 11,8 0 0156
-o 11,8 0 0157
-p 11,8,3 0 0160
-q 10,8,3 0 0161
-r 9,8 0 0162
-s 8,8 0 0163
-t 7,11 0 0164
-u 11,8 0 0165
-v 10,8 0 0166
-w 15,8 0 0167
-x 10,8 0 0170
-y 10,8,3 0 0171
-z 9,8 0 0172
-{ 6,12,2 0 0173
-lC "
-| 10,12 0 0174
-or "
-ba "
-} 6,12,2 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 5,9,3 0 0241
-¡ "
-ct 10,10,2 0 0242
-¢ "
-Po 10,12 0 0243
-£ "
-Cs 10,10 0 0244
-¤ "
-Ye 10,12 0 0245
-¥ "
-bb 10,12 0 0246
-¦ "
-sc 9,12,3 0 0247
-§ "
-ad 6,11 0 0250
-¨ "
-co 12,12 0 0251
-© "
-Of 6,12 0 0252
-ª "
-Fo 8,7 0 0253
-« "
-no 10,7 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,12 0 0256
-® "
-a- 6,11 0 0257
-¯ "
-de 7,12 0 0260
-° "
-+- 10,9 0 0261
-± "
-S2 6,12 0 0262
-² "
-S3 6,12 0 0263
-³ "
-aa 6,12 0 0264
-´ "
-µ 11,8,3 0 0265
-ps 12,12 0 0266
-¶ "
-pc 5,6 0 0267
-· "
-ac 6,1,3 0 0270
-¸ "
-S1 6,12 0 0271
-¹ "
-Om 6,12 0 0272
-º "
-Fc 8,7 0 0273
-» "
-14 14,12 0 0274
-¼ "
-12 14,12 0 0275
-½ "
-34 14,12 0 0276
-¾ "
-r? 8,9,3 0 0277
-¿ "
-`A 13,16 0 0300
-À "
-'A 13,16 0 0301
-Á "
-^A 13,16 0 0302
-Â "
-~A 13,15 0 0303
-Ã "
-:A 13,15 0 0304
-Ä "
-oA 13,16 0 0305
-Å "
-AE 16,12 0 0306
-Æ "
-,C 13,12,3 0 0307
-Ç "
-`E 12,16 0 0310
-È "
-'E 12,16 0 0311
-É "
-^E 12,16 0 0312
-Ê "
-:E 12,15 0 0313
-Ë "
-`I 7,16 0 0314
-Ì "
-'I 7,16 0 0315
-Í "
-^I 7,16 0 0316
-Î "
-:I 7,15 0 0317
-Ï "
--D 14,12 0 0320
-Ð "
-~N 14,15 0 0321
-Ñ "
-`O 14,16 0 0322
-Ò "
-'O 14,16 0 0323
-Ó "
-^O 14,16 0 0324
-Ô "
-~O 14,15 0 0325
-Õ "
-:O 14,15 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 14,13,1 0 0330
-Ø "
-`U 14,16 0 0331
-Ù "
-'U 14,16 0 0332
-Ú "
-^U 14,16 0 0333
-Û "
-:U 14,15 0 0334
-Ü "
-'Y 12,16 0 0335
-Ý "
-TP 13,12 0 0336
-Þ "
-ss 10,12 0 0337
-ß "
-`a 10,12 0 0340
-à "
-'a 10,12 0 0341
-á "
-^a 10,12 0 0342
-â "
-~a 10,11 0 0343
-ã "
-:a 10,11 0 0344
-ä "
-oa 10,12 0 0345
-å "
-ae 15,8 0 0346
-æ "
-,c 9,8,3 0 0347
-ç "
-`e 10,12 0 0350
-è "
-'e 10,12 0 0351
-é "
-^e 10,12 0 0352
-ê "
-:e 10,11 0 0353
-ë "
-`i 6,12 0 0354
-ì "
-'i 6,12 0 0355
-í "
-^i 6,12 0 0356
-î "
-:i 6,11 0 0357
-ï "
-Sd 11,13 0 0360
-ð "
-~n 11,11 0 0361
-ñ "
-`o 11,12 0 0362
-ò "
-'o 11,12 0 0363
-ó "
-^o 11,12 0 0364
-ô "
-~o 11,11 0 0365
-õ "
-:o 11,11 0 0366
-ö "
-di 10,8 0 0367
-÷ "
-/o 10,10,2 0 0370
-ø "
-`u 11,12 0 0371
-ù "
-'u 11,12 0 0372
-ú "
-^u 11,12 0 0373
-û "
-:u 11,11 0 0374
-ü "
-'y 10,12,3 0 0375
-ý "
-Tp 11,12,3 0 0376
-þ "
-:y 10,11,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/NBI b/contrib/groff/font/devX100-12/NBI
deleted file mode 100644
index d67e0e42f280..000000000000
--- a/contrib/groff/font/devX100-12/NBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name NBI
-spacewidth 4
-charset
---- 4,1 0 040
-! 6,12 0 041
-" 7,12 0 042
-dq "
-# 10,12 0 043
-sh "
-$ 9,14,1 0 044
-Do "
-% 15,12 0 045
-& 15,12 0 046
-' 4,12 0 047
-cq "
-( 7,12,2 0 050
-) 7,12,2 0 051
-* 8,12 0 052
-+ 10,8 0 053
-, 5,3,3 0 054
-\- 10,5 0 055
-. 5,3 0 056
-/ 5,12 0 057
-sl "
-0 9,12 0 060
-1 9,12 0 061
-2 9,12 0 062
-3 9,12 0 063
-4 9,12 0 064
-5 10,12 0 065
-6 10,12 0 066
-7 9,12 0 067
-8 9,12 0 070
-9 9,12 0 071
-: 5,8 0 072
-; 5,8,3 0 073
-< 10,8 0 074
-= 10,7 0 075
-eq "
-> 10,8 0 076
-? 8,12 0 077
-@ 12,12 0 0100
-at "
-A 12,12 0 0101
-B 13,12 0 0102
-C 13,12 0 0103
-D 14,12 0 0104
-E 12,12 0 0105
-F 12,12 0 0106
-G 14,12 0 0107
-H 14,12 0 0110
-I 7,12 0 0111
-J 11,12 0 0112
-K 13,12 0 0113
-L 12,12 0 0114
-M 16,12 0 0115
-N 14,12 0 0116
-O 14,12 0 0117
-P 12,12 0 0120
-Q 14,12,3 0 0121
-R 14,12 0 0122
-S 11,12 0 0123
-T 12,12 0 0124
-U 14,12 0 0125
-V 12,12 0 0126
-W 16,12 0 0127
-X 12,12 0 0130
-Y 12,12 0 0131
-Z 12,12 0 0132
-[ 7,12,2 0 0133
-lB "
-\ 10,12 0 0134
-rs "
-] 7,12,2 0 0135
-rB "
-^ 10,12 0 0136
-a^ "
-ha "
-_ 8,0,3 0 0137
-` 4,12 0 0140
-oq "
-a 11,8 0 0141
-b 10,12 0 0142
-c 9,8 0 0143
-d 11,12 0 0144
-e 9,8 0 0145
-f 6,12,3 0 0146
-g 10,9,3 0 0147
-h 11,12 0 0150
-i 6,12 0 0151
-j 6,12,3 0 0152
-k 11,12 0 0153
-l 6,12 0 0154
-m 15,8 0 0155
-n 11,8 0 0156
-o 10,8 0 0157
-p 11,8,3 0 0160
-q 10,8,3 0 0161
-r 9,8 0 0162
-s 8,8 0 0163
-t 7,11 0 0164
-u 11,8 0 0165
-v 9,8 0 0166
-w 14,8 0 0167
-x 9,8 0 0170
-y 9,8,3 0 0171
-z 9,8 0 0172
-{ 7,12,2 0 0173
-lC "
-| 10,12 0 0174
-or "
-ba "
-} 7,12,2 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 6,9,3 0 0241
-¡ "
-ct 10,10,2 0 0242
-¢ "
-Po 10,12 0 0243
-£ "
-Cs 10,10 0 0244
-¤ "
-Ye 10,12 0 0245
-¥ "
-bb 10,12 0 0246
-¦ "
-sc 9,12,3 0 0247
-§ "
-ad 6,11 0 0250
-¨ "
-co 12,12 0 0251
-© "
-Of 7,12 0 0252
-ª "
-Fo 8,7 0 0253
-« "
-no 10,7 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,12 0 0256
-® "
-a- 6,11 0 0257
-¯ "
-de 7,12 0 0260
-° "
-+- 10,8 0 0261
-± "
-S2 6,12 0 0262
-² "
-S3 6,12 0 0263
-³ "
-aa 6,12 0 0264
-´ "
-µ 11,8,3 0 0265
-ps 11,12 0 0266
-¶ "
-pc 5,6 0 0267
-· "
-ac 5,1,3 0 0270
-¸ "
-S1 6,12 0 0271
-¹ "
-Om 6,12 0 0272
-º "
-Fc 8,7 0 0273
-» "
-14 14,12 0 0274
-¼ "
-12 14,12 0 0275
-½ "
-34 14,12 0 0276
-¾ "
-r? 8,9,3 0 0277
-¿ "
-`A 12,16 0 0300
-À "
-'A 12,16 0 0301
-Á "
-^A 12,16 0 0302
-Â "
-~A 12,15 0 0303
-Ã "
-:A 12,15 0 0304
-Ä "
-oA 12,16 0 0305
-Å "
-AE 15,12 0 0306
-Æ "
-,C 13,12,3 0 0307
-Ç "
-`E 12,16 0 0310
-È "
-'E 12,16 0 0311
-É "
-^E 12,16 0 0312
-Ê "
-:E 12,15 0 0313
-Ë "
-`I 7,16 0 0314
-Ì "
-'I 7,16 0 0315
-Í "
-^I 7,16 0 0316
-Î "
-:I 7,15 0 0317
-Ï "
--D 14,12 0 0320
-Ð "
-~N 14,15 0 0321
-Ñ "
-`O 14,16 0 0322
-Ò "
-'O 14,16 0 0323
-Ó "
-^O 14,16 0 0324
-Ô "
-~O 14,15 0 0325
-Õ "
-:O 14,15 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 14,13,1 0 0330
-Ø "
-`U 14,16 0 0331
-Ù "
-'U 14,16 0 0332
-Ú "
-^U 14,16 0 0333
-Û "
-:U 14,15 0 0334
-Ü "
-'Y 12,16 0 0335
-Ý "
-TP 12,12 0 0336
-Þ "
-ss 10,12,3 0 0337
-ß "
-`a 11,12 0 0340
-à "
-'a 11,12 0 0341
-á "
-^a 11,12 0 0342
-â "
-~a 11,11 0 0343
-ã "
-:a 11,11 0 0344
-ä "
-oa 11,13 0 0345
-å "
-ae 14,8 0 0346
-æ "
-,c 9,8,3 0 0347
-ç "
-`e 9,12 0 0350
-è "
-'e 9,12 0 0351
-é "
-^e 9,12 0 0352
-ê "
-:e 9,11 0 0353
-ë "
-`i 6,12 0 0354
-ì "
-'i 6,12 0 0355
-í "
-^i 6,12 0 0356
-î "
-:i 6,11 0 0357
-ï "
-Sd 10,13 0 0360
-ð "
-~n 11,11 0 0361
-ñ "
-`o 10,12 0 0362
-ò "
-'o 10,12 0 0363
-ó "
-^o 10,12 0 0364
-ô "
-~o 10,11 0 0365
-õ "
-:o 10,11 0 0366
-ö "
-di 10,8 0 0367
-÷ "
-/o 10,10,2 0 0370
-ø "
-`u 11,12 0 0371
-ù "
-'u 11,12 0 0372
-ú "
-^u 11,12 0 0373
-û "
-:u 11,11 0 0374
-ü "
-'y 9,12,3 0 0375
-ý "
-Tp 11,11,3 0 0376
-þ "
-:y 9,11,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/NI b/contrib/groff/font/devX100-12/NI
deleted file mode 100644
index be54ca399069..000000000000
--- a/contrib/groff/font/devX100-12/NI
+++ /dev/null
@@ -1,308 +0,0 @@
-name NI
-spacewidth 4
-charset
---- 4,1 0 040
-! 6,12 0 041
-" 7,12 0 042
-dq "
-# 9,12 0 043
-sh "
-$ 9,14,1 0 044
-Do "
-% 14,12 0 045
-& 14,12 0 046
-' 3,12 0 047
-cq "
-( 6,12,2 0 050
-) 5,12,2 0 051
-* 8,12 0 052
-+ 10,9 0 053
-, 4,2,3 0 054
-\- 10,5 0 055
-. 4,2 0 056
-/ 10,12,2 0 057
-sl "
-0 9,12 0 060
-1 9,12 0 061
-2 9,12 0 062
-3 9,12 0 063
-4 9,12 0 064
-5 9,12 0 065
-6 9,12 0 066
-7 9,12 0 067
-8 9,12 0 070
-9 9,12 0 071
-: 5,8 0 072
-; 5,8,3 0 073
-< 10,9 0 074
-= 10,6 0 075
-eq "
-> 10,9 0 076
-? 7,12 0 077
-@ 12,12 0 0100
-at "
-A 12,12 0 0101
-B 12,12 0 0102
-C 12,12 0 0103
-D 13,12 0 0104
-E 12,12 0 0105
-F 11,12 0 0106
-G 13,12 0 0107
-H 14,12 0 0110
-I 7,12 0 0111
-J 10,12 0 0112
-K 12,12 0 0113
-L 11,12 0 0114
-M 16,12 0 0115
-N 13,12 0 0116
-O 13,12 0 0117
-P 11,12 0 0120
-Q 13,12,3 0 0121
-R 13,12 0 0122
-S 11,12 0 0123
-T 11,12 0 0124
-U 13,12 0 0125
-V 11,12 0 0126
-W 15,12 0 0127
-X 12,12 0 0130
-Y 11,12 0 0131
-Z 11,12 0 0132
-[ 6,12,2 0 0133
-lB "
-\ 10,12 0 0134
-rs "
-] 6,12,2 0 0135
-rB "
-^ 10,12 0 0136
-a^ "
-ha "
-_ 8,0,3 0 0137
-` 3,12 0 0140
-oq "
-a 10,8 0 0141
-b 9,12 0 0142
-c 8,8 0 0143
-d 10,12 0 0144
-e 7,8 0 0145
-f 5,12,3 0 0146
-g 9,9,3 0 0147
-h 10,12 0 0150
-i 6,12 0 0151
-j 5,12,3 0 0152
-k 9,12 0 0153
-l 6,12 0 0154
-m 15,8 0 0155
-n 10,8 0 0156
-o 8,8 0 0157
-p 9,8,3 0 0160
-q 9,8,3 0 0161
-r 7,8 0 0162
-s 7,8 0 0163
-t 6,11 0 0164
-u 10,8 0 0165
-v 8,8 0 0166
-w 13,8 0 0167
-x 8,8 0 0170
-y 8,8,3 0 0171
-z 8,8 0 0172
-{ 6,12,2 0 0173
-lC "
-| 10,12 0 0174
-or "
-ba "
-} 6,12,2 0 0175
-rC "
-~ 10,5 0 0176
-a~ "
-ap "
-ti "
-r! 6,9,3 0 0241
-¡ "
-ct 9,10,2 0 0242
-¢ "
-Po 9,12 0 0243
-£ "
-Cs 9,10 0 0244
-¤ "
-Ye 9,12 0 0245
-¥ "
-bb 10,12 0 0246
-¦ "
-sc 8,12,3 0 0247
-§ "
-ad 6,11 0 0250
-¨ "
-co 12,12 0 0251
-© "
-Of 7,12 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 10,6 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 12,12 0 0256
-® "
-a- 5,10 0 0257
-¯ "
-de 7,12 0 0260
-° "
-+- 10,9 0 0261
-± "
-S2 6,12 0 0262
-² "
-S3 6,12 0 0263
-³ "
-aa 5,12 0 0264
-´ "
-µ 10,8,3 0 0265
-ps 11,12 0 0266
-¶ "
-pc 5,5 0 0267
-· "
-ac 5,1,3 0 0270
-¸ "
-S1 6,12 0 0271
-¹ "
-Om 6,12 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 14,12 0 0274
-¼ "
-12 14,12 0 0275
-½ "
-34 14,12 0 0276
-¾ "
-r? 7,9,3 0 0277
-¿ "
-`A 12,16 0 0300
-À "
-'A 12,16 0 0301
-Á "
-^A 12,16 0 0302
-Â "
-~A 12,15 0 0303
-Ã "
-:A 12,15 0 0304
-Ä "
-oA 12,16 0 0305
-Å "
-AE 14,12 0 0306
-Æ "
-,C 12,12,3 0 0307
-Ç "
-`E 12,16 0 0310
-È "
-'E 12,16 0 0311
-É "
-^E 12,16 0 0312
-Ê "
-:E 12,15 0 0313
-Ë "
-`I 7,16 0 0314
-Ì "
-'I 7,16 0 0315
-Í "
-^I 7,16 0 0316
-Î "
-:I 7,15 0 0317
-Ï "
--D 13,12 0 0320
-Ð "
-~N 13,15 0 0321
-Ñ "
-`O 13,16 0 0322
-Ò "
-'O 13,16 0 0323
-Ó "
-^O 13,16 0 0324
-Ô "
-~O 13,15 0 0325
-Õ "
-:O 13,15 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 13,13,1 0 0330
-Ø "
-`U 13,16 0 0331
-Ù "
-'U 13,16 0 0332
-Ú "
-^U 13,16 0 0333
-Û "
-:U 13,15 0 0334
-Ü "
-'Y 11,16 0 0335
-Ý "
-TP 11,12 0 0336
-Þ "
-ss 9,12,3 0 0337
-ß "
-`a 10,12 0 0340
-à "
-'a 10,12 0 0341
-á "
-^a 10,12 0 0342
-â "
-~a 10,11 0 0343
-ã "
-:a 10,11 0 0344
-ä "
-oa 10,13 0 0345
-å "
-ae 12,8 0 0346
-æ "
-,c 8,8,3 0 0347
-ç "
-`e 7,12 0 0350
-è "
-'e 7,12 0 0351
-é "
-^e 7,12 0 0352
-ê "
-:e 7,11 0 0353
-ë "
-`i 6,12 0 0354
-ì "
-'i 6,12 0 0355
-í "
-^i 6,12 0 0356
-î "
-:i 6,11 0 0357
-ï "
-Sd 8,13 0 0360
-ð "
-~n 10,11 0 0361
-ñ "
-`o 8,12 0 0362
-ò "
-'o 8,12 0 0363
-ó "
-^o 8,12 0 0364
-ô "
-~o 8,11 0 0365
-õ "
-:o 8,11 0 0366
-ö "
-di 10,8 0 0367
-÷ "
-/o 8,10,2 0 0370
-ø "
-`u 10,12 0 0371
-ù "
-'u 10,12 0 0372
-ú "
-^u 10,12 0 0373
-û "
-:u 10,11 0 0374
-ü "
-'y 8,12,3 0 0375
-ý "
-Tp 9,11,3 0 0376
-þ "
-:y 8,11,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/NR b/contrib/groff/font/devX100-12/NR
deleted file mode 100644
index f4f922ef346c..000000000000
--- a/contrib/groff/font/devX100-12/NR
+++ /dev/null
@@ -1,308 +0,0 @@
-name NR
-spacewidth 4
-charset
---- 4,1 0 040
-! 5,12 0 041
-" 6,12 0 042
-dq "
-# 9,12 0 043
-sh "
-$ 9,13,2 0 044
-Do "
-% 14,12 0 045
-& 13,12 0 046
-' 3,12 0 047
-cq "
-( 6,12,2 0 050
-) 6,12,2 0 051
-* 8,12 0 052
-+ 10,9 0 053
-, 4,2,3 0 054
-\- 10,5 0 055
-. 4,2 0 056
-/ 5,12 0 057
-sl "
-0 9,12 0 060
-1 9,12 0 061
-2 9,12 0 062
-3 9,12 0 063
-4 9,12 0 064
-5 9,12 0 065
-6 9,12 0 066
-7 9,12 0 067
-8 9,12 0 070
-9 9,12 0 071
-: 4,8 0 072
-; 4,8,3 0 073
-< 10,8 0 074
-= 10,6 0 075
-eq "
-> 10,8 0 076
-? 7,12 0 077
-@ 12,12,1 0 0100
-at "
-A 12,12 0 0101
-B 12,12 0 0102
-C 12,12 0 0103
-D 13,12 0 0104
-E 12,12 0 0105
-F 11,12 0 0106
-G 13,12 0 0107
-H 14,12 0 0110
-I 7,12 0 0111
-J 9,12 0 0112
-K 13,12 0 0113
-L 11,12 0 0114
-M 16,12 0 0115
-N 13,12 0 0116
-O 13,12 0 0117
-P 11,12 0 0120
-Q 13,12,3 0 0121
-R 12,12 0 0122
-S 10,12 0 0123
-T 11,12 0 0124
-U 13,12 0 0125
-V 12,12 0 0126
-W 16,12 0 0127
-X 11,12 0 0130
-Y 12,12 0 0131
-Z 10,12 0 0132
-[ 6,12,2 0 0133
-lB "
-\ 10,12 0 0134
-rs "
-] 6,12,2 0 0135
-rB "
-^ 10,12 0 0136
-a^ "
-ha "
-_ 8,0,2 0 0137
-` 3,12 0 0140
-oq "
-a 9,8 0 0141
-b 9,12 0 0142
-c 7,8 0 0143
-d 10,12 0 0144
-e 8,8 0 0145
-f 6,12 0 0146
-g 9,8,3 0 0147
-h 10,12 0 0150
-i 5,12 0 0151
-j 5,12,3 0 0152
-k 10,12 0 0153
-l 5,12 0 0154
-m 15,8 0 0155
-n 10,8 0 0156
-o 8,8 0 0157
-p 9,8,3 0 0160
-q 9,8,3 0 0161
-r 7,8 0 0162
-s 8,8 0 0163
-t 7,11 0 0164
-u 10,8 0 0165
-v 9,8 0 0166
-w 13,8 0 0167
-x 9,8 0 0170
-y 9,8,3 0 0171
-z 8,8 0 0172
-{ 6,12,2 0 0173
-lC "
-| 10,12 0 0174
-or "
-ba "
-} 6,12,2 0 0175
-rC "
-~ 10,5 0 0176
-a~ "
-ap "
-ti "
-r! 5,9,3 0 0241
-¡ "
-ct 9,10,2 0 0242
-¢ "
-Po 9,12 0 0243
-£ "
-Cs 9,10 0 0244
-¤ "
-Ye 9,12 0 0245
-¥ "
-bb 10,12 0 0246
-¦ "
-sc 8,12,3 0 0247
-§ "
-ad 5,11 0 0250
-¨ "
-co 12,12 0 0251
-© "
-Of 6,12 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 10,6 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 12,12 0 0256
-® "
-a- 5,10 0 0257
-¯ "
-de 7,12 0 0260
-° "
-+- 10,9 0 0261
-± "
-S2 6,12 0 0262
-² "
-S3 6,12 0 0263
-³ "
-aa 5,12 0 0264
-´ "
-µ 10,8,3 0 0265
-ps 10,12,3 0 0266
-¶ "
-pc 5,5 0 0267
-· "
-ac 5,1,3 0 0270
-¸ "
-S1 6,12 0 0271
-¹ "
-Om 5,12 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 14,12 0 0274
-¼ "
-12 13,12 0 0275
-½ "
-34 14,12 0 0276
-¾ "
-r? 7,9,3 0 0277
-¿ "
-`A 12,16 0 0300
-À "
-'A 12,16 0 0301
-Á "
-^A 12,16 0 0302
-Â "
-~A 12,15 0 0303
-Ã "
-:A 12,15 0 0304
-Ä "
-oA 12,16 0 0305
-Å "
-AE 17,12 0 0306
-Æ "
-,C 12,12,3 0 0307
-Ç "
-`E 12,16 0 0310
-È "
-'E 12,16 0 0311
-É "
-^E 12,16 0 0312
-Ê "
-:E 12,15 0 0313
-Ë "
-`I 7,16 0 0314
-Ì "
-'I 7,16 0 0315
-Í "
-^I 7,16 0 0316
-Î "
-:I 7,15 0 0317
-Ï "
--D 13,12 0 0320
-Ð "
-~N 13,15 0 0321
-Ñ "
-`O 13,16 0 0322
-Ò "
-'O 13,16 0 0323
-Ó "
-^O 13,16 0 0324
-Ô "
-~O 13,15 0 0325
-Õ "
-:O 13,15 0 0326
-Ö "
-mu 10,8 0 0327
-× "
-/O 13,13,1 0 0330
-Ø "
-`U 13,16 0 0331
-Ù "
-'U 13,16 0 0332
-Ú "
-^U 13,16 0 0333
-Û "
-:U 13,15 0 0334
-Ü "
-'Y 12,16 0 0335
-Ý "
-TP 11,12 0 0336
-Þ "
-ss 10,12 0 0337
-ß "
-`a 9,12 0 0340
-à "
-'a 9,12 0 0341
-á "
-^a 9,12 0 0342
-â "
-~a 9,11 0 0343
-ã "
-:a 9,11 0 0344
-ä "
-oa 9,13 0 0345
-å "
-ae 13,8 0 0346
-æ "
-,c 7,8,3 0 0347
-ç "
-`e 8,12 0 0350
-è "
-'e 8,12 0 0351
-é "
-^e 8,12 0 0352
-ê "
-:e 8,11 0 0353
-ë "
-`i 5,12 0 0354
-ì "
-'i 5,12 0 0355
-í "
-^i 5,12 0 0356
-î "
-:i 5,11 0 0357
-ï "
-Sd 8,13 0 0360
-ð "
-~n 10,11 0 0361
-ñ "
-`o 8,12 0 0362
-ò "
-'o 8,12 0 0363
-ó "
-^o 8,12 0 0364
-ô "
-~o 8,11 0 0365
-õ "
-:o 8,11 0 0366
-ö "
-di 10,8 0 0367
-÷ "
-/o 8,9,1 0 0370
-ø "
-`u 10,12 0 0371
-ù "
-'u 10,12 0 0372
-ú "
-^u 10,12 0 0373
-û "
-:u 10,11 0 0374
-ü "
-'y 9,12,3 0 0375
-ý "
-Tp 9,11,3 0 0376
-þ "
-:y 9,11,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/S b/contrib/groff/font/devX100-12/S
deleted file mode 100644
index 453c295e2fe4..000000000000
--- a/contrib/groff/font/devX100-12/S
+++ /dev/null
@@ -1,226 +0,0 @@
-name S
-special
-spacewidth 4
-charset
---- 4,1 0 040
-! 5,11 0 041
-fa 11,12 0 042
-# 8,11 0 043
-sh "
-te 9,12 0 044
-% 13,11,1 0 045
-& 13,11 0 046
-st 7,8 0 047
-( 5,12,2 0 050
-) 5,12,2 0 051
-** 8,8 0 052
-+ 9,9 0 053
-pl "
-, 4,3,2 0 054
-\- 9,5 0 055
-mi "
-. 4,3 0 056
-/ 5,11 0 057
-sl "
-0 8,12 0 060
-1 8,12 0 061
-2 8,12 0 062
-3 8,12 0 063
-4 8,12 0 064
-5 8,12 0 065
-6 8,12 0 066
-7 8,12 0 067
-8 8,12 0 070
-9 8,12 0 071
-: 4,8 0 072
-; 4,8,2 0 073
-< 9,9 0 074
-= 9,6 0 075
-eq "
-> 9,9 0 076
-? 7,11 0 077
-=~ 9,8 0 0100
-*A 12,11 0 0101
-*B 11,11 0 0102
-*X 12,11 0 0103
-*D 10,11 0 0104
-*E 10,11 0 0105
-*F 12,11 0 0106
-*G 10,11 0 0107
-*Y 12,11 0 0110
-*I 6,11 0 0111
-+h 10,12 0 0112
-*K 12,11 0 0113
-*L 11,11 0 0114
-*M 14,11 0 0115
-*N 11,11 0 0116
-*O 12,11 0 0117
-*P 12,11 0 0120
-*H 12,11 0 0121
-*R 9,11 0 0122
-*S 10,11 0 0123
-*T 10,11 0 0124
---- 11,11 0 0125
-ts 8,8,4 0 0126
-*W 12,12 0 0127
-*C 11,11 0 0130
-*Q 13,11 0 0131
-*Z 10,11 0 0132
-[ 6,12,2 0 0133
-lB "
-tf 14,8 0 0134
-3d "
-] 5,12,2 0 0135
-rB "
-pp 11,11 0 0136
-_ 8,0,4 0 0137
-radicalex 8,13 0 0140
-*a 11,9 0 0141
-*b 9,13,4 0 0142
-*x 9,9,3 0 0143
-*d 8,12 0 0144
-*e 7,9 0 0145
-*f 9,11,3 0 0146
-*g 7,9,4 0 0147
-*y 10,9,3 0 0150
-*i 5,9 0 0151
-+f 10,9,3 0 0152
-*k 9,9 0 0153
-*l 9,13 0 0154
-*m 9,9,4 0 0155
-µ "
-*n 8,9 0 0156
-*o 9,9 0 0157
-*p 9,9 0 0160
-*h 9,12 0 0161
-*r 9,9,4 0 0162
-*s 10,9 0 0163
-*t 7,9 0 0164
-*u 9,9 0 0165
-+p 11,10 0 0166
-*w 11,9 0 0167
-*c 8,13,4 0 0170
-*q 11,9,4 0 0171
-*z 8,13,4 0 0172
-lC 8,12,2 0 0173
-{ "
-ba 3,11,3 0 0174
-or "
-| "
-rC 8,12,2 0 0175
-} "
-ap 9,5 0 0176
-*U 10,11 0 0241
-fm 4,12 0 0242
-<= 9,11 0 0243
-f/ 3,11 0 0244
-if 12,7 0 0245
-Fn 8,12,3 0 0246
-CL 12,9,1 0 0247
-DI 12,9 0 0250
-HE 12,9 0 0251
-SP 12,9,1 0 0252
-<> 17,9 0 0253
-<- 16,9 0 0254
-ua 10,13,2 0 0255
-arrowverttp "
--> 16,9 0 0256
-da 10,13,2 0 0257
-arrowvertbt "
-de 6,11 0 0260
-° "
-+- 9,11 0 0261
-± "
-sd 7,12 0 0262
->= 9,11 0 0263
-mu 9,9 0 0264
-× "
-pt 11,7 0 0265
-pd 8,13,1 0 0266
-bu 8,8 0 0267
-di 9,8 0 0270
-÷ "
-!= 9,9,1 0 0271
-== 9,8 0 0272
-~= 9,7 0 0273
-~~ "
---- 16,3 0 0274
-arrowvertex 10,13,4 0 0275
-an 16,5 0 0276
-CR 10,10,1 0 0277
-Ah 13,11 0 0300
-Im 11,13,1 0 0301
-Re 13,13 0 0302
-wp 16,9,4 0 0303
-c* 12,11 0 0304
-c+ 12,11 0 0305
-es 13,12 0 0306
-ca 12,9 0 0307
-cu 12,9 0 0310
-sp 11,8 0 0311
-ip 11,7,3 0 0312
---- 11,9,1 0 0313
-sb 11,8 0 0314
-ib 11,8,2 0 0315
-mo 11,7 0 0316
-nm 11,8,1 0 0317
-/_ 12,11 0 0320
-gr 11,12 0 0321
-rg 13,11 0 0322
-co 13,11 0 0323
-tm 14,11 0 0324
---- 13,13,2 0 0325
-sr 9,13,3 0 0326
-md 4,5 0 0327
-no 12,5 0 0330
-¬ "
-AN 10,8 0 0331
-OR 10,8 0 0332
-hA 17,9 0 0333
-lA 16,9 0 0334
-uA 10,13,2 0 0335
-rA 16,9 0 0336
-dA 10,13,2 0 0337
-lz 8,12 0 0340
-la 5,13,2 0 0341
---- 13,11 0 0342
---- 13,11 0 0343
---- 13,11 0 0344
---- 11,13,2 0 0345
-parenlefttp 6,13,4 0 0346
-parenleftex 6,13,4 0 0347
-parenleftbt 6,13,4 0 0350
-bracketlefttp 6,13,4 0 0351
-lc "
-bracketleftex 6,13,4 0 0352
-bracketleftbt 6,13,4 0 0353
-lf "
-bracelefttp 8,13,4 0 0354
-lt "
-braceleftmid 8,13,4 0 0355
-lk "
-braceleftbt 8,13,4 0 0356
-lb "
-bracerightex 8,13,4 0 0357
-braceleftex "
-bv "
---- 13,13 0 0360
-ra 5,13,2 0 0361
-is 5,13,4 0 0362
---- 11,13,4 0 0363
---- 11,13,4 0 0364
---- 11,13,4 0 0365
-parenrighttp 7,13,4 0 0366
-parenrightex 6,13,4 0 0367
-parenrightbt 6,13,4 0 0370
-bracketrighttp 6,13,4 0 0371
-rc "
-bracketrightex 6,13,4 0 0372
-bracketrightbt 6,13,4 0 0373
-rf "
-bracerighttp 8,13,4 0 0374
-rt "
-bracerightmid 8,13,4 0 0375
-rk "
-bracerightbt 8,13,4 0 0376
-rb "
diff --git a/contrib/groff/font/devX100-12/TB b/contrib/groff/font/devX100-12/TB
deleted file mode 100644
index b81e0170b33b..000000000000
--- a/contrib/groff/font/devX100-12/TB
+++ /dev/null
@@ -1,308 +0,0 @@
-name TB
-spacewidth 4
-charset
---- 4,1 0 040
-! 6,11 0 041
-" 9,11 0 042
-dq "
-# 8,11 0 043
-sh "
-$ 8,12,1 0 044
-Do "
-% 16,12 0 045
-& 14,11 0 046
-' 6,11 0 047
-cq "
-( 6,11,3 0 050
-) 6,11,3 0 051
-* 8,11 0 052
-+ 9,8 0 053
-, 4,2,3 0 054
-\- 9,5 0 055
-. 4,2 0 056
-/ 5,11 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 5,7 0 072
-; 5,7,3 0 073
-< 9,8 0 074
-= 9,7 0 075
-eq "
-> 9,8 0 076
-? 8,11 0 077
-@ 16,11,2 0 0100
-at "
-A 12,11 0 0101
-B 11,11 0 0102
-C 12,11 0 0103
-D 12,11 0 0104
-E 11,11 0 0105
-F 10,11 0 0106
-G 13,11 0 0107
-H 13,11 0 0110
-I 6,11 0 0111
-J 8,11,2 0 0112
-K 13,11 0 0113
-L 11,11 0 0114
-M 15,11 0 0115
-N 12,11 0 0116
-O 13,11 0 0117
-P 10,11 0 0120
-Q 13,11,3 0 0121
-R 12,11 0 0122
-S 9,11 0 0123
-T 11,11 0 0124
-U 12,11 0 0125
-V 12,11 0 0126
-W 16,11 0 0127
-X 12,11 0 0130
-Y 12,11 0 0131
-Z 11,11 0 0132
-[ 6,11,3 0 0133
-lB "
-\ 5,11 0 0134
-rs "
-] 6,11,3 0 0135
-rB "
-^ 9,11 0 0136
-a^ "
-ha "
-_ 8,0,4 0 0137
-` 6,11 0 0140
-oq "
-a 8,8 0 0141
-b 9,11 0 0142
-c 7,8 0 0143
-d 9,11 0 0144
-e 7,8 0 0145
-f 6,11 0 0146
-g 8,8,4 0 0147
-h 9,11 0 0150
-i 5,11 0 0151
-j 5,11,4 0 0152
-k 9,11 0 0153
-l 5,11 0 0154
-m 14,8 0 0155
-n 9,8 0 0156
-o 8,8 0 0157
-p 9,8,4 0 0160
-q 9,8,4 0 0161
-r 7,8 0 0162
-s 6,8 0 0163
-t 6,11 0 0164
-u 9,8 0 0165
-v 8,8 0 0166
-w 12,8 0 0167
-x 8,8 0 0170
-y 8,8,4 0 0171
-z 7,8 0 0172
-{ 7,11,3 0 0173
-lC "
-| 4,11,3 0 0174
-or "
-ba "
-} 7,11,3 0 0175
-rC "
-~ 9,8 0 0176
-a~ "
-ap "
-ti "
-r! 6,8,4 0 0241
-¡ "
-ct 8,10,2 0 0242
-¢ "
-Po 8,11 0 0243
-£ "
-Cs 8,8 0 0244
-¤ "
-Ye 8,11 0 0245
-¥ "
-bb 4,12,3 0 0246
-¦ "
-sc 8,11,4 0 0247
-§ "
-ad 6,11 0 0250
-¨ "
-co 12,11 0 0251
-© "
-Of 5,11 0 0252
-ª "
-Fo 8,7 0 0253
-« "
-no 9,7 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,11 0 0256
-® "
-a- 6,10 0 0257
-¯ "
-de 7,11 0 0260
-° "
-+- 9,9 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 6,12 0 0264
-´ "
-µ 9,8,3 0 0265
-ps 9,11,4 0 0266
-¶ "
-pc 4,6 0 0267
-· "
-ac 6,0,4 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 6,11 0 0272
-º "
-Fc 8,7 0 0273
-» "
-14 12,11 0 0274
-¼ "
-12 12,11 0 0275
-½ "
-34 12,11 0 0276
-¾ "
-r? 8,8,3 0 0277
-¿ "
-`A 12,15 0 0300
-À "
-'A 12,15 0 0301
-Á "
-^A 12,15 0 0302
-Â "
-~A 12,14 0 0303
-Ã "
-:A 12,14 0 0304
-Ä "
-oA 12,16 0 0305
-Å "
-AE 16,11 0 0306
-Æ "
-,C 12,11,4 0 0307
-Ç "
-`E 11,15 0 0310
-È "
-'E 11,15 0 0311
-É "
-^E 11,15 0 0312
-Ê "
-:E 11,14 0 0313
-Ë "
-`I 6,15 0 0314
-Ì "
-'I 6,15 0 0315
-Í "
-^I 6,15 0 0316
-Î "
-:I 6,14 0 0317
-Ï "
--D 12,11 0 0320
-Ð "
-~N 12,14 0 0321
-Ñ "
-`O 13,15 0 0322
-Ò "
-'O 13,15 0 0323
-Ó "
-^O 13,15 0 0324
-Ô "
-~O 13,15 0 0325
-Õ "
-:O 13,14 0 0326
-Ö "
-mu 9,8 0 0327
-× "
-/O 13,12,1 0 0330
-Ø "
-`U 12,15 0 0331
-Ù "
-'U 12,15 0 0332
-Ú "
-^U 12,15 0 0333
-Û "
-:U 12,14 0 0334
-Ü "
-'Y 12,15 0 0335
-Ý "
-TP 10,11 0 0336
-Þ "
-ss 9,11 0 0337
-ß "
-`a 8,12 0 0340
-à "
-'a 8,12 0 0341
-á "
-^a 8,12 0 0342
-â "
-~a 8,11 0 0343
-ã "
-:a 8,11 0 0344
-ä "
-oa 8,13 0 0345
-å "
-ae 12,8 0 0346
-æ "
-,c 7,8,4 0 0347
-ç "
-`e 7,12 0 0350
-è "
-'e 7,12 0 0351
-é "
-^e 7,12 0 0352
-ê "
-:e 7,11 0 0353
-ë "
-`i 5,12 0 0354
-ì "
-'i 5,12 0 0355
-í "
-^i 5,12 0 0356
-î "
-:i 5,11 0 0357
-ï "
-Sd 8,11 0 0360
-ð "
-~n 9,11 0 0361
-ñ "
-`o 8,12 0 0362
-ò "
-'o 8,12 0 0363
-ó "
-^o 8,12 0 0364
-ô "
-~o 8,11 0 0365
-õ "
-:o 8,11 0 0366
-ö "
-di 9,8 0 0367
-÷ "
-/o 8,9,1 0 0370
-ø "
-`u 9,12 0 0371
-ù "
-'u 9,12 0 0372
-ú "
-^u 9,12 0 0373
-û "
-:u 9,11 0 0374
-ü "
-'y 8,12,4 0 0375
-ý "
-Tp 9,11,4 0 0376
-þ "
-:y 8,11,4 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/TBI b/contrib/groff/font/devX100-12/TBI
deleted file mode 100644
index 712f7d217ca6..000000000000
--- a/contrib/groff/font/devX100-12/TBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name TBI
-spacewidth 4
-charset
---- 4,1 0 040
-! 6,11 0 041
-" 9,11 0 042
-dq "
-# 8,11 0 043
-sh "
-$ 8,12,1 0 044
-Do "
-% 13,11 0 045
-& 13,11 0 046
-' 6,11 0 047
-cq "
-( 6,11,3 0 050
-) 6,11,3 0 051
-* 8,11 0 052
-+ 10,9 0 053
-, 4,2,3 0 054
-\- 10,6 0 055
-. 4,2 0 056
-/ 5,12 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 5,7 0 072
-; 5,7,3 0 073
-< 10,8 0 074
-= 10,7 0 075
-eq "
-> 10,8 0 076
-? 8,11 0 077
-@ 14,11,2 0 0100
-at "
-A 11,11 0 0101
-B 11,11 0 0102
-C 11,11 0 0103
-D 12,11 0 0104
-E 11,11 0 0105
-F 11,11 0 0106
-G 12,11 0 0107
-H 13,11 0 0110
-I 6,11 0 0111
-J 8,11,2 0 0112
-K 11,11 0 0113
-L 10,11 0 0114
-M 15,11 0 0115
-N 12,11 0 0116
-O 12,11 0 0117
-P 10,11 0 0120
-Q 12,11,4 0 0121
-R 11,11 0 0122
-S 9,11 0 0123
-T 10,11 0 0124
-U 12,11 0 0125
-V 11,11 0 0126
-W 15,11 0 0127
-X 11,11 0 0130
-Y 10,11 0 0131
-Z 10,11 0 0132
-[ 6,12,3 0 0133
-lB "
-\ 5,12 0 0134
-rs "
-] 6,12,3 0 0135
-rB "
-^ 10,11 0 0136
-a^ "
-ha "
-_ 8,0,2 0 0137
-` 6,11 0 0140
-oq "
-a 8,8 0 0141
-b 8,11 0 0142
-c 7,8 0 0143
-d 8,11 0 0144
-e 7,8 0 0145
-f 6,11,3 0 0146
-g 8,8,3 0 0147
-h 9,11 0 0150
-i 5,11 0 0151
-j 5,11,3 0 0152
-k 8,11 0 0153
-l 5,11 0 0154
-m 13,8 0 0155
-n 9,8 0 0156
-o 8,8 0 0157
-p 8,8,3 0 0160
-q 8,8,3 0 0161
-r 6,8 0 0162
-s 6,8 0 0163
-t 5,10 0 0164
-u 9,8 0 0165
-v 7,8 0 0166
-w 11,8 0 0167
-x 8,8 0 0170
-y 7,8,3 0 0171
-z 6,8,1 0 0172
-{ 6,12,3 0 0173
-lC "
-| 4,12 0 0174
-or "
-ba "
-} 6,12,3 0 0175
-rC "
-~ 10,6 0 0176
-a~ "
-ap "
-ti "
-r! 6,8,4 0 0241
-¡ "
-ct 8,10,2 0 0242
-¢ "
-Po 8,11 0 0243
-£ "
-Cs 8,9 0 0244
-¤ "
-Ye 8,11 0 0245
-¥ "
-bb 4,12 0 0246
-¦ "
-sc 8,11,3 0 0247
-§ "
-ad 6,11 0 0250
-¨ "
-co 12,11 0 0251
-© "
-Of 4,11 0 0252
-ª "
-Fo 8,7 0 0253
-« "
-no 10,5 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,11 0 0256
-® "
-a- 6,10 0 0257
-¯ "
-de 7,11 0 0260
-° "
-+- 10,10 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 6,12 0 0264
-´ "
-µ 9,8,3 0 0265
-ps 8,11,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 6,1,3 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 5,11 0 0272
-º "
-Fc 8,7 0 0273
-» "
-14 13,11 0 0274
-¼ "
-12 13,11 0 0275
-½ "
-34 13,11 0 0276
-¾ "
-r? 8,8,4 0 0277
-¿ "
-`A 11,15 0 0300
-À "
-'A 11,15 0 0301
-Á "
-^A 11,15 0 0302
-Â "
-~A 11,14 0 0303
-Ã "
-:A 11,14 0 0304
-Ä "
-oA 11,15 0 0305
-Å "
-AE 15,11 0 0306
-Æ "
-,C 11,11,3 0 0307
-Ç "
-`E 11,15 0 0310
-È "
-'E 11,15 0 0311
-É "
-^E 11,15 0 0312
-Ê "
-:E 11,14 0 0313
-Ë "
-`I 6,15 0 0314
-Ì "
-'I 6,15 0 0315
-Í "
-^I 6,15 0 0316
-Î "
-:I 6,14 0 0317
-Ï "
--D 12,11 0 0320
-Ð "
-~N 12,14 0 0321
-Ñ "
-`O 12,15 0 0322
-Ò "
-'O 12,15 0 0323
-Ó "
-^O 12,15 0 0324
-Ô "
-~O 12,14 0 0325
-Õ "
-:O 12,14 0 0326
-Ö "
-mu 10,9 0 0327
-× "
-/O 12,12,2 0 0330
-Ø "
-`U 12,15 0 0331
-Ù "
-'U 12,15 0 0332
-Ú "
-^U 12,15 0 0333
-Û "
-:U 12,14 0 0334
-Ü "
-'Y 10,15 0 0335
-Ý "
-TP 10,11 0 0336
-Þ "
-ss 8,12,3 0 0337
-ß "
-`a 8,12 0 0340
-à "
-'a 8,12 0 0341
-á "
-^a 8,12 0 0342
-â "
-~a 8,11 0 0343
-ã "
-:a 8,11 0 0344
-ä "
-oa 8,12 0 0345
-å "
-ae 12,8 0 0346
-æ "
-,c 7,8,3 0 0347
-ç "
-`e 7,12 0 0350
-è "
-'e 7,12 0 0351
-é "
-^e 7,12 0 0352
-ê "
-:e 7,11 0 0353
-ë "
-`i 5,12 0 0354
-ì "
-'i 5,12 0 0355
-í "
-^i 5,12 0 0356
-î "
-:i 5,11 0 0357
-ï "
-Sd 8,11 0 0360
-ð "
-~n 9,11 0 0361
-ñ "
-`o 8,12 0 0362
-ò "
-'o 8,12 0 0363
-ó "
-^o 8,12 0 0364
-ô "
-~o 8,11 0 0365
-õ "
-:o 8,11 0 0366
-ö "
-di 10,9 0 0367
-÷ "
-/o 8,10,2 0 0370
-ø "
-`u 9,12 0 0371
-ù "
-'u 9,12 0 0372
-ú "
-^u 9,12 0 0373
-û "
-:u 9,11 0 0374
-ü "
-'y 7,12,3 0 0375
-ý "
-Tp 8,11,3 0 0376
-þ "
-:y 7,11,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/TI b/contrib/groff/font/devX100-12/TI
deleted file mode 100644
index 72ed683a9110..000000000000
--- a/contrib/groff/font/devX100-12/TI
+++ /dev/null
@@ -1,308 +0,0 @@
-name TI
-spacewidth 4
-charset
---- 4,1 0 040
-! 6,11 0 041
-" 7,10 0 042
-dq "
-# 8,11 0 043
-sh "
-$ 8,12,1 0 044
-Do "
-% 13,11 0 045
-& 13,11 0 046
-' 6,10 0 047
-cq "
-( 6,11,3 0 050
-) 6,11,3 0 051
-* 8,11 0 052
-+ 11,9 0 053
-, 4,2,2 0 054
-\- 11,5 0 055
-. 4,2 0 056
-/ 5,11 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 5,7 0 072
-; 5,7,2 0 073
-< 11,9 0 074
-= 11,6 0 075
-eq "
-> 11,9 0 076
-? 8,11 0 077
-@ 15,11,3 0 0100
-at "
-A 10,11 0 0101
-B 10,11 0 0102
-C 11,11 0 0103
-D 12,11 0 0104
-E 10,11 0 0105
-F 10,11 0 0106
-G 12,11 0 0107
-H 12,11 0 0110
-I 6,11 0 0111
-J 7,11 0 0112
-K 11,11 0 0113
-L 9,11 0 0114
-M 14,11 0 0115
-N 11,11 0 0116
-O 12,11 0 0117
-P 10,11 0 0120
-Q 12,11,3 0 0121
-R 10,11 0 0122
-S 8,11 0 0123
-T 9,11 0 0124
-U 12,11 0 0125
-V 10,11 0 0126
-W 14,11 0 0127
-X 10,11 0 0130
-Y 9,11 0 0131
-Z 9,11 0 0132
-[ 6,11,3 0 0133
-lB "
-\ 5,11 0 0134
-rs "
-] 6,11,3 0 0135
-rB "
-^ 7,11 0 0136
-a^ "
-ha "
-_ 8,0,4 0 0137
-` 6,10 0 0140
-oq "
-a 8,8 0 0141
-b 8,11 0 0142
-c 7,8 0 0143
-d 8,11 0 0144
-e 7,8 0 0145
-f 5,11,4 0 0146
-g 8,8,4 0 0147
-h 8,11 0 0150
-i 5,11 0 0151
-j 5,11,4 0 0152
-k 7,11 0 0153
-l 5,11 0 0154
-m 12,8 0 0155
-n 8,8 0 0156
-o 8,8 0 0157
-p 8,8,4 0 0160
-q 8,8,4 0 0161
-r 6,8 0 0162
-s 6,8 0 0163
-t 5,10 0 0164
-u 8,8 0 0165
-v 7,8 0 0166
-w 11,8 0 0167
-x 7,8 0 0170
-y 7,8,4 0 0171
-z 6,8 0 0172
-{ 7,11,3 0 0173
-lC "
-| 5,11,3 0 0174
-or "
-ba "
-} 7,11,3 0 0175
-rC "
-~ 9,6 0 0176
-a~ "
-ap "
-ti "
-r! 6,8,3 0 0241
-¡ "
-ct 8,9,1 0 0242
-¢ "
-Po 8,11 0 0243
-£ "
-Cs 8,9 0 0244
-¤ "
-Ye 8,11 0 0245
-¥ "
-bb 5,11,3 0 0246
-¦ "
-sc 8,12,1 0 0247
-§ "
-ad 6,11 0 0250
-¨ "
-co 13,11 0 0251
-© "
-Of 5,11 0 0252
-ª "
-Fo 8,6 0 0253
-« "
-no 11,6 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 13,11 0 0256
-® "
-a- 6,10 0 0257
-¯ "
-de 7,11 0 0260
-° "
-+- 11,11 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 6,12 0 0264
-´ "
-µ 8,8,4 0 0265
-ps 9,11,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 6,1,3 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 5,11 0 0272
-º "
-Fc 8,6 0 0273
-» "
-14 13,11 0 0274
-¼ "
-12 13,11 0 0275
-½ "
-34 13,11 0 0276
-¾ "
-r? 8,8,3 0 0277
-¿ "
-`A 10,15 0 0300
-À "
-'A 10,15 0 0301
-Á "
-^A 10,15 0 0302
-Â "
-~A 10,14 0 0303
-Ã "
-:A 10,14 0 0304
-Ä "
-oA 10,15 0 0305
-Å "
-AE 15,11 0 0306
-Æ "
-,C 11,11,3 0 0307
-Ç "
-`E 10,15 0 0310
-È "
-'E 10,15 0 0311
-É "
-^E 10,15 0 0312
-Ê "
-:E 10,14 0 0313
-Ë "
-`I 6,15 0 0314
-Ì "
-'I 6,15 0 0315
-Í "
-^I 6,15 0 0316
-Î "
-:I 6,14 0 0317
-Ï "
--D 12,11 0 0320
-Ð "
-~N 11,14 0 0321
-Ñ "
-`O 12,15 0 0322
-Ò "
-'O 12,15 0 0323
-Ó "
-^O 12,15 0 0324
-Ô "
-~O 12,14 0 0325
-Õ "
-:O 12,14 0 0326
-Ö "
-mu 11,9 0 0327
-× "
-/O 12,12,1 0 0330
-Ø "
-`U 12,15 0 0331
-Ù "
-'U 12,15 0 0332
-Ú "
-^U 12,15 0 0333
-Û "
-:U 12,14 0 0334
-Ü "
-'Y 9,15 0 0335
-Ý "
-TP 10,11 0 0336
-Þ "
-ss 8,11,4 0 0337
-ß "
-`a 8,12 0 0340
-à "
-'a 8,12 0 0341
-á "
-^a 8,12 0 0342
-â "
-~a 8,11 0 0343
-ã "
-:a 8,11 0 0344
-ä "
-oa 8,13 0 0345
-å "
-ae 11,8 0 0346
-æ "
-,c 7,8,3 0 0347
-ç "
-`e 7,12 0 0350
-è "
-'e 7,12 0 0351
-é "
-^e 7,12 0 0352
-ê "
-:e 7,11 0 0353
-ë "
-`i 5,12 0 0354
-ì "
-'i 5,12 0 0355
-í "
-^i 5,12 0 0356
-î "
-:i 5,11 0 0357
-ï "
-Sd 8,12 0 0360
-ð "
-~n 8,11 0 0361
-ñ "
-`o 8,12 0 0362
-ò "
-'o 8,12 0 0363
-ó "
-^o 8,12 0 0364
-ô "
-~o 8,11 0 0365
-õ "
-:o 8,11 0 0366
-ö "
-di 11,8 0 0367
-÷ "
-/o 8,9,1 0 0370
-ø "
-`u 8,12 0 0371
-ù "
-'u 8,12 0 0372
-ú "
-^u 8,12 0 0373
-û "
-:u 8,11 0 0374
-ü "
-'y 7,12,4 0 0375
-ý "
-Tp 8,11,4 0 0376
-þ "
-:y 7,11,4 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100-12/TR b/contrib/groff/font/devX100-12/TR
deleted file mode 100644
index 989dd564cb29..000000000000
--- a/contrib/groff/font/devX100-12/TR
+++ /dev/null
@@ -1,308 +0,0 @@
-name TR
-spacewidth 4
-charset
---- 4,1 0 040
-! 5,11 0 041
-" 7,11 0 042
-dq "
-# 8,11 0 043
-sh "
-$ 8,12,1 0 044
-Do "
-% 14,11 0 045
-& 13,11 0 046
-' 5,11 0 047
-cq "
-( 5,11,3 0 050
-) 5,11,3 0 051
-* 8,11 0 052
-+ 9,8 0 053
-, 4,2,1 0 054
-\- 9,5 0 055
-. 4,2 0 056
-/ 5,11,2 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 4,8 0 072
-; 4,8,1 0 073
-< 9,9 0 074
-= 9,6 0 075
-eq "
-> 9,9 0 076
-? 7,11 0 077
-@ 15,11,3 0 0100
-at "
-A 12,11 0 0101
-B 11,11 0 0102
-C 11,11 0 0103
-D 12,11 0 0104
-E 10,11 0 0105
-F 9,11 0 0106
-G 12,11 0 0107
-H 12,11 0 0110
-I 5,11 0 0111
-J 6,11 0 0112
-K 12,11 0 0113
-L 10,11 0 0114
-M 15,11 0 0115
-N 12,11 0 0116
-O 12,11 0 0117
-P 9,11 0 0120
-Q 12,11,3 0 0121
-R 11,11 0 0122
-S 9,11 0 0123
-T 10,11 0 0124
-U 12,11 0 0125
-V 12,11 0 0126
-W 16,11 0 0127
-X 12,11 0 0130
-Y 12,11 0 0131
-Z 10,11 0 0132
-[ 5,11,3 0 0133
-lB "
-\ 5,11 0 0134
-rs "
-] 5,11,3 0 0135
-rB "
-^ 8,11 0 0136
-a^ "
-ha "
-_ 8,0,2 0 0137
-` 5,11 0 0140
-oq "
-a 7,8 0 0141
-b 8,11 0 0142
-c 7,8 0 0143
-d 8,11 0 0144
-e 7,8 0 0145
-f 6,11 0 0146
-g 8,8,4 0 0147
-h 8,11 0 0150
-i 5,11 0 0151
-j 4,11,4 0 0152
-k 8,11 0 0153
-l 5,11 0 0154
-m 13,8 0 0155
-n 8,8 0 0156
-o 8,8 0 0157
-p 8,8,4 0 0160
-q 8,8,4 0 0161
-r 6,8 0 0162
-s 6,8 0 0163
-t 5,10 0 0164
-u 8,8 0 0165
-v 8,8 0 0166
-w 12,8 0 0167
-x 8,8 0 0170
-y 8,8,4 0 0171
-z 7,8 0 0172
-{ 8,11,3 0 0173
-lC "
-| 3,11 0 0174
-or "
-ba "
-} 8,11,3 0 0175
-rC "
-~ 9,6 0 0176
-a~ "
-ap "
-ti "
-r! 5,8,3 0 0241
-¡ "
-ct 8,10,2 0 0242
-¢ "
-Po 8,11 0 0243
-£ "
-Cs 8,10 0 0244
-¤ "
-Ye 8,11 0 0245
-¥ "
-bb 3,11 0 0246
-¦ "
-sc 8,11,3 0 0247
-§ "
-ad 6,11 0 0250
-¨ "
-co 13,11 0 0251
-© "
-Of 5,11 0 0252
-ª "
-Fo 8,7 0 0253
-« "
-no 9,5 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 13,11 0 0256
-® "
-a- 6,10 0 0257
-¯ "
-de 7,11 0 0260
-° "
-+- 9,9 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 6,11 0 0264
-´ "
-µ 8,8,3 0 0265
-ps 8,11,4 0 0266
-¶ "
-pc 4,6 0 0267
-· "
-ac 6,0,4 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 5,11 0 0272
-º "
-Fc 8,7 0 0273
-» "
-14 13,11 0 0274
-¼ "
-12 13,11 0 0275
-½ "
-34 13,11 0 0276
-¾ "
-r? 7,8,3 0 0277
-¿ "
-`A 12,15 0 0300
-À "
-'A 12,15 0 0301
-Á "
-^A 12,15 0 0302
-Â "
-~A 12,14 0 0303
-Ã "
-:A 12,14 0 0304
-Ä "
-oA 12,14 0 0305
-Å "
-AE 15,11 0 0306
-Æ "
-,C 11,11,4 0 0307
-Ç "
-`E 10,15 0 0310
-È "
-'E 10,15 0 0311
-É "
-^E 10,15 0 0312
-Ê "
-:E 10,14 0 0313
-Ë "
-`I 5,15 0 0314
-Ì "
-'I 5,15 0 0315
-Í "
-^I 5,15 0 0316
-Î "
-:I 5,14 0 0317
-Ï "
--D 12,11 0 0320
-Ð "
-~N 12,14 0 0321
-Ñ "
-`O 12,15 0 0322
-Ò "
-'O 12,15 0 0323
-Ó "
-^O 12,15 0 0324
-Ô "
-~O 12,14 0 0325
-Õ "
-:O 12,14 0 0326
-Ö "
-mu 9,7 0 0327
-× "
-/O 12,12,1 0 0330
-Ø "
-`U 12,15 0 0331
-Ù "
-'U 12,15 0 0332
-Ú "
-^U 12,15 0 0333
-Û "
-:U 12,14 0 0334
-Ü "
-'Y 12,15 0 0335
-Ý "
-TP 9,11 0 0336
-Þ "
-ss 8,11 0 0337
-ß "
-`a 7,12 0 0340
-à "
-'a 7,12 0 0341
-á "
-^a 7,12 0 0342
-â "
-~a 7,11 0 0343
-ã "
-:a 7,11 0 0344
-ä "
-oa 7,12 0 0345
-å "
-ae 11,8 0 0346
-æ "
-,c 7,8,4 0 0347
-ç "
-`e 7,12 0 0350
-è "
-'e 7,12 0 0351
-é "
-^e 7,12 0 0352
-ê "
-:e 7,11 0 0353
-ë "
-`i 5,12 0 0354
-ì "
-'i 5,12 0 0355
-í "
-^i 5,12 0 0356
-î "
-:i 5,11 0 0357
-ï "
-Sd 8,11 0 0360
-ð "
-~n 8,11 0 0361
-ñ "
-`o 8,12 0 0362
-ò "
-'o 8,12 0 0363
-ó "
-^o 8,12 0 0364
-ô "
-~o 8,11 0 0365
-õ "
-:o 8,11 0 0366
-ö "
-di 9,9 0 0367
-÷ "
-/o 8,10,2 0 0370
-ø "
-`u 8,12 0 0371
-ù "
-'u 8,12 0 0372
-ú "
-^u 8,12 0 0373
-û "
-:u 8,11 0 0374
-ü "
-'y 8,12,4 0 0375
-ý "
-Tp 8,11,4 0 0376
-þ "
-:y 8,11,4 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/CB b/contrib/groff/font/devX100/CB
deleted file mode 100644
index 7353611c15b6..000000000000
--- a/contrib/groff/font/devX100/CB
+++ /dev/null
@@ -1,308 +0,0 @@
-name CB
-spacewidth 9
-charset
---- 9,1 0 040
-! 9,9 0 041
-" 9,10 0 042
-dq "
-# 9,10,1 0 043
-sh "
-$ 9,11,1 0 044
-Do "
-% 9,10 0 045
-& 9,8 0 046
-' 9,10 0 047
-cq "
-( 9,9,2 0 050
-) 9,9,2 0 051
-* 9,9 0 052
-+ 9,8 0 053
-, 9,2,2 0 054
-\- 9,5 0 055
-. 9,2 0 056
-/ 9,10,2 0 057
-sl "
-0 9,10 0 060
-1 9,10 0 061
-2 9,10 0 062
-3 9,10 0 063
-4 9,10 0 064
-5 9,10 0 065
-6 9,10 0 066
-7 9,10 0 067
-8 9,10 0 070
-9 9,10 0 071
-: 9,7 0 072
-; 9,7,2 0 073
-< 9,8 0 074
-= 9,6 0 075
-eq "
-> 9,8 0 076
-? 9,9 0 077
-@ 9,9 0 0100
-at "
-A 9,9 0 0101
-B 9,9 0 0102
-C 9,9 0 0103
-D 9,9 0 0104
-E 9,9 0 0105
-F 9,9 0 0106
-G 9,9 0 0107
-H 9,9 0 0110
-I 9,9 0 0111
-J 9,9 0 0112
-K 9,9 0 0113
-L 9,9 0 0114
-M 9,9 0 0115
-N 9,9 0 0116
-O 9,9 0 0117
-P 9,9 0 0120
-Q 9,9,2 0 0121
-R 9,9 0 0122
-S 9,9 0 0123
-T 9,9 0 0124
-U 9,9 0 0125
-V 9,9 0 0126
-W 9,9 0 0127
-X 9,9 0 0130
-Y 9,9 0 0131
-Z 9,9 0 0132
-[ 9,9,2 0 0133
-lB "
-\ 9,10,2 0 0134
-rs "
-] 9,9,2 0 0135
-rB "
-^ 9,9 0 0136
-a^ "
-ha "
-_ 9,0,2 0 0137
-` 9,10 0 0140
-oq "
-a 9,7 0 0141
-b 9,10 0 0142
-c 9,7 0 0143
-d 9,10 0 0144
-e 9,7 0 0145
-f 9,10 0 0146
-g 9,7,3 0 0147
-h 9,10 0 0150
-i 9,10 0 0151
-j 9,10,3 0 0152
-k 9,10 0 0153
-l 9,10 0 0154
-m 9,7 0 0155
-n 9,7 0 0156
-o 9,7 0 0157
-p 9,7,3 0 0160
-q 9,7,3 0 0161
-r 9,7 0 0162
-s 9,7 0 0163
-t 9,9 0 0164
-u 9,7 0 0165
-v 9,7 0 0166
-w 9,7 0 0167
-x 9,7 0 0170
-y 9,7,3 0 0171
-z 9,7 0 0172
-{ 9,9,2 0 0173
-lC "
-| 9,9,2 0 0174
-or "
-ba "
-} 9,9,2 0 0175
-rC "
-~ 9,6 0 0176
-a~ "
-ap "
-ti "
-r! 9,7,2 0 0241
-¡ "
-ct 9,9,1 0 0242
-¢ "
-Po 9,9 0 0243
-£ "
-Cs 9,7 0 0244
-¤ "
-Ye 9,9 0 0245
-¥ "
-bb 9,9,2 0 0246
-¦ "
-sc 9,10,1 0 0247
-§ "
-ad 9,10 0 0250
-¨ "
-co 9,9 0 0251
-© "
-Of 9,9 0 0252
-ª "
-Fo 9,6 0 0253
-« "
-no 9,5 0 0254
-¬ "
-- 9,5 0 0255
-hy "
-­ "
-rg 9,9 0 0256
-® "
-a- 9,9 0 0257
-¯ "
-de 9,9 0 0260
-° "
-+- 9,8 0 0261
-± "
-S2 9,10 0 0262
-² "
-S3 9,10 0 0263
-³ "
-aa 9,9 0 0264
-´ "
-µ 9,7,3 0 0265
-ps 9,10,1 0 0266
-¶ "
-pc 9,5 0 0267
-· "
-ac 9,1,3 0 0270
-¸ "
-S1 9,10 0 0271
-¹ "
-Om 9,9 0 0272
-º "
-Fc 9,6 0 0273
-» "
-14 9,10 0 0274
-¼ "
-12 9,10 0 0275
-½ "
-34 9,10 0 0276
-¾ "
-r? 9,7,2 0 0277
-¿ "
-`A 9,12 0 0300
-À "
-'A 9,12 0 0301
-Á "
-^A 9,12 0 0302
-Â "
-~A 9,12 0 0303
-Ã "
-:A 9,12 0 0304
-Ä "
-oA 9,12 0 0305
-Å "
-AE 9,9 0 0306
-Æ "
-,C 9,9,4 0 0307
-Ç "
-`E 9,12 0 0310
-È "
-'E 9,12 0 0311
-É "
-^E 9,12 0 0312
-Ê "
-:E 9,12 0 0313
-Ë "
-`I 9,12 0 0314
-Ì "
-'I 9,12 0 0315
-Í "
-^I 9,12 0 0316
-Î "
-:I 9,12 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,12 0 0326
-Ö "
-mu 9,8 0 0327
-× "
-/O 9,10 0 0330
-Ø "
-`U 9,12 0 0331
-Ù "
-'U 9,12 0 0332
-Ú "
-^U 9,12 0 0333
-Û "
-:U 9,12 0 0334
-Ü "
-'Y 9,12 0 0335
-Ý "
-TP 9,9 0 0336
-Þ "
-ss 9,9 0 0337
-ß "
-`a 9,10 0 0340
-à "
-'a 9,10 0 0341
-á "
-^a 9,10 0 0342
-â "
-~a 9,10 0 0343
-ã "
-:a 9,10 0 0344
-ä "
-oa 9,10 0 0345
-å "
-ae 9,7 0 0346
-æ "
-,c 9,7,4 0 0347
-ç "
-`e 9,10 0 0350
-è "
-'e 9,10 0 0351
-é "
-^e 9,10 0 0352
-ê "
-:e 9,10 0 0353
-ë "
-`i 9,10 0 0354
-ì "
-'i 9,10 0 0355
-í "
-^i 9,10 0 0356
-î "
-:i 9,10 0 0357
-ï "
-Sd 9,10 0 0360
-ð "
-~n 9,10 0 0361
-ñ "
-`o 9,10 0 0362
-ò "
-'o 9,10 0 0363
-ó "
-^o 9,10 0 0364
-ô "
-~o 9,10 0 0365
-õ "
-:o 9,10 0 0366
-ö "
-di 9,8 0 0367
-÷ "
-/o 9,7 0 0370
-ø "
-`u 9,10 0 0371
-ù "
-'u 9,10 0 0372
-ú "
-^u 9,10 0 0373
-û "
-:u 9,10 0 0374
-ü "
-'y 9,10,3 0 0375
-ý "
-Tp 9,9,3 0 0376
-þ "
-:y 9,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/CBI b/contrib/groff/font/devX100/CBI
deleted file mode 100644
index d590a19aed92..000000000000
--- a/contrib/groff/font/devX100/CBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name CBI
-spacewidth 9
-charset
---- 9,1 0 040
-! 9,10 0 041
-" 9,9 0 042
-dq "
-# 9,11,1 0 043
-sh "
-$ 9,11,1 0 044
-Do "
-% 9,10 0 045
-& 9,8 0 046
-' 9,9 0 047
-cq "
-( 9,9,2 0 050
-) 9,9,2 0 051
-* 9,10 0 052
-+ 9,8 0 053
-, 9,2,2 0 054
-\- 9,5 0 055
-. 9,2 0 056
-/ 9,10,2 0 057
-sl "
-0 9,10 0 060
-1 9,10 0 061
-2 9,10 0 062
-3 9,10 0 063
-4 9,10 0 064
-5 9,10 0 065
-6 9,10 0 066
-7 9,10 0 067
-8 9,10 0 070
-9 9,10 0 071
-: 9,7 0 072
-; 9,7,2 0 073
-< 9,8 0 074
-= 9,6 0 075
-eq "
-> 9,8 0 076
-? 9,9 0 077
-@ 9,9 0 0100
-at "
-A 9,9 0 0101
-B 9,9 0 0102
-C 9,9 0 0103
-D 9,9 0 0104
-E 9,9 0 0105
-F 9,9 0 0106
-G 9,9 0 0107
-H 9,9 0 0110
-I 9,9 0 0111
-J 9,9 0 0112
-K 9,9 0 0113
-L 9,9 0 0114
-M 9,9 0 0115
-N 9,9 0 0116
-O 9,9 0 0117
-P 9,9 0 0120
-Q 9,9,2 0 0121
-R 9,9 0 0122
-S 9,9 0 0123
-T 9,9 0 0124
-U 9,9 0 0125
-V 9,9 0 0126
-W 9,9 0 0127
-X 9,9 0 0130
-Y 9,9 0 0131
-Z 9,9 0 0132
-[ 9,9,2 0 0133
-lB "
-\ 9,10,2 0 0134
-rs "
-] 9,9,2 0 0135
-rB "
-^ 9,9 0 0136
-a^ "
-ha "
-_ 9,0,3 0 0137
-` 9,9 0 0140
-oq "
-a 9,7 0 0141
-b 9,10 0 0142
-c 9,7 0 0143
-d 9,10 0 0144
-e 9,7 0 0145
-f 9,10 0 0146
-g 9,7,3 0 0147
-h 9,10 0 0150
-i 9,10 0 0151
-j 9,10,3 0 0152
-k 9,10 0 0153
-l 9,10 0 0154
-m 9,7 0 0155
-n 9,7 0 0156
-o 9,7 0 0157
-p 9,7,3 0 0160
-q 9,7,3 0 0161
-r 9,7 0 0162
-s 9,7 0 0163
-t 9,9 0 0164
-u 9,7 0 0165
-v 9,7 0 0166
-w 9,7 0 0167
-x 9,7 0 0170
-y 9,7,3 0 0171
-z 9,7 0 0172
-{ 9,9,2 0 0173
-lC "
-| 9,9,2 0 0174
-or "
-ba "
-} 9,9,2 0 0175
-rC "
-~ 9,6 0 0176
-a~ "
-ap "
-ti "
-r! 9,7,3 0 0241
-¡ "
-ct 9,9,1 0 0242
-¢ "
-Po 9,9 0 0243
-£ "
-Cs 9,7 0 0244
-¤ "
-Ye 9,9 0 0245
-¥ "
-bb 9,10,2 0 0246
-¦ "
-sc 9,10,1 0 0247
-§ "
-ad 9,10 0 0250
-¨ "
-co 9,9 0 0251
-© "
-Of 9,9 0 0252
-ª "
-Fo 9,6 0 0253
-« "
-no 9,6 0 0254
-¬ "
-- 9,5 0 0255
-hy "
-­ "
-rg 9,9 0 0256
-® "
-a- 9,9 0 0257
-¯ "
-de 9,10 0 0260
-° "
-+- 9,8 0 0261
-± "
-S2 9,10 0 0262
-² "
-S3 9,10 0 0263
-³ "
-aa 9,10 0 0264
-´ "
-µ 9,7,3 0 0265
-ps 9,10,1 0 0266
-¶ "
-pc 9,5 0 0267
-· "
-ac 9,1,3 0 0270
-¸ "
-S1 9,10 0 0271
-¹ "
-Om 9,9 0 0272
-º "
-Fc 9,6 0 0273
-» "
-14 9,10 0 0274
-¼ "
-12 9,10 0 0275
-½ "
-34 9,10 0 0276
-¾ "
-r? 9,7,2 0 0277
-¿ "
-`A 9,12 0 0300
-À "
-'A 9,12 0 0301
-Á "
-^A 9,12 0 0302
-Â "
-~A 9,12 0 0303
-Ã "
-:A 9,12 0 0304
-Ä "
-oA 9,12 0 0305
-Å "
-AE 9,9 0 0306
-Æ "
-,C 9,9,4 0 0307
-Ç "
-`E 9,12 0 0310
-È "
-'E 9,12 0 0311
-É "
-^E 9,12 0 0312
-Ê "
-:E 9,12 0 0313
-Ë "
-`I 9,12 0 0314
-Ì "
-'I 9,12 0 0315
-Í "
-^I 9,12 0 0316
-Î "
-:I 9,12 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,12 0 0326
-Ö "
-mu 9,8 0 0327
-× "
-/O 9,9 0 0330
-Ø "
-`U 9,12 0 0331
-Ù "
-'U 9,12 0 0332
-Ú "
-^U 9,12 0 0333
-Û "
-:U 9,12 0 0334
-Ü "
-'Y 9,12 0 0335
-Ý "
-TP 9,9 0 0336
-Þ "
-ss 9,9 0 0337
-ß "
-`a 9,10 0 0340
-à "
-'a 9,10 0 0341
-á "
-^a 9,10 0 0342
-â "
-~a 9,10 0 0343
-ã "
-:a 9,10 0 0344
-ä "
-oa 9,10 0 0345
-å "
-ae 9,7 0 0346
-æ "
-,c 9,7,4 0 0347
-ç "
-`e 9,10 0 0350
-è "
-'e 9,10 0 0351
-é "
-^e 9,10 0 0352
-ê "
-:e 9,10 0 0353
-ë "
-`i 9,10 0 0354
-ì "
-'i 9,10 0 0355
-í "
-^i 9,10 0 0356
-î "
-:i 9,10 0 0357
-ï "
-Sd 9,10 0 0360
-ð "
-~n 9,10 0 0361
-ñ "
-`o 9,10 0 0362
-ò "
-'o 9,10 0 0363
-ó "
-^o 9,10 0 0364
-ô "
-~o 9,10 0 0365
-õ "
-:o 9,10 0 0366
-ö "
-di 9,8 0 0367
-÷ "
-/o 9,8 0 0370
-ø "
-`u 9,10 0 0371
-ù "
-'u 9,10 0 0372
-ú "
-^u 9,10 0 0373
-û "
-:u 9,10 0 0374
-ü "
-'y 9,10,3 0 0375
-ý "
-Tp 9,9,3 0 0376
-þ "
-:y 9,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/CI b/contrib/groff/font/devX100/CI
deleted file mode 100644
index 484eeca28a43..000000000000
--- a/contrib/groff/font/devX100/CI
+++ /dev/null
@@ -1,308 +0,0 @@
-name CI
-spacewidth 9
-charset
---- 9,1 0 040
-! 9,9 0 041
-" 9,10 0 042
-dq "
-# 9,10,1 0 043
-sh "
-$ 9,10,1 0 044
-Do "
-% 9,10 0 045
-& 9,8 0 046
-' 9,10 0 047
-cq "
-( 9,10,3 0 050
-) 9,10,3 0 051
-* 9,9 0 052
-+ 9,8 0 053
-, 9,2,2 0 054
-\- 9,5 0 055
-. 9,2 0 056
-/ 9,10,2 0 057
-sl "
-0 9,10 0 060
-1 9,10 0 061
-2 9,10 0 062
-3 9,10 0 063
-4 9,10 0 064
-5 9,10 0 065
-6 9,10 0 066
-7 9,10 0 067
-8 9,10 0 070
-9 9,10 0 071
-: 9,7 0 072
-; 9,7,2 0 073
-< 9,8 0 074
-= 9,6 0 075
-eq "
-> 9,8 0 076
-? 9,9 0 077
-@ 9,9 0 0100
-at "
-A 9,9 0 0101
-B 9,9 0 0102
-C 9,9 0 0103
-D 9,9 0 0104
-E 9,9 0 0105
-F 9,9 0 0106
-G 9,9 0 0107
-H 9,9 0 0110
-I 9,9 0 0111
-J 9,9 0 0112
-K 9,9 0 0113
-L 9,9 0 0114
-M 9,9 0 0115
-N 9,9 0 0116
-O 9,9 0 0117
-P 9,9 0 0120
-Q 9,9,2 0 0121
-R 9,9 0 0122
-S 9,9 0 0123
-T 9,9 0 0124
-U 9,9 0 0125
-V 9,9 0 0126
-W 9,9 0 0127
-X 9,9 0 0130
-Y 9,9 0 0131
-Z 9,9 0 0132
-[ 9,10,3 0 0133
-lB "
-\ 9,10,2 0 0134
-rs "
-] 9,10,3 0 0135
-rB "
-^ 9,9 0 0136
-a^ "
-ha "
-_ 9,0,3 0 0137
-` 9,10 0 0140
-oq "
-a 9,7 0 0141
-b 9,10 0 0142
-c 9,7 0 0143
-d 9,10 0 0144
-e 9,7 0 0145
-f 9,10 0 0146
-g 9,7,3 0 0147
-h 9,10 0 0150
-i 9,10 0 0151
-j 9,10,3 0 0152
-k 9,10 0 0153
-l 9,10 0 0154
-m 9,7 0 0155
-n 9,7 0 0156
-o 9,7 0 0157
-p 9,7,3 0 0160
-q 9,7,3 0 0161
-r 9,7 0 0162
-s 9,7 0 0163
-t 9,9 0 0164
-u 9,7 0 0165
-v 9,7 0 0166
-w 9,7 0 0167
-x 9,7 0 0170
-y 9,7,3 0 0171
-z 9,7 0 0172
-{ 9,10,3 0 0173
-lC "
-| 9,9,2 0 0174
-or "
-ba "
-} 9,10,3 0 0175
-rC "
-~ 9,5 0 0176
-a~ "
-ap "
-ti "
-r! 9,7,2 0 0241
-¡ "
-ct 9,10 0 0242
-¢ "
-Po 9,9 0 0243
-£ "
-Cs 9,7 0 0244
-¤ "
-Ye 9,9 0 0245
-¥ "
-bb 9,9,2 0 0246
-¦ "
-sc 9,9,1 0 0247
-§ "
-ad 9,9 0 0250
-¨ "
-co 9,9 0 0251
-© "
-Of 9,9 0 0252
-ª "
-Fo 9,7 0 0253
-« "
-no 9,6 0 0254
-¬ "
-- 9,5 0 0255
-hy "
-­ "
-rg 9,9 0 0256
-® "
-a- 9,9 0 0257
-¯ "
-de 9,10 0 0260
-° "
-+- 9,8 0 0261
-± "
-S2 9,10 0 0262
-² "
-S3 9,10 0 0263
-³ "
-aa 9,9 0 0264
-´ "
-µ 9,7,3 0 0265
-ps 9,9,1 0 0266
-¶ "
-pc 9,5 0 0267
-· "
-ac 9,1,3 0 0270
-¸ "
-S1 9,10 0 0271
-¹ "
-Om 9,9 0 0272
-º "
-Fc 9,7 0 0273
-» "
-14 9,10 0 0274
-¼ "
-12 9,10 0 0275
-½ "
-34 9,10 0 0276
-¾ "
-r? 9,7,2 0 0277
-¿ "
-`A 9,12 0 0300
-À "
-'A 9,12 0 0301
-Á "
-^A 9,12 0 0302
-Â "
-~A 9,12 0 0303
-Ã "
-:A 9,11 0 0304
-Ä "
-oA 9,12 0 0305
-Å "
-AE 9,9 0 0306
-Æ "
-,C 9,9,3 0 0307
-Ç "
-`E 9,12 0 0310
-È "
-'E 9,12 0 0311
-É "
-^E 9,12 0 0312
-Ê "
-:E 9,11 0 0313
-Ë "
-`I 9,12 0 0314
-Ì "
-'I 9,12 0 0315
-Í "
-^I 9,12 0 0316
-Î "
-:I 9,11 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,11 0 0326
-Ö "
-mu 9,8 0 0327
-× "
-/O 9,9 0 0330
-Ø "
-`U 9,12 0 0331
-Ù "
-'U 9,12 0 0332
-Ú "
-^U 9,12 0 0333
-Û "
-:U 9,11 0 0334
-Ü "
-'Y 9,12 0 0335
-Ý "
-TP 9,9 0 0336
-Þ "
-ss 9,9 0 0337
-ß "
-`a 9,10 0 0340
-à "
-'a 9,10 0 0341
-á "
-^a 9,10 0 0342
-â "
-~a 9,10 0 0343
-ã "
-:a 9,9 0 0344
-ä "
-oa 9,11 0 0345
-å "
-ae 9,7 0 0346
-æ "
-,c 9,7,3 0 0347
-ç "
-`e 9,10 0 0350
-è "
-'e 9,10 0 0351
-é "
-^e 9,10 0 0352
-ê "
-:e 9,9 0 0353
-ë "
-`i 9,10 0 0354
-ì "
-'i 9,10 0 0355
-í "
-^i 9,10 0 0356
-î "
-:i 9,9 0 0357
-ï "
-Sd 9,10 0 0360
-ð "
-~n 9,10 0 0361
-ñ "
-`o 9,10 0 0362
-ò "
-'o 9,10 0 0363
-ó "
-^o 9,10 0 0364
-ô "
-~o 9,10 0 0365
-õ "
-:o 9,9 0 0366
-ö "
-di 9,8 0 0367
-÷ "
-/o 9,7 0 0370
-ø "
-`u 9,10 0 0371
-ù "
-'u 9,10 0 0372
-ú "
-^u 9,10 0 0373
-û "
-:u 9,9 0 0374
-ü "
-'y 9,10,3 0 0375
-ý "
-Tp 9,9,3 0 0376
-þ "
-:y 9,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/CR b/contrib/groff/font/devX100/CR
deleted file mode 100644
index b8b35d10ff14..000000000000
--- a/contrib/groff/font/devX100/CR
+++ /dev/null
@@ -1,308 +0,0 @@
-name CR
-spacewidth 9
-charset
---- 9,1 0 040
-! 9,9 0 041
-" 9,10 0 042
-dq "
-# 9,9,1 0 043
-sh "
-$ 9,11,2 0 044
-Do "
-% 9,10 0 045
-& 9,8 0 046
-' 9,10 0 047
-cq "
-( 9,10,2 0 050
-) 9,10,2 0 051
-* 9,9 0 052
-+ 9,8 0 053
-, 9,2,2 0 054
-\- 9,5 0 055
-. 9,2 0 056
-/ 9,10,1 0 057
-sl "
-0 9,10 0 060
-1 9,10 0 061
-2 9,10 0 062
-3 9,10 0 063
-4 9,10 0 064
-5 9,10 0 065
-6 9,10 0 066
-7 9,10 0 067
-8 9,10 0 070
-9 9,10 0 071
-: 9,7 0 072
-; 9,7,2 0 073
-< 9,8 0 074
-= 9,6 0 075
-eq "
-> 9,8 0 076
-? 9,9 0 077
-@ 9,9,1 0 0100
-at "
-A 9,9 0 0101
-B 9,9 0 0102
-C 9,9 0 0103
-D 9,9 0 0104
-E 9,9 0 0105
-F 9,9 0 0106
-G 9,9 0 0107
-H 9,9 0 0110
-I 9,9 0 0111
-J 9,9 0 0112
-K 9,9 0 0113
-L 9,9 0 0114
-M 9,9 0 0115
-N 9,9 0 0116
-O 9,9 0 0117
-P 9,9 0 0120
-Q 9,9,2 0 0121
-R 9,9 0 0122
-S 9,9 0 0123
-T 9,9 0 0124
-U 9,9 0 0125
-V 9,9 0 0126
-W 9,9 0 0127
-X 9,9 0 0130
-Y 9,9 0 0131
-Z 9,9 0 0132
-[ 9,10,2 0 0133
-lB "
-\ 9,10,1 0 0134
-rs "
-] 9,10,2 0 0135
-rB "
-^ 9,9 0 0136
-a^ "
-ha "
-_ 9,0,3 0 0137
-` 9,10 0 0140
-oq "
-a 9,7 0 0141
-b 9,10 0 0142
-c 9,7 0 0143
-d 9,10 0 0144
-e 9,7 0 0145
-f 9,10 0 0146
-g 9,7,3 0 0147
-h 9,10 0 0150
-i 9,10 0 0151
-j 9,10,3 0 0152
-k 9,10 0 0153
-l 9,10 0 0154
-m 9,7 0 0155
-n 9,7 0 0156
-o 9,7 0 0157
-p 9,7,3 0 0160
-q 9,7,3 0 0161
-r 9,7 0 0162
-s 9,7 0 0163
-t 9,9 0 0164
-u 9,7 0 0165
-v 9,7 0 0166
-w 9,7 0 0167
-x 9,7 0 0170
-y 9,7,3 0 0171
-z 9,7 0 0172
-{ 9,10,2 0 0173
-lC "
-| 9,9,2 0 0174
-or "
-ba "
-} 9,10,2 0 0175
-rC "
-~ 9,5 0 0176
-a~ "
-ap "
-ti "
-r! 9,7,2 0 0241
-¡ "
-ct 9,9 0 0242
-¢ "
-Po 9,9 0 0243
-£ "
-Cs 9,7 0 0244
-¤ "
-Ye 9,9 0 0245
-¥ "
-bb 9,9,2 0 0246
-¦ "
-sc 9,9,1 0 0247
-§ "
-ad 9,9 0 0250
-¨ "
-co 9,9 0 0251
-© "
-Of 9,9 0 0252
-ª "
-Fo 9,7 0 0253
-« "
-no 9,6 0 0254
-¬ "
-- 9,5 0 0255
-hy "
-­ "
-rg 9,9 0 0256
-® "
-a- 9,9 0 0257
-¯ "
-de 9,10 0 0260
-° "
-+- 9,8 0 0261
-± "
-S2 9,10 0 0262
-² "
-S3 9,10 0 0263
-³ "
-aa 9,10 0 0264
-´ "
-µ 9,7,3 0 0265
-ps 9,9,1 0 0266
-¶ "
-pc 9,5 0 0267
-· "
-ac 9,0,3 0 0270
-¸ "
-S1 9,10 0 0271
-¹ "
-Om 9,9 0 0272
-º "
-Fc 9,7 0 0273
-» "
-14 9,10 0 0274
-¼ "
-12 9,10 0 0275
-½ "
-34 9,10 0 0276
-¾ "
-r? 9,7,2 0 0277
-¿ "
-`A 9,12 0 0300
-À "
-'A 9,12 0 0301
-Á "
-^A 9,12 0 0302
-Â "
-~A 9,12 0 0303
-Ã "
-:A 9,11 0 0304
-Ä "
-oA 9,12 0 0305
-Å "
-AE 9,9 0 0306
-Æ "
-,C 9,9,3 0 0307
-Ç "
-`E 9,12 0 0310
-È "
-'E 9,12 0 0311
-É "
-^E 9,12 0 0312
-Ê "
-:E 9,11 0 0313
-Ë "
-`I 9,12 0 0314
-Ì "
-'I 9,12 0 0315
-Í "
-^I 9,12 0 0316
-Î "
-:I 9,11 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,11 0 0326
-Ö "
-mu 9,8 0 0327
-× "
-/O 9,9 0 0330
-Ø "
-`U 9,12 0 0331
-Ù "
-'U 9,12 0 0332
-Ú "
-^U 9,12 0 0333
-Û "
-:U 9,11 0 0334
-Ü "
-'Y 9,12 0 0335
-Ý "
-TP 9,9 0 0336
-Þ "
-ss 9,9 0 0337
-ß "
-`a 9,10 0 0340
-à "
-'a 9,10 0 0341
-á "
-^a 9,10 0 0342
-â "
-~a 9,10 0 0343
-ã "
-:a 9,9 0 0344
-ä "
-oa 9,10 0 0345
-å "
-ae 9,7 0 0346
-æ "
-,c 9,7,3 0 0347
-ç "
-`e 9,10 0 0350
-è "
-'e 9,10 0 0351
-é "
-^e 9,10 0 0352
-ê "
-:e 9,9 0 0353
-ë "
-`i 9,10 0 0354
-ì "
-'i 9,10 0 0355
-í "
-^i 9,10 0 0356
-î "
-:i 9,9 0 0357
-ï "
-Sd 9,12 0 0360
-ð "
-~n 9,10 0 0361
-ñ "
-`o 9,10 0 0362
-ò "
-'o 9,10 0 0363
-ó "
-^o 9,10 0 0364
-ô "
-~o 9,10 0 0365
-õ "
-:o 9,9 0 0366
-ö "
-di 9,8 0 0367
-÷ "
-/o 9,7 0 0370
-ø "
-`u 9,10 0 0371
-ù "
-'u 9,10 0 0372
-ú "
-^u 9,10 0 0373
-û "
-:u 9,9 0 0374
-ü "
-'y 9,10,3 0 0375
-ý "
-Tp 9,9,3 0 0376
-þ "
-:y 9,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/DESC b/contrib/groff/font/devX100/DESC
deleted file mode 100644
index 7f63535e0e65..000000000000
--- a/contrib/groff/font/devX100/DESC
+++ /dev/null
@@ -1,9 +0,0 @@
-styles R I B BI
-fonts 6 0 0 0 0 0 S
-sizes 8 10 12 14 18 24 0
-res 100
-X11
-hor 1
-vert 1
-unitwidth 10
-postpro gxditview
diff --git a/contrib/groff/font/devX100/HB b/contrib/groff/font/devX100/HB
deleted file mode 100644
index 1a1d963426e3..000000000000
--- a/contrib/groff/font/devX100/HB
+++ /dev/null
@@ -1,308 +0,0 @@
-name HB
-spacewidth 4
-charset
---- 4,1 0 040
-! 4,11 0 041
-" 7,11 0 042
-dq "
-# 9,10 0 043
-sh "
-$ 8,12,2 0 044
-Do "
-% 13,11 0 045
-& 11,10 0 046
-' 5,11 0 047
-cq "
-( 5,11,3 0 050
-) 5,11,3 0 051
-* 6,11 0 052
-+ 9,8 0 053
-, 4,2,1 0 054
-\- 9,5 0 055
-. 4,2 0 056
-/ 4,11 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 5,8 0 072
-; 5,8,1 0 073
-< 8,7 0 074
-= 9,6 0 075
-eq "
-> 8,7 0 076
-? 9,11 0 077
-@ 14,11,1 0 0100
-at "
-A 10,11 0 0101
-B 10,11 0 0102
-C 11,11 0 0103
-D 11,11 0 0104
-E 9,11 0 0105
-F 9,11 0 0106
-G 11,11 0 0107
-H 10,11 0 0110
-I 4,11 0 0111
-J 8,11 0 0112
-K 10,11 0 0113
-L 8,11 0 0114
-M 13,11 0 0115
-N 11,11 0 0116
-O 12,11 0 0117
-P 10,11 0 0120
-Q 12,11 0 0121
-R 11,11 0 0122
-S 10,11 0 0123
-T 8,11 0 0124
-U 11,11 0 0125
-V 10,11 0 0126
-W 14,11 0 0127
-X 9,11 0 0130
-Y 10,11 0 0131
-Z 9,11 0 0132
-[ 5,11,3 0 0133
-lB "
-\ 4,11 0 0134
-rs "
-] 5,11,3 0 0135
-rB "
-^ 8,11 0 0136
-a^ "
-ha "
-_ 8,0,3 0 0137
-` 5,11 0 0140
-oq "
-a 8,8 0 0141
-b 9,11 0 0142
-c 8,8 0 0143
-d 9,11 0 0144
-e 8,8 0 0145
-f 4,11 0 0146
-g 9,8,3 0 0147
-h 9,11 0 0150
-i 4,11 0 0151
-j 4,11,3 0 0152
-k 8,11 0 0153
-l 4,11 0 0154
-m 12,8 0 0155
-n 9,8 0 0156
-o 9,8 0 0157
-p 9,8,3 0 0160
-q 9,8,3 0 0161
-r 6,8 0 0162
-s 8,8 0 0163
-t 5,10 0 0164
-u 9,8 0 0165
-v 8,8 0 0166
-w 10,8 0 0167
-x 7,8 0 0170
-y 8,8,3 0 0171
-z 6,8 0 0172
-{ 6,11,3 0 0173
-lC "
-| 4,11,3 0 0174
-or "
-ba "
-} 6,11,3 0 0175
-rC "
-~ 9,6 0 0176
-a~ "
-ap "
-ti "
-r! 4,8,3 0 0241
-¡ "
-ct 8,9,1 0 0242
-¢ "
-Po 8,11 0 0243
-£ "
-Cs 8,9 0 0244
-¤ "
-Ye 9,11 0 0245
-¥ "
-bb 4,11,3 0 0246
-¦ "
-sc 8,11,3 0 0247
-§ "
-ad 5,11 0 0250
-¨ "
-co 12,11 0 0251
-© "
-Of 6,11 0 0252
-ª "
-Fo 9,7 0 0253
-« "
-no 9,6 0 0254
-¬ "
-- 4,5 0 0255
-hy "
-­ "
-rg 12,11 0 0256
-® "
-a- 5,10 0 0257
-¯ "
-de 6,11 0 0260
-° "
-+- 9,9 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 5,11 0 0264
-´ "
-µ 9,8,3 0 0265
-ps 8,11,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 4,11 0 0271
-¹ "
-Om 6,11 0 0272
-º "
-Fc 9,7 0 0273
-» "
-14 12,11 0 0274
-¼ "
-12 12,11 0 0275
-½ "
-34 12,11 0 0276
-¾ "
-r? 9,8,3 0 0277
-¿ "
-`A 10,14 0 0300
-À "
-'A 10,14 0 0301
-Á "
-^A 10,14 0 0302
-Â "
-~A 10,14 0 0303
-Ã "
-:A 10,14 0 0304
-Ä "
-oA 10,14 0 0305
-Å "
-AE 15,11 0 0306
-Æ "
-,C 11,11,3 0 0307
-Ç "
-`E 9,14 0 0310
-È "
-'E 9,14 0 0311
-É "
-^E 9,14 0 0312
-Ê "
-:E 9,14 0 0313
-Ë "
-`I 4,14 0 0314
-Ì "
-'I 4,14 0 0315
-Í "
-^I 4,14 0 0316
-Î "
-:I 4,14 0 0317
-Ï "
--D 11,11 0 0320
-Ð "
-~N 11,14 0 0321
-Ñ "
-`O 12,14 0 0322
-Ò "
-'O 12,14 0 0323
-Ó "
-^O 12,14 0 0324
-Ô "
-~O 12,14 0 0325
-Õ "
-:O 12,14 0 0326
-Ö "
-mu 9,8 0 0327
-× "
-/O 12,11 0 0330
-Ø "
-`U 11,14 0 0331
-Ù "
-'U 11,14 0 0332
-Ú "
-^U 11,14 0 0333
-Û "
-:U 11,14 0 0334
-Ü "
-'Y 10,14 0 0335
-Ý "
-TP 10,11 0 0336
-Þ "
-ss 8,11 0 0337
-ß "
-`a 8,11 0 0340
-à "
-'a 8,11 0 0341
-á "
-^a 8,11 0 0342
-â "
-~a 8,11 0 0343
-ã "
-:a 8,11 0 0344
-ä "
-oa 8,11 0 0345
-å "
-ae 13,8 0 0346
-æ "
-,c 9,8,3 0 0347
-ç "
-`e 8,11 0 0350
-è "
-'e 8,11 0 0351
-é "
-^e 8,11 0 0352
-ê "
-:e 8,11 0 0353
-ë "
-`i 4,11 0 0354
-ì "
-'i 4,11 0 0355
-í "
-^i 4,11 0 0356
-î "
-:i 4,11 0 0357
-ï "
-Sd 9,11 0 0360
-ð "
-~n 9,11 0 0361
-ñ "
-`o 9,11 0 0362
-ò "
-'o 9,11 0 0363
-ó "
-^o 9,11 0 0364
-ô "
-~o 9,11 0 0365
-õ "
-:o 9,11 0 0366
-ö "
-di 9,8 0 0367
-÷ "
-/o 9,8 0 0370
-ø "
-`u 9,11 0 0371
-ù "
-'u 9,11 0 0372
-ú "
-^u 9,11 0 0373
-û "
-:u 9,11 0 0374
-ü "
-'y 8,11,3 0 0375
-ý "
-Tp 9,11,3 0 0376
-þ "
-:y 8,11,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/HBI b/contrib/groff/font/devX100/HBI
deleted file mode 100644
index bcfbfae401f7..000000000000
--- a/contrib/groff/font/devX100/HBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name HBI
-spacewidth 4
-charset
---- 4,1 0 040
-! 5,11 0 041
-" 7,11 0 042
-dq "
-# 10,10 0 043
-sh "
-$ 8,12,1 0 044
-Do "
-% 13,11 0 045
-& 11,10 0 046
-' 5,11 0 047
-cq "
-( 5,11,3 0 050
-) 6,11,3 0 051
-* 6,11 0 052
-+ 9,8 0 053
-, 4,2,2 0 054
-\- 9,5 0 055
-. 4,2 0 056
-/ 4,11 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 5,8 0 072
-; 5,8,2 0 073
-< 8,7 0 074
-= 9,6 0 075
-eq "
-> 9,7 0 076
-? 9,11 0 077
-@ 14,11,2 0 0100
-at "
-A 9,11 0 0101
-B 10,11 0 0102
-C 11,11 0 0103
-D 11,11 0 0104
-E 9,11 0 0105
-F 8,11 0 0106
-G 11,11 0 0107
-H 10,11 0 0110
-I 4,11 0 0111
-J 8,11 0 0112
-K 10,11 0 0113
-L 8,11 0 0114
-M 13,11 0 0115
-N 11,11 0 0116
-O 12,11 0 0117
-P 10,11 0 0120
-Q 12,11 0 0121
-R 10,11 0 0122
-S 10,11 0 0123
-T 8,11 0 0124
-U 11,11 0 0125
-V 10,11 0 0126
-W 14,11 0 0127
-X 9,11 0 0130
-Y 10,11 0 0131
-Z 9,11 0 0132
-[ 5,11,3 0 0133
-lB "
-\ 6,11 0 0134
-rs "
-] 5,11,3 0 0135
-rB "
-^ 8,11 0 0136
-a^ "
-ha "
-_ 8,0,3 0 0137
-` 5,11 0 0140
-oq "
-a 8,8 0 0141
-b 9,11 0 0142
-c 8,8 0 0143
-d 9,11 0 0144
-e 8,8 0 0145
-f 5,11 0 0146
-g 9,8,3 0 0147
-h 9,11 0 0150
-i 4,11 0 0151
-j 4,11,3 0 0152
-k 8,11 0 0153
-l 4,11 0 0154
-m 12,8 0 0155
-n 9,8 0 0156
-o 8,8 0 0157
-p 9,8,3 0 0160
-q 9,8,3 0 0161
-r 6,8 0 0162
-s 8,8 0 0163
-t 5,10 0 0164
-u 9,8 0 0165
-v 8,8 0 0166
-w 11,8 0 0167
-x 7,8 0 0170
-y 7,8,3 0 0171
-z 6,8 0 0172
-{ 6,11,3 0 0173
-lC "
-| 4,11,3 0 0174
-or "
-ba "
-} 6,11,3 0 0175
-rC "
-~ 9,6 0 0176
-a~ "
-ap "
-ti "
-r! 5,8,3 0 0241
-¡ "
-ct 8,9,1 0 0242
-¢ "
-Po 9,11 0 0243
-£ "
-Cs 9,8 0 0244
-¤ "
-Ye 9,11 0 0245
-¥ "
-bb 4,11,3 0 0246
-¦ "
-sc 9,11,3 0 0247
-§ "
-ad 5,11 0 0250
-¨ "
-co 12,11 0 0251
-© "
-Of 6,11 0 0252
-ª "
-Fo 11,7 0 0253
-« "
-no 9,6 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,11 0 0256
-® "
-a- 5,11 0 0257
-¯ "
-de 6,11 0 0260
-° "
-+- 9,9 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 5,11 0 0264
-´ "
-µ 9,8,3 0 0265
-ps 8,11,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 5,1,3 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 6,11 0 0272
-º "
-Fc 11,7 0 0273
-» "
-14 12,11 0 0274
-¼ "
-12 12,11 0 0275
-½ "
-34 13,11 0 0276
-¾ "
-r? 8,8,3 0 0277
-¿ "
-`A 9,14 0 0300
-À "
-'A 9,14 0 0301
-Á "
-^A 9,14 0 0302
-Â "
-~A 9,14 0 0303
-Ã "
-:A 9,14 0 0304
-Ä "
-oA 9,14 0 0305
-Å "
-AE 14,11 0 0306
-Æ "
-,C 11,11,3 0 0307
-Ç "
-`E 9,14 0 0310
-È "
-'E 9,14 0 0311
-É "
-^E 9,14 0 0312
-Ê "
-:E 9,14 0 0313
-Ë "
-`I 4,14 0 0314
-Ì "
-'I 4,14 0 0315
-Í "
-^I 4,14 0 0316
-Î "
-:I 4,14 0 0317
-Ï "
--D 11,11 0 0320
-Ð "
-~N 11,14 0 0321
-Ñ "
-`O 12,14 0 0322
-Ò "
-'O 12,14 0 0323
-Ó "
-^O 12,14 0 0324
-Ô "
-~O 12,14 0 0325
-Õ "
-:O 12,14 0 0326
-Ö "
-mu 9,8 0 0327
-× "
-/O 12,11 0 0330
-Ø "
-`U 11,14 0 0331
-Ù "
-'U 11,14 0 0332
-Ú "
-^U 11,14 0 0333
-Û "
-:U 11,14 0 0334
-Ü "
-'Y 10,14 0 0335
-Ý "
-TP 10,11 0 0336
-Þ "
-ss 9,11 0 0337
-ß "
-`a 8,11 0 0340
-à "
-'a 8,11 0 0341
-á "
-^a 8,11 0 0342
-â "
-~a 8,11 0 0343
-ã "
-:a 8,11 0 0344
-ä "
-oa 8,11 0 0345
-å "
-ae 13,8 0 0346
-æ "
-,c 8,8,3 0 0347
-ç "
-`e 8,11 0 0350
-è "
-'e 8,11 0 0351
-é "
-^e 8,11 0 0352
-ê "
-:e 8,11 0 0353
-ë "
-`i 4,11 0 0354
-ì "
-'i 4,11 0 0355
-í "
-^i 4,11 0 0356
-î "
-:i 4,11 0 0357
-ï "
-Sd 8,11 0 0360
-ð "
-~n 9,11 0 0361
-ñ "
-`o 8,11 0 0362
-ò "
-'o 8,11 0 0363
-ó "
-^o 8,11 0 0364
-ô "
-~o 8,11 0 0365
-õ "
-:o 8,11 0 0366
-ö "
-di 9,8 0 0367
-÷ "
-/o 8,8 0 0370
-ø "
-`u 9,11 0 0371
-ù "
-'u 9,11 0 0372
-ú "
-^u 9,11 0 0373
-û "
-:u 9,11 0 0374
-ü "
-'y 7,11,3 0 0375
-ý "
-Tp 9,11,3 0 0376
-þ "
-:y 7,11,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/HI b/contrib/groff/font/devX100/HI
deleted file mode 100644
index 4be615cd8704..000000000000
--- a/contrib/groff/font/devX100/HI
+++ /dev/null
@@ -1,308 +0,0 @@
-name HI
-spacewidth 4
-charset
---- 4,1 0 040
-! 4,11 0 041
-" 5,11 0 042
-dq "
-# 9,10 0 043
-sh "
-$ 8,12,2 0 044
-Do "
-% 12,11 0 045
-& 10,10 0 046
-' 3,11 0 047
-cq "
-( 5,11,3 0 050
-) 5,11,3 0 051
-* 8,11 0 052
-+ 9,8 0 053
-, 3,2,2 0 054
-\- 9,5 0 055
-. 3,2 0 056
-/ 4,11 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 4,8 0 072
-; 4,8,2 0 073
-< 9,7 0 074
-= 9,6 0 075
-eq "
-> 9,7 0 076
-? 8,11 0 077
-@ 13,11,1 0 0100
-at "
-A 11,11 0 0101
-B 10,11 0 0102
-C 10,11 0 0103
-D 10,11 0 0104
-E 9,11 0 0105
-F 9,11 0 0106
-G 11,11 0 0107
-H 11,11 0 0110
-I 5,11 0 0111
-J 9,11 0 0112
-K 10,11 0 0113
-L 8,11 0 0114
-M 14,11 0 0115
-N 11,11 0 0116
-O 11,11 0 0117
-P 9,11 0 0120
-Q 11,11 0 0121
-R 10,11 0 0122
-S 9,11 0 0123
-T 8,11 0 0124
-U 11,11 0 0125
-V 11,11 0 0126
-W 14,11 0 0127
-X 10,11 0 0130
-Y 9,11 0 0131
-Z 9,11 0 0132
-[ 5,11,3 0 0133
-lB "
-\ 6,11 0 0134
-rs "
-] 5,11,3 0 0135
-rB "
-^ 7,11 0 0136
-a^ "
-ha "
-_ 8,0,3 0 0137
-` 3,11 0 0140
-oq "
-a 8,8 0 0141
-b 8,11 0 0142
-c 7,8 0 0143
-d 8,11 0 0144
-e 8,8 0 0145
-f 4,11 0 0146
-g 8,8,3 0 0147
-h 8,11 0 0150
-i 4,11 0 0151
-j 3,11,3 0 0152
-k 7,11 0 0153
-l 3,11 0 0154
-m 11,8 0 0155
-n 8,8 0 0156
-o 8,8 0 0157
-p 8,8,3 0 0160
-q 8,8,3 0 0161
-r 5,8 0 0162
-s 7,8 0 0163
-t 4,10 0 0164
-u 8,8 0 0165
-v 7,8 0 0166
-w 10,8 0 0167
-x 7,8 0 0170
-y 7,8,3 0 0171
-z 7,8 0 0172
-{ 5,11,3 0 0173
-lC "
-| 4,11,3 0 0174
-or "
-ba "
-} 5,11,3 0 0175
-rC "
-~ 8,6 0 0176
-a~ "
-ap "
-ti "
-r! 4,8,3 0 0241
-¡ "
-ct 8,9,1 0 0242
-¢ "
-Po 9,11 0 0243
-£ "
-Cs 8,8 0 0244
-¤ "
-Ye 9,11 0 0245
-¥ "
-bb 4,11,3 0 0246
-¦ "
-sc 8,11,3 0 0247
-§ "
-ad 5,10 0 0250
-¨ "
-co 12,11 0 0251
-© "
-Of 5,11 0 0252
-ª "
-Fo 8,6 0 0253
-« "
-no 9,6 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,11 0 0256
-® "
-a- 4,10 0 0257
-¯ "
-de 6,11 0 0260
-° "
-+- 9,9 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 4,11 0 0264
-´ "
-µ 8,8,3 0 0265
-ps 8,11,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 3,0,3 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 5,11 0 0272
-º "
-Fc 8,6 0 0273
-» "
-14 12,11 0 0274
-¼ "
-12 12,11 0 0275
-½ "
-34 12,11 0 0276
-¾ "
-r? 8,8,3 0 0277
-¿ "
-`A 11,14 0 0300
-À "
-'A 11,14 0 0301
-Á "
-^A 11,14 0 0302
-Â "
-~A 11,14 0 0303
-Ã "
-:A 11,13 0 0304
-Ä "
-oA 11,14 0 0305
-Å "
-AE 15,11 0 0306
-Æ "
-,C 10,11,3 0 0307
-Ç "
-`E 9,14 0 0310
-È "
-'E 9,14 0 0311
-É "
-^E 9,14 0 0312
-Ê "
-:E 9,13 0 0313
-Ë "
-`I 5,14 0 0314
-Ì "
-'I 5,14 0 0315
-Í "
-^I 5,14 0 0316
-Î "
-:I 5,13 0 0317
-Ï "
--D 10,11 0 0320
-Ð "
-~N 11,14 0 0321
-Ñ "
-`O 11,14 0 0322
-Ò "
-'O 11,14 0 0323
-Ó "
-^O 11,14 0 0324
-Ô "
-~O 11,14 0 0325
-Õ "
-:O 11,13 0 0326
-Ö "
-mu 9,8 0 0327
-× "
-/O 11,11 0 0330
-Ø "
-`U 11,14 0 0331
-Ù "
-'U 11,14 0 0332
-Ú "
-^U 11,14 0 0333
-Û "
-:U 11,13 0 0334
-Ü "
-'Y 9,14 0 0335
-Ý "
-TP 9,11 0 0336
-Þ "
-ss 8,11 0 0337
-ß "
-`a 8,11 0 0340
-à "
-'a 8,11 0 0341
-á "
-^a 8,11 0 0342
-â "
-~a 8,11 0 0343
-ã "
-:a 8,11 0 0344
-ä "
-oa 8,11 0 0345
-å "
-ae 12,8 0 0346
-æ "
-,c 7,8,3 0 0347
-ç "
-`e 8,11 0 0350
-è "
-'e 8,11 0 0351
-é "
-^e 8,11 0 0352
-ê "
-:e 8,11 0 0353
-ë "
-`i 3,11 0 0354
-ì "
-'i 3,11 0 0355
-í "
-^i 3,11 0 0356
-î "
-:i 3,11 0 0357
-ï "
-Sd 8,11 0 0360
-ð "
-~n 8,11 0 0361
-ñ "
-`o 8,11 0 0362
-ò "
-'o 8,11 0 0363
-ó "
-^o 8,11 0 0364
-ô "
-~o 8,11 0 0365
-õ "
-:o 8,11 0 0366
-ö "
-di 9,8 0 0367
-÷ "
-/o 8,9,1 0 0370
-ø "
-`u 8,11 0 0371
-ù "
-'u 8,11 0 0372
-ú "
-^u 8,11 0 0373
-û "
-:u 8,11 0 0374
-ü "
-'y 7,11,3 0 0375
-ý "
-Tp 8,11,3 0 0376
-þ "
-:y 7,11,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/HR b/contrib/groff/font/devX100/HR
deleted file mode 100644
index f462a24929e3..000000000000
--- a/contrib/groff/font/devX100/HR
+++ /dev/null
@@ -1,308 +0,0 @@
-name HR
-spacewidth 4
-charset
---- 4,1 0 040
-! 4,11 0 041
-" 5,11 0 042
-dq "
-# 8,10 0 043
-sh "
-$ 8,12,2 0 044
-Do "
-% 12,11 0 045
-& 10,10 0 046
-' 3,11 0 047
-cq "
-( 5,11,3 0 050
-) 5,11,3 0 051
-* 7,11 0 052
-+ 9,8 0 053
-, 3,2,2 0 054
-\- 9,5 0 055
-. 3,2 0 056
-/ 4,11 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 3,8 0 072
-; 4,8,2 0 073
-< 8,7 0 074
-= 9,6 0 075
-eq "
-> 8,7 0 076
-? 8,11 0 077
-@ 13,11,1 0 0100
-at "
-A 9,11 0 0101
-B 9,11 0 0102
-C 10,11 0 0103
-D 10,11 0 0104
-E 9,11 0 0105
-F 8,11 0 0106
-G 11,11 0 0107
-H 10,11 0 0110
-I 4,11 0 0111
-J 7,11 0 0112
-K 9,11 0 0113
-L 8,11 0 0114
-M 12,11 0 0115
-N 10,11 0 0116
-O 11,11 0 0117
-P 9,11 0 0120
-Q 11,11 0 0121
-R 10,11 0 0122
-S 9,11 0 0123
-T 9,11 0 0124
-U 10,11 0 0125
-V 9,11 0 0126
-W 13,11 0 0127
-X 9,11 0 0130
-Y 9,11 0 0131
-Z 9,11 0 0132
-[ 4,11,3 0 0133
-lB "
-\ 4,11 0 0134
-rs "
-] 4,11,3 0 0135
-rB "
-^ 7,11 0 0136
-a^ "
-ha "
-_ 8,0,3 0 0137
-` 3,11 0 0140
-oq "
-a 8,8 0 0141
-b 7,11 0 0142
-c 7,8 0 0143
-d 8,11 0 0144
-e 8,8 0 0145
-f 4,11 0 0146
-g 8,8,3 0 0147
-h 8,11 0 0150
-i 3,11 0 0151
-j 3,11,3 0 0152
-k 7,11 0 0153
-l 3,11 0 0154
-m 11,8 0 0155
-n 8,8 0 0156
-o 8,8 0 0157
-p 8,8,3 0 0160
-q 8,8,3 0 0161
-r 5,8 0 0162
-s 7,8 0 0163
-t 4,10 0 0164
-u 7,8 0 0165
-v 7,8 0 0166
-w 10,8 0 0167
-x 7,8 0 0170
-y 7,8,3 0 0171
-z 7,8 0 0172
-{ 5,11,3 0 0173
-lC "
-| 3,11,3 0 0174
-or "
-ba "
-} 5,11,3 0 0175
-rC "
-~ 8,6 0 0176
-a~ "
-ap "
-ti "
-r! 4,8,3 0 0241
-¡ "
-ct 8,9,1 0 0242
-¢ "
-Po 8,11 0 0243
-£ "
-Cs 8,8 0 0244
-¤ "
-Ye 7,11 0 0245
-¥ "
-bb 3,11,3 0 0246
-¦ "
-sc 8,11,3 0 0247
-§ "
-ad 5,10 0 0250
-¨ "
-co 12,11 0 0251
-© "
-Of 6,11 0 0252
-ª "
-Fo 8,7 0 0253
-« "
-no 9,6 0 0254
-¬ "
-- 4,5 0 0255
-hy "
-­ "
-rg 12,11 0 0256
-® "
-a- 4,10 0 0257
-¯ "
-de 6,11 0 0260
-° "
-+- 9,9 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 5,11 0 0264
-´ "
-µ 8,8,3 0 0265
-ps 8,11,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 6,11 0 0272
-º "
-Fc 8,7 0 0273
-» "
-14 12,11 0 0274
-¼ "
-12 12,11 0 0275
-½ "
-34 12,11 0 0276
-¾ "
-r? 8,8,3 0 0277
-¿ "
-`A 9,14 0 0300
-À "
-'A 9,14 0 0301
-Á "
-^A 9,14 0 0302
-Â "
-~A 9,13 0 0303
-Ã "
-:A 9,14 0 0304
-Ä "
-oA 9,14 0 0305
-Å "
-AE 14,11 0 0306
-Æ "
-,C 10,11,3 0 0307
-Ç "
-`E 9,14 0 0310
-È "
-'E 9,14 0 0311
-É "
-^E 9,14 0 0312
-Ê "
-:E 9,13 0 0313
-Ë "
-`I 4,14 0 0314
-Ì "
-'I 4,14 0 0315
-Í "
-^I 4,14 0 0316
-Î "
-:I 4,13 0 0317
-Ï "
--D 10,11 0 0320
-Ð "
-~N 10,14 0 0321
-Ñ "
-`O 11,14 0 0322
-Ò "
-'O 11,14 0 0323
-Ó "
-^O 11,14 0 0324
-Ô "
-~O 11,14 0 0325
-Õ "
-:O 11,13 0 0326
-Ö "
-mu 9,8 0 0327
-× "
-/O 11,11 0 0330
-Ø "
-`U 10,14 0 0331
-Ù "
-'U 10,14 0 0332
-Ú "
-^U 10,14 0 0333
-Û "
-:U 10,13 0 0334
-Ü "
-'Y 9,14 0 0335
-Ý "
-TP 9,11 0 0336
-Þ "
-ss 7,11 0 0337
-ß "
-`a 8,11 0 0340
-à "
-'a 8,11 0 0341
-á "
-^a 8,11 0 0342
-â "
-~a 8,11 0 0343
-ã "
-:a 8,11 0 0344
-ä "
-oa 8,12 0 0345
-å "
-ae 13,8 0 0346
-æ "
-,c 8,8,3 0 0347
-ç "
-`e 8,11 0 0350
-è "
-'e 8,11 0 0351
-é "
-^e 8,11 0 0352
-ê "
-:e 8,11 0 0353
-ë "
-`i 3,11 0 0354
-ì "
-'i 3,11 0 0355
-í "
-^i 3,11 0 0356
-î "
-:i 3,11 0 0357
-ï "
-Sd 8,11 0 0360
-ð "
-~n 8,11 0 0361
-ñ "
-`o 8,11 0 0362
-ò "
-'o 8,11 0 0363
-ó "
-^o 8,11 0 0364
-ô "
-~o 8,11 0 0365
-õ "
-:o 8,11 0 0366
-ö "
-di 9,8 0 0367
-÷ "
-/o 8,8 0 0370
-ø "
-`u 8,11 0 0371
-ù "
-'u 8,11 0 0372
-ú "
-^u 8,11 0 0373
-û "
-:u 8,11 0 0374
-ü "
-'y 7,11,3 0 0375
-ý "
-Tp 8,11,3 0 0376
-þ "
-:y 7,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/Makefile.sub b/contrib/groff/font/devX100/Makefile.sub
deleted file mode 100644
index 4d40f0fd5dec..000000000000
--- a/contrib/groff/font/devX100/Makefile.sub
+++ /dev/null
@@ -1,2 +0,0 @@
-DEV=X100
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
diff --git a/contrib/groff/font/devX100/NB b/contrib/groff/font/devX100/NB
deleted file mode 100644
index f99169ea4e19..000000000000
--- a/contrib/groff/font/devX100/NB
+++ /dev/null
@@ -1,308 +0,0 @@
-name NB
-spacewidth 11
-charset
---- 11,1 0 040
-! 4,11 0 041
-" 5,11 0 042
-dq "
-# 8,10 0 043
-sh "
-$ 8,12,1 0 044
-Do "
-% 13,11 0 045
-& 13,11 0 046
-' 4,11 0 047
-cq "
-( 5,11,2 0 050
-) 5,11,2 0 051
-* 6,11 0 052
-+ 8,8 0 053
-, 4,3,2 0 054
-\- 8,5 0 055
-. 4,3 0 056
-/ 5,11 0 057
-sl "
-0 8,11 0 060
-1 6,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 4,7 0 072
-; 4,7,2 0 073
-< 8,8 0 074
-= 8,6 0 075
-eq "
-> 8,8 0 076
-? 7,11 0 077
-@ 14,11 0 0100
-at "
-A 11,11 0 0101
-B 10,11 0 0102
-C 11,11 0 0103
-D 12,11 0 0104
-E 10,11 0 0105
-F 10,11 0 0106
-G 12,11 0 0107
-H 12,11 0 0110
-I 7,11 0 0111
-J 9,11 0 0112
-K 12,11 0 0113
-L 10,11 0 0114
-M 14,11 0 0115
-N 12,11 0 0116
-O 12,11 0 0117
-P 10,11 0 0120
-Q 12,11,3 0 0121
-R 12,11 0 0122
-S 10,11 0 0123
-T 11,11 0 0124
-U 12,11 0 0125
-V 11,11 0 0126
-W 14,11 0 0127
-X 12,11 0 0130
-Y 11,11 0 0131
-Z 9,11 0 0132
-[ 5,11,2 0 0133
-lB "
-\ 7,11 0 0134
-rs "
-] 5,11,2 0 0135
-rB "
-^ 8,11 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 4,11 0 0140
-oq "
-a 9,7 0 0141
-b 10,11 0 0142
-c 8,7 0 0143
-d 10,11 0 0144
-e 9,7 0 0145
-f 6,11 0 0146
-g 8,8,3 0 0147
-h 10,11 0 0150
-i 5,10 0 0151
-j 5,10,3 0 0152
-k 9,11 0 0153
-l 5,11 0 0154
-m 15,7 0 0155
-n 10,7 0 0156
-o 9,7 0 0157
-p 10,7,3 0 0160
-q 9,7,3 0 0161
-r 7,7 0 0162
-s 7,7 0 0163
-t 6,10 0 0164
-u 10,7 0 0165
-v 7,7 0 0166
-w 12,7 0 0167
-x 9,7 0 0170
-y 7,7,3 0 0171
-z 7,7 0 0172
-{ 6,11,2 0 0173
-lC "
-| 8,11 0 0174
-or "
-ba "
-} 6,11,2 0 0175
-rC "
-~ 8,6 0 0176
-a~ "
-ap "
-ti "
-r! 5,8,3 0 0241
-¡ "
-ct 8,8,1 0 0242
-¢ "
-Po 9,11 0 0243
-£ "
-Cs 9,10 0 0244
-¤ "
-Ye 11,11 0 0245
-¥ "
-bb 8,11 0 0246
-¦ "
-sc 7,11,2 0 0247
-§ "
-ad 7,10 0 0250
-¨ "
-co 12,11 0 0251
-© "
-Of 6,11 0 0252
-ª "
-Fo 8,6 0 0253
-« "
-no 8,6 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,11 0 0256
-® "
-a- 7,9 0 0257
-¯ "
-de 6,11 0 0260
-° "
-+- 8,8 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 6,11 0 0264
-´ "
-µ 10,7,3 0 0265
-ps 10,11 0 0266
-¶ "
-pc 5,6 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 6,11 0 0272
-º "
-Fc 8,6 0 0273
-» "
-14 12,11 0 0274
-¼ "
-12 12,11 0 0275
-½ "
-34 12,11 0 0276
-¾ "
-r? 7,8,3 0 0277
-¿ "
-`A 11,15 0 0300
-À "
-'A 11,15 0 0301
-Á "
-^A 11,15 0 0302
-Â "
-~A 11,14 0 0303
-Ã "
-:A 11,14 0 0304
-Ä "
-oA 11,15 0 0305
-Å "
-AE 15,11 0 0306
-Æ "
-,C 11,11,3 0 0307
-Ç "
-`E 10,15 0 0310
-È "
-'E 10,15 0 0311
-É "
-^E 10,15 0 0312
-Ê "
-:E 10,14 0 0313
-Ë "
-`I 7,15 0 0314
-Ì "
-'I 7,15 0 0315
-Í "
-^I 7,15 0 0316
-Î "
-:I 7,14 0 0317
-Ï "
--D 12,11 0 0320
-Ð "
-~N 12,14 0 0321
-Ñ "
-`O 12,15 0 0322
-Ò "
-'O 12,15 0 0323
-Ó "
-^O 12,15 0 0324
-Ô "
-~O 12,14 0 0325
-Õ "
-:O 12,14 0 0326
-Ö "
-mu 8,8 0 0327
-× "
-/O 12,11 0 0330
-Ø "
-`U 12,15 0 0331
-Ù "
-'U 12,15 0 0332
-Ú "
-^U 12,15 0 0333
-Û "
-:U 12,14 0 0334
-Ü "
-'Y 11,14 0 0335
-Ý "
-TP 10,11 0 0336
-Þ "
-ss 9,11 0 0337
-ß "
-`a 9,11 0 0340
-à "
-'a 9,11 0 0341
-á "
-^a 9,11 0 0342
-â "
-~a 9,10 0 0343
-ã "
-:a 9,10 0 0344
-ä "
-oa 9,11 0 0345
-å "
-ae 14,7 0 0346
-æ "
-,c 8,7,3 0 0347
-ç "
-`e 9,11 0 0350
-è "
-'e 9,11 0 0351
-é "
-^e 9,11 0 0352
-ê "
-:e 9,10 0 0353
-ë "
-`i 5,11 0 0354
-ì "
-'i 5,11 0 0355
-í "
-^i 5,11 0 0356
-î "
-:i 5,10 0 0357
-ï "
-Sd 9,11 0 0360
-ð "
-~n 10,10 0 0361
-ñ "
-`o 9,11 0 0362
-ò "
-'o 9,11 0 0363
-ó "
-^o 9,11 0 0364
-ô "
-~o 9,10 0 0365
-õ "
-:o 9,10 0 0366
-ö "
-di 8,8 0 0367
-÷ "
-/o 9,8,1 0 0370
-ø "
-`u 10,11 0 0371
-ù "
-'u 10,11 0 0372
-ú "
-^u 10,11 0 0373
-û "
-:u 10,10 0 0374
-ü "
-'y 7,11,3 0 0375
-ý "
-Tp 10,11,3 0 0376
-þ "
-:y 7,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/NBI b/contrib/groff/font/devX100/NBI
deleted file mode 100644
index dd940afc937f..000000000000
--- a/contrib/groff/font/devX100/NBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name NBI
-spacewidth 4
-charset
---- 4,1 0 040
-! 5,11 0 041
-" 6,11 0 042
-dq "
-# 8,10 0 043
-sh "
-$ 8,12,1 0 044
-Do "
-% 13,11,1 0 045
-& 13,11 0 046
-' 4,11 0 047
-cq "
-( 5,11,2 0 050
-) 6,11,2 0 051
-* 7,11 0 052
-+ 8,8 0 053
-, 4,2,3 0 054
-\- 8,5 0 055
-. 4,2 0 056
-/ 5,11 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 4,7 0 072
-; 5,7,3 0 073
-< 9,9 0 074
-= 9,7 0 075
-eq "
-> 9,9 0 076
-? 7,11 0 077
-@ 13,11 0 0100
-at "
-A 11,11 0 0101
-B 10,11 0 0102
-C 11,11 0 0103
-D 12,11 0 0104
-E 10,11 0 0105
-F 10,11 0 0106
-G 11,11 0 0107
-H 12,11 0 0110
-I 6,11 0 0111
-J 8,11 0 0112
-K 12,11 0 0113
-L 10,11 0 0114
-M 15,11 0 0115
-N 13,11 0 0116
-O 12,11 0 0117
-P 11,11 0 0120
-Q 12,11,2 0 0121
-R 12,11 0 0122
-S 10,11 0 0123
-T 11,11 0 0124
-U 12,11 0 0125
-V 11,11 0 0126
-W 15,11 0 0127
-X 11,11 0 0130
-Y 9,11 0 0131
-Z 10,11 0 0132
-[ 7,11,2 0 0133
-lB "
-\ 9,11 0 0134
-rs "
-] 7,11,2 0 0135
-rB "
-^ 8,11 0 0136
-a^ "
-ha "
-_ 9,0,2 0 0137
-` 4,11 0 0140
-oq "
-a 10,7 0 0141
-b 8,11 0 0142
-c 8,7 0 0143
-d 10,11 0 0144
-e 8,7 0 0145
-f 5,11,3 0 0146
-g 8,9,3 0 0147
-h 10,11 0 0150
-i 5,10 0 0151
-j 4,10,3 0 0152
-k 9,11 0 0153
-l 5,11 0 0154
-m 15,7 0 0155
-n 10,7 0 0156
-o 8,7 0 0157
-p 8,7,3 0 0160
-q 9,7,3 0 0161
-r 7,7 0 0162
-s 8,7 0 0163
-t 5,9 0 0164
-u 10,7 0 0165
-v 8,7 0 0166
-w 13,7 0 0167
-x 9,7 0 0170
-y 9,7,3 0 0171
-z 9,7 0 0172
-{ 6,11,2 0 0173
-lC "
-| 9,11 0 0174
-or "
-ba "
-} 6,11,2 0 0175
-rC "
-~ 11,6 0 0176
-a~ "
-ap "
-ti "
-r! 5,8,3 0 0241
-¡ "
-ct 8,8,1 0 0242
-¢ "
-Po 10,11 0 0243
-£ "
-Cs 8,9 0 0244
-¤ "
-Ye 10,11 0 0245
-¥ "
-bb 8,11 0 0246
-¦ "
-sc 9,11,2 0 0247
-§ "
-ad 6,10 0 0250
-¨ "
-co 12,11 0 0251
-© "
-Of 8,11 0 0252
-ª "
-Fo 10,7 0 0253
-« "
-no 9,7 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 12,11 0 0256
-® "
-a- 6,9 0 0257
-¯ "
-de 6,11 0 0260
-° "
-+- 8,8 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 5,11 0 0264
-´ "
-µ 10,7,3 0 0265
-ps 9,11 0 0266
-¶ "
-pc 5,6 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 8,11 0 0272
-º "
-Fc 10,7 0 0273
-» "
-14 12,11 0 0274
-¼ "
-12 12,11 0 0275
-½ "
-34 12,11 0 0276
-¾ "
-r? 7,8,3 0 0277
-¿ "
-`A 11,15 0 0300
-À "
-'A 11,15 0 0301
-Á "
-^A 11,15 0 0302
-Â "
-~A 11,14 0 0303
-Ã "
-:A 11,14 0 0304
-Ä "
-oA 11,15 0 0305
-Å "
-AE 14,11 0 0306
-Æ "
-,C 11,11,3 0 0307
-Ç "
-`E 10,15 0 0310
-È "
-'E 10,15 0 0311
-É "
-^E 10,15 0 0312
-Ê "
-:E 10,14 0 0313
-Ë "
-`I 6,15 0 0314
-Ì "
-'I 6,15 0 0315
-Í "
-^I 6,15 0 0316
-Î "
-:I 6,14 0 0317
-Ï "
--D 12,11 0 0320
-Ð "
-~N 13,14 0 0321
-Ñ "
-`O 12,15 0 0322
-Ò "
-'O 12,15 0 0323
-Ó "
-^O 12,15 0 0324
-Ô "
-~O 12,14 0 0325
-Õ "
-:O 12,14 0 0326
-Ö "
-mu 8,8 0 0327
-× "
-/O 12,11 0 0330
-Ø "
-`U 12,15 0 0331
-Ù "
-'U 12,15 0 0332
-Ú "
-^U 12,15 0 0333
-Û "
-:U 12,14 0 0334
-Ü "
-'Y 9,15 0 0335
-Ý "
-TP 11,11 0 0336
-Þ "
-ss 10,11,3 0 0337
-ß "
-`a 10,11 0 0340
-à "
-'a 10,11 0 0341
-á "
-^a 10,11 0 0342
-â "
-~a 10,10 0 0343
-ã "
-:a 10,10 0 0344
-ä "
-oa 10,11 0 0345
-å "
-ae 13,7 0 0346
-æ "
-,c 8,7,3 0 0347
-ç "
-`e 8,11 0 0350
-è "
-'e 8,11 0 0351
-é "
-^e 8,11 0 0352
-ê "
-:e 8,10 0 0353
-ë "
-`i 5,11 0 0354
-ì "
-'i 5,11 0 0355
-í "
-^i 5,11 0 0356
-î "
-:i 5,10 0 0357
-ï "
-Sd 8,11 0 0360
-ð "
-~n 10,10 0 0361
-ñ "
-`o 8,11 0 0362
-ò "
-'o 8,11 0 0363
-ó "
-^o 8,11 0 0364
-ô "
-~o 8,10 0 0365
-õ "
-:o 8,10 0 0366
-ö "
-di 8,8 0 0367
-÷ "
-/o 8,7 0 0370
-ø "
-`u 10,11 0 0371
-ù "
-'u 10,11 0 0372
-ú "
-^u 10,11 0 0373
-û "
-:u 10,10 0 0374
-ü "
-'y 9,11,3 0 0375
-ý "
-Tp 8,11,3 0 0376
-þ "
-:y 9,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/NI b/contrib/groff/font/devX100/NI
deleted file mode 100644
index bb31b53d18a7..000000000000
--- a/contrib/groff/font/devX100/NI
+++ /dev/null
@@ -1,308 +0,0 @@
-name NI
-spacewidth 4
-charset
---- 4,1 0 040
-! 5,11 0 041
-" 6,11 0 042
-dq "
-# 11,10 0 043
-sh "
-$ 8,12,1 0 044
-Do "
-% 12,11,1 0 045
-& 11,11 0 046
-' 4,11 0 047
-cq "
-( 5,11,2 0 050
-) 5,11,2 0 051
-* 6,11 0 052
-+ 8,8 0 053
-, 4,2,2 0 054
-\- 9,5 0 055
-. 4,2 0 056
-/ 9,11,3 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 4,7 0 072
-; 4,7,2 0 073
-< 9,8 0 074
-= 8,6 0 075
-eq "
-> 9,8 0 076
-? 6,11 0 077
-@ 12,11 0 0100
-at "
-A 11,11 0 0101
-B 9,11 0 0102
-C 10,11 0 0103
-D 11,11 0 0104
-E 9,11 0 0105
-F 8,11 0 0106
-G 10,11 0 0107
-H 11,11 0 0110
-I 7,11 0 0111
-J 8,11 0 0112
-K 10,11 0 0113
-L 9,11 0 0114
-M 14,11 0 0115
-N 12,11 0 0116
-O 10,11 0 0117
-P 10,11 0 0120
-Q 10,11,2 0 0121
-R 11,11 0 0122
-S 10,11 0 0123
-T 10,11 0 0124
-U 12,11 0 0125
-V 10,11 0 0126
-W 13,11 0 0127
-X 10,11 0 0130
-Y 9,11 0 0131
-Z 10,11 0 0132
-[ 6,11,2 0 0133
-lB "
-\ 8,11 0 0134
-rs "
-] 6,11,2 0 0135
-rB "
-^ 6,11 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 4,11 0 0140
-oq "
-a 9,7 0 0141
-b 7,11 0 0142
-c 6,7 0 0143
-d 9,11 0 0144
-e 6,7 0 0145
-f 5,11,3 0 0146
-g 7,8,3 0 0147
-h 9,11 0 0150
-i 4,11 0 0151
-j 4,11,3 0 0152
-k 8,11 0 0153
-l 4,11 0 0154
-m 14,7 0 0155
-n 9,7 0 0156
-o 7,7 0 0157
-p 7,7,3 0 0160
-q 8,7,3 0 0161
-r 7,7 0 0162
-s 7,7 0 0163
-t 5,9 0 0164
-u 9,7 0 0165
-v 7,7 0 0166
-w 11,7 0 0167
-x 8,7 0 0170
-y 7,7,3 0 0171
-z 8,7 0 0172
-{ 6,11,2 0 0173
-lC "
-| 9,11 0 0174
-or "
-ba "
-} 6,11,2 0 0175
-rC "
-~ 9,6 0 0176
-a~ "
-ap "
-ti "
-r! 4,8,3 0 0241
-¡ "
-ct 8,9,2 0 0242
-¢ "
-Po 9,11 0 0243
-£ "
-Cs 8,9 0 0244
-¤ "
-Ye 9,11 0 0245
-¥ "
-bb 8,11 0 0246
-¦ "
-sc 7,11,2 0 0247
-§ "
-ad 7,10 0 0250
-¨ "
-co 13,11 0 0251
-© "
-Of 6,11 0 0252
-ª "
-Fo 8,7 0 0253
-« "
-no 8,6 0 0254
-¬ "
-- 5,5 0 0255
-hy "
-­ "
-rg 13,11 0 0256
-® "
-a- 6,9 0 0257
-¯ "
-de 6,11 0 0260
-° "
-+- 8,8 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 4,11 0 0264
-´ "
-µ 9,7,3 0 0265
-ps 9,11 0 0266
-¶ "
-pc 5,6 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 6,11 0 0272
-º "
-Fc 8,7 0 0273
-» "
-14 12,11 0 0274
-¼ "
-12 12,11 0 0275
-½ "
-34 12,11 0 0276
-¾ "
-r? 6,8,3 0 0277
-¿ "
-`A 11,14 0 0300
-À "
-'A 11,14 0 0301
-Á "
-^A 11,14 0 0302
-Â "
-~A 11,14 0 0303
-Ã "
-:A 11,14 0 0304
-Ä "
-oA 11,14 0 0305
-Å "
-AE 14,11 0 0306
-Æ "
-,C 10,11,3 0 0307
-Ç "
-`E 9,14 0 0310
-È "
-'E 9,14 0 0311
-É "
-^E 9,14 0 0312
-Ê "
-:E 9,14 0 0313
-Ë "
-`I 7,14 0 0314
-Ì "
-'I 7,14 0 0315
-Í "
-^I 7,14 0 0316
-Î "
-:I 7,14 0 0317
-Ï "
--D 11,11 0 0320
-Ð "
-~N 12,14 0 0321
-Ñ "
-`O 10,14 0 0322
-Ò "
-'O 10,14 0 0323
-Ó "
-^O 10,14 0 0324
-Ô "
-~O 10,14 0 0325
-Õ "
-:O 10,14 0 0326
-Ö "
-mu 8,8 0 0327
-× "
-/O 10,11 0 0330
-Ø "
-`U 12,14 0 0331
-Ù "
-'U 12,14 0 0332
-Ú "
-^U 12,14 0 0333
-Û "
-:U 12,14 0 0334
-Ü "
-'Y 9,14 0 0335
-Ý "
-TP 10,11 0 0336
-Þ "
-ss 8,11,3 0 0337
-ß "
-`a 9,11 0 0340
-à "
-'a 9,11 0 0341
-á "
-^a 9,11 0 0342
-â "
-~a 9,10 0 0343
-ã "
-:a 9,10 0 0344
-ä "
-oa 9,11 0 0345
-å "
-ae 10,7 0 0346
-æ "
-,c 6,7,3 0 0347
-ç "
-`e 6,11 0 0350
-è "
-'e 6,11 0 0351
-é "
-^e 6,11 0 0352
-ê "
-:e 6,10 0 0353
-ë "
-`i 4,11 0 0354
-ì "
-'i 4,11 0 0355
-í "
-^i 4,11 0 0356
-î "
-:i 4,10 0 0357
-ï "
-Sd 7,11 0 0360
-ð "
-~n 9,10 0 0361
-ñ "
-`o 7,11 0 0362
-ò "
-'o 7,11 0 0363
-ó "
-^o 7,11 0 0364
-ô "
-~o 7,10 0 0365
-õ "
-:o 7,10 0 0366
-ö "
-di 8,8 0 0367
-÷ "
-/o 7,8,1 0 0370
-ø "
-`u 9,11 0 0371
-ù "
-'u 9,11 0 0372
-ú "
-^u 9,11 0 0373
-û "
-:u 9,10 0 0374
-ü "
-'y 7,11,3 0 0375
-ý "
-Tp 7,11,3 0 0376
-þ "
-:y 7,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/NR b/contrib/groff/font/devX100/NR
deleted file mode 100644
index 729f76eb0878..000000000000
--- a/contrib/groff/font/devX100/NR
+++ /dev/null
@@ -1,308 +0,0 @@
-name NR
-spacewidth 4
-charset
---- 4,1 0 040
-! 3,11 0 041
-" 5,11 0 042
-dq "
-# 8,11 0 043
-sh "
-$ 8,12,2 0 044
-Do "
-% 12,11 0 045
-& 13,11 0 046
-' 4,11 0 047
-cq "
-( 5,11,2 0 050
-) 6,11,2 0 051
-* 7,11 0 052
-+ 9,7 0 053
-, 4,2,2 0 054
-\- 9,4 0 055
-. 4,2 0 056
-/ 4,11 0 057
-sl "
-0 8,11 0 060
-1 8,11 0 061
-2 8,11 0 062
-3 8,11 0 063
-4 8,11 0 064
-5 8,11 0 065
-6 8,11 0 066
-7 8,11 0 067
-8 8,11 0 070
-9 8,11 0 071
-: 4,7 0 072
-; 4,7,2 0 073
-< 10,7 0 074
-= 9,6 0 075
-eq "
-> 10,7 0 076
-? 6,11 0 077
-@ 13,11 0 0100
-at "
-A 10,11 0 0101
-B 10,11 0 0102
-C 11,11 0 0103
-D 11,11 0 0104
-E 10,11 0 0105
-F 10,11 0 0106
-G 11,11 0 0107
-H 12,11 0 0110
-I 6,11 0 0111
-J 7,11 0 0112
-K 11,11 0 0113
-L 10,11 0 0114
-M 16,11 0 0115
-N 13,11 0 0116
-O 11,11 0 0117
-P 10,11 0 0120
-Q 11,11,2 0 0121
-R 11,11 0 0122
-S 8,11 0 0123
-T 10,11 0 0124
-U 13,11 0 0125
-V 10,11 0 0126
-W 16,11 0 0127
-X 13,11 0 0130
-Y 10,11 0 0131
-Z 9,11 0 0132
-[ 4,11,2 0 0133
-lB "
-\ 8,11 0 0134
-rs "
-] 4,11,2 0 0135
-rB "
-^ 7,11 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 4,11 0 0140
-oq "
-a 8,7 0 0141
-b 7,11 0 0142
-c 7,7 0 0143
-d 8,11 0 0144
-e 7,7 0 0145
-f 5,11 0 0146
-g 8,7,3 0 0147
-h 9,11 0 0150
-i 4,10 0 0151
-j 4,10,3 0 0152
-k 9,11 0 0153
-l 4,11 0 0154
-m 14,7 0 0155
-n 9,7 0 0156
-o 7,7 0 0157
-p 8,7,3 0 0160
-q 7,7,3 0 0161
-r 7,7 0 0162
-s 6,7 0 0163
-t 5,9 0 0164
-u 9,7 0 0165
-v 8,7 0 0166
-w 12,7 0 0167
-x 8,7 0 0170
-y 8,7,3 0 0171
-z 7,7 0 0172
-{ 4,11,2 0 0173
-lC "
-| 9,11 0 0174
-or "
-ba "
-} 5,11,2 0 0175
-rC "
-~ 9,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,8,3 0 0241
-¡ "
-ct 8,9,2 0 0242
-¢ "
-Po 8,11 0 0243
-£ "
-Cs 8,9 0 0244
-¤ "
-Ye 8,11 0 0245
-¥ "
-bb 9,11 0 0246
-¦ "
-sc 7,11,2 0 0247
-§ "
-ad 6,10 0 0250
-¨ "
-co 14,11 0 0251
-© "
-Of 6,11 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 9,5 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 14,11 0 0256
-® "
-a- 5,9 0 0257
-¯ "
-de 6,11 0 0260
-° "
-+- 9,7 0 0261
-± "
-S2 5,11 0 0262
-² "
-S3 5,11 0 0263
-³ "
-aa 5,11 0 0264
-´ "
-µ 9,7,3 0 0265
-ps 9,11,2 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 5,1,3 0 0270
-¸ "
-S1 5,11 0 0271
-¹ "
-Om 5,11 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 12,11 0 0274
-¼ "
-12 12,11 0 0275
-½ "
-34 12,11 0 0276
-¾ "
-r? 6,8,3 0 0277
-¿ "
-`A 10,14 0 0300
-À "
-'A 10,14 0 0301
-Á "
-^A 10,14 0 0302
-Â "
-~A 10,14 0 0303
-Ã "
-:A 10,13 0 0304
-Ä "
-oA 10,14 0 0305
-Å "
-AE 15,11 0 0306
-Æ "
-,C 11,11,3 0 0307
-Ç "
-`E 10,14 0 0310
-È "
-'E 10,14 0 0311
-É "
-^E 10,14 0 0312
-Ê "
-:E 10,14 0 0313
-Ë "
-`I 6,14 0 0314
-Ì "
-'I 6,14 0 0315
-Í "
-^I 6,14 0 0316
-Î "
-:I 6,14 0 0317
-Ï "
--D 11,11 0 0320
-Ð "
-~N 13,14 0 0321
-Ñ "
-`O 11,14 0 0322
-Ò "
-'O 11,14 0 0323
-Ó "
-^O 11,14 0 0324
-Ô "
-~O 11,14 0 0325
-Õ "
-:O 11,14 0 0326
-Ö "
-mu 9,7 0 0327
-× "
-/O 11,11 0 0330
-Ø "
-`U 13,14 0 0331
-Ù "
-'U 13,14 0 0332
-Ú "
-^U 13,14 0 0333
-Û "
-:U 13,14 0 0334
-Ü "
-'Y 10,14 0 0335
-Ý "
-TP 10,11 0 0336
-Þ "
-ss 8,11 0 0337
-ß "
-`a 8,11 0 0340
-à "
-'a 8,11 0 0341
-á "
-^a 8,11 0 0342
-â "
-~a 8,10 0 0343
-ã "
-:a 8,10 0 0344
-ä "
-oa 8,11 0 0345
-å "
-ae 12,7 0 0346
-æ "
-,c 7,7,3 0 0347
-ç "
-`e 7,11 0 0350
-è "
-'e 7,11 0 0351
-é "
-^e 7,11 0 0352
-ê "
-:e 7,10 0 0353
-ë "
-`i 4,11 0 0354
-ì "
-'i 4,11 0 0355
-í "
-^i 4,11 0 0356
-î "
-:i 4,10 0 0357
-ï "
-Sd 7,11 0 0360
-ð "
-~n 9,10 0 0361
-ñ "
-`o 7,11 0 0362
-ò "
-'o 7,11 0 0363
-ó "
-^o 7,11 0 0364
-ô "
-~o 7,10 0 0365
-õ "
-:o 7,10 0 0366
-ö "
-di 9,7 0 0367
-÷ "
-/o 7,8,1 0 0370
-ø "
-`u 9,11 0 0371
-ù "
-'u 9,11 0 0372
-ú "
-^u 9,11 0 0373
-û "
-:u 9,10 0 0374
-ü "
-'y 8,11,3 0 0375
-ý "
-Tp 8,11,3 0 0376
-þ "
-:y 8,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/S b/contrib/groff/font/devX100/S
deleted file mode 100644
index 59af889e1302..000000000000
--- a/contrib/groff/font/devX100/S
+++ /dev/null
@@ -1,226 +0,0 @@
-name S
-special
-spacewidth 4
-charset
---- 4,1 0 040
-! 5,10 0 041
-fa 9,10 0 042
-# 7,10 0 043
-sh "
-te 8,10 0 044
-% 12,10 0 045
-& 11,10 0 046
-st 6,7 0 047
-( 5,10,3 0 050
-) 5,10,3 0 051
-** 7,8 0 052
-+ 8,7 0 053
-pl "
-, 3,2,2 0 054
-\- 8,4 0 055
-mi "
-. 3,2 0 056
-/ 4,10 0 057
-sl "
-0 7,10 0 060
-1 7,10 0 061
-2 7,10 0 062
-3 7,10 0 063
-4 7,10 0 064
-5 7,10 0 065
-6 7,10 0 066
-7 7,10 0 067
-8 7,10 0 070
-9 7,10 0 071
-: 4,7 0 072
-; 4,7,2 0 073
-< 8,7 0 074
-= 8,5 0 075
-eq "
-> 8,7 0 076
-? 6,10 0 077
-=~ 8,7 0 0100
-*A 11,10 0 0101
-*B 9,10 0 0102
-*X 11,10 0 0103
-*D 9,10 0 0104
-*E 9,10 0 0105
-*F 11,10 0 0106
-*G 9,10 0 0107
-*Y 11,10 0 0110
-*I 5,10 0 0111
-+h 9,10 0 0112
-*K 10,10 0 0113
-*L 10,10 0 0114
-*M 13,10 0 0115
-*N 11,10 0 0116
-*O 10,10 0 0117
-*P 11,10 0 0120
-*H 10,10 0 0121
-*R 8,10 0 0122
-*S 9,10 0 0123
-*T 9,10 0 0124
---- 9,10 0 0125
-ts 7,7,3 0 0126
-*W 11,10 0 0127
-*C 9,10 0 0130
-*Q 11,10 0 0131
-*Z 9,10 0 0132
-[ 5,10,3 0 0133
-lB "
-tf 10,7 0 0134
-3d "
-] 5,10,3 0 0135
-rB "
-pp 10,10 0 0136
-_ 7,0,3 0 0137
-radicalex 7,12 0 0140
-*a 9,7 0 0141
-*b 8,11,3 0 0142
-*x 8,7,3 0 0143
-*d 7,11 0 0144
-*e 6,7 0 0145
-*f 9,10,3 0 0146
-*g 6,7,3 0 0147
-*y 8,7,3 0 0150
-*i 5,7 0 0151
-+f 9,7,3 0 0152
-*k 8,7 0 0153
-*l 8,10 0 0154
-*m 8,7,2 0 0155
-µ "
-*n 8,7 0 0156
-*o 8,7 0 0157
-*p 8,7 0 0160
-*h 7,10 0 0161
-*r 8,7,3 0 0162
-*s 8,7 0 0163
-*t 6,7 0 0164
-*u 8,7 0 0165
-+p 11,8 0 0166
-*w 11,7 0 0167
-*c 7,12,3 0 0170
-*q 9,7,3 0 0171
-*z 7,11,3 0 0172
-lC 7,10,3 0 0173
-{ "
-ba 3,10,3 0 0174
-or "
-| "
-rC 7,10,3 0 0175
-} "
-ap 8,5 0 0176
-*U 9,10 0 0241
-fm 4,10 0 0242
-<= 8,9 0 0243
-f/ 4,10 0 0244
-if 10,6 0 0245
-Fn 7,10,3 0 0246
-CL 11,7 0 0247
-DI 11,7 0 0250
-HE 11,7 0 0251
-SP 11,7 0 0252
-<> 15,7 0 0253
-<- 14,7 0 0254
-ua 9,12,3 0 0255
-arrowverttp "
--> 14,7 0 0256
-da 9,12,3 0 0257
-arrowvertbt "
-de 6,10 0 0260
-° "
-+- 8,9 0 0261
-± "
-sd 6,10 0 0262
->= 8,9 0 0263
-mu 8,7 0 0264
-× "
-pt 10,6 0 0265
-pd 7,11 0 0266
-bu 7,6 0 0267
-di 8,7 0 0270
-÷ "
-!= 8,7 0 0271
-== 8,6 0 0272
-~= 8,7 0 0273
-~~ "
---- 15,2 0 0274
-arrowvertex 9,12,3 0 0275
-an 15,4 0 0276
-CR 10,9 0 0277
-Ah 12,10 0 0300
-Im 10,11,1 0 0301
-Re 12,11 0 0302
-wp 12,9,3 0 0303
-c* 11,9 0 0304
-c+ 11,9 0 0305
-es 12,11 0 0306
-ca 10,7 0 0307
-cu 10,7 0 0310
-sp 10,7 0 0311
-ip 10,7,2 0 0312
---- 10,8,1 0 0313
-sb 10,7 0 0314
-ib 10,7,2 0 0315
-mo 10,7 0 0316
-nm 10,8,1 0 0317
-/_ 11,10 0 0320
-gr 10,11 0 0321
-rg 12,10 0 0322
-co 12,10 0 0323
-tm 11,10 0 0324
---- 12,11,1 0 0325
-sr 8,12 0 0326
-md 4,5 0 0327
-no 10,5 0 0330
-¬ "
-AN 9,7 0 0331
-OR 9,7 0 0332
-hA 15,7 0 0333
-lA 14,7 0 0334
-uA 9,12 0 0335
-rA 14,7 0 0336
-dA 9,12 0 0337
-lz 7,11 0 0340
-la 5,12,3 0 0341
---- 12,10 0 0342
---- 12,10 0 0343
---- 11,10 0 0344
---- 10,11,1 0 0345
-parenlefttp 6,12,3 0 0346
-parenleftex 6,12,3 0 0347
-parenleftbt 6,12,3 0 0350
-bracketlefttp 6,12,3 0 0351
-lc "
-bracketleftex 6,12,3 0 0352
-bracketleftbt 6,12,3 0 0353
-lf "
-bracelefttp 7,12,3 0 0354
-lt "
-braceleftmid 7,12,3 0 0355
-lk "
-braceleftbt 7,12,3 0 0356
-lb "
-bracerightex 7,12,3 0 0357
-braceleftex "
-bv "
---- 12,12 0 0360
-ra 5,12,3 0 0361
-is 4,12,1 0 0362
---- 10,12,3 0 0363
---- 10,12,3 0 0364
---- 10,12,3 0 0365
-parenrighttp 6,12,3 0 0366
-parenrightex 6,12,3 0 0367
-parenrightbt 6,12,3 0 0370
-bracketrighttp 6,12,3 0 0371
-rc "
-bracketrightex 6,12,3 0 0372
-bracketrightbt 6,12,3 0 0373
-rf "
-bracerighttp 7,12,3 0 0374
-rt "
-bracerightmid 7,12,3 0 0375
-rk "
-bracerightbt 7,12,3 0 0376
-rb "
diff --git a/contrib/groff/font/devX100/TB b/contrib/groff/font/devX100/TB
deleted file mode 100644
index f9f191c083e1..000000000000
--- a/contrib/groff/font/devX100/TB
+++ /dev/null
@@ -1,308 +0,0 @@
-name TB
-spacewidth 3
-charset
---- 3,1 0 040
-! 4,10 0 041
-" 7,10 0 042
-dq "
-# 7,10 0 043
-sh "
-$ 7,11,1 0 044
-Do "
-% 14,10 0 045
-& 12,10 0 046
-' 4,10 0 047
-cq "
-( 5,10,3 0 050
-) 5,10,3 0 051
-* 7,10 0 052
-+ 8,7 0 053
-, 3,2,2 0 054
-\- 9,4 0 055
-. 3,2 0 056
-/ 4,10 0 057
-sl "
-0 7,10 0 060
-1 7,10 0 061
-2 7,10 0 062
-3 7,10 0 063
-4 7,10 0 064
-5 7,10 0 065
-6 7,10 0 066
-7 7,10 0 067
-8 7,10 0 070
-9 7,10 0 071
-: 4,7 0 072
-; 4,7,2 0 073
-< 8,7 0 074
-= 8,5 0 075
-eq "
-> 8,7 0 076
-? 7,10 0 077
-@ 14,10,2 0 0100
-at "
-A 10,10 0 0101
-B 9,10 0 0102
-C 10,10 0 0103
-D 10,10 0 0104
-E 9,10 0 0105
-F 8,10 0 0106
-G 11,10 0 0107
-H 11,10 0 0110
-I 5,10 0 0111
-J 7,10,1 0 0112
-K 11,10 0 0113
-L 9,10 0 0114
-M 13,10 0 0115
-N 10,10 0 0116
-O 11,10 0 0117
-P 9,10 0 0120
-Q 11,10,3 0 0121
-R 10,10 0 0122
-S 8,10 0 0123
-T 9,10 0 0124
-U 10,10 0 0125
-V 10,10 0 0126
-W 14,10 0 0127
-X 10,10 0 0130
-Y 10,10 0 0131
-Z 9,10 0 0132
-[ 5,10,3 0 0133
-lB "
-\ 4,10 0 0134
-rs "
-] 5,10,3 0 0135
-rB "
-^ 8,10 0 0136
-a^ "
-ha "
-_ 7,0,3 0 0137
-` 4,10 0 0140
-oq "
-a 7,7 0 0141
-b 8,10 0 0142
-c 6,7 0 0143
-d 7,10 0 0144
-e 6,7 0 0145
-f 5,10 0 0146
-g 7,7,3 0 0147
-h 8,10 0 0150
-i 4,10 0 0151
-j 4,10,3 0 0152
-k 8,10 0 0153
-l 4,10 0 0154
-m 12,7 0 0155
-n 8,7 0 0156
-o 7,7 0 0157
-p 8,7,3 0 0160
-q 7,7,3 0 0161
-r 6,7 0 0162
-s 6,7 0 0163
-t 5,9 0 0164
-u 7,7 0 0165
-v 7,7 0 0166
-w 10,7 0 0167
-x 7,7 0 0170
-y 7,7,3 0 0171
-z 6,7 0 0172
-{ 7,10,3 0 0173
-lC "
-| 3,10,2 0 0174
-or "
-ba "
-} 7,10,3 0 0175
-rC "
-~ 8,7 0 0176
-a~ "
-ap "
-ti "
-r! 4,7,3 0 0241
-¡ "
-ct 7,9,2 0 0242
-¢ "
-Po 8,10 0 0243
-£ "
-Cs 8,8 0 0244
-¤ "
-Ye 8,10 0 0245
-¥ "
-bb 3,10,2 0 0246
-¦ "
-sc 7,10,2 0 0247
-§ "
-ad 5,10 0 0250
-¨ "
-co 12,10 0 0251
-© "
-Of 5,10 0 0252
-ª "
-Fo 9,6 0 0253
-« "
-no 9,5 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 12,10 0 0256
-® "
-a- 5,9 0 0257
-¯ "
-de 6,10 0 0260
-° "
-+- 8,9 0 0261
-± "
-S2 4,10 0 0262
-² "
-S3 4,10 0 0263
-³ "
-aa 5,11 0 0264
-´ "
-µ 7,7,3 0 0265
-ps 8,10,3 0 0266
-¶ "
-pc 4,6 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 4,10 0 0271
-¹ "
-Om 5,10 0 0272
-º "
-Fc 9,6 0 0273
-» "
-14 10,10 0 0274
-¼ "
-12 10,10 0 0275
-½ "
-34 10,10 0 0276
-¾ "
-r? 7,7,3 0 0277
-¿ "
-`A 10,14 0 0300
-À "
-'A 10,14 0 0301
-Á "
-^A 10,14 0 0302
-Â "
-~A 10,13 0 0303
-Ã "
-:A 10,13 0 0304
-Ä "
-oA 10,14 0 0305
-Å "
-AE 14,10 0 0306
-Æ "
-,C 10,10,3 0 0307
-Ç "
-`E 9,14 0 0310
-È "
-'E 9,14 0 0311
-É "
-^E 9,14 0 0312
-Ê "
-:E 9,13 0 0313
-Ë "
-`I 5,14 0 0314
-Ì "
-'I 5,14 0 0315
-Í "
-^I 5,14 0 0316
-Î "
-:I 5,13 0 0317
-Ï "
--D 11,10 0 0320
-Ð "
-~N 10,13 0 0321
-Ñ "
-`O 11,14 0 0322
-Ò "
-'O 11,14 0 0323
-Ó "
-^O 11,14 0 0324
-Ô "
-~O 11,13 0 0325
-Õ "
-:O 11,13 0 0326
-Ö "
-mu 8,7 0 0327
-× "
-/O 11,11,1 0 0330
-Ø "
-`U 10,14 0 0331
-Ù "
-'U 10,14 0 0332
-Ú "
-^U 10,14 0 0333
-Û "
-:U 10,13 0 0334
-Ü "
-'Y 10,14 0 0335
-Ý "
-TP 9,10 0 0336
-Þ "
-ss 8,10 0 0337
-ß "
-`a 7,11 0 0340
-à "
-'a 7,11 0 0341
-á "
-^a 7,11 0 0342
-â "
-~a 7,10 0 0343
-ã "
-:a 7,10 0 0344
-ä "
-oa 7,11 0 0345
-å "
-ae 11,7 0 0346
-æ "
-,c 7,7,3 0 0347
-ç "
-`e 7,11 0 0350
-è "
-'e 7,11 0 0351
-é "
-^e 7,11 0 0352
-ê "
-:e 7,10 0 0353
-ë "
-`i 4,11 0 0354
-ì "
-'i 4,11 0 0355
-í "
-^i 4,11 0 0356
-î "
-:i 4,10 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 8,10 0 0361
-ñ "
-`o 7,11 0 0362
-ò "
-'o 7,11 0 0363
-ó "
-^o 7,11 0 0364
-ô "
-~o 7,10 0 0365
-õ "
-:o 7,10 0 0366
-ö "
-di 8,7 0 0367
-÷ "
-/o 7,8,1 0 0370
-ø "
-`u 7,11 0 0371
-ù "
-'u 7,11 0 0372
-ú "
-^u 7,11 0 0373
-û "
-:u 7,10 0 0374
-ü "
-'y 7,11,3 0 0375
-ý "
-Tp 8,10,3 0 0376
-þ "
-:y 7,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/TBI b/contrib/groff/font/devX100/TBI
deleted file mode 100644
index 76e9828bcf72..000000000000
--- a/contrib/groff/font/devX100/TBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name TBI
-spacewidth 3
-charset
---- 3,1 0 040
-! 7,10 0 041
-" 7,10 0 042
-dq "
-# 8,10 0 043
-sh "
-$ 7,11,1 0 044
-Do "
-% 14,10 0 045
-& 10,10 0 046
-' 5,10 0 047
-cq "
-( 6,10,3 0 050
-) 6,10,3 0 051
-* 7,10 0 052
-+ 9,7 0 053
-, 4,2,2 0 054
-\- 9,4 0 055
-. 3,2 0 056
-/ 6,10 0 057
-sl "
-0 7,10 0 060
-1 7,10 0 061
-2 7,10 0 062
-3 7,10 0 063
-4 7,10 0 064
-5 7,10 0 065
-6 7,10 0 066
-7 7,10 0 067
-8 7,10 0 070
-9 7,10 0 071
-: 5,7 0 072
-; 4,7,2 0 073
-< 8,6 0 074
-= 10,5 0 075
-eq "
-> 8,6 0 076
-? 8,10 0 077
-@ 15,10,2 0 0100
-at "
-A 9,10 0 0101
-B 9,10 0 0102
-C 9,10 0 0103
-D 10,10 0 0104
-E 10,10 0 0105
-F 9,10 0 0106
-G 10,10 0 0107
-H 11,10 0 0110
-I 5,10 0 0111
-J 7,10,1 0 0112
-K 11,10 0 0113
-L 9,10 0 0114
-M 13,10 0 0115
-N 11,10 0 0116
-O 10,10 0 0117
-P 9,10 0 0120
-Q 10,10,3 0 0121
-R 10,10 0 0122
-S 8,10 0 0123
-T 10,10 0 0124
-U 10,10 0 0125
-V 10,10 0 0126
-W 13,10 0 0127
-X 9,10 0 0130
-Y 8,10 0 0131
-Z 8,10 0 0132
-[ 6,10,3 0 0133
-lB "
-\ 6,10 0 0134
-rs "
-] 5,10,3 0 0135
-rB "
-^ 8,10 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 5,10 0 0140
-oq "
-a 8,7 0 0141
-b 7,10 0 0142
-c 6,7 0 0143
-d 7,10 0 0144
-e 7,7 0 0145
-f 5,10,3 0 0146
-g 6,7,3 0 0147
-h 8,10 0 0150
-i 4,10 0 0151
-j 4,10,3 0 0152
-k 7,10 0 0153
-l 4,10 0 0154
-m 11,7 0 0155
-n 8,7 0 0156
-o 7,7 0 0157
-p 7,7,3 0 0160
-q 7,7,3 0 0161
-r 6,7 0 0162
-s 6,7 0 0163
-t 4,9 0 0164
-u 7,7 0 0165
-v 6,7 0 0166
-w 9,7 0 0167
-x 6,7 0 0170
-y 6,7,3 0 0171
-z 6,7 0 0172
-{ 7,10,3 0 0173
-lC "
-| 4,10 0 0174
-or "
-ba "
-} 7,10,3 0 0175
-rC "
-~ 10,5 0 0176
-a~ "
-ap "
-ti "
-r! 7,7,3 0 0241
-¡ "
-ct 7,8,1 0 0242
-¢ "
-Po 7,10 0 0243
-£ "
-Cs 8,8 0 0244
-¤ "
-Ye 7,10 0 0245
-¥ "
-bb 4,10 0 0246
-¦ "
-sc 8,10,3 0 0247
-§ "
-ad 6,9 0 0250
-¨ "
-co 12,10 0 0251
-© "
-Of 6,10 0 0252
-ª "
-Fo 8,6 0 0253
-« "
-no 9,5 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 12,10 0 0256
-® "
-a- 6,9 0 0257
-¯ "
-de 6,10 0 0260
-° "
-+- 9,9 0 0261
-± "
-S2 4,10 0 0262
-² "
-S3 4,10 0 0263
-³ "
-aa 6,10 0 0264
-´ "
-µ 7,7,3 0 0265
-ps 8,10,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 4,10 0 0271
-¹ "
-Om 6,10 0 0272
-º "
-Fc 8,6 0 0273
-» "
-14 10,10 0 0274
-¼ "
-12 10,10 0 0275
-½ "
-34 10,10 0 0276
-¾ "
-r? 8,7,3 0 0277
-¿ "
-`A 9,13 0 0300
-À "
-'A 9,13 0 0301
-Á "
-^A 9,13 0 0302
-Â "
-~A 9,13 0 0303
-Ã "
-:A 9,13 0 0304
-Ä "
-oA 9,13 0 0305
-Å "
-AE 14,10 0 0306
-Æ "
-,C 9,10,3 0 0307
-Ç "
-`E 10,13 0 0310
-È "
-'E 10,13 0 0311
-É "
-^E 10,13 0 0312
-Ê "
-:E 10,13 0 0313
-Ë "
-`I 5,13 0 0314
-Ì "
-'I 5,13 0 0315
-Í "
-^I 5,13 0 0316
-Î "
-:I 5,13 0 0317
-Ï "
--D 10,10 0 0320
-Ð "
-~N 11,13 0 0321
-Ñ "
-`O 10,13 0 0322
-Ò "
-'O 10,13 0 0323
-Ó "
-^O 10,13 0 0324
-Ô "
-~O 10,13 0 0325
-Õ "
-:O 10,13 0 0326
-Ö "
-mu 9,7 0 0327
-× "
-/O 10,11,1 0 0330
-Ø "
-`U 10,13 0 0331
-Ù "
-'U 10,13 0 0332
-Ú "
-^U 10,13 0 0333
-Û "
-:U 10,13 0 0334
-Ü "
-'Y 8,13 0 0335
-Ý "
-TP 9,10 0 0336
-Þ "
-ss 7,10,3 0 0337
-ß "
-`a 8,10 0 0340
-à "
-'a 8,10 0 0341
-á "
-^a 8,11 0 0342
-â "
-~a 8,10 0 0343
-ã "
-:a 8,10 0 0344
-ä "
-oa 8,11 0 0345
-å "
-ae 11,7 0 0346
-æ "
-,c 6,7,3 0 0347
-ç "
-`e 7,10 0 0350
-è "
-'e 7,10 0 0351
-é "
-^e 7,11 0 0352
-ê "
-:e 7,10 0 0353
-ë "
-`i 4,10 0 0354
-ì "
-'i 4,10 0 0355
-í "
-^i 4,11 0 0356
-î "
-:i 4,10 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 8,10 0 0361
-ñ "
-`o 7,10 0 0362
-ò "
-'o 7,10 0 0363
-ó "
-^o 7,11 0 0364
-ô "
-~o 7,10 0 0365
-õ "
-:o 7,10 0 0366
-ö "
-di 9,7 0 0367
-÷ "
-/o 7,8,1 0 0370
-ø "
-`u 7,10 0 0371
-ù "
-'u 7,10 0 0372
-ú "
-^u 7,11 0 0373
-û "
-:u 7,10 0 0374
-ü "
-'y 6,10,2 0 0375
-ý "
-Tp 7,10,3 0 0376
-þ "
-:y 6,10,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/TI b/contrib/groff/font/devX100/TI
deleted file mode 100644
index 53401e5c44d6..000000000000
--- a/contrib/groff/font/devX100/TI
+++ /dev/null
@@ -1,308 +0,0 @@
-name TI
-spacewidth 3
-charset
---- 3,1 0 040
-! 5,10 0 041
-" 6,10 0 042
-dq "
-# 7,10 0 043
-sh "
-$ 7,11,1 0 044
-Do "
-% 12,10 0 045
-& 11,10 0 046
-' 5,10 0 047
-cq "
-( 5,10,3 0 050
-) 5,10,3 0 051
-* 7,10 0 052
-+ 10,7 0 053
-, 4,2,1 0 054
-\- 9,4 0 055
-. 3,2 0 056
-/ 4,10 0 057
-sl "
-0 7,10 0 060
-1 7,10 0 061
-2 7,10 0 062
-3 7,10 0 063
-4 7,10 0 064
-5 7,10 0 065
-6 7,10 0 066
-7 7,10 0 067
-8 7,10 0 070
-9 7,10 0 071
-: 4,7 0 072
-; 4,7,1 0 073
-< 10,7,1 0 074
-= 10,5 0 075
-eq "
-> 10,7,1 0 076
-? 7,10 0 077
-@ 13,10,3 0 0100
-at "
-A 9,10 0 0101
-B 8,10 0 0102
-C 9,10 0 0103
-D 10,10 0 0104
-E 9,10 0 0105
-F 9,10 0 0106
-G 10,10 0 0107
-H 10,10 0 0110
-I 5,10 0 0111
-J 6,10 0 0112
-K 10,10 0 0113
-L 8,10 0 0114
-M 12,10 0 0115
-N 11,10 0 0116
-O 10,10 0 0117
-P 9,10 0 0120
-Q 10,10,3 0 0121
-R 9,10 0 0122
-S 7,10 0 0123
-T 8,10 0 0124
-U 10,10 0 0125
-V 9,10 0 0126
-W 11,10 0 0127
-X 9,10 0 0130
-Y 8,10 0 0131
-Z 8,10 0 0132
-[ 6,10,3 0 0133
-lB "
-\ 4,10 0 0134
-rs "
-] 6,10,3 0 0135
-rB "
-^ 6,10 0 0136
-a^ "
-ha "
-_ 7,0,4 0 0137
-` 5,10 0 0140
-oq "
-a 7,7 0 0141
-b 7,10 0 0142
-c 6,7 0 0143
-d 7,10 0 0144
-e 7,7 0 0145
-f 5,10,3 0 0146
-g 6,7,3 0 0147
-h 7,10 0 0150
-i 4,10 0 0151
-j 4,10,3 0 0152
-k 7,10 0 0153
-l 4,10 0 0154
-m 10,7 0 0155
-n 7,7 0 0156
-o 7,7 0 0157
-p 7,7,3 0 0160
-q 7,7,3 0 0161
-r 5,7 0 0162
-s 6,7 0 0163
-t 5,9 0 0164
-u 7,7 0 0165
-v 6,7 0 0166
-w 9,7 0 0167
-x 7,7 0 0170
-y 7,7,3 0 0171
-z 6,7 0 0172
-{ 6,10,3 0 0173
-lC "
-| 4,10,3 0 0174
-or "
-ba "
-} 6,10,3 0 0175
-rC "
-~ 8,5 0 0176
-a~ "
-ap "
-ti "
-r! 6,7,3 0 0241
-¡ "
-ct 7,9,2 0 0242
-¢ "
-Po 7,10 0 0243
-£ "
-Cs 7,8 0 0244
-¤ "
-Ye 7,10 0 0245
-¥ "
-bb 4,10,3 0 0246
-¦ "
-sc 7,11,2 0 0247
-§ "
-ad 5,10 0 0250
-¨ "
-co 12,10 0 0251
-© "
-Of 5,10 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 9,6 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 12,10 0 0256
-® "
-a- 5,10 0 0257
-¯ "
-de 6,10 0 0260
-° "
-+- 10,9 0 0261
-± "
-S2 4,10 0 0262
-² "
-S3 4,10 0 0263
-³ "
-aa 4,10 0 0264
-´ "
-µ 7,7,3 0 0265
-ps 8,10,3 0 0266
-¶ "
-pc 4,4 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 4,10 0 0271
-¹ "
-Om 5,10 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 10,10 0 0274
-¼ "
-12 10,10 0 0275
-½ "
-34 10,10 0 0276
-¾ "
-r? 7,7,3 0 0277
-¿ "
-`A 9,13 0 0300
-À "
-'A 9,13 0 0301
-Á "
-^A 9,13 0 0302
-Â "
-~A 9,13 0 0303
-Ã "
-:A 9,12 0 0304
-Ä "
-oA 9,13 0 0305
-Å "
-AE 13,10 0 0306
-Æ "
-,C 9,10,3 0 0307
-Ç "
-`E 9,13 0 0310
-È "
-'E 9,13 0 0311
-É "
-^E 9,13 0 0312
-Ê "
-:E 9,12 0 0313
-Ë "
-`I 5,13 0 0314
-Ì "
-'I 5,13 0 0315
-Í "
-^I 5,13 0 0316
-Î "
-:I 5,12 0 0317
-Ï "
--D 10,10 0 0320
-Ð "
-~N 11,13 0 0321
-Ñ "
-`O 10,13 0 0322
-Ò "
-'O 10,13 0 0323
-Ó "
-^O 10,13 0 0324
-Ô "
-~O 10,13 0 0325
-Õ "
-:O 10,12 0 0326
-Ö "
-mu 10,7 0 0327
-× "
-/O 10,11,1 0 0330
-Ø "
-`U 10,13 0 0331
-Ù "
-'U 10,13 0 0332
-Ú "
-^U 10,13 0 0333
-Û "
-:U 10,12 0 0334
-Ü "
-'Y 8,13 0 0335
-Ý "
-TP 9,10 0 0336
-Þ "
-ss 7,10,3 0 0337
-ß "
-`a 7,10 0 0340
-à "
-'a 7,10 0 0341
-á "
-^a 7,11 0 0342
-â "
-~a 7,10 0 0343
-ã "
-:a 7,9 0 0344
-ä "
-oa 7,10 0 0345
-å "
-ae 10,7 0 0346
-æ "
-,c 6,7,3 0 0347
-ç "
-`e 7,10 0 0350
-è "
-'e 7,10 0 0351
-é "
-^e 7,11 0 0352
-ê "
-:e 7,9 0 0353
-ë "
-`i 4,10 0 0354
-ì "
-'i 4,10 0 0355
-í "
-^i 4,11 0 0356
-î "
-:i 4,9 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 7,10 0 0361
-ñ "
-`o 7,10 0 0362
-ò "
-'o 7,10 0 0363
-ó "
-^o 7,11 0 0364
-ô "
-~o 7,10 0 0365
-õ "
-:o 7,9 0 0366
-ö "
-di 10,7 0 0367
-÷ "
-/o 7,8,1 0 0370
-ø "
-`u 7,10 0 0371
-ù "
-'u 7,10 0 0372
-ú "
-^u 7,11 0 0373
-û "
-:u 7,9 0 0374
-ü "
-'y 7,10,3 0 0375
-ý "
-Tp 7,10,3 0 0376
-þ "
-:y 7,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX100/TR b/contrib/groff/font/devX100/TR
deleted file mode 100644
index 39d106a2867b..000000000000
--- a/contrib/groff/font/devX100/TR
+++ /dev/null
@@ -1,308 +0,0 @@
-name TR
-spacewidth 3
-charset
---- 3,1 0 040
-! 5,10 0 041
-" 6,10 0 042
-dq "
-# 7,10 0 043
-sh "
-$ 7,11,1 0 044
-Do "
-% 12,10 0 045
-& 11,10 0 046
-' 4,10 0 047
-cq "
-( 5,10,3 0 050
-) 5,10,3 0 051
-* 7,10 0 052
-+ 8,7 0 053
-, 4,1,2 0 054
-\- 9,4 0 055
-. 4,1 0 056
-/ 4,10,2 0 057
-sl "
-0 7,10 0 060
-1 7,10 0 061
-2 7,10 0 062
-3 7,10 0 063
-4 7,10 0 064
-5 7,10 0 065
-6 7,10 0 066
-7 7,10 0 067
-8 7,10 0 070
-9 7,10 0 071
-: 4,7 0 072
-; 4,7,2 0 073
-< 8,7 0 074
-= 8,5 0 075
-eq "
-> 8,7 0 076
-? 6,10 0 077
-@ 13,10,2 0 0100
-at "
-A 11,10 0 0101
-B 9,10 0 0102
-C 10,10 0 0103
-D 10,10 0 0104
-E 9,10 0 0105
-F 8,10 0 0106
-G 11,10 0 0107
-H 10,10 0 0110
-I 5,10 0 0111
-J 6,10 0 0112
-K 10,10 0 0113
-L 9,10 0 0114
-M 13,10 0 0115
-N 11,10 0 0116
-O 10,10 0 0117
-P 8,10 0 0120
-Q 10,10,3 0 0121
-R 9,10 0 0122
-S 8,10 0 0123
-T 9,10 0 0124
-U 10,10 0 0125
-V 9,10 0 0126
-W 13,10 0 0127
-X 10,10 0 0130
-Y 9,10 0 0131
-Z 8,10 0 0132
-[ 5,10,3 0 0133
-lB "
-\ 4,10 0 0134
-rs "
-] 5,10,3 0 0135
-rB "
-^ 7,10 0 0136
-a^ "
-ha "
-_ 7,0,3 0 0137
-` 4,10 0 0140
-oq "
-a 7,7 0 0141
-b 7,10 0 0142
-c 7,7 0 0143
-d 7,10 0 0144
-e 7,7 0 0145
-f 4,10 0 0146
-g 7,7,3 0 0147
-h 7,10 0 0150
-i 3,10 0 0151
-j 4,10,3 0 0152
-k 7,10 0 0153
-l 3,10 0 0154
-m 11,7 0 0155
-n 7,7 0 0156
-o 7,7 0 0157
-p 7,7,3 0 0160
-q 7,7,3 0 0161
-r 5,7 0 0162
-s 6,7 0 0163
-t 4,8 0 0164
-u 7,7 0 0165
-v 7,7 0 0166
-w 11,7 0 0167
-x 7,7 0 0170
-y 7,7,3 0 0171
-z 6,7 0 0172
-{ 7,10,3 0 0173
-lC "
-| 3,10 0 0174
-or "
-ba "
-} 7,10,3 0 0175
-rC "
-~ 8,5 0 0176
-a~ "
-ap "
-ti "
-r! 5,7,3 0 0241
-¡ "
-ct 7,8,1 0 0242
-¢ "
-Po 8,10 0 0243
-£ "
-Cs 7,8 0 0244
-¤ "
-Ye 7,10 0 0245
-¥ "
-bb 3,10 0 0246
-¦ "
-sc 7,10,3 0 0247
-§ "
-ad 5,10 0 0250
-¨ "
-co 12,10 0 0251
-© "
-Of 4,10 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 9,6 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 12,10 0 0256
-® "
-a- 4,9 0 0257
-¯ "
-de 6,10 0 0260
-° "
-+- 8,7 0 0261
-± "
-S2 4,10 0 0262
-² "
-S3 4,10 0 0263
-³ "
-aa 5,11 0 0264
-´ "
-µ 7,7,3 0 0265
-ps 7,10,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 4,10 0 0271
-¹ "
-Om 5,10 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 10,10 0 0274
-¼ "
-12 10,10 0 0275
-½ "
-34 10,10 0 0276
-¾ "
-r? 6,7,3 0 0277
-¿ "
-`A 11,14 0 0300
-À "
-'A 11,14 0 0301
-Á "
-^A 11,14 0 0302
-Â "
-~A 11,14 0 0303
-Ã "
-:A 11,13 0 0304
-Ä "
-oA 11,14 0 0305
-Å "
-AE 13,10 0 0306
-Æ "
-,C 10,10,3 0 0307
-Ç "
-`E 9,14 0 0310
-È "
-'E 9,14 0 0311
-É "
-^E 9,14 0 0312
-Ê "
-:E 9,13 0 0313
-Ë "
-`I 5,14 0 0314
-Ì "
-'I 5,14 0 0315
-Í "
-^I 5,14 0 0316
-Î "
-:I 5,13 0 0317
-Ï "
--D 10,10 0 0320
-Ð "
-~N 11,14 0 0321
-Ñ "
-`O 10,14 0 0322
-Ò "
-'O 10,14 0 0323
-Ó "
-^O 10,14 0 0324
-Ô "
-~O 10,14 0 0325
-Õ "
-:O 10,13 0 0326
-Ö "
-mu 8,7 0 0327
-× "
-/O 10,11,1 0 0330
-Ø "
-`U 10,14 0 0331
-Ù "
-'U 10,14 0 0332
-Ú "
-^U 10,14 0 0333
-Û "
-:U 10,13 0 0334
-Ü "
-'Y 9,14 0 0335
-Ý "
-TP 8,10 0 0336
-Þ "
-ss 7,10 0 0337
-ß "
-`a 7,11 0 0340
-à "
-'a 7,11 0 0341
-á "
-^a 7,11 0 0342
-â "
-~a 7,11 0 0343
-ã "
-:a 7,10 0 0344
-ä "
-oa 7,11 0 0345
-å "
-ae 11,7 0 0346
-æ "
-,c 7,7,3 0 0347
-ç "
-`e 7,11 0 0350
-è "
-'e 7,11 0 0351
-é "
-^e 7,11 0 0352
-ê "
-:e 7,10 0 0353
-ë "
-`i 3,11 0 0354
-ì "
-'i 3,11 0 0355
-í "
-^i 3,11 0 0356
-î "
-:i 3,10 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 7,11 0 0361
-ñ "
-`o 7,11 0 0362
-ò "
-'o 7,11 0 0363
-ó "
-^o 7,11 0 0364
-ô "
-~o 7,11 0 0365
-õ "
-:o 7,10 0 0366
-ö "
-di 8,7 0 0367
-÷ "
-/o 7,8,1 0 0370
-ø "
-`u 7,11 0 0371
-ù "
-'u 7,11 0 0372
-ú "
-^u 7,11 0 0373
-û "
-:u 7,10 0 0374
-ü "
-'y 7,11,3 0 0375
-ý "
-Tp 7,10,3 0 0376
-þ "
-:y 7,10,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/CB b/contrib/groff/font/devX75-12/CB
deleted file mode 100644
index 8b3766c1ebf7..000000000000
--- a/contrib/groff/font/devX75-12/CB
+++ /dev/null
@@ -1,308 +0,0 @@
-name CB
-spacewidth 7
-charset
---- 7,1 0 040
-! 7,9 0 041
-" 7,8 0 042
-dq "
-# 7,8 0 043
-sh "
-$ 7,10,2 0 044
-Do "
-% 7,8 0 045
-& 7,8 0 046
-' 7,8 0 047
-cq "
-( 7,9,2 0 050
-) 7,9,2 0 051
-* 7,9 0 052
-+ 7,6 0 053
-, 7,2,1 0 054
-\- 7,4 0 055
-. 7,2 0 056
-/ 7,8,2 0 057
-sl "
-0 7,9 0 060
-1 7,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 7,6 0 072
-; 7,6,1 0 073
-< 7,7 0 074
-= 7,5 0 075
-eq "
-> 7,7 0 076
-? 7,8 0 077
-@ 7,8 0 0100
-at "
-A 7,8 0 0101
-B 7,8 0 0102
-C 7,8 0 0103
-D 7,8 0 0104
-E 7,8 0 0105
-F 7,8 0 0106
-G 7,8 0 0107
-H 7,8 0 0110
-I 7,8 0 0111
-J 7,8 0 0112
-K 7,8 0 0113
-L 7,8 0 0114
-M 7,8 0 0115
-N 7,8 0 0116
-O 7,8 0 0117
-P 7,8 0 0120
-Q 7,8,2 0 0121
-R 7,8 0 0122
-S 7,8 0 0123
-T 7,8 0 0124
-U 7,8 0 0125
-V 7,8 0 0126
-W 7,8 0 0127
-X 7,8 0 0130
-Y 7,8 0 0131
-Z 7,8 0 0132
-[ 7,9,2 0 0133
-lB "
-\ 7,8,2 0 0134
-rs "
-] 7,9,2 0 0135
-rB "
-^ 7,8 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 7,8 0 0140
-oq "
-a 7,6 0 0141
-b 7,9 0 0142
-c 7,6 0 0143
-d 7,9 0 0144
-e 7,6 0 0145
-f 7,9 0 0146
-g 7,6,3 0 0147
-h 7,9 0 0150
-i 7,9 0 0151
-j 7,9,3 0 0152
-k 7,9 0 0153
-l 7,9 0 0154
-m 7,6 0 0155
-n 7,6 0 0156
-o 7,6 0 0157
-p 7,6,3 0 0160
-q 7,6,3 0 0161
-r 7,6 0 0162
-s 7,6 0 0163
-t 7,8 0 0164
-u 7,6 0 0165
-v 7,6 0 0166
-w 7,6 0 0167
-x 7,6 0 0170
-y 7,6,3 0 0171
-z 7,6 0 0172
-{ 7,9,2 0 0173
-lC "
-| 7,8,2 0 0174
-or "
-ba "
-} 7,9,2 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 7,6,3 0 0241
-¡ "
-ct 7,8,1 0 0242
-¢ "
-Po 7,8 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 7,8 0 0245
-¥ "
-bb 7,8,2 0 0246
-¦ "
-sc 7,9,1 0 0247
-§ "
-ad 7,9 0 0250
-¨ "
-co 7,8 0 0251
-© "
-Of 7,9 0 0252
-ª "
-Fo 7,5 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 7,4 0 0255
-hy "
-­ "
-rg 7,8 0 0256
-® "
-a- 7,8 0 0257
-¯ "
-de 7,8 0 0260
-° "
-+- 7,6 0 0261
-± "
-S2 7,8 0 0262
-² "
-S3 7,8 0 0263
-³ "
-aa 7,9 0 0264
-´ "
-µ 7,6,3 0 0265
-ps 7,9,1 0 0266
-¶ "
-pc 7,5 0 0267
-· "
-ac 7,0,3 0 0270
-¸ "
-S1 7,8 0 0271
-¹ "
-Om 7,9 0 0272
-º "
-Fc 7,5 0 0273
-» "
-14 7,9,1 0 0274
-¼ "
-12 7,9,1 0 0275
-½ "
-34 7,9,1 0 0276
-¾ "
-r? 7,6,3 0 0277
-¿ "
-`A 7,11 0 0300
-À "
-'A 7,11 0 0301
-Á "
-^A 7,11 0 0302
-Â "
-~A 7,11 0 0303
-Ã "
-:A 7,10 0 0304
-Ä "
-oA 7,11 0 0305
-Å "
-AE 7,8 0 0306
-Æ "
-,C 7,8,3 0 0307
-Ç "
-`E 7,11 0 0310
-È "
-'E 7,11 0 0311
-É "
-^E 7,11 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 7,11 0 0314
-Ì "
-'I 7,11 0 0315
-Í "
-^I 7,11 0 0316
-Î "
-:I 7,10 0 0317
-Ï "
--D 7,8 0 0320
-Ð "
-~N 7,11 0 0321
-Ñ "
-`O 7,11 0 0322
-Ò "
-'O 7,11 0 0323
-Ó "
-^O 7,11 0 0324
-Ô "
-~O 7,11 0 0325
-Õ "
-:O 7,10 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 7,8 0 0330
-Ø "
-`U 7,11 0 0331
-Ù "
-'U 7,11 0 0332
-Ú "
-^U 7,11 0 0333
-Û "
-:U 7,10 0 0334
-Ü "
-'Y 7,11 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 7,9 0 0337
-ß "
-`a 7,9 0 0340
-à "
-'a 7,9 0 0341
-á "
-^a 7,9 0 0342
-â "
-~a 7,9 0 0343
-ã "
-:a 7,8 0 0344
-ä "
-oa 7,10 0 0345
-å "
-ae 7,6 0 0346
-æ "
-,c 7,6,3 0 0347
-ç "
-`e 7,9 0 0350
-è "
-'e 7,9 0 0351
-é "
-^e 7,9 0 0352
-ê "
-:e 7,8 0 0353
-ë "
-`i 7,9 0 0354
-ì "
-'i 7,9 0 0355
-í "
-^i 7,9 0 0356
-î "
-:i 7,8 0 0357
-ï "
-Sd 7,9 0 0360
-ð "
-~n 7,9 0 0361
-ñ "
-`o 7,9 0 0362
-ò "
-'o 7,9 0 0363
-ó "
-^o 7,9 0 0364
-ô "
-~o 7,9 0 0365
-õ "
-:o 7,8 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 7,7,1 0 0370
-ø "
-`u 7,9 0 0371
-ù "
-'u 7,9 0 0372
-ú "
-^u 7,9 0 0373
-û "
-:u 7,8 0 0374
-ü "
-'y 7,9,3 0 0375
-ý "
-Tp 7,8,3 0 0376
-þ "
-:y 7,8,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/CBI b/contrib/groff/font/devX75-12/CBI
deleted file mode 100644
index 23df8ea75060..000000000000
--- a/contrib/groff/font/devX75-12/CBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name CBI
-spacewidth 7
-charset
---- 7,1 0 040
-! 7,9 0 041
-" 7,8 0 042
-dq "
-# 7,9 0 043
-sh "
-$ 7,10,2 0 044
-Do "
-% 7,8 0 045
-& 7,8 0 046
-' 7,8 0 047
-cq "
-( 7,9,2 0 050
-) 7,9,2 0 051
-* 7,8 0 052
-+ 7,6 0 053
-, 7,2,1 0 054
-\- 7,4 0 055
-. 7,2 0 056
-/ 7,9,1 0 057
-sl "
-0 7,9 0 060
-1 7,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 7,6 0 072
-; 7,6,1 0 073
-< 7,6 0 074
-= 7,5 0 075
-eq "
-> 7,6 0 076
-? 7,8 0 077
-@ 7,8,1 0 0100
-at "
-A 7,8 0 0101
-B 7,8 0 0102
-C 7,8 0 0103
-D 7,8 0 0104
-E 7,8 0 0105
-F 7,8 0 0106
-G 7,8 0 0107
-H 7,8 0 0110
-I 7,8 0 0111
-J 7,8 0 0112
-K 7,8 0 0113
-L 7,8 0 0114
-M 7,8 0 0115
-N 7,8 0 0116
-O 7,8 0 0117
-P 7,8 0 0120
-Q 7,8,2 0 0121
-R 7,8 0 0122
-S 7,8 0 0123
-T 7,8 0 0124
-U 7,8 0 0125
-V 7,8 0 0126
-W 7,8 0 0127
-X 7,8 0 0130
-Y 7,8 0 0131
-Z 7,8 0 0132
-[ 7,9,2 0 0133
-lB "
-\ 7,9,1 0 0134
-rs "
-] 7,9,2 0 0135
-rB "
-^ 7,8 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 7,8 0 0140
-oq "
-a 7,6 0 0141
-b 7,9 0 0142
-c 7,6 0 0143
-d 7,9 0 0144
-e 7,6 0 0145
-f 7,9 0 0146
-g 7,6,3 0 0147
-h 7,9 0 0150
-i 7,9 0 0151
-j 7,9,3 0 0152
-k 7,9 0 0153
-l 7,9 0 0154
-m 7,6 0 0155
-n 7,6 0 0156
-o 7,6 0 0157
-p 7,6,3 0 0160
-q 7,6,3 0 0161
-r 7,6 0 0162
-s 7,6 0 0163
-t 7,8 0 0164
-u 7,6 0 0165
-v 7,6 0 0166
-w 7,6 0 0167
-x 7,6 0 0170
-y 7,6,3 0 0171
-z 7,6 0 0172
-{ 7,9,2 0 0173
-lC "
-| 7,8,1 0 0174
-or "
-ba "
-} 7,9,2 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 7,6,2 0 0241
-¡ "
-ct 7,8,1 0 0242
-¢ "
-Po 7,8 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 7,8 0 0245
-¥ "
-bb 7,8,1 0 0246
-¦ "
-sc 7,9,1 0 0247
-§ "
-ad 7,9 0 0250
-¨ "
-co 7,8 0 0251
-© "
-Of 7,8 0 0252
-ª "
-Fo 7,5 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 7,4 0 0255
-hy "
-­ "
-rg 7,8 0 0256
-® "
-a- 7,8 0 0257
-¯ "
-de 7,8 0 0260
-° "
-+- 7,6 0 0261
-± "
-S2 7,8 0 0262
-² "
-S3 7,8 0 0263
-³ "
-aa 7,9 0 0264
-´ "
-µ 7,6,3 0 0265
-ps 7,9,1 0 0266
-¶ "
-pc 7,5 0 0267
-· "
-ac 7,0,3 0 0270
-¸ "
-S1 7,8 0 0271
-¹ "
-Om 7,8 0 0272
-º "
-Fc 7,5 0 0273
-» "
-14 7,9 0 0274
-¼ "
-12 7,9 0 0275
-½ "
-34 7,9 0 0276
-¾ "
-r? 7,6,2 0 0277
-¿ "
-`A 7,11 0 0300
-À "
-'A 7,11 0 0301
-Á "
-^A 7,11 0 0302
-Â "
-~A 7,11 0 0303
-Ã "
-:A 7,10 0 0304
-Ä "
-oA 7,11 0 0305
-Å "
-AE 7,8 0 0306
-Æ "
-,C 7,8,3 0 0307
-Ç "
-`E 7,11 0 0310
-È "
-'E 7,11 0 0311
-É "
-^E 7,11 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 7,11 0 0314
-Ì "
-'I 7,11 0 0315
-Í "
-^I 7,11 0 0316
-Î "
-:I 7,10 0 0317
-Ï "
--D 7,8 0 0320
-Ð "
-~N 7,11 0 0321
-Ñ "
-`O 7,11 0 0322
-Ò "
-'O 7,11 0 0323
-Ó "
-^O 7,11 0 0324
-Ô "
-~O 7,11 0 0325
-Õ "
-:O 7,10 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 7,8 0 0330
-Ø "
-`U 7,11 0 0331
-Ù "
-'U 7,11 0 0332
-Ú "
-^U 7,11 0 0333
-Û "
-:U 7,10 0 0334
-Ü "
-'Y 7,11 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 7,8 0 0337
-ß "
-`a 7,9 0 0340
-à "
-'a 7,9 0 0341
-á "
-^a 7,9 0 0342
-â "
-~a 7,9 0 0343
-ã "
-:a 7,8 0 0344
-ä "
-oa 7,10 0 0345
-å "
-ae 7,6 0 0346
-æ "
-,c 7,6,3 0 0347
-ç "
-`e 7,9 0 0350
-è "
-'e 7,9 0 0351
-é "
-^e 7,9 0 0352
-ê "
-:e 7,8 0 0353
-ë "
-`i 7,9 0 0354
-ì "
-'i 7,9 0 0355
-í "
-^i 7,9 0 0356
-î "
-:i 7,8 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 7,9 0 0361
-ñ "
-`o 7,9 0 0362
-ò "
-'o 7,9 0 0363
-ó "
-^o 7,9 0 0364
-ô "
-~o 7,9 0 0365
-õ "
-:o 7,8 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 7,7,1 0 0370
-ø "
-`u 7,9 0 0371
-ù "
-'u 7,9 0 0372
-ú "
-^u 7,9 0 0373
-û "
-:u 7,8 0 0374
-ü "
-'y 7,9,3 0 0375
-ý "
-Tp 7,8,3 0 0376
-þ "
-:y 7,8,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/CI b/contrib/groff/font/devX75-12/CI
deleted file mode 100644
index 04f4c46d4592..000000000000
--- a/contrib/groff/font/devX75-12/CI
+++ /dev/null
@@ -1,308 +0,0 @@
-name CI
-spacewidth 7
-charset
---- 7,1 0 040
-! 7,8 0 041
-" 7,8 0 042
-dq "
-# 7,8 0 043
-sh "
-$ 7,10,1 0 044
-Do "
-% 7,8 0 045
-& 7,8 0 046
-' 7,8 0 047
-cq "
-( 7,9,2 0 050
-) 7,9,2 0 051
-* 7,8 0 052
-+ 7,6 0 053
-, 7,2,1 0 054
-\- 7,4 0 055
-. 7,1 0 056
-/ 7,8,1 0 057
-sl "
-0 7,9 0 060
-1 7,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 7,5 0 072
-; 7,5,1 0 073
-< 7,7 0 074
-= 7,5 0 075
-eq "
-> 7,7 0 076
-? 7,8 0 077
-@ 7,8 0 0100
-at "
-A 7,8 0 0101
-B 7,8 0 0102
-C 7,8 0 0103
-D 7,8 0 0104
-E 7,8 0 0105
-F 7,8 0 0106
-G 7,8 0 0107
-H 7,8 0 0110
-I 7,8 0 0111
-J 7,8 0 0112
-K 7,8 0 0113
-L 7,8 0 0114
-M 7,8 0 0115
-N 7,8 0 0116
-O 7,8 0 0117
-P 7,8 0 0120
-Q 7,8,2 0 0121
-R 7,8 0 0122
-S 7,8 0 0123
-T 7,8 0 0124
-U 7,8 0 0125
-V 7,8 0 0126
-W 7,8 0 0127
-X 7,8 0 0130
-Y 7,8 0 0131
-Z 7,8 0 0132
-[ 7,9,2 0 0133
-lB "
-\ 7,8,1 0 0134
-rs "
-] 7,9,2 0 0135
-rB "
-^ 7,8 0 0136
-a^ "
-ha "
-_ 7,0,3 0 0137
-` 7,8 0 0140
-oq "
-a 7,6 0 0141
-b 7,9 0 0142
-c 7,6 0 0143
-d 7,9 0 0144
-e 7,6 0 0145
-f 7,9 0 0146
-g 7,6,3 0 0147
-h 7,9 0 0150
-i 7,9 0 0151
-j 7,9,3 0 0152
-k 7,9 0 0153
-l 7,9 0 0154
-m 7,6 0 0155
-n 7,6 0 0156
-o 7,6 0 0157
-p 7,6,3 0 0160
-q 7,6,3 0 0161
-r 7,6 0 0162
-s 7,6 0 0163
-t 7,8 0 0164
-u 7,6 0 0165
-v 7,6 0 0166
-w 7,6 0 0167
-x 7,6 0 0170
-y 7,6,3 0 0171
-z 7,6 0 0172
-{ 7,9,2 0 0173
-lC "
-| 7,8,1 0 0174
-or "
-ba "
-} 7,9,2 0 0175
-rC "
-~ 7,4 0 0176
-a~ "
-ap "
-ti "
-r! 7,6,3 0 0241
-¡ "
-ct 7,8,1 0 0242
-¢ "
-Po 7,8 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 7,8 0 0245
-¥ "
-bb 7,8,2 0 0246
-¦ "
-sc 7,9,1 0 0247
-§ "
-ad 7,8 0 0250
-¨ "
-co 7,8 0 0251
-© "
-Of 7,8 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 7,4 0 0255
-hy "
-­ "
-rg 7,8 0 0256
-® "
-a- 7,8 0 0257
-¯ "
-de 7,8 0 0260
-° "
-+- 7,6 0 0261
-± "
-S2 7,8 0 0262
-² "
-S3 7,8 0 0263
-³ "
-aa 7,9 0 0264
-´ "
-µ 7,6,3 0 0265
-ps 7,9,1 0 0266
-¶ "
-pc 7,4 0 0267
-· "
-ac 7,0,3 0 0270
-¸ "
-S1 7,8 0 0271
-¹ "
-Om 7,8 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 7,9,1 0 0274
-¼ "
-12 7,9,1 0 0275
-½ "
-34 7,9,1 0 0276
-¾ "
-r? 7,6,2 0 0277
-¿ "
-`A 7,11 0 0300
-À "
-'A 7,11 0 0301
-Á "
-^A 7,11 0 0302
-Â "
-~A 7,11 0 0303
-Ã "
-:A 7,10 0 0304
-Ä "
-oA 7,11 0 0305
-Å "
-AE 7,8 0 0306
-Æ "
-,C 7,8,3 0 0307
-Ç "
-`E 7,11 0 0310
-È "
-'E 7,11 0 0311
-É "
-^E 7,11 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 7,11 0 0314
-Ì "
-'I 7,11 0 0315
-Í "
-^I 7,11 0 0316
-Î "
-:I 7,10 0 0317
-Ï "
--D 7,8 0 0320
-Ð "
-~N 7,11 0 0321
-Ñ "
-`O 7,11 0 0322
-Ò "
-'O 7,11 0 0323
-Ó "
-^O 7,11 0 0324
-Ô "
-~O 7,11 0 0325
-Õ "
-:O 7,10 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 7,8 0 0330
-Ø "
-`U 7,11 0 0331
-Ù "
-'U 7,11 0 0332
-Ú "
-^U 7,11 0 0333
-Û "
-:U 7,10 0 0334
-Ü "
-'Y 7,11 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 7,9 0 0337
-ß "
-`a 7,9 0 0340
-à "
-'a 7,9 0 0341
-á "
-^a 7,9 0 0342
-â "
-~a 7,9 0 0343
-ã "
-:a 7,8 0 0344
-ä "
-oa 7,10 0 0345
-å "
-ae 7,6 0 0346
-æ "
-,c 7,6,3 0 0347
-ç "
-`e 7,9 0 0350
-è "
-'e 7,9 0 0351
-é "
-^e 7,9 0 0352
-ê "
-:e 7,8 0 0353
-ë "
-`i 7,9 0 0354
-ì "
-'i 7,9 0 0355
-í "
-^i 7,9 0 0356
-î "
-:i 7,8 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 7,9 0 0361
-ñ "
-`o 7,9 0 0362
-ò "
-'o 7,9 0 0363
-ó "
-^o 7,9 0 0364
-ô "
-~o 7,9 0 0365
-õ "
-:o 7,8 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 7,7,1 0 0370
-ø "
-`u 7,9 0 0371
-ù "
-'u 7,9 0 0372
-ú "
-^u 7,9 0 0373
-û "
-:u 7,8 0 0374
-ü "
-'y 7,9,3 0 0375
-ý "
-Tp 7,9,3 0 0376
-þ "
-:y 7,8,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/CR b/contrib/groff/font/devX75-12/CR
deleted file mode 100644
index 957ce6a19e3f..000000000000
--- a/contrib/groff/font/devX75-12/CR
+++ /dev/null
@@ -1,308 +0,0 @@
-name CR
-spacewidth 7
-charset
---- 7,1 0 040
-! 7,9 0 041
-" 7,8 0 042
-dq "
-# 7,8 0 043
-sh "
-$ 7,9,1 0 044
-Do "
-% 7,8 0 045
-& 7,8 0 046
-' 7,8 0 047
-cq "
-( 7,9,2 0 050
-) 7,9,2 0 051
-* 7,8 0 052
-+ 7,6 0 053
-, 7,2,1 0 054
-\- 7,4 0 055
-. 7,1 0 056
-/ 7,9,1 0 057
-sl "
-0 7,9 0 060
-1 7,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 7,5 0 072
-; 7,5,1 0 073
-< 7,7 0 074
-= 7,5 0 075
-eq "
-> 7,7 0 076
-? 7,8 0 077
-@ 7,8 0 0100
-at "
-A 7,8 0 0101
-B 7,8 0 0102
-C 7,8 0 0103
-D 7,8 0 0104
-E 7,8 0 0105
-F 7,8 0 0106
-G 7,8 0 0107
-H 7,8 0 0110
-I 7,8 0 0111
-J 7,8 0 0112
-K 7,8 0 0113
-L 7,8 0 0114
-M 7,8 0 0115
-N 7,8 0 0116
-O 7,8 0 0117
-P 7,8 0 0120
-Q 7,8,1 0 0121
-R 7,8 0 0122
-S 7,8 0 0123
-T 7,8 0 0124
-U 7,8 0 0125
-V 7,8 0 0126
-W 7,8 0 0127
-X 7,8 0 0130
-Y 7,8 0 0131
-Z 7,8 0 0132
-[ 7,9,2 0 0133
-lB "
-\ 7,9,1 0 0134
-rs "
-] 7,9,2 0 0135
-rB "
-^ 7,8 0 0136
-a^ "
-ha "
-_ 7,0,3 0 0137
-` 7,8 0 0140
-oq "
-a 7,6 0 0141
-b 7,9 0 0142
-c 7,6 0 0143
-d 7,9 0 0144
-e 7,6 0 0145
-f 7,9 0 0146
-g 7,6,3 0 0147
-h 7,9 0 0150
-i 7,9 0 0151
-j 7,9,3 0 0152
-k 7,9 0 0153
-l 7,9 0 0154
-m 7,6 0 0155
-n 7,6 0 0156
-o 7,6 0 0157
-p 7,6,3 0 0160
-q 7,6,3 0 0161
-r 7,6 0 0162
-s 7,6 0 0163
-t 7,8 0 0164
-u 7,6 0 0165
-v 7,6 0 0166
-w 7,6 0 0167
-x 7,6 0 0170
-y 7,6,3 0 0171
-z 7,6 0 0172
-{ 7,8,2 0 0173
-lC "
-| 7,8,2 0 0174
-or "
-ba "
-} 7,8,2 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 7,6,3 0 0241
-¡ "
-ct 7,8,1 0 0242
-¢ "
-Po 7,8 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 7,8 0 0245
-¥ "
-bb 7,8,2 0 0246
-¦ "
-sc 7,9,1 0 0247
-§ "
-ad 7,8 0 0250
-¨ "
-co 7,8 0 0251
-© "
-Of 7,8 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 7,4 0 0255
-hy "
-­ "
-rg 7,8 0 0256
-® "
-a- 7,8 0 0257
-¯ "
-de 7,8 0 0260
-° "
-+- 7,6 0 0261
-± "
-S2 7,8 0 0262
-² "
-S3 7,8 0 0263
-³ "
-aa 7,9 0 0264
-´ "
-µ 7,6,3 0 0265
-ps 7,9,1 0 0266
-¶ "
-pc 7,4 0 0267
-· "
-ac 7,0,3 0 0270
-¸ "
-S1 7,8 0 0271
-¹ "
-Om 7,8 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 7,9,1 0 0274
-¼ "
-12 7,9,1 0 0275
-½ "
-34 7,9,1 0 0276
-¾ "
-r? 7,6,2 0 0277
-¿ "
-`A 7,11 0 0300
-À "
-'A 7,11 0 0301
-Á "
-^A 7,11 0 0302
-Â "
-~A 7,11 0 0303
-Ã "
-:A 7,10 0 0304
-Ä "
-oA 7,11 0 0305
-Å "
-AE 7,8 0 0306
-Æ "
-,C 7,8,3 0 0307
-Ç "
-`E 7,11 0 0310
-È "
-'E 7,11 0 0311
-É "
-^E 7,11 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 7,11 0 0314
-Ì "
-'I 7,11 0 0315
-Í "
-^I 7,11 0 0316
-Î "
-:I 7,10 0 0317
-Ï "
--D 7,8 0 0320
-Ð "
-~N 7,11 0 0321
-Ñ "
-`O 7,11 0 0322
-Ò "
-'O 7,11 0 0323
-Ó "
-^O 7,11 0 0324
-Ô "
-~O 7,11 0 0325
-Õ "
-:O 7,10 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 7,9,1 0 0330
-Ø "
-`U 7,11 0 0331
-Ù "
-'U 7,11 0 0332
-Ú "
-^U 7,11 0 0333
-Û "
-:U 7,10 0 0334
-Ü "
-'Y 7,11 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 7,9 0 0337
-ß "
-`a 7,9 0 0340
-à "
-'a 7,9 0 0341
-á "
-^a 7,9 0 0342
-â "
-~a 7,9 0 0343
-ã "
-:a 7,8 0 0344
-ä "
-oa 7,9 0 0345
-å "
-ae 7,6 0 0346
-æ "
-,c 7,6,3 0 0347
-ç "
-`e 7,9 0 0350
-è "
-'e 7,9 0 0351
-é "
-^e 7,9 0 0352
-ê "
-:e 7,8 0 0353
-ë "
-`i 7,9 0 0354
-ì "
-'i 7,9 0 0355
-í "
-^i 7,9 0 0356
-î "
-:i 7,8 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 7,9 0 0361
-ñ "
-`o 7,9 0 0362
-ò "
-'o 7,9 0 0363
-ó "
-^o 7,9 0 0364
-ô "
-~o 7,9 0 0365
-õ "
-:o 7,8 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 7,7,1 0 0370
-ø "
-`u 7,9 0 0371
-ù "
-'u 7,9 0 0372
-ú "
-^u 7,9 0 0373
-û "
-:u 7,8 0 0374
-ü "
-'y 7,9,3 0 0375
-ý "
-Tp 7,9,3 0 0376
-þ "
-:y 7,8,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/DESC b/contrib/groff/font/devX75-12/DESC
deleted file mode 100644
index 4793e599e0a6..000000000000
--- a/contrib/groff/font/devX75-12/DESC
+++ /dev/null
@@ -1,9 +0,0 @@
-styles R I B BI
-fonts 6 0 0 0 0 0 S
-sizes 8 10 12 14 18 24 0
-res 75
-X11
-hor 1
-vert 1
-unitwidth 12
-postpro gxditview
diff --git a/contrib/groff/font/devX75-12/HB b/contrib/groff/font/devX75-12/HB
deleted file mode 100644
index f9ccd5f716bd..000000000000
--- a/contrib/groff/font/devX75-12/HB
+++ /dev/null
@@ -1,308 +0,0 @@
-name HB
-spacewidth 4
-charset
---- 4,1 0 040
-! 4,9 0 041
-" 5,9 0 042
-dq "
-# 8,8 0 043
-sh "
-$ 7,9,2 0 044
-Do "
-% 12,9 0 045
-& 9,9 0 046
-' 4,9 0 047
-cq "
-( 6,9,3 0 050
-) 6,9,3 0 051
-* 6,9 0 052
-+ 7,6 0 053
-, 4,2,2 0 054
-\- 8,4 0 055
-. 4,2 0 056
-/ 4,9 0 057
-sl "
-0 7,9 0 060
-1 7,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 4,7 0 072
-; 4,7,2 0 073
-< 7,6 0 074
-= 7,5 0 075
-eq "
-> 7,6 0 076
-? 8,9 0 077
-@ 12,9,1 0 0100
-at "
-A 8,9 0 0101
-B 9,9 0 0102
-C 8,9 0 0103
-D 9,9 0 0104
-E 8,9 0 0105
-F 7,9 0 0106
-G 10,9 0 0107
-H 9,9 0 0110
-I 4,9 0 0111
-J 7,9 0 0112
-K 9,9 0 0113
-L 7,9 0 0114
-M 11,9 0 0115
-N 9,9 0 0116
-O 10,9 0 0117
-P 8,9 0 0120
-Q 10,9 0 0121
-R 9,9 0 0122
-S 9,9 0 0123
-T 8,9 0 0124
-U 9,9 0 0125
-V 8,9 0 0126
-W 10,9 0 0127
-X 8,9 0 0130
-Y 8,9 0 0131
-Z 7,9 0 0132
-[ 4,9,3 0 0133
-lB "
-\ 4,9 0 0134
-rs "
-] 4,9,3 0 0135
-rB "
-^ 7,9 0 0136
-a^ "
-ha "
-_ 7,0,3 0 0137
-` 4,9 0 0140
-oq "
-a 7,7 0 0141
-b 7,9 0 0142
-c 7,7 0 0143
-d 7,9 0 0144
-e 7,7 0 0145
-f 5,9 0 0146
-g 7,7,3 0 0147
-h 7,9 0 0150
-i 3,9 0 0151
-j 3,9,3 0 0152
-k 7,9 0 0153
-l 3,9 0 0154
-m 11,7 0 0155
-n 7,7 0 0156
-o 7,7 0 0157
-p 7,7,3 0 0160
-q 7,7,3 0 0161
-r 5,7 0 0162
-s 7,7 0 0163
-t 5,9 0 0164
-u 7,7 0 0165
-v 8,7 0 0166
-w 11,7 0 0167
-x 7,7 0 0170
-y 8,7,3 0 0171
-z 6,7 0 0172
-{ 5,9,3 0 0173
-lC "
-| 4,9,3 0 0174
-or "
-ba "
-} 5,9,3 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,7,3 0 0241
-¡ "
-ct 7,8,1 0 0242
-¢ "
-Po 7,9 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 7,9 0 0245
-¥ "
-bb 4,9,2 0 0246
-¦ "
-sc 7,9,3 0 0247
-§ "
-ad 5,9 0 0250
-¨ "
-co 11,9 0 0251
-© "
-Of 6,9 0 0252
-ª "
-Fo 8,6 0 0253
-« "
-no 8,6 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 4,9 0 0257
-¯ "
-de 5,8 0 0260
-° "
-+- 7,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 4,10 0 0264
-´ "
-µ 7,7,3 0 0265
-ps 7,9,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 4,1,3 0 0270
-¸ "
-S1 4,9 0 0271
-¹ "
-Om 6,9 0 0272
-º "
-Fc 8,6 0 0273
-» "
-14 10,9 0 0274
-¼ "
-12 10,9 0 0275
-½ "
-34 10,9 0 0276
-¾ "
-r? 8,7,3 0 0277
-¿ "
-`A 8,12 0 0300
-À "
-'A 8,12 0 0301
-Á "
-^A 8,12 0 0302
-Â "
-~A 8,12 0 0303
-Ã "
-:A 8,11 0 0304
-Ä "
-oA 8,12 0 0305
-Å "
-AE 13,9 0 0306
-Æ "
-,C 8,9,3 0 0307
-Ç "
-`E 8,12 0 0310
-È "
-'E 8,12 0 0311
-É "
-^E 8,12 0 0312
-Ê "
-:E 8,11 0 0313
-Ë "
-`I 4,12 0 0314
-Ì "
-'I 4,12 0 0315
-Í "
-^I 4,12 0 0316
-Î "
-:I 4,11 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,12 0 0321
-Ñ "
-`O 10,12 0 0322
-Ò "
-'O 10,12 0 0323
-Ó "
-^O 10,12 0 0324
-Ô "
-~O 10,12 0 0325
-Õ "
-:O 10,11 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 10,9,1 0 0330
-Ø "
-`U 9,12 0 0331
-Ù "
-'U 9,12 0 0332
-Ú "
-^U 9,12 0 0333
-Û "
-:U 9,11 0 0334
-Ü "
-'Y 8,12 0 0335
-Ý "
-TP 8,9 0 0336
-Þ "
-ss 8,9 0 0337
-ß "
-`a 7,10 0 0340
-à "
-'a 7,10 0 0341
-á "
-^a 7,10 0 0342
-â "
-~a 7,10 0 0343
-ã "
-:a 7,9 0 0344
-ä "
-oa 7,11 0 0345
-å "
-ae 11,7 0 0346
-æ "
-,c 7,7,3 0 0347
-ç "
-`e 7,10 0 0350
-è "
-'e 7,10 0 0351
-é "
-^e 7,10 0 0352
-ê "
-:e 7,9 0 0353
-ë "
-`i 3,10 0 0354
-ì "
-'i 3,10 0 0355
-í "
-^i 3,10 0 0356
-î "
-:i 3,9 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 7,10 0 0361
-ñ "
-`o 7,10 0 0362
-ò "
-'o 7,10 0 0363
-ó "
-^o 7,10 0 0364
-ô "
-~o 7,10 0 0365
-õ "
-:o 7,9 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 7,7 0 0370
-ø "
-`u 7,10 0 0371
-ù "
-'u 7,10 0 0372
-ú "
-^u 7,10 0 0373
-û "
-:u 7,9 0 0374
-ü "
-'y 8,10,3 0 0375
-ý "
-Tp 7,9,3 0 0376
-þ "
-:y 8,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/HBI b/contrib/groff/font/devX75-12/HBI
deleted file mode 100644
index 21d43555f62f..000000000000
--- a/contrib/groff/font/devX75-12/HBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name HBI
-spacewidth 4
-charset
---- 4,1 0 040
-! 4,9 0 041
-" 6,9 0 042
-dq "
-# 7,8 0 043
-sh "
-$ 7,9,1 0 044
-Do "
-% 13,9 0 045
-& 9,9 0 046
-' 4,9 0 047
-cq "
-( 5,9,3 0 050
-) 5,9,3 0 051
-* 6,9 0 052
-+ 8,6 0 053
-, 3,2,2 0 054
-\- 8,4 0 055
-. 3,2 0 056
-/ 5,9 0 057
-sl "
-0 7,9 0 060
-1 7,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 4,7 0 072
-; 4,7,2 0 073
-< 7,6 0 074
-= 7,5 0 075
-eq "
-> 7,6 0 076
-? 8,9 0 077
-@ 11,9,1 0 0100
-at "
-A 8,9 0 0101
-B 9,9 0 0102
-C 8,9 0 0103
-D 9,9 0 0104
-E 8,9 0 0105
-F 7,9 0 0106
-G 9,9 0 0107
-H 10,9 0 0110
-I 5,9 0 0111
-J 7,9 0 0112
-K 9,9 0 0113
-L 7,9 0 0114
-M 12,9 0 0115
-N 10,9 0 0116
-O 9,9 0 0117
-P 8,9 0 0120
-Q 9,9 0 0121
-R 9,9 0 0122
-S 8,9 0 0123
-T 7,9 0 0124
-U 8,9 0 0125
-V 9,9 0 0126
-W 10,9 0 0127
-X 9,9 0 0130
-Y 7,9 0 0131
-Z 7,9 0 0132
-[ 4,9,3 0 0133
-lB "
-\ 5,9 0 0134
-rs "
-] 4,9,3 0 0135
-rB "
-^ 6,9 0 0136
-a^ "
-ha "
-_ 7,0,3 0 0137
-` 4,9 0 0140
-oq "
-a 6,7 0 0141
-b 7,9 0 0142
-c 7,7 0 0143
-d 7,9 0 0144
-e 7,7 0 0145
-f 5,9 0 0146
-g 7,7,3 0 0147
-h 7,9 0 0150
-i 3,9 0 0151
-j 3,9,3 0 0152
-k 7,9 0 0153
-l 3,9 0 0154
-m 11,7 0 0155
-n 7,7 0 0156
-o 7,7 0 0157
-p 7,7,3 0 0160
-q 7,7,3 0 0161
-r 5,7 0 0162
-s 7,7 0 0163
-t 5,9 0 0164
-u 7,7 0 0165
-v 7,7 0 0166
-w 10,7 0 0167
-x 7,7 0 0170
-y 7,7,3 0 0171
-z 6,7 0 0172
-{ 5,9,3 0 0173
-lC "
-| 4,9,3 0 0174
-or "
-ba "
-} 5,9,3 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,7,3 0 0241
-¡ "
-ct 7,8,1 0 0242
-¢ "
-Po 7,9 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 7,9 0 0245
-¥ "
-bb 4,9,2 0 0246
-¦ "
-sc 7,9,3 0 0247
-§ "
-ad 5,9 0 0250
-¨ "
-co 11,9 0 0251
-© "
-Of 6,9 0 0252
-ª "
-Fo 10,6 0 0253
-« "
-no 8,5 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 4,9 0 0257
-¯ "
-de 5,8 0 0260
-° "
-+- 8,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 4,9 0 0264
-´ "
-µ 7,7,3 0 0265
-ps 7,9,3 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 4,1,3 0 0270
-¸ "
-S1 4,9 0 0271
-¹ "
-Om 6,9 0 0272
-º "
-Fc 10,6 0 0273
-» "
-14 10,9 0 0274
-¼ "
-12 10,9 0 0275
-½ "
-34 10,9 0 0276
-¾ "
-r? 7,7,2 0 0277
-¿ "
-`A 8,12 0 0300
-À "
-'A 8,12 0 0301
-Á "
-^A 8,12 0 0302
-Â "
-~A 8,12 0 0303
-Ã "
-:A 8,11 0 0304
-Ä "
-oA 8,12 0 0305
-Å "
-AE 11,9 0 0306
-Æ "
-,C 8,9,3 0 0307
-Ç "
-`E 8,12 0 0310
-È "
-'E 8,12 0 0311
-É "
-^E 8,12 0 0312
-Ê "
-:E 8,11 0 0313
-Ë "
-`I 5,12 0 0314
-Ì "
-'I 5,12 0 0315
-Í "
-^I 5,12 0 0316
-Î "
-:I 5,11 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 10,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,11 0 0326
-Ö "
-mu 8,6 0 0327
-× "
-/O 9,9 0 0330
-Ø "
-`U 8,12 0 0331
-Ù "
-'U 8,12 0 0332
-Ú "
-^U 8,12 0 0333
-Û "
-:U 8,11 0 0334
-Ü "
-'Y 7,12 0 0335
-Ý "
-TP 8,9 0 0336
-Þ "
-ss 7,9 0 0337
-ß "
-`a 6,10 0 0340
-à "
-'a 6,10 0 0341
-á "
-^a 6,10 0 0342
-â "
-~a 6,10 0 0343
-ã "
-:a 6,9 0 0344
-ä "
-oa 6,10 0 0345
-å "
-ae 10,7 0 0346
-æ "
-,c 7,7,3 0 0347
-ç "
-`e 7,10 0 0350
-è "
-'e 7,10 0 0351
-é "
-^e 7,10 0 0352
-ê "
-:e 7,9 0 0353
-ë "
-`i 3,10 0 0354
-ì "
-'i 3,10 0 0355
-í "
-^i 3,10 0 0356
-î "
-:i 3,9 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 7,10 0 0361
-ñ "
-`o 7,10 0 0362
-ò "
-'o 7,10 0 0363
-ó "
-^o 7,10 0 0364
-ô "
-~o 7,10 0 0365
-õ "
-:o 7,9 0 0366
-ö "
-di 8,6 0 0367
-÷ "
-/o 7,8 0 0370
-ø "
-`u 7,10 0 0371
-ù "
-'u 7,10 0 0372
-ú "
-^u 7,10 0 0373
-û "
-:u 7,9 0 0374
-ü "
-'y 7,10,3 0 0375
-ý "
-Tp 7,9,3 0 0376
-þ "
-:y 7,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/HI b/contrib/groff/font/devX75-12/HI
deleted file mode 100644
index 6051dc703593..000000000000
--- a/contrib/groff/font/devX75-12/HI
+++ /dev/null
@@ -1,308 +0,0 @@
-name HI
-spacewidth 4
-charset
---- 4,1 0 040
-! 3,9 0 041
-" 5,9 0 042
-dq "
-# 7,8 0 043
-sh "
-$ 7,9,1 0 044
-Do "
-% 11,9 0 045
-& 9,9 0 046
-' 3,9 0 047
-cq "
-( 4,9,3 0 050
-) 4,9,3 0 051
-* 5,9 0 052
-+ 7,6 0 053
-, 3,1,2 0 054
-\- 8,4 0 055
-. 3,1 0 056
-/ 4,9 0 057
-sl "
-0 7,9 0 060
-1 7,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 3,6 0 072
-; 3,6,2 0 073
-< 8,6 0 074
-= 7,5 0 075
-eq "
-> 8,6 0 076
-? 7,9 0 077
-@ 12,9,1 0 0100
-at "
-A 9,9 0 0101
-B 8,9 0 0102
-C 8,9 0 0103
-D 9,9 0 0104
-E 8,9 0 0105
-F 8,9 0 0106
-G 8,9 0 0107
-H 10,9 0 0110
-I 4,9 0 0111
-J 8,9 0 0112
-K 8,9 0 0113
-L 7,9 0 0114
-M 12,9 0 0115
-N 10,9 0 0116
-O 9,9 0 0117
-P 8,9 0 0120
-Q 9,9 0 0121
-R 8,9 0 0122
-S 8,9 0 0123
-T 7,9 0 0124
-U 9,9 0 0125
-V 8,9 0 0126
-W 11,9 0 0127
-X 9,9 0 0130
-Y 8,9 0 0131
-Z 9,9 0 0132
-[ 4,9,3 0 0133
-lB "
-\ 4,9 0 0134
-rs "
-] 4,9,3 0 0135
-rB "
-^ 6,8 0 0136
-a^ "
-ha "
-_ 7,0,3 0 0137
-` 3,9 0 0140
-oq "
-a 7,7 0 0141
-b 7,9 0 0142
-c 6,7 0 0143
-d 7,9 0 0144
-e 6,7 0 0145
-f 3,9 0 0146
-g 7,7,3 0 0147
-h 7,9 0 0150
-i 3,9 0 0151
-j 3,9,3 0 0152
-k 6,9 0 0153
-l 3,9 0 0154
-m 9,7 0 0155
-n 7,7 0 0156
-o 7,7 0 0157
-p 7,7,3 0 0160
-q 7,7,3 0 0161
-r 4,7 0 0162
-s 6,7 0 0163
-t 4,9 0 0164
-u 7,7 0 0165
-v 6,7 0 0166
-w 9,7 0 0167
-x 6,7 0 0170
-y 6,7,3 0 0171
-z 6,7 0 0172
-{ 5,9,3 0 0173
-lC "
-| 4,9,3 0 0174
-or "
-ba "
-} 5,9,3 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,3 0 0241
-¡ "
-ct 8,8,1 0 0242
-¢ "
-Po 8,9 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 7,9 0 0245
-¥ "
-bb 4,9,2 0 0246
-¦ "
-sc 7,9,3 0 0247
-§ "
-ad 3,9 0 0250
-¨ "
-co 11,9 0 0251
-© "
-Of 5,9 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 8,6 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 4,9 0 0257
-¯ "
-de 5,8 0 0260
-° "
-+- 7,7 0 0261
-± "
-S2 4,8 0 0262
-² "
-S3 4,8 0 0263
-³ "
-aa 2,10 0 0264
-´ "
-µ 7,7,3 0 0265
-ps 8,9,3 0 0266
-¶ "
-pc 3,4 0 0267
-· "
-ac 3,1,3 0 0270
-¸ "
-S1 4,8 0 0271
-¹ "
-Om 5,9 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 10,9 0 0274
-¼ "
-12 10,9 0 0275
-½ "
-34 10,9 0 0276
-¾ "
-r? 7,6,3 0 0277
-¿ "
-`A 9,12 0 0300
-À "
-'A 9,12 0 0301
-Á "
-^A 9,12 0 0302
-Â "
-~A 9,12 0 0303
-Ã "
-:A 9,11 0 0304
-Ä "
-oA 9,12 0 0305
-Å "
-AE 11,9 0 0306
-Æ "
-,C 8,9,3 0 0307
-Ç "
-`E 8,12 0 0310
-È "
-'E 8,12 0 0311
-É "
-^E 8,12 0 0312
-Ê "
-:E 8,11 0 0313
-Ë "
-`I 4,12 0 0314
-Ì "
-'I 4,12 0 0315
-Í "
-^I 4,12 0 0316
-Î "
-:I 4,11 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 10,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,11 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 10,9 0 0330
-Ø "
-`U 9,12 0 0331
-Ù "
-'U 9,12 0 0332
-Ú "
-^U 9,12 0 0333
-Û "
-:U 9,11 0 0334
-Ü "
-'Y 8,12 0 0335
-Ý "
-TP 8,9 0 0336
-Þ "
-ss 7,9 0 0337
-ß "
-`a 7,10 0 0340
-à "
-'a 7,10 0 0341
-á "
-^a 7,10 0 0342
-â "
-~a 7,10 0 0343
-ã "
-:a 7,9 0 0344
-ä "
-oa 7,10 0 0345
-å "
-ae 11,7 0 0346
-æ "
-,c 6,7,3 0 0347
-ç "
-`e 6,10 0 0350
-è "
-'e 6,10 0 0351
-é "
-^e 6,10 0 0352
-ê "
-:e 6,9 0 0353
-ë "
-`i 3,10 0 0354
-ì "
-'i 3,10 0 0355
-í "
-^i 3,10 0 0356
-î "
-:i 3,9 0 0357
-ï "
-Sd 7,11 0 0360
-ð "
-~n 7,10 0 0361
-ñ "
-`o 7,10 0 0362
-ò "
-'o 7,10 0 0363
-ó "
-^o 7,10 0 0364
-ô "
-~o 7,10 0 0365
-õ "
-:o 7,9 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 7,7 0 0370
-ø "
-`u 7,10 0 0371
-ù "
-'u 7,10 0 0372
-ú "
-^u 7,10 0 0373
-û "
-:u 7,9 0 0374
-ü "
-'y 6,10,3 0 0375
-ý "
-Tp 7,9,3 0 0376
-þ "
-:y 7,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/HR b/contrib/groff/font/devX75-12/HR
deleted file mode 100644
index f78bed5e9b92..000000000000
--- a/contrib/groff/font/devX75-12/HR
+++ /dev/null
@@ -1,308 +0,0 @@
-name HR
-spacewidth 4
-charset
---- 4,1 0 040
-! 3,9 0 041
-" 5,9 0 042
-dq "
-# 7,8 0 043
-sh "
-$ 6,9,2 0 044
-Do "
-% 11,9 0 045
-& 9,9 0 046
-' 3,9 0 047
-cq "
-( 4,9,3 0 050
-) 4,9,3 0 051
-* 5,9 0 052
-+ 7,6 0 053
-, 4,1,2 0 054
-\- 8,4 0 055
-. 3,1 0 056
-/ 4,9 0 057
-sl "
-0 7,9 0 060
-1 7,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 3,6 0 072
-; 3,6,2 0 073
-< 7,6 0 074
-= 7,5 0 075
-eq "
-> 7,6 0 076
-? 7,9 0 077
-@ 12,9,1 0 0100
-at "
-A 9,9 0 0101
-B 8,9 0 0102
-C 9,9 0 0103
-D 9,9 0 0104
-E 8,9 0 0105
-F 8,9 0 0106
-G 9,9 0 0107
-H 9,9 0 0110
-I 3,9 0 0111
-J 7,9 0 0112
-K 8,9 0 0113
-L 7,9 0 0114
-M 11,9 0 0115
-N 9,9 0 0116
-O 10,9 0 0117
-P 8,9 0 0120
-Q 10,9 0 0121
-R 8,9 0 0122
-S 8,9 0 0123
-T 7,9 0 0124
-U 8,9 0 0125
-V 9,9 0 0126
-W 11,9 0 0127
-X 9,9 0 0130
-Y 9,9 0 0131
-Z 9,9 0 0132
-[ 3,9,3 0 0133
-lB "
-\ 4,9 0 0134
-rs "
-] 3,9,3 0 0135
-rB "
-^ 6,8 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 3,9 0 0140
-oq "
-a 7,7 0 0141
-b 7,9 0 0142
-c 7,7 0 0143
-d 7,9 0 0144
-e 7,7 0 0145
-f 3,9 0 0146
-g 7,7,3 0 0147
-h 7,9 0 0150
-i 3,9 0 0151
-j 3,9,3 0 0152
-k 6,9 0 0153
-l 3,9 0 0154
-m 9,7 0 0155
-n 7,7 0 0156
-o 7,7 0 0157
-p 7,7,3 0 0160
-q 7,7,3 0 0161
-r 4,7 0 0162
-s 6,7 0 0163
-t 4,9 0 0164
-u 7,7 0 0165
-v 7,7 0 0166
-w 9,7 0 0167
-x 6,7 0 0170
-y 7,7,3 0 0171
-z 6,7 0 0172
-{ 4,9,3 0 0173
-lC "
-| 3,9,3 0 0174
-or "
-ba "
-} 4,9,3 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 3,7,3 0 0241
-¡ "
-ct 7,8,1 0 0242
-¢ "
-Po 7,9 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 7,9 0 0245
-¥ "
-bb 3,9,2 0 0246
-¦ "
-sc 6,9,3 0 0247
-§ "
-ad 3,9 0 0250
-¨ "
-co 11,9 0 0251
-© "
-Of 5,9 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 8,6 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 4,9 0 0257
-¯ "
-de 5,8 0 0260
-° "
-+- 7,7 0 0261
-± "
-S2 4,8 0 0262
-² "
-S3 4,8 0 0263
-³ "
-aa 2,10 0 0264
-´ "
-µ 7,7,3 0 0265
-ps 7,9,3 0 0266
-¶ "
-pc 3,4 0 0267
-· "
-ac 3,1,3 0 0270
-¸ "
-S1 4,8 0 0271
-¹ "
-Om 5,9 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 10,9 0 0274
-¼ "
-12 10,9 0 0275
-½ "
-34 10,9 0 0276
-¾ "
-r? 7,6,3 0 0277
-¿ "
-`A 9,12 0 0300
-À "
-'A 9,12 0 0301
-Á "
-^A 9,12 0 0302
-Â "
-~A 9,12 0 0303
-Ã "
-:A 9,11 0 0304
-Ä "
-oA 9,12 0 0305
-Å "
-AE 11,9 0 0306
-Æ "
-,C 9,9,3 0 0307
-Ç "
-`E 8,12 0 0310
-È "
-'E 8,12 0 0311
-É "
-^E 8,12 0 0312
-Ê "
-:E 8,11 0 0313
-Ë "
-`I 3,12 0 0314
-Ì "
-'I 3,12 0 0315
-Í "
-^I 3,12 0 0316
-Î "
-:I 3,11 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,12 0 0321
-Ñ "
-`O 10,12 0 0322
-Ò "
-'O 10,12 0 0323
-Ó "
-^O 10,12 0 0324
-Ô "
-~O 10,12 0 0325
-Õ "
-:O 10,11 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 10,10,1 0 0330
-Ø "
-`U 8,12 0 0331
-Ù "
-'U 8,12 0 0332
-Ú "
-^U 8,12 0 0333
-Û "
-:U 8,11 0 0334
-Ü "
-'Y 9,12 0 0335
-Ý "
-TP 8,9 0 0336
-Þ "
-ss 7,9 0 0337
-ß "
-`a 7,10 0 0340
-à "
-'a 7,10 0 0341
-á "
-^a 7,10 0 0342
-â "
-~a 7,10 0 0343
-ã "
-:a 7,9 0 0344
-ä "
-oa 7,10 0 0345
-å "
-ae 11,7 0 0346
-æ "
-,c 7,7,3 0 0347
-ç "
-`e 7,10 0 0350
-è "
-'e 7,10 0 0351
-é "
-^e 7,10 0 0352
-ê "
-:e 7,9 0 0353
-ë "
-`i 3,10 0 0354
-ì "
-'i 3,10 0 0355
-í "
-^i 3,10 0 0356
-î "
-:i 3,9 0 0357
-ï "
-Sd 7,10 0 0360
-ð "
-~n 7,10 0 0361
-ñ "
-`o 7,10 0 0362
-ò "
-'o 7,10 0 0363
-ó "
-^o 7,10 0 0364
-ô "
-~o 7,10 0 0365
-õ "
-:o 7,9 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 7,7 0 0370
-ø "
-`u 7,10 0 0371
-ù "
-'u 7,10 0 0372
-ú "
-^u 7,10 0 0373
-û "
-:u 7,9 0 0374
-ü "
-'y 7,10,3 0 0375
-ý "
-Tp 7,9,3 0 0376
-þ "
-:y 7,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/Makefile.sub b/contrib/groff/font/devX75-12/Makefile.sub
deleted file mode 100644
index 37f4b7cba358..000000000000
--- a/contrib/groff/font/devX75-12/Makefile.sub
+++ /dev/null
@@ -1,2 +0,0 @@
-DEV=X75-12
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
diff --git a/contrib/groff/font/devX75-12/NB b/contrib/groff/font/devX75-12/NB
deleted file mode 100644
index b5f4a08626d1..000000000000
--- a/contrib/groff/font/devX75-12/NB
+++ /dev/null
@@ -1,308 +0,0 @@
-name NB
-spacewidth 4
-charset
---- 4,1 0 040
-! 4,9 0 041
-" 6,9 0 042
-dq "
-# 8,9 0 043
-sh "
-$ 7,10,1 0 044
-Do "
-% 13,9 0 045
-& 11,9 0 046
-' 3,9 0 047
-cq "
-( 5,9,2 0 050
-) 5,9,2 0 051
-* 6,9 0 052
-+ 8,7 0 053
-, 4,2,2 0 054
-\- 7,4 0 055
-. 4,2 0 056
-/ 4,9 0 057
-sl "
-0 7,9 0 060
-1 5,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 4,6 0 072
-; 4,6,2 0 073
-< 7,6 0 074
-= 7,5 0 075
-eq "
-> 7,6 0 076
-? 7,9 0 077
-@ 11,9 0 0100
-at "
-A 11,9 0 0101
-B 9,9 0 0102
-C 9,9 0 0103
-D 10,9 0 0104
-E 9,9 0 0105
-F 9,9 0 0106
-G 10,9 0 0107
-H 11,9 0 0110
-I 5,9 0 0111
-J 8,9 0 0112
-K 10,9 0 0113
-L 9,9 0 0114
-M 12,9 0 0115
-N 11,9 0 0116
-O 10,9 0 0117
-P 9,9 0 0120
-Q 10,9,2 0 0121
-R 10,9 0 0122
-S 8,9 0 0123
-T 9,9 0 0124
-U 10,9 0 0125
-V 11,9 0 0126
-W 14,9 0 0127
-X 10,9 0 0130
-Y 9,9 0 0131
-Z 9,9 0 0132
-[ 5,9,2 0 0133
-lB "
-\ 6,9 0 0134
-rs "
-] 5,9,2 0 0135
-rB "
-^ 6,9 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 3,9 0 0140
-oq "
-a 8,6 0 0141
-b 8,9 0 0142
-c 7,6 0 0143
-d 9,9 0 0144
-e 7,6 0 0145
-f 5,9 0 0146
-g 7,7,3 0 0147
-h 9,9 0 0150
-i 5,9 0 0151
-j 3,9,3 0 0152
-k 8,9 0 0153
-l 5,9 0 0154
-m 13,6 0 0155
-n 9,6 0 0156
-o 8,6 0 0157
-p 8,6,3 0 0160
-q 8,6,3 0 0161
-r 6,6 0 0162
-s 6,6 0 0163
-t 5,9 0 0164
-u 9,6 0 0165
-v 7,6 0 0166
-w 11,6 0 0167
-x 8,6 0 0170
-y 7,6,3 0 0171
-z 7,6 0 0172
-{ 5,9,2 0 0173
-lC "
-| 8,9 0 0174
-or "
-ba "
-} 5,9,2 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,3 0 0241
-¡ "
-ct 7,7,1 0 0242
-¢ "
-Po 8,9 0 0243
-£ "
-Cs 8,8 0 0244
-¤ "
-Ye 9,9 0 0245
-¥ "
-bb 8,9 0 0246
-¦ "
-sc 6,9,1 0 0247
-§ "
-ad 5,9 0 0250
-¨ "
-co 10,9 0 0251
-© "
-Of 6,9 0 0252
-ª "
-Fo 8,6 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 6,8 0 0257
-¯ "
-de 5,9 0 0260
-° "
-+- 8,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 5,9 0 0264
-´ "
-µ 9,6,3 0 0265
-ps 10,9 0 0266
-¶ "
-pc 3,5 0 0267
-· "
-ac 5,0,3 0 0270
-¸ "
-S1 4,9 0 0271
-¹ "
-Om 6,9 0 0272
-º "
-Fc 8,6 0 0273
-» "
-14 10,9 0 0274
-¼ "
-12 10,9 0 0275
-½ "
-34 10,9 0 0276
-¾ "
-r? 7,6,3 0 0277
-¿ "
-`A 11,12 0 0300
-À "
-'A 11,12 0 0301
-Á "
-^A 11,12 0 0302
-Â "
-~A 11,12 0 0303
-Ã "
-:A 11,12 0 0304
-Ä "
-oA 11,12 0 0305
-Å "
-AE 14,9 0 0306
-Æ "
-,C 9,9,3 0 0307
-Ç "
-`E 9,12 0 0310
-È "
-'E 9,12 0 0311
-É "
-^E 9,12 0 0312
-Ê "
-:E 9,12 0 0313
-Ë "
-`I 5,12 0 0314
-Ì "
-'I 5,12 0 0315
-Í "
-^I 5,12 0 0316
-Î "
-:I 5,12 0 0317
-Ï "
--D 10,9 0 0320
-Ð "
-~N 11,12 0 0321
-Ñ "
-`O 10,12 0 0322
-Ò "
-'O 10,12 0 0323
-Ó "
-^O 10,12 0 0324
-Ô "
-~O 10,12 0 0325
-Õ "
-:O 10,12 0 0326
-Ö "
-mu 8,7 0 0327
-× "
-/O 10,9 0 0330
-Ø "
-`U 10,12 0 0331
-Ù "
-'U 10,12 0 0332
-Ú "
-^U 10,12 0 0333
-Û "
-:U 10,12 0 0334
-Ü "
-'Y 9,12 0 0335
-Ý "
-TP 9,9 0 0336
-Þ "
-ss 8,9 0 0337
-ß "
-`a 8,9 0 0340
-à "
-'a 8,9 0 0341
-á "
-^a 8,9 0 0342
-â "
-~a 8,9 0 0343
-ã "
-:a 8,9 0 0344
-ä "
-oa 8,9 0 0345
-å "
-ae 11,6 0 0346
-æ "
-,c 7,6,3 0 0347
-ç "
-`e 7,9 0 0350
-è "
-'e 7,9 0 0351
-é "
-^e 7,9 0 0352
-ê "
-:e 7,9 0 0353
-ë "
-`i 5,9 0 0354
-ì "
-'i 5,9 0 0355
-í "
-^i 5,9 0 0356
-î "
-:i 5,9 0 0357
-ï "
-Sd 8,9 0 0360
-ð "
-~n 9,9 0 0361
-ñ "
-`o 8,9 0 0362
-ò "
-'o 8,9 0 0363
-ó "
-^o 8,9 0 0364
-ô "
-~o 8,9 0 0365
-õ "
-:o 8,9 0 0366
-ö "
-di 8,7 0 0367
-÷ "
-/o 8,7,1 0 0370
-ø "
-`u 9,9 0 0371
-ù "
-'u 9,9 0 0372
-ú "
-^u 9,9 0 0373
-û "
-:u 9,9 0 0374
-ü "
-'y 7,9,3 0 0375
-ý "
-Tp 8,9,3 0 0376
-þ "
-:y 7,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/NBI b/contrib/groff/font/devX75-12/NBI
deleted file mode 100644
index 01539d5b4051..000000000000
--- a/contrib/groff/font/devX75-12/NBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name NBI
-spacewidth 4
-charset
---- 4,1 0 040
-! 5,9 0 041
-" 6,9 0 042
-dq "
-# 8,8 0 043
-sh "
-$ 7,10,1 0 044
-Do "
-% 12,9 0 045
-& 12,9 0 046
-' 3,9 0 047
-cq "
-( 5,9,2 0 050
-) 5,9,2 0 051
-* 6,9 0 052
-+ 8,7 0 053
-, 3,2,2 0 054
-\- 8,4 0 055
-. 3,2 0 056
-/ 6,9 0 057
-sl "
-0 7,9 0 060
-1 7,9 0 061
-2 7,9 0 062
-3 7,9 0 063
-4 7,9 0 064
-5 7,9 0 065
-6 7,9 0 066
-7 7,9 0 067
-8 7,9 0 070
-9 7,9 0 071
-: 4,6 0 072
-; 4,6,2 0 073
-< 7,7 0 074
-= 7,5 0 075
-eq "
-> 7,7 0 076
-? 6,9 0 077
-@ 11,9 0 0100
-at "
-A 10,9 0 0101
-B 9,9 0 0102
-C 9,9 0 0103
-D 10,9 0 0104
-E 9,9 0 0105
-F 8,9 0 0106
-G 10,9 0 0107
-H 11,9 0 0110
-I 6,9 0 0111
-J 8,9 0 0112
-K 10,9 0 0113
-L 9,9 0 0114
-M 14,9 0 0115
-N 11,9 0 0116
-O 10,9 0 0117
-P 9,9 0 0120
-Q 10,9,2 0 0121
-R 10,9 0 0122
-S 8,9 0 0123
-T 9,9 0 0124
-U 9,9 0 0125
-V 10,9 0 0126
-W 13,9 0 0127
-X 11,9 0 0130
-Y 9,9 0 0131
-Z 9,9 0 0132
-[ 6,9,2 0 0133
-lB "
-\ 6,9 0 0134
-rs "
-] 6,9,2 0 0135
-rB "
-^ 8,9 0 0136
-a^ "
-ha "
-_ 8,0,2 0 0137
-` 3,9 0 0140
-oq "
-a 8,6 0 0141
-b 7,9 0 0142
-c 6,6 0 0143
-d 8,9 0 0144
-e 7,6 0 0145
-f 5,9,3 0 0146
-g 7,8,3 0 0147
-h 8,9 0 0150
-i 4,9 0 0151
-j 4,9,3 0 0152
-k 8,9 0 0153
-l 4,9 0 0154
-m 12,6 0 0155
-n 8,6 0 0156
-o 7,6 0 0157
-p 8,6,3 0 0160
-q 8,6,3 0 0161
-r 6,6 0 0162
-s 7,6 0 0163
-t 5,8 0 0164
-u 8,6 0 0165
-v 7,6 0 0166
-w 11,6 0 0167
-x 7,6 0 0170
-y 6,6,3 0 0171
-z 7,6 0 0172
-{ 6,9,2 0 0173
-lC "
-| 8,9 0 0174
-or "
-ba "
-} 6,9,2 0 0175
-rC "
-~ 8,5 0 0176
-a~ "
-ap "
-ti "
-r! 5,6,3 0 0241
-¡ "
-ct 7,7,1 0 0242
-¢ "
-Po 9,9 0 0243
-£ "
-Cs 8,8 0 0244
-¤ "
-Ye 10,9 0 0245
-¥ "
-bb 8,9 0 0246
-¦ "
-sc 6,9,2 0 0247
-§ "
-ad 4,9 0 0250
-¨ "
-co 10,9 0 0251
-© "
-Of 6,9 0 0252
-ª "
-Fo 9,6 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 10,9 0 0256
-® "
-a- 5,8 0 0257
-¯ "
-de 5,9 0 0260
-° "
-+- 8,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 4,9 0 0264
-´ "
-µ 8,6,3 0 0265
-ps 8,9 0 0266
-¶ "
-pc 5,5 0 0267
-· "
-ac 4,0,3 0 0270
-¸ "
-S1 4,9 0 0271
-¹ "
-Om 5,9 0 0272
-º "
-Fc 9,6 0 0273
-» "
-14 10,9 0 0274
-¼ "
-12 10,9 0 0275
-½ "
-34 10,9 0 0276
-¾ "
-r? 6,6,3 0 0277
-¿ "
-`A 10,12 0 0300
-À "
-'A 10,12 0 0301
-Á "
-^A 10,12 0 0302
-Â "
-~A 10,12 0 0303
-Ã "
-:A 10,12 0 0304
-Ä "
-oA 10,12 0 0305
-Å "
-AE 12,9 0 0306
-Æ "
-,C 9,9,3 0 0307
-Ç "
-`E 9,12 0 0310
-È "
-'E 9,12 0 0311
-É "
-^E 9,12 0 0312
-Ê "
-:E 9,12 0 0313
-Ë "
-`I 6,12 0 0314
-Ì "
-'I 6,12 0 0315
-Í "
-^I 6,12 0 0316
-Î "
-:I 6,12 0 0317
-Ï "
--D 10,9 0 0320
-Ð "
-~N 11,12 0 0321
-Ñ "
-`O 10,12 0 0322
-Ò "
-'O 10,12 0 0323
-Ó "
-^O 10,12 0 0324
-Ô "
-~O 10,12 0 0325
-Õ "
-:O 10,12 0 0326
-Ö "
-mu 8,7 0 0327
-× "
-/O 10,9 0 0330
-Ø "
-`U 9,12 0 0331
-Ù "
-'U 9,12 0 0332
-Ú "
-^U 9,12 0 0333
-Û "
-:U 9,12 0 0334
-Ü "
-'Y 9,12 0 0335
-Ý "
-TP 9,9 0 0336
-Þ "
-ss 9,9,2 0 0337
-ß "
-`a 8,9 0 0340
-à "
-'a 8,9 0 0341
-á "
-^a 8,10 0 0342
-â "
-~a 8,9 0 0343
-ã "
-:a 8,9 0 0344
-ä "
-oa 8,10 0 0345
-å "
-ae 11,6 0 0346
-æ "
-,c 6,6,3 0 0347
-ç "
-`e 7,9 0 0350
-è "
-'e 7,9 0 0351
-é "
-^e 7,10 0 0352
-ê "
-:e 7,9 0 0353
-ë "
-`i 4,9 0 0354
-ì "
-'i 4,9 0 0355
-í "
-^i 4,10 0 0356
-î "
-:i 4,9 0 0357
-ï "
-Sd 7,9 0 0360
-ð "
-~n 8,9 0 0361
-ñ "
-`o 7,9 0 0362
-ò "
-'o 7,9 0 0363
-ó "
-^o 7,10 0 0364
-ô "
-~o 7,9 0 0365
-õ "
-:o 7,9 0 0366
-ö "
-di 8,7 0 0367
-÷ "
-/o 7,6 0 0370
-ø "
-`u 8,9 0 0371
-ù "
-'u 8,9 0 0372
-ú "
-^u 8,10 0 0373
-û "
-:u 8,9 0 0374
-ü "
-'y 6,9,3 0 0375
-ý "
-Tp 8,9,3 0 0376
-þ "
-:y 6,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/NI b/contrib/groff/font/devX75-12/NI
deleted file mode 100644
index 3ffc94022ffd..000000000000
--- a/contrib/groff/font/devX75-12/NI
+++ /dev/null
@@ -1,308 +0,0 @@
-name NI
-spacewidth 3
-charset
---- 3,1 0 040
-! 4,9 0 041
-" 6,9 0 042
-dq "
-# 8,8 0 043
-sh "
-$ 6,10,1 0 044
-Do "
-% 10,9 0 045
-& 10,9 0 046
-' 3,9 0 047
-cq "
-( 5,9,2 0 050
-) 5,9,2 0 051
-* 7,9 0 052
-+ 8,7 0 053
-, 2,2,1 0 054
-\- 7,4 0 055
-. 2,2 0 056
-/ 8,9,1 0 057
-sl "
-0 6,9 0 060
-1 6,9 0 061
-2 6,9 0 062
-3 6,9 0 063
-4 6,9 0 064
-5 6,9 0 065
-6 6,9 0 066
-7 6,9 0 067
-8 6,9 0 070
-9 6,9 0 071
-: 3,6 0 072
-; 3,6,1 0 073
-< 7,6 0 074
-= 7,5 0 075
-eq "
-> 7,6 0 076
-? 5,9 0 077
-@ 11,9 0 0100
-at "
-A 8,9 0 0101
-B 8,9 0 0102
-C 9,9 0 0103
-D 10,9 0 0104
-E 9,9 0 0105
-F 9,9 0 0106
-G 9,9 0 0107
-H 10,9 0 0110
-I 5,9 0 0111
-J 7,9 0 0112
-K 9,9 0 0113
-L 8,9 0 0114
-M 13,9 0 0115
-N 11,9 0 0116
-O 9,9 0 0117
-P 8,9 0 0120
-Q 9,9,2 0 0121
-R 10,9 0 0122
-S 9,9 0 0123
-T 8,9 0 0124
-U 8,9 0 0125
-V 9,9 0 0126
-W 13,9 0 0127
-X 10,9 0 0130
-Y 8,9 0 0131
-Z 9,9 0 0132
-[ 6,9,2 0 0133
-lB "
-\ 8,9 0 0134
-rs "
-] 6,9,2 0 0135
-rB "
-^ 6,9 0 0136
-a^ "
-ha "
-_ 8,0,2 0 0137
-` 3,9 0 0140
-oq "
-a 8,6 0 0141
-b 7,9 0 0142
-c 6,6 0 0143
-d 8,9 0 0144
-e 6,6 0 0145
-f 4,9,3 0 0146
-g 6,7,3 0 0147
-h 8,9 0 0150
-i 4,9 0 0151
-j 3,9,3 0 0152
-k 7,9 0 0153
-l 4,9 0 0154
-m 12,6 0 0155
-n 8,6 0 0156
-o 6,6 0 0157
-p 7,6,3 0 0160
-q 7,6,3 0 0161
-r 5,6 0 0162
-s 6,6 0 0163
-t 4,8 0 0164
-u 8,6 0 0165
-v 7,6 0 0166
-w 10,6 0 0167
-x 6,6 0 0170
-y 6,6,3 0 0171
-z 6,6 0 0172
-{ 5,9,2 0 0173
-lC "
-| 6,9 0 0174
-or "
-ba "
-} 5,9,2 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,7,2 0 0241
-¡ "
-ct 6,7,1 0 0242
-¢ "
-Po 8,9 0 0243
-£ "
-Cs 9,8 0 0244
-¤ "
-Ye 9,9 0 0245
-¥ "
-bb 6,9 0 0246
-¦ "
-sc 6,9,2 0 0247
-§ "
-ad 5,9 0 0250
-¨ "
-co 10,9 0 0251
-© "
-Of 5,9 0 0252
-ª "
-Fo 7,5 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 10,9 0 0256
-® "
-a- 5,8 0 0257
-¯ "
-de 5,9 0 0260
-° "
-+- 8,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 4,9 0 0264
-´ "
-µ 8,6,3 0 0265
-ps 9,9 0 0266
-¶ "
-pc 5,5 0 0267
-· "
-ac 4,0,3 0 0270
-¸ "
-S1 4,9 0 0271
-¹ "
-Om 4,9 0 0272
-º "
-Fc 7,5 0 0273
-» "
-14 9,9 0 0274
-¼ "
-12 9,9 0 0275
-½ "
-34 9,9 0 0276
-¾ "
-r? 5,7,2 0 0277
-¿ "
-`A 8,12 0 0300
-À "
-'A 8,12 0 0301
-Á "
-^A 8,12 0 0302
-Â "
-~A 8,12 0 0303
-Ã "
-:A 8,12 0 0304
-Ä "
-oA 8,12 0 0305
-Å "
-AE 13,9 0 0306
-Æ "
-,C 9,9,3 0 0307
-Ç "
-`E 9,12 0 0310
-È "
-'E 9,12 0 0311
-É "
-^E 9,12 0 0312
-Ê "
-:E 9,12 0 0313
-Ë "
-`I 5,12 0 0314
-Ì "
-'I 5,12 0 0315
-Í "
-^I 5,12 0 0316
-Î "
-:I 5,12 0 0317
-Ï "
--D 10,9 0 0320
-Ð "
-~N 11,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,12 0 0326
-Ö "
-mu 8,7 0 0327
-× "
-/O 9,9 0 0330
-Ø "
-`U 8,12 0 0331
-Ù "
-'U 8,12 0 0332
-Ú "
-^U 8,12 0 0333
-Û "
-:U 8,12 0 0334
-Ü "
-'Y 8,12 0 0335
-Ý "
-TP 8,9 0 0336
-Þ "
-ss 8,9,3 0 0337
-ß "
-`a 8,9 0 0340
-à "
-'a 8,9 0 0341
-á "
-^a 8,9 0 0342
-â "
-~a 8,9 0 0343
-ã "
-:a 8,9 0 0344
-ä "
-oa 8,10 0 0345
-å "
-ae 9,6 0 0346
-æ "
-,c 6,6,3 0 0347
-ç "
-`e 6,9 0 0350
-è "
-'e 6,9 0 0351
-é "
-^e 6,9 0 0352
-ê "
-:e 6,9 0 0353
-ë "
-`i 4,9 0 0354
-ì "
-'i 4,9 0 0355
-í "
-^i 4,9 0 0356
-î "
-:i 4,9 0 0357
-ï "
-Sd 6,9 0 0360
-ð "
-~n 8,9 0 0361
-ñ "
-`o 6,9 0 0362
-ò "
-'o 6,9 0 0363
-ó "
-^o 6,9 0 0364
-ô "
-~o 6,9 0 0365
-õ "
-:o 6,9 0 0366
-ö "
-di 8,7 0 0367
-÷ "
-/o 6,6 0 0370
-ø "
-`u 8,9 0 0371
-ù "
-'u 8,9 0 0372
-ú "
-^u 8,9 0 0373
-û "
-:u 8,9 0 0374
-ü "
-'y 6,9,3 0 0375
-ý "
-Tp 7,9,3 0 0376
-þ "
-:y 8,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/NR b/contrib/groff/font/devX75-12/NR
deleted file mode 100644
index 1d91f111a51b..000000000000
--- a/contrib/groff/font/devX75-12/NR
+++ /dev/null
@@ -1,308 +0,0 @@
-name NR
-spacewidth 3
-charset
---- 3,1 0 040
-! 4,9 0 041
-" 6,9 0 042
-dq "
-# 8,8 0 043
-sh "
-$ 6,10,1 0 044
-Do "
-% 11,9 0 045
-& 9,9 0 046
-' 4,9 0 047
-cq "
-( 4,9,2 0 050
-) 4,9,2 0 051
-* 6,9 0 052
-+ 8,7 0 053
-, 4,2,1 0 054
-\- 7,4 0 055
-. 4,2 0 056
-/ 4,9 0 057
-sl "
-0 6,9 0 060
-1 6,9 0 061
-2 6,9 0 062
-3 6,9 0 063
-4 6,9 0 064
-5 6,9 0 065
-6 6,9 0 066
-7 6,9 0 067
-8 6,9 0 070
-9 6,9 0 071
-: 4,6 0 072
-; 4,6,1 0 073
-< 7,6 0 074
-= 7,5 0 075
-eq "
-> 7,6 0 076
-? 5,9 0 077
-@ 10,9 0 0100
-at "
-A 10,9 0 0101
-B 8,9 0 0102
-C 9,9 0 0103
-D 9,9 0 0104
-E 8,9 0 0105
-F 8,9 0 0106
-G 10,9 0 0107
-H 10,9 0 0110
-I 6,9 0 0111
-J 7,9 0 0112
-K 9,9 0 0113
-L 8,9 0 0114
-M 12,9 0 0115
-N 10,9 0 0116
-O 9,9 0 0117
-P 8,9 0 0120
-Q 9,9,2 0 0121
-R 9,9 0 0122
-S 7,9 0 0123
-T 8,9 0 0124
-U 10,9 0 0125
-V 10,9 0 0126
-W 12,9 0 0127
-X 9,9 0 0130
-Y 10,9 0 0131
-Z 7,9 0 0132
-[ 4,9,2 0 0133
-lB "
-\ 6,9 0 0134
-rs "
-] 4,9,2 0 0135
-rB "
-^ 6,9 0 0136
-a^ "
-ha "
-_ 8,0,2 0 0137
-` 4,9 0 0140
-oq "
-a 7,6 0 0141
-b 6,9 0 0142
-c 6,6 0 0143
-d 7,9 0 0144
-e 6,6 0 0145
-f 4,9 0 0146
-g 7,7,3 0 0147
-h 8,9 0 0150
-i 4,9 0 0151
-j 4,9,3 0 0152
-k 7,9 0 0153
-l 4,9 0 0154
-m 12,6 0 0155
-n 8,6 0 0156
-o 6,6 0 0157
-p 7,6,3 0 0160
-q 6,6,3 0 0161
-r 6,6 0 0162
-s 6,6 0 0163
-t 4,8 0 0164
-u 8,6 0 0165
-v 6,6 0 0166
-w 10,6 0 0167
-x 7,6 0 0170
-y 6,6,3 0 0171
-z 6,6 0 0172
-{ 4,9,2 0 0173
-lC "
-| 8,9 0 0174
-or "
-ba "
-} 4,9,2 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,7,2 0 0241
-¡ "
-ct 7,7,1 0 0242
-¢ "
-Po 8,9 0 0243
-£ "
-Cs 8,8 0 0244
-¤ "
-Ye 8,9 0 0245
-¥ "
-bb 8,9 0 0246
-¦ "
-sc 6,9,2 0 0247
-§ "
-ad 4,9 0 0250
-¨ "
-co 11,9 0 0251
-© "
-Of 5,9 0 0252
-ª "
-Fo 7,6 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 5,8 0 0257
-¯ "
-de 5,9 0 0260
-° "
-+- 8,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 3,9 0 0264
-´ "
-µ 8,6,3 0 0265
-ps 8,9,2 0 0266
-¶ "
-pc 4,5 0 0267
-· "
-ac 4,0,3 0 0270
-¸ "
-S1 4,9 0 0271
-¹ "
-Om 5,9 0 0272
-º "
-Fc 7,6 0 0273
-» "
-14 9,9 0 0274
-¼ "
-12 9,9 0 0275
-½ "
-34 9,9 0 0276
-¾ "
-r? 5,7,2 0 0277
-¿ "
-`A 10,12 0 0300
-À "
-'A 10,12 0 0301
-Á "
-^A 10,12 0 0302
-Â "
-~A 10,12 0 0303
-Ã "
-:A 10,12 0 0304
-Ä "
-oA 10,12 0 0305
-Å "
-AE 13,9 0 0306
-Æ "
-,C 9,9,3 0 0307
-Ç "
-`E 8,12 0 0310
-È "
-'E 8,12 0 0311
-É "
-^E 8,12 0 0312
-Ê "
-:E 8,12 0 0313
-Ë "
-`I 6,12 0 0314
-Ì "
-'I 6,12 0 0315
-Í "
-^I 6,12 0 0316
-Î "
-:I 6,12 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 10,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,12 0 0326
-Ö "
-mu 8,7 0 0327
-× "
-/O 9,9 0 0330
-Ø "
-`U 10,12 0 0331
-Ù "
-'U 10,12 0 0332
-Ú "
-^U 10,12 0 0333
-Û "
-:U 10,12 0 0334
-Ü "
-'Y 10,12 0 0335
-Ý "
-TP 8,9 0 0336
-Þ "
-ss 7,9 0 0337
-ß "
-`a 7,9 0 0340
-à "
-'a 7,9 0 0341
-á "
-^a 7,9 0 0342
-â "
-~a 7,9 0 0343
-ã "
-:a 7,9 0 0344
-ä "
-oa 7,9 0 0345
-å "
-ae 10,6 0 0346
-æ "
-,c 6,6,3 0 0347
-ç "
-`e 6,9 0 0350
-è "
-'e 6,9 0 0351
-é "
-^e 6,9 0 0352
-ê "
-:e 6,9 0 0353
-ë "
-`i 4,9 0 0354
-ì "
-'i 4,9 0 0355
-í "
-^i 4,9 0 0356
-î "
-:i 4,9 0 0357
-ï "
-Sd 6,9 0 0360
-ð "
-~n 8,9 0 0361
-ñ "
-`o 6,9 0 0362
-ò "
-'o 6,9 0 0363
-ó "
-^o 6,9 0 0364
-ô "
-~o 6,9 0 0365
-õ "
-:o 6,8 0 0366
-ö "
-di 8,7 0 0367
-÷ "
-/o 6,7,1 0 0370
-ø "
-`u 8,9 0 0371
-ù "
-'u 8,9 0 0372
-ú "
-^u 8,9 0 0373
-û "
-:u 8,9 0 0374
-ü "
-'y 6,9,3 0 0375
-ý "
-Tp 7,9,3 0 0376
-þ "
-:y 6,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/S b/contrib/groff/font/devX75-12/S
deleted file mode 100644
index 2e66ad091f02..000000000000
--- a/contrib/groff/font/devX75-12/S
+++ /dev/null
@@ -1,226 +0,0 @@
-name S
-special
-spacewidth 3
-charset
---- 3,1 0 040
-! 4,9 0 041
-fa 9,9 0 042
-# 7,9 0 043
-sh "
-te 7,9 0 044
-% 10,9 0 045
-& 10,9 0 046
-st 6,6 0 047
-( 5,9,3 0 050
-) 5,9,3 0 051
-** 6,7 0 052
-+ 7,6 0 053
-pl "
-, 3,1,2 0 054
-\- 7,4 0 055
-mi "
-. 3,1 0 056
-/ 3,9 0 057
-sl "
-0 6,9 0 060
-1 6,9 0 061
-2 6,9 0 062
-3 6,9 0 063
-4 6,9 0 064
-5 6,9 0 065
-6 6,9 0 066
-7 6,9 0 067
-8 6,9 0 070
-9 6,9 0 071
-: 3,6 0 072
-; 3,6,2 0 073
-< 7,6 0 074
-= 7,5 0 075
-eq "
-> 7,6 0 076
-? 6,9 0 077
-=~ 7,6 0 0100
-*A 9,9 0 0101
-*B 8,9 0 0102
-*X 9,9 0 0103
-*D 8,9 0 0104
-*E 8,9 0 0105
-*F 10,9 0 0106
-*G 8,9 0 0107
-*Y 9,9 0 0110
-*I 4,9 0 0111
-+h 8,9 0 0112
-*K 9,9 0 0113
-*L 9,9 0 0114
-*M 11,9 0 0115
-*N 9,9 0 0116
-*O 9,9 0 0117
-*P 9,9 0 0120
-*H 9,9 0 0121
-*R 7,9 0 0122
-*S 7,9 0 0123
-*T 8,9 0 0124
---- 9,9 0 0125
-ts 7,6,3 0 0126
-*W 10,9 0 0127
-*C 8,9 0 0130
-*Q 10,9 0 0131
-*Z 8,9 0 0132
-[ 5,9,3 0 0133
-lB "
-tf 9,6 0 0134
-3d "
-] 5,9,3 0 0135
-rB "
-pp 8,9 0 0136
-_ 6,0,3 0 0137
-radicalex 6,12 0 0140
-*a 8,6 0 0141
-*b 7,10,3 0 0142
-*x 7,6,3 0 0143
-*d 7,10 0 0144
-*e 6,6 0 0145
-*f 8,8,3 0 0146
-*g 7,6,3 0 0147
-*y 8,6,3 0 0150
-*i 3,6 0 0151
-+f 8,6,3 0 0152
-*k 7,6 0 0153
-*l 7,9 0 0154
-*m 8,6,3 0 0155
-µ "
-*n 7,6 0 0156
-*o 7,6 0 0157
-*p 7,6 0 0160
-*h 7,9 0 0161
-*r 7,6,3 0 0162
-*s 8,6 0 0163
-*t 6,6 0 0164
-*u 8,6 0 0165
-+p 9,7 0 0166
-*w 9,6 0 0167
-*c 6,11,3 0 0170
-*q 9,6,3 0 0171
-*z 6,10,3 0 0172
-lC 6,9,3 0 0173
-{ "
-ba 3,9,3 0 0174
-or "
-| "
-rC 6,9,3 0 0175
-} "
-ap 7,5 0 0176
-*U 8,9 0 0241
-fm 3,9 0 0242
-<= 7,7 0 0243
-f/ 4,9 0 0244
-if 9,5 0 0245
-Fn 6,9,3 0 0246
-CL 9,6,1 0 0247
-DI 7,6 0 0250
-HE 9,6 0 0251
-SP 9,6,1 0 0252
-<> 13,6 0 0253
-<- 12,6 0 0254
-ua 7,12,4 0 0255
-arrowverttp "
--> 12,6 0 0256
-da 7,12,3 0 0257
-arrowvertbt "
-de 5,9 0 0260
-° "
-+- 7,7 0 0261
-± "
-sd 5,9 0 0262
->= 7,7 0 0263
-mu 7,6 0 0264
-× "
-pt 9,5 0 0265
-pd 6,10 0 0266
-bu 6,5 0 0267
-di 7,6 0 0270
-÷ "
-!= 7,7 0 0271
-== 7,6 0 0272
-~= 7,6 0 0273
-~~ "
---- 11,1 0 0274
-arrowvertex 7,12,4 0 0275
-an 13,4 0 0276
-CR 8,8 0 0277
-Ah 10,9 0 0300
-Im 9,10,1 0 0301
-Re 10,10 0 0302
-wp 10,8,3 0 0303
-c* 10,9 0 0304
-c+ 10,9 0 0305
-es 10,9 0 0306
-ca 10,6 0 0307
-cu 10,6 0 0310
-sp 9,6 0 0311
-ip 9,6,2 0 0312
---- 9,7,1 0 0313
-sb 9,6 0 0314
-ib 9,6,2 0 0315
-mo 8,6 0 0316
-nm 8,7,1 0 0317
-/_ 10,9 0 0320
-gr 9,9 0 0321
-rg 10,9 0 0322
-co 10,9 0 0323
-tm 11,9 0 0324
---- 10,10,1 0 0325
-sr 7,12 0 0326
-md 3,4 0 0327
-no 9,4 0 0330
-¬ "
-AN 8,6 0 0331
-OR 8,6 0 0332
-hA 13,6 0 0333
-lA 12,6 0 0334
-uA 8,11,1 0 0335
-rA 12,6 0 0336
-dA 8,12 0 0337
-lz 6,9 0 0340
-la 4,10,1 0 0341
---- 10,9 0 0342
---- 10,9 0 0343
---- 10,9 0 0344
---- 9,10,1 0 0345
-parenlefttp 5,12,4 0 0346
-parenleftex 5,12,4 0 0347
-parenleftbt 5,12,4 0 0350
-bracketlefttp 5,12,4 0 0351
-lc "
-bracketleftex 5,12,4 0 0352
-bracketleftbt 5,12,3 0 0353
-lf "
-bracelefttp 6,12,4 0 0354
-lt "
-braceleftmid 6,12,4 0 0355
-lk "
-braceleftbt 6,12,3 0 0356
-lb "
-bracerightex 6,12,4 0 0357
-braceleftex "
-bv "
---- 10,11 0 0360
-ra 4,10,2 0 0361
-is 4,12,3 0 0362
---- 9,12,4 0 0363
---- 9,12,4 0 0364
---- 9,12,3 0 0365
-parenrighttp 5,12,4 0 0366
-parenrightex 5,12,4 0 0367
-parenrightbt 5,12,4 0 0370
-bracketrighttp 5,12,4 0 0371
-rc "
-bracketrightex 5,12,4 0 0372
-bracketrightbt 5,12,3 0 0373
-rf "
-bracerighttp 6,12,4 0 0374
-rt "
-bracerightmid 6,12,4 0 0375
-rk "
-bracerightbt 6,12,3 0 0376
-rb "
diff --git a/contrib/groff/font/devX75-12/TB b/contrib/groff/font/devX75-12/TB
deleted file mode 100644
index 1ac16ecf7dd5..000000000000
--- a/contrib/groff/font/devX75-12/TB
+++ /dev/null
@@ -1,308 +0,0 @@
-name TB
-spacewidth 3
-charset
---- 3,1 0 040
-! 4,9 0 041
-" 5,9 0 042
-dq "
-# 6,9 0 043
-sh "
-$ 6,10,1 0 044
-Do "
-% 12,9 0 045
-& 10,9 0 046
-' 4,9 0 047
-cq "
-( 4,9,3 0 050
-) 4,9,3 0 051
-* 6,9 0 052
-+ 7,6 0 053
-, 4,2,2 0 054
-\- 8,4 0 055
-. 4,2 0 056
-/ 4,9 0 057
-sl "
-0 6,9 0 060
-1 6,9 0 061
-2 6,9 0 062
-3 6,9 0 063
-4 6,9 0 064
-5 6,9 0 065
-6 6,9 0 066
-7 6,9 0 067
-8 6,9 0 070
-9 6,9 0 071
-: 4,6 0 072
-; 4,6,2 0 073
-< 7,6 0 074
-= 7,5 0 075
-eq "
-> 8,6 0 076
-? 7,9 0 077
-@ 12,9,2 0 0100
-at "
-A 9,9 0 0101
-B 9,9 0 0102
-C 8,9 0 0103
-D 9,9 0 0104
-E 8,9 0 0105
-F 8,9 0 0106
-G 9,9 0 0107
-H 10,9 0 0110
-I 5,9 0 0111
-J 7,9,1 0 0112
-K 10,9 0 0113
-L 8,9 0 0114
-M 11,9 0 0115
-N 9,9 0 0116
-O 9,9 0 0117
-P 8,9 0 0120
-Q 9,9,2 0 0121
-R 9,9 0 0122
-S 7,9 0 0123
-T 9,9 0 0124
-U 9,9 0 0125
-V 9,9 0 0126
-W 12,9 0 0127
-X 9,9 0 0130
-Y 9,9 0 0131
-Z 8,9 0 0132
-[ 4,9,3 0 0133
-lB "
-\ 3,9 0 0134
-rs "
-] 4,9,3 0 0135
-rB "
-^ 7,9 0 0136
-a^ "
-ha "
-_ 6,0,3 0 0137
-` 4,9 0 0140
-oq "
-a 7,6 0 0141
-b 6,9 0 0142
-c 6,6 0 0143
-d 6,9 0 0144
-e 7,6 0 0145
-f 4,9 0 0146
-g 6,6,3 0 0147
-h 6,9 0 0150
-i 3,9 0 0151
-j 3,9,3 0 0152
-k 7,9 0 0153
-l 3,9 0 0154
-m 9,6 0 0155
-n 6,6 0 0156
-o 7,6 0 0157
-p 6,6,3 0 0160
-q 6,6,3 0 0161
-r 5,6 0 0162
-s 6,6 0 0163
-t 4,8 0 0164
-u 6,6 0 0165
-v 6,6 0 0166
-w 9,6 0 0167
-x 6,6 0 0170
-y 6,6,3 0 0171
-z 6,6 0 0172
-{ 5,9,3 0 0173
-lC "
-| 3,9,3 0 0174
-or "
-ba "
-} 5,9,3 0 0175
-rC "
-~ 7,6 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,3 0 0241
-¡ "
-ct 6,7,2 0 0242
-¢ "
-Po 6,9 0 0243
-£ "
-Cs 7,8 0 0244
-¤ "
-Ye 8,9 0 0245
-¥ "
-bb 3,9,3 0 0246
-¦ "
-sc 6,9,3 0 0247
-§ "
-ad 4,9 0 0250
-¨ "
-co 11,9 0 0251
-© "
-Of 4,9 0 0252
-ª "
-Fo 8,6 0 0253
-« "
-no 8,5 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 4,8 0 0257
-¯ "
-de 5,9 0 0260
-° "
-+- 7,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 4,9 0 0264
-´ "
-µ 6,6,3 0 0265
-ps 8,9,3 0 0266
-¶ "
-pc 3,5 0 0267
-· "
-ac 4,0,3 0 0270
-¸ "
-S1 4,9 0 0271
-¹ "
-Om 4,9 0 0272
-º "
-Fc 8,6 0 0273
-» "
-14 9,9 0 0274
-¼ "
-12 9,9 0 0275
-½ "
-34 9,9 0 0276
-¾ "
-r? 7,6,3 0 0277
-¿ "
-`A 9,12 0 0300
-À "
-'A 9,12 0 0301
-Á "
-^A 9,12 0 0302
-Â "
-~A 9,12 0 0303
-Ã "
-:A 9,12 0 0304
-Ä "
-oA 9,12 0 0305
-Å "
-AE 13,9 0 0306
-Æ "
-,C 8,9,3 0 0307
-Ç "
-`E 8,12 0 0310
-È "
-'E 8,12 0 0311
-É "
-^E 8,12 0 0312
-Ê "
-:E 8,12 0 0313
-Ë "
-`I 5,12 0 0314
-Ì "
-'I 5,12 0 0315
-Í "
-^I 5,12 0 0316
-Î "
-:I 5,12 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,12 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 9,10,1 0 0330
-Ø "
-`U 9,12 0 0331
-Ù "
-'U 9,12 0 0332
-Ú "
-^U 9,12 0 0333
-Û "
-:U 9,12 0 0334
-Ü "
-'Y 9,12 0 0335
-Ý "
-TP 8,9 0 0336
-Þ "
-ss 8,9 0 0337
-ß "
-`a 7,9 0 0340
-à "
-'a 7,9 0 0341
-á "
-^a 7,9 0 0342
-â "
-~a 7,9 0 0343
-ã "
-:a 7,9 0 0344
-ä "
-oa 7,10 0 0345
-å "
-ae 8,6 0 0346
-æ "
-,c 6,6,3 0 0347
-ç "
-`e 7,9 0 0350
-è "
-'e 7,9 0 0351
-é "
-^e 7,9 0 0352
-ê "
-:e 7,9 0 0353
-ë "
-`i 3,9 0 0354
-ì "
-'i 3,9 0 0355
-í "
-^i 3,9 0 0356
-î "
-:i 3,9 0 0357
-ï "
-Sd 7,9 0 0360
-ð "
-~n 6,9 0 0361
-ñ "
-`o 7,9 0 0362
-ò "
-'o 7,9 0 0363
-ó "
-^o 7,9 0 0364
-ô "
-~o 7,9 0 0365
-õ "
-:o 7,9 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 7,7,1 0 0370
-ø "
-`u 6,9 0 0371
-ù "
-'u 6,9 0 0372
-ú "
-^u 6,9 0 0373
-û "
-:u 6,9 0 0374
-ü "
-'y 6,9,3 0 0375
-ý "
-Tp 6,9,3 0 0376
-þ "
-:y 6,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/TBI b/contrib/groff/font/devX75-12/TBI
deleted file mode 100644
index 68d97ed72b61..000000000000
--- a/contrib/groff/font/devX75-12/TBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name TBI
-spacewidth 3
-charset
---- 3,1 0 040
-! 5,9 0 041
-" 7,9 0 042
-dq "
-# 7,9 0 043
-sh "
-$ 7,10,1 0 044
-Do "
-% 12,9 0 045
-& 9,9 0 046
-' 4,9 0 047
-cq "
-( 6,9,2 0 050
-) 6,9,2 0 051
-* 6,9 0 052
-+ 7,6 0 053
-, 4,2,1 0 054
-\- 8,4 0 055
-. 4,2 0 056
-/ 5,9 0 057
-sl "
-0 6,9 0 060
-1 6,9 0 061
-2 6,9 0 062
-3 6,9 0 063
-4 6,9 0 064
-5 6,9 0 065
-6 6,9 0 066
-7 6,9 0 067
-8 6,9 0 070
-9 6,9 0 071
-: 5,6 0 072
-; 5,6,1 0 073
-< 9,7 0 074
-= 8,5 0 075
-eq "
-> 9,7 0 076
-? 6,9 0 077
-@ 12,9,1 0 0100
-at "
-A 8,9 0 0101
-B 8,9 0 0102
-C 8,9 0 0103
-D 9,9 0 0104
-E 8,9 0 0105
-F 8,9 0 0106
-G 9,9 0 0107
-H 10,9 0 0110
-I 5,9 0 0111
-J 6,9,1 0 0112
-K 8,9 0 0113
-L 8,9 0 0114
-M 11,9 0 0115
-N 9,9 0 0116
-O 9,9 0 0117
-P 8,9 0 0120
-Q 9,9,3 0 0121
-R 8,9 0 0122
-S 8,9 0 0123
-T 7,9 0 0124
-U 10,9 0 0125
-V 8,9 0 0126
-W 11,9 0 0127
-X 8,9 0 0130
-Y 7,9 0 0131
-Z 7,9 0 0132
-[ 6,9,2 0 0133
-lB "
-\ 5,9 0 0134
-rs "
-] 7,9,2 0 0135
-rB "
-^ 8,9 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 5,9 0 0140
-oq "
-a 7,6 0 0141
-b 6,9 0 0142
-c 5,6 0 0143
-d 6,9 0 0144
-e 6,6 0 0145
-f 3,9,3 0 0146
-g 5,6,3 0 0147
-h 6,9 0 0150
-i 4,9 0 0151
-j 4,9,3 0 0152
-k 6,9 0 0153
-l 4,9 0 0154
-m 9,6 0 0155
-n 6,6 0 0156
-o 6,6 0 0157
-p 6,6,3 0 0160
-q 6,6,3 0 0161
-r 5,6 0 0162
-s 5,6 0 0163
-t 3,7 0 0164
-u 7,6 0 0165
-v 6,6 0 0166
-w 8,6 0 0167
-x 6,6 0 0170
-y 6,6,3 0 0171
-z 6,6,1 0 0172
-{ 6,9,2 0 0173
-lC "
-| 4,9 0 0174
-or "
-ba "
-} 6,9,2 0 0175
-rC "
-~ 9,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,3 0 0241
-¡ "
-ct 6,8,2 0 0242
-¢ "
-Po 6,9 0 0243
-£ "
-Cs 8,7 0 0244
-¤ "
-Ye 6,9 0 0245
-¥ "
-bb 4,9 0 0246
-¦ "
-sc 7,9,3 0 0247
-§ "
-ad 5,9 0 0250
-¨ "
-co 11,9 0 0251
-© "
-Of 6,9 0 0252
-ª "
-Fo 9,6 0 0253
-« "
-no 8,6 0 0254
-¬ "
-- 6,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 4,8 0 0257
-¯ "
-de 5,9 0 0260
-° "
-+- 7,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 4,9 0 0264
-´ "
-µ 7,6,3 0 0265
-ps 7,9,3 0 0266
-¶ "
-pc 3,5 0 0267
-· "
-ac 4,0,3 0 0270
-¸ "
-S1 4,9 0 0271
-¹ "
-Om 6,9 0 0272
-º "
-Fc 9,6 0 0273
-» "
-14 9,9 0 0274
-¼ "
-12 9,9 0 0275
-½ "
-34 9,9 0 0276
-¾ "
-r? 6,6,3 0 0277
-¿ "
-`A 8,12 0 0300
-À "
-'A 8,12 0 0301
-Á "
-^A 8,12 0 0302
-Â "
-~A 8,12 0 0303
-Ã "
-:A 8,12 0 0304
-Ä "
-oA 8,12 0 0305
-Å "
-AE 12,9 0 0306
-Æ "
-,C 8,9,3 0 0307
-Ç "
-`E 8,12 0 0310
-È "
-'E 8,12 0 0311
-É "
-^E 8,12 0 0312
-Ê "
-:E 8,12 0 0313
-Ë "
-`I 5,12 0 0314
-Ì "
-'I 5,12 0 0315
-Í "
-^I 5,12 0 0316
-Î "
-:I 5,12 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,11 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,12 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 9,10,1 0 0330
-Ø "
-`U 10,12 0 0331
-Ù "
-'U 10,12 0 0332
-Ú "
-^U 10,12 0 0333
-Û "
-:U 10,12 0 0334
-Ü "
-'Y 7,12 0 0335
-Ý "
-TP 8,9 0 0336
-Þ "
-ss 7,9,3 0 0337
-ß "
-`a 7,9 0 0340
-à "
-'a 7,9 0 0341
-á "
-^a 7,9 0 0342
-â "
-~a 7,9 0 0343
-ã "
-:a 7,9 0 0344
-ä "
-oa 7,9 0 0345
-å "
-ae 10,6 0 0346
-æ "
-,c 5,6,3 0 0347
-ç "
-`e 6,9 0 0350
-è "
-'e 6,9 0 0351
-é "
-^e 6,9 0 0352
-ê "
-:e 6,9 0 0353
-ë "
-`i 3,9 0 0354
-ì "
-'i 3,9 0 0355
-í "
-^i 3,9 0 0356
-î "
-:i 3,9 0 0357
-ï "
-Sd 6,9 0 0360
-ð "
-~n 7,9 0 0361
-ñ "
-`o 6,9 0 0362
-ò "
-'o 6,9 0 0363
-ó "
-^o 6,9 0 0364
-ô "
-~o 6,9 0 0365
-õ "
-:o 6,9 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 6,7,1 0 0370
-ø "
-`u 7,9 0 0371
-ù "
-'u 7,9 0 0372
-ú "
-^u 7,9 0 0373
-û "
-:u 7,9 0 0374
-ü "
-'y 6,9,3 0 0375
-ý "
-Tp 6,9,3 0 0376
-þ "
-:y 6,9,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/TI b/contrib/groff/font/devX75-12/TI
deleted file mode 100644
index 037cec3c1aba..000000000000
--- a/contrib/groff/font/devX75-12/TI
+++ /dev/null
@@ -1,308 +0,0 @@
-name TI
-spacewidth 3
-charset
---- 3,1 0 040
-! 4,9 0 041
-" 5,9 0 042
-dq "
-# 6,9 0 043
-sh "
-$ 6,10,1 0 044
-Do "
-% 10,9 0 045
-& 9,9 0 046
-' 4,9 0 047
-cq "
-( 4,9,3 0 050
-) 4,9,3 0 051
-* 6,9 0 052
-+ 8,6 0 053
-, 3,1,2 0 054
-\- 8,4 0 055
-. 3,1 0 056
-/ 4,9 0 057
-sl "
-0 6,9 0 060
-1 6,9 0 061
-2 6,9 0 062
-3 6,9 0 063
-4 6,9 0 064
-5 6,9 0 065
-6 6,9 0 066
-7 6,9 0 067
-8 6,9 0 070
-9 6,9 0 071
-: 4,6 0 072
-; 4,6,2 0 073
-< 8,7 0 074
-= 8,5 0 075
-eq "
-> 8,7 0 076
-? 6,9 0 077
-@ 12,9,1 0 0100
-at "
-A 8,9 0 0101
-B 8,9 0 0102
-C 7,9 0 0103
-D 9,9 0 0104
-E 8,9 0 0105
-F 8,9 0 0106
-G 8,9 0 0107
-H 9,9 0 0110
-I 5,9 0 0111
-J 5,9 0 0112
-K 8,9 0 0113
-L 7,9 0 0114
-M 11,9 0 0115
-N 9,9 0 0116
-O 7,9 0 0117
-P 8,9 0 0120
-Q 7,9,2 0 0121
-R 8,9 0 0122
-S 6,9 0 0123
-T 7,9 0 0124
-U 8,9 0 0125
-V 7,9 0 0126
-W 10,9 0 0127
-X 8,9 0 0130
-Y 7,9 0 0131
-Z 7,9 0 0132
-[ 5,9,2 0 0133
-lB "
-\ 3,9 0 0134
-rs "
-] 5,9,2 0 0135
-rB "
-^ 5,9 0 0136
-a^ "
-ha "
-_ 6,0,3 0 0137
-` 4,9 0 0140
-oq "
-a 6,6 0 0141
-b 6,9 0 0142
-c 5,6 0 0143
-d 6,9 0 0144
-e 6,6 0 0145
-f 4,9,3 0 0146
-g 5,6,3 0 0147
-h 6,9 0 0150
-i 4,9 0 0151
-j 4,9,3 0 0152
-k 6,9 0 0153
-l 3,9 0 0154
-m 9,6 0 0155
-n 6,6 0 0156
-o 6,6 0 0157
-p 6,6,3 0 0160
-q 6,6,3 0 0161
-r 4,6 0 0162
-s 5,6 0 0163
-t 4,7 0 0164
-u 6,6 0 0165
-v 6,6 0 0166
-w 9,6 0 0167
-x 6,6 0 0170
-y 6,6,3 0 0171
-z 5,6 0 0172
-{ 5,9,3 0 0173
-lC "
-| 4,9,3 0 0174
-or "
-ba "
-} 5,9,3 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 5,6,3 0 0241
-¡ "
-ct 6,8,2 0 0242
-¢ "
-Po 6,9 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 6,9 0 0245
-¥ "
-bb 4,9,3 0 0246
-¦ "
-sc 6,9,2 0 0247
-§ "
-ad 4,8 0 0250
-¨ "
-co 11,9 0 0251
-© "
-Of 4,9 0 0252
-ª "
-Fo 6,6 0 0253
-« "
-no 8,5 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 4,8 0 0257
-¯ "
-de 5,9 0 0260
-° "
-+- 8,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 4,9 0 0264
-´ "
-µ 6,6,3 0 0265
-ps 7,9,2 0 0266
-¶ "
-pc 3,4 0 0267
-· "
-ac 4,0,3 0 0270
-¸ "
-S1 3,9 0 0271
-¹ "
-Om 4,9 0 0272
-º "
-Fc 6,6 0 0273
-» "
-14 9,9 0 0274
-¼ "
-12 9,9 0 0275
-½ "
-34 9,9 0 0276
-¾ "
-r? 6,6,3 0 0277
-¿ "
-`A 8,12 0 0300
-À "
-'A 8,12 0 0301
-Á "
-^A 8,12 0 0302
-Â "
-~A 8,12 0 0303
-Ã "
-:A 8,11 0 0304
-Ä "
-oA 8,12 0 0305
-Å "
-AE 11,9 0 0306
-Æ "
-,C 7,9,3 0 0307
-Ç "
-`E 8,12 0 0310
-È "
-'E 8,12 0 0311
-É "
-^E 8,12 0 0312
-Ê "
-:E 8,11 0 0313
-Ë "
-`I 5,12 0 0314
-Ì "
-'I 5,12 0 0315
-Í "
-^I 5,12 0 0316
-Î "
-:I 5,11 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,12 0 0321
-Ñ "
-`O 7,12 0 0322
-Ò "
-'O 7,12 0 0323
-Ó "
-^O 7,12 0 0324
-Ô "
-~O 7,12 0 0325
-Õ "
-:O 7,11 0 0326
-Ö "
-mu 8,6 0 0327
-× "
-/O 7,10,1 0 0330
-Ø "
-`U 8,12 0 0331
-Ù "
-'U 8,12 0 0332
-Ú "
-^U 8,12 0 0333
-Û "
-:U 8,11 0 0334
-Ü "
-'Y 7,12 0 0335
-Ý "
-TP 8,9 0 0336
-Þ "
-ss 6,9,3 0 0337
-ß "
-`a 7,9 0 0340
-à "
-'a 7,9 0 0341
-á "
-^a 7,9 0 0342
-â "
-~a 7,9 0 0343
-ã "
-:a 7,8 0 0344
-ä "
-oa 7,9 0 0345
-å "
-ae 9,6 0 0346
-æ "
-,c 5,6,3 0 0347
-ç "
-`e 6,9 0 0350
-è "
-'e 6,9 0 0351
-é "
-^e 6,9 0 0352
-ê "
-:e 6,8 0 0353
-ë "
-`i 4,9 0 0354
-ì "
-'i 4,9 0 0355
-í "
-^i 4,9 0 0356
-î "
-:i 4,8 0 0357
-ï "
-Sd 6,9 0 0360
-ð "
-~n 6,9 0 0361
-ñ "
-`o 6,9 0 0362
-ò "
-'o 6,9 0 0363
-ó "
-^o 6,9 0 0364
-ô "
-~o 6,9 0 0365
-õ "
-:o 6,8 0 0366
-ö "
-di 8,6 0 0367
-÷ "
-/o 6,7,1 0 0370
-ø "
-`u 6,9 0 0371
-ù "
-'u 6,9 0 0372
-ú "
-^u 6,9 0 0373
-û "
-:u 6,8 0 0374
-ü "
-'y 6,9,3 0 0375
-ý "
-Tp 6,9,3 0 0376
-þ "
-:y 6,8,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75-12/TR b/contrib/groff/font/devX75-12/TR
deleted file mode 100644
index 16de8a9681e6..000000000000
--- a/contrib/groff/font/devX75-12/TR
+++ /dev/null
@@ -1,308 +0,0 @@
-name TR
-spacewidth 3
-charset
---- 3,1 0 040
-! 3,9 0 041
-" 5,9 0 042
-dq "
-# 6,8 0 043
-sh "
-$ 6,10,1 0 044
-Do "
-% 9,9 0 045
-& 10,9 0 046
-' 4,9 0 047
-cq "
-( 5,9,3 0 050
-) 5,9,3 0 051
-* 6,9 0 052
-+ 7,6 0 053
-, 3,1,2 0 054
-\- 8,4 0 055
-. 3,1 0 056
-/ 3,9 0 057
-sl "
-0 6,9 0 060
-1 6,9 0 061
-2 6,9 0 062
-3 6,9 0 063
-4 6,9 0 064
-5 6,9 0 065
-6 6,9 0 066
-7 6,9 0 067
-8 6,9 0 070
-9 6,9 0 071
-: 3,6 0 072
-; 3,6,2 0 073
-< 8,6 0 074
-= 7,5 0 075
-eq "
-> 8,6 0 076
-? 5,9 0 077
-@ 11,9,2 0 0100
-at "
-A 9,9 0 0101
-B 8,9 0 0102
-C 8,9 0 0103
-D 9,9 0 0104
-E 8,9 0 0105
-F 8,9 0 0106
-G 9,9 0 0107
-H 9,9 0 0110
-I 4,9 0 0111
-J 4,9 0 0112
-K 8,9 0 0113
-L 7,9 0 0114
-M 11,9 0 0115
-N 9,9 0 0116
-O 9,9 0 0117
-P 7,9 0 0120
-Q 9,9,2 0 0121
-R 8,9 0 0122
-S 7,9 0 0123
-T 7,9 0 0124
-U 8,9 0 0125
-V 9,9 0 0126
-W 12,9 0 0127
-X 8,9 0 0130
-Y 9,9 0 0131
-Z 8,9 0 0132
-[ 5,9,3 0 0133
-lB "
-\ 3,9 0 0134
-rs "
-] 5,9,3 0 0135
-rB "
-^ 6,9 0 0136
-a^ "
-ha "
-_ 6,0,3 0 0137
-` 4,9 0 0140
-oq "
-a 6,6 0 0141
-b 6,9 0 0142
-c 5,6 0 0143
-d 6,9 0 0144
-e 6,6 0 0145
-f 3,9 0 0146
-g 6,6,3 0 0147
-h 6,9 0 0150
-i 3,9 0 0151
-j 3,9,3 0 0152
-k 6,9 0 0153
-l 3,9 0 0154
-m 9,6 0 0155
-n 6,6 0 0156
-o 6,6 0 0157
-p 6,6,3 0 0160
-q 6,6,3 0 0161
-r 4,6 0 0162
-s 6,6 0 0163
-t 4,7 0 0164
-u 6,6 0 0165
-v 6,6 0 0166
-w 9,6 0 0167
-x 6,6 0 0170
-y 6,6,3 0 0171
-z 6,6 0 0172
-{ 6,9,3 0 0173
-lC "
-| 3,9 0 0174
-or "
-ba "
-} 6,9,3 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,3 0 0241
-¡ "
-ct 6,7,1 0 0242
-¢ "
-Po 6,9 0 0243
-£ "
-Cs 7,8 0 0244
-¤ "
-Ye 6,9 0 0245
-¥ "
-bb 3,9 0 0246
-¦ "
-sc 6,9,3 0 0247
-§ "
-ad 3,8 0 0250
-¨ "
-co 11,9 0 0251
-© "
-Of 5,9 0 0252
-ª "
-Fo 7,5 0 0253
-« "
-no 8,5 0 0254
-¬ "
-- 6,4 0 0255
-hy "
-­ "
-rg 11,9 0 0256
-® "
-a- 4,8 0 0257
-¯ "
-de 5,9 0 0260
-° "
-+- 7,7 0 0261
-± "
-S2 4,9 0 0262
-² "
-S3 4,9 0 0263
-³ "
-aa 4,9 0 0264
-´ "
-µ 6,6,3 0 0265
-ps 7,9,3 0 0266
-¶ "
-pc 3,4 0 0267
-· "
-ac 3,0,3 0 0270
-¸ "
-S1 4,9 0 0271
-¹ "
-Om 5,9 0 0272
-º "
-Fc 7,5 0 0273
-» "
-14 9,9 0 0274
-¼ "
-12 9,9 0 0275
-½ "
-34 9,9 0 0276
-¾ "
-r? 5,6,3 0 0277
-¿ "
-`A 9,12 0 0300
-À "
-'A 9,12 0 0301
-Á "
-^A 9,12 0 0302
-Â "
-~A 9,12 0 0303
-Ã "
-:A 9,11 0 0304
-Ä "
-oA 9,12 0 0305
-Å "
-AE 11,9 0 0306
-Æ "
-,C 8,9,3 0 0307
-Ç "
-`E 8,12 0 0310
-È "
-'E 8,12 0 0311
-É "
-^E 8,12 0 0312
-Ê "
-:E 8,11 0 0313
-Ë "
-`I 4,12 0 0314
-Ì "
-'I 4,12 0 0315
-Í "
-^I 4,12 0 0316
-Î "
-:I 4,11 0 0317
-Ï "
--D 9,9 0 0320
-Ð "
-~N 9,12 0 0321
-Ñ "
-`O 9,12 0 0322
-Ò "
-'O 9,12 0 0323
-Ó "
-^O 9,12 0 0324
-Ô "
-~O 9,12 0 0325
-Õ "
-:O 9,11 0 0326
-Ö "
-mu 7,6 0 0327
-× "
-/O 9,10 0 0330
-Ø "
-`U 8,12 0 0331
-Ù "
-'U 8,12 0 0332
-Ú "
-^U 8,12 0 0333
-Û "
-:U 8,11 0 0334
-Ü "
-'Y 9,12 0 0335
-Ý "
-TP 7,9 0 0336
-Þ "
-ss 6,9 0 0337
-ß "
-`a 6,9 0 0340
-à "
-'a 6,9 0 0341
-á "
-^a 6,9 0 0342
-â "
-~a 6,9 0 0343
-ã "
-:a 6,8 0 0344
-ä "
-oa 6,9 0 0345
-å "
-ae 9,6 0 0346
-æ "
-,c 5,6,3 0 0347
-ç "
-`e 6,9 0 0350
-è "
-'e 6,9 0 0351
-é "
-^e 6,9 0 0352
-ê "
-:e 6,8 0 0353
-ë "
-`i 3,9 0 0354
-ì "
-'i 3,9 0 0355
-í "
-^i 3,9 0 0356
-î "
-:i 3,8 0 0357
-ï "
-Sd 6,9 0 0360
-ð "
-~n 6,9 0 0361
-ñ "
-`o 6,9 0 0362
-ò "
-'o 6,9 0 0363
-ó "
-^o 6,9 0 0364
-ô "
-~o 6,9 0 0365
-õ "
-:o 6,8 0 0366
-ö "
-di 7,6 0 0367
-÷ "
-/o 6,6,1 0 0370
-ø "
-`u 6,9 0 0371
-ù "
-'u 6,9 0 0372
-ú "
-^u 6,9 0 0373
-û "
-:u 6,8 0 0374
-ü "
-'y 6,9,3 0 0375
-ý "
-Tp 6,9,3 0 0376
-þ "
-:y 6,8,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/CB b/contrib/groff/font/devX75/CB
deleted file mode 100644
index 58e0d8b09b2b..000000000000
--- a/contrib/groff/font/devX75/CB
+++ /dev/null
@@ -1,308 +0,0 @@
-name CB
-spacewidth 6
-charset
---- 6,1 0 040
-! 6,7 0 041
-" 6,6 0 042
-dq "
-# 6,7 0 043
-sh "
-$ 6,7,1 0 044
-Do "
-% 6,6 0 045
-& 6,6 0 046
-' 6,7 0 047
-cq "
-( 6,7,1 0 050
-) 6,7,1 0 051
-* 6,7 0 052
-+ 6,6 0 053
-, 6,1,2 0 054
-\- 6,4 0 055
-. 6,1 0 056
-/ 6,7,1 0 057
-sl "
-0 6,7 0 060
-1 6,7 0 061
-2 6,7 0 062
-3 6,7 0 063
-4 6,7 0 064
-5 6,7 0 065
-6 6,7 0 066
-7 6,7 0 067
-8 6,7 0 070
-9 6,7 0 071
-: 6,4 0 072
-; 6,4,2 0 073
-< 6,6 0 074
-= 6,5 0 075
-eq "
-> 6,6 0 076
-? 6,6 0 077
-@ 6,7,1 0 0100
-at "
-A 6,6 0 0101
-B 6,6 0 0102
-C 6,6 0 0103
-D 6,6 0 0104
-E 6,6 0 0105
-F 6,6 0 0106
-G 6,6 0 0107
-H 6,6 0 0110
-I 6,6 0 0111
-J 6,6 0 0112
-K 6,6 0 0113
-L 6,6 0 0114
-M 6,6 0 0115
-N 6,6 0 0116
-O 6,6 0 0117
-P 6,6 0 0120
-Q 6,6,1 0 0121
-R 6,6 0 0122
-S 6,6 0 0123
-T 6,6 0 0124
-U 6,6 0 0125
-V 6,6 0 0126
-W 6,6 0 0127
-X 6,6 0 0130
-Y 6,6 0 0131
-Z 6,6 0 0132
-[ 6,7,1 0 0133
-lB "
-\ 6,7,1 0 0134
-rs "
-] 6,7,1 0 0135
-rB "
-^ 6,7 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 6,7 0 0140
-oq "
-a 6,5 0 0141
-b 6,7 0 0142
-c 6,5 0 0143
-d 6,7 0 0144
-e 6,5 0 0145
-f 6,7 0 0146
-g 6,5,2 0 0147
-h 6,7 0 0150
-i 6,7 0 0151
-j 6,7,2 0 0152
-k 6,7 0 0153
-l 6,7 0 0154
-m 6,5 0 0155
-n 6,5 0 0156
-o 6,5 0 0157
-p 6,5,2 0 0160
-q 6,5,2 0 0161
-r 6,5 0 0162
-s 6,5 0 0163
-t 6,7 0 0164
-u 6,5 0 0165
-v 6,5 0 0166
-w 6,5 0 0167
-x 6,5 0 0170
-y 6,5,2 0 0171
-z 6,5 0 0172
-{ 6,7,1 0 0173
-lC "
-| 6,7,2 0 0174
-or "
-ba "
-} 6,7,1 0 0175
-rC "
-~ 6,5 0 0176
-a~ "
-ap "
-ti "
-r! 6,5,2 0 0241
-¡ "
-ct 6,7,1 0 0242
-¢ "
-Po 6,7 0 0243
-£ "
-Cs 6,6 0 0244
-¤ "
-Ye 6,7 0 0245
-¥ "
-bb 6,7,2 0 0246
-¦ "
-sc 6,7,1 0 0247
-§ "
-ad 6,7 0 0250
-¨ "
-co 6,7 0 0251
-© "
-Of 6,7 0 0252
-ª "
-Fo 6,5 0 0253
-« "
-no 6,5 0 0254
-¬ "
-- 6,4 0 0255
-hy "
-­ "
-rg 6,7 0 0256
-® "
-a- 6,7 0 0257
-¯ "
-de 6,7 0 0260
-° "
-+- 6,6 0 0261
-± "
-S2 6,7 0 0262
-² "
-S3 6,7 0 0263
-³ "
-aa 6,8 0 0264
-´ "
-µ 6,5,2 0 0265
-ps 6,7,1 0 0266
-¶ "
-pc 6,5 0 0267
-· "
-ac 6,1,2 0 0270
-¸ "
-S1 6,7 0 0271
-¹ "
-Om 6,7 0 0272
-º "
-Fc 6,5 0 0273
-» "
-14 6,8,1 0 0274
-¼ "
-12 6,8,1 0 0275
-½ "
-34 6,8,1 0 0276
-¾ "
-r? 6,4,2 0 0277
-¿ "
-`A 6,9 0 0300
-À "
-'A 6,9 0 0301
-Á "
-^A 6,9 0 0302
-Â "
-~A 6,9 0 0303
-Ã "
-:A 6,9 0 0304
-Ä "
-oA 6,9 0 0305
-Å "
-AE 6,6 0 0306
-Æ "
-,C 6,6,2 0 0307
-Ç "
-`E 6,9 0 0310
-È "
-'E 6,9 0 0311
-É "
-^E 6,9 0 0312
-Ê "
-:E 6,9 0 0313
-Ë "
-`I 6,9 0 0314
-Ì "
-'I 6,9 0 0315
-Í "
-^I 6,9 0 0316
-Î "
-:I 6,9 0 0317
-Ï "
--D 6,6 0 0320
-Ð "
-~N 6,9 0 0321
-Ñ "
-`O 6,9 0 0322
-Ò "
-'O 6,9 0 0323
-Ó "
-^O 6,9 0 0324
-Ô "
-~O 6,9 0 0325
-Õ "
-:O 6,9 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 6,6,1 0 0330
-Ø "
-`U 6,9 0 0331
-Ù "
-'U 6,9 0 0332
-Ú "
-^U 6,9 0 0333
-Û "
-:U 6,9 0 0334
-Ü "
-'Y 6,9 0 0335
-Ý "
-TP 6,6 0 0336
-Þ "
-ss 6,7 0 0337
-ß "
-`a 6,8 0 0340
-à "
-'a 6,8 0 0341
-á "
-^a 6,8 0 0342
-â "
-~a 6,8 0 0343
-ã "
-:a 6,8 0 0344
-ä "
-oa 6,9 0 0345
-å "
-ae 6,5 0 0346
-æ "
-,c 6,5,2 0 0347
-ç "
-`e 6,8 0 0350
-è "
-'e 6,8 0 0351
-é "
-^e 6,8 0 0352
-ê "
-:e 6,8 0 0353
-ë "
-`i 6,8 0 0354
-ì "
-'i 6,8 0 0355
-í "
-^i 6,8 0 0356
-î "
-:i 6,8 0 0357
-ï "
-Sd 6,8 0 0360
-ð "
-~n 6,8 0 0361
-ñ "
-`o 6,8 0 0362
-ò "
-'o 6,8 0 0363
-ó "
-^o 6,8 0 0364
-ô "
-~o 6,8 0 0365
-õ "
-:o 6,8 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 6,6,1 0 0370
-ø "
-`u 6,8 0 0371
-ù "
-'u 6,8 0 0372
-ú "
-^u 6,8 0 0373
-û "
-:u 6,8 0 0374
-ü "
-'y 6,8,2 0 0375
-ý "
-Tp 6,7,2 0 0376
-þ "
-:y 6,8,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/CBI b/contrib/groff/font/devX75/CBI
deleted file mode 100644
index db6f6baa596a..000000000000
--- a/contrib/groff/font/devX75/CBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name CBI
-spacewidth 6
-charset
---- 6,1 0 040
-! 6,7 0 041
-" 6,7 0 042
-dq "
-# 6,7 0 043
-sh "
-$ 6,7,1 0 044
-Do "
-% 6,7 0 045
-& 6,6 0 046
-' 6,7 0 047
-cq "
-( 6,7,2 0 050
-) 6,7,2 0 051
-* 6,7 0 052
-+ 6,6 0 053
-, 6,1,2 0 054
-\- 6,4 0 055
-. 6,1 0 056
-/ 6,7,1 0 057
-sl "
-0 6,7 0 060
-1 6,7 0 061
-2 6,7 0 062
-3 6,7 0 063
-4 6,7 0 064
-5 6,7 0 065
-6 6,7 0 066
-7 6,7 0 067
-8 6,7 0 070
-9 6,7 0 071
-: 6,4 0 072
-; 6,4,2 0 073
-< 6,6 0 074
-= 6,5 0 075
-eq "
-> 6,6 0 076
-? 6,7 0 077
-@ 6,7,1 0 0100
-at "
-A 6,6 0 0101
-B 6,6 0 0102
-C 6,6 0 0103
-D 6,6 0 0104
-E 6,6 0 0105
-F 6,6 0 0106
-G 6,6 0 0107
-H 6,6 0 0110
-I 6,6 0 0111
-J 6,6 0 0112
-K 6,6 0 0113
-L 6,6 0 0114
-M 6,6 0 0115
-N 6,6 0 0116
-O 6,6 0 0117
-P 6,6 0 0120
-Q 6,6,1 0 0121
-R 6,6 0 0122
-S 6,6 0 0123
-T 6,6 0 0124
-U 6,6 0 0125
-V 6,6 0 0126
-W 6,6 0 0127
-X 6,6 0 0130
-Y 6,6 0 0131
-Z 6,6 0 0132
-[ 6,7,2 0 0133
-lB "
-\ 6,7,1 0 0134
-rs "
-] 6,7,2 0 0135
-rB "
-^ 6,7 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 6,7 0 0140
-oq "
-a 6,5 0 0141
-b 6,7 0 0142
-c 6,5 0 0143
-d 6,7 0 0144
-e 6,5 0 0145
-f 6,7 0 0146
-g 6,5,2 0 0147
-h 6,7 0 0150
-i 6,7 0 0151
-j 6,7,2 0 0152
-k 6,7 0 0153
-l 6,7 0 0154
-m 6,5 0 0155
-n 6,5 0 0156
-o 6,5 0 0157
-p 6,5,2 0 0160
-q 6,5,2 0 0161
-r 6,5 0 0162
-s 6,5 0 0163
-t 6,7 0 0164
-u 6,5 0 0165
-v 6,5 0 0166
-w 6,5 0 0167
-x 6,5 0 0170
-y 6,5,2 0 0171
-z 6,5 0 0172
-{ 6,7,2 0 0173
-lC "
-| 6,7,1 0 0174
-or "
-ba "
-} 6,7,2 0 0175
-rC "
-~ 6,5 0 0176
-a~ "
-ap "
-ti "
-r! 6,5,2 0 0241
-¡ "
-ct 6,7,1 0 0242
-¢ "
-Po 6,6 0 0243
-£ "
-Cs 6,6 0 0244
-¤ "
-Ye 6,6 0 0245
-¥ "
-bb 6,7,1 0 0246
-¦ "
-sc 6,7,1 0 0247
-§ "
-ad 6,7 0 0250
-¨ "
-co 6,7 0 0251
-© "
-Of 6,6 0 0252
-ª "
-Fo 6,4 0 0253
-« "
-no 6,5 0 0254
-¬ "
-- 6,4 0 0255
-hy "
-­ "
-rg 6,7 0 0256
-® "
-a- 6,7 0 0257
-¯ "
-de 6,7 0 0260
-° "
-+- 6,6 0 0261
-± "
-S2 6,7 0 0262
-² "
-S3 6,7 0 0263
-³ "
-aa 6,8 0 0264
-´ "
-µ 6,5,2 0 0265
-ps 6,7,1 0 0266
-¶ "
-pc 6,4 0 0267
-· "
-ac 6,0,2 0 0270
-¸ "
-S1 6,7 0 0271
-¹ "
-Om 6,6 0 0272
-º "
-Fc 6,4 0 0273
-» "
-14 6,8,1 0 0274
-¼ "
-12 6,8,1 0 0275
-½ "
-34 6,8,1 0 0276
-¾ "
-r? 6,6,2 0 0277
-¿ "
-`A 6,9 0 0300
-À "
-'A 6,9 0 0301
-Á "
-^A 6,9 0 0302
-Â "
-~A 6,9 0 0303
-Ã "
-:A 6,8 0 0304
-Ä "
-oA 6,9 0 0305
-Å "
-AE 6,6 0 0306
-Æ "
-,C 6,6,2 0 0307
-Ç "
-`E 6,9 0 0310
-È "
-'E 6,9 0 0311
-É "
-^E 6,9 0 0312
-Ê "
-:E 6,8 0 0313
-Ë "
-`I 6,9 0 0314
-Ì "
-'I 6,9 0 0315
-Í "
-^I 6,9 0 0316
-Î "
-:I 6,8 0 0317
-Ï "
--D 6,6 0 0320
-Ð "
-~N 6,9 0 0321
-Ñ "
-`O 6,9 0 0322
-Ò "
-'O 6,9 0 0323
-Ó "
-^O 6,9 0 0324
-Ô "
-~O 6,9 0 0325
-Õ "
-:O 6,8 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 6,7 0 0330
-Ø "
-`U 6,9 0 0331
-Ù "
-'U 6,9 0 0332
-Ú "
-^U 6,9 0 0333
-Û "
-:U 6,8 0 0334
-Ü "
-'Y 6,9 0 0335
-Ý "
-TP 6,6 0 0336
-Þ "
-ss 6,7 0 0337
-ß "
-`a 6,8 0 0340
-à "
-'a 6,8 0 0341
-á "
-^a 6,8 0 0342
-â "
-~a 6,8 0 0343
-ã "
-:a 6,7 0 0344
-ä "
-oa 6,9 0 0345
-å "
-ae 6,5 0 0346
-æ "
-,c 6,5,2 0 0347
-ç "
-`e 6,8 0 0350
-è "
-'e 6,8 0 0351
-é "
-^e 6,8 0 0352
-ê "
-:e 6,7 0 0353
-ë "
-`i 6,8 0 0354
-ì "
-'i 6,8 0 0355
-í "
-^i 6,8 0 0356
-î "
-:i 6,7 0 0357
-ï "
-Sd 6,8 0 0360
-ð "
-~n 6,8 0 0361
-ñ "
-`o 6,8 0 0362
-ò "
-'o 6,8 0 0363
-ó "
-^o 6,8 0 0364
-ô "
-~o 6,8 0 0365
-õ "
-:o 6,7 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 6,5 0 0370
-ø "
-`u 6,8 0 0371
-ù "
-'u 6,8 0 0372
-ú "
-^u 6,8 0 0373
-û "
-:u 6,7 0 0374
-ü "
-'y 6,8,2 0 0375
-ý "
-Tp 6,7,2 0 0376
-þ "
-:y 6,7,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/CI b/contrib/groff/font/devX75/CI
deleted file mode 100644
index 43d383affcf9..000000000000
--- a/contrib/groff/font/devX75/CI
+++ /dev/null
@@ -1,308 +0,0 @@
-name CI
-spacewidth 6
-charset
---- 6,1 0 040
-! 6,7 0 041
-" 6,7 0 042
-dq "
-# 6,7 0 043
-sh "
-$ 6,7,1 0 044
-Do "
-% 6,7 0 045
-& 6,6 0 046
-' 6,7 0 047
-cq "
-( 6,7,1 0 050
-) 6,7,1 0 051
-* 6,7 0 052
-+ 6,6 0 053
-, 6,1,2 0 054
-\- 6,4 0 055
-. 6,1 0 056
-/ 6,7,1 0 057
-sl "
-0 6,7 0 060
-1 6,7 0 061
-2 6,7 0 062
-3 6,7 0 063
-4 6,7 0 064
-5 6,7 0 065
-6 6,7 0 066
-7 6,7 0 067
-8 6,7 0 070
-9 6,7 0 071
-: 6,4 0 072
-; 6,4,2 0 073
-< 6,6 0 074
-= 6,5 0 075
-eq "
-> 6,6 0 076
-? 6,6 0 077
-@ 6,7 0 0100
-at "
-A 6,6 0 0101
-B 6,6 0 0102
-C 6,6 0 0103
-D 6,6 0 0104
-E 6,6 0 0105
-F 6,6 0 0106
-G 6,6 0 0107
-H 6,6 0 0110
-I 6,6 0 0111
-J 6,6 0 0112
-K 6,6 0 0113
-L 6,6 0 0114
-M 6,6 0 0115
-N 6,6 0 0116
-O 6,6 0 0117
-P 6,6 0 0120
-Q 6,6,2 0 0121
-R 6,6 0 0122
-S 6,6 0 0123
-T 6,6 0 0124
-U 6,6 0 0125
-V 6,6 0 0126
-W 6,6 0 0127
-X 6,6 0 0130
-Y 6,6 0 0131
-Z 6,6 0 0132
-[ 6,7,1 0 0133
-lB "
-\ 6,7,1 0 0134
-rs "
-] 6,7,1 0 0135
-rB "
-^ 6,7 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 6,7 0 0140
-oq "
-a 6,5 0 0141
-b 6,7 0 0142
-c 6,5 0 0143
-d 6,7 0 0144
-e 6,5 0 0145
-f 6,7 0 0146
-g 6,5,2 0 0147
-h 6,7 0 0150
-i 6,7 0 0151
-j 6,7,2 0 0152
-k 6,7 0 0153
-l 6,7 0 0154
-m 6,5 0 0155
-n 6,5 0 0156
-o 6,5 0 0157
-p 6,5,2 0 0160
-q 6,5,2 0 0161
-r 6,5 0 0162
-s 6,5 0 0163
-t 6,7 0 0164
-u 6,5 0 0165
-v 6,5 0 0166
-w 6,5 0 0167
-x 6,5 0 0170
-y 6,5,2 0 0171
-z 6,5 0 0172
-{ 6,7,1 0 0173
-lC "
-| 6,7,1 0 0174
-or "
-ba "
-} 6,7,1 0 0175
-rC "
-~ 6,5 0 0176
-a~ "
-ap "
-ti "
-r! 6,5,2 0 0241
-¡ "
-ct 6,6 0 0242
-¢ "
-Po 6,7 0 0243
-£ "
-Cs 6,6 0 0244
-¤ "
-Ye 6,6 0 0245
-¥ "
-bb 6,7,2 0 0246
-¦ "
-sc 6,7,1 0 0247
-§ "
-ad 6,7 0 0250
-¨ "
-co 6,7 0 0251
-© "
-Of 6,7 0 0252
-ª "
-Fo 6,4 0 0253
-« "
-no 6,5 0 0254
-¬ "
-- 6,4 0 0255
-hy "
-­ "
-rg 6,7 0 0256
-® "
-a- 6,7 0 0257
-¯ "
-de 6,7 0 0260
-° "
-+- 6,6 0 0261
-± "
-S2 6,7 0 0262
-² "
-S3 6,7 0 0263
-³ "
-aa 6,8 0 0264
-´ "
-µ 6,5,2 0 0265
-ps 6,7,1 0 0266
-¶ "
-pc 6,4 0 0267
-· "
-ac 6,0,2 0 0270
-¸ "
-S1 6,7 0 0271
-¹ "
-Om 6,7 0 0272
-º "
-Fc 6,4 0 0273
-» "
-14 6,8,1 0 0274
-¼ "
-12 6,8,1 0 0275
-½ "
-34 6,8,1 0 0276
-¾ "
-r? 6,4,2 0 0277
-¿ "
-`A 6,9 0 0300
-À "
-'A 6,9 0 0301
-Á "
-^A 6,9 0 0302
-Â "
-~A 6,9 0 0303
-Ã "
-:A 6,8 0 0304
-Ä "
-oA 6,9 0 0305
-Å "
-AE 6,6 0 0306
-Æ "
-,C 6,6,2 0 0307
-Ç "
-`E 6,9 0 0310
-È "
-'E 6,9 0 0311
-É "
-^E 6,9 0 0312
-Ê "
-:E 6,8 0 0313
-Ë "
-`I 6,9 0 0314
-Ì "
-'I 6,9 0 0315
-Í "
-^I 6,9 0 0316
-Î "
-:I 6,8 0 0317
-Ï "
--D 6,6 0 0320
-Ð "
-~N 6,9 0 0321
-Ñ "
-`O 6,9 0 0322
-Ò "
-'O 6,9 0 0323
-Ó "
-^O 6,9 0 0324
-Ô "
-~O 6,9 0 0325
-Õ "
-:O 6,8 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 6,6 0 0330
-Ø "
-`U 6,9 0 0331
-Ù "
-'U 6,9 0 0332
-Ú "
-^U 6,9 0 0333
-Û "
-:U 6,8 0 0334
-Ü "
-'Y 6,9 0 0335
-Ý "
-TP 6,6 0 0336
-Þ "
-ss 6,7 0 0337
-ß "
-`a 6,8 0 0340
-à "
-'a 6,8 0 0341
-á "
-^a 6,8 0 0342
-â "
-~a 6,8 0 0343
-ã "
-:a 6,7 0 0344
-ä "
-oa 6,9 0 0345
-å "
-ae 6,5 0 0346
-æ "
-,c 6,5,2 0 0347
-ç "
-`e 6,8 0 0350
-è "
-'e 6,8 0 0351
-é "
-^e 6,8 0 0352
-ê "
-:e 6,7 0 0353
-ë "
-`i 6,8 0 0354
-ì "
-'i 6,8 0 0355
-í "
-^i 6,8 0 0356
-î "
-:i 6,7 0 0357
-ï "
-Sd 6,8 0 0360
-ð "
-~n 6,8 0 0361
-ñ "
-`o 6,8 0 0362
-ò "
-'o 6,8 0 0363
-ó "
-^o 6,8 0 0364
-ô "
-~o 6,8 0 0365
-õ "
-:o 6,7 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 6,6,1 0 0370
-ø "
-`u 6,8 0 0371
-ù "
-'u 6,8 0 0372
-ú "
-^u 6,8 0 0373
-û "
-:u 6,7 0 0374
-ü "
-'y 6,8,2 0 0375
-ý "
-Tp 6,7,2 0 0376
-þ "
-:y 6,7,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/CR b/contrib/groff/font/devX75/CR
deleted file mode 100644
index 900a4a0268ce..000000000000
--- a/contrib/groff/font/devX75/CR
+++ /dev/null
@@ -1,308 +0,0 @@
-name CR
-spacewidth 6
-charset
---- 6,1 0 040
-! 6,7 0 041
-" 6,7 0 042
-dq "
-# 6,7 0 043
-sh "
-$ 6,7,1 0 044
-Do "
-% 6,6 0 045
-& 6,6 0 046
-' 6,7 0 047
-cq "
-( 6,7,2 0 050
-) 6,7,2 0 051
-* 6,7 0 052
-+ 6,6 0 053
-, 6,1,2 0 054
-\- 6,4 0 055
-. 6,1 0 056
-/ 6,7,1 0 057
-sl "
-0 6,7 0 060
-1 6,7 0 061
-2 6,7 0 062
-3 6,7 0 063
-4 6,7 0 064
-5 6,7 0 065
-6 6,7 0 066
-7 6,7 0 067
-8 6,7 0 070
-9 6,7 0 071
-: 6,4 0 072
-; 6,4,2 0 073
-< 6,6 0 074
-= 6,5 0 075
-eq "
-> 6,6 0 076
-? 6,6 0 077
-@ 6,7,1 0 0100
-at "
-A 6,6 0 0101
-B 6,6 0 0102
-C 6,6 0 0103
-D 6,6 0 0104
-E 6,6 0 0105
-F 6,6 0 0106
-G 6,6 0 0107
-H 6,6 0 0110
-I 6,6 0 0111
-J 6,6 0 0112
-K 6,6 0 0113
-L 6,6 0 0114
-M 6,6 0 0115
-N 6,6 0 0116
-O 6,6 0 0117
-P 6,6 0 0120
-Q 6,6,1 0 0121
-R 6,6 0 0122
-S 6,6 0 0123
-T 6,6 0 0124
-U 6,6 0 0125
-V 6,6 0 0126
-W 6,6 0 0127
-X 6,6 0 0130
-Y 6,6 0 0131
-Z 6,6 0 0132
-[ 6,7,2 0 0133
-lB "
-\ 6,7,1 0 0134
-rs "
-] 6,7,2 0 0135
-rB "
-^ 6,7 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 6,7 0 0140
-oq "
-a 6,5 0 0141
-b 6,7 0 0142
-c 6,5 0 0143
-d 6,7 0 0144
-e 6,5 0 0145
-f 6,7 0 0146
-g 6,5,2 0 0147
-h 6,7 0 0150
-i 6,7 0 0151
-j 6,7,2 0 0152
-k 6,7 0 0153
-l 6,7 0 0154
-m 6,5 0 0155
-n 6,5 0 0156
-o 6,5 0 0157
-p 6,5,2 0 0160
-q 6,5,2 0 0161
-r 6,5 0 0162
-s 6,5 0 0163
-t 6,7 0 0164
-u 6,5 0 0165
-v 6,5 0 0166
-w 6,5 0 0167
-x 6,5 0 0170
-y 6,5,2 0 0171
-z 6,5 0 0172
-{ 6,7,2 0 0173
-lC "
-| 6,7,2 0 0174
-or "
-ba "
-} 6,7,2 0 0175
-rC "
-~ 6,5 0 0176
-a~ "
-ap "
-ti "
-r! 6,5,2 0 0241
-¡ "
-ct 6,7,1 0 0242
-¢ "
-Po 6,7 0 0243
-£ "
-Cs 6,6 0 0244
-¤ "
-Ye 6,7 0 0245
-¥ "
-bb 6,7,2 0 0246
-¦ "
-sc 6,6,1 0 0247
-§ "
-ad 6,7 0 0250
-¨ "
-co 6,7 0 0251
-© "
-Of 6,6 0 0252
-ª "
-Fo 6,4 0 0253
-« "
-no 6,5 0 0254
-¬ "
-- 6,4 0 0255
-hy "
-­ "
-rg 6,7 0 0256
-® "
-a- 6,7 0 0257
-¯ "
-de 6,7 0 0260
-° "
-+- 6,6 0 0261
-± "
-S2 6,7 0 0262
-² "
-S3 6,7 0 0263
-³ "
-aa 6,8 0 0264
-´ "
-µ 6,5,2 0 0265
-ps 6,6,1 0 0266
-¶ "
-pc 6,4 0 0267
-· "
-ac 6,1,2 0 0270
-¸ "
-S1 6,7 0 0271
-¹ "
-Om 6,6 0 0272
-º "
-Fc 6,4 0 0273
-» "
-14 6,8,1 0 0274
-¼ "
-12 6,8,1 0 0275
-½ "
-34 6,8,1 0 0276
-¾ "
-r? 6,4,2 0 0277
-¿ "
-`A 6,9 0 0300
-À "
-'A 6,9 0 0301
-Á "
-^A 6,9 0 0302
-Â "
-~A 6,9 0 0303
-Ã "
-:A 6,8 0 0304
-Ä "
-oA 6,9 0 0305
-Å "
-AE 6,6 0 0306
-Æ "
-,C 6,6,2 0 0307
-Ç "
-`E 6,9 0 0310
-È "
-'E 6,9 0 0311
-É "
-^E 6,9 0 0312
-Ê "
-:E 6,8 0 0313
-Ë "
-`I 6,9 0 0314
-Ì "
-'I 6,9 0 0315
-Í "
-^I 6,9 0 0316
-Î "
-:I 6,8 0 0317
-Ï "
--D 6,6 0 0320
-Ð "
-~N 6,9 0 0321
-Ñ "
-`O 6,9 0 0322
-Ò "
-'O 6,9 0 0323
-Ó "
-^O 6,9 0 0324
-Ô "
-~O 6,9 0 0325
-Õ "
-:O 6,8 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 6,6 0 0330
-Ø "
-`U 6,9 0 0331
-Ù "
-'U 6,9 0 0332
-Ú "
-^U 6,9 0 0333
-Û "
-:U 6,8 0 0334
-Ü "
-'Y 6,9 0 0335
-Ý "
-TP 6,6 0 0336
-Þ "
-ss 6,7 0 0337
-ß "
-`a 6,8 0 0340
-à "
-'a 6,8 0 0341
-á "
-^a 6,8 0 0342
-â "
-~a 6,8 0 0343
-ã "
-:a 6,7 0 0344
-ä "
-oa 6,9 0 0345
-å "
-ae 6,5 0 0346
-æ "
-,c 6,5,2 0 0347
-ç "
-`e 6,8 0 0350
-è "
-'e 6,8 0 0351
-é "
-^e 6,8 0 0352
-ê "
-:e 6,7 0 0353
-ë "
-`i 6,8 0 0354
-ì "
-'i 6,8 0 0355
-í "
-^i 6,8 0 0356
-î "
-:i 6,7 0 0357
-ï "
-Sd 6,8 0 0360
-ð "
-~n 6,8 0 0361
-ñ "
-`o 6,8 0 0362
-ò "
-'o 6,8 0 0363
-ó "
-^o 6,8 0 0364
-ô "
-~o 6,8 0 0365
-õ "
-:o 6,7 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 6,5 0 0370
-ø "
-`u 6,8 0 0371
-ù "
-'u 6,8 0 0372
-ú "
-^u 6,8 0 0373
-û "
-:u 6,7 0 0374
-ü "
-'y 6,8,2 0 0375
-ý "
-Tp 6,7,2 0 0376
-þ "
-:y 6,7,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/DESC b/contrib/groff/font/devX75/DESC
deleted file mode 100644
index 172170c9c0b5..000000000000
--- a/contrib/groff/font/devX75/DESC
+++ /dev/null
@@ -1,9 +0,0 @@
-styles R I B BI
-fonts 6 0 0 0 0 0 S
-sizes 8 10 12 14 18 24 0
-res 75
-X11
-hor 1
-vert 1
-unitwidth 10
-postpro gxditview
diff --git a/contrib/groff/font/devX75/HB b/contrib/groff/font/devX75/HB
deleted file mode 100644
index ab6f9798ea0e..000000000000
--- a/contrib/groff/font/devX75/HB
+++ /dev/null
@@ -1,308 +0,0 @@
-name HB
-spacewidth 3
-charset
---- 3,1 0 040
-! 4,8 0 041
-" 5,8 0 042
-dq "
-# 6,7 0 043
-sh "
-$ 6,8,1 0 044
-Do "
-% 8,8 0 045
-& 8,8 0 046
-' 3,8 0 047
-cq "
-( 4,8,2 0 050
-) 4,8,2 0 051
-* 4,8 0 052
-+ 6,6 0 053
-, 3,2,2 0 054
-\- 7,4 0 055
-. 3,2 0 056
-/ 4,8 0 057
-sl "
-0 6,8 0 060
-1 6,8 0 061
-2 6,8 0 062
-3 6,8 0 063
-4 6,8 0 064
-5 6,8 0 065
-6 6,8 0 066
-7 6,8 0 067
-8 6,8 0 070
-9 6,8 0 071
-: 3,6 0 072
-; 3,6,2 0 073
-< 5,6 0 074
-= 6,5 0 075
-eq "
-> 5,6 0 076
-? 6,8 0 077
-@ 11,7,2 0 0100
-at "
-A 8,8 0 0101
-B 7,8 0 0102
-C 8,8 0 0103
-D 7,8 0 0104
-E 6,8 0 0105
-F 6,8 0 0106
-G 8,8 0 0107
-H 7,8 0 0110
-I 3,8 0 0111
-J 6,8 0 0112
-K 7,8 0 0113
-L 6,8 0 0114
-M 10,8 0 0115
-N 8,8 0 0116
-O 8,8 0 0117
-P 7,8 0 0120
-Q 8,8,1 0 0121
-R 7,8 0 0122
-S 7,8 0 0123
-T 7,8 0 0124
-U 7,8 0 0125
-V 8,8 0 0126
-W 11,8 0 0127
-X 8,8 0 0130
-Y 9,8 0 0131
-Z 7,8 0 0132
-[ 4,8,2 0 0133
-lB "
-\ 4,8 0 0134
-rs "
-] 4,8,2 0 0135
-rB "
-^ 5,8 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 3,8 0 0140
-oq "
-a 6,6 0 0141
-b 6,8 0 0142
-c 5,6 0 0143
-d 6,8 0 0144
-e 6,6 0 0145
-f 4,8 0 0146
-g 6,6,2 0 0147
-h 6,8 0 0150
-i 3,8 0 0151
-j 3,8,2 0 0152
-k 6,8 0 0153
-l 3,8 0 0154
-m 9,6 0 0155
-n 6,6 0 0156
-o 6,6 0 0157
-p 6,6,2 0 0160
-q 6,6,2 0 0161
-r 4,6 0 0162
-s 6,6 0 0163
-t 4,8 0 0164
-u 6,6 0 0165
-v 6,6 0 0166
-w 8,6 0 0167
-x 7,6 0 0170
-y 6,6,2 0 0171
-z 6,6 0 0172
-{ 5,8,2 0 0173
-lC "
-| 3,8,2 0 0174
-or "
-ba "
-} 5,8,2 0 0175
-rC "
-~ 6,4 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,2 0 0241
-¡ "
-ct 6,7,1 0 0242
-¢ "
-Po 6,8 0 0243
-£ "
-Cs 6,7 0 0244
-¤ "
-Ye 7,8 0 0245
-¥ "
-bb 3,8,2 0 0246
-¦ "
-sc 6,8,2 0 0247
-§ "
-ad 3,8 0 0250
-¨ "
-co 10,8 0 0251
-© "
-Of 5,8 0 0252
-ª "
-Fo 7,4 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 10,8 0 0256
-® "
-a- 3,8 0 0257
-¯ "
-de 4,7 0 0260
-° "
-+- 6,7 0 0261
-± "
-S2 3,7 0 0262
-² "
-S3 3,7 0 0263
-³ "
-aa 3,9 0 0264
-´ "
-µ 6,6,2 0 0265
-ps 6,8,2 0 0266
-¶ "
-pc 3,4 0 0267
-· "
-ac 3,0,2 0 0270
-¸ "
-S1 3,7 0 0271
-¹ "
-Om 5,8 0 0272
-º "
-Fc 7,4 0 0273
-» "
-14 9,8 0 0274
-¼ "
-12 9,8 0 0275
-½ "
-34 9,8 0 0276
-¾ "
-r? 6,6,2 0 0277
-¿ "
-`A 8,11 0 0300
-À "
-'A 8,11 0 0301
-Á "
-^A 8,11 0 0302
-Â "
-~A 8,11 0 0303
-Ã "
-:A 8,10 0 0304
-Ä "
-oA 8,11 0 0305
-Å "
-AE 10,8 0 0306
-Æ "
-,C 8,8,2 0 0307
-Ç "
-`E 6,11 0 0310
-È "
-'E 6,11 0 0311
-É "
-^E 6,11 0 0312
-Ê "
-:E 6,10 0 0313
-Ë "
-`I 3,11 0 0314
-Ì "
-'I 3,11 0 0315
-Í "
-^I 3,11 0 0316
-Î "
-:I 3,10 0 0317
-Ï "
--D 7,8 0 0320
-Ð "
-~N 8,11 0 0321
-Ñ "
-`O 8,11 0 0322
-Ò "
-'O 8,11 0 0323
-Ó "
-^O 8,11 0 0324
-Ô "
-~O 8,11 0 0325
-Õ "
-:O 8,10 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 8,8 0 0330
-Ø "
-`U 7,11 0 0331
-Ù "
-'U 7,11 0 0332
-Ú "
-^U 7,11 0 0333
-Û "
-:U 7,10 0 0334
-Ü "
-'Y 9,11 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 6,8 0 0337
-ß "
-`a 6,9 0 0340
-à "
-'a 6,9 0 0341
-á "
-^a 6,9 0 0342
-â "
-~a 6,9 0 0343
-ã "
-:a 6,9 0 0344
-ä "
-oa 6,9 0 0345
-å "
-ae 9,6 0 0346
-æ "
-,c 5,6,2 0 0347
-ç "
-`e 6,9 0 0350
-è "
-'e 6,9 0 0351
-é "
-^e 6,9 0 0352
-ê "
-:e 6,9 0 0353
-ë "
-`i 3,9 0 0354
-ì "
-'i 3,9 0 0355
-í "
-^i 3,9 0 0356
-î "
-:i 3,9 0 0357
-ï "
-Sd 6,9 0 0360
-ð "
-~n 6,9 0 0361
-ñ "
-`o 6,9 0 0362
-ò "
-'o 6,9 0 0363
-ó "
-^o 6,9 0 0364
-ô "
-~o 6,9 0 0365
-õ "
-:o 6,9 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 6,6 0 0370
-ø "
-`u 6,9 0 0371
-ù "
-'u 6,9 0 0372
-ú "
-^u 6,9 0 0373
-û "
-:u 6,9 0 0374
-ü "
-'y 6,9,2 0 0375
-ý "
-Tp 6,8,2 0 0376
-þ "
-:y 6,9,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/HBI b/contrib/groff/font/devX75/HBI
deleted file mode 100644
index ec132d3d648a..000000000000
--- a/contrib/groff/font/devX75/HBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name HBI
-spacewidth 3
-charset
---- 3,1 0 040
-! 4,8 0 041
-" 6,8 0 042
-dq "
-# 7,7 0 043
-sh "
-$ 6,8,1 0 044
-Do "
-% 9,8 0 045
-& 8,8 0 046
-' 3,8 0 047
-cq "
-( 5,8,2 0 050
-) 5,8,2 0 051
-* 6,8 0 052
-+ 6,6 0 053
-, 3,2,2 0 054
-\- 7,4 0 055
-. 3,2 0 056
-/ 5,8 0 057
-sl "
-0 6,8 0 060
-1 6,8 0 061
-2 6,8 0 062
-3 6,8 0 063
-4 6,8 0 064
-5 6,8 0 065
-6 6,8 0 066
-7 6,8 0 067
-8 6,8 0 070
-9 6,8 0 071
-: 3,6 0 072
-; 3,6,2 0 073
-< 6,6 0 074
-= 6,5 0 075
-eq "
-> 7,6 0 076
-? 6,8 0 077
-@ 10,7,2 0 0100
-at "
-A 8,8 0 0101
-B 7,8 0 0102
-C 7,8 0 0103
-D 8,8 0 0104
-E 6,8 0 0105
-F 5,8 0 0106
-G 8,8 0 0107
-H 7,8 0 0110
-I 3,8 0 0111
-J 6,8 0 0112
-K 8,8 0 0113
-L 6,8 0 0114
-M 10,8 0 0115
-N 8,8 0 0116
-O 8,8 0 0117
-P 7,8 0 0120
-Q 8,8 0 0121
-R 8,8 0 0122
-S 7,8 0 0123
-T 6,8 0 0124
-U 7,8 0 0125
-V 8,8 0 0126
-W 10,8 0 0127
-X 7,8 0 0130
-Y 7,8 0 0131
-Z 7,8 0 0132
-[ 4,8,2 0 0133
-lB "
-\ 5,8 0 0134
-rs "
-] 4,8,2 0 0135
-rB "
-^ 6,8 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 4,8 0 0140
-oq "
-a 6,6 0 0141
-b 6,8 0 0142
-c 5,6 0 0143
-d 6,8 0 0144
-e 6,6 0 0145
-f 3,8 0 0146
-g 6,6,2 0 0147
-h 6,8 0 0150
-i 3,8 0 0151
-j 3,8,2 0 0152
-k 6,8 0 0153
-l 3,8 0 0154
-m 9,6 0 0155
-n 6,6 0 0156
-o 6,6 0 0157
-p 6,6,2 0 0160
-q 6,6,2 0 0161
-r 4,6 0 0162
-s 6,6 0 0163
-t 4,8 0 0164
-u 6,6 0 0165
-v 6,6 0 0166
-w 8,6 0 0167
-x 5,6 0 0170
-y 6,6,2 0 0171
-z 5,6 0 0172
-{ 5,8,2 0 0173
-lC "
-| 4,8,2 0 0174
-or "
-ba "
-} 5,8,2 0 0175
-rC "
-~ 6,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,2 0 0241
-¡ "
-ct 7,7,1 0 0242
-¢ "
-Po 7,7 0 0243
-£ "
-Cs 6,7 0 0244
-¤ "
-Ye 7,8 0 0245
-¥ "
-bb 4,8,1 0 0246
-¦ "
-sc 7,8,2 0 0247
-§ "
-ad 4,8 0 0250
-¨ "
-co 10,8 0 0251
-© "
-Of 5,8 0 0252
-ª "
-Fo 8,5 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 5,4 0 0255
-hy "
-­ "
-rg 10,8 0 0256
-® "
-a- 4,8 0 0257
-¯ "
-de 4,7 0 0260
-° "
-+- 6,7 0 0261
-± "
-S2 3,7 0 0262
-² "
-S3 3,7 0 0263
-³ "
-aa 3,9 0 0264
-´ "
-µ 6,6,2 0 0265
-ps 7,8,2 0 0266
-¶ "
-pc 3,4 0 0267
-· "
-ac 3,1,2 0 0270
-¸ "
-S1 3,7 0 0271
-¹ "
-Om 5,8 0 0272
-º "
-Fc 8,5 0 0273
-» "
-14 9,8 0 0274
-¼ "
-12 9,8 0 0275
-½ "
-34 9,8 0 0276
-¾ "
-r? 6,6,2 0 0277
-¿ "
-`A 8,11 0 0300
-À "
-'A 8,11 0 0301
-Á "
-^A 8,11 0 0302
-Â "
-~A 8,11 0 0303
-Ã "
-:A 8,10 0 0304
-Ä "
-oA 8,11 0 0305
-Å "
-AE 10,8 0 0306
-Æ "
-,C 7,8,2 0 0307
-Ç "
-`E 6,11 0 0310
-È "
-'E 6,11 0 0311
-É "
-^E 6,11 0 0312
-Ê "
-:E 6,10 0 0313
-Ë "
-`I 3,11 0 0314
-Ì "
-'I 3,11 0 0315
-Í "
-^I 3,11 0 0316
-Î "
-:I 3,10 0 0317
-Ï "
--D 8,8 0 0320
-Ð "
-~N 8,11 0 0321
-Ñ "
-`O 8,11 0 0322
-Ò "
-'O 8,11 0 0323
-Ó "
-^O 8,11 0 0324
-Ô "
-~O 8,11 0 0325
-Õ "
-:O 8,10 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 8,8 0 0330
-Ø "
-`U 7,11 0 0331
-Ù "
-'U 7,11 0 0332
-Ú "
-^U 7,11 0 0333
-Û "
-:U 7,10 0 0334
-Ü "
-'Y 7,11 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 7,8 0 0337
-ß "
-`a 6,9 0 0340
-à "
-'a 6,9 0 0341
-á "
-^a 6,9 0 0342
-â "
-~a 6,9 0 0343
-ã "
-:a 6,8 0 0344
-ä "
-oa 6,9 0 0345
-å "
-ae 9,6 0 0346
-æ "
-,c 5,6,2 0 0347
-ç "
-`e 6,9 0 0350
-è "
-'e 6,9 0 0351
-é "
-^e 6,9 0 0352
-ê "
-:e 6,8 0 0353
-ë "
-`i 3,9 0 0354
-ì "
-'i 3,9 0 0355
-í "
-^i 3,9 0 0356
-î "
-:i 3,8 0 0357
-ï "
-Sd 6,9 0 0360
-ð "
-~n 6,9 0 0361
-ñ "
-`o 6,9 0 0362
-ò "
-'o 6,9 0 0363
-ó "
-^o 6,9 0 0364
-ô "
-~o 6,9 0 0365
-õ "
-:o 6,8 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 8,6 0 0370
-ø "
-`u 6,9 0 0371
-ù "
-'u 6,9 0 0372
-ú "
-^u 6,9 0 0373
-û "
-:u 6,8 0 0374
-ü "
-'y 6,9,2 0 0375
-ý "
-Tp 6,8,2 0 0376
-þ "
-:y 6,8,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/HI b/contrib/groff/font/devX75/HI
deleted file mode 100644
index 324e4b712649..000000000000
--- a/contrib/groff/font/devX75/HI
+++ /dev/null
@@ -1,308 +0,0 @@
-name HI
-spacewidth 3
-charset
---- 3,1 0 040
-! 4,8 0 041
-" 4,8 0 042
-dq "
-# 7,7 0 043
-sh "
-$ 6,8,1 0 044
-Do "
-% 9,8 0 045
-& 8,8 0 046
-' 3,8 0 047
-cq "
-( 4,8,2 0 050
-) 4,8,2 0 051
-* 4,8 0 052
-+ 6,6 0 053
-, 3,1,2 0 054
-\- 7,4 0 055
-. 3,1 0 056
-/ 3,8 0 057
-sl "
-0 6,8 0 060
-1 6,8 0 061
-2 6,8 0 062
-3 6,8 0 063
-4 6,8 0 064
-5 6,8 0 065
-6 6,8 0 066
-7 6,8 0 067
-8 6,8 0 070
-9 6,8 0 071
-: 3,6 0 072
-; 3,6,2 0 073
-< 6,6 0 074
-= 7,5 0 075
-eq "
-> 6,6 0 076
-? 6,8 0 077
-@ 11,8,2 0 0100
-at "
-A 7,8 0 0101
-B 7,8 0 0102
-C 8,8 0 0103
-D 8,8 0 0104
-E 7,8 0 0105
-F 6,8 0 0106
-G 8,8 0 0107
-H 8,8 0 0110
-I 3,8 0 0111
-J 5,8 0 0112
-K 7,8 0 0113
-L 5,8 0 0114
-M 9,8 0 0115
-N 8,8 0 0116
-O 8,8 0 0117
-P 7,8 0 0120
-Q 8,8,1 0 0121
-R 7,8 0 0122
-S 7,8 0 0123
-T 5,8 0 0124
-U 8,8 0 0125
-V 7,8 0 0126
-W 10,8 0 0127
-X 7,8 0 0130
-Y 7,8 0 0131
-Z 7,8 0 0132
-[ 4,8,2 0 0133
-lB "
-\ 3,8 0 0134
-rs "
-] 4,8,2 0 0135
-rB "
-^ 6,7 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 3,8 0 0140
-oq "
-a 5,6 0 0141
-b 5,8 0 0142
-c 5,6 0 0143
-d 5,8 0 0144
-e 5,6 0 0145
-f 4,8 0 0146
-g 5,6,2 0 0147
-h 6,8 0 0150
-i 2,8 0 0151
-j 2,8,2 0 0152
-k 5,8 0 0153
-l 2,8 0 0154
-m 8,6 0 0155
-n 6,6 0 0156
-o 6,6 0 0157
-p 5,6,2 0 0160
-q 5,6,2 0 0161
-r 4,6 0 0162
-s 5,6 0 0163
-t 4,8 0 0164
-u 5,6 0 0165
-v 6,6 0 0166
-w 8,6 0 0167
-x 6,6 0 0170
-y 5,6,2 0 0171
-z 5,6 0 0172
-{ 4,8,2 0 0173
-lC "
-| 3,8,2 0 0174
-or "
-ba "
-} 4,8,2 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,2 0 0241
-¡ "
-ct 7,7,1 0 0242
-¢ "
-Po 6,8 0 0243
-£ "
-Cs 6,7 0 0244
-¤ "
-Ye 6,8 0 0245
-¥ "
-bb 3,8,2 0 0246
-¦ "
-sc 6,8,2 0 0247
-§ "
-ad 3,8 0 0250
-¨ "
-co 10,8 0 0251
-© "
-Of 5,8 0 0252
-ª "
-Fo 8,5 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 6,4 0 0255
-hy "
-­ "
-rg 10,8 0 0256
-® "
-a- 3,8 0 0257
-¯ "
-de 4,7 0 0260
-° "
-+- 6,7 0 0261
-± "
-S2 3,8 0 0262
-² "
-S3 3,8 0 0263
-³ "
-aa 3,9 0 0264
-´ "
-µ 5,6,2 0 0265
-ps 6,8,2 0 0266
-¶ "
-pc 3,5 0 0267
-· "
-ac 3,1,2 0 0270
-¸ "
-S1 3,8 0 0271
-¹ "
-Om 5,8 0 0272
-º "
-Fc 8,5 0 0273
-» "
-14 9,8,1 0 0274
-¼ "
-12 9,8,1 0 0275
-½ "
-34 9,8,1 0 0276
-¾ "
-r? 6,6,2 0 0277
-¿ "
-`A 7,11 0 0300
-À "
-'A 7,11 0 0301
-Á "
-^A 7,11 0 0302
-Â "
-~A 7,11 0 0303
-Ã "
-:A 7,10 0 0304
-Ä "
-oA 7,11 0 0305
-Å "
-AE 10,8 0 0306
-Æ "
-,C 8,8,2 0 0307
-Ç "
-`E 7,11 0 0310
-È "
-'E 7,11 0 0311
-É "
-^E 7,11 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 3,11 0 0314
-Ì "
-'I 3,11 0 0315
-Í "
-^I 3,11 0 0316
-Î "
-:I 3,10 0 0317
-Ï "
--D 8,8 0 0320
-Ð "
-~N 8,11 0 0321
-Ñ "
-`O 8,11 0 0322
-Ò "
-'O 8,11 0 0323
-Ó "
-^O 8,11 0 0324
-Ô "
-~O 8,11 0 0325
-Õ "
-:O 8,10 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 8,8 0 0330
-Ø "
-`U 8,11 0 0331
-Ù "
-'U 8,11 0 0332
-Ú "
-^U 8,11 0 0333
-Û "
-:U 8,10 0 0334
-Ü "
-'Y 7,11 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 6,8 0 0337
-ß "
-`a 5,9 0 0340
-à "
-'a 5,9 0 0341
-á "
-^a 5,9 0 0342
-â "
-~a 5,9 0 0343
-ã "
-:a 5,8 0 0344
-ä "
-oa 5,9 0 0345
-å "
-ae 8,6 0 0346
-æ "
-,c 5,6,2 0 0347
-ç "
-`e 5,9 0 0350
-è "
-'e 5,9 0 0351
-é "
-^e 5,9 0 0352
-ê "
-:e 5,8 0 0353
-ë "
-`i 2,9 0 0354
-ì "
-'i 2,9 0 0355
-í "
-^i 2,9 0 0356
-î "
-:i 2,8 0 0357
-ï "
-Sd 6,9 0 0360
-ð "
-~n 6,9 0 0361
-ñ "
-`o 6,9 0 0362
-ò "
-'o 6,9 0 0363
-ó "
-^o 6,9 0 0364
-ô "
-~o 6,9 0 0365
-õ "
-:o 6,8 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 6,6 0 0370
-ø "
-`u 5,9 0 0371
-ù "
-'u 5,9 0 0372
-ú "
-^u 5,9 0 0373
-û "
-:u 5,8 0 0374
-ü "
-'y 5,9,2 0 0375
-ý "
-Tp 5,8,2 0 0376
-þ "
-:y 5,8,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/HR b/contrib/groff/font/devX75/HR
deleted file mode 100644
index fc0143d302ea..000000000000
--- a/contrib/groff/font/devX75/HR
+++ /dev/null
@@ -1,308 +0,0 @@
-name HR
-spacewidth 3
-charset
---- 3,1 0 040
-! 3,8 0 041
-" 4,8 0 042
-dq "
-# 6,7 0 043
-sh "
-$ 6,8,1 0 044
-Do "
-% 9,8 0 045
-& 8,8 0 046
-' 3,8 0 047
-cq "
-( 4,8,2 0 050
-) 4,8,2 0 051
-* 4,8 0 052
-+ 6,6 0 053
-, 3,1,2 0 054
-\- 7,4 0 055
-. 3,1 0 056
-/ 3,8 0 057
-sl "
-0 6,8 0 060
-1 6,8 0 061
-2 6,8 0 062
-3 6,8 0 063
-4 6,8 0 064
-5 6,8 0 065
-6 6,8 0 066
-7 6,8 0 067
-8 6,8 0 070
-9 6,8 0 071
-: 3,6 0 072
-; 3,6,2 0 073
-< 6,6 0 074
-= 5,5 0 075
-eq "
-> 6,6 0 076
-? 6,8 0 077
-@ 11,8,2 0 0100
-at "
-A 7,8 0 0101
-B 7,8 0 0102
-C 8,8 0 0103
-D 8,8 0 0104
-E 7,8 0 0105
-F 6,8 0 0106
-G 8,8 0 0107
-H 8,8 0 0110
-I 3,8 0 0111
-J 5,8 0 0112
-K 7,8 0 0113
-L 6,8 0 0114
-M 9,8 0 0115
-N 8,8 0 0116
-O 8,8 0 0117
-P 7,8 0 0120
-Q 8,8,1 0 0121
-R 7,8 0 0122
-S 7,8 0 0123
-T 5,8 0 0124
-U 8,8 0 0125
-V 7,8 0 0126
-W 9,8 0 0127
-X 7,8 0 0130
-Y 7,8 0 0131
-Z 7,8 0 0132
-[ 3,8,2 0 0133
-lB "
-\ 3,8 0 0134
-rs "
-] 3,8,2 0 0135
-rB "
-^ 6,8 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 3,8 0 0140
-oq "
-a 5,6 0 0141
-b 6,8 0 0142
-c 5,6 0 0143
-d 6,8 0 0144
-e 5,6 0 0145
-f 4,8 0 0146
-g 6,6,2 0 0147
-h 6,8 0 0150
-i 2,8 0 0151
-j 2,8,1 0 0152
-k 5,8 0 0153
-l 2,8 0 0154
-m 8,6 0 0155
-n 6,6 0 0156
-o 6,6 0 0157
-p 6,6,2 0 0160
-q 6,6,2 0 0161
-r 4,6 0 0162
-s 5,6 0 0163
-t 4,8 0 0164
-u 5,6 0 0165
-v 6,6 0 0166
-w 8,6 0 0167
-x 6,6 0 0170
-y 5,6,2 0 0171
-z 5,6 0 0172
-{ 3,8,2 0 0173
-lC "
-| 3,8,2 0 0174
-or "
-ba "
-} 3,8,2 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 3,6,2 0 0241
-¡ "
-ct 6,7,1 0 0242
-¢ "
-Po 6,8 0 0243
-£ "
-Cs 5,7 0 0244
-¤ "
-Ye 6,8 0 0245
-¥ "
-bb 3,8,2 0 0246
-¦ "
-sc 6,8,2 0 0247
-§ "
-ad 3,8 0 0250
-¨ "
-co 9,7 0 0251
-© "
-Of 4,8 0 0252
-ª "
-Fo 6,5 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 9,7 0 0256
-® "
-a- 3,8 0 0257
-¯ "
-de 4,7 0 0260
-° "
-+- 6,7 0 0261
-± "
-S2 3,7 0 0262
-² "
-S3 3,7 0 0263
-³ "
-aa 3,8 0 0264
-´ "
-µ 5,6,2 0 0265
-ps 6,8,2 0 0266
-¶ "
-pc 3,4 0 0267
-· "
-ac 3,0,2 0 0270
-¸ "
-S1 3,7 0 0271
-¹ "
-Om 4,8 0 0272
-º "
-Fc 6,5 0 0273
-» "
-14 9,8 0 0274
-¼ "
-12 9,8 0 0275
-½ "
-34 9,8 0 0276
-¾ "
-r? 6,6,2 0 0277
-¿ "
-`A 7,11 0 0300
-À "
-'A 7,11 0 0301
-Á "
-^A 7,11 0 0302
-Â "
-~A 7,11 0 0303
-Ã "
-:A 7,10 0 0304
-Ä "
-oA 7,11 0 0305
-Å "
-AE 10,8 0 0306
-Æ "
-,C 8,8,2 0 0307
-Ç "
-`E 7,11 0 0310
-È "
-'E 7,11 0 0311
-É "
-^E 7,11 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 3,11 0 0314
-Ì "
-'I 3,11 0 0315
-Í "
-^I 3,11 0 0316
-Î "
-:I 3,10 0 0317
-Ï "
--D 8,8 0 0320
-Ð "
-~N 8,11 0 0321
-Ñ "
-`O 8,11 0 0322
-Ò "
-'O 8,11 0 0323
-Ó "
-^O 8,11 0 0324
-Ô "
-~O 8,11 0 0325
-Õ "
-:O 8,10 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 8,9,1 0 0330
-Ø "
-`U 8,11 0 0331
-Ù "
-'U 8,11 0 0332
-Ú "
-^U 8,11 0 0333
-Û "
-:U 8,10 0 0334
-Ü "
-'Y 7,11 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 5,8 0 0337
-ß "
-`a 5,9 0 0340
-à "
-'a 5,9 0 0341
-á "
-^a 5,9 0 0342
-â "
-~a 5,9 0 0343
-ã "
-:a 5,8 0 0344
-ä "
-oa 5,9 0 0345
-å "
-ae 8,6 0 0346
-æ "
-,c 5,6,2 0 0347
-ç "
-`e 5,9 0 0350
-è "
-'e 5,9 0 0351
-é "
-^e 5,9 0 0352
-ê "
-:e 5,8 0 0353
-ë "
-`i 2,9 0 0354
-ì "
-'i 2,9 0 0355
-í "
-^i 2,9 0 0356
-î "
-:i 2,8 0 0357
-ï "
-Sd 6,9 0 0360
-ð "
-~n 5,9 0 0361
-ñ "
-`o 6,9 0 0362
-ò "
-'o 6,9 0 0363
-ó "
-^o 6,9 0 0364
-ô "
-~o 6,9 0 0365
-õ "
-:o 6,8 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 6,6 0 0370
-ø "
-`u 5,9 0 0371
-ù "
-'u 5,9 0 0372
-ú "
-^u 5,9 0 0373
-û "
-:u 5,8 0 0374
-ü "
-'y 5,9,2 0 0375
-ý "
-Tp 6,8,2 0 0376
-þ "
-:y 5,8,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/Makefile.sub b/contrib/groff/font/devX75/Makefile.sub
deleted file mode 100644
index 2a90fcab7e2b..000000000000
--- a/contrib/groff/font/devX75/Makefile.sub
+++ /dev/null
@@ -1,2 +0,0 @@
-DEV=X75
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
diff --git a/contrib/groff/font/devX75/NB b/contrib/groff/font/devX75/NB
deleted file mode 100644
index 9ea6576e4f03..000000000000
--- a/contrib/groff/font/devX75/NB
+++ /dev/null
@@ -1,308 +0,0 @@
-name NB
-spacewidth 2
-charset
---- 2,1 0 040
-! 3,8 0 041
-" 6,8 0 042
-dq "
-# 8,8 0 043
-sh "
-$ 6,9,1 0 044
-Do "
-% 11,8 0 045
-& 9,8 0 046
-' 3,8 0 047
-cq "
-( 5,8,2 0 050
-) 5,8,2 0 051
-* 6,8 0 052
-+ 6,6 0 053
-, 3,2,2 0 054
-\- 6,4 0 055
-. 3,2 0 056
-/ 5,8 0 057
-sl "
-0 6,8 0 060
-1 5,8 0 061
-2 6,8 0 062
-3 6,8 0 063
-4 6,8 0 064
-5 6,8 0 065
-6 6,8 0 066
-7 5,8 0 067
-8 6,8 0 070
-9 6,8 0 071
-: 3,5 0 072
-; 3,5,2 0 073
-< 7,6 0 074
-= 6,5 0 075
-eq "
-> 7,6 0 076
-? 6,8 0 077
-@ 10,8 0 0100
-at "
-A 8,8 0 0101
-B 8,8 0 0102
-C 8,8 0 0103
-D 9,8 0 0104
-E 7,8 0 0105
-F 7,8 0 0106
-G 8,8 0 0107
-H 10,8 0 0110
-I 5,8 0 0111
-J 7,8 0 0112
-K 9,8 0 0113
-L 7,8 0 0114
-M 12,8 0 0115
-N 9,8 0 0116
-O 8,8 0 0117
-P 8,8 0 0120
-Q 8,8,1 0 0121
-R 9,8 0 0122
-S 7,8 0 0123
-T 7,8 0 0124
-U 9,8 0 0125
-V 9,8 0 0126
-W 12,8 0 0127
-X 9,8 0 0130
-Y 9,8 0 0131
-Z 7,8 0 0132
-[ 4,8,2 0 0133
-lB "
-\ 5,8 0 0134
-rs "
-] 4,8,2 0 0135
-rB "
-^ 6,8 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 3,8 0 0140
-oq "
-a 5,5 0 0141
-b 7,8 0 0142
-c 6,5 0 0143
-d 7,8 0 0144
-e 6,5 0 0145
-f 5,8 0 0146
-g 6,6,2 0 0147
-h 7,8 0 0150
-i 5,8 0 0151
-j 5,8,2 0 0152
-k 6,8 0 0153
-l 5,8 0 0154
-m 11,5 0 0155
-n 7,5 0 0156
-o 7,5 0 0157
-p 7,5,2 0 0160
-q 7,5,2 0 0161
-r 5,5 0 0162
-s 5,5 0 0163
-t 4,7 0 0164
-u 7,5 0 0165
-v 7,5 0 0166
-w 10,5 0 0167
-x 7,5 0 0170
-y 7,5,2 0 0171
-z 6,5 0 0172
-{ 5,8,2 0 0173
-lC "
-| 6,8 0 0174
-or "
-ba "
-} 5,8,2 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 3,6,2 0 0241
-¡ "
-ct 6,6,1 0 0242
-¢ "
-Po 8,8 0 0243
-£ "
-Cs 8,6 0 0244
-¤ "
-Ye 9,8 0 0245
-¥ "
-bb 6,8 0 0246
-¦ "
-sc 5,8,2 0 0247
-§ "
-ad 4,8 0 0250
-¨ "
-co 9,8 0 0251
-© "
-Of 4,8 0 0252
-ª "
-Fo 7,5 0 0253
-« "
-no 6,5 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 9,8 0 0256
-® "
-a- 5,7 0 0257
-¯ "
-de 4,8 0 0260
-° "
-+- 6,6 0 0261
-± "
-S2 3,8 0 0262
-² "
-S3 3,8 0 0263
-³ "
-aa 4,8 0 0264
-´ "
-µ 7,5,2 0 0265
-ps 8,8 0 0266
-¶ "
-pc 3,5 0 0267
-· "
-ac 4,1,2 0 0270
-¸ "
-S1 3,8 0 0271
-¹ "
-Om 5,8 0 0272
-º "
-Fc 7,5 0 0273
-» "
-14 9,8 0 0274
-¼ "
-12 9,8 0 0275
-½ "
-34 9,8 0 0276
-¾ "
-r? 6,6,2 0 0277
-¿ "
-`A 8,11 0 0300
-À "
-'A 8,11 0 0301
-Á "
-^A 8,11 0 0302
-Â "
-~A 8,11 0 0303
-Ã "
-:A 8,11 0 0304
-Ä "
-oA 8,11 0 0305
-Å "
-AE 11,8 0 0306
-Æ "
-,C 8,8,2 0 0307
-Ç "
-`E 7,11 0 0310
-È "
-'E 7,11 0 0311
-É "
-^E 7,11 0 0312
-Ê "
-:E 7,11 0 0313
-Ë "
-`I 5,11 0 0314
-Ì "
-'I 5,11 0 0315
-Í "
-^I 5,11 0 0316
-Î "
-:I 5,11 0 0317
-Ï "
--D 9,8 0 0320
-Ð "
-~N 9,11 0 0321
-Ñ "
-`O 8,11 0 0322
-Ò "
-'O 8,11 0 0323
-Ó "
-^O 8,11 0 0324
-Ô "
-~O 8,11 0 0325
-Õ "
-:O 8,11 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 8,8 0 0330
-Ø "
-`U 9,11 0 0331
-Ù "
-'U 9,11 0 0332
-Ú "
-^U 9,11 0 0333
-Û "
-:U 9,11 0 0334
-Ü "
-'Y 9,11 0 0335
-Ý "
-TP 8,8 0 0336
-Þ "
-ss 8,8 0 0337
-ß "
-`a 5,8 0 0340
-à "
-'a 5,8 0 0341
-á "
-^a 5,9 0 0342
-â "
-~a 5,8 0 0343
-ã "
-:a 5,8 0 0344
-ä "
-oa 5,8 0 0345
-å "
-ae 9,5 0 0346
-æ "
-,c 6,5,2 0 0347
-ç "
-`e 6,8 0 0350
-è "
-'e 6,8 0 0351
-é "
-^e 6,9 0 0352
-ê "
-:e 6,8 0 0353
-ë "
-`i 5,8 0 0354
-ì "
-'i 5,8 0 0355
-í "
-^i 5,9 0 0356
-î "
-:i 5,8 0 0357
-ï "
-Sd 7,8 0 0360
-ð "
-~n 7,8 0 0361
-ñ "
-`o 7,8 0 0362
-ò "
-'o 7,8 0 0363
-ó "
-^o 7,9 0 0364
-ô "
-~o 7,8 0 0365
-õ "
-:o 7,8 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 7,6,1 0 0370
-ø "
-`u 7,8 0 0371
-ù "
-'u 7,8 0 0372
-ú "
-^u 7,9 0 0373
-û "
-:u 7,8 0 0374
-ü "
-'y 7,8,2 0 0375
-ý "
-Tp 7,8,2 0 0376
-þ "
-:y 7,8,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/NBI b/contrib/groff/font/devX75/NBI
deleted file mode 100644
index 9346faf2cb99..000000000000
--- a/contrib/groff/font/devX75/NBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name NBI
-spacewidth 2
-charset
---- 2,1 0 040
-! 5,8 0 041
-" 6,8 0 042
-dq "
-# 8,7 0 043
-sh "
-$ 6,9,1 0 044
-Do "
-% 11,8 0 045
-& 10,8 0 046
-' 3,8 0 047
-cq "
-( 4,8,1 0 050
-) 5,8,1 0 051
-* 6,8 0 052
-+ 6,6 0 053
-, 3,2,2 0 054
-\- 7,4 0 055
-. 3,2 0 056
-/ 5,8 0 057
-sl "
-0 6,8 0 060
-1 6,8 0 061
-2 6,8 0 062
-3 6,8 0 063
-4 6,8 0 064
-5 6,8 0 065
-6 6,8 0 066
-7 6,8 0 067
-8 6,8 0 070
-9 6,8 0 071
-: 4,5 0 072
-; 4,5,2 0 073
-< 7,6 0 074
-= 6,5 0 075
-eq "
-> 7,6 0 076
-? 6,8 0 077
-@ 11,8 0 0100
-at "
-A 8,8 0 0101
-B 8,8 0 0102
-C 7,8 0 0103
-D 9,8 0 0104
-E 8,8 0 0105
-F 7,8 0 0106
-G 8,8 0 0107
-H 10,8 0 0110
-I 6,8 0 0111
-J 7,8 0 0112
-K 10,8 0 0113
-L 7,8 0 0114
-M 11,8 0 0115
-N 8,8 0 0116
-O 8,8 0 0117
-P 8,8 0 0120
-Q 8,8,2 0 0121
-R 9,8 0 0122
-S 7,8 0 0123
-T 7,8 0 0124
-U 8,8 0 0125
-V 8,8 0 0126
-W 11,8 0 0127
-X 8,8 0 0130
-Y 7,8 0 0131
-Z 8,8 0 0132
-[ 5,8,1 0 0133
-lB "
-\ 5,8 0 0134
-rs "
-] 5,8,1 0 0135
-rB "
-^ 6,8 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 3,8 0 0140
-oq "
-a 7,5 0 0141
-b 7,8 0 0142
-c 6,5 0 0143
-d 7,8 0 0144
-e 6,5 0 0145
-f 5,8,2 0 0146
-g 6,6,2 0 0147
-h 7,8 0 0150
-i 4,8 0 0151
-j 4,8,2 0 0152
-k 7,8 0 0153
-l 4,8 0 0154
-m 10,5 0 0155
-n 7,5 0 0156
-o 6,5 0 0157
-p 7,5,2 0 0160
-q 7,5,2 0 0161
-r 5,5 0 0162
-s 4,5 0 0163
-t 4,7 0 0164
-u 7,5 0 0165
-v 6,5 0 0166
-w 10,5 0 0167
-x 7,5 0 0170
-y 7,5,2 0 0171
-z 5,5 0 0172
-{ 5,8,1 0 0173
-lC "
-| 6,8 0 0174
-or "
-ba "
-} 5,8,1 0 0175
-rC "
-~ 7,5 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,2 0 0241
-¡ "
-ct 6,6,1 0 0242
-¢ "
-Po 7,8 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 7,8 0 0245
-¥ "
-bb 6,8 0 0246
-¦ "
-sc 6,8,2 0 0247
-§ "
-ad 4,8 0 0250
-¨ "
-co 9,8 0 0251
-© "
-Of 6,8 0 0252
-ª "
-Fo 8,5 0 0253
-« "
-no 6,5 0 0254
-¬ "
-- 4,4 0 0255
-hy "
-­ "
-rg 9,8 0 0256
-® "
-a- 5,7 0 0257
-¯ "
-de 4,8 0 0260
-° "
-+- 6,6 0 0261
-± "
-S2 3,8 0 0262
-² "
-S3 3,8 0 0263
-³ "
-aa 4,8 0 0264
-´ "
-µ 7,5,2 0 0265
-ps 8,8 0 0266
-¶ "
-pc 3,5 0 0267
-· "
-ac 4,1,2 0 0270
-¸ "
-S1 3,8 0 0271
-¹ "
-Om 5,8 0 0272
-º "
-Fc 8,5 0 0273
-» "
-14 9,8 0 0274
-¼ "
-12 9,8 0 0275
-½ "
-34 9,8 0 0276
-¾ "
-r? 6,6,2 0 0277
-¿ "
-`A 8,11 0 0300
-À "
-'A 8,11 0 0301
-Á "
-^A 8,11 0 0302
-Â "
-~A 8,11 0 0303
-Ã "
-:A 8,11 0 0304
-Ä "
-oA 8,11 0 0305
-Å "
-AE 10,8 0 0306
-Æ "
-,C 7,8,2 0 0307
-Ç "
-`E 8,11 0 0310
-È "
-'E 8,11 0 0311
-É "
-^E 8,11 0 0312
-Ê "
-:E 8,11 0 0313
-Ë "
-`I 6,11 0 0314
-Ì "
-'I 6,11 0 0315
-Í "
-^I 6,11 0 0316
-Î "
-:I 6,11 0 0317
-Ï "
--D 9,8 0 0320
-Ð "
-~N 8,11 0 0321
-Ñ "
-`O 8,11 0 0322
-Ò "
-'O 8,11 0 0323
-Ó "
-^O 8,11 0 0324
-Ô "
-~O 8,11 0 0325
-Õ "
-:O 8,11 0 0326
-Ö "
-mu 6,6 0 0327
-× "
-/O 8,8 0 0330
-Ø "
-`U 8,11 0 0331
-Ù "
-'U 8,11 0 0332
-Ú "
-^U 8,11 0 0333
-Û "
-:U 8,11 0 0334
-Ü "
-'Y 7,11 0 0335
-Ý "
-TP 8,8 0 0336
-Þ "
-ss 8,8,2 0 0337
-ß "
-`a 7,8 0 0340
-à "
-'a 7,8 0 0341
-á "
-^a 7,8 0 0342
-â "
-~a 7,8 0 0343
-ã "
-:a 7,8 0 0344
-ä "
-oa 7,9 0 0345
-å "
-ae 9,5 0 0346
-æ "
-,c 6,5,2 0 0347
-ç "
-`e 6,8 0 0350
-è "
-'e 6,8 0 0351
-é "
-^e 6,8 0 0352
-ê "
-:e 6,8 0 0353
-ë "
-`i 4,8 0 0354
-ì "
-'i 4,8 0 0355
-í "
-^i 4,8 0 0356
-î "
-:i 4,8 0 0357
-ï "
-Sd 6,8 0 0360
-ð "
-~n 7,8 0 0361
-ñ "
-`o 6,8 0 0362
-ò "
-'o 6,8 0 0363
-ó "
-^o 6,8 0 0364
-ô "
-~o 6,8 0 0365
-õ "
-:o 6,8 0 0366
-ö "
-di 6,6 0 0367
-÷ "
-/o 6,5 0 0370
-ø "
-`u 7,8 0 0371
-ù "
-'u 7,8 0 0372
-ú "
-^u 7,8 0 0373
-û "
-:u 7,8 0 0374
-ü "
-'y 7,8,2 0 0375
-ý "
-Tp 7,8,2 0 0376
-þ "
-:y 7,8,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/NI b/contrib/groff/font/devX75/NI
deleted file mode 100644
index d14f9ca9b8ce..000000000000
--- a/contrib/groff/font/devX75/NI
+++ /dev/null
@@ -1,308 +0,0 @@
-name NI
-spacewidth 2
-charset
---- 2,1 0 040
-! 4,8 0 041
-" 6,8 0 042
-dq "
-# 8,7 0 043
-sh "
-$ 5,9,1 0 044
-Do "
-% 9,8 0 045
-& 9,8 0 046
-' 3,8 0 047
-cq "
-( 5,8,1 0 050
-) 5,8,1 0 051
-* 6,8 0 052
-+ 6,5 0 053
-, 2,2,1 0 054
-\- 6,3 0 055
-. 2,2 0 056
-/ 5,8,1 0 057
-sl "
-0 5,8 0 060
-1 5,8 0 061
-2 5,8 0 062
-3 5,8 0 063
-4 5,8 0 064
-5 5,8 0 065
-6 5,8 0 066
-7 5,8 0 067
-8 5,8 0 070
-9 5,8 0 071
-: 3,5 0 072
-; 3,5,1 0 073
-< 7,5 0 074
-= 6,4 0 075
-eq "
-> 7,5 0 076
-? 6,8 0 077
-@ 9,8 0 0100
-at "
-A 8,8 0 0101
-B 7,8 0 0102
-C 6,8 0 0103
-D 8,8 0 0104
-E 7,8 0 0105
-F 7,8 0 0106
-G 8,8 0 0107
-H 9,8 0 0110
-I 5,8 0 0111
-J 5,8 0 0112
-K 8,8 0 0113
-L 7,8 0 0114
-M 12,8 0 0115
-N 9,8 0 0116
-O 7,8 0 0117
-P 7,8 0 0120
-Q 7,8,2 0 0121
-R 8,8 0 0122
-S 7,8 0 0123
-T 7,8 0 0124
-U 7,8 0 0125
-V 8,8 0 0126
-W 11,8 0 0127
-X 8,8 0 0130
-Y 8,8 0 0131
-Z 8,8 0 0132
-[ 5,8,1 0 0133
-lB "
-\ 5,8 0 0134
-rs "
-] 5,8,1 0 0135
-rB "
-^ 6,8 0 0136
-a^ "
-ha "
-_ 7,0,2 0 0137
-` 3,8 0 0140
-oq "
-a 6,5 0 0141
-b 6,8 0 0142
-c 5,5 0 0143
-d 6,8 0 0144
-e 5,5 0 0145
-f 4,8,2 0 0146
-g 5,6,2 0 0147
-h 6,8 0 0150
-i 3,8 0 0151
-j 3,8,2 0 0152
-k 6,8 0 0153
-l 3,8 0 0154
-m 9,5 0 0155
-n 6,5 0 0156
-o 6,5 0 0157
-p 6,5,2 0 0160
-q 6,5,2 0 0161
-r 5,5 0 0162
-s 4,5 0 0163
-t 3,7 0 0164
-u 6,5 0 0165
-v 6,5 0 0166
-w 9,5 0 0167
-x 6,5 0 0170
-y 6,5,2 0 0171
-z 6,5 0 0172
-{ 5,8,1 0 0173
-lC "
-| 6,8 0 0174
-or "
-ba "
-} 5,8,1 0 0175
-rC "
-~ 7,4 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,2 0 0241
-¡ "
-ct 5,6,1 0 0242
-¢ "
-Po 6,8 0 0243
-£ "
-Cs 8,8 0 0244
-¤ "
-Ye 8,8 0 0245
-¥ "
-bb 6,8 0 0246
-¦ "
-sc 6,8,1 0 0247
-§ "
-ad 4,7 0 0250
-¨ "
-co 9,8 0 0251
-© "
-Of 5,8 0 0252
-ª "
-Fo 6,5 0 0253
-« "
-no 6,4 0 0254
-¬ "
-- 4,3 0 0255
-hy "
-­ "
-rg 9,8 0 0256
-® "
-a- 4,7 0 0257
-¯ "
-de 4,8 0 0260
-° "
-+- 6,5 0 0261
-± "
-S2 3,8 0 0262
-² "
-S3 3,8 0 0263
-³ "
-aa 3,8 0 0264
-´ "
-µ 6,5,2 0 0265
-ps 8,8 0 0266
-¶ "
-pc 3,4 0 0267
-· "
-ac 4,1,2 0 0270
-¸ "
-S1 3,8 0 0271
-¹ "
-Om 4,8 0 0272
-º "
-Fc 6,5 0 0273
-» "
-14 7,8 0 0274
-¼ "
-12 7,8 0 0275
-½ "
-34 7,8 0 0276
-¾ "
-r? 6,6,2 0 0277
-¿ "
-`A 8,11 0 0300
-À "
-'A 8,11 0 0301
-Á "
-^A 8,11 0 0302
-Â "
-~A 8,11 0 0303
-Ã "
-:A 8,10 0 0304
-Ä "
-oA 8,11 0 0305
-Å "
-AE 10,8 0 0306
-Æ "
-,C 6,8,2 0 0307
-Ç "
-`E 7,11 0 0310
-È "
-'E 7,11 0 0311
-É "
-^E 7,11 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 5,11 0 0314
-Ì "
-'I 5,11 0 0315
-Í "
-^I 5,11 0 0316
-Î "
-:I 5,10 0 0317
-Ï "
--D 8,8 0 0320
-Ð "
-~N 9,11 0 0321
-Ñ "
-`O 7,11 0 0322
-Ò "
-'O 7,11 0 0323
-Ó "
-^O 7,11 0 0324
-Ô "
-~O 7,11 0 0325
-Õ "
-:O 7,10 0 0326
-Ö "
-mu 6,5 0 0327
-× "
-/O 7,8 0 0330
-Ø "
-`U 7,11 0 0331
-Ù "
-'U 7,11 0 0332
-Ú "
-^U 7,11 0 0333
-Û "
-:U 7,10 0 0334
-Ü "
-'Y 8,10 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 7,8,2 0 0337
-ß "
-`a 6,8 0 0340
-à "
-'a 6,8 0 0341
-á "
-^a 6,8 0 0342
-â "
-~a 6,8 0 0343
-ã "
-:a 6,7 0 0344
-ä "
-oa 6,9 0 0345
-å "
-ae 8,5 0 0346
-æ "
-,c 5,5,2 0 0347
-ç "
-`e 5,8 0 0350
-è "
-'e 5,8 0 0351
-é "
-^e 5,8 0 0352
-ê "
-:e 5,7 0 0353
-ë "
-`i 3,8 0 0354
-ì "
-'i 3,8 0 0355
-í "
-^i 3,8 0 0356
-î "
-:i 3,7 0 0357
-ï "
-Sd 6,8 0 0360
-ð "
-~n 6,8 0 0361
-ñ "
-`o 6,8 0 0362
-ò "
-'o 6,8 0 0363
-ó "
-^o 6,8 0 0364
-ô "
-~o 6,8 0 0365
-õ "
-:o 6,7 0 0366
-ö "
-di 6,5 0 0367
-÷ "
-/o 6,5 0 0370
-ø "
-`u 6,8 0 0371
-ù "
-'u 6,8 0 0372
-ú "
-^u 6,8 0 0373
-û "
-:u 6,7 0 0374
-ü "
-'y 6,8,2 0 0375
-ý "
-Tp 6,8,2 0 0376
-þ "
-:y 6,7,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/NR b/contrib/groff/font/devX75/NR
deleted file mode 100644
index 8a04d7786923..000000000000
--- a/contrib/groff/font/devX75/NR
+++ /dev/null
@@ -1,308 +0,0 @@
-name NR
-spacewidth 2
-charset
---- 2,1 0 040
-! 4,8 0 041
-" 6,8 0 042
-dq "
-# 8,8 0 043
-sh "
-$ 5,9,1 0 044
-Do "
-% 9,8 0 045
-& 10,8 0 046
-' 3,8 0 047
-cq "
-( 4,8,1 0 050
-) 4,8,1 0 051
-* 6,8 0 052
-+ 6,5 0 053
-, 3,2,1 0 054
-\- 6,3 0 055
-. 4,2 0 056
-/ 4,8 0 057
-sl "
-0 5,8 0 060
-1 5,8 0 061
-2 5,8 0 062
-3 5,8 0 063
-4 5,8 0 064
-5 5,8 0 065
-6 5,8 0 066
-7 5,8 0 067
-8 5,8 0 070
-9 5,8 0 071
-: 4,5 0 072
-; 4,5,1 0 073
-< 7,5 0 074
-= 6,4 0 075
-eq "
-> 7,5 0 076
-? 5,8 0 077
-@ 9,8 0 0100
-at "
-A 8,8 0 0101
-B 7,8 0 0102
-C 7,8 0 0103
-D 8,8 0 0104
-E 7,8 0 0105
-F 7,8 0 0106
-G 8,8 0 0107
-H 9,8 0 0110
-I 4,8 0 0111
-J 5,8 0 0112
-K 8,8 0 0113
-L 7,8 0 0114
-M 10,8 0 0115
-N 9,8 0 0116
-O 8,8 0 0117
-P 7,8 0 0120
-Q 8,8,1 0 0121
-R 8,8 0 0122
-S 6,8 0 0123
-T 8,8 0 0124
-U 8,8 0 0125
-V 8,8 0 0126
-W 12,8 0 0127
-X 7,8 0 0130
-Y 8,8 0 0131
-Z 6,8 0 0132
-[ 3,8,1 0 0133
-lB "
-\ 5,8 0 0134
-rs "
-] 3,8,1 0 0135
-rB "
-^ 6,8 0 0136
-a^ "
-ha "
-_ 6,0,2 0 0137
-` 3,8 0 0140
-oq "
-a 6,5 0 0141
-b 5,8 0 0142
-c 5,5 0 0143
-d 6,8 0 0144
-e 5,5 0 0145
-f 4,8 0 0146
-g 6,5,2 0 0147
-h 6,8 0 0150
-i 4,7 0 0151
-j 4,7,2 0 0152
-k 7,8 0 0153
-l 4,8 0 0154
-m 10,5 0 0155
-n 7,5 0 0156
-o 5,5 0 0157
-p 5,5,2 0 0160
-q 6,5,2 0 0161
-r 5,5 0 0162
-s 5,5 0 0163
-t 3,7 0 0164
-u 6,5 0 0165
-v 6,5 0 0166
-w 8,5 0 0167
-x 6,5 0 0170
-y 6,5,2 0 0171
-z 5,5 0 0172
-{ 4,8,1 0 0173
-lC "
-| 6,8 0 0174
-or "
-ba "
-} 4,8,1 0 0175
-rC "
-~ 7,4 0 0176
-a~ "
-ap "
-ti "
-r! 4,6,2 0 0241
-¡ "
-ct 6,6,1 0 0242
-¢ "
-Po 7,8 0 0243
-£ "
-Cs 7,7 0 0244
-¤ "
-Ye 8,8 0 0245
-¥ "
-bb 6,8 0 0246
-¦ "
-sc 5,8,2 0 0247
-§ "
-ad 4,7 0 0250
-¨ "
-co 10,8 0 0251
-© "
-Of 5,8 0 0252
-ª "
-Fo 6,4 0 0253
-« "
-no 6,4 0 0254
-¬ "
-- 4,3 0 0255
-hy "
-­ "
-rg 10,8 0 0256
-® "
-a- 5,7 0 0257
-¯ "
-de 4,8 0 0260
-° "
-+- 6,5 0 0261
-± "
-S2 3,8 0 0262
-² "
-S3 3,8 0 0263
-³ "
-aa 3,8 0 0264
-´ "
-µ 6,5,2 0 0265
-ps 7,8,2 0 0266
-¶ "
-pc 4,4 0 0267
-· "
-ac 3,1,2 0 0270
-¸ "
-S1 3,8 0 0271
-¹ "
-Om 5,8 0 0272
-º "
-Fc 6,4 0 0273
-» "
-14 7,8 0 0274
-¼ "
-12 7,8 0 0275
-½ "
-34 7,8 0 0276
-¾ "
-r? 5,6,2 0 0277
-¿ "
-`A 8,11 0 0300
-À "
-'A 8,11 0 0301
-Á "
-^A 8,11 0 0302
-Â "
-~A 8,11 0 0303
-Ã "
-:A 8,10 0 0304
-Ä "
-oA 8,11 0 0305
-Å "
-AE 11,8 0 0306
-Æ "
-,C 7,8,2 0 0307
-Ç "
-`E 7,11 0 0310
-È "
-'E 7,11 0 0311
-É "
-^E 7,11 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 4,11 0 0314
-Ì "
-'I 4,11 0 0315
-Í "
-^I 4,11 0 0316
-Î "
-:I 4,10 0 0317
-Ï "
--D 8,8 0 0320
-Ð "
-~N 9,11 0 0321
-Ñ "
-`O 8,11 0 0322
-Ò "
-'O 8,11 0 0323
-Ó "
-^O 8,11 0 0324
-Ô "
-~O 8,11 0 0325
-Õ "
-:O 8,10 0 0326
-Ö "
-mu 6,5 0 0327
-× "
-/O 8,8 0 0330
-Ø "
-`U 8,11 0 0331
-Ù "
-'U 8,11 0 0332
-Ú "
-^U 8,11 0 0333
-Û "
-:U 8,10 0 0334
-Ü "
-'Y 8,10 0 0335
-Ý "
-TP 7,8 0 0336
-Þ "
-ss 7,8 0 0337
-ß "
-`a 6,8 0 0340
-à "
-'a 6,8 0 0341
-á "
-^a 6,8 0 0342
-â "
-~a 6,8 0 0343
-ã "
-:a 6,7 0 0344
-ä "
-oa 6,8 0 0345
-å "
-ae 8,5 0 0346
-æ "
-,c 5,5,2 0 0347
-ç "
-`e 5,8 0 0350
-è "
-'e 5,8 0 0351
-é "
-^e 5,8 0 0352
-ê "
-:e 5,7 0 0353
-ë "
-`i 4,8 0 0354
-ì "
-'i 4,8 0 0355
-í "
-^i 4,8 0 0356
-î "
-:i 4,7 0 0357
-ï "
-Sd 5,8 0 0360
-ð "
-~n 7,8 0 0361
-ñ "
-`o 5,8 0 0362
-ò "
-'o 5,8 0 0363
-ó "
-^o 5,8 0 0364
-ô "
-~o 5,8 0 0365
-õ "
-:o 5,7 0 0366
-ö "
-di 6,5 0 0367
-÷ "
-/o 5,5,1 0 0370
-ø "
-`u 6,8 0 0371
-ù "
-'u 6,8 0 0372
-ú "
-^u 6,8 0 0373
-û "
-:u 6,7 0 0374
-ü "
-'y 6,8,2 0 0375
-ý "
-Tp 5,8,2 0 0376
-þ "
-:y 6,7,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/S b/contrib/groff/font/devX75/S
deleted file mode 100644
index b1cfbbf11449..000000000000
--- a/contrib/groff/font/devX75/S
+++ /dev/null
@@ -1,226 +0,0 @@
-name S
-special
-spacewidth 3
-charset
---- 3,1 0 040
-! 3,7 0 041
-fa 7,7 0 042
-# 5,7 0 043
-sh "
-te 6,7 0 044
-% 8,7 0 045
-& 7,7 0 046
-st 5,5 0 047
-( 4,7,2 0 050
-) 4,7,2 0 051
-** 5,6 0 052
-+ 6,5 0 053
-pl "
-, 2,1,2 0 054
-\- 6,3 0 055
-mi "
-. 2,2 0 056
-/ 3,7 0 057
-sl "
-0 5,7 0 060
-1 5,7 0 061
-2 5,7 0 062
-3 5,7 0 063
-4 5,7 0 064
-5 5,7 0 065
-6 5,7 0 066
-7 5,7 0 067
-8 5,7 0 070
-9 5,7 0 071
-: 2,5 0 072
-; 2,5,2 0 073
-< 7,5 0 074
-= 6,4 0 075
-eq "
-> 6,5 0 076
-? 5,7 0 077
-=~ 6,6 0 0100
-*A 8,7 0 0101
-*B 6,7 0 0102
-*X 8,7 0 0103
-*D 7,7 0 0104
-*E 6,7 0 0105
-*F 8,7 0 0106
-*G 6,7 0 0107
-*Y 8,7 0 0110
-*I 3,7 0 0111
-+h 7,7 0 0112
-*K 7,7 0 0113
-*L 7,7 0 0114
-*M 10,7 0 0115
-*N 8,7 0 0116
-*O 7,7 0 0117
-*P 8,7 0 0120
-*H 7,7 0 0121
-*R 6,7 0 0122
-*S 6,7 0 0123
-*T 6,7 0 0124
---- 8,7 0 0125
-ts 5,5,2 0 0126
-*W 9,7 0 0127
-*C 7,7 0 0130
-*Q 9,7 0 0131
-*Z 6,7 0 0132
-[ 3,7,2 0 0133
-lB "
-tf 7,5 0 0134
-3d "
-] 3,7,2 0 0135
-rB "
-pp 7,7 0 0136
-_ 5,0,3 0 0137
-radicalex 5,10 0 0140
-*a 7,5 0 0141
-*b 5,8,2 0 0142
-*x 6,5,2 0 0143
-*d 5,8 0 0144
-*e 5,5 0 0145
-*f 6,7,2 0 0146
-*g 6,5,2 0 0147
-*y 6,5,2 0 0150
-*i 4,5 0 0151
-+f 6,5,2 0 0152
-*k 6,5 0 0153
-*l 6,8 0 0154
-*m 6,5,2 0 0155
-µ "
-*n 6,5 0 0156
-*o 5,5 0 0157
-*p 6,5 0 0160
-*h 5,7 0 0161
-*r 5,5,3 0 0162
-*s 6,5 0 0163
-*t 5,5 0 0164
-*u 6,5 0 0165
-+p 8,6 0 0166
-*w 8,5 0 0167
-*c 5,8,2 0 0170
-*q 7,5,2 0 0171
-*z 5,8,2 0 0172
-lC 5,7,2 0 0173
-{ "
-ba 2,7,2 0 0174
-or "
-| "
-rC 5,7,2 0 0175
-} "
-ap 6,4 0 0176
-*U 7,7 0 0241
-fm 3,8 0 0242
-<= 6,7 0 0243
-f/ 3,7 0 0244
-if 7,4 0 0245
-Fn 5,7,2 0 0246
-CL 7,5 0 0247
-DI 7,5 0 0250
-HE 7,5 0 0251
-SP 7,5 0 0252
-<> 10,5 0 0253
-<- 10,5 0 0254
-ua 6,10,4 0 0255
-arrowverttp "
--> 10,5 0 0256
-da 6,10,2 0 0257
-arrowvertbt "
-de 4,7 0 0260
-° "
-+- 6,7 0 0261
-± "
-sd 4,8 0 0262
->= 6,7 0 0263
-mu 6,5 0 0264
-× "
-pt 7,4 0 0265
-pd 5,8 0 0266
-bu 5,4 0 0267
-di 6,5 0 0270
-÷ "
-!= 6,5 0 0271
-== 6,5 0 0272
-~= 6,5 0 0273
-~~ "
---- 9,1 0 0274
-arrowvertex 6,10,4 0 0275
-an 10,3 0 0276
-CR 7,6 0 0277
-Ah 8,7 0 0300
-Im 7,8,1 0 0301
-Re 8,8 0 0302
-wp 9,6,2 0 0303
-c* 8,7 0 0304
-c+ 8,7 0 0305
-es 8,8,1 0 0306
-ca 8,5 0 0307
-cu 8,5 0 0310
-sp 7,5 0 0311
-ip 7,5,2 0 0312
---- 7,6,1 0 0313
-sb 7,5 0 0314
-ib 7,5,2 0 0315
-mo 7,5 0 0316
-nm 7,6,1 0 0317
-/_ 8,7 0 0320
-gr 7,7 0 0321
-rg 8,7,1 0 0322
-co 8,7,1 0 0323
-tm 10,7 0 0324
---- 9,8,1 0 0325
-sr 6,10 0 0326
-md 3,3 0 0327
-no 7,3 0 0330
-¬ "
-AN 6,5 0 0331
-OR 6,5 0 0332
-hA 11,5 0 0333
-lA 10,5 0 0334
-uA 6,10 0 0335
-rA 10,5 0 0336
-dA 6,10 0 0337
-lz 7,7 0 0340
-la 3,7,2 0 0341
---- 8,7,1 0 0342
---- 8,7,1 0 0343
---- 9,7 0 0344
---- 7,8,1 0 0345
-parenlefttp 4,10,4 0 0346
-parenleftex 4,10,4 0 0347
-parenleftbt 4,10,4 0 0350
-bracketlefttp 4,10,4 0 0351
-lc "
-bracketleftex 4,10,4 0 0352
-bracketleftbt 4,10,2 0 0353
-lf "
-bracelefttp 5,10,4 0 0354
-lt "
-braceleftmid 5,10,4 0 0355
-lk "
-braceleftbt 5,10,2 0 0356
-lb "
-bracerightex 5,10,4 0 0357
-braceleftex "
-bv "
---- 8,9 0 0360
-ra 3,7,2 0 0361
-is 3,10,2 0 0362
---- 7,10,4 0 0363
---- 7,10,4 0 0364
---- 7,10,2 0 0365
-parenrighttp 4,10,4 0 0366
-parenrightex 4,10,4 0 0367
-parenrightbt 4,10,4 0 0370
-bracketrighttp 4,10,4 0 0371
-rc "
-bracketrightex 4,10,4 0 0372
-bracketrightbt 4,10,2 0 0373
-rf "
-bracerighttp 5,10,4 0 0374
-rt "
-bracerightmid 5,10,4 0 0375
-rk "
-bracerightbt 5,10,2 0 0376
-rb "
diff --git a/contrib/groff/font/devX75/TB b/contrib/groff/font/devX75/TB
deleted file mode 100644
index 29fa10adf216..000000000000
--- a/contrib/groff/font/devX75/TB
+++ /dev/null
@@ -1,308 +0,0 @@
-name TB
-spacewidth 2
-charset
---- 2,1 0 040
-! 4,7 0 041
-" 5,7 0 042
-dq "
-# 6,7 0 043
-sh "
-$ 5,8,1 0 044
-Do "
-% 9,7 0 045
-& 9,7 0 046
-' 4,7 0 047
-cq "
-( 4,7,3 0 050
-) 4,7,3 0 051
-* 6,7 0 052
-+ 6,5 0 053
-, 4,2,1 0 054
-\- 7,3 0 055
-. 3,2 0 056
-/ 3,7 0 057
-sl "
-0 5,7 0 060
-1 5,7 0 061
-2 5,7 0 062
-3 5,7 0 063
-4 5,7 0 064
-5 5,7 0 065
-6 5,7 0 066
-7 5,7 0 067
-8 5,7 0 070
-9 5,7 0 071
-: 4,5 0 072
-; 4,5,1 0 073
-< 6,5 0 074
-= 6,4 0 075
-eq "
-> 6,5 0 076
-? 6,7 0 077
-@ 11,7,2 0 0100
-at "
-A 7,7 0 0101
-B 7,7 0 0102
-C 7,7 0 0103
-D 8,7 0 0104
-E 7,7 0 0105
-F 7,7 0 0106
-G 7,7 0 0107
-H 9,7 0 0110
-I 5,7 0 0111
-J 5,7,1 0 0112
-K 8,7 0 0113
-L 7,7 0 0114
-M 10,7 0 0115
-N 8,7 0 0116
-O 7,7 0 0117
-P 6,7 0 0120
-Q 7,7,2 0 0121
-R 7,7 0 0122
-S 6,7 0 0123
-T 7,7 0 0124
-U 7,7 0 0125
-V 8,7 0 0126
-W 10,7 0 0127
-X 7,7 0 0130
-Y 8,7 0 0131
-Z 7,7 0 0132
-[ 4,7,3 0 0133
-lB "
-\ 3,7 0 0134
-rs "
-] 4,7,3 0 0135
-rB "
-^ 6,7 0 0136
-a^ "
-ha "
-_ 5,0,3 0 0137
-` 4,7 0 0140
-oq "
-a 5,5 0 0141
-b 5,7 0 0142
-c 5,5 0 0143
-d 6,7 0 0144
-e 5,5 0 0145
-f 3,7 0 0146
-g 5,5,3 0 0147
-h 5,7 0 0150
-i 3,8 0 0151
-j 4,8,2 0 0152
-k 5,7 0 0153
-l 3,7 0 0154
-m 8,5 0 0155
-n 6,5 0 0156
-o 6,5 0 0157
-p 5,5,2 0 0160
-q 5,5,2 0 0161
-r 4,5 0 0162
-s 4,5 0 0163
-t 4,7 0 0164
-u 5,5 0 0165
-v 5,5 0 0166
-w 6,5 0 0167
-x 5,5 0 0170
-y 5,5,2 0 0171
-z 5,5 0 0172
-{ 4,7,3 0 0173
-lC "
-| 3,7,2 0 0174
-or "
-ba "
-} 4,7,3 0 0175
-rC "
-~ 6,4 0 0176
-a~ "
-ap "
-ti "
-r! 4,4,3 0 0241
-¡ "
-ct 6,6,1 0 0242
-¢ "
-Po 6,7 0 0243
-£ "
-Cs 6,6 0 0244
-¤ "
-Ye 6,7 0 0245
-¥ "
-bb 3,7,2 0 0246
-¦ "
-sc 5,7,2 0 0247
-§ "
-ad 4,8 0 0250
-¨ "
-co 9,7 0 0251
-© "
-Of 4,7 0 0252
-ª "
-Fo 6,5 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 3,3 0 0255
-hy "
-­ "
-rg 9,7 0 0256
-® "
-a- 4,7 0 0257
-¯ "
-de 4,7 0 0260
-° "
-+- 6,7 0 0261
-± "
-S2 3,7 0 0262
-² "
-S3 3,7 0 0263
-³ "
-aa 4,7 0 0264
-´ "
-µ 5,5,3 0 0265
-ps 6,7,3 0 0266
-¶ "
-pc 3,4 0 0267
-· "
-ac 3,0,3 0 0270
-¸ "
-S1 3,7 0 0271
-¹ "
-Om 4,7 0 0272
-º "
-Fc 6,5 0 0273
-» "
-14 7,7 0 0274
-¼ "
-12 7,7 0 0275
-½ "
-34 7,7 0 0276
-¾ "
-r? 6,4,3 0 0277
-¿ "
-`A 7,10 0 0300
-À "
-'A 7,10 0 0301
-Á "
-^A 7,10 0 0302
-Â "
-~A 7,10 0 0303
-Ã "
-:A 7,10 0 0304
-Ä "
-oA 7,10 0 0305
-Å "
-AE 9,7 0 0306
-Æ "
-,C 7,7,3 0 0307
-Ç "
-`E 7,10 0 0310
-È "
-'E 7,10 0 0311
-É "
-^E 7,10 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 5,10 0 0314
-Ì "
-'I 5,10 0 0315
-Í "
-^I 5,10 0 0316
-Î "
-:I 5,10 0 0317
-Ï "
--D 8,7 0 0320
-Ð "
-~N 8,10 0 0321
-Ñ "
-`O 7,10 0 0322
-Ò "
-'O 7,10 0 0323
-Ó "
-^O 7,10 0 0324
-Ô "
-~O 7,10 0 0325
-Õ "
-:O 7,10 0 0326
-Ö "
-mu 6,5 0 0327
-× "
-/O 7,8,1 0 0330
-Ø "
-`U 7,10 0 0331
-Ù "
-'U 7,10 0 0332
-Ú "
-^U 7,10 0 0333
-Û "
-:U 7,10 0 0334
-Ü "
-'Y 8,10 0 0335
-Ý "
-TP 6,7 0 0336
-Þ "
-ss 6,7 0 0337
-ß "
-`a 5,8 0 0340
-à "
-'a 5,8 0 0341
-á "
-^a 5,8 0 0342
-â "
-~a 5,8 0 0343
-ã "
-:a 5,8 0 0344
-ä "
-oa 5,8 0 0345
-å "
-ae 8,5 0 0346
-æ "
-,c 5,5,3 0 0347
-ç "
-`e 5,8 0 0350
-è "
-'e 5,8 0 0351
-é "
-^e 5,8 0 0352
-ê "
-:e 5,8 0 0353
-ë "
-`i 3,8 0 0354
-ì "
-'i 3,8 0 0355
-í "
-^i 3,8 0 0356
-î "
-:i 3,8 0 0357
-ï "
-Sd 6,8 0 0360
-ð "
-~n 6,8 0 0361
-ñ "
-`o 6,8 0 0362
-ò "
-'o 6,8 0 0363
-ó "
-^o 6,8 0 0364
-ô "
-~o 6,8 0 0365
-õ "
-:o 6,8 0 0366
-ö "
-di 6,5 0 0367
-÷ "
-/o 6,6,1 0 0370
-ø "
-`u 5,8 0 0371
-ù "
-'u 5,8 0 0372
-ú "
-^u 5,8 0 0373
-û "
-:u 5,8 0 0374
-ü "
-'y 5,8,3 0 0375
-ý "
-Tp 5,7,3 0 0376
-þ "
-:y 5,8,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/TBI b/contrib/groff/font/devX75/TBI
deleted file mode 100644
index 064d31de338b..000000000000
--- a/contrib/groff/font/devX75/TBI
+++ /dev/null
@@ -1,308 +0,0 @@
-name TBI
-spacewidth 2
-charset
---- 2,1 0 040
-! 6,7 0 041
-" 6,7 0 042
-dq "
-# 8,7 0 043
-sh "
-$ 5,7 0 044
-Do "
-% 11,7 0 045
-& 8,7 0 046
-' 4,7 0 047
-cq "
-( 6,7,2 0 050
-) 6,7,2 0 051
-* 7,8 0 052
-+ 7,5 0 053
-, 4,2,1 0 054
-\- 7,3 0 055
-. 4,2 0 056
-/ 5,7 0 057
-sl "
-0 5,7 0 060
-1 5,7 0 061
-2 5,7 0 062
-3 5,7 0 063
-4 5,7 0 064
-5 5,7 0 065
-6 5,7 0 066
-7 5,7 0 067
-8 5,7 0 070
-9 5,7 0 071
-: 3,5 0 072
-; 5,5,1 0 073
-< 6,5 0 074
-= 7,4 0 075
-eq "
-> 6,5 0 076
-? 5,7 0 077
-@ 11,7,2 0 0100
-at "
-A 6,7 0 0101
-B 7,7 0 0102
-C 7,7 0 0103
-D 7,7 0 0104
-E 7,7 0 0105
-F 7,7 0 0106
-G 7,7 0 0107
-H 8,7 0 0110
-I 4,7 0 0111
-J 5,7,1 0 0112
-K 7,7 0 0113
-L 6,7 0 0114
-M 10,7 0 0115
-N 8,7 0 0116
-O 7,7 0 0117
-P 6,7 0 0120
-Q 7,7,2 0 0121
-R 7,7 0 0122
-S 6,7 0 0123
-T 6,7 0 0124
-U 8,7 0 0125
-V 7,7 0 0126
-W 9,7 0 0127
-X 7,7 0 0130
-Y 6,7 0 0131
-Z 6,7 0 0132
-[ 5,7,2 0 0133
-lB "
-\ 5,7 0 0134
-rs "
-] 5,7,2 0 0135
-rB "
-^ 7,7 0 0136
-a^ "
-ha "
-_ 5,0,2 0 0137
-` 4,7 0 0140
-oq "
-a 5,5 0 0141
-b 5,7 0 0142
-c 5,5 0 0143
-d 5,7 0 0144
-e 5,5 0 0145
-f 4,7,3 0 0146
-g 4,5,3 0 0147
-h 5,7 0 0150
-i 3,7 0 0151
-j 3,7,3 0 0152
-k 5,7 0 0153
-l 3,7 0 0154
-m 7,5 0 0155
-n 5,5 0 0156
-o 5,5 0 0157
-p 5,5,3 0 0160
-q 5,5,3 0 0161
-r 4,5 0 0162
-s 4,5 0 0163
-t 4,6 0 0164
-u 5,5 0 0165
-v 4,5 0 0166
-w 7,5 0 0167
-x 4,5 0 0170
-y 5,5,2 0 0171
-z 4,5 0 0172
-{ 5,7,2 0 0173
-lC "
-| 3,7 0 0174
-or "
-ba "
-} 5,7,2 0 0175
-rC "
-~ 6,4 0 0176
-a~ "
-ap "
-ti "
-r! 5,5,3 0 0241
-¡ "
-ct 5,6,1 0 0242
-¢ "
-Po 5,7 0 0243
-£ "
-Cs 7,6 0 0244
-¤ "
-Ye 5,7 0 0245
-¥ "
-bb 3,7 0 0246
-¦ "
-sc 5,7,2 0 0247
-§ "
-ad 5,7 0 0250
-¨ "
-co 9,7 0 0251
-© "
-Of 5,7 0 0252
-ª "
-Fo 8,5 0 0253
-« "
-no 7,5 0 0254
-¬ "
-- 3,3 0 0255
-hy "
-­ "
-rg 9,7 0 0256
-® "
-a- 4,7 0 0257
-¯ "
-de 4,7 0 0260
-° "
-+- 7,7 0 0261
-± "
-S2 3,7 0 0262
-² "
-S3 3,7 0 0263
-³ "
-aa 4,7 0 0264
-´ "
-µ 5,5,3 0 0265
-ps 8,7,3 0 0266
-¶ "
-pc 4,4 0 0267
-· "
-ac 3,0,3 0 0270
-¸ "
-S1 3,7 0 0271
-¹ "
-Om 5,7 0 0272
-º "
-Fc 8,5 0 0273
-» "
-14 7,7 0 0274
-¼ "
-12 7,7 0 0275
-½ "
-34 7,7 0 0276
-¾ "
-r? 5,5,3 0 0277
-¿ "
-`A 6,10 0 0300
-À "
-'A 6,10 0 0301
-Á "
-^A 6,10 0 0302
-Â "
-~A 6,10 0 0303
-Ã "
-:A 6,10 0 0304
-Ä "
-oA 6,10 0 0305
-Å "
-AE 9,7 0 0306
-Æ "
-,C 7,7,3 0 0307
-Ç "
-`E 7,10 0 0310
-È "
-'E 7,10 0 0311
-É "
-^E 7,10 0 0312
-Ê "
-:E 7,10 0 0313
-Ë "
-`I 4,10 0 0314
-Ì "
-'I 4,10 0 0315
-Í "
-^I 4,10 0 0316
-Î "
-:I 4,10 0 0317
-Ï "
--D 7,7 0 0320
-Ð "
-~N 8,10 0 0321
-Ñ "
-`O 7,10 0 0322
-Ò "
-'O 7,10 0 0323
-Ó "
-^O 7,10 0 0324
-Ô "
-~O 7,10 0 0325
-Õ "
-:O 7,10 0 0326
-Ö "
-mu 7,5 0 0327
-× "
-/O 7,8,1 0 0330
-Ø "
-`U 8,10 0 0331
-Ù "
-'U 8,10 0 0332
-Ú "
-^U 8,10 0 0333
-Û "
-:U 8,10 0 0334
-Ü "
-'Y 6,10 0 0335
-Ý "
-TP 6,7 0 0336
-Þ "
-ss 6,7,3 0 0337
-ß "
-`a 5,8 0 0340
-à "
-'a 5,8 0 0341
-á "
-^a 5,8 0 0342
-â "
-~a 5,8 0 0343
-ã "
-:a 5,8 0 0344
-ä "
-oa 5,8 0 0345
-å "
-ae 8,5 0 0346
-æ "
-,c 5,5,3 0 0347
-ç "
-`e 5,8 0 0350
-è "
-'e 5,8 0 0351
-é "
-^e 5,8 0 0352
-ê "
-:e 5,8 0 0353
-ë "
-`i 3,8 0 0354
-ì "
-'i 3,8 0 0355
-í "
-^i 3,8 0 0356
-î "
-:i 3,8 0 0357
-ï "
-Sd 5,8 0 0360
-ð "
-~n 5,8 0 0361
-ñ "
-`o 5,8 0 0362
-ò "
-'o 5,8 0 0363
-ó "
-^o 5,8 0 0364
-ô "
-~o 5,8 0 0365
-õ "
-:o 5,8 0 0366
-ö "
-di 7,5 0 0367
-÷ "
-/o 5,6,1 0 0370
-ø "
-`u 5,8 0 0371
-ù "
-'u 5,8 0 0372
-ú "
-^u 5,8 0 0373
-û "
-:u 5,8 0 0374
-ü "
-'y 5,8,2 0 0375
-ý "
-Tp 5,7,3 0 0376
-þ "
-:y 5,8,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/TI b/contrib/groff/font/devX75/TI
deleted file mode 100644
index 6e091e2f2476..000000000000
--- a/contrib/groff/font/devX75/TI
+++ /dev/null
@@ -1,308 +0,0 @@
-name TI
-spacewidth 2
-charset
---- 2,1 0 040
-! 3,7 0 041
-" 4,8 0 042
-dq "
-# 5,7 0 043
-sh "
-$ 5,8,1 0 044
-Do "
-% 9,7 0 045
-& 8,7 0 046
-' 3,8 0 047
-cq "
-( 3,7,2 0 050
-) 4,7,2 0 051
-* 5,7 0 052
-+ 7,5 0 053
-, 3,1,2 0 054
-\- 7,3 0 055
-. 3,1 0 056
-/ 4,7 0 057
-sl "
-0 5,7 0 060
-1 5,7 0 061
-2 5,7 0 062
-3 5,7 0 063
-4 5,7 0 064
-5 5,7 0 065
-6 5,7 0 066
-7 5,7 0 067
-8 5,7 0 070
-9 5,7 0 071
-: 3,5 0 072
-; 3,5,2 0 073
-< 5,5 0 074
-= 7,4 0 075
-eq "
-> 5,5 0 076
-? 5,7 0 077
-@ 10,7,2 0 0100
-at "
-A 7,7 0 0101
-B 6,7 0 0102
-C 7,7 0 0103
-D 7,7 0 0104
-E 6,7 0 0105
-F 6,7 0 0106
-G 8,7 0 0107
-H 7,7 0 0110
-I 3,7 0 0111
-J 4,7 0 0112
-K 7,7 0 0113
-L 6,7 0 0114
-M 10,7 0 0115
-N 7,7 0 0116
-O 7,7 0 0117
-P 6,7 0 0120
-Q 7,7,2 0 0121
-R 6,7 0 0122
-S 5,7 0 0123
-T 6,7 0 0124
-U 7,7 0 0125
-V 6,7 0 0126
-W 9,7 0 0127
-X 6,7 0 0130
-Y 6,7 0 0131
-Z 6,7 0 0132
-[ 4,7,2 0 0133
-lB "
-\ 5,7 0 0134
-rs "
-] 4,7,2 0 0135
-rB "
-^ 5,7 0 0136
-a^ "
-ha "
-_ 5,0,3 0 0137
-` 3,8 0 0140
-oq "
-a 5,5 0 0141
-b 5,7 0 0142
-c 5,5 0 0143
-d 5,7 0 0144
-e 5,5 0 0145
-f 3,7,3 0 0146
-g 4,5,3 0 0147
-h 5,7 0 0150
-i 3,7 0 0151
-j 3,7,3 0 0152
-k 5,7 0 0153
-l 3,7 0 0154
-m 7,5 0 0155
-n 5,5 0 0156
-o 5,5 0 0157
-p 5,5,3 0 0160
-q 5,5,3 0 0161
-r 4,5 0 0162
-s 4,5 0 0163
-t 3,6 0 0164
-u 5,5 0 0165
-v 5,5 0 0166
-w 7,5 0 0167
-x 4,5 0 0170
-y 5,5,3 0 0171
-z 4,5 0 0172
-{ 4,7,2 0 0173
-lC "
-| 3,7,2 0 0174
-or "
-ba "
-} 4,7,2 0 0175
-rC "
-~ 6,4 0 0176
-a~ "
-ap "
-ti "
-r! 4,5,2 0 0241
-¡ "
-ct 5,6,1 0 0242
-¢ "
-Po 5,7 0 0243
-£ "
-Cs 5,7 0 0244
-¤ "
-Ye 7,7 0 0245
-¥ "
-bb 3,7,2 0 0246
-¦ "
-sc 5,7,2 0 0247
-§ "
-ad 3,7 0 0250
-¨ "
-co 9,7 0 0251
-© "
-Of 4,7 0 0252
-ª "
-Fo 5,5 0 0253
-« "
-no 7,4 0 0254
-¬ "
-- 4,3 0 0255
-hy "
-­ "
-rg 9,7 0 0256
-® "
-a- 3,7 0 0257
-¯ "
-de 4,7 0 0260
-° "
-+- 7,7 0 0261
-± "
-S2 3,7 0 0262
-² "
-S3 3,7 0 0263
-³ "
-aa 3,8 0 0264
-´ "
-µ 5,5,3 0 0265
-ps 6,7,3 0 0266
-¶ "
-pc 3,3 0 0267
-· "
-ac 3,0,2 0 0270
-¸ "
-S1 3,7 0 0271
-¹ "
-Om 3,7 0 0272
-º "
-Fc 5,5 0 0273
-» "
-14 7,7 0 0274
-¼ "
-12 7,7 0 0275
-½ "
-34 7,7 0 0276
-¾ "
-r? 5,5,2 0 0277
-¿ "
-`A 7,10 0 0300
-À "
-'A 7,10 0 0301
-Á "
-^A 7,10 0 0302
-Â "
-~A 7,10 0 0303
-Ã "
-:A 7,9 0 0304
-Ä "
-oA 7,10 0 0305
-Å "
-AE 8,7 0 0306
-Æ "
-,C 7,7,2 0 0307
-Ç "
-`E 6,10 0 0310
-È "
-'E 6,10 0 0311
-É "
-^E 6,10 0 0312
-Ê "
-:E 6,9 0 0313
-Ë "
-`I 3,10 0 0314
-Ì "
-'I 3,10 0 0315
-Í "
-^I 3,10 0 0316
-Î "
-:I 3,9 0 0317
-Ï "
--D 7,7 0 0320
-Ð "
-~N 7,10 0 0321
-Ñ "
-`O 7,10 0 0322
-Ò "
-'O 7,10 0 0323
-Ó "
-^O 7,10 0 0324
-Ô "
-~O 7,10 0 0325
-Õ "
-:O 7,9 0 0326
-Ö "
-mu 7,5 0 0327
-× "
-/O 7,8,1 0 0330
-Ø "
-`U 7,10 0 0331
-Ù "
-'U 7,10 0 0332
-Ú "
-^U 7,10 0 0333
-Û "
-:U 7,9 0 0334
-Ü "
-'Y 6,9 0 0335
-Ý "
-TP 6,7 0 0336
-Þ "
-ss 6,7,2 0 0337
-ß "
-`a 5,8 0 0340
-à "
-'a 5,8 0 0341
-á "
-^a 5,8 0 0342
-â "
-~a 5,8 0 0343
-ã "
-:a 5,7 0 0344
-ä "
-oa 5,8 0 0345
-å "
-ae 7,5 0 0346
-æ "
-,c 5,5,2 0 0347
-ç "
-`e 5,8 0 0350
-è "
-'e 5,8 0 0351
-é "
-^e 5,8 0 0352
-ê "
-:e 5,7 0 0353
-ë "
-`i 3,8 0 0354
-ì "
-'i 3,8 0 0355
-í "
-^i 3,8 0 0356
-î "
-:i 3,7 0 0357
-ï "
-Sd 5,8 0 0360
-ð "
-~n 5,8 0 0361
-ñ "
-`o 5,8 0 0362
-ò "
-'o 5,8 0 0363
-ó "
-^o 5,8 0 0364
-ô "
-~o 5,8 0 0365
-õ "
-:o 5,7 0 0366
-ö "
-di 7,5 0 0367
-÷ "
-/o 5,6,1 0 0370
-ø "
-`u 5,8 0 0371
-ù "
-'u 5,8 0 0372
-ú "
-^u 5,8 0 0373
-û "
-:u 5,7 0 0374
-ü "
-'y 5,8,3 0 0375
-ý "
-Tp 5,7,3 0 0376
-þ "
-:y 5,7,3 0 0377
-ÿ "
diff --git a/contrib/groff/font/devX75/TR b/contrib/groff/font/devX75/TR
deleted file mode 100644
index 819dff4d067a..000000000000
--- a/contrib/groff/font/devX75/TR
+++ /dev/null
@@ -1,308 +0,0 @@
-name TR
-spacewidth 2
-charset
---- 2,1 0 040
-! 3,7 0 041
-" 4,7 0 042
-dq "
-# 5,7 0 043
-sh "
-$ 5,8,1 0 044
-Do "
-% 8,7 0 045
-& 8,7 0 046
-' 3,7 0 047
-cq "
-( 4,7,2 0 050
-) 4,7,2 0 051
-* 5,7 0 052
-+ 6,5 0 053
-, 3,1,2 0 054
-\- 7,3 0 055
-. 3,1 0 056
-/ 3,7 0 057
-sl "
-0 5,7 0 060
-1 5,7 0 061
-2 5,7 0 062
-3 5,7 0 063
-4 5,7 0 064
-5 5,7 0 065
-6 5,7 0 066
-7 5,7 0 067
-8 5,7 0 070
-9 5,7 0 071
-: 3,5 0 072
-; 3,5,2 0 073
-< 5,5 0 074
-= 6,4 0 075
-eq "
-> 5,5 0 076
-? 4,7 0 077
-@ 9,7,2 0 0100
-at "
-A 8,7 0 0101
-B 6,7 0 0102
-C 7,7 0 0103
-D 7,7 0 0104
-E 6,7 0 0105
-F 6,7 0 0106
-G 7,7 0 0107
-H 8,7 0 0110
-I 4,7 0 0111
-J 4,7 0 0112
-K 7,7 0 0113
-L 6,7 0 0114
-M 10,7 0 0115
-N 8,7 0 0116
-O 7,7 0 0117
-P 6,7 0 0120
-Q 7,7,2 0 0121
-R 7,7 0 0122
-S 5,7 0 0123
-T 6,7 0 0124
-U 8,7 0 0125
-V 8,7 0 0126
-W 10,7 0 0127
-X 8,7 0 0130
-Y 8,7 0 0131
-Z 6,7 0 0132
-[ 3,7,2 0 0133
-lB "
-\ 3,7 0 0134
-rs "
-] 3,7,2 0 0135
-rB "
-^ 5,7 0 0136
-a^ "
-ha "
-_ 5,0,3 0 0137
-` 3,7 0 0140
-oq "
-a 4,5 0 0141
-b 5,7 0 0142
-c 4,5 0 0143
-d 5,7 0 0144
-e 4,5 0 0145
-f 4,7 0 0146
-g 5,5,2 0 0147
-h 5,7 0 0150
-i 3,7 0 0151
-j 3,7,2 0 0152
-k 5,7 0 0153
-l 4,7 0 0154
-m 8,5 0 0155
-n 5,5 0 0156
-o 5,5 0 0157
-p 5,5,2 0 0160
-q 5,5,2 0 0161
-r 4,5 0 0162
-s 4,5 0 0163
-t 4,6 0 0164
-u 5,5 0 0165
-v 5,5 0 0166
-w 8,5 0 0167
-x 6,5 0 0170
-y 5,5,2 0 0171
-z 5,5 0 0172
-{ 4,7,2 0 0173
-lC "
-| 2,7,2 0 0174
-or "
-ba "
-} 4,7,2 0 0175
-rC "
-~ 7,4 0 0176
-a~ "
-ap "
-ti "
-r! 3,5,2 0 0241
-¡ "
-ct 5,6,1 0 0242
-¢ "
-Po 5,7 0 0243
-£ "
-Cs 5,7 0 0244
-¤ "
-Ye 5,7 0 0245
-¥ "
-bb 2,7 0 0246
-¦ "
-sc 5,8,1 0 0247
-§ "
-ad 5,7 0 0250
-¨ "
-co 9,7 0 0251
-© "
-Of 4,7 0 0252
-ª "
-Fo 5,5 0 0253
-« "
-no 7,4 0 0254
-¬ "
-- 4,3 0 0255
-hy "
-­ "
-rg 9,7 0 0256
-® "
-a- 4,7 0 0257
-¯ "
-de 4,7 0 0260
-° "
-+- 6,7 0 0261
-± "
-S2 3,7 0 0262
-² "
-S3 3,7 0 0263
-³ "
-aa 3,7 0 0264
-´ "
-µ 5,5,2 0 0265
-ps 6,7,2 0 0266
-¶ "
-pc 2,3 0 0267
-· "
-ac 4,0,3 0 0270
-¸ "
-S1 3,7 0 0271
-¹ "
-Om 4,7 0 0272
-º "
-Fc 5,5 0 0273
-» "
-14 8,7 0 0274
-¼ "
-12 8,7 0 0275
-½ "
-34 8,7 0 0276
-¾ "
-r? 4,5,2 0 0277
-¿ "
-`A 8,10 0 0300
-À "
-'A 8,10 0 0301
-Á "
-^A 8,10 0 0302
-Â "
-~A 8,10 0 0303
-Ã "
-:A 8,9 0 0304
-Ä "
-oA 8,10 0 0305
-Å "
-AE 9,7 0 0306
-Æ "
-,C 7,7,3 0 0307
-Ç "
-`E 6,10 0 0310
-È "
-'E 6,10 0 0311
-É "
-^E 6,10 0 0312
-Ê "
-:E 6,9 0 0313
-Ë "
-`I 4,10 0 0314
-Ì "
-'I 4,10 0 0315
-Í "
-^I 4,10 0 0316
-Î "
-:I 4,9 0 0317
-Ï "
--D 7,7 0 0320
-Ð "
-~N 8,10 0 0321
-Ñ "
-`O 7,10 0 0322
-Ò "
-'O 7,10 0 0323
-Ó "
-^O 7,10 0 0324
-Ô "
-~O 7,10 0 0325
-Õ "
-:O 7,9 0 0326
-Ö "
-mu 6,5 0 0327
-× "
-/O 8,8,1 0 0330
-Ø "
-`U 8,10 0 0331
-Ù "
-'U 8,10 0 0332
-Ú "
-^U 8,10 0 0333
-Û "
-:U 8,9 0 0334
-Ü "
-'Y 8,10 0 0335
-Ý "
-TP 6,7 0 0336
-Þ "
-ss 5,7 0 0337
-ß "
-`a 4,8 0 0340
-à "
-'a 4,8 0 0341
-á "
-^a 4,8 0 0342
-â "
-~a 4,8 0 0343
-ã "
-:a 4,7 0 0344
-ä "
-oa 4,8 0 0345
-å "
-ae 6,5 0 0346
-æ "
-,c 4,5,3 0 0347
-ç "
-`e 4,8 0 0350
-è "
-'e 4,8 0 0351
-é "
-^e 4,8 0 0352
-ê "
-:e 4,7 0 0353
-ë "
-`i 4,8 0 0354
-ì "
-'i 4,8 0 0355
-í "
-^i 4,8 0 0356
-î "
-:i 4,7 0 0357
-ï "
-Sd 5,8 0 0360
-ð "
-~n 5,8 0 0361
-ñ "
-`o 5,8 0 0362
-ò "
-'o 5,8 0 0363
-ó "
-^o 5,8 0 0364
-ô "
-~o 5,8 0 0365
-õ "
-:o 5,7 0 0366
-ö "
-di 6,5 0 0367
-÷ "
-/o 5,6,1 0 0370
-ø "
-`u 5,8 0 0371
-ù "
-'u 5,8 0 0372
-ú "
-^u 5,8 0 0373
-û "
-:u 5,7 0 0374
-ü "
-'y 5,8,2 0 0375
-ý "
-Tp 5,7,2 0 0376
-þ "
-:y 5,7,2 0 0377
-ÿ "
diff --git a/contrib/groff/font/devascii/DESC.proto b/contrib/groff/font/devascii/DESC.proto
deleted file mode 100644
index 88399ab16d91..000000000000
--- a/contrib/groff/font/devascii/DESC.proto
+++ /dev/null
@@ -1,8 +0,0 @@
-res 240
-hor 24
-vert 40
-unitwidth 10
-sizes 10 0
-fonts 4 R I B BI
-tcommand
-postpro grotty
diff --git a/contrib/groff/font/devascii/Makefile.sub b/contrib/groff/font/devascii/Makefile.sub
deleted file mode 100644
index 238f7b742991..000000000000
--- a/contrib/groff/font/devascii/Makefile.sub
+++ /dev/null
@@ -1,31 +0,0 @@
-DEV=ascii
-FONTS=R I B BI
-DEVFILES=$(FONTS) DESC
-CLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-$(FONTS): R.proto
- @echo Making $@
- @-rm -f $@
- @(charwidth=`expr $(RES) / $(CPI)` ; \
- sed -e "s/^name [A-Z]*$$/name $@/" \
- -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
- -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
- -e "s/^internalname .*$$/internalname $@/" \
- -e "/^internalname/s/BI/3/" \
- -e "/^internalname/s/B/2/" \
- -e "/^internalname/s/I/1/" \
- -e "/^internalname .*[^ 0-9]/d" \
- $(srcdir)/R.proto >$@)
-
-DESC: DESC.proto
- @echo Making $@
- @-rm -f $@
- @sed -e "s/^res .*$$/res $(RES)/" \
- -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
- -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
- -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
- $(srcdir)/DESC.proto >$@
diff --git a/contrib/groff/font/devascii/R.proto b/contrib/groff/font/devascii/R.proto
deleted file mode 100644
index b4d090778807..000000000000
--- a/contrib/groff/font/devascii/R.proto
+++ /dev/null
@@ -1,167 +0,0 @@
-name R
-internalname 0
-spacewidth 24
-charset
-! 24 0 0041
-" 24 0 0042
-dq "
-lq "
-rq "
-# 24 0 0043
-sh "
-$ 24 0 0044
-Do "
-% 24 0 0045
-& 24 0 0046
-' 24 0 0047
-aa "
-fm "
-aq "
-cq "
-( 24 0 0050
-) 24 0 0051
-* 24 0 0052
-** "
-+ 24 0 0053
-pl "
-, 24 0 0054
-\- 24 0 0055
-hy "
-- "
-mi "
-en "
-. 24 0 0056
-/ 24 0 0057
-sl "
-f/ "
-0 24 0 0060
-1 24 0 0061
-2 24 0 0062
-3 24 0 0063
-4 24 0 0064
-5 24 0 0065
-6 24 0 0066
-7 24 0 0067
-8 24 0 0070
-9 24 0 0071
-: 24 0 0072
-; 24 0 0073
-< 24 0 0074
-la "
-fo "
-= 24 0 0075
-eq "
-> 24 0 0076
-ra "
-fc "
-? 24 0 0077
-@ 24 0 0100
-at "
-A 24 0 0101
-*A "
-B 24 0 0102
-*B "
-C 24 0 0103
-D 24 0 0104
-E 24 0 0105
-*E "
-F 24 0 0106
-G 24 0 0107
-H 24 0 0110
-*Y "
-I 24 0 0111
-*I "
-J 24 0 0112
-K 24 0 0113
-*K "
-L 24 0 0114
-M 24 0 0115
-*M "
-N 24 0 0116
-*N "
-O 24 0 0117
-ci "
-*O "
-P 24 0 0120
-*R "
-Q 24 0 0121
-R 24 0 0122
-S 24 0 0123
-T 24 0 0124
-*T "
-U 24 0 0125
-V 24 0 0126
-W 24 0 0127
-X 24 0 0130
-*X "
-Y 24 0 0131
-*U "
-Z 24 0 0132
-*Z "
-[ 24 0 0133
-lB "
-\ 24 0 0134
-rs "
-] 24 0 0135
-rB "
-a^ 24 0 0136
-^ "
-ha "
-_ 24 0 0137
-ru "
-ul "
-` 24 0 0140
-oq "
-ga "
-a 24 0 0141
-b 24 0 0142
-c 24 0 0143
-d 24 0 0144
-e 24 0 0145
-f 24 0 0146
-g 24 0 0147
-h 24 0 0150
-i 24 0 0151
-.i "
-j 24 0 0152
-k 24 0 0153
-l 24 0 0154
-m 24 0 0155
-n 24 0 0156
-o 24 0 0157
-*o "
-p 24 0 0160
-q 24 0 0161
-r 24 0 0162
-s 24 0 0163
-t 24 0 0164
-u 24 0 0165
-v 24 0 0166
-w 24 0 0167
-x 24 0 0170
-mu "
-y 24 0 0171
-z 24 0 0172
-lC 24 0 0173
-{ "
-ba 24 0 0174
-or "
-bv "
-br "
-| "
-lb "
-lc "
-lf "
-lk "
-lt "
-rb "
-rc "
-rf "
-rk "
-rt "
-rC 24 0 0175
-} "
-a~ 24 0 0176
-~ "
-ap "
-ti "
diff --git a/contrib/groff/font/devcp1047/DESC.proto b/contrib/groff/font/devcp1047/DESC.proto
deleted file mode 100644
index 88399ab16d91..000000000000
--- a/contrib/groff/font/devcp1047/DESC.proto
+++ /dev/null
@@ -1,8 +0,0 @@
-res 240
-hor 24
-vert 40
-unitwidth 10
-sizes 10 0
-fonts 4 R I B BI
-tcommand
-postpro grotty
diff --git a/contrib/groff/font/devcp1047/Makefile.sub b/contrib/groff/font/devcp1047/Makefile.sub
deleted file mode 100644
index 42721cb9b86e..000000000000
--- a/contrib/groff/font/devcp1047/Makefile.sub
+++ /dev/null
@@ -1,32 +0,0 @@
-DEV=cp1047
-FONTS=R I B BI
-DEVFILES=$(FONTS) DESC
-CLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-$(FONTS): R.proto
- @echo Making $@
- @-rm -f $@
- @(charwidth=`expr $(RES) / $(CPI)` ; \
- sed -e "s/^name [A-Z]*$$/name $@/" \
- -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
- -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
- -e "s/^internalname .*$$/internalname $@/" \
- -e "/^internalname/s/BI/3/" \
- -e "/^internalname/s/B/2/" \
- -e "/^internalname/s/I/1/" \
- -e "/^internalname .*[^ 0-9]/d" \
- $(srcdir)/R.proto >$@)
-
-DESC: DESC.proto
- @echo Making $@
- @-rm -f $@
- @sed -e "s/^res .*$$/res $(RES)/" \
- -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
- -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
- -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
- $(srcdir)/DESC.proto >$@
-
diff --git a/contrib/groff/font/devcp1047/R.proto b/contrib/groff/font/devcp1047/R.proto
deleted file mode 100644
index 6a624c37c771..000000000000
--- a/contrib/groff/font/devcp1047/R.proto
+++ /dev/null
@@ -1,356 +0,0 @@
-name R
-internalname 0
-spacewidth 24
-charset
-^a 24 0 0102
-char66 "
-:a 24 0 0103
-char67 "
-`a 24 0 0104
-char68 "
-'a 24 0 0105
-char69 "
-~a 24 0 0106
-char70 "
-oa 24 0 0107
-char71 "
-,c 24 0 0110
-char72 "
-~n 24 0 0111
-char73 "
-ct 24 0 0112
-char74 "
-. 24 0 0113
-< 24 0 0114
-fo "
-la "
-( 24 0 0115
-+ 24 0 0116
-pl "
-| 24 0 0117
-ba "
-br "
-bv "
-lb "
-lc "
-lf "
-lk "
-lt "
-or "
-rb "
-rc "
-rf "
-rk "
-rt "
-& 24 0 0120
-'e 24 0 0121
-char81 "
-^e 24 0 0122
-char82 "
-:e 24 0 0123
-char83 "
-`e 24 0 0124
-char84 "
-'i 24 0 0125
-char85 "
-^i 24 0 0126
-char86 "
-:i 24 0 0127
-char87 "
-`i 24 0 0130
-char88 "
-ss 24 0 0131
-char89 "
-! 24 0 0132
-$ 24 0 0133
-Do "
-* 24 0 0134
-** "
-) 24 0 0135
-; 24 0 0136
-^ 24 0 0137
-a^ "
-ha "
-\- 24 0 0140
-- "
-en "
-hy "
-mi "
-/ 24 0 0141
-f/ "
-sl "
-^A 24 0 0142
-char98 "
-:A 24 0 0143
-char99 "
-`A 24 0 0144
-char100 "
-'A 24 0 0145
-char101 "
-~A 24 0 0146
-char102 "
-oA 24 0 0147
-char103 "
-,C 24 0 0150
-char104 "
-~N 24 0 0151
-char105 "
-bb 24 0 0152
-char106 "
-, 24 0 0153
-% 24 0 0154
-_ 24 0 0155
-ru "
-ul "
-> 24 0 0156
-fc "
-ra "
-? 24 0 0157
-/o 24 0 0160
-char112 "
-'E 24 0 0161
-char113 "
-^E 24 0 0162
-char114 "
-:E 24 0 0163
-char115 "
-`E 24 0 0164
-char116 "
-'I 24 0 0165
-char117 "
-^I 24 0 0166
-char118 "
-:I 24 0 0167
-char119 "
-`I 24 0 0170
-char120 "
-` 24 0 0171
-ga "
-oq "
-: 24 0 0172
-# 24 0 0173
-sh "
-@ 24 0 0174
-at "
-' 24 0 0175
-aq "
-fm "
-cq "
-= 24 0 0176
-eq "
-" 24 0 0177
-dq "
-lq "
-rq "
-/O 24 0 0200
-char128 "
-a 24 0 0201
-b 24 0 0202
-c 24 0 0203
-d 24 0 0204
-e 24 0 0205
-f 24 0 0206
-g 24 0 0207
-h 24 0 0210
-i 24 0 0211
-.i "
-Fo 24 0 0212
-char138 "
-Fc 24 0 0213
-char139 "
-Sd 24 0 0214
-char140 "
-'y 24 0 0215
-char141 "
-Tp 24 0 0216
-char142 "
-+- 24 0 0217
-char143 "
-de 24 0 0220
-char144 "
-j 24 0 0221
-k 24 0 0222
-l 24 0 0223
-m 24 0 0224
-n 24 0 0225
-o 24 0 0226
-*o "
-p 24 0 0227
-q 24 0 0230
-r 24 0 0231
-Of 24 0 0232
-char154 "
-Om 24 0 0233
-char155 "
-ae 24 0 0234
-char156 "
-ac 24 0 0235
-char157 "
-AE 24 0 0236
-char158 "
-Cs 24 0 0237
-char159 "
-*m 24 0 0240
-char160 "
-~ 24 0 0241
-a~ "
-ap "
-ti "
-s 24 0 0242
-t 24 0 0243
-u 24 0 0244
-v 24 0 0245
-w 24 0 0246
-x 24 0 0247
-y 24 0 0250
-z 24 0 0251
-r! 24 0 0252
-char170 "
-r? 24 0 0253
-char171 "
--D 24 0 0254
-char172 "
-[ 24 0 0255
-lB "
-TP 24 0 0256
-char174 "
-rg 24 0 0257
-char175 "
-no 24 0 0260
-char176 "
-Po 24 0 0261
-char177 "
-Ye 24 0 0262
-char178 "
-md 24 0 0263
-pc "
-char179 "
-co 24 0 0264
-char180 "
-sc 24 0 0265
-char181 "
-ps 24 0 0266
-char182 "
-14 24 0 0267
-char183 "
-12 24 0 0270
-char184 "
-34 24 0 0271
-char185 "
-'Y 24 0 0272
-char186 "
-ad 24 0 0273
-char187 "
-a- 24 0 0274
-char188 "
-] 24 0 0275
-rB "
-aa 24 0 0276
-char190 "
-mu 24 0 0277
-char191 "
-{ 24 0 0300
-lC "
-A 24 0 0301
-*A "
-B 24 0 0302
-*B "
-C 24 0 0303
-D 24 0 0304
-E 24 0 0305
-*E "
-F 24 0 0306
-G 24 0 0307
-H 24 0 0310
-*Y "
-I 24 0 0311
-*I "
-shc 24 0 0312
-char202 "
-^o 24 0 0313
-char203 "
-:o 24 0 0314
-char204 "
-`o 24 0 0315
-char205 "
-'o 24 0 0316
-char206 "
-~o 24 0 0317
-char207 "
-} 24 0 0320
-rC "
-J 24 0 0321
-K 24 0 0322
-*K "
-L 24 0 0323
-M 24 0 0324
-*M "
-N 24 0 0325
-*N "
-O 24 0 0326
-*O "
-ci "
-P 24 0 0327
-*R "
-Q 24 0 0330
-R 24 0 0331
-S1 24 0 0332
-char218 "
-^u 24 0 0333
-char219 "
-:u 24 0 0334
-char220 "
-`u 24 0 0335
-char221 "
-'u 24 0 0336
-char222 "
-:y 24 0 0337
-char223 "
-\ 24 0 0340
-rs "
-di 24 0 0341
-char225 "
-S 24 0 0342
-T 24 0 0343
-*T "
-U 24 0 0344
-V 24 0 0345
-W 24 0 0346
-X 24 0 0347
-*X "
-Y 24 0 0350
-*U "
-Z 24 0 0351
-*Z "
-S2 24 0 0352
-char234 "
-^O 24 0 0353
-char235 "
-:O 24 0 0354
-char236 "
-`O 24 0 0355
-char237 "
-'O 24 0 0356
-char238 "
-~O 24 0 0357
-char239 "
-0 24 0 0360
-1 24 0 0361
-2 24 0 0362
-3 24 0 0363
-4 24 0 0364
-5 24 0 0365
-6 24 0 0366
-7 24 0 0367
-8 24 0 0370
-9 24 0 0371
-S3 24 0 0372
-char250 "
-^U 24 0 0373
-char251 "
-:U 24 0 0374
-char252 "
-`U 24 0 0375
-char253 "
-'U 24 0 0376
-char254 "
diff --git a/contrib/groff/font/devdvi/B b/contrib/groff/font/devdvi/B
deleted file mode 100644
index 53a2b9c86b9a..000000000000
--- a/contrib/groff/font/devdvi/B
+++ /dev/null
@@ -1,358 +0,0 @@
-#
-# manually added kernings for `` and ''
-#
-name B
-internalname cmbx10
-spacewidth 401952
-ligatures ff fi fl ffi ffl 0
-checksum 452076118
-designsize 10485760
-kernpairs
-ff ' 114323
-ff cq 114323
-ff ? 114323
-ff ! 114323
-ff ) 114323
-ff rB 114323
-ff ] 114323
-' ' -100488
-' cq -100488
-cq ' -100488
-cq cq -100488
-' ? 133984
-cq ? 133984
-' ! 133984
-cq ! 133984
-A t -33496
-A C -33496
-A O -33496
-A G -33496
-A U -33496
-A Q -33496
-A T -100488
-A Y -100488
-A V -133984
-A W -133984
-D X -33496
-D W -33496
-D A -33496
-D V -33496
-D Y -33496
-F o -100488
-F e -100488
-F u -100488
-F r -100488
-F a -100488
-F A -133984
-F O -33496
-F C -33496
-F G -33496
-F Q -33496
-I I 33496
-K O -33496
-K C -33496
-K G -33496
-K Q -33496
-L T -100488
-L Y -100488
-L V -133984
-L W -133984
-O X -33496
-O W -33496
-O A -33496
-O V -33496
-O Y -33496
-P A -100488
-P o -33496
-P e -33496
-P a -33496
-P . -100488
-P , -100488
-R t -33496
-R C -33496
-R O -33496
-R G -33496
-R U -33496
-R Q -33496
-R T -100488
-R Y -100488
-R V -133984
-R W -133984
-T y -33496
-T e -100488
-T o -100488
-T r -100488
-T a -100488
-T A -100488
-T u -100488
-V o -100488
-V e -100488
-V u -100488
-V r -100488
-V a -100488
-V A -133984
-V O -33496
-V C -33496
-V G -33496
-V Q -33496
-W o -100488
-W e -100488
-W u -100488
-W r -100488
-W a -100488
-W A -133984
-W O -33496
-W C -33496
-W G -33496
-W Q -33496
-X O -33496
-X C -33496
-X G -33496
-X Q -33496
-Y e -100488
-Y o -100488
-Y r -100488
-Y a -100488
-Y A -100488
-Y u -100488
-oq oq -100488
-oq ` -100488
-` oq -100488
-` ` -100488
-a v -33496
-a j 66992
-a y -33496
-a w -33496
-b e 33496
-b o 33496
-b x -33496
-b d 33496
-b c 33496
-b q 33496
-b v -33496
-b j 66992
-b y -33496
-b w -33496
-c h -33496
-c k -33496
-f ' 114323
-f cq 114323
-f ? 114323
-f ! 114323
-f ) 114323
-f rB 114323
-f ] 114323
-g j 33496
-h t -33496
-h u -33496
-h b -33496
-h y -33496
-h v -33496
-h w -33496
-k a -66992
-k e -33496
-k a -33496
-k o -33496
-k c -33496
-m t -33496
-m u -33496
-m b -33496
-m y -33496
-m v -33496
-m w -33496
-n t -33496
-n u -33496
-n b -33496
-n y -33496
-n v -33496
-n w -33496
-o e 33496
-o o 33496
-o x -33496
-o d 33496
-o c 33496
-o q 33496
-o v -33496
-o j 66992
-o y -33496
-o w -33496
-p e 33496
-p o 33496
-p x -33496
-p d 33496
-p c 33496
-p q 33496
-p v -33496
-p j 66992
-p y -33496
-p w -33496
-t y -33496
-t w -33496
-u w -33496
-v a -66992
-v e -33496
-v a -33496
-v o -33496
-v c -33496
-w e -33496
-w a -33496
-w o -33496
-w c -33496
-y o -33496
-y e -33496
-y a -33496
-y . -100488
-y , -100488
-charset
-*G 725261,719440,0,0,0,-167480 2 0000
-*D 1004880,719440 2 0001
-*H 937888,719440,0,0,-33496,-33496 2 0002
-*L 844682,719440 2 0003
-*C 803904,719440 2 0004
-*P 943714,719440 2 0005
-*S 870896,719440 2 0006
-*U 937888,719440,0,0,-33496,-167480 2 0007
-*F 870896,719440,0,0,-33496 2 0010
-*Q 937888,719440,0,0,-33496,-83741 2 0011
-*W 870896,719440 2 0012
-ff 703416,728178,0,114323 2 0013
-fi 669920,728178 2 0014
-fl 669920,728178 2 0015
-Fi 1004880,728178 2 0016
-Fl 1004880,728178 2 0017
-.i 334960,466034 0 0020
-.j 368456,466034,203890 1 0021
-ga 602928,728178 2 0022
-char180 602928,728178 2 0023
-aa "
-ah 602928,662642 2 0024
-ab 602928,728178 2 0025
-char175 602928,625066 2 0026
-a- "
-ao 911674,728178 2 0027
-char184 535936,0,178403 1 0030
-ac "
-char223 626230,728178 2 0031
-ss "
-char230 870896,466034 0 0032
-ae "
-oe 937888,466034 0 0033
-char248 602928,567979,101946 3 0034
-/o "
-char198 1092261,719440 2 0035
-AE "
-OE 1226245,719440 2 0036
-char216 937888,770413,50973 3 0037
-/O "
---- 334960,466034 0 0040
-! 367000,728178 2 0041
-rq 632056,728178 2 0042
-sh 1004880,728178,203888 3 0043
-# "
-Do 602928,786432,58254 3 0044
-$ "
-% 1004880,786432,58254 3 0045
-& 937888,728178 2 0046
-cq 334960,728178 2 0047
-' "
-( 468944,786432,262144 3 0050
-) 468944,786432,262144 3 0051
-* 602928,786432 2 0052
-+ 937888,664096,139808 3 0053
-, 334960,163112,203890 1 0054
-char173 401952,466034 0 0055
-hy "
-- "
-. 334960,163112 0 0056
-sl 602928,786432,262144 3 0057
-/ "
-0 602928,675749 2 0060
-1 602928,675749 2 0061
-2 602928,675749 2 0062
-3 602928,675749 2 0063
-4 602928,675749 2 0064
-5 602928,675749 2 0065
-6 602928,675749 2 0066
-7 602928,675749 2 0067
-8 602928,675749 2 0070
-9 602928,675749 2 0071
-: 334960,466034 0 0072
-; 334960,466034,203890 1 0073
-char161 367000,524288,203890 3 0074
-r! "
-= 937888,410110,-114178 0 0075
-char191 569432,524288,203890 3 0076
-r? "
-? 569432,728178 2 0077
-at 937888,728178 2 0100
-@ "
-A 911674,719440 2 0101
-B 857789,719440 2 0102
-C 870896,719440,0,0,-33496 2 0103
-D 924781,719440,0,0,0,-33496 2 0104
-E 792253,719440 2 0105
-F 758757,719440,0,0,0,-167480 2 0106
-G 948083,719440,0,0,-33496 2 0107
-H 943714,719440 2 0110
-I 457294,719440 2 0111
-J 623317,719440,0,0,0,-33496 2 0112
-K 945170,719440 2 0113
-L 725261,719440,0,0,0,66992 2 0114
-M 1144690,719440 2 0115
-N 943714,719440 2 0116
-O 905848,719440,0,0,-33496,-33496 2 0117
-P 824293,719440,0,0,0,-167480 2 0120
-Q 905848,719440,203890,0,-33496 3 0121
-R 904392,719440 2 0122
-S 669920,719440 2 0123
-T 838856,719440,0,0,0,-167480 2 0124
-U 927694,719440,0,0,-20389 2 0125
-V 911674,719440,0,16749,50245,-251219 2 0126
-W 1246634,719440,0,16749,50245,-150731 2 0127
-X 911674,719440 2 0130
-Y 911674,719440,0,30146,33496,-237822 2 0131
-Z 736912,719440 2 0132
-lB 334960,786432,262144 3 0133
-[ "
-lq 632056,728178 2 0134
-rB 334960,786432,262144 3 0135
-] "
-ha 602928,728178 2 0136
-^ "
-a^ "
-a. 334960,728178 2 0137
-oq 334960,728178 2 0140
-` "
-a 586179,466034 0 0141
-b 669920,728178 2 0142
-c 535936,466034 0 0143
-d 669920,728178 2 0144
-e 552685,466034 0 0145
-f 368456,728178,0,114323 2 0146
-g 602928,466034,203890,16749 1 0147
-h 669920,728178 2 0150
-i 334960,728178 2 0151
-j 368456,728178,203890 3 0152
-k 636424,728178 2 0153
-l 334960,728178 2 0154
-m 1004880,466034 0 0155
-n 669920,466034 0 0156
-o 602928,466034 0 0157
-p 669920,466034,203890 1 0160
-q 636424,466034,203890 1 0161
-r 496616,466034 0 0162
-s 475643,466034 0 0163
-t 468944,665763 2 0164
-u 669920,466034 0 0165
-v 636424,466034,0,16749 0 0166
-w 870896,466034,0,16749 0 0167
-x 636424,466034 0 0170
-y 636424,466034,203890,16749 1 0171
-z 535936,466034 0 0172
-en 602928,466034,0,33496 0 0173
-em 1205856,466034,0,33496 0 0174
-a" 602928,728178 2 0175
-~ 602928,728178 2 0176
-a~ "
-char168 602928,728178 2 0177
-ad "
diff --git a/contrib/groff/font/devdvi/BI b/contrib/groff/font/devdvi/BI
deleted file mode 100644
index 35e282469331..000000000000
--- a/contrib/groff/font/devdvi/BI
+++ /dev/null
@@ -1,365 +0,0 @@
-#
-# manually added kernings for `` and ''
-#
-name BI
-internalname cmbxti10
-spacewidth 434573
-slant 14.036243
-ligatures ff fi fl ffi ffl 0
-checksum 1175274390
-designsize 10485760
-kernpairs
-ff cq 111848
-ff ' 111848
-ff ? 111848
-ff ! 111848
-ff ) 111848
-ff rB 111848
-ff ] 111848
-' ' -92624
-cq ' -92624
-' cq -92624
-cq cq -92624
-' ? 123498
-cq ? 123498
-' ! 123498
-cq ! 123498
-A n -30875
-A l -30875
-A r -30875
-A u -30875
-A m -30875
-A t -30875
-A i -30875
-A C -30875
-A O -30875
-A G -30875
-A h -30875
-A b -30875
-A U -30875
-A k -30875
-A v -30875
-A w -30875
-A Q -30875
-A T -92624
-A Y -92624
-A V -123498
-A W -123498
-A e -61749
-A a -61749
-A o -61749
-A d -61749
-A c -61749
-A g -61749
-A q -61749
-D X -30875
-D W -30875
-D A -30875
-D V -30875
-D Y -30875
-F o -92624
-F e -92624
-F u -92624
-F r -92624
-F a -92624
-F A -123498
-F O -30875
-F C -30875
-F G -30875
-F Q -30875
-K O -30875
-K C -30875
-K G -30875
-K Q -30875
-L T -92624
-L Y -92624
-L V -123498
-L W -123498
-L e -61749
-L a -61749
-L o -61749
-L d -61749
-L c -61749
-L g -61749
-L q -61749
-O X -30875
-O W -30875
-O A -30875
-O V -30875
-O Y -30875
-P A -92624
-R n -30875
-R l -30875
-R r -30875
-R u -30875
-R m -30875
-R t -30875
-R i -30875
-R C -30875
-R O -30875
-R G -30875
-R h -30875
-R b -30875
-R U -30875
-R k -30875
-R v -30875
-R w -30875
-R Q -30875
-R T -92624
-R Y -92624
-R V -123498
-R W -123498
-R e -61749
-R a -61749
-R o -61749
-R d -61749
-R c -61749
-R g -61749
-R q -61749
-T y -92624
-T e -92624
-T o -92624
-T r -92624
-T a -92624
-T u -92624
-T A -92624
-V o -92624
-V e -92624
-V u -92624
-V r -92624
-V a -92624
-V A -123498
-V O -30875
-V C -30875
-V G -30875
-V Q -30875
-W A -92624
-X O -30875
-X C -30875
-X G -30875
-X Q -30875
-Y e -92624
-Y o -92624
-Y r -92624
-Y a -92624
-Y u -92624
-Y A -92624
-oq oq -92624
-oq ` -92624
-` oq -92624
-` ` -92624
-b e -61749
-b a -61749
-b o -61749
-b d -61749
-b c -61749
-b g -61749
-b q -61749
-c e -61749
-c a -61749
-c o -61749
-c d -61749
-c c -61749
-c g -61749
-c q -61749
-d l 61749
-e e -61749
-e a -61749
-e o -61749
-e d -61749
-e c -61749
-e g -61749
-e q -61749
-Fn cq 111848
-Fn ' 111848
-f cq 111848
-f ' 111848
-Fn ? 111848
-f ? 111848
-Fn ! 111848
-f ! 111848
-Fn ) 111848
-f ) 111848
-Fn rB 111848
-Fn ] 111848
-f rB 111848
-f ] 111848
-l l 61749
-n ' -123498
-n cq -123498
-o e -61749
-o a -61749
-o o -61749
-o d -61749
-o c -61749
-o g -61749
-o q -61749
-p e -61749
-p a -61749
-p o -61749
-p d -61749
-p c -61749
-p g -61749
-p q -61749
-r e -61749
-r a -61749
-r o -61749
-r d -61749
-r c -61749
-r g -61749
-r q -61749
-w l 61749
-charset
-*G 731666,719440,0,135298,0,-19075 2 0000
-*D 990312,719440 2 0001
-*H 928563,719440,0,95027,-84834,64152 2 0002
-*L 845843,719440 2 0003
-*C 805066,719440,0,158248,0,79125 2 0004
-*P 939632,719440,0,180443,0,90222 2 0005
-*S 866814,719440,0,119859,0,59930 2 0006
-*U 928563,719440,0,113013,-174763,-41360 2 0007
-*F 866814,719440,0,59054,-120805,59054 2 0010
-*Q 928563,719440,0,113013,-174763,-5243 2 0011
-*W 866814,719440,0,104021,0,52011 2 0012
-ff 792256,728178,203890,228357 3 0013
-fi 707205,728178,203890,113890 3 0014
-fl 738078,728178,203890,113890 3 0015
-Fi 1095466,728178,203890,113890 3 0016
-Fl 1110902,728178,203890,113890 3 0017
-.i 372824,466034,0,98840 0 0020
-.j 403699,466034,203890,48354 1 0021
-ga 619819,728178 2 0022
-char180 619819,728178,0,89421 2 0023
-aa "
-ah 619819,662642,0,86728 2 0024
-ab 619819,728178,0,108354 2 0025
-char175 619819,623318,0,109518 2 0026
-a- "
-ao 994973,728178 2 0027
-char184 558070,0,178403 1 0030
-ac "
-char223 697302,728178,203890,102090 3 0031
-ss "
-char230 866814,466034,0,89131 0 0032
-ae "
-oe 866814,466034,0,89131 0 0033
-char248 619819,567979,101946,99179 3 0034
-/o "
-char198 1072450,719440,0,119859 2 0035
-AE "
-OE 1195947,719440,0,119859 2 0036
-char216 928563,770413,50973,95027 3 0037
-/O "
---- 311075,466034 0 0040
-! 404864,728178,0,119714 2 0041
-rq 650696,728178,0,83248 2 0042
-sh 990312,728178,203888,71653 3 0043
-# "
-char163 910723,728178 2 0044
-Po "
-% 990312,786432,58254,134859 3 0045
-& 928563,728178,0,89421 2 0046
-cq 372824,728178,0,135734 2 0047
-' "
-( 496322,786432,262144,165733 3 0050
-) 496322,786432,262144,34661 3 0051
-* 619819,786432,0,150296 2 0052
-+ 928563,632637,108349,34661 3 0053
-, 372824,154374,203890 1 0054
-char173 434573,466034,0,27379 0 0055
-hy "
-- "
-. 372824,154374 0 0056
-sl 619819,786432,262144,165733 3 0057
-/ "
-0 619819,675749,0,138062 2 0060
-1 619819,675749,0,138062 2 0061
-2 619819,675749,0,138062 2 0062
-3 619819,675749,0,138062 2 0063
-4 619819,675749,203890,138062 3 0064
-5 619819,675749,0,138062 2 0065
-6 619819,675749,0,138062 2 0066
-7 619819,675749,203890,138062 3 0067
-8 619819,675749,0,138062 2 0070
-9 619819,675749,0,138062 2 0071
-: 372824,466034,0,70198 0 0072
-; 372824,466034,203890,70198 1 0073
-char161 404864,524288,203890,68741 3 0074
-r! "
-= 928563,410110,-114178,71653 0 0075
-char191 619819,524288,203890 3 0076
-r? "
-? 619819,728178,0,120296 2 0077
-at 928563,728178,0,96555 2 0100
-@ "
-A 907592,719440 2 0101
-B 856330,719440,0,104021,0,52011 2 0102
-C 866814,719440,0,148986,-84834,74493 2 0103
-D 918078,719440,0,95027,0,64152 2 0104
-E 793414,719440,0,119859,0,59930 2 0105
-F 762541,719440,0,135298,0,-19075 2 0106
-G 938758,719440,0,77042,-84834,77042 2 0107
-H 939632,719440,0,180443,0,90222 2 0110
-I 494576,719440,0,164424,0,82213 2 0111
-J 640208,719440,0,152045,0,45147 2 0112
-K 938467,719440,0,148986,0,74493 2 0113
-L 731666,719440,0,0,0,61749 2 0114
-M 1124878,719440,0,180443,0,59347 2 0115
-N 939632,719440,0,180443,0,59347 2 0116
-O 896523,719440,0,95027,-84834,64152 2 0117
-P 825454,719440,0,104021,0,-50352 2 0120
-Q 896523,719440,203890,95027,-84834,95027 3 0121
-R 901186,719440,0,26835,0,20126 2 0122
-S 681568,719440,0,118112,0,59056 2 0123
-T 834774,719440,0,135298,-134896,-19075 2 0124
-U 923613,719440,0,180443,-136096,59347 2 0125
-V 907592,719440,0,195298,-133549,-51698 2 0126
-W 1216336,719440,0,195298,-133549,40925 2 0127
-X 907592,719440,0,164424,0,82213 2 0130
-Y 907592,719440,0,207648,-148986,-39347 2 0131
-Z 743317,719440,0,148986,0,74493 2 0132
-lB 373408,786432,262144,196608 3 0133
-[ "
-lq 650696,728178,0,175869 2 0134
-rB 373408,786432,262144,104568 3 0135
-] "
-ha 619819,728178,0,70344 2 0136
-^ "
-a^ "
-a. 372824,728178,0,135734 2 0137
-oq 372824,728178,0,135734 2 0140
-` "
-a 619819,466034,0,98840,-34078,98840 0 0141
-b 558070,728178,0,82430,-34078,82430 2 0142
-c 558070,466034,0,54760,-34078,54760 0 0143
-d 619819,728178,0,113890,-34078,113890 2 0144
-e 558070,466034,0,89131,-34078,89131 0 0145
-Fn 419432,728178,203890,228357,112722,116509 3 0146
-f "
-g 558070,466034,203890,110102,-35829,71266 1 0147
-h 619819,728178,0,98840,0,98840 2 0150
-i 372824,726931,0,119403,-17669,119403 2 0151
-j 372824,726931,203890,175326,50973,110102 3 0152
-k 558070,728178,0,116509,0,98840 2 0153
-l 311075,728178,0,113890,-30875,129714 2 0154
-m 990312,466034,0,98840,-17669,98840 0 0155
-n 681568,466034,0,98840,-17669,98840 0 0156
-o 619819,466034,0,82430,-34078,82430 0 0157
-p 619819,466034,203890,82430,-17182,82430 1 0160
-q 558070,466034,203890,110102,-34078,71266 1 0161
-r 526034,466034,0,116509,-17669,85634 0 0162
-s 510595,466034,0,85634,0,85634 0 0163
-t 403699,665763,0,101072,-39323,101072 2 0164
-u 650694,466034,0,98840,-17669,98840 0 0165
-v 558070,466034,0,116509,-17669,77672 0 0166
-w 805066,466034,0,116509,-17669,87382 0 0167
-x 587782,466034,0,131946,0,131946 0 0170
-y 588946,466034,203890,110102,-17669,71266 1 0171
-z 514382,466034,0,145637,0,98840 0 0172
-en 619819,466034,0,102880 0 0173
-em 1239638,466034,0,102880 0 0174
-a" 619819,728178,0,120296 2 0175
-~ 619819,728178,0,120296 2 0176
-a~ "
-char168 619819,728178,0,120298 2 0177
-ad "
diff --git a/contrib/groff/font/devdvi/CW b/contrib/groff/font/devdvi/CW
deleted file mode 100644
index 2039d23e3471..000000000000
--- a/contrib/groff/font/devdvi/CW
+++ /dev/null
@@ -1,160 +0,0 @@
-name CW
-special
-internalname cmtt10
-spacewidth 550498
-checksum -538297224
-designsize 10485760
-charset
-*G 550498,640797 2 0000
-*D 550498,640797 2 0001
-*H 550498,640797 2 0002
-*L 550498,640797 2 0003
-*C 550498,640797 2 0004
-*P 550498,640797 2 0005
-*S 550498,640797 2 0006
-*U 550498,640797 2 0007
-*F 550498,640797 2 0010
-*Q 550498,640797 2 0011
-*W 550498,640797 2 0012
-ff 550498,640797 2 0013
-fi 550498,640797 2 0014
-fl 550498,640797 2 0015
-Fi 550498,407779,233018 1 0016
-Fl 550498,407779,233018 1 0017
-.i 550498,451470 0 0020
-.j 550498,451470,233018 1 0021
-ga 550498,640797 2 0022
-char180 550498,640797 2 0023
-aa "
-ah 550498,593466 2 0024
-ab 550498,640797 2 0025
-char175 550498,593027 2 0026
-a- "
-ao 550498,640797 2 0027
-char184 550498,0,203891 1 0030
-ac "
-char223 550498,640797 2 0031
-ss "
-char230 550498,451470 0 0032
-ae "
-oe 550498,451470 0 0033
-char248 550498,567979,116509 3 0034
-/o "
-char198 550498,640797 2 0035
-AE "
-OE 550498,640797 2 0036
-char216 550498,699051,58254 3 0037
-/O "
---- 550498,230104,116509 1 0040
-! 550498,640797 2 0041
-dq 550498,640797 2 0042
-" "
-sh 550498,640797 2 0043
-# "
-Do 550498,728178,87381 3 0044
-$ "
-% 550498,728178,87381 3 0045
-& 550498,640797 2 0046
-cq 550498,640797 2 0047
-' "
-( 550498,728178,87379 3 0050
-) 550498,728178,87379 3 0051
-* 550498,546134 2 0052
-+ 550498,556326,-84470 2 0053
-, 550498,131072,145635 1 0054
-\- 550498,556326,-84470 2 0055
-- "
-. 550498,131072 0 0056
-sl 550498,728178,87379 3 0057
-/ "
-0 550498,640797 2 0060
-1 550498,640797 2 0061
-2 550498,640797 2 0062
-3 550498,640797 2 0063
-4 550498,640797 2 0064
-5 550498,640797 2 0065
-6 550498,640797 2 0066
-7 550498,640797 2 0067
-8 550498,640797 2 0070
-9 550498,640797 2 0071
-: 550498,451470 0 0072
-; 550498,451470,145635 1 0073
-< 550498,582542,-58254 2 0074
-= 550498,435813,-204984 0 0075
-> 550498,582542,-58254 2 0076
-? 550498,640797 2 0077
-at 550498,640797 2 0100
-@ "
-A 550498,640797 2 0101
-B 550498,640797 2 0102
-C 550498,640797 2 0103
-D 550498,640797 2 0104
-E 550498,640797 2 0105
-F 550498,640797 2 0106
-G 550498,640797 2 0107
-H 550498,640797 2 0110
-I 550498,640797 2 0111
-J 550498,640797 2 0112
-K 550498,640797 2 0113
-L 550498,640797 2 0114
-M 550498,640797 2 0115
-N 550498,640797 2 0116
-O 550498,640797 2 0117
-P 550498,640797 2 0120
-Q 550498,640797,145635 3 0121
-R 550498,640797 2 0122
-S 550498,640797 2 0123
-T 550498,640797 2 0124
-U 550498,640797 2 0125
-V 550498,640797 2 0126
-W 550498,640797 2 0127
-X 550498,640797 2 0130
-Y 550498,640797 2 0131
-Z 550498,640797 2 0132
-lB 550498,728178,87379 3 0133
-[ "
-rs 550498,728178,87379 3 0134
-\ "
-rB 550498,728178,87379 3 0135
-] "
-ha 550498,640797 2 0136
-^ "
-a^ "
-_ 550498,0,99757 1 0137
-oq 550498,640797 2 0140
-` "
-a 550498,451470 0 0141
-b 550498,640797 2 0142
-c 550498,451470 0 0143
-d 550498,640797 2 0144
-e 550498,451470 0 0145
-f 550498,640797 2 0146
-g 550498,451470,233018 1 0147
-h 550498,640797 2 0150
-i 550498,640797 2 0151
-j 550498,640797,233018 3 0152
-k 550498,640797 2 0153
-l 550498,640797 2 0154
-m 550498,451470 0 0155
-n 550498,451470 0 0156
-o 550498,451470 0 0157
-p 550498,451470,233018 1 0160
-q 550498,451470,233018 1 0161
-r 550498,451470 0 0162
-s 550498,451470 0 0163
-t 550498,580466 2 0164
-u 550498,451470 0 0165
-v 550498,451470 0 0166
-w 550498,451470 0 0167
-x 550498,451470 0 0170
-y 550498,451470,233018 1 0171
-z 550498,451470 0 0172
-{ 550498,728178,87379 3 0173
-lC "
-| 550498,728178,87379 3 0174
-ba "
-} 550498,728178,87379 3 0175
-rC "
-~ 550498,640797 2 0176
-a~ "
---- 550498,640797 2 0177
diff --git a/contrib/groff/font/devdvi/CWI b/contrib/groff/font/devdvi/CWI
deleted file mode 100644
index 7e7b54083eff..000000000000
--- a/contrib/groff/font/devdvi/CWI
+++ /dev/null
@@ -1,160 +0,0 @@
-name CWI
-internalname cmitt10
-spacewidth 550498
-slant 14.036243
-checksum -538297224
-designsize 10485760
-charset
-*G 550498,640797,0,182045 2 0000
-*D 550498,640797,0,182045 2 0001
-*H 550498,640797,0,182045 2 0002
-*L 550498,640797,0,182045 2 0003
-*C 550498,640797,0,182045 2 0004
-*P 550498,640797,0,182045 2 0005
-*S 550498,640797,0,182045 2 0006
-*U 550498,640797,0,182045 2 0007
-*F 550498,640797,0,182045 2 0010
-*Q 550498,640797,0,182045 2 0011
-*W 550498,640797,0,182045 2 0012
-ff 550498,640797,0,182045 2 0013
-fi 550498,640797,0,182045 2 0014
-fl 550498,640797,0,182045 2 0015
-Fi 550498,407779,233018,182045 1 0016
-Fl 550498,407779,233018,182045 1 0017
-.i 550498,451470,0,182045 0 0020
-.j 550498,451470,233018,182045 1 0021
-ga 550498,640797,0,182045 2 0022
-char180 550498,640797,0,182045 2 0023
-aa "
-ah 550498,593466,0,182045 2 0024
-ab 550498,640797,0,182045 2 0025
-char175 550498,593027,0,182045 2 0026
-a- "
-ao 550498,640797,0,182045 2 0027
-char184 550498,0,203891,182045 1 0030
-ac "
-char223 550498,640797,233018,182045 3 0031
-ss "
-char230 550498,451470,0,182045 0 0032
-ae "
-oe 550498,451470,0,182045 0 0033
-char248 550498,567979,116509,182045 3 0034
-/o "
-char198 550498,640797,0,182045 2 0035
-AE "
-OE 550498,640797,0,182045 2 0036
-char216 550498,699051,58254,182045 3 0037
-/O "
---- 550498,230104,116509,182045 1 0040
-! 550498,640797,0,182045 2 0041
-dq 550498,640797,0,182045 2 0042
-" "
-sh 550498,640797,0,182045 2 0043
-# "
-Do 550498,640797,0,182045 2 0044
-$ "
-% 550498,728178,87381,182045 3 0045
-& 550498,640797,0,182045 2 0046
-cq 550498,640797,0,182045 2 0047
-' "
-( 550498,728178,87379,182045 3 0050
-) 550498,728178,87379,182045 3 0051
-* 550498,546134,0,182045 2 0052
-+ 550498,556326,-84470,182045 2 0053
-, 550498,131072,145635,182045 1 0054
-\- 550498,556326,-84470,182045 2 0055
-- "
-. 550498,131072,0,182045 0 0056
-sl 550498,728178,87379,182045 3 0057
-/ "
-0 550498,640797,0,182045 2 0060
-1 550498,640797,0,182045 2 0061
-2 550498,640797,0,182045 2 0062
-3 550498,640797,0,182045 2 0063
-4 550498,640797,233018,182045 3 0064
-5 550498,640797,0,182045 2 0065
-6 550498,640797,0,182045 2 0066
-7 550498,640797,233018,182045 3 0067
-8 550498,640797,0,182045 2 0070
-9 550498,640797,0,182045 2 0071
-: 550498,451470,0,182045 0 0072
-; 550498,451470,145635,182045 1 0073
-< 550498,582542,-58254,182045 2 0074
-= 550498,435813,-204984,182045 0 0075
-> 550498,582542,-58254,182045 2 0076
-? 550498,640797,0,182045 2 0077
-at 550498,640797,0,182045 2 0100
-@ "
-A 550498,640797,0,182045 2 0101
-B 550498,640797,0,182045 2 0102
-C 550498,640797,0,182045 2 0103
-D 550498,640797,0,182045 2 0104
-E 550498,640797,0,182045 2 0105
-F 550498,640797,0,182045 2 0106
-G 550498,640797,0,182045 2 0107
-H 550498,640797,0,182045 2 0110
-I 550498,640797,0,182045 2 0111
-J 550498,640797,0,182045 2 0112
-K 550498,640797,0,182045 2 0113
-L 550498,640797,0,182045 2 0114
-M 550498,640797,0,182045 2 0115
-N 550498,640797,0,182045 2 0116
-O 550498,640797,0,182045 2 0117
-P 550498,640797,0,182045 2 0120
-Q 550498,640797,145635,182045 3 0121
-R 550498,640797,0,182045 2 0122
-S 550498,640797,0,182045 2 0123
-T 550498,640797,0,182045 2 0124
-U 550498,640797,0,182045 2 0125
-V 550498,640797,0,182045 2 0126
-W 550498,640797,0,182045 2 0127
-X 550498,640797,0,182045 2 0130
-Y 550498,640797,0,182045 2 0131
-Z 550498,640797,0,182045 2 0132
-lB 550498,728178,87379,182045 3 0133
-[ "
-rs 550498,728178,87379,182045 3 0134
-\ "
-rB 550498,728178,87379,182045 3 0135
-] "
-ha 550498,640797,0,182045 2 0136
-^ "
-a^ "
-_ 550498,0,99757,182045 1 0137
-oq 550498,640797,0,182045 2 0140
-` "
-a 550498,451470,0,182045 0 0141
-b 550498,640797,0,182045 2 0142
-c 550498,451470,0,182045 0 0143
-d 550498,640797,0,182045 2 0144
-e 550498,451470,0,182045 0 0145
-f 550498,640797,233018,182045 3 0146
-g 550498,451470,233018,182045 1 0147
-h 550498,640797,0,182045 2 0150
-i 550498,640797,0,182045 2 0151
-j 550498,640797,233018,182045 3 0152
-k 550498,640797,0,182045 2 0153
-l 550498,640797,0,182045 2 0154
-m 550498,451470,0,182045 0 0155
-n 550498,451470,0,182045 0 0156
-o 550498,451470,0,182045 0 0157
-p 550498,451470,233018,182045 1 0160
-q 550498,451470,233018,182045 1 0161
-r 550498,451470,0,182045 0 0162
-s 550498,451470,0,182045 0 0163
-t 550498,640797,0,182045 2 0164
-u 550498,451470,0,182045 0 0165
-v 550498,451470,0,182045 0 0166
-w 550498,451470,0,182045 0 0167
-x 550498,451470,0,182045 0 0170
-y 550498,451470,233018,182045 1 0171
-z 550498,451470,0,182045 0 0172
-{ 550498,728178,87379,182045 3 0173
-lC "
-| 550498,728178,87379,182045 3 0174
-ba "
-} 550498,728178,87379,182045 3 0175
-rC "
-~ 550498,640797,0,182045 2 0176
-a~ "
---- 550498,640797,0,182045 2 0177
diff --git a/contrib/groff/font/devdvi/DESC.in b/contrib/groff/font/devdvi/DESC.in
deleted file mode 100644
index 54c1302bf022..000000000000
--- a/contrib/groff/font/devdvi/DESC.in
+++ /dev/null
@@ -1,10 +0,0 @@
-sizescale 100
-unitwidth 131072
-res 57816
-hor 1
-vert 1
-sizes 500 600 700 800 900 1000 1095 1200 1400 1440 1600 1728 1800
-2000 2074 2200 2400 2488 2800 3600 0
-fonts 14 R I B BI 0 0 0 0 0 MI S EX CW CWI
-tcommand
-postpro grodvi
diff --git a/contrib/groff/font/devdvi/EX b/contrib/groff/font/devdvi/EX
deleted file mode 100644
index 6e83d02bd6ef..000000000000
--- a/contrib/groff/font/devdvi/EX
+++ /dev/null
@@ -1,144 +0,0 @@
-name EX
-special
-internalname cmex10
-checksum -89033454
-designsize 10485760
-charset
-parenleft0 480600,41942,1216362 1 0000
-parenright0 480600,41942,1216362 1 0001
-bracketleft0 436909,41942,1216362 1 0002
-bracketright0 436909,41942,1216362 1 0003
-floorleft0 495163,41942,1216362 1 0004
-floorright0 495163,41942,1216362 1 0005
-ceilingleft0 495163,41942,1216362 1 0006
-ceilingright0 495163,41942,1216362 1 0007
-braceleft0 611672,41942,1216362 1 0010
-braceright0 611672,41942,1216362 1 0011
-angleleft0 495163,41942,1216362 1 0012
-angleright0 495163,41942,1216362 1 0013
-barex 349526,0,629152 1 0014
-bardblex 582544,0,629152 1 0015
-slash0 605845,41942,1216362 1 0016
-backslash0 605845,41942,1216362 1 0017
-parenleft1 626235,41942,1845514 1 0020
-parenright1 626235,41942,1845514 1 0021
-parenleft2 771872,41942,2474666 1 0022
-parenright2 771872,41942,2474666 1 0023
-bracketleft2 553418,41942,2474666 1 0024
-bracketright2 553418,41942,2474666 1 0025
-floorleft2 611672,41942,2474666 1 0026
-floorright2 611672,41942,2474666 1 0027
-ceilingleft2 611672,41942,2474666 1 0030
-ceilingright2 611672,41942,2474666 1 0031
-braceleft2 786434,41942,2474666 1 0032
-braceright2 786434,41942,2474666 1 0033
-angleleft2 786434,41942,2474666 1 0034
-angleright2 786434,41942,2474666 1 0035
-slash2 1095182,41942,2474666 1 0036
-backslash2 1095182,41942,2474666 1 0037
-parenleft3 830126,41942,3103818 1 0040
-parenright3 830126,41942,3103818 1 0041
-bracketleft3 611672,41942,3103818 1 0042
-bracketright3 611672,41942,3103818 1 0043
-floorleft3 669926,41942,3103818 1 0044
-floorright3 669926,41942,3103818 1 0045
-ceilingleft3 669926,41942,3103818 1 0046
-ceilingright3 669926,41942,3103818 1 0047
-braceleft3 844691,41942,3103818 1 0050
-braceright3 844691,41942,3103818 1 0051
-angleleft3 844691,41942,3103818 1 0052
-angleright3 844691,41942,3103818 1 0053
-slash3 1339851,41942,3103818 1 0054
-backslash3 1339851,41942,3103818 1 0055
-slash1 850515,41942,1845514 1 0056
-backslash1 850515,41942,1845514 1 0057
-parenlefttp 917507,41942,1845514 1 0060
-parenrighttp 917507,41942,1845514 1 0061
-bracketlefttp 699053,41942,1845514 1 0062
-bracketrighttp 699053,41942,1845514 1 0063
-bracketleftbt 699053,41942,1845514 1 0064
-bracketrightbt 699053,41942,1845514 1 0065
-bracketleftex 699053,0,629152 1 0066
-bracketrightex 699053,0,629152 1 0067
-lt 932070,0,943728 1 0070
-bracelefttp "
-rt 932070,0,943728 1 0071
-bracerighttp "
-lb 932070,0,943728 1 0072
-braceleftbt "
-rb 932070,0,943728 1 0073
-bracerightbt "
-lk 932070,0,1887456 1 0074
-braceleftmid "
-rk 932070,0,1887456 1 0075
-bracerightmid "
-braceleftex 932070,0,314576 1 0076
-bracerightex "
-braceex "
-arrowvertex 699053,0,629152 1 0077
-parenleftbt 917507,41942,1845514 1 0100
-parenrightbt 917507,41942,1845514 1 0101
-parenleftex 917507,0,629152 1 0102
-parenrightex 917507,0,629152 1 0103
-angleleft1 640798,41942,1845514 1 0104
-angleright1 640798,41942,1845514 1 0105
---- 873816,0,1048590 1 0106
---- 1165088,104859,1572877 1 0107
---- 495162,0,1165096,203891 1 0110
-ointegral 582544,0,2330194,466035 1 0111
-ois "
---- 1165088,0,1048590 1 0112
-bigcircledot 1584520,104859,1572877 1 0113
---- 1165088,0,1048590 1 0114
-bigcircleplus 1584520,104859,1572877 1 0115
---- 1165088,0,1048590 1 0116
-bigcirclemultiply 1584520,104859,1572877 1 0117
---- 1106834,0,1048590 1 0120
---- 990325,0,1048590 1 0121
---- 495162,0,1165096,203891 1 0122
---- 873816,0,1048590 1 0123
---- 873816,0,1048590 1 0124
---- 873816,0,1048590 1 0125
---- 873816,0,1048590 1 0126
---- 873816,0,1048590 1 0127
-sum 1514614,104859,1572877 1 0130
-product 1339851,104859,1572877 1 0131
-integral 582544,0,2330194,466035 1 0132
-is "
-bigunion 1165088,104859,1572877 1 0133
-bigintersection 1165088,104859,1572877 1 0134
-bigunionplus 1165088,104859,1572877 1 0135
-biglogicaland 1165088,104859,1572877 1 0136
-biglogicalor 1165088,104859,1572877 1 0137
---- 990325,0,1048590 1 0140
-coproduct 1339851,104859,1572877 1 0141
---- 582544,757306 2 0142
---- 1048579,786432 2 0143
---- 1514614,786432 2 0144
---- 582544,757306 2 0145
---- 1048579,786432 2 0146
---- 1514614,786432 2 0147
-bracketleft1 495163,41942,1845514 1 0150
-bracketright1 495163,41942,1845514 1 0151
-floorleft1 553418,41942,1845514 1 0152
-floorright1 553418,41942,1845514 1 0153
-ceilingleft1 553418,41942,1845514 1 0154
-ceilingright1 553418,41942,1845514 1 0155
-braceleft1 699053,41942,1845514 1 0156
-braceright1 699053,41942,1845514 1 0157
-sr0 1048579,41942,1216362 1 0160
-sr1 1048579,41942,1845514 1 0161
-sr2 1048579,41942,2474666 1 0162
-sr3 1048579,41942,3103818 1 0163
---- 1106834,0,1887456 1 0164
---- 1106834,0,629152 1 0165
---- 1106834,41942,587210 1 0166
-arrowvertdblex 815562,0,629152 1 0167
-arrowverttp 699053,0,629152 1 0170
-arrowvertbt 699053,0,629152 1 0171
---- 471864,125827 0 0172
---- 471864,125827 0 0173
---- 471864,125827 0 0174
---- 471864,125827 0 0175
-arrowvertdbltp 815562,0,629152 1 0176
-arrowvertdblbt 815562,0,629152 1 0177
diff --git a/contrib/groff/font/devdvi/H b/contrib/groff/font/devdvi/H
deleted file mode 100644
index f563c1898f27..000000000000
--- a/contrib/groff/font/devdvi/H
+++ /dev/null
@@ -1,307 +0,0 @@
-name H
-internalname cmss10
-spacewidth 349526
-ligatures ff fi fl ffi ffl 0
-checksum 1831058770
-designsize 10485760
-kernpairs
-ff cq 72818
-ff ' 72818
-ff ? 72818
-ff ! 72818
-ff ) 72818
-ff rB 72818
-ff ] 72818
-cq ? 116509
-' ? 116509
-cq ! 116509
-' ! 116509
-A t -29128
-A C -29128
-A O -29128
-A G -29128
-A U -29128
-A Q -29128
-A T -87382
-A Y -87382
-A V -116509
-A W -116509
-D X -29128
-D W -29128
-D A -29128
-D V -29128
-D Y -29128
-F o -29128
-F e -29128
-F u -29128
-F r -29128
-F a -29128
-F A -87382
-F O -29128
-F C -29128
-F G -29128
-F Q -29128
-I I 29128
-K O -29128
-K C -29128
-K G -29128
-K Q -29128
-L T -87382
-L Y -87382
-L V -116509
-L W -116509
-O X -29128
-O W -29128
-O A -29128
-O V -29128
-O Y -29128
-P A -87382
-P o -29128
-P e -29128
-P a -29128
-P . -87382
-P , -87382
-T y -87382
-T e -87382
-T o -87382
-T r -87382
-T a -87382
-T A -87382
-T u -87382
-V o -29128
-V e -29128
-V u -29128
-V r -29128
-V a -29128
-V A -87382
-V O -29128
-V C -29128
-V G -29128
-V Q -29128
-W o -29128
-W e -29128
-W u -29128
-W r -29128
-W a -29128
-W A -87382
-W O -29128
-W C -29128
-W G -29128
-W Q -29128
-X O -29128
-X C -29128
-X G -29128
-X Q -29128
-Y e -87382
-Y o -87382
-Y r -87382
-Y a -87382
-Y A -87382
-Y u -87382
-a r -29128
-a y -29128
-a w -29128
-b e 29128
-b o 29128
-b x -29128
-b d 29128
-b c 29128
-b q 29128
-b r -29128
-b y -29128
-b w -29128
-f cq 72818
-f ' 72818
-f ? 72818
-f ! 72818
-f ) 72818
-f rB 72818
-f ] 72818
-g j 29128
-k e -29128
-k a -29128
-k o -29128
-k c -29128
-o e 29128
-o o 29128
-o x -29128
-o d 29128
-o c 29128
-o q 29128
-o r -29128
-o y -29128
-o w -29128
-p e 29128
-p o 29128
-p x -29128
-p d 29128
-p c 29128
-p q 29128
-p r -29128
-p y -29128
-p w -29128
-t y -29128
-t w -29128
-u w -29128
-w e -29128
-w a -29128
-w o -29128
-w c -29128
-y o -29128
-y e -29128
-y a -29128
-y . -87382
-y , -87382
-charset
-*G 567981,728178,0,0,0,-145637 2 0000
-*D 873816,728178 2 0001
-*H 815562,728178,0,0,-29128,-29128 2 0002
-*L 640800,728178 2 0003
-*C 699053,728178 2 0004
-*P 742746,728178 2 0005
-*S 757307,728178 2 0006
-*U 815562,728178,0,0,-29128,-145637 2 0007
-*F 757307,728178,0,0,-29128 2 0010
-*Q 815562,728178,0,0,-29128,-72818 2 0011
-*W 757307,728178 2 0012
-ff 611672,728178,0,72818 2 0013
-fi 562155,728178 2 0014
-fl 562155,728178 2 0015
-Fi 853427,728178 2 0016
-Fl 853427,728178 2 0017
-.i 250494,466034 0 0020
-.j 279622,466034,203890 1 0021
-ga 524290,728178 2 0022
-char180 524290,728178 2 0023
-aa "
-ah 524290,662642 2 0024
-ab 524290,728178 2 0025
-char175 524290,638464 2 0026
-a- "
-ao 699054,728178 2 0027
-char184 466035,0,178403 1 0030
-ac "
-char223 503902,728178 2 0031
-ss "
-char230 757307,466034 0 0032
-ae "
-oe 815562,466034 0 0033
-char248 524290,567979,101946 3 0034
-/o "
-char198 902944,728178 2 0035
-AE "
-OE 1019453,728178 2 0036
-char216 815562,779150,50973 3 0037
-/O "
---- 250494,466034 0 0040
-! 334963,728178 2 0041
-rq 524290,728178 2 0042
-sh 873816,728178,203888 3 0043
-# "
-Do 524290,786432,58254 3 0044
-$ "
-% 873816,786432,58254 3 0045
-& 795173,728178 2 0046
-cq 291272,728178 2 0047
-' "
-( 407781,786432,262144 3 0050
-) 407781,786432,262144 3 0051
-* 524290,786432 2 0052
-+ 815562,611670,87382 3 0053
-, 291272,87381,131072 1 0054
-char173 349526,466034 0 0055
-hy "
-- "
-. 291272,87381 0 0056
-sl 524290,786432,262144 3 0057
-/ "
-0 524290,687400 2 0060
-1 524290,687400 2 0061
-2 524290,687400 2 0062
-3 524290,687400 2 0063
-4 524290,687400 2 0064
-5 524290,687400 2 0065
-6 524290,687400 2 0066
-7 524290,687400 2 0067
-8 524290,687400 2 0070
-9 524290,687400 2 0071
-: 291272,466034 0 0072
-; 291272,466034,131072 1 0073
-char161 334963,524288,203890 3 0074
-r! "
-= 815562,387973,-136315 0 0075
-char191 495163,524288,203890 3 0076
-r? "
-? 495163,728178 2 0077
-at 699053,728178 2 0100
-@ "
-A 699054,728178 2 0101
-B 699054,728178 2 0102
-C 669926,728178,0,0,-29128 2 0103
-D 757309,728178,0,0,0,-29128 2 0104
-E 626235,728178 2 0105
-F 597109,728178,0,0,0,-145637 2 0106
-G 699053,728178,0,0,-29128 2 0107
-H 742746,728178 2 0110
-I 291274,728178 2 0111
-J 495163,728178,0,0,0,-29128 2 0112
-K 728182,728178 2 0113
-L 567981,728178,0,0,0,58254 2 0114
-M 917509,728178 2 0115
-N 742746,728178 2 0116
-O 771870,728178,0,0,-29128,-29128 2 0117
-P 669926,728178,0,0,0,-145637 2 0120
-Q 771870,728178,131072,0,-29128 3 0121
-R 677208,728178 2 0122
-S 582544,728178 2 0123
-T 713616,728178,0,0,0,-145637 2 0124
-U 720901,728178,0,0,29126 2 0125
-V 699054,728178,0,14563,43691,-218454 2 0126
-W 990326,728178,0,14563,43691,-131074 2 0127
-X 699054,728178 2 0130
-Y 699054,728178,0,26214,29128,-206803 2 0131
-Z 640798,728178 2 0132
-lB 302923,786432,262144 3 0133
-[ "
-lq 524290,728178 2 0134
-rB 302923,786432,262144 3 0135
-] "
-ha 524290,728178 2 0136
-^ "
-a^ "
-a. 291272,712366 2 0137
-oq 291272,728178 2 0140
-` "
-a 503901,466034 0 0141
-b 541766,728178 2 0142
-c 466035,466034 0 0143
-d 541766,728178 2 0144
-e 466035,466034 0 0145
-f 320400,728178,0,72818 2 0146
-g 524290,466034,203890,14563 1 0147
-h 541766,728178 2 0150
-i 250494,712366 2 0151
-j 279622,712366,203890 3 0152
-k 512640,728178 2 0153
-l 250494,728178 2 0154
-m 833038,466034 0 0155
-n 541766,466034 0 0156
-o 524290,466034 0 0157
-p 541766,466034,203890 1 0160
-q 541766,466034,203890 1 0161
-r 358266,466034,0,14563 0 0162
-s 401955,466034 0 0163
-t 378653,599189 2 0164
-u 541766,466034 0 0165
-v 483512,466034,0,14563 0 0166
-w 716530,466034,0,14563 0 0167
-x 483512,466034 0 0170
-y 483512,466034,203890,14563 1 0171
-z 455840,466034 0 0172
-en 524290,466034,0,29128 0 0173
-em 1048579,466034,0,29128 0 0174
-a" 524290,728178 2 0175
-~ 524290,709454 2 0176
-a~ "
-char168 524290,712366 2 0177
-ad "
diff --git a/contrib/groff/font/devdvi/HB b/contrib/groff/font/devdvi/HB
deleted file mode 100644
index c0cc6e2cd9ed..000000000000
--- a/contrib/groff/font/devdvi/HB
+++ /dev/null
@@ -1,307 +0,0 @@
-name HB
-internalname cmssbx10
-spacewidth 384480
-ligatures ff fi fl ffi ffl 0
-checksum -244629176
-designsize 10485760
-kernpairs
-ff cq 80101
-ff ' 80101
-ff ? 80101
-ff ! 80101
-ff ) 80101
-ff rB 80101
-ff ] 80101
-cq ? 128160
-' ? 128160
-cq ! 128160
-' ! 128160
-A t -32040
-A C -32040
-A O -32040
-A G -32040
-A U -32040
-A Q -32040
-A T -96120
-A Y -96120
-A V -128160
-A W -128160
-D X -32040
-D W -32040
-D A -32040
-D V -32040
-D Y -32040
-F o -32040
-F e -32040
-F u -32040
-F r -32040
-F a -32040
-F A -96120
-F O -32040
-F C -32040
-F G -32040
-F Q -32040
-I I 32040
-K O -32040
-K C -32040
-K G -32040
-K Q -32040
-L T -96120
-L Y -96120
-L V -128160
-L W -128160
-O X -32040
-O W -32040
-O A -32040
-O V -32040
-O Y -32040
-P A -96120
-P o -32040
-P e -32040
-P a -32040
-P . -96120
-P , -96120
-T y -96120
-T e -96120
-T o -96120
-T r -96120
-T a -96120
-T A -96120
-T u -96120
-V o -32040
-V e -32040
-V u -32040
-V r -32040
-V a -32040
-V A -96120
-V O -32040
-V C -32040
-V G -32040
-V Q -32040
-W o -32040
-W e -32040
-W u -32040
-W r -32040
-W a -32040
-W A -96120
-W O -32040
-W C -32040
-W G -32040
-W Q -32040
-X O -32040
-X C -32040
-X G -32040
-X Q -32040
-Y e -96120
-Y o -96120
-Y r -96120
-Y a -96120
-Y A -96120
-Y u -96120
-a r -32040
-a y -32040
-a w -32040
-b e 32040
-b o 32040
-b x -32040
-b d 32040
-b c 32040
-b q 32040
-b r -32040
-b y -32040
-b w -32040
-f cq 80101
-f ' 80101
-f ? 80101
-f ! 80101
-f ) 80101
-f rB 80101
-f ] 80101
-g j 32040
-k e -32040
-k a -32040
-k o -32040
-k c -32040
-o e 32040
-o o 32040
-o x -32040
-o d 32040
-o c 32040
-o q 32040
-o r -32040
-o y -32040
-o w -32040
-p e 32040
-p o 32040
-p x -32040
-p d 32040
-p c 32040
-p q 32040
-p r -32040
-p y -32040
-p w -32040
-t y -32040
-t w -32040
-u w -32040
-w e -32040
-w a -32040
-w o -32040
-w c -32040
-y o -32040
-y e -32040
-y a -32040
-y . -96120
-y , -96120
-charset
-*G 608760,728178,0,0,0,-160200 2 0000
-*D 961200,728178 2 0001
-*H 897120,728178,0,0,-32040,-32040 2 0002
-*L 704880,728178 2 0003
-*C 768960,728178 2 0004
-*P 833040,728178 2 0005
-*S 833040,728178 2 0006
-*U 897120,728178,0,0,-32040,-160200 2 0007
-*F 833040,728178,0,0,-32040 2 0010
-*Q 897120,728178,0,0,-32040,-80101 2 0011
-*W 833040,728178 2 0012
-ff 672840,728178,0,80101 2 0013
-fi 614586,728178 2 0014
-fl 614586,728178 2 0015
-Fi 934986,728178 2 0016
-Fl 934986,728178 2 0017
-.i 267971,480597 0 0020
-.j 300011,480597,203890 1 0021
-ga 576720,728178 2 0022
-char180 576720,728178 2 0023
-aa "
-ah 576720,666283 2 0024
-ab 576720,728178 2 0025
-char175 576720,668757 2 0026
-a- "
-ao 768960,728178 2 0027
-char184 512640,0,178403 1 0030
-ac "
-char223 592739,728178 2 0031
-ss "
-char230 833040,480597 0 0032
-ae "
-oe 897120,480597 0 0033
-char248 576720,582542,101946 3 0034
-/o "
-char198 993240,728178 2 0035
-AE "
-OE 1121400,728178 2 0036
-char216 897120,779150,50973 3 0037
-/O "
---- 267971,480597 0 0040
-! 384480,728178 2 0041
-rq 585458,728178 2 0042
-sh 961200,728178,203888 3 0043
-# "
-Do 576720,786432,58254 3 0044
-$ "
-% 1079109,786432,58254 3 0045
-& 870906,728178 2 0046
-cq 320400,728178 2 0047
-' "
-( 448560,786432,262144 3 0050
-) 448560,786432,262144 3 0051
-* 576720,786432 2 0052
-+ 897120,646624,122336 3 0053
-, 320400,136898,110683 1 0054
-char173 384480,480597 0 0055
-hy "
-- "
-. 320400,136898 0 0056
-sl 576720,786432,262144 3 0057
-/ "
-0 576720,728178 2 0060
-1 576720,728178 2 0061
-2 576720,728178 2 0062
-3 576720,728178 2 0063
-4 576720,728178 2 0064
-5 576720,728178 2 0065
-6 576720,728178 2 0066
-7 576720,728178 2 0067
-8 576720,728178 2 0070
-9 576720,728178 2 0071
-: 320400,480597 0 0072
-; 320400,480597,110683 1 0073
-char161 384480,524288,203890 3 0074
-r! "
-= 897120,425984,-98304 0 0075
-char191 544680,524288,203890 3 0076
-r? "
-? 544680,728178 2 0077
-at 768960,728178 2 0100
-@ "
-A 768960,728178 2 0101
-B 768960,728178 2 0102
-C 736920,728178,0,0,-32040 2 0103
-D 833040,728178,0,0,0,-32040 2 0104
-E 672840,728178 2 0105
-F 640800,728178,0,0,0,-160200 2 0106
-G 768960,728178,0,0,-32040 2 0107
-H 833040,728178 2 0110
-I 346614,728178 2 0111
-J 544680,728178,0,0,0,-32040 2 0112
-K 801000,728178 2 0113
-L 608760,728178,0,0,0,64080 2 0114
-M 1025280,728178 2 0115
-N 833040,728178 2 0116
-O 833040,728178,0,0,-32040,-32040 2 0117
-P 736920,728178,0,0,0,-160200 2 0120
-Q 833040,728178,110683,0,-32040 3 0121
-R 736920,728178 2 0122
-S 640800,728178 2 0123
-T 768960,728178,0,0,0,-160200 2 0124
-U 801000,728178,0,0,32040 2 0125
-V 768960,728178,0,16021,48061,-240299 2 0126
-W 1089360,728178,0,16021,48061,-144179 2 0127
-X 768960,728178 2 0130
-Y 768960,728178,0,28835,32040,-227485 2 0131
-Z 704880,728178 2 0132
-lB 359722,786432,262144 3 0133
-[ "
-lq 585458,728178 2 0134
-rB 359722,786432,262144 3 0135
-] "
-ha 576720,728178 2 0136
-^ "
-a^ "
-a. 320400,728178 2 0137
-oq 320400,728178 2 0140
-` "
-a 550506,480597 0 0141
-b 588371,728178 2 0142
-c 512640,480597 0 0143
-d 588371,728178 2 0144
-e 535942,480597 0 0145
-f 352440,728178,0,80101 2 0146
-g 576720,480597,203890,16021 1 0147
-h 588371,728178 2 0150
-i 267971,728178 2 0151
-j 300011,728178,203890 3 0152
-k 556331,728178 2 0153
-l 267971,728178 2 0154
-m 908771,480597 0 0155
-n 588371,480597 0 0156
-o 576720,480597 0 0157
-p 588371,480597,203890 1 0160
-q 588371,480597,203890 1 0161
-r 390306,480597,0,16021 0 0162
-s 442152,480597 0 0163
-t 423802,617914 2 0164
-u 588371,480597 0 0165
-v 524291,480597,0,16021 0 0166
-w 780611,480597,0,16021 0 0167
-x 524291,480597 0 0170
-y 524291,480597,203890,16021 1 0171
-z 499533,480597 0 0172
-en 576720,480597,0,32040 0 0173
-em 1153440,480597,0,32040 0 0174
-a" 576720,728178 2 0175
-~ 576720,728178 2 0176
-a~ "
-char168 576720,728178 2 0177
-ad "
diff --git a/contrib/groff/font/devdvi/HI b/contrib/groff/font/devdvi/HI
deleted file mode 100644
index 4f96bdb59f30..000000000000
--- a/contrib/groff/font/devdvi/HI
+++ /dev/null
@@ -1,308 +0,0 @@
-name HI
-internalname cmssi10
-spacewidth 349526
-slant 11.999911
-ligatures ff fi fl ffi ffl 0
-checksum -984248855
-designsize 10485760
-kernpairs
-ff cq 72818
-ff ' 72818
-ff ? 72818
-ff ! 72818
-ff ) 72818
-ff rB 72818
-ff ] 72818
-cq ? 116509
-' ? 116509
-cq ! 116509
-' ! 116509
-A t -29128
-A C -29128
-A O -29128
-A G -29128
-A U -29128
-A Q -29128
-A T -87382
-A Y -87382
-A V -116509
-A W -116509
-D X -29128
-D W -29128
-D A -29128
-D V -29128
-D Y -29128
-F o -29128
-F e -29128
-F u -29128
-F r -29128
-F a -29128
-F A -87382
-F O -29128
-F C -29128
-F G -29128
-F Q -29128
-I I 29128
-K O -29128
-K C -29128
-K G -29128
-K Q -29128
-L T -87382
-L Y -87382
-L V -116509
-L W -116509
-O X -29128
-O W -29128
-O A -29128
-O V -29128
-O Y -29128
-P A -87382
-P o -29128
-P e -29128
-P a -29128
-P . -87382
-P , -87382
-T y -87382
-T e -87382
-T o -87382
-T r -87382
-T a -87382
-T A -87382
-T u -87382
-V o -29128
-V e -29128
-V u -29128
-V r -29128
-V a -29128
-V A -87382
-V O -29128
-V C -29128
-V G -29128
-V Q -29128
-W o -29128
-W e -29128
-W u -29128
-W r -29128
-W a -29128
-W A -87382
-W O -29128
-W C -29128
-W G -29128
-W Q -29128
-X O -29128
-X C -29128
-X G -29128
-X Q -29128
-Y e -87382
-Y o -87382
-Y r -87382
-Y a -87382
-Y A -87382
-Y u -87382
-a r -29128
-a y -29128
-a w -29128
-b e 29128
-b o 29128
-b x -29128
-b d 29128
-b c 29128
-b q 29128
-b r -29128
-b y -29128
-b w -29128
-f cq 72818
-f ' 72818
-f ? 72818
-f ! 72818
-f ) 72818
-f rB 72818
-f ] 72818
-g j 29128
-k e -29128
-k a -29128
-k o -29128
-k c -29128
-o e 29128
-o o 29128
-o x -29128
-o d 29128
-o c 29128
-o q 29128
-o r -29128
-o y -29128
-o w -29128
-p e 29128
-p o 29128
-p x -29128
-p d 29128
-p c 29128
-p q 29128
-p r -29128
-p y -29128
-p w -29128
-t y -29128
-t w -29128
-u w -29128
-w e -29128
-w a -29128
-w o -29128
-w c -29128
-y o -29128
-y e -29128
-y a -29128
-y . -87382
-y , -87382
-charset
-*G 567981,728178,0,140214,0,-5422 2 0000
-*D 873816,728178 2 0001
-*H 815562,728178,0,79216,-75562,50088 2 0002
-*L 640800,728178 2 0003
-*C 699053,728178,0,134389,0,67195 2 0004
-*P 742746,728178,0,84870,0,42435 2 0005
-*S 757307,728178,0,125650,0,62826 2 0006
-*U 815562,728178,0,94694,-152950,-50942 2 0007
-*F 757307,728178,0,48261,-106517,48261 2 0010
-*Q 815562,728178,0,94694,-152950,-10907 2 0011
-*W 757307,728178,0,86955,0,43478 2 0012
-ff 611672,728178,0,227595 2 0013
-fi 562155,728178,0,102349 2 0014
-fl 562155,728178,0,99435 2 0015
-Fi 853427,728178,0,102349 2 0016
-Fl 853427,728178,0,99435 2 0017
-.i 250494,466034,0,43715 0 0020
-.j 279622,466034,203890,43715 1 0021
-ga 524290,728178 2 0022
-char180 524290,728178,0,96523 2 0023
-aa "
-ah 524290,662642,0,88419 2 0024
-ab 524290,728178,0,99435 2 0025
-char175 524290,638464,0,92018 2 0026
-a- "
-ao 773347,728178 2 0027
-char184 466035,0,178403 1 0030
-ac "
-char223 503902,728178,0,96523 2 0031
-ss "
-char230 757307,466034,0,71070 0 0032
-ae "
-oe 815562,466034,0,71070 0 0033
-char248 524290,567979,101946,50821 3 0034
-/o "
-char198 902944,728178,0,125650 2 0035
-AE "
-OE 1019453,728178,0,125650 2 0036
-char216 815562,779150,50973,79216 3 0037
-/O "
---- 250494,466034 0 0040
-! 334963,728178,0,60114 2 0041
-rq 524290,728178,0,3315 2 0042
-sh 873816,728178,203888,53338 3 0043
-# "
-Do 524290,786432,58254,116982 3 0044
-$ "
-% 873816,786432,58254,32782 3 0045
-& 795173,728178,0,32064 2 0046
-cq 291272,728178,0,81960 2 0047
-' "
-( 407781,786432,262144,138032 3 0050
-) 407781,786432,262144,26592 3 0051
-* 524290,786432,0,123469 2 0052
-+ 815562,611670,87382,26592 3 0053
-, 291272,87381,131072 1 0054
-char173 349526,466034,0,20402 0 0055
-hy "
-- "
-. 291272,87381 0 0056
-sl 524290,786432,262144,138032 3 0057
-/ "
-0 524290,687400,0,116982 2 0060
-1 524290,687400,0,116982 2 0061
-2 524290,687400,0,116982 2 0062
-3 524290,687400,0,116982 2 0063
-4 524290,687400,0,116982 2 0064
-5 524290,687400,0,116982 2 0065
-6 524290,687400,0,116982 2 0066
-7 524290,687400,0,116982 2 0067
-8 524290,687400,0,116982 2 0070
-9 524290,687400,0,116982 2 0071
-: 291272,466034,0,26240 0 0072
-; 291272,466034,131072,26240 1 0073
-char161 334963,524288,203890,16776 3 0074
-r! "
-= 815562,387973,-136315,53338 0 0075
-char191 495163,524288,203890 3 0076
-r? "
-? 495163,728178,0,123822 2 0077
-at 699053,728178,0,79216 2 0100
-@ "
-A 699054,728178 2 0101
-B 699054,728178,0,86955,0,43478 2 0102
-C 669926,728178,0,125650,-75562,62826 2 0103
-D 757309,728178,0,79216,0,50088 2 0104
-E 626235,728178,0,125650,0,62826 2 0105
-F 597109,728178,0,140214,0,-5422 2 0106
-G 699053,728178,0,125650,-75562,62826 2 0107
-H 742746,728178,0,84870,0,42435 2 0110
-I 291274,728178,0,140214,0,70107 2 0111
-J 495163,728178,0,84870,0,13307 2 0112
-K 728182,728178,0,125650,0,62826 2 0113
-L 567981,728178,0,0,0,58254 2 0114
-M 917509,728178,0,84870,0,13307 2 0115
-N 742746,728178,0,84870,0,13307 2 0116
-O 771870,728178,0,79216,-75562,50088 2 0117
-P 669926,728178,0,86955,0,-58682 2 0120
-Q 771870,728178,131072,79216,-75562,79216 3 0121
-R 677208,728178,0,86955,0,65216 2 0122
-S 582544,728178,0,96523,0,48262 2 0123
-T 713616,728178,0,140214,-116083,-5422 2 0124
-U 720901,728178,0,84870,-75562,13307 2 0125
-V 699054,728178,0,169341,-111086,-63677 2 0126
-W 990326,728178,0,169341,-111086,23704 2 0127
-X 699054,728178,0,140214,0,70107 2 0130
-Y 699054,728178,0,180992,-125650,-52026 2 0131
-Z 640798,728178,0,125650,0,62826 2 0132
-lB 302923,786432,262144,167160 3 0133
-[ "
-lq 524290,728178,0,148952 2 0134
-rB 302923,786432,262144,91429 3 0135
-] "
-ha 524290,728178,0,83776 2 0136
-^ "
-a^ "
-a. 291272,712366,0,81512 2 0137
-oq 291272,728178,0,81960 2 0140
-` "
-a 503901,466034,0,10283 0 0141
-b 541766,728178,0,32053 2 0142
-c 466035,466034,0,87406 0 0143
-d 541766,728178,0,99435 2 0144
-e 466035,466034,0,71070 0 0145
-f 320400,728178,0,227595 2 0146
-g 524290,466034,203890,113621 1 0147
-h 541766,728178,0,18642 2 0150
-i 250494,712366,0,101901 2 0151
-j 279622,712366,203890,96075 3 0152
-k 512640,728178,0,87406 2 0153
-l 250494,728178,0,99435 2 0154
-m 833038,466034,0,18642 0 0155
-n 541766,466034,0,18642 0 0156
-o 524290,466034,0,69341 0 0157
-p 541766,466034,203890,40790 1 0160
-q 541766,466034,203890,43715 1 0161
-r 358266,466034,0,113621 0 0162
-s 401955,466034,0,81581 0 0163
-t 378653,599189,0,75757 2 0164
-u 541766,466034,0,43715 0 0165
-v 483512,466034,0,113621 0 0166
-w 716530,466034,0,113621 0 0167
-x 483512,466034,0,96144 0 0170
-y 483512,466034,203890,113621 1 0171
-z 455840,466034,0,91776 0 0172
-en 524290,466034,0,90349 0 0173
-em 1048579,466034,0,90349 0 0174
-a" 524290,728178,0,96523 2 0175
-~ 524290,709454,0,92544 2 0176
-a~ "
-char168 524290,712366,0,66949 2 0177
-ad "
diff --git a/contrib/groff/font/devdvi/I b/contrib/groff/font/devdvi/I
deleted file mode 100644
index 2323eed5934a..000000000000
--- a/contrib/groff/font/devdvi/I
+++ /dev/null
@@ -1,366 +0,0 @@
-#
-# manually added kernings for `` and ''
-#
-name I
-special
-internalname cmti10
-spacewidth 375155
-slant 14.036243
-ligatures ff fi fl ffi ffl 0
-checksum -50321606
-designsize 10485760
-kernpairs
-ff cq 109373
-ff ' 109373
-ff ? 109373
-ff ! 109373
-ff ) 109373
-ff rB 109373
-ff ] 109373
-' ' -80390
-cq ' -80390
-' cq -80390
-cq cq -80390
-cq ? 107187
-' ? 107187
-cq ! 107187
-' ! 107187
-A n -26797
-A l -26797
-A r -26797
-A u -26797
-A m -26797
-A t -26797
-A i -26797
-A C -26797
-A O -26797
-A G -26797
-A h -26797
-A b -26797
-A U -26797
-A k -26797
-A v -26797
-A w -26797
-A Q -26797
-A T -80390
-A Y -80390
-A V -107187
-A W -107187
-A e -53594
-A a -53594
-A o -53594
-A d -53594
-A c -53594
-A g -53594
-A q -53594
-D X -26797
-D W -26797
-D A -26797
-D V -26797
-D Y -26797
-F o -80390
-F e -80390
-F u -80390
-F r -80390
-F a -80390
-F A -107187
-F O -26797
-F C -26797
-F G -26797
-F Q -26797
-K O -26797
-K C -26797
-K G -26797
-K Q -26797
-L T -80390
-L Y -80390
-L V -107187
-L W -107187
-L e -53594
-L a -53594
-L o -53594
-L d -53594
-L c -53594
-L g -53594
-L q -53594
-O X -26797
-O W -26797
-O A -26797
-O V -26797
-O Y -26797
-P A -80390
-R n -26797
-R l -26797
-R r -26797
-R u -26797
-R m -26797
-R t -26797
-R i -26797
-R C -26797
-R O -26797
-R G -26797
-R h -26797
-R b -26797
-R U -26797
-R k -26797
-R v -26797
-R w -26797
-R Q -26797
-R T -80390
-R Y -80390
-R V -107187
-R W -107187
-R e -53594
-R a -53594
-R o -53594
-R d -53594
-R c -53594
-R g -53594
-R q -53594
-T y -80390
-T e -80390
-T o -80390
-T r -80390
-T a -80390
-T u -80390
-T A -80390
-V o -80390
-V e -80390
-V u -80390
-V r -80390
-V a -80390
-V A -107187
-V O -26797
-V C -26797
-V G -26797
-V Q -26797
-W A -80390
-X O -26797
-X C -26797
-X G -26797
-X Q -26797
-Y e -80390
-Y o -80390
-Y r -80390
-Y a -80390
-Y u -80390
-Y A -80390
-oq oq -80390
-oq ` -80390
-` oq -80390
-` ` -80390
-b e -53594
-b a -53594
-b o -53594
-b d -53594
-b c -53594
-b g -53594
-b q -53594
-c e -53594
-c a -53594
-c o -53594
-c d -53594
-c c -53594
-c g -53594
-c q -53594
-d l 53594
-e e -53594
-e a -53594
-e o -53594
-e d -53594
-e c -53594
-e g -53594
-e q -53594
-Fn cq 109373
-Fn ' 109373
-f cq 109373
-f ' 109373
-Fn ? 109373
-f ? 109373
-Fn ! 109373
-f ! 109373
-Fn ) 109373
-f ) 109373
-Fn rB 109373
-Fn ] 109373
-f rB 109373
-f ] 109373
-l l 53594
-n cq -107187
-n ' -107187
-o e -53594
-o a -53594
-o o -53594
-o d -53594
-o c -53594
-o g -53594
-o q -53594
-p e -53594
-p a -53594
-p o -53594
-p d -53594
-p c -53594
-p g -53594
-p q -53594
-r e -53594
-r a -53594
-r o -53594
-r d -53594
-r c -53594
-r g -53594
-r q -53594
-w l 53594
-charset
-*G 657686,716526,0,139518,0,5534 2 0000
-*D 857498,716526 2 0001
-*H 803904,716526,0,98595,-80538,71798 2 0002
-*L 725843,716526 2 0003
-*C 696717,716526,0,160373,0,80187 2 0004
-*P 779437,716526,0,171851,0,85926 2 0005
-*S 750310,716526,0,126120,0,63061 2 0006
-*U 803904,716526,0,116509,-170102,-17475 2 0007
-*F 750310,716526,0,62770,-116363,62770 2 0010
-*Q 803904,716526,0,116509,-170102,4659 2 0011
-*W 750310,716526,0,107552,0,53776 2 0012
-ff 643123,728178,203890,222240 3 0013
-fi 589530,728178,203890,108354 3 0014
-fl 616326,728178,203890,108354 3 0015
-Fi 924490,728178,203890,108354 3 0016
-Fl 937888,728178,203890,108354 3 0017
-.i 321562,451470,0,80440 0 0020
-.j 348358,451470,203890,39176 1 0021
-ga 535936,728178 2 0022
-char180 535936,728178,0,101654 2 0023
-aa "
-ah 535936,659002,0,86982 2 0024
-ab 535936,728178,0,113306 2 0025
-char175 535936,588949,0,108354 2 0026
-a- "
-ao 871672,728178 2 0027
-char184 482342,0,178403 1 0030
-ac "
-char223 562733,728178,203890,110245 3 0031
-ss "
-char230 750310,451470,0,78789 0 0032
-ae "
-oe 750310,451470,0,78789 0 0033
-char248 535936,553416,101946,96411 3 0034
-/o "
-char198 925654,716526,0,126120 2 0035
-AE "
-OE 1032842,716526,0,126120 2 0036
-char216 803904,767499,50973,98595 3 0037
-/O "
---- 267968,451470 0 0040
-! 321562,728178,0,130200 2 0041
-rq 539432,728178,0,72994 2 0042
-sh 857498,728178,203888,69378 3 0043
-# "
-char163 806453,728178 2 0044
-Po "
-% 857498,786432,58254,143014 3 0045
-& 803904,728178,0,101654 2 0046
-cq 321562,728178,0,130200 2 0047
-' "
-( 428749,786432,262144,169811 3 0050
-) 428749,786432,262144,38739 3 0051
-* 535936,786432,0,156413 2 0052
-+ 803904,588949,59418,38739 3 0053
-, 321562,110683,203890 1 0054
-char173 375155,451470,0,29637 0 0055
-hy "
-- "
-. 321562,110683 0 0056
-sl 535936,786432,262144,169811 3 0057
-/ "
-0 535936,675749,0,142141 2 0060
-1 535936,675749,0,142141 2 0061
-2 535936,675749,0,142141 2 0062
-3 535936,675749,0,142141 2 0063
-4 535936,675749,203890,142141 3 0064
-5 535936,675749,0,142141 2 0065
-6 535936,675749,0,142141 2 0066
-7 535936,675749,203890,142141 3 0067
-8 535936,675749,0,142141 2 0070
-9 535936,675749,0,142141 2 0071
-: 321562,451470,0,61022 0 0072
-; 321562,451470,203890,61022 1 0073
-char161 321562,524288,203890,79227 3 0074
-r! "
-= 803904,384696,-139592,69378 0 0075
-char191 535936,524288,203890 3 0076
-r? "
-? 535936,728178,0,128451 2 0077
-at 803904,728178,0,100634 2 0100
-@ "
-A 779437,716526 2 0101
-B 738077,716526,0,107552,0,53776 2 0102
-C 750310,716526,0,152334,-80538,76168 2 0103
-D 791670,716526,0,98595,0,71798 2 0104
-E 711280,716526,0,126120,0,63061 2 0105
-F 684483,716526,0,139518,0,5534 2 0106
-G 811186,716526,0,91459,-80538,91459 2 0107
-H 779437,716526,0,171851,0,85926 2 0110
-I 404282,716526,0,165733,0,82867 2 0111
-J 550499,716526,0,147093,0,46750 2 0112
-K 806234,716526,0,152334,0,76168 2 0113
-L 657686,716526,0,0,0,53594 2 0114
-M 940218,716526,0,171851,0,59130 2 0115
-N 779437,716526,0,171851,0,59130 2 0116
-O 803904,716526,0,98595,-80538,71798 2 0117
-P 711280,716526,0,107552,0,-26432 2 0120
-Q 803904,716526,203890,98595,-80538,98595 3 0121
-R 764874,716526,0,40560,0,30421 2 0122
-S 589530,716526,0,125538,0,62770 2 0123
-T 750310,716526,0,139518,-134349,5534 2 0124
-U 779437,716526,0,171851,-121898,59130 2 0125
-V 779437,716526,0,192530,-138936,-21845 2 0126
-W 1047405,716526,0,192530,-138936,58546 2 0127
-X 779437,716526,0,165733,0,82867 2 0130
-Y 779437,716526,0,203248,-152334,-11126 2 0131
-Z 643123,716526,0,152334,0,76168 2 0132
-lB 321562,786432,262144,196608 3 0133
-[ "
-lq 539432,728178,0,176685 2 0134
-rB 321562,786432,262144,110392 3 0135
-] "
-ha 535936,728178,0,69688 2 0136
-^ "
-a^ "
-a. 321562,700301,0,123230 2 0137
-oq 321562,728178,0,130200 2 0140
-` "
-a 535936,451470,0,80440,-46677,80440 0 0141
-b 482342,728178,0,66190,-46677,66190 2 0142
-c 482342,451470,0,59274,-46677,59274 0 0143
-d 535936,728178,0,108354,-46677,108354 2 0144
-e 482342,451470,0,78789,-46677,78789 0 0145
-Fn 321562,728178,203890,222240,104566,112867 3 0146
-f "
-g 482342,451470,203890,92770,-21045,55147 1 0147
-h 535936,728178,0,80440,0,80440 2 0150
-i 321562,687194,0,106846,-32427,106846 2 0151
-j 321562,687194,203890,151701,50973,92770 3 0152
-k 482342,728178,0,112867,0,80440 2 0153
-l 267968,728178,0,108354,-26797,107237 2 0154
-m 857498,451470,0,80440,-32427,80440 0 0155
-n 589530,451470,0,80440,-32427,80440 0 0156
-o 535936,451470,0,66190,-46677,66190 0 0157
-p 535936,451470,203890,66190,-22718,66190 1 0160
-q 482342,451470,203890,92770,-46677,55147 1 0161
-r 442147,451470,0,112867,-32427,86070 0 0162
-s 428749,451470,0,86070,0,86070 0 0163
-t 348358,644958,0,99469,-45875,99469 2 0164
-u 562733,451470,0,80440,-32427,80440 0 0165
-v 482342,451470,0,112867,-32427,75245 0 0166
-w 696717,451470,0,112867,-32427,84651 0 0167
-x 486421,451470,0,126266,0,126266 0 0170
-y 509139,451470,203890,92770,-32427,55147 1 0171
-z 428749,451470,0,128888,0,80440 0 0172
-en 535936,451470,0,96552 0 0173
-em 1071872,451470,0,96552 0 0174
-a" 535936,728178,0,128451 2 0175
-~ 535936,700301,0,121482 2 0176
-a~ "
-char168 535936,700301,0,109832 2 0177
-ad "
diff --git a/contrib/groff/font/devdvi/MI b/contrib/groff/font/devdvi/MI
deleted file mode 100644
index 2b2e3491ba3c..000000000000
--- a/contrib/groff/font/devdvi/MI
+++ /dev/null
@@ -1,136 +0,0 @@
-name MI
-special
-internalname cmmi10
-slant 14.036243
-checksum 195060286
-designsize 10485760
-charset
---- 645166,716526,0,145637 2 0000
---- 873816,716526 2 0001
---- 799829,716526,0,29128 2 0002
---- 728179,716526 2 0003
---- 778424,716526,0,79371 2 0004
---- 871630,716526,0,85195 2 0005
---- 817746,716526,0,60438 2 0006
---- 611669,716526,0,145637 2 0007
---- 699051,716526 2 0010
---- 641962,716526,0,115344 2 0011
---- 809918,716526,0,52610 2 0012
-*a 670776,451470,0,3882 0 0013
-*b 593102,728178,203890,55342 3 0014
-*g 542880,451470,203890,58254 1 0015
-*d 466034,728178,0,39685 2 0016
-*e 425621,451470 0 0017
-*z 458754,728178,203890,77368 3 0020
-*y 520651,451470,203890,37622 1 0021
-*h 492248,728178,0,29128 2 0022
-*i 371130,451470 0 0023
-*k 604147,451470 0 0024
-*l 611672,728178 2 0025
-char181 631819,451470,203890 1 0026
-*m "
-*n 517979,451470,0,66750 0 0027
-*c 458754,728178,203890,48242 3 0030
-*p 597717,451470,0,37622 0 0031
-*r 542130,451470,203890 1 0032
-*s 599171,451470,0,37622 0 0033
-*t 458390,451470,0,118694 0 0034
-*u 566525,451470,0,37622 0 0035
-*f 624778,728178,203890 3 0036
-*x 656086,451470,203890 1 0037
-*q 683034,728178,203890,37622 3 0040
-*w 652691,451470,0,37622 0 0041
---- 488970,451470 0 0042
-+h 620170,728178 2 0043
-+p 868357,451470,0,29128 0 0044
---- 542130,451470,203890 1 0045
-ts 380474,451470,101946,83739 1 0046
-+f 685944,451470,203890 1 0047
---- 1048579,384696,-139592 0 0050
---- 1048579,384696,-139592 0 0051
---- 1048579,384696,-139592 0 0052
---- 1048579,384696,-139592 0 0053
---- 291272,486275,-38013 2 0054
---- 291272,486275,-38013 2 0055
---- 524290,487880,-36408 2 0056
---- 524290,487880,-36408 2 0057
---- 524290,451470 0 0060
---- 524290,451470 0 0061
---- 524290,451470 0 0062
---- 524290,451470,203890 1 0063
---- 524290,451470,203890 1 0064
---- 524290,451470,203890 1 0065
---- 524290,675749 2 0066
---- 524290,451470,203890 1 0067
---- 524290,675749 2 0070
---- 524290,451470,203890 1 0071
---- 291272,110683 0 0072
---- 291272,110683,203890 1 0073
-< 815562,565285,40997 3 0074
---- 524290,786432,262144 3 0075
-> 815562,565285,40997 3 0076
---- 524290,487880,-36408 2 0077
-pd 556693,728178,0,58254 2 0100
---- 786434,716526 2 0101
---- 795355,716526,0,52610 2 0102
---- 749440,716526,0,75002 2 0103
---- 868134,716526,0,29128 2 0104
---- 774054,716526,0,60438 2 0105
---- 674294,716526,0,145637 2 0106
---- 824442,716526 2 0107
---- 871630,716526,0,85195 2 0110
---- 460938,716526,0,82283 2 0111
---- 581450,716526,0,100853 2 0112
---- 890563,716526,0,75002 2 0113
---- 713616,716526 2 0114
---- 1017266,716526,0,114323 2 0115
---- 842502,716526,0,114323 2 0116
---- 799829,716526,0,29128 2 0117
---- 673200,716526,0,145637 2 0120
---- 828957,716526,203890 3 0121
---- 796173,716526,0,8101 2 0122
---- 642982,716526,0,60438 2 0123
---- 612763,716526,0,145637 2 0124
---- 715944,716526,0,114323 2 0125
---- 611670,716526,0,233018 2 0126
---- 990323,716526,0,145637 2 0127
---- 868718,716526,0,82283 2 0130
---- 608758,716526,0,233018 2 0131
---- 715800,716526,0,75002 2 0132
---- 407781,786432 2 0133
---- 407781,728178,203890 3 0134
---- 407781,728178,203890 3 0135
---- 1048579,375013,-149275 0 0136
---- 1048579,375013,-149275 0 0137
---- 436910,728178 2 0140
---- 554267,451470 0 0141
---- 450014,728178 2 0142
---- 453778,451470 0 0143
---- 545771,728178 2 0144
---- 488245,451470 0 0145
---- 513368,728178,203890,112869 3 0146
---- 500138,451470,203890,37622 1 0147
---- 604147,728178 2 0150
---- 361248,691562 2 0151
---- 431811,691562,203890,60024 3 0152
---- 545893,728178,0,33010 2 0153
---- 312874,728178,0,20634 2 0154
---- 920664,451470 0 0155
---- 629392,451470 0 0156
-*o 508269,451470 0 0157
---- 527566,451470,203890 1 0160
---- 468099,451470,203890,37622 1 0161
---- 473075,451470,0,29128 0 0162
---- 491520,451470 0 0163
---- 378654,644958 2 0164
---- 600266,451470 0 0165
---- 508270,451470,0,37622 0 0166
---- 750694,451470,0,28216 0 0167
---- 599291,451470 0 0170
---- 514098,451470,203890,37622 1 0171
---- 487640,451470,0,46117 0 0172
---- 338120,451470 0 0173
---- 402685,451470,203890 1 0174
-wp 667376,451470,203890 1 0175
---- 524290,749149,0,161291 2 0176
---- 291272,728178,0,418866 2 0177
diff --git a/contrib/groff/font/devdvi/Makefile.sub b/contrib/groff/font/devdvi/Makefile.sub
deleted file mode 100644
index 5f30be233452..000000000000
--- a/contrib/groff/font/devdvi/Makefile.sub
+++ /dev/null
@@ -1,11 +0,0 @@
-DEV=dvi
-DEVFILES=DESC R I B BI CW CWI MI S EX H HI HB SA SB \
- generate/CompileFonts generate/Makefile generate/msam.map generate/msbm.map \
- generate/texb.map generate/texex.map generate/texi.map generate/texmi.map \
- generate/texr.map generate/texsy.map generate/textt.map
-
-CLEANADD=DESC
-
-DESC: DESC.in
- cat $(srcdir)/DESC.in >DESC
- test -z '$(DVIPRINT)' || echo print '$(DVIPRINT)' >>DESC
diff --git a/contrib/groff/font/devdvi/R b/contrib/groff/font/devdvi/R
deleted file mode 100644
index 2c7fe300b8f7..000000000000
--- a/contrib/groff/font/devdvi/R
+++ /dev/null
@@ -1,441 +0,0 @@
-#
-# manually added kernings for `` and ''
-#
-name R
-special
-internalname cmr10
-spacewidth 349526
-ligatures ff fi fl ffi ffl 0
-checksum 1274110073
-designsize 10485760
-kernpairs
-ff cq 81557
-ff ' 81557
-ff ? 81557
-ff ! 81557
-ff ) 81557
-ff rB 81557
-ff ] 81557
-' ' -87382
-cq ' -87382
-' cq -87382
-cq cq -87382
-' ? 116509
-cq ? 116509
-' ! 116509
-cq ! 116509
-*A t -29128
-A t -29128
-*A C -29128
-A C -29128
-*A *O -29128
-*A O -29128
-A *O -29128
-A O -29128
-*A G -29128
-A G -29128
-*A U -29128
-A U -29128
-*A Q -29128
-A Q -29128
-*A *T -87382
-*A T -87382
-A *T -87382
-A T -87382
-*A Y -87382
-A Y -87382
-*A V -116509
-A V -116509
-*A W -116509
-A W -116509
-D *X -29128
-D X -29128
-D W -29128
-D *A -29128
-D A -29128
-D V -29128
-D Y -29128
-F o -87382
-F e -87382
-F u -87382
-F r -87382
-F a -87382
-F *A -116509
-F A -116509
-F *O -29128
-F O -29128
-F C -29128
-F G -29128
-F Q -29128
-*I *I 29128
-*I I 29128
-I *I 29128
-I I 29128
-*K *O -29128
-*K O -29128
-K *O -29128
-K O -29128
-*K C -29128
-K C -29128
-*K G -29128
-K G -29128
-*K Q -29128
-K Q -29128
-L *T -87382
-L T -87382
-L Y -87382
-L V -116509
-L W -116509
-*O *X -29128
-*O X -29128
-O *X -29128
-O X -29128
-*O W -29128
-O W -29128
-*O *A -29128
-*O A -29128
-O *A -29128
-O A -29128
-*O V -29128
-O V -29128
-*O Y -29128
-O Y -29128
-*R *A -87382
-*R A -87382
-P *A -87382
-P A -87382
-*R o -29128
-P o -29128
-*R e -29128
-P e -29128
-*R a -29128
-P a -29128
-*R . -87382
-P . -87382
-*R , -87382
-P , -87382
-R t -29128
-R C -29128
-R *O -29128
-R O -29128
-R G -29128
-R U -29128
-R Q -29128
-R *T -87382
-R T -87382
-R Y -87382
-R V -116509
-R W -116509
-*T y -29128
-T y -29128
-*T e -87382
-T e -87382
-*T o -87382
-T o -87382
-*T r -87382
-T r -87382
-*T a -87382
-T a -87382
-*T *A -87382
-*T A -87382
-T *A -87382
-T A -87382
-*T u -87382
-T u -87382
-V o -87382
-V e -87382
-V u -87382
-V r -87382
-V a -87382
-V *A -116509
-V A -116509
-V *O -29128
-V O -29128
-V C -29128
-V G -29128
-V Q -29128
-W o -87382
-W e -87382
-W u -87382
-W r -87382
-W a -87382
-W *A -116509
-W A -116509
-W *O -29128
-W O -29128
-W C -29128
-W G -29128
-W Q -29128
-*X *O -29128
-*X O -29128
-X *O -29128
-X O -29128
-*X C -29128
-X C -29128
-*X G -29128
-X G -29128
-*X Q -29128
-X Q -29128
-Y e -87382
-Y o -87382
-Y r -87382
-Y a -87382
-Y *A -87382
-Y A -87382
-Y u -87382
-oq oq -87382
-oq ` -87382
-` oq -87382
-` ` -87382
-a v -29128
-a j 58254
-a y -29128
-a w -29128
-b e 29128
-b o 29128
-b x -29128
-b d 29128
-b c 29128
-b q 29128
-b v -29128
-b j 58254
-b y -29128
-b w -29128
-c h -29128
-c k -29128
-f ' 81557
-f cq 81557
-f ? 81557
-f ! 81557
-f ) 81557
-f rB 81557
-f ] 81557
-g j 29128
-h t -29128
-h u -29128
-h b -29128
-h y -29128
-h v -29128
-h w -29128
-k a -58254
-k e -29128
-k a -29128
-k o -29128
-k c -29128
-m t -29128
-m u -29128
-m b -29128
-m y -29128
-m v -29128
-m w -29128
-n t -29128
-n u -29128
-n b -29128
-n y -29128
-n v -29128
-n w -29128
-o e 29128
-o o 29128
-o x -29128
-o d 29128
-o c 29128
-o q 29128
-o v -29128
-o j 58254
-o y -29128
-o w -29128
-p e 29128
-p o 29128
-p x -29128
-p d 29128
-p c 29128
-p q 29128
-p v -29128
-p j 58254
-p y -29128
-p w -29128
-t y -29128
-t w -29128
-u w -29128
-v a -58254
-v e -29128
-v a -29128
-v o -29128
-v c -29128
-w e -29128
-w a -29128
-w o -29128
-w c -29128
-y o -29128
-y e -29128
-y a -29128
-y . -87382
-y , -87382
-charset
-*G 655362,716526,0,0,0,-145637 2 0000
-*D 873816,716526 2 0001
-*H 815562,716526,0,0,-29128,-29128 2 0002
-*L 728179,716526 2 0003
-*C 699053,716526 2 0004
-*P 786434,716526 2 0005
-*S 757307,716526 2 0006
-*U 815562,716526,0,0,-29128,-145637 2 0007
-*F 757307,716526,0,0,-29128 2 0010
-*Q 815562,716526,0,0,-29128,-72818 2 0011
-*W 757307,716526 2 0012
-ff 611672,728178,0,81557 2 0013
-fi 582544,728178 2 0014
-fl 582544,728178 2 0015
-Fi 873816,728178 2 0016
-Fl 873816,728178 2 0017
-.i 291272,451470 0 0020
-.j 320400,451470,203890 1 0021
-ga 524290,728178 2 0022
-char180 524290,728178 2 0023
-aa "
-ah 524290,659002 2 0024
-ab 524290,728178 2 0025
-char175 524290,595357 2 0026
-a- "
-ao 786434,728178 2 0027
-char184 466035,0,178403 1 0030
-ac "
-char223 524291,728178 2 0031
-ss "
-char230 757307,451470 0 0032
-ae "
-oe 815562,451470 0 0033
-char248 524290,553416,101946 3 0034
-/o "
-char198 946634,716526 2 0035
-AE "
-OE 1063142,716526 2 0036
-char216 815562,767499,50973 3 0037
-/O "
---- 291272,451470 0 0040
-! 291272,728178 2 0041
-rq 524290,728178 2 0042
-sh 873816,728178,203888 3 0043
-# "
-Do 524290,786432,58254 3 0044
-$ "
-% 873816,786432,58254 3 0045
-& 815562,728178 2 0046
-cq 291272,728178 2 0047
-' "
-( 407781,786432,262144 3 0050
-) 407781,786432,262144 3 0051
-* 524290,786432 2 0052
-pl 815562,611670,87382 3 0053
-+ "
-, 291272,110683,203890 1 0054
-char173 349526,451470 0 0055
-hy "
-- "
-. 291272,110683 0 0056
-sl 524290,786432,262144 3 0057
-/ "
-0 524290,675749 2 0060
-1 524290,675749 2 0061
-2 524290,675749 2 0062
-3 524290,675749 2 0063
-4 524290,675749 2 0064
-5 524290,675749 2 0065
-6 524290,675749 2 0066
-7 524290,675749 2 0067
-8 524290,675749 2 0070
-9 524290,675749 2 0071
-: 291272,451470 0 0072
-; 291272,451470,203890 1 0073
-char161 291272,524288,203890 3 0074
-r! "
-eq 815562,384696,-139592 0 0075
-= "
-char191 495163,524288,203890 3 0076
-r? "
-? 495163,728178 2 0077
-at 815562,728178 2 0100
-@ "
-*A 786434,716526 2 0101
-A "
-*B 742744,716526 2 0102
-B "
-C 757307,716526,0,0,-29128 2 0103
-D 800998,716526,0,0,0,-29128 2 0104
-*E 713616,716526 2 0105
-E "
-F 684490,716526,0,0,0,-145637 2 0106
-G 822843,716526,0,0,-29128 2 0107
-*Y 786434,716526 2 0110
-H "
-*I 378653,716526 2 0111
-I "
-J 538853,716526,0,0,0,-29128 2 0112
-*K 815562,716526 2 0113
-K "
-L 655362,716526,0,0,0,58254 2 0114
-*M 961197,716526 2 0115
-M "
-*N 786434,716526 2 0116
-N "
-*O 815562,716526,0,0,-29128,-29128 2 0117
-O "
-*R 713616,716526,0,0,0,-145637 2 0120
-P "
-Q 815562,716526,203890,0,-29128 3 0121
-R 771870,716526 2 0122
-S 582544,716526 2 0123
-*T 757307,716526,0,0,0,-145637 2 0124
-T "
-U 786434,716526,0,0,-14563 2 0125
-V 786434,716526,0,14563,43691,-218454 2 0126
-W 1077706,716526,0,14563,43691,-131074 2 0127
-*X 786434,716526 2 0130
-X "
-Y 786434,716526,0,26214,29128,-206803 2 0131
-*Z 640798,716526 2 0132
-Z "
-lB 291272,786432,262144 3 0133
-[ "
-lq 524290,728178 2 0134
-rB 291272,786432,262144 3 0135
-] "
-ha 524290,728178 2 0136
-^ "
-a^ "
-a. 291272,700301 2 0137
-oq 291272,728178 2 0140
-` "
-a 524290,451470 0 0141
-b 582544,728178 2 0142
-c 466035,451470 0 0143
-d 582544,728178 2 0144
-e 466035,451470 0 0145
-f 320400,728178,0,81557 2 0146
-g 524290,451470,203890,14563 1 0147
-h 582544,728178 2 0150
-i 291272,700301 2 0151
-j 320400,700301,203890 3 0152
-k 553418,728178 2 0153
-l 291272,728178 2 0154
-m 873816,451470 0 0155
-n 582544,451470 0 0156
-o 524290,451470 0 0157
-p 582544,451470,203890 1 0160
-q 553416,451470,203890 1 0161
-r 410694,451470 0 0162
-s 413606,451470 0 0163
-t 407781,644958 2 0164
-u 582544,451470 0 0165
-v 553418,451470,0,14563 0 0166
-w 757307,451470,0,14563 0 0167
-x 553418,451470 0 0170
-y 553418,451470,203890,14563 1 0171
-z 466035,451470 0 0172
-en 524290,451470,0,29128 0 0173
-em 1048579,451470,0,29128 0 0174
-a" 524290,728178 2 0175
-~ 524290,700301 2 0176
-a~ "
-char168 524290,700301 2 0177
-ad "
diff --git a/contrib/groff/font/devdvi/S b/contrib/groff/font/devdvi/S
deleted file mode 100644
index 75abc6c84357..000000000000
--- a/contrib/groff/font/devdvi/S
+++ /dev/null
@@ -1,153 +0,0 @@
-name S
-special
-internalname cmsy10
-slant 14.036243
-checksum 555887770
-designsize 10485760
-charset
-mi 815562,611670,87382 3 0000
-\- "
-md 291272,466035,-58253 2 0001
-pc "
-char215 815562,611670,87382 3 0002
-mu "
-** 524290,487880,-36408 2 0003
-char247 815562,611670,87382 3 0004
-di "
---- 524290,466035,-58253 2 0005
-char177 815562,611670,87382 3 0006
-+- "
--+ 815562,611670,87382 3 0007
-c+ 815562,611670,87382 3 0010
---- 815562,611670,87382 3 0011
-c* 815562,611670,87382 3 0012
---- 815562,611670,87382 3 0013
---- 815562,611670,87382 3 0014
-ci 1048579,728178,203890 3 0015
---- 524290,466035,-58253 2 0016
-bu 524290,466035,-58253 2 0017
---- 815562,486275,-38013 2 0020
-== 815562,486275,-38013 2 0021
-ib 815562,666864,142576 3 0022
-ip 815562,666864,142576 3 0023
-<= 815562,666864,142576 3 0024
->= 815562,666864,142576 3 0025
---- 815562,666864,142576 3 0026
---- 815562,666864,142576 3 0027
-ti 815562,384696,-139592 0 0030
-ap "
-~~ 815562,506590,-17698 2 0031
-sb 815562,565285,40997 3 0032
-sp 815562,565285,40997 3 0033
-<< 1048579,565285,40997 3 0034
->> 1048579,565285,40997 3 0035
---- 815562,565285,40997 3 0036
---- 815562,565285,40997 3 0037
-<- 1048579,384696,-139592 0 0040
--> 1048579,384696,-139592 0 0041
-ua 524290,728178,203888 3 0042
-da 524290,728178,203888 3 0043
-<> 1048579,384696,-139592 0 0044
---- 1048579,728178,203888 3 0045
---- 1048579,728178,203888 3 0046
-~= 815562,486275,-38013 2 0047
-lh 1048579,384696,-139592 0 0050
-lA "
-rh 1048579,384696,-139592 0 0051
-rA "
-uA 640798,728178,203888 3 0052
-dA 640798,728178,203888 3 0053
-hA 1048579,384696,-139592 0 0054
---- 1048579,728178,203888 3 0055
---- 1048579,728178,203888 3 0056
-pt 815562,451470 0 0057
-prime 288358,582544 2 0060
-if 1048579,451470 0 0061
-mo 699053,565285,40997 3 0062
-st 699053,565285,40997 3 0063
---- 932070,728178,203890 3 0064
---- 932070,728178,203890 3 0065
-slashnot 0,728178,203888 3 0066
---- 0,384696,-139592 0 0067
-fa 582544,728178 2 0070
-te 582544,728178 2 0071
-char172 699053,451470 0 0072
-no "
-es 524290,786432,58254 3 0073
-Re 757307,728178 2 0074
-Im 757307,728178 2 0075
---- 815562,728178 2 0076
-pp 815562,728178 2 0077
-Ah 640798,728178 2 0100
-A 837258,716526 2 0101
-B 688715,716526,0,31890 2 0102
-C 552106,716526,0,61170 2 0103
-D 808864,716526,0,29128 2 0104
-E 553419,716526,0,93786 2 0105
-F 753662,716526,0,104130 2 0106
-G 623762,716526,101946,62184 3 0107
-H 885541,716526,0,10123 2 0110
-I 570966,716526,0,77408 2 0111
-J 710704,716526,101946,193694 3 0112
-K 798963,716526,0,15147 2 0113
-L 723229,716526 2 0114
-M 1259235,716526 2 0115
-N 860347,716526,0,154518 2 0116
-O 834786,716526,0,29128 2 0117
-P 729347,716526,0,86216 2 0120
-Q 856341,716526,101946 3 0121
-R 888672,716526 2 0122
-S 634974,716526,0,78638 2 0123
-T 571101,716526,0,266514 2 0124
-U 656232,716526,0,104130 2 0125
-V 642549,716526,0,86216 2 0126
-W 1035766,716526,0,86216 2 0127
-X 747946,716526,0,153541 2 0130
-Y 700802,716526,101946,86216 3 0131
-Z 759930,716526,0,83302 2 0132
-cu 699053,582544 2 0133
-ca 699053,582544 2 0134
---- 699053,582544 2 0135
-AN 699053,582544 2 0136
-OR 699053,582544 2 0137
---- 640798,728178 2 0140
---- 640798,728178 2 0141
-lf 466035,786432,262144 3 0142
-rf 466035,786432,262144 3 0143
-lc 466035,786432,262144 3 0144
-rc 466035,786432,262144 3 0145
-{ 524290,786432,262144 3 0146
-lC "
-} 524290,786432,262144 3 0147
-rC "
-la 407781,786432,262144 3 0150
-ra 407781,786432,262144 3 0151
-bar 291272,786432,262144 3 0152
-or "
-bv "
-| "
-ba "
-bardbl 524290,786432,262144 3 0153
-va 524290,786432,262144 3 0154
-vA 640798,786432,262144 3 0155
-rs 524290,786432,262144 3 0156
-\ "
---- 291272,728178,203888 3 0157
-sr 873816,41942,1006634 1 0160
---- 786434,716526 2 0161
-gr 873816,716526 2 0162
---- 436909,728178,203890,116509 3 0163
---- 699053,582544 2 0164
---- 699053,582544 2 0165
---- 815562,666864,142576 3 0166
---- 815562,666864,142576 3 0167
-char167 466037,728178,203890 3 0170
-sc "
-dg 466035,728178,203890 3 0171
-dd 466035,728178,203890 3 0172
-char182 640798,728178,203890 3 0173
-ps "
-CL 815562,728178,135926 3 0174
-DI 815562,728178,135926 3 0175
-HE 815562,728178,135926 3 0176
-SP 815562,728178,135926 3 0177
diff --git a/contrib/groff/font/devdvi/SA b/contrib/groff/font/devdvi/SA
deleted file mode 100644
index 91879fc7cce2..000000000000
--- a/contrib/groff/font/devdvi/SA
+++ /dev/null
@@ -1,143 +0,0 @@
-name SA
-special
-internalname msam10
-checksum -1749815603
-designsize 10485760
-charset
-boxdot 815562,707789 2 0000
-boxplus 815562,707789 2 0001
-boxtimes 815562,707789 2 0002
-square 815562,707789 2 0003
-blacksquare 815562,707789 2 0004
-centerdot 291272,576570 2 0005
-lz 699053,725867,116509 3 0006
-lozenge "
-blacklozenge 699053,725867,116509 3 0007
-circlearrowright 815562,610248,85960 3 0010
-circlearrowleft 815562,610248,85960 3 0011
-rightleftharpoons 1048579,547770,14197 3 0012
-leftrightharpoons 1048579,547770,14197 3 0013
-boxminus 815562,707789 2 0014
-Vdash 757307,725867 2 0015
-Vvdash 932070,725867 2 0016
-vDash 640798,725867 2 0017
-twoheadrightarrow 1048579,547770,14197 3 0020
-twoheadleftarrow 1048579,547770,14197 3 0021
-leftleftarrows 1048579,707789,189584 3 0022
-rightrightarrows 1048579,707789,189584 3 0023
-upuparrows 873816,725867,203888 3 0024
-downdownarrows 873816,725867,203888 3 0025
-upharpoonright 436909,725867,203888 3 0026
-downharpoonright 436909,725867,203888 3 0027
-upharpoonleft 436909,725867,203888 3 0030
-downharpoonleft 436909,725867,203888 3 0031
-rightarrowtail 1165088,547770,14197 3 0032
-leftarrowtail 1165088,547770,14197 3 0033
-leftrightarrows 1048579,707789,189584 3 0034
-rightleftarrows 1048579,707789,189584 3 0035
-Lsh 524290,725867 2 0036
-Rsh 524290,725867 2 0037
-rightsquigarrow 1048579,396238,-139592 0 0040
-leftrightsquigarrow 1456360,396238,-139592 0 0041
-looparrowleft 1048579,576570 2 0042
-looparrowright 1048579,576570 2 0043
-circeq 815562,765021,240733 3 0044
-succsim 815562,765021,240733 3 0045
-gtrsim 815562,765021,240733 3 0046
-gtrapprox 815562,792549,268261 3 0047
-multimap 1165088,576570 2 0050
-3d 699053,725867 2 0051
-tf "
-therefore "
-because 699053,725867 2 0052
-doteqdot 815562,610248,85960 3 0053
-triangleq 815562,961197,85960 3 0054
-precsim 815562,765021,240733 3 0055
-lesssim 815562,765021,240733 3 0056
-lessapprox 815562,792549,268261 3 0057
-eqslantless 815562,667592,143304 3 0060
-eqslantgtr 815562,667592,143304 3 0061
-curlyeqprec 815562,667592,143304 3 0062
-curlyeqsucc 815562,667592,143304 3 0063
-preccurlyeq 815562,667592,143304 3 0064
-leqq 815562,792549,268261 3 0065
-leqslant 815562,667592,143304 3 0066
-lessgtr 815562,707789,189584 3 0067
-backprime 288358,576570 2 0070
---- 524290,486557,-37731 2 0071
-risingdotseq 815562,610248,85960 3 0072
-fallingdotseq 815562,610248,85960 3 0073
-succcurlyeq 815562,667592,143304 3 0074
-geqq 815562,792549,268261 3 0075
-geqslant 815562,667592,143304 3 0076
-gtrless 815562,707789,189584 3 0077
-sqsubset 815562,576570,36882 3 0100
-sqsupset 815562,576570,36882 3 0101
-vartriangleright 815562,576570,36882 3 0102
-vartriangleleft 815562,576570,36882 3 0103
-trianglerighteq 815562,667592,143304 3 0104
-trianglelefteq 815562,667592,143304 3 0105
-bigstar 990323,725867,203888 3 0106
-between 524290,792549,268261 3 0107
-blacktriangledown 757307,576570 2 0110
-blacktriangleright 815562,576570,36882 3 0111
-blacktriangleleft 815562,576570,36882 3 0112
---- 524290,486557,-37731 2 0113
---- 524290,486557,-37731 2 0114
-vartriangle 757307,576570 2 0115
-blacktriangle 757307,576570 2 0116
-triangledown 757307,576570 2 0117
-eqcirc 815562,725867 2 0120
-lesseqgtr 815562,928714,404426 3 0121
-gtreqless 815562,928714,404426 3 0122
-lesseqqgtr 815562,1030294,506006 3 0123
-gtreqqless 815562,1030294,506006 3 0124
-char165 786434,707789,0,26214 2 0125
-Ye "
-yen "
-Rrightarrow 1048579,667592,143304 3 0126
-Lleftarrow 1048579,667592,143304 3 0127
-OK 873816,725867 2 0130
-checkmark "
-veebar 640798,725867,203888 3 0131
-barwedge 640798,725867,203888 3 0132
-doublebarwedge 640798,792549,203888 3 0133
-/_ 757307,725867 2 0134
-angle "
-measuredangle 757307,725867 2 0135
-sphericalangle 757307,547770,36882 3 0136
-varpropto 815562,725867 2 0137
-smallsmile 815562,725867,203888 3 0140
-smallfrown 815562,725867,203888 3 0141
-Subset 815562,576570,36882 3 0142
-Supset 815562,576570,36882 3 0143
-Cup 699053,576570 2 0144
-Cap 699053,576570 2 0145
-curlywedge 797355,576570 2 0146
-curlyvee 797355,576570 2 0147
-leftthreetimes 815562,725867 2 0150
-rightthreetimes 815562,725867 2 0151
-subseteqq 815562,792549,268261 3 0152
-supseteqq 815562,792549,268261 3 0153
-bumpeq 815562,576570,63568 3 0154
-Bumpeq 815562,576570,63568 3 0155
-lll 1398106,576570,36882 3 0156
-ggg 1398106,576570,36882 3 0157
-ulcorner 524290,725867 2 0160
-urcorner 524290,725867 2 0161
-rg 992648,725867,163146 3 0162
-char174 "
-circledR "
-circledS 946045,725867,163146 3 0163
-pitchfork 699053,725867 2 0164
-dotplus 815562,725867,85960 3 0165
-backsim 815562,396238,-139592 0 0166
-backsimeq 815562,486557,-37731 2 0167
-llcorner 524290,396238 0 0170
-lrcorner 524290,396238 0 0171
-maltese 873816,725867 2 0172
-complement 524290,865080 2 0173
-intercal 582544,451470,203888 1 0174
-circledcirc 815562,610248,85960 3 0175
-circledast 815562,610248,85960 3 0176
-circleddash 815562,610248,85960 3 0177
diff --git a/contrib/groff/font/devdvi/SB b/contrib/groff/font/devdvi/SB
deleted file mode 100644
index 811b351a1efd..000000000000
--- a/contrib/groff/font/devdvi/SB
+++ /dev/null
@@ -1,132 +0,0 @@
-name SB
-special
-internalname msbm10
-spacewidth 314576
-slant 14.036243
-checksum -2001332536
-designsize 10485760
-charset
-lvertneqq 815562,794042,263635 3 0000
-gvertneqq 815562,794042,263635 3 0001
-nleq 815562,832390,317448 3 0002
-ngeq 815562,832390,317448 3 0003
-nless 815562,740048,215760 3 0004
-ngtr 815562,740048,215760 3 0005
-nprec 815562,740048,215760 3 0006
-nsucc 815562,740048,215760 3 0007
-lneqq 815562,794042,263635 3 0010
-gneqq 815562,794042,263635 3 0011
-nleqslant 815562,832390,317448 3 0012
-ngeqslant 815562,832390,317448 3 0013
-lneq 815562,666864,142576 3 0014
-gneq 815562,666864,142576 3 0015
-npreceq 815562,832390,317448 3 0016
-nsucceq 815562,832390,317448 3 0017
-precnsim 815562,777110,243501 3 0020
-succnsim 815562,777110,243501 3 0021
-lnsim 815562,777110,243501 3 0022
-gnsim 815562,777110,243501 3 0023
-nleqq 815562,964179,439891 3 0024
-ngeqq 815562,964179,439891 3 0025
-precneqq 815562,794042,263635 3 0026
-succneqq 815562,794042,263635 3 0027
-precnapprox 815562,794042,274379 3 0030
-succnapprox 815562,794042,274379 3 0031
-lnapprox 815562,794042,274379 3 0032
-gnapprox 815562,794042,274379 3 0033
-nsim 815562,384696,-139592 0 0034
-ncong 815562,832390,317448 3 0035
-diagup 932070,722352,203888 3 0036
-diagdown 932070,777110,203888 3 0037
-varsubsetneq 815562,666864,142576 3 0040
-varsupsetneq 815562,666864,142576 3 0041
-nsubseteqq 815562,794042,263635 3 0042
-nsupseteqq 815562,794042,263635 3 0043
-subsetneqq 815562,832390,298650 3 0044
-supsetneqq 815562,832390,298650 3 0045
-varsubsetneqq 815562,794042,263635 3 0046
-varsupsetneqq 815562,794042,263635 3 0047
-subsetneq 815562,666864,142576 3 0050
-supsetneq 815562,666864,142576 3 0051
-nsubseteq 815562,832390,317448 3 0052
-nsupseteq 815562,832390,317448 3 0053
-nparallel 524290,777110,263635 3 0054
-nmid 291272,777110,263635 3 0055
-nshortmid 233018,609920,85632 3 0056
-nshortparallel 407781,609920,85632 3 0057
-nvdash 640798,722352 2 0060
-nVdash 757307,722352 2 0061
-nvDash 640798,722352 2 0062
-nVDash 757307,722352 2 0063
-ntrianglerighteq 815562,832390,317448 3 0064
-ntrianglelefteq 815562,832390,317448 3 0065
-ntriangleleft 815562,740048,215760 3 0066
-ntriangleright 815562,740048,215760 3 0067
-nleftarrow 1048579,384696,-139592 0 0070
-nrightarrow 1048579,384696,-139592 0 0071
-nLeftarrow 1048579,384696,-139592 0 0072
-nRightarrow 1048579,384696,-139592 0 0073
-nLeftrightarrow 1048579,384696,-139592 0 0074
-nleftrightarrow 1048579,384696,-139592 0 0075
-divideontimes 815562,609920,85632 3 0076
-varnothing 815562,609920,85632 3 0077
-nexists 582544,722352 2 0100
-BbbA 757307,722352 2 0101
-BbbB 699053,722352 2 0102
-BbbC 757307,722352 2 0103
-BbbD 757307,722352 2 0104
-BbbE 699053,722352 2 0105
-BbbF 640798,722352 2 0106
-BbbG 815562,722352 2 0107
-BbbH 815562,722352 2 0110
-BbbI 407781,722352 2 0111
-BbbJ 524290,722352,174763 3 0112
-BbbK 815562,722352 2 0113
-BbbL 699053,722352 2 0114
-BbbM 990325,722352 2 0115
-BbbN 757307,722352 2 0116
-BbbO 815562,722352,174763 3 0117
-BbbP 640798,722352 2 0120
-BbbQ 815562,722352,174763 3 0121
-BbbR 757307,722352 2 0122
-BbbS 582544,722352 2 0123
-BbbT 699053,722352 2 0124
-BbbU 757307,722352 2 0125
-BbbV 757307,722352 2 0126
-BbbW 1048579,722352 2 0127
-BbbX 757307,722352 2 0130
-BbbY 757307,722352 2 0131
-BbbZ 699053,722352 2 0132
---- 1980650,865080 2 0133
---- 2446685,865080 2 0134
---- 1980650,865080 2 0135
---- 2446685,943717 2 0136
-Finv 582544,722352 2 0140
-Game 669925,722352 2 0141
-mho 757307,722352 2 0146
-eth 582544,722352 2 0147
-eqsim 815562,486275,-38013 2 0150
-beth 699053,722352 2 0151
-gimel 466035,722352 2 0152
-daleth 699053,722352 2 0153
-lessdot 815562,565285,40997 3 0154
-gtrdot 815562,565285,40997 3 0155
-ltimes 815562,609920,85632 3 0156
-rtimes 815562,609920,85632 3 0157
-shortmid 233018,609920,85632 3 0160
-shortparallel 407781,609920,85632 3 0161
-smallsetminus 815562,609920,85632 3 0162
-thicksim 815562,384696,-139592 0 0163
-thickapprox 815562,506590,-17698 2 0164
-approxeq 815562,609920,85632 3 0165
-succapprox 815562,794042,274379 3 0166
-precapprox 815562,794042,274379 3 0167
-curvearrowleft 1048579,451470 0 0170
-curvearrowright 1048579,451470 0 0171
-digamma 815562,609920,85632 3 0172
-varkappa 699053,451470,0,42235 0 0173
-Bbbk 582544,722352 2 0174
-hslash 566525,722352 2 0175
--h 566525,722352 2 0176
-hbar "
-backepsilon 450016,451470 0 0177
diff --git a/contrib/groff/font/devdvi/generate/CompileFonts b/contrib/groff/font/devdvi/generate/CompileFonts
deleted file mode 100755
index 8859f8ea8630..000000000000
--- a/contrib/groff/font/devdvi/generate/CompileFonts
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh
-# Compile fonts in the sizes needed by groff.
-sizes="5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 36"
-fonts="cmr10 cmti10 cmbx10 cmbxti10 cmtt10 cmex10 cmmi10 cmsy10 cmss10 cmssbx10 cmssi10"
-mode=cx
-dpi=300
-
-for f in $fonts; do
- for s in $sizes; do
- virmf "&cm \\mode=$mode; mag=$s/10; batchmode; input $f" >/dev/null
- mag=`expr $s \* $dpi / 10`
- gftopk $f.${mag}gf >/dev/null
- rm $f.${mag}gf
- done
-done
diff --git a/contrib/groff/font/devdvi/generate/Makefile b/contrib/groff/font/devdvi/generate/Makefile
deleted file mode 100644
index 8e3d144789da..000000000000
--- a/contrib/groff/font/devdvi/generate/Makefile
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright (C) 1989-2000 Free Software Foundation, Inc.
-# Written by James Clark (jjc@jclark.com)
-#
-# This file is part of groff.
-#
-# groff is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2, or (at your option) any later
-# version.
-#
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with groff; see the file COPYING. If not, write to the Free Software
-# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# This is set up so you can do:
-# make -f generate/Makefile
-# in the parent directory of the directory containing this file.
-
-# Note that the following font files have manually added kerning values for
-# `` and '': B, BI, I, R.
-
-srcdir=.
-tfmdir=/usr/local/lib/groff-tfm
-gfdir=/usr/local/lib/groff-gf
-
-TFMTODIT=tfmtodit
-FONTS=R I B BI CW CWI MI S EX H HI HB SA SB
-SPECIALFLAG=-s
-
-all: $(FONTS)
-
-# R is special because it contains \(pl \(eq
-
-R: $(srcdir)/texr.map
- $(TFMTODIT) $(SPECIALFLAG) -g $(gfdir)/cmr10.300gf \
- $(tfmdir)/cmr10.tfm $(srcdir)/texr.map $@
-
-# I is special because it contains \(Po
-
-I: $(srcdir)/texi.map
- $(TFMTODIT) $(SPECIALFLAG) -g $(gfdir)/cmti10.300gf \
- $(tfmdir)/cmti10.tfm $(srcdir)/texi.map $@
-
-B: $(srcdir)/texb.map
- $(TFMTODIT) -g $(gfdir)/cmbx10.300gf \
- $(tfmdir)/cmbx10.tfm $(srcdir)/texb.map $@
-
-BI: $(srcdir)/texi.map
- $(TFMTODIT) -g $(gfdir)/cmbxti10.300gf \
- $(tfmdir)/cmbxti10.tfm $(srcdir)/texi.map $@
-
-# CW is special because it contains "
-
-CW: $(srcdir)/textt.map
- $(TFMTODIT) $(SPECIALFLAG) \
- $(tfmdir)/cmtt10.tfm $(srcdir)/textt.map $@
-
-CWI: $(srcdir)/textt.map
- $(TFMTODIT) \
- $(tfmdir)/cmitt10.tfm $(srcdir)/textt.map $@
-
-MI: $(srcdir)/texmi.map
- $(TFMTODIT) $(SPECIALFLAG) -k 0177 \
- $(tfmdir)/cmmi10.tfm $(srcdir)/texmi.map $@
-
-S: $(srcdir)/texsy.map
- $(TFMTODIT) $(SPECIALFLAG) -k 060 \
- $(tfmdir)/cmsy10.tfm $(srcdir)/texsy.map $@
-
-EX: $(srcdir)/texex.map
- $(TFMTODIT) $(SPECIALFLAG) \
- $(tfmdir)/cmex10.tfm $(srcdir)/texex.map $@
-
-H: $(srcdir)/texb.map
- $(TFMTODIT) -g $(gfdir)/cmss10.300gf \
- $(tfmdir)/cmss10.tfm $(srcdir)/texb.map $@
-
-HB: $(srcdir)/texb.map
- $(TFMTODIT) -g $(gfdir)/cmssbx10.300gf \
- $(tfmdir)/cmssbx10.tfm $(srcdir)/texb.map $@
-
-HI: $(srcdir)/texb.map
- $(TFMTODIT) -g $(gfdir)/cmssi10.300gf \
- $(tfmdir)/cmssi10.tfm $(srcdir)/texb.map $@
-
-SA: $(srcdir)/msam.map
- $(TFMTODIT) $(SPECIALFLAG) \
- $(tfmdir)/msam10.tfm $(srcdir)/msam.map $@
-
-SB: $(srcdir)/msbm.map
- $(TFMTODIT) $(SPECIALFLAG) \
- $(tfmdir)/msbm10.tfm $(srcdir)/msbm.map $@
-
-clean:
-
-realclean:
- -rm -f $(FONTS)
-
-extraclean: realclean
- -rm -f core *~ "#*"
-
-.PHONY: clean realclean extraclean all
diff --git a/contrib/groff/font/devdvi/generate/cork.map b/contrib/groff/font/devdvi/generate/cork.map
deleted file mode 100644
index 4e4a35adfc75..000000000000
--- a/contrib/groff/font/devdvi/generate/cork.map
+++ /dev/null
@@ -1,206 +0,0 @@
-# Map for DC/EC fonts with Cork encoding.
-# Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-0 ga
-1 aa char180
-2 a^
-3 a~
-4 ad char168
-5 a"
-6 ao
-7 ah
-8 ab
-9 a- char175
-10 a.
-11 ac char184
-12 ho
-13 bq
-14 fo
-15 fc
-16 lq
-17 rq
-18 Bq
-19 Fo char171
-20 Fc char187
-21 en
-22 em
-25 .i
-26 .j
-27 ff
-28 fi
-29 fl
-30 Fi
-31 Fl
-33 !
-34 " dq
-35 # sh
-36 $ Do
-37 %
-38 &
-39 ' aq cq
-40 (
-41 )
-42 *
-43 + pl
-44 ,
-45 -
-46 .
-47 / sl
-48 0
-49 1
-50 2
-51 3
-52 4
-53 5
-54 6
-55 7
-56 8
-57 9
-58 :
-59 ;
-60 <
-61 = eq
-62 >
-63 ?
-64 @ at
-65 A
-66 B
-67 C
-68 D
-69 E
-70 F
-71 G
-72 H
-73 I
-74 J
-75 K
-76 L
-77 M
-78 N
-79 O
-80 P
-81 Q
-82 R
-83 S
-84 T
-85 U
-86 V
-87 W
-88 X
-89 Y
-90 Z
-91 [ lB
-92 \ rs
-93 ] rB
-94 ^ ha
-95 _
-96 ` oq
-97 a
-98 b
-99 c
-100 d
-101 e
-102 f
-103 g
-104 h
-105 i
-106 j
-107 k
-108 l
-109 m
-110 n
-111 o
-112 p
-113 q
-114 r
-115 s
-116 t
-117 u
-118 v
-119 w
-120 x
-121 y
-122 z
-123 { lC
-124 | or bv ba
-125 } rC
-126 ~
-127 hy char173
-130 'C
-138 /L
-146 vS
-152 :Y
-154 vZ
-156 IJ
-159 sc char167
-162 'c
-170 (l
-178 vs
-184 :y char255
-186 vz
-188 ij
-189 r! char161
-190 r? char191
-191 Po char163
-192 `A char192
-193 'A char193
-194 ^A char194
-195 ~A char195
-196 :A char196
-197 oA char197
-198 AE char198
-199 ,C char199
-200 `E char200
-201 'E char201
-202 ^E char202
-203 :E char203
-204 `I char204
-205 'I char205
-206 ^I char206
-207 :I char207
-208 -D char208
-209 ~N char209
-210 `O char210
-211 'O char211
-212 ^O char212
-213 ~O char213
-214 :O char214
-215 OE
-216 /O char216
-217 `U char217
-218 'U char218
-219 ^U char219
-220 :U char220
-221 char221
-222 TP char222
-224 `a char224
-225 'a char225
-226 ^a char226
-227 ~a char227
-228 :a char228
-229 oa char229
-230 ae char230
-231 ,c char231
-232 `e char232
-233 'e char233
-234 ^e char234
-235 :e char235
-236 `i char236
-237 'i char237
-238 ^i char238
-239 :i char239
-240 Sd char240
-241 ~n char241
-242 `o char242
-243 'o char243
-244 ^o char244
-245 ~o char245
-246 :o char246
-247 oe
-248 /o char248
-249 `u char249
-250 'u char250
-251 ^u char251
-252 :u char252
-253 char253
-254 Tp char254
-255 ss char223
diff --git a/contrib/groff/font/devdvi/generate/msam.map b/contrib/groff/font/devdvi/generate/msam.map
deleted file mode 100644
index 90006c957688..000000000000
--- a/contrib/groff/font/devdvi/generate/msam.map
+++ /dev/null
@@ -1,127 +0,0 @@
-# Map for the AMSFonts 2.0 msam font using TeX names.
-# Contributed by Zdzislaw Meglicki (Zdzislaw.Meglicki@arp.anu.edu.au).
-0 boxdot
-1 boxplus
-2 boxtimes
-3 square
-4 blacksquare
-5 centerdot
-6 lozenge lz
-7 blacklozenge
-8 circlearrowright
-9 circlearrowleft
-10 rightleftharpoons
-11 leftrightharpoons
-12 boxminus
-13 Vdash
-14 Vvdash
-15 vDash
-16 twoheadrightarrow
-17 twoheadleftarrow
-18 leftleftarrows
-19 rightrightarrows
-20 upuparrows
-21 downdownarrows
-22 upharpoonright
-23 downharpoonright
-24 upharpoonleft
-25 downharpoonleft
-26 rightarrowtail
-27 leftarrowtail
-28 leftrightarrows
-29 rightleftarrows
-30 Lsh
-31 Rsh
-32 rightsquigarrow
-33 leftrightsquigarrow
-34 looparrowleft
-35 looparrowright
-36 circeq
-37 succsim
-38 gtrsim
-39 gtrapprox
-40 multimap
-41 therefore tf 3d
-42 because
-43 doteqdot
-44 triangleq
-45 precsim
-46 lesssim
-47 lessapprox
-48 eqslantless
-49 eqslantgtr
-50 curlyeqprec
-51 curlyeqsucc
-52 preccurlyeq
-53 leqq
-54 leqslant
-55 lessgtr
-56 backprime
-58 risingdotseq
-59 fallingdotseq
-60 succcurlyeq
-61 geqq
-62 geqslant
-63 gtrless
-64 sqsubset
-65 sqsupset
-66 vartriangleright
-67 vartriangleleft
-68 trianglerighteq
-69 trianglelefteq
-70 bigstar
-71 between
-72 blacktriangledown
-73 blacktriangleright
-74 blacktriangleleft
-77 vartriangle
-78 blacktriangle
-79 triangledown
-80 eqcirc
-81 lesseqgtr
-82 gtreqless
-83 lesseqqgtr
-84 gtreqqless
-85 yen Ye char165
-86 Rrightarrow
-87 Lleftarrow
-88 checkmark OK
-89 veebar
-90 barwedge
-91 doublebarwedge
-92 angle /_
-93 measuredangle
-94 sphericalangle
-95 varpropto
-96 smallsmile
-97 smallfrown
-98 Subset
-99 Supset
-100 Cup
-101 Cap
-102 curlywedge
-103 curlyvee
-104 leftthreetimes
-105 rightthreetimes
-106 subseteqq
-107 supseteqq
-108 bumpeq
-109 Bumpeq
-110 lll
-111 ggg
-112 ulcorner
-113 urcorner
-114 circledR char174 rg
-115 circledS
-116 pitchfork
-117 dotplus
-118 backsim
-119 backsimeq
-120 llcorner
-121 lrcorner
-122 maltese
-123 complement
-124 intercal
-125 circledcirc
-126 circledast
-127 circleddash
diff --git a/contrib/groff/font/devdvi/generate/msbm.map b/contrib/groff/font/devdvi/generate/msbm.map
deleted file mode 100644
index 07ee095d41e4..000000000000
--- a/contrib/groff/font/devdvi/generate/msbm.map
+++ /dev/null
@@ -1,121 +0,0 @@
-# Map for the AMSFonts 2.0 msbm font using TeX names.
-# Contributed by Zdzislaw Meglicki (Zdzislaw.Meglicki@arp.anu.edu.au).
-0 lvertneqq
-1 gvertneqq
-2 nleq
-3 ngeq
-4 nless
-5 ngtr
-6 nprec
-7 nsucc
-8 lneqq
-9 gneqq
-10 nleqslant
-11 ngeqslant
-12 lneq
-13 gneq
-14 npreceq
-15 nsucceq
-16 precnsim
-17 succnsim
-18 lnsim
-19 gnsim
-20 nleqq
-21 ngeqq
-22 precneqq
-23 succneqq
-24 precnapprox
-25 succnapprox
-26 lnapprox
-27 gnapprox
-28 nsim
-29 ncong
-30 diagup
-31 diagdown
-32 varsubsetneq
-33 varsupsetneq
-34 nsubseteqq
-35 nsupseteqq
-36 subsetneqq
-37 supsetneqq
-38 varsubsetneqq
-39 varsupsetneqq
-40 subsetneq
-41 supsetneq
-42 nsubseteq
-43 nsupseteq
-44 nparallel
-45 nmid
-46 nshortmid
-47 nshortparallel
-48 nvdash
-49 nVdash
-50 nvDash
-51 nVDash
-52 ntrianglerighteq
-53 ntrianglelefteq
-54 ntriangleleft
-55 ntriangleright
-56 nleftarrow
-57 nrightarrow
-58 nLeftarrow
-59 nRightarrow
-60 nLeftrightarrow
-61 nleftrightarrow
-62 divideontimes
-63 varnothing
-64 nexists
-65 BbbA
-66 BbbB
-67 BbbC
-68 BbbD
-69 BbbE
-70 BbbF
-71 BbbG
-72 BbbH
-73 BbbI
-74 BbbJ
-75 BbbK
-76 BbbL
-77 BbbM
-78 BbbN
-79 BbbO
-80 BbbP
-81 BbbQ
-82 BbbR
-83 BbbS
-84 BbbT
-85 BbbU
-86 BbbV
-87 BbbW
-88 BbbX
-89 BbbY
-90 BbbZ
-96 Finv
-97 Game
-102 mho
-103 eth
-104 eqsim
-105 beth
-106 gimel
-107 daleth
-108 lessdot
-109 gtrdot
-110 ltimes
-111 rtimes
-112 shortmid
-113 shortparallel
-114 smallsetminus
-115 thicksim
-116 thickapprox
-117 approxeq
-118 succapprox
-119 precapprox
-120 curvearrowleft
-121 curvearrowright
-122 digamma
-123 varkappa
-124 Bbbk
-125 hslash
-126 hbar -h
-127 backepsilon
diff --git a/contrib/groff/font/devdvi/generate/texb.map b/contrib/groff/font/devdvi/generate/texb.map
deleted file mode 100644
index b2bcd1536c43..000000000000
--- a/contrib/groff/font/devdvi/generate/texb.map
+++ /dev/null
@@ -1,127 +0,0 @@
-0 *G
-1 *D
-2 *H
-3 *L
-4 *C
-5 *P
-6 *S
-7 *U
-8 *F
-9 *Q
-10 *W
-11 ff
-12 fi
-13 fl
-14 Fi
-15 Fl
-16 .i
-17 .j
-18 ga
-19 aa char180
-20 ah
-21 ab
-22 a- char175
-23 ao
-24 ac char184
-25 ss char223
-26 ae char230
-27 oe
-28 /o char248
-29 AE char198
-30 OE
-31 /O char216
-33 !
-34 rq
-35 # sh
-36 $ Do
-37 %
-38 &
-39 ' cq
-40 (
-41 )
-42 *
-43 +
-44 ,
-45 - hy char173
-46 .
-47 / sl
-48 0
-49 1
-50 2
-51 3
-52 4
-53 5
-54 6
-55 7
-56 8
-57 9
-58 :
-59 ;
-60 r! char161
-61 =
-62 r? char191
-63 ?
-64 @ at
-65 A
-66 B
-67 C
-68 D
-69 E
-70 F
-71 G
-72 H
-73 I
-74 J
-75 K
-76 L
-77 M
-78 N
-79 O
-80 P
-81 Q
-82 R
-83 S
-84 T
-85 U
-86 V
-87 W
-88 X
-89 Y
-90 Z
-91 [ lB
-92 lq
-93 ] rB
-94 a^ ^ ha
-95 a.
-96 ` oq
-97 a
-98 b
-99 c
-100 d
-101 e
-102 f
-103 g
-104 h
-105 i
-106 j
-107 k
-108 l
-109 m
-110 n
-111 o
-112 p
-113 q
-114 r
-115 s
-116 t
-117 u
-118 v
-119 w
-120 x
-121 y
-122 z
-123 en
-124 em
-125 a"
-126 a~ ~
-127 ad char168
diff --git a/contrib/groff/font/devdvi/generate/texex.map b/contrib/groff/font/devdvi/generate/texex.map
deleted file mode 100644
index a5b26901da29..000000000000
--- a/contrib/groff/font/devdvi/generate/texex.map
+++ /dev/null
@@ -1,100 +0,0 @@
-0 parenleft0
-1 parenright0
-2 bracketleft0
-3 bracketright0
-4 floorleft0
-5 floorright0
-6 ceilingleft0
-7 ceilingright0
-8 braceleft0
-9 braceright0
-10 angleleft0
-11 angleright0
-12 barex
-13 bardblex
-14 slash0
-15 backslash0
-16 parenleft1
-17 parenright1
-18 parenleft2
-19 parenright2
-20 bracketleft2
-21 bracketright2
-22 floorleft2
-23 floorright2
-24 ceilingleft2
-25 ceilingright2
-26 braceleft2
-27 braceright2
-28 angleleft2
-29 angleright2
-30 slash2
-31 backslash2
-32 parenleft3
-33 parenright3
-34 bracketleft3
-35 bracketright3
-36 floorleft3
-37 floorright3
-38 ceilingleft3
-39 ceilingright3
-40 braceleft3
-41 braceright3
-42 angleleft3
-43 angleright3
-44 slash3
-45 backslash3
-46 slash1
-47 backslash1
-48 parenlefttp
-49 parenrighttp
-50 bracketlefttp
-51 bracketrighttp
-52 bracketleftbt
-53 bracketrightbt
-54 bracketleftex
-55 bracketrightex
-56 bracelefttp lt
-57 bracerighttp rt
-58 braceleftbt lb
-59 bracerightbt rb
-60 braceleftmid lk
-61 bracerightmid rk
-62 braceex bracerightex braceleftex
-63 arrowvertex
-64 parenleftbt
-65 parenrightbt
-66 parenleftex
-67 parenrightex
-68 angleleft1
-69 angleright1
-73 ois ointegral
-75 bigcircledot
-77 bigcircleplus
-79 bigcirclemultiply
-88 sum
-89 product
-90 is integral
-91 bigunion
-92 bigintersection
-93 bigunionplus
-94 biglogicaland
-95 biglogicalor
-97 coproduct
-104 bracketleft1
-105 bracketright1
-106 floorleft1
-107 floorright1
-108 ceilingleft1
-109 ceilingright1
-110 braceleft1
-111 braceright1
-112 sr0
-113 sr1
-114 sr2
-115 sr3
-119 arrowvertdblex
-120 arrowverttp
-121 arrowvertbt
-126 arrowvertdbltp
-127 arrowvertdblbt
diff --git a/contrib/groff/font/devdvi/generate/texi.map b/contrib/groff/font/devdvi/generate/texi.map
deleted file mode 100644
index 4ca802a28e13..000000000000
--- a/contrib/groff/font/devdvi/generate/texi.map
+++ /dev/null
@@ -1,127 +0,0 @@
-0 *G
-1 *D
-2 *H
-3 *L
-4 *C
-5 *P
-6 *S
-7 *U
-8 *F
-9 *Q
-10 *W
-11 ff
-12 fi
-13 fl
-14 Fi
-15 Fl
-16 .i
-17 .j
-18 ga
-19 aa char180
-20 ah
-21 ab
-22 a- char175
-23 ao
-24 ac char184
-25 ss char223
-26 ae char230
-27 oe
-28 /o char248
-29 AE char198
-30 OE
-31 /O char216
-33 !
-34 rq
-35 # sh
-36 Po char163
-37 %
-38 &
-39 ' cq
-40 (
-41 )
-42 *
-43 +
-44 ,
-45 - hy char173
-46 .
-47 / sl
-48 0
-49 1
-50 2
-51 3
-52 4
-53 5
-54 6
-55 7
-56 8
-57 9
-58 :
-59 ;
-60 r! char161
-61 =
-62 r? char191
-63 ?
-64 @ at
-65 A
-66 B
-67 C
-68 D
-69 E
-70 F
-71 G
-72 H
-73 I
-74 J
-75 K
-76 L
-77 M
-78 N
-79 O
-80 P
-81 Q
-82 R
-83 S
-84 T
-85 U
-86 V
-87 W
-88 X
-89 Y
-90 Z
-91 [ lB
-92 lq
-93 ] rB
-94 a^ ^ ha
-95 a.
-96 ` oq
-97 a
-98 b
-99 c
-100 d
-101 e
-102 f Fn
-103 g
-104 h
-105 i
-106 j
-107 k
-108 l
-109 m
-110 n
-111 o
-112 p
-113 q
-114 r
-115 s
-116 t
-117 u
-118 v
-119 w
-120 x
-121 y
-122 z
-123 en
-124 em
-125 a"
-126 a~ ~
-127 ad char168
diff --git a/contrib/groff/font/devdvi/generate/texmi.map b/contrib/groff/font/devdvi/generate/texmi.map
deleted file mode 100644
index 6d01dc4cf90c..000000000000
--- a/contrib/groff/font/devdvi/generate/texmi.map
+++ /dev/null
@@ -1,32 +0,0 @@
-11 *a
-12 *b
-13 *g
-14 *d
-15 *e
-16 *z
-17 *y
-18 *h
-19 *i
-20 *k
-21 *l
-22 *m char181
-23 *n
-24 *c
-25 *p
-26 *r
-27 *s
-28 *t
-29 *u
-30 *f
-31 *x
-32 *q
-33 *w
-35 +h
-36 +p
-38 ts
-39 +f
-60 <
-62 >
-64 pd
-111 *o
-125 wp
diff --git a/contrib/groff/font/devdvi/generate/texr.map b/contrib/groff/font/devdvi/generate/texr.map
deleted file mode 100644
index 7db0e5f71a1c..000000000000
--- a/contrib/groff/font/devdvi/generate/texr.map
+++ /dev/null
@@ -1,127 +0,0 @@
-0 *G
-1 *D
-2 *H
-3 *L
-4 *C
-5 *P
-6 *S
-7 *U
-8 *F
-9 *Q
-10 *W
-11 ff
-12 fi
-13 fl
-14 Fi
-15 Fl
-16 .i
-17 .j
-18 ga
-19 aa char180
-20 ah
-21 ab
-22 a- char175
-23 ao
-24 ac char184
-25 ss char223
-26 ae char230
-27 oe
-28 /o char248
-29 AE char198
-30 OE
-31 /O char216
-33 !
-34 rq
-35 # sh
-36 $ Do
-37 %
-38 &
-39 ' cq
-40 (
-41 )
-42 *
-43 + pl
-44 ,
-45 - hy char173
-46 .
-47 / sl
-48 0
-49 1
-50 2
-51 3
-52 4
-53 5
-54 6
-55 7
-56 8
-57 9
-58 :
-59 ;
-60 r! char161
-61 = eq
-62 r? char191
-63 ?
-64 @ at
-65 A *A
-66 B *B
-67 C
-68 D
-69 E *E
-70 F
-71 G
-72 H *Y
-73 I *I
-74 J
-75 K *K
-76 L
-77 M *M
-78 N *N
-79 O *O
-80 P *R
-81 Q
-82 R
-83 S
-84 T *T
-85 U
-86 V
-87 W
-88 X *X
-89 Y
-90 Z *Z
-91 [ lB
-92 lq
-93 ] rB
-94 a^ ^ ha
-95 a.
-96 ` oq
-97 a
-98 b
-99 c
-100 d
-101 e
-102 f
-103 g
-104 h
-105 i
-106 j
-107 k
-108 l
-109 m
-110 n
-111 o
-112 p
-113 q
-114 r
-115 s
-116 t
-117 u
-118 v
-119 w
-120 x
-121 y
-122 z
-123 en
-124 em
-125 a"
-126 a~ ~
-127 ad char168
diff --git a/contrib/groff/font/devdvi/generate/texsy.map b/contrib/groff/font/devdvi/generate/texsy.map
deleted file mode 100644
index fe98eb2508df..000000000000
--- a/contrib/groff/font/devdvi/generate/texsy.map
+++ /dev/null
@@ -1,100 +0,0 @@
-0 \- mi
-1 md pc
-2 mu char215
-3 **
-4 di char247
-6 +- char177
-7 -+
-8 c+
-10 c*
-13 ci
-15 bu
-17 ==
-18 ib
-19 ip
-20 <=
-21 >=
-24 ap ti
-25 ~~
-26 sb
-27 sp
-28 <<
-29 >>
-32 <-
-33 ->
-34 ua
-35 da
-36 <>
-39 ~=
-40 lA lh
-41 rA rh
-42 uA
-43 dA
-44 hA
-47 pt
-48 prime
-49 if
-50 mo
-51 st
-54 slashnot
-56 fa
-57 te
-58 no char172
-59 es
-60 Re
-61 Im
-63 pp
-64 Ah
-65 A
-66 B
-67 C
-68 D
-69 E
-70 F
-71 G
-72 H
-73 I
-74 J
-75 K
-76 L
-77 M
-78 N
-79 O
-80 P
-81 Q
-82 R
-83 S
-84 T
-85 U
-86 V
-87 W
-88 X
-89 Y
-90 Z
-91 cu
-92 ca
-94 AN
-95 OR
-98 lf
-99 rf
-100 lc
-101 rc
-102 lC {
-103 rC }
-104 la
-105 ra
-106 ba | bv or bar
-107 bardbl
-108 va
-109 vA
-110 \ rs
-112 sr
-114 gr
-120 sc char167
-121 dg
-122 dd
-123 ps char182
-124 CL
-125 DI
-126 HE
-127 SP
diff --git a/contrib/groff/font/devdvi/generate/textt.map b/contrib/groff/font/devdvi/generate/textt.map
deleted file mode 100644
index 80e8911e7104..000000000000
--- a/contrib/groff/font/devdvi/generate/textt.map
+++ /dev/null
@@ -1,126 +0,0 @@
-0 *G
-1 *D
-2 *H
-3 *L
-4 *C
-5 *P
-6 *S
-7 *U
-8 *F
-9 *Q
-10 *W
-11 ff
-12 fi
-13 fl
-14 Fi
-15 Fl
-16 .i
-17 .j
-18 ga
-19 aa char180
-20 ah
-21 ab
-22 a- char175
-23 ao
-24 ac char184
-25 ss char223
-26 ae char230
-27 oe
-28 /o char248
-29 AE char198
-30 OE
-31 /O char216
-33 !
-34 " dq
-35 # sh
-36 $ Do
-37 %
-38 &
-39 ' cq
-40 (
-41 )
-42 *
-43 +
-44 ,
-45 - \-
-46 .
-47 / sl
-48 0
-49 1
-50 2
-51 3
-52 4
-53 5
-54 6
-55 7
-56 8
-57 9
-58 :
-59 ;
-60 <
-61 =
-62 >
-63 ?
-64 @ at
-65 A
-66 B
-67 C
-68 D
-69 E
-70 F
-71 G
-72 H
-73 I
-74 J
-75 K
-76 L
-77 M
-78 N
-79 O
-80 P
-81 Q
-82 R
-83 S
-84 T
-85 U
-86 V
-87 W
-88 X
-89 Y
-90 Z
-91 [ lB
-92 \ rs
-93 ] rB
-94 a^ ^ ha
-95 _
-96 ` oq
-97 a
-98 b
-99 c
-100 d
-101 e
-102 f
-103 g
-104 h
-105 i
-106 j
-107 k
-108 l
-109 m
-110 n
-111 o
-112 p
-113 q
-114 r
-115 s
-116 t
-117 u
-118 v
-119 w
-120 x
-121 y
-122 z
-123 lC {
-124 ba |
-125 rC }
-126 a~ ~
diff --git a/contrib/groff/font/devhtml/DESC.proto b/contrib/groff/font/devhtml/DESC.proto
deleted file mode 100644
index e245441c47c0..000000000000
--- a/contrib/groff/font/devhtml/DESC.proto
+++ /dev/null
@@ -1,12 +0,0 @@
-res 240
-hor 24
-vert 40
-unitwidth 10
-sizes 6 8 10 12 14 16 18 0
-fonts 6 R I B BI C S
-tcommand
-html
-postpro post-grohtml
-prepro pre-grohtml
-use_charnames_in_special
-pass_filenames
diff --git a/contrib/groff/font/devhtml/Makefile.sub b/contrib/groff/font/devhtml/Makefile.sub
deleted file mode 100644
index df56914ee68f..000000000000
--- a/contrib/groff/font/devhtml/Makefile.sub
+++ /dev/null
@@ -1,34 +0,0 @@
-DEV=html
-PROTOFONTS=R I B BI CR
-FONTS=$(PROTOFONTS) S
-DEVFILES=$(FONTS) DESC
-CLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-$(FONTS): R.proto
- @echo Making $@
- @-rm -f $@
- @(charwidth=`expr $(RES) / $(CPI)` ; \
- sed -e "s/^name [A-Z]*$$/name $@/" \
- -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
- -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
- -e "s/^internalname .*$$/internalname $@/" \
- -e "/^internalname/s/CR/4/" \
- -e "/^internalname/s/BI/3/" \
- -e "/^internalname/s/B/2/" \
- -e "/^internalname/s/I/1/" \
- -e "/^internalname .*[^ 0-9]/d" \
- $(srcdir)/R.proto >$@)
-
-DESC: DESC.proto
- @echo Making $@
- @-rm -f $@
- @sed -e "s/^res .*$$/res $(RES)/" \
- -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
- -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
- -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
- $(srcdir)/DESC.proto >$@
-
diff --git a/contrib/groff/font/devhtml/R.proto b/contrib/groff/font/devhtml/R.proto
deleted file mode 100644
index f2c9d2482d1c..000000000000
--- a/contrib/groff/font/devhtml/R.proto
+++ /dev/null
@@ -1,315 +0,0 @@
-name R
-internalname 0
-spacewidth 24
-charset
-! 24 0 0x0021
-" 24 0 0x0022 &quot;
-dq "
-# 24 0 0x0023
-sh "
-$ 24 0 0x0024
-Do "
-% 24 0 0x0025
-& 24 0 0x0026 &amp;
-aq 24 0 0x0027
-' "
-( 24 0 0x0028
-) 24 0 0x0029
-* 24 0 0x002A
-+ 24 0 0x002B
-pl "
-, 24 0 0x002C
-\- 24 0 0x002D
-hy "
-- "
-mi "
-en "
-. 24 0 0x002E
-/ 24 0 0x002F
-sl "
-0 24 0 0x0030
-1 24 0 0x0031
-2 24 0 0x0032
-3 24 0 0x0033
-4 24 0 0x0034
-5 24 0 0x0035
-6 24 0 0x0036
-7 24 0 0x0037
-8 24 0 0x0038
-9 24 0 0x0039
-: 24 0 0x003A
-; 24 0 0x003B
-< 24 0 0x003C &lt;
-la "
-= 24 0 0x003D
-eq "
-> 24 0 0x003E &gt;
-ra "
-? 24 0 0x003F
-@ 24 0 0x0040
-at "
-A 24 0 0x0041
-B 24 0 0x0042
-C 24 0 0x0043
-D 24 0 0x0044
-E 24 0 0x0045
-F 24 0 0x0046
-G 24 0 0x0047
-H 24 0 0x0048
-I 24 0 0x0049
-J 24 0 0x004A
-K 24 0 0x004B
-L 24 0 0x004C
-M 24 0 0x004D
-N 24 0 0x004E
-O 24 0 0x004F
-P 24 0 0x0050
-Q 24 0 0x0051
-R 24 0 0x0052
-S 24 0 0x0053
-T 24 0 0x0054
-U 24 0 0x0055
-V 24 0 0x0056
-W 24 0 0x0057
-X 24 0 0x0058
-Y 24 0 0x0059
-Z 24 0 0x005A
-[ 24 0 0x005B
-lB "
-\ 24 0 0x005C
-rs "
-] 24 0 0x005D
-rB "
-^ 24 0 0x005E
-a^ "
-ha "
-_ 24 0 0x005F
-ru "
-ul "
-` 24 0 0x0060
-a 24 0 0x0061
-b 24 0 0x0062
-c 24 0 0x0063
-d 24 0 0x0064
-e 24 0 0x0065
-f 24 0 0x0066
-g 24 0 0x0067
-h 24 0 0x0068
-i 24 0 0x0069
-j 24 0 0x006A
-k 24 0 0x006B
-l 24 0 0x006C
-m 24 0 0x006D
-n 24 0 0x006E
-o 24 0 0x006F
-p 24 0 0x0070
-q 24 0 0x0071
-r 24 0 0x0072
-s 24 0 0x0073
-t 24 0 0x0074
-u 24 0 0x0075
-v 24 0 0x0076
-w 24 0 0x0077
-x 24 0 0x0078
-y 24 0 0x0079
-z 24 0 0x007A
-lC 24 0 0x007B
-{ "
-ba 24 0 0x007C
-or "
-| "
-rC 24 0 0x007D
-} "
-a~ 24 0 0x007E
-~ "
-ti "
-r! 24 0 0x00A1 &iexcl;
-char161 "
-ct 24 0 0x00A2 &cent;
-char162 "
-Po 24 0 0x00A3 &pound;
-char163 "
-Cs 24 0 0x00A4 &curren;
-char164 "
-Ye 24 0 0x00A5 &yen;
-char165 "
-bb 24 0 0x00A6 &brvbar;
-char166 "
-sc 24 0 0x00A7 &sect;
-char167 "
-ad 24 0 0x00A8 &uml;
-char168 "
-co 24 0 0x00A9 &copy;
-char169 "
-Of 24 0 0x00AA &ordf;
-char170 "
-Fo 24 0 0x00AB &laquo;
-char171 "
-no 24 0 0x00AC &not;
-char172 "
-rg 24 0 0x00AE &reg;
-char174 "
-a- 24 0 0x00AF &macr;
-char175 "
-de 24 0 0x00B0 &deg;
-char176 "
-+- 24 0 0x00B1 &plusmn;
-char177 "
-S2 24 0 0x00B2 &sup2;
-char178 "
-S3 24 0 0x00B3 &sup3;
-char179 "
-aa 24 0 0x00B4 &acute;
-\' "
-char180 "
-char181 24 0 0x00B5 &micro;
-ps 24 0 0x00B6 &para;
-char182 "
-pc 24 0 0x00B7 &middot;
-char183 "
-ac 24 0 0x00B8 &cedil;
-char184 "
-S1 24 0 0x00B9 &sup1;
-char185 "
-Om 24 0 0x00BA &ordm;
-char186 "
-Fc 24 0 0x00BB &raquo;
-char187 "
-14 24 0 0x00BC &frac14;
-char188 "
-12 24 0 0x00BD &frac12;
-char189 "
-34 24 0 0x00BE &frac34;
-char190 "
-r? 24 0 0x00BF &iquest;
-char191 "
-`A 24 0 0x00C0 &Agrave;
-char192 "
-'A 24 0 0x00C1 &Aacute;
-char193 "
-^A 24 0 0x00C2 &Acirc;
-char194 "
-~A 24 0 0x00C3 &Atilde;
-char195 "
-:A 24 0 0x00C4 &Auml;
-char196 "
-oA 24 0 0x00C5 &Aring;
-char197 "
-AE 24 0 0x00C6 &AElig;
-char198 "
-,C 24 0 0x00C7 &Ccedil;
-char199 "
-`E 24 0 0x00C8 &Egrave;
-char200 "
-'E 24 0 0x00C9 &Eacute;
-char201 "
-^E 24 0 0x00CA &Ecirc;
-char202 "
-:E 24 0 0x00CB &Euml;
-char203 "
-`I 24 0 0x00CC &Igrave;
-char204 "
-'I 24 0 0x00CD &Iacute;
-char205 "
-^I 24 0 0x00CE &Icirc;
-char206 "
-:I 24 0 0x00CF &Iuml;
-char207 "
--D 24 0 0x00D0 &ETH;
-char208 "
-~N 24 0 0x00D1 &Ntilde;
-char209 "
-`O 24 0 0x00D2 &Ograve;
-char210 "
-'O 24 0 0x00D3 &Oacute;
-char211 "
-^O 24 0 0x00D4 &Ocirc;
-char212 "
-~O 24 0 0x00D5 &Otilde;
-char213 "
-:O 24 0 0x00D6 &Ouml;
-char214 "
-mu 24 0 0x00D7 &times;
-char215 "
-/O 24 0 0x00D8 &Oslash;
-char216 "
-`U 24 0 0x00D9 &Ugrave;
-char217 "
-'U 24 0 0x00DA &Uacute;
-char218 "
-^U 24 0 0x00DB &Ucirc;
-char219 "
-:U 24 0 0x00DC &Uuml;
-char220 "
-'Y 24 0 0x00DD &Yacute;
-char221 "
-TP 24 0 0x00DE &THORN;
-char222 "
-ss 24 0 0x00DF &szlig;
-char223 "
-`a 24 0 0x00E0 &agrave;
-char224 "
-'a 24 0 0x00E1 &aacute;
-char225 "
-^a 24 0 0x00E2 &acirc;
-char226 "
-~a 24 0 0x00E3 &atilde;
-char227 "
-:a 24 0 0x00E4 &auml;
-char228 "
-oa 24 0 0x00E5 &aring;
-char229 "
-ae 24 0 0x00E6 &aelig;
-char230 "
-,c 24 0 0x00E7 &ccedil;
-char231 "
-`e 24 0 0x00E8 &egrave;
-char232 "
-'e 24 0 0x00E9 &eacute;
-char233 "
-^e 24 0 0x00EA &ecirc;
-char234 "
-:e 24 0 0x00EB &euml;
-char235 "
-`i 24 0 0x00EC &igrave;
-char236 "
-'i 24 0 0x00ED &iacute;
-char237 "
-^i 24 0 0x00EE &icirc;
-char238 "
-:i 24 0 0x00EF &iuml;
-char239 "
-Sd 24 0 0x00F0 &eth;
-char240 "
-~n 24 0 0x00F1 &ntilde;
-char241 "
-`o 24 0 0x00F2 &ograve;
-char242 "
-'o 24 0 0x00F3 &oacute;
-char243 "
-^o 24 0 0x00F4 &ocirc;
-char244 "
-~o 24 0 0x00F5 &otilde;
-char245 "
-:o 24 0 0x00F6 &ouml;
-char246 "
-di 24 0 0x00F7 &divide;
-char247 "
-/o 24 0 0x00F8 &oslash;
-char248 "
-`u 24 0 0x00F9 &ugrave;
-char249 "
-'u 24 0 0x00FA &uacute;
-char250 "
-^u 24 0 0x00FB &ucirc;
-char251 "
-:u 24 0 0x00FC &uuml;
-char252 "
-'y 24 0 0x00FD &yacute;
-char253 "
-Tp 24 0 0x00FE &thorn;
-char254 "
-:y 24 0 0x00FF &yuml;
-char255 "
-\` 24 0 0x2018 &grave;
-ga "
diff --git a/contrib/groff/font/devlatin1/DESC.proto b/contrib/groff/font/devlatin1/DESC.proto
deleted file mode 100644
index 88399ab16d91..000000000000
--- a/contrib/groff/font/devlatin1/DESC.proto
+++ /dev/null
@@ -1,8 +0,0 @@
-res 240
-hor 24
-vert 40
-unitwidth 10
-sizes 10 0
-fonts 4 R I B BI
-tcommand
-postpro grotty
diff --git a/contrib/groff/font/devlatin1/Makefile.sub b/contrib/groff/font/devlatin1/Makefile.sub
deleted file mode 100644
index 25de3f77290e..000000000000
--- a/contrib/groff/font/devlatin1/Makefile.sub
+++ /dev/null
@@ -1,32 +0,0 @@
-DEV=latin1
-FONTS=R I B BI
-DEVFILES=$(FONTS) DESC
-CLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-$(FONTS): R.proto
- @echo Making $@
- @-rm -f $@
- @(charwidth=`expr $(RES) / $(CPI)` ; \
- sed -e "s/^name [A-Z]*$$/name $@/" \
- -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
- -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
- -e "s/^internalname .*$$/internalname $@/" \
- -e "/^internalname/s/BI/3/" \
- -e "/^internalname/s/B/2/" \
- -e "/^internalname/s/I/1/" \
- -e "/^internalname .*[^ 0-9]/d" \
- $(srcdir)/R.proto >$@)
-
-DESC: DESC.proto
- @echo Making $@
- @-rm -f $@
- @sed -e "s/^res .*$$/res $(RES)/" \
- -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
- -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
- -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
- $(srcdir)/DESC.proto >$@
-
diff --git a/contrib/groff/font/devlatin1/R.proto b/contrib/groff/font/devlatin1/R.proto
deleted file mode 100644
index a527a9fbc60a..000000000000
--- a/contrib/groff/font/devlatin1/R.proto
+++ /dev/null
@@ -1,357 +0,0 @@
-name R
-internalname 0
-spacewidth 24
-charset
-! 24 0 0041
-" 24 0 0042
-dq "
-lq "
-rq "
-# 24 0 0043
-sh "
-$ 24 0 0044
-Do "
-% 24 0 0045
-& 24 0 0046
-' 24 0 0047
-fm "
-aq "
-cq "
-( 24 0 0050
-) 24 0 0051
-* 24 0 0052
-** "
-+ 24 0 0053
-pl "
-, 24 0 0054
-\- 24 0 0055
-mi "
-- "
-hy "
-en "
-. 24 0 0056
-/ 24 0 0057
-sl "
-f/ "
-0 24 0 0060
-1 24 0 0061
-2 24 0 0062
-3 24 0 0063
-4 24 0 0064
-5 24 0 0065
-6 24 0 0066
-7 24 0 0067
-8 24 0 0070
-9 24 0 0071
-: 24 0 0072
-; 24 0 0073
-< 24 0 0074
-la "
-fo "
-= 24 0 0075
-eq "
-> 24 0 0076
-ra "
-fc "
-? 24 0 0077
-@ 24 0 0100
-at "
-A 24 0 0101
-*A "
-B 24 0 0102
-*B "
-C 24 0 0103
-D 24 0 0104
-E 24 0 0105
-*E "
-F 24 0 0106
-G 24 0 0107
-H 24 0 0110
-*Y "
-I 24 0 0111
-*I "
-J 24 0 0112
-K 24 0 0113
-*K "
-L 24 0 0114
-M 24 0 0115
-*M "
-N 24 0 0116
-*N "
-O 24 0 0117
-ci "
-*O "
-P 24 0 0120
-*R "
-Q 24 0 0121
-R 24 0 0122
-S 24 0 0123
-T 24 0 0124
-*T "
-U 24 0 0125
-V 24 0 0126
-W 24 0 0127
-X 24 0 0130
-*X "
-Y 24 0 0131
-*U "
-Z 24 0 0132
-*Z "
-[ 24 0 0133
-lB "
-\ 24 0 0134
-rs "
-] 24 0 0135
-rB "
-a^ 24 0 0136
-^ "
-ha "
-_ 24 0 0137
-ru "
-ul "
-` 24 0 0140
-oq "
-ga "
-a 24 0 0141
-b 24 0 0142
-c 24 0 0143
-d 24 0 0144
-e 24 0 0145
-f 24 0 0146
-g 24 0 0147
-h 24 0 0150
-i 24 0 0151
-.i "
-j 24 0 0152
-k 24 0 0153
-l 24 0 0154
-m 24 0 0155
-n 24 0 0156
-o 24 0 0157
-*o "
-p 24 0 0160
-q 24 0 0161
-r 24 0 0162
-s 24 0 0163
-t 24 0 0164
-u 24 0 0165
-v 24 0 0166
-w 24 0 0167
-x 24 0 0170
-y 24 0 0171
-z 24 0 0172
-lC 24 0 0173
-{ "
-ba 24 0 0174
-or "
-bv "
-br "
-| "
-lb "
-lc "
-lf "
-lk "
-lt "
-rb "
-rc "
-rf "
-rk "
-rt "
-rC 24 0 0175
-} "
-a~ 24 0 0176
-~ "
-ap "
-ti "
-r! 24 0 0241
-char161 "
-ct 24 0 0242
-char162 "
-Po 24 0 0243
-char163 "
-Cs 24 0 0244
-char164 "
-Ye 24 0 0245
-char165 "
-bb 24 0 0246
-char166 "
-sc 24 0 0247
-char167 "
-ad 24 0 0250
-char168 "
-co 24 0 0251
-char169 "
-Of 24 0 0252
-char170 "
-Fo 24 0 0253
-char171 "
-no 24 0 0254
-char172 "
-shc 24 0 0255
-char173 "
-rg 24 0 0256
-char174 "
-a- 24 0 0257
-char175 "
-de 24 0 0260
-char176 "
-ao "
-+- 24 0 0261
-char177 "
-S2 24 0 0262
-char178 "
-S3 24 0 0263
-char179 "
-aa 24 0 0264
-char180 "
-*m 24 0 0265
-char181 "
-ps 24 0 0266
-char182 "
-pc 24 0 0267
-md "
-char183 "
-ac 24 0 0270
-char184 "
-S1 24 0 0271
-char185 "
-Om 24 0 0272
-char186 "
-Fc 24 0 0273
-char187 "
-14 24 0 0274
-char188 "
-12 24 0 0275
-char189 "
-34 24 0 0276
-char190 "
-r? 24 0 0277
-char191 "
-`A 24 0 0300
-char192 "
-'A 24 0 0301
-char193 "
-^A 24 0 0302
-char194 "
-~A 24 0 0303
-char195 "
-:A 24 0 0304
-char196 "
-oA 24 0 0305
-char197 "
-AE 24 0 0306
-char198 "
-,C 24 0 0307
-char199 "
-`E 24 0 0310
-char200 "
-'E 24 0 0311
-char201 "
-^E 24 0 0312
-char202 "
-:E 24 0 0313
-char203 "
-`I 24 0 0314
-char204 "
-'I 24 0 0315
-char205 "
-^I 24 0 0316
-char206 "
-:I 24 0 0317
-char207 "
--D 24 0 0320
-char208 "
-~N 24 0 0321
-char209 "
-`O 24 0 0322
-char210 "
-'O 24 0 0323
-char211 "
-^O 24 0 0324
-char212 "
-~O 24 0 0325
-char213 "
-:O 24 0 0326
-char214 "
-mu 24 0 0327
-char215 "
-/O 24 0 0330
-char216 "
-`U 24 0 0331
-char217 "
-'U 24 0 0332
-char218 "
-^U 24 0 0333
-char219 "
-:U 24 0 0334
-char220 "
-'Y 24 0 0335
-char221 "
-TP 24 0 0336
-char222 "
-ss 24 0 0337
-char223 "
-`a 24 0 0340
-char224 "
-'a 24 0 0341
-char225 "
-^a 24 0 0342
-char226 "
-~a 24 0 0343
-char227 "
-:a 24 0 0344
-char228 "
-oa 24 0 0345
-char229 "
-ae 24 0 0346
-char230 "
-,c 24 0 0347
-char231 "
-`e 24 0 0350
-char232 "
-'e 24 0 0351
-char233 "
-^e 24 0 0352
-char234 "
-:e 24 0 0353
-char235 "
-`i 24 0 0354
-char236 "
-'i 24 0 0355
-char237 "
-^i 24 0 0356
-char238 "
-:i 24 0 0357
-char239 "
-Sd 24 0 0360
-char240 "
-~n 24 0 0361
-char241 "
-`o 24 0 0362
-char242 "
-'o 24 0 0363
-char243 "
-^o 24 0 0364
-char244 "
-~o 24 0 0365
-char245 "
-:o 24 0 0366
-char246 "
-di 24 0 0367
-char247 "
-/o 24 0 0370
-char248 "
-`u 24 0 0371
-char249 "
-'u 24 0 0372
-char250 "
-^u 24 0 0373
-char251 "
-:u 24 0 0374
-char252 "
-'y 24 0 0375
-char253 "
-Tp 24 0 0376
-char254 "
-:y 24 0 0377
-char255 "
diff --git a/contrib/groff/font/devlbp/CB b/contrib/groff/font/devlbp/CB
deleted file mode 100644
index 5c34658f9b48..000000000000
--- a/contrib/groff/font/devlbp/CB
+++ /dev/null
@@ -1,272 +0,0 @@
-
-name CB
-lbpname NcourierB
-spacewidth 2200
-slant 0
-charset
-aq 2200 0 0x27 -- 0,39 # quotesingle
-space 2200 0 0x20 -- 0,32
-! 2200 0 0x21 -- 0,33 # exclam
-" 2200 0 0x22 -- 0,34 # quotedbl
-dq 2200 0 0x22 -- 0,34 # quotedbl
-# 2200 0 0x23 -- 0,35 # numbersign
-sh 2200 0 0x23 -- 0,35 # "
-$ 2200 0 0x24 -- 0,36 # dollar
-Do 2200 0 0x24 -- 0,36 # "
-% 2200 0 0x25 -- 0,37 # percent
-& 2200 0 0x26 -- 0,38 # ampersand
-' 2200 0 0x27 -- 0,39 # quoteright
-cq 2200 0 0x27 -- 0,39 # quoteright
-( 2200 0 0x28 -- 0,40 # parenleft
-) 2200 0 0x29 -- 0,41 # parenright
-* 2200 0 0x2a -- 0,42 # asterisk
-+ 2200 0 0x2b -- 0,43 # plus
-, 2200 0 0x2c -- 0,44 # comma
-- 2200 0 0x2d -- 0,45 # hyphen
-\- 2200 0 0x2d -- 0,45 # hyphen
-hy 2200 0 0x2d -- 0,45 # "
-char173 2200 0 0x2d -- 0,45 # "
-. 2200 0 0x2e -- 0,46 # period
-/ 2200 0 0x2f -- 0,47 # slash
-sl 2200 0 0x2f -- 0,47 # "
-0 2200 0 0x30 -- 0,48 # zero
-1 2200 0 0x31 -- 0,49 # one
-2 2200 0 0x32 -- 0,50 # two
-3 2200 0 0x33 -- 0,51 # three
-4 2200 0 0x34 -- 0,52 # four
-5 2200 0 0x35 -- 0,53 # five
-6 2200 0 0x36 -- 0,54 # six
-7 2200 0 0x37 -- 0,55 # seven
-8 2200 0 0x38 -- 0,56 # eight
-9 2200 0 0x39 -- 0,57 # nine
-: 2200 0 0x3a -- 0,58 # colon
-; 2200 0 0x3b -- 0,59 # semicolon
-< 2200 0 0x3c -- 0,60 # less
-= 2200 0 0x3d -- 0,61 # equal
-> 2200 0 0x3e -- 0,62 # greater
-? 2200 0 0x3f -- 0,63 # question
-@ 2200 0 0x40 -- 0,64 # at
-at 2200 0 0x40 -- 0,64 # "
-A 2200 0 0x41 -- 0,65 # A
-B 2200 0 0x42 -- 0,66 # B
-C 2200 0 0x43 -- 0,67 # C
-D 2200 0 0x44 -- 0,68 # D
-E 2200 0 0x45 -- 0,69 # E
-F 2200 0 0x46 -- 0,70 # F
-G 2200 0 0x47 -- 0,71 # G
-H 2200 0 0x48 -- 0,72 # H
-I 2200 0 0x49 -- 0,73 # I
-J 2200 0 0x4a -- 0,74 # J
-K 2200 0 0x4b -- 0,75 # K
-L 2200 0 0x4c -- 0,76 # L
-M 2200 0 0x4d -- 0,77 # M
-N 2200 0 0x4e -- 0,78 # N
-O 2200 0 0x4f -- 0,79 # O
-P 2200 0 0x50 -- 0,80 # P
-Q 2200 0 0x51 -- 0,81 # Q
-R 2200 0 0x52 -- 0,82 # R
-S 2200 0 0x53 -- 0,83 # S
-T 2200 0 0x54 -- 0,84 # T
-U 2200 0 0x55 -- 0,85 # U
-V 2200 0 0x56 -- 0,86 # V
-W 2200 0 0x57 -- 0,87 # W
-X 2200 0 0x58 -- 0,88 # X
-Y 2200 0 0x59 -- 0,89 # Y
-Z 2200 0 0x5a -- 0,90 # Z
-[ 2200 0 0x5b -- 0,91 # bracketleft
-lB 2200 0 0x5b -- 0,91 # "
-\ 2200 0 0x5c -- 0,92 # backslash
-rs 2200 0 0x5c -- 0,92 # "
-] 2200 0 0x5d -- 0,93 # bracketright
-rB 2200 0 0x5d -- 0,93 # "
-a^ 2200 0 0x5e -- 0,94 # circumflex
-^ 2200 0 0x5e -- 0,94 # "
-_ 2200 0 0x5f -- 0,95 # underscore
-` 2200 0 0x60 -- 0,96 # quoteleft
-oq 2200 0 0x60 -- 0,96 # "
-a 2200 0 0x61 -- 0,97 # a
-b 2200 0 0x62 -- 0,98 # b
-c 2200 0 0x63 -- 0,99 # c
-d 2200 0 0x64 -- 0,100 # d
-e 2200 0 0x65 -- 0,101 # e
-f 2200 0 0x66 -- 0,102 # f
-g 2200 0 0x67 -- 0,103 # g
-h 2200 0 0x68 -- 0,104 # h
-i 2200 0 0x69 -- 0,105 # i
-j 2200 0 0x6a -- 0,106 # j
-k 2200 0 0x6b -- 0,107 # k
-l 2200 0 0x6c -- 0,108 # l
-m 2200 0 0x6d -- 0,109 # m
-n 2200 0 0x6e -- 0,110 # n
-o 2200 0 0x6f -- 0,111 # o
-p 2200 0 0x70 -- 0,112 # p
-q 2200 0 0x71 -- 0,113 # q
-r 2200 0 0x72 -- 0,114 # r
-s 2200 0 0x73 -- 0,115 # s
-t 2200 0 0x74 -- 0,116 # t
-u 2200 0 0x75 -- 0,117 # u
-v 2200 0 0x76 -- 0,118 # v
-w 2200 0 0x77 -- 0,119 # w
-x 2200 0 0x78 -- 0,120 # x
-y 2200 0 0x79 -- 0,121 # y
-z 2200 0 0x7a -- 0,122 # z
-lC 2200 0 0x7b -- 0,123 # braceleft
-{ 2200 0 0x7b -- 0,123 # "
-| 2200 0 0x7c -- 0,124 # "
-rC 2200 0 0x7d -- 0,125 # braceright
-} 2200 0 0x7d -- 0,125 # "
-a~ 2200 0 0x7e -- 0,126 # tilde
-~ 2200 0 0x7e -- 0,126 # "
-char161 2200 0 0xad -- 4,7 # exclamdown
-char162 2200 0 0x9b -- 4,19 # cent
-char163 2200 0 0x9c -- 4,11 # sterling
-char165 2200 0 0x9d -- 4,12 # yen
-char166 2200 0 0x7c -- 0,124 # brokenbar
-char167 2200 0 0x15 -- 4,6 # section
-char170 2200 0 0xa6 -- 4,15 # ordfeminine
-char171 2200 0 0xae -- 4,9 # guillemotleft
-char172 2200 0 0xaa -- 6,20 # logicalnot
-char175 2200 0 0x2d -- 6,0 # macron
-char176 2200 0 0xf8 -- 6,36 # degree
-char177 2200 0 0xf1 -- 6,1 # plusminus
-char178 2200 0 0xfd -- 4,20 # twosuperior
-char181 2200 0 0xe6 -- 8,25 # mu
-char182 2200 0 0x14 -- 4,5 # paragraph
-char183 2200 0 0xfa -- 6,32 # periodcentered
-char186 2200 0 0xa7 -- 4,16 # ordmasculine
-char187 2200 0 0xaf -- 4,10 # guillemotright
-char188 2200 0 0xac -- 4,18 # onequarter
-char189 2200 0 0xab -- 4,17 # onehalf
-char191 2200 0 0xa8 -- 4,8 # questiondown
-char195 2200 0 0x28e -- 1,76 # Atilde
-char196 2200 0 0x8e -- 1,30 # Adieresis
-char197 2200 0 0x8f -- 1,34 # Aring
-char198 2200 0 0x92 -- 1,36 # AE
-char199 2200 0 0x80 -- 1,38 # Ccedilla
-char201 2200 0 0x90 -- 1,40 # Eacute
-char209 2200 0 0xa5 -- 1,56 # Ntilde
-char214 2200 0 0x99 -- 1,62 # Odieresis
-char220 2200 0 0x9a -- 1,70 # Udieresis
-char224 2200 0 0x85 -- 1,33 # agrave
-char225 2200 0 0xa0 -- 1,27 # aacute
-char226 2200 0 0x83 -- 1,29 # acircumflex
-char227 2200 0 0x284 -- 1,93 # atilde
-char228 2200 0 0x84 -- 1,31 # adieresis
-char229 2200 0 0x86 -- 1,35 # aring
-char230 2200 0 0x91 -- 1,37 # ae
-char231 2200 0 0x87 -- 1,39 # ccedilla
-char232 2200 0 0x8a -- 1,47 # egrave
-char233 2200 0 0x82 -- 1,41 # eacute
-char234 2200 0 0x88 -- 1,43 # ecircumflex
-char235 2200 0 0x89 -- 1,45 # edieresis
-char236 2200 0 0x8d -- 1,55 # igrave
-char237 2200 0 0xa1 -- 1,49 # iacute
-char238 2200 0 0x8c -- 1,51 # icircumflex
-char239 2200 0 0x8b -- 1,53 # idieresis
-char241 2200 0 0xa4 -- 1,57 # ntilde
-char242 2200 0 0x95 -- 1,65 # ograve
-char243 2200 0 0xa2 -- 1,59 # oacute
-char244 2200 0 0x93 -- 1,61 # ocircumflex
-char246 2200 0 0x94 -- 1,63 # odieresis
-char247 2200 0 0xf6 -- 6,8 # divide
-char249 2200 0 0x97 -- 1,73 # ugrave
-char250 2200 0 0xa3 -- 1,67 # uacute
-char251 2200 0 0x96 -- 1,69 # ucircumflex
-char252 2200 0 0x81 -- 1,71 # udieresis
-char255 2200 0 0x98 -- 1,75 # ydieresis
-AE 2200 0 0x92 -- 1,36 # AE
-ae 2200 0 0x91 -- 1,37 # ae
-'E 2200 0 0x90 -- 1,40 # Eacute
-'a 2200 0 0xa0 -- 1,27 # aacute
-'e 2200 0 0x82 -- 1,41 # eacute
-'i 2200 0 0xa1 -- 1,49 # iacute
-'o 2200 0 0xa2 -- 1,59 # oacute
-'u 2200 0 0x95 -- 1,65 # uacute
-:A 2200 0 0x8e -- 1,30 # Adieresis
-:O 2200 0 0x99 -- 1,62 # Odieresis
-:U 2200 0 0x9a -- 1,70 # Udieresis
-:a 2200 0 0x84 -- 1,31 # adieresis
-:e 2200 0 0x89 -- 1,45 # edieresis
-:i 2200 0 0x8b -- 1,53 # idieresis
-:o 2200 0 0x94 -- 1,63 # odieresis
-:u 2200 0 0x81 -- 1,71 # udieresis
-:y 2200 0 0x98 -- 1,75 # ydieresis
-^a 2200 0 0x83 -- 1,29 # acircumflex
-^e 2200 0 0x88 -- 1,43 # ecircumflex
-^i 2200 0 0x8c -- 1,51 # icircumflex
-^o 2200 0 0x93 -- 1,61 # ocircumflex
-^u 2200 0 0x96 -- 1,69 # ucircumflex
-`a 2200 0 0x85 -- 1,33 # agrave
-`e 2200 0 0x8a -- 1,47 # egrave
-`i 2200 0 0x8d -- 1,55 # igrave
-`o 2200 0 0x95 -- 1,65 # ograve
-`u 2200 0 0x97 -- 1,73 # ugrave
-~A 2200 0 0x28e -- 1,26 # Atilde
-~N 2200 0 0xa5 -- 1,56 # Ntilde
-~a 2200 0 0x284 -- --- # atilde
-~n 2200 0 0xa4 -- 1,57 # ntilde
-,C 2200 0 0x80 -- 1,38 # Ccedilla
-,c 2200 0 0x87 -- 1,39 # ccedilla
-oA 2200 0 0x8f -- 1,34 # Aring
-oa 2200 0 0x86 -- 1,35 # aring
-a^ 2200 0 0x5e -- 1,3 # circumflex "circumflex accent"
-a~ 2200 0 0x7e -- 1,2 # tilde "tilde accent"
-Do 2200 0 0x24 -- 0,36 # dollar
-Po 2200 0 0x9c -- 4,11 # sterling
-Ye 2200 0 0x9d -- 4,12 # yen
-Fn 2200 0 0x9f -- 4,14 # florin
-ct 2200 0 0x9b -- 4,19 # cent
-Fo 2200 0 0xae -- 4,9 # guillemotleft
-r! 2200 0 0xad -- 4,7 # exclamdown
-r? 2200 0 0xa8 -- 4,8 # questiondown
-Of 2200 0 0xa6 -- 4,15 # ordfeminine
-Om 2200 0 0xa7 -- 4,16 # ordmasculine
-S2 2200 0 0xfd -- 4,20 # twosuperior
-<- 2200 0 0x1b -- 6,22 # arrowleft
--> 2200 0 0x1a -- 6,21 # arrowright
-<> 2200 0 0x1d -- 6,25 # arrowboth "horizontal double-headed arrow"
-da 2200 0 0x19 -- 6,24 # arrowdown
-ua 2200 0 0x18 -- 6,23 # arrowup
-va 2200 0 0x12 -- 6,26 # \& "vertical double-headed arrow"
-ba 2200 0 0xb3 -- 3,9 # bar
-bb 2200 0 0x7c -- 0,124 # brokenbar
-ul 2200 0 0x5f -- 0,95 # ul "underline with traditional troff metrics"
-ci 2200 0 0x9 -- 4,1 # circle
-bu 2200 0 0x7 -- 4,0 # bullet
-ps 2200 0 0x14 -- 4,5 # paragraph
-sc 2200 0 0x15 -- 4,6 # section
-de 2200 0 0xf8 -- 6,36 # degree
-12 2200 0 0xab -- 4,17 # onehalf
-14 2200 0 0xac -- 4,18 # onequarter
-hy 2200 0 0x2d -- 6,0 # hyphen
-lB 2200 0 0x5b -- 0,91 # bracketleft
-rB 2200 0 0x5d -- 0,93 # bracketright
-lC 2200 0 0x7b -- 0,123 # braceleft
-rC 2200 0 0x7d -- 0,125 # braceright
-aq 2200 0 0x27 -- 0,39 # quotesingle "apostrophe quote"
-at 2200 0 0x40 -- 0,64 # at
-.C1 2200 0 0x2d -- 0,45 # - minus "minus sign from current font"
-sh 2200 0 0x23 -- 0,35 # numbersign
-sl 2200 0 0x2f -- 0,47 # slash
-rs 2200 0 0x5c -- 0,92 # backslash
-*a 2200 0 0xe0 -- 8,1 # alpha
-*b 2200 0 0xe1 -- 8,3 # beta
-*d 2200 0 0xeb -- 8,9 # delta
-*h 2200 0 0xe9 -- 8,17 # theta
-*m 2200 0 0xe6 -- 8,25 # mu
-*p 2200 0 0xe3 -- 8,33 # pi
-*s 2200 0 0xe5 -- 8,37 # sigma
-*t 2200 0 0xe7 -- 8,41 # tau
-~~ 2200 0 0xf7 -- 6,13 # approxequal
-~= 2200 0 0xf7 -- 6,13 # approxequal
-+- 2200 0 0xf1 -- 6,1 # plusminus
-<= 2200 0 0xf3 -- 6,2 # lessequal
-ca 2200 0 0xef -- 6,16 # intersection "intersection, cap"
--h 2200 0 0xc4 -- 3,8 # hbar
-CL 2200 0 0x5 -- 5,168 # club "club suit"
-SP 2200 0 0x6 -- 5,171 # spade "spade suit"
-HE 2200 0 0x3 -- 5,170 # heart "heart suit"
-DI 2200 0 0x4 -- 5,169 # diamond "diamond suit"
-<< 2200 0 0xae -- 6,77 # "" "much less"
->> 2200 0 0xaf -- 6,78 # "" "much greater"
-pc 2200 0 0xfa -- 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/CI b/contrib/groff/font/devlbp/CI
deleted file mode 100644
index 84b0ac41dab2..000000000000
--- a/contrib/groff/font/devlbp/CI
+++ /dev/null
@@ -1,272 +0,0 @@
-
-name CI
-lbpname NcourierI
-spacewidth 2200
-slant 0
-charset
-aq 2200 0 0x27 -- 0,39 # quotesingle
-space 2200 0 0x20 -- 0,32
-! 2200 0 0x21 -- 0,33 # exclam
-" 2200 0 0x22 -- 0,34 # quotedbl
-dq 2200 0 0x22 -- 0,34 # quotedbl
-# 2200 0 0x23 -- 0,35 # numbersign
-sh 2200 0 0x23 -- 0,35 # "
-$ 2200 0 0x24 -- 0,36 # dollar
-Do 2200 0 0x24 -- 0,36 # "
-% 2200 0 0x25 -- 0,37 # percent
-& 2200 0 0x26 -- 0,38 # ampersand
-' 2200 0 0x27 -- 0,39 # quoteright
-cq 2200 0 0x27 -- 0,39 # quoteright
-( 2200 0 0x28 -- 0,40 # parenleft
-) 2200 0 0x29 -- 0,41 # parenright
-* 2200 0 0x2a -- 0,42 # asterisk
-+ 2200 0 0x2b -- 0,43 # plus
-, 2200 0 0x2c -- 0,44 # comma
-- 2200 0 0x2d -- 0,45 # hyphen
-\- 2200 0 0x2d -- 0,45 # hyphen
-hy 2200 0 0x2d -- 0,45 # "
-char173 2200 0 0x2d -- 0,45 # "
-. 2200 0 0x2e -- 0,46 # period
-/ 2200 0 0x2f -- 0,47 # slash
-sl 2200 0 0x2f -- 0,47 # "
-0 2200 0 0x30 -- 0,48 # zero
-1 2200 0 0x31 -- 0,49 # one
-2 2200 0 0x32 -- 0,50 # two
-3 2200 0 0x33 -- 0,51 # three
-4 2200 0 0x34 -- 0,52 # four
-5 2200 0 0x35 -- 0,53 # five
-6 2200 0 0x36 -- 0,54 # six
-7 2200 0 0x37 -- 0,55 # seven
-8 2200 0 0x38 -- 0,56 # eight
-9 2200 0 0x39 -- 0,57 # nine
-: 2200 0 0x3a -- 0,58 # colon
-; 2200 0 0x3b -- 0,59 # semicolon
-< 2200 0 0x3c -- 0,60 # less
-= 2200 0 0x3d -- 0,61 # equal
-> 2200 0 0x3e -- 0,62 # greater
-? 2200 0 0x3f -- 0,63 # question
-@ 2200 0 0x40 -- 0,64 # at
-at 2200 0 0x40 -- 0,64 # "
-A 2200 0 0x41 -- 0,65 # A
-B 2200 0 0x42 -- 0,66 # B
-C 2200 0 0x43 -- 0,67 # C
-D 2200 0 0x44 -- 0,68 # D
-E 2200 0 0x45 -- 0,69 # E
-F 2200 0 0x46 -- 0,70 # F
-G 2200 0 0x47 -- 0,71 # G
-H 2200 0 0x48 -- 0,72 # H
-I 2200 0 0x49 -- 0,73 # I
-J 2200 0 0x4a -- 0,74 # J
-K 2200 0 0x4b -- 0,75 # K
-L 2200 0 0x4c -- 0,76 # L
-M 2200 0 0x4d -- 0,77 # M
-N 2200 0 0x4e -- 0,78 # N
-O 2200 0 0x4f -- 0,79 # O
-P 2200 0 0x50 -- 0,80 # P
-Q 2200 0 0x51 -- 0,81 # Q
-R 2200 0 0x52 -- 0,82 # R
-S 2200 0 0x53 -- 0,83 # S
-T 2200 0 0x54 -- 0,84 # T
-U 2200 0 0x55 -- 0,85 # U
-V 2200 0 0x56 -- 0,86 # V
-W 2200 0 0x57 -- 0,87 # W
-X 2200 0 0x58 -- 0,88 # X
-Y 2200 0 0x59 -- 0,89 # Y
-Z 2200 0 0x5a -- 0,90 # Z
-[ 2200 0 0x5b -- 0,91 # bracketleft
-lB 2200 0 0x5b -- 0,91 # "
-\ 2200 0 0x5c -- 0,92 # backslash
-rs 2200 0 0x5c -- 0,92 # "
-] 2200 0 0x5d -- 0,93 # bracketright
-rB 2200 0 0x5d -- 0,93 # "
-a^ 2200 0 0x5e -- 0,94 # circumflex
-^ 2200 0 0x5e -- 0,94 # "
-_ 2200 0 0x5f -- 0,95 # underscore
-` 2200 0 0x60 -- 0,96 # quoteleft
-oq 2200 0 0x60 -- 0,96 # "
-a 2200 0 0x61 -- 0,97 # a
-b 2200 0 0x62 -- 0,98 # b
-c 2200 0 0x63 -- 0,99 # c
-d 2200 0 0x64 -- 0,100 # d
-e 2200 0 0x65 -- 0,101 # e
-f 2200 0 0x66 -- 0,102 # f
-g 2200 0 0x67 -- 0,103 # g
-h 2200 0 0x68 -- 0,104 # h
-i 2200 0 0x69 -- 0,105 # i
-j 2200 0 0x6a -- 0,106 # j
-k 2200 0 0x6b -- 0,107 # k
-l 2200 0 0x6c -- 0,108 # l
-m 2200 0 0x6d -- 0,109 # m
-n 2200 0 0x6e -- 0,110 # n
-o 2200 0 0x6f -- 0,111 # o
-p 2200 0 0x70 -- 0,112 # p
-q 2200 0 0x71 -- 0,113 # q
-r 2200 0 0x72 -- 0,114 # r
-s 2200 0 0x73 -- 0,115 # s
-t 2200 0 0x74 -- 0,116 # t
-u 2200 0 0x75 -- 0,117 # u
-v 2200 0 0x76 -- 0,118 # v
-w 2200 0 0x77 -- 0,119 # w
-x 2200 0 0x78 -- 0,120 # x
-y 2200 0 0x79 -- 0,121 # y
-z 2200 0 0x7a -- 0,122 # z
-lC 2200 0 0x7b -- 0,123 # braceleft
-{ 2200 0 0x7b -- 0,123 # "
-| 2200 0 0x7c -- 0,124 # "
-rC 2200 0 0x7d -- 0,125 # braceright
-} 2200 0 0x7d -- 0,125 # "
-a~ 2200 0 0x7e -- 0,126 # tilde
-~ 2200 0 0x7e -- 0,126 # "
-char161 2200 0 0xad -- 4,7 # exclamdown
-char162 2200 0 0x9b -- 4,19 # cent
-char163 2200 0 0x9c -- 4,11 # sterling
-char165 2200 0 0x9d -- 4,12 # yen
-char166 2200 0 0x7c -- 0,124 # brokenbar
-char167 2200 0 0x15 -- 4,6 # section
-char170 2200 0 0xa6 -- 4,15 # ordfeminine
-char171 2200 0 0xae -- 4,9 # guillemotleft
-char172 2200 0 0xaa -- 6,20 # logicalnot
-char175 2200 0 0x2d -- 6,0 # macron
-char176 2200 0 0xf8 -- 6,36 # degree
-char177 2200 0 0xf1 -- 6,1 # plusminus
-char178 2200 0 0xfd -- 4,20 # twosuperior
-char181 2200 0 0xe6 -- 8,25 # mu
-char182 2200 0 0x14 -- 4,5 # paragraph
-char183 2200 0 0xfa -- 6,32 # periodcentered
-char186 2200 0 0xa7 -- 4,16 # ordmasculine
-char187 2200 0 0xaf -- 4,10 # guillemotright
-char188 2200 0 0xac -- 4,18 # onequarter
-char189 2200 0 0xab -- 4,17 # onehalf
-char191 2200 0 0xa8 -- 4,8 # questiondown
-char195 2200 0 0x28e -- 1,76 # Atilde
-char196 2200 0 0x8e -- 1,30 # Adieresis
-char197 2200 0 0x8f -- 1,34 # Aring
-char198 2200 0 0x92 -- 1,36 # AE
-char199 2200 0 0x80 -- 1,38 # Ccedilla
-char201 2200 0 0x90 -- 1,40 # Eacute
-char209 2200 0 0xa5 -- 1,56 # Ntilde
-char214 2200 0 0x99 -- 1,62 # Odieresis
-char220 2200 0 0x9a -- 1,70 # Udieresis
-char224 2200 0 0x85 -- 1,33 # agrave
-char225 2200 0 0xa0 -- 1,27 # aacute
-char226 2200 0 0x83 -- 1,29 # acircumflex
-char227 2200 0 0x284 -- 1,93 # atilde
-char228 2200 0 0x84 -- 1,31 # adieresis
-char229 2200 0 0x86 -- 1,35 # aring
-char230 2200 0 0x91 -- 1,37 # ae
-char231 2200 0 0x87 -- 1,39 # ccedilla
-char232 2200 0 0x8a -- 1,47 # egrave
-char233 2200 0 0x82 -- 1,41 # eacute
-char234 2200 0 0x88 -- 1,43 # ecircumflex
-char235 2200 0 0x89 -- 1,45 # edieresis
-char236 2200 0 0x8d -- 1,55 # igrave
-char237 2200 0 0xa1 -- 1,49 # iacute
-char238 2200 0 0x8c -- 1,51 # icircumflex
-char239 2200 0 0x8b -- 1,53 # idieresis
-char241 2200 0 0xa4 -- 1,57 # ntilde
-char242 2200 0 0x95 -- 1,65 # ograve
-char243 2200 0 0xa2 -- 1,59 # oacute
-char244 2200 0 0x93 -- 1,61 # ocircumflex
-char246 2200 0 0x94 -- 1,63 # odieresis
-char247 2200 0 0xf6 -- 6,8 # divide
-char249 2200 0 0x97 -- 1,73 # ugrave
-char250 2200 0 0xa3 -- 1,67 # uacute
-char251 2200 0 0x96 -- 1,69 # ucircumflex
-char252 2200 0 0x81 -- 1,71 # udieresis
-char255 2200 0 0x98 -- 1,75 # ydieresis
-AE 2200 0 0x92 -- 1,36 # AE
-ae 2200 0 0x91 -- 1,37 # ae
-'E 2200 0 0x90 -- 1,40 # Eacute
-'a 2200 0 0xa0 -- 1,27 # aacute
-'e 2200 0 0x82 -- 1,41 # eacute
-'i 2200 0 0xa1 -- 1,49 # iacute
-'o 2200 0 0xa2 -- 1,59 # oacute
-'u 2200 0 0x95 -- 1,65 # uacute
-:A 2200 0 0x8e -- 1,30 # Adieresis
-:O 2200 0 0x99 -- 1,62 # Odieresis
-:U 2200 0 0x9a -- 1,70 # Udieresis
-:a 2200 0 0x84 -- 1,31 # adieresis
-:e 2200 0 0x89 -- 1,45 # edieresis
-:i 2200 0 0x8b -- 1,53 # idieresis
-:o 2200 0 0x94 -- 1,63 # odieresis
-:u 2200 0 0x81 -- 1,71 # udieresis
-:y 2200 0 0x98 -- 1,75 # ydieresis
-^a 2200 0 0x83 -- 1,29 # acircumflex
-^e 2200 0 0x88 -- 1,43 # ecircumflex
-^i 2200 0 0x8c -- 1,51 # icircumflex
-^o 2200 0 0x93 -- 1,61 # ocircumflex
-^u 2200 0 0x96 -- 1,69 # ucircumflex
-`a 2200 0 0x85 -- 1,33 # agrave
-`e 2200 0 0x8a -- 1,47 # egrave
-`i 2200 0 0x8d -- 1,55 # igrave
-`o 2200 0 0x95 -- 1,65 # ograve
-`u 2200 0 0x97 -- 1,73 # ugrave
-~A 2200 0 0x28e -- 1,26 # Atilde
-~N 2200 0 0xa5 -- 1,56 # Ntilde
-~a 2200 0 0x284 -- --- # atilde
-~n 2200 0 0xa4 -- 1,57 # ntilde
-,C 2200 0 0x80 -- 1,38 # Ccedilla
-,c 2200 0 0x87 -- 1,39 # ccedilla
-oA 2200 0 0x8f -- 1,34 # Aring
-oa 2200 0 0x86 -- 1,35 # aring
-a^ 2200 0 0x5e -- 1,3 # circumflex "circumflex accent"
-a~ 2200 0 0x7e -- 1,2 # tilde "tilde accent"
-Do 2200 0 0x24 -- 0,36 # dollar
-Po 2200 0 0x9c -- 4,11 # sterling
-Ye 2200 0 0x9d -- 4,12 # yen
-Fn 2200 0 0x9f -- 4,14 # florin
-ct 2200 0 0x9b -- 4,19 # cent
-Fo 2200 0 0xae -- 4,9 # guillemotleft
-r! 2200 0 0xad -- 4,7 # exclamdown
-r? 2200 0 0xa8 -- 4,8 # questiondown
-Of 2200 0 0xa6 -- 4,15 # ordfeminine
-Om 2200 0 0xa7 -- 4,16 # ordmasculine
-S2 2200 0 0xfd -- 4,20 # twosuperior
-<- 2200 0 0x1b -- 6,22 # arrowleft
--> 2200 0 0x1a -- 6,21 # arrowright
-<> 2200 0 0x1d -- 6,25 # arrowboth "horizontal double-headed arrow"
-da 2200 0 0x19 -- 6,24 # arrowdown
-ua 2200 0 0x18 -- 6,23 # arrowup
-va 2200 0 0x12 -- 6,26 # \& "vertical double-headed arrow"
-ba 2200 0 0xb3 -- 3,9 # bar
-bb 2200 0 0x7c -- 0,124 # brokenbar
-ul 2200 0 0x5f -- 0,95 # ul "underline with traditional troff metrics"
-ci 2200 0 0x9 -- 4,1 # circle
-bu 2200 0 0x7 -- 4,0 # bullet
-ps 2200 0 0x14 -- 4,5 # paragraph
-sc 2200 0 0x15 -- 4,6 # section
-de 2200 0 0xf8 -- 6,36 # degree
-12 2200 0 0xab -- 4,17 # onehalf
-14 2200 0 0xac -- 4,18 # onequarter
-hy 2200 0 0x2d -- 6,0 # hyphen
-lB 2200 0 0x5b -- 0,91 # bracketleft
-rB 2200 0 0x5d -- 0,93 # bracketright
-lC 2200 0 0x7b -- 0,123 # braceleft
-rC 2200 0 0x7d -- 0,125 # braceright
-aq 2200 0 0x27 -- 0,39 # quotesingle "apostrophe quote"
-at 2200 0 0x40 -- 0,64 # at
-.C1 2200 0 0x2d -- 0,45 # - minus "minus sign from current font"
-sh 2200 0 0x23 -- 0,35 # numbersign
-sl 2200 0 0x2f -- 0,47 # slash
-rs 2200 0 0x5c -- 0,92 # backslash
-*a 2200 0 0xe0 -- 8,1 # alpha
-*b 2200 0 0xe1 -- 8,3 # beta
-*d 2200 0 0xeb -- 8,9 # delta
-*h 2200 0 0xe9 -- 8,17 # theta
-*m 2200 0 0xe6 -- 8,25 # mu
-*p 2200 0 0xe3 -- 8,33 # pi
-*s 2200 0 0xe5 -- 8,37 # sigma
-*t 2200 0 0xe7 -- 8,41 # tau
-~~ 2200 0 0xf7 -- 6,13 # approxequal
-~= 2200 0 0xf7 -- 6,13 # approxequal
-+- 2200 0 0xf1 -- 6,1 # plusminus
-<= 2200 0 0xf3 -- 6,2 # lessequal
-ca 2200 0 0xef -- 6,16 # intersection "intersection, cap"
--h 2200 0 0xc4 -- 3,8 # hbar
-CL 2200 0 0x5 -- 5,168 # club "club suit"
-SP 2200 0 0x6 -- 5,171 # spade "spade suit"
-HE 2200 0 0x3 -- 5,170 # heart "heart suit"
-DI 2200 0 0x4 -- 5,169 # diamond "diamond suit"
-<< 2200 0 0xae -- 6,77 # "" "much less"
->> 2200 0 0xaf -- 6,78 # "" "much greater"
-pc 2200 0 0xfa -- 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/CR b/contrib/groff/font/devlbp/CR
deleted file mode 100644
index ef4a56b2f098..000000000000
--- a/contrib/groff/font/devlbp/CR
+++ /dev/null
@@ -1,272 +0,0 @@
-
-name CR
-lbpname NcourierR
-spacewidth 2200
-slant 0
-charset
-aq 2200 0 0x27 -- 0,39 # quotesingle
-space 2200 0 0x20 -- 0,32
-! 2200 0 0x21 -- 0,33 # exclam
-" 2200 0 0x22 -- 0,34 # quotedbl
-dq 2200 0 0x22 -- 0,34 # quotedbl
-# 2200 0 0x23 -- 0,35 # numbersign
-sh 2200 0 0x23 -- 0,35 # "
-$ 2200 0 0x24 -- 0,36 # dollar
-Do 2200 0 0x24 -- 0,36 # "
-% 2200 0 0x25 -- 0,37 # percent
-& 2200 0 0x26 -- 0,38 # ampersand
-' 2200 0 0x27 -- 0,39 # quoteright
-cq 2200 0 0x27 -- 0,39 # quoteright
-( 2200 0 0x28 -- 0,40 # parenleft
-) 2200 0 0x29 -- 0,41 # parenright
-* 2200 0 0x2a -- 0,42 # asterisk
-+ 2200 0 0x2b -- 0,43 # plus
-, 2200 0 0x2c -- 0,44 # comma
-- 2200 0 0x2d -- 0,45 # hyphen
-\- 2200 0 0x2d -- 0,45 # hyphen
-hy 2200 0 0x2d -- 0,45 # "
-char173 2200 0 0x2d -- 0,45 # "
-. 2200 0 0x2e -- 0,46 # period
-/ 2200 0 0x2f -- 0,47 # slash
-sl 2200 0 0x2f -- 0,47 # "
-0 2200 0 0x30 -- 0,48 # zero
-1 2200 0 0x31 -- 0,49 # one
-2 2200 0 0x32 -- 0,50 # two
-3 2200 0 0x33 -- 0,51 # three
-4 2200 0 0x34 -- 0,52 # four
-5 2200 0 0x35 -- 0,53 # five
-6 2200 0 0x36 -- 0,54 # six
-7 2200 0 0x37 -- 0,55 # seven
-8 2200 0 0x38 -- 0,56 # eight
-9 2200 0 0x39 -- 0,57 # nine
-: 2200 0 0x3a -- 0,58 # colon
-; 2200 0 0x3b -- 0,59 # semicolon
-< 2200 0 0x3c -- 0,60 # less
-= 2200 0 0x3d -- 0,61 # equal
-> 2200 0 0x3e -- 0,62 # greater
-? 2200 0 0x3f -- 0,63 # question
-@ 2200 0 0x40 -- 0,64 # at
-at 2200 0 0x40 -- 0,64 # "
-A 2200 0 0x41 -- 0,65 # A
-B 2200 0 0x42 -- 0,66 # B
-C 2200 0 0x43 -- 0,67 # C
-D 2200 0 0x44 -- 0,68 # D
-E 2200 0 0x45 -- 0,69 # E
-F 2200 0 0x46 -- 0,70 # F
-G 2200 0 0x47 -- 0,71 # G
-H 2200 0 0x48 -- 0,72 # H
-I 2200 0 0x49 -- 0,73 # I
-J 2200 0 0x4a -- 0,74 # J
-K 2200 0 0x4b -- 0,75 # K
-L 2200 0 0x4c -- 0,76 # L
-M 2200 0 0x4d -- 0,77 # M
-N 2200 0 0x4e -- 0,78 # N
-O 2200 0 0x4f -- 0,79 # O
-P 2200 0 0x50 -- 0,80 # P
-Q 2200 0 0x51 -- 0,81 # Q
-R 2200 0 0x52 -- 0,82 # R
-S 2200 0 0x53 -- 0,83 # S
-T 2200 0 0x54 -- 0,84 # T
-U 2200 0 0x55 -- 0,85 # U
-V 2200 0 0x56 -- 0,86 # V
-W 2200 0 0x57 -- 0,87 # W
-X 2200 0 0x58 -- 0,88 # X
-Y 2200 0 0x59 -- 0,89 # Y
-Z 2200 0 0x5a -- 0,90 # Z
-[ 2200 0 0x5b -- 0,91 # bracketleft
-lB 2200 0 0x5b -- 0,91 # "
-\ 2200 0 0x5c -- 0,92 # backslash
-rs 2200 0 0x5c -- 0,92 # "
-] 2200 0 0x5d -- 0,93 # bracketright
-rB 2200 0 0x5d -- 0,93 # "
-a^ 2200 0 0x5e -- 0,94 # circumflex
-^ 2200 0 0x5e -- 0,94 # "
-_ 2200 0 0x5f -- 0,95 # underscore
-` 2200 0 0x60 -- 0,96 # quoteleft
-oq 2200 0 0x60 -- 0,96 # "
-a 2200 0 0x61 -- 0,97 # a
-b 2200 0 0x62 -- 0,98 # b
-c 2200 0 0x63 -- 0,99 # c
-d 2200 0 0x64 -- 0,100 # d
-e 2200 0 0x65 -- 0,101 # e
-f 2200 0 0x66 -- 0,102 # f
-g 2200 0 0x67 -- 0,103 # g
-h 2200 0 0x68 -- 0,104 # h
-i 2200 0 0x69 -- 0,105 # i
-j 2200 0 0x6a -- 0,106 # j
-k 2200 0 0x6b -- 0,107 # k
-l 2200 0 0x6c -- 0,108 # l
-m 2200 0 0x6d -- 0,109 # m
-n 2200 0 0x6e -- 0,110 # n
-o 2200 0 0x6f -- 0,111 # o
-p 2200 0 0x70 -- 0,112 # p
-q 2200 0 0x71 -- 0,113 # q
-r 2200 0 0x72 -- 0,114 # r
-s 2200 0 0x73 -- 0,115 # s
-t 2200 0 0x74 -- 0,116 # t
-u 2200 0 0x75 -- 0,117 # u
-v 2200 0 0x76 -- 0,118 # v
-w 2200 0 0x77 -- 0,119 # w
-x 2200 0 0x78 -- 0,120 # x
-y 2200 0 0x79 -- 0,121 # y
-z 2200 0 0x7a -- 0,122 # z
-lC 2200 0 0x7b -- 0,123 # braceleft
-{ 2200 0 0x7b -- 0,123 # "
-| 2200 0 0x7c -- 0,124 # "
-rC 2200 0 0x7d -- 0,125 # braceright
-} 2200 0 0x7d -- 0,125 # "
-a~ 2200 0 0x7e -- 0,126 # tilde
-~ 2200 0 0x7e -- 0,126 # "
-char161 2200 0 0xad -- 4,7 # exclamdown
-char162 2200 0 0x9b -- 4,19 # cent
-char163 2200 0 0x9c -- 4,11 # sterling
-char165 2200 0 0x9d -- 4,12 # yen
-char166 2200 0 0x7c -- 0,124 # brokenbar
-char167 2200 0 0x15 -- 4,6 # section
-char170 2200 0 0xa6 -- 4,15 # ordfeminine
-char171 2200 0 0xae -- 4,9 # guillemotleft
-char172 2200 0 0xaa -- 6,20 # logicalnot
-char175 2200 0 0x2d -- 6,0 # macron
-char176 2200 0 0xf8 -- 6,36 # degree
-char177 2200 0 0xf1 -- 6,1 # plusminus
-char178 2200 0 0xfd -- 4,20 # twosuperior
-char181 2200 0 0xe6 -- 8,25 # mu
-char182 2200 0 0x14 -- 4,5 # paragraph
-char183 2200 0 0xfa -- 6,32 # periodcentered
-char186 2200 0 0xa7 -- 4,16 # ordmasculine
-char187 2200 0 0xaf -- 4,10 # guillemotright
-char188 2200 0 0xac -- 4,18 # onequarter
-char189 2200 0 0xab -- 4,17 # onehalf
-char191 2200 0 0xa8 -- 4,8 # questiondown
-char195 2200 0 0x28e -- 1,76 # Atilde
-char196 2200 0 0x8e -- 1,30 # Adieresis
-char197 2200 0 0x8f -- 1,34 # Aring
-char198 2200 0 0x92 -- 1,36 # AE
-char199 2200 0 0x80 -- 1,38 # Ccedilla
-char201 2200 0 0x90 -- 1,40 # Eacute
-char209 2200 0 0xa5 -- 1,56 # Ntilde
-char214 2200 0 0x99 -- 1,62 # Odieresis
-char220 2200 0 0x9a -- 1,70 # Udieresis
-char224 2200 0 0x85 -- 1,33 # agrave
-char225 2200 0 0xa0 -- 1,27 # aacute
-char226 2200 0 0x83 -- 1,29 # acircumflex
-char227 2200 0 0x284 -- 1,93 # atilde
-char228 2200 0 0x84 -- 1,31 # adieresis
-char229 2200 0 0x86 -- 1,35 # aring
-char230 2200 0 0x91 -- 1,37 # ae
-char231 2200 0 0x87 -- 1,39 # ccedilla
-char232 2200 0 0x8a -- 1,47 # egrave
-char233 2200 0 0x82 -- 1,41 # eacute
-char234 2200 0 0x88 -- 1,43 # ecircumflex
-char235 2200 0 0x89 -- 1,45 # edieresis
-char236 2200 0 0x8d -- 1,55 # igrave
-char237 2200 0 0xa1 -- 1,49 # iacute
-char238 2200 0 0x8c -- 1,51 # icircumflex
-char239 2200 0 0x8b -- 1,53 # idieresis
-char241 2200 0 0xa4 -- 1,57 # ntilde
-char242 2200 0 0x95 -- 1,65 # ograve
-char243 2200 0 0xa2 -- 1,59 # oacute
-char244 2200 0 0x93 -- 1,61 # ocircumflex
-char246 2200 0 0x94 -- 1,63 # odieresis
-char247 2200 0 0xf6 -- 6,8 # divide
-char249 2200 0 0x97 -- 1,73 # ugrave
-char250 2200 0 0xa3 -- 1,67 # uacute
-char251 2200 0 0x96 -- 1,69 # ucircumflex
-char252 2200 0 0x81 -- 1,71 # udieresis
-char255 2200 0 0x98 -- 1,75 # ydieresis
-AE 2200 0 0x92 -- 1,36 # AE
-ae 2200 0 0x91 -- 1,37 # ae
-'E 2200 0 0x90 -- 1,40 # Eacute
-'a 2200 0 0xa0 -- 1,27 # aacute
-'e 2200 0 0x82 -- 1,41 # eacute
-'i 2200 0 0xa1 -- 1,49 # iacute
-'o 2200 0 0xa2 -- 1,59 # oacute
-'u 2200 0 0x95 -- 1,65 # uacute
-:A 2200 0 0x8e -- 1,30 # Adieresis
-:O 2200 0 0x99 -- 1,62 # Odieresis
-:U 2200 0 0x9a -- 1,70 # Udieresis
-:a 2200 0 0x84 -- 1,31 # adieresis
-:e 2200 0 0x89 -- 1,45 # edieresis
-:i 2200 0 0x8b -- 1,53 # idieresis
-:o 2200 0 0x94 -- 1,63 # odieresis
-:u 2200 0 0x81 -- 1,71 # udieresis
-:y 2200 0 0x98 -- 1,75 # ydieresis
-^a 2200 0 0x83 -- 1,29 # acircumflex
-^e 2200 0 0x88 -- 1,43 # ecircumflex
-^i 2200 0 0x8c -- 1,51 # icircumflex
-^o 2200 0 0x93 -- 1,61 # ocircumflex
-^u 2200 0 0x96 -- 1,69 # ucircumflex
-`a 2200 0 0x85 -- 1,33 # agrave
-`e 2200 0 0x8a -- 1,47 # egrave
-`i 2200 0 0x8d -- 1,55 # igrave
-`o 2200 0 0x95 -- 1,65 # ograve
-`u 2200 0 0x97 -- 1,73 # ugrave
-~A 2200 0 0x28e -- 1,26 # Atilde
-~N 2200 0 0xa5 -- 1,56 # Ntilde
-~a 2200 0 0x284 -- --- # atilde
-~n 2200 0 0xa4 -- 1,57 # ntilde
-,C 2200 0 0x80 -- 1,38 # Ccedilla
-,c 2200 0 0x87 -- 1,39 # ccedilla
-oA 2200 0 0x8f -- 1,34 # Aring
-oa 2200 0 0x86 -- 1,35 # aring
-a^ 2200 0 0x5e -- 1,3 # circumflex "circumflex accent"
-a~ 2200 0 0x7e -- 1,2 # tilde "tilde accent"
-Do 2200 0 0x24 -- 0,36 # dollar
-Po 2200 0 0x9c -- 4,11 # sterling
-Ye 2200 0 0x9d -- 4,12 # yen
-Fn 2200 0 0x9f -- 4,14 # florin
-ct 2200 0 0x9b -- 4,19 # cent
-Fo 2200 0 0xae -- 4,9 # guillemotleft
-r! 2200 0 0xad -- 4,7 # exclamdown
-r? 2200 0 0xa8 -- 4,8 # questiondown
-Of 2200 0 0xa6 -- 4,15 # ordfeminine
-Om 2200 0 0xa7 -- 4,16 # ordmasculine
-S2 2200 0 0xfd -- 4,20 # twosuperior
-<- 2200 0 0x1b -- 6,22 # arrowleft
--> 2200 0 0x1a -- 6,21 # arrowright
-<> 2200 0 0x1d -- 6,25 # arrowboth "horizontal double-headed arrow"
-da 2200 0 0x19 -- 6,24 # arrowdown
-ua 2200 0 0x18 -- 6,23 # arrowup
-va 2200 0 0x12 -- 6,26 # \& "vertical double-headed arrow"
-ba 2200 0 0xb3 -- 3,9 # bar
-bb 2200 0 0x7c -- 0,124 # brokenbar
-ul 2200 0 0x5f -- 0,95 # ul "underline with traditional troff metrics"
-ci 2200 0 0x9 -- 4,1 # circle
-bu 2200 0 0x7 -- 4,0 # bullet
-ps 2200 0 0x14 -- 4,5 # paragraph
-sc 2200 0 0x15 -- 4,6 # section
-de 2200 0 0xf8 -- 6,36 # degree
-12 2200 0 0xab -- 4,17 # onehalf
-14 2200 0 0xac -- 4,18 # onequarter
-hy 2200 0 0x2d -- 6,0 # hyphen
-lB 2200 0 0x5b -- 0,91 # bracketleft
-rB 2200 0 0x5d -- 0,93 # bracketright
-lC 2200 0 0x7b -- 0,123 # braceleft
-rC 2200 0 0x7d -- 0,125 # braceright
-aq 2200 0 0x27 -- 0,39 # quotesingle "apostrophe quote"
-at 2200 0 0x40 -- 0,64 # at
-.C1 2200 0 0x2d -- 0,45 # - minus "minus sign from current font"
-sh 2200 0 0x23 -- 0,35 # numbersign
-sl 2200 0 0x2f -- 0,47 # slash
-rs 2200 0 0x5c -- 0,92 # backslash
-*a 2200 0 0xe0 -- 8,1 # alpha
-*b 2200 0 0xe1 -- 8,3 # beta
-*d 2200 0 0xeb -- 8,9 # delta
-*h 2200 0 0xe9 -- 8,17 # theta
-*m 2200 0 0xe6 -- 8,25 # mu
-*p 2200 0 0xe3 -- 8,33 # pi
-*s 2200 0 0xe5 -- 8,37 # sigma
-*t 2200 0 0xe7 -- 8,41 # tau
-~~ 2200 0 0xf7 -- 6,13 # approxequal
-~= 2200 0 0xf7 -- 6,13 # approxequal
-+- 2200 0 0xf1 -- 6,1 # plusminus
-<= 2200 0 0xf3 -- 6,2 # lessequal
-ca 2200 0 0xef -- 6,16 # intersection "intersection, cap"
--h 2200 0 0xc4 -- 3,8 # hbar
-CL 2200 0 0x5 -- 5,168 # club "club suit"
-SP 2200 0 0x6 -- 5,171 # spade "spade suit"
-HE 2200 0 0x3 -- 5,170 # heart "heart suit"
-DI 2200 0 0x4 -- 5,169 # diamond "diamond suit"
-<< 2200 0 0xae -- 6,77 # "" "much less"
->> 2200 0 0xaf -- 6,78 # "" "much greater"
-pc 2200 0 0xfa -- 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/DESC.in b/contrib/groff/font/devlbp/DESC.in
deleted file mode 100644
index eb5d6f24ed0e..000000000000
--- a/contrib/groff/font/devlbp/DESC.in
+++ /dev/null
@@ -1,9 +0,0 @@
-res 300
-unitwidth 800
-family T
-styles R I B BI
-sizes 1-1000 0
-fonts 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-tcommand
-orientation portrait
-postpro grolbp
diff --git a/contrib/groff/font/devlbp/EB b/contrib/groff/font/devlbp/EB
deleted file mode 100644
index 50c6f71f56c9..000000000000
--- a/contrib/groff/font/devlbp/EB
+++ /dev/null
@@ -1,272 +0,0 @@
-
-name EB
-lbpname NeliteB
-spacewidth 1900
-slant 0
-charset
-aq 1900 0 0x27 -- 0,39 # quotesingle
-space 1900 0 0x20 -- 0,32
-! 1900 0 0x21 -- 0,33 # exclam
-" 1900 0 0x22 -- 0,34 # quotedbl
-dq 1900 0 0x22 -- 0,34 # quotedbl
-# 1900 0 0x23 -- 0,35 # numbersign
-sh 1900 0 0x23 -- 0,35 # "
-$ 1900 0 0x24 -- 0,36 # dollar
-Do 1900 0 0x24 -- 0,36 # "
-% 1900 0 0x25 -- 0,37 # percent
-& 1900 0 0x26 -- 0,38 # ampersand
-' 1900 0 0x27 -- 0,39 # quoteright
-cq 1900 0 0x27 -- 0,39 # quoteright
-( 1900 0 0x28 -- 0,40 # parenleft
-) 1900 0 0x29 -- 0,41 # parenright
-* 1900 0 0x2a -- 0,42 # asterisk
-+ 1900 0 0x2b -- 0,43 # plus
-, 1900 0 0x2c -- 0,44 # comma
-- 1900 0 0x2d -- 0,45 # hyphen
-\- 1900 0 0x2d -- 0,45 # hyphen
-hy 1900 0 0x2d -- 0,45 # "
-char173 1900 0 0x2d -- 0,45 # "
-. 1900 0 0x2e -- 0,46 # period
-/ 1900 0 0x2f -- 0,47 # slash
-sl 1900 0 0x2f -- 0,47 # "
-0 1900 0 0x30 -- 0,48 # zero
-1 1900 0 0x31 -- 0,49 # one
-2 1900 0 0x32 -- 0,50 # two
-3 1900 0 0x33 -- 0,51 # three
-4 1900 0 0x34 -- 0,52 # four
-5 1900 0 0x35 -- 0,53 # five
-6 1900 0 0x36 -- 0,54 # six
-7 1900 0 0x37 -- 0,55 # seven
-8 1900 0 0x38 -- 0,56 # eight
-9 1900 0 0x39 -- 0,57 # nine
-: 1900 0 0x3a -- 0,58 # colon
-; 1900 0 0x3b -- 0,59 # semicolon
-< 1900 0 0x3c -- 0,60 # less
-= 1900 0 0x3d -- 0,61 # equal
-> 1900 0 0x3e -- 0,62 # greater
-? 1900 0 0x3f -- 0,63 # question
-@ 1900 0 0x40 -- 0,64 # at
-at 1900 0 0x40 -- 0,64 # "
-A 1900 0 0x41 -- 0,65 # A
-B 1900 0 0x42 -- 0,66 # B
-C 1900 0 0x43 -- 0,67 # C
-D 1900 0 0x44 -- 0,68 # D
-E 1900 0 0x45 -- 0,69 # E
-F 1900 0 0x46 -- 0,70 # F
-G 1900 0 0x47 -- 0,71 # G
-H 1900 0 0x48 -- 0,72 # H
-I 1900 0 0x49 -- 0,73 # I
-J 1900 0 0x4a -- 0,74 # J
-K 1900 0 0x4b -- 0,75 # K
-L 1900 0 0x4c -- 0,76 # L
-M 1900 0 0x4d -- 0,77 # M
-N 1900 0 0x4e -- 0,78 # N
-O 1900 0 0x4f -- 0,79 # O
-P 1900 0 0x50 -- 0,80 # P
-Q 1900 0 0x51 -- 0,81 # Q
-R 1900 0 0x52 -- 0,82 # R
-S 1900 0 0x53 -- 0,83 # S
-T 1900 0 0x54 -- 0,84 # T
-U 1900 0 0x55 -- 0,85 # U
-V 1900 0 0x56 -- 0,86 # V
-W 1900 0 0x57 -- 0,87 # W
-X 1900 0 0x58 -- 0,88 # X
-Y 1900 0 0x59 -- 0,89 # Y
-Z 1900 0 0x5a -- 0,90 # Z
-[ 1900 0 0x5b -- 0,91 # bracketleft
-lB 1900 0 0x5b -- 0,91 # "
-\ 1900 0 0x5c -- 0,92 # backslash
-rs 1900 0 0x5c -- 0,92 # "
-] 1900 0 0x5d -- 0,93 # bracketright
-rB 1900 0 0x5d -- 0,93 # "
-a^ 1900 0 0x5e -- 0,94 # circumflex
-^ 1900 0 0x5e -- 0,94 # "
-_ 1900 0 0x5f -- 0,95 # underscore
-` 1900 0 0x60 -- 0,96 # quoteleft
-oq 1900 0 0x60 -- 0,96 # "
-a 1900 0 0x61 -- 0,97 # a
-b 1900 0 0x62 -- 0,98 # b
-c 1900 0 0x63 -- 0,99 # c
-d 1900 0 0x64 -- 0,100 # d
-e 1900 0 0x65 -- 0,101 # e
-f 1900 0 0x66 -- 0,102 # f
-g 1900 0 0x67 -- 0,103 # g
-h 1900 0 0x68 -- 0,104 # h
-i 1900 0 0x69 -- 0,105 # i
-j 1900 0 0x6a -- 0,106 # j
-k 1900 0 0x6b -- 0,107 # k
-l 1900 0 0x6c -- 0,108 # l
-m 1900 0 0x6d -- 0,109 # m
-n 1900 0 0x6e -- 0,110 # n
-o 1900 0 0x6f -- 0,111 # o
-p 1900 0 0x70 -- 0,112 # p
-q 1900 0 0x71 -- 0,113 # q
-r 1900 0 0x72 -- 0,114 # r
-s 1900 0 0x73 -- 0,115 # s
-t 1900 0 0x74 -- 0,116 # t
-u 1900 0 0x75 -- 0,117 # u
-v 1900 0 0x76 -- 0,118 # v
-w 1900 0 0x77 -- 0,119 # w
-x 1900 0 0x78 -- 0,120 # x
-y 1900 0 0x79 -- 0,121 # y
-z 1900 0 0x7a -- 0,122 # z
-lC 1900 0 0x7b -- 0,123 # braceleft
-{ 1900 0 0x7b -- 0,123 # "
-| 1900 0 0x7c -- 0,124 # "
-rC 1900 0 0x7d -- 0,125 # braceright
-} 1900 0 0x7d -- 0,125 # "
-a~ 1900 0 0x7e -- 0,126 # tilde
-~ 1900 0 0x7e -- 0,126 # "
-char161 1900 0 0xad -- 4,7 # exclamdown
-char162 1900 0 0x9b -- 4,19 # cent
-char163 1900 0 0x9c -- 4,11 # sterling
-char165 1900 0 0x9d -- 4,12 # yen
-char166 1900 0 0x7c -- 0,124 # brokenbar
-char167 1900 0 0x15 -- 4,6 # section
-char170 1900 0 0xa6 -- 4,15 # ordfeminine
-char171 1900 0 0xae -- 4,9 # guillemotleft
-char172 1900 0 0xaa -- 6,20 # logicalnot
-char175 1900 0 0x2d -- 6,0 # macron
-char176 1900 0 0xf8 -- 6,36 # degree
-char177 1900 0 0xf1 -- 6,1 # plusminus
-char178 1900 0 0xfd -- 4,20 # twosuperior
-char181 1900 0 0xe6 -- 8,25 # mu
-char182 1900 0 0x14 -- 4,5 # paragraph
-char183 1900 0 0xfa -- 6,32 # periodcentered
-char186 1900 0 0xa7 -- 4,16 # ordmasculine
-char187 1900 0 0xaf -- 4,10 # guillemotright
-char188 1900 0 0xac -- 4,18 # onequarter
-char189 1900 0 0xab -- 4,17 # onehalf
-char191 1900 0 0xa8 -- 4,8 # questiondown
-char195 1900 0 0x28e -- 1,76 # Atilde
-char196 1900 0 0x8e -- 1,30 # Adieresis
-char197 1900 0 0x8f -- 1,34 # Aring
-char198 1900 0 0x92 -- 1,36 # AE
-char199 1900 0 0x80 -- 1,38 # Ccedilla
-char201 1900 0 0x90 -- 1,40 # Eacute
-char209 1900 0 0xa5 -- 1,56 # Ntilde
-char214 1900 0 0x99 -- 1,62 # Odieresis
-char220 1900 0 0x9a -- 1,70 # Udieresis
-char224 1900 0 0x85 -- 1,33 # agrave
-char225 1900 0 0xa0 -- 1,27 # aacute
-char226 1900 0 0x83 -- 1,29 # acircumflex
-char227 1900 0 0x284 -- 1,93 # atilde
-char228 1900 0 0x84 -- 1,31 # adieresis
-char229 1900 0 0x86 -- 1,35 # aring
-char230 1900 0 0x91 -- 1,37 # ae
-char231 1900 0 0x87 -- 1,39 # ccedilla
-char232 1900 0 0x8a -- 1,47 # egrave
-char233 1900 0 0x82 -- 1,41 # eacute
-char234 1900 0 0x88 -- 1,43 # ecircumflex
-char235 1900 0 0x89 -- 1,45 # edieresis
-char236 1900 0 0x8d -- 1,55 # igrave
-char237 1900 0 0xa1 -- 1,49 # iacute
-char238 1900 0 0x8c -- 1,51 # icircumflex
-char239 1900 0 0x8b -- 1,53 # idieresis
-char241 1900 0 0xa4 -- 1,57 # ntilde
-char242 1900 0 0x95 -- 1,65 # ograve
-char243 1900 0 0xa2 -- 1,59 # oacute
-char244 1900 0 0x93 -- 1,61 # ocircumflex
-char246 1900 0 0x94 -- 1,63 # odieresis
-char247 1900 0 0xf6 -- 6,8 # divide
-char249 1900 0 0x97 -- 1,73 # ugrave
-char250 1900 0 0xa3 -- 1,67 # uacute
-char251 1900 0 0x96 -- 1,69 # ucircumflex
-char252 1900 0 0x81 -- 1,71 # udieresis
-char255 1900 0 0x98 -- 1,75 # ydieresis
-AE 1900 0 0x92 -- 1,36 # AE
-ae 1900 0 0x91 -- 1,37 # ae
-'E 1900 0 0x90 -- 1,40 # Eacute
-'a 1900 0 0xa0 -- 1,27 # aacute
-'e 1900 0 0x82 -- 1,41 # eacute
-'i 1900 0 0xa1 -- 1,49 # iacute
-'o 1900 0 0xa2 -- 1,59 # oacute
-'u 1900 0 0x95 -- 1,65 # uacute
-:A 1900 0 0x8e -- 1,30 # Adieresis
-:O 1900 0 0x99 -- 1,62 # Odieresis
-:U 1900 0 0x9a -- 1,70 # Udieresis
-:a 1900 0 0x84 -- 1,31 # adieresis
-:e 1900 0 0x89 -- 1,45 # edieresis
-:i 1900 0 0x8b -- 1,53 # idieresis
-:o 1900 0 0x94 -- 1,63 # odieresis
-:u 1900 0 0x81 -- 1,71 # udieresis
-:y 1900 0 0x98 -- 1,75 # ydieresis
-^a 1900 0 0x83 -- 1,29 # acircumflex
-^e 1900 0 0x88 -- 1,43 # ecircumflex
-^i 1900 0 0x8c -- 1,51 # icircumflex
-^o 1900 0 0x93 -- 1,61 # ocircumflex
-^u 1900 0 0x96 -- 1,69 # ucircumflex
-`a 1900 0 0x85 -- 1,33 # agrave
-`e 1900 0 0x8a -- 1,47 # egrave
-`i 1900 0 0x8d -- 1,55 # igrave
-`o 1900 0 0x95 -- 1,65 # ograve
-`u 1900 0 0x97 -- 1,73 # ugrave
-~A 1900 0 0x28e -- 1,26 # Atilde
-~N 1900 0 0xa5 -- 1,56 # Ntilde
-~a 1900 0 0x284 -- --- # atilde
-~n 1900 0 0xa4 -- 1,57 # ntilde
-,C 1900 0 0x80 -- 1,38 # Ccedilla
-,c 1900 0 0x87 -- 1,39 # ccedilla
-oA 1900 0 0x8f -- 1,34 # Aring
-oa 1900 0 0x86 -- 1,35 # aring
-a^ 1900 0 0x5e -- 1,3 # circumflex "circumflex accent"
-a~ 1900 0 0x7e -- 1,2 # tilde "tilde accent"
-Do 1900 0 0x24 -- 0,36 # dollar
-Po 1900 0 0x9c -- 4,11 # sterling
-Ye 1900 0 0x9d -- 4,12 # yen
-Fn 1900 0 0x9f -- 4,14 # florin
-ct 1900 0 0x9b -- 4,19 # cent
-Fo 1900 0 0xae -- 4,9 # guillemotleft
-r! 1900 0 0xad -- 4,7 # exclamdown
-r? 1900 0 0xa8 -- 4,8 # questiondown
-Of 1900 0 0xa6 -- 4,15 # ordfeminine
-Om 1900 0 0xa7 -- 4,16 # ordmasculine
-S2 1900 0 0xfd -- 4,20 # twosuperior
-<- 1900 0 0x1b -- 6,22 # arrowleft
--> 1900 0 0x1a -- 6,21 # arrowright
-<> 1900 0 0x1d -- 6,25 # arrowboth "horizontal double-headed arrow"
-da 1900 0 0x19 -- 6,24 # arrowdown
-ua 1900 0 0x18 -- 6,23 # arrowup
-va 1900 0 0x12 -- 6,26 # \& "vertical double-headed arrow"
-ba 1900 0 0xb3 -- 3,9 # bar
-bb 1900 0 0x7c -- 0,124 # brokenbar
-ul 1900 0 0x5f -- 0,95 # ul "underline with traditional troff metrics"
-ci 1900 0 0x9 -- 4,1 # circle
-bu 1900 0 0x7 -- 4,0 # bullet
-ps 1900 0 0x14 -- 4,5 # paragraph
-sc 1900 0 0x15 -- 4,6 # section
-de 1900 0 0xf8 -- 6,36 # degree
-12 1900 0 0xab -- 4,17 # onehalf
-14 1900 0 0xac -- 4,18 # onequarter
-hy 1900 0 0x2d -- 6,0 # hyphen
-lB 1900 0 0x5b -- 0,91 # bracketleft
-rB 1900 0 0x5d -- 0,93 # bracketright
-lC 1900 0 0x7b -- 0,123 # braceleft
-rC 1900 0 0x7d -- 0,125 # braceright
-aq 1900 0 0x27 -- 0,39 # quotesingle "apostrophe quote"
-at 1900 0 0x40 -- 0,64 # at
-.C1 1900 0 0x2d -- 0,45 # - minus "minus sign from current font"
-sh 1900 0 0x23 -- 0,35 # numbersign
-sl 1900 0 0x2f -- 0,47 # slash
-rs 1900 0 0x5c -- 0,92 # backslash
-*a 1900 0 0xe0 -- 8,1 # alpha
-*b 1900 0 0xe1 -- 8,3 # beta
-*d 1900 0 0xeb -- 8,9 # delta
-*h 1900 0 0xe9 -- 8,17 # theta
-*m 1900 0 0xe6 -- 8,25 # mu
-*p 1900 0 0xe3 -- 8,33 # pi
-*s 1900 0 0xe5 -- 8,37 # sigma
-*t 1900 0 0xe7 -- 8,41 # tau
-~~ 1900 0 0xf7 -- 6,13 # approxequal
-~= 1900 0 0xf7 -- 6,13 # approxequal
-+- 1900 0 0xf1 -- 6,1 # plusminus
-<= 1900 0 0xf3 -- 6,2 # lessequal
-ca 1900 0 0xef -- 6,16 # intersection "intersection, cap"
--h 1900 0 0xc4 -- 3,8 # hbar
-CL 1900 0 0x5 -- 5,168 # club "club suit"
-SP 1900 0 0x6 -- 5,171 # spade "spade suit"
-HE 1900 0 0x3 -- 5,170 # heart "heart suit"
-DI 1900 0 0x4 -- 5,169 # diamond "diamond suit"
-<< 1900 0 0xae -- 6,77 # "" "much less"
->> 1900 0 0xaf -- 6,78 # "" "much greater"
-pc 1900 0 0xfa -- 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/EI b/contrib/groff/font/devlbp/EI
deleted file mode 100644
index 364cea69a787..000000000000
--- a/contrib/groff/font/devlbp/EI
+++ /dev/null
@@ -1,272 +0,0 @@
-
-name EI
-lbpname NeliteI
-spacewidth 1900
-slant 0
-charset
-aq 1900 0 0x27 -- 0,39 # quotesingle
-space 1900 0 0x20 -- 0,32
-! 1900 0 0x21 -- 0,33 # exclam
-" 1900 0 0x22 -- 0,34 # quotedbl
-dq 1900 0 0x22 -- 0,34 # quotedbl
-# 1900 0 0x23 -- 0,35 # numbersign
-sh 1900 0 0x23 -- 0,35 # "
-$ 1900 0 0x24 -- 0,36 # dollar
-Do 1900 0 0x24 -- 0,36 # "
-% 1900 0 0x25 -- 0,37 # percent
-& 1900 0 0x26 -- 0,38 # ampersand
-' 1900 0 0x27 -- 0,39 # quoteright
-cq 1900 0 0x27 -- 0,39 # quoteright
-( 1900 0 0x28 -- 0,40 # parenleft
-) 1900 0 0x29 -- 0,41 # parenright
-* 1900 0 0x2a -- 0,42 # asterisk
-+ 1900 0 0x2b -- 0,43 # plus
-, 1900 0 0x2c -- 0,44 # comma
-- 1900 0 0x2d -- 0,45 # hyphen
-\- 1900 0 0x2d -- 0,45 # hyphen
-hy 1900 0 0x2d -- 0,45 # "
-char173 1900 0 0x2d -- 0,45 # "
-. 1900 0 0x2e -- 0,46 # period
-/ 1900 0 0x2f -- 0,47 # slash
-sl 1900 0 0x2f -- 0,47 # "
-0 1900 0 0x30 -- 0,48 # zero
-1 1900 0 0x31 -- 0,49 # one
-2 1900 0 0x32 -- 0,50 # two
-3 1900 0 0x33 -- 0,51 # three
-4 1900 0 0x34 -- 0,52 # four
-5 1900 0 0x35 -- 0,53 # five
-6 1900 0 0x36 -- 0,54 # six
-7 1900 0 0x37 -- 0,55 # seven
-8 1900 0 0x38 -- 0,56 # eight
-9 1900 0 0x39 -- 0,57 # nine
-: 1900 0 0x3a -- 0,58 # colon
-; 1900 0 0x3b -- 0,59 # semicolon
-< 1900 0 0x3c -- 0,60 # less
-= 1900 0 0x3d -- 0,61 # equal
-> 1900 0 0x3e -- 0,62 # greater
-? 1900 0 0x3f -- 0,63 # question
-@ 1900 0 0x40 -- 0,64 # at
-at 1900 0 0x40 -- 0,64 # "
-A 1900 0 0x41 -- 0,65 # A
-B 1900 0 0x42 -- 0,66 # B
-C 1900 0 0x43 -- 0,67 # C
-D 1900 0 0x44 -- 0,68 # D
-E 1900 0 0x45 -- 0,69 # E
-F 1900 0 0x46 -- 0,70 # F
-G 1900 0 0x47 -- 0,71 # G
-H 1900 0 0x48 -- 0,72 # H
-I 1900 0 0x49 -- 0,73 # I
-J 1900 0 0x4a -- 0,74 # J
-K 1900 0 0x4b -- 0,75 # K
-L 1900 0 0x4c -- 0,76 # L
-M 1900 0 0x4d -- 0,77 # M
-N 1900 0 0x4e -- 0,78 # N
-O 1900 0 0x4f -- 0,79 # O
-P 1900 0 0x50 -- 0,80 # P
-Q 1900 0 0x51 -- 0,81 # Q
-R 1900 0 0x52 -- 0,82 # R
-S 1900 0 0x53 -- 0,83 # S
-T 1900 0 0x54 -- 0,84 # T
-U 1900 0 0x55 -- 0,85 # U
-V 1900 0 0x56 -- 0,86 # V
-W 1900 0 0x57 -- 0,87 # W
-X 1900 0 0x58 -- 0,88 # X
-Y 1900 0 0x59 -- 0,89 # Y
-Z 1900 0 0x5a -- 0,90 # Z
-[ 1900 0 0x5b -- 0,91 # bracketleft
-lB 1900 0 0x5b -- 0,91 # "
-\ 1900 0 0x5c -- 0,92 # backslash
-rs 1900 0 0x5c -- 0,92 # "
-] 1900 0 0x5d -- 0,93 # bracketright
-rB 1900 0 0x5d -- 0,93 # "
-a^ 1900 0 0x5e -- 0,94 # circumflex
-^ 1900 0 0x5e -- 0,94 # "
-_ 1900 0 0x5f -- 0,95 # underscore
-` 1900 0 0x60 -- 0,96 # quoteleft
-oq 1900 0 0x60 -- 0,96 # "
-a 1900 0 0x61 -- 0,97 # a
-b 1900 0 0x62 -- 0,98 # b
-c 1900 0 0x63 -- 0,99 # c
-d 1900 0 0x64 -- 0,100 # d
-e 1900 0 0x65 -- 0,101 # e
-f 1900 0 0x66 -- 0,102 # f
-g 1900 0 0x67 -- 0,103 # g
-h 1900 0 0x68 -- 0,104 # h
-i 1900 0 0x69 -- 0,105 # i
-j 1900 0 0x6a -- 0,106 # j
-k 1900 0 0x6b -- 0,107 # k
-l 1900 0 0x6c -- 0,108 # l
-m 1900 0 0x6d -- 0,109 # m
-n 1900 0 0x6e -- 0,110 # n
-o 1900 0 0x6f -- 0,111 # o
-p 1900 0 0x70 -- 0,112 # p
-q 1900 0 0x71 -- 0,113 # q
-r 1900 0 0x72 -- 0,114 # r
-s 1900 0 0x73 -- 0,115 # s
-t 1900 0 0x74 -- 0,116 # t
-u 1900 0 0x75 -- 0,117 # u
-v 1900 0 0x76 -- 0,118 # v
-w 1900 0 0x77 -- 0,119 # w
-x 1900 0 0x78 -- 0,120 # x
-y 1900 0 0x79 -- 0,121 # y
-z 1900 0 0x7a -- 0,122 # z
-lC 1900 0 0x7b -- 0,123 # braceleft
-{ 1900 0 0x7b -- 0,123 # "
-| 1900 0 0x7c -- 0,124 # "
-rC 1900 0 0x7d -- 0,125 # braceright
-} 1900 0 0x7d -- 0,125 # "
-a~ 1900 0 0x7e -- 0,126 # tilde
-~ 1900 0 0x7e -- 0,126 # "
-char161 1900 0 0xad -- 4,7 # exclamdown
-char162 1900 0 0x9b -- 4,19 # cent
-char163 1900 0 0x9c -- 4,11 # sterling
-char165 1900 0 0x9d -- 4,12 # yen
-char166 1900 0 0x7c -- 0,124 # brokenbar
-char167 1900 0 0x15 -- 4,6 # section
-char170 1900 0 0xa6 -- 4,15 # ordfeminine
-char171 1900 0 0xae -- 4,9 # guillemotleft
-char172 1900 0 0xaa -- 6,20 # logicalnot
-char175 1900 0 0x2d -- 6,0 # macron
-char176 1900 0 0xf8 -- 6,36 # degree
-char177 1900 0 0xf1 -- 6,1 # plusminus
-char178 1900 0 0xfd -- 4,20 # twosuperior
-char181 1900 0 0xe6 -- 8,25 # mu
-char182 1900 0 0x14 -- 4,5 # paragraph
-char183 1900 0 0xfa -- 6,32 # periodcentered
-char186 1900 0 0xa7 -- 4,16 # ordmasculine
-char187 1900 0 0xaf -- 4,10 # guillemotright
-char188 1900 0 0xac -- 4,18 # onequarter
-char189 1900 0 0xab -- 4,17 # onehalf
-char191 1900 0 0xa8 -- 4,8 # questiondown
-char195 1900 0 0x28e -- 1,76 # Atilde
-char196 1900 0 0x8e -- 1,30 # Adieresis
-char197 1900 0 0x8f -- 1,34 # Aring
-char198 1900 0 0x92 -- 1,36 # AE
-char199 1900 0 0x80 -- 1,38 # Ccedilla
-char201 1900 0 0x90 -- 1,40 # Eacute
-char209 1900 0 0xa5 -- 1,56 # Ntilde
-char214 1900 0 0x99 -- 1,62 # Odieresis
-char220 1900 0 0x9a -- 1,70 # Udieresis
-char224 1900 0 0x85 -- 1,33 # agrave
-char225 1900 0 0xa0 -- 1,27 # aacute
-char226 1900 0 0x83 -- 1,29 # acircumflex
-char227 1900 0 0x284 -- 1,93 # atilde
-char228 1900 0 0x84 -- 1,31 # adieresis
-char229 1900 0 0x86 -- 1,35 # aring
-char230 1900 0 0x91 -- 1,37 # ae
-char231 1900 0 0x87 -- 1,39 # ccedilla
-char232 1900 0 0x8a -- 1,47 # egrave
-char233 1900 0 0x82 -- 1,41 # eacute
-char234 1900 0 0x88 -- 1,43 # ecircumflex
-char235 1900 0 0x89 -- 1,45 # edieresis
-char236 1900 0 0x8d -- 1,55 # igrave
-char237 1900 0 0xa1 -- 1,49 # iacute
-char238 1900 0 0x8c -- 1,51 # icircumflex
-char239 1900 0 0x8b -- 1,53 # idieresis
-char241 1900 0 0xa4 -- 1,57 # ntilde
-char242 1900 0 0x95 -- 1,65 # ograve
-char243 1900 0 0xa2 -- 1,59 # oacute
-char244 1900 0 0x93 -- 1,61 # ocircumflex
-char246 1900 0 0x94 -- 1,63 # odieresis
-char247 1900 0 0xf6 -- 6,8 # divide
-char249 1900 0 0x97 -- 1,73 # ugrave
-char250 1900 0 0xa3 -- 1,67 # uacute
-char251 1900 0 0x96 -- 1,69 # ucircumflex
-char252 1900 0 0x81 -- 1,71 # udieresis
-char255 1900 0 0x98 -- 1,75 # ydieresis
-AE 1900 0 0x92 -- 1,36 # AE
-ae 1900 0 0x91 -- 1,37 # ae
-'E 1900 0 0x90 -- 1,40 # Eacute
-'a 1900 0 0xa0 -- 1,27 # aacute
-'e 1900 0 0x82 -- 1,41 # eacute
-'i 1900 0 0xa1 -- 1,49 # iacute
-'o 1900 0 0xa2 -- 1,59 # oacute
-'u 1900 0 0x95 -- 1,65 # uacute
-:A 1900 0 0x8e -- 1,30 # Adieresis
-:O 1900 0 0x99 -- 1,62 # Odieresis
-:U 1900 0 0x9a -- 1,70 # Udieresis
-:a 1900 0 0x84 -- 1,31 # adieresis
-:e 1900 0 0x89 -- 1,45 # edieresis
-:i 1900 0 0x8b -- 1,53 # idieresis
-:o 1900 0 0x94 -- 1,63 # odieresis
-:u 1900 0 0x81 -- 1,71 # udieresis
-:y 1900 0 0x98 -- 1,75 # ydieresis
-^a 1900 0 0x83 -- 1,29 # acircumflex
-^e 1900 0 0x88 -- 1,43 # ecircumflex
-^i 1900 0 0x8c -- 1,51 # icircumflex
-^o 1900 0 0x93 -- 1,61 # ocircumflex
-^u 1900 0 0x96 -- 1,69 # ucircumflex
-`a 1900 0 0x85 -- 1,33 # agrave
-`e 1900 0 0x8a -- 1,47 # egrave
-`i 1900 0 0x8d -- 1,55 # igrave
-`o 1900 0 0x95 -- 1,65 # ograve
-`u 1900 0 0x97 -- 1,73 # ugrave
-~A 1900 0 0x28e -- 1,26 # Atilde
-~N 1900 0 0xa5 -- 1,56 # Ntilde
-~a 1900 0 0x284 -- --- # atilde
-~n 1900 0 0xa4 -- 1,57 # ntilde
-,C 1900 0 0x80 -- 1,38 # Ccedilla
-,c 1900 0 0x87 -- 1,39 # ccedilla
-oA 1900 0 0x8f -- 1,34 # Aring
-oa 1900 0 0x86 -- 1,35 # aring
-a^ 1900 0 0x5e -- 1,3 # circumflex "circumflex accent"
-a~ 1900 0 0x7e -- 1,2 # tilde "tilde accent"
-Do 1900 0 0x24 -- 0,36 # dollar
-Po 1900 0 0x9c -- 4,11 # sterling
-Ye 1900 0 0x9d -- 4,12 # yen
-Fn 1900 0 0x9f -- 4,14 # florin
-ct 1900 0 0x9b -- 4,19 # cent
-Fo 1900 0 0xae -- 4,9 # guillemotleft
-r! 1900 0 0xad -- 4,7 # exclamdown
-r? 1900 0 0xa8 -- 4,8 # questiondown
-Of 1900 0 0xa6 -- 4,15 # ordfeminine
-Om 1900 0 0xa7 -- 4,16 # ordmasculine
-S2 1900 0 0xfd -- 4,20 # twosuperior
-<- 1900 0 0x1b -- 6,22 # arrowleft
--> 1900 0 0x1a -- 6,21 # arrowright
-<> 1900 0 0x1d -- 6,25 # arrowboth "horizontal double-headed arrow"
-da 1900 0 0x19 -- 6,24 # arrowdown
-ua 1900 0 0x18 -- 6,23 # arrowup
-va 1900 0 0x12 -- 6,26 # \& "vertical double-headed arrow"
-ba 1900 0 0xb3 -- 3,9 # bar
-bb 1900 0 0x7c -- 0,124 # brokenbar
-ul 1900 0 0x5f -- 0,95 # ul "underline with traditional troff metrics"
-ci 1900 0 0x9 -- 4,1 # circle
-bu 1900 0 0x7 -- 4,0 # bullet
-ps 1900 0 0x14 -- 4,5 # paragraph
-sc 1900 0 0x15 -- 4,6 # section
-de 1900 0 0xf8 -- 6,36 # degree
-12 1900 0 0xab -- 4,17 # onehalf
-14 1900 0 0xac -- 4,18 # onequarter
-hy 1900 0 0x2d -- 6,0 # hyphen
-lB 1900 0 0x5b -- 0,91 # bracketleft
-rB 1900 0 0x5d -- 0,93 # bracketright
-lC 1900 0 0x7b -- 0,123 # braceleft
-rC 1900 0 0x7d -- 0,125 # braceright
-aq 1900 0 0x27 -- 0,39 # quotesingle "apostrophe quote"
-at 1900 0 0x40 -- 0,64 # at
-.C1 1900 0 0x2d -- 0,45 # - minus "minus sign from current font"
-sh 1900 0 0x23 -- 0,35 # numbersign
-sl 1900 0 0x2f -- 0,47 # slash
-rs 1900 0 0x5c -- 0,92 # backslash
-*a 1900 0 0xe0 -- 8,1 # alpha
-*b 1900 0 0xe1 -- 8,3 # beta
-*d 1900 0 0xeb -- 8,9 # delta
-*h 1900 0 0xe9 -- 8,17 # theta
-*m 1900 0 0xe6 -- 8,25 # mu
-*p 1900 0 0xe3 -- 8,33 # pi
-*s 1900 0 0xe5 -- 8,37 # sigma
-*t 1900 0 0xe7 -- 8,41 # tau
-~~ 1900 0 0xf7 -- 6,13 # approxequal
-~= 1900 0 0xf7 -- 6,13 # approxequal
-+- 1900 0 0xf1 -- 6,1 # plusminus
-<= 1900 0 0xf3 -- 6,2 # lessequal
-ca 1900 0 0xef -- 6,16 # intersection "intersection, cap"
--h 1900 0 0xc4 -- 3,8 # hbar
-CL 1900 0 0x5 -- 5,168 # club "club suit"
-SP 1900 0 0x6 -- 5,171 # spade "spade suit"
-HE 1900 0 0x3 -- 5,170 # heart "heart suit"
-DI 1900 0 0x4 -- 5,169 # diamond "diamond suit"
-<< 1900 0 0xae -- 6,77 # "" "much less"
->> 1900 0 0xaf -- 6,78 # "" "much greater"
-pc 1900 0 0xfa -- 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/ER b/contrib/groff/font/devlbp/ER
deleted file mode 100644
index f2734ccd0a97..000000000000
--- a/contrib/groff/font/devlbp/ER
+++ /dev/null
@@ -1,272 +0,0 @@
-
-name ER
-lbpname NeliteR
-spacewidth 1900
-slant 0
-charset
-aq 1900 0 0x27 -- 0,39 # quotesingle
-space 1900 0 0x20 -- 0,32
-! 1900 0 0x21 -- 0,33 # exclam
-" 1900 0 0x22 -- 0,34 # quotedbl
-dq 1900 0 0x22 -- 0,34 # quotedbl
-# 1900 0 0x23 -- 0,35 # numbersign
-sh 1900 0 0x23 -- 0,35 # "
-$ 1900 0 0x24 -- 0,36 # dollar
-Do 1900 0 0x24 -- 0,36 # "
-% 1900 0 0x25 -- 0,37 # percent
-& 1900 0 0x26 -- 0,38 # ampersand
-' 1900 0 0x27 -- 0,39 # quoteright
-cq 1900 0 0x27 -- 0,39 # quoteright
-( 1900 0 0x28 -- 0,40 # parenleft
-) 1900 0 0x29 -- 0,41 # parenright
-* 1900 0 0x2a -- 0,42 # asterisk
-+ 1900 0 0x2b -- 0,43 # plus
-, 1900 0 0x2c -- 0,44 # comma
-- 1900 0 0x2d -- 0,45 # hyphen
-\- 1900 0 0x2d -- 0,45 # hyphen
-hy 1900 0 0x2d -- 0,45 # "
-char173 1900 0 0x2d -- 0,45 # "
-. 1900 0 0x2e -- 0,46 # period
-/ 1900 0 0x2f -- 0,47 # slash
-sl 1900 0 0x2f -- 0,47 # "
-0 1900 0 0x30 -- 0,48 # zero
-1 1900 0 0x31 -- 0,49 # one
-2 1900 0 0x32 -- 0,50 # two
-3 1900 0 0x33 -- 0,51 # three
-4 1900 0 0x34 -- 0,52 # four
-5 1900 0 0x35 -- 0,53 # five
-6 1900 0 0x36 -- 0,54 # six
-7 1900 0 0x37 -- 0,55 # seven
-8 1900 0 0x38 -- 0,56 # eight
-9 1900 0 0x39 -- 0,57 # nine
-: 1900 0 0x3a -- 0,58 # colon
-; 1900 0 0x3b -- 0,59 # semicolon
-< 1900 0 0x3c -- 0,60 # less
-= 1900 0 0x3d -- 0,61 # equal
-> 1900 0 0x3e -- 0,62 # greater
-? 1900 0 0x3f -- 0,63 # question
-@ 1900 0 0x40 -- 0,64 # at
-at 1900 0 0x40 -- 0,64 # "
-A 1900 0 0x41 -- 0,65 # A
-B 1900 0 0x42 -- 0,66 # B
-C 1900 0 0x43 -- 0,67 # C
-D 1900 0 0x44 -- 0,68 # D
-E 1900 0 0x45 -- 0,69 # E
-F 1900 0 0x46 -- 0,70 # F
-G 1900 0 0x47 -- 0,71 # G
-H 1900 0 0x48 -- 0,72 # H
-I 1900 0 0x49 -- 0,73 # I
-J 1900 0 0x4a -- 0,74 # J
-K 1900 0 0x4b -- 0,75 # K
-L 1900 0 0x4c -- 0,76 # L
-M 1900 0 0x4d -- 0,77 # M
-N 1900 0 0x4e -- 0,78 # N
-O 1900 0 0x4f -- 0,79 # O
-P 1900 0 0x50 -- 0,80 # P
-Q 1900 0 0x51 -- 0,81 # Q
-R 1900 0 0x52 -- 0,82 # R
-S 1900 0 0x53 -- 0,83 # S
-T 1900 0 0x54 -- 0,84 # T
-U 1900 0 0x55 -- 0,85 # U
-V 1900 0 0x56 -- 0,86 # V
-W 1900 0 0x57 -- 0,87 # W
-X 1900 0 0x58 -- 0,88 # X
-Y 1900 0 0x59 -- 0,89 # Y
-Z 1900 0 0x5a -- 0,90 # Z
-[ 1900 0 0x5b -- 0,91 # bracketleft
-lB 1900 0 0x5b -- 0,91 # "
-\ 1900 0 0x5c -- 0,92 # backslash
-rs 1900 0 0x5c -- 0,92 # "
-] 1900 0 0x5d -- 0,93 # bracketright
-rB 1900 0 0x5d -- 0,93 # "
-a^ 1900 0 0x5e -- 0,94 # circumflex
-^ 1900 0 0x5e -- 0,94 # "
-_ 1900 0 0x5f -- 0,95 # underscore
-` 1900 0 0x60 -- 0,96 # quoteleft
-oq 1900 0 0x60 -- 0,96 # "
-a 1900 0 0x61 -- 0,97 # a
-b 1900 0 0x62 -- 0,98 # b
-c 1900 0 0x63 -- 0,99 # c
-d 1900 0 0x64 -- 0,100 # d
-e 1900 0 0x65 -- 0,101 # e
-f 1900 0 0x66 -- 0,102 # f
-g 1900 0 0x67 -- 0,103 # g
-h 1900 0 0x68 -- 0,104 # h
-i 1900 0 0x69 -- 0,105 # i
-j 1900 0 0x6a -- 0,106 # j
-k 1900 0 0x6b -- 0,107 # k
-l 1900 0 0x6c -- 0,108 # l
-m 1900 0 0x6d -- 0,109 # m
-n 1900 0 0x6e -- 0,110 # n
-o 1900 0 0x6f -- 0,111 # o
-p 1900 0 0x70 -- 0,112 # p
-q 1900 0 0x71 -- 0,113 # q
-r 1900 0 0x72 -- 0,114 # r
-s 1900 0 0x73 -- 0,115 # s
-t 1900 0 0x74 -- 0,116 # t
-u 1900 0 0x75 -- 0,117 # u
-v 1900 0 0x76 -- 0,118 # v
-w 1900 0 0x77 -- 0,119 # w
-x 1900 0 0x78 -- 0,120 # x
-y 1900 0 0x79 -- 0,121 # y
-z 1900 0 0x7a -- 0,122 # z
-lC 1900 0 0x7b -- 0,123 # braceleft
-{ 1900 0 0x7b -- 0,123 # "
-| 1900 0 0x7c -- 0,124 # "
-rC 1900 0 0x7d -- 0,125 # braceright
-} 1900 0 0x7d -- 0,125 # "
-a~ 1900 0 0x7e -- 0,126 # tilde
-~ 1900 0 0x7e -- 0,126 # "
-char161 1900 0 0xad -- 4,7 # exclamdown
-char162 1900 0 0x9b -- 4,19 # cent
-char163 1900 0 0x9c -- 4,11 # sterling
-char165 1900 0 0x9d -- 4,12 # yen
-char166 1900 0 0x7c -- 0,124 # brokenbar
-char167 1900 0 0x15 -- 4,6 # section
-char170 1900 0 0xa6 -- 4,15 # ordfeminine
-char171 1900 0 0xae -- 4,9 # guillemotleft
-char172 1900 0 0xaa -- 6,20 # logicalnot
-char175 1900 0 0x2d -- 6,0 # macron
-char176 1900 0 0xf8 -- 6,36 # degree
-char177 1900 0 0xf1 -- 6,1 # plusminus
-char178 1900 0 0xfd -- 4,20 # twosuperior
-char181 1900 0 0xe6 -- 8,25 # mu
-char182 1900 0 0x14 -- 4,5 # paragraph
-char183 1900 0 0xfa -- 6,32 # periodcentered
-char186 1900 0 0xa7 -- 4,16 # ordmasculine
-char187 1900 0 0xaf -- 4,10 # guillemotright
-char188 1900 0 0xac -- 4,18 # onequarter
-char189 1900 0 0xab -- 4,17 # onehalf
-char191 1900 0 0xa8 -- 4,8 # questiondown
-char195 1900 0 0x28e -- 1,76 # Atilde
-char196 1900 0 0x8e -- 1,30 # Adieresis
-char197 1900 0 0x8f -- 1,34 # Aring
-char198 1900 0 0x92 -- 1,36 # AE
-char199 1900 0 0x80 -- 1,38 # Ccedilla
-char201 1900 0 0x90 -- 1,40 # Eacute
-char209 1900 0 0xa5 -- 1,56 # Ntilde
-char214 1900 0 0x99 -- 1,62 # Odieresis
-char220 1900 0 0x9a -- 1,70 # Udieresis
-char224 1900 0 0x85 -- 1,33 # agrave
-char225 1900 0 0xa0 -- 1,27 # aacute
-char226 1900 0 0x83 -- 1,29 # acircumflex
-char227 1900 0 0x284 -- 1,93 # atilde
-char228 1900 0 0x84 -- 1,31 # adieresis
-char229 1900 0 0x86 -- 1,35 # aring
-char230 1900 0 0x91 -- 1,37 # ae
-char231 1900 0 0x87 -- 1,39 # ccedilla
-char232 1900 0 0x8a -- 1,47 # egrave
-char233 1900 0 0x82 -- 1,41 # eacute
-char234 1900 0 0x88 -- 1,43 # ecircumflex
-char235 1900 0 0x89 -- 1,45 # edieresis
-char236 1900 0 0x8d -- 1,55 # igrave
-char237 1900 0 0xa1 -- 1,49 # iacute
-char238 1900 0 0x8c -- 1,51 # icircumflex
-char239 1900 0 0x8b -- 1,53 # idieresis
-char241 1900 0 0xa4 -- 1,57 # ntilde
-char242 1900 0 0x95 -- 1,65 # ograve
-char243 1900 0 0xa2 -- 1,59 # oacute
-char244 1900 0 0x93 -- 1,61 # ocircumflex
-char246 1900 0 0x94 -- 1,63 # odieresis
-char247 1900 0 0xf6 -- 6,8 # divide
-char249 1900 0 0x97 -- 1,73 # ugrave
-char250 1900 0 0xa3 -- 1,67 # uacute
-char251 1900 0 0x96 -- 1,69 # ucircumflex
-char252 1900 0 0x81 -- 1,71 # udieresis
-char255 1900 0 0x98 -- 1,75 # ydieresis
-AE 1900 0 0x92 -- 1,36 # AE
-ae 1900 0 0x91 -- 1,37 # ae
-'E 1900 0 0x90 -- 1,40 # Eacute
-'a 1900 0 0xa0 -- 1,27 # aacute
-'e 1900 0 0x82 -- 1,41 # eacute
-'i 1900 0 0xa1 -- 1,49 # iacute
-'o 1900 0 0xa2 -- 1,59 # oacute
-'u 1900 0 0x95 -- 1,65 # uacute
-:A 1900 0 0x8e -- 1,30 # Adieresis
-:O 1900 0 0x99 -- 1,62 # Odieresis
-:U 1900 0 0x9a -- 1,70 # Udieresis
-:a 1900 0 0x84 -- 1,31 # adieresis
-:e 1900 0 0x89 -- 1,45 # edieresis
-:i 1900 0 0x8b -- 1,53 # idieresis
-:o 1900 0 0x94 -- 1,63 # odieresis
-:u 1900 0 0x81 -- 1,71 # udieresis
-:y 1900 0 0x98 -- 1,75 # ydieresis
-^a 1900 0 0x83 -- 1,29 # acircumflex
-^e 1900 0 0x88 -- 1,43 # ecircumflex
-^i 1900 0 0x8c -- 1,51 # icircumflex
-^o 1900 0 0x93 -- 1,61 # ocircumflex
-^u 1900 0 0x96 -- 1,69 # ucircumflex
-`a 1900 0 0x85 -- 1,33 # agrave
-`e 1900 0 0x8a -- 1,47 # egrave
-`i 1900 0 0x8d -- 1,55 # igrave
-`o 1900 0 0x95 -- 1,65 # ograve
-`u 1900 0 0x97 -- 1,73 # ugrave
-~A 1900 0 0x28e -- 1,26 # Atilde
-~N 1900 0 0xa5 -- 1,56 # Ntilde
-~a 1900 0 0x284 -- --- # atilde
-~n 1900 0 0xa4 -- 1,57 # ntilde
-,C 1900 0 0x80 -- 1,38 # Ccedilla
-,c 1900 0 0x87 -- 1,39 # ccedilla
-oA 1900 0 0x8f -- 1,34 # Aring
-oa 1900 0 0x86 -- 1,35 # aring
-a^ 1900 0 0x5e -- 1,3 # circumflex "circumflex accent"
-a~ 1900 0 0x7e -- 1,2 # tilde "tilde accent"
-Do 1900 0 0x24 -- 0,36 # dollar
-Po 1900 0 0x9c -- 4,11 # sterling
-Ye 1900 0 0x9d -- 4,12 # yen
-Fn 1900 0 0x9f -- 4,14 # florin
-ct 1900 0 0x9b -- 4,19 # cent
-Fo 1900 0 0xae -- 4,9 # guillemotleft
-r! 1900 0 0xad -- 4,7 # exclamdown
-r? 1900 0 0xa8 -- 4,8 # questiondown
-Of 1900 0 0xa6 -- 4,15 # ordfeminine
-Om 1900 0 0xa7 -- 4,16 # ordmasculine
-S2 1900 0 0xfd -- 4,20 # twosuperior
-<- 1900 0 0x1b -- 6,22 # arrowleft
--> 1900 0 0x1a -- 6,21 # arrowright
-<> 1900 0 0x1d -- 6,25 # arrowboth "horizontal double-headed arrow"
-da 1900 0 0x19 -- 6,24 # arrowdown
-ua 1900 0 0x18 -- 6,23 # arrowup
-va 1900 0 0x12 -- 6,26 # \& "vertical double-headed arrow"
-ba 1900 0 0xb3 -- 3,9 # bar
-bb 1900 0 0x7c -- 0,124 # brokenbar
-ul 1900 0 0x5f -- 0,95 # ul "underline with traditional troff metrics"
-ci 1900 0 0x9 -- 4,1 # circle
-bu 1900 0 0x7 -- 4,0 # bullet
-ps 1900 0 0x14 -- 4,5 # paragraph
-sc 1900 0 0x15 -- 4,6 # section
-de 1900 0 0xf8 -- 6,36 # degree
-12 1900 0 0xab -- 4,17 # onehalf
-14 1900 0 0xac -- 4,18 # onequarter
-hy 1900 0 0x2d -- 6,0 # hyphen
-lB 1900 0 0x5b -- 0,91 # bracketleft
-rB 1900 0 0x5d -- 0,93 # bracketright
-lC 1900 0 0x7b -- 0,123 # braceleft
-rC 1900 0 0x7d -- 0,125 # braceright
-aq 1900 0 0x27 -- 0,39 # quotesingle "apostrophe quote"
-at 1900 0 0x40 -- 0,64 # at
-.C1 1900 0 0x2d -- 0,45 # - minus "minus sign from current font"
-sh 1900 0 0x23 -- 0,35 # numbersign
-sl 1900 0 0x2f -- 0,47 # slash
-rs 1900 0 0x5c -- 0,92 # backslash
-*a 1900 0 0xe0 -- 8,1 # alpha
-*b 1900 0 0xe1 -- 8,3 # beta
-*d 1900 0 0xeb -- 8,9 # delta
-*h 1900 0 0xe9 -- 8,17 # theta
-*m 1900 0 0xe6 -- 8,25 # mu
-*p 1900 0 0xe3 -- 8,33 # pi
-*s 1900 0 0xe5 -- 8,37 # sigma
-*t 1900 0 0xe7 -- 8,41 # tau
-~~ 1900 0 0xf7 -- 6,13 # approxequal
-~= 1900 0 0xf7 -- 6,13 # approxequal
-+- 1900 0 0xf1 -- 6,1 # plusminus
-<= 1900 0 0xf3 -- 6,2 # lessequal
-ca 1900 0 0xef -- 6,16 # intersection "intersection, cap"
--h 1900 0 0xc4 -- 3,8 # hbar
-CL 1900 0 0x5 -- 5,168 # club "club suit"
-SP 1900 0 0x6 -- 5,171 # spade "spade suit"
-HE 1900 0 0x3 -- 5,170 # heart "heart suit"
-DI 1900 0 0x4 -- 5,169 # diamond "diamond suit"
-<< 1900 0 0xae -- 6,77 # "" "much less"
->> 1900 0 0xaf -- 6,78 # "" "much greater"
-pc 1900 0 0xfa -- 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/HB b/contrib/groff/font/devlbp/HB
deleted file mode 100644
index 1ad7b4ec7f9e..000000000000
--- a/contrib/groff/font/devlbp/HB
+++ /dev/null
@@ -1,491 +0,0 @@
-name HB
-lbpname Swiss-Bold
-special
-spacewidth 927
-slant 0
-ligatures fi fl 0
-charset
-ha 1110 2 0x4c3 0,94 # asciicircum
-ti 1110 0 0x4c4 0,126 # asciitilde
-vS 2223 2 0x169 1,176 # Scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vs 1853 2 0x173 1,177 # scaron
-vz 1667 2 0x174 1,207 # zcaron
-:Y 2223 2 0x16d 1,74 # Ydieresis
-tm 3333 2 0x170 4,41 # trademark
-aq 793 2 0x27 0,39 # quotesingle
-space 927 0 0x20 0,32
-! 1110 2 0x21 0,33 # exclam
-" 1580 2 0x22 0,34 # quotedbl
-dq 1580 2 0x22 0,34 # quotedbl
-# 1853 2 0x23 0,35 # numbersign
-sh 1853 2 0x23 0,35 # "
-$ 1853 2 0x24 0,36 # dollar
-Do 1853 2 0x24 0,36 # "
-% 2963 2 0x25 0,37 # percent
-& 2407 2 0x26 0,38 # ampersand
-' 793 2 0x27 0,39 # quoteright
-cq 793 2 0x27 0,39 # quoteright
-( 1110 2 0x28 0,40 # parenleft
-) 1110 2 0x29 0,41 # parenright
-* 1297 2 0x2a 0,42 # asterisk
-+ 1947 0 0x2b 0,43 # plus
-, 927 0 0x2c 0,44 # comma
-- 1947 0 0x2d 0,45 # hyphen
-hy 1947 0 0x2d 0,45 # "
-char173 1947 0 0x2d 0,45 # "
-. 927 0 0x2e 0,46 # period
-/ 927 2 0x2f 0,47 # slash
-sl 927 2 0x2f 0,47 # "
-0 1853 2 0x30 0,48 # zero
-1 1853 2 0x31 0,49 # one
-2 1853 2 0x32 0,50 # two
-3 1853 2 0x33 0,51 # three
-4 1853 2 0x34 0,52 # four
-5 1853 2 0x35 0,53 # five
-6 1853 2 0x36 0,54 # six
-7 1853 2 0x37 0,55 # seven
-8 1853 2 0x38 0,56 # eight
-9 1853 2 0x39 0,57 # nine
-: 1110 0 0x3a 0,58 # colon
-; 1110 0 0x3b 0,59 # semicolon
-< 1947 0 0x3c 0,60 # less
-= 1947 0 0x3d 0,61 # equal
-> 1947 0 0x3e 0,62 # greater
-? 2037 2 0x3f 0,63 # question
-@ 3250 2 0x40 0,64 # at
-at 3250 2 0x40 0,64 # "
-A 2407 2 0x41 0,65 # A
-B 2407 2 0x42 0,66 # B
-C 2407 2 0x43 0,67 # C
-D 2407 2 0x44 0,68 # D
-E 2223 2 0x45 0,69 # E
-F 2037 2 0x46 0,70 # F
-G 2593 2 0x47 0,71 # G
-H 2407 2 0x48 0,72 # H
-I 927 2 0x49 0,73 # I
-J 1853 2 0x4a 0,74 # J
-K 2407 2 0x4b 0,75 # K
-L 2037 2 0x4c 0,76 # L
-M 2777 2 0x4d 0,77 # M
-N 2407 2 0x4e 0,78 # N
-O 2593 2 0x4f 0,79 # O
-P 2223 2 0x50 0,80 # P
-Q 2593 2 0x51 0,81 # Q
-R 2407 2 0x52 0,82 # R
-S 2223 2 0x53 0,83 # S
-T 2037 2 0x54 0,84 # T
-U 2407 2 0x55 0,85 # U
-V 2223 2 0x56 0,86 # V
-W 3147 2 0x57 0,87 # W
-X 2223 2 0x58 0,88 # X
-Y 2223 2 0x59 0,89 # Y
-Z 2037 2 0x5a 0,90 # Z
-[ 1110 2 0x5b 0,91 # bracketleft
-lB 1110 2 0x5b 0,91 # "
-\ 927 2 0x5c 0,92 # backslash
-rs 927 2 0x5c 0,92 # "
-] 1110 2 0x5d 0,93 # bracketright
-rB 1110 2 0x5d 0,93 # "
-a^ 1110 2 0x5e 0,94 # circumflex
-^ 1110 2 0x5e 0,94 # "
-_ 1853 0 0x5f 0,95 # underscore
-` 1110 2 0x60 0,96 # quoteleft
-oq 1110 2 0x60 0,96 # "
-a 1853 0 0x61 0,97 # a
-b 2037 2 0x62 0,98 # b
-c 1853 0 0x63 0,99 # c
-d 2037 2 0x64 0,100 # d
-e 1853 0 0x65 0,101 # e
-f 1110 2 0x66 0,102 # f
-g 2037 1 0x67 0,103 # g
-h 2037 2 0x68 0,104 # h
-i 927 2 0x69 0,105 # i
-j 927 2 0x6a 0,106 # j
-k 1853 2 0x6b 0,107 # k
-l 927 2 0x6c 0,108 # l
-m 2963 0 0x6d 0,109 # m
-n 2037 0 0x6e 0,110 # n
-o 2037 0 0x6f 0,111 # o
-p 2037 1 0x70 0,112 # p
-q 2037 1 0x71 0,113 # q
-r 1297 0 0x72 0,114 # r
-s 1853 0 0x73 0,115 # s
-t 1110 2 0x74 0,116 # t
-u 2037 0 0x75 0,117 # u
-v 1853 0 0x76 0,118 # v
-w 2593 0 0x77 0,119 # w
-x 1853 0 0x78 0,120 # x
-y 1853 1 0x79 0,121 # y
-z 1667 0 0x7a 0,122 # z
-lC 1297 2 0x7b 0,123 # braceleft
-{ 1297 2 0x7b 0,123 # "
-| 933 2 0x7c 0,124 # "
-rC 1297 2 0x7d 0,125 # braceright
-} 1297 2 0x7d 0,125 # "
-a~ 1110 2 0x7e 0,126 # tilde
-~ 1110 2 0x7e 0,126 # "
-char161 1110 1 0xad 4,7 # exclamdown
-char162 1853 2 0x9b 4,19 # cent
-char163 1853 2 0x9c 4,11 # sterling
-char164 1853 2 0x12f 4,24 # currency
-char165 1853 2 0x9d 4,12 # yen
-char166 933 2 0x7c 0,124 # brokenbar
-char167 1853 2 0x15 4,6 # section
-char168 1110 2 0x122 1,7 # dieresis
-char169 2457 2 0x154 4,23 # copyright
-char170 1233 2 0xa6 4,15 # ordfeminine
-char171 1853 0 0xae 4,9 # guillemotleft
-char172 1947 0 0xaa 6,20 # logicalnot
-char173 1853 0 0x132 4,33 # hyphen
-char174 2457 2 0x155 4,22 # registered
-char175 1947 2 0x2d 6,0 # macron
-char176 1333 2 0xf8 6,36 # degree
-char177 1947 0 0xf1 6,1 # plusminus
-char178 1110 2 0xfd 4,20 # twosuperior
-char179 1110 2 0x14d 4,26 # threesuperior
-char180 1110 2 0x120 1,6 # acute "acute accent"
-char181 2037 1 0xe6 8,25 # mu
-char182 1853 2 0x14 4,5 # paragraph
-char183 927 0 0xfa 6,32 # periodcentered
-char184 1110 0 0x139 1,17 # cedilla
-char185 1110 2 0x156 4,78 # onesuperior
-char186 1217 2 0xa7 4,16 # ordmasculine
-char187 1853 0 0xaf 4,10 # guillemotright
-char188 2780 2 0xac 4,18 # onequarter
-char189 2780 2 0xab 4,17 # onehalf
-char190 2780 2 0x12e 4,25 # threequarters
-char191 2037 1 0xa8 4,8 # questiondown
-char192 2407 2 0x15c 1,32 # Agrave
-char193 2407 2 0x15a 1,26 # Aacute
-char194 2407 2 0x15b 1,28 # Acircumflex
-char195 2407 2 0x28e 1,76 # Atilde
-char196 2407 2 0x8e 1,30 # Adieresis
-char197 2407 2 0x8f 1,34 # Aring
-char198 3333 2 0x92 1,36 # AE
-char199 2407 2 0x80 1,38 # Ccedilla
-char200 2223 2 0x160 1,46 # Egrave
-char201 2223 2 0x90 1,40 # Eacute
-char202 2223 2 0x15e 1,42 # Ecircumflex
-char203 2223 2 0x15f 1,44 # Edieresis
-char204 927 2 0x164 1,54 # Igrave
-char205 927 2 0x161 1,48 # Iacute
-char206 927 2 0x162 1,50 # Icircumflex
-char207 927 2 0x163 1,52 # Idieresis
-char208 2407 2 0x13d 1,78 # Eth
-char209 2407 2 0xa5 1,56 # Ntilde
-char210 2593 2 0x167 1,64 # Ograve
-char211 2593 2 0x165 1,58 # Oacute
-char212 2593 2 0x166 1,60 # Ocircumflex
-char213 2593 2 0x168 1,82 # Otilde
-char214 2593 2 0x99 1,62 # Odieresis
-char215 1947 0 0x157 6,39 # multiply
-char216 2593 2 0x140 1,80 # Oslash
-char217 2407 2 0x16c 1,72 # Ugrave
-char218 2407 2 0x16a 1,66 # Uacute
-char219 2407 2 0x16b 1,68 # Ucircumflex
-char220 2407 2 0x9a 1,70 # Udieresis
-char221 2223 2 0x16f 1,84 # Yacute
-char222 2223 2 0x13e 1,88 # Thorn
-char223 2037 2 0x147 1,23 # germandbls
-char224 1853 2 0x85 1,33 # agrave
-char225 1853 2 0xa0 1,27 # aacute
-char226 1853 2 0x83 1,29 # acircumflex
-char227 1853 2 0x284 1,93 # atilde
-char228 1853 2 0x84 1,31 # adieresis
-char229 1853 2 0x86 1,35 # aring
-char230 2963 0 0x91 1,37 # ae
-char231 1853 0 0x87 1,39 # ccedilla
-char232 1853 2 0x8a 1,47 # egrave
-char233 1853 2 0x82 1,41 # eacute
-char234 1853 2 0x88 1,43 # ecircumflex
-char235 1853 2 0x89 1,45 # edieresis
-char236 927 2 0x8d 1,55 # igrave
-char237 927 2 0xa1 1,49 # iacute
-char238 927 2 0x8c 1,51 # icircumflex
-char239 927 2 0x8b 1,53 # idieresis
-char240 2037 2 0x148 1,87 # eth
-char241 2037 2 0xa4 1,57 # ntilde
-char242 2037 2 0x95 1,65 # ograve
-char243 2037 2 0xa2 1,59 # oacute
-char244 2037 2 0x93 1,61 # ocircumflex
-char245 2037 2 0x172 1,83 # otilde
-char246 2037 2 0x94 1,63 # odieresis
-char247 1947 0 0xf6 6,8 # divide
-char248 2037 0 0x145 1,81 # oslash
-char249 2037 2 0x97 1,73 # ugrave
-char250 2037 2 0xa3 1,67 # uacute
-char251 2037 2 0x96 1,69 # ucircumflex
-char252 2037 2 0x81 1,71 # udieresis
-char253 1853 3 0x175 1,85 # yacute
-char254 2037 3 0x143 1,89 # thorn
-char255 1853 3 0x98 1,75 # ydieresis
--D 2407 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 2037 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 2223 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 2037 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 3333 2 0x92 1,36 # AE
-ae 2963 0 0x91 1,37 # ae
-OE 3333 2 0x141 1,166 # OE
-oe 3147 0 0x146 1,167 # oe
-ij 1830 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 2037 2 0x147 1,23 # germandbls
-'A 2407 2 0x15a 1,26 # Aacute
-'E 2223 2 0x90 1,40 # Eacute
-'I 927 2 0x161 1,48 # Iacute
-'O 2593 2 0x165 1,58 # Oacute
-'U 2407 2 0x16a 1,66 # Uacute
-'a 1853 2 0xa0 1,27 # aacute
-'e 1853 2 0x82 1,41 # eacute
-'i 927 2 0xa1 1,49 # iacute
-'o 2037 2 0xa2 1,59 # oacute
-'u 2037 2 0x95 1,65 # uacute
-:A 2407 2 0x8e 1,30 # Adieresis
-:E 2223 2 0x15f 1,44 # Edieresis
-:I 927 2 0x163 1,52 # Idieresis
-:O 2593 2 0x99 1,62 # Odieresis
-:U 2407 2 0x9a 1,70 # Udieresis
-:Y 2223 2 0x16d 1,74 # Ydieresis
-:a 1853 2 0x84 1,31 # adieresis
-:e 1853 2 0x89 1,45 # edieresis
-:i 927 2 0x8b 1,53 # idieresis
-:o 2037 2 0x94 1,63 # odieresis
-:u 2037 2 0x81 1,71 # udieresis
-:y 1853 3 0x98 1,75 # ydieresis
-^A 2407 2 0x15b 1,28 # Acircumflex
-^E 2223 2 0x15e 1,42 # Ecircumflex
-^I 927 2 0x162 1,50 # Icircumflex
-^O 2593 2 0x166 1,60 # Ocircumflex
-^U 2407 2 0x16b 1,68 # Ucircumflex
-^a 1853 2 0x83 1,29 # acircumflex
-^e 1853 2 0x88 1,43 # ecircumflex
-^i 927 2 0x8c 1,51 # icircumflex
-^o 2037 2 0x93 1,61 # ocircumflex
-^u 2037 2 0x96 1,69 # ucircumflex
-`A 2407 2 0x15c 1,32 # Agrave
-`E 2223 2 0x160 1,46 # Egrave
-`I 927 2 0x164 1,54 # Igrave
-`O 2593 2 0x167 1,64 # Ograve
-`U 2407 2 0x16c 1,72 # Ugrave
-`a 1853 2 0x85 1,33 # agrave
-~a 1853 2 0x284 --- # atilde
-`e 1853 2 0x8a 1,47 # egrave
-`i 927 2 0x8d 1,55 # igrave
-`o 2037 2 0x95 1,65 # ograve
-`u 2037 2 0x97 1,73 # ugrave
-~A 2407 2 0x28e 1,26 # Atilde
-~N 2407 2 0xa5 1,56 # Ntilde
-~O 2593 2 0x168 1,82 # Otilde
-~n 2037 2 0xa4 1,57 # ntilde
-~o 2037 2 0x172 1,83 # otilde
-vS 2223 2 0x169 1,176 # Scaron
-vs 1853 2 0x173 1,177 # scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vz 1667 2 0x174 1,207 # zcaron
-,C 2407 2 0x80 1,38 # Ccedilla
-,c 1853 0 0x87 1,39 # ccedilla
-/L 2037 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 927 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 2593 2 0x140 1,80 # Oslash
-/o 2037 0 0x145 1,81 # oslash
-oA 2407 2 0x8f 1,34 # Aring
-oa 1853 2 0x86 1,35 # aring
-a" 1110 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 1110 2 0x135 1,8 # macron "macron or bar accent"
-a. 1110 2 0x137 1,15 # dotaccent "dot accent"
-a^ 1110 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 1110 2 0x120 1,6 # acute "acute accent"
-ga 1110 2 0x121 1,0 # grave "grave accent"
-ab 1110 2 0x136 1,22 # breve "breve accent"
-ac 1110 0 0x139 1,17 # cedilla "cedilla accent"
-ad 1110 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 1110 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 1110 2 0x138 1,14 # ring "ring or circle accent"
-a~ 1110 2 0x7e 1,2 # tilde "tilde accent"
-ho 1110 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 927 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 1853 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 1853 2 0x24 0,36 # dollar
-Po 1853 2 0x9c 4,11 # sterling
-Ye 1853 2 0x9d 4,12 # yen
-Fn 1853 2 0x9f 4,14 # florin
-ct 1853 2 0x9b 4,19 # cent
-Fo 1853 0 0xae 4,9 # guillemotleft
-Fc 1110 0 0x4bb 4,20 # guillemotright
-fo 1110 0 0x127 4,35 # guilsinglleft
-fc 1110 0 0x128 4,36 # guilsinglright
-r! 1110 1 0xad 4,7 # exclamdown
-r? 2037 1 0xa8 4,8 # questiondown
-fi 2037 2 0x130 4,54 # fi "fi ligature"
-fl 2037 2 0x131 4,55 # fl "fl ligature"
-OK 2037 0 0x3d6 --- # \& "check mark, tick"
-Of 1233 2 0xa6 4,15 # ordfeminine
-Om 1217 2 0xa7 4,16 # ordmasculine
-S1 1110 2 0x156 4,78 # onesuperior
-S2 1110 2 0xfd 4,20 # twosuperior
-S3 1110 2 0x14d 4,26 # threesuperior
-<- 3290 0 0x1b 6,22 # arrowleft
--> 3290 0 0x1a 6,21 # arrowright
-<> 3473 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 2010 0 0x19 6,24 # arrowdown
-ua 2010 0 0x18 6,23 # arrowup
-va 2010 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 2010 0 0x3dc 6,57 # arrowdblleft
-rA 2010 0 0x3de 6,56 # arrowdblright
-hA 2010 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 2010 0 0x3df 6,59 # arrowdbldown
-uA 2010 0 0x3dd 6,58 # arrowdblup
-ba 3333 2 0xb3 3,9 # bar
-bb 933 2 0x7c 0,124 # brokenbar
-br 3333 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 3333 0 0x123 4,34 # ru "baseline rule"
-ul 1853 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 3333 0 0x3f4 3,9 # bv "bold vertical"
-ci 2843 0 0x9 4,1 # circle
-bu 2120 0 0x7 4,0 # bullet
-co 2457 2 0x154 4,23 # copyright
-rg 2457 2 0x155 4,22 # registered
-tm 3333 2 0x170 4,41 # trademark
-dd 1853 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 1853 2 0x12a 4,39 # dagger
-ps 1853 2 0x14 4,5 # paragraph
-sc 1853 2 0x15 4,6 # section
-de 1333 2 0xf8 6,36 # degree
-em 3333 0 0x123 4,34 # emdash "em dash"
-en 1853 0 0x132 4,33 # endash "en dash"
-%0 3333 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 2780 2 0xab 4,17 # onehalf
-14 2780 2 0xac 4,18 # onequarter
-34 2780 2 0x12e 4,25 # threequarters
-f/ 927 2 0x158 6,6 # fraction "bar for fractions"
-fm 927 0 0x3a2 6,45 # minute "footmark, prime"
-sd 927 0 0x3b2 6,46 # second
-ha 927 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 927 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 1947 0 0x2d 6,0 # hyphen
-lB 1110 2 0x5b 0,91 # bracketleft
-rB 1110 2 0x5d 0,93 # bracketright
-lC 1297 2 0x7b 0,123 # braceleft
-rC 1297 2 0x7d 0,125 # braceright
-la 1297 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 1297 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 1667 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 1667 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 1667 2 0x125 4,32 # quotedblleft
-rq 1667 2 0x4ba 6,31 # quotedblright
-oq 927 2 0x176 4,29 # quoteleft "single open quote"
-aq 793 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 933 0 0x3f4 0,124 # bar
-at 3250 2 0x40 0,64 # at
-.C1 1947 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 1853 2 0x23 0,35 # numbersign
-sl 927 2 0x2f 0,47 # slash
-rs 927 2 0x5c 0,92 # backslash
-3d 927 0 0x35c 6,102 # therefore
-tf 927 0 0x35c 6,102 # therefore
-*A 927 0 0x341 8,0 # Alpha
-*B 927 0 0x342 8,2 # Beta
-*C 927 0 0x358 8,28 # Xi
-*D 927 0 0x344 8,8 # Delta
-*E 927 0 0x345 8,10 # Epsilon
-*F 2477 0 0x346 8,44 # Phi
-*G 1953 0 0x347 8,6 # Gamma
-*H 1953 0 0x351 8,16 # Theta
-*I 1953 0 0x349 8,18 # Iota
-*K 1953 0 0x34b 8,20 # Kappa
-*L 1953 0 0x34c 8,22 # Lambda
-*M 1953 0 0x34d 8,24 # Mu
-*N 1953 0 0x34e 8,26 # Nu
-*O 1953 0 0x34f 8,30 # Omicron
-*P 1953 0 0x350 8,32 # Pi
-*Q 1953 0 0x359 8,48 # Psi
-*R 1953 0 0x352 8,34 # Rho
-*S 1953 0 0x353 8,36 # Sigma
-*T 1953 0 0x354 8,40 # Tau
-*U 1953 0 0x3a1 8,76 # Upsilon
-*W 2560 0 0x357 8,50 # Omega
-*X 1953 0 0x343 8,36 # Chi
-*Y 1953 0 0x348 8,14 # Eta
-*Z 1953 0 0x35a 8,12 # Zeta
-*a 2027 0 0xe0 8,1 # alpha
-*b 2027 0 0xe1 8,3 # beta
-*c 2027 0 0x378 8,29 # xi
-*d 1980 0 0xeb 8,9 # delta
-*e 1980 0 0x36e 8,70 # epsilon
-*f 1980 0 0x366 8,45 # phi
-+f 1980 0 0x36a 8,77 # phi1 "variant phi"
-*g 1980 0 0x367 8,7 # gamma
-*h 1977 0 0xe9 8,17 # theta
-+h 1977 0 0x375 8,71 # theta1 "variant theta"
-*i 1977 0 0x369 8,19 # iota
-*k 1977 0 0x36b 8,21 # kappa
-*l 1977 0 0x36c 8,23 # lambda
-*m 2037 0 0xe6 8,25 # mu
-*n 2037 0 0x36e 8,27 # nu
-*o 2037 0 0x36f 8,31 # omicron
-*p 2143 0 0xe3 8,33 # pi
-+p 2143 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 2143 0 0x379 8,49 # psi
-*r 2143 0 0x372 8,35 # rho
-*s 2157 0 0xe5 8,37 # sigma
-*t 1503 0 0xe7 8,41 # tau
-*u 1503 0 0x375 8,27 # upsilon
-*w 1503 0 0x377 8,51 # omega
-*x 1503 0 0x363 8,47 # chi
-*y 1503 0 0x368 8,15 # eta
-*z 1503 0 0x37a 8,13 # zeta
-ts 1503 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 2663 0 0xf7 6,13 # approxequal
-~= 2663 0 0xf7 6,13 # approxequal
-!= 2663 0 0x3b9 6,99 # notequal
-** 927 0 0x32a 0,32 # asteriskmath
-+- 1947 0 0xf1 6,1 # plusminus
-<= 2407 0 0xf3 6,2 # lessequal
-== 2407 0 0x3ba 8,14 # equivalence
-=~ 2407 0 0x340 8,116 # congruent
->= 2027 0 0x3b3 8,3 # greaterequal
-AN 2027 0 0x3d9 8,85 # logicaland
-OR 2027 0 0x3da 8,86 # logicalor
-no 2027 0 0x3d8 8,20 # logicalnot
-te 2027 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 2027 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 2027 0 0x3c0 9,0 # aleph
-Im 2027 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 2027 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 2027 0 0x3a5 8,19 # infinity
-md 2027 0 0x3b7 8,32 # dotmath
-mo 2027 0 0x3ce 8,15 # element
-mu 2027 0 0x3b4 8,39 # multiply
-nc 2027 0 0x3cb 8,197 # notpropersuperset
-nm 2027 0 0x3cf 8,209 # notelement
-pl 1110 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 1947 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 1947 0 0x3b5 6,4 # proportional
-pp 1947 0 0x35e 8,89 # perpendicular
-sb 1947 0 0x3cc 6,67 # propersubset
-sp 1947 0 0x3c9 6,68 # propersuperset
-ib 1947 0 0x3cd 6,69 # reflexsubset
-ip 1947 0 0x3ca 6,70 # reflexsuperset
-ap 1947 0 0x37e 6,12 # similar
-pd 1947 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 1947 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 1947 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 2620 0 0xef 6,16 # intersection "intersection, cap"
-cu 2620 0 0x3c8 6,66 # union "union, cup"
-di 1947 0 0x3b8 6,8 # divide "division sign"
--h 3333 0 0xc4 3,8 # hbar
-gr 3333 0 0x3d1 6,33 # gradient
-es 2593 0 0x3c6 0,79 # emptyset
-CL 2510 0 0x5 5,168 # club "club suit"
-SP 2510 0 0x6 5,171 # spade "spade suit"
-HE 2510 0 0x3 5,170 # heart "heart suit"
-DI 2510 0 0x4 5,169 # diamond "diamond suit"
-CR 2510 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 2510 0 0x327 6,71 # suchthat
-/_ 2510 0 0x3d0 6,79 # angle
-<< 1853 0 0xae 6,77 # "" "much less"
->> 1853 0 0xaf 6,78 # "" "much greater"
-wp 1853 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 1853 0 0x3e0 6,95 # lozenge
-an 3333 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 927 0 0xfa 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/HBI b/contrib/groff/font/devlbp/HBI
deleted file mode 100644
index 30fa995754eb..000000000000
--- a/contrib/groff/font/devlbp/HBI
+++ /dev/null
@@ -1,492 +0,0 @@
-slant 18.49
-name HBI
-lbpname Swiss-BoldOblique
-special
-spacewidth 927
-slant 0
-ligatures fi fl 0
-charset
-ha 1110 2 0x4c3 0,94 # asciicircum
-ti 1110 0 0x4c4 0,126 # asciitilde
-vS 2223 2 0x169 1,176 # Scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vs 1853 2 0x173 1,177 # scaron
-vz 1667 2 0x174 1,207 # zcaron
-:Y 2223 2 0x16d 1,74 # Ydieresis
-tm 3333 2 0x170 4,41 # trademark
-aq 793 2 0x27 0,39 # quotesingle
-space 927 0 0x20 0,32
-! 1110 2 0x21 0,33 # exclam
-" 1580 2 0x22 0,34 # quotedbl
-dq 1580 2 0x22 0,34 # quotedbl
-# 1853 2 0x23 0,35 # numbersign
-sh 1853 2 0x23 0,35 # "
-$ 1853 2 0x24 0,36 # dollar
-Do 1853 2 0x24 0,36 # "
-% 2963 2 0x25 0,37 # percent
-& 2407 2 0x26 0,38 # ampersand
-' 793 2 0x27 0,39 # quoteright
-cq 793 2 0x27 0,39 # quoteright
-( 1110 2 0x28 0,40 # parenleft
-) 1110 2 0x29 0,41 # parenright
-* 1297 2 0x2a 0,42 # asterisk
-+ 1947 0 0x2b 0,43 # plus
-, 927 0 0x2c 0,44 # comma
-- 1947 0 0x2d 0,45 # hyphen
-hy 1947 0 0x2d 0,45 # "
-char173 1947 0 0x2d 0,45 # "
-. 927 0 0x2e 0,46 # period
-/ 927 2 0x2f 0,47 # slash
-sl 927 2 0x2f 0,47 # "
-0 1853 2 0x30 0,48 # zero
-1 1853 2 0x31 0,49 # one
-2 1853 2 0x32 0,50 # two
-3 1853 2 0x33 0,51 # three
-4 1853 2 0x34 0,52 # four
-5 1853 2 0x35 0,53 # five
-6 1853 2 0x36 0,54 # six
-7 1853 2 0x37 0,55 # seven
-8 1853 2 0x38 0,56 # eight
-9 1853 2 0x39 0,57 # nine
-: 1110 0 0x3a 0,58 # colon
-; 1110 0 0x3b 0,59 # semicolon
-< 1947 0 0x3c 0,60 # less
-= 1947 0 0x3d 0,61 # equal
-> 1947 0 0x3e 0,62 # greater
-? 2037 2 0x3f 0,63 # question
-@ 3250 2 0x40 0,64 # at
-at 3250 2 0x40 0,64 # "
-A 2407 2 0x41 0,65 # A
-B 2407 2 0x42 0,66 # B
-C 2407 2 0x43 0,67 # C
-D 2407 2 0x44 0,68 # D
-E 2223 2 0x45 0,69 # E
-F 2037 2 0x46 0,70 # F
-G 2593 2 0x47 0,71 # G
-H 2407 2 0x48 0,72 # H
-I 927 2 0x49 0,73 # I
-J 1853 2 0x4a 0,74 # J
-K 2407 2 0x4b 0,75 # K
-L 2037 2 0x4c 0,76 # L
-M 2777 2 0x4d 0,77 # M
-N 2407 2 0x4e 0,78 # N
-O 2593 2 0x4f 0,79 # O
-P 2223 2 0x50 0,80 # P
-Q 2593 2 0x51 0,81 # Q
-R 2407 2 0x52 0,82 # R
-S 2223 2 0x53 0,83 # S
-T 2037 2 0x54 0,84 # T
-U 2407 2 0x55 0,85 # U
-V 2223 2 0x56 0,86 # V
-W 3147 2 0x57 0,87 # W
-X 2223 2 0x58 0,88 # X
-Y 2223 2 0x59 0,89 # Y
-Z 2037 2 0x5a 0,90 # Z
-[ 1110 2 0x5b 0,91 # bracketleft
-lB 1110 2 0x5b 0,91 # "
-\ 927 2 0x5c 0,92 # backslash
-rs 927 2 0x5c 0,92 # "
-] 1110 2 0x5d 0,93 # bracketright
-rB 1110 2 0x5d 0,93 # "
-a^ 1110 2 0x5e 0,94 # circumflex
-^ 1110 2 0x5e 0,94 # "
-_ 1853 0 0x5f 0,95 # underscore
-` 1110 2 0x60 0,96 # quoteleft
-oq 1110 2 0x60 0,96 # "
-a 1853 0 0x61 0,97 # a
-b 2037 2 0x62 0,98 # b
-c 1853 0 0x63 0,99 # c
-d 2037 2 0x64 0,100 # d
-e 1853 0 0x65 0,101 # e
-f 1110 2 0x66 0,102 # f
-g 2037 1 0x67 0,103 # g
-h 2037 2 0x68 0,104 # h
-i 927 2 0x69 0,105 # i
-j 927 2 0x6a 0,106 # j
-k 1853 2 0x6b 0,107 # k
-l 927 2 0x6c 0,108 # l
-m 2963 0 0x6d 0,109 # m
-n 2037 0 0x6e 0,110 # n
-o 2037 0 0x6f 0,111 # o
-p 2037 1 0x70 0,112 # p
-q 2037 1 0x71 0,113 # q
-r 1297 0 0x72 0,114 # r
-s 1853 0 0x73 0,115 # s
-t 1110 2 0x74 0,116 # t
-u 2037 0 0x75 0,117 # u
-v 1853 0 0x76 0,118 # v
-w 2593 0 0x77 0,119 # w
-x 1853 0 0x78 0,120 # x
-y 1853 1 0x79 0,121 # y
-z 1667 0 0x7a 0,122 # z
-lC 1297 2 0x7b 0,123 # braceleft
-{ 1297 2 0x7b 0,123 # "
-| 933 2 0x7c 0,124 # "
-rC 1297 2 0x7d 0,125 # braceright
-} 1297 2 0x7d 0,125 # "
-a~ 1110 2 0x7e 0,126 # tilde
-~ 1110 2 0x7e 0,126 # "
-char161 1110 1 0xad 4,7 # exclamdown
-char162 1853 2 0x9b 4,19 # cent
-char163 1853 2 0x9c 4,11 # sterling
-char164 1853 2 0x12f 4,24 # currency
-char165 1853 2 0x9d 4,12 # yen
-char166 933 2 0x7c 0,124 # brokenbar
-char167 1853 2 0x15 4,6 # section
-char168 1110 2 0x122 1,7 # dieresis
-char169 2457 2 0x154 4,23 # copyright
-char170 1233 2 0xa6 4,15 # ordfeminine
-char171 1853 0 0xae 4,9 # guillemotleft
-char172 1947 0 0xaa 6,20 # logicalnot
-char173 1853 0 0x132 4,33 # hyphen
-char174 2457 2 0x155 4,22 # registered
-char175 1947 2 0x2d 6,0 # macron
-char176 1333 2 0xf8 6,36 # degree
-char177 1947 0 0xf1 6,1 # plusminus
-char178 1110 2 0xfd 4,20 # twosuperior
-char179 1110 2 0x14d 4,26 # threesuperior
-char180 1110 2 0x120 1,6 # acute "acute accent"
-char181 2037 1 0xe6 8,25 # mu
-char182 1853 2 0x14 4,5 # paragraph
-char183 927 0 0xfa 6,32 # periodcentered
-char184 1110 0 0x139 1,17 # cedilla
-char185 1110 2 0x156 4,78 # onesuperior
-char186 1217 2 0xa7 4,16 # ordmasculine
-char187 1853 0 0xaf 4,10 # guillemotright
-char188 2780 2 0xac 4,18 # onequarter
-char189 2780 2 0xab 4,17 # onehalf
-char190 2780 2 0x12e 4,25 # threequarters
-char191 2037 1 0xa8 4,8 # questiondown
-char192 2407 2 0x15c 1,32 # Agrave
-char193 2407 2 0x15a 1,26 # Aacute
-char194 2407 2 0x15b 1,28 # Acircumflex
-char195 2407 2 0x28e 1,76 # Atilde
-char196 2407 2 0x8e 1,30 # Adieresis
-char197 2407 2 0x8f 1,34 # Aring
-char198 3333 2 0x92 1,36 # AE
-char199 2407 2 0x80 1,38 # Ccedilla
-char200 2223 2 0x160 1,46 # Egrave
-char201 2223 2 0x90 1,40 # Eacute
-char202 2223 2 0x15e 1,42 # Ecircumflex
-char203 2223 2 0x15f 1,44 # Edieresis
-char204 927 2 0x164 1,54 # Igrave
-char205 927 2 0x161 1,48 # Iacute
-char206 927 2 0x162 1,50 # Icircumflex
-char207 927 2 0x163 1,52 # Idieresis
-char208 2407 2 0x13d 1,78 # Eth
-char209 2407 2 0xa5 1,56 # Ntilde
-char210 2593 2 0x167 1,64 # Ograve
-char211 2593 2 0x165 1,58 # Oacute
-char212 2593 2 0x166 1,60 # Ocircumflex
-char213 2593 2 0x168 1,82 # Otilde
-char214 2593 2 0x99 1,62 # Odieresis
-char215 1947 0 0x157 6,39 # multiply
-char216 2593 2 0x140 1,80 # Oslash
-char217 2407 2 0x16c 1,72 # Ugrave
-char218 2407 2 0x16a 1,66 # Uacute
-char219 2407 2 0x16b 1,68 # Ucircumflex
-char220 2407 2 0x9a 1,70 # Udieresis
-char221 2223 2 0x16f 1,84 # Yacute
-char222 2223 2 0x13e 1,88 # Thorn
-char223 2037 2 0x147 1,23 # germandbls
-char224 1853 2 0x85 1,33 # agrave
-char225 1853 2 0xa0 1,27 # aacute
-char226 1853 2 0x83 1,29 # acircumflex
-char227 1853 2 0x284 1,93 # atilde
-char228 1853 2 0x84 1,31 # adieresis
-char229 1853 2 0x86 1,35 # aring
-char230 2963 0 0x91 1,37 # ae
-char231 1853 0 0x87 1,39 # ccedilla
-char232 1853 2 0x8a 1,47 # egrave
-char233 1853 2 0x82 1,41 # eacute
-char234 1853 2 0x88 1,43 # ecircumflex
-char235 1853 2 0x89 1,45 # edieresis
-char236 927 2 0x8d 1,55 # igrave
-char237 927 2 0xa1 1,49 # iacute
-char238 927 2 0x8c 1,51 # icircumflex
-char239 927 2 0x8b 1,53 # idieresis
-char240 2037 2 0x148 1,87 # eth
-char241 2037 2 0xa4 1,57 # ntilde
-char242 2037 2 0x95 1,65 # ograve
-char243 2037 2 0xa2 1,59 # oacute
-char244 2037 2 0x93 1,61 # ocircumflex
-char245 2037 2 0x172 1,83 # otilde
-char246 2037 2 0x94 1,63 # odieresis
-char247 1947 0 0xf6 6,8 # divide
-char248 2037 0 0x145 1,81 # oslash
-char249 2037 2 0x97 1,73 # ugrave
-char250 2037 2 0xa3 1,67 # uacute
-char251 2037 2 0x96 1,69 # ucircumflex
-char252 2037 2 0x81 1,71 # udieresis
-char253 1853 3 0x175 1,85 # yacute
-char254 2037 3 0x143 1,89 # thorn
-char255 1853 3 0x98 1,75 # ydieresis
--D 2407 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 2037 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 2223 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 2037 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 3333 2 0x92 1,36 # AE
-ae 2963 0 0x91 1,37 # ae
-OE 3333 2 0x141 1,166 # OE
-oe 3147 0 0x146 1,167 # oe
-ij 1830 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 2037 2 0x147 1,23 # germandbls
-'A 2407 2 0x15a 1,26 # Aacute
-'E 2223 2 0x90 1,40 # Eacute
-'I 927 2 0x161 1,48 # Iacute
-'O 2593 2 0x165 1,58 # Oacute
-'U 2407 2 0x16a 1,66 # Uacute
-'a 1853 2 0xa0 1,27 # aacute
-'e 1853 2 0x82 1,41 # eacute
-'i 927 2 0xa1 1,49 # iacute
-'o 2037 2 0xa2 1,59 # oacute
-'u 2037 2 0x95 1,65 # uacute
-:A 2407 2 0x8e 1,30 # Adieresis
-:E 2223 2 0x15f 1,44 # Edieresis
-:I 927 2 0x163 1,52 # Idieresis
-:O 2593 2 0x99 1,62 # Odieresis
-:U 2407 2 0x9a 1,70 # Udieresis
-:Y 2223 2 0x16d 1,74 # Ydieresis
-:a 1853 2 0x84 1,31 # adieresis
-:e 1853 2 0x89 1,45 # edieresis
-:i 927 2 0x8b 1,53 # idieresis
-:o 2037 2 0x94 1,63 # odieresis
-:u 2037 2 0x81 1,71 # udieresis
-:y 1853 3 0x98 1,75 # ydieresis
-^A 2407 2 0x15b 1,28 # Acircumflex
-^E 2223 2 0x15e 1,42 # Ecircumflex
-^I 927 2 0x162 1,50 # Icircumflex
-^O 2593 2 0x166 1,60 # Ocircumflex
-^U 2407 2 0x16b 1,68 # Ucircumflex
-^a 1853 2 0x83 1,29 # acircumflex
-^e 1853 2 0x88 1,43 # ecircumflex
-^i 927 2 0x8c 1,51 # icircumflex
-^o 2037 2 0x93 1,61 # ocircumflex
-^u 2037 2 0x96 1,69 # ucircumflex
-`A 2407 2 0x15c 1,32 # Agrave
-`E 2223 2 0x160 1,46 # Egrave
-`I 927 2 0x164 1,54 # Igrave
-`O 2593 2 0x167 1,64 # Ograve
-`U 2407 2 0x16c 1,72 # Ugrave
-`a 1853 2 0x85 1,33 # agrave
-~a 1853 2 0x284 --- # atilde
-`e 1853 2 0x8a 1,47 # egrave
-`i 927 2 0x8d 1,55 # igrave
-`o 2037 2 0x95 1,65 # ograve
-`u 2037 2 0x97 1,73 # ugrave
-~A 2407 2 0x28e 1,26 # Atilde
-~N 2407 2 0xa5 1,56 # Ntilde
-~O 2593 2 0x168 1,82 # Otilde
-~n 2037 2 0xa4 1,57 # ntilde
-~o 2037 2 0x172 1,83 # otilde
-vS 2223 2 0x169 1,176 # Scaron
-vs 1853 2 0x173 1,177 # scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vz 1667 2 0x174 1,207 # zcaron
-,C 2407 2 0x80 1,38 # Ccedilla
-,c 1853 0 0x87 1,39 # ccedilla
-/L 2037 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 927 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 2593 2 0x140 1,80 # Oslash
-/o 2037 0 0x145 1,81 # oslash
-oA 2407 2 0x8f 1,34 # Aring
-oa 1853 2 0x86 1,35 # aring
-a" 1110 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 1110 2 0x135 1,8 # macron "macron or bar accent"
-a. 1110 2 0x137 1,15 # dotaccent "dot accent"
-a^ 1110 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 1110 2 0x120 1,6 # acute "acute accent"
-ga 1110 2 0x121 1,0 # grave "grave accent"
-ab 1110 2 0x136 1,22 # breve "breve accent"
-ac 1110 0 0x139 1,17 # cedilla "cedilla accent"
-ad 1110 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 1110 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 1110 2 0x138 1,14 # ring "ring or circle accent"
-a~ 1110 2 0x7e 1,2 # tilde "tilde accent"
-ho 1110 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 927 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 1853 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 1853 2 0x24 0,36 # dollar
-Po 1853 2 0x9c 4,11 # sterling
-Ye 1853 2 0x9d 4,12 # yen
-Fn 1853 2 0x9f 4,14 # florin
-ct 1853 2 0x9b 4,19 # cent
-Fo 1853 0 0xae 4,9 # guillemotleft
-Fc 1110 0 0x4bb 4,20 # guillemotright
-fo 1110 0 0x127 4,35 # guilsinglleft
-fc 1110 0 0x128 4,36 # guilsinglright
-r! 1110 1 0xad 4,7 # exclamdown
-r? 2037 1 0xa8 4,8 # questiondown
-fi 2037 2 0x130 4,54 # fi "fi ligature"
-fl 2037 2 0x131 4,55 # fl "fl ligature"
-OK 2037 0 0x3d6 --- # \& "check mark, tick"
-Of 1233 2 0xa6 4,15 # ordfeminine
-Om 1217 2 0xa7 4,16 # ordmasculine
-S1 1110 2 0x156 4,78 # onesuperior
-S2 1110 2 0xfd 4,20 # twosuperior
-S3 1110 2 0x14d 4,26 # threesuperior
-<- 3290 0 0x1b 6,22 # arrowleft
--> 3290 0 0x1a 6,21 # arrowright
-<> 3473 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 2010 0 0x19 6,24 # arrowdown
-ua 2010 0 0x18 6,23 # arrowup
-va 2010 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 2010 0 0x3dc 6,57 # arrowdblleft
-rA 2010 0 0x3de 6,56 # arrowdblright
-hA 2010 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 2010 0 0x3df 6,59 # arrowdbldown
-uA 2010 0 0x3dd 6,58 # arrowdblup
-ba 3333 2 0xb3 3,9 # bar
-bb 933 2 0x7c 0,124 # brokenbar
-br 3333 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 3333 0 0x123 4,34 # ru "baseline rule"
-ul 1853 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 3333 0 0x3f4 3,9 # bv "bold vertical"
-ci 2843 0 0x9 4,1 # circle
-bu 2120 0 0x7 4,0 # bullet
-co 2457 2 0x154 4,23 # copyright
-rg 2457 2 0x155 4,22 # registered
-tm 3333 2 0x170 4,41 # trademark
-dd 1853 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 1853 2 0x12a 4,39 # dagger
-ps 1853 2 0x14 4,5 # paragraph
-sc 1853 2 0x15 4,6 # section
-de 1333 2 0xf8 6,36 # degree
-em 3333 0 0x123 4,34 # emdash "em dash"
-en 1853 0 0x132 4,33 # endash "en dash"
-%0 3333 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 2780 2 0xab 4,17 # onehalf
-14 2780 2 0xac 4,18 # onequarter
-34 2780 2 0x12e 4,25 # threequarters
-f/ 557 2 0x158 6,6 # fraction "bar for fractions"
-fm 557 0 0x3a2 6,45 # minute "footmark, prime"
-sd 557 0 0x3b2 6,46 # second
-ha 557 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 557 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 1947 0 0x2d 6,0 # hyphen
-lB 1110 2 0x5b 0,91 # bracketleft
-rB 1110 2 0x5d 0,93 # bracketright
-lC 1297 2 0x7b 0,123 # braceleft
-rC 1297 2 0x7d 0,125 # braceright
-la 1297 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 1297 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 1667 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 1667 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 1667 2 0x125 4,32 # quotedblleft
-rq 1667 2 0x4ba 6,31 # quotedblright
-oq 927 2 0x176 4,29 # quoteleft "single open quote"
-aq 793 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 933 0 0x3f4 0,124 # bar
-at 3250 2 0x40 0,64 # at
-.C1 1947 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 1853 2 0x23 0,35 # numbersign
-sl 927 2 0x2f 0,47 # slash
-rs 927 2 0x5c 0,92 # backslash
-3d 927 0 0x35c 6,102 # therefore
-tf 927 0 0x35c 6,102 # therefore
-*A 927 0 0x341 8,0 # Alpha
-*B 927 0 0x342 8,2 # Beta
-*C 927 0 0x358 8,28 # Xi
-*D 927 0 0x344 8,8 # Delta
-*E 927 0 0x345 8,10 # Epsilon
-*F 2477 0 0x346 8,44 # Phi
-*G 1953 0 0x347 8,6 # Gamma
-*H 1953 0 0x351 8,16 # Theta
-*I 1953 0 0x349 8,18 # Iota
-*K 1953 0 0x34b 8,20 # Kappa
-*L 1953 0 0x34c 8,22 # Lambda
-*M 1953 0 0x34d 8,24 # Mu
-*N 1953 0 0x34e 8,26 # Nu
-*O 1953 0 0x34f 8,30 # Omicron
-*P 1953 0 0x350 8,32 # Pi
-*Q 1953 0 0x359 8,48 # Psi
-*R 1953 0 0x352 8,34 # Rho
-*S 1953 0 0x353 8,36 # Sigma
-*T 1953 0 0x354 8,40 # Tau
-*U 1953 0 0x3a1 8,76 # Upsilon
-*W 2560 0 0x357 8,50 # Omega
-*X 1953 0 0x343 8,36 # Chi
-*Y 1953 0 0x348 8,14 # Eta
-*Z 1953 0 0x35a 8,12 # Zeta
-*a 2027 0 0xe0 8,1 # alpha
-*b 2027 0 0xe1 8,3 # beta
-*c 2027 0 0x378 8,29 # xi
-*d 1980 0 0xeb 8,9 # delta
-*e 1980 0 0x36e 8,70 # epsilon
-*f 1980 0 0x366 8,45 # phi
-+f 1980 0 0x36a 8,77 # phi1 "variant phi"
-*g 1980 0 0x367 8,7 # gamma
-*h 1977 0 0xe9 8,17 # theta
-+h 1977 0 0x375 8,71 # theta1 "variant theta"
-*i 1977 0 0x369 8,19 # iota
-*k 1977 0 0x36b 8,21 # kappa
-*l 1977 0 0x36c 8,23 # lambda
-*m 2037 0 0xe6 8,25 # mu
-*n 2037 0 0x36e 8,27 # nu
-*o 2037 0 0x36f 8,31 # omicron
-*p 2143 0 0xe3 8,33 # pi
-+p 2143 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 2143 0 0x379 8,49 # psi
-*r 2143 0 0x372 8,35 # rho
-*s 2157 0 0xe5 8,37 # sigma
-*t 1503 0 0xe7 8,41 # tau
-*u 1503 0 0x375 8,27 # upsilon
-*w 1503 0 0x377 8,51 # omega
-*x 1503 0 0x363 8,47 # chi
-*y 1503 0 0x368 8,15 # eta
-*z 1503 0 0x37a 8,13 # zeta
-ts 1503 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 2663 0 0xf7 6,13 # approxequal
-~= 2663 0 0xf7 6,13 # approxequal
-!= 2663 0 0x3b9 6,99 # notequal
-** 927 0 0x32a 0,32 # asteriskmath
-+- 1947 0 0xf1 6,1 # plusminus
-<= 2407 0 0xf3 6,2 # lessequal
-== 2407 0 0x3ba 8,14 # equivalence
-=~ 2407 0 0x340 8,116 # congruent
->= 2027 0 0x3b3 8,3 # greaterequal
-AN 2027 0 0x3d9 8,85 # logicaland
-OR 2027 0 0x3da 8,86 # logicalor
-no 2027 0 0x3d8 8,20 # logicalnot
-te 2027 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 2027 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 2027 0 0x3c0 9,0 # aleph
-Im 2027 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 2027 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 2027 0 0x3a5 8,19 # infinity
-md 2027 0 0x3b7 8,32 # dotmath
-mo 2027 0 0x3ce 8,15 # element
-mu 2027 0 0x3b4 8,39 # multiply
-nc 2027 0 0x3cb 8,197 # notpropersuperset
-nm 2027 0 0x3cf 8,209 # notelement
-pl 1110 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 1947 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 1947 0 0x3b5 6,4 # proportional
-pp 1947 0 0x35e 8,89 # perpendicular
-sb 1947 0 0x3cc 6,67 # propersubset
-sp 1947 0 0x3c9 6,68 # propersuperset
-ib 1947 0 0x3cd 6,69 # reflexsubset
-ip 1947 0 0x3ca 6,70 # reflexsuperset
-ap 1947 0 0x37e 6,12 # similar
-pd 1947 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 1947 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 1947 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 2620 0 0xef 6,16 # intersection "intersection, cap"
-cu 2620 0 0x3c8 6,66 # union "union, cup"
-di 1947 0 0x3b8 6,8 # divide "division sign"
--h 3333 0 0xc4 3,8 # hbar
-gr 3333 0 0x3d1 6,33 # gradient
-es 2593 0 0x3c6 0,79 # emptyset
-CL 2510 0 0x5 5,168 # club "club suit"
-SP 2510 0 0x6 5,171 # spade "spade suit"
-HE 2510 0 0x3 5,170 # heart "heart suit"
-DI 2510 0 0x4 5,169 # diamond "diamond suit"
-CR 2510 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 2510 0 0x327 6,71 # suchthat
-/_ 2510 0 0x3d0 6,79 # angle
-<< 1853 0 0xae 6,77 # "" "much less"
->> 1853 0 0xaf 6,78 # "" "much greater"
-wp 1853 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 1853 0 0x3e0 6,95 # lozenge
-an 3333 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 927 0 0xfa 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/HI b/contrib/groff/font/devlbp/HI
deleted file mode 100644
index 59201e286c31..000000000000
--- a/contrib/groff/font/devlbp/HI
+++ /dev/null
@@ -1,492 +0,0 @@
-slant 18.49
-name HI
-lbpname Swiss-Oblique
-special
-spacewidth 927
-slant 0
-ligatures fi fl 0
-charset
-ha 1110 2 0x4c3 0,94 # asciicircum
-ti 1110 0 0x4c4 0,126 # asciitilde
-vS 2223 2 0x169 1,176 # Scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vs 1667 2 0x173 1,177 # scaron
-vz 1667 2 0x174 1,207 # zcaron
-:Y 2223 2 0x16d 1,74 # Ydieresis
-tm 3333 2 0x170 4,41 # trademark
-aq 637 2 0x27 0,39 # quotesingle
-space 927 0 0x20 0,32
-! 927 2 0x21 0,33 # exclam
-" 1183 2 0x22 0,34 # quotedbl
-dq 1183 2 0x22 0,34 # quotedbl
-# 1853 2 0x23 0,35 # numbersign
-sh 1853 2 0x23 0,35 # "
-$ 1853 2 0x24 0,36 # dollar
-Do 1853 2 0x24 0,36 # "
-% 2963 2 0x25 0,37 # percent
-& 2223 2 0x26 0,38 # ampersand
-' 637 2 0x27 0,39 # quoteright
-cq 637 2 0x27 0,39 # quoteright
-( 1110 2 0x28 0,40 # parenleft
-) 1110 2 0x29 0,41 # parenright
-* 1297 2 0x2a 0,42 # asterisk
-+ 1947 0 0x2b 0,43 # plus
-, 927 0 0x2c 0,44 # comma
-- 1947 0 0x2d 0,45 # hyphen
-hy 1947 0 0x2d 0,45 # "
-char173 1947 0 0x2d 0,45 # "
-. 927 0 0x2e 0,46 # period
-/ 927 2 0x2f 0,47 # slash
-sl 927 2 0x2f 0,47 # "
-0 1853 2 0x30 0,48 # zero
-1 1853 2 0x31 0,49 # one
-2 1853 2 0x32 0,50 # two
-3 1853 2 0x33 0,51 # three
-4 1853 2 0x34 0,52 # four
-5 1853 2 0x35 0,53 # five
-6 1853 2 0x36 0,54 # six
-7 1853 2 0x37 0,55 # seven
-8 1853 2 0x38 0,56 # eight
-9 1853 2 0x39 0,57 # nine
-: 927 0 0x3a 0,58 # colon
-; 927 0 0x3b 0,59 # semicolon
-< 1947 0 0x3c 0,60 # less
-= 1947 0 0x3d 0,61 # equal
-> 1947 0 0x3e 0,62 # greater
-? 1853 2 0x3f 0,63 # question
-@ 3383 2 0x40 0,64 # at
-at 3383 2 0x40 0,64 # "
-A 2223 2 0x41 0,65 # A
-B 2223 2 0x42 0,66 # B
-C 2407 2 0x43 0,67 # C
-D 2407 2 0x44 0,68 # D
-E 2223 2 0x45 0,69 # E
-F 2037 2 0x46 0,70 # F
-G 2593 2 0x47 0,71 # G
-H 2407 2 0x48 0,72 # H
-I 927 2 0x49 0,73 # I
-J 1667 2 0x4a 0,74 # J
-K 2223 2 0x4b 0,75 # K
-L 1853 2 0x4c 0,76 # L
-M 2777 2 0x4d 0,77 # M
-N 2407 2 0x4e 0,78 # N
-O 2593 2 0x4f 0,79 # O
-P 2223 2 0x50 0,80 # P
-Q 2593 2 0x51 0,81 # Q
-R 2407 2 0x52 0,82 # R
-S 2223 2 0x53 0,83 # S
-T 2037 2 0x54 0,84 # T
-U 2407 2 0x55 0,85 # U
-V 2223 2 0x56 0,86 # V
-W 3147 2 0x57 0,87 # W
-X 2223 2 0x58 0,88 # X
-Y 2223 2 0x59 0,89 # Y
-Z 2037 2 0x5a 0,90 # Z
-[ 927 2 0x5b 0,91 # bracketleft
-lB 927 2 0x5b 0,91 # "
-\ 927 2 0x5c 0,92 # backslash
-rs 927 2 0x5c 0,92 # "
-] 927 2 0x5d 0,93 # bracketright
-rB 927 2 0x5d 0,93 # "
-a^ 1110 2 0x5e 0,94 # circumflex
-^ 1110 2 0x5e 0,94 # "
-_ 1853 0 0x5f 0,95 # underscore
-` 1110 2 0x60 0,96 # quoteleft
-oq 1110 2 0x60 0,96 # "
-a 1853 0 0x61 0,97 # a
-b 1853 2 0x62 0,98 # b
-c 1667 0 0x63 0,99 # c
-d 1853 2 0x64 0,100 # d
-e 1853 0 0x65 0,101 # e
-f 927 2 0x66 0,102 # f
-g 1853 1 0x67 0,103 # g
-h 1853 2 0x68 0,104 # h
-i 740 2 0x69 0,105 # i
-j 740 2 0x6a 0,106 # j
-k 1667 2 0x6b 0,107 # k
-l 740 2 0x6c 0,108 # l
-m 2777 0 0x6d 0,109 # m
-n 1853 0 0x6e 0,110 # n
-o 1853 0 0x6f 0,111 # o
-p 1853 1 0x70 0,112 # p
-q 1853 1 0x71 0,113 # q
-r 1110 0 0x72 0,114 # r
-s 1667 0 0x73 0,115 # s
-t 927 2 0x74 0,116 # t
-u 1853 0 0x75 0,117 # u
-v 1667 0 0x76 0,118 # v
-w 2407 0 0x77 0,119 # w
-x 1667 0 0x78 0,120 # x
-y 1667 1 0x79 0,121 # y
-z 1667 0 0x7a 0,122 # z
-lC 1113 2 0x7b 0,123 # braceleft
-{ 1113 2 0x7b 0,123 # "
-| 867 2 0x7c 0,124 # "
-rC 1113 2 0x7d 0,125 # braceright
-} 1113 2 0x7d 0,125 # "
-a~ 1110 2 0x7e 0,126 # tilde
-~ 1110 2 0x7e 0,126 # "
-char161 1110 1 0xad 4,7 # exclamdown
-char162 1853 2 0x9b 4,19 # cent
-char163 1853 2 0x9c 4,11 # sterling
-char164 1853 2 0x12f 4,24 # currency
-char165 1853 2 0x9d 4,12 # yen
-char166 867 2 0x7c 0,124 # brokenbar
-char167 1853 2 0x15 4,6 # section
-char168 1110 2 0x122 1,7 # dieresis
-char169 2457 2 0x154 4,23 # copyright
-char170 1233 2 0xa6 4,15 # ordfeminine
-char171 1853 0 0xae 4,9 # guillemotleft
-char172 1947 0 0xaa 6,20 # logicalnot
-char173 1853 0 0x132 4,33 # hyphen
-char174 2457 2 0x155 4,22 # registered
-char175 1947 2 0x2d 6,0 # macron
-char176 1333 2 0xf8 6,36 # degree
-char177 1947 0 0xf1 6,1 # plusminus
-char178 1110 2 0xfd 4,20 # twosuperior
-char179 1110 2 0x14d 4,26 # threesuperior
-char180 1110 2 0x120 1,6 # acute "acute accent"
-char181 1853 1 0xe6 8,25 # mu
-char182 1790 2 0x14 4,5 # paragraph
-char183 927 0 0xfa 6,32 # periodcentered
-char184 1110 0 0x139 1,17 # cedilla
-char185 1110 2 0x156 4,78 # onesuperior
-char186 1217 2 0xa7 4,16 # ordmasculine
-char187 1853 0 0xaf 4,10 # guillemotright
-char188 2780 2 0xac 4,18 # onequarter
-char189 2780 2 0xab 4,17 # onehalf
-char190 2780 2 0x12e 4,25 # threequarters
-char191 2037 1 0xa8 4,8 # questiondown
-char192 2223 2 0x15c 1,32 # Agrave
-char193 2223 2 0x15a 1,26 # Aacute
-char194 2223 2 0x15b 1,28 # Acircumflex
-char195 2223 2 0x28e 1,76 # Atilde
-char196 2223 2 0x8e 1,30 # Adieresis
-char197 2223 2 0x8f 1,34 # Aring
-char198 3333 2 0x92 1,36 # AE
-char199 2407 2 0x80 1,38 # Ccedilla
-char200 2223 2 0x160 1,46 # Egrave
-char201 2223 2 0x90 1,40 # Eacute
-char202 2223 2 0x15e 1,42 # Ecircumflex
-char203 2223 2 0x15f 1,44 # Edieresis
-char204 927 2 0x164 1,54 # Igrave
-char205 927 2 0x161 1,48 # Iacute
-char206 927 2 0x162 1,50 # Icircumflex
-char207 927 2 0x163 1,52 # Idieresis
-char208 2407 2 0x13d 1,78 # Eth
-char209 2407 2 0xa5 1,56 # Ntilde
-char210 2593 2 0x167 1,64 # Ograve
-char211 2593 2 0x165 1,58 # Oacute
-char212 2593 2 0x166 1,60 # Ocircumflex
-char213 2593 2 0x168 1,82 # Otilde
-char214 2593 2 0x99 1,62 # Odieresis
-char215 1947 0 0x157 6,39 # multiply
-char216 2593 2 0x140 1,80 # Oslash
-char217 2407 2 0x16c 1,72 # Ugrave
-char218 2407 2 0x16a 1,66 # Uacute
-char219 2407 2 0x16b 1,68 # Ucircumflex
-char220 2407 2 0x9a 1,70 # Udieresis
-char221 2223 2 0x16f 1,84 # Yacute
-char222 2223 2 0x13e 1,88 # Thorn
-char223 2037 2 0x147 1,23 # germandbls
-char224 1853 2 0x85 1,33 # agrave
-char225 1853 2 0xa0 1,27 # aacute
-char226 1853 2 0x83 1,29 # acircumflex
-char227 1853 2 0x284 1,93 # atilde
-char228 1853 2 0x84 1,31 # adieresis
-char229 1853 2 0x86 1,35 # aring
-char230 2963 0 0x91 1,37 # ae
-char231 1667 0 0x87 1,39 # ccedilla
-char232 1853 2 0x8a 1,47 # egrave
-char233 1853 2 0x82 1,41 # eacute
-char234 1853 2 0x88 1,43 # ecircumflex
-char235 1853 2 0x89 1,45 # edieresis
-char236 927 2 0x8d 1,55 # igrave
-char237 927 2 0xa1 1,49 # iacute
-char238 927 2 0x8c 1,51 # icircumflex
-char239 927 2 0x8b 1,53 # idieresis
-char240 1853 2 0x148 1,87 # eth
-char241 1853 2 0xa4 1,57 # ntilde
-char242 1853 2 0x95 1,65 # ograve
-char243 1853 2 0xa2 1,59 # oacute
-char244 1853 2 0x93 1,61 # ocircumflex
-char245 1853 2 0x172 1,83 # otilde
-char246 1853 2 0x94 1,63 # odieresis
-char247 1947 0 0xf6 6,8 # divide
-char248 2037 0 0x145 1,81 # oslash
-char249 1853 2 0x97 1,73 # ugrave
-char250 1853 2 0xa3 1,67 # uacute
-char251 1853 2 0x96 1,69 # ucircumflex
-char252 1853 2 0x81 1,71 # udieresis
-char253 1667 3 0x175 1,85 # yacute
-char254 1853 3 0x143 1,89 # thorn
-char255 1667 3 0x98 1,75 # ydieresis
--D 2407 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 1853 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 2223 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 1853 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 3333 2 0x92 1,36 # AE
-ae 2963 0 0x91 1,37 # ae
-OE 3333 2 0x141 1,166 # OE
-oe 3147 0 0x146 1,167 # oe
-ij 1437 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 2037 2 0x147 1,23 # germandbls
-'A 2223 2 0x15a 1,26 # Aacute
-'E 2223 2 0x90 1,40 # Eacute
-'I 927 2 0x161 1,48 # Iacute
-'O 2593 2 0x165 1,58 # Oacute
-'U 2407 2 0x16a 1,66 # Uacute
-'a 1853 2 0xa0 1,27 # aacute
-'e 1853 2 0x82 1,41 # eacute
-'i 927 2 0xa1 1,49 # iacute
-'o 1853 2 0xa2 1,59 # oacute
-'u 1853 2 0x95 1,65 # uacute
-:A 2223 2 0x8e 1,30 # Adieresis
-:E 2223 2 0x15f 1,44 # Edieresis
-:I 927 2 0x163 1,52 # Idieresis
-:O 2593 2 0x99 1,62 # Odieresis
-:U 2407 2 0x9a 1,70 # Udieresis
-:Y 2223 2 0x16d 1,74 # Ydieresis
-:a 1853 2 0x84 1,31 # adieresis
-:e 1853 2 0x89 1,45 # edieresis
-:i 927 2 0x8b 1,53 # idieresis
-:o 1853 2 0x94 1,63 # odieresis
-:u 1853 2 0x81 1,71 # udieresis
-:y 1667 3 0x98 1,75 # ydieresis
-^A 2223 2 0x15b 1,28 # Acircumflex
-^E 2223 2 0x15e 1,42 # Ecircumflex
-^I 927 2 0x162 1,50 # Icircumflex
-^O 2593 2 0x166 1,60 # Ocircumflex
-^U 2407 2 0x16b 1,68 # Ucircumflex
-^a 1853 2 0x83 1,29 # acircumflex
-^e 1853 2 0x88 1,43 # ecircumflex
-^i 927 2 0x8c 1,51 # icircumflex
-^o 1853 2 0x93 1,61 # ocircumflex
-^u 1853 2 0x96 1,69 # ucircumflex
-`A 2223 2 0x15c 1,32 # Agrave
-`E 2223 2 0x160 1,46 # Egrave
-`I 927 2 0x164 1,54 # Igrave
-`O 2593 2 0x167 1,64 # Ograve
-`U 2407 2 0x16c 1,72 # Ugrave
-`a 1853 2 0x85 1,33 # agrave
-~a 1853 2 0x284 --- # atilde
-`e 1853 2 0x8a 1,47 # egrave
-`i 927 2 0x8d 1,55 # igrave
-`o 1853 2 0x95 1,65 # ograve
-`u 1853 2 0x97 1,73 # ugrave
-~A 2223 2 0x28e 1,26 # Atilde
-~N 2407 2 0xa5 1,56 # Ntilde
-~O 2593 2 0x168 1,82 # Otilde
-~n 1853 2 0xa4 1,57 # ntilde
-~o 1853 2 0x172 1,83 # otilde
-vS 2223 2 0x169 1,176 # Scaron
-vs 1667 2 0x173 1,177 # scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vz 1667 2 0x174 1,207 # zcaron
-,C 2407 2 0x80 1,38 # Ccedilla
-,c 1667 0 0x87 1,39 # ccedilla
-/L 1853 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 740 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 2593 2 0x140 1,80 # Oslash
-/o 2037 0 0x145 1,81 # oslash
-oA 2223 2 0x8f 1,34 # Aring
-oa 1853 2 0x86 1,35 # aring
-a" 1110 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 1110 2 0x135 1,8 # macron "macron or bar accent"
-a. 1110 2 0x137 1,15 # dotaccent "dot accent"
-a^ 1110 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 1110 2 0x120 1,6 # acute "acute accent"
-ga 1110 2 0x121 1,0 # grave "grave accent"
-ab 1110 2 0x136 1,22 # breve "breve accent"
-ac 1110 0 0x139 1,17 # cedilla "cedilla accent"
-ad 1110 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 1110 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 1110 2 0x138 1,14 # ring "ring or circle accent"
-a~ 1110 2 0x7e 1,2 # tilde "tilde accent"
-ho 1110 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 927 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 1853 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 1853 2 0x24 0,36 # dollar
-Po 1853 2 0x9c 4,11 # sterling
-Ye 1853 2 0x9d 4,12 # yen
-Fn 1853 2 0x9f 4,14 # florin
-ct 1853 2 0x9b 4,19 # cent
-Fo 1853 0 0xae 4,9 # guillemotleft
-Fc 1110 0 0x4bb 4,20 # guillemotright
-fo 1110 0 0x127 4,35 # guilsinglleft
-fc 1110 0 0x128 4,36 # guilsinglright
-r! 1110 1 0xad 4,7 # exclamdown
-r? 2037 1 0xa8 4,8 # questiondown
-fi 1667 2 0x130 4,54 # fi "fi ligature"
-fl 1667 2 0x131 4,55 # fl "fl ligature"
-OK 1667 0 0x3d6 --- # \& "check mark, tick"
-Of 1233 2 0xa6 4,15 # ordfeminine
-Om 1217 2 0xa7 4,16 # ordmasculine
-S1 1110 2 0x156 4,78 # onesuperior
-S2 1110 2 0xfd 4,20 # twosuperior
-S3 1110 2 0x14d 4,26 # threesuperior
-<- 3290 0 0x1b 6,22 # arrowleft
--> 3290 0 0x1a 6,21 # arrowright
-<> 3473 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 2010 0 0x19 6,24 # arrowdown
-ua 2010 0 0x18 6,23 # arrowup
-va 2010 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 2010 0 0x3dc 6,57 # arrowdblleft
-rA 2010 0 0x3de 6,56 # arrowdblright
-hA 2010 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 2010 0 0x3df 6,59 # arrowdbldown
-uA 2010 0 0x3dd 6,58 # arrowdblup
-ba 3333 2 0xb3 3,9 # bar
-bb 867 2 0x7c 0,124 # brokenbar
-br 3333 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 3333 0 0x123 4,34 # ru "baseline rule"
-ul 1853 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 3333 0 0x3f4 3,9 # bv "bold vertical"
-ci 2843 0 0x9 4,1 # circle
-bu 2120 0 0x7 4,0 # bullet
-co 2457 2 0x154 4,23 # copyright
-rg 2457 2 0x155 4,22 # registered
-tm 3333 2 0x170 4,41 # trademark
-dd 1853 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 1853 2 0x12a 4,39 # dagger
-ps 1790 2 0x14 4,5 # paragraph
-sc 1853 2 0x15 4,6 # section
-de 1333 2 0xf8 6,36 # degree
-em 3333 0 0x123 4,34 # emdash "em dash"
-en 1853 0 0x132 4,33 # endash "en dash"
-%0 3333 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 2780 2 0xab 4,17 # onehalf
-14 2780 2 0xac 4,18 # onequarter
-34 2780 2 0x12e 4,25 # threequarters
-f/ 557 2 0x158 6,6 # fraction "bar for fractions"
-fm 557 0 0x3a2 6,45 # minute "footmark, prime"
-sd 557 0 0x3b2 6,46 # second
-ha 557 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 557 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 1947 0 0x2d 6,0 # hyphen
-lB 927 2 0x5b 0,91 # bracketleft
-rB 927 2 0x5d 0,93 # bracketright
-lC 1113 2 0x7b 0,123 # braceleft
-rC 1113 2 0x7d 0,125 # braceright
-la 1113 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 1113 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 1110 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 1110 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 1110 2 0x125 4,32 # quotedblleft
-rq 1110 2 0x4ba 6,31 # quotedblright
-oq 740 2 0x176 4,29 # quoteleft "single open quote"
-aq 637 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 867 0 0x3f4 0,124 # bar
-at 3383 2 0x40 0,64 # at
-.C1 1947 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 1853 2 0x23 0,35 # numbersign
-sl 927 2 0x2f 0,47 # slash
-rs 927 2 0x5c 0,92 # backslash
-3d 927 0 0x35c 6,102 # therefore
-tf 927 0 0x35c 6,102 # therefore
-*A 927 0 0x341 8,0 # Alpha
-*B 927 0 0x342 8,2 # Beta
-*C 927 0 0x358 8,28 # Xi
-*D 927 0 0x344 8,8 # Delta
-*E 927 0 0x345 8,10 # Epsilon
-*F 2377 0 0x346 8,44 # Phi
-*G 1907 0 0x347 8,6 # Gamma
-*H 1907 0 0x351 8,16 # Theta
-*I 1907 0 0x349 8,18 # Iota
-*K 1907 0 0x34b 8,20 # Kappa
-*L 1907 0 0x34c 8,22 # Lambda
-*M 1907 0 0x34d 8,24 # Mu
-*N 1907 0 0x34e 8,26 # Nu
-*O 1907 0 0x34f 8,30 # Omicron
-*P 1907 0 0x350 8,32 # Pi
-*Q 1907 0 0x359 8,48 # Psi
-*R 1907 0 0x352 8,34 # Rho
-*S 1973 0 0x353 8,36 # Sigma
-*T 1973 0 0x354 8,40 # Tau
-*U 1973 0 0x3a1 8,76 # Upsilon
-*W 2547 0 0x357 8,50 # Omega
-*X 1973 0 0x343 8,36 # Chi
-*Y 1973 0 0x348 8,14 # Eta
-*Z 1973 0 0x35a 8,12 # Zeta
-*a 2023 0 0xe0 8,1 # alpha
-*b 1893 0 0xe1 8,3 # beta
-*c 1893 0 0x378 8,29 # xi
-*d 1890 0 0xeb 8,9 # delta
-*e 1890 0 0x36e 8,70 # epsilon
-*f 1890 0 0x366 8,45 # phi
-+f 1890 0 0x36a 8,77 # phi1 "variant phi"
-*g 1890 0 0x367 8,7 # gamma
-*h 1853 0 0xe9 8,17 # theta
-+h 1853 0 0x375 8,71 # theta1 "variant theta"
-*i 1853 0 0x369 8,19 # iota
-*k 1853 0 0x36b 8,21 # kappa
-*l 1853 0 0x36c 8,23 # lambda
-*m 1853 0 0xe6 8,25 # mu
-*n 1853 0 0x36e 8,27 # nu
-*o 1853 0 0x36f 8,31 # omicron
-*p 1963 0 0xe3 8,33 # pi
-+p 1963 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 1963 0 0x379 8,49 # psi
-*r 1963 0 0x372 8,35 # rho
-*s 2037 0 0xe5 8,37 # sigma
-*t 1463 0 0xe7 8,41 # tau
-*u 1463 0 0x375 8,27 # upsilon
-*w 1463 0 0x377 8,51 # omega
-*x 1463 0 0x363 8,47 # chi
-*y 1463 0 0x368 8,15 # eta
-*z 1463 0 0x37a 8,13 # zeta
-ts 1463 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 2663 0 0xf7 6,13 # approxequal
-~= 2663 0 0xf7 6,13 # approxequal
-!= 2663 0 0x3b9 6,99 # notequal
-** 927 0 0x32a 0,32 # asteriskmath
-+- 1947 0 0xf1 6,1 # plusminus
-<= 2413 0 0xf3 6,2 # lessequal
-== 2413 0 0x3ba 8,14 # equivalence
-=~ 2413 0 0x340 8,116 # congruent
->= 1893 0 0x3b3 8,3 # greaterequal
-AN 1893 0 0x3d9 8,85 # logicaland
-OR 1893 0 0x3da 8,86 # logicalor
-no 1893 0 0x3d8 8,20 # logicalnot
-te 1893 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 1893 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 1893 0 0x3c0 9,0 # aleph
-Im 1893 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 1893 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 1893 0 0x3a5 8,19 # infinity
-md 1893 0 0x3b7 8,32 # dotmath
-mo 1893 0 0x3ce 8,15 # element
-mu 1893 0 0x3b4 8,39 # multiply
-nc 1893 0 0x3cb 8,197 # notpropersuperset
-nm 1893 0 0x3cf 8,209 # notelement
-pl 927 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 1947 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 1947 0 0x3b5 6,4 # proportional
-pp 1947 0 0x35e 8,89 # perpendicular
-sb 1947 0 0x3cc 6,67 # propersubset
-sp 1947 0 0x3c9 6,68 # propersuperset
-ib 1947 0 0x3cd 6,69 # reflexsubset
-ip 1947 0 0x3ca 6,70 # reflexsuperset
-ap 1947 0 0x37e 6,12 # similar
-pd 1947 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 1947 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 1947 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 2620 0 0xef 6,16 # intersection "intersection, cap"
-cu 2620 0 0x3c8 6,66 # union "union, cup"
-di 1947 0 0x3b8 6,8 # divide "division sign"
--h 3333 0 0xc4 3,8 # hbar
-gr 3333 0 0x3d1 6,33 # gradient
-es 2593 0 0x3c6 0,79 # emptyset
-CL 2510 0 0x5 5,168 # club "club suit"
-SP 2510 0 0x6 5,171 # spade "spade suit"
-HE 2510 0 0x3 5,170 # heart "heart suit"
-DI 2510 0 0x4 5,169 # diamond "diamond suit"
-CR 2510 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 2510 0 0x327 6,71 # suchthat
-/_ 2510 0 0x3d0 6,79 # angle
-<< 1853 0 0xae 6,77 # "" "much less"
->> 1853 0 0xaf 6,78 # "" "much greater"
-wp 1853 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 1853 0 0x3e0 6,95 # lozenge
-an 3333 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 927 0 0xfa 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/HNB b/contrib/groff/font/devlbp/HNB
deleted file mode 100644
index c5d8d33d0e4b..000000000000
--- a/contrib/groff/font/devlbp/HNB
+++ /dev/null
@@ -1,491 +0,0 @@
-name HNB
-lbpname Swiss-Narrow-Bold
-special
-spacewidth 228
-slant 0
-ligatures fi fl 0
-charset
-ha 280 2 0x4c3 0,94 # asciicircum
-ti 280 0 0x4c4 0,126 # asciitilde
-vS 280 2 0x169 1,176 # Scaron
-vZ 280 2 0x16e 1,206 # Zcaron
-vs 280 2 0x173 1,177 # scaron
-vz 280 2 0x174 1,207 # zcaron
-:Y 280 2 0x16d 1,74 # Ydieresis
-tm 280 2 0x170 4,41 # trademark
-aq 195 2 0x27 0,39 # quotesingle
-space 228 0 0x20 0,32
-! 273 2 0x21 0,33 # exclam
-" 389 2 0x22 0,34 # quotedbl
-dq 389 2 0x22 0,34 # quotedbl
-# 456 2 0x23 0,35 # numbersign
-sh 456 2 0x23 0,35 # "
-$ 456 2 0x24 0,36 # dollar
-Do 456 2 0x24 0,36 # "
-% 720 2 0x25 0,37 # percent
-& 592 2 0x26 0,38 # ampersand
-' 195 2 0x27 0,39 # quoteright
-cq 195 2 0x27 0,39 # quoteright
-( 273 2 0x28 0,40 # parenleft
-) 273 2 0x29 0,41 # parenright
-* 319 2 0x2a 0,42 # asterisk
-+ 479 0 0x2b 0,43 # plus
-, 228 0 0x2c 0,44 # comma
-- 479 0 0x2d 0,45 # hyphen
-hy 479 0 0x2d 0,45 # "
-char173 479 0 0x2d 0,45 # "
-. 228 0 0x2e 0,46 # period
-/ 228 2 0x2f 0,47 # slash
-sl 228 2 0x2f 0,47 # "
-0 456 2 0x30 0,48 # zero
-1 456 2 0x31 0,49 # one
-2 456 2 0x32 0,50 # two
-3 456 2 0x33 0,51 # three
-4 456 2 0x34 0,52 # four
-5 456 2 0x35 0,53 # five
-6 456 2 0x36 0,54 # six
-7 456 2 0x37 0,55 # seven
-8 456 2 0x38 0,56 # eight
-9 456 2 0x39 0,57 # nine
-: 273 0 0x3a 0,58 # colon
-; 273 0 0x3b 0,59 # semicolon
-< 479 0 0x3c 0,60 # less
-= 479 0 0x3d 0,61 # equal
-> 479 0 0x3e 0,62 # greater
-? 501 2 0x3f 0,63 # question
-@ 800 2 0x40 0,64 # at
-at 800 2 0x40 0,64 # "
-A 592 2 0x41 0,65 # A
-B 592 2 0x42 0,66 # B
-C 592 2 0x43 0,67 # C
-D 592 2 0x44 0,68 # D
-E 547 2 0x45 0,69 # E
-F 501 2 0x46 0,70 # F
-G 638 2 0x47 0,71 # G
-H 592 2 0x48 0,72 # H
-I 228 2 0x49 0,73 # I
-J 456 2 0x4a 0,74 # J
-K 592 2 0x4b 0,75 # K
-L 501 2 0x4c 0,76 # L
-M 683 2 0x4d 0,77 # M
-N 592 2 0x4e 0,78 # N
-O 638 2 0x4f 0,79 # O
-P 547 2 0x50 0,80 # P
-Q 638 2 0x51 0,81 # Q
-R 592 2 0x52 0,82 # R
-S 547 2 0x53 0,83 # S
-T 501 2 0x54 0,84 # T
-U 592 2 0x55 0,85 # U
-V 547 2 0x56 0,86 # V
-W 774 2 0x57 0,87 # W
-X 547 2 0x58 0,88 # X
-Y 547 2 0x59 0,89 # Y
-Z 501 2 0x5a 0,90 # Z
-[ 273 2 0x5b 0,91 # bracketleft
-lB 273 2 0x5b 0,91 # "
-\ 228 2 0x5c 0,92 # backslash
-rs 228 2 0x5c 0,92 # "
-] 273 2 0x5d 0,93 # bracketright
-rB 273 2 0x5d 0,93 # "
-a^ 280 2 0x5e 0,94 # circumflex
-^ 280 2 0x5e 0,94 # "
-_ 456 0 0x5f 0,95 # underscore
-` 280 2 0x60 0,96 # quoteleft
-oq 280 2 0x60 0,96 # "
-a 456 0 0x61 0,97 # a
-b 501 2 0x62 0,98 # b
-c 456 0 0x63 0,99 # c
-d 501 2 0x64 0,100 # d
-e 456 0 0x65 0,101 # e
-f 273 2 0x66 0,102 # f
-g 501 1 0x67 0,103 # g
-h 501 2 0x68 0,104 # h
-i 228 2 0x69 0,105 # i
-j 228 2 0x6a 0,106 # j
-k 456 2 0x6b 0,107 # k
-l 228 2 0x6c 0,108 # l
-m 729 0 0x6d 0,109 # m
-n 501 0 0x6e 0,110 # n
-o 501 0 0x6f 0,111 # o
-p 501 1 0x70 0,112 # p
-q 501 1 0x71 0,113 # q
-r 319 0 0x72 0,114 # r
-s 456 0 0x73 0,115 # s
-t 273 2 0x74 0,116 # t
-u 501 0 0x75 0,117 # u
-v 456 0 0x76 0,118 # v
-w 638 0 0x77 0,119 # w
-x 456 0 0x78 0,120 # x
-y 456 1 0x79 0,121 # y
-z 410 0 0x7a 0,122 # z
-lC 319 2 0x7b 0,123 # braceleft
-{ 319 2 0x7b 0,123 # "
-| 230 2 0x7c 0,124 # "
-rC 319 2 0x7d 0,125 # braceright
-} 319 2 0x7d 0,125 # "
-a~ 280 2 0x7e 0,126 # tilde
-~ 280 2 0x7e 0,126 # "
-char161 273 1 0xad 4,7 # exclamdown
-char162 456 2 0x9b 4,19 # cent
-char163 456 2 0x9c 4,11 # sterling
-char164 456 2 0x12f 4,24 # currency
-char165 456 2 0x9d 4,12 # yen
-char166 230 2 0x7c 0,124 # brokenbar
-char167 456 2 0x15 4,6 # section
-char168 273 2 0x122 1,7 # dieresis
-char169 604 2 0x154 4,23 # copyright
-char170 303 2 0xa6 4,15 # ordfeminine
-char171 456 0 0xae 4,9 # guillemotleft
-char172 479 0 0xaa 6,20 # logicalnot
-char173 456 0 0x132 4,33 # hyphen
-char174 604 2 0x155 4,22 # registered
-char175 500 2 0x2d 6,0 # macron
-char176 328 2 0xf8 6,36 # degree
-char177 479 0 0xf1 6,1 # plusminus
-char178 273 2 0xfd 4,20 # twosuperior
-char179 273 2 0x14d 4,26 # threesuperior
-char180 273 2 0x120 1,6 # acute "acute accent"
-char181 501 1 0xe6 8,25 # mu
-char182 456 2 0x14 4,5 # paragraph
-char183 240 0 0xfa 6,32 # periodcentered
-char184 273 0 0x139 1,17 # cedilla
-char185 273 2 0x156 4,78 # onesuperior
-char186 299 2 0xa7 4,16 # ordmasculine
-char187 456 0 0xaf 4,10 # guillemotright
-char188 684 2 0xac 4,18 # onequarter
-char189 684 2 0xab 4,17 # onehalf
-char190 684 2 0x12e 4,25 # threequarters
-char191 501 1 0xa8 4,8 # questiondown
-char192 501 2 0x15c 1,32 # Agrave
-char193 501 2 0x15a 1,26 # Aacute
-char194 501 2 0x15b 1,28 # Acircumflex
-char195 501 2 0x28e 1,76 # Atilde
-char196 592 2 0x8e 1,30 # Adieresis
-char197 592 2 0x8f 1,34 # Aring
-char198 820 2 0x92 1,36 # AE
-char199 592 2 0x80 1,38 # Ccedilla
-char200 592 2 0x160 1,46 # Egrave
-char201 547 2 0x90 1,40 # Eacute
-char202 547 2 0x15e 1,42 # Ecircumflex
-char203 547 2 0x15f 1,44 # Edieresis
-char204 547 2 0x164 1,54 # Igrave
-char205 547 2 0x161 1,48 # Iacute
-char206 547 2 0x162 1,50 # Icircumflex
-char207 547 2 0x163 1,52 # Idieresis
-char208 592 2 0x13d 1,78 # Eth
-char209 592 2 0xa5 1,56 # Ntilde
-char210 592 2 0x167 1,64 # Ograve
-char211 592 2 0x165 1,58 # Oacute
-char212 592 2 0x166 1,60 # Ocircumflex
-char213 592 2 0x168 1,82 # Otilde
-char214 638 2 0x99 1,62 # Odieresis
-char215 479 0 0x157 6,39 # multiply
-char216 638 2 0x140 1,80 # Oslash
-char217 638 2 0x16c 1,72 # Ugrave
-char218 638 2 0x16a 1,66 # Uacute
-char219 638 2 0x16b 1,68 # Ucircumflex
-char220 592 2 0x9a 1,70 # Udieresis
-char221 592 2 0x16f 1,84 # Yacute
-char222 547 2 0x13e 1,88 # Thorn
-char223 501 2 0x147 1,23 # germandbls
-char224 456 2 0x85 1,33 # agrave
-char225 456 2 0xa0 1,27 # aacute
-char226 456 2 0x83 1,29 # acircumflex
-char227 456 2 0x284 1,93 # atilde
-char228 456 2 0x84 1,31 # adieresis
-char229 456 2 0x86 1,35 # aring
-char230 729 0 0x91 1,37 # ae
-char231 456 0 0x87 1,39 # ccedilla
-char232 456 2 0x8a 1,47 # egrave
-char233 456 2 0x82 1,41 # eacute
-char234 456 2 0x88 1,43 # ecircumflex
-char235 456 2 0x89 1,45 # edieresis
-char236 228 2 0x8d 1,55 # igrave
-char237 228 2 0xa1 1,49 # iacute
-char238 228 2 0x8c 1,51 # icircumflex
-char239 228 2 0x8b 1,53 # idieresis
-char240 501 2 0x148 1,87 # eth
-char241 501 2 0xa4 1,57 # ntilde
-char242 501 2 0x95 1,65 # ograve
-char243 501 2 0xa2 1,59 # oacute
-char244 501 2 0x93 1,61 # ocircumflex
-char245 501 2 0x172 1,83 # otilde
-char246 501 2 0x94 1,63 # odieresis
-char247 479 0 0xf6 6,8 # divide
-char248 501 0 0x145 1,81 # oslash
-char249 501 2 0x97 1,73 # ugrave
-char250 501 2 0xa3 1,67 # uacute
-char251 501 2 0x96 1,69 # ucircumflex
-char252 501 2 0x81 1,71 # udieresis
-char253 501 3 0x175 1,85 # yacute
-char254 501 3 0x143 1,89 # thorn
-char255 456 3 0x98 1,75 # ydieresis
--D 592 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 501 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 547 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 501 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 820 2 0x92 1,36 # AE
-ae 729 0 0x91 1,37 # ae
-OE 820 2 0x141 1,166 # OE
-oe 774 0 0x146 1,167 # oe
-ij 450 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 501 2 0x147 1,23 # germandbls
-'A 501 2 0x15a 1,26 # Aacute
-'E 547 2 0x90 1,40 # Eacute
-'I 547 2 0x161 1,48 # Iacute
-'O 547 2 0x165 1,58 # Oacute
-'U 547 2 0x16a 1,66 # Uacute
-'a 456 2 0xa0 1,27 # aacute
-'e 456 2 0x82 1,41 # eacute
-'i 228 2 0xa1 1,49 # iacute
-'o 501 2 0xa2 1,59 # oacute
-'u 501 2 0x95 1,65 # uacute
-:A 592 2 0x8e 1,30 # Adieresis
-:E 592 2 0x15f 1,44 # Edieresis
-:I 592 2 0x163 1,52 # Idieresis
-:O 638 2 0x99 1,62 # Odieresis
-:U 592 2 0x9a 1,70 # Udieresis
-:Y 592 2 0x16d 1,74 # Ydieresis
-:a 456 2 0x84 1,31 # adieresis
-:e 456 2 0x89 1,45 # edieresis
-:i 228 2 0x8b 1,53 # idieresis
-:o 501 2 0x94 1,63 # odieresis
-:u 501 2 0x81 1,71 # udieresis
-:y 456 3 0x98 1,75 # ydieresis
-^A 456 2 0x15b 1,28 # Acircumflex
-^E 456 2 0x15e 1,42 # Ecircumflex
-^I 456 2 0x162 1,50 # Icircumflex
-^O 456 2 0x166 1,60 # Ocircumflex
-^U 456 2 0x16b 1,68 # Ucircumflex
-^a 456 2 0x83 1,29 # acircumflex
-^e 456 2 0x88 1,43 # ecircumflex
-^i 228 2 0x8c 1,51 # icircumflex
-^o 501 2 0x93 1,61 # ocircumflex
-^u 501 2 0x96 1,69 # ucircumflex
-`A 501 2 0x15c 1,32 # Agrave
-`E 501 2 0x160 1,46 # Egrave
-`I 501 2 0x164 1,54 # Igrave
-`O 501 2 0x167 1,64 # Ograve
-`U 501 2 0x16c 1,72 # Ugrave
-`a 456 2 0x85 1,33 # agrave
-~a 456 2 0x284 --- # atilde
-`e 456 2 0x8a 1,47 # egrave
-`i 228 2 0x8d 1,55 # igrave
-`o 501 2 0x95 1,65 # ograve
-`u 501 2 0x97 1,73 # ugrave
-~A 501 2 0x28e 1,26 # Atilde
-~N 592 2 0xa5 1,56 # Ntilde
-~O 592 2 0x168 1,82 # Otilde
-~n 501 2 0xa4 1,57 # ntilde
-~o 501 2 0x172 1,83 # otilde
-vS 501 2 0x169 1,176 # Scaron
-vs 501 2 0x173 1,177 # scaron
-vZ 501 2 0x16e 1,206 # Zcaron
-vz 501 2 0x174 1,207 # zcaron
-,C 592 2 0x80 1,38 # Ccedilla
-,c 456 0 0x87 1,39 # ccedilla
-/L 501 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 228 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 638 2 0x140 1,80 # Oslash
-/o 501 0 0x145 1,81 # oslash
-oA 592 2 0x8f 1,34 # Aring
-oa 456 2 0x86 1,35 # aring
-a" 273 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 273 2 0x135 1,8 # macron "macron or bar accent"
-a. 273 2 0x137 1,15 # dotaccent "dot accent"
-a^ 273 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 273 2 0x120 1,6 # acute "acute accent"
-ga 273 2 0x121 1,0 # grave "grave accent"
-ab 273 2 0x136 1,22 # breve "breve accent"
-ac 273 0 0x139 1,17 # cedilla "cedilla accent"
-ad 273 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 273 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 273 2 0x138 1,14 # ring "ring or circle accent"
-a~ 273 2 0x7e 1,2 # tilde "tilde accent"
-ho 273 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 228 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 456 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 456 2 0x24 0,36 # dollar
-Po 456 2 0x9c 4,11 # sterling
-Ye 456 2 0x9d 4,12 # yen
-Fn 456 2 0x9f 4,14 # florin
-ct 456 2 0x9b 4,19 # cent
-Fo 456 0 0xae 4,9 # guillemotleft
-Fc 273 0 0x4bb 4,20 # guillemotright
-fo 273 0 0x127 4,35 # guilsinglleft
-fc 273 0 0x128 4,36 # guilsinglright
-r! 273 1 0xad 4,7 # exclamdown
-r? 501 1 0xa8 4,8 # questiondown
-fi 501 2 0x130 4,54 # fi "fi ligature"
-fl 501 2 0x131 4,55 # fl "fl ligature"
-OK 501 0 0x3d6 --- # \& "check mark, tick"
-Of 303 2 0xa6 4,15 # ordfeminine
-Om 299 2 0xa7 4,16 # ordmasculine
-S1 273 2 0x156 4,78 # onesuperior
-S2 273 2 0xfd 4,20 # twosuperior
-S3 273 2 0x14d 4,26 # threesuperior
-<- 809 0 0x1b 6,22 # arrowleft
--> 809 0 0x1a 6,21 # arrowright
-<> 854 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 494 0 0x19 6,24 # arrowdown
-ua 494 0 0x18 6,23 # arrowup
-va 494 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 494 0 0x3dc 6,57 # arrowdblleft
-rA 494 0 0x3de 6,56 # arrowdblright
-hA 494 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 494 0 0x3df 6,59 # arrowdbldown
-uA 494 0 0x3dd 6,58 # arrowdblup
-ba 820 2 0xb3 3,9 # bar
-bb 230 2 0x7c 0,124 # brokenbar
-br 820 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 820 0 0x123 4,34 # ru "baseline rule"
-ul 456 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 820 0 0x3f4 3,9 # bv "bold vertical"
-ci 699 0 0x9 4,1 # circle
-bu 522 0 0x7 4,0 # bullet
-co 604 2 0x154 4,23 # copyright
-rg 604 2 0x155 4,22 # registered
-tm 604 2 0x170 4,41 # trademark
-dd 456 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 456 2 0x12a 4,39 # dagger
-ps 456 2 0x14 4,5 # paragraph
-sc 456 2 0x15 4,6 # section
-de 328 2 0xf8 6,36 # degree
-em 820 0 0x123 4,34 # emdash "em dash"
-en 456 0 0x132 4,33 # endash "en dash"
-%0 820 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 684 2 0xab 4,17 # onehalf
-14 684 2 0xac 4,18 # onequarter
-34 684 2 0x12e 4,25 # threequarters
-f/ 137 2 0x158 6,6 # fraction "bar for fractions"
-fm 137 0 0x3a2 6,45 # minute "footmark, prime"
-sd 137 0 0x3b2 6,46 # second
-ha 137 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 137 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 500 0 0x2d 6,0 # hyphen
-lB 273 2 0x5b 0,91 # bracketleft
-rB 273 2 0x5d 0,93 # bracketright
-lC 319 2 0x7b 0,123 # braceleft
-rC 319 2 0x7d 0,125 # braceright
-la 319 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 319 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 410 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 410 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 410 2 0x125 4,32 # quotedblleft
-rq 410 2 0x4ba 6,31 # quotedblright
-oq 228 2 0x176 4,29 # quoteleft "single open quote"
-aq 195 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 230 0 0x3f4 0,124 # bar
-at 800 2 0x40 0,64 # at
-.C1 479 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 456 2 0x23 0,35 # numbersign
-sl 228 2 0x2f 0,47 # slash
-rs 228 2 0x5c 0,92 # backslash
-3d 228 0 0x35c 6,102 # therefore
-tf 228 0 0x35c 6,102 # therefore
-*A 228 0 0x341 8,0 # Alpha
-*B 228 0 0x342 8,2 # Beta
-*C 228 0 0x358 8,28 # Xi
-*D 228 0 0x344 8,8 # Delta
-*E 228 0 0x345 8,10 # Epsilon
-*F 609 0 0x346 8,44 # Phi
-*G 481 0 0x347 8,6 # Gamma
-*H 481 0 0x351 8,16 # Theta
-*I 481 0 0x349 8,18 # Iota
-*K 481 0 0x34b 8,20 # Kappa
-*L 481 0 0x34c 8,22 # Lambda
-*M 481 0 0x34d 8,24 # Mu
-*N 481 0 0x34e 8,26 # Nu
-*O 481 0 0x34f 8,30 # Omicron
-*P 481 0 0x350 8,32 # Pi
-*Q 481 0 0x359 8,48 # Psi
-*R 481 0 0x352 8,34 # Rho
-*S 481 0 0x353 8,36 # Sigma
-*T 481 0 0x354 8,40 # Tau
-*U 481 0 0x3a1 8,76 # Upsilon
-*W 630 0 0x357 8,50 # Omega
-*X 481 0 0x343 8,36 # Chi
-*Y 481 0 0x348 8,14 # Eta
-*Z 481 0 0x35a 8,12 # Zeta
-*a 499 0 0xe0 8,1 # alpha
-*b 499 0 0xe1 8,3 # beta
-*c 499 0 0x378 8,29 # xi
-*d 487 0 0xeb 8,9 # delta
-*e 487 0 0x36e 8,70 # epsilon
-*f 487 0 0x366 8,45 # phi
-+f 487 0 0x36a 8,77 # phi1 "variant phi"
-*g 487 0 0x367 8,7 # gamma
-*h 486 0 0xe9 8,17 # theta
-+h 486 0 0x375 8,71 # theta1 "variant theta"
-*i 486 0 0x369 8,19 # iota
-*k 486 0 0x36b 8,21 # kappa
-*l 486 0 0x36c 8,23 # lambda
-*m 501 0 0xe6 8,25 # mu
-*n 501 0 0x36e 8,27 # nu
-*o 501 0 0x36f 8,31 # omicron
-*p 527 0 0xe3 8,33 # pi
-+p 527 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 527 0 0x379 8,49 # psi
-*r 527 0 0x372 8,35 # rho
-*s 531 0 0xe5 8,37 # sigma
-*t 375 0 0xe7 8,41 # tau
-*u 375 0 0x375 8,27 # upsilon
-*w 375 0 0x377 8,51 # omega
-*x 375 0 0x363 8,47 # chi
-*y 375 0 0x368 8,15 # eta
-*z 375 0 0x37a 8,13 # zeta
-ts 375 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 655 0 0xf7 6,13 # approxequal
-~= 655 0 0xf7 6,13 # approxequal
-!= 655 0 0x3b9 6,99 # notequal
-** 228 0 0x32a 0,32 # asteriskmath
-+- 479 0 0xf1 6,1 # plusminus
-<= 592 0 0xf3 6,2 # lessequal
-== 592 0 0x3ba 8,14 # equivalence
-=~ 592 0 0x340 8,116 # congruent
->= 499 0 0x3b3 8,3 # greaterequal
-AN 499 0 0x3d9 8,85 # logicaland
-OR 499 0 0x3da 8,86 # logicalor
-no 499 0 0x3d8 8,20 # logicalnot
-te 499 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 499 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 499 0 0x3c0 9,0 # aleph
-Im 499 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 499 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 499 0 0x3a5 8,19 # infinity
-md 499 0 0x3b7 8,32 # dotmath
-mo 499 0 0x3ce 8,15 # element
-mu 499 0 0x3b4 8,39 # multiply
-nc 499 0 0x3cb 8,197 # notpropersuperset
-nm 499 0 0x3cf 8,209 # notelement
-pl 273 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 479 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 479 0 0x3b5 6,4 # proportional
-pp 479 0 0x35e 8,89 # perpendicular
-sb 479 0 0x3cc 6,67 # propersubset
-sp 479 0 0x3c9 6,68 # propersuperset
-ib 479 0 0x3cd 6,69 # reflexsubset
-ip 479 0 0x3ca 6,70 # reflexsuperset
-ap 479 0 0x37e 6,12 # similar
-pd 479 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 479 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 479 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 645 0 0xef 6,16 # intersection "intersection, cap"
-cu 645 0 0x3c8 6,66 # union "union, cup"
-di 479 0 0x3b8 6,8 # divide "division sign"
--h 820 0 0xc4 3,8 # hbar
-gr 820 0 0x3d1 6,33 # gradient
-es 638 0 0x3c6 0,79 # emptyset
-CL 617 0 0x5 5,168 # club "club suit"
-SP 617 0 0x6 5,171 # spade "spade suit"
-HE 617 0 0x3 5,170 # heart "heart suit"
-DI 617 0 0x4 5,169 # diamond "diamond suit"
-CR 617 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 617 0 0x327 6,71 # suchthat
-/_ 617 0 0x3d0 6,79 # angle
-<< 456 0 0xae 6,77 # "" "much less"
->> 456 0 0xaf 6,78 # "" "much greater"
-wp 456 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 456 0 0x3e0 6,95 # lozenge
-an 820 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 240 0 0xfa 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/HNBI b/contrib/groff/font/devlbp/HNBI
deleted file mode 100644
index 14bd4e3dd9bf..000000000000
--- a/contrib/groff/font/devlbp/HNBI
+++ /dev/null
@@ -1,491 +0,0 @@
-name HNBI
-lbpname Swiss-Narrow-BoldOblique
-special
-spacewidth 228
-slant 0
-ligatures fi fl 0
-charset
-ha 280 2 0x4c3 0,94 # asciicircum
-ti 280 0 0x4c4 0,126 # asciitilde
-vS 280 2 0x169 1,176 # Scaron
-vZ 280 2 0x16e 1,206 # Zcaron
-vs 280 2 0x173 1,177 # scaron
-vz 280 2 0x174 1,207 # zcaron
-:Y 280 2 0x16d 1,74 # Ydieresis
-tm 280 2 0x170 4,41 # trademark
-aq 195 2 0x27 0,39 # quotesingle
-space 228 0 0x20 0,32
-! 273 2 0x21 0,33 # exclam
-" 389 2 0x22 0,34 # quotedbl
-dq 389 2 0x22 0,34 # quotedbl
-# 456 2 0x23 0,35 # numbersign
-sh 456 2 0x23 0,35 # "
-$ 456 2 0x24 0,36 # dollar
-Do 456 2 0x24 0,36 # "
-% 720 2 0x25 0,37 # percent
-& 592 2 0x26 0,38 # ampersand
-' 195 2 0x27 0,39 # quoteright
-cq 195 2 0x27 0,39 # quoteright
-( 273 2 0x28 0,40 # parenleft
-) 273 2 0x29 0,41 # parenright
-* 319 2 0x2a 0,42 # asterisk
-+ 479 0 0x2b 0,43 # plus
-, 228 0 0x2c 0,44 # comma
-- 479 0 0x2d 0,45 # hyphen
-hy 479 0 0x2d 0,45 # "
-char173 479 0 0x2d 0,45 # "
-. 228 0 0x2e 0,46 # period
-/ 228 2 0x2f 0,47 # slash
-sl 228 2 0x2f 0,47 # "
-0 456 2 0x30 0,48 # zero
-1 456 2 0x31 0,49 # one
-2 456 2 0x32 0,50 # two
-3 456 2 0x33 0,51 # three
-4 456 2 0x34 0,52 # four
-5 456 2 0x35 0,53 # five
-6 456 2 0x36 0,54 # six
-7 456 2 0x37 0,55 # seven
-8 456 2 0x38 0,56 # eight
-9 456 2 0x39 0,57 # nine
-: 273 0 0x3a 0,58 # colon
-; 273 0 0x3b 0,59 # semicolon
-< 479 0 0x3c 0,60 # less
-= 479 0 0x3d 0,61 # equal
-> 479 0 0x3e 0,62 # greater
-? 501 2 0x3f 0,63 # question
-@ 800 2 0x40 0,64 # at
-at 800 2 0x40 0,64 # "
-A 592 2 0x41 0,65 # A
-B 592 2 0x42 0,66 # B
-C 592 2 0x43 0,67 # C
-D 592 2 0x44 0,68 # D
-E 547 2 0x45 0,69 # E
-F 501 2 0x46 0,70 # F
-G 638 2 0x47 0,71 # G
-H 592 2 0x48 0,72 # H
-I 228 2 0x49 0,73 # I
-J 456 2 0x4a 0,74 # J
-K 592 2 0x4b 0,75 # K
-L 501 2 0x4c 0,76 # L
-M 683 2 0x4d 0,77 # M
-N 592 2 0x4e 0,78 # N
-O 638 2 0x4f 0,79 # O
-P 547 2 0x50 0,80 # P
-Q 638 2 0x51 0,81 # Q
-R 592 2 0x52 0,82 # R
-S 547 2 0x53 0,83 # S
-T 501 2 0x54 0,84 # T
-U 592 2 0x55 0,85 # U
-V 547 2 0x56 0,86 # V
-W 774 2 0x57 0,87 # W
-X 547 2 0x58 0,88 # X
-Y 547 2 0x59 0,89 # Y
-Z 501 2 0x5a 0,90 # Z
-[ 273 2 0x5b 0,91 # bracketleft
-lB 273 2 0x5b 0,91 # "
-\ 228 2 0x5c 0,92 # backslash
-rs 228 2 0x5c 0,92 # "
-] 273 2 0x5d 0,93 # bracketright
-rB 273 2 0x5d 0,93 # "
-a^ 280 2 0x5e 0,94 # circumflex
-^ 280 2 0x5e 0,94 # "
-_ 456 0 0x5f 0,95 # underscore
-` 280 2 0x60 0,96 # quoteleft
-oq 280 2 0x60 0,96 # "
-a 456 0 0x61 0,97 # a
-b 501 2 0x62 0,98 # b
-c 456 0 0x63 0,99 # c
-d 501 2 0x64 0,100 # d
-e 456 0 0x65 0,101 # e
-f 273 2 0x66 0,102 # f
-g 501 1 0x67 0,103 # g
-h 501 2 0x68 0,104 # h
-i 228 2 0x69 0,105 # i
-j 228 2 0x6a 0,106 # j
-k 456 2 0x6b 0,107 # k
-l 228 2 0x6c 0,108 # l
-m 729 0 0x6d 0,109 # m
-n 501 0 0x6e 0,110 # n
-o 501 0 0x6f 0,111 # o
-p 501 1 0x70 0,112 # p
-q 501 1 0x71 0,113 # q
-r 319 0 0x72 0,114 # r
-s 456 0 0x73 0,115 # s
-t 273 2 0x74 0,116 # t
-u 501 0 0x75 0,117 # u
-v 456 0 0x76 0,118 # v
-w 638 0 0x77 0,119 # w
-x 456 0 0x78 0,120 # x
-y 456 1 0x79 0,121 # y
-z 410 0 0x7a 0,122 # z
-lC 319 2 0x7b 0,123 # braceleft
-{ 319 2 0x7b 0,123 # "
-| 230 2 0x7c 0,124 # "
-rC 319 2 0x7d 0,125 # braceright
-} 319 2 0x7d 0,125 # "
-a~ 280 2 0x7e 0,126 # tilde
-~ 280 2 0x7e 0,126 # "
-char161 273 1 0xad 4,7 # exclamdown
-char162 456 2 0x9b 4,19 # cent
-char163 456 2 0x9c 4,11 # sterling
-char164 456 2 0x12f 4,24 # currency
-char165 456 2 0x9d 4,12 # yen
-char166 230 2 0x7c 0,124 # brokenbar
-char167 456 2 0x15 4,6 # section
-char168 273 2 0x122 1,7 # dieresis
-char169 604 2 0x154 4,23 # copyright
-char170 303 2 0xa6 4,15 # ordfeminine
-char171 456 0 0xae 4,9 # guillemotleft
-char172 479 0 0xaa 6,20 # logicalnot
-char173 456 0 0x132 4,33 # hyphen
-char174 604 2 0x155 4,22 # registered
-char175 500 2 0x2d 6,0 # macron
-char176 328 2 0xf8 6,36 # degree
-char177 479 0 0xf1 6,1 # plusminus
-char178 273 2 0xfd 4,20 # twosuperior
-char179 273 2 0x14d 4,26 # threesuperior
-char180 273 2 0x120 1,6 # acute "acute accent"
-char181 501 1 0xe6 8,25 # mu
-char182 456 2 0x14 4,5 # paragraph
-char183 240 0 0xfa 6,32 # periodcentered
-char184 273 0 0x139 1,17 # cedilla
-char185 273 2 0x156 4,78 # onesuperior
-char186 299 2 0xa7 4,16 # ordmasculine
-char187 456 0 0xaf 4,10 # guillemotright
-char188 684 2 0xac 4,18 # onequarter
-char189 684 2 0xab 4,17 # onehalf
-char190 684 2 0x12e 4,25 # threequarters
-char191 501 1 0xa8 4,8 # questiondown
-char192 501 2 0x15c 1,32 # Agrave
-char193 501 2 0x15a 1,26 # Aacute
-char194 501 2 0x15b 1,28 # Acircumflex
-char195 501 2 0x28e 1,76 # Atilde
-char196 592 2 0x8e 1,30 # Adieresis
-char197 592 2 0x8f 1,34 # Aring
-char198 820 2 0x92 1,36 # AE
-char199 592 2 0x80 1,38 # Ccedilla
-char200 592 2 0x160 1,46 # Egrave
-char201 547 2 0x90 1,40 # Eacute
-char202 547 2 0x15e 1,42 # Ecircumflex
-char203 547 2 0x15f 1,44 # Edieresis
-char204 547 2 0x164 1,54 # Igrave
-char205 547 2 0x161 1,48 # Iacute
-char206 547 2 0x162 1,50 # Icircumflex
-char207 547 2 0x163 1,52 # Idieresis
-char208 592 2 0x13d 1,78 # Eth
-char209 592 2 0xa5 1,56 # Ntilde
-char210 592 2 0x167 1,64 # Ograve
-char211 592 2 0x165 1,58 # Oacute
-char212 592 2 0x166 1,60 # Ocircumflex
-char213 592 2 0x168 1,82 # Otilde
-char214 638 2 0x99 1,62 # Odieresis
-char215 479 0 0x157 6,39 # multiply
-char216 638 2 0x140 1,80 # Oslash
-char217 638 2 0x16c 1,72 # Ugrave
-char218 638 2 0x16a 1,66 # Uacute
-char219 638 2 0x16b 1,68 # Ucircumflex
-char220 592 2 0x9a 1,70 # Udieresis
-char221 592 2 0x16f 1,84 # Yacute
-char222 547 2 0x13e 1,88 # Thorn
-char223 501 2 0x147 1,23 # germandbls
-char224 456 2 0x85 1,33 # agrave
-char225 456 2 0xa0 1,27 # aacute
-char226 456 2 0x83 1,29 # acircumflex
-char227 456 2 0x284 1,93 # atilde
-char228 456 2 0x84 1,31 # adieresis
-char229 456 2 0x86 1,35 # aring
-char230 729 0 0x91 1,37 # ae
-char231 456 0 0x87 1,39 # ccedilla
-char232 456 2 0x8a 1,47 # egrave
-char233 456 2 0x82 1,41 # eacute
-char234 456 2 0x88 1,43 # ecircumflex
-char235 456 2 0x89 1,45 # edieresis
-char236 228 2 0x8d 1,55 # igrave
-char237 228 2 0xa1 1,49 # iacute
-char238 228 2 0x8c 1,51 # icircumflex
-char239 228 2 0x8b 1,53 # idieresis
-char240 501 2 0x148 1,87 # eth
-char241 501 2 0xa4 1,57 # ntilde
-char242 501 2 0x95 1,65 # ograve
-char243 501 2 0xa2 1,59 # oacute
-char244 501 2 0x93 1,61 # ocircumflex
-char245 501 2 0x172 1,83 # otilde
-char246 501 2 0x94 1,63 # odieresis
-char247 479 0 0xf6 6,8 # divide
-char248 501 0 0x145 1,81 # oslash
-char249 501 2 0x97 1,73 # ugrave
-char250 501 2 0xa3 1,67 # uacute
-char251 501 2 0x96 1,69 # ucircumflex
-char252 501 2 0x81 1,71 # udieresis
-char253 501 3 0x175 1,85 # yacute
-char254 501 3 0x143 1,89 # thorn
-char255 456 3 0x98 1,75 # ydieresis
--D 592 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 501 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 547 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 501 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 820 2 0x92 1,36 # AE
-ae 729 0 0x91 1,37 # ae
-OE 820 2 0x141 1,166 # OE
-oe 774 0 0x146 1,167 # oe
-ij 450 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 501 2 0x147 1,23 # germandbls
-'A 501 2 0x15a 1,26 # Aacute
-'E 547 2 0x90 1,40 # Eacute
-'I 547 2 0x161 1,48 # Iacute
-'O 547 2 0x165 1,58 # Oacute
-'U 547 2 0x16a 1,66 # Uacute
-'a 456 2 0xa0 1,27 # aacute
-'e 456 2 0x82 1,41 # eacute
-'i 228 2 0xa1 1,49 # iacute
-'o 501 2 0xa2 1,59 # oacute
-'u 501 2 0x95 1,65 # uacute
-:A 592 2 0x8e 1,30 # Adieresis
-:E 592 2 0x15f 1,44 # Edieresis
-:I 592 2 0x163 1,52 # Idieresis
-:O 638 2 0x99 1,62 # Odieresis
-:U 592 2 0x9a 1,70 # Udieresis
-:Y 592 2 0x16d 1,74 # Ydieresis
-:a 456 2 0x84 1,31 # adieresis
-:e 456 2 0x89 1,45 # edieresis
-:i 228 2 0x8b 1,53 # idieresis
-:o 501 2 0x94 1,63 # odieresis
-:u 501 2 0x81 1,71 # udieresis
-:y 456 3 0x98 1,75 # ydieresis
-^A 456 2 0x15b 1,28 # Acircumflex
-^E 456 2 0x15e 1,42 # Ecircumflex
-^I 456 2 0x162 1,50 # Icircumflex
-^O 456 2 0x166 1,60 # Ocircumflex
-^U 456 2 0x16b 1,68 # Ucircumflex
-^a 456 2 0x83 1,29 # acircumflex
-^e 456 2 0x88 1,43 # ecircumflex
-^i 228 2 0x8c 1,51 # icircumflex
-^o 501 2 0x93 1,61 # ocircumflex
-^u 501 2 0x96 1,69 # ucircumflex
-`A 501 2 0x15c 1,32 # Agrave
-`E 501 2 0x160 1,46 # Egrave
-`I 501 2 0x164 1,54 # Igrave
-`O 501 2 0x167 1,64 # Ograve
-`U 501 2 0x16c 1,72 # Ugrave
-`a 456 2 0x85 1,33 # agrave
-~a 456 2 0x284 --- # atilde
-`e 456 2 0x8a 1,47 # egrave
-`i 228 2 0x8d 1,55 # igrave
-`o 501 2 0x95 1,65 # ograve
-`u 501 2 0x97 1,73 # ugrave
-~A 501 2 0x28e 1,26 # Atilde
-~N 592 2 0xa5 1,56 # Ntilde
-~O 592 2 0x168 1,82 # Otilde
-~n 501 2 0xa4 1,57 # ntilde
-~o 501 2 0x172 1,83 # otilde
-vS 501 2 0x169 1,176 # Scaron
-vs 501 2 0x173 1,177 # scaron
-vZ 501 2 0x16e 1,206 # Zcaron
-vz 501 2 0x174 1,207 # zcaron
-,C 592 2 0x80 1,38 # Ccedilla
-,c 456 0 0x87 1,39 # ccedilla
-/L 501 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 228 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 638 2 0x140 1,80 # Oslash
-/o 501 0 0x145 1,81 # oslash
-oA 592 2 0x8f 1,34 # Aring
-oa 456 2 0x86 1,35 # aring
-a" 273 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 273 2 0x135 1,8 # macron "macron or bar accent"
-a. 273 2 0x137 1,15 # dotaccent "dot accent"
-a^ 273 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 273 2 0x120 1,6 # acute "acute accent"
-ga 273 2 0x121 1,0 # grave "grave accent"
-ab 273 2 0x136 1,22 # breve "breve accent"
-ac 273 0 0x139 1,17 # cedilla "cedilla accent"
-ad 273 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 273 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 273 2 0x138 1,14 # ring "ring or circle accent"
-a~ 273 2 0x7e 1,2 # tilde "tilde accent"
-ho 273 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 228 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 456 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 456 2 0x24 0,36 # dollar
-Po 456 2 0x9c 4,11 # sterling
-Ye 456 2 0x9d 4,12 # yen
-Fn 456 2 0x9f 4,14 # florin
-ct 456 2 0x9b 4,19 # cent
-Fo 456 0 0xae 4,9 # guillemotleft
-Fc 273 0 0x4bb 4,20 # guillemotright
-fo 273 0 0x127 4,35 # guilsinglleft
-fc 273 0 0x128 4,36 # guilsinglright
-r! 273 1 0xad 4,7 # exclamdown
-r? 501 1 0xa8 4,8 # questiondown
-fi 501 2 0x130 4,54 # fi "fi ligature"
-fl 501 2 0x131 4,55 # fl "fl ligature"
-OK 501 0 0x3d6 --- # \& "check mark, tick"
-Of 303 2 0xa6 4,15 # ordfeminine
-Om 299 2 0xa7 4,16 # ordmasculine
-S1 273 2 0x156 4,78 # onesuperior
-S2 273 2 0xfd 4,20 # twosuperior
-S3 273 2 0x14d 4,26 # threesuperior
-<- 809 0 0x1b 6,22 # arrowleft
--> 809 0 0x1a 6,21 # arrowright
-<> 854 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 494 0 0x19 6,24 # arrowdown
-ua 494 0 0x18 6,23 # arrowup
-va 494 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 494 0 0x3dc 6,57 # arrowdblleft
-rA 494 0 0x3de 6,56 # arrowdblright
-hA 494 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 494 0 0x3df 6,59 # arrowdbldown
-uA 494 0 0x3dd 6,58 # arrowdblup
-ba 820 2 0xb3 3,9 # bar
-bb 230 2 0x7c 0,124 # brokenbar
-br 820 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 820 0 0x123 4,34 # ru "baseline rule"
-ul 456 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 820 0 0x3f4 3,9 # bv "bold vertical"
-ci 699 0 0x9 4,1 # circle
-bu 522 0 0x7 4,0 # bullet
-co 604 2 0x154 4,23 # copyright
-rg 604 2 0x155 4,22 # registered
-tm 604 2 0x170 4,41 # trademark
-dd 456 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 456 2 0x12a 4,39 # dagger
-ps 456 2 0x14 4,5 # paragraph
-sc 456 2 0x15 4,6 # section
-de 328 2 0xf8 6,36 # degree
-em 820 0 0x123 4,34 # emdash "em dash"
-en 456 0 0x132 4,33 # endash "en dash"
-%0 820 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 684 2 0xab 4,17 # onehalf
-14 684 2 0xac 4,18 # onequarter
-34 684 2 0x12e 4,25 # threequarters
-f/ 137 2 0x158 6,6 # fraction "bar for fractions"
-fm 137 0 0x3a2 6,45 # minute "footmark, prime"
-sd 137 0 0x3b2 6,46 # second
-ha 137 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 137 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 500 0 0x2d 6,0 # hyphen
-lB 273 2 0x5b 0,91 # bracketleft
-rB 273 2 0x5d 0,93 # bracketright
-lC 319 2 0x7b 0,123 # braceleft
-rC 319 2 0x7d 0,125 # braceright
-la 319 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 319 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 410 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 410 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 410 2 0x125 4,32 # quotedblleft
-rq 410 2 0x4ba 6,31 # quotedblright
-oq 228 2 0x176 4,29 # quoteleft "single open quote"
-aq 195 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 230 0 0x3f4 0,124 # bar
-at 800 2 0x40 0,64 # at
-.C1 479 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 456 2 0x23 0,35 # numbersign
-sl 228 2 0x2f 0,47 # slash
-rs 228 2 0x5c 0,92 # backslash
-3d 228 0 0x35c 6,102 # therefore
-tf 228 0 0x35c 6,102 # therefore
-*A 228 0 0x341 8,0 # Alpha
-*B 228 0 0x342 8,2 # Beta
-*C 228 0 0x358 8,28 # Xi
-*D 228 0 0x344 8,8 # Delta
-*E 228 0 0x345 8,10 # Epsilon
-*F 609 0 0x346 8,44 # Phi
-*G 481 0 0x347 8,6 # Gamma
-*H 481 0 0x351 8,16 # Theta
-*I 481 0 0x349 8,18 # Iota
-*K 481 0 0x34b 8,20 # Kappa
-*L 481 0 0x34c 8,22 # Lambda
-*M 481 0 0x34d 8,24 # Mu
-*N 481 0 0x34e 8,26 # Nu
-*O 481 0 0x34f 8,30 # Omicron
-*P 481 0 0x350 8,32 # Pi
-*Q 481 0 0x359 8,48 # Psi
-*R 481 0 0x352 8,34 # Rho
-*S 481 0 0x353 8,36 # Sigma
-*T 481 0 0x354 8,40 # Tau
-*U 481 0 0x3a1 8,76 # Upsilon
-*W 630 0 0x357 8,50 # Omega
-*X 481 0 0x343 8,36 # Chi
-*Y 481 0 0x348 8,14 # Eta
-*Z 481 0 0x35a 8,12 # Zeta
-*a 499 0 0xe0 8,1 # alpha
-*b 499 0 0xe1 8,3 # beta
-*c 499 0 0x378 8,29 # xi
-*d 487 0 0xeb 8,9 # delta
-*e 487 0 0x36e 8,70 # epsilon
-*f 487 0 0x366 8,45 # phi
-+f 487 0 0x36a 8,77 # phi1 "variant phi"
-*g 487 0 0x367 8,7 # gamma
-*h 486 0 0xe9 8,17 # theta
-+h 486 0 0x375 8,71 # theta1 "variant theta"
-*i 486 0 0x369 8,19 # iota
-*k 486 0 0x36b 8,21 # kappa
-*l 486 0 0x36c 8,23 # lambda
-*m 501 0 0xe6 8,25 # mu
-*n 501 0 0x36e 8,27 # nu
-*o 501 0 0x36f 8,31 # omicron
-*p 527 0 0xe3 8,33 # pi
-+p 527 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 527 0 0x379 8,49 # psi
-*r 527 0 0x372 8,35 # rho
-*s 531 0 0xe5 8,37 # sigma
-*t 375 0 0xe7 8,41 # tau
-*u 375 0 0x375 8,27 # upsilon
-*w 375 0 0x377 8,51 # omega
-*x 375 0 0x363 8,47 # chi
-*y 375 0 0x368 8,15 # eta
-*z 375 0 0x37a 8,13 # zeta
-ts 375 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 655 0 0xf7 6,13 # approxequal
-~= 655 0 0xf7 6,13 # approxequal
-!= 655 0 0x3b9 6,99 # notequal
-** 228 0 0x32a 0,32 # asteriskmath
-+- 479 0 0xf1 6,1 # plusminus
-<= 592 0 0xf3 6,2 # lessequal
-== 592 0 0x3ba 8,14 # equivalence
-=~ 592 0 0x340 8,116 # congruent
->= 499 0 0x3b3 8,3 # greaterequal
-AN 499 0 0x3d9 8,85 # logicaland
-OR 499 0 0x3da 8,86 # logicalor
-no 499 0 0x3d8 8,20 # logicalnot
-te 499 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 499 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 499 0 0x3c0 9,0 # aleph
-Im 499 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 499 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 499 0 0x3a5 8,19 # infinity
-md 499 0 0x3b7 8,32 # dotmath
-mo 499 0 0x3ce 8,15 # element
-mu 499 0 0x3b4 8,39 # multiply
-nc 499 0 0x3cb 8,197 # notpropersuperset
-nm 499 0 0x3cf 8,209 # notelement
-pl 273 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 479 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 479 0 0x3b5 6,4 # proportional
-pp 479 0 0x35e 8,89 # perpendicular
-sb 479 0 0x3cc 6,67 # propersubset
-sp 479 0 0x3c9 6,68 # propersuperset
-ib 479 0 0x3cd 6,69 # reflexsubset
-ip 479 0 0x3ca 6,70 # reflexsuperset
-ap 479 0 0x37e 6,12 # similar
-pd 479 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 479 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 479 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 645 0 0xef 6,16 # intersection "intersection, cap"
-cu 645 0 0x3c8 6,66 # union "union, cup"
-di 479 0 0x3b8 6,8 # divide "division sign"
--h 820 0 0xc4 3,8 # hbar
-gr 820 0 0x3d1 6,33 # gradient
-es 638 0 0x3c6 0,79 # emptyset
-CL 617 0 0x5 5,168 # club "club suit"
-SP 617 0 0x6 5,171 # spade "spade suit"
-HE 617 0 0x3 5,170 # heart "heart suit"
-DI 617 0 0x4 5,169 # diamond "diamond suit"
-CR 617 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 617 0 0x327 6,71 # suchthat
-/_ 617 0 0x3d0 6,79 # angle
-<< 456 0 0xae 6,77 # "" "much less"
->> 456 0 0xaf 6,78 # "" "much greater"
-wp 456 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 456 0 0x3e0 6,95 # lozenge
-an 820 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 240 0 0xfa 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/HNI b/contrib/groff/font/devlbp/HNI
deleted file mode 100644
index 578faf7c97a6..000000000000
--- a/contrib/groff/font/devlbp/HNI
+++ /dev/null
@@ -1,491 +0,0 @@
-name HNI
-lbpname Swiss-Narrow-Oblique
-special
-spacewidth 228
-slant 0
-ligatures fi fl 0
-charset
-ha 280 2 0x4c3 0,94 # asciicircum
-ti 280 0 0x4c4 0,126 # asciitilde
-vS 280 2 0x169 1,176 # Scaron
-vZ 280 2 0x16e 1,206 # Zcaron
-vs 280 2 0x173 1,177 # scaron
-vz 280 2 0x174 1,207 # zcaron
-:Y 280 2 0x16d 1,74 # Ydieresis
-tm 280 2 0x170 4,41 # trademark
-aq 157 2 0x27 0,39 # quotesingle
-space 228 0 0x20 0,32
-! 228 2 0x21 0,33 # exclam
-" 291 2 0x22 0,34 # quotedbl
-dq 291 2 0x22 0,34 # quotedbl
-# 456 2 0x23 0,35 # numbersign
-sh 456 2 0x23 0,35 # "
-$ 456 2 0x24 0,36 # dollar
-Do 456 2 0x24 0,36 # "
-% 720 2 0x25 0,37 # percent
-& 547 2 0x26 0,38 # ampersand
-' 157 2 0x27 0,39 # quoteright
-cq 157 2 0x27 0,39 # quoteright
-( 273 2 0x28 0,40 # parenleft
-) 273 2 0x29 0,41 # parenright
-* 319 2 0x2a 0,42 # asterisk
-+ 479 0 0x2b 0,43 # plus
-, 228 0 0x2c 0,44 # comma
-- 479 0 0x2d 0,45 # hyphen
-hy 479 0 0x2d 0,45 # "
-char173 479 0 0x2d 0,45 # "
-. 228 0 0x2e 0,46 # period
-/ 228 2 0x2f 0,47 # slash
-sl 228 2 0x2f 0,47 # "
-0 456 2 0x30 0,48 # zero
-1 456 2 0x31 0,49 # one
-2 456 2 0x32 0,50 # two
-3 456 2 0x33 0,51 # three
-4 456 2 0x34 0,52 # four
-5 456 2 0x35 0,53 # five
-6 456 2 0x36 0,54 # six
-7 456 2 0x37 0,55 # seven
-8 456 2 0x38 0,56 # eight
-9 456 2 0x39 0,57 # nine
-: 228 0 0x3a 0,58 # colon
-; 228 0 0x3b 0,59 # semicolon
-< 479 0 0x3c 0,60 # less
-= 479 0 0x3d 0,61 # equal
-> 479 0 0x3e 0,62 # greater
-? 456 2 0x3f 0,63 # question
-@ 832 2 0x40 0,64 # at
-at 832 2 0x40 0,64 # "
-A 547 2 0x41 0,65 # A
-B 547 2 0x42 0,66 # B
-C 592 2 0x43 0,67 # C
-D 592 2 0x44 0,68 # D
-E 547 2 0x45 0,69 # E
-F 501 2 0x46 0,70 # F
-G 638 2 0x47 0,71 # G
-H 592 2 0x48 0,72 # H
-I 228 2 0x49 0,73 # I
-J 410 2 0x4a 0,74 # J
-K 547 2 0x4b 0,75 # K
-L 456 2 0x4c 0,76 # L
-M 683 2 0x4d 0,77 # M
-N 592 2 0x4e 0,78 # N
-O 638 2 0x4f 0,79 # O
-P 547 2 0x50 0,80 # P
-Q 638 2 0x51 0,81 # Q
-R 592 2 0x52 0,82 # R
-S 547 2 0x53 0,83 # S
-T 501 2 0x54 0,84 # T
-U 592 2 0x55 0,85 # U
-V 547 2 0x56 0,86 # V
-W 774 2 0x57 0,87 # W
-X 547 2 0x58 0,88 # X
-Y 547 2 0x59 0,89 # Y
-Z 501 2 0x5a 0,90 # Z
-[ 228 2 0x5b 0,91 # bracketleft
-lB 228 2 0x5b 0,91 # "
-\ 228 2 0x5c 0,92 # backslash
-rs 228 2 0x5c 0,92 # "
-] 228 2 0x5d 0,93 # bracketright
-rB 228 2 0x5d 0,93 # "
-a^ 280 2 0x5e 0,94 # circumflex
-^ 280 2 0x5e 0,94 # "
-_ 456 0 0x5f 0,95 # underscore
-` 280 2 0x60 0,96 # quoteleft
-oq 280 2 0x60 0,96 # "
-a 456 0 0x61 0,97 # a
-b 456 2 0x62 0,98 # b
-c 410 0 0x63 0,99 # c
-d 456 2 0x64 0,100 # d
-e 456 0 0x65 0,101 # e
-f 228 2 0x66 0,102 # f
-g 456 1 0x67 0,103 # g
-h 456 2 0x68 0,104 # h
-i 182 2 0x69 0,105 # i
-j 182 2 0x6a 0,106 # j
-k 410 2 0x6b 0,107 # k
-l 182 2 0x6c 0,108 # l
-m 683 0 0x6d 0,109 # m
-n 456 0 0x6e 0,110 # n
-o 456 0 0x6f 0,111 # o
-p 456 1 0x70 0,112 # p
-q 456 1 0x71 0,113 # q
-r 273 0 0x72 0,114 # r
-s 410 0 0x73 0,115 # s
-t 228 2 0x74 0,116 # t
-u 456 0 0x75 0,117 # u
-v 410 0 0x76 0,118 # v
-w 592 0 0x77 0,119 # w
-x 410 0 0x78 0,120 # x
-y 410 1 0x79 0,121 # y
-z 410 0 0x7a 0,122 # z
-lC 274 2 0x7b 0,123 # braceleft
-{ 274 2 0x7b 0,123 # "
-| 213 2 0x7c 0,124 # "
-rC 274 2 0x7d 0,125 # braceright
-} 274 2 0x7d 0,125 # "
-a~ 280 2 0x7e 0,126 # tilde
-~ 280 2 0x7e 0,126 # "
-char161 273 1 0xad 4,7 # exclamdown
-char162 456 2 0x9b 4,19 # cent
-char163 456 2 0x9c 4,11 # sterling
-char164 456 2 0x12f 4,24 # currency
-char165 456 2 0x9d 4,12 # yen
-char166 213 2 0x7c 0,124 # brokenbar
-char167 456 2 0x15 4,6 # section
-char168 273 2 0x122 1,7 # dieresis
-char169 604 2 0x154 4,23 # copyright
-char170 303 2 0xa6 4,15 # ordfeminine
-char171 456 0 0xae 4,9 # guillemotleft
-char172 479 0 0xaa 6,20 # logicalnot
-char173 456 0 0x132 4,33 # hyphen
-char174 604 2 0x155 4,22 # registered
-char175 500 2 0x2d 6,0 # macron
-char176 328 2 0xf8 6,36 # degree
-char177 479 0 0xf1 6,1 # plusminus
-char178 273 2 0xfd 4,20 # twosuperior
-char179 273 2 0x14d 4,26 # threesuperior
-char180 273 2 0x120 1,6 # acute "acute accent"
-char181 456 1 0xe6 8,25 # mu
-char182 440 2 0x14 4,5 # paragraph
-char183 240 0 0xfa 6,32 # periodcentered
-char184 273 0 0x139 1,17 # cedilla
-char185 273 2 0x156 4,78 # onesuperior
-char186 299 2 0xa7 4,16 # ordmasculine
-char187 456 0 0xaf 4,10 # guillemotright
-char188 684 2 0xac 4,18 # onequarter
-char189 684 2 0xab 4,17 # onehalf
-char190 684 2 0x12e 4,25 # threequarters
-char191 501 1 0xa8 4,8 # questiondown
-char192 501 2 0x15c 1,32 # Agrave
-char193 501 2 0x15a 1,26 # Aacute
-char194 501 2 0x15b 1,28 # Acircumflex
-char195 501 2 0x28e 1,76 # Atilde
-char196 547 2 0x8e 1,30 # Adieresis
-char197 547 2 0x8f 1,34 # Aring
-char198 820 2 0x92 1,36 # AE
-char199 592 2 0x80 1,38 # Ccedilla
-char200 592 2 0x160 1,46 # Egrave
-char201 547 2 0x90 1,40 # Eacute
-char202 547 2 0x15e 1,42 # Ecircumflex
-char203 547 2 0x15f 1,44 # Edieresis
-char204 547 2 0x164 1,54 # Igrave
-char205 547 2 0x161 1,48 # Iacute
-char206 547 2 0x162 1,50 # Icircumflex
-char207 547 2 0x163 1,52 # Idieresis
-char208 592 2 0x13d 1,78 # Eth
-char209 592 2 0xa5 1,56 # Ntilde
-char210 592 2 0x167 1,64 # Ograve
-char211 592 2 0x165 1,58 # Oacute
-char212 592 2 0x166 1,60 # Ocircumflex
-char213 592 2 0x168 1,82 # Otilde
-char214 638 2 0x99 1,62 # Odieresis
-char215 479 0 0x157 6,39 # multiply
-char216 638 2 0x140 1,80 # Oslash
-char217 638 2 0x16c 1,72 # Ugrave
-char218 638 2 0x16a 1,66 # Uacute
-char219 638 2 0x16b 1,68 # Ucircumflex
-char220 592 2 0x9a 1,70 # Udieresis
-char221 592 2 0x16f 1,84 # Yacute
-char222 547 2 0x13e 1,88 # Thorn
-char223 501 2 0x147 1,23 # germandbls
-char224 456 2 0x85 1,33 # agrave
-char225 456 2 0xa0 1,27 # aacute
-char226 456 2 0x83 1,29 # acircumflex
-char227 456 2 0x284 1,93 # atilde
-char228 456 2 0x84 1,31 # adieresis
-char229 456 2 0x86 1,35 # aring
-char230 729 0 0x91 1,37 # ae
-char231 410 0 0x87 1,39 # ccedilla
-char232 456 2 0x8a 1,47 # egrave
-char233 456 2 0x82 1,41 # eacute
-char234 456 2 0x88 1,43 # ecircumflex
-char235 456 2 0x89 1,45 # edieresis
-char236 228 2 0x8d 1,55 # igrave
-char237 228 2 0xa1 1,49 # iacute
-char238 228 2 0x8c 1,51 # icircumflex
-char239 228 2 0x8b 1,53 # idieresis
-char240 456 2 0x148 1,87 # eth
-char241 456 2 0xa4 1,57 # ntilde
-char242 456 2 0x95 1,65 # ograve
-char243 456 2 0xa2 1,59 # oacute
-char244 456 2 0x93 1,61 # ocircumflex
-char245 456 2 0x172 1,83 # otilde
-char246 456 2 0x94 1,63 # odieresis
-char247 479 0 0xf6 6,8 # divide
-char248 501 0 0x145 1,81 # oslash
-char249 456 2 0x97 1,73 # ugrave
-char250 456 2 0xa3 1,67 # uacute
-char251 456 2 0x96 1,69 # ucircumflex
-char252 456 2 0x81 1,71 # udieresis
-char253 456 3 0x175 1,85 # yacute
-char254 456 3 0x143 1,89 # thorn
-char255 410 3 0x98 1,75 # ydieresis
--D 592 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 456 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 547 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 456 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 820 2 0x92 1,36 # AE
-ae 729 0 0x91 1,37 # ae
-OE 820 2 0x141 1,166 # OE
-oe 774 0 0x146 1,167 # oe
-ij 353 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 501 2 0x147 1,23 # germandbls
-'A 501 2 0x15a 1,26 # Aacute
-'E 547 2 0x90 1,40 # Eacute
-'I 547 2 0x161 1,48 # Iacute
-'O 547 2 0x165 1,58 # Oacute
-'U 547 2 0x16a 1,66 # Uacute
-'a 456 2 0xa0 1,27 # aacute
-'e 456 2 0x82 1,41 # eacute
-'i 228 2 0xa1 1,49 # iacute
-'o 456 2 0xa2 1,59 # oacute
-'u 456 2 0x95 1,65 # uacute
-:A 547 2 0x8e 1,30 # Adieresis
-:E 547 2 0x15f 1,44 # Edieresis
-:I 547 2 0x163 1,52 # Idieresis
-:O 638 2 0x99 1,62 # Odieresis
-:U 592 2 0x9a 1,70 # Udieresis
-:Y 592 2 0x16d 1,74 # Ydieresis
-:a 456 2 0x84 1,31 # adieresis
-:e 456 2 0x89 1,45 # edieresis
-:i 228 2 0x8b 1,53 # idieresis
-:o 456 2 0x94 1,63 # odieresis
-:u 456 2 0x81 1,71 # udieresis
-:y 410 3 0x98 1,75 # ydieresis
-^A 410 2 0x15b 1,28 # Acircumflex
-^E 410 2 0x15e 1,42 # Ecircumflex
-^I 410 2 0x162 1,50 # Icircumflex
-^O 410 2 0x166 1,60 # Ocircumflex
-^U 410 2 0x16b 1,68 # Ucircumflex
-^a 456 2 0x83 1,29 # acircumflex
-^e 456 2 0x88 1,43 # ecircumflex
-^i 228 2 0x8c 1,51 # icircumflex
-^o 456 2 0x93 1,61 # ocircumflex
-^u 456 2 0x96 1,69 # ucircumflex
-`A 456 2 0x15c 1,32 # Agrave
-`E 456 2 0x160 1,46 # Egrave
-`I 456 2 0x164 1,54 # Igrave
-`O 456 2 0x167 1,64 # Ograve
-`U 456 2 0x16c 1,72 # Ugrave
-`a 456 2 0x85 1,33 # agrave
-~a 456 2 0x284 --- # atilde
-`e 456 2 0x8a 1,47 # egrave
-`i 228 2 0x8d 1,55 # igrave
-`o 456 2 0x95 1,65 # ograve
-`u 456 2 0x97 1,73 # ugrave
-~A 456 2 0x28e 1,26 # Atilde
-~N 592 2 0xa5 1,56 # Ntilde
-~O 592 2 0x168 1,82 # Otilde
-~n 456 2 0xa4 1,57 # ntilde
-~o 456 2 0x172 1,83 # otilde
-vS 456 2 0x169 1,176 # Scaron
-vs 456 2 0x173 1,177 # scaron
-vZ 456 2 0x16e 1,206 # Zcaron
-vz 456 2 0x174 1,207 # zcaron
-,C 592 2 0x80 1,38 # Ccedilla
-,c 410 0 0x87 1,39 # ccedilla
-/L 456 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 182 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 638 2 0x140 1,80 # Oslash
-/o 501 0 0x145 1,81 # oslash
-oA 547 2 0x8f 1,34 # Aring
-oa 456 2 0x86 1,35 # aring
-a" 273 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 273 2 0x135 1,8 # macron "macron or bar accent"
-a. 273 2 0x137 1,15 # dotaccent "dot accent"
-a^ 273 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 273 2 0x120 1,6 # acute "acute accent"
-ga 273 2 0x121 1,0 # grave "grave accent"
-ab 273 2 0x136 1,22 # breve "breve accent"
-ac 273 0 0x139 1,17 # cedilla "cedilla accent"
-ad 273 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 273 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 273 2 0x138 1,14 # ring "ring or circle accent"
-a~ 273 2 0x7e 1,2 # tilde "tilde accent"
-ho 273 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 228 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 456 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 456 2 0x24 0,36 # dollar
-Po 456 2 0x9c 4,11 # sterling
-Ye 456 2 0x9d 4,12 # yen
-Fn 456 2 0x9f 4,14 # florin
-ct 456 2 0x9b 4,19 # cent
-Fo 456 0 0xae 4,9 # guillemotleft
-Fc 273 0 0x4bb 4,20 # guillemotright
-fo 273 0 0x127 4,35 # guilsinglleft
-fc 273 0 0x128 4,36 # guilsinglright
-r! 273 1 0xad 4,7 # exclamdown
-r? 501 1 0xa8 4,8 # questiondown
-fi 410 2 0x130 4,54 # fi "fi ligature"
-fl 410 2 0x131 4,55 # fl "fl ligature"
-OK 410 0 0x3d6 --- # \& "check mark, tick"
-Of 303 2 0xa6 4,15 # ordfeminine
-Om 299 2 0xa7 4,16 # ordmasculine
-S1 273 2 0x156 4,78 # onesuperior
-S2 273 2 0xfd 4,20 # twosuperior
-S3 273 2 0x14d 4,26 # threesuperior
-<- 809 0 0x1b 6,22 # arrowleft
--> 809 0 0x1a 6,21 # arrowright
-<> 854 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 494 0 0x19 6,24 # arrowdown
-ua 494 0 0x18 6,23 # arrowup
-va 494 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 494 0 0x3dc 6,57 # arrowdblleft
-rA 494 0 0x3de 6,56 # arrowdblright
-hA 494 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 494 0 0x3df 6,59 # arrowdbldown
-uA 494 0 0x3dd 6,58 # arrowdblup
-ba 820 2 0xb3 3,9 # bar
-bb 213 2 0x7c 0,124 # brokenbar
-br 820 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 820 0 0x123 4,34 # ru "baseline rule"
-ul 456 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 820 0 0x3f4 3,9 # bv "bold vertical"
-ci 699 0 0x9 4,1 # circle
-bu 522 0 0x7 4,0 # bullet
-co 604 2 0x154 4,23 # copyright
-rg 604 2 0x155 4,22 # registered
-tm 604 2 0x170 4,41 # trademark
-dd 456 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 456 2 0x12a 4,39 # dagger
-ps 440 2 0x14 4,5 # paragraph
-sc 456 2 0x15 4,6 # section
-de 328 2 0xf8 6,36 # degree
-em 820 0 0x123 4,34 # emdash "em dash"
-en 456 0 0x132 4,33 # endash "en dash"
-%0 820 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 684 2 0xab 4,17 # onehalf
-14 684 2 0xac 4,18 # onequarter
-34 684 2 0x12e 4,25 # threequarters
-f/ 137 2 0x158 6,6 # fraction "bar for fractions"
-fm 137 0 0x3a2 6,45 # minute "footmark, prime"
-sd 137 0 0x3b2 6,46 # second
-ha 137 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 137 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 500 0 0x2d 6,0 # hyphen
-lB 228 2 0x5b 0,91 # bracketleft
-rB 228 2 0x5d 0,93 # bracketright
-lC 274 2 0x7b 0,123 # braceleft
-rC 274 2 0x7d 0,125 # braceright
-la 274 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 274 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 273 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 273 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 273 2 0x125 4,32 # quotedblleft
-rq 273 2 0x4ba 6,31 # quotedblright
-oq 182 2 0x176 4,29 # quoteleft "single open quote"
-aq 157 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 213 0 0x3f4 0,124 # bar
-at 832 2 0x40 0,64 # at
-.C1 479 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 456 2 0x23 0,35 # numbersign
-sl 228 2 0x2f 0,47 # slash
-rs 228 2 0x5c 0,92 # backslash
-3d 228 0 0x35c 6,102 # therefore
-tf 228 0 0x35c 6,102 # therefore
-*A 228 0 0x341 8,0 # Alpha
-*B 228 0 0x342 8,2 # Beta
-*C 228 0 0x358 8,28 # Xi
-*D 228 0 0x344 8,8 # Delta
-*E 228 0 0x345 8,10 # Epsilon
-*F 585 0 0x346 8,44 # Phi
-*G 469 0 0x347 8,6 # Gamma
-*H 469 0 0x351 8,16 # Theta
-*I 469 0 0x349 8,18 # Iota
-*K 469 0 0x34b 8,20 # Kappa
-*L 469 0 0x34c 8,22 # Lambda
-*M 469 0 0x34d 8,24 # Mu
-*N 469 0 0x34e 8,26 # Nu
-*O 469 0 0x34f 8,30 # Omicron
-*P 469 0 0x350 8,32 # Pi
-*Q 469 0 0x359 8,48 # Psi
-*R 469 0 0x352 8,34 # Rho
-*S 485 0 0x353 8,36 # Sigma
-*T 485 0 0x354 8,40 # Tau
-*U 485 0 0x3a1 8,76 # Upsilon
-*W 626 0 0x357 8,50 # Omega
-*X 485 0 0x343 8,36 # Chi
-*Y 485 0 0x348 8,14 # Eta
-*Z 485 0 0x35a 8,12 # Zeta
-*a 498 0 0xe0 8,1 # alpha
-*b 466 0 0xe1 8,3 # beta
-*c 466 0 0x378 8,29 # xi
-*d 465 0 0xeb 8,9 # delta
-*e 465 0 0x36e 8,70 # epsilon
-*f 465 0 0x366 8,45 # phi
-+f 465 0 0x36a 8,77 # phi1 "variant phi"
-*g 465 0 0x367 8,7 # gamma
-*h 456 0 0xe9 8,17 # theta
-+h 456 0 0x375 8,71 # theta1 "variant theta"
-*i 456 0 0x369 8,19 # iota
-*k 456 0 0x36b 8,21 # kappa
-*l 456 0 0x36c 8,23 # lambda
-*m 456 0 0xe6 8,25 # mu
-*n 456 0 0x36e 8,27 # nu
-*o 456 0 0x36f 8,31 # omicron
-*p 483 0 0xe3 8,33 # pi
-+p 483 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 483 0 0x379 8,49 # psi
-*r 483 0 0x372 8,35 # rho
-*s 501 0 0xe5 8,37 # sigma
-*t 375 0 0xe7 8,41 # tau
-*u 375 0 0x375 8,27 # upsilon
-*w 375 0 0x377 8,51 # omega
-*x 375 0 0x363 8,47 # chi
-*y 375 0 0x368 8,15 # eta
-*z 375 0 0x37a 8,13 # zeta
-ts 375 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 655 0 0xf7 6,13 # approxequal
-~= 655 0 0xf7 6,13 # approxequal
-!= 655 0 0x3b9 6,99 # notequal
-** 228 0 0x32a 0,32 # asteriskmath
-+- 479 0 0xf1 6,1 # plusminus
-<= 594 0 0xf3 6,2 # lessequal
-== 594 0 0x3ba 8,14 # equivalence
-=~ 594 0 0x340 8,116 # congruent
->= 466 0 0x3b3 8,3 # greaterequal
-AN 466 0 0x3d9 8,85 # logicaland
-OR 466 0 0x3da 8,86 # logicalor
-no 466 0 0x3d8 8,20 # logicalnot
-te 466 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 466 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 466 0 0x3c0 9,0 # aleph
-Im 466 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 466 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 466 0 0x3a5 8,19 # infinity
-md 466 0 0x3b7 8,32 # dotmath
-mo 466 0 0x3ce 8,15 # element
-mu 466 0 0x3b4 8,39 # multiply
-nc 466 0 0x3cb 8,197 # notpropersuperset
-nm 466 0 0x3cf 8,209 # notelement
-pl 228 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 479 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 479 0 0x3b5 6,4 # proportional
-pp 479 0 0x35e 8,89 # perpendicular
-sb 479 0 0x3cc 6,67 # propersubset
-sp 479 0 0x3c9 6,68 # propersuperset
-ib 479 0 0x3cd 6,69 # reflexsubset
-ip 479 0 0x3ca 6,70 # reflexsuperset
-ap 479 0 0x37e 6,12 # similar
-pd 479 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 479 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 479 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 645 0 0xef 6,16 # intersection "intersection, cap"
-cu 645 0 0x3c8 6,66 # union "union, cup"
-di 479 0 0x3b8 6,8 # divide "division sign"
--h 820 0 0xc4 3,8 # hbar
-gr 820 0 0x3d1 6,33 # gradient
-es 638 0 0x3c6 0,79 # emptyset
-CL 617 0 0x5 5,168 # club "club suit"
-SP 617 0 0x6 5,171 # spade "spade suit"
-HE 617 0 0x3 5,170 # heart "heart suit"
-DI 617 0 0x4 5,169 # diamond "diamond suit"
-CR 617 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 617 0 0x327 6,71 # suchthat
-/_ 617 0 0x3d0 6,79 # angle
-<< 456 0 0xae 6,77 # "" "much less"
->> 456 0 0xaf 6,78 # "" "much greater"
-wp 456 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 456 0 0x3e0 6,95 # lozenge
-an 820 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 240 0 0xfa 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/HNR b/contrib/groff/font/devlbp/HNR
deleted file mode 100644
index d0e78afd1b3c..000000000000
--- a/contrib/groff/font/devlbp/HNR
+++ /dev/null
@@ -1,491 +0,0 @@
-name HNR
-lbpname Swiss-Narrow
-special
-spacewidth 228
-slant 0
-ligatures fi fl 0
-charset
-ha 290 2 0x4c3 0,94 # asciicircum
-ti 280 0 0x4c4 0,126 # asciitilde
-vS 280 2 0x169 1,176 # Scaron
-vZ 280 2 0x16e 1,206 # Zcaron
-vs 280 2 0x173 1,177 # scaron
-vz 280 2 0x174 1,207 # zcaron
-:Y 280 2 0x16d 1,74 # Ydieresis
-tm 280 2 0x170 4,41 # trademark
-aq 157 2 0x27 0,39 # quotesingle
-space 228 0 0x20 0,32
-! 228 2 0x21 0,33 # exclam
-" 291 2 0x22 0,34 # quotedbl
-dq 291 2 0x22 0,34 # quotedbl
-# 456 2 0x23 0,35 # numbersign
-sh 456 2 0x23 0,35 # "
-$ 456 2 0x24 0,36 # dollar
-Do 456 2 0x24 0,36 # "
-% 720 2 0x25 0,37 # percent
-& 547 2 0x26 0,38 # ampersand
-' 157 2 0x27 0,39 # quoteright
-cq 157 2 0x27 0,39 # quoteright
-( 273 2 0x28 0,40 # parenleft
-) 273 2 0x29 0,41 # parenright
-* 319 2 0x2a 0,42 # asterisk
-+ 479 0 0x2b 0,43 # plus
-, 228 0 0x2c 0,44 # comma
-- 479 0 0x2d 0,45 # hyphen
-hy 479 0 0x2d 0,45 # "
-char173 479 0 0x2d 0,45 # "
-. 228 0 0x2e 0,46 # period
-/ 228 2 0x2f 0,47 # slash
-sl 228 2 0x2f 0,47 # "
-0 456 2 0x30 0,48 # zero
-1 456 2 0x31 0,49 # one
-2 456 2 0x32 0,50 # two
-3 456 2 0x33 0,51 # three
-4 456 2 0x34 0,52 # four
-5 456 2 0x35 0,53 # five
-6 456 2 0x36 0,54 # six
-7 456 2 0x37 0,55 # seven
-8 456 2 0x38 0,56 # eight
-9 456 2 0x39 0,57 # nine
-: 228 0 0x3a 0,58 # colon
-; 228 0 0x3b 0,59 # semicolon
-< 479 0 0x3c 0,60 # less
-= 479 0 0x3d 0,61 # equal
-> 479 0 0x3e 0,62 # greater
-? 456 2 0x3f 0,63 # question
-@ 832 2 0x40 0,64 # at
-at 832 2 0x40 0,64 # "
-A 547 2 0x41 0,65 # A
-B 547 2 0x42 0,66 # B
-C 592 2 0x43 0,67 # C
-D 592 2 0x44 0,68 # D
-E 547 2 0x45 0,69 # E
-F 501 2 0x46 0,70 # F
-G 638 2 0x47 0,71 # G
-H 592 2 0x48 0,72 # H
-I 228 2 0x49 0,73 # I
-J 410 2 0x4a 0,74 # J
-K 547 2 0x4b 0,75 # K
-L 456 2 0x4c 0,76 # L
-M 683 2 0x4d 0,77 # M
-N 592 2 0x4e 0,78 # N
-O 638 2 0x4f 0,79 # O
-P 547 2 0x50 0,80 # P
-Q 638 2 0x51 0,81 # Q
-R 592 2 0x52 0,82 # R
-S 547 2 0x53 0,83 # S
-T 501 2 0x54 0,84 # T
-U 592 2 0x55 0,85 # U
-V 547 2 0x56 0,86 # V
-W 774 2 0x57 0,87 # W
-X 547 2 0x58 0,88 # X
-Y 547 2 0x59 0,89 # Y
-Z 501 2 0x5a 0,90 # Z
-[ 228 2 0x5b 0,91 # bracketleft
-lB 228 2 0x5b 0,91 # "
-\ 228 2 0x5c 0,92 # backslash
-rs 228 2 0x5c 0,92 # "
-] 228 2 0x5d 0,93 # bracketright
-rB 228 2 0x5d 0,93 # "
-a^ 290 2 0x5e 0,94 # circumflex
-^ 290 2 0x5e 0,94 # "
-_ 456 0 0x5f 0,95 # underscore
-` 290 2 0x60 0,96 # quoteleft
-oq 290 2 0x60 0,96 # "
-a 456 0 0x61 0,97 # a
-b 456 2 0x62 0,98 # b
-c 410 0 0x63 0,99 # c
-d 456 2 0x64 0,100 # d
-e 456 0 0x65 0,101 # e
-f 228 2 0x66 0,102 # f
-g 456 1 0x67 0,103 # g
-h 456 2 0x68 0,104 # h
-i 182 2 0x69 0,105 # i
-j 182 2 0x6a 0,106 # j
-k 410 2 0x6b 0,107 # k
-l 182 2 0x6c 0,108 # l
-m 683 0 0x6d 0,109 # m
-n 456 0 0x6e 0,110 # n
-o 456 0 0x6f 0,111 # o
-p 456 1 0x70 0,112 # p
-q 456 1 0x71 0,113 # q
-r 273 0 0x72 0,114 # r
-s 410 0 0x73 0,115 # s
-t 228 2 0x74 0,116 # t
-u 456 0 0x75 0,117 # u
-v 410 0 0x76 0,118 # v
-w 592 0 0x77 0,119 # w
-x 410 0 0x78 0,120 # x
-y 410 1 0x79 0,121 # y
-z 410 0 0x7a 0,122 # z
-lC 274 2 0x7b 0,123 # braceleft
-{ 274 2 0x7b 0,123 # "
-| 213 2 0x7c 0,124 # "
-rC 274 2 0x7d 0,125 # braceright
-} 274 2 0x7d 0,125 # "
-a~ 280 2 0x7e 0,126 # tilde
-~ 280 2 0x7e 0,126 # "
-char161 273 1 0xad 4,7 # exclamdown
-char162 456 2 0x9b 4,19 # cent
-char163 456 2 0x9c 4,11 # sterling
-char164 456 2 0x12f 4,24 # currency
-char165 456 2 0x9d 4,12 # yen
-char166 213 2 0x7c 0,124 # brokenbar
-char167 456 2 0x15 4,6 # section
-char168 273 2 0x122 1,7 # dieresis
-char169 604 2 0x154 4,23 # copyright
-char170 303 2 0xa6 4,15 # ordfeminine
-char171 456 0 0xae 4,9 # guillemotleft
-char172 479 0 0xaa 6,20 # logicalnot
-char173 456 0 0x132 4,33 # hyphen
-char174 604 2 0x155 4,22 # registered
-char175 500 2 0x2d 6,0 # macron
-char176 328 2 0xf8 6,36 # degree
-char177 479 0 0xf1 6,1 # plusminus
-char178 273 2 0xfd 4,20 # twosuperior
-char179 273 2 0x14d 4,26 # threesuperior
-char180 273 2 0x120 1,6 # acute "acute accent"
-char181 456 1 0xe6 8,25 # mu
-char182 440 2 0x14 4,5 # paragraph
-char183 240 0 0xfa 6,32 # periodcentered
-char184 273 0 0x139 1,17 # cedilla
-char185 273 2 0x156 4,78 # onesuperior
-char186 299 2 0xa7 4,16 # ordmasculine
-char187 456 0 0xaf 4,10 # guillemotright
-char188 684 2 0xac 4,18 # onequarter
-char189 684 2 0xab 4,17 # onehalf
-char190 684 2 0x12e 4,25 # threequarters
-char191 501 1 0xa8 4,8 # questiondown
-char192 501 2 0x15c 1,32 # Agrave
-char193 501 2 0x15a 1,26 # Aacute
-char194 501 2 0x15b 1,28 # Acircumflex
-char195 501 2 0x28e 1,76 # Atilde
-char196 547 2 0x8e 1,30 # Adieresis
-char197 547 2 0x8f 1,34 # Aring
-char198 820 2 0x92 1,36 # AE
-char199 592 2 0x80 1,38 # Ccedilla
-char200 592 2 0x160 1,46 # Egrave
-char201 547 2 0x90 1,40 # Eacute
-char202 547 2 0x15e 1,42 # Ecircumflex
-char203 547 2 0x15f 1,44 # Edieresis
-char204 547 2 0x164 1,54 # Igrave
-char205 547 2 0x161 1,48 # Iacute
-char206 547 2 0x162 1,50 # Icircumflex
-char207 547 2 0x163 1,52 # Idieresis
-char208 592 2 0x13d 1,78 # Eth
-char209 592 2 0xa5 1,56 # Ntilde
-char210 592 2 0x167 1,64 # Ograve
-char211 592 2 0x165 1,58 # Oacute
-char212 592 2 0x166 1,60 # Ocircumflex
-char213 592 2 0x168 1,82 # Otilde
-char214 638 2 0x99 1,62 # Odieresis
-char215 479 0 0x157 6,39 # multiply
-char216 638 2 0x140 1,80 # Oslash
-char217 638 2 0x16c 1,72 # Ugrave
-char218 638 2 0x16a 1,66 # Uacute
-char219 638 2 0x16b 1,68 # Ucircumflex
-char220 592 2 0x9a 1,70 # Udieresis
-char221 592 2 0x16f 1,84 # Yacute
-char222 547 2 0x13e 1,88 # Thorn
-char223 501 2 0x147 1,23 # germandbls
-char224 456 2 0x85 1,33 # agrave
-char225 456 2 0xa0 1,27 # aacute
-char226 456 2 0x83 1,29 # acircumflex
-char227 456 2 0x284 1,93 # atilde
-char228 456 2 0x84 1,31 # adieresis
-char229 456 2 0x86 1,35 # aring
-char230 729 0 0x91 1,37 # ae
-char231 410 0 0x87 1,39 # ccedilla
-char232 456 2 0x8a 1,47 # egrave
-char233 456 2 0x82 1,41 # eacute
-char234 456 2 0x88 1,43 # ecircumflex
-char235 456 2 0x89 1,45 # edieresis
-char236 228 2 0x8d 1,55 # igrave
-char237 228 2 0xa1 1,49 # iacute
-char238 228 2 0x8c 1,51 # icircumflex
-char239 228 2 0x8b 1,53 # idieresis
-char240 456 2 0x148 1,87 # eth
-char241 456 2 0xa4 1,57 # ntilde
-char242 456 2 0x95 1,65 # ograve
-char243 456 2 0xa2 1,59 # oacute
-char244 456 2 0x93 1,61 # ocircumflex
-char245 456 2 0x172 1,83 # otilde
-char246 456 2 0x94 1,63 # odieresis
-char247 479 0 0xf6 6,8 # divide
-char248 501 0 0x145 1,81 # oslash
-char249 456 2 0x97 1,73 # ugrave
-char250 456 2 0xa3 1,67 # uacute
-char251 456 2 0x96 1,69 # ucircumflex
-char252 456 2 0x81 1,71 # udieresis
-char253 456 3 0x175 1,85 # yacute
-char254 456 3 0x143 1,89 # thorn
-char255 410 3 0x98 1,75 # ydieresis
--D 592 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 456 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 547 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 456 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 820 2 0x92 1,36 # AE
-ae 729 0 0x91 1,37 # ae
-OE 820 2 0x141 1,166 # OE
-oe 774 0 0x146 1,167 # oe
-ij 353 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 501 2 0x147 1,23 # germandbls
-'A 501 2 0x15a 1,26 # Aacute
-'E 547 2 0x90 1,40 # Eacute
-'I 547 2 0x161 1,48 # Iacute
-'O 547 2 0x165 1,58 # Oacute
-'U 547 2 0x16a 1,66 # Uacute
-'a 456 2 0xa0 1,27 # aacute
-'e 456 2 0x82 1,41 # eacute
-'i 228 2 0xa1 1,49 # iacute
-'o 456 2 0xa2 1,59 # oacute
-'u 456 2 0x95 1,65 # uacute
-:A 547 2 0x8e 1,30 # Adieresis
-:E 547 2 0x15f 1,44 # Edieresis
-:I 547 2 0x163 1,52 # Idieresis
-:O 638 2 0x99 1,62 # Odieresis
-:U 592 2 0x9a 1,70 # Udieresis
-:Y 592 2 0x16d 1,74 # Ydieresis
-:a 456 2 0x84 1,31 # adieresis
-:e 456 2 0x89 1,45 # edieresis
-:i 228 2 0x8b 1,53 # idieresis
-:o 456 2 0x94 1,63 # odieresis
-:u 456 2 0x81 1,71 # udieresis
-:y 410 3 0x98 1,75 # ydieresis
-^A 410 2 0x15b 1,28 # Acircumflex
-^E 410 2 0x15e 1,42 # Ecircumflex
-^I 410 2 0x162 1,50 # Icircumflex
-^O 410 2 0x166 1,60 # Ocircumflex
-^U 410 2 0x16b 1,68 # Ucircumflex
-^a 456 2 0x83 1,29 # acircumflex
-^e 456 2 0x88 1,43 # ecircumflex
-^i 228 2 0x8c 1,51 # icircumflex
-^o 456 2 0x93 1,61 # ocircumflex
-^u 456 2 0x96 1,69 # ucircumflex
-`A 456 2 0x15c 1,32 # Agrave
-`E 456 2 0x160 1,46 # Egrave
-`I 456 2 0x164 1,54 # Igrave
-`O 456 2 0x167 1,64 # Ograve
-`U 456 2 0x16c 1,72 # Ugrave
-`a 456 2 0x85 1,33 # agrave
-~a 456 2 0x284 --- # atilde
-`e 456 2 0x8a 1,47 # egrave
-`i 228 2 0x8d 1,55 # igrave
-`o 456 2 0x95 1,65 # ograve
-`u 456 2 0x97 1,73 # ugrave
-~A 456 2 0x28e 1,26 # Atilde
-~N 592 2 0xa5 1,56 # Ntilde
-~O 592 2 0x168 1,82 # Otilde
-~n 456 2 0xa4 1,57 # ntilde
-~o 456 2 0x172 1,83 # otilde
-vS 456 2 0x169 1,176 # Scaron
-vs 456 2 0x173 1,177 # scaron
-vZ 456 2 0x16e 1,206 # Zcaron
-vz 456 2 0x174 1,207 # zcaron
-,C 592 2 0x80 1,38 # Ccedilla
-,c 410 0 0x87 1,39 # ccedilla
-/L 456 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 182 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 638 2 0x140 1,80 # Oslash
-/o 501 0 0x145 1,81 # oslash
-oA 547 2 0x8f 1,34 # Aring
-oa 456 2 0x86 1,35 # aring
-a" 273 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 273 2 0x135 1,8 # macron "macron or bar accent"
-a. 273 2 0x137 1,15 # dotaccent "dot accent"
-a^ 273 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 273 2 0x120 1,6 # acute "acute accent"
-ga 273 2 0x121 1,0 # grave "grave accent"
-ab 273 2 0x136 1,22 # breve "breve accent"
-ac 273 0 0x139 1,17 # cedilla "cedilla accent"
-ad 273 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 273 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 273 2 0x138 1,14 # ring "ring or circle accent"
-a~ 273 2 0x7e 1,2 # tilde "tilde accent"
-ho 273 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 228 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 456 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 456 2 0x24 0,36 # dollar
-Po 456 2 0x9c 4,11 # sterling
-Ye 456 2 0x9d 4,12 # yen
-Fn 456 2 0x9f 4,14 # florin
-ct 456 2 0x9b 4,19 # cent
-Fo 456 0 0xae 4,9 # guillemotleft
-Fc 273 0 0x4bb 4,20 # guillemotright
-fo 273 0 0x127 4,35 # guilsinglleft
-fc 273 0 0x128 4,36 # guilsinglright
-r! 273 1 0xad 4,7 # exclamdown
-r? 501 1 0xa8 4,8 # questiondown
-fi 410 2 0x130 4,54 # fi "fi ligature"
-fl 410 2 0x131 4,55 # fl "fl ligature"
-OK 410 0 0x3d6 --- # \& "check mark, tick"
-Of 303 2 0xa6 4,15 # ordfeminine
-Om 299 2 0xa7 4,16 # ordmasculine
-S1 273 2 0x156 4,78 # onesuperior
-S2 273 2 0xfd 4,20 # twosuperior
-S3 273 2 0x14d 4,26 # threesuperior
-<- 809 0 0x1b 6,22 # arrowleft
--> 809 0 0x1a 6,21 # arrowright
-<> 854 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 494 0 0x19 6,24 # arrowdown
-ua 494 0 0x18 6,23 # arrowup
-va 494 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 494 0 0x3dc 6,57 # arrowdblleft
-rA 494 0 0x3de 6,56 # arrowdblright
-hA 494 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 494 0 0x3df 6,59 # arrowdbldown
-uA 494 0 0x3dd 6,58 # arrowdblup
-ba 820 2 0xb3 3,9 # bar
-bb 213 2 0x7c 0,124 # brokenbar
-br 820 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 820 0 0x123 4,34 # ru "baseline rule"
-ul 456 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 820 0 0x3f4 3,9 # bv "bold vertical"
-ci 699 0 0x9 4,1 # circle
-bu 522 0 0x7 4,0 # bullet
-co 604 2 0x154 4,23 # copyright
-rg 604 2 0x155 4,22 # registered
-tm 604 2 0x170 4,41 # trademark
-dd 456 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 456 2 0x12a 4,39 # dagger
-ps 440 2 0x14 4,5 # paragraph
-sc 456 2 0x15 4,6 # section
-de 328 2 0xf8 6,36 # degree
-em 820 0 0x123 4,34 # emdash "em dash"
-en 456 0 0x132 4,33 # endash "en dash"
-%0 820 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 684 2 0xab 4,17 # onehalf
-14 684 2 0xac 4,18 # onequarter
-34 684 2 0x12e 4,25 # threequarters
-f/ 137 2 0x158 6,6 # fraction "bar for fractions"
-fm 137 0 0x3a2 6,45 # minute "footmark, prime"
-sd 137 0 0x3b2 6,46 # second
-ha 137 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 137 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 500 0 0x2d 6,0 # hyphen
-lB 228 2 0x5b 0,91 # bracketleft
-rB 228 2 0x5d 0,93 # bracketright
-lC 274 2 0x7b 0,123 # braceleft
-rC 274 2 0x7d 0,125 # braceright
-la 274 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 274 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 273 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 273 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 273 2 0x125 4,32 # quotedblleft
-rq 273 2 0x4ba 6,31 # quotedblright
-oq 182 2 0x176 4,29 # quoteleft "single open quote"
-aq 157 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 213 0 0x3f4 0,124 # bar
-at 832 2 0x40 0,64 # at
-.C1 479 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 456 2 0x23 0,35 # numbersign
-sl 228 2 0x2f 0,47 # slash
-rs 228 2 0x5c 0,92 # backslash
-3d 228 0 0x35c 6,102 # therefore
-tf 228 0 0x35c 6,102 # therefore
-*A 228 0 0x341 8,0 # Alpha
-*B 228 0 0x342 8,2 # Beta
-*C 228 0 0x358 8,28 # Xi
-*D 228 0 0x344 8,8 # Delta
-*E 228 0 0x345 8,10 # Epsilon
-*F 585 0 0x346 8,44 # Phi
-*G 469 0 0x347 8,6 # Gamma
-*H 469 0 0x351 8,16 # Theta
-*I 469 0 0x349 8,18 # Iota
-*K 469 0 0x34b 8,20 # Kappa
-*L 469 0 0x34c 8,22 # Lambda
-*M 469 0 0x34d 8,24 # Mu
-*N 469 0 0x34e 8,26 # Nu
-*O 469 0 0x34f 8,30 # Omicron
-*P 469 0 0x350 8,32 # Pi
-*Q 469 0 0x359 8,48 # Psi
-*R 469 0 0x352 8,34 # Rho
-*S 485 0 0x353 8,36 # Sigma
-*T 485 0 0x354 8,40 # Tau
-*U 485 0 0x3a1 8,76 # Upsilon
-*W 626 0 0x357 8,50 # Omega
-*X 485 0 0x343 8,36 # Chi
-*Y 485 0 0x348 8,14 # Eta
-*Z 485 0 0x35a 8,12 # Zeta
-*a 498 0 0xe0 8,1 # alpha
-*b 466 0 0xe1 8,3 # beta
-*c 466 0 0x378 8,29 # xi
-*d 465 0 0xeb 8,9 # delta
-*e 465 0 0x36e 8,70 # epsilon
-*f 465 0 0x366 8,45 # phi
-+f 465 0 0x36a 8,77 # phi1 "variant phi"
-*g 465 0 0x367 8,7 # gamma
-*h 456 0 0xe9 8,17 # theta
-+h 456 0 0x375 8,71 # theta1 "variant theta"
-*i 456 0 0x369 8,19 # iota
-*k 456 0 0x36b 8,21 # kappa
-*l 456 0 0x36c 8,23 # lambda
-*m 456 0 0xe6 8,25 # mu
-*n 456 0 0x36e 8,27 # nu
-*o 456 0 0x36f 8,31 # omicron
-*p 483 0 0xe3 8,33 # pi
-+p 483 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 483 0 0x379 8,49 # psi
-*r 483 0 0x372 8,35 # rho
-*s 501 0 0xe5 8,37 # sigma
-*t 375 0 0xe7 8,41 # tau
-*u 375 0 0x375 8,27 # upsilon
-*w 375 0 0x377 8,51 # omega
-*x 375 0 0x363 8,47 # chi
-*y 375 0 0x368 8,15 # eta
-*z 375 0 0x37a 8,13 # zeta
-ts 375 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 655 0 0xf7 6,13 # approxequal
-~= 655 0 0xf7 6,13 # approxequal
-!= 655 0 0x3b9 6,99 # notequal
-** 228 0 0x32a 0,32 # asteriskmath
-+- 479 0 0xf1 6,1 # plusminus
-<= 594 0 0xf3 6,2 # lessequal
-== 594 0 0x3ba 8,14 # equivalence
-=~ 594 0 0x340 8,116 # congruent
->= 466 0 0x3b3 8,3 # greaterequal
-AN 466 0 0x3d9 8,85 # logicaland
-OR 466 0 0x3da 8,86 # logicalor
-no 466 0 0x3d8 8,20 # logicalnot
-te 466 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 466 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 466 0 0x3c0 9,0 # aleph
-Im 466 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 466 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 466 0 0x3a5 8,19 # infinity
-md 466 0 0x3b7 8,32 # dotmath
-mo 466 0 0x3ce 8,15 # element
-mu 466 0 0x3b4 8,39 # multiply
-nc 466 0 0x3cb 8,197 # notpropersuperset
-nm 466 0 0x3cf 8,209 # notelement
-pl 228 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 479 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 479 0 0x3b5 6,4 # proportional
-pp 479 0 0x35e 8,89 # perpendicular
-sb 479 0 0x3cc 6,67 # propersubset
-sp 479 0 0x3c9 6,68 # propersuperset
-ib 479 0 0x3cd 6,69 # reflexsubset
-ip 479 0 0x3ca 6,70 # reflexsuperset
-ap 479 0 0x37e 6,12 # similar
-pd 479 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 479 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 479 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 645 0 0xef 6,16 # intersection "intersection, cap"
-cu 645 0 0x3c8 6,66 # union "union, cup"
-di 479 0 0x3b8 6,8 # divide "division sign"
--h 820 0 0xc4 3,8 # hbar
-gr 820 0 0x3d1 6,33 # gradient
-es 638 0 0x3c6 0,79 # emptyset
-CL 617 0 0x5 5,168 # club "club suit"
-SP 617 0 0x6 5,171 # spade "spade suit"
-HE 617 0 0x3 5,170 # heart "heart suit"
-DI 617 0 0x4 5,169 # diamond "diamond suit"
-CR 617 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 617 0 0x327 6,71 # suchthat
-/_ 617 0 0x3d0 6,79 # angle
-<< 456 0 0xae 6,77 # "" "much less"
->> 456 0 0xaf 6,78 # "" "much greater"
-wp 456 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 456 0 0x3e0 6,95 # lozenge
-an 820 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 240 0 0xfa 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/HR b/contrib/groff/font/devlbp/HR
deleted file mode 100644
index 81cfa96ed0b5..000000000000
--- a/contrib/groff/font/devlbp/HR
+++ /dev/null
@@ -1,491 +0,0 @@
-name HR
-lbpname Swiss
-special
-spacewidth 927
-slant 0
-ligatures fi fl 0
-charset
-ha 1110 2 0x4c3 0,94 # asciicircum
-ti 1110 0 0x4c4 0,126 # asciitilde
-vS 2223 2 0x169 1,176 # Scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vs 1667 2 0x173 1,177 # scaron
-vz 1667 2 0x174 1,207 # zcaron
-:Y 2223 2 0x16d 1,74 # Ydieresis
-tm 3333 2 0x170 4,41 # trademark
-aq 637 2 0x27 0,39 # quotesingle
-space 927 0 0x20 0,32
-! 927 2 0x21 0,33 # exclam
-" 1183 2 0x22 0,34 # quotedbl
-dq 1183 2 0x22 0,34 # quotedbl
-# 1853 2 0x23 0,35 # numbersign
-sh 1853 2 0x23 0,35 # "
-$ 1853 2 0x24 0,36 # dollar
-Do 1853 2 0x24 0,36 # "
-% 2963 2 0x25 0,37 # percent
-& 2223 2 0x26 0,38 # ampersand
-' 637 2 0x27 0,39 # quoteright
-cq 637 2 0x27 0,39 # quoteright
-( 1110 2 0x28 0,40 # parenleft
-) 1110 2 0x29 0,41 # parenright
-* 1297 2 0x2a 0,42 # asterisk
-+ 1947 0 0x2b 0,43 # plus
-, 927 0 0x2c 0,44 # comma
-- 1947 0 0x2d 0,45 # hyphen
-hy 1947 0 0x2d 0,45 # "
-char173 1947 0 0x2d 0,45 # "
-. 927 0 0x2e 0,46 # period
-/ 927 2 0x2f 0,47 # slash
-sl 927 2 0x2f 0,47 # "
-0 1853 2 0x30 0,48 # zero
-1 1853 2 0x31 0,49 # one
-2 1853 2 0x32 0,50 # two
-3 1853 2 0x33 0,51 # three
-4 1853 2 0x34 0,52 # four
-5 1853 2 0x35 0,53 # five
-6 1853 2 0x36 0,54 # six
-7 1853 2 0x37 0,55 # seven
-8 1853 2 0x38 0,56 # eight
-9 1853 2 0x39 0,57 # nine
-: 927 0 0x3a 0,58 # colon
-; 927 0 0x3b 0,59 # semicolon
-< 1947 0 0x3c 0,60 # less
-= 1947 0 0x3d 0,61 # equal
-> 1947 0 0x3e 0,62 # greater
-? 1853 2 0x3f 0,63 # question
-@ 3383 2 0x40 0,64 # at
-at 3383 2 0x40 0,64 # "
-A 2223 2 0x41 0,65 # A
-B 2223 2 0x42 0,66 # B
-C 2407 2 0x43 0,67 # C
-D 2407 2 0x44 0,68 # D
-E 2223 2 0x45 0,69 # E
-F 2037 2 0x46 0,70 # F
-G 2593 2 0x47 0,71 # G
-H 2407 2 0x48 0,72 # H
-I 927 2 0x49 0,73 # I
-J 1667 2 0x4a 0,74 # J
-K 2223 2 0x4b 0,75 # K
-L 1853 2 0x4c 0,76 # L
-M 2777 2 0x4d 0,77 # M
-N 2407 2 0x4e 0,78 # N
-O 2593 2 0x4f 0,79 # O
-P 2223 2 0x50 0,80 # P
-Q 2593 2 0x51 0,81 # Q
-R 2407 2 0x52 0,82 # R
-S 2223 2 0x53 0,83 # S
-T 2037 2 0x54 0,84 # T
-U 2407 2 0x55 0,85 # U
-V 2223 2 0x56 0,86 # V
-W 3147 2 0x57 0,87 # W
-X 2223 2 0x58 0,88 # X
-Y 2223 2 0x59 0,89 # Y
-Z 2037 2 0x5a 0,90 # Z
-[ 927 2 0x5b 0,91 # bracketleft
-lB 927 2 0x5b 0,91 # "
-\ 927 2 0x5c 0,92 # backslash
-rs 927 2 0x5c 0,92 # "
-] 927 2 0x5d 0,93 # bracketright
-rB 927 2 0x5d 0,93 # "
-a^ 1110 2 0x5e 0,94 # circumflex
-^ 1110 2 0x5e 0,94 # "
-_ 1853 0 0x5f 0,95 # underscore
-` 1110 2 0x60 0,96 # quoteleft
-oq 1110 2 0x60 0,96 # "
-a 1853 0 0x61 0,97 # a
-b 1853 2 0x62 0,98 # b
-c 1667 0 0x63 0,99 # c
-d 1853 2 0x64 0,100 # d
-e 1853 0 0x65 0,101 # e
-f 927 2 0x66 0,102 # f
-g 1853 1 0x67 0,103 # g
-h 1853 2 0x68 0,104 # h
-i 740 2 0x69 0,105 # i
-j 740 2 0x6a 0,106 # j
-k 1667 2 0x6b 0,107 # k
-l 740 2 0x6c 0,108 # l
-m 2777 0 0x6d 0,109 # m
-n 1853 0 0x6e 0,110 # n
-o 1853 0 0x6f 0,111 # o
-p 1853 1 0x70 0,112 # p
-q 1853 1 0x71 0,113 # q
-r 1110 0 0x72 0,114 # r
-s 1667 0 0x73 0,115 # s
-t 927 2 0x74 0,116 # t
-u 1853 0 0x75 0,117 # u
-v 1667 0 0x76 0,118 # v
-w 2407 0 0x77 0,119 # w
-x 1667 0 0x78 0,120 # x
-y 1667 1 0x79 0,121 # y
-z 1667 0 0x7a 0,122 # z
-lC 1113 2 0x7b 0,123 # braceleft
-{ 1113 2 0x7b 0,123 # "
-| 867 2 0x7c 0,124 # "
-rC 1113 2 0x7d 0,125 # braceright
-} 1113 2 0x7d 0,125 # "
-a~ 1110 2 0x7e 0,126 # tilde
-~ 1110 2 0x7e 0,126 # "
-char161 1110 1 0xad 4,7 # exclamdown
-char162 1853 2 0x9b 4,19 # cent
-char163 1853 2 0x9c 4,11 # sterling
-char164 1853 2 0x12f 4,24 # currency
-char165 1853 2 0x9d 4,12 # yen
-char166 867 2 0x7c 0,124 # brokenbar
-char167 1853 2 0x15 4,6 # section
-char168 1110 2 0x122 1,7 # dieresis
-char169 2457 2 0x154 4,23 # copyright
-char170 1233 2 0xa6 4,15 # ordfeminine
-char171 1853 0 0xae 4,9 # guillemotleft
-char172 1947 0 0xaa 6,20 # logicalnot
-char173 1853 0 0x132 4,33 # hyphen
-char174 2457 2 0x155 4,22 # registered
-char175 1947 2 0x2d 6,0 # macron
-char176 1333 2 0xf8 6,36 # degree
-char177 1947 0 0xf1 6,1 # plusminus
-char178 1110 2 0xfd 4,20 # twosuperior
-char179 1110 2 0x14d 4,26 # threesuperior
-char180 1110 2 0x120 1,6 # acute "acute accent"
-char181 1853 1 0xe6 8,25 # mu
-char182 1790 2 0x14 4,5 # paragraph
-char183 927 0 0xfa 6,32 # periodcentered
-char184 1110 0 0x139 1,17 # cedilla
-char185 1110 2 0x156 4,78 # onesuperior
-char186 1217 2 0xa7 4,16 # ordmasculine
-char187 1853 0 0xaf 4,10 # guillemotright
-char188 2780 2 0xac 4,18 # onequarter
-char189 2780 2 0xab 4,17 # onehalf
-char190 2780 2 0x12e 4,25 # threequarters
-char191 2037 1 0xa8 4,8 # questiondown
-char192 2223 2 0x15c 1,32 # Agrave
-char193 2223 2 0x15a 1,26 # Aacute
-char194 2223 2 0x15b 1,28 # Acircumflex
-char195 2223 2 0x28e 1,76 # Atilde
-char196 2223 2 0x8e 1,30 # Adieresis
-char197 2223 2 0x8f 1,34 # Aring
-char198 3333 2 0x92 1,36 # AE
-char199 2407 2 0x80 1,38 # Ccedilla
-char200 2223 2 0x160 1,46 # Egrave
-char201 2223 2 0x90 1,40 # Eacute
-char202 2223 2 0x15e 1,42 # Ecircumflex
-char203 2223 2 0x15f 1,44 # Edieresis
-char204 927 2 0x164 1,54 # Igrave
-char205 927 2 0x161 1,48 # Iacute
-char206 927 2 0x162 1,50 # Icircumflex
-char207 927 2 0x163 1,52 # Idieresis
-char208 2407 2 0x13d 1,78 # Eth
-char209 2407 2 0xa5 1,56 # Ntilde
-char210 2593 2 0x167 1,64 # Ograve
-char211 2593 2 0x165 1,58 # Oacute
-char212 2593 2 0x166 1,60 # Ocircumflex
-char213 2593 2 0x168 1,82 # Otilde
-char214 2593 2 0x99 1,62 # Odieresis
-char215 1947 0 0x157 6,39 # multiply
-char216 2593 2 0x140 1,80 # Oslash
-char217 2407 2 0x16c 1,72 # Ugrave
-char218 2407 2 0x16a 1,66 # Uacute
-char219 2407 2 0x16b 1,68 # Ucircumflex
-char220 2407 2 0x9a 1,70 # Udieresis
-char221 2223 2 0x16f 1,84 # Yacute
-char222 2223 2 0x13e 1,88 # Thorn
-char223 2037 2 0x147 1,23 # germandbls
-char224 1853 2 0x85 1,33 # agrave
-char225 1853 2 0xa0 1,27 # aacute
-char226 1853 2 0x83 1,29 # acircumflex
-char227 1853 2 0x284 1,93 # atilde
-char228 1853 2 0x84 1,31 # adieresis
-char229 1853 2 0x86 1,35 # aring
-char230 2963 0 0x91 1,37 # ae
-char231 1667 0 0x87 1,39 # ccedilla
-char232 1853 2 0x8a 1,47 # egrave
-char233 1853 2 0x82 1,41 # eacute
-char234 1853 2 0x88 1,43 # ecircumflex
-char235 1853 2 0x89 1,45 # edieresis
-char236 927 2 0x8d 1,55 # igrave
-char237 927 2 0xa1 1,49 # iacute
-char238 927 2 0x8c 1,51 # icircumflex
-char239 927 2 0x8b 1,53 # idieresis
-char240 1853 2 0x148 1,87 # eth
-char241 1853 2 0xa4 1,57 # ntilde
-char242 1853 2 0x95 1,65 # ograve
-char243 1853 2 0xa2 1,59 # oacute
-char244 1853 2 0x93 1,61 # ocircumflex
-char245 1853 2 0x172 1,83 # otilde
-char246 1853 2 0x94 1,63 # odieresis
-char247 1947 0 0xf6 6,8 # divide
-char248 2037 0 0x145 1,81 # oslash
-char249 1853 2 0x97 1,73 # ugrave
-char250 1853 2 0xa3 1,67 # uacute
-char251 1853 2 0x96 1,69 # ucircumflex
-char252 1853 2 0x81 1,71 # udieresis
-char253 1667 3 0x175 1,85 # yacute
-char254 1853 3 0x143 1,89 # thorn
-char255 1667 3 0x98 1,75 # ydieresis
--D 2407 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 1853 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 2223 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 1853 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 3333 2 0x92 1,36 # AE
-ae 2963 0 0x91 1,37 # ae
-OE 3333 2 0x141 1,166 # OE
-oe 3147 0 0x146 1,167 # oe
-ij 1437 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 2037 2 0x147 1,23 # germandbls
-'A 2223 2 0x15a 1,26 # Aacute
-'E 2223 2 0x90 1,40 # Eacute
-'I 927 2 0x161 1,48 # Iacute
-'O 2593 2 0x165 1,58 # Oacute
-'U 2407 2 0x16a 1,66 # Uacute
-'a 1853 2 0xa0 1,27 # aacute
-'e 1853 2 0x82 1,41 # eacute
-'i 927 2 0xa1 1,49 # iacute
-'o 1853 2 0xa2 1,59 # oacute
-'u 1853 2 0x95 1,65 # uacute
-:A 2223 2 0x8e 1,30 # Adieresis
-:E 2223 2 0x15f 1,44 # Edieresis
-:I 927 2 0x163 1,52 # Idieresis
-:O 2593 2 0x99 1,62 # Odieresis
-:U 2407 2 0x9a 1,70 # Udieresis
-:Y 2223 2 0x16d 1,74 # Ydieresis
-:a 1853 2 0x84 1,31 # adieresis
-:e 1853 2 0x89 1,45 # edieresis
-:i 927 2 0x8b 1,53 # idieresis
-:o 1853 2 0x94 1,63 # odieresis
-:u 1853 2 0x81 1,71 # udieresis
-:y 1667 3 0x98 1,75 # ydieresis
-^A 2223 2 0x15b 1,28 # Acircumflex
-^E 2223 2 0x15e 1,42 # Ecircumflex
-^I 927 2 0x162 1,50 # Icircumflex
-^O 2593 2 0x166 1,60 # Ocircumflex
-^U 2407 2 0x16b 1,68 # Ucircumflex
-^a 1853 2 0x83 1,29 # acircumflex
-^e 1853 2 0x88 1,43 # ecircumflex
-^i 927 2 0x8c 1,51 # icircumflex
-^o 1853 2 0x93 1,61 # ocircumflex
-^u 1853 2 0x96 1,69 # ucircumflex
-`A 2223 2 0x15c 1,32 # Agrave
-`E 2223 2 0x160 1,46 # Egrave
-`I 927 2 0x164 1,54 # Igrave
-`O 2593 2 0x167 1,64 # Ograve
-`U 2407 2 0x16c 1,72 # Ugrave
-`a 1853 2 0x85 1,33 # agrave
-~a 1853 2 0x284 --- # atilde
-`e 1853 2 0x8a 1,47 # egrave
-`i 927 2 0x8d 1,55 # igrave
-`o 1853 2 0x95 1,65 # ograve
-`u 1853 2 0x97 1,73 # ugrave
-~A 2223 2 0x28e 1,26 # Atilde
-~N 2407 2 0xa5 1,56 # Ntilde
-~O 2593 2 0x168 1,82 # Otilde
-~n 1853 2 0xa4 1,57 # ntilde
-~o 1853 2 0x172 1,83 # otilde
-vS 2223 2 0x169 1,176 # Scaron
-vs 1667 2 0x173 1,177 # scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vz 1667 2 0x174 1,207 # zcaron
-,C 2407 2 0x80 1,38 # Ccedilla
-,c 1667 0 0x87 1,39 # ccedilla
-/L 1853 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 740 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 2593 2 0x140 1,80 # Oslash
-/o 2037 0 0x145 1,81 # oslash
-oA 2223 2 0x8f 1,34 # Aring
-oa 1853 2 0x86 1,35 # aring
-a" 1110 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 1110 2 0x135 1,8 # macron "macron or bar accent"
-a. 1110 2 0x137 1,15 # dotaccent "dot accent"
-a^ 1110 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 1110 2 0x120 1,6 # acute "acute accent"
-ga 1110 2 0x121 1,0 # grave "grave accent"
-ab 1110 2 0x136 1,22 # breve "breve accent"
-ac 1110 0 0x139 1,17 # cedilla "cedilla accent"
-ad 1110 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 1110 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 1110 2 0x138 1,14 # ring "ring or circle accent"
-a~ 1110 2 0x7e 1,2 # tilde "tilde accent"
-ho 1110 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 927 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 1853 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 1853 2 0x24 0,36 # dollar
-Po 1853 2 0x9c 4,11 # sterling
-Ye 1853 2 0x9d 4,12 # yen
-Fn 1853 2 0x9f 4,14 # florin
-ct 1853 2 0x9b 4,19 # cent
-Fo 1853 0 0xae 4,9 # guillemotleft
-Fc 1110 0 0x4bb 4,20 # guillemotright
-fo 1110 0 0x127 4,35 # guilsinglleft
-fc 1110 0 0x128 4,36 # guilsinglright
-r! 1110 1 0xad 4,7 # exclamdown
-r? 2037 1 0xa8 4,8 # questiondown
-fi 1667 2 0x130 4,54 # fi "fi ligature"
-fl 1667 2 0x131 4,55 # fl "fl ligature"
-OK 1667 0 0x3d6 --- # \& "check mark, tick"
-Of 1233 2 0xa6 4,15 # ordfeminine
-Om 1217 2 0xa7 4,16 # ordmasculine
-S1 1110 2 0x156 4,78 # onesuperior
-S2 1110 2 0xfd 4,20 # twosuperior
-S3 1110 2 0x14d 4,26 # threesuperior
-<- 3290 0 0x1b 6,22 # arrowleft
--> 3290 0 0x1a 6,21 # arrowright
-<> 3473 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 2010 0 0x19 6,24 # arrowdown
-ua 2010 0 0x18 6,23 # arrowup
-va 2010 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 2010 0 0x3dc 6,57 # arrowdblleft
-rA 2010 0 0x3de 6,56 # arrowdblright
-hA 2010 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 2010 0 0x3df 6,59 # arrowdbldown
-uA 2010 0 0x3dd 6,58 # arrowdblup
-ba 3333 2 0xb3 3,9 # bar
-bb 867 2 0x7c 0,124 # brokenbar
-br 3333 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 3333 0 0x123 4,34 # ru "baseline rule"
-ul 1853 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 3333 0 0x3f4 3,9 # bv "bold vertical"
-ci 2843 0 0x9 4,1 # circle
-bu 2120 0 0x7 4,0 # bullet
-co 2457 2 0x154 4,23 # copyright
-rg 2457 2 0x155 4,22 # registered
-tm 3333 2 0x170 4,41 # trademark
-dd 1853 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 1853 2 0x12a 4,39 # dagger
-ps 1790 2 0x14 4,5 # paragraph
-sc 1853 2 0x15 4,6 # section
-de 1333 2 0xf8 6,36 # degree
-em 3333 0 0x123 4,34 # emdash "em dash"
-en 1853 0 0x132 4,33 # endash "en dash"
-%0 3333 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 2780 2 0xab 4,17 # onehalf
-14 2780 2 0xac 4,18 # onequarter
-34 2780 2 0x12e 4,25 # threequarters
-f/ 556 2 0x158 6,6 # fraction "bar for fractions"
-fm 556 0 0x3a2 6,45 # minute "footmark, prime"
-sd 556 0 0x3b2 6,46 # second
-ha 556 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 556 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 1947 0 0x2d 6,0 # hyphen
-lB 927 2 0x5b 0,91 # bracketleft
-rB 927 2 0x5d 0,93 # bracketright
-lC 1113 2 0x7b 0,123 # braceleft
-rC 1113 2 0x7d 0,125 # braceright
-la 1113 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 1113 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 1110 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 1110 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 1110 2 0x125 4,32 # quotedblleft
-rq 1110 2 0x4ba 6,31 # quotedblright
-oq 740 2 0x176 4,29 # quoteleft "single open quote"
-aq 637 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 867 0 0x3f4 0,124 # bar
-at 3383 2 0x40 0,64 # at
-.C1 1947 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 1853 2 0x23 0,35 # numbersign
-sl 927 2 0x2f 0,47 # slash
-rs 927 2 0x5c 0,92 # backslash
-3d 927 0 0x35c 6,102 # therefore
-tf 927 0 0x35c 6,102 # therefore
-*A 927 0 0x341 8,0 # Alpha
-*B 927 0 0x342 8,2 # Beta
-*C 927 0 0x358 8,28 # Xi
-*D 927 0 0x344 8,8 # Delta
-*E 927 0 0x345 8,10 # Epsilon
-*F 2377 0 0x346 8,44 # Phi
-*G 1907 0 0x347 8,6 # Gamma
-*H 1907 0 0x351 8,16 # Theta
-*I 1907 0 0x349 8,18 # Iota
-*K 1907 0 0x34b 8,20 # Kappa
-*L 1907 0 0x34c 8,22 # Lambda
-*M 1907 0 0x34d 8,24 # Mu
-*N 1907 0 0x34e 8,26 # Nu
-*O 1907 0 0x34f 8,30 # Omicron
-*P 1907 0 0x350 8,32 # Pi
-*Q 1907 0 0x359 8,48 # Psi
-*R 1907 0 0x352 8,34 # Rho
-*S 1973 0 0x353 8,36 # Sigma
-*T 1973 0 0x354 8,40 # Tau
-*U 1973 0 0x3a1 8,76 # Upsilon
-*W 2547 0 0x357 8,50 # Omega
-*X 1973 0 0x343 8,36 # Chi
-*Y 1973 0 0x348 8,14 # Eta
-*Z 1973 0 0x35a 8,12 # Zeta
-*a 2023 0 0xe0 8,1 # alpha
-*b 1893 0 0xe1 8,3 # beta
-*c 1893 0 0x378 8,29 # xi
-*d 1890 0 0xeb 8,9 # delta
-*e 1890 0 0x36e 8,70 # epsilon
-*f 1890 0 0x366 8,45 # phi
-+f 1890 0 0x36a 8,77 # phi1 "variant phi"
-*g 1890 0 0x367 8,7 # gamma
-*h 1853 0 0xe9 8,17 # theta
-+h 1853 0 0x375 8,71 # theta1 "variant theta"
-*i 1853 0 0x369 8,19 # iota
-*k 1853 0 0x36b 8,21 # kappa
-*l 1853 0 0x36c 8,23 # lambda
-*m 1853 0 0xe6 8,25 # mu
-*n 1853 0 0x36e 8,27 # nu
-*o 1853 0 0x36f 8,31 # omicron
-*p 1963 0 0xe3 8,33 # pi
-+p 1963 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 1963 0 0x379 8,49 # psi
-*r 1963 0 0x372 8,35 # rho
-*s 2037 0 0xe5 8,37 # sigma
-*t 1463 0 0xe7 8,41 # tau
-*u 1463 0 0x375 8,27 # upsilon
-*w 1463 0 0x377 8,51 # omega
-*x 1463 0 0x363 8,47 # chi
-*y 1463 0 0x368 8,15 # eta
-*z 1463 0 0x37a 8,13 # zeta
-ts 1463 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 2663 0 0xf7 6,13 # approxequal
-~= 2663 0 0xf7 6,13 # approxequal
-!= 2663 0 0x3b9 6,99 # notequal
-** 927 0 0x32a 0,32 # asteriskmath
-+- 1947 0 0xf1 6,1 # plusminus
-<= 2413 0 0xf3 6,2 # lessequal
-== 2413 0 0x3ba 8,14 # equivalence
-=~ 2413 0 0x340 8,116 # congruent
->= 1893 0 0x3b3 8,3 # greaterequal
-AN 1893 0 0x3d9 8,85 # logicaland
-OR 1893 0 0x3da 8,86 # logicalor
-no 1893 0 0x3d8 8,20 # logicalnot
-te 1893 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 1893 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 1893 0 0x3c0 9,0 # aleph
-Im 1893 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 1893 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 1893 0 0x3a5 8,19 # infinity
-md 1893 0 0x3b7 8,32 # dotmath
-mo 1893 0 0x3ce 8,15 # element
-mu 1893 0 0x3b4 8,39 # multiply
-nc 1893 0 0x3cb 8,197 # notpropersuperset
-nm 1893 0 0x3cf 8,209 # notelement
-pl 927 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 1947 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 1947 0 0x3b5 6,4 # proportional
-pp 1947 0 0x35e 8,89 # perpendicular
-sb 1947 0 0x3cc 6,67 # propersubset
-sp 1947 0 0x3c9 6,68 # propersuperset
-ib 1947 0 0x3cd 6,69 # reflexsubset
-ip 1947 0 0x3ca 6,70 # reflexsuperset
-ap 1947 0 0x37e 6,12 # similar
-pd 1947 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 1947 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 1947 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 2620 0 0xef 6,16 # intersection "intersection, cap"
-cu 2620 0 0x3c8 6,66 # union "union, cup"
-di 1947 0 0x3b8 6,8 # divide "division sign"
--h 3333 0 0xc4 3,8 # hbar
-gr 3333 0 0x3d1 6,33 # gradient
-es 2593 0 0x3c6 0,79 # emptyset
-CL 2510 0 0x5 5,168 # club "club suit"
-SP 2510 0 0x6 5,171 # spade "spade suit"
-HE 2510 0 0x3 5,170 # heart "heart suit"
-DI 2510 0 0x4 5,169 # diamond "diamond suit"
-CR 2510 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 2510 0 0x327 6,71 # suchthat
-/_ 2510 0 0x3d0 6,79 # angle
-<< 1853 0 0xae 6,77 # "" "much less"
->> 1853 0 0xaf 6,78 # "" "much greater"
-wp 1853 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 1853 0 0x3e0 6,95 # lozenge
-an 3333 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 927 0 0xfa 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/Makefile.sub b/contrib/groff/font/devlbp/Makefile.sub
deleted file mode 100644
index 6959b25f2c3d..000000000000
--- a/contrib/groff/font/devlbp/Makefile.sub
+++ /dev/null
@@ -1,18 +0,0 @@
-DEV=lbp
-LBPPRINT=$(PSPRINT)
-DEVFILES=DESC \
- HB HBI HI HR \
- TB TBI TI TR
-
-CLEANADD=DESC
-
-DESC: DESC.in
- -rm -f DESC
- cat $(srcdir)/DESC.in >>DESC
- if test "$(PAGE)" = A4; then \
- echo "papersize a4" >>DESC; \
- else \
- echo "papersize letter" >>DESC; \
- fi
- test -z '$(LBPPRINT)' || echo print '$(LBPPRINT)' >>DESC
-
diff --git a/contrib/groff/font/devlbp/TB b/contrib/groff/font/devlbp/TB
deleted file mode 100644
index 70a09f2d123a..000000000000
--- a/contrib/groff/font/devlbp/TB
+++ /dev/null
@@ -1,513 +0,0 @@
-name TB
-lbpname Dutch-Bold
-special
-spacewidth 833
-slant 0
-ligatures fi fl 0
-charset
-ha 1110 2 0x4c3 0,94 # asciicircum
-ti 1110 0 0x4c4 0,126 # asciitilde
-vS 1853 2 0x169 1,176 # Scaron
-vZ 2223 2 0x16e 1,206 # Zcaron
-vs 1297 2 0x173 1,177 # scaron
-vz 1480 2 0x174 1,207 # zcaron
-:Y 2407 2 0x16d 1,74 # Ydieresis
-tm 3333 2 0x170 4,41 # trademark
-aq 927 2 0x27 0,39 # quotesingle
-space 833 0 0x20 0,32
-! 1110 2 0x21 0,33 # exclam
-" 1850 2 0x22 0,34 # quotedbl
-dq 1850 2 0x22 0,34 # quotedbl
-# 1667 2 0x23 0,35 # numbersign
-sh 1667 2 0x23 0,35 # "
-$ 1667 2 0x24 0,36 # dollar
-Do 1667 2 0x24 0,36 # "
-% 3333 2 0x25 0,37 # percent
-& 2777 2 0x26 0,38 # ampersand
-' 927 2 0x27 0,39 # quoteright
-cq 927 2 0x27 0,39 # quoteright
-( 1110 2 0x28 0,40 # parenleft
-) 1110 2 0x29 0,41 # parenright
-* 1667 2 0x2a 0,42 # asterisk
-+ 1900 0 0x2b 0,43 # plus
-, 833 0 0x2c 0,44 # comma
-- 1900 0 0x2d 0,45 # hyphen
-\- 1900 0 0x2d 0,45 # hyphen
-hy 1900 0 0x2d 0,45 # "
-char173 1900 0 0x2d 0,45 # "
-. 833 0 0x2e 0,46 # period
-/ 927 2 0x2f 0,47 # slash
-sl 927 2 0x2f 0,47 # "
-0 1667 2 0x30 0,48 # zero
-1 1667 2 0x31 0,49 # one
-2 1667 2 0x32 0,50 # two
-3 1667 2 0x33 0,51 # three
-4 1667 2 0x34 0,52 # four
-5 1667 2 0x35 0,53 # five
-6 1667 2 0x36 0,54 # six
-7 1667 2 0x37 0,55 # seven
-8 1667 2 0x38 0,56 # eight
-9 1667 2 0x39 0,57 # nine
-: 0 0 0x3a 0,58 # colon
-; 1110 0 0x3b 0,59 # semicolon
-< 1900 0 0x3c 0,60 # less
-= 1900 0 0x3d 0,61 # equal
-> 1900 0 0x3e 0,62 # greater
-? 1667 2 0x3f 0,63 # question
-@ 3100 2 0x40 0,64 # at
-at 3100 2 0x40 0,64 # "
-A 2407 2 0x41 0,65 # A
-B 2223 2 0x42 0,66 # B
-C 2407 2 0x43 0,67 # C
-D 2407 2 0x44 0,68 # D
-E 2223 2 0x45 0,69 # E
-F 2037 2 0x46 0,70 # F
-G 2593 2 0x47 0,71 # G
-H 2593 2 0x48 0,72 # H
-I 1297 2 0x49 0,73 # I
-J 1667 2 0x4a 0,74 # J
-K 2593 2 0x4b 0,75 # K
-L 2223 2 0x4c 0,76 # L
-M 3147 2 0x4d 0,77 # M
-N 2407 2 0x4e 0,78 # N
-O 2593 2 0x4f 0,79 # O
-P 2037 2 0x50 0,80 # P
-Q 2593 2 0x51 0,81 # Q
-R 2407 2 0x52 0,82 # R
-S 1853 2 0x53 0,83 # S
-T 2223 2 0x54 0,84 # T
-U 2407 2 0x55 0,85 # U
-V 2407 2 0x56 0,86 # V
-W 3333 2 0x57 0,87 # W
-X 2407 2 0x58 0,88 # X
-Y 2407 2 0x59 0,89 # Y
-Z 2223 2 0x5a 0,90 # Z
-[ 1110 2 0x5b 0,91 # bracketleft
-lB 1110 2 0x5b 0,91 # "
-\ 927 2 0x5c 0,92 # backslash
-rs 927 2 0x5c 0,92 # "
-] 1110 2 0x5d 0,93 # bracketright
-rB 1110 2 0x5d 0,93 # "
-a^ 1110 2 0x5e 0,94 # circumflex
-^ 1110 2 0x5e 0,94 # "
-_ 1667 0 0x5f 0,95 # underscore
-` 1110 2 0x60 0,96 # quoteleft
-oq 1110 2 0x60 0,96 # "
-a 1667 0 0x61 0,97 # a
-b 1853 2 0x62 0,98 # b
-c 1480 0 0x63 0,99 # c
-d 1853 2 0x64 0,100 # d
-e 1480 0 0x65 0,101 # e
-f 1110 2 0x66 0,102 # f
-g 1667 1 0x67 0,103 # g
-h 1853 2 0x68 0,104 # h
-i 927 2 0x69 0,105 # i
-j 1110 2 0x6a 0,106 # j
-k 1853 2 0x6b 0,107 # k
-l 927 2 0x6c 0,108 # l
-m 2777 0 0x6d 0,109 # m
-n 1853 0 0x6e 0,110 # n
-o 1667 0 0x6f 0,111 # o
-p 1853 1 0x70 0,112 # p
-q 1853 1 0x71 0,113 # q
-r 1480 0 0x72 0,114 # r
-s 1297 0 0x73 0,115 # s
-t 1110 2 0x74 0,116 # t
-u 1853 0 0x75 0,117 # u
-v 1667 0 0x76 0,118 # v
-w 2407 0 0x77 0,119 # w
-x 1667 0 0x78 0,120 # x
-y 1667 1 0x79 0,121 # y
-z 1480 0 0x7a 0,122 # z
-lC 1313 2 0x7b 0,123 # braceleft
-{ 1313 2 0x7b 0,123 # "
-ba 733 2 0x7c 0,124 # bar
-| 733 2 0x7c 0,124 # "
-rC 1313 2 0x7d 0,125 # braceright
-} 1313 2 0x7d 0,125 # "
-a~ 1110 2 0x7e 0,126 # tilde
-~ 1110 2 0x7e 0,126 # "
-char161 1110 1 0xad 4,7 # exclamdown
-char162 1667 2 0x9b 4,19 # cent
-char163 1667 2 0x9c 4,11 # sterling
-char164 1667 2 0x12f 4,24 # currency
-char165 1667 2 0x9d 4,12 # yen
-char166 733 2 0x7c 0,124 # brokenbar
-char167 1667 2 0x15 4,6 # section
-char168 1110 2 0x122 1,7 # dieresis
-char169 2490 2 0x154 4,23 # copyright
-char170 1000 2 0xa6 4,15 # ordfeminine
-char171 1667 0 0xae 4,9 # guillemotleft
-char172 1900 0 0xaa 6,20 # logicalnot
-char173 1667 0 0x132 4,33 # hyphen
-char174 2490 2 0x155 4,22 # registered
-char175 1900 2 0x2d 6,0 # macron
-char176 1333 2 0xf8 6,36 # degree
-char177 1900 0 0xf1 6,1 # plusminus
-char178 1000 2 0xfd 4,20 # twosuperior
-char179 1000 2 0x14d 4,26 # threesuperior
-char180 1110 2 0x120 1,6 # acute "acute accent"
-char181 1853 1 0xe6 8,25 # mu
-char182 1800 2 0x14 4,5 # paragraph
-char183 833 0 0xfa 6,32 # periodcentered
-char184 1110 0 0x139 1,17 # cedilla
-char185 1000 2 0x156 4,78 # onesuperior
-char186 1100 2 0xa7 4,16 # ordmasculine
-char187 1667 0 0xaf 4,10 # guillemotright
-char188 2500 2 0xac 4,18 # onequarter
-char189 2500 2 0xab 4,17 # onehalf
-char190 2500 2 0x12e 4,25 # threequarters
-char191 1667 1 0xa8 4,8 # questiondown
-char192 2407 2 0x15c 1,32 # Agrave
-char193 2407 2 0x15a 1,26 # Aacute
-char194 2407 2 0x15b 1,28 # Acircumflex
-char195 2407 2 0x28e 1,76 # Atilde
-char196 2407 2 0x8e 1,30 # Adieresis
-char197 2407 2 0x8f 1,34 # Aring
-char198 3333 2 0x92 1,36 # AE
-char199 2407 2 0x80 1,38 # Ccedilla
-char200 2223 2 0x160 1,46 # Egrave
-char201 2223 2 0x90 1,40 # Eacute
-char202 2223 2 0x15e 1,42 # Ecircumflex
-char203 2223 2 0x15f 1,44 # Edieresis
-char204 1297 2 0x164 1,54 # Igrave
-char205 1297 2 0x161 1,48 # Iacute
-char206 1297 2 0x162 1,50 # Icircumflex
-char207 1297 2 0x163 1,52 # Idieresis
-char208 2407 2 0x13d 1,78 # Eth
-char209 2407 2 0xa5 1,56 # Ntilde
-char210 2593 2 0x167 1,64 # Ograve
-char211 2593 2 0x165 1,58 # Oacute
-char212 2593 2 0x166 1,60 # Ocircumflex
-char213 2593 2 0x168 1,82 # Otilde
-char214 2593 2 0x99 1,62 # Odieresis
-char215 1900 0 0x157 6,39 # multiply
-char216 2593 2 0x140 1,80 # Oslash
-char217 2407 2 0x16c 1,72 # Ugrave
-char218 2407 2 0x16a 1,66 # Uacute
-char219 2407 2 0x16b 1,68 # Ucircumflex
-char220 2407 2 0x9a 1,70 # Udieresis
-char221 2407 2 0x16f 1,84 # Yacute
-char222 2037 2 0x13e 1,88 # Thorn
-char223 1853 2 0x147 1,23 # germandbls
-char224 1667 2 0x85 1,33 # agrave
-char225 1667 2 0xa0 1,27 # aacute
-char226 1667 2 0x83 1,29 # acircumflex
-char227 1667 2 0x284 1,93 # atilde
-char228 1667 2 0x84 1,31 # adieresis
-char229 1667 2 0x86 1,35 # aring
-char230 2407 0 0x91 1,37 # ae
-char231 1480 0 0x87 1,39 # ccedilla
-char232 1480 2 0x8a 1,47 # egrave
-char233 1480 2 0x82 1,41 # eacute
-char234 1480 2 0x88 1,43 # ecircumflex
-char235 1480 2 0x89 1,45 # edieresis
-char236 927 2 0x8d 1,55 # igrave
-char237 927 2 0xa1 1,49 # iacute
-char238 927 2 0x8c 1,51 # icircumflex
-char239 927 2 0x8b 1,53 # idieresis
-char240 1667 2 0x148 1,87 # eth
-char241 1853 2 0xa4 1,57 # ntilde
-char242 1667 2 0x95 1,65 # ograve
-char243 1667 2 0xa2 1,59 # oacute
-char244 1667 2 0x93 1,61 # ocircumflex
-char245 1667 2 0x172 1,83 # otilde
-char246 1667 2 0x94 1,63 # odieresis
-char247 1900 0 0xf6 6,8 # divide
-char248 1667 0 0x145 1,81 # oslash
-char249 1853 2 0x97 1,73 # ugrave
-char250 1853 2 0xa3 1,67 # uacute
-char251 1853 2 0x96 1,69 # ucircumflex
-char252 1853 2 0x81 1,71 # udieresis
-char253 1667 3 0x175 1,85 # yacute
-char254 1853 3 0x143 1,89 # thorn
-char255 1667 3 0x98 1,75 # ydieresis
--D 2407 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 1667 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 2037 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 1853 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 3333 2 0x92 1,36 # AE
-ae 2407 0 0x91 1,37 # ae
-OE 3333 2 0x141 1,166 # OE
-oe 2407 0 0x146 1,167 # oe
-ij 1990 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 1853 2 0x147 1,23 # germandbls
-'A 2407 2 0x15a 1,26 # Aacute
-'E 2223 2 0x90 1,40 # Eacute
-'I 1297 2 0x161 1,48 # Iacute
-'O 2593 2 0x165 1,58 # Oacute
-'U 2407 2 0x16a 1,66 # Uacute
-'a 1667 2 0xa0 1,27 # aacute
-'e 1480 2 0x82 1,41 # eacute
-'i 927 2 0xa1 1,49 # iacute
-'o 1667 2 0xa2 1,59 # oacute
-'u 1667 2 0x95 1,65 # uacute
-:A 2407 2 0x8e 1,30 # Adieresis
-:E 2223 2 0x15f 1,44 # Edieresis
-:I 1297 2 0x163 1,52 # Idieresis
-:O 2593 2 0x99 1,62 # Odieresis
-:U 2407 2 0x9a 1,70 # Udieresis
-:Y 2407 2 0x16d 1,74 # Ydieresis
-:a 1667 2 0x84 1,31 # adieresis
-:e 1480 2 0x89 1,45 # edieresis
-:i 927 2 0x8b 1,53 # idieresis
-:o 1667 2 0x94 1,63 # odieresis
-:u 1853 2 0x81 1,71 # udieresis
-:y 1667 3 0x98 1,75 # ydieresis
-^A 2407 2 0x15b 1,28 # Acircumflex
-^E 2223 2 0x15e 1,42 # Ecircumflex
-^I 1297 2 0x162 1,50 # Icircumflex
-^O 2593 2 0x166 1,60 # Ocircumflex
-^U 2407 2 0x16b 1,68 # Ucircumflex
-^a 1667 2 0x83 1,29 # acircumflex
-^e 1480 2 0x88 1,43 # ecircumflex
-^i 927 2 0x8c 1,51 # icircumflex
-^o 1667 2 0x93 1,61 # ocircumflex
-^u 1853 2 0x96 1,69 # ucircumflex
-`A 2407 2 0x15c 1,32 # Agrave
-`E 2223 2 0x160 1,46 # Egrave
-`I 1297 2 0x164 1,54 # Igrave
-`O 2593 2 0x167 1,64 # Ograve
-`U 2407 2 0x16c 1,72 # Ugrave
-`a 1667 2 0x85 1,33 # agrave
-`e 1480 2 0x8a 1,47 # egrave
-`i 927 2 0x8d 1,55 # igrave
-`o 1667 2 0x95 1,65 # ograve
-`u 1853 2 0x97 1,73 # ugrave
-~A 2407 2 0x28e 1,26 # Atilde
-~N 2407 2 0xa5 1,56 # Ntilde
-~O 2593 2 0x168 1,82 # Otilde
-~a 1667 2 0x284 --- # atilde
-~n 1853 2 0xa4 1,57 # ntilde
-~o 1667 2 0x172 1,83 # otilde
-vS 1853 2 0x169 1,176 # Scaron
-vs 1297 2 0x173 1,177 # scaron
-vZ 2223 2 0x16e 1,206 # Zcaron
-vz 1480 2 0x174 1,207 # zcaron
-,C 2407 2 0x80 1,38 # Ccedilla
-,c 1480 0 0x87 1,39 # ccedilla
-/L 2223 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 927 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 2593 2 0x140 1,80 # Oslash
-/o 1667 0 0x145 1,81 # oslash
-oA 2407 2 0x8f 1,34 # Aring
-oa 1667 2 0x86 1,35 # aring
-a" 1110 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 1110 2 0x135 1,8 # macron "macron or bar accent"
-a. 1110 2 0x137 1,15 # dotaccent "dot accent"
-a^ 1110 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 1110 2 0x120 1,6 # acute "acute accent"
-ga 1110 2 0x121 1,0 # grave "grave accent"
-ab 1110 2 0x136 1,22 # breve "breve accent"
-ac 1110 0 0x139 1,17 # cedilla "cedilla accent"
-ad 1110 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 1110 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 1110 2 0x138 1,14 # ring "ring or circle accent"
-a~ 1110 2 0x7e 1,2 # tilde "tilde accent"
-ho 1110 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 927 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 1667 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 1667 2 0x24 0,36 # dollar
-Po 1667 2 0x9c 4,11 # sterling
-Ye 1667 2 0x9d 4,12 # yen
-Fn 1667 2 0x9f 4,14 # florin
-ct 1667 2 0x9b 4,19 # cent
-Fo 1667 0 0xae 4,9 # guillemotleft
-Fc 1000 0 0x4bb 4,20 # guillemotright
-fo 1110 0 0x127 4,35 # guilsinglleft
-fc 1110 0 0x128 4,36 # guilsinglright
-r! 1110 1 0xad 4,7 # exclamdown
-r? 1667 1 0xa8 4,8 # questiondown
-fi 1853 2 0x130 4,54 # fi "fi ligature"
-fl 1853 2 0x131 4,55 # fl "fl ligature"
-OK 1853 0 0x3d6 --- # \& "check mark, tick"
-Of 1000 2 0xa6 4,15 # ordfeminine
-Om 1100 2 0xa7 4,16 # ordmasculine
-S1 1000 2 0x156 4,78 # onesuperior
-S2 1000 2 0xfd 4,20 # twosuperior
-S3 1000 2 0x14d 4,26 # threesuperior
-<- 3290 0 0x1b 6,22 # arrowleft
--> 3290 0 0x1a 6,21 # arrowright
-<> 3473 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 2010 0 0x19 6,24 # arrowdown
-ua 2010 0 0x18 6,23 # arrowup
-va 2010 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 2010 0 0x3dc 6,57 # arrowdblleft
-rA 2010 0 0x3de 6,56 # arrowdblright
-hA 2010 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 2010 0 0x3df 6,59 # arrowdbldown
-uA 2010 0 0x3dd 6,58 # arrowdblup
-ba 3333 2 0xb3 3,9 # bar
-bb 733 2 0x7c 0,124 # brokenbar
-br 3333 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 3333 0 0x123 4,34 # ru "baseline rule"
-ul 1667 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 3333 0 0xb3 3,9 # bv "bold vertical"
-ci 2843 0 0x9 4,1 # circle
-bu 2120 0 0x7 4,0 # bullet
-co 2490 2 0x154 4,23 # copyright
-rg 2490 2 0x155 4,22 # registered
-tm 3333 2 0x170 4,41 # trademark
-dd 1667 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 1667 2 0x12a 4,39 # dagger
-ps 1800 2 0x14 4,5 # paragraph
-sc 1667 2 0x15 4,6 # section
-de 1333 2 0xf8 6,36 # degree
-em 3333 0 0x123 4,34 # emdash "em dash"
-en 1667 0 0x132 4,33 # endash "en dash"
-%0 3333 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 2500 2 0xab 4,17 # onehalf
-14 2500 2 0xac 4,18 # onequarter
-34 2500 2 0x12e 4,25 # threequarters
-f/ 927 2 0x158 6,6 # fraction "bar for fractions"
-fm 927 0 0x3a2 6,45 # minute "footmark, prime"
-sd 927 0 0x3b2 6,46 # second
-ha 927 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 927 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 1900 0 0x2d 6,0 # hyphen
-lB 1110 2 0x5b 0,91 # bracketleft
-rB 1110 2 0x5d 0,93 # bracketright
-lC 1313 2 0x7b 0,123 # braceleft
-rC 1313 2 0x7d 0,125 # braceright
-la 1313 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 1313 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 1667 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 1667 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 1667 2 0x125 4,32 # quotedblleft
-rq 1667 2 0x4ba 6,31 # quotedblright
-oq 1110 2 0x176 4,29 # quoteleft "single open quote"
-aq 927 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 733 0 0x3f4 0,124 # bar
-at 3100 2 0x40 0,64 # at
-.C1 1900 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 1667 2 0x23 0,35 # numbersign
-sl 927 2 0x2f 0,47 # slash
-rs 927 2 0x5c 0,92 # backslash
-3d 927 0 0x35c 6,102 # therefore
-tf 927 0 0x35c 6,102 # therefore
-*A 927 0 0x341 8,0 # Alpha
-*B 927 0 0x342 8,2 # Beta
-*C 927 0 0x358 8,28 # Xi
-*D 927 0 0x344 8,8 # Delta
-*E 927 0 0x345 8,10 # Epsilon
-*F 2560 0 0x346 8,44 # Phi
-*G 2003 0 0x347 8,6 # Gamma
-*H 2003 0 0x351 8,16 # Theta
-*I 2003 0 0x349 8,18 # Iota
-*K 2003 0 0x34b 8,20 # Kappa
-*L 2003 0 0x34c 8,22 # Lambda
-*M 2003 0 0x34d 8,24 # Mu
-*N 2003 0 0x34e 8,26 # Nu
-*O 2003 0 0x34f 8,30 # Omicron
-*P 2003 0 0x350 8,32 # Pi
-*Q 2003 0 0x359 8,48 # Psi
-*R 2003 0 0x352 8,34 # Rho
-*S 2203 0 0x353 8,36 # Sigma
-*T 2203 0 0x354 8,40 # Tau
-*U 2203 0 0x3a1 8,76 # Upsilon
-*W 2510 0 0x357 8,50 # Omega
-*X 2203 0 0x343 8,36 # Chi
-*Y 2203 0 0x348 8,14 # Eta
-*Z 2203 0 0x35a 8,12 # Zeta
-*a 1787 0 0xe0 8,1 # alpha
-*b 1633 0 0xe1 8,3 # beta
-*c 1633 0 0x378 8,29 # xi
-*d 1610 0 0xeb 8,9 # delta
-*e 1610 0 0x36e 8,70 # epsilon
-*f 1610 0 0x366 8,45 # phi
-+f 1610 0 0x36a 8,77 # phi1 "variant phi"
-*g 1610 0 0x367 8,7 # gamma
-*h 1587 0 0xe9 8,17 # theta
-+h 1587 0 0x375 8,71 # theta1 "variant theta"
-*i 1587 0 0x369 8,19 # iota
-*k 1587 0 0x36b 8,21 # kappa
-*l 1587 0 0x36c 8,23 # lambda
-*m 1853 0 0xe6 8,25 # mu
-*n 1853 0 0x36e 8,27 # nu
-*o 1853 0 0x36f 8,31 # omicron
-*p 1920 0 0xe3 8,33 # pi
-+p 1920 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 1920 0 0x379 8,49 # psi
-*r 1920 0 0x372 8,35 # rho
-*s 1747 0 0xe5 8,37 # sigma
-*t 1473 0 0xe7 8,41 # tau
-*u 1473 0 0x375 8,27 # upsilon
-*w 1473 0 0x377 8,51 # omega
-*x 1473 0 0x363 8,47 # chi
-*y 1473 0 0x368 8,15 # eta
-*z 1473 0 0x37a 8,13 # zeta
-ts 1473 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 2663 0 0xf7 6,13 # approxequal
-~= 2663 0 0xf7 6,13 # approxequal
-!= 2663 0 0x3b9 6,99 # notequal
-** 833 0 0x32a 0,32 # asteriskmath
-+- 1900 0 0xf1 6,1 # plusminus
-<= 2407 0 0xf3 6,2 # lessequal
-== 2407 0 0x3ba 8,14 # equivalence
-=~ 2407 0 0x340 8,116 # congruent
->= 1633 0 0x3b3 8,3 # greaterequal
-AN 1633 0 0x3d9 8,85 # logicaland
-OR 1633 0 0x3da 8,86 # logicalor
-no 1633 0 0x3d8 8,20 # logicalnot
-te 1633 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 1633 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 1633 0 0x3c0 9,0 # aleph
-Im 1633 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 1633 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 1633 0 0x3a5 8,19 # infinity
-md 1633 0 0x3b7 8,32 # dotmath
-mo 1633 0 0x3ce 8,15 # element
-mu 1633 0 0x3b4 8,39 # multiply
-nc 1633 0 0x3cb 8,197 # notpropersuperset
-nm 1633 0 0x3cf 8,209 # notelement
-pl 1110 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 1900 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 1900 0 0x3b5 6,4 # proportional
-pp 1900 0 0x35e 8,89 # perpendicular
-sb 1900 0 0x3cc 6,67 # propersubset
-sp 1900 0 0x3c9 6,68 # propersuperset
-ib 1900 0 0x3cd 6,69 # reflexsubset
-ip 1900 0 0x3ca 6,70 # reflexsuperset
-ap 1900 0 0x37e 6,12 # similar
-pd 1900 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 1900 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 1900 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 2620 0 0xef 6,16 # intersection "intersection, cap"
-cu 2620 0 0x3c8 6,66 # union "union, cup"
-di 1900 0 0x3b8 6,8 # divide "division sign"
--h 3333 0 0xc4 3,8 # hbar
-gr 3333 0 0x3d1 6,33 # gradient
-es 2593 0 0x3c6 0,79 # emptyset
-CL 2510 0 0x5 5,168 # club "club suit"
-SP 2510 0 0x6 5,171 # spade "spade suit"
-HE 2510 0 0x3 5,170 # heart "heart suit"
-DI 2510 0 0x4 5,169 # diamond "diamond suit"
-CR 2510 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 2510 0 0x327 6,71 # suchthat
-/_ 2510 0 0x3d0 6,79 # angle
-<< 1667 0 0xae 6,77 # "" "much less"
->> 1667 0 0xaf 6,78 # "" "much greater"
-wp 1667 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 1667 0 0x3e0 6,95 # lozenge
-an 3333 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 833 0 0xfa 6,32 # periodcentered
-kernpairs
-V A -120
-W A -96
-Y A -72
-Y C -48
-A V -120
-A W -120
-A Y -120
-V a -24
-Y a -48
-V c -48
-Y c -48
-P e -48
-V e -48
-Y e -72
-V o -48
-W o -48
-Y o -96
-A v -48
-A w -48
diff --git a/contrib/groff/font/devlbp/TBI b/contrib/groff/font/devlbp/TBI
deleted file mode 100644
index 1c2f8fed481e..000000000000
--- a/contrib/groff/font/devlbp/TBI
+++ /dev/null
@@ -1,493 +0,0 @@
-name TBI
-lbpname Dutch-BoldItalic
-special
-spacewidth 833
-slant 18.49
-ligatures fi fl 0
-charset
-ha 1110 2 0x4c3 0,94 # asciicircum
-ti 1110 0 0x4c4 0,126 # asciitilde
-vS 1853 2 0x169 1,176 # Scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vs 1297 2 0x173 1,177 # scaron
-vz 1297 2 0x174 1,207 # zcaron
-:Y 2037 2 0x16d 1,74 # Ydieresis
-tm 3333 2 0x170 4,41 # trademark
-aq 927 2 0x27 0,39 # quotesingle
-space 833 0 0x20 0,32
-! 1297 2 0x21 0,33 # exclam
-" 1850 2 0x22 0,34 # quotedbl
-dq 1850 2 0x22 0,34 # quotedbl
-# 1667 2 0x23 0,35 # numbersign
-sh 1667 2 0x23 0,35 # "
-$ 1667 2 0x24 0,36 # dollar
-Do 1667 2 0x24 0,36 # "
-% 2777 2 0x25 0,37 # percent
-& 2593 2 0x26 0,38 # ampersand
-' 927 2 0x27 0,39 # quoteright
-cq 927 2 0x27 0,39 # quoteright
-( 1110 2 0x28 0,40 # parenleft
-) 1110 2 0x29 0,41 # parenright
-* 1667 2 0x2a 0,42 # asterisk
-+ 1900 0 0x2b 0,43 # plus
-, 833 0 0x2c 0,44 # comma
-- 2020 0 0x2d 0,45 # hyphen
-\- 2020 0 0x2d 0,45 # hyphen
-hy 2020 0 0x2d 0,45 # "
-char173 2020 0 0x2d 0,45 # "
-. 833 0 0x2e 0,46 # period
-/ 927 2 0x2f 0,47 # slash
-sl 927 2 0x2f 0,47 # "
-0 1667 2 0x30 0,48 # zero
-1 1667 2 0x31 0,49 # one
-2 1667 2 0x32 0,50 # two
-3 1667 2 0x33 0,51 # three
-4 1667 2 0x34 0,52 # four
-5 1667 2 0x35 0,53 # five
-6 1667 2 0x36 0,54 # six
-7 1667 2 0x37 0,55 # seven
-8 1667 2 0x38 0,56 # eight
-9 1667 2 0x39 0,57 # nine
-: 1110 0 0x3a 0,58 # colon
-; 1110 0 0x3b 0,59 # semicolon
-< 1900 0 0x3c 0,60 # less
-= 1900 0 0x3d 0,61 # equal
-> 1900 0 0x3e 0,62 # greater
-? 1667 2 0x3f 0,63 # question
-@ 2773 2 0x40 0,64 # at
-at 2773 2 0x40 0,64 # "
-A 2223 2 0x41 0,65 # A
-B 2223 2 0x42 0,66 # B
-C 2223 2 0x43 0,67 # C
-D 2407 2 0x44 0,68 # D
-E 2223 2 0x45 0,69 # E
-F 2223 2 0x46 0,70 # F
-G 2407 2 0x47 0,71 # G
-H 2593 2 0x48 0,72 # H
-I 1297 2 0x49 0,73 # I
-J 1667 2 0x4a 0,74 # J
-K 2223 2 0x4b 0,75 # K
-L 2037 2 0x4c 0,76 # L
-M 2963 2 0x4d 0,77 # M
-N 2407 2 0x4e 0,78 # N
-O 2407 2 0x4f 0,79 # O
-P 2037 2 0x50 0,80 # P
-Q 2407 2 0x51 0,81 # Q
-R 2223 2 0x52 0,82 # R
-S 1853 2 0x53 0,83 # S
-T 2037 2 0x54 0,84 # T
-U 2407 2 0x55 0,85 # U
-V 2223 2 0x56 0,86 # V
-W 2963 2 0x57 0,87 # W
-X 2223 2 0x58 0,88 # X
-Y 2037 2 0x59 0,89 # Y
-Z 2037 2 0x5a 0,90 # Z
-[ 1110 2 0x5b 0,91 # bracketleft
-lB 1110 2 0x5b 0,91 # "
-\ 927 2 0x5c 0,92 # backslash
-rs 927 2 0x5c 0,92 # "
-] 1110 2 0x5d 0,93 # bracketright
-rB 1110 2 0x5d 0,93 # "
-a^ 1110 2 0x5e 0,94 # circumflex
-^ 1110 2 0x5e 0,94 # "
-_ 1667 0 0x5f 0,95 # underscore
-` 1110 2 0x60 0,96 # quoteleft
-oq 1110 2 0x60 0,96 # "
-a 1667 0 0x61 0,97 # a
-b 1667 2 0x62 0,98 # b
-c 1480 0 0x63 0,99 # c
-d 1667 2 0x64 0,100 # d
-e 1480 0 0x65 0,101 # e
-f 1110 2 0x66 0,102 # f
-g 1667 1 0x67 0,103 # g
-h 1853 2 0x68 0,104 # h
-i 927 2 0x69 0,105 # i
-j 927 2 0x6a 0,106 # j
-k 1667 2 0x6b 0,107 # k
-l 927 2 0x6c 0,108 # l
-m 2593 0 0x6d 0,109 # m
-n 1853 0 0x6e 0,110 # n
-o 1667 0 0x6f 0,111 # o
-p 1667 1 0x70 0,112 # p
-q 1667 1 0x71 0,113 # q
-r 1297 0 0x72 0,114 # r
-s 1297 0 0x73 0,115 # s
-t 927 2 0x74 0,116 # t
-u 1853 0 0x75 0,117 # u
-v 1480 0 0x76 0,118 # v
-w 2223 0 0x77 0,119 # w
-x 1667 0 0x78 0,120 # x
-y 1480 1 0x79 0,121 # y
-z 1297 0 0x7a 0,122 # z
-lC 1160 2 0x7b 0,123 # braceleft
-{ 1160 2 0x7b 0,123 # "
-ba 733 2 0x7c 0,124 # bar
-| 733 2 0x7c 0,124 # "
-rC 1160 2 0x7d 0,125 # braceright
-} 1160 2 0x7d 0,125 # "
-a~ 1110 2 0x7e 0,126 # tilde
-~ 1110 2 0x7e 0,126 # "
-char161 1297 1 0xad 4,7 # exclamdown
-char162 1667 2 0x9b 4,19 # cent
-char163 1667 2 0x9c 4,11 # sterling
-char164 1667 2 0x12f 4,24 # currency
-char165 1667 2 0x9d 4,12 # yen
-char166 733 2 0x7c 0,124 # brokenbar
-char167 1667 2 0x15 4,6 # section
-char168 1110 2 0x122 1,7 # dieresis
-char169 2490 2 0x154 4,23 # copyright
-char170 887 2 0xa6 4,15 # ordfeminine
-char171 1667 0 0xae 4,9 # guillemotleft
-char172 2020 0 0xaa 6,20 # logicalnot
-char173 1667 0 0x132 4,33 # hyphen
-char174 2490 2 0x155 4,22 # registered
-char175 2020 2 0x2d 6,0 # macron
-char176 1333 2 0xf8 6,36 # degree
-char177 1900 0 0xf1 6,1 # plusminus
-char178 1000 2 0xfd 4,20 # twosuperior
-char179 1000 2 0x14d 4,26 # threesuperior
-char180 1110 2 0x120 1,6 # acute "acute accent"
-char181 1920 1 0xe6 8,25 # mu
-char182 1667 2 0x14 4,5 # paragraph
-char183 833 0 0xfa 6,32 # periodcentered
-char184 1110 0 0x139 1,17 # cedilla
-char185 1000 2 0x156 4,78 # onesuperior
-char186 1000 2 0xa7 4,16 # ordmasculine
-char187 1667 0 0xaf 4,10 # guillemotright
-char188 2500 2 0xac 4,18 # onequarter
-char189 2500 2 0xab 4,17 # onehalf
-char190 2500 2 0x12e 4,25 # threequarters
-char191 1667 1 0xa8 4,8 # questiondown
-char192 2223 2 0x15c 1,32 # Agrave
-char193 2223 2 0x15a 1,26 # Aacute
-char194 2223 2 0x15b 1,28 # Acircumflex
-char195 2223 2 0x28e 1,76 # Atilde
-char196 2223 2 0x8e 1,30 # Adieresis
-char197 2223 2 0x8f 1,34 # Aring
-char198 3147 2 0x92 1,36 # AE
-char199 2223 2 0x80 1,38 # Ccedilla
-char200 2223 2 0x160 1,46 # Egrave
-char201 2223 2 0x90 1,40 # Eacute
-char202 2223 2 0x15e 1,42 # Ecircumflex
-char203 2223 2 0x15f 1,44 # Edieresis
-char204 1297 2 0x164 1,54 # Igrave
-char205 1297 2 0x161 1,48 # Iacute
-char206 1297 2 0x162 1,50 # Icircumflex
-char207 1297 2 0x163 1,52 # Idieresis
-char208 2407 2 0x13d 1,78 # Eth
-char209 2407 2 0xa5 1,56 # Ntilde
-char210 2407 2 0x167 1,64 # Ograve
-char211 2407 2 0x165 1,58 # Oacute
-char212 2407 2 0x166 1,60 # Ocircumflex
-char213 2407 2 0x168 1,82 # Otilde
-char214 2407 2 0x99 1,62 # Odieresis
-char215 1900 0 0x157 6,39 # multiply
-char216 2407 2 0x140 1,80 # Oslash
-char217 2407 2 0x16c 1,72 # Ugrave
-char218 2407 2 0x16a 1,66 # Uacute
-char219 2407 2 0x16b 1,68 # Ucircumflex
-char220 2407 2 0x9a 1,70 # Udieresis
-char221 2037 2 0x16f 1,84 # Yacute
-char222 2037 2 0x13e 1,88 # Thorn
-char223 1667 2 0x147 1,23 # germandbls
-char224 1667 2 0x85 1,33 # agrave
-char225 1667 2 0xa0 1,27 # aacute
-char226 1667 2 0x83 1,29 # acircumflex
-char227 1667 2 0x284 1,93 # atilde
-char228 1667 2 0x84 1,31 # adieresis
-char229 1667 2 0x86 1,35 # aring
-char230 2407 0 0x91 1,37 # ae
-char231 1480 0 0x87 1,39 # ccedilla
-char232 1480 2 0x8a 1,47 # egrave
-char233 1480 2 0x82 1,41 # eacute
-char234 1480 2 0x88 1,43 # ecircumflex
-char235 1480 2 0x89 1,45 # edieresis
-char236 927 2 0x8d 1,55 # igrave
-char237 927 2 0xa1 1,49 # iacute
-char238 927 2 0x8c 1,51 # icircumflex
-char239 927 2 0x8b 1,53 # idieresis
-char240 1667 2 0x148 1,87 # eth
-char241 1853 2 0xa4 1,57 # ntilde
-char242 1667 2 0x95 1,65 # ograve
-char243 1667 2 0xa2 1,59 # oacute
-char244 1667 2 0x93 1,61 # ocircumflex
-char245 1667 2 0x172 1,83 # otilde
-char246 1667 2 0x94 1,63 # odieresis
-char247 1900 0 0xf6 6,8 # divide
-char248 1667 0 0x145 1,81 # oslash
-char249 1853 2 0x97 1,73 # ugrave
-char250 1853 2 0xa3 1,67 # uacute
-char251 1853 2 0x96 1,69 # ucircumflex
-char252 1853 2 0x81 1,71 # udieresis
-char253 1480 3 0x175 1,85 # yacute
-char254 1667 3 0x143 1,89 # thorn
-char255 1480 3 0x98 1,75 # ydieresis
--D 2407 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 1667 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 2037 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 1667 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 3147 2 0x92 1,36 # AE
-ae 2407 0 0x91 1,37 # ae
-OE 3147 2 0x141 1,166 # OE
-oe 2407 0 0x146 1,167 # oe
-ij 1807 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 1667 2 0x147 1,23 # germandbls
-'A 2223 2 0x15a 1,26 # Aacute
-'E 2223 2 0x90 1,40 # Eacute
-'I 1297 2 0x161 1,48 # Iacute
-'O 2407 2 0x165 1,58 # Oacute
-'U 2407 2 0x16a 1,66 # Uacute
-'a 1667 2 0xa0 1,27 # aacute
-'e 1480 2 0x82 1,41 # eacute
-'i 927 2 0xa1 1,49 # iacute
-'o 1667 2 0xa2 1,59 # oacute
-'u 1667 2 0x95 1,65 # uacute
-:A 2223 2 0x8e 1,30 # Adieresis
-:E 2223 2 0x15f 1,44 # Edieresis
-:I 1297 2 0x163 1,52 # Idieresis
-:O 2407 2 0x99 1,62 # Odieresis
-:U 2407 2 0x9a 1,70 # Udieresis
-:Y 2037 2 0x16d 1,74 # Ydieresis
-:a 1667 2 0x84 1,31 # adieresis
-:e 1480 2 0x89 1,45 # edieresis
-:i 927 2 0x8b 1,53 # idieresis
-:o 1667 2 0x94 1,63 # odieresis
-:u 1853 2 0x81 1,71 # udieresis
-:y 1480 3 0x98 1,75 # ydieresis
-^A 2223 2 0x15b 1,28 # Acircumflex
-^E 2223 2 0x15e 1,42 # Ecircumflex
-^I 1297 2 0x162 1,50 # Icircumflex
-^O 2407 2 0x166 1,60 # Ocircumflex
-^U 2407 2 0x16b 1,68 # Ucircumflex
-^a 1667 2 0x83 1,29 # acircumflex
-^e 1480 2 0x88 1,43 # ecircumflex
-^i 927 2 0x8c 1,51 # icircumflex
-^o 1667 2 0x93 1,61 # ocircumflex
-^u 1853 2 0x96 1,69 # ucircumflex
-`A 2223 2 0x15c 1,32 # Agrave
-`E 2223 2 0x160 1,46 # Egrave
-`I 1297 2 0x164 1,54 # Igrave
-`O 2407 2 0x167 1,64 # Ograve
-`U 2407 2 0x16c 1,72 # Ugrave
-`a 1667 2 0x85 1,33 # agrave
-`e 1480 2 0x8a 1,47 # egrave
-`i 927 2 0x8d 1,55 # igrave
-`o 1667 2 0x95 1,65 # ograve
-`u 1853 2 0x97 1,73 # ugrave
-~A 2223 2 0x28e 1,26 # Atilde
-~N 2407 2 0xa5 1,56 # Ntilde
-~O 2407 2 0x168 1,82 # Otilde
-~a 1667 2 0x284 --- # atilde
-~n 1853 2 0xa4 1,57 # ntilde
-~o 1667 2 0x172 1,83 # otilde
-vS 1853 2 0x169 1,176 # Scaron
-vs 1297 2 0x173 1,177 # scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vz 1297 2 0x174 1,207 # zcaron
-,C 2223 2 0x80 1,38 # Ccedilla
-,c 1480 0 0x87 1,39 # ccedilla
-/L 2037 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 927 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 2407 2 0x140 1,80 # Oslash
-/o 1667 0 0x145 1,81 # oslash
-oA 2223 2 0x8f 1,34 # Aring
-oa 1667 2 0x86 1,35 # aring
-a" 1110 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 1110 2 0x135 1,8 # macron "macron or bar accent"
-a. 1110 2 0x137 1,15 # dotaccent "dot accent"
-a^ 1110 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 1110 2 0x120 1,6 # acute "acute accent"
-ga 1110 2 0x121 1,0 # grave "grave accent"
-ab 1110 2 0x136 1,22 # breve "breve accent"
-ac 1110 0 0x139 1,17 # cedilla "cedilla accent"
-ad 1110 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 1110 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 1110 2 0x138 1,14 # ring "ring or circle accent"
-a~ 1110 2 0x7e 1,2 # tilde "tilde accent"
-ho 1110 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 927 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 1667 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 1667 2 0x24 0,36 # dollar
-Po 1667 2 0x9c 4,11 # sterling
-Ye 1667 2 0x9d 4,12 # yen
-Fn 1667 2 0x9f 4,14 # florin
-ct 1667 2 0x9b 4,19 # cent
-Fo 1667 0 0xae 4,9 # guillemotleft
-Fc 1000 0 0x4bb 4,20 # guillemotright
-fo 1110 0 0x127 4,35 # guilsinglleft
-fc 1110 0 0x128 4,36 # guilsinglright
-r! 1297 1 0xad 4,7 # exclamdown
-r? 1667 1 0xa8 4,8 # questiondown
-fi 1853 2 0x130 4,54 # fi "fi ligature"
-fl 1853 2 0x131 4,55 # fl "fl ligature"
-OK 1853 0 0x3d6 --- # \& "check mark, tick"
-Of 887 2 0xa6 4,15 # ordfeminine
-Om 1000 2 0xa7 4,16 # ordmasculine
-S1 1000 2 0x156 4,78 # onesuperior
-S2 1000 2 0xfd 4,20 # twosuperior
-S3 1000 2 0x14d 4,26 # threesuperior
-<- 3290 0 0x1b 6,22 # arrowleft
--> 3290 0 0x1a 6,21 # arrowright
-<> 3473 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 2010 0 0x19 6,24 # arrowdown
-ua 2010 0 0x18 6,23 # arrowup
-va 2010 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 2010 0 0x3dc 6,57 # arrowdblleft
-rA 2010 0 0x3de 6,56 # arrowdblright
-hA 2010 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 2010 0 0x3df 6,59 # arrowdbldown
-uA 2010 0 0x3dd 6,58 # arrowdblup
-ba 3333 2 0xb3 3,9 # bar
-bb 733 2 0x7c 0,124 # brokenbar
-br 3333 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 3333 0 0x123 4,34 # ru "baseline rule"
-ul 1667 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 3333 0 0xb3 3,9 # bv "bold vertical"
-ci 2843 0 0x9 4,1 # circle
-bu 2120 0 0x7 4,0 # bullet
-co 2490 2 0x154 4,23 # copyright
-rg 2490 2 0x155 4,22 # registered
-tm 3333 2 0x170 4,41 # trademark
-dd 1667 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 1667 2 0x12a 4,39 # dagger
-ps 1667 2 0x14 4,5 # paragraph
-sc 1667 2 0x15 4,6 # section
-de 1333 2 0xf8 6,36 # degree
-em 3333 0 0x123 4,34 # emdash "em dash"
-en 1667 0 0x132 4,33 # endash "en dash"
-%0 3333 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 2500 2 0xab 4,17 # onehalf
-14 2500 2 0xac 4,18 # onequarter
-34 2500 2 0x12e 4,25 # threequarters
-f/ 927 2 0x158 6,6 # fraction "bar for fractions"
-fm 927 0 0x3a2 6,45 # minute "footmark, prime"
-sd 927 0 0x3b2 6,46 # second
-ha 927 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 927 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 2020 0 0x2d 6,0 # hyphen
-lB 1110 2 0x5b 0,91 # bracketleft
-rB 1110 2 0x5d 0,93 # bracketright
-lC 1160 2 0x7b 0,123 # braceleft
-rC 1160 2 0x7d 0,125 # braceright
-la 1160 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 1160 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 1667 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 1667 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 1667 2 0x125 4,32 # quotedblleft
-rq 1667 2 0x4ba 6,31 # quotedblright
-oq 1110 2 0x176 4,29 # quoteleft "single open quote"
-aq 927 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 733 0 0x3f4 0,124 # bar
-at 2773 2 0x40 0,64 # at
-.C1 2020 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 1667 2 0x23 0,35 # numbersign
-sl 927 2 0x2f 0,47 # slash
-rs 927 2 0x5c 0,92 # backslash
-3d 927 0 0x35c 6,102 # therefore
-tf 927 0 0x35c 6,102 # therefore
-*A 927 0 0x341 8,0 # Alpha
-*B 927 0 0x342 8,2 # Beta
-*C 927 0 0x358 8,28 # Xi
-*D 927 0 0x344 8,8 # Delta
-*E 927 0 0x345 8,10 # Epsilon
-*F 2560 0 0x346 8,44 # Phi
-*G 2003 0 0x347 8,6 # Gamma
-*H 2003 0 0x351 8,16 # Theta
-*I 2003 0 0x349 8,18 # Iota
-*K 2003 0 0x34b 8,20 # Kappa
-*L 2003 0 0x34c 8,22 # Lambda
-*M 2003 0 0x34d 8,24 # Mu
-*N 2003 0 0x34e 8,26 # Nu
-*O 2003 0 0x34f 8,30 # Omicron
-*P 2003 0 0x350 8,32 # Pi
-*Q 2003 0 0x359 8,48 # Psi
-*R 2003 0 0x352 8,34 # Rho
-*S 2203 0 0x353 8,36 # Sigma
-*T 2203 0 0x354 8,40 # Tau
-*U 2203 0 0x3a1 8,76 # Upsilon
-*W 2510 0 0x357 8,50 # Omega
-*X 2203 0 0x343 8,36 # Chi
-*Y 2203 0 0x348 8,14 # Eta
-*Z 2203 0 0x35a 8,12 # Zeta
-*a 1787 0 0xe0 8,1 # alpha
-*b 1633 0 0xe1 8,3 # beta
-*c 1633 0 0x378 8,29 # xi
-*d 1610 0 0xeb 8,9 # delta
-*e 1610 0 0x36e 8,70 # epsilon
-*f 1610 0 0x366 8,45 # phi
-+f 1610 0 0x36a 8,77 # phi1 "variant phi"
-*g 1610 0 0x367 8,7 # gamma
-*h 1587 0 0xe9 8,17 # theta
-+h 1587 0 0x375 8,71 # theta1 "variant theta"
-*i 1587 0 0x369 8,19 # iota
-*k 1587 0 0x36b 8,21 # kappa
-*l 1587 0 0x36c 8,23 # lambda
-*m 1920 0 0xe6 8,25 # mu
-*n 1920 0 0x36e 8,27 # nu
-*o 1920 0 0x36f 8,31 # omicron
-*p 1920 0 0xe3 8,33 # pi
-+p 1920 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 1920 0 0x379 8,49 # psi
-*r 1920 0 0x372 8,35 # rho
-*s 1747 0 0xe5 8,37 # sigma
-*t 1473 0 0xe7 8,41 # tau
-*u 1473 0 0x375 8,27 # upsilon
-*w 1473 0 0x377 8,51 # omega
-*x 1473 0 0x363 8,47 # chi
-*y 1473 0 0x368 8,15 # eta
-*z 1473 0 0x37a 8,13 # zeta
-ts 1473 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 2663 0 0xf7 6,13 # approxequal
-~= 2663 0 0xf7 6,13 # approxequal
-!= 2663 0 0x3b9 6,99 # notequal
-** 833 0 0x32a 0,32 # asteriskmath
-+- 1900 0 0xf1 6,1 # plusminus
-<= 2407 0 0xf3 6,2 # lessequal
-== 2407 0 0x3ba 8,14 # equivalence
-=~ 2407 0 0x340 8,116 # congruent
->= 1633 0 0x3b3 8,3 # greaterequal
-AN 1633 0 0x3d9 8,85 # logicaland
-OR 1633 0 0x3da 8,86 # logicalor
-no 1633 0 0x3d8 8,20 # logicalnot
-te 1633 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 1633 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 1633 0 0x3c0 9,0 # aleph
-Im 1633 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 1633 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 1633 0 0x3a5 8,19 # infinity
-md 1633 0 0x3b7 8,32 # dotmath
-mo 1633 0 0x3ce 8,15 # element
-mu 1633 0 0x3b4 8,39 # multiply
-nc 1633 0 0x3cb 8,197 # notpropersuperset
-nm 1633 0 0x3cf 8,209 # notelement
-pl 1110 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 1900 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 1900 0 0x3b5 6,4 # proportional
-pp 1900 0 0x35e 8,89 # perpendicular
-sb 1900 0 0x3cc 6,67 # propersubset
-sp 1900 0 0x3c9 6,68 # propersuperset
-ib 1900 0 0x3cd 6,69 # reflexsubset
-ip 1900 0 0x3ca 6,70 # reflexsuperset
-ap 1900 0 0x37e 6,12 # similar
-pd 1900 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 1900 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 1900 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 2620 0 0xef 6,16 # intersection "intersection, cap"
-cu 2620 0 0x3c8 6,66 # union "union, cup"
-di 1900 0 0x3b8 6,8 # divide "division sign"
--h 3333 0 0xc4 3,8 # hbar
-gr 3333 0 0x3d1 6,33 # gradient
-es 2407 0 0x3c6 0,79 # emptyset
-CL 2510 0 0x5 5,168 # club "club suit"
-SP 2510 0 0x6 5,171 # spade "spade suit"
-HE 2510 0 0x3 5,170 # heart "heart suit"
-DI 2510 0 0x4 5,169 # diamond "diamond suit"
-CR 2510 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 2510 0 0x327 6,71 # suchthat
-/_ 2510 0 0x3d0 6,79 # angle
-<< 1667 0 0xae 6,77 # "" "much less"
->> 1667 0 0xaf 6,78 # "" "much greater"
-wp 1667 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 1667 0 0x3e0 6,95 # lozenge
-an 3333 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 833 0 0xfa 6,32 # periodcentered
diff --git a/contrib/groff/font/devlbp/TI b/contrib/groff/font/devlbp/TI
deleted file mode 100644
index 7de08bc8cd62..000000000000
--- a/contrib/groff/font/devlbp/TI
+++ /dev/null
@@ -1,521 +0,0 @@
-name TI
-lbpname Dutch-Italic
-special
-spacewidth 833
-slant 18.49
-ligatures fi fl 0
-charset
-ha 1110 2 0x4c3 0,94 # asciicircum
-ti 1110 0 0x4c4 0,126 # asciitilde
-vS 1667 2 0x169 1,176 # Scaron
-vZ 1853 2 0x16e 1,206 # Zcaron
-vs 1297 2 0x173 1,177 # scaron
-vz 1297 2 0x174 1,207 # zcaron
-:Y 1853 2 0x16d 1,74 # Ydieresis
-tm 3266 2 0x170 4,41 # trademark
-aq 713 2 0x27 0,39 # quotesingle
-space 833 0 0x20 0,32
-! 1110 2 0x21 0,33 # exclam
-" 1400 2 0x22 0,34 # quotedbl
-dq 1400 2 0x22 0,34 # quotedbl
-# 1667 2 0x23 0,35 # numbersign
-sh 1667 2 0x23 0,35 # "
-$ 1667 2 0x24 0,36 # dollar
-Do 1667 2 0x24 0,36 # "
-% 2777 2 0x25 0,37 # percent
-& 2593 2 0x26 0,38 # ampersand
-' 713 2 0x27 0,39 # quoteright
-cq 713 2 0x27 0,39 # quoteright
-( 1110 2 0x28 0,40 # parenleft
-) 1110 2 0x29 0,41 # parenright
-* 1667 2 0x2a 0,42 # asterisk
-+ 2250 0 0x2b 0,43 # plus
-, 833 0 0x2c 0,44 # comma
-- 2250 0 0x2d 0,45 # hyphen
-\- 2250 0 0x2d 0,45 # hyphen
-hy 2250 0 0x2d 0,45 # "
-char173 2250 0 0x2d 0,45 # "
-. 833 0 0x2e 0,46 # period
-/ 927 2 0x2f 0,47 # slash
-sl 927 2 0x2f 0,47 # "
-0 1667 2 0x30 0,48 # zero
-1 1667 2 0x31 0,49 # one
-2 1667 2 0x32 0,50 # two
-3 1667 2 0x33 0,51 # three
-4 1667 2 0x34 0,52 # four
-5 1667 2 0x35 0,53 # five
-6 1667 2 0x36 0,54 # six
-7 1667 2 0x37 0,55 # seven
-8 1667 2 0x38 0,56 # eight
-9 1667 2 0x39 0,57 # nine
-: 0 0 0x3a 0,58 # colon
-; 1110 0 0x3b 0,59 # semicolon
-< 2250 0 0x3c 0,60 # less
-= 2250 0 0x3d 0,61 # equal
-> 2250 0 0x3e 0,62 # greater
-? 1667 2 0x3f 0,63 # question
-@ 3067 2 0x40 0,64 # at
-at 3067 2 0x40 0,64 # "
-A 2037 2 0x41 0,65 # A
-B 2037 2 0x42 0,66 # B
-C 2223 2 0x43 0,67 # C
-D 2407 2 0x44 0,68 # D
-E 2037 2 0x45 0,69 # E
-F 2037 2 0x46 0,70 # F
-G 2407 2 0x47 0,71 # G
-H 2407 2 0x48 0,72 # H
-I 1110 2 0x49 0,73 # I
-J 1480 2 0x4a 0,74 # J
-K 2223 2 0x4b 0,75 # K
-L 1853 2 0x4c 0,76 # L
-M 2777 2 0x4d 0,77 # M
-N 2223 2 0x4e 0,78 # N
-O 2407 2 0x4f 0,79 # O
-P 2037 2 0x50 0,80 # P
-Q 2407 2 0x51 0,81 # Q
-R 2037 2 0x52 0,82 # R
-S 1667 2 0x53 0,83 # S
-T 1853 2 0x54 0,84 # T
-U 2407 2 0x55 0,85 # U
-V 2037 2 0x56 0,86 # V
-W 2777 2 0x57 0,87 # W
-X 2037 2 0x58 0,88 # X
-Y 1853 2 0x59 0,89 # Y
-Z 1853 2 0x5a 0,90 # Z
-[ 1297 2 0x5b 0,91 # bracketleft
-lB 1297 2 0x5b 0,91 # "
-\ 927 2 0x5c 0,92 # backslash
-rs 927 2 0x5c 0,92 # "
-] 1297 2 0x5d 0,93 # bracketright
-rB 1297 2 0x5d 0,93 # "
-a^ 1110 2 0x5e 0,94 # circumflex
-^ 1110 2 0x5e 0,94 # "
-_ 1667 0 0x5f 0,95 # underscore
-` 1110 2 0x60 0,96 # quoteleft
-oq 1110 2 0x60 0,96 # "
-a 1667 0 0x61 0,97 # a
-b 1667 2 0x62 0,98 # b
-c 1480 0 0x63 0,99 # c
-d 1667 2 0x64 0,100 # d
-e 1480 0 0x65 0,101 # e
-f 927 2 0x66 0,102 # f
-g 1667 1 0x67 0,103 # g
-h 1667 2 0x68 0,104 # h
-i 927 2 0x69 0,105 # i
-j 927 2 0x6a 0,106 # j
-k 1480 2 0x6b 0,107 # k
-l 927 2 0x6c 0,108 # l
-m 2407 0 0x6d 0,109 # m
-n 1667 0 0x6e 0,110 # n
-o 1667 0 0x6f 0,111 # o
-p 1667 1 0x70 0,112 # p
-q 1667 1 0x71 0,113 # q
-r 1297 0 0x72 0,114 # r
-s 1297 0 0x73 0,115 # s
-t 927 2 0x74 0,116 # t
-u 1667 0 0x75 0,117 # u
-v 1480 0 0x76 0,118 # v
-w 2223 0 0x77 0,119 # w
-x 1480 0 0x78 0,120 # x
-y 1480 1 0x79 0,121 # y
-z 1297 0 0x7a 0,122 # z
-lC 1333 2 0x7b 0,123 # braceleft
-{ 1333 2 0x7b 0,123 # "
-ba 917 2 0x7c 0,124 # bar
-| 917 2 0x7c 0,124 # "
-rC 1333 2 0x7d 0,125 # braceright
-} 1333 2 0x7d 0,125 # "
-a~ 1110 2 0x7e 0,126 # tilde
-~ 1110 2 0x7e 0,126 # "
-char161 1297 1 0xad 4,7 # exclamdown
-char162 1667 2 0x9b 4,19 # cent
-char163 1667 2 0x9c 4,11 # sterling
-char164 1667 2 0x12f 4,24 # currency
-char165 1667 2 0x9d 4,12 # yen
-char166 917 2 0x7c 0,124 # brokenbar
-char167 1667 2 0x15 4,6 # section
-char168 1110 2 0x122 1,7 # dieresis
-char169 2533 2 0x154 4,23 # copyright
-char170 920 2 0xa6 4,15 # ordfeminine
-char171 1667 0 0xae 4,9 # guillemotleft
-char172 2250 0 0xaa 6,20 # logicalnot
-char173 1667 0 0x132 4,33 # hyphen
-char174 2533 2 0x155 4,22 # registered
-char175 2250 2 0x2d 6,0 # macron
-char176 1333 2 0xf8 6,36 # degree
-char177 2250 0 0xf1 6,1 # plusminus
-char178 1000 2 0xfd 4,20 # twosuperior
-char179 1000 2 0x14d 4,26 # threesuperior
-char180 1110 2 0x120 1,6 # acute "acute accent"
-char181 1667 1 0xe6 8,25 # mu
-char182 1743 2 0x14 4,5 # paragraph
-char183 833 0 0xfa 6,32 # periodcentered
-char184 1110 0 0x139 1,17 # cedilla
-char185 1000 2 0x156 4,78 # onesuperior
-char186 1033 2 0xa7 4,16 # ordmasculine
-char187 1667 0 0xaf 4,10 # guillemotright
-char188 2500 2 0xac 4,18 # onequarter
-char189 2500 2 0xab 4,17 # onehalf
-char190 2500 2 0x12e 4,25 # threequarters
-char191 1667 1 0xa8 4,8 # questiondown
-char192 2037 2 0x15c 1,32 # Agrave
-char193 2037 2 0x15a 1,26 # Aacute
-char194 2037 2 0x15b 1,28 # Acircumflex
-char195 2037 2 0x28e 1,76 # Atilde
-char196 2037 2 0x8e 1,30 # Adieresis
-char197 2037 2 0x8f 1,34 # Aring
-char198 2963 2 0x92 1,36 # AE
-char199 2223 2 0x80 1,38 # Ccedilla
-char200 2037 2 0x160 1,46 # Egrave
-char201 2037 2 0x90 1,40 # Eacute
-char202 2037 2 0x15e 1,42 # Ecircumflex
-char203 2037 2 0x15f 1,44 # Edieresis
-char204 1110 2 0x164 1,54 # Igrave
-char205 1110 2 0x161 1,48 # Iacute
-char206 1110 2 0x162 1,50 # Icircumflex
-char207 1110 2 0x163 1,52 # Idieresis
-char208 2407 2 0x13d 1,78 # Eth
-char209 2223 2 0xa5 1,56 # Ntilde
-char210 2407 2 0x167 1,64 # Ograve
-char211 2407 2 0x165 1,58 # Oacute
-char212 2407 2 0x166 1,60 # Ocircumflex
-char213 2407 2 0x168 1,82 # Otilde
-char214 2407 2 0x99 1,62 # Odieresis
-char215 2250 0 0x157 6,39 # multiply
-char216 2407 2 0x140 1,80 # Oslash
-char217 2407 2 0x16c 1,72 # Ugrave
-char218 2407 2 0x16a 1,66 # Uacute
-char219 2407 2 0x16b 1,68 # Ucircumflex
-char220 2407 2 0x9a 1,70 # Udieresis
-char221 1853 2 0x16f 1,84 # Yacute
-char222 2037 2 0x13e 1,88 # Thorn
-char223 1667 2 0x147 1,23 # germandbls
-char224 1667 2 0x85 1,33 # agrave
-char225 1667 2 0xa0 1,27 # aacute
-char226 1667 2 0x83 1,29 # acircumflex
-char227 1667 2 0x284 1,93 # atilde
-char228 1667 2 0x84 1,31 # adieresis
-char229 1667 2 0x86 1,35 # aring
-char230 2223 0 0x91 1,37 # ae
-char231 1480 0 0x87 1,39 # ccedilla
-char232 1480 2 0x8a 1,47 # egrave
-char233 1480 2 0x82 1,41 # eacute
-char234 1480 2 0x88 1,43 # ecircumflex
-char235 1480 2 0x89 1,45 # edieresis
-char236 927 2 0x8d 1,55 # igrave
-char237 927 2 0xa1 1,49 # iacute
-char238 927 2 0x8c 1,51 # icircumflex
-char239 927 2 0x8b 1,53 # idieresis
-char240 1667 2 0x148 1,87 # eth
-char241 1667 2 0xa4 1,57 # ntilde
-char242 1667 2 0x95 1,65 # ograve
-char243 1667 2 0xa2 1,59 # oacute
-char244 1667 2 0x93 1,61 # ocircumflex
-char245 1667 2 0x172 1,83 # otilde
-char246 1667 2 0x94 1,63 # odieresis
-char247 2250 0 0xf6 6,8 # divide
-char248 1667 0 0x145 1,81 # oslash
-char249 1667 2 0x97 1,73 # ugrave
-char250 1667 2 0xa3 1,67 # uacute
-char251 1667 2 0x96 1,69 # ucircumflex
-char252 1667 2 0x81 1,71 # udieresis
-char253 1480 3 0x175 1,85 # yacute
-char254 1667 3 0x143 1,89 # thorn
-char255 1480 3 0x98 1,75 # ydieresis
--D 2407 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 1667 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 2037 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 1667 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 2963 2 0x92 1,36 # AE
-ae 2223 0 0x91 1,37 # ae
-OE 3147 2 0x141 1,166 # OE
-oe 2223 0 0x146 1,167 # oe
-ij 1807 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 1667 2 0x147 1,23 # germandbls
-'A 2037 2 0x15a 1,26 # Aacute
-'E 2037 2 0x90 1,40 # Eacute
-'I 1110 2 0x161 1,48 # Iacute
-'O 2407 2 0x165 1,58 # Oacute
-'U 2407 2 0x16a 1,66 # Uacute
-'a 1667 2 0xa0 1,27 # aacute
-'e 1480 2 0x82 1,41 # eacute
-'i 927 2 0xa1 1,49 # iacute
-'o 1667 2 0xa2 1,59 # oacute
-'u 1667 2 0x95 1,65 # uacute
-:A 2037 2 0x8e 1,30 # Adieresis
-:E 2037 2 0x15f 1,44 # Edieresis
-:I 1110 2 0x163 1,52 # Idieresis
-:O 2407 2 0x99 1,62 # Odieresis
-:U 2407 2 0x9a 1,70 # Udieresis
-:Y 1853 2 0x16d 1,74 # Ydieresis
-:a 1667 2 0x84 1,31 # adieresis
-:e 1480 2 0x89 1,45 # edieresis
-:i 927 2 0x8b 1,53 # idieresis
-:o 1667 2 0x94 1,63 # odieresis
-:u 1667 2 0x81 1,71 # udieresis
-:y 1480 3 0x98 1,75 # ydieresis
-^A 2037 2 0x15b 1,28 # Acircumflex
-^E 2037 2 0x15e 1,42 # Ecircumflex
-^I 1110 2 0x162 1,50 # Icircumflex
-^O 2407 2 0x166 1,60 # Ocircumflex
-^U 2407 2 0x16b 1,68 # Ucircumflex
-^a 1667 2 0x83 1,29 # acircumflex
-^e 1480 2 0x88 1,43 # ecircumflex
-^i 927 2 0x8c 1,51 # icircumflex
-^o 1667 2 0x93 1,61 # ocircumflex
-^u 1667 2 0x96 1,69 # ucircumflex
-`A 2037 2 0x15c 1,32 # Agrave
-`E 2037 2 0x160 1,46 # Egrave
-`I 1110 2 0x164 1,54 # Igrave
-`O 2407 2 0x167 1,64 # Ograve
-`U 2407 2 0x16c 1,72 # Ugrave
-`a 1667 2 0x85 1,33 # agrave
-`e 1480 2 0x8a 1,47 # egrave
-`i 927 2 0x8d 1,55 # igrave
-`o 1667 2 0x95 1,65 # ograve
-`u 1667 2 0x97 1,73 # ugrave
-~A 2037 2 0x28e 1,26 # Atilde
-~N 2223 2 0xa5 1,56 # Ntilde
-~O 2407 2 0x168 1,82 # Otilde
-~a 1667 2 0x284 --- # atilde
-~n 1667 2 0xa4 1,57 # ntilde
-~o 1667 2 0x172 1,83 # otilde
-vS 1667 2 0x169 1,176 # Scaron
-vs 1297 2 0x173 1,177 # scaron
-vZ 1853 2 0x16e 1,206 # Zcaron
-vz 1297 2 0x174 1,207 # zcaron
-,C 2223 2 0x80 1,38 # Ccedilla
-,c 1480 0 0x87 1,39 # ccedilla
-/L 1853 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 927 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 2407 2 0x140 1,80 # Oslash
-/o 1667 0 0x145 1,81 # oslash
-oA 2037 2 0x8f 1,34 # Aring
-oa 1667 2 0x86 1,35 # aring
-a" 1110 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 1110 2 0x135 1,8 # macron "macron or bar accent"
-a. 1110 2 0x137 1,15 # dotaccent "dot accent"
-a^ 1110 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 1110 2 0x120 1,6 # acute "acute accent"
-ga 1110 2 0x121 1,0 # grave "grave accent"
-ab 1110 2 0x136 1,22 # breve "breve accent"
-ac 1110 0 0x139 1,17 # cedilla "cedilla accent"
-ad 1110 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 1110 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 1110 2 0x138 1,14 # ring "ring or circle accent"
-a~ 1110 2 0x7e 1,2 # tilde "tilde accent"
-ho 1110 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 927 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 1667 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 1667 2 0x24 0,36 # dollar
-Po 1667 2 0x9c 4,11 # sterling
-Ye 1667 2 0x9d 4,12 # yen
-Fn 1667 2 0x9f 4,14 # florin
-ct 1667 2 0x9b 4,19 # cent
-Fo 1667 0 0xae 4,9 # guillemotleft
-Fc 1000 0 0x4bb 4,20 # guillemotright
-fo 1110 0 0x127 4,35 # guilsinglleft
-fc 1110 0 0x128 4,36 # guilsinglright
-r! 1297 1 0xad 4,7 # exclamdown
-r? 1667 1 0xa8 4,8 # questiondown
-fi 1667 2 0x130 4,54 # fi "fi ligature"
-fl 1667 2 0x131 4,55 # fl "fl ligature"
-OK 1667 0 0x3d6 --- # \& "check mark, tick"
-Of 920 2 0xa6 4,15 # ordfeminine
-Om 1033 2 0xa7 4,16 # ordmasculine
-S1 1000 2 0x156 4,78 # onesuperior
-S2 1000 2 0xfd 4,20 # twosuperior
-S3 1000 2 0x14d 4,26 # threesuperior
-<- 3290 0 0x1b 6,22 # arrowleft
--> 3290 0 0x1a 6,21 # arrowright
-<> 3473 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 2010 0 0x19 6,24 # arrowdown
-ua 2010 0 0x18 6,23 # arrowup
-va 2010 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 2010 0 0x3dc 6,57 # arrowdblleft
-rA 2010 0 0x3de 6,56 # arrowdblright
-hA 2010 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 2010 0 0x3df 6,59 # arrowdbldown
-uA 2010 0 0x3dd 6,58 # arrowdblup
-ba 3333 2 0xb3 3,9 # bar
-bb 917 2 0x7c 0,124 # brokenbar
-br 3333 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 2963 0 0x123 4,34 # ru "baseline rule"
-ul 1667 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 3333 0 0xb3 3,9 # bv "bold vertical"
-ci 2843 0 0x9 4,1 # circle
-bu 2120 0 0x7 4,0 # bullet
-co 2533 2 0x154 4,23 # copyright
-rg 2533 2 0x155 4,22 # registered
-tm 3266 2 0x170 4,41 # trademark
-dd 1667 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 1667 2 0x12a 4,39 # dagger
-ps 1743 2 0x14 4,5 # paragraph
-sc 1667 2 0x15 4,6 # section
-de 1333 2 0xf8 6,36 # degree
-em 2963 0 0x123 4,34 # emdash "em dash"
-en 1667 0 0x132 4,33 # endash "en dash"
-%0 3333 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 2500 2 0xab 4,17 # onehalf
-14 2500 2 0xac 4,18 # onequarter
-34 2500 2 0x12e 4,25 # threequarters
-f/ 927 2 0x158 6,6 # fraction "bar for fractions"
-fm 927 0 0x3a2 6,45 # minute "footmark, prime"
-sd 927 0 0x3b2 6,46 # second
-ha 927 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 927 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 2250 0 0x2d 6,0 # hyphen
-lB 1297 2 0x5b 0,91 # bracketleft
-rB 1297 2 0x5d 0,93 # bracketright
-lC 1333 2 0x7b 0,123 # braceleft
-rC 1333 2 0x7d 0,125 # braceright
-la 1333 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 1333 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 1853 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 1853 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 1853 2 0x125 4,32 # quotedblleft
-rq 1853 2 0x4ba 6,31 # quotedblright
-oq 1110 2 0x176 4,29 # quoteleft "single open quote"
-aq 713 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 917 0 0x3f4 0,124 # bar
-at 3067 2 0x40 0,64 # at
-.C1 2250 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 1667 2 0x23 0,35 # numbersign
-sl 927 2 0x2f 0,47 # slash
-rs 927 2 0x5c 0,92 # backslash
-3d 927 0 0x35c 6,102 # therefore
-tf 927 0 0x35c 6,102 # therefore
-*A 927 0 0x341 8,0 # Alpha
-*B 927 0 0x342 8,2 # Beta
-*C 927 0 0x358 8,28 # Xi
-*D 927 0 0x344 8,8 # Delta
-*E 927 0 0x345 8,10 # Epsilon
-*F 2627 0 0x346 8,44 # Phi
-*G 1977 0 0x347 8,6 # Gamma
-*H 1977 0 0x351 8,16 # Theta
-*I 1977 0 0x349 8,18 # Iota
-*K 1977 0 0x34b 8,20 # Kappa
-*L 1977 0 0x34c 8,22 # Lambda
-*M 1977 0 0x34d 8,24 # Mu
-*N 1977 0 0x34e 8,26 # Nu
-*O 1977 0 0x34f 8,30 # Omicron
-*P 1977 0 0x350 8,32 # Pi
-*Q 1977 0 0x359 8,48 # Psi
-*R 1977 0 0x352 8,34 # Rho
-*S 2140 0 0x353 8,36 # Sigma
-*T 2140 0 0x354 8,40 # Tau
-*U 2140 0 0x3a1 8,76 # Upsilon
-*W 2653 0 0x357 8,50 # Omega
-*X 2140 0 0x343 8,36 # Chi
-*Y 2140 0 0x348 8,14 # Eta
-*Z 2140 0 0x35a 8,12 # Zeta
-*a 1987 0 0xe0 8,1 # alpha
-*b 1723 0 0xe1 8,3 # beta
-*c 1723 0 0x378 8,29 # xi
-*d 1760 0 0xeb 8,9 # delta
-*e 1760 0 0x36e 8,70 # epsilon
-*f 1760 0 0x366 8,45 # phi
-+f 1760 0 0x36a 8,77 # phi1 "variant phi"
-*g 1760 0 0x367 8,7 # gamma
-*h 1643 0 0xe9 8,17 # theta
-+h 1643 0 0x375 8,71 # theta1 "variant theta"
-*i 1643 0 0x369 8,19 # iota
-*k 1643 0 0x36b 8,21 # kappa
-*l 1643 0 0x36c 8,23 # lambda
-*m 1667 0 0xe6 8,25 # mu
-*n 1667 0 0x36e 8,27 # nu
-*o 1667 0 0x36f 8,31 # omicron
-*p 2037 0 0xe3 8,33 # pi
-+p 2037 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 2037 0 0x379 8,49 # psi
-*r 2037 0 0x372 8,35 # rho
-*s 1753 0 0xe5 8,37 # sigma
-*t 1413 0 0xe7 8,41 # tau
-*u 1413 0 0x375 8,27 # upsilon
-*w 1413 0 0x377 8,51 # omega
-*x 1413 0 0x363 8,47 # chi
-*y 1413 0 0x368 8,15 # eta
-*z 1413 0 0x37a 8,13 # zeta
-ts 1413 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 2663 0 0xf7 6,13 # approxequal
-~= 2663 0 0xf7 6,13 # approxequal
-!= 2663 0 0x3b9 6,99 # notequal
-** 833 0 0x32a 0,32 # asteriskmath
-+- 2250 0 0xf1 6,1 # plusminus
-<= 2413 0 0xf3 6,2 # lessequal
-== 2413 0 0x3ba 8,14 # equivalence
-=~ 2413 0 0x340 8,116 # congruent
->= 1723 0 0x3b3 8,3 # greaterequal
-AN 1723 0 0x3d9 8,85 # logicaland
-OR 1723 0 0x3da 8,86 # logicalor
-no 1723 0 0x3d8 8,20 # logicalnot
-te 1723 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 1723 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 1723 0 0x3c0 9,0 # aleph
-Im 1723 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 1723 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 1723 0 0x3a5 8,19 # infinity
-md 1723 0 0x3b7 8,32 # dotmath
-mo 1723 0 0x3ce 8,15 # element
-mu 1723 0 0x3b4 8,39 # multiply
-nc 1723 0 0x3cb 8,197 # notpropersuperset
-nm 1723 0 0x3cf 8,209 # notelement
-pl 1297 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 2250 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 2250 0 0x3b5 6,4 # proportional
-pp 2250 0 0x35e 8,89 # perpendicular
-sb 2250 0 0x3cc 6,67 # propersubset
-sp 2250 0 0x3c9 6,68 # propersuperset
-ib 2250 0 0x3cd 6,69 # reflexsubset
-ip 2250 0 0x3ca 6,70 # reflexsuperset
-ap 2250 0 0x37e 6,12 # similar
-pd 2250 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 2250 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 2250 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 2620 0 0xef 6,16 # intersection "intersection, cap"
-cu 2620 0 0x3c8 6,66 # union "union, cup"
-di 2250 0 0x3b8 6,8 # divide "division sign"
--h 3333 0 0xc4 3,8 # hbar
-gr 3333 0 0x3d1 6,33 # gradient
-es 2407 0 0x3c6 0,79 # emptyset
-CL 2510 0 0x5 5,168 # club "club suit"
-SP 2510 0 0x6 5,171 # spade "spade suit"
-HE 2510 0 0x3 5,170 # heart "heart suit"
-DI 2510 0 0x4 5,169 # diamond "diamond suit"
-CR 2510 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 2510 0 0x327 6,71 # suchthat
-/_ 2510 0 0x3d0 6,79 # angle
-<< 1667 0 0xae 6,77 # "" "much less"
->> 1667 0 0xaf 6,78 # "" "much greater"
-wp 1667 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 1667 0 0x3e0 6,95 # lozenge
-an 3333 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 833 0 0xfa 6,32 # periodcentered
-kernpairs
-V A -168
-W A -96
-Y A -72
-A V -72
-A W -72
-A Y -48
-T a -48
-V a -48
-W a -48
-Y a -48
-v a -48
-T c -48
-V c -48
-Y c -48
-P e -48
-T e -48
-V e -48
-Y e 48
-f e -24
-F o -48
-P o -48
-T o -48
-V o -72
-W o -48
-Y o -120
-A v -48
-A w -24
diff --git a/contrib/groff/font/devlbp/TR b/contrib/groff/font/devlbp/TR
deleted file mode 100644
index 9a641dfd2bd7..000000000000
--- a/contrib/groff/font/devlbp/TR
+++ /dev/null
@@ -1,517 +0,0 @@
-name TR
-lbpname Dutch-Roman
-special
-spacewidth 833
-slant 0
-ligatures fi fl 0
-charset
-ha 1110 2 0x4c3 0,94 # asciicircum
-ti 1110 0 0x4c4 0,126 # asciitilde
-vS 1853 2 0x169 1,176 # Scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vs 1297 2 0x173 1,177 # scaron
-vz 1480 2 0x174 1,207 # zcaron
-:Y 2407 2 0x16d 1,74 # Ydieresis
-tm 3226 2 0x170 4,41 # trademark
-aq 600 2 0x27 0,39 # quotesingle
-space 833 0 0x20 0,32
-! 1110 2 0x21 0,33 # exclam
-" 1360 2 0x22 0,34 # quotedbl
-dq 1360 2 0x22 0,34 # quotedbl
-# 1667 2 0x23 0,35 # numbersign
-sh 1667 2 0x23 0,35 # "
-$ 1667 2 0x24 0,36 # dollar
-Do 1667 2 0x24 0,36 # "
-% 2777 2 0x25 0,37 # percent
-& 2593 2 0x26 0,38 # ampersand
-' 600 2 0x27 0,39 # quoteright
-cq 600 2 0x27 0,39 # quoteright
-( 1110 2 0x28 0,40 # parenleft
-) 1110 2 0x29 0,41 # parenright
-* 1667 2 0x2a 0,42 # asterisk
-+ 1880 0 0x2b 0,43 # plus
-, 833 0 0x2c 0,44 # comma
-- 1110 0 0x2d 0,45 # hyphen
-\- 1110 0 0x2d 0,45 # hyphen
-hy 1110 0 0x2d 0,45 # "
-char173 1110 0 0x2d 0,45 # "
-. 833 0 0x2e 0,46 # period
-/ 927 2 0x2f 0,47 # slash
-sl 927 2 0x2f 0,47 # "
-0 1667 2 0x30 0,48 # zero
-1 1667 2 0x31 0,49 # one
-2 1667 2 0x32 0,50 # two
-3 1667 2 0x33 0,51 # three
-4 1667 2 0x34 0,52 # four
-5 1667 2 0x35 0,53 # five
-6 1667 2 0x36 0,54 # six
-7 1667 2 0x37 0,55 # seven
-8 1667 2 0x38 0,56 # eight
-9 1667 2 0x39 0,57 # nine
-: 927 0 0x3a 0,58 # colon
-; 927 0 0x3b 0,59 # semicolon
-< 1880 0 0x3c 0,60 # less
-= 1880 0 0x3d 0,61 # equal
-> 1880 0 0x3e 0,62 # greater
-? 1480 2 0x3f 0,63 # question
-@ 3070 2 0x40 0,64 # at
-at 3070 2 0x40 0,64 # "
-A 2407 2 0x41 0,65 # A
-B 2223 2 0x42 0,66 # B
-C 2223 2 0x43 0,67 # C
-D 2407 2 0x44 0,68 # D
-E 2037 2 0x45 0,69 # E
-F 1853 2 0x46 0,70 # F
-G 2407 2 0x47 0,71 # G
-H 2407 2 0x48 0,72 # H
-I 1110 2 0x49 0,73 # I
-J 1297 2 0x4a 0,74 # J
-K 2407 2 0x4b 0,75 # K
-L 2037 2 0x4c 0,76 # L
-M 2963 2 0x4d 0,77 # M
-N 2407 2 0x4e 0,78 # N
-O 2407 2 0x4f 0,79 # O
-P 1853 2 0x50 0,80 # P
-Q 2407 2 0x51 0,81 # Q
-R 2223 2 0x52 0,82 # R
-S 1853 2 0x53 0,83 # S
-T 2037 2 0x54 0,84 # T
-U 2407 2 0x55 0,85 # U
-V 2407 2 0x56 0,86 # V
-W 3147 2 0x57 0,87 # W
-X 2407 2 0x58 0,88 # X
-Y 2407 2 0x59 0,89 # Y
-Z 2037 2 0x5a 0,90 # Z
-[ 1110 2 0x5b 0,91 # bracketleft
-lB 1110 2 0x5b 0,91 # "
-\ 927 2 0x5c 0,92 # backslash
-rs 927 2 0x5c 0,92 # "
-] 1110 2 0x5d 0,93 # bracketright
-rB 1110 2 0x5d 0,93 # "
-a^ 1110 2 0x5e 0,94 # circumflex
-^ 1110 2 0x5e 0,94 # "
-_ 1667 0 0x5f 0,95 # underscore
-` 1110 2 0x60 0,96 # quoteleft
-oq 1110 2 0x60 0,96 # "
-a 1480 0 0x61 0,97 # a
-b 1667 2 0x62 0,98 # b
-c 1480 0 0x63 0,99 # c
-d 1667 2 0x64 0,100 # d
-e 1480 0 0x65 0,101 # e
-f 1110 2 0x66 0,102 # f
-g 1667 1 0x67 0,103 # g
-h 1667 2 0x68 0,104 # h
-i 927 2 0x69 0,105 # i
-j 927 2 0x6a 0,106 # j
-k 1667 2 0x6b 0,107 # k
-l 927 2 0x6c 0,108 # l
-m 2593 0 0x6d 0,109 # m
-n 1667 0 0x6e 0,110 # n
-o 1667 0 0x6f 0,111 # o
-p 1667 1 0x70 0,112 # p
-q 1667 1 0x71 0,113 # q
-r 1110 0 0x72 0,114 # r
-s 1297 0 0x73 0,115 # s
-t 927 2 0x74 0,116 # t
-u 1667 0 0x75 0,117 # u
-v 1667 0 0x76 0,118 # v
-w 2407 0 0x77 0,119 # w
-x 1667 0 0x78 0,120 # x
-y 1667 1 0x79 0,121 # y
-z 1480 0 0x7a 0,122 # z
-lC 1600 2 0x7b 0,123 # braceleft
-{ 1600 2 0x7b 0,123 # "
-| 667 2 0x7c 0,124 # "
-rC 1600 2 0x7d 0,125 # braceright
-} 1600 2 0x7d 0,125 # "
-a~ 1110 2 0x7e 0,126 # tilde
-~ 1110 2 0x7e 0,126 # "
-char161 1110 1 0xad 4,7 # exclamdown
-char162 1667 2 0x9b 4,19 # cent
-char163 1667 2 0x9c 4,11 # sterling
-char164 1667 2 0x12f 4,24 # currency
-char165 1667 2 0x9d 4,12 # yen
-char166 667 2 0x7c 0,124 # brokenbar
-char167 1667 2 0x15 4,6 # section
-char168 1110 2 0x122 1,7 # dieresis
-char169 2533 2 0x154 4,23 # copyright
-char170 920 2 0xa6 4,15 # ordfeminine
-char171 1667 0 0xae 4,9 # guillemotleft
-char172 1880 0 0xaa 6,20 # logicalnot
-char173 1667 0 0x132 4,33 # hyphen
-char174 2533 2 0x155 4,22 # registered
-char175 1880 2 0x2d 6,0 # macron
-char176 1333 2 0xf8 6,36 # degree
-char177 1880 0 0xf1 6,1 # plusminus
-char178 1000 2 0xfd 4,20 # twosuperior
-char179 1000 2 0x14d 4,26 # threesuperior
-char180 1110 2 0x120 1,6 # acute "acute accent"
-char181 1667 1 0xe6 8,25 # mu
-char182 1510 2 0x14 4,5 # paragraph
-char183 833 0 0xfa 6,32 # periodcentered
-char184 1110 0 0x139 1,17 # cedilla
-char185 1000 2 0x156 4,78 # onesuperior
-char186 1033 2 0xa7 4,16 # ordmasculine
-char187 1667 0 0xaf 4,10 # guillemotright
-char188 2500 2 0xac 4,18 # onequarter
-char189 2500 2 0xab 4,17 # onehalf
-char190 2500 2 0x12e 4,25 # threequarters
-char191 1480 1 0xa8 4,8 # questiondown
-char192 2407 2 0x15c 1,32 # Agrave
-char193 2407 2 0x15a 1,26 # Aacute
-char194 2407 2 0x15b 1,28 # Acircumflex
-char195 2407 2 0x28e 1,76 # Atilde
-char196 2407 2 0x8e 1,30 # Adieresis
-char197 2407 2 0x8f 1,34 # Aring
-char198 2963 2 0x92 1,36 # AE
-char199 2223 2 0x80 1,38 # Ccedilla
-char200 2037 2 0x160 1,46 # Egrave
-char201 2037 2 0x90 1,40 # Eacute
-char202 2037 2 0x15e 1,42 # Ecircumflex
-char203 2037 2 0x15f 1,44 # Edieresis
-char204 1110 2 0x164 1,54 # Igrave
-char205 1110 2 0x161 1,48 # Iacute
-char206 1110 2 0x162 1,50 # Icircumflex
-char207 1110 2 0x163 1,52 # Idieresis
-char208 2407 2 0x13d 1,78 # Eth
-char209 2407 2 0xa5 1,56 # Ntilde
-char210 2407 2 0x167 1,64 # Ograve
-char211 2407 2 0x165 1,58 # Oacute
-char212 2407 2 0x166 1,60 # Ocircumflex
-char213 2407 2 0x168 1,82 # Otilde
-char214 2407 2 0x99 1,62 # Odieresis
-char215 1880 0 0x157 6,39 # multiply
-char216 2407 2 0x140 1,80 # Oslash
-char217 2407 2 0x16c 1,72 # Ugrave
-char218 2407 2 0x16a 1,66 # Uacute
-char219 2407 2 0x16b 1,68 # Ucircumflex
-char220 2407 2 0x9a 1,70 # Udieresis
-char221 2407 2 0x16f 1,84 # Yacute
-char222 1853 2 0x13e 1,88 # Thorn
-char223 1667 2 0x147 1,23 # germandbls
-char224 1480 2 0x85 1,33 # agrave
-char225 1480 2 0xa0 1,27 # aacute
-char226 1480 2 0x83 1,29 # acircumflex
-char227 1480 2 0x284 1,93 # atilde
-char228 1480 2 0x84 1,31 # adieresis
-char229 1480 2 0x86 1,35 # aring
-char230 2223 0 0x91 1,37 # ae
-char231 1480 0 0x87 1,39 # ccedilla
-char232 1480 2 0x8a 1,47 # egrave
-char233 1480 2 0x82 1,41 # eacute
-char234 1480 2 0x88 1,43 # ecircumflex
-char235 1480 2 0x89 1,45 # edieresis
-char236 927 2 0x8d 1,55 # igrave
-char237 927 2 0xa1 1,49 # iacute
-char238 927 2 0x8c 1,51 # icircumflex
-char239 927 2 0x8b 1,53 # idieresis
-char240 1667 2 0x148 1,87 # eth
-char241 1667 2 0xa4 1,57 # ntilde
-char242 1667 2 0x95 1,65 # ograve
-char243 1667 2 0xa2 1,59 # oacute
-char244 1667 2 0x93 1,61 # ocircumflex
-char245 1667 2 0x172 1,83 # otilde
-char246 1667 2 0x94 1,63 # odieresis
-char247 1880 0 0xf6 6,8 # divide
-char248 1667 0 0x145 1,81 # oslash
-char249 1667 2 0x97 1,73 # ugrave
-char250 1667 2 0xa3 1,67 # uacute
-char251 1667 2 0x96 1,69 # ucircumflex
-char252 1667 2 0x81 1,71 # udieresis
-char253 1667 3 0x175 1,85 # yacute
-char254 1667 3 0x143 1,89 # thorn
-char255 1667 3 0x98 1,75 # ydieresis
--D 2407 2 0x13d 1,78 # Eth "Icelandic uppercase eth"
-Sd 1667 2 0x148 1,87 # eth "Icelandic lowercase eth"
-TP 1853 2 0x13e 1,88 # Thorn "Icelandic uppercase thorn"
-Tp 1667 3 0x143 1,89 # thorn "Icelandic lowercase thorn"
-AE 2963 2 0x92 1,36 # AE
-ae 2223 0 0x91 1,37 # ae
-OE 2963 2 0x141 1,166 # OE
-oe 2407 0 0x146 1,167 # oe
-ij 1783 0 0x150 1,139 # ij "Dutch ij ligature"
-ss 1667 2 0x147 1,23 # germandbls
-'A 2407 2 0x15a 1,26 # Aacute
-'E 2037 2 0x90 1,40 # Eacute
-'I 1110 2 0x161 1,48 # Iacute
-'O 2407 2 0x165 1,58 # Oacute
-'U 2407 2 0x16a 1,66 # Uacute
-'a 1480 2 0xa0 1,27 # aacute
-'e 1480 2 0x82 1,41 # eacute
-'i 927 2 0xa1 1,49 # iacute
-'o 1667 2 0xa2 1,59 # oacute
-'u 1667 2 0x95 1,65 # uacute
-:A 2407 2 0x8e 1,30 # Adieresis
-:E 2037 2 0x15f 1,44 # Edieresis
-:I 1110 2 0x163 1,52 # Idieresis
-:O 2407 2 0x99 1,62 # Odieresis
-:U 2407 2 0x9a 1,70 # Udieresis
-:Y 2407 2 0x16d 1,74 # Ydieresis
-:a 1480 2 0x84 1,31 # adieresis
-:e 1480 2 0x89 1,45 # edieresis
-:i 927 2 0x8b 1,53 # idieresis
-:o 1667 2 0x94 1,63 # odieresis
-:u 1667 2 0x81 1,71 # udieresis
-:y 1667 3 0x98 1,75 # ydieresis
-^A 2407 2 0x15b 1,28 # Acircumflex
-^E 2037 2 0x15e 1,42 # Ecircumflex
-^I 1110 2 0x162 1,50 # Icircumflex
-^O 2407 2 0x166 1,60 # Ocircumflex
-^U 2407 2 0x16b 1,68 # Ucircumflex
-^a 1480 2 0x83 1,29 # acircumflex
-^e 1480 2 0x88 1,43 # ecircumflex
-^i 927 2 0x8c 1,51 # icircumflex
-^o 1667 2 0x93 1,61 # ocircumflex
-^u 1667 2 0x96 1,69 # ucircumflex
-`A 2407 2 0x15c 1,32 # Agrave
-`E 2037 2 0x160 1,46 # Egrave
-`I 1110 2 0x164 1,54 # Igrave
-`O 2407 2 0x167 1,64 # Ograve
-`U 2407 2 0x16c 1,72 # Ugrave
-`a 1480 2 0x85 1,33 # agrave
-`e 1480 2 0x8a 1,47 # egrave
-`i 927 2 0x8d 1,55 # igrave
-`o 1667 2 0x95 1,65 # ograve
-`u 1667 2 0x97 1,73 # ugrave
-~A 2407 2 0x28e 1,26 # Atilde
-~N 2407 2 0xa5 1,56 # Ntilde
-~O 2407 2 0x168 1,82 # Otilde
-~a 1480 2 0x284 --- # atilde
-~n 1667 2 0xa4 1,57 # ntilde
-~o 1667 2 0x172 1,83 # otilde
-vS 1853 2 0x169 1,176 # Scaron
-vs 1297 2 0x173 1,177 # scaron
-vZ 2037 2 0x16e 1,206 # Zcaron
-vz 1480 2 0x174 1,207 # zcaron
-,C 2223 2 0x80 1,38 # Ccedilla
-,c 1480 0 0x87 1,39 # ccedilla
-/L 2037 2 0x13f 1,152 # Lslash "Polish L with a slash"
-/l 927 2 0x144 1,153 # lslash "Polish l with a slash"
-/O 2407 2 0x140 1,80 # Oslash
-/o 1667 0 0x145 1,81 # oslash
-oA 2407 2 0x8f 1,34 # Aring
-oa 1480 2 0x86 1,35 # aring
-a" 1110 2 0x13a 1,16 # hungarumlaut "Hungarian umlaut"
-a- 1110 2 0x135 1,8 # macron "macron or bar accent"
-a. 1110 2 0x137 1,15 # dotaccent "dot accent"
-a^ 1110 2 0x5e 1,3 # circumflex "circumflex accent"
-aa 1110 2 0x120 1,6 # acute "acute accent"
-ga 1110 2 0x121 1,0 # grave "grave accent"
-ab 1110 2 0x136 1,22 # breve "breve accent"
-ac 1110 0 0x139 1,17 # cedilla "cedilla accent"
-ad 1110 2 0x122 1,7 # dieresis "umlaut or dieresis"
-ah 1110 2 0x13c 1,19 # caron "h\('a\(vcek accent"
-ao 1110 2 0x138 1,14 # ring "ring or circle accent"
-a~ 1110 2 0x7e 1,2 # tilde "tilde accent"
-ho 1110 0 0x13b 1,18 # ogonek "hook or ogonek accent"
-.i 927 0 0x142 1,239 # dotlessi "i without a dot"
-Cs 1667 2 0x12f 4,24 # currency "Scandinavian currency sign"
-Do 1667 2 0x24 0,36 # dollar
-Po 1667 2 0x9c 4,11 # sterling
-Ye 1667 2 0x9d 4,12 # yen
-Fn 1667 2 0x9f 4,14 # florin
-ct 1667 2 0x9b 4,19 # cent
-Fo 1667 0 0xae 4,9 # guillemotleft
-Fc 1000 0 0x4bb 4,20 # guillemotright
-fo 1110 0 0x127 4,35 # guilsinglleft
-fc 1110 0 0x128 4,36 # guilsinglright
-r! 1110 1 0xad 4,7 # exclamdown
-r? 1480 1 0xa8 4,8 # questiondown
-fi 1853 2 0x130 4,54 # fi "fi ligature"
-fl 1853 2 0x131 4,55 # fl "fl ligature"
-OK 1853 0 0x3d6 --- # \& "check mark, tick"
-Of 920 2 0xa6 4,15 # ordfeminine
-Om 1033 2 0xa7 4,16 # ordmasculine
-S1 1000 2 0x156 4,78 # onesuperior
-S2 1000 2 0xfd 4,20 # twosuperior
-S3 1000 2 0x14d 4,26 # threesuperior
-<- 3290 0 0x1b 6,22 # arrowleft
--> 3290 0 0x1a 6,21 # arrowright
-<> 3473 0 0x1d 6,25 # arrowboth "horizontal double-headed arrow"
-da 2010 0 0x19 6,24 # arrowdown
-ua 2010 0 0x18 6,23 # arrowup
-va 2010 0 0x12 6,26 # \& "vertical double-headed arrow"
-lA 2010 0 0x3dc 6,57 # arrowdblleft
-rA 2010 0 0x3de 6,56 # arrowdblright
-hA 2010 0 0x3db 6,60 # arrowdblboth "horizontal double-headed double arrow"
-dA 2010 0 0x3df 6,59 # arrowdbldown
-uA 2010 0 0x3dd 6,58 # arrowdblup
-ba 3333 2 0xb3 3,9 # bar
-bb 667 2 0x7c 0,124 # brokenbar
-br 3333 0 0x1db 3,9 # br "box rule with traditional troff metrics"
-ru 3333 0 0x123 4,34 # ru "baseline rule"
-ul 1667 0 0x5f 0,95 # ul "underline with traditional troff metrics"
-bv 3333 0 0x3f4 3,9 # bv "bold vertical"
-ci 2843 0 0x9 4,1 # circle
-bu 2120 0 0x7 4,0 # bullet
-co 2533 2 0x154 4,23 # copyright
-rg 2533 2 0x155 4,22 # registered
-tm 3226 2 0x170 4,41 # trademark
-dd 1667 2 0x12b 4,40 # daggerdbl "double dagger sign"
-dg 1667 2 0x12a 4,39 # dagger
-ps 1510 2 0x14 4,5 # paragraph
-sc 1667 2 0x15 4,6 # section
-de 1333 2 0xf8 6,36 # degree
-em 3333 0 0x123 4,34 # emdash "em dash"
-en 1667 0 0x132 4,33 # endash "en dash"
-%0 3333 2 0x129 4,75 # perthousand "per thousand, per mille sign"
-12 2500 2 0xab 4,17 # onehalf
-14 2500 2 0xac 4,18 # onequarter
-34 2500 2 0x12e 4,25 # threequarters
-f/ 550 2 0x158 6,6 # fraction "bar for fractions"
-fm 550 0 0x3a2 6,45 # minute "footmark, prime"
-sd 550 0 0x3b2 6,46 # second
-ha 550 2 0x4c3 6,85 # asciicircum "\s-2ASCII\s+2 circumflex, hat, caret"
-ti 550 0 0x4c4 6,12 # asciitilde "\s-2ASCII\s0 tilde, large tilde"
-hy 1880 0 0x2d 6,0 # hyphen
-lB 1110 2 0x5b 0,91 # bracketleft
-rB 1110 2 0x5d 0,93 # bracketright
-lC 1600 2 0x7b 0,123 # braceleft
-rC 1600 2 0x7d 0,125 # braceright
-la 1600 0 0x3e1 6,10 # angleleft "left angle bracket"
-ra 1600 0 0x3f1 6,11 # angleright "right angle bracket"
-Bq 1480 0 0x4b9 4,63 # quotedblbase "low double comma quote"
-bq 1480 0 0x4b8 6,62 # quotesinglbase "low single comma quote"
-lq 1480 2 0x125 4,32 # quotedblleft
-rq 1480 2 0x4ba 6,31 # quotedblright
-oq 1110 2 0x176 4,29 # quoteleft "single open quote"
-aq 600 2 0x27 0,39 # quotesingle "apostrophe quote"
-or 667 0 0x3f4 0,124 # bar
-at 3070 2 0x40 0,64 # at
-.C1 1110 0 0x2d 0,45 # - minus "minus sign from current font"
-sh 1667 2 0x23 0,35 # numbersign
-sl 927 2 0x2f 0,47 # slash
-rs 927 2 0x5c 0,92 # backslash
-3d 927 0 0x35c 6,102 # therefore
-tf 927 0 0x35c 6,102 # therefore
-*A 927 0 0x341 8,0 # Alpha
-*B 927 0 0x342 8,2 # Beta
-*C 927 0 0x358 8,28 # Xi
-*D 927 0 0x344 8,8 # Delta
-*E 927 0 0x345 8,10 # Epsilon
-*F 2627 0 0x346 8,44 # Phi
-*G 1977 0 0x347 8,6 # Gamma
-*H 1977 0 0x351 8,16 # Theta
-*I 1977 0 0x349 8,18 # Iota
-*K 1977 0 0x34b 8,20 # Kappa
-*L 1977 0 0x34c 8,22 # Lambda
-*M 1977 0 0x34d 8,24 # Mu
-*N 1977 0 0x34e 8,26 # Nu
-*O 1977 0 0x34f 8,30 # Omicron
-*P 1977 0 0x350 8,32 # Pi
-*Q 1977 0 0x359 8,48 # Psi
-*R 1977 0 0x352 8,34 # Rho
-*S 2140 0 0x353 8,36 # Sigma
-*T 2140 0 0x354 8,40 # Tau
-*U 2140 0 0x3a1 8,76 # Upsilon
-*W 2653 0 0x357 8,50 # Omega
-*X 2140 0 0x343 8,36 # Chi
-*Y 2140 0 0x348 8,14 # Eta
-*Z 2140 0 0x35a 8,12 # Zeta
-*a 1987 0 0xe0 8,1 # alpha
-*b 1723 0 0xe1 8,3 # beta
-*c 1723 0 0x378 8,29 # xi
-*d 1760 0 0xeb 8,9 # delta
-*e 1760 0 0x36e 8,70 # epsilon
-*f 1760 0 0x366 8,45 # phi
-+f 1760 0 0x36a 8,77 # phi1 "variant phi"
-*g 1760 0 0x367 8,7 # gamma
-*h 1643 0 0xe9 8,17 # theta
-+h 1643 0 0x375 8,71 # theta1 "variant theta"
-*i 1643 0 0x369 8,19 # iota
-*k 1643 0 0x36b 8,21 # kappa
-*l 1643 0 0x36c 8,23 # lambda
-*m 1667 0 0xe6 8,25 # mu
-*n 1667 0 0x36e 8,27 # nu
-*o 1667 0 0x36f 8,31 # omicron
-*p 2037 0 0xe3 8,33 # pi
-+p 2037 0 0x376 8,78 # omega1 "variant pi, looking like omega"
-*q 2037 0 0x379 8,49 # psi
-*r 2037 0 0x372 8,35 # rho
-*s 1753 0 0xe5 8,37 # sigma
-*t 1413 0 0xe7 8,41 # tau
-*u 1413 0 0x375 8,27 # upsilon
-*w 1413 0 0x377 8,51 # omega
-*x 1413 0 0x363 8,47 # chi
-*y 1413 0 0x368 8,15 # eta
-*z 1413 0 0x37a 8,13 # zeta
-ts 1413 0 0x356 8,39 # sigma1 "terminal sigma"
-~~ 2663 0 0xf7 6,13 # approxequal
-~= 2663 0 0xf7 6,13 # approxequal
-!= 2663 0 0x3b9 6,99 # notequal
-** 833 0 0x32a 0,32 # asteriskmath
-+- 1880 0 0xf1 6,1 # plusminus
-<= 2413 0 0xf3 6,2 # lessequal
-== 2413 0 0x3ba 8,14 # equivalence
-=~ 2413 0 0x340 8,116 # congruent
->= 1723 0 0x3b3 8,3 # greaterequal
-AN 1723 0 0x3d9 8,85 # logicaland
-OR 1723 0 0x3da 8,86 # logicalor
-no 1723 0 0x3d8 8,20 # logicalnot
-te 1723 0 0x324 8,121 # existential "there exists, existential quantifier"
-fa 1723 0 0x322 8,122 # universal "for all, universal quantifier"
-Ah 1723 0 0x3c0 9,0 # aleph
-Im 1723 0 0x3c1 8,21 # Ifraktur "Fraktur I, imaginary"
-Re 1723 0 0x3c2 8,22 # Rfraktur "Fraktur R, real"
-if 1723 0 0x3a5 8,19 # infinity
-md 1723 0 0x3b7 8,32 # dotmath
-mo 1723 0 0x3ce 8,15 # element
-mu 1723 0 0x3b4 8,39 # multiply
-nc 1723 0 0x3cb 8,197 # notpropersuperset
-nm 1723 0 0x3cf 8,209 # notelement
-pl 1110 0 0x32b 0,93 # plusmath "plus sign in special font"
-eq 1880 0 0x33d 0,61 # equalmath "equals sign in special font"
-pt 1880 0 0x3b5 6,4 # proportional
-pp 1880 0 0x35e 8,89 # perpendicular
-sb 1880 0 0x3cc 6,67 # propersubset
-sp 1880 0 0x3c9 6,68 # propersuperset
-ib 1880 0 0x3cd 6,69 # reflexsubset
-ip 1880 0 0x3ca 6,70 # reflexsuperset
-ap 1880 0 0x37e 6,12 # similar
-pd 1880 0 0x3b6 6,34 # partialdiff "partial differentiation sign"
-c* 1880 0 0x3c4 6,80 # circlemultiply "multiply sign in a circle"
-c+ 1880 0 0x3c5 6,81 # circleplus "plus sign in a circle"
-ca 2620 0 0xef 6,16 # intersection "intersection, cap"
-cu 2620 0 0x3c8 6,66 # union "union, cup"
-di 1880 0 0x3b8 6,8 # divide "division sign"
--h 3333 0 0xc4 3,8 # hbar
-gr 3333 0 0x3d1 6,33 # gradient
-es 2407 0 0x3c6 0,79 # emptyset
-CL 2510 0 0x5 5,168 # club "club suit"
-SP 2510 0 0x6 5,171 # spade "spade suit"
-HE 2510 0 0x3 5,170 # heart "heart suit"
-DI 2510 0 0x4 5,169 # diamond "diamond suit"
-CR 2510 0 0x3bf 5,20 # carriagereturn "carriage return symbol"
-st 2510 0 0x327 6,71 # suchthat
-/_ 2510 0 0x3d0 6,79 # angle
-<< 1667 0 0xae 6,77 # "" "much less"
->> 1667 0 0xaf 6,78 # "" "much greater"
-wp 1667 0 0x3c3 6,53 # weierstrass "Weierstrass p"
-lz 1667 0 0x3e0 6,95 # lozenge
-an 3333 0 0x3be 3,8 # arrowhorizex "horizontal arrow extension"
-pc 833 0 0xfa 6,32 # periodcentered
-kernpairs
-F A -48
-P A -48
-V A -72
-W A -72
-Y A -72
-A V -96
-A W -72
-A Y -72
-P a -48
-V a -48
-W a -48
-Y a -24
-V c -48
-W c -48
-Y c -24
-P e -48
-V e -48
-W e -48
-Y e -48
-V o -48
-W o -24
-Y o -48
-A v -48
-A w -48
diff --git a/contrib/groff/font/devlj4/ALBB b/contrib/groff/font/devlj4/ALBB
deleted file mode 100644
index 9c0c71f96036..000000000000
--- a/contrib/groff/font/devlj4/ALBB
+++ /dev/null
@@ -1,790 +0,0 @@
-name ALBB
-spacewidth 9759
-pcltypeface 4362
-pclproportional 1
-pclweight 4
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2925
-P . -4389
-P , -4389
-V A -3414
-A V -3414
-T o -3414
-T r -3414
-T c -3414
-T e -3414
-T d -3414
-T s -3414
-T y -3414
-T a -3414
-T w -3414
-T u -3414
-L T -2925
-L Y -2925
-Y o -2925
-Y e -2925
-Y a -2925
-A W -2925
-W A -2925
-T A -3414
-V o -2925
-V e -2925
-V a -2439
-Y A -2925
-F A -1950
-F . -3903
-F , -3903
-A T -3414
-A Y -2925
-v . -2439
-v , -2439
-y . -2439
-y , -2439
-T . -3414
-T , -3414
-L W -2925
-P A -2439
-V . -3903
-V , -3903
-Y . -2925
-Y , -2925
-W o -2439
-W e -2439
-W a -1950
-W . -2925
-W , -2925
-r . -2925
-r , -2925
-w . -2439
-w , -2439
-Y u -1950
-A v -1461
-A y -1461
-A w -1461
-o . -975
-o , -975
-p . -1950
-p , -1950
-e . -975
-e , -975
-b . -1950
-b , -1950
-O T -2439
-O V -1950
-O Y -2439
-O . -2439
-O , -2439
-L y -975
-L O -975
-L G -486
-L C -486
-L Q -486
-P J -486
-V y -1461
-V u -1461
-V O -1950
-V G -1461
-V C -1461
-V Q -1461
-D T -2439
-D V -1461
-D Y -1950
-D . -2439
-D , -2439
-Y O -2439
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -975
-F e -975
-F a -975
-O A -1461
-O W -1461
-L U -486
-R T -1461
-R V -1461
-R Y -1461
-R W -1461
-G T -486
-P o -1461
-P g -975
-P e -1461
-P a -975
-D A -975
-D W -975
-B T -1950
-B Y -1950
-B . -1950
-B , -1950
-A O -1461
-A G -975
-A C -975
-A U -975
-A Q -975
-W r -975
-W y -975
-W u -975
-W O -1461
-W G -975
-W C -975
-W Q -975
-U A -975
-U . -1950
-U , -1950
-Q A -975
-Q W -975
-f . -486
-f , -486
-T O -2439
-T G -2439
-T C -2439
-T Q -2439
-O X -1950
-L o -486
-L e -486
-L q -486
-G V -486
-G Y -486
-G W -486
-G . -486
-G , -486
-P T -486
-P V -486
-P Y -486
-D X -1461
-B V -1461
-B X -1461
-B A -975
-B W -975
-S . -1461
-S , -1461
-F O -486
-X o -1461
-X e -1461
-X y -1461
-X O -1950
-X G -1461
-X C -1461
-X Q -1461
-A o -975
-A e -975
-Q X -1461
-K o -975
-K e -975
-K y -975
-K w -975
-K O -1461
-K G -975
-K C -975
-K Q -975
-o v -486
-o y -486
-o x -486
-o w -486
-h v -486
-h y -486
-m v -486
-m y -486
-r g -975
-g . -975
-g , -975
-p v -486
-p y -486
-p x -486
-v o -486
-v g -486
-v c -486
-v d -486
-v a -486
-v q -486
-e v -486
-e y -486
-b v -486
-b y -486
-b w -486
-s . -975
-s , -975
-y o -486
-y g -486
-y c -486
-y d -486
-y a -486
-y q -486
-f g -486
-x o -486
-x c -486
-x e -486
-x d -486
-x q -486
-a v -486
-a y -486
-a w -486
-w o -486
-w g -486
-w c -486
-w d -486
-w a -486
-w q -486
-T S -1461
-R o -975
-R y -975
-R O -1461
-R G -975
-R C -975
-R U -975
-R Q -975
-G X -486
-G A -486
-P s -975
-P Z -486
-P X -486
-P W -486
-V S -1461
-S A -975
-Y S -1461
-X u -1461
-A t -975
-A c -975
-A d -975
-A u -975
-A q -975
-W S -975
-K c -975
-K u -975
-h w -486
-m w -486
-r o -975
-r c -975
-r e -975
-r d -975
-r a -975
-r q -975
-g g -486
-p w -486
-v e -486
-v s -486
-e x -486
-e w -486
-y e -486
-y s -486
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-w e -486
-w s -486
-k o -486
-k c -486
-k v -486
-k e -486
-k d -486
-k y -486
-k w -486
-k q -486
-O Z -975
-O J -975
-L J -486
-R e -975
-R u -975
-G Z -486
-P O -486
-E O -486
-Z o -486
-Z e -486
-Z d -486
-Z y -486
-Z w -486
-Z u -486
-Z O -975
-Z G -486
-Z C -486
-Z Q -486
-D Z -486
-D J -486
-B Z -486
-B J -486
-A J -486
-J O -486
-K J -486
-t o -486
-t c -486
-t e -486
-t d -486
-t q -486
-o z -486
-r s -975
-g o -486
-g c -486
-g e -486
-g d -486
-g s -486
-g a -486
-g q -486
-p z -486
-e z -486
-z o -486
-z c -486
-z e -486
-z d -486
-z q -486
-b z -486
-k t -486
-k u -486
-O g -486
-O j -486
-R J -486
-G J -486
-C O -486
-B O -486
-U O -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -975
-L ' -975
-T char173 -3414
-T hy -3414
-T - -3414
-T en -3414
-T em -3414
-A cq -1461
-A ' -1461
-char173 T -3414
-hy T -3414
-- T -3414
-en T -3414
-em T -3414
-Y char173 -1950
-Y hy -1950
-Y - -1950
-Y en -1950
-Y em -1950
-p cq -486
-p ' -486
-e cq -486
-e ' -486
-b cq -486
-b ' -486
-a cq -486
-a ' -486
-V char173 -1461
-V hy -1461
-V - -1461
-V en -1461
-V em -1461
-h cq -486
-h ' -486
-m cq -486
-m ' -486
-R cq -975
-R ' -975
-W char173 -975
-W hy -975
-W - -975
-W en -975
-W em -975
-cq d -1950
-' d -1950
-L char173 -486
-L hy -486
-L - -486
-L en -486
-L em -486
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -975
-A hy -975
-A - -975
-A en -975
-A em -975
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-cq s -975
-' s -975
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -975
-hy A -975
-- A -975
-en X -1461
-en A -975
-em X -1461
-R char173 -975
-R hy -975
-R - -975
-R en -975
-R em -975
-K cq -486
-K ' -486
-k cq -486
-k ' -486
-O cq -486
-O ' -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-k char173 -486
-k hy -486
-k - -486
-k en -486
-k em -486
-charset
-! 9759,20130,300 2 3617
-dq 15126,20130 2 3618
-" "
-sh 17565,20430,300 2 3619
-# "
-Do 17565,21630,2370 2 3620
-$ "
-% 25857,20430,300 2 3621
-& 23907,17037,300 0 3622
-cq 9759,20130 2 51751
-' "
-( 13173,20130,4365 3 3624
-) 13173,20130,4365 3 3625
-* 17565,20130 2 3626
-+ 25857,15465 0 3627
-, 9759,5025,3885 0 3628
-char173 9759,10515 0 3629
-hy "
-- "
-. 9759,5430,300 0 3630
-sl 13173,20130 2 3631
-/ "
-0 17565,20430,300 2 3632
-1 17565,20430 2 3633
-2 17565,20430 2 3634
-3 17565,20130,300 2 3635
-4 17565,20130 2 3636
-5 17565,20130,300 2 3637
-6 17565,20130,300 2 3638
-7 17565,20130 2 3639
-8 17565,20430,300 2 3640
-9 17565,20430 2 3641
-: 9759,14376,300 0 3642
-; 9759,14376,3885 0 3643
-< 26346,16068 0 3644
-= 25857,13644 0 3645
-> 26346,16068 0 3646
-? 12684,20430,300 2 3647
-at 25857,21057,2679 2 3648
-@ "
-A 20490,20130 2 3649
-B 18540,20130 2 3650
-C 19029,20430,300 2 3651
-D 20490,20130 2 3652
-E 16101,20130 2 3653
-F 15126,20130 2 3654
-G 20490,20430,300 2 3655
-H 21468,20130 2 3656
-I 10245,20130 2 3657
-J 11709,20130,4380 3 3658
-K 19515,20130 2 3659
-L 15126,20130 2 3660
-M 25857,20130 2 3661
-N 22443,20130 2 3662
-O 23907,20430,300 2 3663
-P 17076,20130 2 3664
-Q 23907,20430,4095 2 3665
-R 18540,20130 2 3666
-S 14148,20430,300 2 3667
-T 16587,20130 2 3668
-U 21468,20130,300 2 3669
-V 20004,20130 2 3670
-W 25857,20130 2 3671
-X 20004,20130 2 3672
-Y 17565,20130 2 3673
-Z 17565,20130 2 3674
-lB 13173,20130,3960 2 3675
-[ "
-rs 13173,20130 2 3676
-\ "
-rB 13173,20130,3960 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 9759,20130 2 51808
-` "
-a 13173,14310,300 0 3681
-b 16101,20025 2 3682
-c 12684,14310,300 0 3683
-d 15612,20025,300 2 3684
-e 13662,14310,300 0 3685
-f 9759,20130 2 3686
-g 14637,14310,4650 1 3687
-h 15612,20025 2 3688
-i 7806,20940 2 3689
-j 7806,20940,4365 3 3690
-k 16587,20025 2 3691
-l 7806,20025 2 3692
-m 23418,14310 0 3693
-n 15612,14310 0 3694
-o 16101,14310,300 0 3695
-p 15612,14310,4365 1 3696
-q 15612,14310,4365 1 3697
-r 11220,14310 0 3698
-s 11220,14310,300 0 3699
-t 10734,17100,300 0 3700
-u 15612,14010,300 0 3701
-v 14637,14010 0 3702
-w 20979,14010 0 3703
-x 16587,14010 0 3704
-y 14637,14010,4365 1 3705
-z 12198,14010 0 3706
-lC 13173,20130,6075 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 13173,20130,6075 3 3709
-} "
-ti 26346,9435 0 51876
-char192 20490,25170 2 3776
-`A "
-char194 20490,25170 2 3778
-^A "
-char200 16101,25170 2 3784
-`E "
-char202 16101,25170 2 3786
-^E "
-char203 16101,26130 2 3787
-:E "
-char206 10245,25170 2 3790
-^I "
-char207 10245,26130 2 3791
-:I "
-char180 17565,20250 2 3764
-aa "
-ga 17565,20250 2 3680
-a^ 17565,20250 2 3678
-^ "
-char168 17565,20190 2 3752
-ad "
-a~ 17565,19035 2 3710
-~ "
-char217 21468,25170,300 2 3801
-`U "
-char219 21468,25170,300 2 3803
-^U "
-char221 17565,25170 2 3805
-'Y "
-char253 14637,20250,4365 3 3837
-'y "
-char176 14637,20430 2 3760
-de "
-char199 19029,20430,6270 3 3783
-,C "
-char231 12684,14310,6000 1 3815
-,c "
-char209 22443,25101 2 3793
-~N "
-char241 15612,19035 2 3825
-~n "
-char161 9759,14376,6054 1 3745
-r! "
-char191 12684,14526,6204 1 3775
-r? "
-char164 17565,15834 0 3748
-Cs "
-char163 17565,20430 2 3747
-Po "
-char165 17565,20130 2 3749
-Ye "
-char167 17565,20430,4365 3 3751
-sc "
-Fn 17565,20130 2 51871
-char162 17565,19911 2 3746
-ct "
-char226 13173,20250,300 2 3810
-^a "
-char234 13662,20250,300 2 3818
-^e "
-char244 16101,20250,300 2 3828
-^o "
-char251 15612,20250,300 2 3835
-^u "
-char225 13173,20250,300 2 3809
-'a "
-char233 13662,20250,300 2 3817
-'e "
-char243 16101,20250,300 2 3827
-'o "
-char250 15612,20250,300 2 3834
-'u "
-char224 13173,20250,300 2 3808
-`a "
-char232 13662,20250,300 2 3816
-`e "
-char242 16101,20250,300 2 3826
-`o "
-char249 15612,20250,300 2 3833
-`u "
-char228 13173,20190,300 2 3812
-:a "
-char235 13662,20190,300 2 3819
-:e "
-char246 16101,20190,300 2 3830
-:o "
-char252 15612,20190,300 2 3836
-:u "
-char197 20490,26508 2 3781
-oA "
-char238 7806,20250 2 3822
-^i "
-char216 23907,20601,366 2 3800
-/O "
-char198 26835,20130 2 3782
-AE "
-char229 13173,20655,300 2 3813
-oa "
-char237 7806,20250 2 3821
-'i "
-char248 16101,14373,330 0 3832
-/o "
-char230 20004,14310,300 0 3814
-ae "
-char196 20490,26130 2 3780
-:A "
-char236 7806,20250 2 3820
-`i "
-char214 23907,26130,300 2 3798
-:O "
-char220 21468,26130,300 2 3804
-:U "
-char201 16101,25170 2 3785
-'E "
-char239 7806,20190 2 3823
-:i "
-char223 17076,20130,300 2 3807
-ss "
-char212 23907,25170,300 2 3796
-^O "
-char193 20490,25170 2 3777
-'A "
-char195 20490,25101 2 3779
-~A "
-char227 13173,19035,300 2 3811
-~a "
-char208 21468,20130 2 3792
--D "
-char240 16101,20025,300 2 3824
-Sd "
-char205 10245,25170 2 3789
-'I "
-char204 10245,25170 2 3788
-`I "
-char211 23907,25170,300 2 3795
-'O "
-char210 23907,25170,300 2 3794
-`O "
-char213 23907,25101,300 2 3797
-~O "
-char245 16101,19035,300 2 3829
-~o "
-vS 14148,25170,300 2 51795
-vs 11220,20250,300 2 51827
-char218 21468,25170,300 2 3802
-'U "
-:Y 17565,26130 2 51801
-char255 14637,20190,4365 3 3839
-:y "
-char222 17076,20130 2 3806
-TP "
-char254 15612,20025,4365 3 3838
-Tp "
-char181 15612,12630,4680 1 3765
-char182 17565,19635,4200 3 3766
-ps "
-char190 25857,20430,300 2 3774
-34 "
-\- 25857,10380 0 51757
-char188 25857,20430,300 2 3772
-14 "
-char189 25857,20430,300 2 3773
-12 "
-char170 12198,20430 2 3754
-Of "
-char186 12198,20430 2 3770
-Om "
-char171 13662,12450 0 3755
-Fo "
-char187 13662,12450 0 3771
-Fc "
-char177 25857,15465,6855 1 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19635 2 3753
-co "
-char172 25857,12210 0 3756
-no "
-char174 13173,19635 2 3758
-rg "
-char178 12198,20340 2 3762
-S2 "
-char179 12198,20130 2 3763
-S3 "
-char184 17565,0,6000 1 3768
-ac "
-char185 12198,20340 2 3769
-S1 "
-char215 25857,15282 0 3799
-char247 25857,16380,885 0 3831
-char183 9759,13080 0 3767
-pc "
-fm 9759,20130 2 51873
-sd 15612,20130 2 51874
-dg 17565,20130,4365 3 51755
-tm 16101,17850 0 51796
-ah 17565,20250 2 51935
-ao 17565,20655 2 51930
-f/ 3903,20430,300 2 51759
-em 25857,10095 0 51789
-en 17565,10095 0 51790
-dd 17565,20130,4365 3 51773
-.i 7806,14010 0 51957
-aq 9759,20130 2 3623
-bu 13173,14226 0 51889
-'C 19029,25170,300 2 20166
-'c 12684,20250,300 2 20198
-lq 17076,20130 2 51838
-rq 17076,20130 2 51746
-Bq 17076,5025,3885 0 51772
-vz 12198,20250 2 51834
-fi 16587,20130 2 51881
-fl 16587,20130 2 51882
-ff 18540,20130 2 51883
-Fi 25371,20130 2 51884
-Fl 25371,20130 2 51885
-ij 15612,20940,4365 3 51958
-bq 9759,5025,3885 0 51756
-%0 33663,20430,300 2 51901
-char175 17565,19020 2 3759
-a- "
-ab 17565,19260 2 51926
-a. 17565,20190 2 51927
-oe 23418,14310,300 0 51823
-OE 31224,20430,300 2 51791
-fo 7806,12450 0 51886
-fc 7806,12450 0 51887
-sq 19029,15624 0 51899
-/L 16587,20130 2 51944
-/l 12684,20025 2 51960
-a" 17565,20250 2 51933
-ho 17565,348,5838 1 51934
-vZ 17565,25170 2 51802
-IJ 21954,20130,4380 3 51942
diff --git a/contrib/groff/font/devlj4/ALBR b/contrib/groff/font/devlj4/ALBR
deleted file mode 100644
index 684f29ff92a8..000000000000
--- a/contrib/groff/font/devlj4/ALBR
+++ /dev/null
@@ -1,805 +0,0 @@
-name ALBR
-spacewidth 8295
-pcltypeface 4362
-pclproportional 1
-pclweight 1
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2925
-P . -4389
-P , -4389
-V A -4389
-A V -4389
-T o -3903
-T r -3903
-T c -3903
-T e -3903
-T d -3903
-T s -3903
-T y -3903
-T a -3903
-T w -3903
-T u -3903
-L T -2925
-L Y -2925
-Y o -3903
-Y e -3903
-Y a -2925
-A W -3414
-W A -3414
-T A -3903
-V o -2925
-V e -2925
-V a -2925
-Y A -3903
-F A -2925
-F . -3903
-F , -3903
-A T -3903
-A Y -3903
-v . -3414
-v , -3414
-y . -3414
-y , -3414
-T . -3903
-T , -3903
-L W -2925
-P A -2925
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -2439
-W e -2439
-W a -2439
-W . -3414
-W , -3414
-r . -2925
-r , -2925
-w . -3414
-w , -3414
-Y u -1950
-A v -2439
-A y -2439
-A w -2439
-o . -1950
-o , -1950
-p . -1950
-p , -1950
-e . -975
-e , -975
-b . -1950
-b , -1950
-O T -2439
-O V -2439
-O Y -2439
-O . -2439
-O , -2439
-L y -1461
-L O -1461
-L G -975
-L C -975
-L Q -975
-P J -486
-V y -1950
-V u -1950
-V O -2439
-V G -1950
-V C -1950
-V Q -1950
-D T -2439
-D V -1950
-D Y -1950
-D . -2439
-D , -2439
-Y O -2439
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -975
-F e -975
-F a -975
-O A -2439
-O W -1950
-L U -975
-R T -1461
-R V -1461
-R Y -1461
-R W -1461
-G T -1461
-P o -1461
-P g -975
-P e -1461
-P a -975
-D A -1950
-D W -1461
-B T -1950
-B Y -1950
-B . -1950
-B , -1950
-A O -2439
-A G -1950
-A C -1950
-A U -1950
-A Q -1950
-W r -1461
-W y -1461
-W u -1461
-W O -1950
-W G -1461
-W C -1461
-W Q -1461
-Q A -1950
-Q W -1461
-f . -486
-f , -486
-T O -2439
-T G -2439
-T C -2439
-T Q -2439
-O X -1461
-L o -975
-L e -975
-L q -975
-G V -1461
-G Y -1461
-G W -1461
-G . -486
-G , -486
-P T -486
-P V -486
-P Y -486
-D X -975
-B V -1950
-B X -975
-B A -1950
-B W -1461
-S . -1461
-S , -1461
-F O -486
-X o -975
-X e -975
-X y -975
-X O -1461
-X G -975
-X C -975
-X Q -975
-A o -1950
-A e -1950
-Q X -975
-K o -975
-K e -975
-K y -975
-K w -975
-K O -1461
-K G -975
-K C -975
-K Q -975
-o v -486
-o y -486
-o x -486
-o w -486
-h v -486
-h y -486
-n v -486
-n y -486
-m v -486
-m y -486
-r g -975
-g . -975
-g , -975
-p v -486
-p y -486
-p x -486
-v o -486
-v g -486
-v c -486
-v d -486
-v a -486
-v q -486
-e v -486
-e y -486
-b v -486
-b y -486
-b w -486
-s . -975
-s , -975
-y o -486
-y g -486
-y c -486
-y d -486
-y a -486
-y q -486
-f g -486
-x o -486
-x c -486
-x e -486
-x d -486
-x a -486
-x q -486
-a v -486
-a y -486
-a w -486
-w o -486
-w g -486
-w c -486
-w d -486
-w a -486
-w q -486
-T S -1461
-L a -975
-R o -975
-R y -975
-R O -1461
-R G -975
-R C -975
-R U -975
-R Q -975
-G X -486
-G A -486
-P Z -486
-P X -486
-P W -486
-V S -1461
-S T -975
-S V -975
-S Y -975
-S X -975
-S A -1461
-S W -975
-Y S -1461
-X a -975
-X u -975
-A t -975
-A c -1950
-A d -1950
-A a -975
-A u -1950
-A q -1950
-W S -1461
-K c -975
-K u -975
-o f -486
-h w -486
-n w -486
-m w -486
-r o -975
-r c -975
-r e -975
-r d -975
-r a -975
-r q -975
-g g -486
-p f -486
-p w -486
-v e -486
-e f -486
-e x -486
-e w -486
-b f -486
-y e -486
-f o -486
-f c -486
-f e -486
-f d -486
-f a -486
-f q -486
-w e -486
-k o -486
-k c -486
-k v -486
-k e -486
-k d -486
-k y -486
-k a -486
-k w -486
-k q -486
-O Z -975
-O J -975
-L J -486
-R e -975
-R a -975
-R u -975
-G Z -486
-P O -486
-E O -486
-Z o -486
-Z e -486
-Z d -486
-Z y -486
-Z a -486
-Z w -486
-Z u -486
-Z O -975
-Z G -486
-Z C -486
-Z Q -486
-D Z -486
-D J -486
-B Z -486
-B J -486
-S Z -486
-S J -486
-A J -486
-J O -486
-K a -975
-K J -486
-o z -486
-h f -486
-n f -486
-m f -486
-g o -486
-g c -486
-g e -486
-g d -486
-g a -486
-g q -486
-p z -486
-e z -486
-z o -486
-z c -486
-z e -486
-z d -486
-z a -486
-z q -486
-b z -486
-a f -486
-k t -486
-k f -486
-k u -486
-O g -486
-O j -486
-R J -486
-G J -486
-C O -486
-B O -486
-A f -486
-U O -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -2925
-L ' -2925
-T char173 -3903
-T hy -3903
-T - -3903
-T en -3903
-T em -3903
-A cq -2925
-A ' -2925
-char173 T -3903
-hy T -3903
-- T -3903
-en T -3903
-em T -3903
-Y char173 -1950
-Y hy -1950
-Y - -1950
-Y en -1950
-Y em -1950
-p cq -1950
-p ' -1950
-e cq -975
-e ' -975
-b cq -1950
-b ' -1950
-a cq -1461
-a ' -1461
-V char173 -1950
-V hy -1950
-V - -1950
-V en -1950
-V em -1950
-h cq -1950
-h ' -1950
-n cq -1950
-n ' -1950
-m cq -1950
-m ' -1950
-R cq -975
-R ' -975
-W char173 -1461
-W hy -1461
-W - -1461
-W en -1461
-W em -1461
-cq d -1950
-' d -1950
-L char173 -975
-L hy -975
-L - -975
-L en -975
-L em -975
-X char173 -975
-X hy -975
-X - -975
-X en -975
-X em -975
-A char173 -1950
-A hy -1950
-A - -1950
-A en -1950
-A em -1950
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-char173 X -975
-hy X -975
-- X -975
-char173 A -1950
-hy A -1950
-- A -1950
-en X -975
-en A -1950
-em X -975
-R char173 -975
-R hy -975
-R - -975
-R en -975
-R em -975
-K cq -486
-K ' -486
-b f -486
-k cq -486
-k ' -486
-O cq -486
-O ' -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-k char173 -486
-k hy -486
-k - -486
-k en -486
-k em -486
-charset
-! 8295,20130,300 2 3617
-dq 13173,20130 2 3618
-" "
-sh 16587,20430,300 2 3619
-# "
-Do 16587,21909,2490 2 3620
-$ "
-% 24882,20430,300 2 3621
-& 22932,16869,300 0 3622
-cq 8295,20130 2 51751
-' "
-( 10734,20130,4365 3 3624
-) 10734,20130,4365 3 3625
-* 16587,20130 2 3626
-+ 24882,15420,60 0 3627
-, 8295,3945,5055 1 3628
-char173 8295,9795 0 3629
-hy "
-- "
-. 8295,4080,300 0 3630
-sl 11709,20130 2 3631
-/ "
-0 16587,20430,300 2 3632
-1 16587,20430 2 3633
-2 16587,20430 2 3634
-3 16587,20130,300 2 3635
-4 16587,20130 2 3636
-5 16587,20130,300 2 3637
-6 16587,20130,300 2 3638
-7 16587,20130 2 3639
-8 16587,20430,300 2 3640
-9 16587,20430 2 3641
-: 8295,12372,300 0 3642
-; 8295,12372,5055 1 3643
-< 26346,16068 0 3644
-= 24882,11880 0 3645
-> 26346,16068 0 3646
-? 12198,20430,300 2 3647
-at 24882,21030,2745 2 3648
-@ "
-A 20979,20430 2 3649
-B 15126,20130 2 3650
-C 18051,20430,300 2 3651
-D 18540,20130 2 3652
-E 14637,20130 2 3653
-F 13662,20130 2 3654
-G 20490,20430,300 2 3655
-H 20004,20130 2 3656
-I 8295,20130 2 3657
-J 10734,20130,4488 3 3658
-K 18051,20130 2 3659
-L 14148,20130 2 3660
-M 24396,20130 2 3661
-N 21468,20130 2 3662
-O 22932,20430,300 2 3663
-P 13662,20130 2 3664
-Q 22932,20430,4152 3 3665
-R 16587,20130 2 3666
-S 13662,20430,300 2 3667
-T 16587,20130 2 3668
-U 20979,20130,300 2 3669
-V 20490,20130 2 3670
-W 24882,20430 2 3671
-X 18051,20130 2 3672
-Y 17076,20130 2 3673
-Z 16101,20130 2 3674
-lB 11220,20130,4365 3 3675
-[ "
-rs 11709,20130 2 3676
-\ "
-rB 11220,20130,4365 3 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 8295,20130 2 51808
-` "
-a 12198,14310,300 0 3681
-b 14148,20025 2 3682
-c 12198,14310,300 0 3683
-d 14637,20025,300 2 3684
-e 12684,14310,300 0 3685
-f 8295,20130 2 3686
-g 12684,14310,4479 1 3687
-h 14148,20025 2 3688
-i 6342,19815 2 3689
-j 6342,19815,4365 3 3690
-k 12684,20025 2 3691
-l 6342,20025 2 3692
-m 21954,14310 0 3693
-n 14148,14310 0 3694
-o 14637,14310,300 0 3695
-p 14637,14310,4365 1 3696
-q 14148,14310,4365 1 3697
-r 9759,14310 0 3698
-s 9270,14310,300 0 3699
-t 8781,16950,300 0 3700
-u 14148,14010,300 0 3701
-v 12684,14010 0 3702
-w 18540,14010 0 3703
-x 12684,14010 0 3704
-y 13173,14010,4365 1 3705
-z 10245,14010 0 3706
-lC 11709,20130,6075 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 11709,20130,6075 3 3709
-} "
-ti 26346,8952 0 51876
-char192 20979,24960 2 3776
-`A "
-char194 20979,24960 2 3778
-^A "
-char200 14637,24960 2 3784
-`E "
-char202 14637,24960 2 3786
-^E "
-char203 14637,25020 2 3787
-:E "
-char206 8295,24960 2 3790
-^I "
-char207 8295,25020 2 3791
-:I "
-char180 16587,19785 2 3764
-aa "
-ga 16587,19785 2 3680
-a^ 16587,19785 2 3678
-^ "
-char168 16587,19140 2 3752
-ad "
-a~ 16587,18507 2 3710
-~ "
-char217 20979,24960,300 2 3801
-`U "
-char219 20979,24960,300 2 3803
-^U "
-char221 17076,24960 2 3805
-'Y "
-char253 13173,19785,4365 3 3837
-'y "
-char176 13662,20430 2 3760
-de "
-char199 18051,20430,6330 3 3783
-,C "
-char231 12198,14310,6006 1 3815
-,c "
-char209 21468,24783 2 3793
-~N "
-char241 14148,18507 2 3825
-~n "
-char161 8295,14346,6084 1 3745
-r! "
-char191 12198,14496,6234 1 3775
-r? "
-char164 16587,15684 0 3748
-Cs "
-char163 16587,20430 2 3747
-Po "
-char165 16587,20130 2 3749
-Ye "
-char167 16587,20430,4365 3 3751
-sc "
-Fn 16587,20130 2 51871
-char162 16587,19968 2 3746
-ct "
-char226 12198,19785,300 2 3810
-^a "
-char234 12684,19785,300 2 3818
-^e "
-char244 14637,19785,300 2 3828
-^o "
-char251 14148,19785,300 2 3835
-^u "
-char225 12198,19785,300 2 3809
-'a "
-char233 12684,19785,300 2 3817
-'e "
-char243 14637,19785,300 2 3827
-'o "
-char250 14148,19785,300 2 3834
-'u "
-char224 12198,19785,300 2 3808
-`a "
-char232 12684,19785,300 2 3816
-`e "
-char242 14637,19785,300 2 3826
-`o "
-char249 14148,19785,300 2 3833
-`u "
-char228 12198,19140,300 2 3812
-:a "
-char235 12684,19140,300 2 3819
-:e "
-char246 14637,19140,300 2 3830
-:o "
-char252 14148,19140,300 2 3836
-:u "
-char197 20979,26154 2 3781
-oA "
-char238 6342,19785 2 3822
-^i "
-char216 22932,20454,300 2 3800
-/O "
-char198 25857,20130 2 3782
-AE "
-char229 12198,20160,300 2 3813
-oa "
-char237 6342,19785 2 3821
-'i "
-char248 14637,14316,300 0 3832
-/o "
-char230 19515,14310,300 0 3814
-ae "
-char196 20979,25020 2 3780
-:A "
-char236 6342,19785 2 3820
-`i "
-char214 22932,25020,300 2 3798
-:O "
-char220 20979,25020,300 2 3804
-:U "
-char201 14637,24960 2 3785
-'E "
-char239 6342,19140 2 3823
-:i "
-char223 15612,20130,300 2 3807
-ss "
-char212 22932,24960,300 2 3796
-^O "
-char193 20979,24960 2 3777
-'A "
-char195 20979,24783 2 3779
-~A "
-char227 12198,18507,300 2 3811
-~a "
-char208 20004,20130 2 3792
--D "
-char240 14637,20025,300 2 3824
-Sd "
-char205 8295,24960 2 3789
-'I "
-char204 8295,24960 2 3788
-`I "
-char211 22932,24960,300 2 3795
-'O "
-char210 22932,24960,300 2 3794
-`O "
-char213 22932,24783,300 2 3797
-~O "
-char245 14637,18507,300 2 3829
-~o "
-vS 13662,24960,300 2 51795
-vs 9270,19785,300 2 51827
-char218 20979,24960,300 2 3802
-'U "
-:Y 17076,25020 2 51801
-char255 13173,19140,4365 3 3839
-:y "
-char222 13662,20130 2 3806
-TP "
-char254 14637,20025,4365 3 3838
-Tp "
-char181 14637,12630,4350 1 3765
-char182 16587,19635,4200 3 3766
-ps "
-char190 24882,20430,300 2 3774
-34 "
-\- 24882,9405 0 51757
-char188 24882,20430,300 2 3772
-14 "
-char189 24882,20430,300 2 3773
-12 "
-char170 10245,20430 2 3754
-Of "
-char186 10245,20430 2 3770
-Om "
-char171 12198,12450 0 3755
-Fo "
-char187 12198,12450 0 3771
-Fc "
-char177 24882,15420,5175 1 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19635 2 3753
-co "
-char172 24882,12135 0 3756
-no "
-char174 13173,19635 2 3758
-rg "
-char178 10245,20340 2 3762
-S2 "
-char179 10245,20130 2 3763
-S3 "
-char184 16587,309,6006 1 3768
-ac "
-char185 10245,20340 2 3769
-S1 "
-char215 24882,15990,279 0 3799
-char247 24882,15090 0 3831
-char183 8295,12330 0 3767
-pc "
-fm 8295,20130 2 51873
-sd 14148,20130 2 51874
-dg 16587,20130,4365 3 51755
-tm 16101,17850 0 51796
-ah 16587,19785 2 51935
-ao 16587,20160 2 51930
-f/ 3414,20430,300 2 51759
-em 24882,9525 0 51789
-en 16587,9525 0 51790
-dd 16587,20130,4365 3 51773
-.i 6342,14010 0 51957
-aq 8295,20130 2 3623
-bu 13173,14226 0 51889
-'C 18051,24960,300 2 20166
-'c 12198,19785,300 2 20198
-lq 14148,20130 2 51838
-rq 14148,20130 2 51746
-Bq 14148,3900,5100 1 51772
-vz 10245,19785 2 51834
-fi 14148,20130 2 51881
-fl 14148,20130 2 51882
-ff 15612,20130 2 51883
-Fi 21468,20130 2 51884
-Fl 21468,20130 2 51885
-ij 12684,19815,4365 3 51958
-bq 8295,3900,5100 1 51756
-%0 33177,20430,300 2 51901
-char175 16587,18603 2 3759
-a- "
-ab 16587,19110 2 51926
-a. 16587,19140 2 51927
-oe 22443,14310,300 0 51823
-OE 26346,20430,300 2 51791
-fo 6831,12450 0 51886
-fc 6831,12450 0 51887
-sq 19029,15624 0 51899
-/L 16101,20130 2 51944
-/l 9270,20025 2 51960
-a" 16587,19785 2 51933
-ho 16587,297,6417 1 51934
-vZ 16101,24960 2 51802
-IJ 18051,20130,4488 3 51942
diff --git a/contrib/groff/font/devlj4/AOB b/contrib/groff/font/devlj4/AOB
deleted file mode 100644
index 913ca39d6e78..000000000000
--- a/contrib/groff/font/devlj4/AOB
+++ /dev/null
@@ -1,748 +0,0 @@
-name AOB
-spacewidth 8781
-pcltypeface 4168
-pclproportional 1
-pclweight 3
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -1461
-P . -5364
-P , -5364
-V A -1950
-A V -1950
-T o -2439
-T c -1950
-T e -1950
-T d -1950
-T s -1461
-T a -1950
-T J -2925
-L T -2925
-L Y -3414
-Y o -3414
-Y e -2925
-Y a -2925
-Y J -2925
-A W -1461
-W A -1461
-T A -2439
-V o -1461
-V e -1461
-V a -1461
-Y A -2925
-F A -486
-F . -3903
-F , -3903
-A T -2439
-A Y -2925
-v . -2925
-v , -2925
-y . -3414
-y , -3414
-T . -3414
-T , -3414
-L W -975
-P A -975
-V J -2925
-V . -3414
-V , -3414
-Y . -3903
-Y , -3903
-W o -975
-W e -975
-W a -975
-W . -2439
-W , -2439
-r . -3414
-r , -3414
-w . -2925
-w , -2925
-Y u -975
-A v -1461
-A y -1461
-A w -1461
-o . -2439
-o , -2439
-p . -1950
-p , -1950
-e . -1461
-e , -1461
-b . -2439
-b , -2439
-O T -486
-O V -975
-O Y -1461
-O . -1950
-O , -1950
-L y -975
-P J -2925
-V y -486
-V u -486
-V O -975
-V G -975
-V C -975
-V Q -975
-D T -486
-D V -975
-D Y -1461
-D . -1950
-D , -1950
-Y O -1461
-Y G -1461
-Y C -1461
-Y Q -1461
-c . -1461
-c , -1461
-O A -486
-O W -975
-R V -486
-R Y -975
-R W -486
-G T -486
-P o -486
-P g -486
-P e -486
-P a -486
-C . -486
-C , -486
-D A -486
-D W -975
-B Y -975
-B . -1461
-B , -1461
-F J -2925
-A O -486
-A G -486
-A C -486
-A U -486
-A Q -486
-W r -486
-W y -486
-W u -486
-W O -975
-W G -975
-W C -975
-W J -1950
-W Q -975
-J A -486
-J . -1950
-J , -1950
-U A -486
-U . -1950
-U , -1950
-Q A -486
-Q W -975
-f . -1461
-f , -1461
-T O -486
-T G -486
-T C -486
-T Q -486
-O X -486
-G V -975
-G Y -1461
-G W -975
-G . -1950
-G , -1950
-P V -486
-P Y -975
-C V -486
-C Y -975
-D X -486
-B V -486
-B X -486
-B A -486
-B W -486
-S . -1461
-S , -1461
-X o -486
-X e -486
-X y -486
-X O -486
-X G -486
-X C -486
-X Q -486
-A o -486
-A e -486
-Q X -486
-K o -486
-K e -486
-K y -486
-K w -486
-K O -486
-K G -486
-K C -486
-K Q -486
-o v -975
-o y -975
-o x -486
-o w -975
-h v -975
-h y -975
-n v -975
-n y -975
-m v -975
-m y -975
-g . -486
-g , -486
-p v -975
-p y -975
-p x -486
-c v -975
-c y -975
-c w -975
-v o -975
-v g -975
-v c -975
-v d -975
-v a -975
-v q -975
-e v -975
-e y -975
-b v -975
-b y -975
-b w -975
-s . -975
-s , -975
-y o -975
-y g -975
-y c -975
-y d -975
-y a -975
-y q -975
-x o -486
-x g -486
-x c -486
-x e -486
-x d -486
-x a -486
-x q -486
-a v -975
-a y -975
-a w -975
-w o -975
-w g -975
-w c -975
-w d -975
-w a -975
-w q -975
-R o -1461
-R O -486
-R G -486
-R C -486
-R Q -486
-G X -486
-G A -486
-P s -486
-P X -486
-P W -486
-C W -486
-V S -486
-S V -486
-S Y -975
-S X -486
-S A -486
-S W -486
-Y S -975
-X a -486
-X u -486
-X S -486
-A t -486
-A g -486
-A c -486
-A d -486
-A a -486
-A u -486
-A q -486
-A S -486
-W S -486
-K c -486
-K u -486
-K S -486
-t . -486
-t , -486
-h w -975
-h . -486
-h , -486
-n w -975
-n . -486
-n , -486
-m w -975
-m . -486
-m , -486
-l . -486
-l , -486
-i . -486
-i , -486
-p w -975
-c x -486
-v e -975
-v s -975
-e x -486
-e w -975
-z . -486
-z , -486
-d . -486
-d , -486
-s v -975
-s y -975
-s x -486
-s w -975
-y e -975
-y s -975
-x s -486
-x . -486
-x , -486
-a . -486
-a , -486
-w e -975
-w s -975
-j . -486
-j , -486
-u . -486
-k o -486
-k g -486
-k c -486
-k e -486
-k d -486
-k a -486
-k q -486
-k . -486
-k , -486
-O Z -486
-O J -1461
-H . -486
-H , -486
-N . -486
-N , -486
-M . -486
-M , -486
-L . -486
-L , -486
-R e -1461
-R a -975
-R . -486
-R , -486
-G Z -486
-I . -486
-I , -486
-P O -486
-P G -486
-P C -486
-P Q -486
-E . -486
-E , -486
-Z o -1950
-Z e -1950
-Z d -1950
-Z s -486
-Z a -975
-Z O -486
-Z G -486
-Z C -486
-Z Q -486
-Z . -486
-Z , -486
-D Z -486
-D J -1461
-B J -975
-S J -975
-X . -486
-X , -486
-A s -486
-A . -486
-A , -486
-J J -1461
-U J -1461
-K a -486
-K . -486
-K , -486
-k s -486
-G J -1461
-A f -486
-A cq -486
-A ' -486
-Y char173 -975
-Y hy -975
-Y - -975
-Y en -975
-Y em -975
-V char173 -486
-V hy -486
-V - -486
-V en -486
-V em -486
-W char173 -486
-W hy -486
-W - -486
-W en -486
-W em -486
-X char173 -486
-X hy -486
-X - -486
-X en -486
-X em -486
-A char173 -486
-A hy -486
-A - -486
-A en -486
-A em -486
-K char173 -486
-K hy -486
-K - -486
-K en -486
-K em -486
-char173 X -486
-hy X -486
-- X -486
-char173 A -486
-hy A -486
-- A -486
-en X -486
-en A -486
-em X -486
-charset
-! 9759,20205,450 2 3617
-dq 12198,19755 2 3618
-" "
-sh 17565,20730,3630 3 3619
-# "
-Do 17565,22980,3855 3 3620
-$ "
-% 30249,20505,450 2 3621
-& 21468,20205,450 2 3622
-cq 6831,19755 2 51751
-' "
-( 8781,19755 2 3624
-) 8781,19755 2 3625
-* 17565,20205 2 3626
-+ 30249,15450,600 0 3627
-, 8781,4080,4710 1 3628
-char173 8781,10965 0 3629
-hy "
-- "
-. 8781,4170,450 0 3630
-sl 10734,20820,450 2 3631
-/ "
-0 17565,20505,450 2 3632
-1 17565,20055 2 3633
-2 17565,20505 2 3634
-3 17565,20055,450 2 3635
-4 17565,20055 2 3636
-5 17565,20055,450 2 3637
-6 17565,20505,450 2 3638
-7 17565,20055 2 3639
-8 17565,20505,450 2 3640
-9 17565,20505,450 2 3641
-: 8781,15783,450 0 3642
-; 8781,15783,4710 1 3643
-< 26346,16068 0 3644
-= 30249,12984 0 3645
-> 26346,16068 0 3646
-? 16101,20205,450 2 3647
-at 30249,21057,2679 2 3648
-@ "
-A 20004,19755 2 3649
-B 18051,19755 2 3650
-C 17076,20205,450 2 3651
-D 19515,19755 2 3652
-E 16101,19755 2 3653
-F 16101,19755 2 3654
-G 18540,20205,450 2 3655
-H 19515,19755 2 3656
-I 8295,19755 2 3657
-J 13662,19755,450 2 3658
-K 18540,19755 2 3659
-L 14637,19755 2 3660
-M 24396,19755 2 3661
-N 20004,19755 2 3662
-O 20004,20205,450 2 3663
-P 18540,19755 2 3664
-Q 20004,20205,3075 2 3665
-R 18051,19755 2 3666
-S 15612,20205,450 2 3667
-T 17076,19755 2 3668
-U 19029,19755,450 2 3669
-V 19029,19755 2 3670
-W 27321,19755 2 3671
-X 19029,19755 2 3672
-Y 19029,19755 2 3673
-Z 17565,19755 2 3674
-lB 8781,19755 2 3675
-[ "
-rs 10734,20820,450 2 3676
-\ "
-rB 8781,19755 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 6831,19755 2 51808
-` "
-a 17076,17205,450 0 3681
-b 19029,20820,450 2 3682
-c 15612,17205,450 0 3683
-d 19029,20820,450 2 3684
-e 17565,17205,450 0 3685
-f 13662,20820 2 3686
-g 19029,17205,3930 1 3687
-h 19029,20820 2 3688
-i 8781,21855 2 3689
-j 8781,21855,3930 3 3690
-k 17076,20820 2 3691
-l 8295,20820 2 3692
-m 27810,17205 0 3693
-n 19029,17205 0 3694
-o 18540,17205,450 0 3695
-p 19029,17205,3930 1 3696
-q 19029,17205,3930 1 3697
-r 13662,17205 0 3698
-s 14637,17205,450 0 3699
-t 14148,20970,450 2 3700
-u 18540,16755,450 0 3701
-v 17565,16755 0 3702
-w 26346,16755 0 3703
-x 17565,16755 0 3704
-y 17565,16755,3930 1 3705
-z 15126,16755 0 3706
-lC 13173,20130,6075 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 13173,20130,6075 3 3709
-} "
-ti 26346,9435 0 51876
-char192 20004,24930 2 3776
-`A "
-char194 20004,24930 2 3778
-^A "
-char200 16101,24930 2 3784
-`E "
-char202 16101,24930 2 3786
-^E "
-char203 16101,25050 2 3787
-:E "
-char206 8295,24930 2 3790
-^I "
-char207 8295,25050 2 3791
-:I "
-char180 17565,22125 2 3764
-aa "
-ga 17565,22125 2 3680
-a^ 17565,22125 2 3678
-^ "
-char168 17565,22125 2 3752
-ad "
-a~ 17565,22521 2 3710
-~ "
-char217 19029,24930,450 2 3801
-`U "
-char219 19029,24930,450 2 3803
-^U "
-char221 19029,24930 2 3805
-'Y "
-char253 17565,22125,3930 3 3837
-'y "
-char176 17565,20505 2 3760
-de "
-char199 17076,20205,5988 3 3783
-,C "
-char231 15612,17205,5988 1 3815
-,c "
-char209 20004,25161 2 3793
-~N "
-char241 19029,22521 2 3825
-~n "
-char161 9759,17115,3540 1 3745
-r! "
-char191 16101,17106,3549 1 3775
-r? "
-char164 17565,15834 0 3748
-Cs "
-char163 17565,20505 2 3747
-Po "
-char165 17565,20055 2 3749
-Ye "
-char167 17565,20205,3930 3 3751
-sc "
-Fn 17565,20820 2 51871
-char162 17565,21603,1890 2 3746
-ct "
-char226 17076,22125,450 2 3810
-^a "
-char234 17565,22125,450 2 3818
-^e "
-char244 18540,22125,450 2 3828
-^o "
-char251 18540,22125,450 2 3835
-^u "
-char225 17076,22125,450 2 3809
-'a "
-char233 17565,22125,450 2 3817
-'e "
-char243 18540,22125,450 2 3827
-'o "
-char250 18540,22125,450 2 3834
-'u "
-char224 17076,22125,450 2 3808
-`a "
-char232 17565,22125,450 2 3816
-`e "
-char242 18540,22125,450 2 3826
-`o "
-char249 18540,22125,450 2 3833
-`u "
-char228 17076,22125,450 2 3812
-:a "
-char235 17565,22125,450 2 3819
-:e "
-char246 18540,22125,450 2 3830
-:o "
-char252 18540,22125,450 2 3836
-:u "
-char197 20004,27354 2 3781
-oA "
-char238 8781,22125 2 3822
-^i "
-char216 20004,20205,450 2 3800
-/O "
-char198 30249,19755 2 3782
-AE "
-char229 17076,24825,450 2 3813
-oa "
-char237 8781,22125 2 3821
-'i "
-char248 18540,17205,450 0 3832
-/o "
-char230 27321,17205,450 0 3814
-ae "
-char196 20004,25050 2 3780
-:A "
-char236 8781,22125 2 3820
-`i "
-char214 20004,25050,450 2 3798
-:O "
-char220 19029,25050,450 2 3804
-:U "
-char201 16101,24930 2 3785
-'E "
-char239 8781,22125 2 3823
-:i "
-char223 18540,20820,450 2 3807
-ss "
-char212 20004,24930,450 2 3796
-^O "
-char193 20004,24930 2 3777
-'A "
-char195 20004,25161 2 3779
-~A "
-char227 17076,22521,450 2 3811
-~a "
-char208 19515,19755 2 3792
--D "
-char240 18540,21666,450 2 3824
-Sd "
-char205 8295,24930 2 3789
-'I "
-char204 8295,24930 2 3788
-`I "
-char211 20004,24930,450 2 3795
-'O "
-char210 20004,24930,450 2 3794
-`O "
-char213 20004,25161,450 2 3797
-~O "
-char245 18540,22521,450 2 3829
-~o "
-vS 15612,24930,450 2 51795
-vs 14637,22125,450 2 51827
-char218 19029,24930,450 2 3802
-'U "
-:Y 19029,25050 2 51801
-char255 17565,22125,3930 3 3839
-:y "
-char222 18540,19755 2 3806
-TP "
-char254 19029,20820,3930 3 3838
-Tp "
-char181 15612,12630,4680 1 3765
-char182 17565,19635,4200 1 3766
-ps "
-char190 30249,20610,555 2 3774
-34 "
-\- 30249,9375 0 51757
-char188 30249,20610,555 2 3772
-14 "
-char189 30249,20610,555 2 3773
-12 "
-char170 14637,20505 2 3754
-Of "
-char186 14637,20505 2 3770
-Om "
-char171 15612,14025 0 3755
-Fo "
-char187 15612,14025 0 3771
-Fc "
-char177 30249,15450,5895 1 3761
-char166 13173,19083,5916 1 3750
-bb "
-char169 13173,19635 0 3753
-co "
-char172 30249,11274 0 3756
-no "
-char174 13173,19635 0 3758
-rg "
-char178 11709,20385 2 3762
-S2 "
-char179 11709,20055 2 3763
-S3 "
-char184 17565,507,5988 1 3768
-ac "
-char185 11709,20055 2 3769
-S1 "
-char215 30249,15225,585 0 3799
-char247 30249,15885,1035 0 3831
-char183 8781,12759 0 3767
-pc "
-fm 8781,20055 2 51873
-sd 17565,20055 2 51874
-dg 17565,20205,4095 3 51755
-tm 16101,17850 0 51796
-ah 17565,22125 2 51935
-ao 17565,24825 2 51930
-f/ 5367,20610,555 2 51759
-em 30249,10440 0 51789
-en 17565,10440 0 51790
-dd 17565,20205,4095 3 51773
-.i 8781,16755 0 51957
-aq 6831,19755 2 3623
-bu 13173,14226 0 51889
-'C 17076,24930,450 2 20166
-'c 15612,22125,450 2 20198
-lq 11220,19755 2 51838
-rq 11220,19755 2 51746
-Bq 11220,4038,3672 1 51772
-vz 15126,22125 2 51834
-fi 21954,21855 2 51881
-fl 21954,20820 2 51882
-ff 25371,20820 2 51883
-Fi 33177,21855 2 51884
-Fl 33177,20820 2 51885
-ij 17565,21855,3930 3 51958
-bq 6831,4038,3672 1 51756
-%0 34152,20505,450 2 51901
-char175 17565,21675 2 3759
-a- "
-ab 17565,22200 2 51926
-a. 17565,22590 2 51927
-oe 28785,17205,450 0 51823
-OE 28785,20205,450 2 51791
-fo 9270,14025 0 51886
-fc 9270,14025 0 51887
-sq 19029,15624 0 51899
-/L 14148,19755 2 51944
-/l 9270,20820 2 51960
-a" 17565,22125 2 51933
-ho 17565,1095,4155 1 51934
-vZ 17565,24930 2 51802
-IJ 21954,19755,450 2 51942
diff --git a/contrib/groff/font/devlj4/AOI b/contrib/groff/font/devlj4/AOI
deleted file mode 100644
index f43a1afab728..000000000000
--- a/contrib/groff/font/devlj4/AOI
+++ /dev/null
@@ -1,813 +0,0 @@
-name AOI
-spacewidth 7806
-slant 11.150000
-pcltypeface 4168
-pclproportional 1
-pclweight 0
-pclstyle 1
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2439
-P . -4878
-P , -4878
-V A -2439
-A V -1950
-T o -2925
-T r -1461
-T c -2925
-T e -2925
-T d -2925
-T s -2439
-T y -1461
-T a -2925
-T w -1461
-T u -1461
-T J -2925
-L T -2925
-L Y -2925
-Y o -2925
-Y e -2925
-Y a -2439
-Y J -2925
-A W -1461
-W A -1461
-T A -2925
-V o -1461
-V e -1461
-V a -1461
-Y A -2925
-F A -1461
-F . -3903
-F , -3903
-A T -2439
-A Y -2439
-v . -2439
-v , -2439
-y . -2925
-y , -2925
-T . -3414
-T , -3414
-L W -1461
-P A -975
-V J -2925
-V . -3414
-V , -3414
-Y . -3414
-Y , -3414
-W o -975
-W e -975
-W a -975
-W . -1950
-W , -1950
-r . -1950
-r , -1950
-w . -2439
-w , -2439
-Y u -975
-A v -1461
-A y -1461
-A w -975
-o . -2439
-o , -2439
-p . -2439
-p , -2439
-e . -1461
-e , -1461
-b . -2439
-b , -2439
-O T -1461
-O V -975
-O Y -1461
-O . -2439
-O , -2439
-L y -1950
-L O -2439
-L G -2439
-L C -2439
-L Q -2439
-P J -2925
-V y -975
-V u -975
-V O -975
-V G -975
-V C -975
-V Q -975
-D T -1461
-D V -975
-D Y -1461
-D . -2439
-D , -2439
-Y O -975
-Y G -975
-Y C -975
-Y Q -975
-F o -486
-F e -486
-F a -486
-c . -1461
-c , -1461
-O A -975
-O W -486
-L U -1950
-R T -975
-R V -975
-R Y -975
-R W -486
-G T -1461
-C A -486
-C . -975
-C , -975
-D A -975
-D W -486
-B T -1461
-B Y -1461
-B . -1461
-B , -1461
-F J -2925
-A O -975
-A G -975
-A C -975
-A U -975
-A Q -975
-W r -486
-W y -486
-W u -486
-W O -486
-W G -486
-W C -486
-W J -1461
-W Q -486
-J A -486
-J . -975
-J , -975
-U A -975
-U . -2439
-U , -2439
-Q W -486
-f . -2439
-f , -2439
-T O -1461
-T G -1461
-T C -1461
-T Q -1461
-O X -975
-L o -2925
-L e -2439
-L q -1950
-G V -975
-G Y -1461
-G W -486
-G . -1950
-G , -1950
-P T -1461
-P V -975
-P Y -1461
-C T -975
-C V -975
-C Y -975
-D X -975
-B V -975
-B X -975
-B A -975
-B W -486
-S . -1950
-S , -1950
-X o -975
-X e -975
-X y -975
-X O -975
-X G -975
-X C -975
-X Q -975
-A o -975
-A e -975
-K o -1461
-K e -1461
-K y -975
-K w -975
-K O -975
-K G -975
-K C -975
-K Q -975
-o v -486
-o y -486
-o x -975
-h v -486
-h y -486
-n v -486
-n y -486
-m v -486
-m y -486
-r g -486
-g . -486
-g , -486
-p v -486
-p y -486
-p x -975
-c v -486
-c y -486
-v o -486
-v g -486
-v c -486
-v d -486
-v a -486
-v q -486
-e v -486
-e y -486
-b v -975
-b y -975
-b w -486
-s . -975
-s , -975
-y o -486
-y g -486
-y c -486
-y d -486
-y a -486
-y q -486
-f g -486
-x o -975
-x c -975
-x e -975
-x d -975
-x a -975
-x q -975
-a v -486
-a y -486
-w o -486
-w g -486
-w c -486
-w d -486
-w a -486
-w q -486
-T S -1461
-L a -975
-L S -1461
-G X -975
-G A -975
-P X -975
-P W -486
-C X -486
-C W -486
-C J -486
-V S -975
-S T -1461
-S V -975
-S Y -1461
-S X -975
-S A -975
-S W -486
-Y S -975
-X a -975
-X u -975
-X S -975
-A t -975
-A c -975
-A d -975
-A a -975
-A u -975
-A q -975
-A S -975
-W S -486
-K c -1461
-K u -975
-K S -975
-t . -486
-t , -486
-h . -486
-h , -486
-n . -486
-n , -486
-m . -486
-m , -486
-l . -486
-l , -486
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-i . -486
-i , -486
-c x -975
-v e -486
-v s -486
-e x -975
-z . -486
-z , -486
-d . -486
-d , -486
-b f -486
-s v -486
-s y -486
-s x -486
-y e -486
-y s -486
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-x s -486
-x . -486
-x , -486
-a . -486
-a , -486
-w e -486
-w s -486
-j . -486
-j , -486
-u . -486
-k o -975
-k c -975
-k e -975
-k d -975
-k a -975
-k q -975
-k . -486
-k , -486
-O J -1950
-H . -486
-H , -486
-N . -486
-N , -486
-M . -486
-M , -486
-L . -486
-L , -486
-R . -486
-R , -486
-I . -486
-I , -486
-E . -486
-E , -486
-Z o -1461
-Z e -1461
-Z d -1461
-Z s -486
-Z a -975
-Z . -486
-Z , -486
-D J -1950
-B J -975
-S J -1461
-X . -486
-X , -486
-A s -486
-A . -486
-A , -486
-J J -486
-U J -1950
-K a -975
-K . -486
-K , -486
-o z -975
-r s -486
-p z -975
-c z -975
-v f -486
-e z -975
-z o -975
-z c -975
-z e -975
-z d -975
-z s -486
-z a -975
-z q -975
-b t -486
-b g -486
-b z -1461
-b j -486
-s z -486
-y f -486
-w f -486
-k s -486
-G J -1461
-L cq -3414
-L ' -3414
-T char173 -1461
-T hy -1461
-T - -1461
-T en -1461
-T em -1461
-A cq -1950
-A ' -1950
-char173 T -1461
-hy T -1461
-- T -1461
-en T -1461
-em T -1461
-Y char173 -975
-Y hy -975
-Y - -975
-Y en -975
-Y em -975
-p cq -1950
-p ' -1950
-c cq -975
-c ' -975
-e cq -1950
-e ' -1950
-b cq -1950
-b ' -1950
-a cq -1950
-a ' -1950
-V char173 -975
-V hy -975
-V - -975
-V en -975
-V em -975
-h cq -1950
-h ' -1950
-n cq -1950
-n ' -1950
-m cq -1950
-m ' -1950
-W char173 -486
-W hy -486
-W - -486
-W en -486
-W em -486
-cq d -1950
-' d -1950
-s cq -975
-s ' -975
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -975
-X hy -975
-X - -975
-X en -975
-X em -975
-A char173 -975
-A hy -975
-A - -975
-A en -975
-A em -975
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-cq s -975
-' s -975
-char173 X -975
-hy X -975
-- X -975
-char173 A -975
-hy A -975
-- A -975
-en X -975
-en A -975
-em X -975
-b f -486
-charset
-! 7806,20160,405,1176,798,880 2 3617
-dq 11709,19755,0,504,-2439,504 2 3618
-" "
-sh 15612,20460,4296,0,-936 3 3619
-# "
-Do 15612,22065,2295,1062,258,880 2 3620
-$ "
-% 26346,20460,405,0,-1734 2 3621
-& 17565,20160,405,414,381,414 2 3622
-cq 7806,19755,0,744,-1851,744 2 51751
-' "
-( 7806,19755,405,3360,-270,880 2 3624
-) 7806,19755,405,618,2472,618 2 3625
-* 15612,20160,0,0,-2880 2 3626
-+ 26346,15255,585,0,-3894 0 3627
-, 7806,2910,4320,0,2160 1 3628
-char173 7806,10230,0,654,468,654 0 3629
-hy "
-- "
-. 7806,2925,405,0,684 0 3630
-sl 7806,20820,405,4203,3111,880 2 3631
-/ "
-0 15612,20460,405,1371,450,880 2 3632
-1 15612,20055,0,0,-879 2 3633
-2 15612,20460,0,1173,1140,880 2 3634
-3 15612,20055,405,1743,621,880 2 3635
-4 15612,20055,0,1101,1074,880 2 3636
-5 15612,20055,405,1530,453,880 2 3637
-6 15612,20460,405,1863,-6,880 2 3638
-7 15612,20055,0,2184,-213,880 2 3639
-8 15612,20460,405,1362,708,880 2 3640
-9 15612,20460,405,1032,828,880 2 3641
-: 7806,13515,405,0,684 0 3642
-; 7806,13515,4320,0,2160 1 3643
-< 26346,16068,0,0,-3981 0 3644
-= 26346,10800,0,0,-3921 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 14148,20160,405,1497,-1323,880 2 3647
-at 26346,21030,2745,0,-1083 2 3648
-@ "
-A 18051,19755,0,0,2478 2 3649
-B 16587,19755,0,1230,765,880 2 3650
-C 16101,20160,405,1941,-36,880 2 3651
-D 19029,19755,0,516,657,516 2 3652
-E 15612,19755,0,1971,858,880 2 3653
-F 15126,19755,0,2244,807,880 2 3654
-G 18051,20160,405,1218,-144,880 2 3655
-H 19515,19755,0,1179,558,880 2 3656
-I 6831,19755,0,1557,909,880 2 3657
-J 12198,19755,405,1518,2154,880 2 3658
-K 16101,19755,0,3612,717,880 2 3659
-L 12684,19755,0,0,783 2 3660
-M 22932,19755,0,1287,729,880 2 3661
-N 19515,19755,0,1344,735,880 2 3662
-O 19029,20160,405,732,-39,732 2 3663
-P 16587,19755,0,1425,699,880 2 3664
-Q 19029,20160,993,849,-243,849 2 3665
-R 16101,19755,0,1494,744,880 2 3666
-S 14637,20160,405,1374,888,880 2 3667
-T 14637,19755,0,3165,-825,880 2 3668
-U 18540,19755,405,1449,-453,880 2 3669
-V 17076,19755,0,2931,-1407,880 2 3670
-W 25371,19755,0,3333,-1341,880 2 3671
-X 16587,19755,0,3177,2418,880 2 3672
-Y 16587,19755,0,3216,-1296,880 2 3673
-Z 16101,19755,0,2199,1347,880 2 3674
-lB 7806,19755,405,2646,699,880 2 3675
-[ "
-rs 7806,20820,405,0,-1671 2 3676
-\ "
-rB 7806,19755,405,1341,2004,880 2 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,880 3 3679
-oq 7806,19755,0,1062,-2169,880 2 51808
-` "
-a 16101,17160,405,0,621 0 3681
-b 18051,20820,405,0,735 2 3682
-c 15126,17160,405,1257,114,880 0 3683
-d 18051,20820,405,1623,207,880 2 3684
-e 16587,17160,405,546,-6,546 0 3685
-f 11220,20820,0,3024,114,880 2 3686
-g 18051,17160,3930,654,102,654 1 3687
-h 18051,20820,0,0,573 2 3688
-i 6831,21105,0,2052,918,880 2 3689
-j 7317,21105,3930,1986,4662,880 3 3690
-k 14637,20820,0,2835,738,880 2 3691
-l 6831,20820,0,1794,891,880 2 3692
-m 26835,17160,0,0,735 0 3693
-n 18051,17160,0,0,567 0 3694
-o 17565,17160,405,90,-30,90 0 3695
-p 18051,17160,3930,51,1440,51 1 3696
-q 18051,17160,3930,855,216,855 1 3697
-r 11220,17160,0,2286,816,880 0 3698
-s 12684,17160,405,1206,1044,880 0 3699
-t 12198,20985,405,2229,-525,880 2 3700
-u 18051,16755,405,603,-237,603 0 3701
-v 16101,16755,0,1950,-618,880 0 3702
-w 24396,16755,0,1749,-735,880 0 3703
-x 15126,16755,0,2667,2142,880 0 3704
-y 15612,16755,3930,2085,-378,880 1 3705
-z 13662,16755,0,1953,1530,880 0 3706
-lC 11709,20130,6075,2580,-1005,880 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 11709,20130,6075,0,3153 3 3709
-} "
-ti 26346,8952,0,0,-4029 0 51876
-char192 18051,25005,0,0,2478 2 3776
-`A "
-char194 18051,25005,0,0,2478 2 3778
-^A "
-char200 15612,25005,0,1971,858,880 2 3784
-`E "
-char202 15612,25005,0,1971,858,880 2 3786
-^E "
-char203 15612,24645,0,1971,858,880 2 3787
-:E "
-char206 6831,25005,0,4425,909,880 2 3790
-^I "
-char207 6831,24645,0,4878,909,880 2 3791
-:I "
-char180 15612,22080,0,2073,-6261,880 2 3764
-aa "
-ga 15612,22080,0,0,-3054 2 3680
-a^ 15612,22080,0,0,-4680 2 3678
-^ "
-char168 15612,21795,0,0,-4674 2 3752
-ad "
-a~ 15612,21819,0,1443,-2550,880 2 3710
-~ "
-char217 18540,25005,405,1449,-453,880 2 3801
-`U "
-char219 18540,25005,405,1449,-453,880 2 3803
-^U "
-char221 16587,25005,0,3216,-1296,880 2 3805
-'Y "
-char253 15612,22080,3930,2085,-378,880 3 3837
-'y "
-char176 15612,20460,0,0,-2748 2 3760
-de "
-char199 16101,20160,6285,1941,-36,880 3 3783
-,C "
-char231 15126,17160,6285,1257,114,880 1 3815
-,c "
-char209 19515,24744,0,1344,735,880 2 3793
-~N "
-char241 18051,21819,0,222,567,222 2 3825
-~n "
-char161 7806,17157,3408,714,1260,714 0 3745
-r! "
-char191 14148,17175,3390,0,1623 0 3775
-r? "
-char164 15612,15684,0,96,-528,96 0 3748
-Cs "
-char163 15612,20460,0,2118,1011,880 2 3747
-Po "
-char165 15612,20055,0,3255,-999,880 2 3749
-Ye "
-char167 15612,20160,4095,0,-1920 3 3751
-sc "
-Fn 15612,20820,0,1578,-2127,880 2 51871
-char162 15612,20547,498,1389,-540,880 2 3746
-ct "
-char226 16101,22080,405,0,621 2 3810
-^a "
-char234 16587,22080,405,546,-6,546 2 3818
-^e "
-char244 17565,22080,405,90,-30,90 2 3828
-^o "
-char251 18051,22080,405,603,-237,603 2 3835
-^u "
-char225 16101,22080,405,1827,621,880 2 3809
-'a "
-char233 16587,22080,405,1584,-6,880 2 3817
-'e "
-char243 17565,22080,405,1095,-30,880 2 3827
-'o "
-char250 18051,22080,405,852,-237,852 2 3834
-'u "
-char224 16101,22080,405,0,621 2 3808
-`a "
-char232 16587,22080,405,546,-6,546 2 3816
-`e "
-char242 17565,22080,405,90,-30,90 2 3826
-`o "
-char249 18051,22080,405,603,-237,603 2 3833
-`u "
-char228 16101,21795,405,0,621 2 3812
-:a "
-char235 16587,21795,405,546,-6,546 2 3819
-:e "
-char246 17565,21795,405,90,-30,90 2 3830
-:o "
-char252 18051,21795,405,603,-237,603 2 3836
-:u "
-char197 18051,26850,0,0,2478 2 3781
-oA "
-char238 6831,22080,0,3831,921,880 2 3822
-^i "
-char216 19029,20205,450,2472,1920,880 2 3800
-/O "
-char198 28299,19755,0,2715,2868,880 2 3782
-AE "
-char229 16101,24390,405,0,621 2 3813
-oa "
-char237 6831,22080,0,6462,921,880 2 3821
-'i "
-char248 17565,17232,474,1710,1614,880 0 3832
-/o "
-char230 25857,17160,405,591,780,591 0 3814
-ae "
-char196 18051,24645,0,0,2478 2 3780
-:A "
-char236 6831,22080,0,1335,1338,880 2 3820
-`i "
-char214 19029,24645,405,732,-39,732 2 3798
-:O "
-char220 18540,24645,405,1449,-453,880 2 3804
-:U "
-char201 15612,25005,0,2739,858,880 2 3785
-'E "
-char239 6831,21795,0,4275,921,880 2 3823
-:i "
-char223 16101,20820,405,57,780,57 2 3807
-ss "
-char212 19029,25005,405,732,-39,732 2 3796
-^O "
-char193 18051,25005,0,1518,2478,880 2 3777
-'A "
-char195 18051,24744,0,1263,2478,880 2 3779
-~A "
-char227 16101,21819,405,1197,621,880 2 3811
-~a "
-char208 19029,19755,0,516,690,516 2 3792
--D "
-char240 17565,21426,405,66,-36,66 2 3824
-Sd "
-char205 6831,25005,0,7128,909,880 2 3789
-'I "
-char204 6831,25005,0,2073,909,880 2 3788
-`I "
-char211 19029,25005,405,1029,-39,880 2 3795
-'O "
-char210 19029,25005,405,732,-39,732 2 3794
-`O "
-char213 19029,24744,405,774,-39,774 2 3797
-~O "
-char245 17565,21819,405,465,-30,465 2 3829
-~o "
-vS 14637,25005,405,1374,888,880 2 51795
-vs 12684,22080,405,1596,1044,880 2 51827
-char218 18540,25005,405,1449,-453,880 2 3802
-'U "
-:Y 16587,24645,0,3216,-1296,880 2 51801
-char255 15612,21795,3930,2085,-378,880 3 3839
-:y "
-char222 16587,19755,0,675,753,675 2 3806
-TP "
-char254 18051,20820,3930,51,1440,51 3 3838
-Tp "
-char181 14637,12630,4350,1122,2931,880 1 3765
-char182 15612,19635,4200,0,-1344 3 3766
-ps "
-char190 26346,20610,555,0,-1806 2 3774
-34 "
-\- 26346,8295,0,0,-3891 0 51757
-char188 26346,20610,555,0,-1755 2 3772
-14 "
-char189 26346,20610,555,0,-1998 2 3773
-12 "
-char170 15612,20460,0,0,-2658 2 3754
-Of "
-char186 15612,20460,0,0,-2451 2 3770
-Om "
-char171 13662,14145,0,2082,-45,880 0 3755
-Fo "
-char187 13662,14145,0,267,1770,267 0 3771
-Fc "
-char177 26346,15255,3900,0,-3906 1 3761
-char166 13173,19083,5916,0,-4596 3 3750
-bb "
-char169 13173,19635,0,3903,-2112,880 2 3753
-co "
-char172 26346,11679,0,0,-3984 0 3756
-no "
-char174 13173,19635,0,3903,-2112,880 2 3758
-rg "
-char178 10245,20385,0,2097,-225,880 2 3762
-S2 "
-char179 10245,20055,0,2064,-186,880 2 3763
-S3 "
-char184 15612,375,6285,0,-2349 1 3768
-ac "
-char185 10245,20055,0,0,-495 2 3769
-S1 "
-char215 26346,15189,579,0,-3957 0 3799
-char247 26346,12780,0,0,-3894 0 3831
-char183 7806,11760,0,0,-1131 0 3767
-pc "
-fm 7806,20055,0,1680,-2322,880 2 51873
-sd 15612,20055,0,0,-2322 2 51874
-dg 15612,20160,4095,0,-1632 3 51755
-tm 16101,17850,0,1443,-1980,880 0 51796
-ah 15612,22080,0,132,-5370,132 2 51935
-ao 15612,24390,0,0,-6087 2 51930
-f/ 4392,20610,555,7662,7350,880 2 51759
-em 26346,9840,0,462,330,462 0 51789
-en 15612,9840,0,528,336,528 0 51790
-dd 15612,20160,4095,0,-1611 3 51773
-.i 6831,16755,0,975,921,880 0 51957
-aq 7806,19755,0,672,-2604,672 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 16101,25005,405,2718,-36,880 2 20166
-'c 15126,22080,405,2466,114,880 2 20198
-lq 11709,19755,0,1344,-2424,880 2 51838
-rq 11709,19755,0,756,-1836,756 2 51746
-Bq 11709,2970,3315,0,1494 0 51772
-vz 13662,22080,0,1953,1530,880 2 51834
-fi 17076,21105,0,2268,-153,880 2 51881
-fl 17076,20820,0,1668,57,880 2 51882
-ff 20490,20820,0,3111,42,880 2 51883
-Fi 26346,21105,0,2331,-201,880 2 51884
-Fl 26346,20820,0,1692,48,880 2 51885
-ij 13173,21105,3930,1986,918,880 3 51958
-bq 7806,2970,3315,0,1089 0 51756
-%0 34152,20460,405,684,-159,684 2 51901
-char175 15612,21210,0,0,-5265 2 3759
-a- "
-ab 15612,22230,0,0,-5238 2 51926
-a. 15612,21795,0,0,-7032 2 51927
-oe 28299,17160,405,768,270,768 0 51823
-OE 25857,20160,405,2463,-27,880 2 51791
-fo 8781,14145,0,1689,279,880 0 51886
-fc 8781,14145,0,324,1644,324 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 13173,19755,0,21,1839,21 2 51944
-/l 7806,20820,0,3030,2109,880 2 51960
-a" 15612,22080,0,4503,-3531,880 2 51933
-ho 15612,765,3990,0,-6564 1 51934
-vZ 16101,25005,0,2199,1347,880 2 51802
-IJ 18540,19755,405,1518,909,880 2 51942
diff --git a/contrib/groff/font/devlj4/AOR b/contrib/groff/font/devlj4/AOR
deleted file mode 100644
index b9a04852cd68..000000000000
--- a/contrib/groff/font/devlj4/AOR
+++ /dev/null
@@ -1,735 +0,0 @@
-name AOR
-spacewidth 7806
-pcltypeface 4168
-pclproportional 1
-pclweight 0
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2439
-P . -4878
-P , -4878
-V A -2439
-A V -1950
-T o -2439
-T r -975
-T c -2439
-T e -2439
-T d -2925
-T s -1950
-T y -975
-T a -1950
-T w -975
-T u -975
-T J -2439
-L T -2439
-L Y -3414
-Y o -2925
-Y e -2925
-Y a -1950
-Y J -2925
-A W -1950
-W A -1950
-T A -2439
-V o -975
-V e -975
-V a -975
-Y A -3414
-F A -1950
-F . -3903
-F , -3903
-A T -2439
-A Y -3414
-v . -2925
-v , -2925
-y . -2925
-y , -2925
-T . -2925
-T , -2925
-L W -1950
-P A -1461
-V J -2439
-V . -2925
-V , -2925
-Y . -3903
-Y , -3903
-W o -975
-W e -975
-W a -975
-W . -2439
-W , -2439
-r . -3903
-r , -3903
-w . -2439
-w , -2439
-Y u -975
-A v -1461
-A y -1950
-A w -1461
-o . -2439
-o , -2439
-p . -2439
-p , -2439
-e . -1950
-e , -1950
-b . -2439
-b , -2439
-O T -975
-O Y -975
-O . -2439
-O , -2439
-L y -2439
-L O -1461
-L G -1461
-L C -1461
-L Q -1461
-P J -2925
-D T -975
-D Y -975
-D . -1950
-D , -1950
-Y O -975
-Y G -975
-Y C -975
-Y Q -975
-F o -486
-F e -486
-F a -486
-c . -1461
-c , -1461
-O A -1461
-L U -1461
-R T -486
-R Y -486
-G T -486
-C A -975
-C . -1461
-C , -1461
-D A -1461
-B T -975
-B Y -975
-B . -1461
-B , -1461
-F J -2925
-A O -975
-A G -975
-A C -975
-A U -975
-A Q -975
-W J -1950
-J A -1461
-J . -1950
-J , -1950
-U A -1461
-U . -1950
-U , -1950
-f . -2925
-f , -2925
-T O -975
-T G -975
-T C -975
-T Q -975
-L o -1461
-L e -1461
-L q -1461
-G Y -486
-G . -1461
-G , -1461
-P T -975
-P Y -975
-C T -486
-C Y -486
-B A -975
-S . -1461
-S , -1461
-X o -1950
-X e -1950
-A o -975
-A e -975
-K o -975
-K e -975
-K y -975
-K w -975
-K O -975
-K G -975
-K C -975
-K Q -975
-o v -486
-o y -975
-o x -486
-o w -486
-h v -486
-h y -975
-n v -486
-n y -975
-m v -486
-m y -975
-r g -486
-g . -486
-g , -486
-p v -486
-p y -975
-p x -486
-c v -486
-c y -975
-c w -486
-v o -486
-v g -486
-v c -486
-v d -975
-v a -486
-v q -486
-e v -486
-e y -975
-b v -1461
-b y -1950
-b w -1461
-s . -1461
-s , -1461
-y o -486
-y g -486
-y c -486
-y d -975
-y a -486
-y q -486
-x o -486
-x g -486
-x c -486
-x e -486
-x d -975
-x a -486
-x q -486
-a v -486
-a y -975
-a w -486
-w o -486
-w g -486
-w c -486
-w d -975
-w a -486
-w q -486
-T S -975
-L a -486
-L S -975
-R o -1950
-G A -975
-C J -975
-S T -975
-S Y -975
-S A -975
-Y S -975
-X a -486
-A t -486
-A g -975
-A c -975
-A d -1461
-A a -486
-A u -975
-A q -975
-A S -975
-K c -975
-K u -975
-K S -975
-t . -486
-t , -486
-h w -486
-h . -486
-h , -486
-n w -486
-n . -486
-n , -486
-m w -486
-m . -486
-m , -486
-l . -486
-l , -486
-r o -486
-r c -486
-r e -486
-r d -975
-r a -486
-r q -486
-i . -486
-i , -486
-p w -486
-c x -486
-v e -486
-v s -486
-e x -486
-e w -486
-z . -486
-z , -486
-d . -486
-d , -486
-b f -975
-y e -486
-y s -486
-f d -486
-x . -486
-x , -486
-a . -486
-a , -486
-w e -486
-w s -486
-j . -486
-j , -486
-u . -486
-k o -975
-k g -975
-k c -975
-k e -975
-k d -1461
-k a -486
-k q -975
-k . -486
-k , -486
-O J -1950
-H . -486
-H , -486
-N . -486
-N , -486
-M . -486
-M , -486
-L . -486
-L , -486
-R e -1950
-R a -486
-R . -486
-R , -486
-I . -486
-I , -486
-E d -486
-E . -486
-E , -486
-Z o -1950
-Z e -1950
-Z d -1950
-Z a -486
-Z . -486
-Z , -486
-D J -1461
-B J -975
-S J -975
-X . -486
-X , -486
-A . -486
-A , -486
-J J -1461
-U J -1461
-K a -486
-K . -486
-K , -486
-t d -486
-r s -486
-g d -486
-z d -486
-b t -975
-b g -975
-b z -975
-b j -975
-G J -975
-A f -486
-U d -486
-L cq -3903
-L ' -3903
-T char173 -975
-T hy -975
-T - -975
-T en -975
-T em -975
-A cq -2439
-A ' -2439
-char173 T -975
-hy T -975
-- T -975
-en T -975
-em T -975
-Y char173 -975
-Y hy -975
-Y - -975
-Y en -975
-Y em -975
-p cq -1950
-p ' -1950
-c cq -975
-c ' -975
-e cq -1950
-e ' -1950
-b cq -1950
-b ' -1950
-a cq -1461
-a ' -1461
-h cq -1950
-h ' -1950
-n cq -1461
-n ' -1461
-m cq -1461
-m ' -1461
-cq d -1950
-' d -1950
-L char173 -1461
-L hy -1461
-L - -1461
-L en -1461
-L em -1461
-A char173 -975
-A hy -975
-A - -975
-A en -975
-A em -975
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-cq s -975
-' s -975
-char173 A -1461
-hy A -1461
-- A -1461
-en A -1461
-b f -975
-charset
-! 8295,20160,405 2 3617
-dq 11220,19755 2 3618
-" "
-sh 15612,20460,4296 3 3619
-# "
-Do 15612,21960,2265 2 3620
-$ "
-% 26835,20460,405 2 3621
-& 19029,20160,405 2 3622
-cq 6831,19755 2 51751
-' "
-( 7806,19755,405 2 3624
-) 7806,19755,405 2 3625
-* 15612,20160 2 3626
-+ 26835,15255,585 0 3627
-, 7806,2910,4320 1 3628
-char173 7806,10200 0 3629
-hy "
-- "
-. 7806,2925,405 0 3630
-sl 8295,20820,405 2 3631
-/ "
-0 15612,20460,405 2 3632
-1 15612,20055 2 3633
-2 15612,20460 2 3634
-3 15612,20055,405 2 3635
-4 15612,20055 2 3636
-5 15612,20055,405 2 3637
-6 15612,20460,405 2 3638
-7 15612,20055 2 3639
-8 15612,20460,405 2 3640
-9 15612,20460,405 2 3641
-: 7806,13647,405 0 3642
-; 7806,13647,4320 1 3643
-< 26346,16068 0 3644
-= 26835,10800 0 3645
-> 26346,16068 0 3646
-? 15126,20160,405 2 3647
-at 26835,21030,2745 2 3648
-@ "
-A 18540,19755 2 3649
-B 17565,19755 2 3650
-C 16101,20160,405 2 3651
-D 18540,19755 2 3652
-E 15612,19755 2 3653
-F 15126,19755 2 3654
-G 18051,20160,405 2 3655
-H 19515,19755 2 3656
-I 7317,19755 2 3657
-J 12198,19755,405 2 3658
-K 16587,19755 2 3659
-L 13662,19755 2 3660
-M 23418,19755 2 3661
-N 19515,19755 2 3662
-O 19029,20160,405 2 3663
-P 16587,19755 2 3664
-Q 19029,20160,636 2 3665
-R 16587,19755 2 3666
-S 14148,20160,405 2 3667
-T 15126,19755 2 3668
-U 19029,19755,405 2 3669
-V 16587,19755 2 3670
-W 25857,19755 2 3671
-X 16587,19755 2 3672
-Y 16587,19755 2 3673
-Z 16101,19755 2 3674
-lB 7806,19755,405 2 3675
-[ "
-rs 8295,20820,405 2 3676
-\ "
-rB 7806,19755,405 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 6831,19755 2 51808
-` "
-a 15126,17160,405 0 3681
-b 18540,20820,405 2 3682
-c 14637,17160,405 0 3683
-d 18540,20820,405 2 3684
-e 16587,17160,405 0 3685
-f 11709,20820 2 3686
-g 17565,17160,3930 1 3687
-h 18051,20820 2 3688
-i 7806,21105 2 3689
-j 7806,21105,3930 3 3690
-k 15126,20820 2 3691
-l 7317,20820 2 3692
-m 27321,17160 0 3693
-n 18051,17160 0 3694
-o 18051,17160,405 0 3695
-p 18540,17160,3930 1 3696
-q 18540,17160,3930 1 3697
-r 12198,17160 0 3698
-s 12198,17160,405 0 3699
-t 12198,20925,405 2 3700
-u 17565,16755,405 0 3701
-v 15612,16755 0 3702
-w 23907,16755 0 3703
-x 14637,16755 0 3704
-y 15612,16755,3930 1 3705
-z 13662,16755 0 3706
-lC 11709,20130,6075 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 11709,20130,6075 3 3709
-} "
-ti 26346,8952 0 51876
-char192 18540,25005 2 3776
-`A "
-char194 18540,25005 2 3778
-^A "
-char200 15612,25005 2 3784
-`E "
-char202 15612,25005 2 3786
-^E "
-char203 15612,24690 2 3787
-:E "
-char206 7317,25005 2 3790
-^I "
-char207 7317,24690 2 3791
-:I "
-char180 15612,22080 2 3764
-aa "
-ga 15612,22080 2 3680
-a^ 15612,22080 2 3678
-^ "
-char168 15612,21840 2 3752
-ad "
-a~ 15612,21873 2 3710
-~ "
-char217 19029,25005,405 2 3801
-`U "
-char219 19029,25005,405 2 3803
-^U "
-char221 16587,25005 2 3805
-'Y "
-char253 15612,22080,3930 3 3837
-'y "
-char176 15612,20460 2 3760
-de "
-char199 16101,20160,4896 3 3783
-,C "
-char231 14637,17160,4896 1 3815
-,c "
-char209 19515,24915 2 3793
-~N "
-char241 18051,21873 2 3825
-~n "
-char161 8295,17124,3441 0 3745
-r! "
-char191 15126,17124,3441 0 3775
-r? "
-char164 15612,15684 0 3748
-Cs "
-char163 15612,20460 2 3747
-Po "
-char165 15612,20055 2 3749
-Ye "
-char167 15612,20160,4095 3 3751
-sc "
-Fn 15612,20820 2 51871
-char162 15612,20526,537 2 3746
-ct "
-char226 15126,22080,405 2 3810
-^a "
-char234 16587,22080,405 2 3818
-^e "
-char244 18051,22080,405 2 3828
-^o "
-char251 17565,22080,405 2 3835
-^u "
-char225 15126,22080,405 2 3809
-'a "
-char233 16587,22080,405 2 3817
-'e "
-char243 18051,22080,405 2 3827
-'o "
-char250 17565,22080,405 2 3834
-'u "
-char224 15126,22080,405 2 3808
-`a "
-char232 16587,22080,405 2 3816
-`e "
-char242 18051,22080,405 2 3826
-`o "
-char249 17565,22080,405 2 3833
-`u "
-char228 15126,21840,405 2 3812
-:a "
-char235 16587,21840,405 2 3819
-:e "
-char246 18051,21840,405 2 3830
-:o "
-char252 17565,21840,405 2 3836
-:u "
-char197 18540,26850 2 3781
-oA "
-char238 7806,22080 2 3822
-^i "
-char216 19029,20187,501 2 3800
-/O "
-char198 30738,19755 2 3782
-AE "
-char229 15126,24390,405 2 3813
-oa "
-char237 7806,22080 2 3821
-'i "
-char248 18051,17163,432 0 3832
-/o "
-char230 26346,17160,405 0 3814
-ae "
-char196 18540,24690 2 3780
-:A "
-char236 7806,22080 2 3820
-`i "
-char214 19029,24690,405 2 3798
-:O "
-char220 19029,24690,405 2 3804
-:U "
-char201 15612,25005 2 3785
-'E "
-char239 7806,21840 2 3823
-:i "
-char223 16587,20820,405 2 3807
-ss "
-char212 19029,25005,405 2 3796
-^O "
-char193 18540,25005 2 3777
-'A "
-char195 18540,24915 2 3779
-~A "
-char227 15126,21873,405 2 3811
-~a "
-char208 18540,19755 2 3792
--D "
-char240 18051,22695,405 2 3824
-Sd "
-char205 7317,25005 2 3789
-'I "
-char204 7317,25005 2 3788
-`I "
-char211 19029,25005,405 2 3795
-'O "
-char210 19029,25005,405 2 3794
-`O "
-char213 19029,24915,405 2 3797
-~O "
-char245 18051,21873,405 2 3829
-~o "
-vS 14148,25005,405 2 51795
-vs 12198,22080,405 2 51827
-char218 19029,25005,405 2 3802
-'U "
-:Y 16587,24690 2 51801
-char255 15612,21840,3930 3 3839
-:y "
-char222 16587,19755 2 3806
-TP "
-char254 18540,20820,3930 3 3838
-Tp "
-char181 14637,12630,4350 1 3765
-char182 15612,19635,4200 3 3766
-ps "
-char190 26835,20610,555 2 3774
-34 "
-\- 26835,8295 0 51757
-char188 26835,20610,555 2 3772
-14 "
-char189 26835,20610,555 2 3773
-12 "
-char170 15612,20460 2 3754
-Of "
-char186 15612,20460 2 3770
-Om "
-char171 14148,13950 0 3755
-Fo "
-char187 14148,13950 0 3771
-Fc "
-char177 26835,15255,3900 1 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19635 2 3753
-co "
-char172 26835,11331 0 3756
-no "
-char174 13173,19635 2 3758
-rg "
-char178 10245,20385 2 3762
-S2 "
-char179 10245,20055 2 3763
-S3 "
-char184 15612,324,4896 1 3768
-ac "
-char185 10245,20055 2 3769
-S1 "
-char215 26835,15189,579 0 3799
-char247 26835,12780 0 3831
-char183 7806,11781 0 3767
-pc "
-fm 7806,20055 2 51873
-sd 15612,20055 2 51874
-dg 15612,20160,4095 3 51755
-tm 16101,17850 0 51796
-ah 15612,22080 2 51935
-ao 15612,24390 2 51930
-f/ 4392,20610,555 2 51759
-em 26835,9840 0 51789
-en 15612,9840 0 51790
-dd 15612,20160,4095 3 51773
-.i 7806,16755 0 51957
-aq 6831,19755 2 3623
-bu 13173,14226 0 51889
-'C 16101,25005,405 2 20166
-'c 14637,22080,405 2 20198
-lq 10245,19755 2 51838
-rq 10245,19755 2 51746
-Bq 10245,2868,3417 0 51772
-vz 13662,22080 2 51834
-fi 18051,21105 2 51881
-fl 18051,20820 2 51882
-ff 20979,20820 2 51883
-Fi 27321,21105 2 51884
-Fl 27321,20820 2 51885
-ij 15126,21105,3930 3 51958
-bq 6831,2868,3417 0 51756
-%0 34152,20460,405 2 51901
-char175 15612,21306 2 3759
-a- "
-ab 15612,22155 2 51926
-a. 15612,21840 2 51927
-oe 29274,17160,405 0 51823
-OE 26346,20160,405 2 51791
-fo 9270,13950 0 51886
-fc 9270,13950 0 51887
-sq 19029,15624 0 51899
-/L 13662,19755 2 51944
-/l 7317,20820 2 51960
-a" 15612,22080 2 51933
-ho 15612,747,4143 1 51934
-vZ 16101,25005 2 51802
-IJ 19029,19755,405 2 51942
diff --git a/contrib/groff/font/devlj4/CB b/contrib/groff/font/devlj4/CB
deleted file mode 100644
index 0da67ed6f017..000000000000
--- a/contrib/groff/font/devlj4/CB
+++ /dev/null
@@ -1,350 +0,0 @@
-name CB
-spacewidth 15873
-pcltypeface 4099
-pclproportional 0
-pclweight 3
-pclstyle 0
-charset
-! 15873,15060,330 0 3617
-dq 15873,15060 0 3618
-" "
-sh 15873,17091,1389 2 3619
-# "
-Do 15873,17010,3306 2 3620
-$ "
-% 15873,16275,900 2 3621
-& 15873,14244,330 0 3622
-cq 15873,15060 0 51751
-' "
-( 15873,16935,2295 2 3624
-) 15873,16935,2295 2 3625
-* 15873,15060 0 3626
-+ 15873,11535 0 3627
-, 15873,4305,2655 0 3628
-char173 15873,7440 0 3629
-hy "
-- "
-. 15873,4035,330 0 3630
-sl 15873,18300,3525 2 3631
-/ "
-0 15873,16155,330 2 3632
-1 15873,16155 2 3633
-2 15873,16155 2 3634
-3 15873,16155,330 2 3635
-4 15873,16155 2 3636
-5 15873,15825,330 2 3637
-6 15873,16155,330 2 3638
-7 15873,15825 2 3639
-8 15873,16155,330 2 3640
-9 15873,16155,330 2 3641
-: 15873,10635,330 0 3642
-; 15873,10635,2655 0 3643
-< 15873,11667,243 0 3644
-= 15873,8886 0 3645
-> 15873,11667,243 0 3646
-? 15873,15390,330 2 3647
-at 15873,15276,489 2 3648
-@ "
-A 15873,15060 0 3649
-B 15873,15060 0 3650
-C 15873,15390,330 2 3651
-D 15873,15060 0 3652
-E 15873,15060 0 3653
-F 15873,15060 0 3654
-G 15873,15390,330 2 3655
-H 15873,15060 0 3656
-I 15873,15060 0 3657
-J 15873,15060,330 0 3658
-K 15873,15060 0 3659
-L 15873,15060 0 3660
-M 15873,15060 0 3661
-N 15873,15060,330 0 3662
-O 15873,15390,330 2 3663
-P 15873,15060 0 3664
-Q 15873,15390,3801 2 3665
-R 15873,15060 0 3666
-S 15873,15390,330 2 3667
-T 15873,15060 0 3668
-U 15873,15060,330 0 3669
-V 15873,15060 0 3670
-W 15873,15060 0 3671
-X 15873,15060 0 3672
-Y 15873,15060 0 3673
-Z 15873,15060 0 3674
-lB 15873,16935,2295 2 3675
-[ "
-rs 15873,18300,3525 2 3676
-\ "
-rB 15873,16935,2295 2 3677
-] "
-ha 15873,19758 2 51875
-_ 15873,191367,6588 3 3679
-oq 15873,15060 0 51808
-` "
-a 15873,11775,330 0 3681
-b 15873,16350,330 2 3682
-c 15873,11775,330 0 3683
-d 15873,16350,330 2 3684
-e 15873,11775,330 0 3685
-f 15873,16350 2 3686
-g 15873,11775,4845 1 3687
-h 15873,16350 2 3688
-i 15873,16920 2 3689
-j 15873,16920,4845 3 3690
-k 15873,16350 2 3691
-l 15873,16350 2 3692
-m 15873,11775 0 3693
-n 15873,11775 0 3694
-o 15873,11775,330 0 3695
-p 15873,11775,4845 1 3696
-q 15873,11775,4845 1 3697
-r 15873,11775 0 3698
-s 15873,11775,330 0 3699
-t 15873,14940,330 0 3700
-u 15873,11445,330 0 3701
-v 15873,11445 0 3702
-w 15873,11445 0 3703
-x 15873,11445 0 3704
-y 15873,11445,4845 1 3705
-z 15873,11445 0 3706
-lC 15873,20130,6075 3 3707
-{ "
-ba 15873,19758,6588 3 3708
-| "
-rC 15873,20130,6075 3 3709
-} "
-ti 15873,8160 0 51876
-char192 15873,21375 2 3776
-`A "
-char194 15873,21375 2 3778
-^A "
-char200 15873,21375 2 3784
-`E "
-char202 15873,21375 2 3786
-^E "
-char203 15873,20790 2 3787
-:E "
-char206 15873,21375 2 3790
-^I "
-char207 15873,20790 2 3791
-:I "
-char180 15873,17880 2 3764
-aa "
-ga 15873,17880 2 3680
-a^ 15873,17880 2 3678
-^ "
-char168 15873,16890 2 3752
-ad "
-a~ 15873,16959 2 3710
-~ "
-char217 15873,21375,330 2 3801
-`U "
-char219 15873,21375,330 2 3803
-^U "
-char221 15873,21375 2 3805
-'Y "
-char253 15873,17880,4845 3 3837
-'y "
-char176 15873,16155 2 3760
-de "
-char199 15873,15390,5457 3 3783
-,C "
-char231 15873,11775,5469 1 3815
-,c "
-char209 15873,20490,330 2 3793
-~N "
-char241 15873,16959 2 3825
-~n "
-char161 15873,11784,3606 0 3745
-r! "
-char191 15873,11751,3969 0 3775
-r? "
-char164 15873,15834 2 3748
-Cs "
-char163 15873,16155,741 2 3747
-Po "
-char165 15873,15825 2 3749
-Ye "
-char167 15873,15390,1692 2 3751
-sc "
-Fn 15873,16350,3114 2 51871
-char162 15873,15966,1419 2 3746
-ct "
-char226 15873,17880,330 2 3810
-^a "
-char234 15873,17880,330 2 3818
-^e "
-char244 15873,17880,330 2 3828
-^o "
-char251 15873,17880,330 2 3835
-^u "
-char225 15873,17880,330 2 3809
-'a "
-char233 15873,17880,330 2 3817
-'e "
-char243 15873,17880,330 2 3827
-'o "
-char250 15873,17880,330 2 3834
-'u "
-char224 15873,17880,330 2 3808
-`a "
-char232 15873,17880,330 2 3816
-`e "
-char242 15873,17880,330 2 3826
-`o "
-char249 15873,17880,330 2 3833
-`u "
-char228 15873,16890,330 2 3812
-:a "
-char235 15873,16890,330 2 3819
-:e "
-char246 15873,16890,330 2 3830
-:o "
-char252 15873,16890,330 2 3836
-:u "
-char197 15873,21780 2 3781
-oA "
-char238 15873,17880 2 3822
-^i "
-char216 15873,15432,492 2 3800
-/O "
-char198 15873,15060 0 3782
-AE "
-char229 15873,18900,330 2 3813
-oa "
-char237 15873,17880 2 3821
-'i "
-char248 15873,11913,600 0 3832
-/o "
-char230 15873,11775,330 0 3814
-ae "
-char196 15873,20790 2 3780
-:A "
-char236 15873,17880 2 3820
-`i "
-char214 15873,20790,330 2 3798
-:O "
-char220 15873,20790,330 2 3804
-:U "
-char201 15873,21375 2 3785
-'E "
-char239 15873,16890 2 3823
-:i "
-char223 15873,16350,330 2 3807
-ss "
-char212 15873,21375,330 2 3796
-^O "
-char193 15873,21375 2 3777
-'A "
-char195 15873,20490 2 3779
-~A "
-char227 15873,16959,330 2 3811
-~a "
-char208 15873,15060 0 3792
--D "
-char240 15873,18249,330 2 3824
-Sd "
-char205 15873,21375 2 3789
-'I "
-char204 15873,21375 2 3788
-`I "
-char211 15873,21375,330 2 3795
-'O "
-char210 15873,21375,330 2 3794
-`O "
-char213 15873,20490,330 2 3797
-~O "
-char245 15873,16959,330 2 3829
-~o "
-vS 15873,21375,330 2 51795
-vs 15873,17880,330 2 51827
-char218 15873,21375,330 2 3802
-'U "
-:Y 15873,20790 2 51801
-char255 15873,16890,4845 3 3839
-:y "
-char222 15873,15060 0 3806
-TP "
-char254 15873,16350,4845 3 3838
-Tp "
-char181 15873,11445,5580 1 3765
-char182 15873,19635,4080 2 3766
-ps "
-char190 15873,16545,2415 2 3774
-34 "
-\- 15873,7020 0 51757
-char188 15873,16545,2415 2 3772
-14 "
-char189 15873,16545,2415 2 3773
-12 "
-char170 15873,16155 2 3754
-Of "
-char186 15873,16155 2 3770
-Om "
-char171 15873,11595 0 3755
-Fo "
-char187 15873,11595 0 3771
-Fc "
-char177 15873,11535,3360 0 3761
-char166 15873,19083,5916 3 3750
-bb "
-char169 15873,19635 2 3753
-co "
-char172 15873,9420 0 3756
-no "
-char174 15873,19635 2 3758
-rg "
-char178 15873,16035 2 3762
-S2 "
-char179 15873,16035 2 3763
-S3 "
-char184 15873,0,5469 1 3768
-ac "
-char185 15873,16035 2 3769
-S1 "
-char215 15873,11340 0 3799
-char247 15873,11190 0 3831
-char183 15873,10176 0 3767
-pc "
-fm 15873,15825 2 51873
-sd 15873,15825 2 51874
-dg 15873,15060,1185 0 51755
-tm 15873,17850 2 51796
-ah 15873,17880 2 51935
-ao 15873,18900 2 51930
-f/ 15873,16695,2265 2 51759
-em 15873,7440 0 51789
-en 15873,7440 0 51790
-dd 15873,15060,1185 0 51773
-.i 15873,11445 0 51957
-aq 15873,15060 0 3623
-bu 15873,12714 0 51889
-'C 15873,21375,330 2 20166
-'c 15873,17880,330 2 20198
-lq 15873,15060 0 51838
-rq 15873,15060 0 51746
-Bq 15873,4602,2358 0 51772
-vz 15873,17880 2 51834
-fi 15873,16920 2 51881
-fl 15873,16350 2 51882
-ff 15873,16350 2 51883
-Fi 15873,16350 2 51884
-Fl 15873,16350 2 51885
-ij 15873,16920,4845 3 51958
-bq 15873,4605,2355 0 51756
-%0 15873,16275,900 2 51901
-char175 15873,15567 2 3759
-a- "
-ab 15873,17310 2 51926
-a. 15873,16890 2 51927
-oe 15873,11775,330 0 51823
-OE 15873,15060 0 51791
-fo 15873,11085 0 51886
-fc 15873,11085 0 51887
-sq 15873,14106 0 51899
-/L 15873,15060 0 51944
-/l 15873,16350 2 51960
-a" 15873,18720 2 51933
-ho 15873,573,4680 1 51934
-vZ 15873,21375 2 51802
-IJ 15873,15060,3837 0 51942
diff --git a/contrib/groff/font/devlj4/CBI b/contrib/groff/font/devlj4/CBI
deleted file mode 100644
index 10f468dda5d4..000000000000
--- a/contrib/groff/font/devlj4/CBI
+++ /dev/null
@@ -1,351 +0,0 @@
-name CBI
-spacewidth 15873
-slant 11.300000
-pcltypeface 4099
-pclproportional 0
-pclweight 3
-pclstyle 1
-charset
-! 15873,15060,330,0,-3018 0 3617
-dq 15873,15060,0,0,-2661 0 3618
-" "
-sh 15873,17091,1389,279,363,279 2 3619
-# "
-Do 15873,17007,3306,0,279 2 3620
-$ "
-% 15873,16275,900,0,-396 2 3621
-& 15873,14238,330,0,426 0 3622
-cq 15873,15060,0,0,-2745 0 51751
-' "
-( 15873,16935,2295,0,-3093 2 3624
-) 15873,16935,2295,0,-1824 2 3625
-* 15873,15060,0,0,-1497 0 3626
-+ 15873,11535,0,0,-891 0 3627
-, 15873,4305,2655,0,-1506 0 3628
-char173 15873,8805,0,0,-2319 0 3629
-hy "
-- "
-. 15873,3675,330,0,-2805 0 3630
-sl 15873,18300,3525,1224,1512,614 2 3631
-/ "
-0 15873,16155,330,0,-927 2 3632
-1 15873,16155,0,0,324 2 3633
-2 15873,16155,0,0,1044 2 3634
-3 15873,16155,330,0,891 2 3635
-4 15873,16155,0,0,345 2 3636
-5 15873,15825,330,0,621 2 3637
-6 15873,16155,330,342,-762,342 2 3638
-7 15873,15825,0,0,-1227 2 3639
-8 15873,16155,330,0,-465 2 3640
-9 15873,16155,330,0,297 2 3641
-: 15873,10572,330,0,-2802 0 3642
-; 15873,10572,2655,0,-831 0 3643
-< 15873,11667,243,0,-600 0 3644
-= 15873,8886,0,0,-951 0 3645
-> 15873,11667,243,0,-1524 0 3646
-? 15873,15390,330,0,-2031 2 3647
-at 15873,15273,489,1020,1203,614 2 3648
-@ "
-A 15873,15060,0,69,2868,69 0 3649
-B 15873,15060,0,0,1992 0 3650
-C 15873,15390,330,903,228,614 2 3651
-D 15873,15060,0,369,2277,369 0 3652
-E 15873,15060,0,1254,1719,614 0 3653
-F 15873,15060,0,1527,1293,614 0 3654
-G 15873,15390,330,1224,585,614 2 3655
-H 15873,15060,0,1878,2172,614 0 3656
-I 15873,15060,0,321,615,321 0 3657
-J 15873,15060,330,2331,1152,614 0 3658
-K 15873,15060,0,1890,1569,614 0 3659
-L 15873,15060,0,27,1602,27 0 3660
-M 15873,15060,0,2508,3099,614 0 3661
-N 15873,15060,330,2625,2439,614 0 3662
-O 15873,15390,330,447,633,447 2 3663
-P 15873,15060,0,816,774,614 0 3664
-Q 15873,15390,3408,453,678,453 2 3665
-R 15873,15060,0,0,1977 0 3666
-S 15873,15390,330,0,1386 2 3667
-T 15873,15060,0,1578,210,614 0 3668
-U 15873,15060,330,2124,75,614 0 3669
-V 15873,15060,0,2718,504,614 0 3670
-W 15873,15060,0,2757,552,614 0 3671
-X 15873,15060,0,1509,2286,614 0 3672
-Y 15873,15060,0,2043,-168,614 0 3673
-Z 15873,15060,0,159,1026,159 0 3674
-lB 15873,16935,2295,0,-1995 2 3675
-[ "
-rs 15873,18300,3525,0,-2523 2 3676
-\ "
-rB 15873,16935,2295,0,-1632 2 3677
-] "
-ha 15873,19758,0,0,-1314 2 51875
-_ 15873,191367,6588,1317,1317,614 3 3679
-oq 15873,15060,0,0,-3345 0 51808
-` "
-a 15873,11775,330,0,837 0 3681
-b 15873,16350,330,390,1974,390 2 3682
-c 15873,11775,330,0,282 0 3683
-d 15873,16350,330,183,1038,183 2 3684
-e 15873,11775,330,0,228 0 3685
-f 15873,16350,0,1308,39,614 2 3686
-g 15873,11775,4845,1260,1542,614 1 3687
-h 15873,16350,0,0,2550 2 3688
-i 15873,16920,0,0,606 2 3689
-j 15873,16920,4845,0,1428 3 3690
-k 15873,16350,0,0,2061 2 3691
-l 15873,16350,0,0,570 2 3692
-m 15873,11775,0,417,3222,417 0 3693
-n 15873,11775,0,0,2292 0 3694
-o 15873,11775,330,0,858 0 3695
-p 15873,11775,4845,330,3072,330 1 3696
-q 15873,11775,4845,1644,810,614 1 3697
-r 15873,11775,0,735,1257,614 0 3698
-s 15873,11775,330,0,798 0 3699
-t 15873,14985,330,0,-1245 0 3700
-u 15873,11445,330,0,432 0 3701
-v 15873,11445,0,1554,936,614 0 3702
-w 15873,11445,0,1896,1278,614 0 3703
-x 15873,11445,0,894,2469,614 0 3704
-y 15873,11445,4845,1887,2409,614 1 3705
-z 15873,11445,0,0,498 0 3706
-lC 15873,20130,6075,1548,-2004,614 3 3707
-{ "
-ba 15873,19758,6588,0,-5946 3 3708
-| "
-rC 15873,20130,6075,0,996 3 3709
-} "
-ti 15873,8160,0,0,-792 0 51876
-char192 15873,21495,0,69,2868,69 2 3776
-`A "
-char194 15873,21495,0,69,2868,69 2 3778
-^A "
-char200 15873,21495,0,1254,1719,614 2 3784
-`E "
-char202 15873,21495,0,1254,1719,614 2 3786
-^E "
-char203 15873,20520,0,1254,1719,614 2 3787
-:E "
-char206 15873,21495,0,609,615,609 2 3790
-^I "
-char207 15873,20520,0,321,615,321 2 3791
-:I "
-char180 15873,18000,0,0,-3249 2 3764
-aa "
-ga 15873,18000,0,0,-2835 2 3680
-a^ 15873,18000,0,9,-2343,9 2 3678
-^ "
-char168 15873,16890,0,0,-4020 2 3752
-ad "
-a~ 15873,16959,0,594,-2031,594 2 3710
-~ "
-char217 15873,21495,330,2124,75,614 2 3801
-`U "
-char219 15873,21495,330,2124,75,614 2 3803
-^U "
-char221 15873,21495,0,2043,-168,614 2 3805
-'Y "
-char253 15873,18000,4845,1887,2409,614 3 3837
-'y "
-char176 15873,16155,0,0,-3120 2 3760
-de "
-char199 15873,15390,5721,903,228,614 3 3783
-,C "
-char231 15873,11775,5562,0,282 1 3815
-,c "
-char209 15873,20487,330,2625,2439,614 2 3793
-~N "
-char241 15873,16959,0,594,2292,594 2 3825
-~n "
-char161 15873,11904,3486,0,-3411 0 3745
-r! "
-char191 15873,11868,3852,0,-747 0 3775
-r? "
-char164 15873,15834,0,345,348,345 2 3748
-Cs "
-char163 15873,16155,603,192,-108,192 2 3747
-Po "
-char165 15873,15825,0,2160,-342,614 2 3749
-Ye "
-char167 15873,15390,1692,0,-1332 2 3751
-sc "
-Fn 15873,16350,3135,12,1572,12 2 51871
-char162 15873,15978,1419,0,-1068 2 3746
-ct "
-char226 15873,18000,330,9,837,9 2 3810
-^a "
-char234 15873,18000,330,9,228,9 2 3818
-^e "
-char244 15873,18000,330,9,858,9 2 3828
-^o "
-char251 15873,18000,330,9,432,9 2 3835
-^u "
-char225 15873,18000,330,0,837 2 3809
-'a "
-char233 15873,18000,330,0,228 2 3817
-'e "
-char243 15873,18000,330,0,858 2 3827
-'o "
-char250 15873,18000,330,0,432 2 3834
-'u "
-char224 15873,18000,330,0,837 2 3808
-`a "
-char232 15873,18000,330,0,228 2 3816
-`e "
-char242 15873,18000,330,0,858 2 3826
-`o "
-char249 15873,18000,330,0,432 2 3833
-`u "
-char228 15873,16890,330,0,837 2 3812
-:a "
-char235 15873,16890,330,0,228 2 3819
-:e "
-char246 15873,16890,330,0,858 2 3830
-:o "
-char252 15873,16890,330,0,432 2 3836
-:u "
-char197 15873,21780,0,69,2868,69 2 3781
-oA "
-char238 15873,18000,0,9,606,9 2 3822
-^i "
-char216 15873,15501,528,1206,1434,614 2 3800
-/O "
-char198 15873,15060,0,2391,2655,614 0 3782
-AE "
-char229 15873,18381,330,0,837 2 3813
-oa "
-char237 15873,18000,0,0,606 2 3821
-'i "
-char248 15873,11901,591,486,1311,486 0 3832
-/o "
-char230 15873,11775,330,654,2010,614 0 3814
-ae "
-char196 15873,20520,0,69,2868,69 2 3780
-:A "
-char236 15873,18000,0,0,606 2 3820
-`i "
-char214 15873,20520,330,447,633,447 2 3798
-:O "
-char220 15873,20520,330,2124,75,614 2 3804
-:U "
-char201 15873,21495,0,1254,1719,614 2 3785
-'E "
-char239 15873,16890,0,0,606 2 3823
-:i "
-char223 15873,16350,330,0,2220 2 3807
-ss "
-char212 15873,21495,330,609,633,609 2 3796
-^O "
-char193 15873,21495,0,69,2868,69 2 3777
-'A "
-char195 15873,20487,0,174,2868,174 2 3779
-~A "
-char227 15873,16959,330,594,837,594 2 3811
-~a "
-char208 15873,15060,0,366,2280,366 0 3792
--D "
-char240 15873,18222,330,0,171 2 3824
-Sd "
-char205 15873,21495,0,321,615,321 2 3789
-'I "
-char204 15873,21495,0,321,615,321 2 3788
-`I "
-char211 15873,21495,330,591,633,591 2 3795
-'O "
-char210 15873,21495,330,447,633,447 2 3794
-`O "
-char213 15873,20487,330,1986,633,614 2 3797
-~O "
-char245 15873,16959,330,594,858,594 2 3829
-~o "
-vS 15873,21495,330,984,1386,614 2 51795
-vs 15873,18000,330,9,798,9 2 51827
-char218 15873,21495,330,2124,75,614 2 3802
-'U "
-:Y 15873,20520,0,2043,-168,614 2 51801
-char255 15873,16890,4845,1887,2409,614 3 3839
-:y "
-char222 15873,15060,0,222,2166,222 0 3806
-TP "
-char254 15873,16350,4845,330,3075,330 3 3838
-Tp "
-char181 15873,11445,5580,114,-12,114 1 3765
-char182 15873,19635,4080,0,-1308 2 3766
-ps "
-char190 15873,16674,2286,4155,1086,614 2 3774
-34 "
-\- 15873,7020,0,0,-951 0 51757
-char188 15873,16674,2286,4458,1638,614 2 3772
-14 "
-char189 15873,16674,2286,3384,1857,614 2 3773
-12 "
-char170 15873,16155,0,0,-3528 2 3754
-Of "
-char186 15873,16155,0,0,-3588 2 3770
-Om "
-char171 15873,11625,0,354,1047,354 0 3755
-Fo "
-char187 15873,11625,0,0,1605 0 3771
-Fc "
-char177 15873,11535,3360,0,-891 0 3761
-char166 15873,19083,5916,0,-5946 3 3750
-bb "
-char169 15873,19635,0,225,-1134,225 2 3753
-co "
-char172 15873,9420,0,0,-951 0 3756
-no "
-char174 15873,19635,0,225,-1134,225 2 3758
-rg "
-char178 15873,16170,0,0,-3063 2 3762
-S2 "
-char179 15873,16170,0,0,-3162 2 3763
-S3 "
-char184 15873,0,5562,0,-2265 1 3768
-ac "
-char185 15873,16170,0,0,-3066 2 3769
-S1 "
-char215 15873,11646,0,0,-798 0 3799
-char247 15873,11190,0,0,-1110 0 3831
-char183 15873,10128,0,0,-4290 0 3767
-pc "
-fm 15873,15825,0,0,-5124 2 51873
-sd 15873,15825,0,0,-2748 2 51874
-dg 15873,15060,1185,0,-1776 0 51755
-tm 15873,17850,0,108,-417,108 2 51796
-ah 15873,18000,0,9,-2343,9 2 51935
-ao 15873,18381,0,0,-5319 2 51930
-f/ 15873,16695,2265,2712,2529,614 2 51759
-em 15873,8805,0,1707,1929,614 0 51789
-en 15873,8805,0,0,-363 0 51790
-dd 15873,15060,1185,0,-1776 0 51773
-.i 15873,11445,0,0,606 0 51957
-aq 15873,15060,0,0,-4983 0 3623
-bu 15873,12714,0,0,-1848 0 51889
-'C 15873,21495,330,903,228,614 2 20166
-'c 15873,18000,330,0,282 2 20198
-lq 15873,15060,0,387,-741,387 0 51838
-rq 15873,15060,0,0,-144 0 51746
-Bq 15873,4596,2364,0,1314 0 51772
-vz 15873,18000,0,9,498,9 2 51834
-fi 15873,16920,0,438,2340,438 2 51881
-fl 15873,16350,0,336,2337,336 2 51882
-ff 15873,16350,0,4086,2349,614 2 51883
-Fi 15873,16350,0,2229,2946,614 2 51884
-Fl 15873,16350,0,1425,2949,614 2 51885
-ij 15873,16920,4845,738,1320,614 3 51958
-bq 15873,4596,2364,0,-1647 0 51756
-%0 15873,16275,900,3066,3417,614 2 51901
-char175 15873,16032,0,537,-2187,537 2 3759
-a- "
-ab 15873,17340,0,993,-2841,614 2 51926
-a. 15873,16890,0,0,-6186 2 51927
-oe 15873,11775,330,1284,1977,614 0 51823
-OE 15873,15060,0,2781,1740,614 0 51791
-fo 15873,11070,0,0,-2004 0 51886
-fc 15873,11070,0,0,-1389 0 51887
-sq 15873,14106,0,0,-444 0 51899
-/L 15873,15060,0,27,1602,27 0 51944
-/l 15873,16350,0,0,570 2 51960
-a" 15873,18720,0,2916,-4083,614 2 51933
-ho 15873,564,4665,0,-4917 1 51934
-vZ 15873,21495,0,984,1026,614 2 51802
-IJ 15873,15060,3849,1506,1941,614 0 51942
diff --git a/contrib/groff/font/devlj4/CI b/contrib/groff/font/devlj4/CI
deleted file mode 100644
index 8a98a362b434..000000000000
--- a/contrib/groff/font/devlj4/CI
+++ /dev/null
@@ -1,351 +0,0 @@
-name CI
-spacewidth 15873
-slant 11.300000
-pcltypeface 4099
-pclproportional 0
-pclweight 0
-pclstyle 1
-charset
-! 15873,15060,330,0,-5232 0 3617
-dq 15873,15060,0,0,-4632 0 3618
-" "
-sh 15873,16827,2046,1710,-1473,610 2 3619
-# "
-Do 15873,17259,3642,954,-1644,610 2 3620
-$ "
-% 15873,16380,330,1140,-2169,610 2 3621
-& 15873,14169,330,1563,-1911,610 0 3622
-cq 15873,15060,0,0,-5217 0 51751
-' "
-( 15873,17070,2580,1185,-7563,610 2 3624
-) 15873,17070,2580,0,-2013 2 3625
-* 15873,15060,0,174,-3273,174 0 3626
-+ 15873,11385,0,252,-2151,252 0 3627
-, 15873,3195,3420,0,-3000 0 3628
-char173 15873,6570,0,0,-3741 0 3629
-hy "
-- "
-. 15873,3105,330,0,-5040 0 3630
-sl 15873,18465,3765,2349,-699,610 2 3631
-/ "
-0 15873,15390,330,399,-2832,399 0 3632
-1 15873,15060,0,0,-1494 0 3633
-2 15873,15390,0,423,-786,423 0 3634
-3 15873,15390,330,0,-1113 0 3635
-4 15873,15060,0,0,-1548 0 3636
-5 15873,15060,330,882,-1170,610 0 3637
-6 15873,15390,330,1530,-2436,610 0 3638
-7 15873,15060,0,954,-2829,610 0 3639
-8 15873,15390,330,624,-2226,610 0 3640
-9 15873,15390,330,684,-1659,610 0 3641
-: 15873,9975,330,0,-5043 0 3642
-; 15873,9975,3420,0,-3177 0 3643
-< 15873,10647,3,0,-1155 0 3644
-= 15873,8451,0,252,-2151,252 0 3645
-> 15873,10647,3,0,-1959 0 3646
-? 15873,15390,330,483,-4173,483 0 3647
-at 15873,14391,363,2031,-1359,610 0 3648
-@ "
-A 15873,15060,0,1470,1092,610 0 3649
-B 15873,15060,0,1383,171,610 0 3650
-C 15873,15390,330,2835,-1689,610 0 3651
-D 15873,15060,0,2061,537,610 0 3652
-E 15873,15060,0,2724,-153,610 0 3653
-F 15873,15060,0,3120,-471,610 0 3654
-G 15873,15390,330,2259,-957,610 0 3655
-H 15873,15060,0,3483,285,610 0 3656
-I 15873,15060,0,1764,-1188,610 0 3657
-J 15873,15060,330,3729,-369,610 0 3658
-K 15873,15060,0,3453,-210,610 0 3659
-L 15873,15060,0,1512,-135,610 0 3660
-M 15873,15060,0,4218,1107,610 0 3661
-N 15873,15060,0,4182,738,610 0 3662
-O 15873,15390,330,2058,-1137,610 0 3663
-P 15873,15060,0,2262,-786,610 0 3664
-Q 15873,15390,3357,2037,-1074,610 0 3665
-R 15873,15060,0,1248,234,610 0 3666
-S 15873,15390,330,1893,-804,610 0 3667
-T 15873,15060,0,3183,-1968,610 0 3668
-U 15873,15060,330,4095,-2097,610 0 3669
-V 15873,15060,0,4191,-1725,610 0 3670
-W 15873,15060,0,4260,-1671,610 0 3671
-X 15873,15060,0,3177,522,610 0 3672
-Y 15873,15060,0,3672,-2262,610 0 3673
-Z 15873,15060,0,1707,-807,610 0 3674
-lB 15873,17070,2580,1815,-6345,610 2 3675
-[ "
-rs 15873,18465,3765,0,-4674 2 3676
-\ "
-rB 15873,17070,2580,0,-1221 2 3677
-] "
-ha 15873,19758,0,0,-1314 2 51875
-_ 15873,191367,6588,1317,1317,610 3 3679
-oq 15873,15060,0,0,-6267 0 51808
-` "
-a 15873,11775,330,531,-696,531 0 3681
-b 15873,16500,330,1602,723,610 2 3682
-c 15873,11775,330,1542,-1617,610 0 3683
-d 15873,16500,330,2148,-1143,610 2 3684
-e 15873,11775,330,1269,-1611,610 0 3685
-f 15873,16500,0,2262,-1173,610 2 3686
-g 15873,11775,5145,2622,-96,610 1 3687
-h 15873,16500,0,1179,387,610 2 3688
-i 15873,17235,0,0,-1260 2 3689
-j 15873,17235,5145,0,81 3 3690
-k 15873,16500,0,1857,24,610 2 3691
-l 15873,16500,0,0,-1131 2 3692
-m 15873,11775,0,1746,1188,610 0 3693
-n 15873,11775,0,960,585,610 0 3694
-o 15873,11775,330,1443,-1140,610 0 3695
-p 15873,11775,5145,1500,1920,610 1 3696
-q 15873,11775,5145,3354,-984,610 1 3697
-r 15873,11775,0,2475,-597,610 0 3698
-s 15873,11775,330,915,-1356,610 0 3699
-t 15873,14760,330,738,-3216,610 0 3700
-u 15873,11445,330,726,-1404,610 0 3701
-v 15873,11445,0,3342,-1224,610 0 3702
-w 15873,11445,0,3735,-831,610 0 3703
-x 15873,11445,0,2502,648,610 0 3704
-y 15873,11445,5145,3123,903,610 1 3705
-z 15873,11445,0,1101,-1368,610 0 3706
-lC 15873,20130,6075,2940,-5529,610 3 3707
-{ "
-ba 15873,19758,6588,0,-5946 3 3708
-| "
-rC 15873,20130,6075,0,-1059 3 3709
-} "
-ti 15873,7233,0,0,-1089 0 51876
-char192 15873,21255,0,1470,1092,610 2 3776
-`A "
-char194 15873,21255,0,1707,1092,610 2 3778
-^A "
-char200 15873,21255,0,2724,-153,610 2 3784
-`E "
-char202 15873,21255,0,2724,-153,610 2 3786
-^E "
-char203 15873,20670,0,2724,-153,610 2 3787
-:E "
-char206 15873,21255,0,2157,-1188,610 2 3790
-^I "
-char207 15873,20670,0,1764,-1188,610 2 3791
-:I "
-char180 15873,17640,0,1401,-6675,610 2 3764
-aa "
-ga 15873,17640,0,0,-4491 2 3680
-a^ 15873,17640,0,1257,-4491,610 2 3678
-^ "
-char168 15873,16905,0,0,-6489 2 3752
-ad "
-a~ 15873,16818,0,1788,-4146,610 2 3710
-~ "
-char217 15873,21255,330,4095,-2097,610 2 3801
-`U "
-char219 15873,21255,330,4095,-2097,610 2 3803
-^U "
-char221 15873,21255,0,3672,-2262,610 2 3805
-'Y "
-char253 15873,17640,5145,3123,903,610 3 3837
-'y "
-char176 15873,15390,0,0,-4464 0 3760
-de "
-char199 15873,15390,4815,2835,-1689,610 1 3783
-,C "
-char231 15873,11775,4815,1542,-1617,610 1 3815
-,c "
-char209 15873,20580,0,4182,738,610 2 3793
-~N "
-char241 15873,16818,0,1788,585,610 2 3825
-~n "
-char161 15873,11946,3444,0,-5715 0 3745
-r! "
-char191 15873,11946,3774,0,-2577 0 3775
-r? "
-char164 15873,15684,0,1560,-2253,610 2 3748
-Cs "
-char163 15873,15390,474,1797,-2232,610 0 3747
-Po "
-char165 15873,15060,0,3741,-2178,610 0 3749
-Ye "
-char167 15873,15390,1905,0,-3360 0 3751
-sc "
-Fn 15873,15090,4350,1704,-774,610 0 51871
-char162 15873,16083,1536,900,-3015,610 2 3746
-ct "
-char226 15873,17640,330,1257,-696,610 2 3810
-^a "
-char234 15873,17640,330,1269,-1611,610 2 3818
-^e "
-char244 15873,17640,330,1443,-1140,610 2 3828
-^o "
-char251 15873,17640,330,1257,-1404,610 2 3835
-^u "
-char225 15873,17640,330,1401,-696,610 2 3809
-'a "
-char233 15873,17640,330,1401,-1611,610 2 3817
-'e "
-char243 15873,17640,330,1443,-1140,610 2 3827
-'o "
-char250 15873,17640,330,1401,-1404,610 2 3834
-'u "
-char224 15873,17640,330,531,-696,531 2 3808
-`a "
-char232 15873,17640,330,1269,-1611,610 2 3816
-`e "
-char242 15873,17640,330,1443,-1140,610 2 3826
-`o "
-char249 15873,17640,330,726,-1404,610 2 3833
-`u "
-char228 15873,16905,330,531,-696,531 2 3812
-:a "
-char235 15873,16905,330,1269,-1611,610 2 3819
-:e "
-char246 15873,16905,330,1443,-1140,610 2 3830
-:o "
-char252 15873,16905,330,726,-1404,610 2 3836
-:u "
-char197 15873,21690,0,1470,1092,610 2 3781
-oA "
-char238 15873,17640,0,1257,-1260,610 2 3822
-^i "
-char216 15873,15390,453,2697,-333,610 0 3800
-/O "
-char198 15873,15060,0,2871,855,610 0 3782
-AE "
-char229 15873,17997,330,531,-696,531 2 3813
-oa "
-char237 15873,17640,0,1401,-1260,610 2 3821
-'i "
-char248 15873,11793,330,2241,-291,610 0 3832
-/o "
-char230 15873,11775,330,2148,-189,610 0 3814
-ae "
-char196 15873,20670,0,1470,1092,610 2 3780
-:A "
-char236 15873,17640,0,0,-1260 2 3820
-`i "
-char214 15873,20670,330,2058,-1137,610 2 3798
-:O "
-char220 15873,20670,330,4095,-2097,610 2 3804
-:U "
-char201 15873,21255,0,2724,-153,610 2 3785
-'E "
-char239 15873,16905,0,0,-1260 2 3823
-:i "
-char223 15873,16500,330,1746,-66,610 2 3807
-ss "
-char212 15873,21255,330,2157,-1137,610 2 3796
-^O "
-char193 15873,21255,0,2217,1092,610 2 3777
-'A "
-char195 15873,20580,0,2445,1092,610 2 3779
-~A "
-char227 15873,16818,330,1788,-696,610 2 3811
-~a "
-char208 15873,15060,0,2061,537,610 0 3792
--D "
-char240 15873,18297,330,1614,-1143,610 2 3824
-Sd "
-char205 15873,21255,0,2217,-1188,610 2 3789
-'I "
-char204 15873,21255,0,1764,-1188,610 2 3788
-`I "
-char211 15873,21255,330,2217,-1137,610 2 3795
-'O "
-char210 15873,21255,330,2058,-1137,610 2 3794
-`O "
-char213 15873,20580,330,2895,-1137,610 2 3797
-~O "
-char245 15873,16818,330,1788,-1140,610 2 3829
-~o "
-vS 15873,21255,330,2157,-804,610 2 51795
-vs 15873,17640,330,1257,-1356,610 2 51827
-char218 15873,21255,330,4095,-2097,610 2 3802
-'U "
-:Y 15873,20670,0,3672,-2262,610 2 51801
-char255 15873,16905,5145,3123,903,610 3 3839
-:y "
-char222 15873,15060,0,2421,-756,610 0 3806
-TP "
-char254 15873,16500,5145,1380,2037,610 3 3838
-Tp "
-char181 15873,11445,5595,0,-321 1 3765
-char182 15873,19635,4080,150,-2508,150 2 3766
-ps "
-char190 15873,15498,2655,4026,15,610 0 3774
-34 "
-\- 15873,6435,0,252,-2151,252 0 51757
-char188 15873,15498,2655,4626,-30,610 0 3772
-14 "
-char189 15873,15498,2655,3426,615,610 0 3773
-12 "
-char170 15873,15390,0,0,-5310 0 3754
-Of "
-char186 15873,15390,0,0,-5274 0 3770
-Om "
-char171 15873,11010,0,1230,-2184,610 0 3755
-Fo "
-char187 15873,11010,0,330,-1284,330 0 3771
-Fc "
-char177 15873,11385,2835,252,-2151,252 0 3761
-char166 15873,19083,5916,0,-5946 3 3750
-bb "
-char169 15873,19635,0,2121,-3030,610 2 3753
-co "
-char172 15873,8865,0,252,-2151,252 0 3756
-no "
-char174 15873,19635,0,1839,-2748,610 2 3758
-rg "
-char178 15873,15240,0,0,-4467 0 3762
-S2 "
-char179 15873,15240,0,0,-4548 0 3763
-S3 "
-char184 15873,0,4815,0,-4626 1 3768
-ac "
-char185 15873,15060,0,0,-4830 0 3769
-S1 "
-char215 15873,11340,0,252,-2151,252 0 3799
-char247 15873,10530,0,306,-2205,306 0 3831
-char183 15873,9657,0,0,-6252 0 3767
-pc "
-fm 15873,15060,0,0,-7596 0 51873
-sd 15873,15060,0,0,-5274 0 51874
-dg 15873,15060,1290,0,-4491 0 51755
-tm 15873,17850,0,1896,-2205,610 2 51796
-ah 15873,17640,0,1257,-4491,610 2 51935
-ao 15873,17997,0,0,-7365 2 51930
-f/ 15873,15498,2655,3126,915,610 0 51759
-em 15873,6570,0,3141,264,610 0 51789
-en 15873,6570,0,606,-2142,606 0 51790
-dd 15873,15060,1290,0,-4491 0 51773
-.i 15873,11445,0,0,-1260 0 51957
-aq 15873,15060,0,0,-6936 0 3623
-bu 15873,12714,0,0,-1848 0 51889
-'C 15873,21255,330,2835,-1689,610 2 20166
-'c 15873,17640,330,1542,-1617,610 2 20198
-lq 15873,15060,0,861,-3495,610 0 51838
-rq 15873,15060,0,1011,-3645,610 0 51746
-Bq 15873,3495,3120,0,-1491 0 51772
-vz 15873,17640,0,1257,-1368,610 2 51834
-fi 15873,17235,0,1983,1185,610 2 51881
-fl 15873,16500,0,1806,1185,610 2 51882
-ff 15873,16500,0,5799,1212,610 2 51883
-Fi 15873,16500,0,3705,846,610 2 51884
-Fl 15873,16500,0,2208,852,610 2 51885
-ij 15873,17235,5145,2958,1278,610 3 51958
-bq 15873,3495,3120,0,-3498 0 51756
-%0 15873,16380,330,2361,-471,610 2 51901
-char175 15873,15666,0,1914,-3453,610 2 3759
-a- "
-ab 15873,16395,0,2325,-5001,610 2 51926
-a. 15873,16905,0,0,-8292 2 51927
-oe 15873,11775,330,2334,30,610 0 51823
-OE 15873,15060,0,2799,-390,610 0 51791
-fo 15873,10365,0,0,-4143 0 51886
-fc 15873,10365,0,0,-3543 0 51887
-sq 15873,14106,0,0,-444 0 51899
-/L 15873,15060,0,1515,-135,610 0 51944
-/l 15873,16500,0,0,-1185 2 51960
-a" 15873,18420,0,2355,-6834,610 2 51933
-ho 15873,0,4263,0,-7344 0 51934
-vZ 15873,21255,0,2157,-807,610 2 51802
-IJ 15873,15060,2904,3021,-207,610 0 51942
diff --git a/contrib/groff/font/devlj4/CLARENDON b/contrib/groff/font/devlj4/CLARENDON
deleted file mode 100644
index 86f6c00e41f1..000000000000
--- a/contrib/groff/font/devlj4/CLARENDON
+++ /dev/null
@@ -1,351 +0,0 @@
-name CLARENDON
-spacewidth 5856
-pcltypeface 4140
-pclproportional 1
-pclweight 3
-pclstyle 4
-ligatures fi fl ff ffi ffl 0
-charset
-! 6342,18300 2 3617
-dq 11709,18645 2 3618
-" "
-sh 11709,18300 2 3619
-# "
-Do 11709,18309,306 2 3620
-$ "
-% 17565,18645,345 2 3621
-& 16587,18645,345 2 3622
-cq 5856,18645 2 51751
-' "
-( 5856,18300,6870 3 3624
-) 5856,18300,6870 3 3625
-* 11709,18645 2 3626
-+ 17565,16545 0 3627
-, 5856,3945,3375 0 3628
-char173 5856,8295 0 3629
-hy "
-- "
-. 5856,3945 0 3630
-sl 5856,18645,345 2 3631
-/ "
-0 11709,18645,345 2 3632
-1 11709,18300 2 3633
-2 11709,18645,345 2 3634
-3 11709,18645,345 2 3635
-4 11709,18300 2 3636
-5 11709,18300,345 2 3637
-6 11709,18645,345 2 3638
-7 11709,18300 2 3639
-8 11709,18645,345 2 3640
-9 11709,18645,345 2 3641
-: 5856,13965 0 3642
-; 5856,13965,3375 0 3643
-< 26346,16068 0 3644
-= 17565,12540 0 3645
-> 26346,16068 0 3646
-? 11709,18300 2 3647
-at 26346,16950,4131 2 3648
-@ "
-A 13662,18300 2 3649
-B 13662,18300 2 3650
-C 12684,18645,345 2 3651
-D 13662,18300 2 3652
-E 13662,18285 2 3653
-F 13173,18300 2 3654
-G 13662,18645,345 2 3655
-H 15126,18300 2 3656
-I 7806,18300 2 3657
-J 11220,18300,345 2 3658
-K 14637,18300 2 3659
-L 12198,18300 2 3660
-M 18051,18300 2 3661
-N 14637,18300 2 3662
-O 13662,18645,345 2 3663
-P 13173,18300 2 3664
-Q 14148,18645,2553 2 3665
-R 15126,18300,345 2 3666
-S 12198,18645,345 2 3667
-T 13662,18300 2 3668
-U 13173,18300,345 2 3669
-V 14148,18300 2 3670
-W 19515,18300 2 3671
-X 13662,18300 2 3672
-Y 13173,18300 2 3673
-Z 12198,18300 2 3674
-lB 5856,18300,5085 3 3675
-[ "
-rs 5856,18645,345 2 3676
-\ "
-rB 5856,18300,5085 3 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 5856,18645 2 51808
-` "
-a 13662,14250,345 0 3681
-b 12684,18300,345 2 3682
-c 11220,14250,345 0 3683
-d 12684,18300,345 2 3684
-e 11709,14250,345 0 3685
-f 8781,18645 2 3686
-g 13662,15165,4605 1 3687
-h 13173,18300 2 3688
-i 6831,18705 2 3689
-j 8295,18705,4605 3 3690
-k 13173,18300 2 3691
-l 6831,18300 2 3692
-m 19515,14250 0 3693
-n 13173,14250 0 3694
-o 12198,14250,345 0 3695
-p 12684,14250,4290 1 3696
-q 12684,14250,4290 1 3697
-r 9759,14250 0 3698
-s 11220,14250,345 0 3699
-t 8295,17265,345 2 3700
-u 13173,13905,345 0 3701
-v 11709,13905 0 3702
-w 17565,13905 0 3703
-x 12198,13905 0 3704
-y 12198,13905,4605 1 3705
-z 10245,13905 0 3706
-lC 13173,19935,6210 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 13173,19935,6210 3 3709
-} "
-ti 26346,9435 0 51876
-char192 13662,23355 2 3776
-`A "
-char194 13662,22755 2 3778
-^A "
-char200 13662,23355 2 3784
-`E "
-char202 13662,22755 2 3786
-^E "
-char203 13662,23325 2 3787
-:E "
-char206 7806,22755 2 3790
-^I "
-char207 7806,23325 2 3791
-:I "
-char180 11709,19305 2 3764
-aa "
-ga 11709,19305 2 3680
-a^ 11709,18180 2 3678
-^ "
-char168 11709,18750 2 3752
-ad "
-a~ 11709,18654 2 3710
-~ "
-char217 13173,23355,345 2 3801
-`U "
-char219 13173,22755,345 2 3803
-^U "
-char221 13173,23355 2 3805
-'Y "
-char253 12198,19305,4605 3 3837
-'y "
-char176 11709,18645 2 3760
-de "
-char199 12684,18645,4725 3 3783
-,C "
-char231 11220,14250,4737 1 3815
-,c "
-char209 14637,23229 2 3793
-~N "
-char241 13173,18654 2 3825
-~n "
-char161 6342,13956,4344 1 3745
-r! "
-char191 11709,13956,4344 1 3775
-r? "
-char164 17565,15834 0 3748
-Cs "
-char163 11709,18645,345 2 3747
-Po "
-char165 11709,18300 2 3749
-Ye "
-char167 11709,19605,6420 3 3751
-sc "
-Fn 11709,18645 2 51871
-char162 11709,16917 2 3746
-ct "
-char226 13662,18180,345 2 3810
-^a "
-char234 11709,18180,345 2 3818
-^e "
-char244 12198,18180,345 2 3828
-^o "
-char251 13173,18180,345 2 3835
-^u "
-char225 13662,19305,345 2 3809
-'a "
-char233 11709,19305,345 2 3817
-'e "
-char243 12198,19305,345 2 3827
-'o "
-char250 13173,19305,345 2 3834
-'u "
-char224 13662,19305,345 2 3808
-`a "
-char232 11709,19305,345 2 3816
-`e "
-char242 12198,19305,345 2 3826
-`o "
-char249 13173,19305,345 2 3833
-`u "
-char228 13662,18750,345 2 3812
-:a "
-char235 11709,18750,345 2 3819
-:e "
-char246 12198,18750,345 2 3830
-:o "
-char252 13173,18750,345 2 3836
-:u "
-char197 13662,25200 2 3781
-oA "
-char238 6831,18180 2 3822
-^i "
-char216 13662,18645,345 2 3800
-/O "
-char198 22932,18285 2 3782
-AE "
-char229 13662,21195,345 2 3813
-oa "
-char237 6831,19305 2 3821
-'i "
-char248 12198,14250,345 0 3832
-/o "
-char230 18051,14250,345 0 3814
-ae "
-char196 13662,23325 2 3780
-:A "
-char236 6831,19305 2 3820
-`i "
-char214 13662,23325,345 2 3798
-:O "
-char220 13173,23325,345 2 3804
-:U "
-char201 13662,23355 2 3785
-'E "
-char239 6831,18750 2 3823
-:i "
-char223 13173,18645 2 3807
-ss "
-char212 13662,22755,345 2 3796
-^O "
-char193 13662,23355 2 3777
-'A "
-char195 13662,23229 2 3779
-~A "
-char227 13662,18654,345 2 3811
-~a "
-char208 13662,18300 2 3792
--D "
-char240 12198,19083,345 2 3824
-Sd "
-char205 7806,23355 2 3789
-'I "
-char204 7806,23355 2 3788
-`I "
-char211 13662,23355,345 2 3795
-'O "
-char210 13662,23355,345 2 3794
-`O "
-char213 13662,23229,345 2 3797
-~O "
-char245 12198,18654,345 2 3829
-~o "
-vS 12198,22755,345 2 51795
-vs 11220,18180,345 2 51827
-char218 13173,23355,345 2 3802
-'U "
-:Y 13173,23325 2 51801
-char255 12198,18750,4605 3 3839
-:y "
-char222 13173,18300 2 3806
-TP "
-char254 12684,18300,4290 3 3838
-Tp "
-char181 14637,10800,5193 1 3765
-char182 12198,19635,4200 3 3766
-ps "
-char190 17565,18645,345 2 3774
-34 "
-\- 17565,10200 0 51757
-char188 17565,18645,345 2 3772
-14 "
-char189 17565,18645,345 2 3773
-12 "
-char170 11709,18645 2 3754
-Of "
-char186 11709,18645 2 3770
-Om "
-char171 12198,12195 0 3755
-Fo "
-char187 12198,12195 0 3771
-Fc "
-char177 17565,16500 0 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19725 2 3753
-co "
-char172 17565,13479 0 3756
-no "
-char174 13173,19725 2 3758
-rg "
-char178 7806,18480 2 3762
-S2 "
-char179 7806,18480 2 3763
-S3 "
-char184 11709,108,4737 1 3768
-ac "
-char185 7806,18300 2 3769
-S1 "
-char215 17565,16782 0 3799
-char247 17565,15045 0 3831
-char183 5856,11745 0 3767
-pc "
-fm 5856,18645 2 51873
-sd 10245,18645 2 51874
-dg 11709,18300,4575 3 51755
-tm 16101,17550 2 51796
-ah 11709,18180 2 51935
-ao 11709,21195 2 51930
-f/ 3903,18645,345 2 51759
-em 17565,8295 0 51789
-en 11709,8295 0 51790
-dd 11709,18300,4575 3 51773
-.i 6831,13905 0 51957
-aq 5856,18645 2 3623
-bu 13173,14226 0 51889
-'C 12684,23355,345 2 20166
-'c 11220,19305,345 2 20198
-lq 10734,18645 2 51838
-rq 10734,18645 2 51746
-Bq 10734,3615,3705 0 51772
-vz 10245,18180 2 51834
-fi 15612,18705 2 51881
-fl 15612,18645 2 51882
-ff 17076,18645 2 51883
-Fi 24396,18705 2 51884
-Fl 24396,18645 2 51885
-ij 14637,18705,4605 3 51958
-bq 5856,3615,3705 0 51756
-%0 23418,18645,345 2 51901
-char175 11709,16920 2 3759
-a- "
-ab 11709,19080 2 51926
-a. 11709,18750 2 51927
-oe 18051,14250,345 0 51823
-OE 20979,18645,345 2 51791
-fo 7806,12195 0 51886
-fc 7806,12195 0 51887
-sq 19029,15624 0 51899
-/L 12198,18300 2 51944
-/l 6831,18300 2 51960
-a" 11709,19305 2 51933
-ho 11709,1062,4353 1 51934
-vZ 12198,22755 2 51802
-IJ 19029,18300,345 2 51942
diff --git a/contrib/groff/font/devlj4/CORONET b/contrib/groff/font/devlj4/CORONET
deleted file mode 100644
index 9dcecce8f7b7..000000000000
--- a/contrib/groff/font/devlj4/CORONET
+++ /dev/null
@@ -1,351 +0,0 @@
-name CORONET
-spacewidth 13227
-slant 12.000000
-pcltypeface 4102
-pclproportional 0
-pclweight 0
-pclstyle 1
-charset
-! 13227,18990,330 2 3617
-dq 13227,18990 2 3618
-" "
-sh 13227,21309,2451 2 3619
-# "
-Do 13227,19320,1074 2 3620
-$ "
-% 13227,19320,330 2 3621
-& 13227,19320,330 2 3622
-cq 13227,19320 2 51751
-' "
-( 13227,19320,1935 2 3624
-) 13227,19320,1935 2 3625
-* 13227,18990 2 3626
-+ 13227,15075 0 3627
-, 13227,1785,2250 0 3628
-char173 13227,7995 0 3629
-hy "
-- "
-. 13227,2100,330 0 3630
-sl 13227,19545,330 2 3631
-/ "
-0 13227,19320,330 2 3632
-1 13227,19320 2 3633
-2 13227,19320 2 3634
-3 13227,19320,330 2 3635
-4 13227,19320 2 3636
-5 13227,18990,330 2 3637
-6 13227,19320,330 2 3638
-7 13227,18990 2 3639
-8 13227,19320,330 2 3640
-9 13227,19320,330 2 3641
-: 13227,12492,330 0 3642
-; 13227,12492,2250 0 3643
-< 13227,15063 0 3644
-= 13227,11721 0 3645
-> 13227,15063 0 3646
-? 13227,19320,330 2 3647
-at 13227,19320,330 2 3648
-@ "
-A 13227,18990 2 3649
-B 13227,18990 2 3650
-C 13227,19320,330 2 3651
-D 13227,18990 2 3652
-E 13227,18990 2 3653
-F 13227,18990 2 3654
-G 13227,19320,330 2 3655
-H 13227,18990 2 3656
-I 13227,18990 2 3657
-J 13227,18990,330 2 3658
-K 13227,18990 2 3659
-L 13227,18990 2 3660
-M 13227,18990 2 3661
-N 13227,18990 2 3662
-O 13227,19320,330 2 3663
-P 13227,18990 2 3664
-Q 13227,19320,2778 2 3665
-R 13227,18990 2 3666
-S 13227,19320,330 2 3667
-T 13227,18990 2 3668
-U 13227,18990,330 2 3669
-V 13227,18990 2 3670
-W 13227,18990 2 3671
-X 13227,18990 2 3672
-Y 13227,18990 2 3673
-Z 13227,18990 2 3674
-lB 13227,18990,2940 2 3675
-[ "
-rs 13227,19545,330 2 3676
-\ "
-rB 13227,18990,2940 2 3677
-] "
-ha 13227,19758 2 51875
-_ 13227,191367,6588 3 3679
-oq 13227,19326 2 51808
-` "
-a 13227,14355,330 0 3681
-b 13227,19545,330 2 3682
-c 13227,14355,330 0 3683
-d 13227,19545,330 2 3684
-e 13227,14355,330 0 3685
-f 13227,19335 2 3686
-g 13227,14355,4350 0 3687
-h 13227,19545 2 3688
-i 13227,18780 2 3689
-j 13227,18780,4350 2 3690
-k 13227,19545 2 3691
-l 13227,19545 2 3692
-m 13227,14355 0 3693
-n 13227,14355 0 3694
-o 13227,14355,330 0 3695
-p 13227,14355,5475 1 3696
-q 13227,14355,5475 1 3697
-r 13227,14355 0 3698
-s 13227,14355,330 0 3699
-t 13227,18495,330 2 3700
-u 13227,14025,330 0 3701
-v 13227,14025 0 3702
-w 13227,14025 0 3703
-x 13227,14025 0 3704
-y 13227,14025,4350 0 3705
-z 13227,14025 0 3706
-lC 13227,20130,6075 3 3707
-{ "
-ba 13227,19758,6588 3 3708
-| "
-rC 13227,20130,6075 3 3709
-} "
-ti 13227,10485 0 51876
-char192 13227,24630 2 3776
-`A "
-char194 13227,24810 2 3778
-^A "
-char200 13227,24630 2 3784
-`E "
-char202 13227,24810 2 3786
-^E "
-char203 13227,23115 2 3787
-:E "
-char206 13227,24810 2 3790
-^I "
-char207 13227,23115 2 3791
-:I "
-char180 13227,19725 2 3764
-aa "
-ga 13227,19725 2 3680
-a^ 13227,19905 2 3678
-^ "
-char168 13227,18195 2 3752
-ad "
-a~ 13227,18873 2 3710
-~ "
-char217 13227,24630,330 2 3801
-`U "
-char219 13227,24810,330 2 3803
-^U "
-char221 13227,24630 2 3805
-'Y "
-char253 13227,19725,4350 2 3837
-'y "
-char176 13227,19320 2 3760
-de "
-char199 13227,19320,5325 3 3783
-,C "
-char231 13227,14355,5295 1 3815
-,c "
-char209 13227,23814 2 3793
-~N "
-char241 13227,18873 2 3825
-~n "
-char161 13227,14271,5049 1 3745
-r! "
-char191 13227,14214,5436 1 3775
-r? "
-char164 13227,15684 0 3748
-Cs "
-char163 13227,19320,330 2 3747
-Po "
-char165 13227,18990 2 3749
-Ye "
-char167 13227,19320,1344 2 3751
-sc "
-Fn 13227,19335,3540 2 51871
-char162 13227,19320,330 2 3746
-ct "
-char226 13227,19905,330 2 3810
-^a "
-char234 13227,19905,330 2 3818
-^e "
-char244 13227,19905,330 2 3828
-^o "
-char251 13227,19905,330 2 3835
-^u "
-char225 13227,19725,330 2 3809
-'a "
-char233 13227,19725,330 2 3817
-'e "
-char243 13227,19725,330 2 3827
-'o "
-char250 13227,19725,330 2 3834
-'u "
-char224 13227,19725,330 2 3808
-`a "
-char232 13227,19725,330 2 3816
-`e "
-char242 13227,19725,330 2 3826
-`o "
-char249 13227,19725,330 2 3833
-`u "
-char228 13227,18195,330 2 3812
-:a "
-char235 13227,18195,330 2 3819
-:e "
-char246 13227,18195,330 2 3830
-:o "
-char252 13227,18195,330 2 3836
-:u "
-char197 13227,24810 2 3781
-oA "
-char238 13227,19905 2 3822
-^i "
-char216 13227,19320,342 2 3800
-/O "
-char198 13227,18990 2 3782
-AE "
-char229 13227,19905,330 2 3813
-oa "
-char237 13227,19725 2 3821
-'i "
-char248 13227,14895,735 0 3832
-/o "
-char230 13227,14355,330 0 3814
-ae "
-char196 13227,23115 2 3780
-:A "
-char236 13227,19725 2 3820
-`i "
-char214 13227,23115,330 2 3798
-:O "
-char220 13227,23115,330 2 3804
-:U "
-char201 13227,24630 2 3785
-'E "
-char239 13227,18195 2 3823
-:i "
-char223 13227,19335,330 2 3807
-ss "
-char212 13227,24810,330 2 3796
-^O "
-char193 13227,24630 2 3777
-'A "
-char195 13227,23814 2 3779
-~A "
-char227 13227,18873,330 2 3811
-~a "
-char208 13227,18990 2 3792
--D "
-char240 13227,19545,330 2 3824
-Sd "
-char205 13227,24630 2 3789
-'I "
-char204 13227,24630 2 3788
-`I "
-char211 13227,24630,330 2 3795
-'O "
-char210 13227,24630,330 2 3794
-`O "
-char213 13227,23814,330 2 3797
-~O "
-char245 13227,18873,330 2 3829
-~o "
-vS 13227,24810,330 2 51795
-vs 13227,19905,330 2 51827
-char218 13227,24630,330 2 3802
-'U "
-:Y 13227,23115 2 51801
-char255 13227,18195,4350 2 3839
-:y "
-char222 13227,18990 2 3806
-TP "
-char254 13227,19545,5475 3 3838
-Tp "
-char181 13227,14025,4350 0 3765
-char182 13227,19635,4200 2 3766
-ps "
-char190 13227,19110,3825 2 3774
-34 "
-\- 13227,9945 0 51757
-char188 13227,19110,3825 2 3772
-14 "
-char189 13227,19110,3825 2 3773
-12 "
-char170 13227,19320 2 3754
-Of "
-char186 13227,19320 2 3770
-Om "
-char171 13227,13710 0 3755
-Fo "
-char187 13227,13710 0 3771
-Fc "
-char177 13227,15075 0 3761
-char166 13227,19083,5916 3 3750
-bb "
-char169 13227,19635 2 3753
-co "
-char172 13227,12501 0 3756
-no "
-char174 13227,19635 2 3758
-rg "
-char178 13227,19110 2 3762
-S2 "
-char179 13227,19110 2 3763
-S3 "
-char184 13227,0,5295 1 3768
-ac "
-char185 13227,19110 2 3769
-S1 "
-char215 13227,14814 0 3799
-char247 13227,14655 0 3831
-char183 13227,11007 0 3767
-pc "
-fm 13227,18990 2 51873
-sd 13227,18990 2 51874
-dg 13227,18990 2 51755
-tm 13227,17850 2 51796
-ah 13227,19905 2 51935
-ao 13227,19905 2 51930
-f/ 13227,15675,777 0 51759
-em 13227,7710 0 51789
-en 13227,7710 0 51790
-dd 13227,18990 2 51773
-.i 13227,14025 0 51957
-aq 13227,18990 2 3623
-bu 13227,12714 0 51889
-'C 13227,24630,330 2 20166
-'c 13227,19725,330 2 20198
-lq 13227,19326 2 51838
-rq 13227,19320 2 51746
-Bq 13227,2214,2091 0 51772
-vz 13227,19905 2 51834
-fi 13227,19335 2 51881
-fl 13227,19335 2 51882
-ff 13227,19335 2 51883
-Fi 13227,19335 2 51884
-Fl 13227,19335 2 51885
-ij 13227,18780,4350 2 51958
-bq 13227,2214,2091 0 51756
-%0 13227,19320,330 2 51901
-char175 13227,18051 2 3759
-a- "
-ab 13227,19350 2 51926
-a. 13227,18195 2 51927
-oe 13227,14355,330 0 51823
-OE 13227,19320,330 2 51791
-fo 13227,13710 0 51886
-fc 13227,13710 0 51887
-sq 13227,14106 0 51899
-/L 13227,18990 2 51944
-/l 13227,19545 2 51960
-a" 13227,19725 2 51933
-ho 13227,735,4086 0 51934
-vZ 13227,24810 2 51802
-IJ 13227,18990,330 2 51942
diff --git a/contrib/groff/font/devlj4/CR b/contrib/groff/font/devlj4/CR
deleted file mode 100644
index c6da8a640549..000000000000
--- a/contrib/groff/font/devlj4/CR
+++ /dev/null
@@ -1,350 +0,0 @@
-name CR
-spacewidth 15873
-pcltypeface 4099
-pclproportional 0
-pclweight 0
-pclstyle 0
-charset
-! 15873,15060,330 0 3617
-dq 15873,15060 0 3618
-" "
-sh 15873,16827,2040 2 3619
-# "
-Do 15873,17247,3642 2 3620
-$ "
-% 15873,16380,330 2 3621
-& 15873,14187,330 0 3622
-cq 15873,15060 0 51751
-' "
-( 15873,17070,2580 2 3624
-) 15873,17070,2580 2 3625
-* 15873,15060 0 3626
-+ 15873,11385 0 3627
-, 15873,3195,3420 0 3628
-char173 15873,7275 0 3629
-hy "
-- "
-. 15873,2805,330 0 3630
-sl 15873,18465,3765 2 3631
-/ "
-0 15873,15390,330 0 3632
-1 15873,15060 0 3633
-2 15873,15390 0 3634
-3 15873,15390,330 0 3635
-4 15873,15060 0 3636
-5 15873,15060,330 0 3637
-6 15873,15390,330 0 3638
-7 15873,15060 0 3639
-8 15873,15390,330 0 3640
-9 15873,15390,330 0 3641
-: 15873,9705,393 0 3642
-; 15873,9705,3420 0 3643
-< 15873,10647,3 0 3644
-= 15873,8451 0 3645
-> 15873,10647,3 0 3646
-? 15873,15390,330 0 3647
-at 15873,14391,363 0 3648
-@ "
-A 15873,15060 0 3649
-B 15873,15060 0 3650
-C 15873,15390,330 0 3651
-D 15873,15060 0 3652
-E 15873,15060 0 3653
-F 15873,15060 0 3654
-G 15873,15390,330 0 3655
-H 15873,15060 0 3656
-I 15873,15060 0 3657
-J 15873,15060,330 0 3658
-K 15873,15060 0 3659
-L 15873,15060 0 3660
-M 15873,15060 0 3661
-N 15873,15060 0 3662
-O 15873,15390,330 0 3663
-P 15873,15060 0 3664
-Q 15873,15390,3360 0 3665
-R 15873,15060 0 3666
-S 15873,15390,330 0 3667
-T 15873,15060 0 3668
-U 15873,15060,330 0 3669
-V 15873,15060 0 3670
-W 15873,15060 0 3671
-X 15873,15060 0 3672
-Y 15873,15060 0 3673
-Z 15873,15060 0 3674
-lB 15873,17070,2580 2 3675
-[ "
-rs 15873,18465,3765 2 3676
-\ "
-rB 15873,17070,2580 2 3677
-] "
-ha 15873,19758 2 51875
-_ 15873,191367,6588 3 3679
-oq 15873,15060 0 51808
-` "
-a 15873,11775,330 0 3681
-b 15873,16500,330 2 3682
-c 15873,11775,330 0 3683
-d 15873,16500,330 2 3684
-e 15873,11775,330 0 3685
-f 15873,16500 2 3686
-g 15873,11775,5145 1 3687
-h 15873,16500 2 3688
-i 15873,17235 2 3689
-j 15873,17235,5145 3 3690
-k 15873,16500 2 3691
-l 15873,16500 2 3692
-m 15873,11775 0 3693
-n 15873,11775 0 3694
-o 15873,11775,330 0 3695
-p 15873,11775,5145 1 3696
-q 15873,11775,5145 1 3697
-r 15873,11775 0 3698
-s 15873,11775,330 0 3699
-t 15873,14826,330 0 3700
-u 15873,11445,330 0 3701
-v 15873,11445 0 3702
-w 15873,11445 0 3703
-x 15873,11445 0 3704
-y 15873,11445,5145 1 3705
-z 15873,11445 0 3706
-lC 15873,20130,6075 3 3707
-{ "
-ba 15873,19758,6588 3 3708
-| "
-rC 15873,20130,6075 3 3709
-} "
-ti 15873,7233 0 51876
-char192 15873,21180 2 3776
-`A "
-char194 15873,21180 2 3778
-^A "
-char200 15873,21180 2 3784
-`E "
-char202 15873,21180 2 3786
-^E "
-char203 15873,20670 2 3787
-:E "
-char206 15873,21180 2 3790
-^I "
-char207 15873,20670 2 3791
-:I "
-char180 15873,17565 2 3764
-aa "
-ga 15873,17565 2 3680
-a^ 15873,17565 2 3678
-^ "
-char168 15873,16905 2 3752
-ad "
-a~ 15873,16830 2 3710
-~ "
-char217 15873,21180,330 2 3801
-`U "
-char219 15873,21180,330 2 3803
-^U "
-char221 15873,21180 2 3805
-'Y "
-char253 15873,17565,5145 3 3837
-'y "
-char176 15873,15390 0 3760
-de "
-char199 15873,15390,5175 1 3783
-,C "
-char231 15873,11775,4815 1 3815
-,c "
-char209 15873,20571 2 3793
-~N "
-char241 15873,16830 2 3825
-~n "
-char161 15873,11880,3510 0 3745
-r! "
-char191 15873,11898,3822 0 3775
-r? "
-char164 15873,15684 2 3748
-Cs "
-char163 15873,15390,330 0 3747
-Po "
-char165 15873,15060 0 3749
-Ye "
-char167 15873,15390,1905 0 3751
-sc "
-Fn 15873,15090,4350 0 51871
-char162 15873,16179,1431 2 3746
-ct "
-char226 15873,17565,330 2 3810
-^a "
-char234 15873,17565,330 2 3818
-^e "
-char244 15873,17565,330 2 3828
-^o "
-char251 15873,17565,330 2 3835
-^u "
-char225 15873,17565,330 2 3809
-'a "
-char233 15873,17565,330 2 3817
-'e "
-char243 15873,17565,330 2 3827
-'o "
-char250 15873,17565,330 2 3834
-'u "
-char224 15873,17565,330 2 3808
-`a "
-char232 15873,17565,330 2 3816
-`e "
-char242 15873,17565,330 2 3826
-`o "
-char249 15873,17565,330 2 3833
-`u "
-char228 15873,16905,330 2 3812
-:a "
-char235 15873,16905,330 2 3819
-:e "
-char246 15873,16905,330 2 3830
-:o "
-char252 15873,16905,330 2 3836
-:u "
-char197 15873,21690 2 3781
-oA "
-char238 15873,17565 2 3822
-^i "
-char216 15873,15591,612 2 3800
-/O "
-char198 15873,15060 0 3782
-AE "
-char229 15873,17997,330 2 3813
-oa "
-char237 15873,17565 2 3821
-'i "
-char248 15873,11856,459 0 3832
-/o "
-char230 15873,11775,330 0 3814
-ae "
-char196 15873,20670 2 3780
-:A "
-char236 15873,17565 2 3820
-`i "
-char214 15873,20670,330 2 3798
-:O "
-char220 15873,20670,330 2 3804
-:U "
-char201 15873,21180 2 3785
-'E "
-char239 15873,16905 2 3823
-:i "
-char223 15873,16500,330 2 3807
-ss "
-char212 15873,21180,330 2 3796
-^O "
-char193 15873,21180 2 3777
-'A "
-char195 15873,20571 2 3779
-~A "
-char227 15873,16830,330 2 3811
-~a "
-char208 15873,15060 0 3792
--D "
-char240 15873,18015,330 2 3824
-Sd "
-char205 15873,21180 2 3789
-'I "
-char204 15873,21180 2 3788
-`I "
-char211 15873,21180,330 2 3795
-'O "
-char210 15873,21180,330 2 3794
-`O "
-char213 15873,20571,330 2 3797
-~O "
-char245 15873,16830,330 2 3829
-~o "
-vS 15873,21180,330 2 51795
-vs 15873,17565,330 2 51827
-char218 15873,21180,330 2 3802
-'U "
-:Y 15873,20670 2 51801
-char255 15873,16905,5145 3 3839
-:y "
-char222 15873,15060 0 3806
-TP "
-char254 15873,16500,5145 3 3838
-Tp "
-char181 15873,11445,5595 1 3765
-char182 15873,19635,4080 2 3766
-ps "
-char190 15873,15519,2673 2 3774
-34 "
-\- 15873,6435 0 51757
-char188 15873,15519,2673 2 3772
-14 "
-char189 15873,15519,2673 2 3773
-12 "
-char170 15873,15390 0 3754
-Of "
-char186 15873,15390 0 3770
-Om "
-char171 15873,11490 0 3755
-Fo "
-char187 15873,11490 0 3771
-Fc "
-char177 15873,11385,2835 0 3761
-char166 15873,19083,5916 3 3750
-bb "
-char169 15873,19635 2 3753
-co "
-char172 15873,8865 0 3756
-no "
-char174 15873,19635 2 3758
-rg "
-char178 15873,15240 0 3762
-S2 "
-char179 15873,15240 0 3763
-S3 "
-char184 15873,0,4815 1 3768
-ac "
-char185 15873,15060 0 3769
-S1 "
-char215 15873,11340 0 3799
-char247 15873,10530 0 3831
-char183 15873,8931 0 3767
-pc "
-fm 15873,15060 0 51873
-sd 15873,15060 0 51874
-dg 15873,15060,1290 0 51755
-tm 15873,17850 2 51796
-ah 15873,17565 2 51935
-ao 15873,17997 2 51930
-f/ 15873,15519,2673 2 51759
-em 15873,7275 0 51789
-en 15873,7275 0 51790
-dd 15873,15060,1290 0 51773
-.i 15873,11445 0 51957
-aq 15873,15060 0 3623
-bu 15873,12714 0 51889
-'C 15873,21180,330 2 20166
-'c 15873,17565,330 2 20198
-lq 15873,15060 0 51838
-rq 15873,15060 0 51746
-Bq 15873,3495,3120 0 51772
-vz 15873,17565 2 51834
-fi 15873,17235 2 51881
-fl 15873,16500 2 51882
-ff 15873,16500 2 51883
-Fi 15873,16500 2 51884
-Fl 15873,16500 2 51885
-ij 15873,17235,5145 3 51958
-bq 15873,3495,3120 0 51756
-%0 15873,16380,330 2 51901
-char175 15873,15726 2 3759
-a- "
-ab 15873,16725 2 51926
-a. 15873,16905 2 51927
-oe 15873,11775,330 0 51823
-OE 15873,15060 0 51791
-fo 15873,10845 0 51886
-fc 15873,10845 0 51887
-sq 15873,14106 0 51899
-/L 15873,15060 0 51944
-/l 15873,16500 2 51960
-a" 15873,18195 2 51933
-ho 15873,0,4263 0 51934
-vZ 15873,21180 2 51802
-IJ 15873,15060,2850 0 51942
diff --git a/contrib/groff/font/devlj4/DESC.in b/contrib/groff/font/devlj4/DESC.in
deleted file mode 100644
index b726647f61af..000000000000
--- a/contrib/groff/font/devlj4/DESC.in
+++ /dev/null
@@ -1,9 +0,0 @@
-hor 1
-vert 1
-sizescale 4
-sizes 1-3999 0
-styles R I B BI
-fonts 6 0 0 0 0 0 S
-family T
-tcommand
-postpro grolj4
diff --git a/contrib/groff/font/devlj4/GB b/contrib/groff/font/devlj4/GB
deleted file mode 100644
index 5433de6b751a..000000000000
--- a/contrib/groff/font/devlj4/GB
+++ /dev/null
@@ -1,749 +0,0 @@
-name GB
-spacewidth 7317
-pcltypeface 4197
-pclproportional 1
-pclweight 3
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2925
-P . -3903
-P , -3903
-V A -3414
-A V -4389
-T o -4389
-T r -2925
-T c -3903
-T e -3903
-T d -3903
-T s -2925
-T y -3414
-T a -2925
-T w -3414
-T u -2925
-L T -2925
-L Y -2925
-Y o -3903
-Y e -3414
-Y a -3414
-A W -4389
-W A -3414
-T A -2925
-V o -3414
-V e -2925
-V a -2925
-Y A -3414
-F A -2439
-F . -3903
-F , -3903
-A T -2925
-A Y -3414
-v . -2439
-v , -2439
-y . -2439
-y , -2439
-T . -2925
-T , -2925
-L W -2925
-P A -2439
-V . -3903
-V , -3903
-Y . -3414
-Y , -3414
-W o -3414
-W e -2925
-W a -2925
-W . -3903
-W , -3903
-r . -1950
-r , -1950
-w . -975
-w , -975
-Y u -2439
-A v -1950
-A y -1950
-A w -1950
-o . -1461
-o , -1461
-p . -1461
-p , -1461
-e . -975
-e , -975
-b . -1461
-b , -1461
-O T -1950
-O V -1950
-O Y -1950
-O . -1950
-O , -1950
-L y -975
-V y -1950
-V u -1950
-V O -1950
-V G -1950
-V C -1950
-V Q -1950
-D T -1950
-D V -1950
-D Y -1950
-D . -1950
-D , -1950
-Y O -1950
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -1461
-F e -975
-F a -975
-O A -975
-O W -1950
-L U -486
-R T -1950
-R V -1950
-R Y -1950
-R W -1950
-G T -486
-P o -1461
-P g -975
-P e -975
-P a -975
-D A -975
-D W -1950
-B T -975
-B Y -975
-B . -975
-B , -975
-A O -975
-A G -975
-A C -975
-A U -1461
-A Q -975
-W r -1950
-W y -1950
-W u -1950
-W O -1950
-W G -1950
-W C -1950
-W Q -1950
-J A -486
-J . -486
-J , -486
-U A -1461
-U . -1950
-U , -1950
-Q A -975
-Q W -1950
-T O -1950
-T G -1950
-T C -1950
-T Q -1950
-O X -1461
-L o -486
-G V -486
-G Y -486
-G W -486
-G . -486
-G , -486
-P T -975
-P V -975
-P Y -975
-D X -1461
-B V -975
-B X -975
-B A -975
-B W -975
-S . -975
-S , -975
-X o -1461
-X e -975
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1461
-A e -975
-Q X -1461
-K o -1461
-K e -975
-K y -975
-K w -975
-K O -975
-K G -975
-K C -975
-K Q -975
-o v -1461
-o y -1461
-o x -1461
-o w -1461
-h v -975
-h y -975
-n v -975
-n y -975
-m v -975
-m y -975
-r g -975
-p v -975
-p y -975
-p x -975
-v o -1461
-v g -975
-v c -975
-v d -975
-v a -975
-v q -975
-e v -486
-e y -486
-b v -975
-b y -975
-b w -975
-s . -486
-s , -486
-y o -1461
-y g -975
-y c -975
-y d -975
-y a -975
-y q -975
-x o -1461
-x c -975
-x e -975
-x d -975
-x q -975
-a v -975
-a y -975
-a w -975
-w o -1461
-w g -975
-w c -975
-w d -975
-w a -975
-w q -975
-T S -975
-R o -1461
-R y -1461
-R O -1461
-R G -1461
-R C -1461
-R U -1461
-R Q -1461
-G X -486
-G A -486
-P s -486
-P Z -975
-P X -975
-P W -975
-V S -975
-S A -975
-Y S -975
-A t -486
-A c -975
-A d -975
-A q -975
-W S -975
-K c -975
-o f -486
-h w -975
-n w -975
-m w -975
-r o -1461
-r c -975
-r e -975
-r d -975
-r a -975
-r q -975
-p w -975
-v e -975
-v s -486
-e x -486
-e w -486
-y e -975
-y s -486
-f o -1461
-f c -975
-f e -975
-f d -975
-f q -975
-w e -975
-w s -486
-k o -975
-k c -486
-k e -486
-k d -486
-k q -486
-O Z -975
-R e -975
-G Z -486
-E o -486
-E v -975
-E y -975
-E w -975
-Z o -486
-Z y -975
-Z w -975
-D Z -975
-B Z -975
-J o -486
-U g -486
-t o -975
-t c -486
-t e -486
-t d -486
-t q -486
-o t -486
-o g -486
-o z -975
-o j -486
-r s -486
-g o -975
-g c -486
-g e -486
-g d -486
-g q -486
-p z -486
-e z -486
-z o -975
-z c -486
-z e -486
-z d -486
-z q -486
-b z -486
-C o -486
-C y -975
-B o -486
-B y -486
-B S -486
-B U -486
-U o -975
-U c -486
-U e -486
-U d -486
-U s -486
-U a -486
-U q -486
-L cq -2925
-L ' -2925
-T char173 -3414
-T hy -3414
-T - -3414
-T en -3414
-T em -3414
-A cq -2925
-A ' -2925
-char173 T -3414
-hy T -3414
-- T -3414
-en T -3414
-em T -3414
-Y char173 -2439
-Y hy -2439
-Y - -2439
-Y en -2439
-Y em -2439
-p cq -1461
-p ' -1461
-e cq -486
-e ' -486
-b cq -975
-b ' -975
-a cq -975
-a ' -975
-V char173 -1950
-V hy -1950
-V - -1950
-V en -1950
-V em -1950
-h cq -975
-h ' -975
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-R cq -1461
-R ' -1461
-W char173 -1950
-W hy -1950
-W - -1950
-W en -1950
-W em -1950
-cq d -1461
-' d -1461
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -975
-A hy -975
-A - -975
-A en -975
-A em -975
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-cq s -486
-' s -486
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -975
-hy A -975
-- A -975
-en X -1461
-en A -975
-em X -1461
-R char173 -1461
-R hy -1461
-R - -1461
-R en -1461
-R em -1461
-G cq -486
-G ' -486
-B cq -486
-B ' -486
-charset
-! 7317,18948,390 2 3617
-dq 10734,18987 2 3618
-" "
-sh 13173,17805,390 0 3619
-# "
-Do 13173,19584,1779 2 3620
-$ "
-% 21954,17805,390 0 3621
-& 22443,18165,390 0 3622
-cq 6831,18555 2 51751
-' "
-( 8295,20250,6705 3 3624
-) 8295,20250,6705 3 3625
-* 13173,18555 2 3626
-+ 21954,13467,87 0 3627
-, 7317,3972,4152 0 3628
-char173 7317,7575 0 3629
-hy "
-- "
-. 7317,3915,390 0 3630
-sl 13173,20250,300 2 3631
-/ "
-0 13173,17805,390 0 3632
-1 13173,17805,150 0 3633
-2 13173,17805,150 0 3634
-3 13173,17805,390 0 3635
-4 13173,17805 0 3636
-5 13173,17490,390 0 3637
-6 13173,17805,390 0 3638
-7 13173,17415,390 0 3639
-8 13173,17805,390 0 3640
-9 13173,17805,390 0 3641
-: 7317,11940,390 0 3642
-; 7317,11940,4152 0 3643
-< 26346,16068 0 3644
-= 21954,9654 0 3645
-> 26346,16068 0 3646
-? 10245,18948,390 2 3647
-at 21954,16950,4131 0 3648
-@ "
-A 20004,18939,150 2 3649
-B 17565,18315,150 2 3650
-C 20004,18555,390 2 3651
-D 21954,18555,150 2 3652
-E 16587,18315,150 2 3653
-F 16587,18315,150 2 3654
-G 21468,18555,390 2 3655
-H 23418,18315,150 2 3656
-I 10245,18315,150 2 3657
-J 9759,18315,6363 3 3658
-K 19515,18315,150 2 3659
-L 16101,18315,150 2 3660
-M 24882,18315,390 2 3661
-N 22443,18315,612 2 3662
-O 22932,18555,390 2 3663
-P 16587,18555,150 2 3664
-Q 22932,18555,5253 2 3665
-R 19515,18315,150 2 3666
-S 14148,18555,390 2 3667
-T 17565,19500,138 2 3668
-U 21468,18315,390 2 3669
-V 19515,18315,390 2 3670
-W 26346,18315,390 2 3671
-X 20004,18315,150 2 3672
-Y 18540,18315,150 2 3673
-Z 17565,19500,150 2 3674
-lB 8295,18165,4905 0 3675
-[ "
-rs 13173,20250,300 2 3676
-\ "
-rB 8295,18165,4905 0 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 6831,18555 2 51808
-` "
-a 12198,12420,390 0 3681
-b 14637,20250,390 2 3682
-c 11220,12420,390 0 3683
-d 14637,20250,390 2 3684
-e 11709,12420,390 0 3685
-f 9270,20250,150 2 3686
-g 14148,12420,6705 1 3687
-h 15612,20250,150 2 3688
-i 7806,19329,150 2 3689
-j 7317,19329,6705 3 3690
-k 14637,20250,150 2 3691
-l 7806,20250,150 2 3692
-m 22932,12420,150 0 3693
-n 15612,12420,150 0 3694
-o 14148,12420,390 0 3695
-p 14637,12420,6855 1 3696
-q 14637,12420,6855 1 3697
-r 11220,12420,150 0 3698
-s 9759,12420,390 0 3699
-t 9759,15585,390 0 3700
-u 15612,12420,390 0 3701
-v 14148,12180,390 0 3702
-w 20004,12180,390 0 3703
-x 14148,12180,150 0 3704
-y 13662,12180,6705 1 3705
-z 12684,12870,150 0 3706
-lC 13173,19935,6210 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 13173,19935,6210 3 3709
-} "
-ti 26346,9435 0 51876
-char192 20004,24810,150 2 3776
-`A "
-char194 20004,24810,150 2 3778
-^A "
-char200 16587,24810,150 2 3784
-`E "
-char202 16587,24810,150 2 3786
-^E "
-char203 16587,23505,150 2 3787
-:E "
-char206 10245,24810,150 2 3790
-^I "
-char207 10245,23505,150 2 3791
-:I "
-char180 13173,20475 2 3764
-aa "
-ga 13173,20475 2 3680
-a^ 13173,20475 2 3678
-^ "
-char168 13173,18090 0 3752
-ad "
-a~ 13173,18324 2 3710
-~ "
-char217 21468,24810,390 2 3801
-`U "
-char219 21468,24810,390 2 3803
-^U "
-char221 18540,24810,150 2 3805
-'Y "
-char253 13662,20475,6705 3 3837
-'y "
-char176 13173,17415 0 3760
-de "
-char199 20004,18555,6405 3 3783
-,C "
-char231 11220,12420,5694 0 3815
-,c "
-char209 22443,23973,612 2 3793
-~N "
-char241 15612,18324,150 2 3825
-~n "
-char161 7317,12330,7008 1 3745
-r! "
-char191 10245,12330,7008 1 3775
-r? "
-char164 13173,15834 0 3748
-Cs "
-char163 13173,17805,390 0 3747
-Po "
-char165 13173,18315,150 2 3749
-Ye "
-char167 13173,18555,6705 3 3751
-sc "
-Fn 13173,20250,6705 3 51871
-char162 13173,18012,57 0 3746
-ct "
-char226 12198,20475,390 2 3810
-^a "
-char234 11709,20475,390 2 3818
-^e "
-char244 14148,20475,390 2 3828
-^o "
-char251 15612,20475,390 2 3835
-^u "
-char225 12198,20475,390 2 3809
-'a "
-char233 11709,20475,390 2 3817
-'e "
-char243 14148,20475,390 2 3827
-'o "
-char250 15612,20475,390 2 3834
-'u "
-char224 12198,20475,390 2 3808
-`a "
-char232 11709,20475,390 2 3816
-`e "
-char242 14148,20475,390 2 3826
-`o "
-char249 15612,20475,390 2 3833
-`u "
-char228 12198,18090,390 0 3812
-:a "
-char235 11709,18090,390 0 3819
-:e "
-char246 14148,18090,390 0 3830
-:o "
-char252 15612,18090,390 0 3836
-:u "
-char197 20004,25065,150 2 3781
-oA "
-char238 7806,20475,150 2 3822
-^i "
-char216 22932,18729,390 2 3800
-/O "
-char198 25857,18315,150 2 3782
-AE "
-char229 12198,19836,390 2 3813
-oa "
-char237 7806,20475,150 2 3821
-'i "
-char248 14148,12525,804 0 3832
-/o "
-char230 18051,12420,390 0 3814
-ae "
-char196 20004,23505,150 2 3780
-:A "
-char236 7806,20475,150 2 3820
-`i "
-char214 22932,23505,390 2 3798
-:O "
-char220 21468,23505,390 2 3804
-:U "
-char201 16587,24810,150 2 3785
-'E "
-char239 7806,18090,150 0 3823
-:i "
-char223 15612,20250,390 2 3807
-ss "
-char212 22932,24810,390 2 3796
-^O "
-char193 20004,24810,150 2 3777
-'A "
-char195 20004,23973,150 2 3779
-~A "
-char227 12198,18324,390 2 3811
-~a "
-char208 21954,18555,150 2 3792
--D "
-char240 14148,20250,390 2 3824
-Sd "
-char205 10245,24810,150 2 3789
-'I "
-char204 10245,24810,150 2 3788
-`I "
-char211 22932,24810,390 2 3795
-'O "
-char210 22932,24810,390 2 3794
-`O "
-char213 22932,23973,390 2 3797
-~O "
-char245 14148,18324,390 2 3829
-~o "
-vS 14148,24810,390 2 51795
-vs 9759,20475,390 2 51827
-char218 21468,24810,390 2 3802
-'U "
-:Y 18540,23505,150 2 51801
-char255 13662,18090,6705 1 3839
-:y "
-char222 16587,18315,153 2 3806
-TP "
-char254 14637,20250,6855 3 3838
-Tp "
-char181 14637,10800,5193 0 3765
-char182 13173,19635,4200 2 3766
-ps "
-char190 21954,17805,390 0 3774
-34 "
-\- 21954,7755 0 51757
-char188 21954,17805,390 0 3772
-14 "
-char189 21954,17805,390 0 3773
-12 "
-char170 12198,17805 0 3754
-Of "
-char186 12198,17805 0 3770
-Om "
-char171 12684,10605 0 3755
-Fo "
-char187 12684,10605 0 3771
-Fc "
-char177 21954,13467,3354 0 3761
-char166 13173,19083,5916 2 3750
-bb "
-char169 13173,19725 2 3753
-co "
-char172 21954,10560 0 3756
-no "
-char174 13173,19725 2 3758
-rg "
-char178 9270,17805 0 3762
-S2 "
-char179 9270,17805 0 3763
-S3 "
-char184 13173,57,5694 0 3768
-ac "
-char185 9270,17805 0 3769
-S1 "
-char215 21954,13470,144 0 3799
-char247 21954,13383,3 0 3831
-char183 7317,10722 0 3767
-pc "
-fm 13173,17805 0 51873
-sd 13173,17805 0 51874
-dg 13173,18555,6579 3 51755
-tm 16101,17550 0 51796
-ah 13173,20475 2 51935
-ao 13173,19836 2 51930
-f/ 2928,17805,390 0 51759
-em 21954,7185 0 51789
-en 13173,7185 0 51790
-dd 13173,18555,4905 2 51773
-.i 7806,12420,150 0 51957
-aq 6831,18987 2 3623
-bu 13173,14226 0 51889
-'C 20004,24810,390 2 20166
-'c 11220,20475,390 2 20198
-lq 12198,18555 2 51838
-rq 12198,18555 2 51746
-Bq 12198,3714,3519 0 51772
-vz 12684,20475,150 2 51834
-fi 15612,20250,150 2 51881
-fl 15612,20250,150 2 51882
-ff 17076,20250,150 2 51883
-Fi 23418,20250,150 2 51884
-Fl 23418,20250,150 2 51885
-ij 15126,19329,6705 3 51958
-bq 6831,3714,3519 0 51756
-%0 30249,17805,180 0 51901
-char175 13173,17088 0 3759
-a- "
-ab 13173,17079 0 51926
-a. 13173,18471 2 51927
-oe 20979,12420,390 0 51823
-OE 28299,18555,390 2 51791
-fo 8295,10605 0 51886
-fc 8295,10605 0 51887
-sq 19029,15624 0 51899
-/L 16101,18315,150 2 51944
-/l 7806,20250,150 2 51960
-a" 13173,20475 2 51933
-ho 13173,993,4317 0 51934
-vZ 17565,24810,150 2 51802
-IJ 20004,18315,6363 3 51942
diff --git a/contrib/groff/font/devlj4/GBI b/contrib/groff/font/devlj4/GBI
deleted file mode 100644
index 806237c0bd4b..000000000000
--- a/contrib/groff/font/devlj4/GBI
+++ /dev/null
@@ -1,752 +0,0 @@
-name GBI
-spacewidth 6831
-slant 16.300000
-pcltypeface 4197
-pclproportional 1
-pclweight 3
-pclstyle 1
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -4878
-P . -4389
-P , -4389
-V A -4389
-A V -4389
-T o -4389
-T r -3414
-T c -3903
-T e -3903
-T d -3903
-T s -3414
-T y -3903
-T a -3903
-T w -3903
-T u -3414
-L T -3414
-L Y -3903
-Y o -3903
-Y e -3903
-Y a -4389
-A W -4389
-W A -3414
-T A -3414
-V o -2925
-V e -2925
-V a -3414
-Y A -4389
-F A -2439
-F . -3903
-F , -3903
-A T -3414
-A Y -3903
-v . -1461
-v , -1461
-y . -975
-y , -975
-T . -3414
-T , -3414
-L W -4878
-P A -2925
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -2439
-W e -2439
-W a -2925
-W . -3414
-W , -3414
-r . -1950
-r , -1950
-w . -1461
-w , -1461
-Y u -2925
-A v -1950
-A y -1950
-A w -1950
-o . -975
-o , -975
-p . -975
-p , -975
-b . -1950
-b , -1950
-O T -1950
-O V -1950
-O Y -1950
-O . -975
-O , -975
-L y -2925
-L O -1950
-L G -1950
-L C -1950
-L Q -1950
-V y -1950
-V u -1950
-V O -975
-V G -975
-V C -975
-V Q -975
-D T -1950
-D V -1950
-D Y -1950
-D . -975
-D , -975
-Y O -975
-Y G -975
-Y C -975
-Y Q -975
-F o -975
-F e -975
-F a -975
-O A -975
-O W -1950
-L U -1950
-R T -1950
-R V -1950
-R Y -1950
-R W -1950
-G T -975
-P o -975
-P e -975
-P a -1461
-D A -975
-D W -1950
-B T -975
-B Y -975
-B . -975
-B , -975
-A O -1461
-A G -1461
-A C -1461
-A U -1950
-A Q -1461
-W r -1461
-W y -1461
-W u -1461
-W O -975
-W G -975
-W C -975
-W Q -975
-J A -486
-J . -486
-J , -486
-U A -1461
-U . -1461
-U , -1461
-Q A -975
-Q W -1950
-T O -975
-T G -975
-T C -975
-T Q -975
-O X -975
-L o -975
-L e -975
-L q -486
-G V -975
-G Y -975
-G W -975
-P T -975
-P V -975
-P Y -975
-C T -486
-C V -486
-C Y -486
-D X -975
-B V -975
-B X -975
-B A -975
-B W -975
-X o -975
-X e -975
-X y -1461
-X O -975
-X G -975
-X C -975
-X Q -975
-A o -975
-A e -975
-Q X -975
-K o -975
-K e -975
-K y -1461
-K w -1461
-K O -975
-K G -975
-K C -975
-K Q -975
-o v -975
-o y -975
-o x -975
-o w -975
-h v -486
-h y -486
-n v -486
-n y -486
-m v -486
-m y -486
-p v -486
-p y -486
-p x -486
-v o -486
-b v -486
-b y -486
-b w -486
-y o -486
-x o -975
-x c -486
-x e -486
-x d -486
-x a -486
-x q -486
-w o -975
-w g -486
-w c -486
-w d -486
-w a -486
-w q -486
-T i -975
-L a -486
-R o -975
-R y -975
-R O -975
-R G -975
-R C -975
-R U -975
-R Q -975
-P Z -975
-P X -975
-P W -975
-C W -486
-V i -975
-Y i -975
-X a -486
-A g -486
-A c -975
-A d -975
-A a -486
-A q -486
-W i -975
-K c -975
-o f -486
-h w -486
-h . -486
-h , -486
-n w -486
-n . -486
-n , -486
-m w -486
-m . -486
-m , -486
-r o -975
-r c -975
-r e -975
-r d -975
-r a -975
-r q -975
-p w -486
-f o -486
-w e -486
-w s -486
-k o -486
-O Z -975
-L J -486
-R e -975
-R a -486
-E o -486
-E v -486
-E y -486
-E w -486
-Z o -975
-Z e -975
-Z d -975
-Z y -1461
-Z a -486
-Z w -1461
-Z O -975
-Z G -975
-Z C -975
-Z Q -975
-D Z -975
-B Z -975
-A J -486
-J o -486
-K a -486
-t o -486
-o t -486
-o g -486
-o z -486
-o j -486
-g o -486
-v y -486
-v x -486
-v w -486
-z o -486
-w t -486
-w h -486
-w n -486
-w m -486
-w l -486
-w r -486
-w i -486
-w p -486
-w v -486
-w z -486
-w b -486
-w y -486
-w f -486
-w x -486
-w w -486
-w j -486
-w u -486
-w k -486
-R J -486
-C o -486
-E T -486
-E V -486
-E Y -486
-E W -486
-E U -486
-B o -486
-B y -486
-B U -486
-U o -486
-L cq -4878
-L ' -4878
-T char173 -3903
-T hy -3903
-T - -3903
-T en -3903
-T em -3903
-A cq -2439
-A ' -2439
-char173 T -3903
-hy T -3903
-- T -3903
-en T -3903
-em T -3903
-Y char173 -2925
-Y hy -2925
-Y - -2925
-Y en -2925
-Y em -2925
-p cq -486
-p ' -486
-b cq -975
-b ' -975
-V char173 -1950
-V hy -1950
-V - -1950
-V en -1950
-V em -1950
-h cq -486
-h ' -486
-n cq -486
-n ' -486
-m cq -486
-m ' -486
-R cq -975
-R ' -975
-W char173 -1461
-W hy -1461
-W - -1461
-W en -1461
-W em -1461
-cq d -975
-' d -975
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1461
-A hy -1461
-A - -1461
-A en -1461
-A em -1461
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1461
-hy A -1461
-- A -1461
-en X -1461
-en A -1461
-em X -1461
-R char173 -975
-R hy -975
-R - -975
-R en -975
-R em -975
-v cq -486
-v ' -486
-w cq -486
-w ' -486
-E cq -486
-E ' -486
-Z char173 -1461
-Z hy -1461
-Z - -1461
-Z en -1461
-Z em -1461
-B cq -486
-B ' -486
-w char173 -486
-w hy -486
-w - -486
-w en -486
-w em -486
-charset
-! 6831,18717,390,2859,345,962 2 3617
-dq 11220,18555,0,1827,-2346,962 2 3618
-" "
-sh 13173,17415,390,1542,33,962 0 3619
-# "
-Do 13173,19182,2292,1161,255,962 2 3620
-$ "
-% 21954,17805,582,0,-1386 0 3621
-& 18540,18555,390,1743,-672,962 2 3622
-cq 6831,18555,0,2763,-1368,962 2 51751
-' "
-( 7806,20172,6930,4779,306,962 3 3624
-) 7806,20172,6930,822,4263,822 3 3625
-* 13173,18555,0,1908,-1731,962 2 3626
-+ 21954,13467,87,0,-2871 0 3627
-, 6831,3381,4077,0,687 0 3628
-char173 6831,7575,0,882,558,882 0 3629
-hy "
-- "
-. 6831,3486,390,0,-270 0 3630
-sl 13173,18594,390,4080,1101,962 2 3631
-/ "
-0 13173,17805,390,1212,-213,962 0 3632
-1 13173,17805,150,279,-567,279 0 3633
-2 13173,17805,150,1017,1179,962 0 3634
-3 13173,17805,390,336,1731,336 0 3635
-4 13173,17805,0,1485,699,962 0 3636
-5 13173,17415,390,1881,-714,962 0 3637
-6 13173,17805,390,1575,111,962 0 3638
-7 13173,17415,390,2856,-1332,962 0 3639
-8 13173,17805,390,1428,21,962 0 3640
-9 13173,17805,390,1536,72,962 0 3641
-: 6831,12177,390,1032,-270,962 0 3642
-; 6831,12177,4077,1032,687,962 0 3643
-< 26346,16068,0,0,-3981 0 3644
-= 21954,9654,0,0,-2877 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 10245,18705,390,2250,-1023,962 2 3647
-at 21954,16950,4131,1743,1035,962 0 3648
-@ "
-A 19515,18555,195,15,1764,15 2 3649
-B 16587,18555,195,1047,1806,962 2 3650
-C 19515,18555,390,2028,-837,962 2 3651
-D 20490,18555,195,1566,1323,962 2 3652
-E 16587,18360,195,1848,1476,962 2 3653
-F 15126,18360,195,3372,1542,962 2 3654
-G 20979,18555,390,1476,-1074,962 2 3655
-H 21468,18360,195,3429,1671,962 2 3656
-I 10245,18360,195,3429,1542,962 2 3657
-J 9270,18360,6219,3918,4407,962 3 3658
-K 19029,18360,195,2877,1482,962 2 3659
-L 16587,18360,195,900,1431,900 2 3660
-M 22932,18360,195,2907,2571,962 2 3661
-N 20979,18360,195,3810,1401,962 2 3662
-O 21954,18555,390,1014,-807,962 2 3663
-P 16587,18555,195,1896,1236,962 2 3664
-Q 21954,18555,6639,1014,-807,962 3 3665
-R 19515,18555,195,63,1344,63 2 3666
-S 13173,18555,390,2022,732,962 2 3667
-T 18051,19425,195,4188,-1452,962 2 3668
-U 21468,18360,390,3498,-1761,962 2 3669
-V 19515,18360,390,3597,-1551,962 2 3670
-W 26346,18360,390,4203,-1437,962 2 3671
-X 19029,18360,195,3300,1851,962 2 3672
-Y 19515,18360,195,3228,-2169,962 2 3673
-Z 17565,19425,195,1575,285,962 2 3674
-lB 7806,18165,4614,4290,2805,962 0 3675
-[ "
-rs 13173,18717,390,0,-2868 2 3676
-\ "
-rB 7806,18165,4614,3402,3693,962 0 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,962 3 3679
-oq 6831,18555,0,3195,-1800,962 2 51808
-` "
-a 13662,13143,390,1143,663,962 0 3681
-b 14637,20250,390,714,351,714 2 3682
-c 11220,12420,390,1695,438,962 0 3683
-d 14637,20250,390,2610,417,962 2 3684
-e 11220,12420,390,1365,429,962 0 3685
-f 7806,20250,6705,5985,4074,962 3 3686
-g 12684,12420,6705,2031,2331,962 1 3687
-h 14637,20250,390,555,657,555 2 3688
-i 8295,18765,390,1344,498,962 2 3689
-j 7806,18765,6705,2169,3789,962 3 3690
-k 14148,20250,390,858,426,858 2 3691
-l 7806,20250,390,2595,252,962 2 3692
-m 21468,12420,390,291,255,291 0 3693
-n 14637,12420,390,486,57,486 0 3694
-o 12684,12420,390,459,339,459 0 3695
-p 14637,13893,6735,639,3318,639 1 3696
-q 14148,12420,6900,1143,501,962 1 3697
-r 10245,12420,0,2187,390,962 0 3698
-s 8781,12420,390,873,903,873 0 3699
-t 8295,14937,390,2001,312,962 0 3700
-u 14148,12420,390,813,111,813 0 3701
-v 15126,12420,390,759,324,759 0 3702
-w 20490,12420,390,1065,462,962 0 3703
-x 12684,12420,390,1731,1635,962 0 3704
-y 13173,12420,6705,1029,1767,962 1 3705
-z 11220,12885,195,2064,2046,962 0 3706
-lC 13173,19935,6210,3339,-972,962 2 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 13173,19935,6210,63,2304,63 2 3709
-} "
-ti 26346,9435,0,0,-4029 0 51876
-char192 19515,24843,195,15,1764,15 2 3776
-`A "
-char194 19515,25182,195,15,1764,15 2 3778
-^A "
-char200 16587,24843,195,1848,1476,962 2 3784
-`E "
-char202 16587,25182,195,1848,1476,962 2 3786
-^E "
-char203 16587,23439,195,1848,1476,962 2 3787
-:E "
-char206 10245,25182,195,4377,1542,962 2 3790
-^I "
-char207 10245,23439,195,3792,1542,962 2 3791
-:I "
-char180 13173,19668,0,1317,-6054,962 2 3764
-aa "
-ga 13173,19668,0,0,-2961 2 3680
-a^ 13173,20514,0,285,-3393,285 2 3678
-^ "
-char168 13173,18057,0,1161,-3669,962 0 3752
-ad "
-a~ 13173,18468,0,1074,-3600,962 2 3710
-~ "
-char217 21468,24843,390,3498,-1761,962 2 3801
-`U "
-char219 21468,25182,390,3498,-1761,962 2 3803
-^U "
-char221 19515,24843,195,3228,-2169,962 2 3805
-'Y "
-char253 13173,19668,6705,1317,1767,962 3 3837
-'y "
-char176 13173,17415,0,600,-1974,600 0 3760
-de "
-char199 19515,18555,6060,2028,-837,962 2 3783
-,C "
-char231 11220,12420,4776,1695,438,962 0 3815
-,c "
-char209 20979,24255,195,3810,1401,962 2 3793
-~N "
-char241 14637,18468,390,486,57,486 2 3825
-~n "
-char161 6831,12411,6696,834,2370,834 1 3745
-r! "
-char191 10245,12405,6690,0,1686 1 3775
-r? "
-char164 13173,15834,0,2349,1044,962 0 3748
-Cs "
-char163 13173,17262,390,951,1173,951 0 3747
-Po "
-char165 13173,18090,150,3885,-1269,962 0 3749
-Ye "
-char167 13173,18555,6705,525,-69,525 3 3751
-sc "
-Fn 13173,20250,6705,3279,1419,962 3 51871
-char162 13173,17613,417,1263,-1290,962 0 3746
-ct "
-char226 13662,20514,390,1143,663,962 2 3810
-^a "
-char234 11220,20514,390,1365,429,962 2 3818
-^e "
-char244 12684,20514,390,531,339,531 2 3828
-^o "
-char251 14148,20514,390,813,111,813 2 3835
-^u "
-char225 13662,19668,390,1143,663,962 2 3809
-'a "
-char233 11220,19668,390,2295,429,962 2 3817
-'e "
-char243 12684,19668,390,1563,339,962 2 3827
-'o "
-char250 14148,19668,390,831,111,831 2 3834
-'u "
-char224 13662,19668,390,1143,663,962 2 3808
-`a "
-char232 11220,19668,390,1365,429,962 2 3816
-`e "
-char242 12684,19668,390,459,339,459 2 3826
-`o "
-char249 14148,19668,390,813,111,813 2 3833
-`u "
-char228 13662,18057,390,1143,663,962 0 3812
-:a "
-char235 11220,18057,390,2139,429,962 0 3819
-:e "
-char246 12684,18057,390,1407,339,962 0 3830
-:o "
-char252 14148,18057,390,813,111,813 0 3836
-:u "
-char197 19515,24900,195,15,1764,15 2 3781
-oA "
-char238 8295,20514,390,2724,459,962 2 3822
-^i "
-char216 21954,18555,390,1125,-696,962 2 3800
-/O "
-char198 25857,18360,195,870,2910,870 2 3782
-AE "
-char229 13662,18861,390,1377,663,962 2 3813
-oa "
-char237 8295,19668,390,3756,459,962 2 3821
-'i "
-char248 12684,12420,390,552,444,552 0 3832
-/o "
-char230 18540,13047,390,1296,477,962 0 3814
-ae "
-char196 19515,23439,195,15,1764,15 2 3780
-:A "
-char236 8295,19668,390,663,459,663 2 3820
-`i "
-char214 21954,23439,390,1014,-807,962 2 3798
-:O "
-char220 21468,23439,390,3498,-1761,962 2 3804
-:U "
-char201 16587,24843,195,1848,1476,962 2 3785
-'E "
-char239 8295,18057,390,3600,459,962 0 3823
-:i "
-char223 14148,20250,6705,2916,4902,962 3 3807
-ss "
-char212 21954,25182,390,1014,-807,962 2 3796
-^O "
-char193 19515,24843,195,15,1764,15 2 3777
-'A "
-char195 19515,24255,195,648,1764,648 2 3779
-~A "
-char227 13662,18468,390,1143,663,962 2 3811
-~a "
-char208 20490,18555,342,1557,1314,962 2 3792
--D "
-char240 12684,20250,390,600,339,600 2 3824
-Sd "
-char205 10245,24843,195,3540,1542,962 2 3789
-'I "
-char204 10245,24843,195,3429,1542,962 2 3788
-`I "
-char211 21954,24843,390,1014,-807,962 2 3795
-'O "
-char210 21954,24843,390,1014,-807,962 2 3794
-`O "
-char213 21954,24255,390,1014,-807,962 2 3797
-~O "
-char245 12684,18468,390,1320,339,962 2 3829
-~o "
-vS 13173,24657,390,3903,732,962 2 51795
-vs 8781,20526,390,4242,903,962 2 51827
-char218 21468,24843,390,3498,-1761,962 2 3802
-'U "
-:Y 19515,23439,195,3228,-2169,962 2 51801
-char255 13173,18057,6705,1161,1767,962 1 3839
-:y "
-char222 16587,18360,195,846,1221,846 2 3806
-TP "
-char254 14637,20250,6900,663,3342,663 3 3838
-Tp "
-char181 14637,10800,5193,582,756,582 0 3765
-char182 13173,19635,4200,1032,-690,962 2 3766
-ps "
-char190 21954,17805,180,0,-627 0 3774
-34 "
-\- 21954,7755,0,0,-2892 0 51757
-char188 21954,17625,180,0,-1242 0 3772
-14 "
-char189 21954,17625,180,0,-1317 0 3773
-12 "
-char170 11220,17805,0,1833,-1338,962 0 3754
-Of "
-char186 11220,17805,0,1218,-1776,962 0 3770
-Om "
-char171 11220,9906,0,837,609,837 0 3755
-Fo "
-char187 11220,9906,0,435,1011,435 0 3771
-Fc "
-char177 21954,13467,3354,0,-2865 0 3761
-char166 13173,19083,5916,0,-4596 2 3750
-bb "
-char169 13173,19725,0,5022,-3198,962 2 3753
-co "
-char172 21954,10560,0,0,-2565 0 3756
-no "
-char174 13173,19725,0,5022,-3198,962 2 3758
-rg "
-char178 8781,17805,0,2001,-606,962 0 3762
-S2 "
-char179 8781,17805,0,1881,-387,962 0 3763
-S3 "
-char184 13173,657,4776,0,-1791 0 3768
-ac "
-char185 8781,17625,0,1389,-1590,962 0 3769
-S1 "
-char215 21954,13530,192,0,-2934 0 3799
-char247 21954,13383,3,0,-2886 0 3831
-char183 6831,10533,0,336,-1116,336 0 3767
-pc "
-fm 13173,17415,0,0,-1461 0 51873
-sd 13173,17415,0,1680,-1461,962 0 51874
-dg 13173,18555,6657,1035,186,962 3 51755
-tm 16101,17550,0,5508,-3159,962 0 51796
-ah 13173,20526,0,2367,-5475,962 2 51935
-ao 13173,18861,0,285,-5313,285 2 51930
-f/ 2928,17625,180,8301,6948,962 0 51759
-em 21954,7185,0,666,-45,666 0 51789
-en 13173,7185,0,537,-72,537 0 51790
-dd 13173,18555,4989,990,243,962 2 51773
-.i 8295,12420,390,288,459,288 0 51957
-aq 6831,18555,0,2289,-2826,962 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 19515,24843,390,2028,-837,962 2 20166
-'c 11220,19668,390,1995,438,962 2 20198
-lq 11220,18555,0,4245,-1419,962 2 51838
-rq 11220,18555,0,3423,-597,962 2 51746
-Bq 11220,3456,4002,0,3399 0 51772
-vz 11220,20526,195,3345,2046,962 2 51834
-fi 14637,20250,6705,1566,3645,962 3 51881
-fl 14637,20250,6705,2934,3735,962 3 51882
-ff 14637,20250,6705,5373,3861,962 3 51883
-Fi 21468,20250,6705,1701,3675,962 3 51884
-Fl 21468,20250,6705,2832,3765,962 3 51885
-ij 14637,18765,6705,2169,498,962 3 51958
-bq 6831,3456,4002,0,2925 0 51756
-%0 30249,17805,450,0,-1386 0 51901
-char175 13173,16974,0,438,-4107,438 0 3759
-a- "
-ab 13173,17325,0,1386,-5277,962 0 51926
-a. 13173,18057,0,0,-6510 0 51927
-oe 19029,12420,390,1338,357,962 0 51823
-OE 27321,18555,390,1932,-528,962 2 51791
-fo 6831,9906,0,999,792,962 0 51886
-fc 6831,9906,0,423,1368,423 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 16587,18360,195,900,1431,900 2 51944
-/l 7806,20250,390,2580,444,962 2 51960
-a" 13173,19830,0,3630,-3816,962 2 51933
-ho 13173,711,4791,0,-4011 0 51934
-vZ 17565,24657,195,1707,285,962 2 51802
-IJ 19515,18360,6219,3918,1542,962 3 51942
diff --git a/contrib/groff/font/devlj4/GI b/contrib/groff/font/devlj4/GI
deleted file mode 100644
index 6ca18930f226..000000000000
--- a/contrib/groff/font/devlj4/GI
+++ /dev/null
@@ -1,686 +0,0 @@
-name GI
-spacewidth 6342
-slant 16.400000
-pcltypeface 4197
-pclproportional 1
-pclweight 0
-pclstyle 1
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -3903
-P . -4389
-P , -4389
-V A -3414
-A V -3414
-T o -4878
-T r -3414
-T c -4389
-T e -4389
-T d -4389
-T s -3414
-T y -4389
-T a -3903
-T w -4389
-T u -3414
-L T -3903
-L Y -3414
-Y o -3903
-Y e -3903
-Y a -3903
-A W -3414
-W A -3414
-T A -3414
-V o -2925
-V e -2925
-V a -2925
-Y A -3414
-F A -2439
-F . -3903
-F , -3903
-A T -3414
-A Y -3414
-v . -1461
-v , -1461
-y . -975
-y , -975
-T . -3414
-T , -3414
-L W -3414
-P A -2925
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -2925
-W e -2925
-W a -2925
-W . -3903
-W , -3903
-r . -1950
-r , -1950
-w . -1461
-w , -1461
-Y u -2439
-A v -1950
-A y -1950
-A w -1950
-o . -1461
-o , -1461
-p . -975
-p , -975
-b . -1950
-b , -1950
-O T -1950
-O V -1950
-O Y -1950
-O . -975
-O , -975
-V y -1461
-V u -1461
-V O -975
-V G -975
-V C -975
-V Q -975
-D T -1950
-D V -1950
-D Y -1950
-D . -975
-D , -975
-Y O -975
-Y G -975
-Y C -975
-Y Q -975
-F o -1461
-F e -975
-F a -975
-O A -975
-O W -1950
-R T -2925
-R V -2925
-R Y -2925
-R W -2925
-G T -975
-P o -1461
-P e -1461
-P a -1461
-D A -975
-D W -1950
-B T -975
-B Y -975
-B . -975
-B , -975
-A O -1950
-A G -1950
-A C -1950
-A U -1950
-A Q -1950
-W r -1461
-W y -1461
-W u -1461
-W O -975
-W G -975
-W C -975
-W Q -975
-U A -975
-U . -975
-U , -975
-Q A -975
-Q W -1950
-T O -975
-T G -975
-T C -975
-T Q -975
-O X -975
-L o -486
-G V -975
-G Y -975
-G W -975
-P T -975
-P V -975
-P Y -975
-D X -975
-B V -975
-B X -975
-B A -975
-B W -975
-F r -486
-F y -486
-F u -486
-F O -486
-F G -486
-F C -486
-F Q -486
-X o -1461
-X e -1461
-X y -1461
-X O -975
-X G -975
-X C -975
-X Q -975
-A o -1461
-A e -1461
-Q X -975
-K o -1461
-K e -975
-K y -975
-K w -975
-K O -975
-K G -975
-K C -975
-K Q -975
-o v -486
-o y -486
-o x -486
-o w -486
-v o -486
-y o -486
-x o -975
-x c -486
-x e -486
-x d -486
-x a -486
-x q -486
-w o -486
-R o -1461
-R y -1461
-R O -1461
-R G -1461
-R C -1461
-R U -1461
-R Q -1461
-P Z -975
-P X -975
-P W -975
-X a -486
-A t -975
-A g -486
-A c -1461
-A d -975
-A a -486
-A q -486
-K c -975
-o f -486
-h . -486
-h , -486
-n . -486
-n , -486
-m . -486
-m , -486
-r o -975
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-f o -486
-k o -486
-O Z -975
-R e -1461
-R a -486
-G Z -975
-E o -486
-Z o -975
-Z e -486
-Z d -486
-Z y -486
-Z a -486
-Z w -486
-Z O -486
-Z G -486
-Z C -486
-Z Q -486
-D Z -975
-B Z -975
-J o -486
-K a -486
-t o -486
-o t -486
-o g -486
-o z -486
-o j -486
-g o -486
-z o -486
-C o -486
-E T -486
-E V -486
-E Z -486
-E Y -486
-E W -486
-B o -486
-U o -486
-L cq -4878
-L ' -4878
-T char173 -4389
-T hy -4389
-T - -4389
-T en -4389
-T em -4389
-A cq -2439
-A ' -2439
-char173 T -3414
-hy T -3414
-- T -3414
-en T -3414
-em T -3414
-Y char173 -2439
-Y hy -2439
-Y - -2439
-Y en -2439
-Y em -2439
-p cq -486
-p ' -486
-b cq -975
-b ' -975
-V char173 -1461
-V hy -1461
-V - -1461
-V en -1461
-V em -1461
-h cq -486
-h ' -486
-n cq -486
-n ' -486
-m cq -486
-m ' -486
-R cq -1950
-R ' -1950
-W char173 -1461
-W hy -1461
-W - -1461
-W en -1461
-W em -1461
-cq d -975
-' d -975
-F char173 -486
-F hy -486
-F - -486
-F en -486
-F em -486
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1950
-A hy -1950
-A - -1950
-A en -1950
-A em -1950
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1461
-hy A -1461
-- A -1461
-en X -1461
-en A -1461
-em X -1461
-R char173 -1461
-R hy -1461
-R - -1461
-R en -1461
-R em -1461
-v cq -486
-v ' -486
-w cq -486
-w ' -486
-E cq -486
-E ' -486
-Z cq -975
-Z ' -975
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-B cq -486
-B ' -486
-charset
-! 6342,18648,390,2823,786,910 2 3617
-dq 11220,18555,0,2325,-3858,910 2 3618
-" "
-sh 12684,17805,390,1377,-72,910 0 3619
-# "
-Do 12684,19380,2415,1467,-54,910 2 3620
-$ "
-% 20490,17805,180,252,-1311,252 0 3621
-& 18051,18555,390,1461,9,910 2 3622
-cq 6342,18555,0,2622,-1662,910 2 51751
-' "
-( 6342,20283,6705,5652,855,910 3 3624
-) 6342,20283,6705,1701,4806,910 3 3625
-* 12684,18555,0,2358,-2589,910 2 3626
-+ 20490,13191,261,0,-2496 0 3627
-, 6342,3300,3891,0,1584 0 3628
-char173 6342,6960,0,438,183,438 0 3629
-hy "
-- "
-. 6342,2985,390,0,861 0 3630
-sl 13173,20250,225,4644,1500,910 2 3631
-/ "
-0 12684,17805,390,1482,-354,910 0 3632
-1 12684,17415,150,0,-843 0 3633
-2 12684,17805,0,633,216,633 0 3634
-3 12684,17805,390,588,1335,588 0 3635
-4 12684,17805,0,1158,18,910 0 3636
-5 12684,17415,390,780,-183,780 0 3637
-6 12684,17805,390,2220,-102,910 0 3638
-7 12684,17415,390,2988,-888,910 0 3639
-8 12684,17805,390,1620,-105,910 0 3640
-9 12684,17805,390,1731,-126,910 0 3641
-: 6342,11586,390,1044,861,910 0 3642
-; 6342,11586,3891,1251,1584,910 0 3643
-< 26346,16068,0,0,-3981 0 3644
-= 20490,8883,0,0,-2688 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 9270,18648,390,2514,-396,910 2 3647
-at 20619,16980,3654,2277,1044,910 0 3648
-@ "
-A 18540,18555,150,0,2757 2 3649
-B 15126,18555,150,1614,1335,910 2 3650
-C 18540,18555,390,2820,-795,910 2 3651
-D 20004,18555,150,1380,1872,910 2 3652
-E 15612,18315,150,1824,1827,910 2 3653
-F 13173,18315,150,3717,1683,910 2 3654
-G 20490,18555,390,1182,-873,910 2 3655
-H 20490,18315,150,3783,1785,910 2 3656
-I 8781,18315,150,3582,1641,910 2 3657
-J 8295,18315,5814,3522,4017,910 2 3658
-K 18051,18315,150,2922,1755,910 2 3659
-L 15612,18315,150,345,1536,345 2 3660
-M 20490,18315,150,3192,2418,910 2 3661
-N 19515,18315,150,3774,1101,910 2 3662
-O 20979,18555,390,1308,-624,910 2 3663
-P 14637,18555,150,2430,1737,910 2 3664
-Q 20979,18555,6027,1248,-684,910 2 3665
-R 18051,18555,150,0,1965 2 3666
-S 12198,18555,390,1974,759,910 2 3667
-T 16101,19185,150,4656,-1578,910 2 3668
-U 20004,18315,390,3312,-1641,910 2 3669
-V 19029,18315,390,5280,-2376,910 2 3670
-W 25371,18315,390,5025,-2190,910 2 3671
-X 18540,18315,150,3168,1833,910 2 3672
-Y 17565,18315,150,5103,-1386,910 2 3673
-Z 16587,19557,0,1626,78,910 2 3674
-lB 6342,18165,5160,4749,3360,910 0 3675
-[ "
-rs 13173,20250,225,0,-3234 2 3676
-\ "
-rB 6342,18165,5160,3387,4722,910 0 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,910 3 3679
-oq 6342,18555,0,3606,-2646,910 2 51808
-` "
-a 12198,11670,390,687,1335,687 0 3681
-b 12684,20253,390,1776,216,910 2 3682
-c 9759,11670,390,1668,495,910 0 3683
-d 13173,20250,390,2223,915,910 2 3684
-e 9759,11670,390,1515,687,910 0 3685
-f 7317,20250,6705,6675,5391,910 3 3686
-g 11220,11670,6705,1806,1908,910 1 3687
-h 12684,20250,390,801,1086,801 2 3688
-i 7806,18495,390,1020,24,910 2 3689
-j 6342,18495,6705,2055,4209,910 3 3690
-k 13173,20250,390,657,957,657 2 3691
-l 7317,20250,390,1938,606,910 2 3692
-m 21468,11670,390,345,342,345 0 3693
-n 14637,11670,390,513,309,513 0 3694
-o 12198,11670,390,423,288,423 0 3695
-p 12198,13440,6855,963,3558,910 1 3696
-q 12684,11670,6855,1458,1005,910 1 3697
-r 10245,11670,0,2121,417,910 0 3698
-s 7806,11670,390,1242,1449,910 0 3699
-t 8295,13944,390,1638,75,910 0 3700
-u 13662,11670,390,576,381,576 0 3701
-v 13662,11670,390,1317,423,910 0 3702
-w 19029,11670,390,1209,393,910 0 3703
-x 12198,11670,390,936,1476,910 0 3704
-y 11709,11670,6705,867,2037,867 1 3705
-z 11220,12315,0,1359,1530,910 0 3706
-lC 11709,19935,6210,3360,-1692,910 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 11709,19935,6210,0,2232 3 3709
-} "
-ti 26346,8952,0,0,-4029 0 51876
-char192 18540,24930,150,0,2757 2 3776
-`A "
-char194 18540,24915,150,438,2757,438 2 3778
-^A "
-char200 15612,24930,150,1824,1827,910 2 3784
-`E "
-char202 15612,24915,150,1824,1827,910 2 3786
-^E "
-char203 15612,22620,150,1824,1827,910 2 3787
-:E "
-char206 8781,24915,150,4425,1641,910 2 3790
-^I "
-char207 8781,22620,150,4899,1641,910 2 3791
-:I "
-char180 12684,19590,0,1218,-5838,910 2 3764
-aa "
-ga 12684,19590,0,0,-3147 2 3680
-a^ 12684,19614,0,210,-3726,210 2 3678
-^ "
-char168 12684,17394,0,153,-3873,153 0 3752
-ad "
-a~ 12684,17481,0,1239,-3270,910 0 3710
-~ "
-char217 20004,24930,390,3312,-1641,910 2 3801
-`U "
-char219 20004,24915,390,3312,-1641,910 2 3803
-^U "
-char221 17565,24930,150,5103,-1386,910 2 3805
-'Y "
-char253 11709,19590,6705,2106,2037,910 3 3837
-'y "
-char176 12684,17805,0,828,-2298,828 0 3760
-de "
-char199 18540,18555,6018,2820,-795,910 2 3783
-,C "
-char231 9759,11670,4770,1668,516,910 0 3815
-,c "
-char209 19515,23727,150,3774,1101,910 2 3793
-~N "
-char241 14637,17481,390,513,309,513 0 3825
-~n "
-char161 6831,12000,7038,1113,2007,910 1 3745
-r! "
-char191 9270,12000,7038,0,2256 1 3775
-r? "
-char164 12684,15684,0,2205,291,910 0 3748
-Cs "
-char163 12684,17805,390,1413,1200,910 0 3747
-Po "
-char165 12684,18315,150,4137,-486,910 2 3749
-Ye "
-char167 12684,18555,5250,0,66 2 3751
-sc "
-Fn 12684,20250,6705,3483,3216,910 3 51871
-char162 12684,17568,186,795,-1197,795 0 3746
-ct "
-char226 12198,19614,390,687,1335,687 2 3810
-^a "
-char234 9759,19614,390,1671,687,910 2 3818
-^e "
-char244 12198,19614,390,453,288,453 2 3828
-^o "
-char251 13662,19614,390,576,381,576 2 3835
-^u "
-char225 12198,19590,390,1863,1335,910 2 3809
-'a "
-char233 9759,19590,390,3081,687,910 2 3817
-'e "
-char243 12198,19590,390,1863,288,910 2 3827
-'o "
-char250 13662,19590,390,1131,381,910 2 3834
-'u "
-char224 12198,19590,390,687,1335,687 2 3808
-`a "
-char232 9759,19590,390,1515,687,910 2 3816
-`e "
-char242 12198,19590,390,423,288,423 2 3826
-`o "
-char249 13662,19590,390,576,381,576 2 3833
-`u "
-char228 12198,17394,390,891,1335,891 0 3812
-:a "
-char235 9759,17394,390,2109,687,910 0 3819
-:e "
-char246 12198,17394,390,891,288,891 0 3830
-:o "
-char252 13662,17394,390,576,381,576 0 3836
-:u "
-char197 18540,24681,150,150,2757,150 2 3781
-oA "
-char238 7806,19614,390,2649,24,910 2 3822
-^i "
-char216 20979,18555,390,2475,1140,910 2 3800
-/O "
-char198 25371,18315,150,1821,2859,910 2 3782
-AE "
-char229 12198,19566,390,1257,1335,910 2 3813
-oa "
-char237 7806,19590,390,4059,24,910 2 3821
-'i "
-char248 12198,11670,390,2388,2475,910 0 3832
-/o "
-char230 16587,11670,390,1551,1377,910 0 3814
-ae "
-char196 18540,22620,150,1191,2757,910 2 3780
-:A "
-char236 7806,19590,390,966,24,910 2 3820
-`i "
-char214 20979,22620,390,1308,-624,910 2 3798
-:O "
-char220 20004,22620,390,3312,-1641,910 2 3804
-:U "
-char201 15612,24930,150,1824,1827,910 2 3785
-'E "
-char239 7806,17394,390,2562,24,910 0 3823
-:i "
-char223 13173,20250,6705,3594,6294,910 3 3807
-ss "
-char212 20979,24915,390,1308,-624,910 2 3796
-^O "
-char193 18540,24930,150,1083,2757,910 2 3777
-'A "
-char195 18540,23727,150,2175,2757,910 2 3779
-~A "
-char227 12198,17481,390,1482,1335,910 0 3811
-~a "
-char208 20004,18555,150,1380,1872,910 2 3792
--D "
-char240 12198,20199,327,540,288,540 2 3824
-Sd "
-char205 8781,24930,150,5073,1641,910 2 3789
-'I "
-char204 8781,24930,150,3582,1641,910 2 3788
-`I "
-char211 20979,24930,390,1308,-624,910 2 3795
-'O "
-char210 20979,24930,390,1308,-624,910 2 3794
-`O "
-char213 20979,23727,390,1308,-624,910 2 3797
-~O "
-char245 12198,17481,390,1482,288,910 0 3829
-~o "
-vS 12198,24969,390,2829,759,910 2 51795
-vs 7806,19863,390,4191,1449,910 2 51827
-char218 20004,24930,390,3312,-1641,910 2 3802
-'U "
-:Y 17565,22620,150,5103,-1386,910 2 51801
-char255 11709,17394,6705,1134,2037,910 1 3839
-:y "
-char222 14637,18315,150,1383,1722,910 2 3806
-TP "
-char254 12198,20250,6855,963,3561,910 3 3838
-Tp "
-char181 14637,10800,5595,612,585,612 0 3765
-char182 12684,19635,4200,1812,-981,910 2 3766
-ps "
-char190 20490,17805,390,0,-1074 0 3774
-34 "
-\- 20490,7305,0,0,-2532 0 51757
-char188 20490,17625,390,0,-1143 0 3772
-14 "
-char189 20490,17625,390,33,-204,33 0 3773
-12 "
-char170 11709,17805,0,1590,-1725,910 0 3754
-Of "
-char186 11709,17805,0,936,-1989,910 0 3770
-Om "
-char171 10734,9945,0,759,-9,759 0 3755
-Fo "
-char187 10734,9945,0,204,546,204 0 3771
-Fc "
-char177 20490,13191,3105,0,-2502 0 3761
-char166 13173,19083,5916,0,-4596 2 3750
-bb "
-char169 13173,19725,0,5526,-3702,910 2 3753
-co "
-char172 20490,10029,0,0,-2055 0 3756
-no "
-char174 13173,19725,0,5526,-3702,910 2 3758
-rg "
-char178 8781,17805,0,1725,-690,910 0 3762
-S2 "
-char179 8781,17805,0,1746,-273,910 0 3763
-S3 "
-char184 12684,0,4770,0,-948 0 3768
-ac "
-char185 8781,17625,0,1257,-1230,910 0 3769
-S1 "
-char215 20490,12969,189,0,-2793 0 3799
-char247 20490,12966,36,0,-2424 0 3831
-char183 6342,10350,0,534,-1212,534 0 3767
-pc "
-fm 12684,17805,0,0,-2970 0 51873
-sd 12684,17805,0,0,-1374 0 51874
-dg 12684,18555,5250,2079,-741,910 2 51755
-tm 16101,17550,0,6012,-3663,910 0 51796
-ah 12684,19863,0,1152,-4668,910 2 51935
-ao 12684,19566,0,570,-4965,570 2 51930
-f/ 2928,17415,390,8091,6480,910 0 51759
-em 20490,6960,0,651,420,651 0 51789
-en 12684,6960,0,756,357,756 0 51790
-dd 12684,18555,5250,1128,210,910 2 51773
-.i 7806,11670,390,657,24,657 0 51957
-aq 7317,18555,0,2418,-3858,910 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 18540,24930,390,2820,-795,910 2 20166
-'c 9759,19590,390,3231,495,910 2 20198
-lq 10734,18555,0,3054,-1956,910 2 51838
-rq 10734,18555,0,2940,-1842,910 2 51746
-Bq 10734,2013,4437,0,2022 0 51772
-vz 11220,19863,0,2484,1530,910 2 51834
-fi 13173,20250,6705,1812,5289,910 3 51881
-fl 14148,20250,6705,1464,5172,910 3 51882
-ff 13662,20250,6705,6495,5286,910 3 51883
-Fi 19029,20250,6705,1914,5388,910 3 51884
-Fl 19515,20601,6705,2037,5289,910 3 51885
-ij 14148,18495,6705,2055,24,910 3 51958
-bq 6342,2013,4437,0,1680 0 51756
-%0 29760,17805,207,378,-1368,378 0 51901
-char175 12684,17328,0,609,-3933,609 0 3759
-a- "
-ab 12684,18054,0,918,-4341,910 0 51926
-a. 12684,17034,0,0,-6228 0 51927
-oe 18051,11670,390,1527,288,910 0 51823
-OE 27321,18555,390,1800,-636,910 2 51791
-fo 7806,9945,0,780,-672,780 0 51886
-fc 7806,9945,0,0,147 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 15612,18315,150,345,1536,345 2 51944
-/l 7317,20250,390,2265,660,910 2 51960
-a" 12684,19590,0,3705,-4452,910 2 51933
-ho 12684,420,4155,0,-3069 0 51934
-vZ 16587,24969,0,1626,78,910 2 51802
-IJ 17076,18315,5814,3522,1641,910 2 51942
diff --git a/contrib/groff/font/devlj4/GR b/contrib/groff/font/devlj4/GR
deleted file mode 100644
index 169cbd1533b9..000000000000
--- a/contrib/groff/font/devlj4/GR
+++ /dev/null
@@ -1,872 +0,0 @@
-name GR
-spacewidth 6831
-pcltypeface 4197
-pclproportional 1
-pclweight 0
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -3414
-P . -4389
-P , -4389
-V A -4389
-A V -4389
-T o -3903
-T r -2439
-T c -3414
-T e -3414
-T d -3414
-T s -2439
-T y -4389
-T a -2439
-T w -4389
-T u -3414
-L T -2925
-L Y -2925
-Y o -4389
-Y e -3903
-Y a -2925
-A W -4389
-W A -4389
-T A -2439
-V o -3414
-V e -3414
-V a -2925
-Y A -2925
-F A -2925
-F . -3903
-F , -3903
-A T -2925
-A Y -2925
-v . -2439
-v , -2439
-y . -2925
-y , -2925
-T . -2439
-T , -2439
-L W -3414
-P A -2925
-V . -3903
-V , -3903
-Y . -2925
-Y , -2925
-W o -3414
-W e -3414
-W a -2925
-W . -3903
-W , -3903
-r . -1461
-r , -1461
-w . -2925
-w , -2925
-Y u -3414
-A v -2439
-A y -2439
-A w -2925
-o . -1461
-o , -1461
-p . -1461
-p , -1461
-e . -486
-e , -486
-b . -1461
-b , -1461
-O T -1950
-O V -1950
-O Y -1950
-O . -1950
-O , -1950
-L y -2439
-L O -1950
-L G -1950
-L C -1950
-L Q -1950
-P J -975
-V y -1950
-V u -1950
-V O -1950
-V G -1950
-V C -1950
-V Q -1950
-D T -1950
-D V -1950
-D Y -1950
-D . -1950
-D , -1950
-Y O -1950
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -1461
-F e -1461
-F a -975
-c . -486
-c , -486
-O A -1461
-O W -1950
-L U -1950
-R T -2925
-R V -2925
-R Y -2925
-R W -2925
-G T -486
-P o -1461
-P g -975
-P e -1461
-P a -975
-D A -1461
-D W -1950
-B T -1461
-B Y -1461
-B . -1461
-B , -1461
-A O -1461
-A G -1461
-A C -1461
-A U -1950
-A Q -1461
-W r -1950
-W y -1950
-W u -1950
-W O -1950
-W G -1950
-W C -1950
-W Q -1950
-J A -486
-J . -486
-J , -486
-U A -1950
-U . -1950
-U , -1950
-Q A -1461
-Q W -1950
-T O -1950
-T G -1950
-T C -1950
-T Q -1950
-O X -1461
-L o -1461
-L e -975
-L q -1461
-G V -486
-G Y -486
-G W -486
-P T -975
-P V -975
-P Y -975
-D X -1461
-B V -1461
-B X -1461
-B A -1461
-B W -1461
-S . -975
-S , -975
-X o -1461
-X e -975
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1461
-A e -975
-Q X -1461
-K o -1461
-K e -975
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -1461
-o y -1461
-o x -1461
-o w -1461
-h v -975
-h y -975
-n v -975
-n y -975
-m v -975
-m y -975
-r g -975
-p v -975
-p y -975
-p x -975
-v o -1461
-v g -975
-v c -975
-v d -975
-v a -975
-v q -975
-e v -486
-e y -486
-b v -975
-b y -975
-b w -1461
-s . -486
-s , -486
-y o -1461
-y g -975
-y c -1461
-y d -1461
-y a -975
-y q -1461
-x o -1461
-x c -975
-x e -975
-x d -975
-x q -975
-a v -486
-a y -486
-a w -486
-w o -1461
-w g -975
-w c -1461
-w d -1461
-w a -975
-w q -1461
-T S -975
-R o -1461
-R y -1950
-R O -1950
-R G -1950
-R C -1950
-R U -1950
-R Q -1950
-P s -486
-P Z -975
-P X -975
-P W -975
-V S -975
-S A -975
-Y S -975
-X u -975
-A t -975
-A c -975
-A d -975
-A u -975
-A q -1461
-W S -975
-J y -486
-K c -975
-K u -975
-o f -486
-h w -975
-n w -975
-m w -975
-r o -1461
-r c -975
-r e -975
-r d -975
-r a -975
-r q -975
-p w -975
-v e -975
-v s -486
-e x -486
-e w -486
-y e -1461
-y s -486
-f o -1461
-f c -975
-f e -975
-f d -975
-f q -975
-w e -1461
-w s -486
-k o -1461
-k c -975
-k e -975
-k d -975
-k q -975
-O Z -975
-O J -975
-L J -975
-R e -975
-R u -975
-P H -486
-P N -486
-P M -486
-P L -486
-P R -486
-P I -486
-P P -486
-P E -486
-P D -486
-P B -486
-P F -486
-P U -486
-P K -486
-E t -486
-E o -975
-E c -486
-E v -486
-E e -486
-E d -486
-E y -486
-E w -486
-E u -486
-E q -486
-E O -486
-E G -486
-E C -486
-E J -486
-E Q -486
-Z o -1461
-Z e -975
-Z d -975
-Z y -975
-Z w -975
-Z u -975
-Z O -975
-Z G -975
-Z C -975
-Z Q -975
-D Z -975
-D J -975
-B Z -975
-B J -975
-A J -975
-J o -975
-J e -486
-J a -486
-J u -486
-J O -486
-J G -486
-J C -486
-J S -486
-J Q -486
-U g -486
-K J -486
-t o -1461
-t c -975
-t e -975
-t d -975
-t q -975
-o t -486
-o g -486
-o z -975
-o j -486
-r s -486
-g o -975
-g c -486
-g e -486
-g d -486
-g q -486
-p z -486
-e z -486
-z o -975
-z c -486
-z e -486
-z d -486
-z q -486
-b z -486
-R J -975
-G J -486
-C o -486
-C y -975
-E T -486
-E V -486
-E Y -486
-E W -486
-E U -486
-B o -486
-B y -486
-B a -486
-B H -486
-B N -486
-B M -486
-B L -486
-B R -486
-B I -486
-B P -486
-B E -486
-B D -486
-B B -486
-B F -486
-B U -486
-B K -486
-U t -486
-U o -975
-U n -486
-U m -486
-U r -486
-U p -486
-U c -486
-U v -486
-U e -486
-U z -486
-U d -486
-U s -975
-U y -486
-U f -486
-U x -486
-U a -975
-U w -486
-U q -486
-U O -486
-U G -486
-U C -486
-U S -486
-U Q -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -3414
-L ' -3414
-T char173 -4389
-T hy -4389
-T - -4389
-T en -4389
-T em -4389
-A cq -2925
-A ' -2925
-char173 T -4389
-hy T -4389
-- T -4389
-en T -4389
-em T -4389
-Y char173 -3414
-Y hy -3414
-Y - -3414
-Y en -3414
-Y em -3414
-p cq -975
-p ' -975
-e cq -486
-e ' -486
-b cq -1461
-b ' -1461
-a cq -486
-a ' -486
-V char173 -1950
-V hy -1950
-V - -1950
-V en -1950
-V em -1950
-h cq -975
-h ' -975
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-R cq -1950
-R ' -1950
-W char173 -1950
-W hy -1950
-W - -1950
-W en -1950
-W em -1950
-cq d -1461
-' d -1461
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1461
-A hy -1461
-A - -1461
-A en -1461
-A em -1461
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -486
-' s -486
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1461
-hy A -1461
-- A -1461
-en X -1461
-en A -1461
-em X -1461
-R char173 -1950
-R hy -1950
-R - -1950
-R en -1950
-R em -1950
-K cq -486
-K ' -486
-G cq -486
-G ' -486
-E cq -486
-E ' -486
-E char173 -486
-E hy -486
-E - -486
-E en -486
-E em -486
-Z char173 -975
-Z hy -975
-Z - -975
-Z en -975
-Z em -975
-B cq -486
-B ' -486
-J char173 -486
-J hy -486
-J - -486
-J en -486
-J em -486
-U char173 -486
-U hy -486
-U - -486
-U en -486
-U em -486
-charset
-! 6831,18837,390 2 3617
-dq 11220,18555 2 3618
-" "
-sh 12684,17805,390 0 3619
-# "
-Do 12684,19122,1707 2 3620
-$ "
-% 21468,17415,390 0 3621
-& 21954,18165,390 0 3622
-cq 7317,18555 2 51751
-' "
-( 7806,20250,6705 3 3624
-) 7806,20250,6705 3 3625
-* 12684,18555 2 3626
-+ 21468,13191,261 0 3627
-, 6831,3096,4449 0 3628
-char173 6831,6960 0 3629
-hy "
-- "
-. 6831,2847,390 0 3630
-sl 12684,20250,480 2 3631
-/ "
-0 12684,17805,390 0 3632
-1 12684,17805,150 0 3633
-2 12684,17805,150 0 3634
-3 12684,17805,390 0 3635
-4 12684,17415,390 0 3636
-5 12684,17415,390 0 3637
-6 12684,17811,390 0 3638
-7 12684,17415,390 0 3639
-8 12684,17805,390 0 3640
-9 12684,17805,390 0 3641
-: 6831,10593,390 0 3642
-; 6831,10593,4449 0 3643
-< 26346,16068 0 3644
-= 21468,8883 0 3645
-> 26346,16068 0 3646
-? 9759,18837,390 2 3647
-at 21594,16980,3654 0 3648
-@ "
-A 20004,18555,150 2 3649
-B 16101,18315,150 2 3650
-C 19515,18555,390 2 3651
-D 20979,18555,150 2 3652
-E 16587,18315,150 2 3653
-F 15612,18315,150 2 3654
-G 20979,18555,390 2 3655
-H 22443,18315,150 2 3656
-I 8781,18315,150 2 3657
-J 9759,18315,6060 2 3658
-K 19029,18315,150 2 3659
-L 16101,18315,150 2 3660
-M 23907,18315,390 2 3661
-N 22443,18315,774 2 3662
-O 22443,18555,390 2 3663
-P 15612,18555,150 2 3664
-Q 22443,18555,6339 3 3665
-R 18540,18315,150 2 3666
-S 12684,18555,390 2 3667
-T 18051,19299,150 2 3668
-U 21468,18315,390 2 3669
-V 19029,18315,390 2 3670
-W 25857,18315,390 2 3671
-X 20004,18315,150 2 3672
-Y 19029,18315,150 2 3673
-Z 17565,19299 2 3674
-lB 7806,18165,4905 0 3675
-[ "
-rs 12684,20250,480 2 3676
-\ "
-rB 7806,18165,4905 0 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 7317,18555 2 51808
-` "
-a 11220,11670,390 0 3681
-b 14148,20265,390 2 3682
-c 11220,11670,390 0 3683
-d 13662,20250,390 2 3684
-e 11220,11670,390 0 3685
-f 8295,20250,150 2 3686
-g 12198,11670,6705 1 3687
-h 14637,20250,150 2 3688
-i 7317,19356,150 2 3689
-j 6831,19356,6705 3 3690
-k 14637,20250,150 2 3691
-l 7317,20262,150 2 3692
-m 21954,11670,153 0 3693
-n 14637,11673,150 0 3694
-o 14148,11670,390 0 3695
-p 14148,11679,6855 1 3696
-q 13662,11670,6855 1 3697
-r 10245,11670,150 0 3698
-s 9270,11670,390 0 3699
-t 8781,13677,390 0 3700
-u 14148,11280,390 0 3701
-v 13173,11430,390 0 3702
-w 20004,11430,390 0 3703
-x 13173,11430,150 0 3704
-y 14148,11430,6705 1 3705
-z 12198,12063 0 3706
-lC 11709,19935,6210 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 11709,19935,6210 3 3709
-} "
-ti 26346,8952 0 51876
-char192 20004,24846,150 2 3776
-`A "
-char194 20004,24600,150 2 3778
-^A "
-char200 16587,24846,150 2 3784
-`E "
-char202 16587,24600,150 2 3786
-^E "
-char203 16587,23751,150 2 3787
-:E "
-char206 8781,24600,150 2 3790
-^I "
-char207 8781,23751,150 2 3791
-:I "
-char180 12684,20460 2 3764
-aa "
-ga 12684,20460 2 3680
-a^ 12684,20460 2 3678
-^ "
-char168 12684,17244 0 3752
-ad "
-a~ 12684,18180 0 3710
-~ "
-char217 21468,24846,390 2 3801
-`U "
-char219 21468,24600,390 2 3803
-^U "
-char221 19029,24846,150 2 3805
-'Y "
-char253 14148,20460,6705 3 3837
-'y "
-char176 12684,17805 0 3760
-de "
-char199 19515,18555,5964 2 3783
-,C "
-char231 11220,11670,5553 0 3815
-,c "
-char209 22443,24498,774 2 3793
-~N "
-char241 14637,18180,150 0 3825
-~n "
-char161 6831,12096,7131 1 3745
-r! "
-char191 9759,12096,7131 1 3775
-r? "
-char164 12684,15684 0 3748
-Cs "
-char163 12684,17805,5424 0 3747
-Po "
-char165 12684,18315,150 2 3749
-Ye "
-char167 12684,18555,5250 2 3751
-sc "
-Fn 12684,20250,6705 3 51871
-char162 12684,17556,126 0 3746
-ct "
-char226 11220,20460,390 2 3810
-^a "
-char234 11220,20460,390 2 3818
-^e "
-char244 14148,20460,390 2 3828
-^o "
-char251 14148,20460,390 2 3835
-^u "
-char225 11220,20460,390 2 3809
-'a "
-char233 11220,20460,390 2 3817
-'e "
-char243 14148,20460,390 2 3827
-'o "
-char250 14148,20460,390 2 3834
-'u "
-char224 11220,20460,390 2 3808
-`a "
-char232 11220,20460,390 2 3816
-`e "
-char242 14148,20460,390 2 3826
-`o "
-char249 14148,20460,390 2 3833
-`u "
-char228 11220,17244,390 0 3812
-:a "
-char235 11220,17244,390 0 3819
-:e "
-char246 14148,17244,390 0 3830
-:o "
-char252 14148,17244,390 0 3836
-:u "
-char197 20004,24768,150 2 3781
-oA "
-char238 7317,20460,150 2 3822
-^i "
-char216 22443,18948,501 2 3800
-/O "
-char198 28299,18315,150 2 3782
-AE "
-char229 11220,19248,390 2 3813
-oa "
-char237 7317,20460,150 2 3821
-'i "
-char248 14148,11832,489 0 3832
-/o "
-char230 17076,11670,390 0 3814
-ae "
-char196 20004,23751,150 2 3780
-:A "
-char236 7317,20460,150 2 3820
-`i "
-char214 22443,23751,390 2 3798
-:O "
-char220 21468,23751,390 2 3804
-:U "
-char201 16587,24846,150 2 3785
-'E "
-char239 7317,17244,150 0 3823
-:i "
-char223 14637,20250,390 2 3807
-ss "
-char212 22443,24600,390 2 3796
-^O "
-char193 20004,24846,150 2 3777
-'A "
-char195 20004,24498,150 2 3779
-~A "
-char227 11220,18180,390 0 3811
-~a "
-char208 20979,18555,150 2 3792
--D "
-char240 14148,20250,390 2 3824
-Sd "
-char205 8781,24846,150 2 3789
-'I "
-char204 8781,24846,150 2 3788
-`I "
-char211 22443,24846,390 2 3795
-'O "
-char210 22443,24846,390 2 3794
-`O "
-char213 22443,24498,390 2 3797
-~O "
-char245 14148,18180,390 0 3829
-~o "
-vS 12684,24612,390 2 51795
-vs 9270,20499,390 2 51827
-char218 21468,24846,390 2 3802
-'U "
-:Y 19029,23751,150 2 51801
-char255 14148,17244,6705 1 3839
-:y "
-char222 15612,18315,150 2 3806
-TP "
-char254 14148,20250,6855 3 3838
-Tp "
-char181 14637,10800,5595 0 3765
-char182 12684,19635,4200 2 3766
-ps "
-char190 21468,17805,288 0 3774
-34 "
-\- 21468,7305 0 51757
-char188 21468,17805,288 0 3772
-14 "
-char189 21468,17805,288 0 3773
-12 "
-char170 12684,17805 0 3754
-Of "
-char186 12684,17805 0 3770
-Om "
-char171 11220,9945 0 3755
-Fo "
-char187 11220,9945 0 3771
-Fc "
-char177 21468,13191,3105 0 3761
-char166 13173,19083,5916 2 3750
-bb "
-char169 13173,19725 2 3753
-co "
-char172 21468,10029 0 3756
-no "
-char174 13173,19725 2 3758
-rg "
-char178 8781,17805 0 3762
-S2 "
-char179 8781,17805 0 3763
-S3 "
-char184 12684,255,5553 0 3768
-ac "
-char185 8781,17805 0 3769
-S1 "
-char215 21468,12969,189 0 3799
-char247 21468,12966,36 0 3831
-char183 6831,10326 0 3767
-pc "
-fm 12684,17805 0 51873
-sd 12684,17805 0 51874
-dg 12684,18555,5250 2 51755
-tm 16101,17550 0 51796
-ah 12684,20499 2 51935
-ao 12684,19248 2 51930
-f/ 2928,17805,288 0 51759
-em 21468,6960 0 51789
-en 12684,6960 0 51790
-dd 12684,18555,5250 2 51773
-.i 7317,11673,150 0 51957
-aq 7317,18555 2 3623
-bu 13173,14226 0 51889
-'C 19515,24846,390 2 20166
-'c 11220,20460,390 2 20198
-lq 11220,18555 2 51838
-rq 11220,18555 2 51746
-Bq 11220,2811,3939 0 51772
-vz 12198,20499 2 51834
-fi 14637,20250,150 2 51881
-fl 14637,20250,150 2 51882
-ff 15612,20250,150 2 51883
-Fi 21954,20250,150 2 51884
-Fl 21954,20250,150 2 51885
-ij 14148,19356,6705 3 51958
-bq 7317,2811,3939 0 51756
-%0 30738,17805,180 0 51901
-char175 12684,17367 0 3759
-a- "
-ab 12684,17796 0 51926
-a. 12684,17244 0 51927
-oe 20004,11670,390 0 51823
-OE 27321,18555,390 2 51791
-fo 7317,9945 0 51886
-fc 7317,9945 0 51887
-sq 19029,15624 0 51899
-/L 16101,18315,150 2 51944
-/l 7317,20262,150 2 51960
-a" 12684,20460 2 51933
-ho 12684,600,4653 0 51934
-vZ 17565,24612 2 51802
-IJ 18540,18315,6060 2 51942
diff --git a/contrib/groff/font/devlj4/LGB b/contrib/groff/font/devlj4/LGB
deleted file mode 100644
index 681116e5b1f9..000000000000
--- a/contrib/groff/font/devlj4/LGB
+++ /dev/null
@@ -1,350 +0,0 @@
-name LGB
-spacewidth 13227
-pcltypeface 4102
-pclproportional 0
-pclweight 3
-pclstyle 0
-charset
-! 13227,18990,330 2 3617
-dq 13227,18990 2 3618
-" "
-sh 13227,21345,2391 2 3619
-# "
-Do 13227,19320,993 2 3620
-$ "
-% 13227,19320,330 2 3621
-& 13227,19320,330 2 3622
-cq 13227,19320 2 51751
-' "
-( 13227,19320,2325 2 3624
-) 13227,19320,2325 2 3625
-* 13227,18990 2 3626
-+ 13227,15645 0 3627
-, 13227,2925,2640 0 3628
-char173 13227,8775 0 3629
-hy "
-- "
-. 13227,3180,330 0 3630
-sl 13227,19545,330 2 3631
-/ "
-0 13227,19320,330 2 3632
-1 13227,19320 2 3633
-2 13227,19320 2 3634
-3 13227,19320,330 2 3635
-4 13227,19320 2 3636
-5 13227,18990,330 2 3637
-6 13227,19320,330 2 3638
-7 13227,18990 2 3639
-8 13227,19320,330 2 3640
-9 13227,19320,330 2 3641
-: 13227,12654,330 0 3642
-; 13227,12654,2640 0 3643
-< 13227,15312 0 3644
-= 13227,12534 0 3645
-> 13227,15312 0 3646
-? 13227,19320,330 2 3647
-at 13227,19320,330 2 3648
-@ "
-A 13227,18990 2 3649
-B 13227,18990 2 3650
-C 13227,19320,330 2 3651
-D 13227,18990 2 3652
-E 13227,18990 2 3653
-F 13227,18990 2 3654
-G 13227,19320,330 2 3655
-H 13227,18990 2 3656
-I 13227,18990 2 3657
-J 13227,18990,330 2 3658
-K 13227,18990 2 3659
-L 13227,18990 2 3660
-M 13227,18990 2 3661
-N 13227,18990 2 3662
-O 13227,19320,330 2 3663
-P 13227,18990 2 3664
-Q 13227,19320,2760 2 3665
-R 13227,18990 2 3666
-S 13227,19320,330 2 3667
-T 13227,18990 2 3668
-U 13227,18990,330 2 3669
-V 13227,18990 2 3670
-W 13227,18990 2 3671
-X 13227,18990 2 3672
-Y 13227,18990 2 3673
-Z 13227,18990 2 3674
-lB 13227,18990,3510 2 3675
-[ "
-rs 13227,19545,330 2 3676
-\ "
-rB 13227,18990,3510 2 3677
-] "
-ha 13227,19758 2 51875
-_ 13227,191367,6588 3 3679
-oq 13227,19320 2 51808
-` "
-a 13227,14355,330 0 3681
-b 13227,19545,330 2 3682
-c 13227,14355,330 0 3683
-d 13227,19545,330 2 3684
-e 13227,14355,330 0 3685
-f 13227,19335 2 3686
-g 13227,14355,4350 0 3687
-h 13227,19545 2 3688
-i 13227,19095 2 3689
-j 13227,19095,4350 2 3690
-k 13227,19545 2 3691
-l 13227,19545 2 3692
-m 13227,14355 0 3693
-n 13227,14355 0 3694
-o 13227,14355,330 0 3695
-p 13227,14355,5475 1 3696
-q 13227,14355,5475 1 3697
-r 13227,14355 0 3698
-s 13227,14355,330 0 3699
-t 13227,18300,330 2 3700
-u 13227,14025,330 0 3701
-v 13227,14025 0 3702
-w 13227,14025 0 3703
-x 13227,14025 0 3704
-y 13227,14025,4350 0 3705
-z 13227,14025 0 3706
-lC 13227,20130,6141 3 3707
-{ "
-ba 13227,19758,6588 3 3708
-| "
-rC 13227,20130,6141 3 3709
-} "
-ti 13227,11181 0 51876
-char192 13227,25155 2 3776
-`A "
-char194 13227,25080 2 3778
-^A "
-char200 13227,25155 2 3784
-`E "
-char202 13227,25080 2 3786
-^E "
-char203 13227,24000 2 3787
-:E "
-char206 13227,25080 2 3790
-^I "
-char207 13227,24000 2 3791
-:I "
-char180 13227,20745 2 3764
-aa "
-ga 13227,20745 2 3680
-a^ 13227,21015 2 3678
-^ "
-char168 13227,19125 2 3752
-ad "
-a~ 13227,19683 2 3710
-~ "
-char217 13227,25155,330 2 3801
-`U "
-char219 13227,25080,330 2 3803
-^U "
-char221 13227,25155 2 3805
-'Y "
-char253 13227,20745,4350 2 3837
-'y "
-char176 13227,19320 2 3760
-de "
-char199 13227,19320,5787 3 3783
-,C "
-char231 13227,14355,6060 1 3815
-,c "
-char209 13227,24552 2 3793
-~N "
-char241 13227,19683 2 3825
-~n "
-char161 13227,14319,5001 1 3745
-r! "
-char191 13227,14265,5385 1 3775
-r? "
-char164 13227,15885 0 3748
-Cs "
-char163 13227,18990,330 2 3747
-Po "
-char165 13227,18990 2 3749
-Ye "
-char167 13227,19320,1218 2 3751
-sc "
-Fn 13227,19335,3558 2 51871
-char162 13227,19320,330 2 3746
-ct "
-char226 13227,21015,330 2 3810
-^a "
-char234 13227,21015,330 2 3818
-^e "
-char244 13227,21015,330 2 3828
-^o "
-char251 13227,21015,330 2 3835
-^u "
-char225 13227,20745,330 2 3809
-'a "
-char233 13227,20745,330 2 3817
-'e "
-char243 13227,20745,330 2 3827
-'o "
-char250 13227,20745,330 2 3834
-'u "
-char224 13227,20745,330 2 3808
-`a "
-char232 13227,20745,330 2 3816
-`e "
-char242 13227,20745,330 2 3826
-`o "
-char249 13227,20745,330 2 3833
-`u "
-char228 13227,19125,330 2 3812
-:a "
-char235 13227,19125,330 2 3819
-:e "
-char246 13227,19125,330 2 3830
-:o "
-char252 13227,19125,330 2 3836
-:u "
-char197 13227,24882 2 3781
-oA "
-char238 13227,21015 2 3822
-^i "
-char216 13227,19320,459 2 3800
-/O "
-char198 13227,18990 2 3782
-AE "
-char229 13227,20790,330 2 3813
-oa "
-char237 13227,20745 2 3821
-'i "
-char248 13227,14901,957 0 3832
-/o "
-char230 13227,14355,330 0 3814
-ae "
-char196 13227,24000 2 3780
-:A "
-char236 13227,20745 2 3820
-`i "
-char214 13227,24000,330 2 3798
-:O "
-char220 13227,24000,330 2 3804
-:U "
-char201 13227,25155 2 3785
-'E "
-char239 13227,19125 2 3823
-:i "
-char223 13227,19335,330 2 3807
-ss "
-char212 13227,25080,330 2 3796
-^O "
-char193 13227,25155 2 3777
-'A "
-char195 13227,24552 2 3779
-~A "
-char227 13227,19683,330 2 3811
-~a "
-char208 13227,18990 2 3792
--D "
-char240 13227,19656,330 2 3824
-Sd "
-char205 13227,25155 2 3789
-'I "
-char204 13227,25155 2 3788
-`I "
-char211 13227,25155,330 2 3795
-'O "
-char210 13227,25155,330 2 3794
-`O "
-char213 13227,24552,330 2 3797
-~O "
-char245 13227,19683,330 2 3829
-~o "
-vS 13227,25116,330 2 51795
-vs 13227,21015,330 2 51827
-char218 13227,25155,330 2 3802
-'U "
-:Y 13227,24000 2 51801
-char255 13227,19125,4350 2 3839
-:y "
-char222 13227,18990 2 3806
-TP "
-char254 13227,19545,5475 3 3838
-Tp "
-char181 13227,14025,4350 0 3765
-char182 13227,19635,4200 2 3766
-ps "
-char190 13227,19110,3825 2 3774
-34 "
-\- 13227,10425 0 51757
-char188 13227,19110,3825 2 3772
-14 "
-char189 13227,19110,3825 2 3773
-12 "
-char170 13227,19320 2 3754
-Of "
-char186 13227,19320 2 3770
-Om "
-char171 13227,14115 0 3755
-Fo "
-char187 13227,14115 0 3771
-Fc "
-char177 13227,15645,30 0 3761
-char166 13227,19083,5916 3 3750
-bb "
-char169 13227,19635 2 3753
-co "
-char172 13227,13020 0 3756
-no "
-char174 13227,19635 2 3758
-rg "
-char178 13227,19110 2 3762
-S2 "
-char179 13227,19110 2 3763
-S3 "
-char184 13227,0,6060 1 3768
-ac "
-char185 13227,19110 2 3769
-S1 "
-char215 13227,15549 0 3799
-char247 13227,15510 0 3831
-char183 13227,11376 0 3767
-pc "
-fm 13227,18990 2 51873
-sd 13227,18990 2 51874
-dg 13227,18990 2 51755
-tm 13227,17850 2 51796
-ah 13227,21015 2 51935
-ao 13227,20790 2 51930
-f/ 13227,15675 0 51759
-em 13227,8430 0 51789
-en 13227,8430 0 51790
-dd 13227,18990 2 51773
-.i 13227,14025 0 51957
-aq 13227,18990 2 3623
-bu 13227,12714 0 51889
-'C 13227,25155,330 2 20166
-'c 13227,20745,330 2 20198
-lq 13227,19320 2 51838
-rq 13227,19320 2 51746
-Bq 13227,3486,2079 0 51772
-vz 13227,21015 2 51834
-fi 13227,19335 2 51881
-fl 13227,19335 2 51882
-ff 13227,19335 2 51883
-Fi 13227,19335 2 51884
-Fl 13227,19335 2 51885
-ij 13227,19095,4350 2 51958
-bq 13227,3486,2079 0 51756
-%0 13227,19320,330 2 51901
-char175 13227,19119 2 3759
-a- "
-ab 13227,19830 2 51926
-a. 13227,19125 2 51927
-oe 13227,14355,330 0 51823
-OE 13227,19320,330 2 51791
-fo 13227,14115 0 51886
-fc 13227,14115 0 51887
-sq 13227,14106 0 51899
-/L 13227,18990 2 51944
-/l 13227,19545 2 51960
-a" 13227,20745 2 51933
-ho 13227,1026,5109 1 51934
-vZ 13227,25116 2 51802
-IJ 13227,18990,330 2 51942
diff --git a/contrib/groff/font/devlj4/LGI b/contrib/groff/font/devlj4/LGI
deleted file mode 100644
index ef8fae2e2847..000000000000
--- a/contrib/groff/font/devlj4/LGI
+++ /dev/null
@@ -1,351 +0,0 @@
-name LGI
-spacewidth 13227
-slant 12.000000
-pcltypeface 4102
-pclproportional 0
-pclweight 0
-pclstyle 1
-charset
-! 13227,18990,330,0,-2748 2 3617
-dq 13227,18990,0,372,-3960,372 2 3618
-" "
-sh 13227,21309,2451,1827,1062,790 2 3619
-# "
-Do 13227,19320,1074,762,288,762 2 3620
-$ "
-% 13227,19320,330,2535,882,790 2 3621
-& 13227,19320,330,54,699,54 2 3622
-cq 13227,19320,0,0,-5469 2 51751
-' "
-( 13227,19320,1935,318,-2952,318 2 3624
-) 13227,19320,1935,318,-2952,318 2 3625
-* 13227,18990,0,1995,-828,790 2 3626
-+ 13227,15075,0,960,-93,790 0 3627
-, 13227,1785,2250,0,-2769 0 3628
-char173 13227,7995,0,0,-2511 0 3629
-hy "
-- "
-. 13227,2100,330,0,-3873 0 3630
-sl 13227,19545,330,0,-1410 2 3631
-/ "
-0 13227,19320,330,564,-456,564 2 3632
-1 13227,19320,0,0,60 2 3633
-2 13227,19320,0,1578,1365,790 2 3634
-3 13227,19320,330,420,888,420 2 3635
-4 13227,19320,0,585,750,585 2 3636
-5 13227,18990,330,1215,153,790 2 3637
-6 13227,19320,330,1800,-93,790 2 3638
-7 13227,18990,0,2184,-963,790 2 3639
-8 13227,19320,330,996,423,790 2 3640
-9 13227,19320,330,741,90,741 2 3641
-: 13227,12492,330,0,-3039 0 3642
-; 13227,12492,2250,0,-2772 0 3643
-< 13227,15063,0,390,387,390 0 3644
-= 13227,11721,0,1065,-288,790 0 3645
-> 13227,15063,0,390,387,390 0 3646
-? 13227,19320,330,981,-2730,790 2 3647
-at 13227,19320,330,993,87,790 2 3648
-@ "
-A 13227,18990,0,0,2541 2 3649
-B 13227,18990,0,1095,831,790 2 3650
-C 13227,19320,330,1524,-12,790 2 3651
-D 13227,18990,0,1089,1263,790 2 3652
-E 13227,18990,0,1995,642,790 2 3653
-F 13227,18990,0,2535,594,790 2 3654
-G 13227,19320,330,1350,519,790 2 3655
-H 13227,18990,0,2316,1050,790 2 3656
-I 13227,18990,0,558,-663,558 2 3657
-J 13227,18990,330,2118,-39,790 2 3658
-K 13227,18990,0,1590,765,790 2 3659
-L 13227,18990,0,0,153 2 3660
-M 13227,18990,0,2853,1941,790 2 3661
-N 13227,18990,0,2097,882,790 2 3662
-O 13227,19320,330,1485,273,790 2 3663
-P 13227,18990,0,1152,771,790 2 3664
-Q 13227,19320,2778,1485,273,790 2 3665
-R 13227,18990,0,987,981,790 2 3666
-S 13227,19320,330,1608,1134,790 2 3667
-T 13227,18990,0,3171,-1431,790 2 3668
-U 13227,18990,330,2220,108,790 2 3669
-V 13227,18990,0,2217,-2733,790 2 3670
-W 13227,18990,0,3045,702,790 2 3671
-X 13227,18990,0,2355,1296,790 2 3672
-Y 13227,18990,0,2553,-2397,790 2 3673
-Z 13227,18990,0,1956,1203,790 2 3674
-lB 13227,18990,2940,1110,-33,790 2 3675
-[ "
-rs 13227,19545,330,0,-3072 2 3676
-\ "
-rB 13227,18990,2940,342,735,342 2 3677
-] "
-ha 13227,19758,0,9,9,9 2 51875
-_ 13227,191367,6588,1317,1317,790 3 3679
-oq 13227,19326,0,0,-6222 2 51808
-` "
-a 13227,14355,330,0,105 0 3681
-b 13227,19545,330,312,1671,312 2 3682
-c 13227,14355,330,810,261,790 0 3683
-d 13227,19545,330,2121,363,790 2 3684
-e 13227,14355,330,387,303,387 0 3685
-f 13227,19335,0,3231,-1785,790 2 3686
-g 13227,14355,4350,1545,1053,790 0 3687
-h 13227,19545,0,168,723,168 2 3688
-i 13227,18780,0,0,-2319 2 3689
-j 13227,18780,4350,906,936,790 2 3690
-k 13227,19545,0,495,504,495 2 3691
-l 13227,19545,0,0,-3603 2 3692
-m 13227,14355,0,1770,2205,790 0 3693
-n 13227,14355,0,267,774,267 0 3694
-o 13227,14355,330,372,252,372 0 3695
-p 13227,14355,5475,213,2205,213 1 3696
-q 13227,14355,5475,1668,318,790 1 3697
-r 13227,14355,0,684,-81,684 0 3698
-s 13227,14355,330,57,480,57 0 3699
-t 13227,18495,330,0,-933 2 3700
-u 13227,14025,330,714,249,714 0 3701
-v 13227,14025,0,1437,-1767,790 0 3702
-w 13227,14025,0,2574,279,790 0 3703
-x 13227,14025,0,1050,2112,790 0 3704
-y 13227,14025,4350,1986,3579,790 0 3705
-z 13227,14025,0,984,1395,790 0 3706
-lC 13227,20130,6075,1170,-2529,790 3 3707
-{ "
-ba 13227,19758,6588,0,-4623 3 3708
-| "
-rC 13227,20130,6075,0,975 3 3709
-} "
-ti 13227,10485,0,825,822,790 0 51876
-char192 13227,24630,0,0,2541 2 3776
-`A "
-char194 13227,24810,0,2133,2541,790 2 3778
-^A "
-char200 13227,24630,0,1995,642,790 2 3784
-`E "
-char202 13227,24810,0,2133,642,790 2 3786
-^E "
-char203 13227,23115,0,1995,642,790 2 3787
-:E "
-char206 13227,24810,0,2133,-663,790 2 3790
-^I "
-char207 13227,23115,0,1143,-663,790 2 3791
-:I "
-char180 13227,19725,0,753,-5706,753 2 3764
-aa "
-ga 13227,19725,0,0,-4728 2 3680
-a^ 13227,19905,0,1089,-3117,790 2 3678
-^ "
-char168 13227,18195,0,0,-4341 2 3752
-ad "
-a~ 13227,18873,0,1833,-2406,790 2 3710
-~ "
-char217 13227,24630,330,2220,108,790 2 3801
-`U "
-char219 13227,24810,330,2220,108,790 2 3803
-^U "
-char221 13227,24630,0,2553,-2397,790 2 3805
-'Y "
-char253 13227,19725,4350,1986,3579,790 2 3837
-'y "
-char176 13227,19320,0,0,-2637 2 3760
-de "
-char199 13227,19320,5325,1524,-12,790 3 3783
-,C "
-char231 13227,14355,5295,810,261,790 1 3815
-,c "
-char209 13227,23814,0,3201,882,790 2 3793
-~N "
-char241 13227,18873,0,1833,774,790 2 3825
-~n "
-char161 13227,14271,5049,0,-1647 1 3745
-r! "
-char191 13227,14214,5436,0,-126 1 3775
-r? "
-char164 13227,15684,0,1425,528,790 0 3748
-Cs "
-char163 13227,19320,330,2433,234,790 2 3747
-Po "
-char165 13227,18990,0,2712,-1056,790 2 3749
-Ye "
-char167 13227,19320,1344,66,-891,66 2 3751
-sc "
-Fn 13227,19335,3540,231,-492,231 2 51871
-char162 13227,19320,330,891,-780,790 2 3746
-ct "
-char226 13227,19905,330,1089,105,790 2 3810
-^a "
-char234 13227,19905,330,1089,303,790 2 3818
-^e "
-char244 13227,19905,330,1089,252,790 2 3828
-^o "
-char251 13227,19905,330,1089,249,790 2 3835
-^u "
-char225 13227,19725,330,753,105,753 2 3809
-'a "
-char233 13227,19725,330,753,303,753 2 3817
-'e "
-char243 13227,19725,330,753,252,753 2 3827
-'o "
-char250 13227,19725,330,753,249,753 2 3834
-'u "
-char224 13227,19725,330,0,105 2 3808
-`a "
-char232 13227,19725,330,387,303,387 2 3816
-`e "
-char242 13227,19725,330,372,252,372 2 3826
-`o "
-char249 13227,19725,330,714,249,714 2 3833
-`u "
-char228 13227,18195,330,0,105 2 3812
-:a "
-char235 13227,18195,330,387,303,387 2 3819
-:e "
-char246 13227,18195,330,372,252,372 2 3830
-:o "
-char252 13227,18195,330,714,249,714 2 3836
-:u "
-char197 13227,24810,0,0,2541 2 3781
-oA "
-char238 13227,19905,0,0,-1917 2 3822
-^i "
-char216 13227,19320,342,2895,1743,790 2 3800
-/O "
-char198 13227,18990,0,4059,2670,790 2 3782
-AE "
-char229 13227,19905,330,0,105 2 3813
-oa "
-char237 13227,19725,0,3,-2319,3 2 3821
-'i "
-char248 13227,14895,735,1119,1086,790 0 3832
-/o "
-char230 13227,14355,330,1530,1950,790 0 3814
-ae "
-char196 13227,23115,0,1143,2541,790 2 3780
-:A "
-char236 13227,19725,0,0,-2319 2 3820
-`i "
-char214 13227,23115,330,1485,273,790 2 3798
-:O "
-char220 13227,23115,330,2220,108,790 2 3804
-:U "
-char201 13227,24630,0,1995,642,790 2 3785
-'E "
-char239 13227,18195,0,0,-2319 2 3823
-:i "
-char223 13227,19335,330,570,270,570 2 3807
-ss "
-char212 13227,24810,330,2133,273,790 2 3796
-^O "
-char193 13227,24630,0,1389,2541,790 2 3777
-'A "
-char195 13227,23814,0,3201,2541,790 2 3779
-~A "
-char227 13227,18873,330,1833,105,790 2 3811
-~a "
-char208 13227,18990,0,1389,963,790 2 3792
--D "
-char240 13227,19545,330,192,237,192 2 3824
-Sd "
-char205 13227,24630,0,1389,-663,790 2 3789
-'I "
-char204 13227,24630,0,558,-663,558 2 3788
-`I "
-char211 13227,24630,330,1485,273,790 2 3795
-'O "
-char210 13227,24630,330,1485,273,790 2 3794
-`O "
-char213 13227,23814,330,3201,273,790 2 3797
-~O "
-char245 13227,18873,330,1833,252,790 2 3829
-~o "
-vS 13227,24810,330,2433,1134,790 2 51795
-vs 13227,19905,330,1539,480,790 2 51827
-char218 13227,24630,330,2220,108,790 2 3802
-'U "
-:Y 13227,23115,0,2553,-2397,790 2 51801
-char255 13227,18195,4350,1986,3579,790 2 3839
-:y "
-char222 13227,18990,0,378,771,378 2 3806
-TP "
-char254 13227,19545,5475,231,2223,231 3 3838
-Tp "
-char181 13227,14025,4350,765,1659,765 0 3765
-char182 13227,19635,4200,696,-408,696 2 3766
-ps "
-char190 13227,19110,3825,1413,627,790 2 3774
-34 "
-\- 13227,9945,0,1065,-288,790 0 51757
-char188 13227,19110,3825,918,873,790 2 3772
-14 "
-char189 13227,19110,3825,1269,1023,790 2 3773
-12 "
-char170 13227,19320,0,0,-3066 2 3754
-Of "
-char186 13227,19320,0,0,-3330 2 3770
-Om "
-char171 13227,13710,0,2418,1104,790 0 3755
-Fo "
-char187 13227,13710,0,1107,2415,790 0 3771
-Fc "
-char177 13227,15075,0,1110,-243,790 0 3761
-char166 13227,19083,5916,0,-4623 3 3750
-bb "
-char169 13227,19635,0,3927,-2190,790 2 3753
-co "
-char172 13227,12501,0,1065,-288,790 0 3756
-no "
-char174 13227,19635,0,3927,-2190,790 2 3758
-rg "
-char178 13227,19110,0,0,-2379 2 3762
-S2 "
-char179 13227,19110,0,0,-2073 2 3763
-S3 "
-char184 13227,0,5295,0,-1200 1 3768
-ac "
-char185 13227,19110,0,0,-2727 2 3769
-S1 "
-char215 13227,14814,0,897,-483,790 0 3799
-char247 13227,14655,0,1104,-252,790 0 3831
-char183 13227,11007,0,0,-4590 0 3767
-pc "
-fm 13227,18990,0,0,-3444 2 51873
-sd 13227,18990,0,0,-3444 2 51874
-dg 13227,18990,0,0,-2019 2 51755
-tm 13227,17850,0,4395,-2058,790 2 51796
-ah 13227,19905,0,1539,-3567,790 2 51935
-ao 13227,19905,0,0,-5466 2 51930
-f/ 13227,15675,777,0,-339 0 51759
-em 13227,7710,0,1317,1317,790 0 51789
-en 13227,7710,0,0,-1215 0 51790
-dd 13227,18990,0,0,-1713 2 51773
-.i 13227,14025,0,0,-2319 0 51957
-aq 13227,18990,0,0,-6060 2 3623
-bu 13227,12714,0,0,-519 0 51889
-'C 13227,24630,330,1524,-12,790 2 20166
-'c 13227,19725,330,810,261,790 2 20198
-lq 13227,19326,0,1812,-4197,790 2 51838
-rq 13227,19320,0,1512,-3897,790 2 51746
-Bq 13227,2214,2091,0,-897 0 51772
-vz 13227,19905,0,1539,1395,790 2 51834
-fi 13227,19335,0,1065,-339,790 2 51881
-fl 13227,19335,0,1065,-339,790 2 51882
-ff 13227,19335,0,5175,606,790 2 51883
-Fi 13227,19335,0,3579,1149,790 2 51884
-Fl 13227,19335,0,2703,1155,790 2 51885
-ij 13227,18780,4350,2355,645,790 2 51958
-bq 13227,2214,2091,0,-2922 0 51756
-%0 13227,19320,330,1920,4113,790 2 51901
-char175 13227,18051,0,1086,-3930,790 2 3759
-a- "
-ab 13227,19350,0,1683,-3297,790 2 51926
-a. 13227,18195,0,0,-6561 2 51927
-oe 13227,14355,330,1629,1671,790 0 51823
-OE 13227,19320,330,4059,783,790 2 51791
-fo 13227,13710,0,0,-1182 0 51886
-fc 13227,13710,0,0,-663 0 51887
-sq 13227,14106,0,876,876,790 0 51899
-/L 13227,18990,0,0,885 2 51944
-/l 13227,19545,0,0,-2769 2 51960
-a" 13227,19725,0,3210,-3906,790 2 51933
-ho 13227,735,4086,0,-4818 0 51934
-vZ 13227,24810,0,2433,1203,790 2 51802
-IJ 13227,18990,330,2259,3129,790 2 51942
diff --git a/contrib/groff/font/devlj4/LGR b/contrib/groff/font/devlj4/LGR
deleted file mode 100644
index 6e9c476aebf6..000000000000
--- a/contrib/groff/font/devlj4/LGR
+++ /dev/null
@@ -1,350 +0,0 @@
-name LGR
-spacewidth 13227
-pcltypeface 4102
-pclproportional 0
-pclweight 0
-pclstyle 0
-charset
-! 13227,18990,330 2 3617
-dq 13227,18990 2 3618
-" "
-sh 13227,21309,2451 2 3619
-# "
-Do 13227,19320,372 2 3620
-$ "
-% 13227,19320,330 2 3621
-& 13227,19320,330 2 3622
-cq 13227,19320 2 51751
-' "
-( 13227,19320,1935 2 3624
-) 13227,19320,1935 2 3625
-* 13227,18990 2 3626
-+ 13227,15075 0 3627
-, 13227,2055,2235 0 3628
-char173 13227,7815 0 3629
-hy "
-- "
-. 13227,2055,330 0 3630
-sl 13227,19545,330 2 3631
-/ "
-0 13227,19320,330 2 3632
-1 13227,19320 2 3633
-2 13227,19320 2 3634
-3 13227,19320,330 2 3635
-4 13227,19320 2 3636
-5 13227,18990,330 2 3637
-6 13227,19320,330 2 3638
-7 13227,18990 2 3639
-8 13227,19320,330 2 3640
-9 13227,19320,330 2 3641
-: 13227,12414,330 0 3642
-; 13227,12414,2235 0 3643
-< 13227,15063 0 3644
-= 13227,11721 0 3645
-> 13227,15063 0 3646
-? 13227,19320,330 2 3647
-at 13227,19320,330 2 3648
-@ "
-A 13227,18990 2 3649
-B 13227,18990 2 3650
-C 13227,19320,330 2 3651
-D 13227,18990 2 3652
-E 13227,18990 2 3653
-F 13227,18990 2 3654
-G 13227,19320,330 2 3655
-H 13227,18990 2 3656
-I 13227,18990 2 3657
-J 13227,18990,330 2 3658
-K 13227,18990 2 3659
-L 13227,18990 2 3660
-M 13227,18990 2 3661
-N 13227,18990 2 3662
-O 13227,19320,330 2 3663
-P 13227,18990 2 3664
-Q 13227,19320,2712 2 3665
-R 13227,18990 2 3666
-S 13227,19320,330 2 3667
-T 13227,18990 2 3668
-U 13227,18990,330 2 3669
-V 13227,18990 2 3670
-W 13227,18990 2 3671
-X 13227,18990 2 3672
-Y 13227,18990 2 3673
-Z 13227,18990 2 3674
-lB 13227,18990,2940 2 3675
-[ "
-rs 13227,19545,330 2 3676
-\ "
-rB 13227,18990,2940 2 3677
-] "
-ha 13227,19758 2 51875
-_ 13227,191367,6588 3 3679
-oq 13227,19320 2 51808
-` "
-a 13227,14355,330 0 3681
-b 13227,19545,330 2 3682
-c 13227,14355,330 0 3683
-d 13227,19545,330 2 3684
-e 13227,14355,330 0 3685
-f 13227,19335 2 3686
-g 13227,14355,4350 0 3687
-h 13227,19545 2 3688
-i 13227,18780 2 3689
-j 13227,18780,4350 2 3690
-k 13227,19545 2 3691
-l 13227,19545 2 3692
-m 13227,14355 0 3693
-n 13227,14355 0 3694
-o 13227,14355,330 0 3695
-p 13227,14355,5475 1 3696
-q 13227,14355,5475 1 3697
-r 13227,14355 0 3698
-s 13227,14355,330 0 3699
-t 13227,18495,330 2 3700
-u 13227,14025,330 0 3701
-v 13227,14025 0 3702
-w 13227,14025 0 3703
-x 13227,14025 0 3704
-y 13227,14025,4350 0 3705
-z 13227,14025 0 3706
-lC 13227,20130,6075 3 3707
-{ "
-ba 13227,19758,6588 3 3708
-| "
-rC 13227,20130,6075 3 3709
-} "
-ti 13227,10485 0 51876
-char192 13227,24630 2 3776
-`A "
-char194 13227,24810 2 3778
-^A "
-char200 13227,24630 2 3784
-`E "
-char202 13227,24810 2 3786
-^E "
-char203 13227,23115 2 3787
-:E "
-char206 13227,24810 2 3790
-^I "
-char207 13227,23115 2 3791
-:I "
-char180 13227,19725 2 3764
-aa "
-ga 13227,19725 2 3680
-a^ 13227,19905 2 3678
-^ "
-char168 13227,18195 2 3752
-ad "
-a~ 13227,18867 2 3710
-~ "
-char217 13227,24630,330 2 3801
-`U "
-char219 13227,24810,330 2 3803
-^U "
-char221 13227,24630 2 3805
-'Y "
-char253 13227,19725,4350 2 3837
-'y "
-char176 13227,19320 2 3760
-de "
-char199 13227,19320,5430 3 3783
-,C "
-char231 13227,14355,5430 1 3815
-,c "
-char209 13227,23787 2 3793
-~N "
-char241 13227,18867 2 3825
-~n "
-char161 13227,14259,5061 1 3745
-r! "
-char191 13227,14265,5385 1 3775
-r? "
-char164 13227,15684 0 3748
-Cs "
-char163 13227,19320,330 2 3747
-Po "
-char165 13227,18990 2 3749
-Ye "
-char167 13227,19320,1344 2 3751
-sc "
-Fn 13227,19335,3540 2 51871
-char162 13227,19320,330 2 3746
-ct "
-char226 13227,19905,330 2 3810
-^a "
-char234 13227,19905,330 2 3818
-^e "
-char244 13227,19905,330 2 3828
-^o "
-char251 13227,19905,330 2 3835
-^u "
-char225 13227,19725,330 2 3809
-'a "
-char233 13227,19725,330 2 3817
-'e "
-char243 13227,19725,330 2 3827
-'o "
-char250 13227,19725,330 2 3834
-'u "
-char224 13227,19725,330 2 3808
-`a "
-char232 13227,19725,330 2 3816
-`e "
-char242 13227,19725,330 2 3826
-`o "
-char249 13227,19725,330 2 3833
-`u "
-char228 13227,18195,330 2 3812
-:a "
-char235 13227,18195,330 2 3819
-:e "
-char246 13227,18195,330 2 3830
-:o "
-char252 13227,18195,330 2 3836
-:u "
-char197 13227,24735 2 3781
-oA "
-char238 13227,19905 2 3822
-^i "
-char216 13227,19320,444 2 3800
-/O "
-char198 13227,18990 2 3782
-AE "
-char229 13227,19830,330 2 3813
-oa "
-char237 13227,19725 2 3821
-'i "
-char248 13227,14805,747 0 3832
-/o "
-char230 13227,14355,330 0 3814
-ae "
-char196 13227,23115 2 3780
-:A "
-char236 13227,19725 2 3820
-`i "
-char214 13227,23115,330 2 3798
-:O "
-char220 13227,23115,330 2 3804
-:U "
-char201 13227,24630 2 3785
-'E "
-char239 13227,18195 2 3823
-:i "
-char223 13227,19335,330 2 3807
-ss "
-char212 13227,24810,330 2 3796
-^O "
-char193 13227,24630 2 3777
-'A "
-char195 13227,23787 2 3779
-~A "
-char227 13227,18867,330 2 3811
-~a "
-char208 13227,18990 2 3792
--D "
-char240 13227,19545,330 2 3824
-Sd "
-char205 13227,24630 2 3789
-'I "
-char204 13227,24630 2 3788
-`I "
-char211 13227,24630,330 2 3795
-'O "
-char210 13227,24630,330 2 3794
-`O "
-char213 13227,23787,330 2 3797
-~O "
-char245 13227,18867,330 2 3829
-~o "
-vS 13227,24810,330 2 51795
-vs 13227,19905,330 2 51827
-char218 13227,24630,330 2 3802
-'U "
-:Y 13227,23115 2 51801
-char255 13227,18195,4350 2 3839
-:y "
-char222 13227,18990 2 3806
-TP "
-char254 13227,19545,5475 3 3838
-Tp "
-char181 13227,14025,4350 0 3765
-char182 13227,19635,4200 2 3766
-ps "
-char190 13227,19119,3825 2 3774
-34 "
-\- 13227,9945 0 51757
-char188 13227,19110,3825 2 3772
-14 "
-char189 13227,19110,3825 2 3773
-12 "
-char170 13227,19320 2 3754
-Of "
-char186 13227,19320 2 3770
-Om "
-char171 13227,13710 0 3755
-Fo "
-char187 13227,13710 0 3771
-Fc "
-char177 13227,15075 0 3761
-char166 13227,19083,5916 3 3750
-bb "
-char169 13227,19635 2 3753
-co "
-char172 13227,12501 0 3756
-no "
-char174 13227,19635 2 3758
-rg "
-char178 13227,19110 2 3762
-S2 "
-char179 13227,19119 2 3763
-S3 "
-char184 13227,0,5430 1 3768
-ac "
-char185 13227,19110 2 3769
-S1 "
-char215 13227,14814 0 3799
-char247 13227,14655 0 3831
-char183 13227,11025 0 3767
-pc "
-fm 13227,18990 2 51873
-sd 13227,18990 2 51874
-dg 13227,18990 2 51755
-tm 13227,17850 2 51796
-ah 13227,19905 2 51935
-ao 13227,19830 2 51930
-f/ 13227,15675,858 0 51759
-em 13227,7710 0 51789
-en 13227,7710 0 51790
-dd 13227,18990 2 51773
-.i 13227,14025 0 51957
-aq 13227,18990 2 3623
-bu 13227,12714 0 51889
-'C 13227,24630,330 2 20166
-'c 13227,19725,330 2 20198
-lq 13227,19320 2 51838
-rq 13227,19320 2 51746
-Bq 13227,2136,2154 0 51772
-vz 13227,19905 2 51834
-fi 13227,19335 2 51881
-fl 13227,19335 2 51882
-ff 13227,19335 2 51883
-Fi 13227,19335 2 51884
-Fl 13227,19335 2 51885
-ij 13227,18780,4350 2 51958
-bq 13227,2136,2154 0 51756
-%0 13227,19320,330 2 51901
-char175 13227,18078 2 3759
-a- "
-ab 13227,19350 2 51926
-a. 13227,18195 2 51927
-oe 13227,14355,330 0 51823
-OE 13227,19320,330 2 51791
-fo 13227,13710 0 51886
-fc 13227,13710 0 51887
-sq 13227,14106 0 51899
-/L 13227,18990 2 51944
-/l 13227,19545 2 51960
-a" 13227,19725 2 51933
-ho 13227,750,4137 0 51934
-vZ 13227,24810 2 51802
-IJ 13227,18990,330 2 51942
diff --git a/contrib/groff/font/devlj4/MARIGOLD b/contrib/groff/font/devlj4/MARIGOLD
deleted file mode 100644
index cc0921bdef86..000000000000
--- a/contrib/groff/font/devlj4/MARIGOLD
+++ /dev/null
@@ -1,351 +0,0 @@
-name MARIGOLD
-spacewidth 5856
-pcltypeface 4297
-pclproportional 1
-pclweight 0
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-charset
-! 7806,12570,330 0 3617
-dq 6342,11790 0 3618
-" "
-sh 9759,11610 0 3619
-# "
-Do 9759,14325,3315 0 3620
-$ "
-% 17076,11940,330 0 3621
-& 12684,12120,330 0 3622
-cq 3903,11790 0 51751
-' "
-( 6831,16770,2235 2 3624
-) 6831,16770,2235 2 3625
-* 9759,11940 0 3626
-+ 11709,8445,360 0 3627
-, 5856,1650,4590 0 3628
-char173 6831,6345 0 3629
-hy "
-- "
-. 5856,2535,330 0 3630
-sl 8781,16770,3240 2 3631
-/ "
-0 9759,11940,330 0 3632
-1 9759,11940,60 0 3633
-2 9759,11940,450 0 3634
-3 9759,11940,330 0 3635
-4 9759,11940,1080 0 3636
-5 9759,12060,330 0 3637
-6 9759,12660,330 0 3638
-7 9759,12480,30 0 3639
-8 9759,11940,330 0 3640
-9 9759,11940,1050 0 3641
-: 5856,8475,330 0 3642
-; 5856,8475,4590 0 3643
-< 26346,16068 2 3644
-= 11709,6510 0 3645
-> 26346,16068 2 3646
-? 8295,12120,330 0 3647
-at 18051,12354,3126 0 3648
-@ "
-A 12198,12120,225 0 3649
-B 10734,12120,60 0 3650
-C 10734,12120,330 0 3651
-D 12684,12015,225 0 3652
-E 10245,11910,225 0 3653
-F 9759,12120,60 0 3654
-G 12198,12120,330 0 3655
-H 12198,12015,60 0 3656
-I 6342,11850,60 0 3657
-J 6342,11850,4128 0 3658
-K 12198,11850,60 0 3659
-L 8781,11850,225 0 3660
-M 16101,12120,225 0 3661
-N 13173,12120,330 0 3662
-O 11709,12120,330 0 3663
-P 9759,12120,60 0 3664
-Q 11709,12120,3744 0 3665
-R 11709,12120,330 0 3666
-S 9759,12120,330 0 3667
-T 10245,12120,60 0 3668
-U 12684,11910,330 0 3669
-V 12198,12120,330 0 3670
-W 16101,12120,330 0 3671
-X 12198,11910,120 0 3672
-Y 10734,12120,60 0 3673
-Z 10734,12345,330 0 3674
-lB 6342,16860,1260 2 3675
-[ "
-rs 8781,16770,3240 2 3676
-\ "
-rB 6342,16860,1260 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 2 3679
-oq 3903,11790 0 51808
-` "
-a 8295,10350,330 0 3681
-b 6831,17430,330 2 3682
-c 6342,10350,330 0 3683
-d 7806,17430,330 2 3684
-e 6342,10350,330 0 3685
-f 3903,17430,7950 3 3686
-g 7806,10350,7950 1 3687
-h 8295,17433,330 2 3688
-i 4878,13635,330 0 3689
-j 3903,13635,7950 1 3690
-k 6831,17430,330 2 3691
-l 3903,17430,330 2 3692
-m 11220,10350,330 0 3693
-n 7806,10350,330 0 3694
-o 6831,10350,330 0 3695
-p 7806,10350,7950 1 3696
-q 7317,10575,7950 1 3697
-r 6342,10350 0 3698
-s 5367,10350,330 0 3699
-t 5367,14325,330 0 3700
-u 7806,10350,330 0 3701
-v 7317,10350,330 0 3702
-w 9759,10350,330 0 3703
-x 7317,13590,330 0 3704
-y 7317,10350,7950 1 3705
-z 7317,10350,330 0 3706
-lC 8295,16380,2670 2 3707
-{ "
-ba 13173,19758,6588 2 3708
-| "
-rC 8295,16380,2670 2 3709
-} "
-ti 26346,8952 0 51876
-char192 12198,17040,225 2 3776
-`A "
-char194 12198,17520,225 2 3778
-^A "
-char200 10245,17040,225 2 3784
-`E "
-char202 10245,17520,225 2 3786
-^E "
-char203 10245,16320,225 2 3787
-:E "
-char206 6342,17520,60 2 3790
-^I "
-char207 6342,16320,60 2 3791
-:I "
-char180 11709,15030 0 3764
-aa "
-ga 11709,15030 0 3680
-a^ 11709,15300 0 3678
-^ "
-char168 11709,14580 0 3752
-ad "
-a~ 11709,13782 0 3710
-~ "
-char217 12684,17040,330 2 3801
-`U "
-char219 12684,17520,330 2 3803
-^U "
-char221 10734,17040,60 2 3805
-'Y "
-char253 7317,15030,7950 1 3837
-'y "
-char176 7806,11940 0 3760
-de "
-char199 10734,12120,4140 0 3783
-,C "
-char231 6342,10350,4320 0 3815
-,c "
-char209 13173,15828,330 2 3793
-~N "
-char241 7806,13782,330 0 3825
-~n "
-char161 7806,8313,4587 0 3745
-r! "
-char191 8295,8202,4248 0 3775
-r? "
-char164 9759,10668 0 3748
-Cs "
-char163 9759,11940,225 0 3747
-Po "
-char165 9759,12165,60 0 3749
-Ye "
-char167 9759,12120,4596 0 3751
-sc "
-Fn 9759,17430,7950 3 51871
-char162 9759,12516,2580 0 3746
-ct "
-char226 8295,15300,330 0 3810
-^a "
-char234 6342,15300,330 0 3818
-^e "
-char244 6831,15300,330 0 3828
-^o "
-char251 7806,15300,330 0 3835
-^u "
-char225 8295,15030,330 0 3809
-'a "
-char233 6342,15030,330 0 3817
-'e "
-char243 6831,15030,330 0 3827
-'o "
-char250 7806,15030,330 0 3834
-'u "
-char224 8295,15030,330 0 3808
-`a "
-char232 6342,15030,330 0 3816
-`e "
-char242 6831,15030,330 0 3826
-`o "
-char249 7806,15030,330 0 3833
-`u "
-char228 8295,14580,330 0 3812
-:a "
-char235 6342,14580,330 0 3819
-:e "
-char246 6831,14580,330 0 3830
-:o "
-char252 7806,14580,330 0 3836
-:u "
-char197 12198,16815,225 2 3781
-oA "
-char238 4878,15300,330 0 3822
-^i "
-char216 11709,12849,984 0 3800
-/O "
-char198 17565,11910,225 0 3782
-AE "
-char229 8295,14685,330 0 3813
-oa "
-char237 4878,15030,330 0 3821
-'i "
-char248 6831,11724,1635 0 3832
-/o "
-char230 10734,10350,330 0 3814
-ae "
-char196 12198,16320,225 2 3780
-:A "
-char236 4878,15030,330 0 3820
-`i "
-char214 11709,16320,330 2 3798
-:O "
-char220 12684,16320,330 2 3804
-:U "
-char201 10245,17040,225 2 3785
-'E "
-char239 4878,14580,330 0 3823
-:i "
-char223 9270,18135,7350 3 3807
-ss "
-char212 11709,17520,330 2 3796
-^O "
-char193 12198,17040,225 2 3777
-'A "
-char195 12198,15828,225 2 3779
-~A "
-char227 8295,13782,330 0 3811
-~a "
-char208 12684,12015,225 0 3792
--D "
-char240 7317,17430,330 2 3824
-Sd "
-char205 6342,17040,60 2 3789
-'I "
-char204 6342,17040,60 2 3788
-`I "
-char211 11709,17040,330 2 3795
-'O "
-char210 11709,17040,330 2 3794
-`O "
-char213 11709,15828,330 2 3797
-~O "
-char245 6831,13782,330 0 3829
-~o "
-vS 9759,17520,330 2 51795
-vs 5367,15330,330 0 51827
-char218 12684,17040,330 2 3802
-'U "
-:Y 10734,16320,60 2 51801
-char255 7317,14580,7950 1 3839
-:y "
-char222 9759,11850,60 0 3806
-TP "
-char254 7806,17430,7950 3 3838
-Tp "
-char181 14637,10800,5595 0 3765
-char182 11709,12450,4455 0 3766
-ps "
-char190 17076,11940,840 0 3774
-34 "
-\- 11709,4770 0 51757
-char188 17076,11940,840 0 3772
-14 "
-char189 17076,11940,330 0 3773
-12 "
-char170 6342,11940 0 3754
-Of "
-char186 6342,11940 0 3770
-Om "
-char171 9270,8535 0 3755
-Fo "
-char187 9270,8535 0 3771
-Fc "
-char177 11709,8445,2595 0 3761
-char166 13173,19083,5916 2 3750
-bb "
-char169 7806,15960 2 3753
-co "
-char172 11709,6780 0 3756
-no "
-char174 7806,15960 2 3758
-rg "
-char178 7317,11850 0 3762
-S2 "
-char179 7317,11850 0 3763
-S3 "
-char184 11709,0,4320 0 3768
-ac "
-char185 7317,11850 0 3769
-S1 "
-char215 11709,7815 0 3799
-char247 11709,8700,360 0 3831
-char183 5856,7662 0 3767
-pc "
-fm 4878,11610 0 51873
-sd 7806,11610 0 51874
-dg 9759,12315,3795 0 51755
-tm 9759,14445 0 51796
-ah 11709,15330 0 51935
-ao 11709,14685 0 51930
-f/ 1953,11940,330 0 51759
-em 18051,6345 0 51789
-en 11709,6345 0 51790
-dd 9759,12315,3795 0 51773
-.i 4878,10350,330 0 51957
-aq 3903,11790 0 3623
-bu 13173,14226 0 51889
-'C 10734,17040,330 2 20166
-'c 6342,15030,330 0 20198
-lq 6342,11790 0 51838
-rq 6342,11790 0 51746
-Bq 6342,1650,2550 0 51772
-vz 7317,15330,330 0 51834
-fi 7806,17430,7950 3 51881
-fl 7806,17430,7950 3 51882
-ff 7806,17430,7950 3 51883
-Fi 11709,17430,7950 3 51884
-Fl 11709,17430,7950 3 51885
-ij 8781,13635,7950 1 51958
-bq 3903,1650,2550 0 51756
-%0 22932,11940,330 0 51901
-char175 11709,13674 0 3759
-a- "
-ab 11709,14700 0 51926
-a. 11709,14580 0 51927
-oe 10734,10350,330 0 51823
-OE 16587,12120,330 0 51791
-fo 5856,8535 0 51886
-fc 5856,8535 0 51887
-sq 19029,15624 0 51899
-/L 8781,11850,225 0 51944
-/l 4878,17430,330 2 51960
-a" 11709,15030 0 51933
-ho 11709,1341,4410 0 51934
-vZ 10734,17520,330 2 51802
-IJ 12684,11850,4128 0 51942
diff --git a/contrib/groff/font/devlj4/Makefile.sub b/contrib/groff/font/devlj4/Makefile.sub
deleted file mode 100644
index dd49b637d8f3..000000000000
--- a/contrib/groff/font/devlj4/Makefile.sub
+++ /dev/null
@@ -1,33 +0,0 @@
-DEV=lj4
-LJ4RES=600
-LJ4PRINT=$(PSPRINT)
-DEVFILES=DESC \
- ALBB ALBR \
- AOB AOI AOR \
- CB CBI CI CR \
- GB GBI GI GR \
- LGB LGI LGR \
- OB OBI OI OR \
- TB TBI TI TR \
- UB UBI UI UR \
- UCB UCBI UCI UCR \
- CLARENDON CORONET MARIGOLD S \
- generate/Makefile generate/text.map generate/special.map
-
-CLEANADD=DESC
-
-DESC: DESC.in
- -rm -f DESC
- echo "res $(LJ4RES)" >DESC
- echo "unitwidth `expr 7620000 / $(LJ4RES)`" >>DESC
- cat $(srcdir)/DESC.in >>DESC
- if test "$(PAGE)" = A4; then \
- echo "papersize a4" >>DESC; \
- else \
- echo "papersize letter" >>DESC; \
- fi
- test -z '$(LJ4PRINT)' || echo print '$(LJ4PRINT)' >>DESC
-
-fonts:
- $(MAKE) -f $(srcdir)/generate/Makefile srcdir=$(srcdir)/generate \
- HPFTODIT=$(top_builddir)/src/utils/hpftodit/hpftodit
diff --git a/contrib/groff/font/devlj4/OB b/contrib/groff/font/devlj4/OB
deleted file mode 100644
index 8ea8f2948236..000000000000
--- a/contrib/groff/font/devlj4/OB
+++ /dev/null
@@ -1,817 +0,0 @@
-name OB
-spacewidth 7317
-pcltypeface 4113
-pclproportional 1
-pclweight 3
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2925
-P . -3903
-P , -3903
-V A -3903
-A V -3903
-T o -2925
-T r -1950
-T c -2925
-T e -2925
-T d -2925
-T s -2439
-T y -2925
-T a -2925
-T w -2925
-T u -2925
-L T -1950
-L Y -2925
-Y o -3903
-Y e -3903
-Y a -3903
-A W -3414
-W A -3414
-T A -1950
-V o -2925
-V e -2925
-V a -2925
-Y A -3903
-F A -2925
-F . -3903
-F , -3903
-A T -1950
-A Y -3903
-v . -2439
-v , -2439
-y . -2439
-y , -2439
-T . -1950
-T , -1950
-L W -2925
-P A -2925
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -2439
-W e -2439
-W a -2439
-W . -3414
-W , -3414
-r . -2439
-r , -2439
-w . -2439
-w , -2439
-Y u -2439
-A v -2439
-A y -2439
-A w -1461
-o . -1461
-o , -1461
-p . -1461
-p , -1461
-e . -975
-e , -975
-b . -1461
-b , -1461
-O T -1461
-O V -1461
-O Y -1461
-O . -1461
-O , -1461
-L y -2439
-L O -1461
-L G -1950
-L C -1950
-L Q -1950
-V y -1461
-V u -1461
-V O -1461
-V G -1461
-V C -1461
-V Q -1461
-D T -1950
-D V -1461
-D Y -1950
-D . -1950
-D , -1950
-Y O -1461
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -1461
-F e -1461
-F a -1461
-c . -486
-c , -486
-O A -1461
-O W -975
-L U -1950
-R T -975
-R V -975
-R Y -975
-R W -975
-G T -975
-P o -1461
-P g -975
-P e -1461
-P a -1461
-C A -486
-C . -486
-C , -486
-D A -1461
-D W -975
-B T -975
-B Y -975
-B . -975
-B , -975
-A O -1461
-A G -1461
-A C -1461
-A U -1461
-A Q -1461
-W r -975
-W y -975
-W u -975
-W O -975
-W G -975
-W C -975
-W Q -975
-J A -975
-J . -975
-J , -975
-U A -1461
-U . -1950
-U , -1950
-Q A -1461
-Q W -975
-f . -486
-f , -486
-T O -1461
-T G -1950
-T C -1950
-T Q -1950
-O X -1461
-L o -1461
-L e -1461
-L q -1461
-G V -975
-G Y -975
-G W -975
-G . -486
-G , -486
-C T -486
-C V -486
-C Y -486
-D X -1461
-B V -975
-B X -975
-B A -975
-B W -975
-S . -975
-S , -975
-X o -1461
-X e -1461
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1461
-A e -1461
-Q X -1461
-K o -1461
-K e -1461
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -975
-o y -975
-o x -975
-h v -975
-h y -975
-n v -975
-n y -975
-m v -975
-m y -975
-r g -486
-g . -486
-g , -486
-p v -975
-p y -975
-p x -975
-c v -486
-c y -486
-v o -975
-v g -975
-v c -975
-v d -975
-v a -975
-v q -975
-e v -975
-e y -975
-b v -975
-b y -975
-s . -975
-s , -975
-y o -975
-y g -975
-y c -975
-y d -975
-y a -975
-y q -975
-f g -486
-x o -975
-x g -975
-x c -975
-x e -975
-x d -975
-x a -975
-x q -975
-a v -975
-a y -975
-T i -975
-T S -975
-L a -975
-L S -486
-G X -486
-G A -486
-P s -975
-C X -486
-C W -486
-V i -975
-V S -975
-S T -486
-S V -486
-S Y -486
-S X -486
-S A -975
-S W -486
-Y i -975
-Y S -975
-X a -975
-X u -975
-X S -486
-A t -975
-A g -975
-A c -1461
-A d -1461
-A a -975
-A u -975
-A q -1461
-A S -486
-W i -975
-W S -975
-K c -1461
-K u -975
-K S -486
-t g -486
-o f -486
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-p f -486
-c f -486
-c x -486
-v e -975
-v s -975
-e f -486
-e x -975
-b f -486
-s v -486
-s y -486
-s f -486
-s x -486
-y e -975
-y s -975
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-x s -486
-k o -486
-k g -486
-k c -486
-k v -486
-k e -486
-k d -486
-k y -486
-k a -486
-k w -486
-k q -486
-O Z -486
-L J -1461
-G Z -486
-P M -486
-C Z -486
-Z o -486
-Z e -486
-Z d -486
-Z s -486
-Z y -486
-Z a -486
-Z w -486
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z Q -486
-D Z -486
-B Z -486
-S Z -486
-A s -486
-A J -1461
-J o -486
-J e -486
-J a -486
-J M -486
-K a -975
-K J -486
-t o -486
-t c -486
-t e -486
-t d -486
-t s -486
-t a -486
-t q -486
-o z -486
-h f -486
-n f -486
-m f -486
-r s -486
-p z -486
-c z -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z s -486
-z a -486
-z q -486
-b z -486
-s z -486
-a f -486
-k t -486
-k s -486
-k f -486
-k u -486
-F M -486
-A f -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -2925
-L ' -2925
-T char173 -2925
-T hy -2925
-T - -2925
-T en -2925
-T em -2925
-A cq -3414
-A ' -3414
-char173 T -2925
-hy T -2925
-- T -2925
-en T -2925
-em T -2925
-Y char173 -2439
-Y hy -2439
-Y - -2439
-Y en -2439
-Y em -2439
-p cq -1461
-p ' -1461
-c cq -486
-c ' -486
-e cq -975
-e ' -975
-b cq -1461
-b ' -1461
-a cq -975
-a ' -975
-V char173 -1461
-V hy -1461
-V - -1461
-V en -1461
-V em -1461
-h cq -975
-h ' -975
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-W char173 -975
-W hy -975
-W - -975
-W en -975
-W em -975
-cq d -1461
-' d -1461
-s cq -486
-s ' -486
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1461
-A hy -1461
-A - -1461
-A en -1461
-A em -1461
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -975
-' s -975
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1461
-hy A -1461
-- A -1461
-en X -1461
-en A -1461
-em X -1461
-K cq -486
-K ' -486
-t g -486
-b f -486
-k cq -486
-k ' -486
-M cq -486
-M ' -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-cq M -486
-' M -486
-k char173 -486
-k hy -486
-k - -486
-k en -486
-k em -486
-charset
-! 7317,18000,375 2 3617
-dq 12198,18375 2 3618
-" "
-sh 14637,18069,444 2 3619
-# "
-Do 14637,19755,2988 2 3620
-$ "
-% 23418,17769,444 2 3621
-& 19029,17997,375 2 3622
-cq 7317,18375 2 51751
-' "
-( 7317,18375,3165 2 3624
-) 7317,18375,3165 2 3625
-* 14637,18150 2 3626
-+ 23418,13164,534 0 3627
-, 7317,4068,4902 0 3628
-char173 7317,8307 0 3629
-hy "
-- "
-. 7317,3975,375 0 3630
-sl 7317,19650,525 2 3631
-/ "
-0 14637,17700,375 0 3632
-1 14637,17700,69 0 3633
-2 14637,17700,201 0 3634
-3 14637,17700,375 0 3635
-4 14637,17394,69 0 3636
-5 14637,17526,375 0 3637
-6 14637,17700,375 0 3638
-7 14637,17526,69 0 3639
-8 14637,17700,375 0 3640
-9 14637,17700,375 0 3641
-: 7317,12057,375 0 3642
-; 7317,12057,4902 0 3643
-< 26346,16068 0 3644
-= 23418,9639 0 3645
-> 26346,16068 0 3646
-? 11709,18000,375 2 3647
-at 23418,16950,4131 0 3648
-@ "
-A 17565,18069,69 2 3649
-B 16101,18069,69 2 3650
-C 17565,18375,375 2 3651
-D 20490,18201,201 2 3652
-E 13173,18201,201 2 3653
-F 13173,18201,69 2 3654
-G 20490,18375,375 2 3655
-H 20490,18069,69 2 3656
-I 8781,18069,69 2 3657
-J 8781,18069,4218 2 3658
-K 16587,18069,69 2 3659
-L 13173,18069,201 2 3660
-M 23418,18069,69 2 3661
-N 20490,18069,69 2 3662
-O 21954,18375,375 2 3663
-P 15126,18069,69 2 3664
-Q 21954,18375,5223 3 3665
-R 16101,18069,69 2 3666
-S 13173,18375,375 2 3667
-T 14637,18201,69 2 3668
-U 20490,18069,375 2 3669
-V 17565,18069,69 2 3670
-W 26346,18069,69 2 3671
-X 16101,18069,69 2 3672
-Y 16101,18069,69 2 3673
-Z 16101,18201,201 2 3674
-lB 7317,18201,4701 2 3675
-[ "
-rs 7317,19650,525 2 3676
-\ "
-rB 7317,18201,4701 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 7317,18375 2 51808
-` "
-a 13173,12840,375 0 3681
-b 14637,19569,375 2 3682
-c 13173,12840,375 0 3683
-d 14637,19569,375 2 3684
-e 13173,12840,375 0 3685
-f 8781,19710,69 2 3686
-g 13173,12840,5400 1 3687
-h 14637,19569,69 2 3688
-i 7317,19332,69 2 3689
-j 7317,19332,5400 3 3690
-k 13173,19569,69 2 3691
-l 7317,19569,69 2 3692
-m 21954,12900,69 0 3693
-n 14637,12840,69 0 3694
-o 14637,12840,375 0 3695
-p 14637,12840,5469 1 3696
-q 14637,12840,5469 1 3697
-r 10245,12780,69 0 3698
-s 10245,12840,375 0 3699
-t 8781,17100,375 0 3700
-u 14637,12534,375 0 3701
-v 13173,12534,69 0 3702
-w 20490,12534,69 0 3703
-x 13173,12534,69 0 3704
-y 13173,12534,5439 1 3705
-z 13173,12666,201 0 3706
-lC 13173,19935,6210 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 13173,19935,6210 3 3709
-} "
-ti 26346,9435 0 51876
-char192 17565,24537,69 2 3776
-`A "
-char194 17565,24273,69 2 3778
-^A "
-char200 13173,24537,201 2 3784
-`E "
-char202 13173,24273,201 2 3786
-^E "
-char203 13173,23301,201 2 3787
-:E "
-char206 8781,24273,69 2 3790
-^I "
-char207 8781,23301,69 2 3791
-:I "
-char180 14637,18843 2 3764
-aa "
-ga 14637,18843 2 3680
-a^ 14637,18738 2 3678
-^ "
-char168 14637,17694 0 3752
-ad "
-a~ 14637,17694 0 3710
-~ "
-char217 20490,24537,375 2 3801
-`U "
-char219 20490,24273,375 2 3803
-^U "
-char221 16101,24537,69 2 3805
-'Y "
-char253 13173,18843,5439 3 3837
-'y "
-char176 14637,17700 0 3760
-de "
-char199 17565,18375,6663 3 3783
-,C "
-char231 13173,12840,5469 1 3815
-,c "
-char209 20490,23031,69 2 3793
-~N "
-char241 14637,17694,69 0 3825
-~n "
-char161 7317,12906,5469 1 3745
-r! "
-char191 11709,12906,5469 1 3775
-r? "
-char164 14637,15834 0 3748
-Cs "
-char163 14637,17700,201 0 3747
-Po "
-char165 14637,17769,69 2 3749
-Ye "
-char167 14637,18000,1383 2 3751
-sc "
-Fn 14637,19710,69 2 51871
-char162 14637,19788,135 2 3746
-ct "
-char226 13173,18738,375 2 3810
-^a "
-char234 13173,18738,375 2 3818
-^e "
-char244 14637,18738,375 2 3828
-^o "
-char251 14637,18738,375 2 3835
-^u "
-char225 13173,18843,375 2 3809
-'a "
-char233 13173,18843,375 2 3817
-'e "
-char243 14637,18843,375 2 3827
-'o "
-char250 14637,18843,375 2 3834
-'u "
-char224 13173,18843,375 2 3808
-`a "
-char232 13173,18843,375 2 3816
-`e "
-char242 14637,18843,375 2 3826
-`o "
-char249 14637,18843,375 2 3833
-`u "
-char228 13173,17694,375 0 3812
-:a "
-char235 13173,17694,375 0 3819
-:e "
-char246 14637,17694,375 0 3830
-:o "
-char252 14637,17694,375 0 3836
-:u "
-char197 17565,25002,69 2 3781
-oA "
-char238 7317,18738,69 2 3822
-^i "
-char216 21954,18375,375 2 3800
-/O "
-char198 22932,18201,201 2 3782
-AE "
-char229 13173,18684,375 2 3813
-oa "
-char237 7317,18843,69 2 3821
-'i "
-char248 14637,12849,402 0 3832
-/o "
-char230 20004,12840,375 0 3814
-ae "
-char196 17565,23301,69 2 3780
-:A "
-char236 7317,18843,69 2 3820
-`i "
-char214 21954,23301,375 2 3798
-:O "
-char220 20490,23301,375 2 3804
-:U "
-char201 13173,24537,201 2 3785
-'E "
-char239 7317,17694,69 0 3823
-:i "
-char223 14637,19710,375 2 3807
-ss "
-char212 21954,24273,375 2 3796
-^O "
-char193 17565,24537,69 2 3777
-'A "
-char195 17565,23031,69 2 3779
-~A "
-char227 13173,17694,375 0 3811
-~a "
-char208 20490,18201,201 2 3792
--D "
-char240 14637,19503,375 2 3824
-Sd "
-char205 8781,24537,69 2 3789
-'I "
-char204 8781,24537,69 2 3788
-`I "
-char211 21954,24537,375 2 3795
-'O "
-char210 21954,24537,375 2 3794
-`O "
-char213 21954,23031,375 2 3797
-~O "
-char245 14637,17694,375 0 3829
-~o "
-vS 13173,24273,375 2 51795
-vs 10245,18738,375 2 51827
-char218 20490,24537,375 2 3802
-'U "
-:Y 16101,23301,69 2 51801
-char255 13173,17694,5439 1 3839
-:y "
-char222 15126,18069,69 2 3806
-TP "
-char254 14637,19569,5469 3 3838
-Tp "
-char181 15612,12630,4680 0 3765
-char182 14637,19635,4200 2 3766
-ps "
-char190 23418,17700,444 0 3774
-34 "
-\- 23418,7455 0 51757
-char188 23418,18099,444 2 3772
-14 "
-char189 23418,18099,444 2 3773
-12 "
-char170 9759,17700 0 3754
-Of "
-char186 9759,17700 0 3770
-Om "
-char171 11709,11028 0 3755
-Fo "
-char187 11709,11028 0 3771
-Fc "
-char177 23418,13164,4314 0 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19635 2 3753
-co "
-char172 23418,10770 0 3756
-no "
-char174 13173,19635 2 3758
-rg "
-char178 9759,17700 0 3762
-S2 "
-char179 9759,17700 0 3763
-S3 "
-char184 14637,196476,5469 3 3768
-ac "
-char185 9759,18099 2 3769
-S1 "
-char215 23418,13107,567 0 3799
-char247 23418,13017,387 0 3831
-char183 7317,11274 0 3767
-pc "
-fm 7317,18096 2 51873
-sd 14637,18096 2 51874
-dg 14637,18201,426 2 51755
-tm 16101,17850 2 51796
-ah 14637,18738 2 51935
-ao 14637,18684 2 51930
-f/ 2928,17544,444 0 51759
-em 23418,8085 0 51789
-en 14637,8085 0 51790
-dd 14637,18201,426 2 51773
-.i 7317,12534,69 0 51957
-aq 7317,18375 2 3623
-bu 13173,14226 0 51889
-'C 17565,24537,375 2 20166
-'c 13173,18843,375 2 20198
-lq 12198,18330 2 51838
-rq 12198,18375 2 51746
-Bq 12198,4095,4371 0 51772
-vz 13173,18738,201 2 51834
-fi 15126,19710,69 2 51881
-fl 15126,19710,69 2 51882
-ff 16587,19710,69 2 51883
-Fi 22932,19710,69 2 51884
-Fl 22932,19710,69 2 51885
-ij 14637,19332,5400 3 51958
-bq 7317,4095,4371 0 51756
-%0 33177,17769,444 2 51901
-char175 14637,16722 0 3759
-a- "
-ab 14637,18525 2 51926
-a. 14637,18792 2 51927
-oe 22443,12840,375 0 51823
-OE 24882,18375,375 2 51791
-fo 7317,11028 0 51886
-fc 7317,11028 0 51887
-sq 19029,15624 0 51899
-/L 13173,18069,201 2 51944
-/l 7317,19569,69 2 51960
-a" 14637,18843 2 51933
-ho 14637,654,3774 0 51934
-vZ 16101,24273,201 2 51802
-IJ 17565,18069,4218 2 51942
diff --git a/contrib/groff/font/devlj4/OBI b/contrib/groff/font/devlj4/OBI
deleted file mode 100644
index e17fe3f44f48..000000000000
--- a/contrib/groff/font/devlj4/OBI
+++ /dev/null
@@ -1,810 +0,0 @@
-name OBI
-spacewidth 7317
-slant 12.350000
-pcltypeface 4113
-pclproportional 1
-pclweight 3
-pclstyle 1
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2439
-P . -3903
-P , -3903
-V A -3903
-A V -4389
-T o -2439
-T r -2439
-T c -2439
-T e -2439
-T d -2439
-T s -2439
-T y -2439
-T a -2439
-T w -2439
-T u -2439
-L T -2439
-L Y -2439
-Y o -3903
-Y e -3414
-Y a -3903
-A W -3903
-W A -3414
-T A -2439
-V o -2925
-V e -2439
-V a -2925
-Y A -3903
-F A -1461
-F . -3903
-F , -3903
-A T -2925
-A Y -4389
-v . -2925
-v , -2925
-y . -2925
-y , -2925
-T . -2439
-T , -2439
-L W -2439
-P A -1950
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -2439
-W e -1950
-W a -2439
-W . -3414
-W , -3414
-r . -2439
-r , -2439
-w . -2925
-w , -2925
-Y u -2439
-A v -2925
-A y -2925
-A w -2925
-o . -975
-o , -975
-p . -975
-p , -975
-e . -486
-e , -486
-b . -975
-b , -975
-O T -2439
-O V -1950
-O Y -2439
-O . -1950
-O , -1950
-L y -2439
-L O -2439
-L G -2439
-L C -2439
-L Q -2439
-V y -1461
-V u -1461
-V O -1461
-V G -1461
-V C -1461
-V Q -1461
-D T -2439
-D V -1950
-D Y -2439
-D . -1950
-D , -1950
-Y O -1950
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -486
-F e -486
-F a -486
-c . -486
-c , -486
-O A -975
-O W -1461
-L U -2439
-R T -486
-R V -486
-R Y -486
-R W -486
-G T -975
-P o -975
-P g -975
-P e -975
-P a -975
-C A -486
-C . -486
-C , -486
-D A -975
-D W -1461
-B T -1950
-B Y -1950
-B . -1461
-B , -1461
-A O -1950
-A G -1950
-A C -1950
-A U -1950
-A Q -1950
-W r -975
-W y -975
-W u -975
-W O -975
-W G -975
-W C -975
-W Q -975
-J A -975
-J . -975
-J , -975
-U A -975
-U . -1950
-U , -1950
-Q W -1461
-f . -486
-f , -486
-T O -1950
-T G -1950
-T C -1950
-T Q -1950
-O X -1461
-L o -1950
-L e -1461
-L q -1950
-G V -975
-G Y -975
-G W -975
-G . -486
-G , -486
-P T -975
-P V -975
-P Y -975
-C T -486
-C V -486
-C Y -486
-D X -1461
-B V -1950
-B X -1461
-B A -975
-B W -1461
-S . -486
-S , -486
-X o -1461
-X e -1461
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1950
-A e -1461
-K o -1461
-K e -1461
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -975
-o y -975
-o x -486
-o w -975
-h v -975
-h y -975
-n v -975
-n y -975
-p v -486
-p y -486
-p x -486
-c v -486
-c y -486
-c w -486
-v o -486
-v g -486
-v c -486
-v d -486
-v a -486
-v q -486
-e v -975
-e y -975
-b v -975
-b y -975
-b w -975
-s . -486
-s , -486
-y o -486
-y g -486
-y c -486
-y d -486
-y a -486
-y q -486
-f g -486
-x o -486
-x g -486
-x c -486
-x e -486
-x d -486
-x a -486
-x q -486
-a v -975
-a y -975
-a w -975
-w o -486
-w g -486
-w c -486
-w d -486
-w a -486
-w q -486
-T i -486
-T S -486
-L a -975
-L S -975
-R o -975
-R y -486
-R O -486
-R G -486
-R C -486
-R U -486
-R Q -486
-G X -486
-G A -486
-P s -975
-P Z -975
-P X -975
-P W -975
-C X -486
-C W -486
-V i -486
-V S -486
-S T -975
-S V -975
-S Y -975
-S X -486
-S A -486
-S W -975
-Y i -486
-Y S -486
-X a -975
-X u -975
-X S -486
-A t -975
-A g -975
-A c -1461
-A d -1950
-A a -975
-A u -975
-A q -1950
-A S -975
-W i -486
-W S -486
-K c -1461
-K u -975
-K S -975
-o f -486
-h w -975
-n w -975
-p f -486
-p w -486
-c f -486
-c x -486
-v e -486
-v s -486
-e f -486
-e x -486
-e w -975
-b f -486
-y e -486
-y s -486
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-w e -486
-w s -486
-k o -486
-k g -486
-k c -486
-k v -486
-k e -486
-k d -486
-k y -486
-k a -486
-k w -486
-k q -486
-O Z -486
-R e -975
-R a -975
-R u -486
-R S -486
-G Z -486
-C Z -486
-Z o -975
-Z e -975
-Z d -975
-Z y -486
-Z a -975
-Z w -486
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z Q -486
-D Z -486
-B Z -486
-S Z -486
-J o -486
-J e -486
-J a -486
-K a -975
-o z -486
-h f -486
-n f -486
-p z -486
-c z -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z a -486
-z q -486
-b z -486
-a f -486
-k t -486
-k f -486
-k u -486
-A f -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -2439
-L ' -2439
-T char173 -2439
-T hy -2439
-T - -2439
-T en -2439
-T em -2439
-A cq -3414
-A ' -3414
-char173 T -2925
-hy T -2925
-- T -2925
-en T -2925
-em T -2925
-Y char173 -2439
-Y hy -2439
-Y - -2439
-Y en -2439
-Y em -2439
-p cq -486
-p ' -486
-c cq -486
-c ' -486
-e cq -1461
-e ' -1461
-b cq -1950
-b ' -1950
-a cq -975
-a ' -975
-V char173 -1461
-V hy -1461
-V - -1461
-V en -1461
-V em -1461
-h cq -1461
-h ' -1461
-n cq -1461
-n ' -1461
-R cq -486
-R ' -486
-W char173 -975
-W hy -975
-W - -975
-W en -975
-W em -975
-cq d -1461
-' d -1461
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1950
-A hy -1950
-A - -1950
-A en -1950
-A em -1950
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -975
-' s -975
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -975
-hy A -975
-- A -975
-en X -1461
-en A -975
-em X -1461
-R char173 -486
-R hy -486
-R - -486
-R en -486
-R em -486
-K cq -486
-K ' -486
-b f -486
-k cq -486
-k ' -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-k char173 -486
-k hy -486
-k - -486
-k en -486
-k em -486
-charset
-! 7317,18000,375,1944,753,737 2 3617
-dq 12198,18375,0,1623,-2622,737 2 3618
-" "
-sh 14637,18069,444,1440,228,737 2 3619
-# "
-Do 14637,19839,3099,1341,702,737 2 3620
-$ "
-% 23418,17769,264,0,-2067 0 3621
-& 19029,18000,375,237,198,237 2 3622
-cq 7317,18375,0,2511,-531,737 2 51751
-' "
-( 7317,18375,3165,3450,135,737 2 3624
-) 7317,18375,3165,1164,2421,737 2 3625
-* 14637,18150,0,63,-2364,63 2 3626
-+ 23418,13164,534,0,-3528 0 3627
-, 7317,3966,5040,0,3423 1 3628
-char173 7317,8715,0,1497,1071,737 0 3629
-hy "
-- "
-. 7317,3849,375,0,627 0 3630
-sl 7317,19575,450,4377,2736,737 2 3631
-/ "
-0 14637,17700,375,933,-159,737 0 3632
-1 14637,17700,69,0,-2430 0 3633
-2 14637,17700,201,921,858,737 0 3634
-3 14637,17700,375,372,819,372 0 3635
-4 14637,17394,69,1008,684,737 0 3636
-5 14637,17526,375,1362,669,737 0 3637
-6 14637,17700,375,399,-582,399 0 3638
-7 14637,17526,69,2931,-123,737 0 3639
-8 14637,17700,375,1155,174,737 0 3640
-9 14637,17700,375,843,-405,737 0 3641
-: 7317,11754,375,759,627,737 0 3642
-; 7317,11754,5040,759,3423,737 1 3643
-< 26346,16068,0,0,-3981 0 3644
-= 23418,9624,0,0,-4068 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 11709,18000,375,900,-1323,737 2 3647
-at 23418,16950,4131,966,348,737 0 3648
-@ "
-A 17565,18069,69,0,2586 2 3649
-B 16101,18069,69,864,306,737 2 3650
-C 17565,18375,375,2640,-600,737 2 3651
-D 20490,18069,69,720,279,720 2 3652
-E 13173,18201,201,2835,738,737 2 3653
-F 13173,18201,69,3051,612,737 2 3654
-G 20490,18375,375,1230,-798,737 2 3655
-H 20490,18069,69,1671,417,737 2 3656
-I 8781,18069,69,1779,441,737 2 3657
-J 8781,18069,4242,1551,2634,737 2 3658
-K 16101,18069,69,3528,366,737 2 3659
-L 13173,18069,201,201,168,201 2 3660
-M 23418,18069,414,1542,768,737 2 3661
-N 20490,18069,69,1383,192,737 2 3662
-O 21954,18375,375,942,-447,737 2 3663
-P 14637,18069,69,2064,519,737 2 3664
-Q 21954,18375,4200,1008,-396,737 2 3665
-R 16101,18069,69,900,387,737 2 3666
-S 13173,18375,375,1626,879,737 2 3667
-T 14637,18201,69,3006,-1071,737 2 3668
-U 20490,18069,375,1671,-1071,737 2 3669
-V 17565,18069,69,3372,-1446,737 2 3670
-W 24882,18069,69,3120,-1605,737 2 3671
-X 16101,18069,69,2451,1470,737 2 3672
-Y 16101,18069,69,3747,-1419,737 2 3673
-Z 16101,18201,201,2589,2115,737 2 3674
-lB 7317,18249,4749,3699,2235,737 2 3675
-[ "
-rs 7317,19575,450,0,-1611 2 3676
-\ "
-rB 7317,18249,4749,3696,2238,737 2 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,737 3 3679
-oq 7317,18375,0,2508,-528,737 2 51808
-` "
-a 13173,12840,375,189,954,189 0 3681
-b 14637,19779,375,666,1191,666 2 3682
-c 12684,12840,375,2118,171,737 0 3683
-d 14637,19569,375,2727,594,737 2 3684
-e 13173,12840,375,750,480,737 0 3685
-f 8781,19710,69,3357,996,737 2 3686
-g 13173,12840,5400,1836,1659,737 1 3687
-h 14637,19569,69,423,1242,423 2 3688
-i 7317,19308,69,1794,1131,737 2 3689
-j 7317,19308,5400,1797,3720,737 3 3690
-k 13173,19569,69,2670,1353,737 2 3691
-l 7317,19569,69,2586,1086,737 2 3692
-m 21954,12840,69,375,1272,375 0 3693
-n 14637,12840,69,438,1206,438 0 3694
-o 14637,12840,375,708,618,708 0 3695
-p 14637,12840,5469,663,2349,663 1 3696
-q 14637,12840,5469,1281,558,737 1 3697
-r 10245,12840,69,1326,1107,737 0 3698
-s 10245,12840,375,1188,1230,737 0 3699
-t 8781,17055,375,2148,-189,737 0 3700
-u 14637,12534,375,1230,417,737 0 3701
-v 13173,12534,69,2223,-768,737 0 3702
-w 20490,12534,69,2229,-954,737 0 3703
-x 13173,12534,69,1647,2190,737 0 3704
-y 13173,12534,5469,2040,1176,737 1 3705
-z 13173,12666,201,1464,1689,737 0 3706
-lC 13173,19935,6210,3339,-972,737 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 13173,19935,6210,63,2304,63 3 3709
-} "
-ti 26346,9435,0,0,-4029 0 51876
-char192 17565,24342,69,0,2586 2 3776
-`A "
-char194 17565,24321,69,0,2586 2 3778
-^A "
-char200 13173,24342,201,2835,738,737 2 3784
-`E "
-char202 13173,24321,201,2835,738,737 2 3786
-^E "
-char203 13173,23610,201,3084,738,737 2 3787
-:E "
-char206 8781,24321,69,4296,441,737 2 3790
-^I "
-char207 8781,23610,69,5280,441,737 2 3791
-:I "
-char180 14637,18801,0,297,-5763,297 2 3764
-aa "
-ga 14637,18801,0,0,-4419 2 3680
-a^ 14637,18780,0,0,-3456 2 3678
-^ "
-char168 14637,18090,0,429,-4023,429 2 3752
-ad "
-a~ 14637,17847,0,1308,-3438,737 2 3710
-~ "
-char217 20490,24342,375,1671,-1071,737 2 3801
-`U "
-char219 20490,24321,375,1671,-1071,737 2 3803
-^U "
-char221 16101,24342,69,3747,-1419,737 2 3805
-'Y "
-char253 13173,18801,5469,2040,1176,737 3 3837
-'y "
-char176 14637,17700,0,0,-2586 0 3760
-de "
-char199 17565,18375,5988,2640,-600,737 3 3783
-,C "
-char231 12684,12840,5733,2118,171,737 1 3815
-,c "
-char209 20490,23382,69,1383,192,737 2 3793
-~N "
-char241 14637,17847,69,1308,1206,737 2 3825
-~n "
-char161 7317,12906,5469,861,1836,737 1 3745
-r! "
-char191 11709,12906,5469,0,90 1 3775
-r? "
-char164 14637,15834,0,1452,477,737 0 3748
-Cs "
-char163 14637,17700,201,1260,1419,737 0 3747
-Po "
-char165 14637,18069,69,4212,-132,737 2 3749
-Ye "
-char167 14637,18375,1383,0,-933 2 3751
-sc "
-Fn 14637,19710,69,366,-1863,366 2 51871
-char162 14637,19812,342,2082,-1152,737 2 3746
-ct "
-char226 13173,18780,375,711,954,711 2 3810
-^a "
-char234 13173,18780,375,750,480,737 2 3818
-^e "
-char244 14637,18780,375,708,618,708 2 3828
-^o "
-char251 14637,18780,375,1230,417,737 2 3835
-^u "
-char225 13173,18801,375,1029,954,737 2 3809
-'a "
-char233 13173,18801,375,1029,480,737 2 3817
-'e "
-char243 14637,18801,375,708,618,708 2 3827
-'o "
-char250 14637,18801,375,1230,417,737 2 3834
-'u "
-char224 13173,18801,375,189,954,189 2 3808
-`a "
-char232 13173,18801,375,750,480,737 2 3816
-`e "
-char242 14637,18801,375,708,618,708 2 3826
-`o "
-char249 14637,18801,375,1230,417,737 2 3833
-`u "
-char228 13173,18090,375,1161,954,737 2 3812
-:a "
-char235 13173,18090,375,1161,480,737 2 3819
-:e "
-char246 14637,18090,375,708,618,708 2 3830
-:o "
-char252 14637,18090,375,1230,417,737 2 3836
-:u "
-char197 17565,25035,69,0,2586 2 3781
-oA "
-char238 7317,18780,69,3639,1134,737 2 3822
-^i "
-char216 21954,18375,1017,1311,-312,737 2 3800
-/O "
-char198 22932,18201,201,2844,2589,737 2 3782
-AE "
-char229 13173,18678,375,189,954,189 2 3813
-oa "
-char237 7317,18801,69,3957,1134,737 2 3821
-'i "
-char248 14637,13446,843,1227,1224,737 0 3832
-/o "
-char230 20004,12840,375,744,945,737 0 3814
-ae "
-char196 17565,23610,69,888,2586,737 2 3780
-:A "
-char236 7317,18801,69,1116,1134,737 2 3820
-`i "
-char214 21954,23610,375,942,-447,737 2 3798
-:O "
-char220 20490,23610,375,1671,-1071,737 2 3804
-:U "
-char201 13173,24342,201,3348,738,737 2 3785
-'E "
-char239 7317,18090,69,4089,1134,737 2 3823
-:i "
-char223 14637,19500,375,396,1206,396 2 3807
-ss "
-char212 21954,24321,375,942,-447,737 2 3796
-^O "
-char193 17565,24342,69,1152,2586,737 2 3777
-'A "
-char195 17565,23382,69,1752,2586,737 2 3779
-~A "
-char227 13173,17847,375,2040,954,737 2 3811
-~a "
-char208 20490,18069,69,720,318,720 2 3792
--D "
-char240 14637,19674,375,831,618,737 2 3824
-Sd "
-char205 8781,24342,69,5544,441,737 2 3789
-'I "
-char204 8781,24342,69,1779,441,737 2 3788
-`I "
-char211 21954,24342,375,942,-447,737 2 3795
-'O "
-char210 21954,24342,375,942,-447,737 2 3794
-`O "
-char213 21954,23382,375,942,-447,737 2 3797
-~O "
-char245 14637,17847,375,1308,618,737 2 3829
-~o "
-vS 13173,24321,375,3120,879,737 2 51795
-vs 10245,18780,375,3117,1230,737 2 51827
-char218 20490,24342,375,1671,-1071,737 2 3802
-'U "
-:Y 16101,23610,69,3747,-1419,737 2 51801
-char255 13173,18090,5469,2040,1176,737 3 3839
-:y "
-char222 14637,18069,69,1347,384,737 2 3806
-TP "
-char254 14637,19779,5469,672,2361,672 3 3838
-Tp "
-char181 15612,12630,4680,1422,2907,737 0 3765
-char182 14637,19635,4200,18,-1140,18 2 3766
-ps "
-char190 23418,17769,444,0,-870 0 3774
-34 "
-\- 23418,7455,0,0,-3528 0 51757
-char188 23418,17865,444,0,-2133 2 3772
-14 "
-char189 23418,17865,444,0,-1794 2 3773
-12 "
-char170 9759,17700,0,765,-258,737 0 3754
-Of "
-char186 9759,17700,0,1815,-81,737 0 3770
-Om "
-char171 11220,10851,0,1272,132,737 0 3755
-Fo "
-char187 11220,10851,0,588,816,588 0 3771
-Fc "
-char177 23418,13080,4230,0,-3522 0 3761
-char166 13173,19083,5916,0,-4596 3 3750
-bb "
-char169 13173,19635,0,3885,-2094,737 2 3753
-co "
-char172 23418,10770,0,0,-3105 0 3756
-no "
-char174 13173,19635,0,3885,-2094,737 2 3758
-rg "
-char178 9270,17700,0,2130,-162,737 0 3762
-S2 "
-char179 9270,17700,0,1656,-123,737 0 3763
-S3 "
-char184 14637,393,5733,0,-1119 1 3768
-ac "
-char185 9270,17865,0,708,-1470,708 2 3769
-S1 "
-char215 23418,13107,567,0,-4626 0 3799
-char247 23418,12999,369,0,-3531 0 3831
-char183 7317,10899,0,282,-741,282 0 3767
-pc "
-fm 7317,18096,0,1629,-2067,737 2 51873
-sd 14637,18096,0,0,-2067 2 51874
-dg 14637,18201,426,666,-762,666 2 51755
-tm 16101,17850,0,1425,-1962,737 2 51796
-ah 14637,18780,0,921,-4398,737 2 51935
-ao 14637,18678,0,0,-5652 2 51930
-f/ 2439,17769,444,7344,7137,737 0 51759
-em 23418,8070,0,759,219,737 0 51789
-en 14637,8070,0,681,459,681 0 51790
-dd 14637,18201,426,630,-726,630 2 51773
-.i 7317,12534,69,1116,1134,737 0 51957
-aq 7317,18375,0,1659,-2622,737 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 17565,24342,375,2640,-600,737 2 20166
-'c 12684,18801,375,2415,171,737 2 20198
-lq 11709,18375,0,2910,-387,737 2 51838
-rq 11709,18375,0,2895,-372,737 2 51746
-Bq 12198,3972,4527,0,2505 0 51772
-vz 13173,18780,201,1653,1689,737 2 51834
-fi 15612,19710,69,1506,900,737 2 51881
-fl 15612,19710,69,2385,816,737 2 51882
-ff 16587,19710,69,3507,816,737 2 51883
-Fi 23418,19710,69,1683,684,737 2 51884
-Fl 23418,19710,69,2499,666,737 2 51885
-ij 14637,19308,5400,1794,1131,737 3 51958
-bq 7317,3972,4527,0,2502 0 51756
-%0 33663,17769,264,0,-2289 0 51901
-char175 14637,17490,0,843,-3735,737 0 3759
-a- "
-ab 14637,18528,0,396,-3984,396 2 51926
-a. 14637,18786,0,0,-6408 2 51927
-oe 22443,12840,375,720,618,720 0 51823
-OE 24882,18375,375,2916,-513,737 2 51791
-fo 6831,10851,0,1296,132,737 0 51886
-fc 6831,10851,0,609,819,609 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 13173,18069,201,198,1188,198 2 51944
-/l 7317,19569,69,3264,1563,737 2 51960
-a" 14637,18801,0,3432,-3054,737 2 51933
-ho 14637,636,4140,0,-4476 0 51934
-vZ 16101,24321,201,2589,2115,737 2 51802
-IJ 17565,18069,4242,1548,441,737 2 51942
diff --git a/contrib/groff/font/devlj4/OI b/contrib/groff/font/devlj4/OI
deleted file mode 100644
index bbe9b44617fe..000000000000
--- a/contrib/groff/font/devlj4/OI
+++ /dev/null
@@ -1,923 +0,0 @@
-name OI
-spacewidth 7317
-slant 9.860000
-pcltypeface 4113
-pclproportional 1
-pclweight 0
-pclstyle 1
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2439
-P . -3903
-P , -3903
-V A -3903
-A V -4389
-T o -3414
-T r -3414
-T c -3414
-T e -3414
-T d -3414
-T s -3414
-T y -3414
-T a -3903
-T w -3414
-T u -3414
-L T -2439
-L Y -2439
-Y o -2925
-Y e -2925
-Y a -3414
-A W -3903
-W A -2925
-T A -3414
-V o -2925
-V e -2925
-V a -3414
-Y A -2925
-F A -3903
-F . -3903
-F , -3903
-A T -4389
-A Y -4389
-v . -2925
-v , -2925
-y . -2925
-y , -2925
-T . -3414
-T , -3414
-L W -2439
-P A -3414
-V . -3903
-V , -3903
-Y . -2925
-Y , -2925
-W o -1950
-W e -1950
-W a -2439
-W . -2925
-W , -2925
-r . -2925
-r , -2925
-w . -2925
-w , -2925
-Y u -1461
-A v -2439
-A y -2925
-A w -2439
-o . -1461
-o , -1461
-p . -1461
-p , -1461
-e . -486
-e , -486
-b . -1950
-b , -1950
-O T -2925
-O V -1461
-O Y -1461
-O . -2439
-O , -2439
-L y -2439
-L O -2439
-L G -2439
-L C -2439
-L Q -2439
-V y -1461
-V u -1461
-V O -1461
-V G -1461
-V C -1461
-V Q -1461
-D T -2925
-D V -1461
-D Y -1461
-D . -2439
-D , -2439
-Y O -1461
-Y G -1461
-Y C -1461
-Y Q -1461
-F o -1950
-F e -1950
-F a -2439
-c . -486
-c , -486
-O A -1950
-O W -975
-L U -1950
-R T -1461
-R V -1461
-R Y -1461
-R W -1461
-G T -975
-P o -1461
-P g -975
-P e -1461
-P a -1950
-C A -975
-C . -975
-C , -975
-D A -1950
-D W -975
-B T -1950
-B Y -1461
-B . -1461
-B , -1461
-A O -1950
-A G -1950
-A C -1950
-A U -2439
-A Q -1950
-W r -975
-W y -975
-W u -975
-W O -975
-W G -975
-W C -975
-W Q -975
-J A -975
-J . -975
-J , -975
-U A -2439
-U . -2439
-U , -2439
-Q W -975
-f . -486
-f , -486
-T O -2439
-T G -2439
-T C -2439
-T Q -2439
-O X -1461
-L o -1950
-L e -1950
-L q -1950
-G V -975
-G Y -975
-G W -975
-G . -486
-G , -486
-P T -975
-P V -975
-P Y -975
-C T -975
-C V -975
-C Y -975
-D X -1461
-B V -1461
-B X -1461
-B A -1461
-B W -975
-S . -1461
-S , -1461
-F r -486
-F y -486
-F u -486
-F O -486
-F G -486
-F C -486
-F Q -486
-X o -1461
-X e -1461
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1950
-A e -1950
-K o -1461
-K e -1461
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -486
-o y -1461
-o x -975
-o w -486
-h v -486
-h y -1461
-n v -486
-n y -1461
-r g -486
-g . -486
-g , -486
-p v -486
-p y -1461
-p x -975
-c v -486
-c y -486
-c w -486
-v o -486
-v g -486
-v c -486
-v d -486
-v a -975
-v q -486
-e v -486
-e y -975
-b v -486
-b y -1461
-b w -486
-s . -975
-s , -975
-y o -486
-y g -486
-y c -486
-y d -486
-y a -975
-y q -486
-f g -486
-x o -975
-x g -975
-x c -975
-x e -975
-x d -975
-x a -975
-x q -975
-a v -486
-a y -1461
-a w -486
-w o -486
-w g -486
-w c -486
-w d -486
-w a -975
-w q -486
-T i -486
-T S -1461
-L a -975
-L S -486
-R o -975
-R y -975
-R O -975
-R G -975
-R C -975
-R U -1461
-R Q -975
-G X -486
-G A -486
-P s -975
-P Z -975
-P X -975
-P W -975
-C X -975
-C W -975
-V i -486
-V S -1461
-S T -486
-S V -486
-S Y -486
-S X -486
-S A -1461
-S W -486
-Y i -486
-Y S -1461
-X a -975
-X u -1461
-X S -486
-A t -1461
-A g -1461
-A c -1950
-A d -1950
-A a -1461
-A u -1950
-A q -1950
-A S -975
-W i -486
-W S -975
-K c -1461
-K u -1461
-K S -486
-t g -486
-o f -486
-h w -486
-n w -486
-r o -486
-r c -486
-r e -486
-r d -486
-r a -975
-r q -486
-p f -486
-p w -486
-c f -486
-c x -486
-v e -486
-v s -486
-e f -486
-e x -486
-e w -486
-b f -486
-y e -486
-y s -486
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -975
-f q -486
-w e -486
-w s -486
-k o -486
-k g -486
-k c -486
-k v -486
-k e -486
-k d -486
-k y -486
-k a -975
-k w -486
-k q -486
-O Z -975
-L J -1461
-R e -975
-R a -975
-R u -975
-R S -486
-G Z -486
-P U -486
-C Z -975
-E a -486
-Z o -975
-Z e -975
-Z d -975
-Z y -975
-Z a -975
-Z w -975
-Z u -975
-Z O -975
-Z G -975
-Z C -975
-Z S -486
-Z Q -975
-D Z -975
-B Z -975
-S Z -486
-F i -486
-F j -486
-F S -486
-A s -486
-A J -1950
-A . -486
-A , -486
-J o -486
-J e -486
-J a -975
-J U -486
-U g -486
-U J -486
-K a -975
-K J -486
-t o -486
-t c -486
-t e -486
-t d -486
-t a -975
-t q -486
-o z -486
-h f -486
-n f -486
-r s -486
-g a -486
-p z -486
-c z -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z a -975
-z q -486
-b z -486
-a f -486
-k t -486
-k f -486
-k u -486
-T U -486
-R J -975
-C a -486
-C U -486
-V U -486
-E U -486
-B a -486
-B U -486
-Y U -486
-F U -486
-X U -486
-A b -486
-A f -975
-W U -486
-U t -486
-U o -486
-U h -486
-U n -486
-U m -486
-U l -486
-U r -486
-U i -486
-U p -486
-U c -486
-U v -486
-U e -486
-U z -486
-U d -486
-U b -486
-U s -486
-U y -486
-U f -486
-U x -486
-U a -975
-U w -486
-U j -486
-U q -486
-U k -486
-U T -486
-U O -486
-U H -486
-U N -486
-U M -486
-U L -486
-U R -486
-U G -486
-U I -486
-U P -486
-U C -486
-U V -486
-U E -486
-U Z -486
-U D -486
-U B -486
-U S -486
-U Y -486
-U F -486
-U X -486
-U W -486
-U U -975
-U Q -486
-U K -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -975
-L cq -2439
-L ' -2439
-T char173 -3414
-T hy -3414
-T - -3414
-T en -3414
-T em -3414
-A cq -3903
-A ' -3903
-char173 T -3903
-hy T -3903
-- T -3903
-en T -3903
-em T -3903
-Y char173 -1461
-Y hy -1461
-Y - -1461
-Y en -1461
-Y em -1461
-p cq -1950
-p ' -1950
-c cq -486
-c ' -486
-e cq -975
-e ' -975
-b cq -1461
-b ' -1461
-a cq -1950
-a ' -1950
-V char173 -1461
-V hy -1461
-V - -1461
-V en -1461
-V em -1461
-h cq -1461
-h ' -1461
-n cq -1461
-n ' -1461
-R cq -975
-R ' -975
-W char173 -975
-W hy -975
-W - -975
-W en -975
-W em -975
-cq d -1461
-' d -1461
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-F char173 -486
-F hy -486
-F - -486
-F en -486
-F em -486
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1950
-A hy -1950
-A - -1950
-A en -1950
-A em -1950
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -975
-' s -975
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1950
-hy A -1950
-- A -1950
-en X -1461
-en A -1950
-em X -1461
-R char173 -975
-R hy -975
-R - -975
-R en -975
-R em -975
-K cq -486
-K ' -486
-t g -486
-b f -486
-k cq -486
-k ' -486
-Z char173 -975
-Z hy -975
-Z - -975
-Z en -975
-Z em -975
-U cq -486
-U ' -486
-k char173 -486
-k hy -486
-k - -486
-k en -486
-k em -486
-U char173 -486
-U hy -486
-U - -486
-U en -486
-U em -486
-charset
-! 7317,18000,330,723,-177,586 2 3617
-dq 10734,18375,0,678,-2778,586 2 3618
-" "
-sh 14637,17769,444,1371,570,586 0 3619
-# "
-Do 14637,19515,3105,0,6 2 3620
-$ "
-% 23418,17769,444,0,-2766 0 3621
-& 17565,18000,375,264,174,264 2 3622
-cq 7317,18375,0,1704,-1407,586 2 51751
-' "
-( 7317,18375,3165,2625,-300,586 2 3624
-) 7317,18375,3165,54,2271,54 2 3625
-* 14637,18150,0,0,-2148 2 3626
-+ 23418,13260,393,0,-3789 0 3627
-, 7317,2700,4611,0,1776 0 3628
-char173 7317,7170,0,1245,1176,586 0 3629
-hy "
-- "
-. 7317,2622,330,0,-237 0 3630
-sl 7317,19650,480,2448,1203,586 2 3631
-/ "
-0 14637,17700,375,723,-180,586 0 3632
-1 14637,17700,69,0,-3339 0 3633
-2 14637,17700,201,0,-123 0 3634
-3 14637,17700,375,0,60 0 3635
-4 14637,17769,69,396,285,396 0 3636
-5 14637,17526,375,297,-102,297 0 3637
-6 14637,17700,375,0,-459 0 3638
-7 14637,17526,69,1713,-885,586 0 3639
-8 14637,17700,375,12,-147,12 0 3640
-9 14637,17700,375,267,-963,267 0 3641
-: 7317,11652,330,0,-237 0 3642
-; 7317,11652,4611,0,1776 0 3643
-< 26346,16068,0,0,-3981 0 3644
-= 23418,8622,0,0,-3732 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 10245,18000,330,1083,-1299,586 2 3647
-at 23418,16980,3654,435,87,435 0 3648
-@ "
-A 17565,18000,69,0,1896 2 3649
-B 16101,18069,69,0,-342 2 3650
-C 17565,18375,375,1455,-411,586 2 3651
-D 20490,18069,69,288,-363,288 2 3652
-E 13173,18201,201,1095,-102,586 2 3653
-F 13173,18201,69,1098,-126,586 2 3654
-G 19515,18375,375,1158,-669,586 2 3655
-H 20490,18069,69,627,-234,586 2 3656
-I 7806,18069,69,609,-249,586 2 3657
-J 7317,18069,3657,1026,2235,586 2 3658
-K 16101,18069,69,2220,-321,586 2 3659
-L 12198,18069,201,414,-222,414 2 3660
-M 23418,18069,69,543,-111,543 2 3661
-N 20490,18069,375,525,-246,525 2 3662
-O 21954,18375,375,555,-372,555 2 3663
-P 14637,18069,69,1464,-360,586 2 3664
-Q 21954,18375,4200,507,-348,507 2 3665
-R 16587,18069,69,498,-159,498 2 3666
-S 13173,18375,375,882,855,586 2 3667
-T 14637,18201,69,2493,-1080,586 2 3668
-U 20490,18069,375,669,-1455,586 2 3669
-V 16101,18069,69,2763,-747,586 2 3670
-W 24882,18069,69,2835,-918,586 2 3671
-X 14637,18069,69,2148,1377,586 2 3672
-Y 14637,18069,69,3225,-543,586 2 3673
-Z 16101,18201,201,1014,921,586 2 3674
-lB 7317,18201,4956,3090,1014,586 3 3675
-[ "
-rs 7317,19650,480,294,-1518,294 2 3676
-\ "
-rB 7317,18201,4956,1338,2766,586 3 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,586 3 3679
-oq 7317,18375,0,1704,-1407,586 2 51808
-` "
-a 13173,12795,330,168,582,168 0 3681
-b 14637,19779,330,279,651,279 2 3682
-c 12684,12795,330,1245,282,586 0 3683
-d 14637,19779,330,2097,-27,586 2 3684
-e 13173,12795,330,588,327,586 0 3685
-f 7317,19710,69,3714,57,586 2 3686
-g 13173,12996,5400,1656,876,586 1 3687
-h 14637,19779,69,0,348 2 3688
-i 7317,18336,69,885,-288,586 2 3689
-j 7317,18336,5400,876,1554,586 3 3690
-k 13173,19779,69,1581,249,586 2 3691
-l 7317,19779,69,1068,-111,586 2 3692
-m 21954,12534,69,0,414 0 3693
-n 14637,12795,69,0,282 0 3694
-o 14637,12795,330,453,351,453 0 3695
-p 14637,12795,5469,216,1740,216 1 3696
-q 14637,12795,5469,828,-51,586 1 3697
-r 8781,12795,69,1512,279,586 0 3698
-s 10245,12795,330,411,960,411 0 3699
-t 7806,15654,330,1212,258,586 0 3700
-u 14637,12534,330,372,-348,372 0 3701
-v 13173,12534,69,1632,-207,586 0 3702
-w 20490,12534,69,1974,-183,586 0 3703
-x 11709,12534,69,1191,1662,586 0 3704
-y 13173,12534,5469,1659,-57,586 1 3705
-z 13173,12666,201,795,714,586 0 3706
-lC 11709,19935,6210,2910,-1242,586 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 11709,19935,6210,0,2682 3 3709
-} "
-ti 26346,8952,0,0,-4029 0 51876
-char192 17565,24042,69,0,1896 2 3776
-`A "
-char194 17565,23745,69,0,1896 2 3778
-^A "
-char200 13173,24042,201,1095,-102,586 2 3784
-`E "
-char202 13173,23745,201,1095,-102,586 2 3786
-^E "
-char203 13173,22896,201,1455,-102,586 2 3787
-:E "
-char206 7806,23745,69,3768,-249,586 2 3790
-^I "
-char207 7806,22896,69,4140,-249,586 2 3791
-:I "
-char180 14637,18375,0,0,-6180 2 3764
-aa "
-ga 14637,18378,0,0,-4620 2 3680
-a^ 14637,18225,0,0,-3891 2 3678
-^ "
-char168 14637,17223,0,0,-3717 0 3752
-ad "
-a~ 14637,17166,0,0,-3717 0 3710
-~ "
-char217 20490,24042,375,669,-1455,586 2 3801
-`U "
-char219 20490,23745,375,669,-1455,586 2 3803
-^U "
-char221 14637,24048,69,3225,-543,586 2 3805
-'Y "
-char253 13173,18375,5469,1659,-57,586 3 3837
-'y "
-char176 14637,17700,0,0,-2664 0 3760
-de "
-char199 17565,18375,5736,1455,-411,586 3 3783
-,C "
-char231 12684,12795,5193,1245,282,586 1 3815
-,c "
-char209 20490,22812,375,525,-246,525 2 3793
-~N "
-char241 14637,17166,69,0,282 0 3825
-~n "
-char161 7317,12696,5634,0,639 1 3745
-r! "
-char191 10245,12696,5634,0,795 1 3775
-r? "
-char164 14637,15684,0,660,-117,586 0 3748
-Cs "
-char163 14637,17700,201,1269,1179,586 0 3747
-Po "
-char165 14637,18069,69,2862,-180,586 2 3749
-Ye "
-char167 14637,17865,3633,0,-960 2 3751
-sc "
-Fn 14637,19710,69,0,-3318 2 51871
-char162 14637,19782,0,393,-999,393 2 3746
-ct "
-char226 13173,18225,330,168,582,168 2 3810
-^a "
-char234 13173,18225,330,588,327,586 2 3818
-^e "
-char244 14637,18225,330,453,351,453 2 3828
-^o "
-char251 14637,18225,330,372,-348,372 2 3835
-^u "
-char225 13173,18375,330,168,582,168 2 3809
-'a "
-char233 13173,18375,330,588,327,586 2 3817
-'e "
-char243 14637,18375,330,453,351,453 2 3827
-'o "
-char250 14637,18375,330,372,-348,372 2 3834
-'u "
-char224 13173,18378,330,168,582,168 2 3808
-`a "
-char232 13173,18378,330,588,327,586 2 3816
-`e "
-char242 14637,18378,330,453,351,453 2 3826
-`o "
-char249 14637,18378,330,372,-348,372 2 3833
-`u "
-char228 13173,17223,330,285,582,285 0 3812
-:a "
-char235 13173,17223,330,588,327,586 0 3819
-:e "
-char246 14637,17223,330,453,351,453 0 3830
-:o "
-char252 14637,17223,330,372,-348,372 0 3836
-:u "
-char197 17565,23979,69,0,1896 2 3781
-oA "
-char238 7317,18225,69,2628,-231,586 2 3822
-^i "
-char216 21954,18375,375,1341,588,586 2 3800
-/O "
-char198 20979,18201,201,1296,3312,586 2 3782
-AE "
-char229 13173,17973,330,168,582,168 2 3813
-oa "
-char237 7317,18375,69,2973,-279,586 2 3821
-'i "
-char248 14637,12795,399,1320,1203,586 0 3832
-/o "
-char230 20490,12795,330,906,678,586 0 3814
-ae "
-char196 17565,22896,69,0,1896 2 3780
-:A "
-char236 7317,18378,69,174,-279,174 2 3820
-`i "
-char214 21954,22896,375,555,-372,555 2 3798
-:O "
-char220 20490,22896,375,669,-1455,586 2 3804
-:U "
-char201 13173,24048,201,1239,-102,586 2 3785
-'E "
-char239 7317,17223,69,3213,-57,586 0 3823
-:i "
-char223 14148,19710,330,147,516,147 2 3807
-ss "
-char212 21954,23745,375,555,-372,555 2 3796
-^O "
-char193 17565,24048,69,0,1896 2 3777
-'A "
-char195 17565,22812,69,0,1896 2 3779
-~A "
-char227 13173,17166,330,168,582,168 0 3811
-~a "
-char208 20490,18069,69,288,936,288 2 3792
--D "
-char240 14637,19590,330,453,351,453 2 3824
-Sd "
-char205 7806,24048,69,3924,-249,586 2 3789
-'I "
-char204 7806,24042,69,909,-249,586 2 3788
-`I "
-char211 21954,24048,375,555,-372,555 2 3795
-'O "
-char210 21954,24042,375,555,-372,555 2 3794
-`O "
-char213 21954,22812,375,555,-372,555 2 3797
-~O "
-char245 14637,17166,330,453,351,453 0 3829
-~o "
-vS 13173,23745,375,1725,855,586 2 51795
-vs 10245,18225,330,1680,960,586 2 51827
-char218 20490,24048,375,669,-1455,586 2 3802
-'U "
-:Y 14637,22896,69,3225,-543,586 2 51801
-char255 13173,17223,5469,1659,-57,586 1 3839
-:y "
-char222 14637,18069,69,834,-351,586 2 3806
-TP "
-char254 14637,19779,5469,225,1752,225 3 3838
-Tp "
-char181 14637,12630,4350,1122,2931,586 0 3765
-char182 14637,19635,4200,135,-1257,135 2 3766
-ps "
-char190 23418,17850,525,0,-1326 2 3774
-34 "
-\- 23418,7122,0,0,-3801 0 51757
-char188 23418,17850,525,0,-2268 2 3772
-14 "
-char189 23418,17850,525,0,-2139 2 3773
-12 "
-char170 12198,17700,0,18,-1692,18 0 3754
-Of "
-char186 12198,17700,0,1029,-1608,586 0 3770
-Om "
-char171 9759,10920,0,849,306,586 0 3755
-Fo "
-char187 9759,10920,0,120,1035,120 0 3771
-Fc "
-char177 23418,13260,3132,0,-3333 0 3761
-char166 13173,19083,5916,0,-4596 3 3750
-bb "
-char169 13173,19635,0,3384,-1593,586 2 3753
-co "
-char172 23418,10671,0,0,-3015 0 3756
-no "
-char174 13173,19635,0,3384,-1593,586 2 3758
-rg "
-char178 10245,17700,0,705,-774,586 0 3762
-S2 "
-char179 10245,17700,0,525,-807,525 0 3763
-S3 "
-char184 14637,300,5193,0,-1905 1 3768
-ac "
-char185 10245,17700,0,0,-2472 0 3769
-S1 "
-char215 23418,13137,585,0,-3780 0 3799
-char247 23418,11139,0,0,-3900 0 3831
-char183 7317,10905,0,0,-1392 0 3767
-pc "
-fm 7317,17700,0,1092,-1740,586 0 51873
-sd 14637,17700,0,0,-1740 0 51874
-dg 14637,18213,846,0,-1323 2 51755
-tm 16101,17850,0,924,-1461,586 2 51796
-ah 14637,18225,0,0,-4407 2 51935
-ao 14637,17973,0,0,-5853 2 51930
-f/ 3414,17850,525,7596,6609,586 2 51759
-em 23418,6885,0,390,537,390 0 51789
-en 14637,6885,0,507,537,507 0 51790
-dd 14637,18213,846,0,-1335 2 51773
-.i 7317,12534,69,174,-279,174 0 51957
-aq 7317,18375,0,705,-2778,586 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 17565,24048,375,1455,-411,586 2 20166
-'c 12684,18375,330,1245,282,586 2 20198
-lq 11220,18375,0,1620,-1311,586 2 51838
-rq 11220,18375,0,1527,-1218,586 2 51746
-Bq 11220,2535,4482,0,1782 0 51772
-vz 13173,18225,201,795,714,586 2 51834
-fi 14637,19710,69,876,45,586 2 51881
-fl 14637,19710,69,1137,117,586 2 51882
-ff 14637,19710,69,3714,57,586 2 51883
-Fi 21954,19710,69,876,48,586 2 51884
-Fl 21954,19710,69,1137,120,586 2 51885
-ij 14148,18336,5400,873,-288,586 3 51958
-bq 7317,2535,4482,0,1593 0 51756
-%0 32202,17769,444,0,-2811 0 51901
-char175 14637,16521,0,0,-3732 0 3759
-a- "
-ab 14637,18165,0,0,-3657 2 51926
-a. 14637,17400,0,0,-6228 0 51927
-oe 23418,12795,330,696,354,586 0 51823
-OE 24396,18375,375,1089,-372,586 2 51791
-fo 6342,10920,0,624,243,586 0 51886
-fc 6342,10920,0,0,972 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 12198,18069,201,405,1215,405 2 51944
-/l 7317,19779,69,2694,1233,586 2 51960
-a" 14637,18375,0,1413,-3645,586 2 51933
-ho 14637,600,3876,0,-6093 0 51934
-vZ 16101,23745,201,1014,921,586 2 51802
-IJ 15126,18069,3657,1026,-249,586 2 51942
diff --git a/contrib/groff/font/devlj4/OR b/contrib/groff/font/devlj4/OR
deleted file mode 100644
index edea52a511b0..000000000000
--- a/contrib/groff/font/devlj4/OR
+++ /dev/null
@@ -1,899 +0,0 @@
-name OR
-spacewidth 7317
-pcltypeface 4113
-pclproportional 1
-pclweight 0
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -3414
-P . -3903
-P , -3903
-V A -4389
-A V -4389
-T o -3903
-T r -3414
-T c -3903
-T e -3903
-T d -3903
-T s -3903
-T y -3903
-T a -3903
-T w -3903
-T u -3903
-L T -3414
-L Y -3414
-Y o -3903
-Y e -3903
-Y a -3903
-A W -3903
-W A -3903
-T A -3414
-V o -3414
-V e -3414
-V a -3414
-Y A -4389
-F A -3414
-F . -3414
-F , -3414
-A T -3414
-A Y -4389
-v . -2925
-v , -2925
-y . -2925
-y , -2925
-T . -3414
-T , -3414
-L W -3414
-P A -2925
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -2925
-W e -2925
-W a -2925
-W . -3903
-W , -3903
-r . -2925
-r , -2925
-w . -1950
-w , -1950
-Y u -2439
-A v -1950
-A y -1950
-A w -1461
-o . -1461
-o , -1461
-p . -1461
-p , -1461
-e . -975
-e , -975
-b . -1461
-b , -1461
-O T -2439
-O V -2439
-O Y -2439
-O . -2439
-O , -2439
-L y -2925
-L O -2439
-L G -2439
-L C -975
-L Q -2439
-V y -2439
-V u -2439
-V O -2439
-V G -2439
-V C -1461
-V Q -2439
-D T -1950
-D V -1950
-D Y -1950
-D . -1950
-D , -1950
-Y O -2439
-Y G -2439
-Y C -1461
-Y Q -2439
-F o -1461
-F e -1461
-F a -1461
-c . -486
-c , -486
-O A -1461
-O W -1461
-L U -1461
-R T -975
-R V -975
-R Y -975
-R W -975
-G T -1461
-P o -1461
-P g -975
-P e -1461
-P a -1461
-C A -486
-C . -486
-C , -486
-D A -1461
-D W -1461
-B T -1461
-B Y -1461
-B . -1461
-B , -1461
-A O -1461
-A G -1461
-A C -975
-A U -1461
-A Q -1461
-W r -1461
-W y -1461
-W u -1461
-W O -1461
-W G -1461
-W C -1461
-W Q -1461
-J A -975
-J . -975
-J , -975
-U A -1461
-U . -1461
-U , -1461
-Q A -1461
-Q W -1461
-f . -486
-f , -486
-T O -2439
-T G -2439
-T C -1461
-T Q -2439
-O X -1461
-L o -1461
-L e -1461
-L q -1461
-G V -1461
-G Y -1461
-G W -1461
-G . -486
-G , -486
-P T -486
-P V -486
-P Y -486
-D X -1461
-B V -1461
-B X -1461
-B A -1461
-B W -1461
-S . -975
-S , -975
-X o -1461
-X e -1461
-X y -1461
-X O -1461
-X G -1461
-X C -975
-X Q -1461
-A o -1461
-A e -1461
-Q X -1461
-K o -1461
-K e -1461
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -975
-K Q -1461
-o v -486
-o y -486
-o x -975
-h v -486
-h y -486
-n v -486
-n y -486
-m v -486
-m y -486
-g . -486
-g , -486
-p v -486
-p y -486
-p x -975
-c v -486
-c y -486
-v o -486
-v g -486
-v c -486
-v d -486
-v a -486
-v q -486
-e v -486
-e y -486
-b v -486
-b y -486
-s . -975
-s , -975
-y o -486
-y g -486
-y c -486
-y d -486
-y a -486
-y q -486
-f g -486
-x o -975
-x g -975
-x c -975
-x e -975
-x d -975
-x a -975
-x q -975
-a v -486
-a y -486
-T i -486
-T S -975
-L a -975
-L S -975
-R o -975
-R y -975
-R O -975
-R G -975
-R C -975
-R U -1461
-R Q -975
-G X -486
-G A -486
-P s -975
-P Z -486
-P X -486
-P W -486
-V i -486
-V S -975
-S T -975
-S V -975
-S Y -975
-S X -975
-S A -975
-S W -975
-Y i -486
-Y S -975
-X a -975
-X u -1461
-X S -975
-A t -1461
-A g -975
-A c -1461
-A d -1461
-A a -975
-A u -1461
-A q -1461
-A S -975
-W i -486
-W S -975
-K c -1461
-K u -1461
-K S -975
-c x -486
-v e -486
-v s -486
-e x -975
-s v -486
-s y -486
-s x -486
-y e -486
-y s -486
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-x s -486
-k o -486
-k g -486
-k c -486
-k v -486
-k e -486
-k d -486
-k y -486
-k a -486
-k w -486
-k q -486
-O Z -975
-R e -975
-R a -975
-R u -975
-R S -975
-G Z -486
-P M -486
-P U -486
-Z o -975
-Z e -975
-Z d -975
-Z s -486
-Z y -975
-Z a -975
-Z w -975
-Z u -975
-Z O -975
-Z G -975
-Z C -975
-Z S -975
-Z Q -975
-D Z -975
-B Z -1461
-B J -486
-S Z -975
-A s -486
-J U -486
-U g -486
-U J -486
-K a -975
-o z -486
-p z -486
-c z -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z s -486
-z a -486
-z q -486
-b z -486
-s z -486
-k t -486
-k s -486
-k f -486
-k u -486
-T U -486
-G J -486
-C U -486
-V U -486
-E U -486
-B o -486
-B h -486
-B l -486
-B r -486
-B i -486
-B e -486
-B y -486
-B a -486
-B u -486
-B O -486
-B H -486
-B N -486
-B M -486
-B L -486
-B R -486
-B G -486
-B I -486
-B P -486
-B C -486
-B E -486
-B D -486
-B B -486
-B S -486
-B F -486
-B U -975
-B Q -486
-B K -486
-Y U -486
-F M -486
-F U -486
-X U -486
-A f -486
-W U -486
-U t -486
-U o -486
-U h -486
-U n -486
-U m -486
-U l -486
-U r -486
-U i -486
-U p -486
-U c -486
-U v -486
-U e -486
-U z -486
-U d -486
-U b -486
-U s -486
-U y -486
-U f -486
-U x -486
-U a -486
-U w -486
-U j -486
-U q -486
-U k -486
-U T -486
-U O -486
-U H -486
-U N -486
-U M -486
-U L -486
-U R -486
-U G -486
-U I -486
-U P -486
-U C -486
-U V -486
-U E -486
-U Z -486
-U D -486
-U B -486
-U S -486
-U Y -486
-U F -486
-U X -486
-U W -486
-U U -975
-U Q -486
-U K -486
-K U -486
-L cq -3414
-L ' -3414
-T char173 -3903
-T hy -3903
-T - -3903
-T en -3903
-T em -3903
-A cq -3903
-A ' -3903
-char173 T -3903
-hy T -3903
-- T -3903
-en T -3903
-em T -3903
-Y char173 -2439
-Y hy -2439
-Y - -2439
-Y en -2439
-Y em -2439
-p cq -1461
-p ' -1461
-c cq -486
-c ' -486
-e cq -975
-e ' -975
-b cq -1461
-b ' -1461
-a cq -1461
-a ' -1461
-V char173 -2439
-V hy -2439
-V - -2439
-V en -2439
-V em -2439
-h cq -1461
-h ' -1461
-n cq -1461
-n ' -1461
-m cq -1461
-m ' -1461
-R cq -975
-R ' -975
-W char173 -1461
-W hy -1461
-W - -1461
-W en -1461
-W em -1461
-cq d -1461
-' d -1461
-s cq -486
-s ' -486
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1461
-A hy -1461
-A - -1461
-A en -1461
-A em -1461
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -975
-' s -975
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1461
-hy A -1461
-- A -1461
-en X -1461
-en A -1461
-em X -1461
-R char173 -975
-R hy -975
-R - -975
-R en -975
-R em -975
-k cq -486
-k ' -486
-M cq -486
-M ' -486
-G cq -486
-G ' -486
-Z char173 -975
-Z hy -975
-Z - -975
-Z en -975
-Z em -975
-B cq -486
-B ' -486
-U cq -486
-U ' -486
-cq M -486
-' M -486
-k char173 -486
-k hy -486
-k - -486
-k en -486
-k em -486
-B char173 -486
-B hy -486
-B - -486
-B en -486
-B em -486
-U char173 -486
-U hy -486
-U - -486
-U en -486
-U em -486
-charset
-! 7317,18000,330 2 3617
-dq 10734,18375 2 3618
-" "
-sh 14637,17994,405 2 3619
-# "
-Do 14637,19554,2919 2 3620
-$ "
-% 23418,17961,510 2 3621
-& 19029,17667,375 0 3622
-cq 7317,18375 2 51751
-' "
-( 7317,18375,3165 2 3624
-) 7317,18375,3165 2 3625
-* 14637,18066 2 3626
-+ 23418,13260,393 0 3627
-, 7317,2718,4923 1 3628
-char173 7317,7275 0 3629
-hy "
-- "
-. 7317,2715,330 0 3630
-sl 7317,19566,396 2 3631
-/ "
-0 14637,17700,375 0 3632
-1 14637,17700,69 0 3633
-2 14637,17700,201 0 3634
-3 14637,17700,375 0 3635
-4 14637,17394,69 0 3636
-5 14637,17526,375 0 3637
-6 14637,17700,375 0 3638
-7 14637,17526,69 0 3639
-8 14637,17700,375 0 3640
-9 14637,17700,375 0 3641
-: 7317,11805,330 0 3642
-; 7317,11805,4923 1 3643
-< 26346,16068 0 3644
-= 23418,8634 0 3645
-> 26346,16068 0 3646
-? 10245,18000,330 2 3647
-at 23418,16980,3654 0 3648
-@ "
-A 17565,18000,69 2 3649
-B 16101,18069,69 2 3650
-C 17565,18375,375 2 3651
-D 20490,18069,69 2 3652
-E 13173,18201,201 2 3653
-F 13173,18201,69 2 3654
-G 20490,18375,375 2 3655
-H 20490,18069,69 2 3656
-I 7317,18069,69 2 3657
-J 7317,18069,3855 2 3658
-K 16101,18069,69 2 3659
-L 13173,18069,201 2 3660
-M 23418,18000,69 2 3661
-N 20490,18069,375 2 3662
-O 21954,18375,375 2 3663
-P 14637,18069,69 2 3664
-Q 21954,18375,5400 3 3665
-R 16101,18069,69 2 3666
-S 13173,18375,375 2 3667
-T 14637,18201,69 2 3668
-U 20490,18069,375 2 3669
-V 17565,18069,69 2 3670
-W 26346,18069,69 2 3671
-X 16101,18069,69 2 3672
-Y 16101,18069,69 2 3673
-Z 16101,18201,201 2 3674
-lB 7317,18204,4179 2 3675
-[ "
-rs 7317,19566,396 2 3676
-\ "
-rB 7317,18204,4179 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 7317,18375 2 51808
-` "
-a 12684,12795,330 0 3681
-b 14637,19569,330 2 3682
-c 12684,12795,330 0 3683
-d 14637,19569,330 2 3684
-e 13173,12795,330 0 3685
-f 7317,19710,69 2 3686
-g 13173,12882,5400 1 3687
-h 14637,19569,69 2 3688
-i 7317,18399,69 2 3689
-j 7317,18399,5400 3 3690
-k 13173,19569,69 2 3691
-l 7317,19569,69 2 3692
-m 21954,12795,69 0 3693
-n 14637,12795,69 0 3694
-o 14637,12795,330 0 3695
-p 14637,12795,5469 1 3696
-q 14637,12795,5469 1 3697
-r 8781,12795,69 0 3698
-s 10245,12795,330 0 3699
-t 7317,16185,330 0 3700
-u 14637,12534,330 0 3701
-v 13173,12534,69 0 3702
-w 20490,12534,69 0 3703
-x 13173,12534,69 0 3704
-y 13173,12534,5469 1 3705
-z 13173,12666,201 0 3706
-lC 11709,19935,6210 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 11709,19935,6210 3 3709
-} "
-ti 26346,8952 0 51876
-char192 17565,23730,69 2 3776
-`A "
-char194 17565,23760,69 2 3778
-^A "
-char200 13173,23730,201 2 3784
-`E "
-char202 13173,23760,201 2 3786
-^E "
-char203 13173,22902,201 2 3787
-:E "
-char206 7317,23760,69 2 3790
-^I "
-char207 7317,22902,69 2 3791
-:I "
-char180 14637,18189 2 3764
-aa "
-ga 14637,18189 2 3680
-a^ 14637,18000 2 3678
-^ "
-char168 14637,17223 0 3752
-ad "
-a~ 14637,16980 0 3710
-~ "
-char217 20490,23730,375 2 3801
-`U "
-char219 20490,23760,375 2 3803
-^U "
-char221 16101,23730,69 2 3805
-'Y "
-char253 13173,18189,5469 3 3837
-'y "
-char176 14637,17700 0 3760
-de "
-char199 17565,18375,5988 3 3783
-,C "
-char231 12684,12795,5673 1 3815
-,c "
-char209 20490,22707,375 2 3793
-~N "
-char241 14637,16980,69 0 3825
-~n "
-char161 7317,12696,5634 1 3745
-r! "
-char191 10245,12696,5634 1 3775
-r? "
-char164 14637,15684 0 3748
-Cs "
-char163 14637,17700,201 0 3747
-Po "
-char165 14637,17769,69 2 3749
-Ye "
-char167 14637,18000,3633 2 3751
-sc "
-Fn 14637,19710,69 2 51871
-char162 14637,19155,93 2 3746
-ct "
-char226 12684,18000,330 2 3810
-^a "
-char234 13173,18000,330 2 3818
-^e "
-char244 14637,18000,330 2 3828
-^o "
-char251 14637,18000,330 2 3835
-^u "
-char225 12684,18189,330 2 3809
-'a "
-char233 13173,18189,330 2 3817
-'e "
-char243 14637,18189,330 2 3827
-'o "
-char250 14637,18189,330 2 3834
-'u "
-char224 12684,18189,330 2 3808
-`a "
-char232 13173,18189,330 2 3816
-`e "
-char242 14637,18189,330 2 3826
-`o "
-char249 14637,18189,330 2 3833
-`u "
-char228 12684,17223,330 0 3812
-:a "
-char235 13173,17223,330 0 3819
-:e "
-char246 14637,17223,330 0 3830
-:o "
-char252 14637,17223,330 0 3836
-:u "
-char197 17565,23964,69 2 3781
-oA "
-char238 7317,18000,69 2 3822
-^i "
-char216 21954,18375,375 2 3800
-/O "
-char198 21468,18201,201 2 3782
-AE "
-char229 12684,18045,330 2 3813
-oa "
-char237 7317,18189,69 2 3821
-'i "
-char248 14637,12876,330 0 3832
-/o "
-char230 20490,12795,330 0 3814
-ae "
-char196 17565,22902,69 2 3780
-:A "
-char236 7317,18189,69 2 3820
-`i "
-char214 21954,22902,375 2 3798
-:O "
-char220 20490,22902,375 2 3804
-:U "
-char201 13173,23730,201 2 3785
-'E "
-char239 7317,17223,69 0 3823
-:i "
-char223 14637,19710,330 2 3807
-ss "
-char212 21954,23760,375 2 3796
-^O "
-char193 17565,23730,69 2 3777
-'A "
-char195 17565,22707,69 2 3779
-~A "
-char227 12684,16980,330 0 3811
-~a "
-char208 20490,18069,69 2 3792
--D "
-char240 14637,19500,330 2 3824
-Sd "
-char205 7317,23730,69 2 3789
-'I "
-char204 7317,23730,69 2 3788
-`I "
-char211 21954,23730,375 2 3795
-'O "
-char210 21954,23730,375 2 3794
-`O "
-char213 21954,22707,375 2 3797
-~O "
-char245 14637,16980,330 0 3829
-~o "
-vS 13173,23760,375 2 51795
-vs 10245,18183,330 2 51827
-char218 20490,23730,375 2 3802
-'U "
-:Y 16101,22902,69 2 51801
-char255 13173,17223,5469 1 3839
-:y "
-char222 14637,18069,69 2 3806
-TP "
-char254 14637,19569,5469 3 3838
-Tp "
-char181 14637,12630,4350 0 3765
-char182 14637,19635,4200 2 3766
-ps "
-char190 23418,17700,519 0 3774
-34 "
-\- 23418,7122 0 51757
-char188 23418,17700,519 0 3772
-14 "
-char189 23418,17700,519 0 3773
-12 "
-char170 10734,17700 0 3754
-Of "
-char186 10734,17700 0 3770
-Om "
-char171 9759,10809 0 3755
-Fo "
-char187 9759,10809 0 3771
-Fc "
-char177 23418,13260,3132 0 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19635 2 3753
-co "
-char172 23418,10671 0 3756
-no "
-char174 13173,19635 2 3758
-rg "
-char178 9759,17700 0 3762
-S2 "
-char179 9759,17700 0 3763
-S3 "
-char184 14637,0,5673 1 3768
-ac "
-char185 9759,17700 0 3769
-S1 "
-char215 23418,13137,585 0 3799
-char247 23418,11139 0 3831
-char183 7317,10407 0 3767
-pc "
-fm 7317,17700 0 51873
-sd 14637,17700 0 51874
-dg 14637,18213,846 2 51755
-tm 16101,17850 2 51796
-ah 14637,18183 2 51935
-ao 14637,18045 2 51930
-f/ 2439,17637,519 0 51759
-em 23418,6867 0 51789
-en 14637,6867 0 51790
-dd 14637,18213,846 2 51773
-.i 7317,12534,69 0 51957
-aq 7317,18375 2 3623
-bu 13173,14226 0 51889
-'C 17565,23730,375 2 20166
-'c 12684,18189,330 2 20198
-lq 11220,18375 2 51838
-rq 11220,18375 2 51746
-Bq 11220,2718,4509 0 51772
-vz 13173,18183,201 2 51834
-fi 14148,19710,69 2 51881
-fl 14148,19779,69 2 51882
-ff 14637,19710,69 2 51883
-Fi 21468,19710,69 2 51884
-Fl 21468,19779,69 2 51885
-ij 14148,18399,5400 3 51958
-bq 7317,2718,4509 0 51756
-%0 32202,17769,444 2 51901
-char175 14637,16662 0 3759
-a- "
-ab 14637,18111 2 51926
-a. 14637,17223 0 51927
-oe 23418,12795,330 0 51823
-OE 24396,18375,375 2 51791
-fo 5856,10809 0 51886
-fc 5856,10809 0 51887
-sq 19029,15624 0 51899
-/L 13173,18069,201 2 51944
-/l 7317,19569,69 2 51960
-a" 14637,18189 2 51933
-ho 14637,1059,3885 0 51934
-vZ 16101,23760,201 2 51802
-IJ 14637,18069,3855 2 51942
diff --git a/contrib/groff/font/devlj4/S b/contrib/groff/font/devlj4/S
deleted file mode 100644
index 599867f60b7a..000000000000
--- a/contrib/groff/font/devlj4/S
+++ /dev/null
@@ -1,195 +0,0 @@
-name S
-special
-spacewidth 7806
-pcltypeface 4101
-pclproportional 1
-pclweight 0
-pclstyle 0
-kernpairs
-*T *A -2925
-*A *T -2925
-*R *A -3903
-*O *T -1950
-*O *A -2439
-*B *T -1950
-*A *O -2439
-*T *O -1950
-*O *X -1461
-*B *X -1461
-*B *A -1950
-*X *O -1461
-*K *O -1461
-*O *Z -486
-*Z *O -486
-*B *Z -486
-*N *A -486
-*K *T -486
-charset
-pl 23418,15750 0 68907
-eq 23418,10875 0 68925
-*A 19029,18225 2 68929
-*B 16587,17895 2 68930
-*E 16587,17895 2 68933
-*Y 19515,17895 2 68935
-*I 8781,17895 2 68937
-*K 18540,17895 2 68938
-*M 23907,17895 2 68940
-*N 19515,17895,330 2 68941
-*O 19029,18225,330 2 68943
-*R 15126,17895 2 68945
-*T 16587,17895 2 68947
-*X 19029,17895 2 68950
-*Z 17076,17895 2 68934
-or 13173,19758,6588 3 44412
-ap 26346,8952 0 44414
-mi 23418,8610 0 68909
-+- 23418,15750,2625 0 69118
-no 23418,12165 0 69064
-mu 23418,15117 0 68906
-di 23418,14010 0 68901
-HE 26346,19500 2 44457
-DI 26346,19500,840 2 44456
-CL 26346,18951 2 44455
-SP 26346,19851 2 44458
-va 19029,17670 2 69033
-ua 19029,17670 2 69025
-da 19029,17670 2 69027
--> 19029,12231 0 69026
-<- 19029,12231 0 69028
-<> 19029,12453 0 69034
-if 26346,12846 0 68900
-ca 26346,16650 0 69046
-== 26346,11634 0 68989
->= 26346,15960 0 68958
-<= 26346,15960 0 68956
-~~ 26346,11172 0 68927
-md 8781,10407 0 69066
-sr 19029,23322 2 68897
-pt 26346,12723 0 68902
-+e 11709,12705,555 0 68923
-tf 26346,16545 0 68928
-3d "
-*G 16101,18045 2 68931
-*D 17565,18045 2 68932
-*H 19029,18450,405 2 68936
-*L 17565,18045 2 68939
-*C 17565,19335,1752 2 68942
-*P 19029,18045 2 68944
-*S 16101,18045 2 68946
-*U 16101,18450 2 68948
-*F 17565,18045 2 68949
-*Q 20490,18045 2 68951
-*W 16101,18450 2 68952
-gr 17565,18045 2 68953
-pd 13173,18450,405 2 68954
-ts 13173,12600,4734 0 68955
-!= 26346,15396,1197 0 68957
-*a 16101,11205,405 0 68961
-*b 14637,18450,4260 2 68962
-*g 14637,11205,5595 1 68963
-*d 11709,18450,405 2 68964
-*e 10245,11205,405 0 68965
-*z 11709,17508,4920 2 68966
-*y 13173,11205,5283 1 68967
-*h 11709,18450,405 2 68968
-*i 7317,10800,405 0 68969
-*k 11709,11205,405 0 68970
-*l 14637,18450,405 2 68971
-*m 14637,10800,5595 1 68972
-*n 11709,11205,405 0 68973
-*c 13173,18450,4647 2 68974
-*o 11709,11205,405 0 68975
-*p 16101,11295,405 0 68976
-*r 13173,11205,4527 0 68977
-*s 13173,11544,405 0 68978
-*t 11709,11295,405 0 68979
-*u 11709,11205,405 0 68980
-*f 16101,17304,4314 2 68981
-*x 14637,11205,4734 0 68982
-*q 16101,18450,4734 2 68983
-*w 16101,11205,405 0 68984
-+h 16101,18450,405 2 68985
-+f 16101,11205,4608 0 68986
-+p 16101,11442,405 0 68987
-~= 26346,11436 0 68988
-ne 26346,15300,966 0 68990
-uA 19029,17553,1536 2 69029
-arrowverttp "
-rh 19029,13407 0 69030
-rA "
-dA 19029,17553,1536 2 69031
-arrowvertbt "
-lh 19029,13407 0 69032
-lA "
-vA 19029,17553,1812 2 69035
-hA 19029,14346 0 69036
-radicalex 19029,23322 2 69040
-fa 15612,15153 0 69041
-te 11220,15165 0 69042
-pp 26346,16560 0 69044
-cu 26346,16650 0 69045
-mo 26346,17925 2 69047
-nm 26346,20625,2700 2 69049
-sb 26346,16290 0 69050
-sp 26346,16290 0 69051
-nb 26346,18165,1875 2 69052
-nc 26346,18165,1875 2 69053
-ib 26346,16641 0 69054
-ip 26346,16641 0 69055
-c+ 26346,18900 2 69056
-c* 26346,18900 2 69058
-AN 26346,15240 0 69061
-OR 26346,15240 0 69062
-ci 26346,18900 2 69069
-is 26346,20268,5997 3 69077
-/_ 26346,19365 2 69079
-es 26346,18465,435 2 69080
-Ah 13173,13980 0 69081
-Im 19029,18255,1890 2 69085
-Re 20490,18255,1890 2 69086
-lc 19029,23322,5124 3 69088
-bracketlefttp "
-lf 19029,23322,5124 3 69089
-bracketleftbt "
-lt 19029,19758,6588 3 69090
-parenlefttp "
-bracelefttp "
-lk 19029,19758,6588 3 69091
-braceleftmid "
-lb 19029,19758,6588 3 69092
-parenleftbt "
-braceleftbt "
-arrowvertex 19029,23322,6588 3 69097
-rc 19029,23322,5124 3 69104
-bracketrighttp "
-rf 19029,23322,5124 3 69105
-bracketrightbt "
-rt 19029,19758,6588 3 69106
-parenrighttp "
-bracerighttp "
-rk 19029,19758,6588 3 69107
-bracerightmid "
-rb 19029,19758,6588 3 69108
-parenrightbt "
-bracerightbt "
-bv 19029,23322,6588 3 69109
-bracerightex "
-braceleftex "
-parenrightex 19029,23322,6588 3 69110
-parenleftex "
-bracketrightex "
-bracketleftex "
-barex "
--+ 26346,18366 2 69117
-la 8781,21000,4950 2 44513
-ra 8781,21000,4950 2 44529
-=~ 26346,14187 0 69103
-<< 26346,15294,1086 0 128316
->> 26346,15294,1086 0 128318
--h 15126,18564,486 2 128328
-wp 17076,13026,4218 0 44483
-lz 26346,17844,294 2 44512
-st 12198,12846,396 0 69076
-** 26346,13275 0 69102
-an 19029,8676 0 69100
-CR 26346,12165 0 44479
diff --git a/contrib/groff/font/devlj4/TB b/contrib/groff/font/devlj4/TB
deleted file mode 100644
index 644425aa9d89..000000000000
--- a/contrib/groff/font/devlj4/TB
+++ /dev/null
@@ -1,991 +0,0 @@
-name TB
-spacewidth 7806
-pcltypeface 4101
-pclproportional 1
-pclweight 3
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -3414
-P . -4389
-P , -4389
-V A -4878
-A V -4878
-T o -2925
-T r -1461
-T c -2439
-T e -2925
-T d -2925
-T s -2439
-T y -1461
-T a -2925
-T w -1461
-T u -1461
-T J -1461
-L T -2439
-L Y -3414
-Y o -4878
-Y e -4878
-Y a -4878
-Y J -1461
-A W -4389
-W A -4389
-T A -2439
-V o -3903
-V e -3903
-V a -3903
-Y A -3903
-F A -3903
-F . -3903
-F , -3903
-A T -2439
-A Y -3903
-v . -3414
-v , -3414
-y . -3414
-y , -3414
-T . -2439
-T , -2439
-L W -3414
-P A -3414
-V J -1461
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -3414
-W e -3414
-W a -3414
-W . -3903
-W , -3903
-r . -3414
-r , -3414
-w . -3414
-w , -3414
-Y u -3414
-A v -3414
-A y -3414
-A w -3414
-o . -1461
-o , -1461
-p . -1461
-p , -1461
-e . -975
-e , -975
-b . -486
-b , -486
-O T -1461
-O V -2439
-O Y -2925
-O . -2925
-O , -2925
-L y -1950
-L O -975
-L G -975
-L C -975
-L Q -975
-P J -975
-V y -2439
-V u -2439
-V O -2439
-V G -2439
-V C -2439
-V Q -2439
-D T -1461
-D V -2439
-D Y -2925
-D . -2925
-D , -2925
-Y O -2925
-Y G -2925
-Y C -2925
-Y Q -2925
-F o -1950
-F e -1950
-F a -1950
-c . -975
-c , -975
-O A -2439
-O W -1950
-L U -1461
-R T -1950
-R V -1950
-R Y -1950
-R W -1950
-G T -1461
-P o -975
-P g -975
-P e -975
-P a -975
-C A -2439
-C . -2439
-C , -2439
-D A -2439
-D W -1950
-B T -1461
-B Y -1461
-B . -1461
-B , -1461
-F J -1461
-A O -2439
-A G -2439
-A C -2439
-A U -2439
-A Q -2439
-W r -1950
-W y -1950
-W u -1950
-W O -1950
-W G -1950
-W C -1950
-W J -1461
-W Q -1950
-J A -1461
-J . -1461
-J , -1461
-U A -2439
-U . -2439
-U , -2439
-Q A -2439
-Q W -1950
-T O -1461
-T G -1461
-T C -1461
-T Q -1461
-O X -1950
-L o -975
-L e -975
-L q -975
-G V -1461
-G Y -1461
-G W -1461
-G . -1461
-G , -1461
-P T -486
-P V -486
-P Y -486
-C T -975
-C V -975
-C Y -975
-D X -1950
-B V -1461
-B X -1461
-B A -1461
-B W -1461
-S . -1461
-S , -1461
-F r -486
-F y -486
-F u -486
-F O -486
-F G -486
-F C -486
-F Q -486
-X o -1461
-X e -1461
-X y -1950
-X O -1950
-X G -1950
-X C -1950
-X Q -1950
-A o -1461
-A e -1461
-Q X -1950
-K o -1461
-K e -1461
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -975
-o y -975
-o x -975
-o w -975
-h v -975
-h y -975
-n v -975
-n y -975
-m v -975
-m y -975
-r g -486
-g . -1461
-g , -1461
-c v -975
-c y -975
-c w -975
-v o -975
-v g -975
-v c -975
-v d -975
-v a -975
-v q -975
-e v -975
-e y -975
-b v -486
-b y -486
-b w -486
-s . -975
-s , -975
-y o -975
-y g -975
-y c -975
-y d -975
-y a -975
-y q -975
-f g -486
-x o -975
-x g -486
-x c -975
-x e -975
-x d -975
-x a -975
-x q -975
-a v -975
-a y -975
-a w -975
-w o -975
-w g -975
-w c -975
-w d -975
-w a -975
-w q -975
-T i -975
-T S -1461
-L a -975
-L S -486
-R o -975
-R y -975
-R O -975
-R G -975
-R C -975
-R U -1461
-R Q -975
-G X -1461
-G A -1461
-P s -975
-P Z -486
-P X -486
-P W -486
-C X -975
-C W -975
-C J -486
-V i -975
-V S -1461
-S T -486
-S V -486
-S Y -486
-S X -486
-S A -1461
-S W -486
-Y i -975
-Y S -1461
-X a -975
-X u -975
-X S -486
-A t -975
-A g -486
-A c -975
-A d -1461
-A a -975
-A u -975
-A q -1461
-A S -486
-W i -975
-W S -1461
-K c -975
-K u -975
-K S -486
-t g -486
-t . -486
-t , -486
-o f -486
-h w -975
-n w -975
-m w -975
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-c f -486
-c x -975
-v e -975
-v s -975
-e f -486
-e x -975
-e w -975
-b f -486
-s v -486
-s y -486
-s f -486
-s x -486
-s w -486
-y e -975
-y s -975
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-x s -486
-w e -975
-w s -975
-k o -486
-k g -486
-k c -486
-k v -486
-k e -486
-k d -486
-k y -486
-k a -486
-k w -486
-k q -486
-O Z -486
-N . -486
-N , -486
-R e -975
-R a -975
-R u -975
-R S -486
-G Z -486
-P U -486
-C Z -975
-E t -486
-E o -486
-E g -486
-E c -486
-E v -486
-E e -486
-E d -486
-E y -486
-E f -486
-E a -486
-E w -486
-E u -486
-E q -486
-E O -486
-E G -486
-E C -486
-E S -486
-E J -486
-E Q -486
-E . -486
-E , -486
-Z o -486
-Z e -486
-Z d -486
-Z s -486
-Z y -975
-Z a -486
-Z w -975
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z Q -486
-D Z -486
-B Z -486
-S Z -486
-F i -486
-F j -975
-F S -486
-A s -486
-U g -486
-U J -486
-K a -975
-t o -486
-t c -486
-t e -486
-t d -486
-t s -486
-t a -486
-t j -486
-t q -486
-o z -486
-r s -486
-r j -486
-c z -486
-v j -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z s -486
-z a -486
-z q -486
-b z -486
-s z -486
-y j -486
-w j -486
-k t -486
-k s -486
-k u -486
-N A -486
-C t -486
-C o -486
-C h -486
-C l -486
-C r -486
-C i -486
-C e -486
-C y -486
-C a -486
-C u -486
-C O -486
-C H -486
-C N -486
-C M -486
-C L -486
-C R -486
-C G -486
-C I -486
-C P -486
-C C -486
-C E -486
-C D -486
-C B -486
-C S -486
-C F -486
-C U -975
-C Q -486
-C K -486
-E n -486
-E m -486
-E l -486
-E r -486
-E i -486
-E p -486
-E z -486
-E b -486
-E s -486
-E x -486
-E j -486
-E k -486
-E T -486
-E H -486
-E N -486
-E M -486
-E L -486
-E R -486
-E I -486
-E P -486
-E V -486
-E E -486
-E Z -486
-E D -486
-E B -486
-E Y -486
-E F -486
-E X -486
-E A -486
-E W -486
-E U -486
-E K -486
-B U -486
-U t -486
-U o -486
-U n -486
-U m -486
-U r -486
-U i -486
-U p -486
-U c -486
-U v -486
-U e -486
-U z -486
-U d -486
-U s -486
-U y -486
-U f -486
-U x -486
-U a -486
-U w -486
-U j -486
-U q -486
-U O -486
-U G -486
-U C -486
-U S -486
-U Q -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -3414
-L ' -3414
-T char173 -1461
-T hy -1461
-T - -1461
-T en -1461
-T em -1461
-A cq -3414
-A ' -3414
-char173 T -1461
-hy T -1461
-- T -1461
-en T -1461
-em T -1461
-Y char173 -3414
-Y hy -3414
-Y - -3414
-Y en -3414
-Y em -3414
-c cq -975
-c ' -975
-e cq -975
-e ' -975
-b cq -486
-b ' -486
-a cq -1461
-a ' -1461
-V char173 -2439
-V hy -2439
-V - -2439
-V en -2439
-V em -2439
-h cq -975
-h ' -975
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-R cq -975
-R ' -975
-W char173 -1950
-W hy -1950
-W - -1950
-W en -1950
-W em -1950
-cq d -1461
-' d -1461
-s cq -486
-s ' -486
-L char173 -975
-L hy -975
-L - -975
-L en -975
-L em -975
-F char173 -486
-F hy -486
-F - -486
-F en -486
-F em -486
-X char173 -1950
-X hy -1950
-X - -1950
-X en -1950
-X em -1950
-A char173 -1950
-A hy -1950
-A - -1950
-A en -1950
-A em -1950
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -975
-' s -975
-char173 X -1950
-hy X -1950
-- X -1950
-char173 A -1950
-hy A -1950
-- A -1950
-en X -1950
-en A -1950
-em X -1950
-R char173 -975
-R hy -975
-R - -975
-R en -975
-R em -975
-K cq -486
-K ' -486
-t g -486
-b f -486
-k cq -486
-k ' -486
-C cq -486
-C ' -486
-E cq -486
-E ' -486
-E char173 -486
-E hy -486
-E - -486
-E en -486
-E em -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-k char173 -486
-k hy -486
-k - -486
-k en -486
-k em -486
-C char173 -486
-C hy -486
-C - -486
-C en -486
-C em -486
-U char173 -486
-U hy -486
-U - -486
-U en -486
-U em -486
-charset
-! 8781,18045,405 2 3617
-dq 12198,18450 2 3618
-" "
-sh 13173,18450,405 2 3619
-# "
-Do 13173,19755,2610 2 3620
-$ "
-% 23418,18237,405 2 3621
-& 21954,18045,405 2 3622
-cq 8781,18450 2 51751
-' "
-( 8781,18450,4305 2 3624
-) 8781,18450,4305 2 3625
-* 13173,18450 2 3626
-+ 23418,15975 0 3627
-, 8781,4380,4560 0 3628
-char173 8781,7740 0 3629
-hy "
-- "
-. 8781,4125,405 0 3630
-sl 8781,18450,405 2 3631
-/ "
-0 13173,18450,405 2 3632
-1 13173,18450 2 3633
-2 13173,18450 2 3634
-3 13173,18450,405 2 3635
-4 13173,18450 2 3636
-5 13173,18045,405 2 3637
-6 13173,18450,405 2 3638
-7 13173,18045 2 3639
-8 13173,18450,405 2 3640
-9 13173,18450,405 2 3641
-: 8781,12549,405 0 3642
-; 8781,12549,4560 0 3643
-< 26346,16068 0 3644
-= 23418,11370 0 3645
-> 26346,16068 0 3646
-? 13173,18045,405 2 3647
-at 23418,16950,4131 2 3648
-@ "
-A 19029,18450 2 3649
-B 17565,18045 2 3650
-C 19029,18450,405 2 3651
-D 19029,18045 2 3652
-E 17565,18045 2 3653
-F 16101,18045 2 3654
-G 20490,18519,405 2 3655
-H 20490,18045 2 3656
-I 10245,18045 2 3657
-J 12684,18045,405 2 3658
-K 20490,18045 2 3659
-L 17565,18045 2 3660
-M 24882,18045 2 3661
-N 19029,18045,405 2 3662
-O 20490,18450,405 2 3663
-P 16101,18045 2 3664
-Q 20490,18450,4515 2 3665
-R 19029,18045 2 3666
-S 14637,18450,462 2 3667
-T 17565,18045 2 3668
-U 19029,18045,405 2 3669
-V 19029,18045,405 2 3670
-W 26346,18045,405 2 3671
-X 19029,18045 2 3672
-Y 19029,18045 2 3673
-Z 17565,18045 2 3674
-lB 8781,18045,4305 2 3675
-[ "
-rs 8781,18450,405 2 3676
-\ "
-rB 8781,18045,4305 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 8781,18450 2 51808
-` "
-a 13173,12735,405 0 3681
-b 14637,18090,405 2 3682
-c 11709,12735,405 0 3683
-d 14637,18090,405 2 3684
-e 11709,12735,405 0 3685
-f 9270,18540 2 3686
-g 13173,12735,5484 1 3687
-h 14637,18090 2 3688
-i 7317,18450 2 3689
-j 8781,18450,5490 3 3690
-k 14637,18090 2 3691
-l 7317,18090 2 3692
-m 21954,12735 0 3693
-n 14637,12735 0 3694
-o 13173,12735,405 0 3695
-p 14637,12735,5490 1 3696
-q 14637,12828,5490 1 3697
-r 11709,12735 0 3698
-s 10245,12735,411 0 3699
-t 8781,16773,405 2 3700
-u 14637,12330,405 0 3701
-v 13173,12330,405 0 3702
-w 19029,12330,405 0 3703
-x 13173,12330 0 3704
-y 13173,12330,5490 1 3705
-z 11709,12330 0 3706
-lC 13173,19935,6210 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 13173,19935,6210 3 3709
-} "
-ti 26346,9435 0 51876
-char192 19029,24795 2 3776
-`A "
-char194 19029,24795 2 3778
-^A "
-char200 17565,24795 2 3784
-`E "
-char202 17565,24795 2 3786
-^E "
-char203 17565,23955 2 3787
-:E "
-char206 10245,24795 2 3790
-^I "
-char207 10245,23955 2 3791
-:I "
-char180 13173,19065 2 3764
-aa "
-ga 13173,19065 2 3680
-a^ 13173,19065 2 3678
-^ "
-char168 13173,17820 2 3752
-ad "
-a~ 13173,17772 2 3710
-~ "
-char217 19029,24795,405 2 3801
-`U "
-char219 19029,24795,405 2 3803
-^U "
-char221 19029,24795 2 3805
-'Y "
-char253 13173,19065,5490 3 3837
-'y "
-char176 13173,18450 2 3760
-de "
-char199 19029,18450,5532 3 3783
-,C "
-char231 11709,12735,5661 1 3815
-,c "
-char209 19029,23892,405 2 3793
-~N "
-char241 14637,17772 2 3825
-~n "
-char161 8781,12672,5778 1 3745
-r! "
-char191 13173,12846,5604 1 3775
-r? "
-char164 13173,16089 0 3748
-Cs "
-char163 13173,18450,429 2 3747
-Po "
-char165 13173,18045 2 3749
-Ye "
-char167 13173,18450,3225 2 3751
-sc "
-Fn 13173,18540,5490 3 51871
-char162 13173,17682 2 3746
-ct "
-char226 13173,19065,405 2 3810
-^a "
-char234 11709,19065,405 2 3818
-^e "
-char244 13173,19065,405 2 3828
-^o "
-char251 14637,19065,405 2 3835
-^u "
-char225 13173,19065,405 2 3809
-'a "
-char233 11709,19065,405 2 3817
-'e "
-char243 13173,19065,405 2 3827
-'o "
-char250 14637,19065,405 2 3834
-'u "
-char224 13173,19065,405 2 3808
-`a "
-char232 11709,19065,405 2 3816
-`e "
-char242 13173,19065,405 2 3826
-`o "
-char249 14637,19065,405 2 3833
-`u "
-char228 13173,17820,405 2 3812
-:a "
-char235 11709,17820,405 2 3819
-:e "
-char246 13173,17820,405 2 3830
-:o "
-char252 14637,17820,405 2 3836
-:u "
-char197 19029,24750 2 3781
-oA "
-char238 7317,19065 2 3822
-^i "
-char216 20490,18450,405 2 3800
-/O "
-char198 27321,18045 2 3782
-AE "
-char229 13173,19020,405 2 3813
-oa "
-char237 7317,19065 2 3821
-'i "
-char248 13173,12750,405 0 3832
-/o "
-char230 19029,12735,405 0 3814
-ae "
-char196 19029,23955 2 3780
-:A "
-char236 7317,19065 2 3820
-`i "
-char214 20490,23955,405 2 3798
-:O "
-char220 19029,23955,405 2 3804
-:U "
-char201 17565,24795 2 3785
-'E "
-char239 7317,17820 2 3823
-:i "
-char223 14637,18492,405 2 3807
-ss "
-char212 20490,24795,405 2 3796
-^O "
-char193 19029,24795 2 3777
-'A "
-char195 19029,23892 2 3779
-~A "
-char227 13173,17772,405 2 3811
-~a "
-char208 19029,18045 2 3792
--D "
-char240 13173,18090,405 2 3824
-Sd "
-char205 10245,24795 2 3789
-'I "
-char204 10245,24795 2 3788
-`I "
-char211 20490,24795,405 2 3795
-'O "
-char210 20490,24795,405 2 3794
-`O "
-char213 20490,23892,405 2 3797
-~O "
-char245 13173,17772,405 2 3829
-~o "
-vS 14637,24795,462 2 51795
-vs 10245,19065,411 2 51827
-char218 19029,24795,405 2 3802
-'U "
-:Y 19029,23955 2 51801
-char255 13173,17820,5490 3 3839
-:y "
-char222 16101,18045 2 3806
-TP "
-char254 14637,18090,5490 3 3838
-Tp "
-char181 14637,10800,5193 1 3765
-char182 13173,19635,4200 2 3766
-ps "
-char190 23418,18450,405 2 3774
-34 "
-\- 23418,9000 0 51757
-char188 23418,18450,405 2 3772
-14 "
-char189 23418,18450,405 2 3773
-12 "
-char170 13173,18450 2 3754
-Of "
-char186 13173,18450 2 3770
-Om "
-char171 11220,9861 0 3755
-Fo "
-char187 11220,9861 0 3771
-Fc "
-char177 23418,15975,2880 0 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19725 2 3753
-co "
-char172 23418,12210 0 3756
-no "
-char174 13173,19725 2 3758
-rg "
-char178 9270,18285 2 3762
-S2 "
-char179 9270,18285 2 3763
-S3 "
-char184 13173,0,5661 1 3768
-ac "
-char185 9270,18285 2 3769
-S1 "
-char215 23418,15033 0 3799
-char247 23418,14505 0 3831
-char183 8781,11274 0 3767
-pc "
-fm 8781,18450 2 51873
-sd 13173,18450 2 51874
-dg 13173,18450,3075 2 51755
-tm 16101,17550 2 51796
-ah 13173,19065 2 51935
-ao 13173,19020 2 51930
-f/ 3417,18450,405 2 51759
-em 23418,7200 0 51789
-en 13173,7200 0 51790
-dd 13173,18450,3075 2 51773
-.i 7317,12330 0 51957
-aq 8781,18450 2 3623
-bu 13173,14226 0 51889
-'C 19029,24795,405 2 20166
-'c 11709,19065,405 2 20198
-lq 15126,18450 2 51838
-rq 15126,18450 2 51746
-Bq 15126,4134,4806 0 51772
-vz 11709,19065 2 51834
-fi 14637,18540 2 51881
-fl 14637,19116 2 51882
-ff 16587,18540 2 51883
-Fi 21954,18540 2 51884
-Fl 21954,19116 2 51885
-ij 15075,18450,5490 3 51958
-bq 8781,4134,4806 0 51756
-%0 30738,18237,405 2 51901
-char175 13173,17259 2 3759
-a- "
-ab 13173,18285 2 51926
-a. 13173,17820 2 51927
-oe 19515,12735,405 0 51823
-OE 29760,18450,405 2 51791
-fo 6831,9861 0 51886
-fc 6831,9861 0 51887
-sq 19029,15624 0 51899
-/L 17565,18045 2 51944
-/l 7317,18090 2 51960
-a" 13173,19065 2 51933
-ho 13173,513,4413 0 51934
-vZ 17565,24795 2 51802
-IJ 23904,18045,405 2 51942
diff --git a/contrib/groff/font/devlj4/TBI b/contrib/groff/font/devlj4/TBI
deleted file mode 100644
index e1a30a879a16..000000000000
--- a/contrib/groff/font/devlj4/TBI
+++ /dev/null
@@ -1,1045 +0,0 @@
-name TBI
-spacewidth 7806
-slant 15.300000
-pcltypeface 4101
-pclproportional 1
-pclweight 3
-pclstyle 1
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2925
-P . -4389
-P , -4389
-V A -3903
-A V -4389
-T o -2439
-T r -975
-T c -2439
-T e -2439
-T d -1950
-T s -1461
-T y -975
-T a -2439
-T w -975
-T u -975
-T J -1950
-L T -2439
-L Y -2925
-Y o -3903
-Y e -3903
-Y a -3414
-Y J -1950
-A W -3903
-W A -3414
-T A -2439
-V o -3414
-V e -3414
-V a -3414
-Y A -2925
-F A -2439
-F . -3903
-F , -3903
-A T -2439
-A Y -3414
-v . -2439
-v , -2439
-y . -2439
-y , -2439
-T . -2439
-T , -2439
-L W -2925
-P A -2925
-V J -1950
-V . -3903
-V , -3903
-Y . -2925
-Y , -2925
-W o -2925
-W e -2925
-W a -2925
-W . -3414
-W , -3414
-r . -3414
-r , -3414
-w . -2439
-w , -2439
-Y u -2439
-A v -2439
-A y -2925
-A w -2439
-o . -1461
-o , -1461
-p . -1461
-p , -1461
-e . -975
-e , -975
-b . -1461
-b , -1461
-O T -1461
-O V -1950
-O Y -1950
-O . -2439
-O , -2439
-L y -975
-P J -2925
-V y -1950
-V u -1950
-V O -1950
-V G -1950
-V C -1950
-V Q -1950
-D T -1461
-D V -1950
-D Y -1950
-D . -2439
-D , -2439
-Y O -2439
-Y G -2439
-Y C -2439
-Y Q -2439
-F o -1461
-F e -1461
-F a -1461
-c . -975
-c , -975
-O A -975
-O W -1950
-R T -1461
-R V -1461
-R Y -1461
-R W -1461
-G T -1461
-P o -1461
-P g -1461
-P e -1461
-P a -1461
-C A -1461
-C . -2439
-C , -2439
-D A -975
-D W -1950
-B T -1461
-B Y -1950
-B . -1461
-B , -1461
-F J -1950
-A O -1950
-A G -1950
-A C -1950
-A U -1950
-A Q -1950
-W r -1950
-W y -1950
-W u -1950
-W O -1950
-W G -1950
-W C -1950
-W J -1950
-W Q -1950
-J A -975
-J . -975
-J , -975
-U A -975
-U . -1950
-U , -1950
-Q A -975
-Q W -1950
-f . -975
-f , -975
-T O -975
-T G -975
-T C -975
-T Q -975
-O X -1461
-G V -1461
-G Y -1461
-G W -1461
-G . -486
-G , -486
-P T -1461
-P V -1461
-P Y -1461
-C T -975
-C V -975
-C Y -975
-D X -1461
-B V -1950
-B X -1461
-B A -975
-B W -1950
-S . -975
-S , -975
-X o -1461
-X e -1461
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1950
-A e -1950
-Q X -1461
-K o -1461
-K e -1461
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -975
-o y -975
-o x -486
-o w -975
-h v -975
-h y -975
-n v -975
-n y -975
-m v -975
-m y -975
-r g -975
-g . -975
-g , -975
-p v -975
-p y -975
-p x -486
-c v -975
-c y -975
-c w -975
-v o -486
-v g -975
-v c -486
-v d -486
-v a -486
-v q -486
-e v -975
-e y -975
-b v -975
-b y -975
-b w -975
-s . -486
-s , -486
-y o -486
-y g -975
-y c -486
-y d -486
-y a -486
-y q -486
-f g -1461
-x o -486
-x g -486
-x c -486
-x e -486
-x d -486
-x a -486
-x q -486
-w o -486
-w g -975
-w c -486
-w d -486
-w a -486
-w q -486
-T i -975
-T S -975
-R o -486
-R y -486
-R O -486
-R G -486
-R C -486
-R U -486
-R Q -486
-G X -486
-G A -486
-P s -486
-P Z -486
-P X -1461
-P W -1461
-C X -975
-C W -975
-C J -1461
-V i -975
-V S -975
-S T -1461
-S V -1461
-S Y -1461
-S X -975
-S A -975
-S W -1461
-Y i -975
-Y S -975
-X a -486
-X u -975
-X S -486
-A t -486
-A g -486
-A c -1950
-A d -1461
-A a -486
-A u -975
-A q -975
-A S -486
-W i -975
-W S -975
-J y -1461
-K c -1461
-K u -975
-K S -486
-t g -486
-o f -975
-h w -975
-n w -975
-m w -975
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-g g -975
-p f -975
-p w -975
-c f -975
-c x -486
-v e -486
-v s -486
-e f -975
-e x -486
-e w -975
-b f -975
-y e -486
-y s -486
-f o -975
-f c -975
-f e -975
-f d -975
-f s -486
-f a -975
-f q -975
-w e -486
-w s -486
-k o -486
-k g -486
-k c -486
-k e -486
-k d -486
-k a -486
-k q -486
-O Z -486
-O J -975
-R e -486
-R a -486
-R u -486
-R S -486
-G Z -486
-C Z -975
-E t -486
-E o -486
-E g -975
-E c -486
-E v -486
-E e -486
-E d -486
-E y -486
-E f -486
-E a -486
-E w -486
-E u -486
-E q -486
-E O -486
-E G -486
-E C -486
-E S -486
-E J -486
-E Q -486
-E . -486
-E , -486
-Z o -486
-Z e -486
-Z d -486
-Z y -975
-Z a -486
-Z w -975
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z Q -486
-D Z -486
-D J -975
-B Z -486
-B J -975
-S Z -486
-S J -975
-J o -975
-J i -975
-J e -975
-J a -975
-J u -975
-J T -975
-J O -975
-J H -975
-J N -975
-J M -975
-J L -975
-J R -975
-J G -975
-J I -975
-J P -975
-J C -975
-J V -975
-J E -975
-J Z -975
-J D -975
-J B -975
-J S -975
-J Y -975
-J F -975
-J X -975
-J W -975
-J J -975
-J U -975
-J Q -975
-J K -975
-U g -486
-U J -975
-K a -486
-o g -486
-o z -486
-h g -486
-h f -486
-n g -486
-n f -486
-m g -486
-m f -486
-l g -486
-r s -486
-g o -486
-g c -486
-g e -486
-g d -486
-g s -486
-g a -486
-g q -486
-i g -486
-p g -486
-p z -486
-c g -486
-c z -486
-v t -486
-v h -486
-v n -486
-v m -486
-v r -486
-v i -486
-v p -486
-v z -486
-v b -486
-v y -486
-v f -486
-v x -486
-v w -486
-v j -486
-v u -486
-v k -486
-e g -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z a -486
-z q -486
-d g -486
-b g -486
-b z -486
-s g -486
-y t -486
-y h -486
-y n -486
-y m -486
-y l -486
-y r -486
-y i -486
-y p -486
-y v -486
-y z -486
-y b -486
-y y -486
-y f -486
-y x -486
-y w -486
-y j -486
-y u -486
-y k -486
-a g -486
-w t -486
-w h -486
-w n -486
-w m -486
-w l -486
-w r -486
-w i -486
-w p -486
-w v -486
-w z -486
-w b -486
-w y -486
-w f -486
-w x -486
-w w -486
-w j -486
-w u -486
-w k -486
-j g -486
-u g -486
-q g -486
-O g -486
-M g -486
-G J -486
-I g -486
-C t -486
-C o -486
-C h -486
-C l -486
-C r -486
-C i -486
-C e -486
-C y -486
-C a -486
-C u -486
-C O -486
-C H -486
-C N -486
-C M -486
-C L -486
-C R -486
-C G -486
-C I -486
-C P -486
-C C -486
-C E -486
-C D -486
-C B -486
-C S -486
-C F -486
-C U -486
-C Q -486
-C K -486
-E n -486
-E m -486
-E l -486
-E r -486
-E i -486
-E p -486
-E z -486
-E b -486
-E s -486
-E x -486
-E j -486
-E k -486
-E T -486
-E H -486
-E N -486
-E M -486
-E L -486
-E R -486
-E I -486
-E P -486
-E V -486
-E E -486
-E Z -486
-E D -486
-E B -486
-E Y -486
-E F -486
-E X -486
-E A -486
-E W -486
-E U -486
-E K -486
-A f -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -2925
-L ' -2925
-T char173 -975
-T hy -975
-T - -975
-T en -975
-T em -975
-A cq -3414
-A ' -3414
-char173 T -1461
-hy T -1461
-- T -1461
-en T -1461
-em T -1461
-Y char173 -2439
-Y hy -2439
-Y - -2439
-Y en -2439
-Y em -2439
-p cq -1950
-p ' -1950
-c cq -1461
-c ' -1461
-e cq -1950
-e ' -1950
-b cq -1950
-b ' -1950
-V char173 -1950
-V hy -1950
-V - -1950
-V en -1950
-V em -1950
-h cq -975
-h ' -975
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-R cq -486
-R ' -486
-W char173 -1950
-W hy -1950
-W - -1950
-W en -1950
-W em -1950
-cq d -975
-' d -975
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1950
-A hy -1950
-A - -1950
-A en -1950
-A em -1950
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -486
-' s -486
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -975
-hy A -975
-- A -975
-en X -1461
-en A -975
-em X -1461
-R char173 -486
-R hy -486
-R - -486
-R en -486
-R em -486
-K cq -486
-K ' -486
-t g -486
-v cq -486
-v ' -486
-b f -975
-y cq -486
-y ' -486
-w cq -486
-w ' -486
-C cq -486
-C ' -486
-E cq -486
-E ' -486
-E char173 -486
-E hy -486
-E - -486
-E en -486
-E em -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-J cq -975
-J ' -975
-J char173 -975
-J hy -975
-J - -975
-J en -975
-J em -975
-v char173 -486
-v hy -486
-v - -486
-v en -486
-v em -486
-y char173 -486
-y hy -486
-y - -486
-y en -486
-y em -486
-w char173 -486
-w hy -486
-w - -486
-w en -486
-w em -486
-C char173 -486
-C hy -486
-C - -486
-C en -486
-C em -486
-char173 g -486
-hy g -486
-- g -486
-en g -486
-em g -486
-charset
-! 10245,18450,405,963,-453,913 2 3617
-dq 13662,18450,0,1380,-3414,913 2 3618
-" "
-sh 13173,18450,405,1902,270,913 2 3619
-# "
-Do 13173,19770,2295,1998,1053,913 2 3620
-$ "
-% 23418,18237,405,288,-1509,288 2 3621
-& 20490,18045,405,234,87,234 2 3622
-cq 8781,18450,0,2001,-2790,913 2 51751
-' "
-( 8781,18450,4761,3096,-318,913 2 3624
-) 8781,18450,4761,846,1932,846 2 3625
-* 13173,18450,0,1518,-1812,913 2 3626
-+ 23418,15975,0,0,-3105 0 3627
-, 8781,3612,4728,0,1515 0 3628
-char173 8781,7740,0,660,426,660 0 3629
-hy "
-- "
-. 8781,3645,405,0,129 0 3630
-sl 8781,18450,405,3012,1209,913 2 3631
-/ "
-0 13173,18450,405,1722,72,913 2 3632
-1 13173,18450,0,0,765 2 3633
-2 13173,18450,0,657,1419,657 2 3634
-3 13173,18450,405,702,1116,702 2 3635
-4 13173,18450,0,1953,1386,913 2 3636
-5 13173,18045,405,1845,855,913 2 3637
-6 13173,18450,405,2286,-9,913 2 3638
-7 13173,18045,0,2997,-969,913 2 3639
-8 13173,18450,405,1548,240,913 2 3640
-9 13173,18450,405,1572,705,913 2 3641
-: 8781,12360,405,0,408 0 3642
-; 8781,12360,4728,0,1515 0 3643
-< 26346,16068,0,0,-3981 0 3644
-= 23418,11370,0,0,-3300 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 13173,18450,405,1725,-1932,913 2 3647
-at 23418,16950,4131,1095,219,913 2 3648
-@ "
-A 17565,18450,0,546,2412,546 2 3649
-B 17565,18045,0,1257,1167,913 2 3650
-C 17565,18594,405,2331,-393,913 2 3651
-D 19029,18045,0,1707,1611,913 2 3652
-E 17565,18045,0,1974,1428,913 2 3653
-F 16101,18045,0,3384,1536,913 2 3654
-G 19029,18450,405,1863,-12,913 2 3655
-H 20490,18045,0,3006,1266,913 2 3656
-I 10245,18045,0,2997,1338,913 2 3657
-J 13173,18045,405,2652,1491,913 2 3658
-K 17565,18045,0,3312,1326,913 2 3659
-L 16101,18045,0,1188,1815,913 2 3660
-M 23418,18045,0,3132,1362,913 2 3661
-N 19029,18045,405,3270,1227,913 2 3662
-O 19029,18450,405,1503,-183,913 2 3663
-P 16101,18045,0,2490,1233,913 2 3664
-Q 18540,18450,5550,1902,-177,913 3 3665
-R 17565,18045,0,1260,1188,913 2 3666
-S 14637,18525,510,1452,543,913 2 3667
-T 16101,18045,0,3513,-963,913 2 3668
-U 19029,18045,405,3249,-1455,913 2 3669
-V 17565,18045,405,3771,-1356,913 2 3670
-W 23418,18045,405,3891,-1311,913 2 3671
-X 17565,18045,0,2883,1578,913 2 3672
-Y 16101,18045,0,3630,-1254,913 2 3673
-Z 16101,18045,0,1923,876,913 2 3674
-lB 8781,18045,4095,4575,2064,913 2 3675
-[ "
-rs 8781,18450,405,0,-2226 2 3676
-\ "
-rB 8781,18045,4095,2826,3813,913 2 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,913 3 3679
-oq 8781,18450,0,2001,-2790,913 2 51808
-` "
-a 13173,12735,405,1059,1059,913 0 3681
-b 13173,18540,405,876,948,876 2 3682
-c 11709,12735,405,900,435,900 0 3683
-d 13173,18540,405,2541,1068,913 2 3684
-e 11709,12735,405,687,390,687 0 3685
-f 9270,18540,5490,4809,4866,913 3 3686
-g 13173,12735,5490,1500,1977,913 1 3687
-h 14637,18540,405,345,1146,345 2 3688
-i 7317,18585,405,1734,783,913 2 3689
-j 7317,18585,5490,2319,5745,913 3 3690
-k 13173,18540,405,1923,1194,913 2 3691
-l 7317,18540,405,2166,843,913 2 3692
-m 20490,12735,405,630,1101,630 0 3693
-n 14637,12735,405,321,954,321 0 3694
-o 13173,12735,405,675,714,675 0 3695
-p 13173,12735,5490,843,3888,843 1 3696
-q 13173,12735,5490,1317,672,913 1 3697
-r 10245,12783,0,2421,1005,913 0 3698
-s 10245,12735,405,885,891,885 0 3699
-t 7317,15870,405,2289,1056,913 0 3700
-u 14637,12735,405,426,279,426 0 3701
-v 11709,12735,405,1068,153,913 0 3702
-w 17565,12735,405,822,75,822 0 3703
-x 13173,12735,405,1137,1836,913 0 3704
-y 11709,12735,5490,543,3189,543 1 3705
-z 10245,12330,1935,1404,1839,913 0 3706
-lC 13173,19935,6210,3339,-972,913 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 13173,19935,6210,63,2304,63 3 3709
-} "
-ti 26346,9435,0,0,-4029 0 51876
-char192 17565,24795,0,546,2412,546 2 3776
-`A "
-char194 17565,24795,0,546,2412,546 2 3778
-^A "
-char200 17565,24795,0,1974,1428,913 2 3784
-`E "
-char202 17565,24795,0,1974,1428,913 2 3786
-^E "
-char203 17565,23955,0,1974,1428,913 2 3787
-:E "
-char206 10245,24795,0,3930,1338,913 2 3790
-^I "
-char207 10245,23955,0,4875,1338,913 2 3791
-:I "
-char180 13173,19065,0,786,-5055,786 2 3764
-aa "
-ga 13173,19065,0,0,-3540 2 3680
-a^ 13173,19065,0,417,-2931,417 2 3678
-^ "
-char168 13173,17820,0,1179,-2964,913 2 3752
-ad "
-a~ 13173,17703,0,1884,-3213,913 2 3710
-~ "
-char217 19029,24795,405,3249,-1455,913 2 3801
-`U "
-char219 19029,24795,405,3249,-1455,913 2 3803
-^U "
-char221 16101,24795,0,3630,-1254,913 2 3805
-'Y "
-char253 11709,19065,5490,1518,3189,913 3 3837
-'y "
-char176 13173,18450,0,111,-2970,111 2 3760
-de "
-char199 17565,18594,5718,2331,-393,913 3 3783
-,C "
-char231 11709,12735,5655,900,1278,900 1 3815
-,c "
-char209 19029,23733,405,3270,1227,913 2 3793
-~N "
-char241 14637,17703,405,1152,954,913 2 3825
-~n "
-char161 10245,13050,5805,0,855 1 3745
-r! "
-char191 13173,13050,5805,0,1680 1 3775
-r? "
-char164 13173,15834,0,2598,795,913 0 3748
-Cs "
-char163 13173,18450,429,2508,1473,913 2 3747
-Po "
-char165 13173,18045,0,5067,834,913 2 3749
-Ye "
-char167 13173,18450,3225,0,-597 2 3751
-sc "
-Fn 13173,18540,5490,2607,3165,913 3 51871
-char162 13173,16914,0,1431,-684,913 2 3746
-ct "
-char226 13173,19065,405,1059,1059,913 2 3810
-^a "
-char234 11709,19065,405,1149,390,913 2 3818
-^e "
-char244 13173,19065,405,675,714,675 2 3828
-^o "
-char251 14637,19065,405,426,279,426 2 3835
-^u "
-char225 13173,19065,405,1059,1059,913 2 3809
-'a "
-char233 11709,19065,405,1518,390,913 2 3817
-'e "
-char243 13173,19065,405,786,714,786 2 3827
-'o "
-char250 14637,19065,405,426,279,426 2 3834
-'u "
-char224 13173,19065,405,1059,1059,913 2 3808
-`a "
-char232 11709,19065,405,687,390,687 2 3816
-`e "
-char242 13173,19065,405,675,714,675 2 3826
-`o "
-char249 14637,19065,405,426,279,426 2 3833
-`u "
-char228 13173,17820,405,1179,1059,913 2 3812
-:a "
-char235 11709,17820,405,1911,390,913 2 3819
-:e "
-char246 13173,17820,405,1179,714,913 2 3830
-:o "
-char252 14637,17820,405,447,279,447 2 3836
-:u "
-char197 17565,24750,0,546,2412,546 2 3781
-oA "
-char238 7317,19065,405,3345,723,913 2 3822
-^i "
-char216 19029,18450,405,3702,2070,913 2 3800
-/O "
-char198 24396,18045,0,2730,2331,913 2 3782
-AE "
-char229 13173,19020,405,1059,1059,913 2 3813
-oa "
-char237 7317,19065,405,3714,723,913 2 3821
-'i "
-char248 13173,12735,405,2199,2256,913 0 3832
-/o "
-char230 18540,12735,405,876,1074,876 0 3814
-ae "
-char196 17565,23955,0,765,2412,765 2 3780
-:A "
-char236 7317,19065,405,1749,723,913 2 3820
-`i "
-char214 19029,23955,405,1503,-183,913 2 3798
-:O "
-char220 19029,23955,405,3249,-1455,913 2 3804
-:U "
-char201 17565,24795,0,1974,1428,913 2 3785
-'E "
-char239 7317,17820,405,4107,723,913 2 3823
-:i "
-char223 13173,18540,5490,1572,5862,913 3 3807
-ss "
-char212 19029,24795,405,1503,-183,913 2 3796
-^O "
-char193 17565,24795,0,567,2412,567 2 3777
-'A "
-char195 17565,23733,0,966,2412,913 2 3779
-~A "
-char227 13173,17703,405,1884,1059,913 2 3811
-~a "
-char208 19029,18045,0,1707,1611,913 2 3792
--D "
-char240 13173,18540,405,2235,708,913 2 3824
-Sd "
-char205 10245,24795,0,4227,1338,913 2 3789
-'I "
-char204 10245,24795,0,2997,1338,913 2 3788
-`I "
-char211 19029,24795,405,1503,-183,913 2 3795
-'O "
-char210 19029,24795,405,1503,-183,913 2 3794
-`O "
-char213 19029,23733,405,1503,-183,913 2 3797
-~O "
-char245 13173,17703,405,1884,714,913 2 3829
-~o "
-vS 14637,24798,510,2061,543,913 2 51795
-vs 10245,19065,405,2856,891,913 2 51827
-char218 19029,24795,405,3249,-1455,913 2 3802
-'U "
-:Y 16101,23955,0,3630,-1254,913 2 51801
-char255 11709,17820,5490,1311,3189,913 3 3839
-:y "
-char222 16101,18045,0,1203,1227,913 2 3806
-TP "
-char254 13173,18540,5490,843,3888,843 3 3838
-Tp "
-char181 14637,10800,5193,582,756,582 1 3765
-char182 13173,19635,4200,1350,-1008,913 2 3766
-ps "
-char190 23418,18450,405,0,-1899 2 3774
-34 "
-\- 23418,9000,0,0,-3315 0 51757
-char188 23418,18450,405,0,-1572 2 3772
-14 "
-char189 23418,18450,405,0,-1311 2 3773
-12 "
-char170 13173,18450,0,1368,-2397,913 2 3754
-Of "
-char186 13173,18450,0,744,-2295,744 2 3770
-Om "
-char171 11709,10200,0,1158,567,913 0 3755
-Fo "
-char187 11709,10200,0,615,1110,615 0 3771
-Fc "
-char177 23418,15975,2880,0,-2883 0 3761
-char166 13173,19083,5916,0,-4596 3 3750
-bb "
-char169 13173,19725,0,4398,-2574,913 2 3753
-co "
-char172 23418,12225,0,0,-4023 0 3756
-no "
-char174 13173,19725,0,4398,-2574,913 2 3758
-rg "
-char178 8781,18285,0,1911,-213,913 2 3762
-S2 "
-char179 8781,18285,0,1980,-552,913 2 3763
-S3 "
-char184 13173,0,5655,0,546 1 3768
-ac "
-char185 8781,18285,0,1173,-471,913 2 3769
-S1 "
-char215 23418,15033,0,0,-3690 0 3799
-char247 23418,14505,0,0,-3327 0 3831
-char183 8781,11121,0,0,-1899 0 3767
-pc "
-fm 8781,18450,0,930,-3342,913 2 51873
-sd 13173,18450,0,873,-3342,873 2 51874
-dg 13173,18450,3075,1344,-1188,913 2 51755
-tm 16101,17550,0,4884,-2535,913 2 51796
-ah 13173,19065,0,1392,-3906,913 2 51935
-ao 13173,19020,0,0,-4269 2 51930
-f/ 3402,18450,405,8832,6945,913 2 51759
-em 23418,7200,0,609,459,609 0 51789
-en 13173,7200,0,624,459,624 0 51790
-dd 13173,18450,3075,939,-783,913 2 51773
-.i 7317,12735,405,825,723,825 0 51957
-aq 8781,18450,0,1065,-3147,913 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 17565,24795,405,2331,-393,913 2 20166
-'c 11709,19065,405,1518,435,913 2 20198
-lq 14148,18450,0,1974,-2790,913 2 51838
-rq 14148,18450,0,1974,-2790,913 2 51746
-Bq 14148,3651,4689,0,1425 0 51772
-vz 10245,19065,1935,2856,1839,913 2 51834
-fi 15126,18540,5490,726,5055,726 3 51881
-fl 15126,18540,5490,2328,5034,913 3 51882
-ff 15126,18540,5490,5574,5268,913 3 51883
-Fi 21954,18540,5490,738,5223,738 3 51884
-Fl 21954,18540,5490,1959,5583,913 3 51885
-ij 14148,18585,5490,2271,783,913 3 51958
-bq 8781,3651,4689,0,510 0 51756
-%0 32202,18237,405,612,-1122,612 2 51901
-char175 13173,16860,0,1341,-2904,913 2 3759
-a- "
-ab 13173,18570,0,1281,-3690,913 2 51926
-a. 13173,17820,0,0,-5589 2 51927
-oe 19515,12735,405,462,462,462 0 51823
-OE 28299,18450,405,1695,-156,913 2 51791
-fo 7317,10200,0,1035,567,913 0 51886
-fc 7317,10200,0,618,984,618 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 16101,18045,0,1188,1815,913 2 51944
-/l 7317,18540,405,2622,1539,913 2 51960
-a" 13173,19065,0,4053,-3627,913 2 51933
-ho 13173,681,3249,420,-4389,420 0 51934
-vZ 16101,24798,0,1923,876,913 2 51802
-IJ 23418,18045,405,2652,1338,913 2 51942
diff --git a/contrib/groff/font/devlj4/TI b/contrib/groff/font/devlj4/TI
deleted file mode 100644
index 6b4a3ec78369..000000000000
--- a/contrib/groff/font/devlj4/TI
+++ /dev/null
@@ -1,1131 +0,0 @@
-name TI
-spacewidth 7806
-slant 15.600000
-pcltypeface 4101
-pclproportional 1
-pclweight 0
-pclstyle 1
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -1950
-P . -4389
-P , -4389
-V A -2925
-A V -2925
-T o -1950
-T r -486
-T c -1461
-T e -1950
-T d -1950
-T s -975
-T y -486
-T a -1950
-T w -486
-T u -486
-T J -1461
-L T -1950
-L Y -1950
-Y o -3414
-Y e -3414
-Y a -3414
-Y J -1461
-A W -2925
-W A -3414
-T A -2439
-V o -1950
-V e -1950
-V a -1950
-Y A -2439
-F A -3903
-F . -3903
-F , -3903
-A T -2439
-A Y -2439
-v . -2439
-v , -2439
-y . -2439
-y , -2439
-T . -2439
-T , -2439
-L W -1950
-P A -3414
-V J -1461
-V . -3903
-V , -3903
-Y . -2439
-Y , -2439
-W o -2439
-W e -2439
-W a -2439
-W . -3903
-W , -3903
-r . -2439
-r , -2439
-w . -2439
-w , -2439
-Y u -1950
-A v -2439
-A y -2439
-A w -2439
-o . -1461
-o , -1461
-p . -1461
-p , -1461
-e . -975
-e , -975
-b . -1461
-b , -1461
-O T -486
-O V -1461
-O Y -1950
-O . -2439
-O , -2439
-L y -975
-P J -1950
-V y -1950
-V u -1950
-V O -1950
-V G -1950
-V C -1950
-V Q -1950
-D T -486
-D V -1461
-D Y -1950
-D . -2439
-D , -2439
-Y O -1950
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -2925
-F e -2925
-F a -2925
-c . -975
-c , -975
-O A -975
-O W -1461
-L U -486
-R T -1461
-R V -1461
-R Y -1461
-R W -1461
-G T -486
-P o -2439
-P g -2439
-P e -2439
-P a -2439
-C A -975
-C . -975
-C , -975
-D A -975
-D W -1461
-B T -975
-B Y -2439
-B . -1950
-B , -1950
-F J -1461
-A O -1461
-A G -1461
-A C -1461
-A U -1950
-A Q -1461
-W r -2439
-W y -2439
-W u -2439
-W O -2439
-W G -2439
-W C -2439
-W J -1461
-W Q -2439
-J A -1461
-J . -1461
-J , -1461
-U A -1461
-U . -2439
-U , -2439
-Q A -975
-Q W -1461
-f . -486
-f , -486
-T O -486
-T G -486
-T C -486
-T Q -486
-O X -1461
-G V -1461
-G Y -1950
-G W -1461
-G . -975
-G , -975
-P T -486
-P V -486
-P Y -486
-C T -486
-C V -486
-C Y -486
-D X -1461
-B V -1950
-B X -1950
-B A -1461
-B W -1950
-S . -486
-S , -486
-F r -1950
-F y -1950
-F u -1950
-F O -1950
-F G -1950
-F C -1950
-F Q -1950
-X o -1950
-X e -1950
-X y -1950
-X O -1950
-X G -1950
-X C -1950
-X Q -1950
-A o -1461
-A e -1461
-Q X -1461
-K o -1950
-K e -1950
-K y -1950
-K w -1950
-K O -1950
-K G -1950
-K C -1950
-K Q -1950
-o v -975
-o y -975
-o x -486
-o w -975
-h v -975
-h y -975
-n v -975
-n y -975
-m v -975
-m y -975
-r g -1461
-g . -486
-g , -486
-p v -975
-p y -975
-p x -486
-c v -975
-c y -975
-c w -975
-v o -486
-v g -975
-v c -486
-v d -486
-v a -486
-v q -486
-e v -975
-e y -975
-b v -975
-b y -975
-b w -975
-s . -486
-s , -486
-y o -486
-y g -975
-y c -486
-y d -486
-y a -486
-y q -486
-f g -486
-x o -486
-x g -486
-x c -486
-x e -486
-x d -486
-x a -486
-x q -486
-w o -486
-w g -975
-w c -486
-w d -486
-w a -486
-w q -486
-T i -486
-T S -486
-R o -975
-R y -1461
-R O -975
-R G -975
-R C -975
-R U -1461
-R Q -975
-G X -975
-G A -975
-P s -1461
-P Z -486
-P X -486
-P W -486
-C X -486
-C W -486
-V i -486
-V S -486
-S T -486
-S V -1461
-S Y -1461
-S X -486
-S A -486
-S W -1461
-Y i -486
-Y S -486
-X a -975
-X u -975
-X S -486
-A t -975
-A g -486
-A c -1461
-A d -1461
-A a -975
-A u -975
-A q -1461
-A S -1461
-W i -486
-W S -486
-J y -486
-K c -1461
-K u -975
-K S -975
-t g -975
-t . -486
-t , -486
-o f -486
-h w -975
-n w -975
-m w -975
-r o -975
-r c -975
-r e -975
-r d -975
-r a -975
-r q -975
-g g -975
-p f -486
-p w -975
-c f -486
-c x -486
-v e -486
-v s -486
-e f -486
-e x -486
-e w -975
-b f -486
-y e -486
-y s -486
-w e -486
-w s -486
-k g -486
-k v -975
-k y -975
-k w -975
-R e -975
-R a -975
-R u -975
-R S -975
-P t -975
-P h -486
-P n -975
-P l -486
-P r -975
-P i -975
-P y -975
-P u -975
-P O -975
-P H -486
-P N -486
-P M -486
-P L -486
-P R -486
-P G -975
-P I -486
-P P -486
-P C -975
-P E -486
-P D -486
-P B -486
-P S -975
-P F -486
-P U -975
-P Q -975
-P K -486
-E t -975
-E o -975
-E g -975
-E c -975
-E v -975
-E e -975
-E d -975
-E y -975
-E f -975
-E a -975
-E w -975
-E u -975
-E q -975
-E O -975
-E G -975
-E C -975
-E S -975
-E J -486
-E Q -975
-E . -486
-E , -486
-B Z -486
-B J -486
-F i -486
-F j -486
-F S -486
-J o -486
-J i -486
-J e -486
-J a -486
-J u -486
-J T -486
-J O -486
-J H -486
-J N -486
-J M -486
-J L -486
-J R -486
-J G -486
-J I -486
-J P -486
-J C -486
-J V -486
-J E -486
-J Z -486
-J D -486
-J B -486
-J S -486
-J Y -486
-J F -486
-J X -486
-J W -486
-J J -486
-J U -975
-J Q -486
-J K -486
-U g -975
-U J -486
-K a -975
-t o -486
-t c -486
-t e -486
-t d -486
-t s -486
-t a -486
-t q -486
-o g -486
-o z -486
-h g -486
-h f -486
-n g -486
-n f -486
-m g -486
-m f -486
-l g -486
-r s -486
-g o -486
-g c -486
-g e -486
-g d -486
-g s -486
-g a -486
-g q -486
-i g -486
-p g -486
-p z -486
-c g -486
-c z -486
-v t -486
-v h -486
-v n -486
-v m -486
-v r -486
-v i -486
-v p -486
-v z -486
-v b -486
-v y -486
-v f -486
-v x -486
-v w -486
-v j -486
-v u -486
-v k -486
-e g -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z a -486
-z q -486
-d g -486
-b g -486
-b z -486
-s g -486
-y t -486
-y h -486
-y n -486
-y m -486
-y l -486
-y r -486
-y i -486
-y p -486
-y v -486
-y z -486
-y b -486
-y y -486
-y f -486
-y x -486
-y w -486
-y j -486
-y u -486
-y k -486
-a g -486
-w t -486
-w h -486
-w n -486
-w m -486
-w l -486
-w r -486
-w i -486
-w p -486
-w v -486
-w z -486
-w b -486
-w y -486
-w f -486
-w x -486
-w w -486
-w j -486
-w u -486
-w k -486
-j g -486
-u g -486
-q g -486
-k f -486
-T U -486
-O g -486
-M g -486
-I g -486
-C U -486
-V U -486
-E n -486
-E m -486
-E l -486
-E r -486
-E i -486
-E p -486
-E z -486
-E b -486
-E s -486
-E x -486
-E j -486
-E k -486
-E T -486
-E H -486
-E N -486
-E M -486
-E L -486
-E R -486
-E I -486
-E P -486
-E V -486
-E E -486
-E Z -486
-E D -486
-E B -486
-E Y -486
-E F -486
-E X -486
-E A -486
-E W -486
-E U -975
-E K -486
-B o -486
-B h -486
-B l -486
-B r -486
-B i -486
-B e -486
-B y -486
-B a -486
-B u -486
-B O -486
-B H -486
-B N -486
-B M -486
-B L -486
-B R -486
-B G -486
-B I -486
-B P -486
-B C -486
-B E -486
-B D -486
-B B -486
-B S -486
-B F -486
-B U -975
-B Q -486
-B K -486
-Y U -486
-F U -486
-X U -486
-A b -486
-A f -486
-W U -486
-U t -486
-U o -486
-U h -486
-U n -486
-U m -486
-U l -486
-U r -486
-U i -486
-U p -486
-U c -486
-U v -486
-U e -486
-U z -486
-U d -486
-U b -486
-U s -486
-U y -486
-U f -486
-U x -486
-U a -486
-U w -486
-U j -486
-U q -486
-U k -486
-U T -486
-U O -486
-U H -486
-U N -486
-U M -486
-U L -486
-U R -486
-U G -486
-U I -486
-U P -486
-U C -486
-U V -486
-U E -486
-U Z -486
-U D -486
-U B -486
-U S -486
-U Y -486
-U F -486
-U X -486
-U W -486
-U U -975
-U Q -486
-U K -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -975
-L cq -1950
-L ' -1950
-T char173 -486
-T hy -486
-T - -486
-T en -486
-T em -486
-A cq -2439
-A ' -2439
-char173 T -486
-hy T -486
-- T -486
-en T -486
-em T -486
-Y char173 -1950
-Y hy -1950
-Y - -1950
-Y en -1950
-Y em -1950
-p cq -1950
-p ' -1950
-c cq -1461
-c ' -1461
-e cq -1950
-e ' -1950
-b cq -1950
-b ' -1950
-V char173 -1950
-V hy -1950
-V - -1950
-V en -1950
-V em -1950
-h cq -975
-h ' -975
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-R cq -1461
-R ' -1461
-W char173 -2439
-W hy -2439
-W - -2439
-W en -2439
-W em -2439
-cq d -1461
-' d -1461
-F char173 -1950
-F hy -1950
-F - -1950
-F en -1950
-F em -1950
-X char173 -1950
-X hy -1950
-X - -1950
-X en -1950
-X em -1950
-A char173 -1461
-A hy -1461
-A - -1461
-A en -1461
-A em -1461
-K char173 -1950
-K hy -1950
-K - -1950
-K en -1950
-K em -1950
-cq s -486
-' s -486
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -975
-hy A -975
-- A -975
-en X -1461
-en A -975
-em X -1461
-R char173 -975
-R hy -975
-R - -975
-R en -975
-R em -975
-K cq -486
-K ' -486
-t g -975
-v cq -486
-v ' -486
-b f -486
-y cq -486
-y ' -486
-w cq -486
-w ' -486
-k cq -975
-k ' -975
-P cq -486
-P ' -486
-P char173 -975
-P hy -975
-P - -975
-P en -975
-P em -975
-E cq -486
-E ' -486
-E char173 -975
-E hy -975
-E - -975
-E en -975
-E em -975
-B cq -486
-B ' -486
-J cq -486
-J ' -486
-J char173 -486
-J hy -486
-J - -486
-J en -486
-J em -486
-U cq -486
-U ' -486
-v char173 -486
-v hy -486
-v - -486
-v en -486
-v em -486
-y char173 -486
-y hy -486
-y - -486
-y en -486
-y em -486
-w char173 -486
-w hy -486
-w - -486
-w en -486
-w em -486
-B char173 -486
-B hy -486
-B - -486
-B en -486
-B em -486
-U char173 -486
-U hy -486
-U - -486
-U en -486
-U em -486
-char173 g -486
-hy g -486
-- g -486
-en g -486
-em g -486
-charset
-! 8781,18225,330,1170,-693,899 2 3617
-dq 12684,18225,0,945,-4194,899 2 3618
-" "
-sh 13173,18225,687,2103,-75,899 2 3619
-# "
-Do 13173,19686,2730,1710,507,899 2 3620
-$ "
-% 23418,18894,1026,0,-3054 2 3621
-& 20490,18225,330,0,-321 2 3622
-cq 8781,18225,0,1434,-3582,899 2 51751
-' "
-( 8781,18225,4845,3531,-2058,899 2 3624
-) 8781,18225,4845,0,2067 2 3625
-* 13173,18225,0,927,-1581,899 2 3626
-+ 23418,15750,0,0,-2994 0 3627
-, 8781,2835,3360,0,648 0 3628
-char173 8781,7155,0,468,153,468 0 3629
-hy "
-- "
-. 8781,2685,330,0,-633 0 3630
-sl 8781,18225,330,3183,801,899 2 3631
-/ "
-0 13173,18225,330,1938,237,899 2 3632
-1 13173,18225,0,0,165 2 3633
-2 13173,18225,0,876,567,876 2 3634
-3 13173,18225,330,1020,645,899 2 3635
-4 13173,18225,0,1773,618,899 2 3636
-5 13173,17895,330,1362,1008,899 2 3637
-6 13173,18480,330,2085,147,899 2 3638
-7 13173,17895,330,4029,-1494,899 2 3639
-8 13173,18225,330,1827,306,899 2 3640
-9 13173,18225,570,1785,447,899 2 3641
-: 8781,11988,330,501,-633,501 0 3642
-; 8781,11988,3360,0,1074 0 3643
-< 26346,16068,0,0,-3981 0 3644
-= 23418,10875,0,0,-3183 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 13173,18225,330,1362,-2850,899 2 3647
-at 23418,16980,3654,750,-228,750 2 3648
-@ "
-A 16101,18225,0,33,2700,33 2 3649
-B 16101,17895,0,1116,1701,899 2 3650
-C 17565,18225,330,2700,-873,899 2 3651
-D 19029,17895,0,594,2298,594 2 3652
-E 16101,17895,0,2091,1800,899 2 3653
-F 15126,17895,0,3180,1725,899 2 3654
-G 19029,18225,330,2301,-606,899 2 3655
-H 19029,17895,0,3057,1614,899 2 3656
-I 8781,17895,0,3165,1716,899 2 3657
-J 11709,17895,330,2847,1797,899 2 3658
-K 17565,17895,0,3273,1425,899 2 3659
-L 14637,17895,0,1023,2487,899 2 3660
-M 21954,17895,0,2712,1983,899 2 3661
-N 17565,17895,330,3843,1578,899 2 3662
-O 19029,18225,330,1356,-492,899 2 3663
-P 16101,17895,0,1950,1116,899 2 3664
-Q 19029,18225,4761,1215,-351,899 2 3665
-R 16101,17895,0,1041,1926,899 2 3666
-S 13173,18225,330,2190,609,899 2 3667
-T 14637,17895,0,3939,-90,899 2 3668
-U 19029,17895,330,3246,-1635,899 2 3669
-V 16101,17895,330,4185,-1170,899 2 3670
-W 21954,17895,330,4353,-822,899 2 3671
-X 16101,17895,0,3276,2067,899 2 3672
-Y 14637,17895,0,4533,-1086,899 2 3673
-Z 14637,17895,0,2856,1710,899 2 3674
-lB 8781,17895,4380,4026,1575,899 2 3675
-[ "
-rs 8781,18225,330,0,-2229 2 3676
-\ "
-rB 8781,17895,4380,1938,3663,899 2 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,899 3 3679
-oq 8781,18225,0,1422,-3570,899 2 51808
-` "
-a 13173,12669,330,759,1044,759 0 3681
-b 13173,18300,330,732,1038,732 2 3682
-c 11709,12669,330,1275,318,899 0 3683
-d 13173,18300,330,2283,1065,899 2 3684
-e 11709,12669,330,1011,444,899 0 3685
-f 7317,18300,5655,5346,5535,899 3 3686
-g 13173,12669,5655,813,1281,813 1 3687
-h 13173,18300,330,750,1188,750 2 3688
-i 7317,18369,330,1002,435,899 2 3689
-j 7317,18369,5655,1212,5187,899 3 3690
-k 11709,18300,330,1941,1422,899 2 3691
-l 7317,18300,330,1731,276,899 2 3692
-m 19029,12669,330,1080,1098,899 0 3693
-n 13173,12669,330,786,1053,786 0 3694
-o 13173,12669,330,771,732,771 0 3695
-p 13173,12669,5655,471,3981,471 1 3696
-q 13173,12669,5655,1377,651,899 1 3697
-r 10245,12669,0,2094,429,899 0 3698
-s 10245,12669,330,786,1116,786 0 3699
-t 7317,15339,330,1908,672,899 0 3700
-u 13173,12669,330,747,468,747 0 3701
-v 11709,12684,330,1404,399,899 0 3702
-w 17565,12669,330,1461,720,899 0 3703
-x 11709,12669,330,1134,2592,899 0 3704
-y 11709,12669,5655,561,2538,561 1 3705
-z 10245,12339,2163,1122,1815,899 0 3706
-lC 11709,19935,6210,3360,-1692,899 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 11709,19935,6210,0,2232 3 3709
-} "
-ti 26346,8952,0,0,-4029 0 51876
-char192 16101,23955,0,33,2700,33 2 3776
-`A "
-char194 16101,23955,0,1314,2700,899 2 3778
-^A "
-char200 16101,23955,0,2091,1800,899 2 3784
-`E "
-char202 16101,23955,0,2091,1800,899 2 3786
-^E "
-char203 16101,23085,0,2091,1800,899 2 3787
-:E "
-char206 8781,23955,0,3984,1716,899 2 3790
-^I "
-char207 8781,23085,0,4665,1716,899 2 3791
-:I "
-char180 13173,18399,0,141,-5400,141 2 3764
-aa "
-ga 13173,18399,0,0,-4314 2 3680
-a^ 13173,18399,0,0,-3453 2 3678
-^ "
-char168 13173,17124,0,624,-4002,624 2 3752
-ad "
-a~ 13173,17145,0,990,-3309,899 2 3710
-~ "
-char217 19029,23955,330,3246,-1635,899 2 3801
-`U "
-char219 19029,23955,330,3246,-1635,899 2 3803
-^U "
-char221 14637,23955,0,4533,-1086,899 2 3805
-'Y "
-char253 11709,18399,5655,561,2538,561 3 3837
-'y "
-char176 13173,18225,0,543,-3522,543 2 3760
-de "
-char199 17565,18225,5019,2700,-873,899 2 3783
-,C "
-char231 11709,12669,4785,1275,636,899 0 3815
-,c "
-char209 17565,23079,330,3843,1578,899 2 3793
-~N "
-char241 13173,17145,330,990,1053,899 2 3825
-~n "
-char161 8781,12231,6324,33,444,33 1 3745
-r! "
-char191 13173,12312,6243,0,663 1 3775
-r? "
-char164 13173,15684,0,1779,228,899 0 3748
-Cs "
-char163 13173,17895,330,3153,1971,899 2 3747
-Po "
-char165 13173,17895,0,4170,-15,899 2 3749
-Ye "
-char167 13173,18225,4200,447,-1359,447 2 3751
-sc "
-Fn 13173,18300,5655,2388,2691,899 3 51871
-char162 13173,17034,0,996,-777,899 2 3746
-ct "
-char226 13173,18399,330,759,1044,759 2 3810
-^a "
-char234 11709,18399,330,1761,444,899 2 3818
-^e "
-char244 13173,18399,330,771,732,771 2 3828
-^o "
-char251 13173,18399,330,747,468,747 2 3835
-^u "
-char225 13173,18399,330,759,1044,759 2 3809
-'a "
-char233 11709,18399,330,1011,444,899 2 3817
-'e "
-char243 13173,18399,330,771,732,771 2 3827
-'o "
-char250 13173,18399,330,747,468,747 2 3834
-'u "
-char224 13173,18399,330,759,1044,759 2 3808
-`a "
-char232 11709,18399,330,1011,444,899 2 3816
-`e "
-char242 13173,18399,330,771,732,771 2 3826
-`o "
-char249 13173,18399,330,747,468,747 2 3833
-`u "
-char228 13173,17124,330,759,1044,759 2 3812
-:a "
-char235 11709,17124,330,1356,444,899 2 3819
-:e "
-char246 13173,17124,330,1074,732,899 2 3830
-:o "
-char252 13173,17124,330,747,468,747 2 3836
-:u "
-char197 16101,23865,0,525,2700,525 2 3781
-oA "
-char238 7317,18399,330,2907,420,899 2 3822
-^i "
-char216 19029,18255,330,2082,234,899 2 3800
-/O "
-char198 23418,17895,0,2961,1959,899 2 3782
-AE "
-char229 13173,18309,330,759,1044,759 2 3813
-oa "
-char237 7317,18399,330,3069,420,899 2 3821
-'i "
-char248 13173,12738,336,1491,1443,899 0 3832
-/o "
-char230 17565,12669,330,933,771,899 0 3814
-ae "
-char196 16101,23085,0,2055,2700,899 2 3780
-:A "
-char236 7317,18399,330,1383,420,899 2 3820
-`i "
-char214 19029,23085,330,1356,-492,899 2 3798
-:O "
-char220 19029,23085,330,3246,-1635,899 2 3804
-:U "
-char201 16101,23955,0,2091,1800,899 2 3785
-'E "
-char239 7317,17124,330,3552,420,899 2 3823
-:i "
-char223 13173,18300,5655,1131,5829,899 3 3807
-ss "
-char212 19029,23955,330,1356,-492,899 2 3796
-^O "
-char193 16101,23955,0,1914,2700,899 2 3777
-'A "
-char195 16101,23079,0,2580,2700,899 2 3779
-~A "
-char227 13173,17145,330,990,1044,899 2 3811
-~a "
-char208 19029,17895,0,594,2298,594 2 3792
--D "
-char240 13173,18300,330,2040,732,899 2 3824
-Sd "
-char205 8781,23955,0,5124,1716,899 2 3789
-'I "
-char204 8781,23955,0,3165,1716,899 2 3788
-`I "
-char211 19029,23955,330,1356,-492,899 2 3795
-'O "
-char210 19029,23955,330,1356,-492,899 2 3794
-`O "
-char213 19029,23079,330,1356,-492,899 2 3797
-~O "
-char245 13173,17145,330,1665,732,899 2 3829
-~o "
-vS 13173,23955,330,2268,609,899 2 51795
-vs 10245,18399,330,2472,1116,899 2 51827
-char218 19029,23955,330,3246,-1635,899 2 3802
-'U "
-:Y 14637,23085,0,4533,-1086,899 2 51801
-char255 11709,17124,5655,561,2538,561 3 3839
-:y "
-char222 16101,17895,0,813,1107,813 2 3806
-TP "
-char254 13173,18300,5655,471,3981,471 3 3838
-Tp "
-char181 14637,10800,5595,612,585,612 1 3765
-char182 13173,19635,4200,1650,-1308,899 2 3766
-ps "
-char190 23418,18225,330,0,-2985 2 3774
-34 "
-\- 23418,8610,0,0,-3027 0 51757
-char188 23418,18225,330,0,-2472 2 3772
-14 "
-char189 23418,18225,330,0,-1632 2 3773
-12 "
-char170 13173,18225,0,1119,-1827,899 2 3754
-Of "
-char186 13173,18225,0,1503,-2640,899 2 3770
-Om "
-char171 12198,10095,0,501,330,501 0 3755
-Fo "
-char187 12198,10095,0,336,495,336 0 3771
-Fc "
-char177 23418,15750,2625,0,-2949 0 3761
-char166 13173,19083,5916,0,-4596 3 3750
-bb "
-char169 13173,19725,0,5355,-3531,899 2 3753
-co "
-char172 23418,12165,0,0,-3045 0 3756
-no "
-char174 13173,19725,0,5355,-3531,899 2 3758
-rg "
-char178 9270,18060,0,1602,-555,899 2 3762
-S2 "
-char179 9270,18060,0,1980,-771,899 2 3763
-S3 "
-char184 13173,0,4785,0,-96 0 3768
-ac "
-char185 9270,18060,0,1146,-1233,899 2 3769
-S1 "
-char215 23418,14658,0,0,-3630 0 3799
-char247 23418,14010,0,0,-2958 0 3831
-char183 8781,9945,0,0,-2400 0 3767
-pc "
-fm 8781,18225,0,852,-3669,852 2 51873
-sd 13173,18225,0,612,-3669,612 2 51874
-dg 13173,18225,4200,1470,-1434,899 2 51755
-tm 16101,17550,0,5841,-3492,899 2 51796
-ah 13173,18399,0,1908,-5382,899 2 51935
-ao 13173,18309,0,0,-5421 2 51930
-f/ 3402,18225,330,8451,6846,899 2 51759
-em 23418,6900,0,345,153,345 0 51789
-en 13173,6900,0,393,153,393 0 51790
-dd 13173,18225,4200,1056,-1020,899 2 51773
-.i 7317,12669,330,120,420,120 0 51957
-aq 8781,18225,0,585,-3807,585 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 17565,23955,330,2700,-873,899 2 20166
-'c 11709,18399,330,2199,318,899 2 20198
-lq 13173,18225,0,1320,-3570,899 2 51838
-rq 13173,18225,0,1332,-3582,899 2 51746
-Bq 13173,3039,3156,0,453 0 51772
-vz 10245,18399,2163,1872,1815,899 2 51834
-fi 13173,18300,5655,534,5772,534 3 51881
-fl 13173,18300,5655,1773,5736,899 3 51882
-ff 14148,18300,5655,5796,5352,899 3 51883
-Fi 20004,18300,5655,672,5466,672 3 51884
-Fl 20004,18300,5655,1851,5418,899 3 51885
-ij 13173,18369,5655,1212,435,899 3 51958
-bq 8781,3039,3156,0,-582 0 51756
-%0 32202,18894,1026,0,-3135 2 51901
-char175 13173,15819,0,867,-4257,867 0 3759
-a- "
-ab 13173,18339,0,1122,-4281,899 2 51926
-a. 13173,17124,0,0,-6222 2 51927
-oe 17565,12669,330,1107,711,899 0 51823
-OE 24882,18225,330,2016,978,899 2 51791
-fo 7317,10095,0,939,333,899 0 51886
-fc 7317,10095,0,774,498,774 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 14637,17895,0,1023,2487,899 2 51944
-/l 7317,18300,330,1749,654,899 2 51960
-a" 13173,18399,0,3321,-4644,899 2 51933
-ho 13173,564,3186,0,-3846 0 51934
-vZ 14637,23955,0,2856,1710,899 2 51802
-IJ 21465,17895,330,1872,1716,899 2 51942
diff --git a/contrib/groff/font/devlj4/TR b/contrib/groff/font/devlj4/TR
deleted file mode 100644
index 64a12437fd2d..000000000000
--- a/contrib/groff/font/devlj4/TR
+++ /dev/null
@@ -1,878 +0,0 @@
-name TR
-spacewidth 7806
-pcltypeface 4101
-pclproportional 1
-pclweight 0
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -3903
-P . -3903
-P , -3903
-V A -5364
-A V -5364
-T o -3414
-T r -1950
-T c -3414
-T e -2925
-T d -2925
-T s -2925
-T y -1950
-T a -3414
-T w -1950
-T u -1950
-T J -1461
-L T -2925
-L Y -3903
-Y o -4878
-Y e -4389
-Y a -4878
-Y J -1461
-A W -4878
-W A -4878
-T A -2925
-V o -3903
-V e -3903
-V a -3903
-Y A -4389
-F A -3903
-F . -3903
-F , -3903
-A T -2925
-A Y -4389
-v . -3414
-v , -3414
-y . -3414
-y , -3414
-T . -2925
-T , -2925
-L W -3414
-P A -3903
-V J -1461
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -3414
-W e -3414
-W a -3414
-W . -3903
-W , -3903
-r . -2439
-r , -2439
-w . -3414
-w , -3414
-Y u -3414
-A v -3414
-A y -3414
-A w -3414
-o . -1461
-o , -1461
-p . -1461
-p , -1461
-e . -975
-e , -975
-b . -1461
-b , -1461
-O T -1950
-O V -2925
-O Y -2925
-O . -2925
-O , -2925
-L y -1461
-P J -1461
-V y -2925
-V u -2925
-V O -2925
-V G -2925
-V C -2925
-V Q -2925
-D T -1950
-D V -2925
-D Y -2925
-D . -2925
-D , -2925
-Y O -2925
-Y G -2925
-Y C -2925
-Y Q -2925
-F o -1461
-F e -1461
-F a -1461
-c . -1461
-c , -1461
-O A -2439
-O W -2439
-R T -2439
-R V -2439
-R Y -2439
-R W -2439
-G T -1950
-P o -1461
-P g -1461
-P e -975
-P a -1461
-C A -1950
-C . -1950
-C , -1950
-D A -2439
-D W -2439
-B T -1950
-B Y -1950
-B . -1950
-B , -1950
-F J -1461
-A O -2439
-A G -2439
-A C -2439
-A U -2439
-A Q -2439
-W r -2439
-W y -2439
-W u -2439
-W O -2439
-W G -2439
-W C -2439
-W J -1461
-W Q -2439
-J A -2439
-J . -2439
-J , -2439
-U A -2439
-U . -2439
-U , -2439
-Q A -2439
-Q W -2439
-T O -1950
-T G -1950
-T C -1950
-T Q -1950
-O X -1461
-G V -1950
-G Y -1950
-G W -1950
-G . -1461
-G , -1461
-C T -975
-C V -975
-C Y -975
-D X -1461
-B V -1950
-B X -1461
-B A -1950
-B W -1950
-S . -1461
-S , -1461
-F r -486
-F y -486
-F u -486
-F O -486
-F G -486
-F C -486
-F Q -486
-X o -1461
-X e -975
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1461
-A e -975
-Q X -1461
-K o -1461
-K e -975
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -1461
-o y -1461
-o x -975
-o w -1461
-h v -975
-h y -975
-n v -975
-n y -975
-m v -975
-m y -975
-r g -975
-g . -975
-g , -975
-p v -975
-p y -975
-p x -975
-c v -1461
-c y -1461
-c w -1461
-v o -1461
-v g -1461
-v c -1461
-v d -1461
-v a -1461
-v q -1461
-e v -975
-e y -975
-b v -1461
-b y -1461
-b w -1461
-s . -975
-s , -975
-y o -1461
-y g -1461
-y c -1461
-y d -1461
-y a -1461
-y q -1461
-f g -486
-x o -975
-x g -486
-x c -975
-x e -975
-x d -975
-x a -975
-x q -975
-a v -1461
-a y -1461
-a w -1461
-w o -1461
-w g -1461
-w c -1461
-w d -1461
-w a -1461
-w q -1461
-T i -1461
-T S -1461
-R o -1461
-R y -1461
-R O -1461
-R G -1461
-R C -1461
-R U -1461
-R Q -1461
-G X -1461
-G A -1461
-P s -975
-C X -975
-C W -975
-V i -1461
-V S -1461
-S T -486
-S V -486
-S Y -486
-S X -486
-S A -1461
-S W -486
-Y i -1461
-Y S -1461
-X a -975
-X u -975
-X S -486
-A t -975
-A g -486
-A c -1461
-A d -1461
-A a -975
-A u -975
-A q -1461
-A S -486
-W i -1461
-W S -1461
-J y -486
-K c -1461
-K u -975
-K S -486
-t g -486
-o f -975
-h w -975
-n w -975
-m w -975
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-g g -975
-p f -975
-p w -975
-c f -975
-c x -975
-v e -975
-v s -975
-e f -975
-e x -975
-e w -975
-b f -975
-s v -975
-s y -975
-s f -975
-s x -975
-s w -975
-y e -975
-y s -975
-f o -975
-f c -975
-f e -975
-f d -975
-f s -975
-f a -975
-f q -975
-x s -975
-w e -975
-w s -975
-k o -486
-k g -486
-k c -486
-k e -486
-k d -486
-k a -486
-k q -486
-O Z -486
-N . -486
-N , -486
-R e -975
-R a -975
-R u -975
-R S -486
-G Z -486
-C Z -486
-E g -486
-Z o -486
-Z e -486
-Z d -486
-Z s -486
-Z y -486
-Z a -486
-Z w -486
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z J -486
-Z Q -486
-D Z -486
-B Z -486
-S Z -486
-F i -486
-F j -486
-F S -486
-X J -486
-A s -975
-A J -486
-J o -486
-J i -486
-J e -486
-J a -486
-J u -486
-J O -486
-J G -486
-J C -486
-J S -486
-J J -486
-J Q -486
-U g -486
-K a -975
-K J -486
-o g -486
-o z -486
-h g -486
-n g -486
-m g -486
-l g -486
-r s -486
-g o -486
-g c -486
-g e -486
-g d -486
-g s -486
-g a -486
-g q -486
-i g -486
-p g -486
-p z -486
-c g -486
-c z -486
-e g -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z s -486
-z a -486
-z q -486
-d g -486
-b g -486
-b z -486
-s g -486
-s z -486
-a g -486
-j g -486
-u g -486
-q g -486
-k s -486
-O g -486
-N A -486
-M g -486
-R J -486
-I g -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -3903
-L ' -3903
-T char173 -1950
-T hy -1950
-T - -1950
-T en -1950
-T em -1950
-A cq -3903
-A ' -3903
-char173 T -1950
-hy T -1950
-- T -1950
-en T -1950
-em T -1950
-Y char173 -3414
-Y hy -3414
-Y - -3414
-Y en -3414
-Y em -3414
-p cq -975
-p ' -975
-c cq -1461
-c ' -1461
-e cq -975
-e ' -975
-b cq -1461
-b ' -1461
-a cq -1461
-a ' -1461
-V char173 -2925
-V hy -2925
-V - -2925
-V en -2925
-V em -2925
-h cq -975
-h ' -975
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-R cq -1461
-R ' -1461
-W char173 -2439
-W hy -2439
-W - -2439
-W en -2439
-W em -2439
-cq d -1461
-' d -1461
-s cq -975
-s ' -975
-F char173 -486
-F hy -486
-F - -486
-F en -486
-F em -486
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1950
-A hy -1950
-A - -1950
-A en -1950
-A em -1950
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -975
-' s -975
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1950
-hy A -1950
-- A -1950
-en X -1461
-en A -1950
-em X -1461
-R char173 -1461
-R hy -1461
-R - -1461
-R en -1461
-R em -1461
-K cq -486
-K ' -486
-t g -486
-b f -975
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-J char173 -486
-J hy -486
-J - -486
-J en -486
-J em -486
-char173 g -486
-hy g -486
-- g -486
-en g -486
-em g -486
-charset
-! 8781,18225,330 2 3617
-dq 12198,18225 2 3618
-" "
-sh 13173,18225,837 2 3619
-# "
-Do 13173,19845,2370 2 3620
-$ "
-% 23418,18894,1026 2 3621
-& 20490,18225,330 2 3622
-cq 8781,18225 2 51751
-' "
-( 8781,18225,4845 2 3624
-) 8781,18225,4845 2 3625
-* 13173,18225 2 3626
-+ 23418,15750 0 3627
-, 8781,2565,4005 0 3628
-char173 8781,7155 0 3629
-hy "
-- "
-. 8781,2685,330 0 3630
-sl 8781,18225,330 2 3631
-/ "
-0 13173,18225,330 2 3632
-1 13173,18225 2 3633
-2 13173,18225 2 3634
-3 13173,18225,330 2 3635
-4 13173,18225 2 3636
-5 13173,17895,330 2 3637
-6 13173,18225,330 2 3638
-7 13173,17895 2 3639
-8 13173,18225,330 2 3640
-9 13173,18225,330 2 3641
-: 8781,12252,330 0 3642
-; 8781,12252,4005 0 3643
-< 26346,16068 0 3644
-= 23418,10875 0 3645
-> 26346,16068 0 3646
-? 11709,18225,330 2 3647
-at 23418,16980,3654 2 3648
-@ "
-A 19029,18225 2 3649
-B 16587,17895 2 3650
-C 18051,18225,330 2 3651
-D 19515,17895 2 3652
-E 16587,17895 2 3653
-F 15612,17895 2 3654
-G 19029,18225,330 2 3655
-H 19515,17895 2 3656
-I 8781,17895 2 3657
-J 10245,17895,330 2 3658
-K 18540,17895 2 3659
-L 16587,17895 2 3660
-M 23907,17895 2 3661
-N 19515,17895,330 2 3662
-O 19029,18225,330 2 3663
-P 15126,17895 2 3664
-Q 19029,18225,4605 2 3665
-R 17565,17895 2 3666
-S 14148,18225,330 2 3667
-T 16587,17895 2 3668
-U 19515,17895,330 2 3669
-V 19029,17895,330 2 3670
-W 24882,17895,330 2 3671
-X 19029,17895 2 3672
-Y 19029,17895 2 3673
-Z 17076,17895 2 3674
-lB 8781,17895,4380 2 3675
-[ "
-rs 8781,18225,330 2 3676
-\ "
-rB 8781,17895,4380 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 8781,18225 2 51808
-` "
-a 11709,12669,330 0 3681
-b 13173,18300,330 2 3682
-c 11709,12669,330 0 3683
-d 13173,18300,330 2 3684
-e 11709,12669,330 0 3685
-f 8781,18300 2 3686
-g 13173,12669,5655 1 3687
-h 13173,18300 2 3688
-i 7317,18534 2 3689
-j 7317,18534,5655 3 3690
-k 13173,18300 2 3691
-l 7317,18300 2 3692
-m 20490,12669 0 3693
-n 13173,12669 0 3694
-o 13173,12669,330 0 3695
-p 13173,12669,5655 1 3696
-q 13173,12669,5655 1 3697
-r 9759,12669 0 3698
-s 10245,12669,330 0 3699
-t 7317,15465,330 0 3700
-u 13173,12339,330 0 3701
-v 13173,12339,330 0 3702
-w 19029,12339,330 0 3703
-x 13173,12339 0 3704
-y 13173,12339,5655 1 3705
-z 11709,12339 0 3706
-lC 11709,19935,6210 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 11709,19935,6210 3 3709
-} "
-ti 26346,8952 0 51876
-char192 19029,23955 2 3776
-`A "
-char194 19029,23955 2 3778
-^A "
-char200 16587,23955 2 3784
-`E "
-char202 16587,23955 2 3786
-^E "
-char203 16587,23085 2 3787
-:E "
-char206 8781,23955 2 3790
-^I "
-char207 8781,23085 2 3791
-:I "
-char180 13173,18399 2 3764
-aa "
-ga 13173,18399 2 3680
-a^ 13173,18399 2 3678
-^ "
-char168 13173,17124 2 3752
-ad "
-a~ 13173,17064 2 3710
-~ "
-char217 19515,23955,330 2 3801
-`U "
-char219 19515,23955,330 2 3803
-^U "
-char221 19029,23955 2 3805
-'Y "
-char253 13173,18399,5655 3 3837
-'y "
-char176 13173,18225 2 3760
-de "
-char199 18051,18225,4908 2 3783
-,C "
-char231 11709,12669,4572 0 3815
-,c "
-char209 19515,23034,330 2 3793
-~N "
-char241 13173,17064 2 3825
-~n "
-char161 8781,12783,5772 1 3745
-r! "
-char191 11709,12783,5772 1 3775
-r? "
-char164 13173,15684 0 3748
-Cs "
-char163 13173,18225,330 2 3747
-Po "
-char165 13173,17895 2 3749
-Ye "
-char167 13173,18225,4230 2 3751
-sc "
-Fn 13173,18300,5655 3 51871
-char162 13173,16866 2 3746
-ct "
-char226 11709,18399,330 2 3810
-^a "
-char234 11709,18399,330 2 3818
-^e "
-char244 13173,18399,330 2 3828
-^o "
-char251 13173,18399,330 2 3835
-^u "
-char225 11709,18399,330 2 3809
-'a "
-char233 11709,18399,330 2 3817
-'e "
-char243 13173,18399,330 2 3827
-'o "
-char250 13173,18399,330 2 3834
-'u "
-char224 11709,18399,330 2 3808
-`a "
-char232 11709,18399,330 2 3816
-`e "
-char242 13173,18399,330 2 3826
-`o "
-char249 13173,18399,330 2 3833
-`u "
-char228 11709,17124,330 2 3812
-:a "
-char235 11709,17124,330 2 3819
-:e "
-char246 13173,17124,330 2 3830
-:o "
-char252 13173,17124,330 2 3836
-:u "
-char197 19029,23865 2 3781
-oA "
-char238 7317,18399 2 3822
-^i "
-char216 19029,18225,339 2 3800
-/O "
-char198 23418,17895 2 3782
-AE "
-char229 11709,18309,330 2 3813
-oa "
-char237 7317,18399 2 3821
-'i "
-char248 13173,12765,330 0 3832
-/o "
-char230 17565,12669,330 0 3814
-ae "
-char196 19029,23085 2 3780
-:A "
-char236 7317,18399 2 3820
-`i "
-char214 19029,23085,330 2 3798
-:O "
-char220 19515,23085,330 2 3804
-:U "
-char201 16587,23955 2 3785
-'E "
-char239 7317,17124 2 3823
-:i "
-char223 13173,18300,330 2 3807
-ss "
-char212 19029,23955,330 2 3796
-^O "
-char193 19029,23955 2 3777
-'A "
-char195 19029,23034 2 3779
-~A "
-char227 11709,17064,330 2 3811
-~a "
-char208 19515,17895 2 3792
--D "
-char240 13173,18456,330 2 3824
-Sd "
-char205 8781,23955 2 3789
-'I "
-char204 8781,23955 2 3788
-`I "
-char211 19029,23955,330 2 3795
-'O "
-char210 19029,23955,330 2 3794
-`O "
-char213 19029,23034,330 2 3797
-~O "
-char245 13173,17064,330 2 3829
-~o "
-vS 14148,23955,330 2 51795
-vs 10245,18399,330 2 51827
-char218 19515,23955,330 2 3802
-'U "
-:Y 19029,23085 2 51801
-char255 13173,17124,5655 3 3839
-:y "
-char222 15126,17895 2 3806
-TP "
-char254 13173,18300,5655 3 3838
-Tp "
-char181 14637,10800,5595 1 3765
-char182 13173,19635,4200 2 3766
-ps "
-char190 23418,18225,330 2 3774
-34 "
-\- 23418,8610 0 51757
-char188 23418,18225,330 2 3772
-14 "
-char189 23418,18225,330 2 3773
-12 "
-char170 13173,18225 2 3754
-Of "
-char186 13173,18225 2 3770
-Om "
-char171 10734,10095 0 3755
-Fo "
-char187 10734,10095 0 3771
-Fc "
-char177 23418,15750,2625 0 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19725 2 3753
-co "
-char172 23418,12165 0 3756
-no "
-char174 13173,19725 2 3758
-rg "
-char178 9270,18060 2 3762
-S2 "
-char179 9270,18060 2 3763
-S3 "
-char184 13173,258,4572 0 3768
-ac "
-char185 9270,18060 2 3769
-S1 "
-char215 23418,15117 0 3799
-char247 23418,14010 0 3831
-char183 8781,10407 0 3767
-pc "
-fm 8781,18225 2 51873
-sd 13173,18225 2 51874
-dg 13173,18225,4200 2 51755
-tm 16101,17550 2 51796
-ah 13173,18399 2 51935
-ao 13173,18309 2 51930
-f/ 3423,18225,330 2 51759
-em 23418,6900 0 51789
-en 13173,6900 0 51790
-dd 13173,18225,4200 2 51773
-.i 7317,12669 0 51957
-aq 8781,18225 2 3623
-bu 13173,14226 0 51889
-'C 18051,23955,330 2 20166
-'c 11709,18399,330 2 20198
-lq 13662,18231 2 51838
-rq 13662,18225 2 51746
-Bq 13662,3009,3576 0 51772
-vz 11709,18399 2 51834
-fi 14637,18300 2 51881
-fl 14637,18300 2 51882
-ff 15612,18300 2 51883
-Fi 21954,18300 2 51884
-Fl 21954,18300 2 51885
-ij 14637,18534,5655 3 51958
-bq 8781,3009,3561 0 51756
-%0 31713,18894,1026 2 51901
-char175 13173,16539 0 3759
-a- "
-ab 13173,17769 2 51926
-a. 13173,17124 2 51927
-oe 19029,12669,330 0 51823
-OE 23418,18225,330 2 51791
-fo 6831,10095 0 51886
-fc 6831,10095 0 51887
-sq 19029,15624 0 51899
-/L 16587,17895 2 51944
-/l 7317,18300 2 51960
-a" 13173,18399 2 51933
-ho 13173,750,3165 0 51934
-vZ 17076,23955 2 51802
-IJ 19245,17895,330 2 51942
diff --git a/contrib/groff/font/devlj4/UB b/contrib/groff/font/devlj4/UB
deleted file mode 100644
index 5c1717fbb9a9..000000000000
--- a/contrib/groff/font/devlj4/UB
+++ /dev/null
@@ -1,829 +0,0 @@
-name UB
-spacewidth 8781
-pcltypeface 4148
-pclproportional 1
-pclweight 3
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -3414
-P . -4878
-P , -4878
-V A -3414
-A V -3414
-T o -4389
-T r -4389
-T c -4389
-T e -4389
-T d -4389
-T s -4389
-T y -4389
-T a -4389
-T w -4389
-T u -4389
-T J -4389
-L T -4389
-L Y -3903
-Y o -3903
-Y e -3903
-Y a -3414
-Y J -3903
-A W -2439
-W A -2439
-T A -3414
-V o -2925
-V e -2925
-V a -2439
-Y A -3414
-F A -1950
-F . -3903
-F , -3903
-A T -3414
-A Y -3414
-v . -2439
-v , -2439
-y . -2439
-y , -2439
-T . -3903
-T , -3903
-L W -2439
-P A -2439
-V J -3414
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -1950
-W e -1950
-W a -1950
-W . -2925
-W , -2925
-r . -2439
-r , -2439
-w . -2439
-w , -2439
-Y u -2439
-A v -1950
-A y -1950
-A w -1950
-o . -1950
-o , -1950
-p . -1461
-p , -1461
-e . -1461
-e , -1461
-b . -1461
-b , -1461
-O T -1950
-O V -1461
-O Y -1950
-O . -2439
-O , -2439
-L y -1950
-L O -975
-L G -975
-L C -975
-L Q -975
-P J -1950
-V y -1461
-V u -1461
-V O -1461
-V G -1461
-V C -1461
-V Q -1461
-D T -2439
-D V -1461
-D Y -2439
-D . -2925
-D , -2925
-Y O -1950
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -486
-F e -486
-F a -486
-c . -1461
-c , -1461
-O A -1461
-O W -975
-L U -975
-R T -1461
-R V -1461
-R Y -1461
-R W -975
-G T -1461
-P o -1461
-P g -1461
-P e -1461
-P a -975
-C A -1461
-C . -1950
-C , -1950
-D A -1461
-D W -975
-B T -1461
-B Y -1461
-B . -1461
-B , -1461
-F J -975
-A O -1461
-A G -1461
-A C -1461
-A U -1461
-A Q -1461
-W r -975
-W y -975
-W u -975
-W O -975
-W G -975
-W C -975
-W J -2439
-W Q -975
-J A -1461
-J . -1950
-J , -1950
-U A -1461
-U . -2439
-U , -2439
-Q W -975
-f . -486
-f , -486
-T O -1950
-T G -1950
-T C -1950
-T Q -1950
-O X -1461
-L o -975
-L e -975
-L q -975
-G V -1461
-G Y -1461
-G W -975
-G . -1461
-G , -1461
-P T -975
-P V -975
-P Y -975
-C T -1461
-C V -1461
-C Y -1461
-D X -1461
-B V -1461
-B X -975
-B A -975
-B W -975
-S . -1950
-S , -1950
-X o -1461
-X e -1461
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1461
-A e -1461
-K o -1461
-K e -1461
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -975
-o y -975
-o x -975
-o w -975
-h v -975
-h y -975
-n v -975
-n y -975
-m v -975
-m y -975
-g . -486
-g , -486
-p v -975
-p y -975
-p x -975
-c v -975
-c y -975
-c w -975
-v o -975
-v g -975
-v c -975
-v d -975
-v a -975
-v q -975
-e v -975
-e y -975
-b v -975
-b y -975
-b w -975
-s . -975
-s , -975
-y o -975
-y g -975
-y c -975
-y d -975
-y a -975
-y q -975
-x o -975
-x c -975
-x e -975
-x d -975
-x a -486
-x q -975
-a v -975
-a y -975
-a w -975
-w o -975
-w g -975
-w c -975
-w d -975
-w a -975
-w q -975
-T S -1461
-L a -486
-L S -975
-G X -975
-G A -975
-P s -486
-P Z -975
-P X -975
-P W -975
-C X -1461
-C W -975
-C J -486
-V S -1461
-S T -1461
-S V -1461
-S Y -1461
-S X -1461
-S A -1461
-S W -975
-Y S -1461
-X a -486
-X u -975
-X S -975
-A t -486
-A c -1461
-A d -975
-A a -486
-A u -975
-A q -975
-A S -975
-W S -975
-K c -1461
-K u -975
-K S -975
-t . -486
-t , -486
-o f -486
-h w -975
-h . -486
-h , -486
-n w -975
-n . -486
-n , -486
-m w -975
-m . -486
-m , -486
-l . -486
-l , -486
-i . -486
-i , -486
-p f -486
-p w -975
-c f -486
-c x -975
-v e -975
-v s -486
-e f -486
-e x -975
-e w -975
-z . -486
-z , -486
-d . -486
-d , -486
-b f -486
-s v -486
-s y -486
-s f -486
-s x -486
-s w -486
-y e -975
-y s -486
-x s -486
-x . -486
-x , -486
-a . -486
-a , -486
-w e -975
-w s -486
-j . -486
-j , -486
-u . -486
-k o -975
-k c -975
-k e -975
-k d -975
-k a -486
-k q -975
-k . -486
-k , -486
-O Z -975
-O J -486
-H . -486
-H , -486
-N . -486
-N , -486
-M . -486
-M , -486
-L . -486
-L , -486
-R . -486
-R , -486
-G Z -975
-I . -486
-I , -486
-C Z -975
-E . -486
-E , -486
-Z o -975
-Z e -975
-Z d -975
-Z s -486
-Z y -975
-Z a -486
-Z w -975
-Z u -975
-Z O -975
-Z G -975
-Z C -975
-Z S -975
-Z Q -975
-Z . -486
-Z , -486
-D Z -975
-D J -486
-B Z -975
-B J -486
-S Z -975
-S J -486
-X . -486
-X , -486
-A s -486
-A . -486
-A , -486
-J J -486
-U J -486
-K a -486
-K . -486
-K , -486
-h f -486
-n f -486
-m f -486
-a f -486
-k s -486
-G J -486
-A f -486
-L cq -6342
-L ' -6342
-T char173 -4389
-T hy -4389
-T - -4389
-T en -4389
-T em -4389
-A cq -2439
-A ' -2439
-char173 T -4389
-hy T -4389
-- T -4389
-en T -4389
-em T -4389
-Y char173 -2439
-Y hy -2439
-Y - -2439
-Y en -2439
-Y em -2439
-p cq -1461
-p ' -1461
-c cq -975
-c ' -975
-e cq -1461
-e ' -1461
-b cq -1461
-b ' -1461
-a cq -975
-a ' -975
-V char173 -1461
-V hy -1461
-V - -1461
-V en -1461
-V em -1461
-h cq -975
-h ' -975
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-W char173 -975
-W hy -975
-W - -975
-W en -975
-W em -975
-cq d -2439
-' d -2439
-s cq -486
-s ' -486
-L char173 -975
-L hy -975
-L - -975
-L en -975
-L em -975
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1461
-A hy -1461
-A - -1461
-A en -1461
-A em -1461
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -1950
-' s -1950
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1461
-hy A -1461
-- A -1461
-en X -1461
-en A -1461
-em X -1461
-b f -486
-Z char173 -975
-Z hy -975
-Z - -975
-Z en -975
-Z em -975
-cq n -1461
-' n -1461
-cq m -1461
-' m -1461
-cq r -1461
-' r -1461
-cq v -1461
-' v -1461
-charset
-! 8781,18165 2 3617
-dq 13662,18135 2 3618
-" "
-sh 16587,18105 2 3619
-# "
-Do 16587,18750,645 2 3620
-$ "
-% 26346,18720,840 2 3621
-& 20004,18495 2 3622
-cq 8781,18135 2 51751
-' "
-( 8781,18135,2355 2 3624
-) 8781,18135,2355 2 3625
-* 16587,18495 2 3626
-+ 26346,14940 0 3627
-, 8781,3390,2355 0 3628
-char173 8781,7875 0 3629
-hy "
-- "
-. 8781,3390 0 3630
-sl 8781,18495,885 2 3631
-/ "
-0 16587,18465,360 2 3632
-1 16587,18105 2 3633
-2 16587,18465 2 3634
-3 16587,18465,360 2 3635
-4 16587,18105 2 3636
-5 16587,18105,360 2 3637
-6 16587,18465,360 2 3638
-7 16587,18105 2 3639
-8 16587,18465,360 2 3640
-9 16587,18465,360 2 3641
-: 8781,12627 0 3642
-; 8781,12627,2355 0 3643
-< 26346,16068 0 3644
-= 26346,10563 0 3645
-> 26346,16068 0 3646
-? 13662,18315 2 3647
-at 26346,21057,2679 2 3648
-@ "
-A 19515,18135 2 3649
-B 16587,18135 2 3650
-C 18540,18495,360 2 3651
-D 19029,18135 2 3652
-E 15126,18135 2 3653
-F 14637,18135 2 3654
-G 19515,18495,360 2 3655
-H 19029,18135 2 3656
-I 7317,18135 2 3657
-J 14637,18135,360 2 3658
-K 17565,18135 2 3659
-L 14148,18135 2 3660
-M 23907,18135 2 3661
-N 19029,18135 2 3662
-O 20004,18495,360 2 3663
-P 15612,18135 2 3664
-Q 20490,18495,360 2 3665
-R 17076,18135 2 3666
-S 17076,18495,360 2 3667
-T 16587,18135 2 3668
-U 19029,18135,360 2 3669
-V 19029,18135 2 3670
-W 26346,18135 2 3671
-X 19029,18135 2 3672
-Y 18051,18135 2 3673
-Z 16101,18135 2 3674
-lB 8781,18135,2355 2 3675
-[ "
-rs 8781,18495,885 2 3676
-\ "
-rB 8781,18135,2355 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 8781,18135 2 51808
-` "
-a 14148,12990,360 0 3681
-b 15126,18165,360 2 3682
-c 14148,12990,360 0 3683
-d 15126,18165,360 2 3684
-e 14148,12990,360 0 3685
-f 9759,18315 2 3686
-g 15126,12990,5313 1 3687
-h 15126,18165 2 3688
-i 6342,18165 2 3689
-j 6342,18165,4995 3 3690
-k 14148,18165 2 3691
-l 6342,18165 2 3692
-m 22932,12990 0 3693
-n 15126,12990 0 3694
-o 15126,12990,360 0 3695
-p 15126,12990,4680 0 3696
-q 15126,12990,4680 0 3697
-r 9270,13005 0 3698
-s 13173,12990,360 0 3699
-t 9759,16110,360 0 3700
-u 15126,12630,360 0 3701
-v 14637,12630 0 3702
-w 22932,12630 0 3703
-x 14637,12630 0 3704
-y 14637,12630,4680 0 3705
-z 12684,12630 0 3706
-lC 13173,20130,6075 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 13173,20130,6075 3 3709
-} "
-ti 26346,9435 0 51876
-char192 19515,23130 2 3776
-`A "
-char194 19515,23130 2 3778
-^A "
-char200 15126,23130 2 3784
-`E "
-char202 15126,23130 2 3786
-^E "
-char203 15126,23040 2 3787
-:E "
-char206 7317,23130 2 3790
-^I "
-char207 7317,23040 2 3791
-:I "
-char180 16587,18090 2 3764
-aa "
-ga 16587,18090 2 3680
-a^ 16587,18090 2 3678
-^ "
-char168 16587,17910 2 3752
-ad "
-a~ 16587,17946 2 3710
-~ "
-char217 19029,23130,360 2 3801
-`U "
-char219 19029,23130,360 2 3803
-^U "
-char221 18051,23130 2 3805
-'Y "
-char253 14637,18090,4680 2 3837
-'y "
-char176 16587,18465 2 3760
-de "
-char199 18540,18495,5175 3 3783
-,C "
-char231 14148,12990,5160 1 3815
-,c "
-char209 19029,23130 2 3793
-~N "
-char241 15126,17946 2 3825
-~n "
-char161 8781,12645,5520 1 3745
-r! "
-char191 13662,12480,5835 1 3775
-r? "
-char164 16587,15834 0 3748
-Cs "
-char163 16587,18465 2 3747
-Po "
-char165 16587,18105 2 3749
-Ye "
-char167 16587,18495,360 2 3751
-sc "
-Fn 16587,18315 2 51871
-char162 16587,18750,645 2 3746
-ct "
-char226 14148,18090,360 2 3810
-^a "
-char234 14148,18090,360 2 3818
-^e "
-char244 15126,18090,360 2 3828
-^o "
-char251 15126,18090,360 2 3835
-^u "
-char225 14148,18090,360 2 3809
-'a "
-char233 14148,18090,360 2 3817
-'e "
-char243 15126,18090,360 2 3827
-'o "
-char250 15126,18090,360 2 3834
-'u "
-char224 14148,18090,360 2 3808
-`a "
-char232 14148,18090,360 2 3816
-`e "
-char242 15126,18090,360 2 3826
-`o "
-char249 15126,18090,360 2 3833
-`u "
-char228 14148,17910,360 2 3812
-:a "
-char235 14148,17910,360 2 3819
-:e "
-char246 15126,17910,360 2 3830
-:o "
-char252 15126,17910,360 2 3836
-:u "
-char197 19515,25830 2 3781
-oA "
-char238 6342,18090 2 3822
-^i "
-char216 20004,18495,366 2 3800
-/O "
-char198 25857,18135 2 3782
-AE "
-char229 14148,20100,360 2 3813
-oa "
-char237 6342,18090 2 3821
-'i "
-char248 15126,13047,360 0 3832
-/o "
-char230 22443,12990,360 0 3814
-ae "
-char196 19515,23040 2 3780
-:A "
-char236 6342,18090 2 3820
-`i "
-char214 20004,23040,360 2 3798
-:O "
-char220 19029,23040,360 2 3804
-:U "
-char201 15126,23130 2 3785
-'E "
-char239 6342,17910 2 3823
-:i "
-char223 16101,17790,360 2 3807
-ss "
-char212 20004,23130,360 2 3796
-^O "
-char193 19515,23130 2 3777
-'A "
-char195 19515,23130 2 3779
-~A "
-char227 14148,17946,360 2 3811
-~a "
-char208 19029,18135 2 3792
--D "
-char240 15126,18747,360 2 3824
-Sd "
-char205 7317,23130 2 3789
-'I "
-char204 7317,23130 2 3788
-`I "
-char211 20004,23130,360 2 3795
-'O "
-char210 20004,23130,360 2 3794
-`O "
-char213 20004,23130,360 2 3797
-~O "
-char245 15126,17946,360 2 3829
-~o "
-vS 17076,23130,360 2 51795
-vs 13173,18090,360 2 51827
-char218 19029,23130,360 2 3802
-'U "
-:Y 18051,23040 2 51801
-char255 14637,17910,4680 2 3839
-:y "
-char222 15612,18135 2 3806
-TP "
-char254 15126,18165,4680 2 3838
-Tp "
-char181 15612,12630,4680 0 3765
-char182 16590,19635,4200 2 3766
-ps "
-char190 26346,18465,900 2 3774
-34 "
-\- 26346,8445 0 51757
-char188 26346,18465,900 2 3772
-14 "
-char189 26346,18465,900 2 3773
-12 "
-char170 10734,18465 2 3754
-Of "
-char186 10734,18465 2 3770
-Om "
-char171 14637,11250 0 3755
-Fo "
-char187 14637,11250 0 3771
-Fc "
-char177 26346,14670 0 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19635 2 3753
-co "
-char172 26346,11787 0 3756
-no "
-char174 13173,19635 2 3758
-rg "
-char178 10245,18465 2 3762
-S2 "
-char179 10245,18465 2 3763
-S3 "
-char184 16587,195033,5160 3 3768
-ac "
-char185 10245,18345 2 3769
-S1 "
-char215 26346,14154 0 3799
-char247 26346,12870 0 3831
-char183 8781,10740 0 3767
-pc "
-fm 8781,18054 2 51873
-sd 16587,18054 2 51874
-dg 16587,18135 2 51755
-tm 16128,17850 2 51796
-ah 16587,18090 2 51935
-ao 16587,20100 2 51930
-f/ 1464,18465,900 2 51759
-em 26346,7650 0 51789
-en 16587,7650 0 51790
-dd 16587,18135 2 51773
-.i 6342,12630 0 51957
-aq 8781,18135 2 3623
-bu 13173,14226 0 51889
-'C 18540,23130,360 2 20166
-'c 14148,18090,360 2 20198
-lq 13173,18135 2 51838
-rq 13173,18135 2 51746
-Bq 13173,3348,2292 0 51772
-vz 12684,18090 2 51834
-fi 16101,18315 2 51881
-fl 16101,18315 2 51882
-ff 18051,18315 2 51883
-Fi 24396,18315 2 51884
-Fl 24396,18315 2 51885
-ij 12684,18165,4995 3 51958
-bq 8781,3348,2307 0 51756
-%0 26346,18720,840 2 51901
-char175 16587,16950 2 3759
-a- "
-ab 16587,18147 2 51926
-a. 16587,18405 2 51927
-oe 23907,12990,360 0 51823
-OE 26346,18270,135 2 51791
-fo 9759,11277 0 51886
-fc 9759,11277 0 51887
-sq 19029,15624 0 51899
-/L 14148,18135 2 51944
-/l 7320,18165 2 51960
-a" 16587,18090 2 51933
-ho 16587,1197,4299 0 51934
-vZ 16101,23130 2 51802
-IJ 21954,18135,360 2 51942
diff --git a/contrib/groff/font/devlj4/UBI b/contrib/groff/font/devlj4/UBI
deleted file mode 100644
index 00ffcfcb4850..000000000000
--- a/contrib/groff/font/devlj4/UBI
+++ /dev/null
@@ -1,779 +0,0 @@
-name UBI
-spacewidth 8781
-slant 16.750000
-pcltypeface 4148
-pclproportional 1
-pclweight 3
-pclstyle 1
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2925
-P . -4389
-P , -4389
-V A -2439
-A V -2925
-T o -3903
-T r -2925
-T c -3414
-T e -3414
-T d -3414
-T s -2925
-T y -3414
-T a -3414
-T w -3414
-T u -2925
-T J -2925
-L T -3414
-L Y -3903
-Y o -3414
-Y e -3414
-Y a -3414
-Y J -2925
-A W -2925
-W A -975
-T A -2925
-V o -1950
-V e -1950
-V a -1950
-Y A -2925
-F A -1950
-F . -1950
-F , -1950
-A T -3414
-A Y -3414
-v . -1950
-v , -1950
-y . -1461
-y , -1461
-T . -2925
-T , -2925
-L W -2925
-P A -1950
-V J -1950
-V . -2439
-V , -2439
-Y . -2925
-Y , -2925
-W o -1461
-W e -975
-W a -975
-W . -975
-W , -975
-r . -1461
-r , -1461
-w . -1461
-w , -1461
-Y u -2439
-A v -1461
-A y -1461
-A w -1461
-o . -975
-o , -975
-p . -975
-p , -975
-e . -975
-e , -975
-b . -975
-b , -975
-O T -2925
-O V -1950
-O Y -1950
-O . -1950
-O , -1950
-L y -1461
-L O -2925
-L G -2925
-L C -2925
-L Q -2925
-P J -1461
-V y -1461
-V u -975
-V O -975
-V G -975
-V C -975
-V Q -975
-D T -2925
-D V -1950
-D Y -1950
-D . -2439
-D , -2439
-Y O -1950
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -975
-F e -975
-F a -975
-c . -975
-c , -975
-O A -975
-O W -1461
-L U -2439
-R T -975
-R V -975
-R Y -975
-R W -975
-G T -2439
-P o -975
-P g -486
-P e -975
-P a -975
-C A -975
-C . -1461
-C , -1461
-D A -1461
-D W -1461
-B T -2439
-B Y -1950
-B . -486
-B , -486
-F J -975
-A O -1950
-A G -1950
-A C -1950
-A U -1950
-A Q -1950
-W r -486
-W y -975
-W u -486
-W O -486
-W G -486
-W C -486
-W J -975
-W Q -486
-U A -975
-U . -1950
-U , -1950
-Q W -1461
-T O -1950
-T G -1950
-T C -1950
-T Q -1950
-O X -1461
-L o -1461
-L e -1461
-L q -1461
-G V -1950
-G Y -1950
-G W -1461
-P T -1950
-P V -1950
-P Y -1950
-C T -1950
-C V -1950
-C Y -1950
-D X -1461
-B V -1950
-B X -486
-B A -486
-B W -1461
-S . -975
-S , -975
-F y -486
-X o -1461
-X e -1461
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1461
-A e -1461
-K o -1461
-K e -1461
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -975
-o y -1461
-o x -975
-o w -1461
-h v -486
-h y -975
-n v -486
-n y -975
-m v -486
-m y -975
-p v -486
-p y -975
-p x -975
-c v -486
-c y -975
-c w -975
-v o -975
-v g -486
-v c -486
-v d -486
-v a -486
-v q -486
-e v -486
-e y -975
-b v -975
-b y -1461
-b w -1461
-y o -975
-y g -486
-y c -975
-y d -975
-y a -975
-y q -975
-x o -975
-x c -975
-x e -975
-x d -975
-x a -975
-x q -975
-a v -486
-a y -975
-a w -975
-w o -975
-w g -486
-w c -486
-w d -486
-w a -486
-w q -486
-T S -975
-L a -975
-L S -1461
-R o -486
-R y -486
-P Z -1461
-P X -1461
-P W -1461
-C X -1461
-C W -1461
-V S -975
-S T -1461
-S V -1461
-S Y -1461
-S X -975
-S A -975
-S W -1461
-Y S -975
-X a -975
-X u -975
-X S -975
-A t -1461
-A c -1461
-A d -975
-A a -975
-A u -975
-A q -1461
-A S -1461
-W S -486
-J y -486
-K c -1461
-K u -975
-K S -975
-o f -486
-h w -975
-n w -975
-m w -975
-r o -486
-p w -975
-c x -975
-v e -486
-e x -975
-e w -975
-b f -486
-s v -486
-s y -975
-s w -975
-y e -975
-f o -486
-w e -486
-k o -975
-k c -486
-k v -486
-k e -486
-k d -486
-k y -486
-k a -486
-k w -486
-k q -486
-O Z -486
-P y -486
-C Z -486
-E o -486
-E v -486
-E y -486
-E w -486
-Z o -975
-Z e -975
-Z d -975
-Z y -486
-Z a -975
-Z w -486
-D Z -975
-D J -486
-B Z -486
-S Z -486
-A s -486
-J o -486
-K a -975
-t o -486
-o t -486
-o g -486
-o z -486
-o j -486
-g o -486
-v y -486
-v w -486
-z o -486
-b t -486
-b g -486
-b z -486
-b j -486
-y v -486
-y y -486
-y w -486
-x v -486
-x y -486
-x w -486
-w v -486
-w y -486
-w w -486
-C o -486
-C y -486
-B o -486
-B y -486
-U o -486
-U v -486
-U y -486
-U w -486
-L cq -6342
-L ' -6342
-T char173 -2925
-T hy -2925
-T - -2925
-T en -2925
-T em -2925
-A cq -2439
-A ' -2439
-char173 T -3414
-hy T -3414
-- T -3414
-en T -3414
-em T -3414
-Y char173 -2439
-Y hy -2439
-Y - -2439
-Y en -2439
-Y em -2439
-p cq -975
-p ' -975
-c cq -1461
-c ' -1461
-e cq -1461
-e ' -1461
-b cq -1461
-b ' -1461
-a cq -1461
-a ' -1461
-V char173 -975
-V hy -975
-V - -975
-V en -975
-V em -975
-h cq -1461
-h ' -1461
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-W char173 -486
-W hy -486
-W - -486
-W en -486
-W em -486
-cq d -2439
-' d -2439
-s cq -486
-s ' -486
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1950
-A hy -1950
-A - -1950
-A en -1950
-A em -1950
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -1461
-' s -1461
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -975
-hy A -975
-- A -975
-en X -1461
-en A -975
-em X -1461
-b f -486
-cq n -1461
-' n -1461
-cq m -1461
-' m -1461
-cq r -1461
-' r -1461
-cq v -1950
-' v -1950
-charset
-! 8781,18165,0,2643,33,1012 2 3617
-dq 14148,18135,0,1890,-3297,1012 2 3618
-" "
-sh 16587,18105,0,1677,-99,1012 2 3619
-# "
-Do 16587,18738,630,495,-1428,495 2 3620
-$ "
-% 26346,18720,840,0,-2070 2 3621
-& 20004,18495,360,54,-231,54 2 3622
-cq 8781,18135,0,3414,-2601,1012 2 51751
-' "
-( 8781,18135,2445,3198,-834,1012 2 3624
-) 8781,18135,2445,180,2184,180 2 3625
-* 16587,18582,0,0,-3291 2 3626
-+ 26346,14940,0,0,-4728 0 3627
-, 8781,3255,2580,0,1794 0 3628
-char173 8781,7737,0,624,270,624 0 3629
-hy "
-- "
-. 8781,3255,0,0,453 0 3630
-sl 8781,18135,1470,4308,2982,1012 2 3631
-/ "
-0 16587,18465,360,1398,-357,1012 2 3632
-1 16587,18105,0,0,-3771 2 3633
-2 16587,18465,0,984,414,984 2 3634
-3 16587,18465,360,1794,363,1012 2 3635
-4 16587,18105,0,1389,1245,1012 2 3636
-5 16587,18105,360,2424,-39,1012 2 3637
-6 16587,18465,360,2316,-345,1012 2 3638
-7 16587,18105,0,1770,-1455,1012 2 3639
-8 16587,18465,360,1776,435,1012 2 3640
-9 16587,18465,360,1464,369,1012 2 3641
-: 8781,12612,0,540,453,540 0 3642
-; 8781,12612,2580,732,1794,732 0 3643
-< 26346,16068,0,0,-3981 0 3644
-= 26346,10563,0,0,-5079 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 13662,18315,0,1908,-951,1012 2 3647
-at 26346,21057,2679,1164,-888,1012 2 3648
-@ "
-A 19515,18135,0,0,2535 2 3649
-B 16587,18135,0,1848,1233,1012 2 3650
-C 18540,18495,360,1737,-633,1012 2 3651
-D 19029,18135,0,924,1227,924 2 3652
-E 15126,18135,0,3285,1188,1012 2 3653
-F 14637,18135,0,3723,1200,1012 2 3654
-G 19515,18495,360,1380,-786,1012 2 3655
-H 19029,18135,0,2856,1161,1012 2 3656
-I 7317,18135,0,3219,1521,1012 2 3657
-J 14637,18135,360,3054,1341,1012 2 3658
-K 17565,18135,0,3273,534,1012 2 3659
-L 14148,18135,0,0,1185 2 3660
-M 23907,18135,0,2730,1281,1012 2 3661
-N 19029,18135,0,2883,1248,1012 2 3662
-O 20004,18495,360,969,-705,969 2 3663
-P 15612,18135,0,2871,1203,1012 2 3664
-Q 20490,18495,360,531,-714,531 2 3665
-R 17076,18135,0,2247,1200,1012 2 3666
-S 17076,18495,360,1797,117,1012 2 3667
-T 16587,18135,0,3990,-2166,1012 2 3668
-U 19029,18135,360,2898,-384,1012 2 3669
-V 19029,18135,0,4005,-2604,1012 2 3670
-W 26346,18135,0,3900,-2478,1012 2 3671
-X 19029,18135,0,3222,1893,1012 2 3672
-Y 18051,18135,0,3942,-2616,1012 2 3673
-Z 16101,18135,0,3348,1491,1012 2 3674
-lB 8781,18135,2445,4068,1977,1012 2 3675
-[ "
-rs 8781,18135,1470,540,-1632,540 2 3676
-\ "
-rB 8781,18135,2445,2919,3126,1012 2 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,1012 3 3679
-oq 8781,18135,0,2880,-2067,1012 2 51808
-` "
-a 14148,12990,360,651,978,651 0 3681
-b 15126,18165,360,498,1566,498 2 3682
-c 14148,12990,360,903,411,903 0 3683
-d 15126,18165,360,3291,477,1012 2 3684
-e 14148,12990,360,924,600,924 0 3685
-f 9759,18315,0,4158,297,1012 2 3686
-g 15126,12990,5187,1683,2037,1012 1 3687
-h 15126,18165,0,684,1527,684 2 3688
-i 6342,18165,0,3591,1872,1012 2 3689
-j 6342,18165,4995,3681,5787,1012 3 3690
-k 14148,18165,0,2109,1359,1012 2 3691
-l 6342,18165,0,3579,1839,1012 2 3692
-m 22932,12990,0,609,1551,609 0 3693
-n 15126,12990,0,729,1482,729 0 3694
-o 15126,12990,360,492,465,492 0 3695
-p 15126,12990,4680,531,2868,531 1 3696
-q 15126,12990,4680,1671,471,1012 1 3697
-r 9270,12990,0,2751,1533,1012 0 3698
-s 13173,12990,360,984,1026,984 0 3699
-t 9759,16146,360,2166,-522,1012 0 3700
-u 15126,12630,360,1557,666,1012 0 3701
-v 14637,12630,0,2502,-837,1012 0 3702
-w 22932,12630,0,2004,-1311,1012 0 3703
-x 14637,12630,0,2088,2364,1012 0 3704
-y 14637,12630,4680,2472,-528,1012 1 3705
-z 12684,12630,0,1701,1482,1012 0 3706
-lC 13173,20130,6075,3600,-1356,1012 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 13173,20130,6075,0,3360 3 3709
-} "
-ti 26346,9435,0,0,-4029 0 51876
-char192 19515,23220,0,0,2535 2 3776
-`A "
-char194 19515,23220,0,0,2535 2 3778
-^A "
-char200 15126,23220,0,3285,1188,1012 2 3784
-`E "
-char202 15126,23220,0,3285,1188,1012 2 3786
-^E "
-char203 15126,22830,0,3285,1188,1012 2 3787
-:E "
-char206 7317,23220,0,5631,1521,1012 2 3790
-^I "
-char207 7317,22830,0,6792,1521,1012 2 3791
-:I "
-char180 16587,18105,0,360,-7359,360 2 3764
-aa "
-ga 16587,18105,0,0,-6009 2 3680
-a^ 16587,18105,0,0,-4518 2 3678
-^ "
-char168 16587,18180,0,693,-5457,693 2 3752
-ad "
-a~ 16587,17994,0,771,-5169,771 2 3710
-~ "
-char217 19029,23220,360,2898,-384,1012 2 3801
-`U "
-char219 19029,23220,360,2898,-384,1012 2 3803
-^U "
-char221 18051,23220,0,3942,-2616,1012 2 3805
-'Y "
-char253 14637,18105,4680,2472,-528,1012 3 3837
-'y "
-char176 16587,18465,0,0,-3642 2 3760
-de "
-char199 18540,18495,5409,1737,-633,1012 3 3783
-,C "
-char231 14148,12990,5046,903,411,903 1 3815
-,c "
-char209 19029,23124,0,2883,1248,1012 2 3793
-~N "
-char241 15126,17994,0,1503,1482,1012 2 3825
-~n "
-char161 8781,12651,5514,432,2244,432 1 3745
-r! "
-char191 13662,12486,5829,0,1398 1 3775
-r? "
-char164 16587,15834,0,753,-774,753 0 3748
-Cs "
-char163 16587,18465,0,2046,663,1012 2 3747
-Po "
-char165 16587,18105,0,4872,-30,1012 2 3749
-Ye "
-char167 16587,18495,360,0,-2661 2 3751
-sc "
-Fn 16587,18315,0,1008,-3099,1008 2 51871
-char162 16587,18750,630,678,-1458,678 2 3746
-ct "
-char226 14148,18105,360,651,978,651 2 3810
-^a "
-char234 14148,18105,360,924,600,924 2 3818
-^e "
-char244 15126,18105,360,492,465,492 2 3828
-^o "
-char251 15126,18105,360,1557,666,1012 2 3835
-^u "
-char225 14148,18105,360,1581,978,1012 2 3809
-'a "
-char233 14148,18105,360,1581,600,1012 2 3817
-'e "
-char243 15126,18105,360,1092,465,1012 2 3827
-'o "
-char250 15126,18105,360,1557,666,1012 2 3834
-'u "
-char224 14148,18105,360,651,978,651 2 3808
-`a "
-char232 14148,18105,360,924,600,924 2 3816
-`e "
-char242 15126,18105,360,492,465,492 2 3826
-`o "
-char249 15126,18105,360,1557,666,1012 2 3833
-`u "
-char228 14148,18180,360,1914,978,1012 2 3812
-:a "
-char235 14148,18180,360,1914,600,1012 2 3819
-:e "
-char246 15126,18180,360,1425,465,1012 2 3830
-:o "
-char252 15126,18180,360,1557,666,1012 2 3836
-:u "
-char197 19515,25830,0,0,2535 2 3781
-oA "
-char238 6342,18105,0,4479,1860,1012 2 3822
-^i "
-char216 20004,18495,360,2802,1200,1012 2 3800
-/O "
-char198 25857,18135,0,3294,2781,1012 2 3782
-AE "
-char229 14148,20100,360,651,978,651 2 3813
-oa "
-char237 6342,18105,0,5484,1860,1012 2 3821
-'i "
-char248 15126,12990,360,1764,1686,1012 0 3832
-/o "
-char230 22443,12990,360,840,906,840 0 3814
-ae "
-char196 19515,22830,0,693,2535,693 2 3780
-:A "
-char236 6342,18105,0,2136,1860,1012 2 3820
-`i "
-char214 20004,22830,360,969,-705,969 2 3798
-:O "
-char220 19029,22830,360,2898,-384,1012 2 3804
-:U "
-char201 15126,23220,0,3285,1188,1012 2 3785
-'E "
-char239 6342,18180,0,5817,1860,1012 2 3823
-:i "
-char223 16101,18315,360,795,1515,795 2 3807
-ss "
-char212 20004,23220,360,969,-705,969 2 3796
-^O "
-char193 19515,23220,0,0,2535 2 3777
-'A "
-char195 19515,23124,0,1020,2535,1012 2 3779
-~A "
-char227 14148,17994,360,1992,978,1012 2 3811
-~a "
-char208 19029,18135,0,924,1227,924 2 3792
--D "
-char240 15126,18693,360,492,465,492 2 3824
-Sd "
-char205 7317,23220,0,5907,1521,1012 2 3789
-'I "
-char204 7317,23220,0,3219,1521,1012 2 3788
-`I "
-char211 20004,23220,360,969,-705,969 2 3795
-'O "
-char210 20004,23220,360,969,-705,969 2 3794
-`O "
-char213 20004,23124,360,969,-705,969 2 3797
-~O "
-char245 15126,17994,360,1503,465,1012 2 3829
-~o "
-vS 17076,23220,360,2220,117,1012 2 51795
-vs 13173,18105,360,2985,1026,1012 2 51827
-char218 19029,23220,360,2898,-384,1012 2 3802
-'U "
-:Y 18051,22830,0,3942,-2616,1012 2 51801
-char255 14637,18180,4680,2472,-528,1012 3 3839
-:y "
-char222 15612,18135,0,1857,1209,1012 2 3806
-TP "
-char254 15126,18165,4680,516,2856,516 3 3838
-Tp "
-char181 15612,12630,4680,1422,2907,1012 1 3765
-char182 16590,19635,4200,0,-2529 2 3766
-ps "
-char190 26346,18465,990,0,-2625 2 3774
-34 "
-\- 26346,8445,0,0,-4746 0 51757
-char188 26346,18465,990,0,-2682 2 3772
-14 "
-char189 26346,18465,990,0,-3168 2 3773
-12 "
-char170 10734,18465,0,2211,-1464,1012 2 3754
-Of "
-char186 10734,18465,0,2520,-1473,1012 2 3770
-Om "
-char171 14637,11115,0,1530,180,1012 0 3755
-Fo "
-char187 14637,11115,0,243,1467,243 0 3771
-Fc "
-char177 26346,14670,0,0,-4695 0 3761
-char166 13173,19083,5916,0,-4596 3 3750
-bb "
-char169 13173,19635,0,4881,-3090,1012 2 3753
-co "
-char172 26346,11787,0,0,-4329 0 3756
-no "
-char174 13173,19635,0,4881,-3090,1012 2 3758
-rg "
-char178 10245,18465,0,2217,-933,1012 2 3762
-S2 "
-char179 10245,18465,0,2439,-957,1012 2 3763
-S3 "
-char184 16587,195102,5046,0,-1809 3 3768
-ac "
-char185 10245,18345,0,1083,-2880,1012 2 3769
-S1 "
-char215 26346,14154,0,0,-5958 0 3799
-char247 26346,12870,0,0,-4767 0 3831
-char183 8781,10692,0,276,-2055,276 0 3767
-pc "
-fm 8781,18105,0,2145,-2916,1012 2 51873
-sd 16587,18105,0,0,-2916 2 51874
-dg 16587,18135,0,0,-2718 2 51755
-tm 16101,17850,0,2421,-2958,1012 2 51796
-ah 16587,18105,0,1278,-6441,1012 2 51935
-ao 16587,20100,0,0,-7413 2 51930
-f/ 2439,18465,990,9276,7884,1012 2 51759
-em 26346,7620,0,0,-2226 0 51789
-en 16587,7620,0,72,-372,72 0 51790
-dd 16587,18135,0,0,-2718 2 51773
-.i 6342,12630,0,1857,1860,1012 0 51957
-aq 8781,18135,0,2100,-3297,1012 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 18540,23220,360,1737,-633,1012 2 20166
-'c 14148,18105,360,1581,411,1012 2 20198
-lq 13173,18135,0,3480,-1524,1012 2 51838
-rq 13173,18135,0,4002,-2046,1012 2 51746
-Bq 13173,3234,2241,0,2283 0 51772
-vz 12684,18105,0,3231,1482,1012 2 51834
-fi 16101,18315,0,3693,-33,1012 2 51881
-fl 16101,18315,0,3678,-132,1012 2 51882
-ff 18051,18315,0,4557,-114,1012 2 51883
-Fi 24396,18315,0,3795,-126,1012 2 51884
-Fl 24396,18315,0,3666,-42,1012 2 51885
-ij 12684,18165,4995,3681,1872,1012 3 51958
-bq 8781,3234,2241,0,1878 0 51756
-%0 26346,18720,840,696,51,696 2 51901
-char175 16587,17778,0,102,-5931,102 2 3759
-a- "
-ab 16587,18147,0,771,-5874,771 2 51926
-a. 16587,18222,0,0,-7887 2 51927
-oe 23907,12990,360,525,258,525 0 51823
-OE 26346,18270,135,3186,-819,1012 2 51791
-fo 9759,11142,0,1299,-1029,1012 0 51886
-fc 9759,11142,0,27,243,27 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 14148,18135,0,0,1692 2 51944
-/l 7320,18165,0,3519,1320,1012 2 51960
-a" 16587,18105,0,3672,-5376,1012 2 51933
-ho 16587,279,4248,0,-6180 0 51934
-vZ 16101,23220,0,3348,1491,1012 2 51802
-IJ 21954,18135,360,3054,1521,1012 2 51942
diff --git a/contrib/groff/font/devlj4/UCB b/contrib/groff/font/devlj4/UCB
deleted file mode 100644
index 286427895da3..000000000000
--- a/contrib/groff/font/devlj4/UCB
+++ /dev/null
@@ -1,790 +0,0 @@
-name UCB
-spacewidth 5856
-pcltypeface 4148
-pclproportional 1
-pclweight 3
-pclstyle 4
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2925
-P . -4389
-P , -4389
-V A -1950
-A V -1950
-T o -2925
-T r -2925
-T c -2925
-T e -2925
-T d -2925
-T s -2925
-T y -2925
-T a -2925
-T w -2925
-T u -2925
-T J -3414
-L T -2925
-L Y -2925
-Y o -2925
-Y e -2925
-Y a -2439
-Y J -3414
-A W -1461
-W A -1461
-T A -2439
-V o -1461
-V e -1461
-V a -1461
-Y A -2439
-F A -1461
-F . -2925
-F , -2925
-A T -2439
-A Y -2439
-v . -1461
-v , -1461
-y . -1461
-y , -1461
-T . -2925
-T , -2925
-L W -1461
-P A -1461
-V J -1950
-V . -2925
-V , -2925
-Y . -2925
-Y , -2925
-W o -975
-W e -975
-W a -975
-W . -1461
-W , -1461
-r . -1461
-r , -1461
-w . -975
-w , -975
-Y u -1461
-A v -1461
-A y -975
-A w -975
-o . -1461
-o , -1461
-p . -975
-p , -975
-e . -975
-e , -975
-b . -975
-b , -975
-O T -1461
-O V -486
-O Y -1461
-O . -1461
-O , -1461
-L y -975
-L O -1461
-L G -1950
-L C -1461
-L Q -1461
-P J -1950
-V y -486
-V u -486
-V O -486
-V G -486
-V C -486
-V Q -486
-D T -1950
-D V -486
-D Y -1461
-D . -1950
-D , -1950
-Y O -1461
-Y G -1461
-Y C -1461
-Y Q -1461
-F o -975
-F e -975
-F a -975
-c . -975
-c , -975
-O A -975
-O W -486
-L U -1461
-R T -975
-R V -486
-R Y -975
-R W -486
-G T -1461
-P o -1461
-P g -1461
-P e -1461
-P a -975
-C A -975
-C . -1461
-C , -1461
-D A -975
-D W -486
-B T -1461
-B Y -1461
-B . -1461
-B , -1461
-F J -1461
-A O -975
-A G -975
-A C -975
-A U -975
-A Q -975
-W r -486
-W y -486
-W u -486
-W O -486
-W G -486
-W C -486
-W J -1461
-W Q -486
-J A -975
-J . -1461
-J , -1461
-U A -975
-U . -1461
-U , -1461
-Q W -486
-f . -486
-f , -486
-T O -1461
-T G -1950
-T C -1461
-T Q -1461
-O X -1461
-L o -1461
-L e -1461
-L q -975
-G V -486
-G Y -1461
-G W -486
-P T -975
-P V -486
-P Y -975
-C T -1461
-C V -486
-C Y -1461
-D X -1461
-B V -486
-B X -1461
-B A -975
-B W -486
-S . -975
-S , -975
-X o -1461
-X e -1461
-X y -975
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -975
-A e -975
-K o -1461
-K e -1461
-K y -975
-K w -975
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -486
-o y -486
-o x -486
-o w -486
-h v -486
-h y -486
-n v -486
-n y -486
-m v -486
-m y -486
-r g -486
-p v -486
-p y -486
-p x -486
-c v -486
-c y -486
-c w -486
-v o -486
-v g -486
-v c -486
-v d -486
-v a -486
-v q -486
-e v -486
-e y -486
-b v -486
-b y -486
-b w -486
-s . -486
-s , -486
-y o -486
-y g -486
-y c -486
-y d -486
-y a -486
-y q -486
-f g -486
-x o -486
-x c -486
-x e -486
-x d -486
-x a -486
-x q -486
-a v -486
-a y -486
-a w -486
-w o -486
-w g -486
-w c -486
-w d -486
-w a -486
-w q -486
-T S -975
-L a -486
-L S -975
-P s -975
-P Z -975
-P X -975
-P W -486
-C X -1461
-C W -486
-C J -486
-V S -486
-S T -975
-S V -486
-S Y -975
-S X -975
-S A -975
-S W -486
-Y S -975
-X a -486
-X u -975
-X S -975
-A t -975
-A c -975
-A d -975
-A a -486
-A u -975
-A q -975
-A S -975
-W S -486
-K c -1461
-K u -975
-K S -975
-o f -486
-h w -486
-n w -486
-m w -486
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-p f -486
-p w -486
-c f -486
-c x -486
-v e -486
-v s -486
-e f -486
-e x -486
-e w -486
-b f -486
-s v -486
-s y -486
-s f -486
-s x -486
-s w -486
-y e -486
-y s -486
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-x s -486
-w e -486
-w s -486
-k o -975
-k c -975
-k e -975
-k d -975
-k a -486
-k q -975
-O Z -486
-O J -486
-L J -486
-C Z -486
-E J -486
-Z o -1461
-Z e -1461
-Z d -975
-Z s -975
-Z y -486
-Z a -486
-Z w -486
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z J -486
-Z Q -486
-D Z -486
-D J -486
-B Z -486
-B J -486
-S Z -486
-S J -486
-X J -486
-A s -975
-A J -486
-J J -486
-U J -486
-K a -486
-K J -486
-h f -486
-n f -486
-m f -486
-r s -486
-a f -486
-k s -975
-R J -486
-G J -486
-A f -486
-L cq -4389
-L ' -4389
-T char173 -2925
-T hy -2925
-T - -2925
-T en -2925
-T em -2925
-A cq -1461
-A ' -1461
-char173 T -2925
-hy T -2925
-- T -2925
-en T -2925
-em T -2925
-Y char173 -1461
-Y hy -1461
-Y - -1461
-Y en -1461
-Y em -1461
-p cq -1461
-p ' -1461
-c cq -975
-c ' -975
-e cq -1461
-e ' -1461
-b cq -1461
-b ' -1461
-a cq -975
-a ' -975
-V char173 -486
-V hy -486
-V - -486
-V en -486
-V em -486
-h cq -975
-h ' -975
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-W char173 -486
-W hy -486
-W - -486
-W en -486
-W em -486
-cq d -975
-' d -975
-s cq -975
-s ' -975
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -975
-A hy -975
-A - -975
-A en -975
-A em -975
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -975
-' s -975
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -975
-hy A -975
-- A -975
-en X -1461
-en A -975
-em X -1461
-b f -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-charset
-! 7806,18135 2 3617
-dq 10734,18135 2 3618
-" "
-sh 12684,18360,825 2 3619
-# "
-Do 12684,18705,765 2 3620
-$ "
-% 17565,18765,900 2 3621
-& 16587,18390,255 2 3622
-cq 5856,18135 2 51751
-' "
-( 5856,18135,2430 2 3624
-) 5856,18135,2430 2 3625
-* 12684,18495 2 3626
-+ 17565,12810 0 3627
-, 5856,3465,2430 0 3628
-char173 5856,7710 0 3629
-hy "
-- "
-. 5856,3330 0 3630
-sl 5856,18165,2430 2 3631
-/ "
-0 12684,18360,255 2 3632
-1 12684,18105 2 3633
-2 12684,18360 2 3634
-3 12684,18360,255 2 3635
-4 12684,18105 2 3636
-5 12684,18105,255 2 3637
-6 12684,18360,255 2 3638
-7 12684,18105 2 3639
-8 12684,18360,255 2 3640
-9 12684,18360,255 2 3641
-: 5856,12378 0 3642
-; 5856,12378,2430 0 3643
-< 26346,16068 0 3644
-= 17565,9792 0 3645
-> 26346,16068 0 3646
-? 11709,18390 2 3647
-at 17565,18357,3219 2 3648
-@ "
-A 14637,18135 2 3649
-B 14148,18135 2 3650
-C 13662,18390,255 2 3651
-D 14637,18135 2 3652
-E 12198,18135 2 3653
-F 11709,18135 2 3654
-G 14637,18390,255 2 3655
-H 14637,18135 2 3656
-I 6831,18135 2 3657
-J 12684,18135,255 2 3658
-K 14148,18135 2 3659
-L 11220,18135 2 3660
-M 19515,18135 2 3661
-N 15126,18135 2 3662
-O 14637,18390,255 2 3663
-P 13662,18135 2 3664
-Q 15126,18390,255 2 3665
-R 13662,18135 2 3666
-S 14148,18390,255 2 3667
-T 13173,18135 2 3668
-U 14637,18135,255 2 3669
-V 13662,18135 2 3670
-W 20490,18135 2 3671
-X 14637,18135 2 3672
-Y 13662,18135 2 3673
-Z 12198,18135 2 3674
-lB 5856,18135,2430 2 3675
-[ "
-rs 5856,18165,2430 2 3676
-\ "
-rB 5856,18135,2430 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 5856,18135 2 51808
-` "
-a 11709,12885,255 0 3681
-b 11709,18165,255 2 3682
-c 10734,12885,255 0 3683
-d 11709,18165,255 2 3684
-e 11220,12885,255 0 3685
-f 8295,18315 2 3686
-g 11709,12885,4995 1 3687
-h 12198,18165 2 3688
-i 6342,18165 2 3689
-j 6342,18165,4995 3 3690
-k 11709,18165 2 3691
-l 6342,18165 2 3692
-m 17565,12885 0 3693
-n 12198,12885 0 3694
-o 11709,12885,255 0 3695
-p 11709,12885,4995 1 3696
-q 11709,12885,4995 1 3697
-r 8781,12885 0 3698
-s 10734,12885,255 0 3699
-t 8295,16086,255 0 3700
-u 12198,12630,255 0 3701
-v 11709,12630 0 3702
-w 18540,12630 0 3703
-x 11709,12630 0 3704
-y 11709,12630,4680 1 3705
-z 9759,12630 0 3706
-lC 13173,20130,6075 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 13173,20130,6075 3 3709
-} "
-ti 26346,9435 0 51876
-char192 14637,23130 2 3776
-`A "
-char194 14637,23130 2 3778
-^A "
-char200 12198,23130 2 3784
-`E "
-char202 12198,23130 2 3786
-^E "
-char203 12198,22815 2 3787
-:E "
-char206 6831,23130 2 3790
-^I "
-char207 6831,22815 2 3791
-:I "
-char180 12684,18285 2 3764
-aa "
-ga 12684,18285 2 3680
-a^ 12684,18285 2 3678
-^ "
-char168 12684,18225 2 3752
-ad "
-a~ 12684,17874 2 3710
-~ "
-char217 14637,23130,255 2 3801
-`U "
-char219 14637,23130,255 2 3803
-^U "
-char221 13662,23130 2 3805
-'Y "
-char253 11709,18285,4680 3 3837
-'y "
-char176 12684,18360 2 3760
-de "
-char199 13662,18390,5580 3 3783
-,C "
-char231 10734,12885,5190 1 3815
-,c "
-char209 15126,23031 2 3793
-~N "
-char241 12198,17874 2 3825
-~n "
-char161 7806,12630,5505 1 3745
-r! "
-char191 11709,12576,5814 1 3775
-r? "
-char164 12684,15834 0 3748
-Cs "
-char163 12684,18360 2 3747
-Po "
-char165 12684,18105 2 3749
-Ye "
-char167 12684,18495,600 2 3751
-sc "
-Fn 12684,18315 2 51871
-char162 12684,18705,765 2 3746
-ct "
-char226 11709,18285,255 2 3810
-^a "
-char234 11220,18285,255 2 3818
-^e "
-char244 11709,18285,255 2 3828
-^o "
-char251 12198,18285,255 2 3835
-^u "
-char225 11709,18285,255 2 3809
-'a "
-char233 11220,18285,255 2 3817
-'e "
-char243 11709,18285,255 2 3827
-'o "
-char250 12198,18285,255 2 3834
-'u "
-char224 11709,18285,255 2 3808
-`a "
-char232 11220,18285,255 2 3816
-`e "
-char242 11709,18285,255 2 3826
-`o "
-char249 12198,18285,255 2 3833
-`u "
-char228 11709,18225,255 2 3812
-:a "
-char235 11220,18225,255 2 3819
-:e "
-char246 11709,18225,255 2 3830
-:o "
-char252 12198,18225,255 2 3836
-:u "
-char197 14637,25080 2 3781
-oA "
-char238 6342,18285 2 3822
-^i "
-char216 14637,19890,2019 2 3800
-/O "
-char198 20490,18135 2 3782
-AE "
-char229 11709,19455,255 2 3813
-oa "
-char237 6342,18285 2 3821
-'i "
-char248 11709,14256,2172 0 3832
-/o "
-char230 17565,12885,255 0 3814
-ae "
-char196 14637,22815 2 3780
-:A "
-char236 6342,18285 2 3820
-`i "
-char214 14637,22815,255 2 3798
-:O "
-char220 14637,22815,255 2 3804
-:U "
-char201 12198,23130 2 3785
-'E "
-char239 6342,18225 2 3823
-:i "
-char223 13173,18315,255 2 3807
-ss "
-char212 14637,23130,255 2 3796
-^O "
-char193 14637,23130 2 3777
-'A "
-char195 14637,23031 2 3779
-~A "
-char227 11709,17874,255 2 3811
-~a "
-char208 14637,18135 2 3792
--D "
-char240 11709,18573,255 2 3824
-Sd "
-char205 6831,23130 2 3789
-'I "
-char204 6831,23130 2 3788
-`I "
-char211 14637,23130,255 2 3795
-'O "
-char210 14637,23130,255 2 3794
-`O "
-char213 14637,23031,255 2 3797
-~O "
-char245 11709,17874,255 2 3829
-~o "
-vS 14148,23130,255 2 51795
-vs 10734,18285,255 2 51827
-char218 14637,23130,255 2 3802
-'U "
-:Y 13662,22815 2 51801
-char255 11709,18225,4680 3 3839
-:y "
-char222 13662,18135 2 3806
-TP "
-char254 11709,18165,4995 3 3838
-Tp "
-char181 15612,12630,4680 1 3765
-char182 12684,19635,4200 2 3766
-ps "
-char190 17565,18765,900 2 3774
-34 "
-\- 17565,7740 0 51757
-char188 17565,18765,900 2 3772
-14 "
-char189 17565,18765,900 2 3773
-12 "
-char170 10734,18360 2 3754
-Of "
-char186 10734,18360 2 3770
-Om "
-char171 11709,11070 0 3755
-Fo "
-char187 11709,11070 0 3771
-Fc "
-char177 17565,12810,2520 0 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19635 2 3753
-co "
-char172 17565,10320 0 3756
-no "
-char174 13173,19635 2 3758
-rg "
-char178 8295,18465 2 3762
-S2 "
-char179 8295,18465 2 3763
-S3 "
-char184 12684,195258,5190 3 3768
-ac "
-char185 8295,18345 2 3769
-S1 "
-char215 17565,12345 0 3799
-char247 17565,12015 0 3831
-char183 5856,10251 0 3767
-pc "
-fm 5856,18105 2 51873
-sd 12684,18105 2 51874
-dg 12684,18135 2 51755
-tm 16101,17850 2 51796
-ah 12684,18285 2 51935
-ao 12684,19455 2 51930
-f/ 2928,18765,900 2 51759
-em 17565,7530 0 51789
-en 12684,7530 0 51790
-dd 12684,18135 2 51773
-.i 6342,12630 0 51957
-aq 5856,18135 2 3623
-bu 13173,14226 0 51889
-'C 13662,23130,255 2 20166
-'c 10734,18285,255 2 20198
-lq 10245,18135 2 51838
-rq 10245,18135 2 51746
-Bq 10245,3513,2382 0 51772
-vz 9759,18285 2 51834
-fi 14148,18315 2 51881
-fl 14148,18315 2 51882
-ff 15126,18315 2 51883
-Fi 20979,18315 2 51884
-Fl 20979,18315 2 51885
-ij 12684,18165,4995 3 51958
-bq 5856,3513,2382 0 51756
-%0 26346,18765,900 2 51901
-char175 12684,17595 2 3759
-a- "
-ab 12684,18285 2 51926
-a. 12684,18345 2 51927
-oe 17565,12885,255 0 51823
-OE 20490,18270,135 2 51791
-fo 6342,11070 0 51886
-fc 6342,11070 0 51887
-sq 19029,15624 0 51899
-/L 11709,18135 2 51944
-/l 6831,18165 2 51960
-a" 12684,18285 2 51933
-ho 12684,300,4335 0 51934
-vZ 12198,23130 2 51802
-IJ 18540,18135,255 2 51942
diff --git a/contrib/groff/font/devlj4/UCBI b/contrib/groff/font/devlj4/UCBI
deleted file mode 100644
index d1876c181549..000000000000
--- a/contrib/groff/font/devlj4/UCBI
+++ /dev/null
@@ -1,698 +0,0 @@
-name UCBI
-spacewidth 5856
-slant 16.500000
-pcltypeface 4148
-pclproportional 1
-pclweight 3
-pclstyle 5
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2439
-P . -4389
-P , -4389
-V A -1461
-A V -1950
-T o -2439
-T r -1950
-T c -2439
-T e -2439
-T d -2439
-T s -1950
-T y -1950
-T a -2439
-T w -1950
-T u -1950
-T J -1950
-L T -2439
-L Y -2925
-Y o -1950
-Y e -1461
-Y a -1461
-Y J -1950
-A W -1461
-W A -975
-T A -1950
-V o -975
-V e -975
-V a -975
-Y A -1950
-F A -975
-F . -3414
-F , -3414
-A T -2439
-A Y -2439
-v . -975
-v , -975
-y . -975
-y , -975
-T . -1950
-T , -1950
-L W -1461
-P A -1461
-V J -975
-V . -1950
-V , -1950
-Y . -1950
-Y , -1950
-W o -975
-W e -975
-W a -975
-W . -975
-W , -975
-r . -1461
-r , -1461
-w . -975
-w , -975
-Y u -975
-A v -486
-A y -975
-A w -486
-o . -975
-o , -975
-p . -975
-p , -975
-e . -486
-e , -486
-b . -975
-b , -975
-O T -1950
-O V -486
-O Y -975
-O . -1461
-O , -1461
-L y -1461
-L O -1950
-L G -1950
-L C -1950
-L Q -1950
-P J -1461
-V y -486
-V u -486
-V O -486
-V G -486
-V C -486
-V Q -486
-D T -1461
-D V -486
-D Y -975
-D . -1950
-D , -1950
-Y O -975
-Y G -975
-Y C -975
-Y Q -975
-F o -486
-F e -486
-F a -486
-c . -486
-c , -486
-O A -486
-O W -486
-L U -1461
-R T -1461
-R V -486
-R Y -975
-R W -486
-G T -1461
-P o -975
-P g -486
-P e -486
-P a -486
-C A -486
-C . -1461
-C , -1461
-D A -486
-D W -486
-B T -1950
-B Y -975
-B . -486
-B , -486
-F J -486
-A O -486
-A G -486
-A C -486
-A U -486
-A Q -486
-W r -486
-W y -486
-W u -486
-W O -486
-W G -486
-W C -486
-W J -975
-W Q -486
-U A -486
-U . -975
-U , -975
-Q W -486
-T O -1461
-T G -1461
-T C -1461
-T Q -1461
-O X -975
-L o -1461
-L e -1461
-L q -1461
-G V -486
-G Y -975
-G W -486
-P T -1461
-P V -486
-P Y -975
-C T -1950
-C V -486
-C Y -975
-D X -975
-B V -486
-B X -486
-B A -486
-B W -486
-S . -486
-S , -486
-X o -975
-X e -975
-X y -975
-X O -975
-X G -975
-X C -975
-X Q -975
-A o -486
-A e -486
-K o -975
-K e -975
-K y -975
-K w -975
-K O -975
-K G -975
-K C -975
-K Q -975
-o y -486
-o x -975
-h y -486
-n y -486
-m y -486
-r g -486
-p y -486
-p x -975
-c y -486
-e y -486
-b y -486
-x o -975
-x c -975
-x e -486
-x d -975
-x a -486
-x q -975
-a y -486
-T S -486
-L a -486
-L S -975
-P Z -486
-P X -975
-P W -486
-C X -975
-C W -486
-V S -486
-S T -975
-S V -486
-S Y -975
-S X -486
-S A -486
-S W -486
-Y S -486
-X a -486
-X u -975
-X S -486
-A t -486
-A c -486
-A d -486
-A a -486
-A u -486
-A q -486
-A S -486
-W S -486
-K c -975
-K u -975
-K S -486
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-c x -486
-e x -486
-s y -486
-k o -486
-k c -486
-k e -486
-k d -486
-k a -486
-k q -486
-O Z -486
-C Z -486
-Z o -486
-Z e -486
-Z d -486
-Z s -486
-Z y -486
-Z a -486
-Z w -486
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z Q -486
-D Z -486
-B Z -486
-S Z -486
-A s -486
-K a -486
-L cq -3903
-L ' -3903
-T char173 -1950
-T hy -1950
-T - -1950
-T en -1950
-T em -1950
-A cq -1461
-A ' -1461
-char173 T -2439
-hy T -2439
-- T -2439
-en T -2439
-em T -2439
-Y char173 -975
-Y hy -975
-Y - -975
-Y en -975
-Y em -975
-p cq -975
-p ' -975
-c cq -975
-c ' -975
-e cq -1461
-e ' -1461
-b cq -1461
-b ' -1461
-a cq -975
-a ' -975
-V char173 -486
-V hy -486
-V - -486
-V en -486
-V em -486
-h cq -1461
-h ' -1461
-n cq -975
-n ' -975
-m cq -975
-m ' -975
-W char173 -486
-W hy -486
-W - -486
-W en -486
-W em -486
-cq d -975
-' d -975
-s cq -486
-s ' -486
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -975
-X hy -975
-X - -975
-X en -975
-X em -975
-A char173 -486
-A hy -486
-A - -486
-A en -486
-A em -486
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-char173 X -975
-hy X -975
-- X -975
-char173 A -486
-hy A -486
-- A -486
-en X -975
-en A -486
-em X -975
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-charset
-! 7806,18135,0,2628,993,994 2 3617
-dq 10734,18135,0,3669,-2133,994 2 3618
-" "
-sh 12684,18360,825,2676,684,994 2 3619
-# "
-Do 12684,18840,570,1326,-291,994 2 3620
-$ "
-% 17565,18465,1050,1386,228,994 2 3621
-& 16587,18390,255,609,471,609 2 3622
-cq 5856,18135,0,4215,-1392,994 2 51751
-' "
-( 5856,18135,2430,4416,744,994 2 3624
-) 5856,18135,2430,1812,3348,994 2 3625
-* 12684,18390,0,1635,-3465,994 2 3626
-+ 17565,12810,0,0,-1431 0 3627
-, 5856,3465,2370,0,3042 0 3628
-char173 5856,7785,0,726,585,726 0 3629
-hy "
-- "
-. 5856,3465,0,0,1917 0 3630
-sl 5856,18165,2430,4518,3396,994 2 3631
-/ "
-0 12684,18360,255,2343,627,994 2 3632
-1 12684,18105,0,1020,-2307,994 2 3633
-2 12684,18360,0,2235,1779,994 2 3634
-3 12684,18360,255,2184,687,994 2 3635
-4 12684,18105,0,2082,1284,994 2 3636
-5 12684,18105,255,2490,525,994 2 3637
-6 12684,18360,255,2397,546,994 2 3638
-7 12684,18105,0,3309,315,994 2 3639
-8 12684,18360,255,2274,600,994 2 3640
-9 12684,18360,255,2289,819,994 2 3641
-: 5856,12570,0,1947,1917,994 0 3642
-; 5856,12570,2370,1836,3042,994 0 3643
-< 26346,16068,0,0,-3981 0 3644
-= 17565,9792,0,0,-1455 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 11709,18390,0,2205,-738,994 2 3647
-at 17565,18372,3231,2163,1152,994 2 3648
-@ "
-A 14637,18135,0,0,2460 2 3649
-B 14148,18135,0,1668,1362,994 2 3650
-C 13662,18390,255,2247,375,994 2 3651
-D 14637,18135,0,1851,1398,994 2 3652
-E 12198,18135,0,3423,1440,994 2 3653
-F 11709,18135,0,3855,1584,994 2 3654
-G 14637,18390,255,1926,117,994 2 3655
-H 14637,18135,0,3243,1542,994 2 3656
-I 6831,18135,0,3342,1641,994 2 3657
-J 12684,18135,255,3231,1059,994 2 3658
-K 14148,18135,0,3366,1374,994 2 3659
-L 11220,18135,0,0,1488 2 3660
-M 19515,18135,0,2958,1551,994 2 3661
-N 15126,18135,0,3003,1431,994 2 3662
-O 14637,18390,255,1872,204,994 2 3663
-P 13662,18135,0,2412,1506,994 2 3664
-Q 15126,18390,255,1449,189,994 2 3665
-R 13662,18135,0,1968,1545,994 2 3666
-S 14148,18390,255,2079,495,994 2 3667
-T 13173,18135,0,3891,-1554,994 2 3668
-U 14637,18135,255,3147,72,994 2 3669
-V 13662,18135,0,4206,-1620,994 2 3670
-W 20490,18135,0,3927,-699,994 2 3671
-X 14637,18135,0,3828,2505,994 2 3672
-Y 13662,18135,0,4230,-1767,994 2 3673
-Z 12198,18135,0,3639,2217,994 2 3674
-lB 5856,18135,2430,4086,2592,994 2 3675
-[ "
-rs 8295,18165,2430,534,-1680,534 2 3676
-\ "
-rB 5856,18135,2430,3555,3123,994 2 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,994 3 3679
-oq 5856,18135,0,3957,-1134,994 2 51808
-` "
-a 11709,12885,255,999,1161,994 0 3681
-b 11709,18165,255,1164,1920,994 2 3682
-c 10734,12885,255,1290,990,994 0 3683
-d 11709,18165,255,3657,1038,994 2 3684
-e 11220,12885,255,1140,1023,994 0 3685
-f 8295,18315,0,4233,960,994 2 3686
-g 11709,12885,4995,2007,2487,994 1 3687
-h 12198,18165,0,987,1677,987 2 3688
-i 6342,18165,0,3393,1722,994 2 3689
-j 6342,18165,4995,3432,4620,994 3 3690
-k 11709,18165,0,2241,1605,994 2 3691
-l 6342,18165,0,3426,1746,994 2 3692
-m 17565,12885,0,1053,1842,994 0 3693
-n 12198,12885,0,915,1734,915 0 3694
-o 11709,12885,255,990,927,990 0 3695
-p 11709,12885,4680,1098,3417,994 1 3696
-q 11709,12885,4680,1926,1122,994 1 3697
-r 8781,12885,0,2637,1686,994 0 3698
-s 10734,12885,255,1116,1380,994 0 3699
-t 8295,15693,255,2280,354,994 0 3700
-u 12198,12630,255,1764,849,994 0 3701
-v 11709,12630,0,2337,-546,994 0 3702
-w 18540,12630,0,2337,-171,994 0 3703
-x 11709,12630,0,2193,2526,994 0 3704
-y 11709,12630,4680,2457,1983,994 1 3705
-z 9759,12630,0,1977,2220,994 0 3706
-lC 13173,20130,6075,3150,-906,994 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 13173,20130,6075,0,3510 3 3709
-} "
-ti 26346,9435,0,0,-4029 0 51876
-char192 14637,23100,0,0,2460 2 3776
-`A "
-char194 14637,23100,0,1626,2460,994 2 3778
-^A "
-char200 12198,23100,0,3423,1440,994 2 3784
-`E "
-char202 12198,23100,0,3423,1440,994 2 3786
-^E "
-char203 12198,23265,0,3948,1440,994 2 3787
-:E "
-char206 6831,23100,0,5529,1641,994 2 3790
-^I "
-char207 6831,23265,0,6630,1641,994 2 3791
-:I "
-char180 12684,18225,0,1785,-5265,994 2 3764
-aa "
-ga 12684,18225,0,0,-5271 2 3680
-a^ 12684,18225,0,702,-3897,702 2 3678
-^ "
-char168 12684,18120,0,2067,-3990,994 2 3752
-ad "
-a~ 12684,17811,0,1560,-3786,994 2 3710
-~ "
-char217 14637,23100,255,3147,72,994 2 3801
-`U "
-char219 14637,23100,255,3147,72,994 2 3803
-^U "
-char221 13662,23100,0,4230,-1767,994 2 3805
-'Y "
-char253 11709,18225,4680,2457,1983,994 3 3837
-'y "
-char176 12684,18360,0,1377,-3201,994 2 3760
-de "
-char199 13662,18390,5295,2247,375,994 3 3783
-,C "
-char231 10734,12885,5205,1290,1419,994 1 3815
-,c "
-char209 15126,22833,0,3003,1431,994 2 3793
-~N "
-char241 12198,17811,0,1803,1734,994 2 3825
-~n "
-char161 7806,12615,5520,936,2685,936 1 3745
-r! "
-char191 11709,12600,5790,0,2256 1 3775
-r? "
-char164 12684,15834,0,2757,1125,994 0 3748
-Cs "
-char163 12684,18360,0,2571,1257,994 2 3747
-Po "
-char165 12684,18105,0,4791,834,994 2 3749
-Ye "
-char167 12684,18390,255,174,-1545,174 2 3751
-sc "
-Fn 12684,18315,0,2196,-1392,994 2 51871
-char162 12684,18840,570,1299,-636,994 2 3746
-ct "
-char226 11709,18225,255,1188,1161,994 2 3810
-^a "
-char234 11220,18225,255,1434,1023,994 2 3818
-^e "
-char244 11709,18225,255,1188,927,994 2 3828
-^o "
-char251 12198,18225,255,1764,849,994 2 3835
-^u "
-char225 11709,18225,255,2271,1161,994 2 3809
-'a "
-char233 11220,18225,255,2517,1023,994 2 3817
-'e "
-char243 11709,18225,255,2271,927,994 2 3827
-'o "
-char250 12198,18225,255,2028,849,994 2 3834
-'u "
-char224 11709,18225,255,999,1161,994 2 3808
-`a "
-char232 11220,18225,255,1140,1023,994 2 3816
-`e "
-char242 11709,18225,255,990,927,990 2 3826
-`o "
-char249 12198,18225,255,1764,849,994 2 3833
-`u "
-char228 11709,18120,255,2553,1161,994 2 3812
-:a "
-char235 11220,18120,255,2799,1023,994 2 3819
-:e "
-char246 11709,18120,255,2553,927,994 2 3830
-:o "
-char252 12198,18120,255,2310,849,994 2 3836
-:u "
-char197 14637,25164,0,1713,2460,994 2 3781
-oA "
-char238 6342,18225,0,3873,1713,994 2 3822
-^i "
-char216 14637,19854,1755,1872,204,994 2 3800
-/O "
-char198 20490,18135,0,2688,3147,994 2 3782
-AE "
-char229 11709,19089,255,1488,1161,994 2 3813
-oa "
-char237 6342,18225,0,5760,1713,994 2 3821
-'i "
-char248 11709,14208,1830,993,927,993 0 3832
-/o "
-char230 17565,12885,255,924,966,924 0 3814
-ae "
-char196 14637,23265,0,2727,2460,994 2 3780
-:A "
-char236 6342,18225,0,2367,1713,994 2 3820
-`i "
-char214 14637,23265,255,2727,204,994 2 3798
-:O "
-char220 14637,23265,255,3147,72,994 2 3804
-:U "
-char201 12198,23100,0,3660,1440,994 2 3785
-'E "
-char239 6342,18120,0,5238,1713,994 2 3823
-:i "
-char223 13173,18165,0,1956,1704,994 2 3807
-ss "
-char212 14637,23100,255,1872,204,994 2 3796
-^O "
-char193 14637,23100,0,2439,2460,994 2 3777
-'A "
-char195 14637,22833,0,2379,2460,994 2 3779
-~A "
-char227 11709,17811,255,2046,1161,994 2 3811
-~a "
-char208 14637,18135,0,1851,1398,994 2 3792
--D "
-char240 11709,18756,255,1419,936,994 2 3824
-Sd "
-char205 6831,23100,0,6342,1641,994 2 3789
-'I "
-char204 6831,23100,0,3732,1641,994 2 3788
-`I "
-char211 14637,23100,255,2439,204,994 2 3795
-'O "
-char210 14637,23100,255,1872,204,994 2 3794
-`O "
-char213 14637,22833,255,2379,204,994 2 3797
-~O "
-char245 11709,17811,255,2046,927,994 2 3829
-~o "
-vS 14148,23100,255,2754,495,994 2 51795
-vs 10734,18225,255,2754,1380,994 2 51827
-char218 14637,23100,255,3147,72,994 2 3802
-'U "
-:Y 13662,23265,0,4230,-1767,994 2 51801
-char255 11709,18120,4680,2553,1983,994 3 3839
-:y "
-char222 13662,18135,0,1518,1470,994 2 3806
-TP "
-char254 11709,18165,4680,1098,3417,994 3 3838
-Tp "
-char181 15612,12630,4680,1422,2907,994 1 3765
-char182 12684,19635,4200,2046,-1215,994 2 3766
-ps "
-char190 17565,18465,1050,1788,-174,994 2 3774
-34 "
-\- 17565,7740,0,0,-1455 0 51757
-char188 17565,18345,1050,639,975,639 2 3772
-14 "
-char189 17565,18345,1050,165,1449,165 2 3773
-12 "
-char170 10734,18360,0,1965,-2322,994 2 3754
-Of "
-char186 10734,18360,0,1956,-2496,994 2 3770
-Om "
-char171 11709,10965,0,1749,306,994 0 3755
-Fo "
-char187 11709,10965,0,219,1836,219 0 3771
-Fc "
-char177 17565,12810,2520,0,-1431 0 3761
-char166 13173,19083,5916,0,-4596 3 3750
-bb "
-char169 13173,19635,0,4629,-2838,994 2 3753
-co "
-char172 17565,10320,0,0,-1455 0 3756
-no "
-char174 13173,19635,0,4629,-2838,994 2 3758
-rg "
-char178 8295,18465,0,2814,-432,994 2 3762
-S2 "
-char179 8295,18465,0,2817,-1047,994 2 3763
-S3 "
-char184 12684,195183,5205,0,444 3 3768
-ac "
-char185 8295,18345,0,1920,-2586,994 2 3769
-S1 "
-char215 17565,12345,0,0,-2448 0 3799
-char247 17565,12015,0,0,-1446 0 3831
-char183 5856,10671,0,1371,-189,994 0 3767
-pc "
-fm 5856,18105,0,3432,-2124,994 2 51873
-sd 12684,18105,0,1554,-2124,994 2 51874
-dg 12684,18135,0,318,-1353,318 2 51755
-tm 16101,17850,0,2169,-2706,994 2 51796
-ah 12684,18225,0,1779,-4974,994 2 51935
-ao 12684,19089,0,1002,-4803,994 2 51930
-f/ 2928,18345,1050,8775,7476,994 2 51759
-em 17565,7605,0,426,354,426 0 51789
-en 12684,7605,0,753,546,753 0 51790
-dd 12684,18135,0,399,-1434,399 2 51773
-.i 6342,12630,0,1770,1713,994 0 51957
-aq 5856,18135,0,3546,-2133,994 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 13662,23100,255,3378,375,994 2 20166
-'c 10734,18225,255,2910,990,994 2 20198
-lq 10245,18135,0,3945,-1131,994 2 51838
-rq 10245,18135,0,4314,-1500,994 2 51746
-Bq 10245,3459,2376,0,3000 0 51772
-vz 9759,18225,0,3240,2220,994 2 51834
-fi 14148,18315,0,3318,981,994 2 51881
-fl 14148,18315,0,3378,978,994 2 51882
-ff 15126,18315,0,4389,963,994 2 51883
-Fi 20979,18315,0,3477,981,994 2 51884
-Fl 20979,18315,0,3537,978,994 2 51885
-ij 12684,18165,4995,3432,1722,994 3 51958
-bq 5856,3459,2376,57,2766,57 0 51756
-%0 26346,18465,1050,450,-201,450 2 51901
-char175 12684,16386,0,927,-4566,927 0 3759
-a- "
-ab 12684,18195,0,1674,-4344,994 2 51926
-a. 12684,18120,0,0,-5505 2 51927
-oe 17565,12885,255,903,948,903 0 51823
-OE 20490,18270,135,2994,153,994 2 51791
-fo 6342,10965,0,1878,399,994 0 51886
-fc 6342,10965,0,453,1824,453 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 13173,18135,0,951,96,951 2 51944
-/l 8781,18165,0,2745,807,994 2 51960
-a" 12684,18225,0,4065,-4167,994 2 51933
-ho 12684,918,4755,0,-2397 1 51934
-vZ 12198,23100,0,3729,2217,994 2 51802
-IJ 19515,18135,255,3231,1641,994 2 51942
diff --git a/contrib/groff/font/devlj4/UCI b/contrib/groff/font/devlj4/UCI
deleted file mode 100644
index 4214f49eb50d..000000000000
--- a/contrib/groff/font/devlj4/UCI
+++ /dev/null
@@ -1,840 +0,0 @@
-name UCI
-spacewidth 5856
-slant 16.500000
-pcltypeface 4148
-pclproportional 1
-pclweight 0
-pclstyle 5
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2925
-P . -5364
-P , -5364
-V A -1950
-A V -1950
-T o -3414
-T r -3414
-T c -3414
-T e -3414
-T d -3414
-T s -3903
-T y -3414
-T a -3414
-T w -3414
-T u -3414
-T J -3414
-L T -3414
-L Y -2925
-Y o -2925
-Y e -2925
-Y a -2439
-Y J -2925
-A W -1950
-W A -1950
-T A -2925
-V o -1950
-V e -1950
-V a -1461
-Y A -2925
-F A -1461
-F . -3903
-F , -3903
-A T -2925
-A Y -2925
-v . -1950
-v , -1950
-y . -2439
-y , -2439
-T . -3414
-T , -3414
-L W -1950
-P A -1461
-V J -1950
-V . -2925
-V , -2925
-Y . -2925
-Y , -2925
-W o -1461
-W e -1461
-W a -1461
-W . -1950
-W , -1950
-r . -1461
-r , -1461
-w . -1950
-w , -1950
-Y u -1461
-A v -975
-A y -975
-A w -975
-o . -486
-o , -486
-p . -486
-p , -486
-e . -486
-e , -486
-b . -486
-b , -486
-O T -1461
-O V -486
-O Y -1461
-O . -975
-O , -975
-L y -2439
-L O -1461
-L G -1461
-L C -1461
-L Q -1461
-P J -1950
-V y -486
-V u -486
-V O -486
-V G -486
-V C -486
-V Q -486
-D T -1461
-D V -486
-D Y -1461
-D . -975
-D , -975
-Y O -975
-Y G -975
-Y C -975
-Y Q -975
-F o -975
-F e -975
-F a -975
-c . -486
-c , -486
-O A -486
-O W -486
-L U -1461
-R T -1461
-R V -486
-R Y -1461
-R W -486
-G T -1461
-P o -1461
-P g -1461
-P e -1461
-P a -975
-C A -975
-C . -975
-C , -975
-D A -486
-D W -486
-B T -1461
-B Y -1461
-B . -975
-B , -975
-F J -975
-A O -486
-A G -486
-A C -486
-A U -486
-A Q -486
-W r -486
-W y -486
-W u -486
-W O -486
-W G -486
-W C -486
-W J -1461
-W Q -486
-J A -486
-J . -1461
-J , -1461
-U A -486
-U . -975
-U , -975
-Q W -486
-f . -975
-f , -975
-T O -975
-T G -975
-T C -975
-T Q -975
-O X -486
-L o -1950
-L e -1950
-L q -1950
-G V -486
-G Y -1461
-G W -486
-P T -1461
-P V -486
-P Y -1461
-C T -1461
-C V -975
-C Y -1461
-D X -486
-B V -486
-B X -486
-B A -486
-B W -486
-S . -486
-S , -486
-X o -486
-X e -486
-X y -486
-X O -486
-X G -486
-X C -486
-X Q -486
-A o -486
-A e -486
-K o -975
-K e -975
-K y -975
-K w -975
-K O -975
-K G -975
-K C -975
-K Q -975
-o v -486
-o y -486
-o x -486
-o w -486
-h v -486
-h y -486
-n v -486
-n y -486
-m v -486
-m y -486
-r g -486
-p v -486
-p y -486
-p x -486
-c v -486
-c y -486
-c w -486
-v o -486
-v g -486
-v c -486
-v d -486
-v a -486
-v q -486
-e v -486
-e y -486
-b v -486
-b y -486
-b w -486
-s . -486
-s , -486
-y o -486
-y g -486
-y c -486
-y d -486
-y a -486
-y q -486
-f g -486
-x o -486
-x g -486
-x c -486
-x e -486
-x d -486
-x a -486
-x q -486
-a v -486
-a y -486
-a w -486
-w o -486
-w g -486
-w c -486
-w d -486
-w a -486
-w q -486
-T i -486
-T S -486
-L a -1461
-L S -975
-P s -486
-P Z -486
-P X -486
-P W -486
-C X -975
-C W -975
-C J -486
-V i -486
-V S -486
-S T -975
-S V -486
-S Y -975
-S X -486
-S A -486
-S W -486
-Y i -486
-Y S -486
-X a -486
-X u -486
-X S -486
-A t -486
-A g -486
-A c -486
-A d -486
-A a -486
-A u -486
-A q -486
-A S -486
-W i -486
-W S -486
-K c -975
-K u -975
-K S -486
-h w -486
-n w -486
-m w -486
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-p w -486
-c x -486
-v e -486
-v s -975
-e x -486
-e w -486
-s v -486
-s y -486
-s x -486
-s w -486
-y e -486
-y s -486
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-x s -486
-w e -486
-w s -486
-k o -486
-k g -486
-k c -486
-k e -486
-k d -486
-k a -486
-k q -486
-O Z -486
-L J -975
-C Z -975
-Z o -486
-Z e -486
-Z d -486
-Z s -975
-Z y -486
-Z a -486
-Z w -486
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z J -486
-Z Q -486
-D Z -486
-B Z -486
-S Z -486
-X J -486
-A s -975
-A J -486
-K a -975
-K J -975
-t s -486
-r s -486
-g s -486
-v t -486
-v h -486
-v n -486
-v m -486
-v r -486
-v i -486
-v p -486
-v z -486
-v b -486
-v y -486
-v f -486
-v x -486
-v w -486
-v j -486
-v u -486
-v k -486
-z s -486
-k s -486
-C t -486
-C o -486
-C h -486
-C l -486
-C r -486
-C i -486
-C e -486
-C y -486
-C a -486
-C u -486
-C O -486
-C H -486
-C N -486
-C M -486
-C L -486
-C R -486
-C G -486
-C I -486
-C P -486
-C C -486
-C E -486
-C D -486
-C B -486
-C S -486
-C F -486
-C U -486
-C Q -486
-C K -486
-E s -486
-U s -486
-L cq -3414
-L ' -3414
-T char173 -3414
-T hy -3414
-T - -3414
-T en -3414
-T em -3414
-A cq -1461
-A ' -1461
-char173 T -3414
-hy T -3414
-- T -3414
-en T -3414
-em T -3414
-Y char173 -1461
-Y hy -1461
-Y - -1461
-Y en -1461
-Y em -1461
-p cq -1950
-p ' -1950
-c cq -1950
-c ' -1950
-e cq -1950
-e ' -1950
-b cq -1950
-b ' -1950
-a cq -1950
-a ' -1950
-V char173 -486
-V hy -486
-V - -486
-V en -486
-V em -486
-h cq -1461
-h ' -1461
-n cq -1461
-n ' -1461
-m cq -1461
-m ' -1461
-W char173 -486
-W hy -486
-W - -486
-W en -486
-W em -486
-cq d -486
-' d -486
-s cq -975
-s ' -975
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -486
-X hy -486
-X - -486
-X en -486
-X em -486
-A char173 -486
-A hy -486
-A - -486
-A en -486
-A em -486
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-cq s -486
-' s -486
-char173 X -486
-hy X -486
-- X -486
-char173 A -486
-hy A -486
-- A -486
-en X -486
-en A -486
-em X -486
-v cq -486
-v ' -486
-C cq -486
-C ' -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-v char173 -486
-v hy -486
-v - -486
-v en -486
-v em -486
-C char173 -486
-C hy -486
-C - -486
-C en -486
-C em -486
-charset
-! 7806,18135,0,2241,591,996 2 3617
-dq 9759,18135,0,3060,-2391,996 2 3618
-" "
-sh 12198,18360,975,1389,3,996 2 3619
-# "
-Do 12198,18465,630,843,-735,843 2 3620
-$ "
-% 17565,18675,975,576,-672,576 2 3621
-& 16101,18390,255,210,177,210 2 3622
-cq 5856,18135,0,3690,-1482,996 2 51751
-' "
-( 5856,18135,2325,3999,699,996 2 3624
-) 5856,18135,2325,1524,3174,996 2 3625
-* 12198,18390,0,1251,-3045,996 2 3626
-+ 17565,12495,0,0,-2097 0 3627
-, 5856,2970,2730,0,2856 0 3628
-char173 5856,7560,0,534,348,534 0 3629
-hy "
-- "
-. 5856,2970,0,0,1347 0 3630
-sl 5856,18165,1980,4254,3456,996 2 3631
-/ "
-0 12198,18360,255,2505,636,996 2 3632
-1 12198,18105,0,309,-2085,309 2 3633
-2 12198,18360,0,1968,1710,996 2 3634
-3 12198,18360,255,2127,735,996 2 3635
-4 12198,18105,0,3057,699,996 2 3636
-5 12198,18105,255,3717,123,996 2 3637
-6 12198,18360,255,3078,21,996 2 3638
-7 12198,18105,0,3684,138,996 2 3639
-8 12198,18360,255,3024,132,996 2 3640
-9 12198,18360,255,2850,480,996 2 3641
-: 5856,12621,0,1656,1347,996 0 3642
-; 5856,12621,2730,1737,2856,996 0 3643
-< 26346,16068,0,0,-3981 0 3644
-= 17565,9375,0,0,-2115 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 11220,18390,0,2100,-609,996 2 3647
-at 17565,18357,3849,1746,1029,996 2 3648
-@ "
-A 13662,18135,0,0,2325 2 3649
-B 13173,18135,0,1743,1536,996 2 3650
-C 13173,18390,255,1860,513,996 2 3651
-D 13662,18135,0,1749,1557,996 2 3652
-E 11220,18135,0,3267,1563,996 2 3653
-F 10734,18135,0,3414,1449,996 2 3654
-G 13662,18390,255,1893,333,996 2 3655
-H 13662,18135,0,2958,1509,996 2 3656
-I 5856,18135,0,3066,1566,996 2 3657
-J 11220,18135,255,2781,1866,996 2 3658
-K 13173,18135,0,2982,1341,996 2 3659
-L 10245,18135,0,0,1506 2 3660
-M 18051,18135,0,2886,1590,996 2 3661
-N 14148,18135,0,3030,1638,996 2 3662
-O 13662,18390,255,1875,447,996 2 3663
-P 12198,18135,0,2514,1401,996 2 3664
-Q 13662,18390,255,1773,495,996 2 3665
-R 13173,18135,0,2247,1515,996 2 3666
-S 12684,18390,255,2274,978,996 2 3667
-T 12684,18135,0,3735,-1890,996 2 3668
-U 13662,18135,255,2892,363,996 2 3669
-V 12198,18135,0,4140,-1263,996 2 3670
-W 18051,18135,0,3870,-1209,996 2 3671
-X 13662,18135,0,3108,2223,996 2 3672
-Y 12198,18135,0,4026,-1473,996 2 3673
-Z 12198,18135,0,3390,2130,996 2 3674
-lB 5856,18135,2325,4227,2679,996 2 3675
-[ "
-rs 7806,18165,1980,420,-1230,420 2 3676
-\ "
-rB 5856,18135,2325,3114,3792,996 2 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,996 3 3679
-oq 5856,18135,0,3690,-1482,996 2 51808
-` "
-a 10734,12885,255,918,1242,918 0 3681
-b 10734,18165,255,1200,1791,996 2 3682
-c 10245,12885,255,1047,816,996 0 3683
-d 10734,18165,255,3501,1155,996 2 3684
-e 10245,12885,255,1245,1065,996 0 3685
-f 7806,18315,0,3972,753,996 2 3686
-g 10734,12885,4995,1737,2589,996 1 3687
-h 10734,18165,0,1167,1812,996 2 3688
-i 4878,18165,0,3690,1905,996 2 3689
-j 4878,18165,4995,3777,5010,996 3 3690
-k 10734,18165,0,2250,1443,996 2 3691
-l 4878,18165,0,3627,1932,996 2 3692
-m 16101,12885,0,1227,1803,996 0 3693
-n 10734,12885,0,1218,1824,996 0 3694
-o 10734,12885,255,1047,825,996 0 3695
-p 10734,12885,4680,972,3273,972 1 3696
-q 10734,12885,4680,1965,1020,996 1 3697
-r 7317,12885,0,2601,1803,996 0 3698
-s 9759,12885,255,1320,1314,996 0 3699
-t 7806,15879,255,1989,144,996 0 3700
-u 10734,12630,255,1800,1011,996 0 3701
-v 10245,12630,0,2412,-423,996 0 3702
-w 17076,12630,0,2343,-369,996 0 3703
-x 10245,12630,0,2328,2280,996 0 3704
-y 10734,12630,4680,2364,1923,996 1 3705
-z 8781,12630,0,2136,2154,996 0 3706
-lC 11709,20130,6075,2865,-1290,996 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 11709,20130,6075,0,2577 3 3709
-} "
-ti 26346,8952,0,0,-4029 0 51876
-char192 13662,23640,0,0,2325 2 3776
-`A "
-char194 13662,23415,0,1611,2325,996 2 3778
-^A "
-char200 11220,23640,0,3267,1563,996 2 3784
-`E "
-char202 11220,23415,0,3267,1563,996 2 3786
-^E "
-char203 11220,22560,0,3693,1563,996 2 3787
-:E "
-char206 5856,23415,0,5514,1566,996 2 3790
-^I "
-char207 5856,22560,0,6375,1566,996 2 3791
-:I "
-char180 12198,18165,0,1326,-5685,996 2 3764
-aa "
-ga 12198,18165,0,0,-4539 2 3680
-a^ 12198,17940,0,795,-3729,795 2 3678
-^ "
-char168 12198,17355,0,1464,-3699,996 2 3752
-ad "
-a~ 12198,17652,0,1776,-3729,996 2 3710
-~ "
-char217 13662,23640,255,2892,363,996 2 3801
-`U "
-char219 13662,23415,255,2892,363,996 2 3803
-^U "
-char221 12198,23640,0,4026,-1473,996 2 3805
-'Y "
-char253 10734,18165,4680,2364,1923,996 3 3837
-'y "
-char176 12198,18360,0,1284,-2982,996 2 3760
-de "
-char199 13173,18390,4995,1860,540,996 3 3783
-,C "
-char231 10245,12885,4995,1047,2838,996 1 3815
-,c "
-char209 14148,22743,0,3030,1638,996 2 3793
-~N "
-char241 10734,17652,0,2508,1824,996 2 3825
-~n "
-char161 7806,13041,5094,861,1971,861 1 3745
-r! "
-char191 11220,12591,5799,0,2016 1 3775
-r? "
-char164 12198,15684,0,2514,468,996 0 3748
-Cs "
-char163 12198,18360,0,2223,522,996 2 3747
-Po "
-char165 12198,18105,0,4137,1266,996 2 3749
-Ye "
-char167 12198,18390,255,96,-1509,96 2 3751
-sc "
-Fn 12198,18315,0,1662,-1329,996 2 51871
-char162 12198,18465,630,873,-1005,873 2 3746
-ct "
-char226 10734,17940,255,1527,1242,996 2 3810
-^a "
-char234 10245,17940,255,1770,1065,996 2 3818
-^e "
-char244 10734,17940,255,1527,825,996 2 3828
-^o "
-char251 10734,17940,255,1800,1011,996 2 3835
-^u "
-char225 10734,18165,255,2058,1242,996 2 3809
-'a "
-char233 10245,18165,255,2301,1065,996 2 3817
-'e "
-char243 10734,18165,255,2058,825,996 2 3827
-'o "
-char250 10734,18165,255,2058,1011,996 2 3834
-'u "
-char224 10734,18165,255,918,1242,918 2 3808
-`a "
-char232 10245,18165,255,1245,1065,996 2 3816
-`e "
-char242 10734,18165,255,1047,825,996 2 3826
-`o "
-char249 10734,18165,255,1800,1011,996 2 3833
-`u "
-char228 10734,17355,255,2478,1242,996 2 3812
-:a "
-char235 10245,17355,255,2721,1065,996 2 3819
-:e "
-char246 10734,17355,255,2478,825,996 2 3830
-:o "
-char252 10734,17355,255,2478,1011,996 2 3836
-:u "
-char197 13662,24480,0,1125,2325,996 2 3781
-oA "
-char238 5856,17940,0,3966,1425,996 2 3822
-^i "
-char216 13662,19944,1833,1989,555,996 2 3800
-/O "
-char198 18540,18135,0,2904,2310,996 2 3782
-AE "
-char229 10734,19005,255,918,1242,918 2 3813
-oa "
-char237 5856,18165,0,4779,1425,996 2 3821
-'i "
-char248 10734,14238,1866,1050,930,996 0 3832
-/o "
-char230 16587,12885,255,681,957,681 0 3814
-ae "
-char196 13662,22560,0,2472,2325,996 2 3780
-:A "
-char236 5856,18165,0,1461,1425,996 2 3820
-`i "
-char214 13662,22560,255,2472,447,996 2 3798
-:O "
-char220 13662,22560,255,2892,363,996 2 3804
-:U "
-char201 11220,23640,0,3267,1563,996 2 3785
-'E "
-char239 5856,17355,0,5118,1425,996 2 3823
-:i "
-char223 11709,18315,255,1839,1917,996 2 3807
-ss "
-char212 13662,23415,255,1875,447,996 2 3796
-^O "
-char193 13662,23640,0,1884,2325,996 2 3777
-'A "
-char195 13662,22743,0,2355,2325,996 2 3779
-~A "
-char227 10734,17652,255,2508,1242,996 2 3811
-~a "
-char208 13662,18135,0,1749,1557,996 2 3792
--D "
-char240 10734,18579,255,2247,927,996 2 3824
-Sd "
-char205 5856,23640,0,6393,1566,996 2 3789
-'I "
-char204 5856,23640,0,3258,1566,996 2 3788
-`I "
-char211 13662,23640,255,1884,447,996 2 3795
-'O "
-char210 13662,23640,255,1875,447,996 2 3794
-`O "
-char213 13662,22743,255,2355,447,996 2 3797
-~O "
-char245 10734,17652,255,2508,825,996 2 3829
-~o "
-vS 12684,23415,255,3015,978,996 2 51795
-vs 9759,17940,255,2751,1314,996 2 51827
-char218 13662,23640,255,2892,363,996 2 3802
-'U "
-:Y 12198,22560,0,4026,-1473,996 2 51801
-char255 10734,17355,4680,2364,1923,996 3 3839
-:y "
-char222 12198,18135,0,1260,1407,996 2 3806
-TP "
-char254 10734,18165,4680,969,3273,969 3 3838
-Tp "
-char181 14637,12630,4350,1122,2931,996 0 3765
-char182 12198,19635,4200,1923,-606,996 2 3766
-ps "
-char190 17565,18675,918,891,-987,891 2 3774
-34 "
-\- 17565,8175,0,0,-2097 0 51757
-char188 17565,18675,918,183,-279,183 2 3772
-14 "
-char189 17565,18675,918,0,156 2 3773
-12 "
-char170 7806,18360,0,3285,-1188,996 2 3754
-Of "
-char186 7806,18360,0,3303,-1197,996 2 3770
-Om "
-char171 11709,11160,0,741,-426,741 0 3755
-Fo "
-char187 11709,11160,0,0,777 0 3771
-Fc "
-char177 17565,12210,213,0,-2133 0 3761
-char166 13173,19083,5916,0,-4596 3 3750
-bb "
-char169 13173,19635,0,4470,-2679,996 2 3753
-co "
-char172 17565,10185,0,0,-2097 0 3756
-no "
-char174 13173,19635,0,4470,-2679,996 2 3758
-rg "
-char178 7317,18465,0,3258,-300,996 2 3762
-S2 "
-char179 7317,18465,0,3042,-957,996 2 3763
-S3 "
-char184 12198,195108,4995,0,1860 3 3768
-ac "
-char185 7317,18345,0,2562,-2493,996 2 3769
-S1 "
-char215 17565,12216,0,0,-2850 0 3799
-char247 17565,11610,0,0,-2667 0 3831
-char183 5856,10578,0,1095,-723,996 0 3767
-pc "
-fm 5856,18105,0,3918,-1725,996 2 51873
-sd 12198,18105,0,2577,-2925,996 2 51874
-dg 12198,18135,0,315,-1854,315 2 51755
-tm 16101,17850,0,2010,-2547,996 2 51796
-ah 12198,17940,0,1533,-4467,996 2 51935
-ao 12198,19005,0,114,-4878,114 2 51930
-f/ 2928,18675,918,8010,6531,996 2 51759
-em 17565,7350,0,423,330,423 0 51789
-en 12198,7350,0,936,786,936 0 51790
-dd 12198,18135,0,315,-1854,315 2 51773
-.i 5856,12630,0,1461,1425,996 0 51957
-aq 5856,18135,0,3051,-2388,996 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 13173,23640,255,2427,513,996 2 20166
-'c 10245,18165,255,2301,816,996 2 20198
-lq 9270,18135,0,4254,-1485,996 2 51838
-rq 9270,18135,0,4254,-1485,996 2 51746
-Bq 9270,2916,2784,0,3018 0 51772
-vz 8781,17940,0,3240,2154,996 2 51834
-fi 12684,18315,0,2934,795,996 2 51881
-fl 12684,18315,0,2949,744,996 2 51882
-ff 13662,18315,0,3921,888,996 2 51883
-Fi 18540,18315,0,2892,921,996 2 51884
-Fl 18540,18315,0,2928,849,996 2 51885
-ij 9759,18165,4995,3777,1905,996 3 51958
-bq 5856,2916,2784,0,3330 0 51756
-%0 22443,18675,975,1293,267,996 2 51901
-char175 12198,16434,0,1257,-3453,996 0 3759
-a- "
-ab 12198,17940,0,1890,-4329,996 2 51926
-a. 12198,17355,0,0,-6069 2 51927
-oe 16587,12885,255,912,783,912 0 51823
-OE 18051,18270,135,3174,363,996 2 51791
-fo 6342,11160,0,1608,-186,996 0 51886
-fc 6342,11160,0,537,885,537 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 10245,18135,0,0,1620 2 51944
-/l 4878,18165,0,3627,1932,996 2 51960
-a" 12198,18165,0,3174,-3894,996 2 51933
-ho 12198,879,4716,0,-2142 1 51934
-vZ 12198,23415,0,3390,2130,996 2 51802
-IJ 17076,18135,255,2781,1566,996 2 51942
diff --git a/contrib/groff/font/devlj4/UCR b/contrib/groff/font/devlj4/UCR
deleted file mode 100644
index 3b503992b270..000000000000
--- a/contrib/groff/font/devlj4/UCR
+++ /dev/null
@@ -1,759 +0,0 @@
-name UCR
-spacewidth 5856
-pcltypeface 4148
-pclproportional 1
-pclweight 0
-pclstyle 4
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -2439
-P . -4878
-P , -4878
-V A -1950
-A V -1950
-T o -3414
-T r -3414
-T c -3414
-T e -3414
-T d -3414
-T s -3414
-T y -3414
-T a -3414
-T w -3414
-T u -3414
-T J -3414
-L T -3414
-L Y -2925
-Y o -1950
-Y e -1950
-Y a -2439
-Y J -2925
-A W -1461
-W A -1461
-T A -2439
-V o -1461
-V e -1461
-V a -1461
-Y A -2439
-F A -975
-F . -2925
-F , -2925
-A T -2439
-A Y -2439
-v . -1950
-v , -1950
-y . -1950
-y , -1950
-T . -3414
-T , -3414
-L W -1461
-P A -1461
-V J -1461
-V . -2439
-V , -2439
-Y . -2925
-Y , -2925
-W o -975
-W e -975
-W a -975
-W . -1461
-W , -1461
-r . -1461
-r , -1461
-w . -1950
-w , -1950
-Y u -975
-A v -975
-A y -975
-A w -975
-o . -975
-o , -975
-p . -975
-p , -975
-e . -975
-e , -975
-b . -975
-b , -975
-O T -1461
-O V -486
-O Y -975
-O . -1461
-O , -1461
-L y -1950
-L O -1461
-L G -1461
-L C -1461
-L Q -1461
-P J -1461
-V y -486
-V u -486
-V O -486
-V G -486
-V C -486
-V Q -486
-D T -1461
-D V -486
-D Y -975
-D . -1461
-D , -1461
-Y O -975
-Y G -975
-Y C -975
-Y Q -975
-F o -486
-F e -486
-F a -486
-c . -975
-c , -975
-O A -486
-O W -486
-L U -1461
-R T -1461
-R V -486
-R Y -975
-R W -486
-G T -1461
-P o -975
-P g -1461
-P e -975
-P a -1461
-C A -486
-C . -1461
-C , -1461
-D A -486
-D W -486
-B T -1461
-B Y -975
-B . -1461
-B , -1461
-F J -486
-A O -486
-A G -486
-A C -486
-A U -486
-A Q -486
-W r -486
-W y -486
-W u -486
-W O -486
-W G -486
-W C -486
-W J -975
-W Q -486
-J A -486
-J . -486
-J , -486
-U A -486
-U . -1461
-U , -1461
-Q W -486
-f . -975
-f , -975
-T O -1461
-T G -1461
-T C -1461
-T Q -1461
-O X -486
-L o -975
-L e -975
-L q -1950
-G V -486
-G Y -975
-G W -486
-P T -975
-P V -486
-P Y -975
-C T -1461
-C V -486
-C Y -975
-D X -486
-B V -486
-B X -486
-B A -486
-B W -486
-S . -486
-S , -486
-X o -486
-X e -486
-X y -486
-X O -486
-X G -486
-X C -486
-X Q -486
-A o -486
-A e -486
-K o -975
-K e -975
-K y -975
-K w -975
-K O -975
-K G -975
-K C -975
-K Q -975
-o v -486
-o y -486
-o w -486
-h v -486
-h y -486
-n v -486
-n y -486
-m v -486
-m y -486
-r g -486
-p v -486
-p y -486
-c v -486
-c y -486
-c w -486
-v o -486
-v g -486
-v c -486
-v d -486
-v a -486
-v q -486
-e v -486
-e y -486
-b v -486
-b y -486
-b w -486
-s . -486
-s , -486
-y o -486
-y g -486
-y c -486
-y d -486
-y a -486
-y q -486
-a v -486
-a y -486
-a w -486
-w o -486
-w g -486
-w c -486
-w d -486
-w a -486
-w q -486
-T S -486
-L a -486
-L S -486
-P s -486
-P Z -486
-P X -486
-P W -486
-C X -486
-C W -486
-V S -486
-S T -486
-S V -486
-S Y -486
-S X -486
-S A -486
-S W -486
-Y S -486
-X a -486
-X u -486
-X S -486
-A t -486
-A g -486
-A c -486
-A d -486
-A a -486
-A u -486
-A q -486
-A S -486
-W S -486
-K c -975
-K u -975
-K S -975
-h w -486
-n w -486
-m w -486
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-p w -486
-v e -486
-v s -486
-e w -486
-s v -486
-s y -486
-s w -486
-y e -486
-y s -486
-w e -486
-w s -486
-k o -486
-k g -486
-k c -486
-k e -486
-k d -486
-k a -486
-k q -486
-O Z -486
-L J -486
-C Z -486
-Z o -486
-Z e -486
-Z d -486
-Z s -486
-Z y -486
-Z a -486
-Z w -486
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z J -486
-Z Q -486
-D Z -486
-B Z -486
-S Z -486
-X J -486
-A s -486
-A J -486
-K a -975
-K J -975
-K . -486
-K , -486
-r s -486
-k s -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -5364
-L ' -5364
-T char173 -3414
-T hy -3414
-T - -3414
-T en -3414
-T em -3414
-A cq -1461
-A ' -1461
-char173 T -3414
-hy T -3414
-- T -3414
-en T -3414
-em T -3414
-Y char173 -975
-Y hy -975
-Y - -975
-Y en -975
-Y em -975
-p cq -975
-p ' -975
-c cq -975
-c ' -975
-e cq -975
-e ' -975
-b cq -975
-b ' -975
-a cq -1461
-a ' -1461
-V char173 -486
-V hy -486
-V - -486
-V en -486
-V em -486
-h cq -1461
-h ' -1461
-n cq -1461
-n ' -1461
-m cq -1461
-m ' -1461
-W char173 -486
-W hy -486
-W - -486
-W en -486
-W em -486
-cq d -1950
-' d -1950
-s cq -486
-s ' -486
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -486
-X hy -486
-X - -486
-X en -486
-X em -486
-A char173 -486
-A hy -486
-A - -486
-A en -486
-A em -486
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-cq s -486
-' s -486
-char173 X -486
-hy X -486
-- X -486
-char173 A -486
-hy A -486
-- A -486
-en X -486
-en A -486
-em X -486
-K cq -486
-K ' -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-charset
-! 7806,18135 2 3617
-dq 9759,18135 2 3618
-" "
-sh 12198,18360,975 2 3619
-# "
-Do 12198,18360,630 2 3620
-$ "
-% 17565,18675,975 2 3621
-& 16101,18390,255 2 3622
-cq 5856,18135 2 51751
-' "
-( 5856,18135,2520 2 3624
-) 5856,18135,2520 2 3625
-* 12198,18390 2 3626
-+ 17565,12495 0 3627
-, 5856,2970,2730 0 3628
-char173 5856,7560 0 3629
-hy "
-- "
-. 5856,2760 0 3630
-sl 5856,18165,1980 2 3631
-/ "
-0 12198,18360,255 2 3632
-1 12198,18105 2 3633
-2 12198,18360 2 3634
-3 12198,18360,255 2 3635
-4 12198,18105 2 3636
-5 12198,18105,255 2 3637
-6 12198,18360,255 2 3638
-7 12198,18105 2 3639
-8 12198,18360,255 2 3640
-9 12198,18360,255 2 3641
-: 5856,12333 0 3642
-; 5856,12333,2730 0 3643
-< 26346,16068 0 3644
-= 17565,9570 0 3645
-> 26346,16068 0 3646
-? 11220,18390 2 3647
-at 17565,18438,3246 2 3648
-@ "
-A 13662,18135 2 3649
-B 13173,18135 2 3650
-C 13173,18390,255 2 3651
-D 13662,18135 2 3652
-E 11220,18135 2 3653
-F 10734,18135 2 3654
-G 13662,18390,255 2 3655
-H 13662,18135 2 3656
-I 5856,18135 2 3657
-J 11220,18135,255 2 3658
-K 13173,18135 2 3659
-L 10245,18135 2 3660
-M 18051,18135 2 3661
-N 14148,18135 2 3662
-O 13662,18390,255 2 3663
-P 12198,18135 2 3664
-Q 13662,18390,255 2 3665
-R 13173,18135 2 3666
-S 12684,18390,255 2 3667
-T 12684,18135 2 3668
-U 13662,18135,255 2 3669
-V 12198,18135 2 3670
-W 18051,18135 2 3671
-X 13662,18135 2 3672
-Y 12198,18135 2 3673
-Z 12198,18135 2 3674
-lB 5856,18135,2520 2 3675
-[ "
-rs 5856,18165,1980 2 3676
-\ "
-rB 5856,18135,2520 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 5856,18135 2 51808
-` "
-a 10734,12885,255 0 3681
-b 10734,18165,255 2 3682
-c 10245,12885,255 0 3683
-d 10734,18165,255 2 3684
-e 10245,12885,255 0 3685
-f 7806,18315 2 3686
-g 10734,12885,4995 1 3687
-h 10734,18165 2 3688
-i 4878,18165 2 3689
-j 4878,18165,4995 3 3690
-k 10734,18165 2 3691
-l 4878,18165 2 3692
-m 16101,12885 0 3693
-n 10734,12885 0 3694
-o 10734,12885,255 0 3695
-p 10734,12885,4680 1 3696
-q 10734,12885,4680 1 3697
-r 7317,12885 0 3698
-s 9759,12885,255 0 3699
-t 7806,15954,255 0 3700
-u 10734,12630,255 0 3701
-v 10245,12630 0 3702
-w 17076,12630 0 3703
-x 10245,12630 0 3704
-y 10734,12630,4680 1 3705
-z 8781,12630 0 3706
-lC 11709,20130,6075 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 11709,20130,6075 3 3709
-} "
-ti 26346,8952 0 51876
-char192 13662,23640 2 3776
-`A "
-char194 13662,23415 2 3778
-^A "
-char200 11220,23640 2 3784
-`E "
-char202 11220,23415 2 3786
-^E "
-char203 11220,22710 2 3787
-:E "
-char206 5856,23415 2 3790
-^I "
-char207 5856,22710 2 3791
-:I "
-char180 12198,18165 2 3764
-aa "
-ga 12198,18165 2 3680
-a^ 12198,17940 2 3678
-^ "
-char168 12198,17355 2 3752
-ad "
-a~ 12198,17844 2 3710
-~ "
-char217 13662,23640,255 2 3801
-`U "
-char219 13662,23415,255 2 3803
-^U "
-char221 12198,23640 2 3805
-'Y "
-char253 10734,18165,4680 3 3837
-'y "
-char176 12198,18360 2 3760
-de "
-char199 13173,18390,4755 3 3783
-,C "
-char231 10245,12885,4755 1 3815
-,c "
-char209 14148,23121 2 3793
-~N "
-char241 10734,17844 2 3825
-~n "
-char161 7806,12591,5544 1 3745
-r! "
-char191 11220,12480,5910 1 3775
-r? "
-char164 12198,15684 0 3748
-Cs "
-char163 12198,18360 2 3747
-Po "
-char165 12198,18105 2 3749
-Ye "
-char167 12198,18390,255 2 3751
-sc "
-Fn 12198,18315 2 51871
-char162 12198,18360,630 2 3746
-ct "
-char226 10734,17940,255 2 3810
-^a "
-char234 10245,17940,255 2 3818
-^e "
-char244 10734,17940,255 2 3828
-^o "
-char251 10734,17940,255 2 3835
-^u "
-char225 10734,18165,255 2 3809
-'a "
-char233 10245,18165,255 2 3817
-'e "
-char243 10734,18165,255 2 3827
-'o "
-char250 10734,18165,255 2 3834
-'u "
-char224 10734,18165,255 2 3808
-`a "
-char232 10245,18165,255 2 3816
-`e "
-char242 10734,18165,255 2 3826
-`o "
-char249 10734,18165,255 2 3833
-`u "
-char228 10734,17355,255 2 3812
-:a "
-char235 10245,17355,255 2 3819
-:e "
-char246 10734,17355,255 2 3830
-:o "
-char252 10734,17355,255 2 3836
-:u "
-char197 13662,24480 2 3781
-oA "
-char238 5856,17940 2 3822
-^i "
-char216 13662,19767,1851 2 3800
-/O "
-char198 18540,18135 2 3782
-AE "
-char229 10734,19005,255 2 3813
-oa "
-char237 5856,18165 2 3821
-'i "
-char248 10734,14274,2115 0 3832
-/o "
-char230 16587,12885,255 0 3814
-ae "
-char196 13662,22710 2 3780
-:A "
-char236 5856,18165 2 3820
-`i "
-char214 13662,22710,255 2 3798
-:O "
-char220 13662,22710,255 2 3804
-:U "
-char201 11220,23640 2 3785
-'E "
-char239 5856,17355 2 3823
-:i "
-char223 11709,18315,255 2 3807
-ss "
-char212 13662,23415,255 2 3796
-^O "
-char193 13662,23640 2 3777
-'A "
-char195 13662,23121 2 3779
-~A "
-char227 10734,17844,255 2 3811
-~a "
-char208 13662,18135 2 3792
--D "
-char240 10734,18531,255 2 3824
-Sd "
-char205 5856,23640 2 3789
-'I "
-char204 5856,23640 2 3788
-`I "
-char211 13662,23640,255 2 3795
-'O "
-char210 13662,23640,255 2 3794
-`O "
-char213 13662,23121,255 2 3797
-~O "
-char245 10734,17844,255 2 3829
-~o "
-vS 12684,23415,255 2 51795
-vs 9759,17940,255 2 51827
-char218 13662,23640,255 2 3802
-'U "
-:Y 12198,22710 2 51801
-char255 10734,17355,4680 3 3839
-:y "
-char222 12198,18135 2 3806
-TP "
-char254 10734,18165,4680 3 3838
-Tp "
-char181 14637,12630,4350 0 3765
-char182 12198,19635,4200 2 3766
-ps "
-char190 17565,18675,975 2 3774
-34 "
-\- 17565,8175 0 51757
-char188 17565,18675,975 2 3772
-14 "
-char189 17565,18675,975 2 3773
-12 "
-char170 7317,18360 2 3754
-Of "
-char186 7317,18360 2 3770
-Om "
-char171 11709,11010 0 3755
-Fo "
-char187 11709,11010 0 3771
-Fc "
-char177 17565,12210,213 0 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19635 2 3753
-co "
-char172 17565,10185 0 3756
-no "
-char174 13173,19635 2 3758
-rg "
-char178 7317,18465 2 3762
-S2 "
-char179 7317,18465 2 3763
-S3 "
-char184 12198,195348,4755 3 3768
-ac "
-char185 7317,18345 2 3769
-S1 "
-char215 17565,12216 0 3799
-char247 17565,11610 0 3831
-char183 5856,10755 0 3767
-pc "
-fm 5856,18105 2 51873
-sd 12198,18105 2 51874
-dg 12198,18135 2 51755
-tm 16101,17850 2 51796
-ah 12198,17940 2 51935
-ao 12198,19005 2 51930
-f/ 2439,18675,975 2 51759
-em 17565,7350 0 51789
-en 12198,7350 0 51790
-dd 12198,18135 2 51773
-.i 5856,12630 0 51957
-aq 5856,18135 2 3623
-bu 13173,14226 0 51889
-'C 13173,23640,255 2 20166
-'c 10245,18165,255 2 20198
-lq 9270,18135 2 51838
-rq 9270,18135 2 51746
-Bq 9270,3006,2694 0 51772
-vz 8781,17940 2 51834
-fi 12198,18315 2 51881
-fl 12684,18315 2 51882
-ff 13662,18315 2 51883
-Fi 17826,18315 2 51884
-Fl 17694,18315 2 51885
-ij 9759,18165,4995 3 51958
-bq 5856,3006,2694 0 51756
-%0 22443,18675,975 2 51901
-char175 12198,16440 0 3759
-a- "
-ab 12198,17940 2 51926
-a. 12198,17700 2 51927
-oe 16587,12885,255 0 51823
-OE 18051,18270,135 2 51791
-fo 6342,11010 0 51886
-fc 6342,11010 0 51887
-sq 19029,15624 0 51899
-/L 10245,18135 2 51944
-/l 4878,18165 2 51960
-a" 12198,18165 2 51933
-ho 12198,363,4077 0 51934
-vZ 12198,23415 2 51802
-IJ 17076,18135,255 2 51942
diff --git a/contrib/groff/font/devlj4/UI b/contrib/groff/font/devlj4/UI
deleted file mode 100644
index 12bcc26748de..000000000000
--- a/contrib/groff/font/devlj4/UI
+++ /dev/null
@@ -1,983 +0,0 @@
-name UI
-spacewidth 8781
-slant 16.500000
-pcltypeface 4148
-pclproportional 1
-pclweight 0
-pclstyle 1
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -5853
-P . -5364
-P , -5364
-V A -3414
-A V -4389
-T o -4389
-T r -4389
-T c -4389
-T e -4389
-T d -4389
-T s -4389
-T y -4389
-T a -4389
-T w -4389
-T u -4389
-T J -4389
-L T -4389
-L Y -4878
-Y o -3903
-Y e -3903
-Y a -3414
-Y J -3903
-A W -3903
-W A -1950
-T A -3414
-V o -2439
-V e -2439
-V a -2439
-Y A -3414
-F A -2925
-F . -3903
-F , -3903
-A T -4389
-A Y -4389
-v . -3903
-v , -3903
-y . -3903
-y , -3903
-T . -3903
-T , -3903
-L W -3903
-P A -2439
-V J -2439
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -975
-W e -975
-W a -975
-W . -2925
-W , -2925
-r . -2439
-r , -2439
-w . -3414
-w , -3414
-Y u -2439
-A v -2925
-A y -2439
-A w -2439
-o . -2439
-o , -2439
-p . -2439
-p , -2439
-e . -1950
-e , -1950
-b . -2439
-b , -2439
-O T -2439
-O V -1950
-O Y -2439
-O . -1950
-O , -1950
-L y -2925
-L O -2439
-L G -1950
-L C -1950
-L Q -1461
-P J -975
-V y -1461
-V u -1461
-V O -975
-V G -975
-V C -975
-V Q -975
-D T -2439
-D V -1950
-D Y -2439
-D . -1950
-D , -1950
-Y O -975
-Y G -975
-Y C -975
-Y Q -975
-F o -1461
-F e -1461
-F a -975
-c . -1950
-c , -1950
-O A -975
-O W -975
-L U -1461
-R T -1461
-R V -1461
-R Y -1461
-R W -975
-G T -1950
-P o -975
-P g -975
-P e -975
-P a -975
-C A -975
-C . -1950
-C , -1950
-D A -975
-D W -975
-B T -1461
-B Y -1461
-B . -1950
-B , -1950
-F J -1461
-A O -1461
-A G -1461
-A C -1461
-A U -1461
-A Q -1461
-W r -486
-W y -486
-W u -486
-W O -486
-W G -486
-W C -486
-W J -975
-W Q -486
-J A -1461
-J . -2439
-J , -2439
-U A -975
-U . -1950
-U , -1950
-Q W -975
-f . -1950
-f , -1950
-T O -975
-T G -975
-T C -975
-T Q -975
-O X -975
-L o -1950
-L e -1950
-L q -1950
-G V -1950
-G Y -1950
-G W -975
-G . -1461
-G , -1461
-P T -1461
-P V -1461
-P Y -1461
-C T -1461
-C V -1461
-C Y -1461
-D X -975
-B V -1461
-B X -975
-B A -975
-B W -975
-S . -1950
-S , -1950
-X o -1461
-X e -1461
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1461
-A e -1461
-K o -975
-K e -975
-K y -975
-K w -975
-K O -975
-K G -975
-K C -975
-K Q -975
-o v -1461
-o y -975
-o x -1461
-o w -975
-h v -1461
-h y -975
-n v -1461
-n y -975
-m v -1461
-m y -975
-r g -486
-g . -975
-g , -975
-p v -1461
-p y -975
-p x -1461
-c v -1461
-c y -975
-c w -975
-v o -975
-v g -975
-v c -975
-v d -975
-v a -975
-v q -975
-e v -1461
-e y -975
-b v -1461
-b y -975
-b w -975
-s . -1461
-s , -1461
-y o -975
-y g -975
-y c -975
-y d -975
-y a -975
-y q -975
-f g -486
-x o -1461
-x g -1461
-x c -1461
-x e -1461
-x d -1461
-x a -1461
-x q -1461
-a v -1461
-a y -975
-a w -975
-w o -975
-w g -975
-w c -975
-w d -975
-w a -975
-w q -975
-T i -975
-T S -975
-L a -1461
-L S -1461
-G X -486
-G A -486
-P s -486
-P Z -975
-P X -1461
-P W -975
-C X -975
-C W -975
-V i -975
-V S -975
-S T -1461
-S V -1461
-S Y -1461
-S X -975
-S A -975
-S W -975
-Y i -975
-Y S -975
-X a -1461
-X u -1461
-X S -1461
-A t -975
-A g -1461
-A c -1461
-A d -1461
-A a -1461
-A u -1461
-A q -1461
-A S -1461
-W i -486
-W S -486
-K c -975
-K u -975
-K S -975
-t g -486
-t . -975
-t , -975
-h w -975
-h . -975
-h , -975
-n w -975
-n . -975
-n , -975
-m w -975
-m . -975
-m , -975
-l . -975
-l , -975
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-i . -975
-i , -975
-p w -975
-c x -975
-v e -975
-v s -486
-e x -975
-e w -975
-z . -975
-z , -975
-d . -975
-d , -975
-s v -975
-s y -975
-s x -486
-s w -975
-y e -975
-y s -486
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-x s -975
-x . -975
-x , -975
-a . -975
-a , -975
-w e -975
-w s -486
-j . -975
-j , -975
-u . -975
-k o -486
-k g -486
-k c -486
-k e -486
-k d -486
-k a -486
-k q -486
-k . -975
-k , -975
-O Z -975
-H . -975
-H , -975
-N . -975
-N , -975
-M . -975
-M , -975
-L J -975
-L . -975
-L , -975
-R . -975
-R , -975
-G Z -486
-I . -975
-I , -975
-C Z -975
-E . -975
-E , -975
-Z o -975
-Z e -975
-Z d -975
-Z s -975
-Z y -975
-Z a -975
-Z w -975
-Z u -975
-Z O -975
-Z G -975
-Z C -975
-Z S -975
-Z J -975
-Z Q -975
-Z . -975
-Z , -975
-D Z -975
-B Z -975
-S Z -975
-X J -975
-X . -975
-X , -975
-A s -975
-A J -975
-A . -975
-A , -975
-K a -975
-K J -975
-K . -975
-K , -975
-t o -486
-t c -486
-t e -486
-t d -486
-t s -486
-t a -486
-t q -486
-o t -486
-o z -486
-h t -486
-n t -486
-m t -486
-r s -486
-p t -486
-p z -486
-c t -486
-c z -486
-e t -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z s -486
-z a -486
-z q -486
-b t -486
-b z -486
-s t -486
-s z -486
-x t -486
-x v -486
-x y -486
-x w -486
-x u -486
-a t -486
-k s -486
-X T -486
-X V -486
-X Y -486
-X W -486
-X U -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -7317
-L ' -7317
-T char173 -4389
-T hy -4389
-T - -4389
-T en -4389
-T em -4389
-A cq -3903
-A ' -3903
-char173 T -4389
-hy T -4389
-- T -4389
-en T -4389
-em T -4389
-Y char173 -2439
-Y hy -2439
-Y - -2439
-Y en -2439
-Y em -2439
-p cq -2925
-p ' -2925
-c cq -2925
-c ' -2925
-e cq -2925
-e ' -2925
-b cq -2925
-b ' -2925
-a cq -2925
-a ' -2925
-V char173 -1461
-V hy -1461
-V - -1461
-V en -1461
-V em -1461
-h cq -2439
-h ' -2439
-n cq -2439
-n ' -2439
-m cq -2439
-m ' -2439
-R cq -975
-R ' -975
-W char173 -486
-W hy -486
-W - -486
-W en -486
-W em -486
-cq d -2925
-' d -2925
-s cq -1950
-s ' -1950
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1461
-A hy -1461
-A - -1461
-A en -1461
-A em -1461
-K char173 -975
-K hy -975
-K - -975
-K en -975
-K em -975
-cq s -1950
-' s -1950
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1461
-hy A -1461
-- A -1461
-en X -1461
-en A -1461
-em X -1461
-x cq -1461
-x ' -1461
-X cq -1461
-X ' -1461
-K cq -1461
-K ' -1461
-t g -486
-t cq -975
-t ' -975
-l cq -975
-l ' -975
-r cq -975
-r ' -975
-g cq -975
-g ' -975
-i cq -975
-i ' -975
-v cq -975
-v ' -975
-z cq -975
-z ' -975
-d cq -975
-d ' -975
-y cq -975
-y ' -975
-f cq -975
-f ' -975
-w cq -975
-w ' -975
-j cq -975
-j ' -975
-u cq -975
-u ' -975
-k cq -975
-k ' -975
-T cq -975
-T ' -975
-O cq -975
-O ' -975
-H cq -975
-H ' -975
-N cq -975
-N ' -975
-M cq -975
-M ' -975
-G cq -975
-G ' -975
-I cq -975
-I ' -975
-P cq -975
-P ' -975
-C cq -975
-C ' -975
-V cq -975
-V ' -975
-E cq -975
-E ' -975
-Z cq -975
-Z ' -975
-Z char173 -975
-Z hy -975
-Z - -975
-Z en -975
-Z em -975
-D cq -975
-D ' -975
-B cq -975
-B ' -975
-S cq -975
-S ' -975
-Y cq -975
-Y ' -975
-F cq -975
-F ' -975
-W cq -975
-W ' -975
-J cq -975
-J ' -975
-U cq -975
-U ' -975
-cq t -1461
-' t -1461
-cq n -1461
-' n -1461
-cq m -1461
-' m -1461
-cq l -975
-' l -975
-cq r -1461
-' r -1461
-cq v -1461
-' v -1461
-cq T -975
-' T -975
-cq N -975
-' N -975
-cq M -975
-' M -975
-cq L -975
-' L -975
-cq R -975
-' R -975
-cq D -975
-' D -975
-x char173 -486
-x hy -486
-x - -486
-x en -486
-x em -486
-charset
-! 8781,18165,0,1956,81,1000 2 3617
-dq 13173,18246,0,2049,-4233,1000 2 3618
-" "
-sh 16587,18105,0,1020,-1137,1000 2 3619
-# "
-Do 16587,18750,765,0,-2391 2 3620
-$ "
-% 26346,18720,840,0,-3195 2 3621
-& 20004,18495,360,0,-942 2 3622
-cq 8781,18135,0,3114,-2751,1000 2 51751
-' "
-( 8781,18135,2397,2823,-1443,1000 2 3624
-) 8781,18135,2397,0,1764 2 3625
-* 16587,18495,0,0,-4155 2 3626
-+ 26346,14745,105,0,-4860 0 3627
-, 8781,3000,3135,0,1794 0 3628
-char173 8781,7680,0,561,147,561 0 3629
-hy "
-- "
-. 8781,2970,0,0,192 0 3630
-sl 8781,18135,1500,4326,3072,1000 2 3631
-/ "
-0 16587,18465,360,1602,-243,1000 2 3632
-1 16587,18105,0,0,-4467 2 3633
-2 16587,18465,0,540,78,540 2 3634
-3 16587,18465,360,1374,-354,1000 2 3635
-4 16587,18105,0,843,609,843 2 3636
-5 16587,18105,360,1494,-396,1000 2 3637
-6 16587,18465,360,1632,-966,1000 2 3638
-7 16587,18105,0,1188,-2583,1000 2 3639
-8 16587,18465,360,1356,-177,1000 2 3640
-9 16587,18465,360,630,171,630 2 3641
-: 8781,12615,0,330,192,330 0 3642
-; 8781,12615,3135,405,1794,405 0 3643
-< 26346,16068,0,0,-3981 0 3644
-= 26346,10500,0,0,-4950 0 3645
-> 26346,16068,0,0,-3981 0 3646
-? 13662,18315,0,1380,-1017,1000 2 3647
-at 26349,21030,2745,243,-1713,243 2 3648
-@ "
-A 19515,18135,0,0,2400 2 3649
-B 16587,18135,0,1641,684,1000 2 3650
-C 18540,18495,360,1554,-990,1000 2 3651
-D 19029,18135,0,477,804,477 2 3652
-E 15126,18135,0,3099,699,1000 2 3653
-F 14637,18135,0,3549,702,1000 2 3654
-G 19515,18495,360,1095,-1047,1000 2 3655
-H 19029,18135,0,2322,852,1000 2 3656
-I 7317,18135,0,2439,852,1000 2 3657
-J 14637,18135,360,2559,1242,1000 2 3658
-K 17565,18135,0,2910,417,1000 2 3659
-L 14148,18135,0,0,693 2 3660
-M 23907,18135,0,2115,669,1000 2 3661
-N 19029,18135,0,2688,750,1000 2 3662
-O 20004,18495,360,582,-948,582 2 3663
-P 15612,18135,0,2715,708,1000 2 3664
-Q 20490,18495,360,168,-1080,168 2 3665
-R 17076,18135,0,1728,729,1000 2 3666
-S 17076,18495,360,1455,-21,1000 2 3667
-T 16587,18135,0,3801,-2427,1000 2 3668
-U 19029,18135,360,2250,-801,1000 2 3669
-V 19029,18135,0,3789,-2919,1000 2 3670
-W 26346,18135,0,4122,-2541,1000 2 3671
-X 19029,18135,0,3081,1605,1000 2 3672
-Y 18051,18135,0,3720,-2763,1000 2 3673
-Z 16101,18135,0,2598,1719,1000 2 3674
-lB 8781,18135,2397,3690,1038,1000 2 3675
-[ "
-rs 8781,18135,1500,0,-2547 2 3676
-\ "
-rB 8781,18135,2397,2013,2715,1000 2 3677
-] "
-ha 13173,19758,0,36,36,36 2 51875
-_ 13173,191367,6588,1317,1317,1000 3 3679
-oq 8781,18135,0,2658,-2295,1000 2 51808
-` "
-a 14148,12990,360,87,729,87 0 3681
-b 15126,18165,360,129,1092,129 2 3682
-c 14148,12990,360,534,114,534 0 3683
-d 15126,18165,360,2658,144,1000 2 3684
-e 14148,12990,360,567,153,567 0 3685
-f 9759,18315,0,3546,-33,1000 2 3686
-g 15126,12990,5169,1059,1470,1000 1 3687
-h 15126,18165,0,126,1185,126 2 3688
-i 6342,18165,0,3060,1143,1000 2 3689
-j 6342,18165,4995,2970,4578,1000 3 3690
-k 14148,18165,0,1248,1092,1000 2 3691
-l 6342,18165,0,2937,1137,1000 2 3692
-m 22932,12990,0,363,1182,363 0 3693
-n 15126,12990,0,117,1182,117 0 3694
-o 15126,12990,360,12,261,12 0 3695
-p 15126,12990,4680,9,2592,9 1 3696
-q 15126,12990,4680,1146,132,1000 1 3697
-r 9270,12990,0,2499,1026,1000 0 3698
-s 13173,12990,360,579,960,579 0 3699
-t 9759,15843,360,2022,-864,1000 0 3700
-u 15126,12630,360,1023,261,1000 0 3701
-v 14637,12630,0,1902,-1086,1000 0 3702
-w 22932,12630,0,1953,-1578,1000 0 3703
-x 14637,12630,0,1035,1767,1000 0 3704
-y 14637,12630,4680,1992,-963,1000 1 3705
-z 12684,12630,0,1344,1365,1000 0 3706
-lC 11709,20130,6075,3315,-1740,1000 3 3707
-{ "
-ba 13173,19758,6588,0,-4596 3 3708
-| "
-rC 11709,20130,6075,0,3183 3 3709
-} "
-ti 26346,8952,0,0,-4029 0 51876
-char192 19515,23100,0,0,2400 2 3776
-`A "
-char194 19515,23085,0,0,2400 2 3778
-^A "
-char200 15126,23100,0,3099,699,1000 2 3784
-`E "
-char202 15126,23085,0,3099,699,1000 2 3786
-^E "
-char203 15126,22638,0,3099,699,1000 2 3787
-:E "
-char206 7317,23085,0,5385,852,1000 2 3790
-^I "
-char207 7317,22638,0,6231,852,1000 2 3791
-:I "
-char180 16587,17970,0,0,-7479 2 3764
-aa "
-ga 16587,17970,0,0,-6621 2 3680
-a^ 16587,18105,0,0,-5334 2 3678
-^ "
-char168 16587,17943,0,174,-6261,174 2 3752
-ad "
-a~ 16587,17724,0,312,-5604,312 2 3710
-~ "
-char217 19029,23100,360,2250,-801,1000 2 3801
-`U "
-char219 19029,23085,360,2250,-801,1000 2 3803
-^U "
-char221 18051,23100,0,3720,-2763,1000 2 3805
-'Y "
-char253 14637,17970,4680,1992,-963,1000 3 3837
-'y "
-char176 16587,18465,0,0,-4104 2 3760
-de "
-char199 18540,18495,4875,1554,-990,1000 3 3783
-,C "
-char231 14148,12990,4875,534,114,534 1 3815
-,c "
-char209 19029,23019,0,2688,750,1000 2 3793
-~N "
-char241 15126,17724,0,1044,1182,1000 2 3825
-~n "
-char161 8781,12576,5589,54,1983,54 1 3745
-r! "
-char191 13662,12573,5742,0,921 1 3775
-r? "
-char164 16587,15684,0,126,-1533,126 0 3748
-Cs "
-char163 16587,18465,0,2265,291,1000 2 3747
-Po "
-char165 16587,18105,0,4818,-1089,1000 2 3749
-Ye "
-char167 16587,18495,360,0,-3750 2 3751
-sc "
-Fn 16587,18315,0,330,-3528,330 2 51871
-char162 16587,18750,765,0,-2322 2 3746
-ct "
-char226 14148,18105,360,711,729,711 2 3810
-^a "
-char234 14148,18105,360,711,153,711 2 3818
-^e "
-char244 15126,18105,360,222,261,222 2 3828
-^o "
-char251 15126,18105,360,1023,261,1000 2 3835
-^u "
-char225 14148,17970,360,690,729,690 2 3809
-'a "
-char233 14148,17970,360,690,153,690 2 3817
-'e "
-char243 15126,17970,360,201,261,201 2 3827
-'o "
-char250 15126,17970,360,1023,261,1000 2 3834
-'u "
-char224 14148,17970,360,87,729,87 2 3808
-`a "
-char232 14148,17970,360,567,153,567 2 3816
-`e "
-char242 15126,17970,360,12,261,12 2 3826
-`o "
-char249 15126,17970,360,1023,261,1000 2 3833
-`u "
-char228 14148,17943,360,1395,729,1000 2 3812
-:a "
-char235 14148,17943,360,1395,153,1000 2 3819
-:e "
-char246 15126,17943,360,906,261,906 2 3830
-:o "
-char252 15126,17943,360,1023,261,1000 2 3836
-:u "
-char197 19515,25923,0,0,2400 2 3781
-oA "
-char238 6342,18105,0,4614,1155,1000 2 3822
-^i "
-char216 20004,18495,360,2847,1161,1000 2 3800
-/O "
-char198 25857,18135,0,3231,2919,1000 2 3782
-AE "
-char229 14148,20490,360,87,729,87 2 3813
-oa "
-char237 6342,17970,0,4593,1155,1000 2 3821
-'i "
-char248 15126,12990,360,1242,1386,1000 0 3832
-/o "
-char230 22443,12990,360,165,384,165 0 3814
-ae "
-char196 19515,22638,0,132,2400,132 2 3780
-:A "
-char236 6342,17970,0,1737,1155,1000 2 3820
-`i "
-char214 20004,22638,360,582,-948,582 2 3798
-:O "
-char220 19029,22638,360,2250,-801,1000 2 3804
-:U "
-char201 15126,23100,0,3099,699,1000 2 3785
-'E "
-char239 6342,17943,0,5298,1155,1000 2 3823
-:i "
-char223 16101,18315,360,1320,939,1000 2 3807
-ss "
-char212 20004,23085,360,582,-948,582 2 3796
-^O "
-char193 19515,23100,0,0,2400 2 3777
-'A "
-char195 19515,23019,0,936,2400,936 2 3779
-~A "
-char227 14148,17724,360,1533,729,1000 2 3811
-~a "
-char208 19029,18135,0,477,804,477 2 3792
--D "
-char240 15126,18315,360,357,108,357 2 3824
-Sd "
-char205 7317,23100,0,5619,852,1000 2 3789
-'I "
-char204 7317,23100,0,2787,852,1000 2 3788
-`I "
-char211 20004,23100,360,582,-948,582 2 3795
-'O "
-char210 20004,23100,360,582,-948,582 2 3794
-`O "
-char213 20004,23019,360,693,-948,693 2 3797
-~O "
-char245 15126,17724,360,1044,261,1000 2 3829
-~o "
-vS 17076,23085,360,1629,-21,1000 2 51795
-vs 13173,18234,360,2241,960,1000 2 51827
-char218 19029,23100,360,2250,-801,1000 2 3802
-'U "
-:Y 18051,22638,0,3720,-2763,1000 2 51801
-char255 14637,17943,4680,1992,-963,1000 3 3839
-:y "
-char222 15612,18135,0,1692,717,1000 2 3806
-TP "
-char254 15126,18165,4680,9,2592,9 3 3838
-Tp "
-char181 14637,12630,4350,1122,2931,1000 0 3765
-char182 16590,19635,4200,0,-2379 2 3766
-ps "
-char190 26346,18465,945,0,-3291 2 3774
-34 "
-\- 26346,8070,0,0,-4869 0 51757
-char188 26346,18465,945,0,-3621 2 3772
-14 "
-char189 26346,18465,945,0,-3087 2 3773
-12 "
-char170 10734,18465,0,1791,-1671,1000 2 3754
-Of "
-char186 10734,18465,0,2232,-1599,1000 2 3770
-Om "
-char171 14637,11046,0,468,-876,468 0 3755
-Fo "
-char187 14637,11046,0,0,537 0 3771
-Fc "
-char177 26346,14910,0,0,-4770 0 3761
-char166 13173,19083,5916,0,-4596 3 3750
-bb "
-char169 13173,19635,0,4683,-2892,1000 2 3753
-co "
-char172 26346,11697,0,0,-4425 0 3756
-no "
-char174 13173,19635,0,4683,-2892,1000 2 3758
-rg "
-char178 10245,18465,0,1800,-1065,1000 2 3762
-S2 "
-char179 10245,18465,0,1941,-1134,1000 2 3763
-S3 "
-char184 16587,195048,4875,0,-1797 3 3768
-ac "
-char185 10245,18345,0,693,-3387,693 2 3769
-S1 "
-char215 26346,14010,0,0,-6081 0 3799
-char247 26346,12255,0,0,-4845 0 3831
-char183 8781,10935,0,0,-2136 0 3767
-pc "
-fm 8781,18105,0,1911,-3000,1000 2 51873
-sd 16587,18105,0,0,-3000 2 51874
-dg 16587,18135,0,0,-2772 2 51755
-tm 16128,17850,0,2196,-2760,1000 2 51796
-ah 16587,18234,0,534,-6378,534 2 51935
-ao 16587,20490,0,0,-6318 2 51930
-f/ 2439,18465,945,8739,7344,1000 2 51759
-em 26346,7380,0,0,-2343 0 51789
-en 16587,7470,0,24,-378,24 0 51790
-dd 16587,18135,0,0,-2799 2 51773
-.i 6342,12630,0,1374,1155,1000 0 51957
-aq 8781,18246,0,2136,-4233,1000 2 3623
-bu 13173,14226,0,0,-498 0 51889
-'C 18540,23100,360,1554,-990,1000 2 20166
-'c 14148,17970,360,690,114,690 2 20198
-lq 13173,18135,0,3186,-2322,1000 2 51838
-rq 13173,18135,0,3246,-2382,1000 2 51746
-Bq 13173,2925,3150,0,1596 0 51772
-vz 12684,18234,0,2487,1365,1000 2 51834
-fi 16101,18315,0,2976,-249,1000 2 51881
-fl 16101,18315,0,2811,-216,1000 2 51882
-ff 18051,18315,0,3666,-165,1000 2 51883
-Fi 24396,18315,0,2886,-174,1000 2 51884
-Fl 24396,18315,0,2748,-168,1000 2 51885
-ij 12684,18165,4995,2970,1143,1000 3 51958
-bq 8781,2925,3150,0,2349 0 51756
-%0 26346,18720,840,426,-315,426 2 51901
-char175 16587,17040,0,327,-5010,327 2 3759
-a- "
-ab 16587,17937,0,0,-5469 2 51926
-a. 16587,17943,0,0,-8355 2 51927
-oe 23907,12990,360,141,-243,141 0 51823
-OE 26346,18270,135,3102,-987,1000 2 51791
-fo 9759,11046,0,438,-1293,438 0 51886
-fc 9759,11046,0,0,-363 0 51887
-sq 19029,15624,0,0,-2022 0 51899
-/L 14148,18135,0,0,693 2 51944
-/l 6342,18165,0,2937,1122,1000 2 51960
-a" 16587,17970,0,2460,-5865,1000 2 51933
-ho 16587,696,4458,0,-6957 0 51934
-vZ 16101,23085,0,2598,1719,1000 2 51802
-IJ 20976,18135,360,2559,852,1000 2 51942
diff --git a/contrib/groff/font/devlj4/UR b/contrib/groff/font/devlj4/UR
deleted file mode 100644
index b7eba7cfca46..000000000000
--- a/contrib/groff/font/devlj4/UR
+++ /dev/null
@@ -1,880 +0,0 @@
-name UR
-spacewidth 8781
-pcltypeface 4148
-pclproportional 1
-pclweight 0
-pclstyle 0
-ligatures fi fl ff ffi ffl 0
-kernpairs
-L V -3903
-P . -4389
-P , -4389
-V A -3903
-A V -3903
-T o -4878
-T r -4878
-T c -4878
-T e -4878
-T d -4878
-T s -4878
-T y -4878
-T a -4878
-T w -4878
-T u -4878
-T J -4878
-L T -4878
-L Y -4389
-Y o -4389
-Y e -4389
-Y a -4389
-Y J -4389
-A W -2439
-W A -2439
-T A -4389
-V o -2925
-V e -2925
-V a -2925
-Y A -4389
-F A -2925
-F . -3903
-F , -3903
-A T -4389
-A Y -4389
-v . -3903
-v , -3903
-y . -3903
-y , -3903
-T . -3903
-T , -3903
-L W -2439
-P A -2925
-V J -3903
-V . -3903
-V , -3903
-Y . -3903
-Y , -3903
-W o -1950
-W e -1950
-W a -1950
-W . -3414
-W , -3414
-r . -2439
-r , -2439
-w . -3414
-w , -3414
-Y u -2925
-A v -2439
-A y -1950
-A w -2439
-o . -2925
-o , -2925
-p . -2925
-p , -2925
-e . -2925
-e , -2925
-b . -2925
-b , -2925
-O T -1950
-O V -1461
-O Y -1950
-O . -2925
-O , -2925
-L y -2439
-L O -1950
-L G -1950
-L C -1950
-L Q -1950
-P J -2439
-V y -1461
-V u -1461
-V O -1461
-V G -1461
-V C -1461
-V Q -1461
-D T -1950
-D V -1461
-D Y -1950
-D . -2925
-D , -2925
-Y O -1950
-Y G -1950
-Y C -1950
-Y Q -1950
-F o -1461
-F e -1461
-F a -1461
-c . -2439
-c , -2439
-O A -1461
-O W -975
-L U -1461
-R T -1461
-R V -1461
-R Y -1461
-R W -975
-G T -1461
-P o -1461
-P g -1461
-P e -1461
-P a -1461
-C A -1461
-C . -2439
-C , -2439
-D A -1461
-D W -975
-B T -1461
-B Y -1461
-B . -1950
-B , -1950
-F J -2439
-A O -1461
-A G -1461
-A C -1461
-A U -1461
-A Q -1461
-W r -975
-W y -975
-W u -975
-W O -975
-W G -975
-W C -975
-W J -2439
-W Q -975
-J A -1461
-J . -2439
-J , -2439
-U A -1461
-U . -2439
-U , -2439
-Q W -975
-f . -1950
-f , -1950
-T O -1950
-T G -1950
-T C -1950
-T Q -1950
-O X -1461
-L o -1950
-L e -1950
-L q -1950
-G V -1461
-G Y -1461
-G W -975
-G . -975
-G , -975
-P T -486
-P V -486
-P Y -486
-C T -1461
-C V -1461
-C Y -1461
-D X -1461
-B V -1461
-B X -975
-B A -975
-B W -975
-S . -1950
-S , -1950
-X o -1461
-X e -1461
-X y -1461
-X O -1461
-X G -1461
-X C -1461
-X Q -1461
-A o -1461
-A e -1461
-K o -1461
-K e -1461
-K y -1461
-K w -1461
-K O -1461
-K G -1461
-K C -1461
-K Q -1461
-o v -975
-o y -486
-o x -975
-o w -975
-h v -975
-h y -486
-n v -975
-n y -486
-m v -975
-m y -486
-r g -486
-g . -975
-g , -975
-p v -975
-p y -486
-p x -975
-c v -975
-c y -486
-c w -975
-v o -975
-v g -975
-v c -975
-v d -975
-v a -975
-v q -975
-e v -975
-e y -486
-b v -975
-b y -486
-b w -975
-s . -1461
-s , -1461
-y o -975
-y g -975
-y c -975
-y d -975
-y a -975
-y q -975
-f g -486
-x o -975
-x g -975
-x c -975
-x e -975
-x d -975
-x a -975
-x q -975
-a v -975
-a y -486
-a w -975
-w o -975
-w g -975
-w c -975
-w d -975
-w a -975
-w q -975
-T i -975
-T S -975
-L a -975
-L S -975
-P s -486
-P Z -486
-P X -486
-P W -486
-C X -1461
-C W -975
-C J -975
-V i -975
-V S -975
-S T -975
-S V -975
-S Y -975
-S X -975
-S A -975
-S W -975
-Y i -975
-Y S -975
-X a -975
-X u -1461
-X S -975
-A t -975
-A g -1461
-A c -1461
-A d -1461
-A a -975
-A u -1461
-A q -1461
-A S -975
-W i -975
-W S -975
-K c -1461
-K u -1461
-K S -975
-t g -486
-t . -975
-t , -975
-o f -486
-h w -975
-h . -975
-h , -975
-n w -975
-n . -975
-n , -975
-m w -975
-m . -975
-m , -975
-l . -975
-l , -975
-r o -486
-r c -486
-r e -486
-r d -486
-r a -486
-r q -486
-i . -975
-i , -975
-p f -486
-p w -975
-c f -486
-c x -975
-v e -975
-v s -486
-e f -486
-e x -975
-e w -975
-z . -975
-z , -975
-d . -975
-d , -975
-b f -486
-s v -486
-s y -486
-s f -486
-s x -486
-s w -486
-y e -975
-y s -486
-f o -486
-f c -486
-f e -486
-f d -486
-f s -486
-f a -486
-f q -486
-x s -486
-x . -975
-x , -975
-a . -975
-a , -975
-w e -975
-w s -486
-j . -975
-j , -975
-u . -975
-k o -975
-k g -975
-k c -975
-k e -975
-k d -975
-k a -975
-k q -975
-k . -975
-k , -975
-O Z -486
-O J -975
-H . -975
-H , -975
-N . -975
-N , -975
-M . -975
-M , -975
-L . -975
-L , -975
-R . -975
-R , -975
-I . -975
-I , -975
-C Z -486
-E . -975
-E , -975
-Z o -486
-Z e -486
-Z d -486
-Z s -486
-Z y -486
-Z a -486
-Z w -486
-Z u -486
-Z O -486
-Z G -486
-Z C -486
-Z S -486
-Z Q -486
-Z . -975
-Z , -975
-D Z -486
-D J -975
-B Z -486
-B J -975
-S Z -486
-S J -975
-X . -975
-X , -975
-A s -486
-A . -975
-A , -975
-J J -975
-U J -975
-K a -975
-K . -975
-K , -975
-t o -486
-t c -486
-t e -486
-t d -486
-t s -486
-t a -486
-t q -486
-o z -486
-h f -486
-n f -486
-m f -486
-r s -486
-p z -486
-c z -486
-e z -486
-z o -486
-z g -486
-z c -486
-z e -486
-z d -486
-z s -486
-z a -486
-z q -486
-b z -486
-s z -486
-a f -486
-k s -486
-A f -486
-K T -486
-K V -486
-K Y -486
-K W -486
-K U -486
-L cq -6342
-L ' -6342
-T char173 -4878
-T hy -4878
-T - -4878
-T en -4878
-T em -4878
-A cq -2925
-A ' -2925
-char173 T -4878
-hy T -4878
-- T -4878
-en T -4878
-em T -4878
-Y char173 -2925
-Y hy -2925
-Y - -2925
-Y en -2925
-Y em -2925
-p cq -1950
-p ' -1950
-c cq -1461
-c ' -1461
-e cq -1950
-e ' -1950
-b cq -1950
-b ' -1950
-a cq -1461
-a ' -1461
-V char173 -1461
-V hy -1461
-V - -1461
-V en -1461
-V em -1461
-h cq -1461
-h ' -1461
-n cq -1461
-n ' -1461
-m cq -1461
-m ' -1461
-W char173 -975
-W hy -975
-W - -975
-W en -975
-W em -975
-cq d -3414
-' d -3414
-s cq -486
-s ' -486
-L char173 -1950
-L hy -1950
-L - -1950
-L en -1950
-L em -1950
-X char173 -1461
-X hy -1461
-X - -1461
-X en -1461
-X em -1461
-A char173 -1461
-A hy -1461
-A - -1461
-A en -1461
-A em -1461
-K char173 -1461
-K hy -1461
-K - -1461
-K en -1461
-K em -1461
-cq s -1950
-' s -1950
-char173 X -1461
-hy X -1461
-- X -1461
-char173 A -1461
-hy A -1461
-- A -1461
-en X -1461
-en A -1461
-em X -1461
-K cq -486
-K ' -486
-t g -486
-b f -486
-Z char173 -486
-Z hy -486
-Z - -486
-Z en -486
-Z em -486
-cq t -975
-' t -975
-cq n -1461
-' n -1461
-cq m -1461
-' m -1461
-cq r -1461
-' r -1461
-cq v -1461
-' v -1461
-charset
-! 8781,18165 2 3617
-dq 13173,18237 2 3618
-" "
-sh 16587,18105 2 3619
-# "
-Do 16587,18825,720 2 3620
-$ "
-% 26346,18720,840 2 3621
-& 20004,18495,360 2 3622
-cq 8781,18135 2 51751
-' "
-( 8781,18135,2550 2 3624
-) 8781,18135,2550 2 3625
-* 16587,18495 2 3626
-+ 26346,14775,105 0 3627
-, 8781,3030,3075 0 3628
-char173 8781,7755 0 3629
-hy "
-- "
-. 8781,3030 0 3630
-sl 8781,18135,1380 2 3631
-/ "
-0 16587,18465,360 2 3632
-1 16587,18105 2 3633
-2 16587,18465 2 3634
-3 16587,18465,360 2 3635
-4 16587,18105 2 3636
-5 16587,18105,360 2 3637
-6 16587,18465,360 2 3638
-7 16587,18105 2 3639
-8 16587,18465,360 2 3640
-9 16587,18465,360 2 3641
-: 8781,12630 0 3642
-; 8781,12630,3075 0 3643
-< 26346,16068 0 3644
-= 26346,10566 0 3645
-> 26346,16068 0 3646
-? 13662,18315 2 3647
-at 26352,21030,2745 2 3648
-@ "
-A 19515,18135 2 3649
-B 16587,18135 2 3650
-C 18540,18495,360 2 3651
-D 19029,18135 2 3652
-E 15126,18135 2 3653
-F 14637,18135 2 3654
-G 19515,18495,360 2 3655
-H 19029,18135 2 3656
-I 7317,18135 2 3657
-J 14637,18135,360 2 3658
-K 17565,18135 2 3659
-L 14148,18135 2 3660
-M 23907,18135 2 3661
-N 19029,18135 2 3662
-O 20004,18495,360 2 3663
-P 15612,18135 2 3664
-Q 20490,18495,360 2 3665
-R 17076,18135 2 3666
-S 17076,18495,360 2 3667
-T 16587,18135 2 3668
-U 19029,18135,360 2 3669
-V 19029,18135 2 3670
-W 26346,18135 2 3671
-X 19029,18135 2 3672
-Y 18051,18135 2 3673
-Z 16101,18135 2 3674
-lB 8781,18135,2370 2 3675
-[ "
-rs 8781,18135,1380 2 3676
-\ "
-rB 8781,18135,2370 2 3677
-] "
-ha 13173,19758 2 51875
-_ 13173,191367,6588 3 3679
-oq 8781,18135 2 51808
-` "
-a 14148,12990,360 0 3681
-b 15126,18165,360 2 3682
-c 14148,12990,360 0 3683
-d 15126,18165,360 2 3684
-e 14148,12990,360 0 3685
-f 9759,18315 2 3686
-g 15126,12990,5088 1 3687
-h 15126,18165 2 3688
-i 6342,18165 2 3689
-j 6342,18165,4995 3 3690
-k 14148,18165 2 3691
-l 6342,18165 2 3692
-m 22932,12990 0 3693
-n 15126,12990 0 3694
-o 15126,12990,360 0 3695
-p 15126,12990,4680 1 3696
-q 15126,12990,4680 1 3697
-r 9270,12990 0 3698
-s 13173,12990,360 0 3699
-t 9759,15963,360 0 3700
-u 15126,12630,360 0 3701
-v 14637,12630 0 3702
-w 22932,12630 0 3703
-x 14637,12630 0 3704
-y 14637,12630,4680 1 3705
-z 12684,12630 0 3706
-lC 11712,20130,6075 3 3707
-{ "
-ba 13173,19758,6588 3 3708
-| "
-rC 11712,20130,6075 3 3709
-} "
-ti 26346,8952 0 51876
-char192 19515,23085 2 3776
-`A "
-char194 19515,23085 2 3778
-^A "
-char200 15126,23085 2 3784
-`E "
-char202 15126,23085 2 3786
-^E "
-char203 15126,22755 2 3787
-:E "
-char206 7317,23085 2 3790
-^I "
-char207 7317,22755 2 3791
-:I "
-char180 16587,18075 2 3764
-aa "
-ga 16587,18075 2 3680
-a^ 16587,17985 2 3678
-^ "
-char168 16587,17775 2 3752
-ad "
-a~ 16587,18294 2 3710
-~ "
-char217 19029,23085,360 2 3801
-`U "
-char219 19029,23085,360 2 3803
-^U "
-char221 18051,23085 2 3805
-'Y "
-char253 14637,18075,4680 3 3837
-'y "
-char176 16587,18465 2 3760
-de "
-char199 18540,18495,5025 3 3783
-,C "
-char231 14148,12990,5025 1 3815
-,c "
-char209 19029,22959 2 3793
-~N "
-char241 15126,18294 2 3825
-~n "
-char161 8781,12645,5520 1 3745
-r! "
-char191 13662,12516,5799 1 3775
-r? "
-char164 16587,15684 0 3748
-Cs "
-char163 16587,18465 2 3747
-Po "
-char165 16587,18105 2 3749
-Ye "
-char167 16587,18495,360 2 3751
-sc "
-Fn 16587,18315 2 51871
-char162 16587,18825,720 2 3746
-ct "
-char226 14148,17985,360 2 3810
-^a "
-char234 14148,17985,360 2 3818
-^e "
-char244 15126,17985,360 2 3828
-^o "
-char251 15126,17985,360 2 3835
-^u "
-char225 14148,18075,360 2 3809
-'a "
-char233 14148,18075,360 2 3817
-'e "
-char243 15126,18075,360 2 3827
-'o "
-char250 15126,18075,360 2 3834
-'u "
-char224 14148,18075,360 2 3808
-`a "
-char232 14148,18075,360 2 3816
-`e "
-char242 15126,18075,360 2 3826
-`o "
-char249 15126,18075,360 2 3833
-`u "
-char228 14148,17775,360 2 3812
-:a "
-char235 14148,17775,360 2 3819
-:e "
-char246 15126,17775,360 2 3830
-:o "
-char252 15126,17775,360 2 3836
-:u "
-char197 19515,25923 2 3781
-oA "
-char238 6342,17985 2 3822
-^i "
-char216 20004,18495,375 2 3800
-/O "
-char198 25857,18165 2 3782
-AE "
-char229 14148,20412,360 2 3813
-oa "
-char237 6342,18075 2 3821
-'i "
-char248 15126,13008,408 0 3832
-/o "
-char230 22443,12990,360 0 3814
-ae "
-char196 19515,22755 2 3780
-:A "
-char236 6342,18075 2 3820
-`i "
-char214 20004,22755,360 2 3798
-:O "
-char220 19029,22755,360 2 3804
-:U "
-char201 15126,23085 2 3785
-'E "
-char239 6342,17775 2 3823
-:i "
-char223 16101,18165,360 2 3807
-ss "
-char212 20004,23085,360 2 3796
-^O "
-char193 19515,23085 2 3777
-'A "
-char195 19515,22959 2 3779
-~A "
-char227 14148,18294,360 2 3811
-~a "
-char208 19029,18135 2 3792
--D "
-char240 15126,18315,360 2 3824
-Sd "
-char205 7317,23085 2 3789
-'I "
-char204 7317,23085 2 3788
-`I "
-char211 20004,23085,360 2 3795
-'O "
-char210 20004,23085,360 2 3794
-`O "
-char213 20004,22959,360 2 3797
-~O "
-char245 15126,18294,360 2 3829
-~o "
-vS 17076,23085,360 2 51795
-vs 13173,17985,360 2 51827
-char218 19029,23085,360 2 3802
-'U "
-:Y 18051,22755 2 51801
-char255 14637,17775,4680 3 3839
-:y "
-char222 15612,18135 2 3806
-TP "
-char254 15126,18165,4680 3 3838
-Tp "
-char181 14637,12630,4350 0 3765
-char182 16587,19635,4200 2 3766
-ps "
-char190 26346,18465,1020 2 3774
-34 "
-\- 26346,8100 0 51757
-char188 26346,18465,1020 2 3772
-14 "
-char189 26346,18465,1020 2 3773
-12 "
-char170 10734,18465 2 3754
-Of "
-char186 10734,18465 2 3770
-Om "
-char171 14637,11085 0 3755
-Fo "
-char187 14637,11085 0 3771
-Fc "
-char177 26346,14985 0 3761
-char166 13173,19083,5916 3 3750
-bb "
-char169 13173,19635 2 3753
-co "
-char172 26346,11607 0 3756
-no "
-char174 13173,19635 2 3758
-rg "
-char178 10245,18465 2 3762
-S2 "
-char179 10245,18465 2 3763
-S3 "
-char184 16587,194958,5025 3 3768
-ac "
-char185 10245,18345 2 3769
-S1 "
-char215 26346,14010 0 3799
-char247 26346,12315 0 3831
-char183 8781,10509 0 3767
-pc "
-fm 8781,18105 2 51873
-sd 16587,18105 2 51874
-dg 16587,18135 2 51755
-tm 16128,17850 2 51796
-ah 16587,17985 2 51935
-ao 16587,20412 2 51930
-f/ 1464,18465,1020 2 51759
-em 26346,7425 0 51789
-en 16587,7425 0 51790
-dd 16587,18135 2 51773
-.i 6342,12630 0 51957
-aq 8781,18237 2 3623
-bu 13173,14226 0 51889
-'C 18540,23085,360 2 20166
-'c 14148,18075,360 2 20198
-lq 13173,18135 2 51838
-rq 13173,18135 2 51746
-Bq 13173,3015,3060 0 51772
-vz 12684,17985 2 51834
-fi 16101,18315 2 51881
-fl 16101,18315 2 51882
-ff 18051,18315 2 51883
-Fi 24396,18315 2 51884
-Fl 24396,18315 2 51885
-ij 12684,18165,4995 3 51958
-bq 8781,3015,3060 0 51756
-%0 26346,18720,840 2 51901
-char175 16587,16845 2 3759
-a- "
-ab 16587,17985 2 51926
-a. 16587,17775 2 51927
-oe 23907,12990,360 0 51823
-OE 26346,18270,135 2 51791
-fo 9759,11085 0 51886
-fc 9759,11085 0 51887
-sq 19029,15624 0 51899
-/L 14148,18135 2 51944
-/l 6342,18165 2 51960
-a" 16587,18075 2 51933
-ho 16587,1425,4704 1 51934
-vZ 16101,23085 2 51802
-IJ 21354,18135,360 2 51942
diff --git a/contrib/groff/font/devlj4/generate/Makefile b/contrib/groff/font/devlj4/generate/Makefile
deleted file mode 100644
index c11dbee63c91..000000000000
--- a/contrib/groff/font/devlj4/generate/Makefile
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright (C) 1994 Free Software Foundation, Inc.
-# Written by James Clark (jjc@jclark.com)
-#
-# This file is part of groff.
-#
-# groff is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2, or (at your option) any later
-# version.
-#
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with groff; see the file COPYING. If not, write to the Free Software
-# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Directory containing Autofont TFM files.
-# The TFM files I used are available for ftp as
-#
-# ftp://ftp.hp.com/pub/faxes/software/tfmlj4.exe
-#
-# This is a self-extracting MS-DOS archive (in ZIP format).
-
-# This is set up so you can do
-# make -f generate/Makefile
-# in the parent directory of this directory.
-
-AUTOFONT=/usr/local/lib/groff-lj4
-HPFTODIT=hpftodit
-# .05 em
-IFLAG=-i 439
-SFLAG=-s
-srcdir=generate
-TEXTMAP=$(srcdir)/text.map
-SPECIALMAP=$(srcdir)/special.map
-
-FONTS=\
- ALBB ALBR \
- AOB AOI AOR \
- CB CBI CI CR \
- GB GBI GI GR \
- LGB LGI LGR \
- OB OBI OI OR \
- TB TBI TI TR \
- UB UBI UI UR \
- UCB UCBI UCI UCR \
- CLARENDON CORONET MARIGOLD S
-
-all: $(FONTS)
-
-TR: $(AUTOFONT)/9nb00086.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00086.tfm $(TEXTMAP) $@
-
-TI: $(AUTOFONT)/9nb00084.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00084.tfm $(TEXTMAP) $@
-
-TB: $(AUTOFONT)/9nb00083.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00083.tfm $(TEXTMAP) $@
-
-TBI: $(AUTOFONT)/9nb00085.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00085.tfm $(TEXTMAP) $@
-
-CR: $(AUTOFONT)/9nb00064.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00064.tfm $(TEXTMAP) $@
-
-CI: $(AUTOFONT)/9nb00062.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00062.tfm $(TEXTMAP) $@
-
-CB: $(AUTOFONT)/9nb00061.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00061.tfm $(TEXTMAP) $@
-
-CBI: $(AUTOFONT)/9nb00063.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00063.tfm $(TEXTMAP) $@
-
-GR: $(AUTOFONT)/9nb00068.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00068.tfm $(TEXTMAP) $@
-
-GI: $(AUTOFONT)/9nb00066.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00066.tfm $(TEXTMAP) $@
-
-GB: $(AUTOFONT)/9nb00065.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00065.tfm $(TEXTMAP) $@
-
-GBI: $(AUTOFONT)/9nb00067.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00067.tfm $(TEXTMAP) $@
-
-OR: $(AUTOFONT)/9nb00076.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00076.tfm $(TEXTMAP) $@
-
-OI: $(AUTOFONT)/9nb00074.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00074.tfm $(TEXTMAP) $@
-
-OB: $(AUTOFONT)/9nb00073.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00073.tfm $(TEXTMAP) $@
-
-OBI: $(AUTOFONT)/9nb00075.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00075.tfm $(TEXTMAP) $@
-
-UR: $(AUTOFONT)/9nb00094.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00094.tfm $(TEXTMAP) $@
-
-UI: $(AUTOFONT)/9nb00092.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00092.tfm $(TEXTMAP) $@
-
-UB: $(AUTOFONT)/9nb00088.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00088.tfm $(TEXTMAP) $@
-
-UBI: $(AUTOFONT)/9nb00093.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00093.tfm $(TEXTMAP) $@
-
-UCR: $(AUTOFONT)/9nb00089.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00089.tfm $(TEXTMAP) $@
-
-UCI: $(AUTOFONT)/9nb00087.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00087.tfm $(TEXTMAP) $@
-
-UCB: $(AUTOFONT)/9nb00090.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00090.tfm $(TEXTMAP) $@
-
-UCBI: $(AUTOFONT)/9nb00091.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00091.tfm $(TEXTMAP) $@
-
-ALBR: $(AUTOFONT)/9nb00052.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00052.tfm $(TEXTMAP) $@
-
-ALBB: $(AUTOFONT)/9nb00051.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00051.tfm $(TEXTMAP) $@
-
-LGR: $(AUTOFONT)/9nb00071.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00071.tfm $(TEXTMAP) $@
-
-LGB: $(AUTOFONT)/9nb00069.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00069.tfm $(TEXTMAP) $@
-
-LGI: $(AUTOFONT)/9nb00070.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00070.tfm $(TEXTMAP) $@
-
-AOR: $(AUTOFONT)/9nb00055.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00055.tfm $(TEXTMAP) $@
-
-AOI: $(AUTOFONT)/9nb00054.tfm $(TEXTMAP)
- $(HPFTODIT) $(IFLAG) $(AUTOFONT)/9nb00054.tfm $(TEXTMAP) $@
-
-AOB: $(AUTOFONT)/9nb00053.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00053.tfm $(TEXTMAP) $@
-
-MARIGOLD: $(AUTOFONT)/9nb00072.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00072.tfm $(TEXTMAP) $@
-
-CORONET: $(AUTOFONT)/9nb00070.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00070.tfm $(TEXTMAP) $@
-
-CLARENDON: $(AUTOFONT)/9nb00060.tfm $(TEXTMAP)
- $(HPFTODIT) $(AUTOFONT)/9nb00060.tfm $(TEXTMAP) $@
-
-S: $(AUTOFONT)/9nb00086.tfm $(SPECIALMAP)
- $(HPFTODIT) $(SFLAG) $(AUTOFONT)/9nb00086.tfm $(SPECIALMAP) $@
-
-clean:
-
-realclean:
- -rm -f $(FONTS)
-
-extraclean: realclean
- -rm -f core *~ "#*"
-
-.PHONY: clean realclean extraclean all
diff --git a/contrib/groff/font/devlj4/generate/special.map b/contrib/groff/font/devlj4/generate/special.map
deleted file mode 100644
index ea23337b4daa..000000000000
--- a/contrib/groff/font/devlj4/generate/special.map
+++ /dev/null
@@ -1,178 +0,0 @@
-# Map MSL numbers to troff names for a special font.
-12 pl
-30 eq
-34 *A
-35 *B
-38 *E
-41 *Y
-42 *I
-44 *K
-46 *M
-47 *N
-48 *O
-49 *R
-53 *T
-57 *X
-59 *Z
-94 or
-96 ap
-183 mi
-191 +-
-194 no
-201 mu
-202 di
-206 DI
-207 CL
-205 HE
-208 SP
-220 va
-224 ua
-225 da
-226 ->
-227 <-
-229 <>
-292 if
-295 ca
-296 ==
-297 >=
-298 <=
-301 ~~
-302 md
-500 sr
-501 pt
-503 +e
-504 3d
-504 tf
-505 *G
-506 *D
-507 *H
-508 *L
-509 *C
-510 *P
-511 *S
-512 *U
-513 *F
-514 *Q
-515 *W
-516 gr
-517 pd
-518 ts
-519 !=
-522 *a
-523 *b
-524 *g
-525 *d
-526 *e
-527 *z
-528 *y
-529 *h
-530 *i
-531 *k
-532 *l
-533 *m
-534 *n
-535 *c
-536 *o
-537 *p
-538 *r
-539 *s
-540 *t
-541 *u
-542 *f
-543 *x
-544 *q
-545 *w
-546 +h
-547 +f
-548 +p
-549 ~=
-550 ne
-551 arrowverttp
-551 uA
-552 rA
-552 rh
-553 arrowvertbt
-553 dA
-554 lA
-554 lh
-555 vA
-556 hA
-560 radicalex
-561 fa
-562 te
-564 pp
-565 cu
-566 mo
-568 nm
-569 sb
-570 sp
-571 nb
-572 nc
-573 ib
-574 ip
-575 c+
-577 c*
-580 AN
-581 OR
-584 ci
-587 is
-589 /_
-590 es
-591 Ah
-595 Im
-596 Re
-598 bracketlefttp
-598 lc
-599 bracketleftbt
-599 lf
-600 bracelefttp
-600 parenlefttp
-600 lt
-601 braceleftmid
-601 lk
-602 braceleftbt
-602 parenleftbt
-602 lb
-605 arrowvertex
-608 bracketrighttp
-608 rc
-609 bracketrightbt
-609 rf
-610 bracerighttp
-610 parenrighttp
-610 rt
-611 bracerightmid
-611 rk
-612 bracerightbt
-612 parenrightbt
-612 rb
-613 braceleftex
-613 bracerightex
-613 bv
-614 barex
-614 bracketleftex
-614 bracketrightex
-614 parenleftex
-614 parenrightex
-620 -+
-621 la
-622 ra
-624 =~
-633 <<
-634 >>
-638 -h
-641 wp
-654 lz
-663 st
-664 **
-665 an
-680 AN
-1099 CR
-
-#637 digamma
-#655 parenrighttp
-#656 parenrightbt
-#642 sum
-#644 bardblex
-#646 parenlefttp
-#647 parenleftbt
diff --git a/contrib/groff/font/devlj4/generate/text.map b/contrib/groff/font/devlj4/generate/text.map
deleted file mode 100644
index 0175cbe9a3b8..000000000000
--- a/contrib/groff/font/devlj4/generate/text.map
+++ /dev/null
@@ -1,344 +0,0 @@
-# Map MSL numbers to troff names for a text font.
-1 !
-2 "
-2 dq
-3 #
-3 sh
-4 $
-4 Do
-5 %
-6 &
-8 '
-8 cq
-9 (
-10 )
-11 *
-12 +
-13 ,
-14 -
-14 hy
-14 char173
-15 .
-16 /
-16 sl
-17 0
-18 1
-19 2
-20 3
-21 4
-22 5
-23 6
-24 7
-25 8
-26 9
-27 :
-28 ;
-29 <
-30 =
-31 >
-32 ?
-33 @
-33 at
-34 A
-35 B
-36 C
-37 D
-38 E
-39 F
-40 G
-41 H
-42 I
-43 J
-44 K
-45 L
-46 M
-47 N
-48 O
-49 P
-50 Q
-51 R
-52 S
-53 T
-54 U
-55 V
-56 W
-57 X
-58 Y
-59 Z
-60 [
-60 lB
-61 \
-61 rs
-62 ]
-62 rB
-63 ha
-64 _
-66 `
-66 oq
-67 a
-68 b
-69 c
-70 d
-71 e
-72 f
-73 g
-74 h
-75 i
-76 j
-77 k
-78 l
-79 m
-80 n
-81 o
-82 p
-83 q
-84 r
-85 s
-86 t
-87 u
-88 v
-89 w
-90 x
-91 y
-92 z
-93 {
-93 lC
-94 |
-94 ba
-95 }
-95 rC
-96 ti
-99 `A
-99 char192
-100 ^A
-100 char194
-101 `E
-101 char200
-102 ^E
-102 char202
-103 :E
-103 char203
-104 ^I
-104 char206
-105 :I
-105 char207
-106 aa
-106 char180
-107 ga
-108 ^
-108 a^
-109 ad
-109 char168
-110 ~
-110 a~
-111 `U
-111 char217
-112 ^U
-112 char219
-114 'Y
-114 char221
-115 'y
-115 char253
-116 de
-116 char176
-117 ,C
-117 char199
-118 ,c
-118 char231
-119 ~N
-119 char209
-120 ~n
-120 char241
-121 r!
-121 char161
-122 r?
-122 char191
-123 Cs
-123 char164
-124 Po
-124 char163
-125 Ye
-125 char165
-126 sc
-126 char167
-127 Fn
-128 ct
-128 char162
-129 ^a
-129 char226
-130 ^e
-130 char234
-131 ^o
-131 char244
-132 ^u
-132 char251
-133 'a
-133 char225
-134 'e
-134 char233
-135 'o
-135 char243
-136 'u
-136 char250
-137 `a
-137 char224
-138 `e
-138 char232
-139 `o
-139 char242
-140 `u
-140 char249
-141 :a
-141 char228
-142 :e
-142 char235
-143 :o
-143 char246
-144 :u
-144 char252
-145 oA
-145 char197
-146 ^i
-146 char238
-147 /O
-147 char216
-148 AE
-148 char198
-149 oa
-149 char229
-150 'i
-150 char237
-151 /o
-151 char248
-152 ae
-152 char230
-153 :A
-153 char196
-154 `i
-154 char236
-155 :O
-155 char214
-156 :U
-156 char220
-157 'E
-157 char201
-158 :i
-158 char239
-159 ss
-159 char223
-160 ^O
-160 char212
-161 'A
-161 char193
-162 ~A
-162 char195
-163 ~a
-163 char227
-164 -D
-164 char208
-165 Sd
-165 char240
-166 'I
-166 char205
-167 `I
-167 char204
-168 'O
-168 char211
-169 `O
-169 char210
-170 ~O
-170 char213
-171 ~o
-171 char245
-172 vS
-173 vs
-174 'U
-174 char218
-175 :Y
-176 :y
-176 char255
-177 TP
-177 char222
-178 Tp
-178 char254
-180 char181
-181 ps
-181 char182
-182 34
-182 char190
-183 \-
-184 14
-184 char188
-185 12
-185 char189
-186 Of
-186 char170
-187 Om
-187 char186
-188 Fo
-188 char171
-190 Fc
-190 char187
-191 char177
-192 bb
-192 char166
-193 co
-193 char169
-194 no
-194 char172
-196 rg
-196 char174
-197 S2
-197 char178
-198 S3
-198 char179
-199 ac
-199 char184
-200 S1
-200 char185
-201 char215
-202 char247
-302 pc
-302 char183
-310 fm
-311 sd
-312 dg
-313 tm
-315 ah
-316 ao
-324 f/
-325 em
-326 en
-327 dd
-328 .i
-329 aq
-331 bu
-406 'C
-407 'c
-1017 lq
-1018 rq
-1019 Bq
-1031 vz
-1040 fi
-1041 fl
-1042 ff
-1043 Fi
-1044 Fl
-1047 ij
-1067 bq
-1068 %0
-1084 a-
-1084 char175
-1086 ab
-1088 a.
-1090 oe
-1091 OE
-1092 fo
-1093 fc
-1094 sq
-1095 /L
-1096 /l
-1097 a"
-1098 ho
-1106 vZ
-1107 IJ
diff --git a/contrib/groff/font/devps/AB b/contrib/groff/font/devps/AB
deleted file mode 100644
index f00cf9a62b75..000000000000
--- a/contrib/groff/font/devps/AB
+++ /dev/null
@@ -1,574 +0,0 @@
-name AB
-internalname AvantGarde-Demi
-spacewidth 280
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -50
-A w -65
-A v -70
-A u -20
-A ' -90
-A cq -90
-A Y -80
-A W -60
-A V -102
-A U -40
-A T -25
-A Q -50
-A O -50
-A G -40
-A C -40
-B A -10
-C A -40
-D . -20
-D , -20
-D Y -45
-D W -25
-D V -50
-D A -50
-F . -129
-F e -20
-F , -162
-F a -20
-F A -75
-G . -20
-G , -20
-G Y -15
-J . -15
-J a -20
-J A -30
-K y -20
-K u -15
-K o -45
-K e -40
-K O -30
-L y -23
-L ' -30
-L cq -30
-L rq -30
-L Y -80
-L W -55
-L V -85
-L T -46
-O . -30
-O , -30
-O Y -30
-O X -30
-O W -20
-O V -45
-O T -15
-O A -60
-P . -200
-P o -20
-P e -20
-P , -220
-P a -20
-P A -100
-Q , 20
-R W 25
-R V -10
-R U 25
-R T 40
-R O 25
-S , 20
-T y -10
-T w -55
-T u -46
-T ; -29
-T r -30
-T . -91
-T o -49
-T - -75
-T hy -75
-T char173 -75
-T e -49
-T , -82
-T : -15
-T a -70
-T O -15
-T A -25
-U . -20
-U , -20
-U A -40
-V u -55
-V ; -33
-V . -145
-V o -101
-V i -15
-V - -75
-V hy -75
-V char173 -75
-V e -101
-V , -145
-V : -18
-V a -95
-V O -45
-V G -20
-V A -102
-W y -15
-W u -30
-W ; -33
-W . -106
-W o -46
-W i -10
-W - -35
-W hy -35
-W char173 -35
-W e -47
-W , -106
-W : -15
-W a -50
-W O -20
-W A -58
-Y u -52
-Y ; -23
-Y . -145
-Y o -89
-Y - -100
-Y hy -100
-Y char173 -100
-Y e -89
-Y , -145
-Y : -10
-Y a -93
-Y O -30
-Y A -80
-a t 5
-a p 20
-a b 5
-b y -20
-b v -20
-c y -20
-c l -15
-c k -15
-, ' -70
-, cq -70
-, rq -70
-e y -20
-e x -20
-e w -20
-e v -20
-f . -40
-f o -20
-f l -15
-f i -15
-f f -20
-f .i -15
-f , -40
-f a -15
-g i 25
-g a 15
-h y -30
-k y -5
-k o -30
-k e -40
-m y -20
-m u -20
-n y -15
-n v -30
-o y -20
-o x -30
-o w -20
-o v -30
-p y -20
-. ' -70
-. cq -70
-. rq -70
-lq A -50
-` ` -80
-` oq -80
-oq ` -80
-oq oq -80
-` A -50
-oq A -50
-' v -10
-cq v -10
-' t 10
-cq t 10
-' s -15
-cq s -15
-' r -20
-cq r -20
-' ' -80
-' cq -80
-cq ' -80
-cq cq -80
-' d -50
-cq d -50
-r y 40
-r v 40
-r u 20
-r t 20
-r s 20
-r q -8
-r . -73
-r p 20
-r o -15
-r n 21
-r m 15
-r l 20
-r k 5
-r i 20
-r - -60
-r hy -60
-r char173 -60
-r g 1
-r e -4
-r d -6
-r , -75
-r c -7
-s . 20
-s , 20
-v . -90
-v o -20
-v e -20
-v , -90
-v a -30
-w . -90
-w o -30
-w e -20
-w , -90
-w a -30
-x e -20
-y . -100
-y o -30
-y e -20
-y , -100
-y c -35
-y a -30
-charset
-ha 600,740 2 0000 -- asciicircum
-ti 600,347 0 0001 -- asciitilde
-vS 520,944,15 2 0002 -- Scaron
-vZ 500,944 2 0003 -- Zcaron
-vs 440,774,18 2 0004 -- scaron
-vz 460,774 2 0005 -- zcaron
-:Y 620,939 2 0006 -- Ydieresis
-tm 1000,740 2 0007 -- trademark
-aq 220,740 2 0010 -- quotesingle
-space 280 0 0040
-! 280,740 2 0041 -- exclam
-" 360,740 2 0042 -- quotedbl
-dq "
-# 560,700 0 0043 -- numbersign
-sh "
-$ 560,857,86 2 0044 -- dollar
-Do "
-% 860,755,15 2 0045 -- percent
-& 680,755,15 2 0046 -- ampersand
-' 280,740 2 0047 -- quoteright
-cq "
-( 380,754,157 2 0050 -- parenleft
-) 380,754,157 2 0051 -- parenright
-* 440,755 2 0052 -- asterisk
-+ 600,506 0 0053 -- plus
-, 280,133,141 0 0054 -- comma
-- 420,348 0 0055 -- hyphen
-hy "
-char173 "
-. 280,133 0 0056 -- period
-/ 460,740,100 2 0057 -- slash
-sl "
-0 560,755,15 2 0060 -- zero
-1 560,740 2 0061 -- one
-2 560,755 2 0062 -- two
-3 560,755,15 2 0063 -- three
-4 560,740 2 0064 -- four
-5 560,740,15 2 0065 -- five
-6 560,739,15 2 0066 -- six
-7 560,740 2 0067 -- seven
-8 560,755,15 2 0070 -- eight
-9 560,754 2 0071 -- nine
-: 280,555 0 0072 -- colon
-; 280,555,141 0 0073 -- semicolon
-< 600,514,8 0 0074 -- less
-= 600,425 0 0075 -- equal
-> 600,514,8 0 0076 -- greater
-? 560,755 2 0077 -- question
-@ 740,712,12 0 0100 -- at
-at "
-A 740,740 2 0101 -- A
-B 580,740 2 0102 -- B
-C 780,755,15 2 0103 -- C
-D 700,740 2 0104 -- D
-E 520,740 2 0105 -- E
-F 480,740 2 0106 -- F
-G 840,755,15 2 0107 -- G
-H 680,740 2 0110 -- H
-I 280,740 2 0111 -- I
-J 480,740,15 2 0112 -- J
-K 620,740 2 0113 -- K
-L 440,740 2 0114 -- L
-M 900,740 2 0115 -- M
-N 740,740 2 0116 -- N
-O 840,755,15 2 0117 -- O
-P 560,740 2 0120 -- P
-Q 840,755,15 2 0121 -- Q
-R 580,740 2 0122 -- R
-S 520,755,15 2 0123 -- S
-T 420,740 2 0124 -- T
-U 640,740,15 2 0125 -- U
-V 700,740 2 0126 -- V
-W 900,740 2 0127 -- W
-X 680,740 2 0130 -- X
-Y 620,740 2 0131 -- Y
-Z 500,740 2 0132 -- Z
-[ 320,754,157 2 0133 -- bracketleft
-lB "
-\ 640,740,100 2 0134 -- backslash
-rs "
-] 320,754,157 2 0135 -- bracketright
-rB "
-a^ 540,774 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 280,740 2 0140 -- quoteleft
-oq "
-a 660,574,18 0 0141 -- a
-b 660,740,18 2 0142 -- b
-c 640,574,18 0 0143 -- c
-d 660,740,18 2 0144 -- d
-e 640,577,18 0 0145 -- e
-f 280,755 2 0146 -- f
-g 660,574,226 1 0147 -- g
-h 600,740 2 0150 -- h
-i 240,740 2 0151 -- i
-j 260,740,185 3 0152 -- j
-k 580,740 2 0153 -- k
-l 240,740 2 0154 -- l
-m 940,574 0 0155 -- m
-n 600,574 0 0156 -- n
-o 640,574,18 0 0157 -- o
-p 660,574,185 1 0160 -- p
-q 660,574,185 1 0161 -- q
-r 320,574 0 0162 -- r
-s 440,574,18 0 0163 -- s
-t 300,740 2 0164 -- t
-u 600,555,18 0 0165 -- u
-v 560,555 0 0166 -- v
-w 800,555 0 0167 -- w
-x 560,555 0 0170 -- x
-y 580,555,185 1 0171 -- y
-z 460,555 0 0172 -- z
-lC 340,747,191 3 0173 -- braceleft
-{ "
-ba 600,740,100 2 0174 -- bar
-| "
-rC 340,747,191 3 0175 -- braceright
-} "
-a~ 480,767 2 0176 -- tilde
-~ "
-bq 280,133,141 0 0200 -- quotesinglbase
-Fo 460,469 0 0201 -- guillemotleft
-char171 "
-Fc 460,469 0 0202 -- guillemotright
-char187 "
-bu 600,532 0 0203 -- bullet
-Fn 560,824,151 2 0204 -- florin
-f/ 160,740 2 0205 -- fraction
-%0 1280,755,15 2 0206 -- perthousand
-dg 560,740,142 2 0207 -- dagger
-dd 560,740,142 2 0210 -- daggerdbl
-en 500,348 0 0211 -- endash
-em 1000,348 0 0212 -- emdash
-fi 520,755 2 0214 -- fi
-fl 520,755 2 0215 -- fl
-.i 240,555 0 0220 -- dotlessi
-ga 420,851 2 0222 -- grave
-a" 700,862 2 0223 -- hungarumlaut
-a. 280,769 2 0224 -- dotaccent
-ab 480,770 2 0225 -- breve
-ah 540,774 2 0226 -- caron
-ao 360,834 2 0227 -- ring
-ho 340,9,195 1 0230 -- ogonek
-lq 480,740 2 0231 -- quotedblleft
-rq 480,740 2 0232 -- quotedblright
-oe 1080,574,18 0 0233 -- oe
-/l 320,740 2 0234 -- lslash
-Bq 480,133,141 0 0235 -- quotedblbase
-OE 1060,755,15 2 0236 -- OE
-/L 480,740 2 0237 -- Lslash
-r! 280,555,185 1 0241 -- exclamdown
-char161 "
-ct 560,715 0 0242 -- cent
-char162 "
-Po 560,755 2 0243 -- sterling
-char163 "
-Cs 560,577 0 0244 -- currency
-char164 "
-Ye 560,740 2 0245 -- yen
-char165 "
-bb 600,740,100 2 0246 -- brokenbar
-char166 "
-sc 560,755,158 2 0247 -- section
-char167 "
-ad 500,769 2 0250 -- dieresis
-char168 "
-co 740,752,12 2 0251 -- copyright
-char169 "
-Of 360,755 2 0252 -- ordfeminine
-char170 "
-fo 240,469 0 0253 -- guilsinglleft
-no 600,425 0 0254 -- logicalnot
-char172 "
-\- 600,313 0 0255 -- minus
-rg 740,752,12 2 0256 -- registered
-char174 "
-a- 420,759 2 0257 -- macron
-char175 "
-de 400,712 0 0260 -- degree
-char176 "
-char177 600,556,62 0 0261 -- plusminus
-S2 336,749 2 0262 -- twosuperior
-char178 "
-S3 336,749 2 0263 -- threesuperior
-char179 "
-aa 420,849 2 0264 -- acute
-char180 "
-char181 576,555,187 1 0265 -- mu
-ps 600,740,103 2 0266 -- paragraph
-char182 "
-pc 280,320 0 0267 -- periodcentered
-char183 "
-ac 340,6,251 1 0270 -- cedilla
-char184 "
-S1 336,740 2 0271 -- onesuperior
-char185 "
-Om 360,755 2 0272 -- ordmasculine
-char186 "
-fc 240,469 0 0273 -- guilsinglright
-14 840,740 2 0274 -- onequarter
-char188 "
-12 840,740 2 0275 -- onehalf
-char189 "
-34 840,749 2 0276 -- threequarters
-char190 "
-r? 560,555,200 1 0277 -- questiondown
-char191 "
-`A 740,1021 2 0300 -- Agrave
-char192 "
-'A 740,1019 2 0301 -- Aacute
-char193 "
-^A 740,944 2 0302 -- Acircumflex
-char194 "
-~A 740,937 2 0303 -- Atilde
-char195 "
-:A 740,939 2 0304 -- Adieresis
-char196 "
-oA 740,969 2 0305 -- Aring
-char197 "
-AE 900,740 2 0306 -- AE
-char198 "
-,C 780,755,251 3 0307 -- Ccedilla
-char199 "
-`E 520,1021 2 0310 -- Egrave
-char200 "
-'E 520,1019 2 0311 -- Eacute
-char201 "
-^E 520,944 2 0312 -- Ecircumflex
-char202 "
-:E 520,939 2 0313 -- Edieresis
-char203 "
-`I 280,1021 2 0314 -- Igrave
-char204 "
-'I 280,1019 2 0315 -- Iacute
-char205 "
-^I 280,944 2 0316 -- Icircumflex
-char206 "
-:I 280,939 2 0317 -- Idieresis
-char207 "
--D 742,740 2 0320 -- Eth
-char208 "
-~N 740,937 2 0321 -- Ntilde
-char209 "
-`O 840,1021,15 2 0322 -- Ograve
-char210 "
-'O 840,1019,15 2 0323 -- Oacute
-char211 "
-^O 840,944,15 2 0324 -- Ocircumflex
-char212 "
-~O 840,937,15 2 0325 -- Otilde
-char213 "
-:O 840,939,15 2 0326 -- Odieresis
-char214 "
-char215 600,494 0 0327 -- multiply
-/O 840,814,71 2 0330 -- Oslash
-char216 "
-`U 640,1021,15 2 0331 -- Ugrave
-char217 "
-'U 640,1019,15 2 0332 -- Uacute
-char218 "
-^U 640,944,15 2 0333 -- Ucircumflex
-char219 "
-:U 640,939,15 2 0334 -- Udieresis
-char220 "
-'Y 620,1019 2 0335 -- Yacute
-char221 "
-TP 560,740 2 0336 -- Thorn
-char222 "
-ss 600,755,18 2 0337 -- germandbls
-char223 "
-`a 660,851,18 2 0340 -- agrave
-char224 "
-'a 660,849,18 2 0341 -- aacute
-char225 "
-^a 660,774,18 2 0342 -- acircumflex
-char226 "
-~a 660,767,18 2 0343 -- atilde
-char227 "
-:a 660,769,18 2 0344 -- adieresis
-char228 "
-oa 660,834,18 2 0345 -- aring
-char229 "
-ae 1080,574,18 0 0346 -- ae
-char230 "
-,c 640,574,251 1 0347 -- ccedilla
-char231 "
-`e 640,851,18 2 0350 -- egrave
-char232 "
-'e 640,849,18 2 0351 -- eacute
-char233 "
-^e 640,774,18 2 0352 -- ecircumflex
-char234 "
-:e 640,769,18 2 0353 -- edieresis
-char235 "
-`i 240,851 2 0354 -- igrave
-char236 "
-'i 240,849 2 0355 -- iacute
-char237 "
-^i 240,774 2 0356 -- icircumflex
-char238 "
-:i 240,769 2 0357 -- idieresis
-char239 "
-Sd 640,754,18 2 0360 -- eth
-char240 "
-~n 600,767 2 0361 -- ntilde
-char241 "
-`o 640,851,18 2 0362 -- ograve
-char242 "
-'o 640,849,18 2 0363 -- oacute
-char243 "
-^o 640,774,18 2 0364 -- ocircumflex
-char244 "
-~o 640,767,18 2 0365 -- otilde
-char245 "
-:o 640,769,18 2 0366 -- odieresis
-char246 "
-char247 600,526,20 0 0367 -- divide
-/o 660,608,50 0 0370 -- oslash
-char248 "
-`u 600,851,18 2 0371 -- ugrave
-char249 "
-'u 600,849,18 2 0372 -- uacute
-char250 "
-^u 600,774,18 2 0373 -- ucircumflex
-char251 "
-:u 600,769,18 2 0374 -- udieresis
-char252 "
-'y 580,849,185 3 0375 -- yacute
-char253 "
-Tp 660,740,185 3 0376 -- thorn
-char254 "
-:y 580,769,185 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/ABI b/contrib/groff/font/devps/ABI
deleted file mode 100644
index d236b63b9908..000000000000
--- a/contrib/groff/font/devps/ABI
+++ /dev/null
@@ -1,575 +0,0 @@
-name ABI
-internalname AvantGarde-DemiOblique
-slant 10.5
-spacewidth 280
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -50
-A w -65
-A v -70
-A u -20
-A ' -90
-A cq -90
-A Y -80
-A W -60
-A V -102
-A U -40
-A T -25
-A Q -50
-A O -50
-A G -40
-A C -40
-B A -10
-C A -40
-D . -20
-D , -20
-D Y -45
-D W -25
-D V -50
-D A -50
-F . -129
-F e -20
-F , -162
-F a -20
-F A -75
-G . -20
-G , -20
-G Y -15
-J . -15
-J a -20
-J A -30
-K y -20
-K u -15
-K o -45
-K e -40
-K O -30
-L y -23
-L ' -30
-L cq -30
-L rq -30
-L Y -80
-L W -55
-L V -85
-L T -46
-O . -30
-O , -30
-O Y -30
-O X -30
-O W -20
-O V -45
-O T -15
-O A -60
-P . -200
-P o -20
-P e -20
-P , -220
-P a -20
-P A -100
-Q , 20
-R W 25
-R V -10
-R U 25
-R T 40
-R O 25
-S , 20
-T y -10
-T w -55
-T u -46
-T ; -29
-T r -30
-T . -91
-T o -49
-T - -75
-T hy -75
-T char173 -75
-T e -49
-T , -82
-T : -15
-T a -70
-T O -15
-T A -25
-U . -20
-U , -20
-U A -40
-V u -55
-V ; -33
-V . -145
-V o -101
-V i -15
-V - -75
-V hy -75
-V char173 -75
-V e -101
-V , -145
-V : -18
-V a -95
-V O -45
-V G -20
-V A -102
-W y -15
-W u -30
-W ; -33
-W . -106
-W o -46
-W i -10
-W - -35
-W hy -35
-W char173 -35
-W e -47
-W , -106
-W : -15
-W a -50
-W O -20
-W A -58
-Y u -52
-Y ; -23
-Y . -145
-Y o -89
-Y - -100
-Y hy -100
-Y char173 -100
-Y e -89
-Y , -145
-Y : -10
-Y a -93
-Y O -30
-Y A -80
-a t 5
-a p 20
-a b 5
-b y -20
-b v -20
-c y -20
-c l -15
-c k -15
-, ' -70
-, cq -70
-, rq -70
-e y -20
-e x -20
-e w -20
-e v -20
-f . -40
-f o -20
-f l -15
-f i -15
-f f -20
-f .i -15
-f , -40
-f a -15
-g i 25
-g a 15
-h y -30
-k y -5
-k o -30
-k e -40
-m y -20
-m u -20
-n y -15
-n v -30
-o y -20
-o x -30
-o w -20
-o v -30
-p y -20
-. ' -70
-. cq -70
-. rq -70
-lq A -50
-` ` -80
-` oq -80
-oq ` -80
-oq oq -80
-` A -50
-oq A -50
-' v -10
-cq v -10
-' t 10
-cq t 10
-' s -15
-cq s -15
-' r -20
-cq r -20
-' ' -80
-' cq -80
-cq ' -80
-cq cq -80
-' d -50
-cq d -50
-r y 40
-r v 40
-r u 20
-r t 20
-r s 20
-r q -8
-r . -73
-r p 20
-r o -15
-r n 21
-r m 15
-r l 20
-r k 5
-r i 20
-r - -60
-r hy -60
-r char173 -60
-r g 1
-r e -4
-r d -6
-r , -75
-r c -7
-s . 20
-s , 20
-v . -90
-v o -20
-v e -20
-v , -90
-v a -30
-w . -90
-w o -30
-w e -20
-w , -90
-w a -30
-x e -20
-y . -100
-y o -30
-y e -20
-y , -100
-y c -35
-y a -30
-charset
-ha 600,740,0,46,-92,46 2 0000 -- asciicircum
-ti 600,347,0,29,-64,29 0 0001 -- asciitilde
-vS 520,944,15,165,1,82 2 0002 -- Scaron
-vZ 500,944,0,200,31,82 2 0003 -- Zcaron
-vs 440,774,18,173,1,82 2 0004 -- scaron
-vz 460,774,0,188,30,82 2 0005 -- zcaron
-:Y 620,939,0,189,-85,82 2 0006 -- Ydieresis
-tm 1000,740,0,8,-81,8 2 0007 -- trademark
-aq 220,740,0,144,-102,82 2 0010 -- quotesingle
-space 280 0 0040
-! 280,740,0,113,-23,82 2 0041 -- exclam
-" 360,740,0,168,-77,82 2 0042 -- quotedbl
-dq "
-# 560,700,0,108,-16,82 0 0043 -- numbersign
-sh "
-$ 560,857,86,72,-49,72 2 0044 -- dollar
-Do "
-% 860,755,15,46,-89,46 2 0045 -- percent
-& 680,755,15,112,-21,82 2 0046 -- ampersand
-' 280,740,0,112,-109,82 2 0047 -- quoteright
-cq "
-( 380,754,157,160,-70,82 2 0050 -- parenleft
-) 380,754,157,48,42,48 2 0051 -- parenright
-* 440,755,0,102,-124,82 2 0052 -- asterisk
-+ 600,506,0,60,-34,60 0 0053 -- plus
-, 280,133,141,1,2,1 0 0054 -- comma
-- 420,348,0,43,-64,43 0 0055 -- hyphen
-hy "
-char173 "
-. 280,133,0,1,-23,1 0 0056 -- period
-/ 460,740,100,181,63,82 2 0057 -- slash
-sl "
-0 560,755,15,118,-20,82 2 0060 -- zero
-1 560,740,0,0,-180 2 0061 -- one
-2 560,755,0,112,6,82 2 0062 -- two
-3 560,755,15,75,-17,75 2 0063 -- three
-4 560,740,0,94,14,82 2 0064 -- four
-5 560,740,15,90,-14,82 2 0065 -- five
-6 560,739,15,77,-14,77 2 0066 -- six
-7 560,740,0,125,-33,82 2 0067 -- seven
-8 560,755,15,80,-21,80 2 0070 -- eight
-9 560,754,0,123,-60,82 2 0071 -- nine
-: 280,555,0,79,-23,79 0 0072 -- colon
-; 280,555,141,79,2,79 0 0073 -- semicolon
-< 600,514,8,99,-34,82 0 0074 -- less
-= 600,425,0,81,-13,81 0 0075 -- equal
-> 600,514,8,60,5,60 0 0076 -- greater
-? 560,755,0,83,-85,82 2 0077 -- question
-@ 740,712,12,142,-59,82 0 0100 -- at
-at "
-A 740,740,0,42,43,42 2 0101 -- A
-B 580,740,0,80,-20,80 2 0102 -- B
-C 780,755,15,134,-47,82 2 0103 -- C
-D 700,740,0,82,-13,82 2 0104 -- D
-E 520,740,0,126,-11,82 2 0105 -- E
-F 480,740,0,145,-11,82 2 0106 -- F
-G 840,755,15,97,-39,82 2 0107 -- G
-H 680,740,0,117,-21,82 2 0110 -- H
-I 280,740,0,116,-22,82 2 0111 -- I
-J 480,740,15,116,16,82 2 0112 -- J
-K 620,740,0,187,-39,82 2 0113 -- K
-L 440,740,0,69,-22,69 2 0114 -- L
-M 900,740,0,124,-13,82 2 0115 -- M
-N 740,740,0,118,-20,82 2 0116 -- N
-O 840,755,15,92,-45,82 2 0117 -- O
-P 560,740,0,135,-22,82 2 0120 -- P
-Q 840,755,15,92,-44,82 2 0121 -- Q
-R 580,740,0,126,-14,82 2 0122 -- R
-S 520,755,15,108,1,82 2 0123 -- S
-T 420,740,0,185,-69,82 2 0124 -- T
-U 640,740,15,132,-47,82 2 0125 -- U
-V 700,740,0,182,-95,82 2 0126 -- V
-W 900,740,0,186,-94,82 2 0127 -- W
-X 680,740,0,183,46,82 2 0130 -- X
-Y 620,740,0,189,-85,82 2 0131 -- Y
-Z 500,740,0,149,31,82 2 0132 -- Z
-[ 320,754,157,154,-39,82 2 0133 -- bracketleft
-lB "
-\ 640,740,100,0,-183 2 0134 -- backslash
-rs "
-] 320,754,157,72,43,72 2 0135 -- bracketright
-rB "
-a^ 540,774,0,98,-139,82 2 0136 -- circumflex
-^ "
-_ 500,0,125,36,73,36 0 0137 -- underscore
-` 280,740,0,111,-108,82 2 0140 -- quoteleft
-oq "
-a 660,574,18,106,-23,82 0 0141 -- a
-b 660,740,18,79,3,79 2 0142 -- b
-c 640,574,18,89,-34,82 0 0143 -- c
-d 660,740,18,145,-30,82 2 0144 -- d
-e 640,577,18,77,-27,77 0 0145 -- e
-f 280,755,0,190,-12,82 2 0146 -- f
-g 660,574,226,116,17,82 1 0147 -- g
-h 600,740,0,64,-4,64 2 0150 -- h
-i 240,740,0,133,-3,82 2 0151 -- i
-j 260,740,185,132,68,82 3 0152 -- j
-k 580,740,0,118,-30,82 2 0153 -- k
-l 240,740,0,134,-4,82 2 0154 -- l
-m 940,574,0,64,-4,64 0 0155 -- m
-n 600,574,0,63,-4,63 0 0156 -- n
-o 640,574,18,82,-21,82 0 0157 -- o
-p 660,574,185,76,37,76 1 0160 -- p
-q 660,574,185,106,-28,82 1 0161 -- q
-r 320,574,0,153,-13,82 0 0162 -- r
-s 440,574,18,93,1,82 0 0163 -- s
-t 300,740,0,152,-36,82 2 0164 -- t
-u 600,555,18,97,-37,82 0 0165 -- u
-v 560,555,0,149,-56,82 0 0166 -- v
-w 800,555,0,142,-64,82 0 0167 -- w
-x 560,555,0,122,47,82 0 0170 -- x
-y 580,555,185,144,-25,82 1 0171 -- y
-z 460,555,0,118,30,82 0 0172 -- z
-lC 340,747,191,165,10,82 3 0173 -- braceleft
-{ "
-ba 600,740,100,0,-164 2 0174 -- bar
-| "
-rC 340,747,191,115,62,82 3 0175 -- braceright
-} "
-a~ 480,767,0,134,-128,82 2 0176 -- tilde
-~ "
-bq 280,133,141,0,3 0 0200 -- quotesinglbase
-Fo 460,469,0,77,-55,77 0 0201 -- guillemotleft
-char171 "
-Fc 460,469,0,53,-31,53 0 0202 -- guillemotright
-char187 "
-bu 600,532,0,0,-165 0 0203 -- bullet
-Fn 560,824,151,154,77,82 2 0204 -- florin
-f/ 160,740,0,309,173,82 2 0205 -- fraction
-%0 1280,755,15,26,-89,26 2 0206 -- perthousand
-dg 560,740,142,102,-83,82 2 0207 -- dagger
-dd 560,740,142,108,-13,82 2 0210 -- daggerdbl
-en 500,348,0,79,-28,79 0 0211 -- endash
-em 1000,348,0,79,-28,79 0 0212 -- emdash
-fi 520,755,0,128,-22,82 2 0214 -- fi
-fl 520,755,0,128,-22,82 2 0215 -- fl
-.i 240,555,0,99,-3,82 0 0220 -- dotlessi
-ga 420,851,0,92,-139,82 2 0222 -- grave
-a" 700,862,0,104,-208,82 2 0223 -- hungarumlaut
-a. 280,769,0,120,-142,82 2 0224 -- dotaccent
-ab 480,770,0,152,-135,82 2 0225 -- breve
-ah 540,774,0,123,-164,82 2 0226 -- caron
-ao 360,834,0,114,-156,82 2 0227 -- ring
-ho 340,9,195,0,-9 1 0230 -- ogonek
-lq 480,740,0,116,-106,82 2 0231 -- quotedblleft
-rq 480,740,0,117,-107,82 2 0232 -- quotedblright
-oe 1080,574,18,78,-26,78 0 0233 -- oe
-/l 320,740,0,134,-24,82 2 0234 -- lslash
-Bq 480,133,141,5,5,5 0 0235 -- quotedblbase
-OE 1060,755,15,134,-48,82 2 0236 -- OE
-/L 480,740,0,54,-18,54 2 0237 -- Lslash
-r! 280,555,185,80,10,80 1 0241 -- exclamdown
-char161 "
-ct 560,715,0,89,-60,82 0 0242 -- cent
-char162 "
-Po 560,755,0,105,12,82 2 0243 -- sterling
-char163 "
-Cs 560,577,0,118,-3,82 0 0244 -- currency
-char164 "
-Ye 560,740,0,197,-33,82 2 0245 -- yen
-char165 "
-bb 600,740,100,0,-164 2 0246 -- brokenbar
-char166 "
-sc 560,755,158,92,-15,82 2 0247 -- section
-char167 "
-ad 500,769,0,115,-146,82 2 0250 -- dieresis
-char168 "
-co 740,752,12,137,0,82 2 0251 -- copyright
-char169 "
-Of 360,755,0,162,-77,82 2 0252 -- ordfeminine
-char170 "
-fo 240,469,0,87,-44,82 0 0253 -- guilsinglleft
-no 600,425,0,81,-55,81 0 0254 -- logicalnot
-char172 "
-\- 600,313,0,60,-34,60 0 0255 -- minus
-rg 740,752,12,137,0,82 2 0256 -- registered
-char174 "
-a- 420,759,0,120,-142,82 2 0257 -- macron
-char175 "
-de 400,712,0,101,-110,82 0 0260 -- degree
-char176 "
-char177 600,556,62,76,13,76 0 0261 -- plusminus
-S2 336,749,0,150,-23,82 2 0262 -- twosuperior
-char178 "
-S3 336,749,0,127,-37,82 2 0263 -- threesuperior
-char179 "
-aa 420,849,0,138,-174,82 2 0264 -- acute
-char180 "
-char181 576,555,187,116,47,82 1 0265 -- mu
-ps 600,740,103,194,-40,82 2 0266 -- paragraph
-char182 "
-pc 280,320,0,35,-58,35 0 0267 -- periodcentered
-char183 "
-ac 340,6,251,0,-17 1 0270 -- cedilla
-char184 "
-S1 336,740,0,74,-132,74 2 0271 -- onesuperior
-char185 "
-Om 360,755,0,141,-81,82 2 0272 -- ordmasculine
-char186 "
-fc 240,469,0,63,-20,63 0 0273 -- guilsinglright
-14 840,740,0,0,-137 2 0274 -- onequarter
-char188 "
-12 840,740,0,40,-107,40 2 0275 -- onehalf
-char189 "
-34 840,749,0,46,-47,46 2 0276 -- threequarters
-char190 "
-r? 560,555,200,17,-19,17 1 0277 -- questiondown
-char191 "
-`A 740,1021,0,42,43,42 2 0300 -- Agrave
-char192 "
-'A 740,1019,0,42,43,42 2 0301 -- Aacute
-char193 "
-^A 740,944,0,42,43,42 2 0302 -- Acircumflex
-char194 "
-~A 740,937,0,42,43,42 2 0303 -- Atilde
-char195 "
-:A 740,939,0,42,43,42 2 0304 -- Adieresis
-char196 "
-oA 740,969,0,42,43,42 2 0305 -- Aring
-char197 "
-AE 900,740,0,111,55,82 2 0306 -- AE
-char198 "
-,C 780,755,251,134,-47,82 3 0307 -- Ccedilla
-char199 "
-`E 520,1021,0,126,-11,82 2 0310 -- Egrave
-char200 "
-'E 520,1019,0,126,-11,82 2 0311 -- Eacute
-char201 "
-^E 520,944,0,139,-11,82 2 0312 -- Ecircumflex
-char202 "
-:E 520,939,0,136,-11,82 2 0313 -- Edieresis
-char203 "
-`I 280,1021,0,168,-22,82 2 0314 -- Igrave
-char204 "
-'I 280,1019,0,264,-22,82 2 0315 -- Iacute
-char205 "
-^I 280,944,0,259,-22,82 2 0316 -- Icircumflex
-char206 "
-:I 280,939,0,256,-22,82 2 0317 -- Idieresis
-char207 "
--D 742,740,0,74,-33,74 2 0320 -- Eth
-char208 "
-~N 740,937,0,118,-20,82 2 0321 -- Ntilde
-char209 "
-`O 840,1021,15,92,-45,82 2 0322 -- Ograve
-char210 "
-'O 840,1019,15,92,-45,82 2 0323 -- Oacute
-char211 "
-^O 840,944,15,92,-45,82 2 0324 -- Ocircumflex
-char212 "
-~O 840,937,15,92,-45,82 2 0325 -- Otilde
-char213 "
-:O 840,939,15,92,-45,82 2 0326 -- Odieresis
-char214 "
-char215 600,494,0,67,-26,67 0 0327 -- multiply
-/O 840,814,71,101,-44,82 2 0330 -- Oslash
-char216 "
-`U 640,1021,15,132,-47,82 2 0331 -- Ugrave
-char217 "
-'U 640,1019,15,132,-47,82 2 0332 -- Uacute
-char218 "
-^U 640,944,15,132,-47,82 2 0333 -- Ucircumflex
-char219 "
-:U 640,939,15,132,-47,82 2 0334 -- Udieresis
-char220 "
-'Y 620,1019,0,189,-85,82 2 0335 -- Yacute
-char221 "
-TP 560,740,0,109,-22,82 2 0336 -- Thorn
-char222 "
-ss 600,755,18,79,-1,79 2 0337 -- germandbls
-char223 "
-`a 660,851,18,106,-23,82 2 0340 -- agrave
-char224 "
-'a 660,849,18,106,-23,82 2 0341 -- aacute
-char225 "
-^a 660,774,18,106,-23,82 2 0342 -- acircumflex
-char226 "
-~a 660,767,18,106,-23,82 2 0343 -- atilde
-char227 "
-:a 660,769,18,106,-23,82 2 0344 -- adieresis
-char228 "
-oa 660,834,18,106,-23,82 2 0345 -- aring
-char229 "
-ae 1080,574,18,75,-25,75 0 0346 -- ae
-char230 "
-,c 640,574,251,89,-33,82 1 0347 -- ccedilla
-char231 "
-`e 640,851,18,77,-27,77 2 0350 -- egrave
-char232 "
-'e 640,849,18,77,-27,77 2 0351 -- eacute
-char233 "
-^e 640,774,18,77,-27,77 2 0352 -- ecircumflex
-char234 "
-:e 640,769,18,77,-27,77 2 0353 -- edieresis
-char235 "
-`i 240,851,0,157,-3,82 2 0354 -- igrave
-char236 "
-'i 240,849,0,253,-3,82 2 0355 -- iacute
-char237 "
-^i 240,774,0,248,11,82 2 0356 -- icircumflex
-char238 "
-:i 240,769,0,245,-3,82 2 0357 -- idieresis
-char239 "
-Sd 640,754,18,109,-23,82 2 0360 -- eth
-char240 "
-~n 600,767,0,74,-4,74 2 0361 -- ntilde
-char241 "
-`o 640,851,18,82,-21,82 2 0362 -- ograve
-char242 "
-'o 640,849,18,82,-21,82 2 0363 -- oacute
-char243 "
-^o 640,774,18,82,-21,82 2 0364 -- ocircumflex
-char244 "
-~o 640,767,18,82,-21,82 2 0365 -- otilde
-char245 "
-:o 640,769,18,82,-21,82 2 0366 -- odieresis
-char246 "
-char247 600,526,20,60,-34,60 0 0367 -- divide
-/o 660,608,50,75,-31,75 0 0370 -- oslash
-char248 "
-`u 600,851,18,97,-37,82 2 0371 -- ugrave
-char249 "
-'u 600,849,18,97,-37,82 2 0372 -- uacute
-char250 "
-^u 600,774,18,97,-37,82 2 0373 -- ucircumflex
-char251 "
-:u 600,769,18,97,-37,82 2 0374 -- udieresis
-char252 "
-'y 580,849,185,144,-25,82 3 0375 -- yacute
-char253 "
-Tp 660,740,185,76,37,76 3 0376 -- thorn
-char254 "
-:y 580,769,185,144,-25,82 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/AI b/contrib/groff/font/devps/AI
deleted file mode 100644
index be0e09950a19..000000000000
--- a/contrib/groff/font/devps/AI
+++ /dev/null
@@ -1,575 +0,0 @@
-name AI
-internalname AvantGarde-BookOblique
-slant 10.5
-spacewidth 277
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -62
-A w -65
-A v -70
-A u -20
-A ' -100
-A cq -100
-A rq -100
-A Y -92
-A W -60
-A V -102
-A U -40
-A T -45
-A Q -40
-A O -50
-A G -40
-A C -40
-B A -10
-C A -40
-D . -20
-D , -20
-D Y -30
-D W -10
-D V -50
-D A -50
-F . -160
-F e -20
-F , -180
-F a -20
-F A -75
-G . -20
-G , -20
-G Y -20
-J . -15
-J a -20
-J A -30
-K o -15
-K e -20
-K O -20
-L y -23
-L ' -130
-L cq -130
-L rq -130
-L Y -91
-L W -67
-L V -113
-L T -46
-O . -30
-O , -30
-O Y -30
-O X -30
-O W -20
-O V -60
-O T -30
-O A -60
-P . -300
-P o -60
-P e -20
-P , -280
-P a -20
-P A -114
-Q , 20
-R Y -10
-R W 10
-R V -10
-R T 6
-S , 20
-T y -50
-T w -55
-T u -46
-T ; -29
-T r -30
-T . -91
-T o -70
-T i 10
-T - -75
-T hy -75
-T char173 -75
-T e -49
-T , -82
-T : -15
-T a -90
-T O -30
-T A -45
-U . -20
-U , -20
-U A -40
-V u -40
-V ; -33
-V . -165
-V o -101
-V i -5
-V - -75
-V hy -75
-V char173 -75
-V e -101
-V , -145
-V : -18
-V a -104
-V O -60
-V G -20
-V A -102
-W y -2
-W u -30
-W ; -33
-W . -106
-W o -46
-W i 6
-W - -35
-W hy -35
-W char173 -35
-W e -47
-W , -106
-W : -15
-W a -50
-W O -20
-W A -58
-Y u -52
-Y ; -23
-Y . -175
-Y o -89
-Y - -85
-Y hy -85
-Y char173 -85
-Y e -89
-Y , -145
-Y : -10
-Y a -93
-Y O -30
-Y A -92
-a p 20
-a b 20
-b y -20
-b v -20
-c y -20
-c k -15
-, ' -120
-, cq -120
-, rq -120
-e y -20
-e w -20
-e v -20
-f . -50
-f o -40
-f l -30
-f i -34
-f f -60
-f e -20
-f .i -34
-f , -50
-f a -40
-g a -15
-h y -30
-k y -5
-k e -15
-m y -20
-m u -20
-m a -20
-n y -15
-n v -20
-o y -20
-o x -15
-o w -20
-o v -30
-p y -20
-. ' -120
-. cq -120
-. rq -120
-lq ` -35
-lq oq -35
-lq A -100
-` ` -203
-` oq -203
-oq ` -203
-oq oq -203
-` A -100
-oq A -100
-' v -30
-cq v -30
-' t 10
-cq t 10
-' s -15
-cq s -15
-' r -20
-cq r -20
-' ' -203
-' cq -203
-cq ' -203
-cq cq -203
-' rq -35
-cq rq -35
-' d -110
-cq d -110
-r y 40
-r v 40
-r u 20
-r t 20
-r s 20
-r q -8
-r . -73
-r p 20
-r o -20
-r n 21
-r m 28
-r l 20
-r k 20
-r i 20
-r - -60
-r hy -60
-r char173 -60
-r g -15
-r e -4
-r d -6
-r , -75
-r c -20
-r a -20
-s . 20
-s , 20
-v . -130
-v o -30
-v e -20
-v , -100
-v a -30
-w . -100
-w o -30
-w h 15
-w e -20
-w , -90
-w a -30
-y . -125
-y o -30
-y e -20
-y , -110
-y a -30
-charset
-ha 606,740,0,54,-60,54 2 0000 -- asciicircum
-ti 606,319,0,28,-64,28 0 0001 -- asciitilde
-vS 498,927,13,145,-7,81 2 0002 -- Scaron
-vZ 480,927,0,166,38,81 2 0003 -- Zcaron
-vs 388,764,13,170,1,81 2 0004 -- scaron
-vz 425,764,0,152,40,81 2 0005 -- zcaron
-:Y 592,928,0,187,-88,81 2 0006 -- Ydieresis
-tm 1000,740,0,3,-87,3 2 0007 -- trademark
-aq 198,740,0,129,-103,81 2 0010 -- quotesingle
-space 277 0 0040
-! 295,740,0,77,-61,77 2 0041 -- exclam
-" 309,740,0,151,-80,81 2 0042 -- quotedbl
-dq "
-# 554,740,0,116,-21,81 2 0043 -- numbersign
-sh "
-$ 554,811,70,77,-57,77 2 0044 -- dollar
-Do "
-% 775,751,13,62,-74,62 2 0045 -- percent
-& 757,753,12,68,-42,68 2 0046 -- ampersand
-' 351,740,0,92,-145,81 2 0047 -- quoteright
-cq "
-( 369,757,205,176,-39,81 3 0050 -- parenleft
-) 369,757,205,63,74,63 3 0051 -- parenright
-* 425,740,0,104,-120,81 2 0052 -- asterisk
-+ 606,506,0,52,-42,52 0 0053 -- plus
-, 277,126,67,0,48 0 0054 -- comma
-- 332,315,0,78,-26,78 0 0055 -- hyphen
-hy "
-char173 "
-. 277,126,0,0,-52 0 0056 -- period
-/ 437,740,100,153,25,81 2 0057 -- slash
-sl "
-0 554,753,13,118,-21,81 2 0060 -- zero
-1 554,740,0,0,-210 2 0061 -- one
-2 554,753,0,111,10,81 2 0062 -- two
-3 554,753,13,61,-23,61 2 0063 -- three
-4 554,740,0,94,11,81 2 0064 -- four
-5 554,740,13,101,-19,81 2 0065 -- five
-6 554,739,13,76,-15,76 2 0066 -- six
-7 554,740,0,124,-60,81 2 0067 -- seven
-8 554,753,13,76,-27,76 2 0070 -- eight
-9 554,752,0,122,-61,81 2 0071 -- nine
-: 277,548,0,51,-52,51 0 0072 -- colon
-; 277,548,67,51,48,51 0 0073 -- semicolon
-< 606,514,8,93,-37,81 0 0074 -- less
-= 606,388,0,71,-23,71 0 0075 -- equal
-> 606,514,8,57,-1,57 0 0076 -- greater
-? 591,752,0,87,-108,81 2 0077 -- question
-@ 867,753,13,71,-76,71 2 0100 -- at
-at "
-A 740,740,0,39,38,39 2 0101 -- A
-B 574,740,0,82,-24,81 2 0102 -- B
-C 813,752,13,107,-55,81 2 0103 -- C
-D 744,740,0,79,-24,79 2 0104 -- D
-E 536,740,0,126,-20,81 2 0105 -- E
-F 485,740,0,146,-20,81 2 0106 -- F
-G 872,753,13,69,-53,69 2 0107 -- G
-H 683,740,0,111,-26,81 2 0110 -- H
-I 226,740,0,111,-26,81 2 0111 -- I
-J 482,740,13,107,13,81 2 0112 -- J
-K 591,740,0,187,-31,81 2 0113 -- K
-L 462,740,0,62,-32,62 2 0114 -- L
-M 919,740,0,111,-26,81 2 0115 -- M
-N 740,740,0,111,-25,81 2 0116 -- N
-O 869,753,13,82,-55,81 2 0117 -- O
-P 592,740,0,122,-25,81 2 0120 -- P
-Q 871,753,13,91,-52,81 2 0121 -- Q
-R 607,740,0,112,-20,81 2 0122 -- R
-S 498,753,13,113,-7,81 2 0123 -- S
-T 426,740,0,180,-81,81 2 0124 -- T
-U 655,740,13,111,-68,81 2 0125 -- U
-V 702,740,0,178,-95,81 2 0126 -- V
-W 960,740,0,177,-98,81 2 0127 -- W
-X 609,740,0,165,42,81 2 0130 -- X
-Y 592,740,0,187,-88,81 2 0131 -- Y
-Z 480,740,0,166,38,81 2 0132 -- Z
-[ 351,753,179,176,-95,81 2 0133 -- bracketleft
-lB "
-\ 605,740,100,0,-205 2 0134 -- backslash
-rs "
-] 351,753,179,11,69,11 2 0135 -- bracketright
-rB "
-a^ 502,764,0,94,-142,81 2 0136 -- circumflex
-^ "
-_ 500,0,125,36,73,36 0 0137 -- underscore
-` 351,740,0,57,-182,57 2 0140 -- quoteleft
-oq "
-a 683,561,13,89,-38,81 0 0141 -- a
-b 682,740,13,71,-18,71 2 0142 -- b
-c 647,561,13,81,-37,81 0 0143 -- c
-d 685,740,13,120,-35,81 2 0144 -- d
-e 650,561,13,64,-34,64 0 0145 -- e
-f 314,753,0,190,-54,81 2 0146 -- f
-g 673,561,215,84,-6,81 1 0147 -- g
-h 610,740,0,46,-12,46 2 0150 -- h
-i 200,740,0,122,-15,81 2 0151 -- i
-j 203,740,192,121,130,81 3 0152 -- j
-k 502,740,0,136,-20,81 2 0153 -- k
-l 200,740,0,122,-15,81 2 0154 -- l
-m 938,561,0,50,-16,50 0 0155 -- m
-n 610,561,0,49,-15,49 0 0156 -- n
-o 655,561,13,64,-38,64 0 0157 -- o
-p 682,561,192,67,22,67 1 0160 -- p
-q 682,561,192,85,-33,81 1 0161 -- q
-r 301,561,0,144,-15,81 0 0162 -- r
-s 388,561,13,86,1,81 0 0163 -- s
-t 339,740,0,142,-54,81 2 0164 -- t
-u 608,547,13,84,-50,81 0 0165 -- u
-v 554,547,0,143,-58,81 0 0166 -- v
-w 831,547,0,140,-64,81 0 0167 -- w
-x 480,547,0,139,38,81 0 0170 -- x
-y 536,547,192,138,-47,81 1 0171 -- y
-z 425,547,0,123,40,81 0 0172 -- z
-lC 351,740,189,167,-65,81 2 0173 -- braceleft
-{ "
-ba 672,740,100,0,-230 2 0174 -- bar
-| "
-rC 351,740,189,37,65,37 2 0175 -- braceright
-} "
-a~ 439,754,0,131,-129,81 2 0176 -- tilde
-~ "
-bq 354,126,68,0,-26 0 0200 -- quotesinglbase
-Fo 425,481,0,94,-42,81 0 0201 -- guillemotleft
-char171 "
-Fc 425,481,0,62,-10,62 0 0202 -- guillemotright
-char187 "
-bu 606,532,0,0,-167 0 0203 -- bullet
-Fn 554,818,153,165,89,81 2 0204 -- florin
-f/ 166,740,0,301,163,81 2 0205 -- fraction
-%0 1174,751,13,58,-78,58 2 0206 -- perthousand
-dg 553,740,133,90,-96,81 2 0207 -- dagger
-dd 553,740,133,90,-22,81 2 0210 -- daggerdbl
-en 500,315,0,73,-31,73 0 0211 -- endash
-em 1000,315,0,73,-31,73 0 0212 -- emdash
-fi 487,753,0,122,-54,81 2 0214 -- fi
-fl 485,753,0,122,-54,81 2 0215 -- fl
-.i 200,547,0,86,-15,81 0 0220 -- dotlessi
-ga 378,786,0,97,-154,81 2 0222 -- grave
-a" 552,800,0,92,-189,81 2 0223 -- hungarumlaut
-a. 222,765,0,118,-142,81 2 0224 -- dotaccent
-ab 453,754,0,138,-142,81 2 0225 -- breve
-ah 502,764,0,113,-160,81 2 0226 -- caron
-ao 332,807,0,119,-141,81 2 0227 -- ring
-ho 302,0,191,0,-3 1 0230 -- ogonek
-lq 502,740,0,55,-184,55 2 0231 -- quotedblleft
-rq 484,740,0,108,-147,81 2 0232 -- quotedblright
-oe 1137,561,13,73,-30,73 0 0233 -- oe
-/l 300,740,0,104,-45,81 2 0234 -- lslash
-Bq 502,126,68,0,-26 0 0235 -- quotedblbase
-OE 1194,753,13,135,-57,81 2 0236 -- OE
-/L 517,740,0,62,-57,62 2 0237 -- Lslash
-r! 295,548,192,41,-24,41 1 0241 -- exclamdown
-char161 "
-ct 554,707,0,92,-65,81 0 0242 -- cent
-char162 "
-Po 554,753,0,110,21,81 2 0243 -- sterling
-char163 "
-Cs 554,580,0,141,26,81 0 0244 -- currency
-char164 "
-Ye 554,740,0,183,-25,81 2 0245 -- yen
-char165 "
-bb 672,740,100,0,-230 2 0246 -- brokenbar
-char166 "
-sc 615,753,141,32,-68,32 2 0247 -- section
-char167 "
-ad 369,765,0,118,-141,81 2 0250 -- dieresis
-char168 "
-co 747,752,12,133,-3,81 2 0251 -- copyright
-char169 "
-Of 369,753,0,175,-52,81 2 0252 -- ordfeminine
-char170 "
-fo 251,481,0,94,-42,81 0 0253 -- guilsinglleft
-no 606,388,0,71,-60,71 0 0254 -- logicalnot
-char172 "
-\- 606,287,0,52,-42,52 0 0255 -- minus
-rg 747,752,12,133,-3,81 2 0256 -- registered
-char174 "
-a- 485,736,0,112,-147,81 0 0257 -- macron
-char175 "
-de 400,709,0,101,-108,81 0 0260 -- degree
-char176 "
-char177 606,518,24,62,3,62 0 0261 -- plusminus
-S2 332,747,0,151,-24,81 2 0262 -- twosuperior
-char178 "
-S3 332,747,0,126,-48,81 2 0263 -- threesuperior
-char179 "
-aa 375,786,0,119,-153,81 2 0264 -- acute
-char180 "
-char181 608,547,184,70,4,70 0 0265 -- mu
-ps 564,740,110,174,-69,81 2 0266 -- paragraph
-char182 "
-pc 277,316,0,8,-87,8 0 0267 -- periodcentered
-char183 "
-ac 324,0,222,0,-2 1 0270 -- cedilla
-char184 "
-S1 332,740,0,53,-140,53 2 0271 -- onesuperior
-char185 "
-Om 369,753,0,147,-66,81 2 0272 -- ordmasculine
-char186 "
-fc 251,481,0,62,-10,62 0 0273 -- guilsinglright
-14 831,740,0,0,-133 2 0274 -- onequarter
-char188 "
-12 831,740,0,29,-114,29 2 0275 -- onehalf
-char189 "
-34 831,747,0,44,-76,44 2 0276 -- threequarters
-char190 "
-r? 591,548,205,0,-14 1 0277 -- questiondown
-char191 "
-`A 740,949,0,39,38,39 2 0300 -- Agrave
-char192 "
-'A 740,949,0,39,38,39 2 0301 -- Aacute
-char193 "
-^A 740,927,0,39,38,39 2 0302 -- Acircumflex
-char194 "
-~A 740,917,0,39,38,39 2 0303 -- Atilde
-char195 "
-:A 740,928,0,39,38,39 2 0304 -- Adieresis
-char196 "
-oA 740,955,0,39,38,39 2 0305 -- Aring
-char197 "
-AE 992,740,0,102,70,81 2 0306 -- AE
-char198 "
-,C 813,752,222,107,-55,81 3 0307 -- Ccedilla
-char199 "
-`E 536,949,0,126,-20,81 2 0310 -- Egrave
-char200 "
-'E 536,949,0,126,-20,81 2 0311 -- Eacute
-char201 "
-^E 536,927,0,126,-20,81 2 0312 -- Ecircumflex
-char202 "
-:E 536,928,0,126,-20,81 2 0313 -- Edieresis
-char203 "
-`I 226,949,0,164,-26,81 2 0314 -- Igrave
-char204 "
-'I 226,949,0,264,-26,81 2 0315 -- Iacute
-char205 "
-^I 226,927,0,263,-26,81 2 0316 -- Icircumflex
-char206 "
-:I 226,928,0,220,-26,81 2 0317 -- Idieresis
-char207 "
--D 790,740,0,73,-54,73 2 0320 -- Eth
-char208 "
-~N 740,917,0,111,-25,81 2 0321 -- Ntilde
-char209 "
-`O 869,949,13,82,-55,81 2 0322 -- Ograve
-char210 "
-'O 869,949,13,82,-55,81 2 0323 -- Oacute
-char211 "
-^O 869,927,13,82,-55,81 2 0324 -- Ocircumflex
-char212 "
-~O 869,917,13,82,-55,81 2 0325 -- Otilde
-char213 "
-:O 869,928,13,82,-55,81 2 0326 -- Odieresis
-char214 "
-char215 606,482,0,56,-37,56 0 0327 -- multiply
-/O 868,819,83,111,-26,81 2 0330 -- Oslash
-char216 "
-`U 655,949,13,111,-68,81 2 0331 -- Ugrave
-char217 "
-'U 655,949,13,111,-68,81 2 0332 -- Uacute
-char218 "
-^U 655,927,13,111,-68,81 2 0333 -- Ucircumflex
-char219 "
-:U 655,928,13,111,-68,81 2 0334 -- Udieresis
-char220 "
-'Y 592,949,0,187,-88,81 2 0335 -- Yacute
-char221 "
-TP 592,740,0,79,-10,79 2 0336 -- Thorn
-char222 "
-ss 554,753,13,74,-11,74 2 0337 -- germandbls
-char223 "
-`a 683,786,13,89,-38,81 2 0340 -- agrave
-char224 "
-'a 683,786,13,89,-38,81 2 0341 -- aacute
-char225 "
-^a 683,764,13,89,-38,81 2 0342 -- acircumflex
-char226 "
-~a 683,754,13,89,-38,81 2 0343 -- atilde
-char227 "
-:a 683,765,13,89,-38,81 2 0344 -- adieresis
-char228 "
-oa 683,807,13,89,-38,81 2 0345 -- aring
-char229 "
-ae 1157,561,13,62,-30,62 0 0346 -- ae
-char230 "
-,c 647,561,222,81,-37,81 1 0347 -- ccedilla
-char231 "
-`e 650,786,13,64,-34,64 2 0350 -- egrave
-char232 "
-'e 650,786,13,64,-34,64 2 0351 -- eacute
-char233 "
-^e 650,764,13,64,-34,64 2 0352 -- ecircumflex
-char234 "
-:e 650,765,13,64,-34,64 2 0353 -- edieresis
-char235 "
-`i 200,786,0,146,-15,81 2 0354 -- igrave
-char236 "
-'i 200,786,0,247,-15,81 2 0355 -- iacute
-char237 "
-^i 200,764,0,245,9,81 2 0356 -- icircumflex
-char238 "
-:i 200,765,0,203,-15,81 2 0357 -- idieresis
-char239 "
-Sd 655,753,12,70,-38,70 2 0360 -- eth
-char240 "
-~n 610,754,0,49,-15,49 2 0361 -- ntilde
-char241 "
-`o 655,786,13,64,-38,64 2 0362 -- ograve
-char242 "
-'o 655,786,13,64,-38,64 2 0363 -- oacute
-char243 "
-^o 655,764,13,64,-38,64 2 0364 -- ocircumflex
-char244 "
-~o 655,754,13,64,-38,64 2 0365 -- otilde
-char245 "
-:o 655,765,13,64,-38,64 2 0366 -- odieresis
-char246 "
-char247 606,519,13,52,-42,52 0 0367 -- divide
-/o 653,614,64,100,-1,81 0 0370 -- oslash
-char248 "
-`u 608,786,13,84,-50,81 2 0371 -- ugrave
-char249 "
-'u 608,786,13,84,-50,81 2 0372 -- uacute
-char250 "
-^u 608,764,13,84,-50,81 2 0373 -- ucircumflex
-char251 "
-:u 608,765,13,84,-50,81 2 0374 -- udieresis
-char252 "
-'y 536,786,192,138,-47,81 3 0375 -- yacute
-char253 "
-Tp 682,740,192,67,22,67 3 0376 -- thorn
-char254 "
-:y 536,765,192,138,-47,81 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/AR b/contrib/groff/font/devps/AR
deleted file mode 100644
index 9dff2dc08a3e..000000000000
--- a/contrib/groff/font/devps/AR
+++ /dev/null
@@ -1,574 +0,0 @@
-name AR
-internalname AvantGarde-Book
-spacewidth 277
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -62
-A w -65
-A v -70
-A u -20
-A ' -100
-A cq -100
-A rq -100
-A Y -92
-A W -60
-A V -102
-A U -40
-A T -45
-A Q -40
-A O -50
-A G -40
-A C -40
-B A -10
-C A -40
-D . -20
-D , -20
-D Y -30
-D W -10
-D V -50
-D A -50
-F . -160
-F e -20
-F , -180
-F a -20
-F A -75
-G . -20
-G , -20
-G Y -20
-J . -15
-J a -20
-J A -30
-K o -15
-K e -20
-K O -20
-L y -23
-L ' -130
-L cq -130
-L rq -130
-L Y -91
-L W -67
-L V -113
-L T -46
-O . -30
-O , -30
-O Y -30
-O X -30
-O W -20
-O V -60
-O T -30
-O A -60
-P . -300
-P o -60
-P e -20
-P , -280
-P a -20
-P A -114
-Q , 20
-R Y -10
-R W 10
-R V -10
-R T 6
-S , 20
-T y -50
-T w -55
-T u -46
-T ; -29
-T r -30
-T . -91
-T o -70
-T i 10
-T - -75
-T hy -75
-T char173 -75
-T e -49
-T , -82
-T : -15
-T a -90
-T O -30
-T A -45
-U . -20
-U , -20
-U A -40
-V u -40
-V ; -33
-V . -165
-V o -101
-V i -5
-V - -75
-V hy -75
-V char173 -75
-V e -101
-V , -145
-V : -18
-V a -104
-V O -60
-V G -20
-V A -102
-W y -2
-W u -30
-W ; -33
-W . -106
-W o -46
-W i 6
-W - -35
-W hy -35
-W char173 -35
-W e -47
-W , -106
-W : -15
-W a -50
-W O -20
-W A -58
-Y u -52
-Y ; -23
-Y . -175
-Y o -89
-Y - -85
-Y hy -85
-Y char173 -85
-Y e -89
-Y , -145
-Y : -10
-Y a -93
-Y O -30
-Y A -92
-a p 20
-a b 20
-b y -20
-b v -20
-c y -20
-c k -15
-, ' -120
-, cq -120
-, rq -120
-e y -20
-e w -20
-e v -20
-f . -50
-f o -40
-f l -30
-f i -34
-f f -60
-f e -20
-f .i -34
-f , -50
-f a -40
-g a -15
-h y -30
-k y -5
-k e -15
-m y -20
-m u -20
-m a -20
-n y -15
-n v -20
-o y -20
-o x -15
-o w -20
-o v -30
-p y -20
-. ' -120
-. cq -120
-. rq -120
-lq ` -35
-lq oq -35
-lq A -100
-` ` -203
-` oq -203
-oq ` -203
-oq oq -203
-` A -100
-oq A -100
-' v -30
-cq v -30
-' t 10
-cq t 10
-' s -15
-cq s -15
-' r -20
-cq r -20
-' ' -203
-' cq -203
-cq ' -203
-cq cq -203
-' rq -35
-cq rq -35
-' d -110
-cq d -110
-r y 40
-r v 40
-r u 20
-r t 20
-r s 20
-r q -8
-r . -73
-r p 20
-r o -20
-r n 21
-r m 28
-r l 20
-r k 20
-r i 20
-r - -60
-r hy -60
-r char173 -60
-r g -15
-r e -4
-r d -6
-r , -75
-r c -20
-r a -20
-s . 20
-s , 20
-v . -130
-v o -30
-v e -20
-v , -100
-v a -30
-w . -100
-w o -30
-w h 15
-w e -20
-w , -90
-w a -30
-y . -125
-y o -30
-y e -20
-y , -110
-y a -30
-charset
-ha 606,740 2 0000 -- asciicircum
-ti 606,319 0 0001 -- asciitilde
-vS 498,927,13 2 0002 -- Scaron
-vZ 480,927 2 0003 -- Zcaron
-vs 388,764,13 2 0004 -- scaron
-vz 425,764 2 0005 -- zcaron
-:Y 592,928 2 0006 -- Ydieresis
-tm 1000,740 2 0007 -- trademark
-aq 198,740 2 0010 -- quotesingle
-space 277 0 0040
-! 295,740 2 0041 -- exclam
-" 309,740 2 0042 -- quotedbl
-dq "
-# 554,740 2 0043 -- numbersign
-sh "
-$ 554,811,70 2 0044 -- dollar
-Do "
-% 775,751,13 2 0045 -- percent
-& 757,753,12 2 0046 -- ampersand
-' 351,740 2 0047 -- quoteright
-cq "
-( 369,757,205 3 0050 -- parenleft
-) 369,757,205 3 0051 -- parenright
-* 425,740 2 0052 -- asterisk
-+ 606,506 0 0053 -- plus
-, 277,126,67 0 0054 -- comma
-- 332,315 0 0055 -- hyphen
-hy "
-char173 "
-. 277,126 0 0056 -- period
-/ 437,740,100 2 0057 -- slash
-sl "
-0 554,753,13 2 0060 -- zero
-1 554,740 2 0061 -- one
-2 554,753 2 0062 -- two
-3 554,753,13 2 0063 -- three
-4 554,740 2 0064 -- four
-5 554,740,13 2 0065 -- five
-6 554,739,13 2 0066 -- six
-7 554,740 2 0067 -- seven
-8 554,753,13 2 0070 -- eight
-9 554,752 2 0071 -- nine
-: 277,548 0 0072 -- colon
-; 277,548,67 0 0073 -- semicolon
-< 606,514,8 0 0074 -- less
-= 606,388 0 0075 -- equal
-> 606,514,8 0 0076 -- greater
-? 591,752 2 0077 -- question
-@ 867,753,13 2 0100 -- at
-at "
-A 740,740 2 0101 -- A
-B 574,740 2 0102 -- B
-C 813,752,13 2 0103 -- C
-D 744,740 2 0104 -- D
-E 536,740 2 0105 -- E
-F 485,740 2 0106 -- F
-G 872,753,13 2 0107 -- G
-H 683,740 2 0110 -- H
-I 226,740 2 0111 -- I
-J 482,740,13 2 0112 -- J
-K 591,740 2 0113 -- K
-L 462,740 2 0114 -- L
-M 919,740 2 0115 -- M
-N 740,740 2 0116 -- N
-O 869,753,13 2 0117 -- O
-P 592,740 2 0120 -- P
-Q 871,753,13 2 0121 -- Q
-R 607,740 2 0122 -- R
-S 498,753,13 2 0123 -- S
-T 426,740 2 0124 -- T
-U 655,740,13 2 0125 -- U
-V 702,740 2 0126 -- V
-W 960,740 2 0127 -- W
-X 609,740 2 0130 -- X
-Y 592,740 2 0131 -- Y
-Z 480,740 2 0132 -- Z
-[ 351,753,179 2 0133 -- bracketleft
-lB "
-\ 605,740,100 2 0134 -- backslash
-rs "
-] 351,753,179 2 0135 -- bracketright
-rB "
-a^ 502,764 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 351,740 2 0140 -- quoteleft
-oq "
-a 683,561,13 0 0141 -- a
-b 682,740,13 2 0142 -- b
-c 647,561,13 0 0143 -- c
-d 685,740,13 2 0144 -- d
-e 650,561,13 0 0145 -- e
-f 314,753 2 0146 -- f
-g 673,561,215 1 0147 -- g
-h 610,740 2 0150 -- h
-i 200,740 2 0151 -- i
-j 203,740,192 3 0152 -- j
-k 502,740 2 0153 -- k
-l 200,740 2 0154 -- l
-m 938,561 0 0155 -- m
-n 610,561 0 0156 -- n
-o 655,561,13 0 0157 -- o
-p 682,561,192 1 0160 -- p
-q 682,561,192 1 0161 -- q
-r 301,561 0 0162 -- r
-s 388,561,13 0 0163 -- s
-t 339,740 2 0164 -- t
-u 608,547,13 0 0165 -- u
-v 554,547 0 0166 -- v
-w 831,547 0 0167 -- w
-x 480,547 0 0170 -- x
-y 536,547,192 1 0171 -- y
-z 425,547 0 0172 -- z
-lC 351,740,189 2 0173 -- braceleft
-{ "
-ba 672,740,100 2 0174 -- bar
-| "
-rC 351,740,189 2 0175 -- braceright
-} "
-a~ 439,754 2 0176 -- tilde
-~ "
-bq 354,126,68 0 0200 -- quotesinglbase
-Fo 425,481 0 0201 -- guillemotleft
-char171 "
-Fc 425,481 0 0202 -- guillemotright
-char187 "
-bu 606,532 0 0203 -- bullet
-Fn 554,818,153 2 0204 -- florin
-f/ 166,740 2 0205 -- fraction
-%0 1174,751,13 2 0206 -- perthousand
-dg 553,740,133 2 0207 -- dagger
-dd 553,740,133 2 0210 -- daggerdbl
-en 500,315 0 0211 -- endash
-em 1000,315 0 0212 -- emdash
-fi 487,753 2 0214 -- fi
-fl 485,753 2 0215 -- fl
-.i 200,547 0 0220 -- dotlessi
-ga 378,786 2 0222 -- grave
-a" 552,800 2 0223 -- hungarumlaut
-a. 222,765 2 0224 -- dotaccent
-ab 453,754 2 0225 -- breve
-ah 502,764 2 0226 -- caron
-ao 332,807 2 0227 -- ring
-ho 302,0,191 1 0230 -- ogonek
-lq 502,740 2 0231 -- quotedblleft
-rq 484,740 2 0232 -- quotedblright
-oe 1137,561,13 0 0233 -- oe
-/l 300,740 2 0234 -- lslash
-Bq 502,126,68 0 0235 -- quotedblbase
-OE 1194,753,13 2 0236 -- OE
-/L 517,740 2 0237 -- Lslash
-r! 295,548,192 1 0241 -- exclamdown
-char161 "
-ct 554,707 0 0242 -- cent
-char162 "
-Po 554,753 2 0243 -- sterling
-char163 "
-Cs 554,580 0 0244 -- currency
-char164 "
-Ye 554,740 2 0245 -- yen
-char165 "
-bb 672,740,100 2 0246 -- brokenbar
-char166 "
-sc 615,753,141 2 0247 -- section
-char167 "
-ad 369,765 2 0250 -- dieresis
-char168 "
-co 747,752,12 2 0251 -- copyright
-char169 "
-Of 369,753 2 0252 -- ordfeminine
-char170 "
-fo 251,481 0 0253 -- guilsinglleft
-no 606,388 0 0254 -- logicalnot
-char172 "
-\- 606,287 0 0255 -- minus
-rg 747,752,12 2 0256 -- registered
-char174 "
-a- 485,736 0 0257 -- macron
-char175 "
-de 400,709 0 0260 -- degree
-char176 "
-char177 606,518,24 0 0261 -- plusminus
-S2 332,747 2 0262 -- twosuperior
-char178 "
-S3 332,747 2 0263 -- threesuperior
-char179 "
-aa 375,786 2 0264 -- acute
-char180 "
-char181 608,547,184 0 0265 -- mu
-ps 564,740,110 2 0266 -- paragraph
-char182 "
-pc 277,316 0 0267 -- periodcentered
-char183 "
-ac 324,0,222 1 0270 -- cedilla
-char184 "
-S1 332,740 2 0271 -- onesuperior
-char185 "
-Om 369,753 2 0272 -- ordmasculine
-char186 "
-fc 251,481 0 0273 -- guilsinglright
-14 831,740 2 0274 -- onequarter
-char188 "
-12 831,740 2 0275 -- onehalf
-char189 "
-34 831,747 2 0276 -- threequarters
-char190 "
-r? 591,548,205 1 0277 -- questiondown
-char191 "
-`A 740,949 2 0300 -- Agrave
-char192 "
-'A 740,949 2 0301 -- Aacute
-char193 "
-^A 740,927 2 0302 -- Acircumflex
-char194 "
-~A 740,917 2 0303 -- Atilde
-char195 "
-:A 740,928 2 0304 -- Adieresis
-char196 "
-oA 740,955 2 0305 -- Aring
-char197 "
-AE 992,740 2 0306 -- AE
-char198 "
-,C 813,752,222 3 0307 -- Ccedilla
-char199 "
-`E 536,949 2 0310 -- Egrave
-char200 "
-'E 536,949 2 0311 -- Eacute
-char201 "
-^E 536,927 2 0312 -- Ecircumflex
-char202 "
-:E 536,928 2 0313 -- Edieresis
-char203 "
-`I 226,949 2 0314 -- Igrave
-char204 "
-'I 226,949 2 0315 -- Iacute
-char205 "
-^I 226,927 2 0316 -- Icircumflex
-char206 "
-:I 226,928 2 0317 -- Idieresis
-char207 "
--D 790,740 2 0320 -- Eth
-char208 "
-~N 740,917 2 0321 -- Ntilde
-char209 "
-`O 869,949,13 2 0322 -- Ograve
-char210 "
-'O 869,949,13 2 0323 -- Oacute
-char211 "
-^O 869,927,13 2 0324 -- Ocircumflex
-char212 "
-~O 869,917,13 2 0325 -- Otilde
-char213 "
-:O 869,928,13 2 0326 -- Odieresis
-char214 "
-char215 606,482 0 0327 -- multiply
-/O 868,819,83 2 0330 -- Oslash
-char216 "
-`U 655,949,13 2 0331 -- Ugrave
-char217 "
-'U 655,949,13 2 0332 -- Uacute
-char218 "
-^U 655,927,13 2 0333 -- Ucircumflex
-char219 "
-:U 655,928,13 2 0334 -- Udieresis
-char220 "
-'Y 592,949 2 0335 -- Yacute
-char221 "
-TP 592,740 2 0336 -- Thorn
-char222 "
-ss 554,753,13 2 0337 -- germandbls
-char223 "
-`a 683,786,13 2 0340 -- agrave
-char224 "
-'a 683,786,13 2 0341 -- aacute
-char225 "
-^a 683,764,13 2 0342 -- acircumflex
-char226 "
-~a 683,754,13 2 0343 -- atilde
-char227 "
-:a 683,765,13 2 0344 -- adieresis
-char228 "
-oa 683,807,13 2 0345 -- aring
-char229 "
-ae 1157,561,13 0 0346 -- ae
-char230 "
-,c 647,561,222 1 0347 -- ccedilla
-char231 "
-`e 650,786,13 2 0350 -- egrave
-char232 "
-'e 650,786,13 2 0351 -- eacute
-char233 "
-^e 650,764,13 2 0352 -- ecircumflex
-char234 "
-:e 650,765,13 2 0353 -- edieresis
-char235 "
-`i 200,786 2 0354 -- igrave
-char236 "
-'i 200,786 2 0355 -- iacute
-char237 "
-^i 200,764 2 0356 -- icircumflex
-char238 "
-:i 200,765 2 0357 -- idieresis
-char239 "
-Sd 655,753,12 2 0360 -- eth
-char240 "
-~n 610,754 2 0361 -- ntilde
-char241 "
-`o 655,786,13 2 0362 -- ograve
-char242 "
-'o 655,786,13 2 0363 -- oacute
-char243 "
-^o 655,764,13 2 0364 -- ocircumflex
-char244 "
-~o 655,754,13 2 0365 -- otilde
-char245 "
-:o 655,765,13 2 0366 -- odieresis
-char246 "
-char247 606,519,13 0 0367 -- divide
-/o 653,614,64 0 0370 -- oslash
-char248 "
-`u 608,786,13 2 0371 -- ugrave
-char249 "
-'u 608,786,13 2 0372 -- uacute
-char250 "
-^u 608,764,13 2 0373 -- ucircumflex
-char251 "
-:u 608,765,13 2 0374 -- udieresis
-char252 "
-'y 536,786,192 3 0375 -- yacute
-char253 "
-Tp 682,740,192 3 0376 -- thorn
-char254 "
-:y 536,765,192 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/BMB b/contrib/groff/font/devps/BMB
deleted file mode 100644
index 186ec7bb42e4..000000000000
--- a/contrib/groff/font/devps/BMB
+++ /dev/null
@@ -1,441 +0,0 @@
-name BMB
-internalname Bookman-Demi
-spacewidth 340
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -1
-A w -9
-A v -8
-A Y -52
-A W -20
-A V -68
-A T -40
-F . -132
-F , -130
-F A -59
-L y 19
-L Y -35
-L W -41
-L V -50
-L T -4
-P . -128
-P , -129
-P A -46
-R y -8
-R Y -20
-R W -24
-R V -29
-R T -4
-T ; 5
-T s -10
-T r 27
-T . -122
-T o -28
-T i 27
-T - -10
-T hy -10
-T char173 -10
-T e -29
-T , -122
-T : 7
-T c -29
-T a -24
-T A -42
-V y 12
-V u -11
-V ; -38
-V r -15
-V . -105
-V o -79
-V i 15
-V - -10
-V hy -10
-V char173 -10
-V e -80
-V , -103
-V : -37
-V a -74
-V A -88
-W y 12
-W u -11
-W ; -38
-W r -15
-W . -105
-W o -78
-W i 15
-W - -10
-W hy -10
-W char173 -10
-W e -79
-W , -103
-W : -37
-W a -73
-W A -60
-Y v 24
-Y u -13
-Y ; -34
-Y q -66
-Y . -105
-Y p -23
-Y o -66
-Y i 2
-Y - -10
-Y hy -10
-Y char173 -10
-Y e -67
-Y , -103
-Y : -32
-Y a -60
-Y A -56
-f f 21
-r q -9
-r . -102
-r o -9
-r n 20
-r m 20
-r - -10
-r hy -10
-r char173 -10
-r h -23
-r g -9
-r f 20
-r e -10
-r d -10
-r , -101
-r c -9
-charset
-ha 600,681 2 0000 -- asciicircum
-ti 600,368 0 0001 -- asciitilde
-vS 660,896,17 2 0002 -- Scaron
-vZ 640,896 2 0003 -- Zcaron
-vs 520,717,8 2 0004 -- scaron
-vz 560,717 2 0005 -- zcaron
-:Y 700,877 2 0006 -- Ydieresis
-tm 980,681 2 0007 -- trademark
-aq 240,698 2 0010 -- quotesingle
-space 340 0 0040
-! 360,698,8 2 0041 -- exclam
-" 420,698 2 0042 -- quotedbl
-dq "
-# 660,681 2 0043 -- numbersign
-sh "
-$ 660,805,119 2 0044 -- dollar
-Do "
-% 940,698,8 2 0045 -- percent
-& 800,698,17 2 0046 -- ampersand
-' 320,698 2 0047 -- quoteright
-cq "
-( 320,749,150 2 0050 -- parenleft
-) 320,749,150 2 0051 -- parenright
-* 460,697 2 0052 -- asterisk
-+ 600,514 0 0053 -- plus
-, 340,162,124 0 0054 -- comma
-- 360,318 0 0055 -- hyphen
-hy "
-char173 "
-. 340,172,8 0 0056 -- period
-/ 600,725,149 2 0057 -- slash
-sl "
-0 660,698,17 2 0060 -- zero
-1 660,681 2 0061 -- one
-2 660,698 2 0062 -- two
-3 660,698,17 2 0063 -- three
-4 660,681 2 0064 -- four
-5 660,723,17 2 0065 -- five
-6 660,698,17 2 0066 -- six
-7 660,681 2 0067 -- seven
-8 660,698,17 2 0070 -- eight
-9 660,698,17 2 0071 -- nine
-: 340,515,8 0 0072 -- colon
-; 340,515,124 0 0073 -- semicolon
-< 600,542,9 0 0074 -- less
-= 600,421 0 0075 -- equal
-> 600,542,9 0 0076 -- greater
-? 660,698,8 2 0077 -- question
-@ 820,698,17 2 0100 -- at
-at "
-A 720,681 2 0101 -- A
-B 720,681 2 0102 -- B
-C 740,698,17 2 0103 -- C
-D 780,681 2 0104 -- D
-E 720,681 2 0105 -- E
-F 680,681 2 0106 -- F
-G 780,698,17 2 0107 -- G
-H 820,681 2 0110 -- H
-I 400,681 2 0111 -- I
-J 640,681,17 2 0112 -- J
-K 800,681 2 0113 -- K
-L 640,681 2 0114 -- L
-M 940,681 2 0115 -- M
-N 740,681 2 0116 -- N
-O 800,698,17 2 0117 -- O
-P 660,681 2 0120 -- P
-Q 800,698,226 3 0121 -- Q
-R 780,681 2 0122 -- R
-S 660,698,17 2 0123 -- S
-T 700,681 2 0124 -- T
-U 740,681,17 2 0125 -- U
-V 720,681 2 0126 -- V
-W 940,681 2 0127 -- W
-X 780,681 2 0130 -- X
-Y 700,681 2 0131 -- Y
-Z 640,681 2 0132 -- Z
-[ 300,725,138 2 0133 -- bracketleft
-lB "
-\ 600,725 2 0134 -- backslash
-rs "
-] 300,725,138 2 0135 -- bracketright
-rB "
-a^ 500,731 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 320,698 2 0140 -- quoteleft
-oq "
-a 580,515,8 0 0141 -- a
-b 600,725,8 2 0142 -- b
-c 580,515,8 0 0143 -- c
-d 640,725,8 2 0144 -- d
-e 580,515,8 0 0145 -- e
-f 380,741 2 0146 -- f
-g 580,595,243 1 0147 -- g
-h 680,725 2 0150 -- h
-i 360,729 2 0151 -- i
-j 340,729,221 3 0152 -- j
-k 660,725 2 0153 -- k
-l 340,725 2 0154 -- l
-m 1000,515 0 0155 -- m
-n 680,515 0 0156 -- n
-o 620,515,8 0 0157 -- o
-p 640,515,212 1 0160 -- p
-q 620,515,212 1 0161 -- q
-r 460,502 0 0162 -- r
-s 520,515,8 0 0163 -- s
-t 460,660,8 2 0164 -- t
-u 660,502,8 0 0165 -- u
-v 600,502 0 0166 -- v
-w 800,502 0 0167 -- w
-x 600,502 0 0170 -- x
-y 620,502,221 1 0171 -- y
-z 560,502 0 0172 -- z
-lC 320,726,139 2 0173 -- braceleft
-{ "
-ba 600,750,250 3 0174 -- bar
-| "
-rC 320,725,140 2 0175 -- braceright
-} "
-a~ 480,691 2 0176 -- tilde
-~ "
-bq 320,144,114 0 0200 -- quotesinglbase
-Fo 400,457 0 0201 -- guillemotleft
-char171 "
-Fc 400,457 0 0202 -- guillemotright
-char187 "
-bu 460,511 0 0203 -- bullet
-Fn 660,749,209 2 0204 -- florin
-f/ 120,681 2 0205 -- fraction
-%0 1360,698,8 2 0206 -- perthousand
-dg 440,698,156 2 0207 -- dagger
-dd 380,698,156 2 0210 -- daggerdbl
-en 500,318 0 0211 -- endash
-em 1000,318 0 0212 -- emdash
-fi 740,741 2 0214 -- fi
-fl 740,741 2 0215 -- fl
-.i 360,502 0 0220 -- dotlessi
-ga 400,730 2 0222 -- grave
-a" 440,741 2 0223 -- hungarumlaut
-a. 320,730 2 0224 -- dotaccent
-ab 500,722 2 0225 -- breve
-ah 500,717 2 0226 -- caron
-ao 340,755 2 0227 -- ring
-ho 320,0,163 0 0230 -- ogonek
-lq 540,698 2 0231 -- quotedblleft
-rq 540,698 2 0232 -- quotedblright
-oe 940,515,8 0 0233 -- oe
-/l 340,725 2 0234 -- lslash
-Bq 540,144,114 0 0235 -- quotedblbase
-OE 1220,698,17 2 0236 -- OE
-/L 640,681 2 0237 -- Lslash
-r! 360,515,191 0 0241 -- exclamdown
-char161 "
-ct 660,674 2 0242 -- cent
-char162 "
-Po 660,698,17 2 0243 -- sterling
-char163 "
-Cs 660,593 0 0244 -- currency
-char164 "
-Ye 660,681 2 0245 -- yen
-char165 "
-bb 600,675,175 2 0246 -- brokenbar
-char166 "
-sc 600,698,153 2 0247 -- section
-char167 "
-ad 500,698 2 0250 -- dieresis
-char168 "
-co 740,698,17 2 0251 -- copyright
-char169 "
-Of 400,698 2 0252 -- ordfeminine
-char170 "
-fo 220,457 0 0253 -- guilsinglleft
-no 600,421 0 0254 -- logicalnot
-char172 "
-\- 600,323 0 0255 -- minus
-rg 740,698,17 2 0256 -- registered
-char174 "
-a- 460,663 2 0257 -- macron
-char175 "
-de 400,698 2 0260 -- degree
-char176 "
-char177 600,514 0 0261 -- plusminus
-S2 396,698 2 0262 -- twosuperior
-char178 "
-S3 396,698 2 0263 -- threesuperior
-char179 "
-aa 400,731 2 0264 -- acute
-char180 "
-char181 660,502,221 1 0265 -- mu
-ps 800,681 2 0266 -- paragraph
-char182 "
-pc 340,355 0 0267 -- periodcentered
-char183 "
-ac 360,0,213 1 0270 -- cedilla
-char184 "
-S1 396,687 2 0271 -- onesuperior
-char185 "
-Om 400,698 2 0272 -- ordmasculine
-char186 "
-fc 220,457 0 0273 -- guilsinglright
-14 990,681 2 0274 -- onequarter
-char188 "
-12 990,681 2 0275 -- onehalf
-char189 "
-34 990,692 2 0276 -- threequarters
-char190 "
-r? 660,515,191 0 0277 -- questiondown
-char191 "
-`A 720,909 2 0300 -- Agrave
-char192 "
-'A 720,910 2 0301 -- Aacute
-char193 "
-^A 720,910 2 0302 -- Acircumflex
-char194 "
-~A 720,870 2 0303 -- Atilde
-char195 "
-:A 720,877 2 0304 -- Adieresis
-char196 "
-oA 720,934 2 0305 -- Aring
-char197 "
-AE 1140,681 2 0306 -- AE
-char198 "
-,C 740,698,213 3 0307 -- Ccedilla
-char199 "
-`E 720,909 2 0310 -- Egrave
-char200 "
-'E 720,910 2 0311 -- Eacute
-char201 "
-^E 720,910 2 0312 -- Ecircumflex
-char202 "
-:E 720,877 2 0313 -- Edieresis
-char203 "
-`I 400,909 2 0314 -- Igrave
-char204 "
-'I 400,910 2 0315 -- Iacute
-char205 "
-^I 400,910 2 0316 -- Icircumflex
-char206 "
-:I 400,877 2 0317 -- Idieresis
-char207 "
--D 780,681 2 0320 -- Eth
-char208 "
-~N 740,870 2 0321 -- Ntilde
-char209 "
-`O 800,909,17 2 0322 -- Ograve
-char210 "
-'O 800,910,17 2 0323 -- Oacute
-char211 "
-^O 800,910,17 2 0324 -- Ocircumflex
-char212 "
-~O 800,870,17 2 0325 -- Otilde
-char213 "
-:O 800,877,17 2 0326 -- Odieresis
-char214 "
-char215 600,514 0 0327 -- multiply
-/O 800,781,110 2 0330 -- Oslash
-char216 "
-`U 740,909,17 2 0331 -- Ugrave
-char217 "
-'U 740,910,17 2 0332 -- Uacute
-char218 "
-^U 740,910,17 2 0333 -- Ucircumflex
-char219 "
-:U 740,877,17 2 0334 -- Udieresis
-char220 "
-'Y 700,910 2 0335 -- Yacute
-char221 "
-TP 660,681 2 0336 -- Thorn
-char222 "
-ss 660,699,91 2 0337 -- germandbls
-char223 "
-`a 580,730,8 2 0340 -- agrave
-char224 "
-'a 580,731,8 2 0341 -- aacute
-char225 "
-^a 580,731,8 2 0342 -- acircumflex
-char226 "
-~a 580,691,8 2 0343 -- atilde
-char227 "
-:a 580,698,8 2 0344 -- adieresis
-char228 "
-oa 580,755,8 2 0345 -- aring
-char229 "
-ae 880,515,8 0 0346 -- ae
-char230 "
-,c 580,515,213 1 0347 -- ccedilla
-char231 "
-`e 580,730,8 2 0350 -- egrave
-char232 "
-'e 580,731,8 2 0351 -- eacute
-char233 "
-^e 580,731,8 2 0352 -- ecircumflex
-char234 "
-:e 580,698,8 2 0353 -- edieresis
-char235 "
-`i 360,730 2 0354 -- igrave
-char236 "
-'i 360,731 2 0355 -- iacute
-char237 "
-^i 360,731 2 0356 -- icircumflex
-char238 "
-:i 360,698 2 0357 -- idieresis
-char239 "
-Sd 620,741,8 2 0360 -- eth
-char240 "
-~n 680,691 2 0361 -- ntilde
-char241 "
-`o 620,730,8 2 0362 -- ograve
-char242 "
-'o 620,731,8 2 0363 -- oacute
-char243 "
-^o 620,731,8 2 0364 -- ocircumflex
-char244 "
-~o 620,691,8 2 0365 -- otilde
-char245 "
-:o 620,698,8 2 0366 -- odieresis
-char246 "
-char247 600,521 0 0367 -- divide
-/o 620,551,40 0 0370 -- oslash
-char248 "
-`u 660,730,8 2 0371 -- ugrave
-char249 "
-'u 660,731,8 2 0372 -- uacute
-char250 "
-^u 660,731,8 2 0373 -- ucircumflex
-char251 "
-:u 660,698,8 2 0374 -- udieresis
-char252 "
-'y 620,731,221 3 0375 -- yacute
-char253 "
-Tp 640,725,212 3 0376 -- thorn
-char254 "
-:y 620,698,221 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/BMBI b/contrib/groff/font/devps/BMBI
deleted file mode 100644
index 43d2bdd9628b..000000000000
--- a/contrib/groff/font/devps/BMBI
+++ /dev/null
@@ -1,444 +0,0 @@
-name BMBI
-internalname Bookman-DemiItalic
-slant 10
-spacewidth 340
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y 20
-A w 20
-A v 20
-A Y -25
-A W -35
-A V -40
-A T -17
-F . -105
-F , -98
-F A -35
-L y 62
-L Y -5
-L W -15
-L V -19
-L T -26
-P . -105
-P , -98
-P A -31
-R y 27
-R Y 4
-R W -4
-R V -8
-R T -3
-T y 56
-T w 69
-T u 42
-T ; 31
-T s -1
-T r 41
-T . -107
-T o -5
-T i 42
-T - -20
-T hy -20
-T char173 -20
-T e -10
-T , -100
-T : 26
-T c -8
-T a -8
-T A -42
-V y 17
-V u -1
-V ; -22
-V r 2
-V . -115
-V o -50
-V i 32
-V - -20
-V hy -20
-V char173 -20
-V e -50
-V , -137
-V : -28
-V a -50
-V A -50
-W y -51
-W u -69
-W ; -81
-W r -66
-W . -183
-W o -100
-W i -36
-W - -22
-W hy -22
-W char173 -22
-W e -100
-W , -201
-W : -86
-W a -100
-W A -77
-Y v 26
-Y u -1
-Y ; -4
-Y q -43
-Y . -113
-Y o -41
-Y i 20
-Y - -20
-Y hy -20
-Y char173 -20
-Y e -46
-Y , -106
-Y : -9
-Y a -45
-Y A -30
-f f 10
-r q -3
-r . -120
-r o -1
-r n 39
-r m 39
-r - -20
-r hy -20
-r char173 -20
-r h -35
-r g -23
-r f 42
-r e -6
-r d -3
-r , -113
-r c -5
-charset
-ha 620,681,0,24,-42,24 2 0000 -- asciicircum
-ti 620,368,0,35,-51,35 0 0001 -- asciitilde
-vS 700,915,17,81,-9,73 2 0002 -- Scaron
-vZ 680,915,0,110,27,73 2 0003 -- Zcaron
-vs 540,749,8,83,18,73 2 0004 -- scaron
-vz 560,749,8,76,14,73 2 0005 -- zcaron
-:Y 660,900,0,207,-22,73 2 0006 -- Ydieresis
-tm 940,681,0,92,8,73 2 0007 -- trademark
-aq 180,696,0,165,-76,73 2 0010 -- quotesingle
-space 340 0 0040
-! 320,698,8,96,-36,73 2 0041 -- exclam
-" 380,697,0,177,-90,73 2 0042 -- quotedbl
-dq "
-# 680,681,0,19,-107,19 2 0043 -- numbersign
-sh "
-$ 680,790,164,67,5,67 2 0044 -- dollar
-Do "
-% 880,698,17,69,-56,69 2 0045 -- percent
-& 980,698,17,86,2,73 2 0046 -- ampersand
-' 320,698,0,79,-121,73 2 0047 -- quoteright
-cq "
-( 260,741,134,178,19,73 2 0050 -- parenleft
-) 260,741,134,112,85,73 2 0051 -- parenright
-* 460,698,0,98,-76,73 2 0052 -- asterisk
-+ 600,514,0,45,-41,45 0 0053 -- plus
-, 340,185,124,8,-50,8 0 0054 -- comma
-- 280,313,0,89,-9,73 0 0055 -- hyphen
-hy "
-char173 "
-. 340,177,8,6,-56,6 0 0056 -- period
-/ 360,742,106,192,41,73 2 0057 -- slash
-sl "
-0 680,698,17,73,-37,73 2 0060 -- zero
-1 680,681,0,0,-73 2 0061 -- one
-2 680,698,0,44,-17,44 2 0062 -- two
-3 680,698,17,53,-22,53 2 0063 -- three
-4 680,681,0,78,-13,73 2 0064 -- four
-5 680,681,17,39,-28,39 2 0065 -- five
-6 680,698,17,74,-38,73 2 0066 -- six
-7 680,681,0,109,-73,73 2 0067 -- seven
-8 680,698,17,56,-18,56 2 0070 -- eight
-9 680,698,17,82,-21,73 2 0071 -- nine
-: 340,515,8,66,-56,66 0 0072 -- colon
-; 340,515,124,62,-50,62 0 0073 -- semicolon
-< 620,540,9,18,-29,18 0 0074 -- less
-= 600,421,0,45,-41,45 0 0075 -- equal
-> 620,540,9,28,-39,28 0 0076 -- greater
-? 620,698,8,98,-95,73 2 0077 -- question
-@ 780,698,17,60,-30,60 2 0100 -- at
-at "
-A 720,681,0,99,77,73 2 0101 -- A
-B 720,681,0,92,36,73 2 0102 -- B
-C 700,698,17,104,-28,73 2 0103 -- C
-D 760,681,0,95,36,73 2 0104 -- D
-E 720,681,0,107,36,73 2 0105 -- E
-F 660,681,0,153,36,73 2 0106 -- F
-G 760,698,17,118,-27,73 2 0107 -- G
-H 800,681,0,160,36,73 2 0110 -- H
-I 380,681,0,155,36,73 2 0111 -- I
-J 620,681,17,151,42,73 2 0112 -- J
-K 780,681,0,149,36,73 2 0113 -- K
-L 640,681,0,135,36,73 2 0114 -- L
-M 860,681,0,160,36,73 2 0115 -- M
-N 740,681,0,155,36,73 2 0116 -- N
-O 760,698,17,96,-28,73 2 0117 -- O
-P 640,681,0,134,56,73 2 0120 -- P
-Q 760,698,213,95,13,73 3 0121 -- Q
-R 740,681,0,75,36,73 2 0122 -- R
-S 700,698,17,81,-9,73 2 0123 -- S
-T 700,681,0,152,-20,73 2 0124 -- T
-U 740,681,17,165,-62,73 2 0125 -- U
-V 660,681,0,209,-22,73 2 0126 -- V
-W 1000,681,0,140,-22,73 2 0127 -- W
-X 740,681,0,145,57,73 2 0130 -- X
-Y 660,681,0,207,-22,73 2 0131 -- Y
-Z 680,681,0,110,27,73 2 0132 -- Z
-[ 260,741,118,164,41,73 2 0133 -- bracketleft
-lB "
-\ 580,741,0,45,-23,45 2 0134 -- backslash
-rs "
-] 260,741,118,137,68,73 2 0135 -- bracketright
-rB "
-a^ 480,749,0,93,-133,73 2 0136 -- circumflex
-^ "
-_ 500,0,125,50,50,50 0 0137 -- underscore
-` 320,698,0,63,-105,63 2 0140 -- quoteleft
-oq "
-a 680,515,8,105,-34,73 0 0141 -- a
-b 600,732,8,83,-7,73 2 0142 -- b
-c 560,515,8,87,-8,73 0 0143 -- c
-d 680,732,8,84,-10,73 2 0144 -- d
-e 560,515,8,86,-9,73 0 0145 -- e
-f 420,741,213,271,242,73 3 0146 -- f
-g 620,515,213,99,29,73 1 0147 -- g
-h 700,732,8,86,-43,73 2 0150 -- h
-i 380,755,8,90,-33,73 2 0151 -- i
-j 320,755,213,122,210,73 3 0152 -- j
-k 700,732,8,82,-47,73 2 0153 -- k
-l 380,732,8,80,-59,73 2 0154 -- l
-m 960,515,8,86,-33,73 0 0155 -- m
-n 680,515,8,85,-33,73 0 0156 -- n
-o 600,515,8,77,-9,73 0 0157 -- o
-p 660,515,213,72,74,72 1 0160 -- p
-q 620,515,213,70,-10,70 1 0161 -- q
-r 500,515,0,132,-34,73 0 0162 -- r
-s 540,515,8,83,18,73 0 0163 -- s
-t 440,658,8,98,-56,73 2 0164 -- t
-u 680,507,8,90,-33,73 0 0165 -- u
-v 540,515,8,82,-6,73 0 0166 -- v
-w 860,515,8,81,-6,73 0 0167 -- w
-x 620,515,8,84,40,73 0 0170 -- x
-y 600,507,213,92,25,73 1 0171 -- y
-z 560,515,8,76,14,73 0 0172 -- z
-lC 300,742,123,163,1,73 2 0173 -- braceleft
-{ "
-ba 620,750,250,0,-253 3 0174 -- bar
-| "
-rC 300,751,114,106,58,73 2 0175 -- braceright
-} "
-a~ 480,709,0,103,-128,73 2 0176 -- tilde
-~ "
-bq 300,166,112,34,-56,34 0 0200 -- quotesinglbase
-Fo 380,503,0,76,-12,73 0 0201 -- guillemotleft
-char171 "
-Fc 380,503,0,76,-12,73 0 0202 -- guillemotright
-char187 "
-bu 360,511,0,94,-10,73 0 0203 -- bullet
-Fn 680,741,199,113,78,73 2 0204 -- florin
-f/ 120,681,0,312,194,73 2 0205 -- fraction
-%0 1360,698,17,23,-56,23 2 0206 -- perthousand
-dg 420,698,137,96,-39,73 2 0207 -- dagger
-dd 420,698,137,116,-29,73 2 0210 -- daggerdbl
-en 500,311,0,123,10,73 0 0211 -- endash
-em 1000,311,0,123,10,73 0 0212 -- emdash
-fi 820,741,213,80,241,73 3 0214 -- fi
-fl 820,741,213,80,241,73 3 0215 -- fl
-.i 380,507,8,90,-33,73 0 0220 -- dotlessi
-ga 380,771,0,94,-143,73 2 0222 -- grave
-a" 560,775,0,106,-131,73 2 0223 -- hungarumlaut
-a. 380,734,0,15,-130,15 2 0224 -- dotaccent
-ab 460,707,0,106,-127,73 2 0225 -- breve
-ah 480,749,0,93,-133,73 2 0226 -- caron
-ao 360,775,0,96,-135,73 2 0227 -- ring
-ho 320,0,182,0,-18 0 0230 -- ogonek
-lq 520,698,0,75,-106,73 2 0231 -- quotedblleft
-rq 520,698,0,90,-121,73 2 0232 -- quotedblright
-oe 920,515,8,91,2,73 0 0233 -- oe
-/l 380,732,8,82,-13,73 2 0234 -- lslash
-Bq 520,166,112,25,-56,25 0 0235 -- quotedblbase
-OE 1180,698,17,115,-44,73 2 0236 -- OE
-/L 640,681,0,134,36,73 2 0237 -- Lslash
-r! 320,515,191,74,-14,73 0 0241 -- exclamdown
-char161 "
-ct 680,718,0,0,-111 2 0242 -- cent
-char162 "
-Po 680,698,17,157,50,73 2 0243 -- sterling
-char163 "
-Cs 680,571,0,7,-98,7 0 0244 -- currency
-char164 "
-Ye 680,681,0,152,-42,73 2 0245 -- yen
-char165 "
-bb 620,675,175,0,-253 2 0246 -- brokenbar
-char166 "
-sc 620,698,137,68,4,68 2 0247 -- section
-char167 "
-ad 520,734,0,99,-130,73 2 0250 -- dieresis
-char168 "
-co 780,698,17,53,-33,53 2 0251 -- copyright
-char169 "
-Of 440,685,0,105,-68,73 2 0252 -- ordfeminine
-char170 "
-fo 220,503,0,79,-12,73 0 0253 -- guilsinglleft
-no 620,421,0,15,-31,15 0 0254 -- logicalnot
-char172 "
-\- 600,323,0,45,-41,45 0 0255 -- minus
-rg 780,698,17,53,-33,53 2 0256 -- registered
-char174 "
-a- 480,691,0,101,-127,73 2 0257 -- macron
-char175 "
-de 400,698,0,80,-80,73 2 0260 -- degree
-char176 "
-char177 600,514,0,45,-41,45 0 0261 -- plusminus
-S2 408,698,0,127,-41,73 2 0262 -- twosuperior
-char178 "
-S3 408,698,0,125,-36,73 2 0263 -- threesuperior
-char179 "
-aa 340,771,0,117,-126,73 2 0264 -- acute
-char180 "
-char181 680,507,213,90,-4,73 1 0265 -- mu
-ps 680,681,0,85,-87,73 2 0266 -- paragraph
-char182 "
-pc 340,358,0,26,-76,26 0 0267 -- periodcentered
-char183 "
-ac 360,0,220,0,-18 1 0270 -- cedilla
-char184 "
-S1 408,688,0,48,-68,48 2 0271 -- onesuperior
-char185 "
-Om 440,685,0,65,-77,65 2 0272 -- ordmasculine
-char186 "
-fc 220,503,0,79,-12,73 0 0273 -- guilsinglright
-14 1020,681,0,84,-68,73 2 0274 -- onequarter
-char188 "
-12 1020,681,0,66,-68,66 2 0275 -- onehalf
-char189 "
-34 1020,691,0,84,-36,73 2 0276 -- threequarters
-char190 "
-r? 620,515,189,36,-33,36 0 0277 -- questiondown
-char191 "
-`A 720,937,0,99,77,73 2 0300 -- Agrave
-char192 "
-'A 720,937,0,99,77,73 2 0301 -- Aacute
-char193 "
-^A 720,915,0,99,77,73 2 0302 -- Acircumflex
-char194 "
-~A 720,875,0,99,77,73 2 0303 -- Atilde
-char195 "
-:A 720,900,0,99,77,73 2 0304 -- Adieresis
-char196 "
-oA 720,941,0,99,77,73 2 0305 -- Aring
-char197 "
-AE 1140,681,0,117,77,73 2 0306 -- AE
-char198 "
-,C 700,698,220,104,-28,73 3 0307 -- Ccedilla
-char199 "
-`E 720,937,0,107,36,73 2 0310 -- Egrave
-char200 "
-'E 720,937,0,107,36,73 2 0311 -- Eacute
-char201 "
-^E 720,915,0,107,36,73 2 0312 -- Ecircumflex
-char202 "
-:E 720,900,0,107,36,73 2 0313 -- Edieresis
-char203 "
-`I 380,937,0,155,36,73 2 0314 -- Igrave
-char204 "
-'I 380,937,0,155,36,73 2 0315 -- Iacute
-char205 "
-^I 380,915,0,163,36,73 2 0316 -- Icircumflex
-char206 "
-:I 380,900,0,169,36,73 2 0317 -- Idieresis
-char207 "
--D 760,681,0,95,36,73 2 0320 -- Eth
-char208 "
-~N 740,875,0,155,36,73 2 0321 -- Ntilde
-char209 "
-`O 760,937,17,96,-28,73 2 0322 -- Ograve
-char210 "
-'O 760,937,17,96,-28,73 2 0323 -- Oacute
-char211 "
-^O 760,915,17,96,-28,73 2 0324 -- Ocircumflex
-char212 "
-~O 760,875,17,96,-28,73 2 0325 -- Otilde
-char213 "
-:O 760,900,17,96,-28,73 2 0326 -- Odieresis
-char214 "
-char215 600,514,0,45,-41,45 0 0327 -- multiply
-/O 760,725,29,137,29,73 2 0330 -- Oslash
-char216 "
-`U 740,937,17,165,-62,73 2 0331 -- Ugrave
-char217 "
-'U 740,937,17,165,-62,73 2 0332 -- Uacute
-char218 "
-^U 740,915,17,165,-62,73 2 0333 -- Ucircumflex
-char219 "
-:U 740,900,17,165,-62,73 2 0334 -- Udieresis
-char220 "
-'Y 660,937,0,207,-22,73 2 0335 -- Yacute
-char221 "
-TP 640,681,0,111,56,73 2 0336 -- Thorn
-char222 "
-ss 660,741,213,92,281,73 3 0337 -- germandbls
-char223 "
-`a 680,771,8,105,-34,73 2 0340 -- agrave
-char224 "
-'a 680,771,8,105,-34,73 2 0341 -- aacute
-char225 "
-^a 680,749,8,105,-34,73 2 0342 -- acircumflex
-char226 "
-~a 680,709,8,105,-34,73 2 0343 -- atilde
-char227 "
-:a 680,734,8,105,-34,73 2 0344 -- adieresis
-char228 "
-oa 680,775,8,105,-34,73 2 0345 -- aring
-char229 "
-ae 880,515,8,83,11,73 0 0346 -- ae
-char230 "
-,c 560,515,220,87,-8,73 1 0347 -- ccedilla
-char231 "
-`e 560,771,8,86,-9,73 2 0350 -- egrave
-char232 "
-'e 560,771,8,86,-9,73 2 0351 -- eacute
-char233 "
-^e 560,749,8,86,-9,73 2 0352 -- ecircumflex
-char234 "
-:e 560,734,8,86,-9,73 2 0353 -- edieresis
-char235 "
-`i 380,771,8,94,-33,73 2 0354 -- igrave
-char236 "
-'i 380,771,8,90,-33,73 2 0355 -- iacute
-char237 "
-^i 380,749,8,103,-33,73 2 0356 -- icircumflex
-char238 "
-:i 380,734,8,149,-33,73 2 0357 -- idieresis
-char239 "
-Sd 600,741,8,112,-9,73 2 0360 -- eth
-char240 "
-~n 680,709,8,85,-33,73 2 0361 -- ntilde
-char241 "
-`o 600,771,8,77,-9,73 2 0362 -- ograve
-char242 "
-'o 600,771,8,77,-9,73 2 0363 -- oacute
-char243 "
-^o 600,749,8,77,-9,73 2 0364 -- ocircumflex
-char244 "
-~o 600,709,8,77,-9,73 2 0365 -- otilde
-char245 "
-:o 600,734,8,77,-9,73 2 0366 -- odieresis
-char246 "
-char247 600,521,0,45,-41,45 0 0367 -- divide
-/o 600,571,54,111,33,73 0 0370 -- oslash
-char248 "
-`u 680,771,8,90,-33,73 2 0371 -- ugrave
-char249 "
-'u 680,771,8,90,-33,73 2 0372 -- uacute
-char250 "
-^u 680,749,8,90,-33,73 2 0373 -- ucircumflex
-char251 "
-:u 680,734,8,90,-33,73 2 0374 -- udieresis
-char252 "
-'y 600,771,213,92,25,73 3 0375 -- yacute
-char253 "
-Tp 660,732,213,72,74,72 3 0376 -- thorn
-char254 "
-:y 600,734,213,92,25,73 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/BMI b/contrib/groff/font/devps/BMI
deleted file mode 100644
index 9b90a6592168..000000000000
--- a/contrib/groff/font/devps/BMI
+++ /dev/null
@@ -1,437 +0,0 @@
-name BMI
-internalname Bookman-LightItalic
-slant 10
-spacewidth 300
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A Y -62
-A W -73
-A V -78
-A T -5
-F . -97
-F , -98
-F A -16
-L y 20
-L Y 7
-L W 9
-L V 4
-P . -105
-P , -106
-P A -30
-R Y 11
-R W 2
-R V 2
-R T 65
-T ; 48
-T s -7
-T r 67
-T . -78
-T o 14
-T i 71
-T - 20
-T hy 20
-T char173 20
-T e 10
-T , -79
-T : 48
-T c 16
-T a 9
-T A -14
-V y -14
-V u -10
-V ; -44
-V r -20
-V . -100
-V o -70
-V i 3
-V - 20
-V hy 20
-V char173 20
-V e -70
-V , -109
-V : -35
-V a -70
-V A -70
-W y -14
-W u -20
-W ; -42
-W r -30
-W . -100
-W o -60
-W i 3
-W - 20
-W hy 20
-W char173 20
-W e -60
-W , -109
-W : -35
-W a -60
-W A -60
-Y v -19
-Y u -31
-Y ; -40
-Y q -72
-Y . -100
-Y p -37
-Y o -75
-Y i -11
-Y - 20
-Y hy 20
-Y char173 20
-Y e -78
-Y , -109
-Y : -35
-Y a -79
-Y A -82
-f f -19
-r q -14
-r . -134
-r o -10
-r n 38
-r m 37
-r - 20
-r hy 20
-r char173 20
-r h -20
-r g -3
-r f -9
-r e -15
-r d -9
-r , -143
-r c -8
-charset
-ha 600,681,0,49,-47,49 2 0000 -- asciicircum
-ti 600,386,0,45,-41,45 0 0001 -- asciitilde
-vS 640,861,17,78,-11,70 2 0002 -- Scaron
-vZ 580,861,0,165,42,70 2 0003 -- Zcaron
-vs 540,684,8,57,-15,57 2 0004 -- scaron
-vz 520,684,8,91,12,70 2 0005 -- zcaron
-:Y 660,865,0,199,-37,70 2 0006 -- Ydieresis
-tm 980,681,0,35,-19,35 2 0007 -- trademark
-aq 200,698,0,97,-49,70 2 0010 -- quotesingle
-space 300 0 0040
-! 320,698,8,72,-53,70 2 0041 -- exclam
-" 360,698,0,92,-57,70 2 0042 -- quotedbl
-dq "
-# 620,681,0,28,-57,28 2 0043 -- numbersign
-sh "
-$ 620,762,85,49,-28,49 2 0044 -- dollar
-Do "
-% 800,691,8,61,-6,61 2 0045 -- percent
-& 820,698,18,78,-15,70 2 0046 -- ampersand
-' 280,698,0,58,-98,58 2 0047 -- quoteright
-cq "
-( 280,727,146,153,-46,70 2 0050 -- parenleft
-) 280,727,146,49,58,49 2 0051 -- parenright
-* 440,698,0,115,-89,70 2 0052 -- asterisk
-+ 600,548,0,45,-41,45 0 0053 -- plus
-, 300,112,115,0,-38 0 0054 -- comma
-- 320,325,0,66,-28,66 0 0055 -- hyphen
-hy "
-char173 "
-. 300,127,8,0,-46 0 0056 -- period
-/ 600,717,149,12,-54,12 2 0057 -- slash
-sl "
-0 620,698,17,76,-36,70 2 0060 -- zero
-1 620,681,0,0,-104 2 0061 -- one
-2 620,698,0,66,-16,66 2 0062 -- two
-3 620,698,17,52,-5,52 2 0063 -- three
-4 620,681,0,64,-19,64 2 0064 -- four
-5 620,681,17,44,-20,44 2 0065 -- five
-6 620,698,17,87,-39,70 2 0066 -- six
-7 620,681,0,102,-93,70 2 0067 -- seven
-8 620,698,17,85,-11,70 2 0070 -- eight
-9 620,698,17,79,-27,70 2 0071 -- nine
-: 300,494,8,42,-46,42 0 0072 -- colon
-; 300,494,114,42,-38,42 0 0073 -- semicolon
-< 600,561,0,38,-29,38 0 0074 -- less
-= 600,433,0,45,-41,45 0 0075 -- equal
-> 600,561,0,52,-43,52 0 0076 -- greater
-? 540,698,8,114,-64,70 2 0077 -- question
-@ 780,698,17,72,-52,70 2 0100 -- at
-at "
-A 700,681,0,70,75,70 2 0101 -- A
-B 720,681,0,76,29,70 2 0102 -- B
-C 720,698,17,76,-38,70 2 0103 -- C
-D 740,681,0,92,29,70 2 0104 -- D
-E 680,681,0,106,29,70 2 0105 -- E
-F 620,681,0,173,29,70 2 0106 -- F
-G 760,698,17,103,-38,70 2 0107 -- G
-H 800,681,0,138,29,70 2 0110 -- H
-I 320,681,0,142,29,70 2 0111 -- I
-J 560,681,17,156,52,70 2 0112 -- J
-K 720,681,0,134,29,70 2 0113 -- K
-L 580,681,0,126,29,70 2 0114 -- L
-M 860,681,0,146,32,70 2 0115 -- M
-N 720,681,0,153,32,70 2 0116 -- N
-O 760,698,17,89,-38,70 2 0117 -- O
-P 600,681,0,131,29,70 2 0120 -- P
-Q 780,698,191,82,-11,70 2 0121 -- Q
-R 700,681,0,86,29,70 2 0122 -- R
-S 640,698,17,78,-11,70 2 0123 -- S
-T 600,681,0,175,0,70 2 0124 -- T
-U 720,681,17,172,-68,70 2 0125 -- U
-V 680,681,0,185,-37,70 2 0126 -- V
-W 960,681,0,185,-37,70 2 0127 -- W
-X 700,681,0,165,75,70 2 0130 -- X
-Y 660,681,0,199,-37,70 2 0131 -- Y
-Z 580,681,0,165,42,70 2 0132 -- Z
-[ 260,717,136,141,-6,70 2 0133 -- bracketleft
-lB "
-\ 600,717,0,0,-34 2 0134 -- backslash
-rs "
-] 260,717,136,99,35,70 2 0135 -- bracketright
-rB "
-a^ 440,685,0,89,-126,70 2 0136 -- circumflex
-^ "
-_ 500,0,125,50,50,50 0 0137 -- underscore
-` 280,698,0,100,-141,70 2 0140 -- quoteleft
-oq "
-a 620,494,8,116,-21,70 0 0141 -- a
-b 600,717,8,71,-38,70 2 0142 -- b
-c 480,494,8,92,-15,70 0 0143 -- c
-d 640,717,8,105,-15,70 2 0144 -- d
-e 540,494,8,85,-15,70 0 0145 -- e
-f 340,725,218,267,210,70 3 0146 -- f
-g 560,494,221,71,46,70 1 0147 -- g
-h 620,717,8,119,-38,70 2 0150 -- h
-i 280,663,8,121,-38,70 2 0151 -- i
-j 280,663,221,78,250,70 3 0152 -- j
-k 600,717,8,107,-38,70 2 0153 -- k
-l 280,717,8,112,-50,70 2 0154 -- l
-m 880,494,8,122,-38,70 0 0155 -- m
-n 620,494,8,103,-38,70 0 0156 -- n
-o 540,494,8,82,-15,70 0 0157 -- o
-p 600,494,212,70,74,70 1 0160 -- p
-q 560,494,212,74,-15,70 1 0161 -- q
-r 400,494,0,131,-38,70 0 0162 -- r
-s 540,494,8,57,-15,57 0 0163 -- s
-t 340,664,8,121,-38,70 2 0164 -- t
-u 620,484,8,116,-38,70 0 0165 -- u
-v 540,494,8,72,-38,70 0 0166 -- v
-w 880,494,8,63,-38,63 0 0167 -- w
-x 540,494,8,136,41,70 0 0170 -- x
-y 600,484,221,59,-10,59 1 0171 -- y
-z 520,494,8,91,12,70 0 0172 -- z
-lC 360,717,191,132,-72,70 2 0173 -- braceleft
-{ "
-ba 600,750,250,0,-244 3 0174 -- bar
-| "
-rC 380,717,191,3,37,3 2 0175 -- braceright
-} "
-a~ 440,671,0,98,-130,70 2 0176 -- tilde
-~ "
-bq 320,113,114,0,-37 0 0200 -- quotesinglbase
-Fo 300,434,0,63,-20,63 0 0201 -- guillemotleft
-char171 "
-Fc 300,434,0,53,-10,53 0 0202 -- guillemotright
-char187 "
-bu 460,511,0,34,-50,34 0 0203 -- bullet
-Fn 620,725,218,122,76,70 3 0204 -- florin
-f/ 20,681,0,353,278,70 2 0205 -- fraction
-%0 1180,691,8,69,-6,69 2 0206 -- perthousand
-dg 620,698,130,0,-142 2 0207 -- dagger
-dd 620,698,122,0,-94 2 0210 -- daggerdbl
-en 500,325,0,111,17,70 0 0211 -- endash
-em 1000,325,0,111,17,70 0 0212 -- emdash
-fi 640,725,222,119,209,70 3 0214 -- fi
-fl 660,725,218,103,209,70 3 0215 -- fl
-.i 280,484,8,121,-38,70 0 0220 -- dotlessi
-ga 340,706,0,87,-132,70 2 0222 -- grave
-a" 340,738,0,112,-117,70 2 0223 -- hungarumlaut
-a. 260,664,0,80,-119,70 2 0224 -- dotaccent
-ab 440,680,0,110,-141,70 2 0225 -- breve
-ah 440,684,0,91,-128,70 2 0226 -- caron
-ao 300,706,0,84,-128,70 2 0227 -- ring
-ho 260,0,173,0,-1 0 0230 -- ogonek
-lq 440,698,0,103,-141,70 2 0231 -- quotedblleft
-rq 440,698,0,61,-98,61 2 0232 -- quotedblright
-oe 900,494,8,98,-15,70 0 0233 -- oe
-/l 340,717,8,108,0,70 2 0234 -- lslash
-Bq 480,113,114,0,-37 0 0235 -- quotedblbase
-OE 1180,698,17,107,-38,70 2 0236 -- OE
-/L 580,681,0,126,29,70 2 0237 -- Lslash
-r! 320,494,213,31,-23,31 1 0241 -- exclamdown
-char161 "
-ct 620,715,29,26,-98,26 2 0242 -- cent
-char162 "
-Po 620,698,17,132,46,70 2 0243 -- sterling
-char163 "
-Cs 620,591,0,35,-50,35 0 0244 -- currency
-char164 "
-Ye 620,681,0,165,-21,70 2 0245 -- yen
-char165 "
-bb 600,675,175,0,-244 2 0246 -- brokenbar
-char166 "
-sc 620,698,178,68,12,68 2 0247 -- section
-char167 "
-ad 420,688,0,97,-135,70 2 0250 -- dieresis
-char168 "
-co 740,698,17,94,-34,70 2 0251 -- copyright
-char169 "
-Of 440,698,0,123,-80,70 2 0252 -- ordfeminine
-char170 "
-fo 180,434,0,78,-25,70 0 0253 -- guilsinglleft
-no 600,433,0,45,-41,45 0 0254 -- logicalnot
-char172 "
-\- 600,335,0,45,-41,45 0 0255 -- minus
-rg 740,698,17,94,-34,70 2 0256 -- registered
-char174 "
-a- 440,658,0,94,-128,70 0 0257 -- macron
-char175 "
-de 400,698,0,70,-70,70 2 0260 -- degree
-char176 "
-char177 600,548,0,45,-41,45 0 0261 -- plusminus
-S2 372,698,0,117,-18,70 2 0262 -- twosuperior
-char178 "
-S3 372,698,0,117,-20,70 2 0263 -- threesuperior
-char179 "
-aa 320,706,0,103,-128,70 2 0264 -- acute
-char180 "
-char181 620,484,221,116,-3,70 1 0265 -- mu
-ps 620,681,0,148,-62,70 2 0266 -- paragraph
-char182 "
-pc 300,364,0,22,-87,22 0 0267 -- periodcentered
-char183 "
-ac 320,0,178,0,5 0 0270 -- cedilla
-char184 "
-S1 372,688,0,17,-64,17 2 0271 -- onesuperior
-char185 "
-Om 400,698,0,105,-89,70 2 0272 -- ordmasculine
-char186 "
-fc 180,434,0,73,-20,70 0 0273 -- guilsinglright
-14 930,681,0,33,-41,33 2 0274 -- onequarter
-char188 "
-12 930,681,0,45,-41,45 2 0275 -- onehalf
-char189 "
-34 930,691,0,33,-49,33 2 0276 -- threequarters
-char190 "
-r? 540,494,212,18,32,18 1 0277 -- questiondown
-char191 "
-`A 700,883,0,70,75,70 2 0300 -- Agrave
-char192 "
-'A 700,883,0,70,75,70 2 0301 -- Aacute
-char193 "
-^A 700,862,0,70,75,70 2 0302 -- Acircumflex
-char194 "
-~A 700,848,0,70,75,70 2 0303 -- Atilde
-char195 "
-:A 700,865,0,70,75,70 2 0304 -- Adieresis
-char196 "
-oA 700,883,0,70,75,70 2 0305 -- Aring
-char197 "
-AE 1220,681,0,99,95,70 2 0306 -- AE
-char198 "
-,C 720,698,178,76,-38,70 2 0307 -- Ccedilla
-char199 "
-`E 680,883,0,106,29,70 2 0310 -- Egrave
-char200 "
-'E 680,883,0,106,29,70 2 0311 -- Eacute
-char201 "
-^E 680,862,0,106,29,70 2 0312 -- Ecircumflex
-char202 "
-:E 680,865,0,106,29,70 2 0313 -- Edieresis
-char203 "
-`I 320,883,0,142,29,70 2 0314 -- Igrave
-char204 "
-'I 320,883,0,142,29,70 2 0315 -- Iacute
-char205 "
-^I 320,862,0,179,29,70 2 0316 -- Icircumflex
-char206 "
-:I 320,865,0,177,29,70 2 0317 -- Idieresis
-char207 "
--D 740,681,0,92,29,70 2 0320 -- Eth
-char208 "
-~N 720,848,0,153,32,70 2 0321 -- Ntilde
-char209 "
-`O 760,883,17,89,-38,70 2 0322 -- Ograve
-char210 "
-'O 760,883,17,89,-38,70 2 0323 -- Oacute
-char211 "
-^O 760,862,17,89,-38,70 2 0324 -- Ocircumflex
-char212 "
-~O 760,848,17,89,-38,70 2 0325 -- Otilde
-char213 "
-:O 760,865,17,89,-38,70 2 0326 -- Odieresis
-char214 "
-char215 600,548,0,45,-41,45 0 0327 -- multiply
-/O 760,777,95,89,-38,70 2 0330 -- Oslash
-char216 "
-`U 720,883,17,172,-68,70 2 0331 -- Ugrave
-char217 "
-'U 720,883,17,172,-68,70 2 0332 -- Uacute
-char218 "
-^U 720,862,17,172,-68,70 2 0333 -- Ucircumflex
-char219 "
-:U 720,865,17,172,-68,70 2 0334 -- Udieresis
-char220 "
-'Y 660,883,0,199,-37,70 2 0335 -- Yacute
-char221 "
-TP 600,681,0,106,29,70 2 0336 -- Thorn
-char222 "
-ss 620,698,111,83,171,70 2 0337 -- germandbls
-char223 "
-`a 620,706,8,116,-21,70 2 0340 -- agrave
-char224 "
-'a 620,706,8,116,-21,70 2 0341 -- aacute
-char225 "
-^a 620,685,8,116,-21,70 2 0342 -- acircumflex
-char226 "
-~a 620,671,8,116,-21,70 2 0343 -- atilde
-char227 "
-:a 620,688,8,116,-21,70 2 0344 -- adieresis
-char228 "
-oa 620,706,8,116,-21,70 2 0345 -- aring
-char229 "
-ae 880,494,8,88,-21,70 0 0346 -- ae
-char230 "
-,c 480,494,178,92,-15,70 0 0347 -- ccedilla
-char231 "
-`e 540,706,8,85,-15,70 2 0350 -- egrave
-char232 "
-'e 540,706,8,85,-15,70 2 0351 -- eacute
-char233 "
-^e 540,685,8,85,-15,70 2 0352 -- ecircumflex
-char234 "
-:e 540,688,8,85,-15,70 2 0353 -- edieresis
-char235 "
-`i 280,706,8,121,-38,70 2 0354 -- igrave
-char236 "
-'i 280,706,8,121,-38,70 2 0355 -- iacute
-char237 "
-^i 280,685,8,149,-26,70 2 0356 -- icircumflex
-char238 "
-:i 280,688,8,147,-38,70 2 0357 -- idieresis
-char239 "
-Sd 540,725,8,152,-15,70 2 0360 -- eth
-char240 "
-~n 620,671,8,103,-38,70 2 0361 -- ntilde
-char241 "
-`o 540,706,8,82,-15,70 2 0362 -- ograve
-char242 "
-'o 540,706,8,82,-15,70 2 0363 -- oacute
-char243 "
-^o 540,685,8,82,-15,70 2 0364 -- ocircumflex
-char244 "
-~o 540,671,8,82,-15,70 2 0365 -- otilde
-char245 "
-:o 540,688,8,82,-15,70 2 0366 -- odieresis
-char246 "
-char247 600,548,0,45,-41,45 0 0367 -- divide
-/o 540,532,49,81,-15,70 0 0370 -- oslash
-char248 "
-`u 620,706,8,116,-38,70 2 0371 -- ugrave
-char249 "
-'u 620,706,8,116,-38,70 2 0372 -- uacute
-char250 "
-^u 620,685,8,116,-38,70 2 0373 -- ucircumflex
-char251 "
-:u 620,688,8,116,-38,70 2 0374 -- udieresis
-char252 "
-'y 600,706,221,59,-10,59 3 0375 -- yacute
-char253 "
-Tp 600,717,212,70,74,70 3 0376 -- thorn
-char254 "
-:y 600,688,221,59,-10,59 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/BMR b/contrib/groff/font/devps/BMR
deleted file mode 100644
index 615b7cc7699f..000000000000
--- a/contrib/groff/font/devps/BMR
+++ /dev/null
@@ -1,433 +0,0 @@
-name BMR
-internalname Bookman-Light
-spacewidth 320
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y 32
-A w 4
-A v 7
-A Y -35
-A W -40
-A V -56
-A T 1
-F . -46
-F , -41
-F A -21
-L y 79
-L Y 13
-L W 1
-L V -4
-L T 28
-P . -60
-P , -55
-P A -8
-R y 59
-R Y 26
-R W 13
-R V 8
-R T 71
-T s 16
-T r 38
-T . -33
-T o 15
-T i 42
-T - 90
-T hy 90
-T char173 90
-T e 13
-T , -28
-T c 14
-T a 17
-T A 1
-V y 15
-V u -38
-V r -41
-V . -40
-V o -71
-V i -20
-V - 11
-V hy 11
-V char173 11
-V e -72
-V , -34
-V a -69
-V A -66
-W y 15
-W u -38
-W r -41
-W . -40
-W o -68
-W i -20
-W - 11
-W hy 11
-W char173 11
-W e -69
-W , -34
-W a -66
-W A -64
-Y v 15
-Y u -38
-Y q -55
-Y . -40
-Y p -31
-Y o -57
-Y i -37
-Y - 11
-Y hy 11
-Y char173 11
-Y e -58
-Y , -34
-Y a -54
-Y A -53
-f f 29
-r q 9
-r . -64
-r o 8
-r n 31
-r m 31
-r - 70
-r hy 70
-r char173 70
-r h -21
-r g -4
-r f 33
-r e 7
-r d 7
-r , -58
-r c 7
-charset
-ha 600,681 2 0000 -- asciicircum
-ti 600,352 0 0001 -- asciitilde
-vS 660,849,17 2 0002 -- Scaron
-vZ 640,849 2 0003 -- Zcaron
-vs 520,672,8 2 0004 -- scaron
-vz 480,672 2 0005 -- zcaron
-:Y 640,851 2 0006 -- Ydieresis
-tm 980,681 2 0007 -- trademark
-aq 220,698 2 0010 -- quotesingle
-space 320 0 0040
-! 300,698,8 2 0041 -- exclam
-" 380,698 2 0042 -- quotedbl
-dq "
-# 620,681 2 0043 -- numbersign
-sh "
-$ 620,791,109 2 0044 -- dollar
-Do "
-% 900,698,8 2 0045 -- percent
-& 800,698,17 2 0046 -- ampersand
-' 220,698 2 0047 -- quoteright
-cq "
-( 300,727,145 2 0050 -- parenleft
-) 300,727,146 2 0051 -- parenright
-* 440,698 2 0052 -- asterisk
-+ 600,513 0 0053 -- plus
-, 320,114,114 0 0054 -- comma
-- 400,292 0 0055 -- hyphen
-hy "
-char173 "
-. 320,123,8 0 0056 -- period
-/ 600,717,149 2 0057 -- slash
-sl "
-0 620,698,17 2 0060 -- zero
-1 620,681 2 0061 -- one
-2 620,698 2 0062 -- two
-3 620,698,17 2 0063 -- three
-4 620,681 2 0064 -- four
-5 620,717,17 2 0065 -- five
-6 620,698,17 2 0066 -- six
-7 620,681 2 0067 -- seven
-8 620,698,17 2 0070 -- eight
-9 620,698,17 2 0071 -- nine
-: 320,494,8 0 0072 -- colon
-; 320,494,114 0 0073 -- semicolon
-< 600,526,2 0 0074 -- less
-= 600,398 0 0075 -- equal
-> 600,526,2 0 0076 -- greater
-? 540,698,8 2 0077 -- question
-@ 820,698,17 2 0100 -- at
-at "
-A 680,681 2 0101 -- A
-B 740,681 2 0102 -- B
-C 740,698,17 2 0103 -- C
-D 800,681 2 0104 -- D
-E 720,681 2 0105 -- E
-F 640,681 2 0106 -- F
-G 800,698,17 2 0107 -- G
-H 800,681 2 0110 -- H
-I 340,681 2 0111 -- I
-J 600,681,17 2 0112 -- J
-K 720,681 2 0113 -- K
-L 600,681 2 0114 -- L
-M 920,681 2 0115 -- M
-N 740,681 2 0116 -- N
-O 800,698,17 2 0117 -- O
-P 620,681 2 0120 -- P
-Q 820,698,189 2 0121 -- Q
-R 720,681 2 0122 -- R
-S 660,698,17 2 0123 -- S
-T 620,681 2 0124 -- T
-U 780,681,17 2 0125 -- U
-V 700,681 2 0126 -- V
-W 960,681 2 0127 -- W
-X 720,681 2 0130 -- X
-Y 640,681 2 0131 -- Y
-Z 640,681 2 0132 -- Z
-[ 300,717,136 2 0133 -- bracketleft
-lB "
-\ 600,717 2 0134 -- backslash
-rs "
-] 300,717,136 2 0135 -- bracketright
-rB "
-a^ 420,685 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 220,698 2 0140 -- quoteleft
-oq "
-a 580,494,8 0 0141 -- a
-b 620,717,8 2 0142 -- b
-c 520,494,8 0 0143 -- c
-d 620,717,8 2 0144 -- d
-e 520,494,8 0 0145 -- e
-f 320,734 2 0146 -- f
-g 540,567,243 1 0147 -- g
-h 660,717 2 0150 -- h
-i 300,654 0 0151 -- i
-j 300,654,251 1 0152 -- j
-k 620,717 2 0153 -- k
-l 300,717 2 0154 -- l
-m 940,494 0 0155 -- m
-n 660,494 0 0156 -- n
-o 560,494,8 0 0157 -- o
-p 620,494,228 1 0160 -- p
-q 580,494,228 1 0161 -- q
-r 440,494 0 0162 -- r
-s 520,494,8 0 0163 -- s
-t 380,667,8 2 0164 -- t
-u 680,484,8 0 0165 -- u
-v 520,484 0 0166 -- v
-w 780,484 0 0167 -- w
-x 560,484 0 0170 -- x
-y 540,484,236 1 0171 -- y
-z 480,484 0 0172 -- z
-lC 280,717,136 2 0173 -- braceleft
-{ "
-ba 600,750,250 3 0174 -- bar
-| "
-rC 280,717,136 2 0175 -- braceright
-} "
-a~ 440,661 0 0176 -- tilde
-~ "
-bq 220,110,108 0 0200 -- quotesinglbase
-Fo 360,437 0 0201 -- guillemotleft
-char171 "
-Fc 360,437 0 0202 -- guillemotright
-char187 "
-bu 460,511 0 0203 -- bullet
-Fn 620,749,155 2 0204 -- florin
-f/ 140,681 2 0205 -- fraction
-%0 1280,698,8 2 0206 -- perthousand
-dg 540,698,156 2 0207 -- dagger
-dd 540,698,156 2 0210 -- daggerdbl
-en 500,292 0 0211 -- endash
-em 1000,292 0 0212 -- emdash
-fi 620,734 2 0214 -- fi
-fl 620,734 2 0215 -- fl
-.i 300,484 0 0220 -- dotlessi
-ga 340,689 2 0222 -- grave
-a" 380,698 2 0223 -- hungarumlaut
-a. 260,672 2 0224 -- dotaccent
-ab 460,687 2 0225 -- breve
-ah 420,672 2 0226 -- caron
-ao 320,731 2 0227 -- ring
-ho 320,0,145 0 0230 -- ogonek
-lq 400,698 2 0231 -- quotedblleft
-rq 400,698 2 0232 -- quotedblright
-oe 900,494,8 0 0233 -- oe
-/l 320,717 2 0234 -- lslash
-Bq 400,110,108 0 0235 -- quotedblbase
-OE 1240,698,17 2 0236 -- OE
-/L 600,681 2 0237 -- Lslash
-r! 300,494,214 0 0241 -- exclamdown
-char161 "
-ct 620,651 0 0242 -- cent
-char162 "
-Po 620,698,17 2 0243 -- sterling
-char163 "
-Cs 620,591 0 0244 -- currency
-char164 "
-Ye 620,681 2 0245 -- yen
-char165 "
-bb 600,675,175 2 0246 -- brokenbar
-char166 "
-sc 520,698,178 2 0247 -- section
-char167 "
-ad 420,674 2 0250 -- dieresis
-char168 "
-co 740,698,17 2 0251 -- copyright
-char169 "
-Of 420,698 2 0252 -- ordfeminine
-char170 "
-fo 240,437 0 0253 -- guilsinglleft
-no 600,398 0 0254 -- logicalnot
-char172 "
-\- 600,300 0 0255 -- minus
-rg 740,698,17 2 0256 -- registered
-char174 "
-a- 440,635 0 0257 -- macron
-char175 "
-de 400,698 2 0260 -- degree
-char176 "
-char177 600,513 0 0261 -- plusminus
-S2 372,698 2 0262 -- twosuperior
-char178 "
-S3 372,698 2 0263 -- threesuperior
-char179 "
-aa 340,689 2 0264 -- acute
-char180 "
-char181 680,484,251 1 0265 -- mu
-ps 600,681 2 0266 -- paragraph
-char182 "
-pc 320,327 0 0267 -- periodcentered
-char183 "
-ac 320,0,200 0 0270 -- cedilla
-char184 "
-S1 372,688 2 0271 -- onesuperior
-char185 "
-Om 420,698 2 0272 -- ordmasculine
-char186 "
-fc 240,437 0 0273 -- guilsinglright
-14 930,681 2 0274 -- onequarter
-char188 "
-12 930,681 2 0275 -- onehalf
-char189 "
-34 930,691 2 0276 -- threequarters
-char190 "
-r? 540,494,217 0 0277 -- questiondown
-char191 "
-`A 680,866 2 0300 -- Agrave
-char192 "
-'A 680,866 2 0301 -- Aacute
-char193 "
-^A 680,862 2 0302 -- Acircumflex
-char194 "
-~A 680,838 2 0303 -- Atilde
-char195 "
-:A 680,851 2 0304 -- Adieresis
-char196 "
-oA 680,908 2 0305 -- Aring
-char197 "
-AE 1260,681 2 0306 -- AE
-char198 "
-,C 740,698,200 2 0307 -- Ccedilla
-char199 "
-`E 720,866 2 0310 -- Egrave
-char200 "
-'E 720,866 2 0311 -- Eacute
-char201 "
-^E 720,862 2 0312 -- Ecircumflex
-char202 "
-:E 720,851 2 0313 -- Edieresis
-char203 "
-`I 340,866 2 0314 -- Igrave
-char204 "
-'I 340,866 2 0315 -- Iacute
-char205 "
-^I 340,862 2 0316 -- Icircumflex
-char206 "
-:I 340,851 2 0317 -- Idieresis
-char207 "
--D 800,681 2 0320 -- Eth
-char208 "
-~N 740,838 2 0321 -- Ntilde
-char209 "
-`O 800,866,17 2 0322 -- Ograve
-char210 "
-'O 800,866,17 2 0323 -- Oacute
-char211 "
-^O 800,862,17 2 0324 -- Ocircumflex
-char212 "
-~O 800,838,17 2 0325 -- Otilde
-char213 "
-:O 800,851,17 2 0326 -- Odieresis
-char214 "
-char215 600,513 0 0327 -- multiply
-/O 800,733,53 2 0330 -- Oslash
-char216 "
-`U 780,866,17 2 0331 -- Ugrave
-char217 "
-'U 780,866,17 2 0332 -- Uacute
-char218 "
-^U 780,862,17 2 0333 -- Ucircumflex
-char219 "
-:U 780,851,17 2 0334 -- Udieresis
-char220 "
-'Y 640,866 2 0335 -- Yacute
-char221 "
-TP 620,681 2 0336 -- Thorn
-char222 "
-ss 660,698,110 2 0337 -- germandbls
-char223 "
-`a 580,689,8 2 0340 -- agrave
-char224 "
-'a 580,689,8 2 0341 -- aacute
-char225 "
-^a 580,685,8 2 0342 -- acircumflex
-char226 "
-~a 580,661,8 0 0343 -- atilde
-char227 "
-:a 580,674,8 2 0344 -- adieresis
-char228 "
-oa 580,731,8 2 0345 -- aring
-char229 "
-ae 860,494,8 0 0346 -- ae
-char230 "
-,c 520,494,200 0 0347 -- ccedilla
-char231 "
-`e 520,689,8 2 0350 -- egrave
-char232 "
-'e 520,689,8 2 0351 -- eacute
-char233 "
-^e 520,685,8 2 0352 -- ecircumflex
-char234 "
-:e 520,674,8 2 0353 -- edieresis
-char235 "
-`i 300,689 2 0354 -- igrave
-char236 "
-'i 300,689 2 0355 -- iacute
-char237 "
-^i 300,685 2 0356 -- icircumflex
-char238 "
-:i 300,674 2 0357 -- idieresis
-char239 "
-Sd 560,734,8 2 0360 -- eth
-char240 "
-~n 660,661 0 0361 -- ntilde
-char241 "
-`o 560,689,8 2 0362 -- ograve
-char242 "
-'o 560,689,8 2 0363 -- oacute
-char243 "
-^o 560,685,8 2 0364 -- ocircumflex
-char244 "
-~o 560,661,8 0 0365 -- otilde
-char245 "
-:o 560,674,8 2 0366 -- odieresis
-char246 "
-char247 600,514 0 0367 -- divide
-/o 560,534,40 0 0370 -- oslash
-char248 "
-`u 680,689,8 2 0371 -- ugrave
-char249 "
-'u 680,689,8 2 0372 -- uacute
-char250 "
-^u 680,685,8 2 0373 -- ucircumflex
-char251 "
-:u 680,674,8 2 0374 -- udieresis
-char252 "
-'y 540,689,236 3 0375 -- yacute
-char253 "
-Tp 620,717,228 3 0376 -- thorn
-char254 "
-:y 540,674,236 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/CB b/contrib/groff/font/devps/CB
deleted file mode 100644
index 6c01b8d767aa..000000000000
--- a/contrib/groff/font/devps/CB
+++ /dev/null
@@ -1,339 +0,0 @@
-name CB
-internalname Courier-Bold
-spacewidth 600
-encoding text.enc
-charset
-ha 600,616 2 0000 -- asciicircum
-ti 600,356 0 0001 -- asciitilde
-vS 600,790,22 2 0002 -- Scaron
-vZ 600,790 2 0003 -- Zcaron
-vs 600,667,17 2 0004 -- scaron
-vz 600,667 2 0005 -- zcaron
-:Y 600,748 2 0006 -- Ydieresis
-tm 600,562 2 0007 -- trademark
-aq 600,562 2 0010 -- quotesingle
-space 600 0 0040
-! 600,572,15 2 0041 -- exclam
-" 600,562 2 0042 -- quotedbl
-dq "
-# 600,651,45 2 0043 -- numbersign
-sh "
-$ 600,666,126 2 0044 -- dollar
-Do "
-% 600,616,15 2 0045 -- percent
-& 600,543,15 0 0046 -- ampersand
-' 600,562 2 0047 -- quoteright
-cq "
-( 600,616,102 2 0050 -- parenleft
-) 600,616,102 2 0051 -- parenright
-* 600,601 2 0052 -- asterisk
-+ 600,478 0 0053 -- plus
-, 600,174,111 0 0054 -- comma
-- 600,313 0 0055 -- hyphen
-hy "
-char173 "
-. 600,171,15 0 0056 -- period
-/ 600,626,77 2 0057 -- slash
-sl "
-0 600,616,15 2 0060 -- zero
-1 600,616 2 0061 -- one
-2 600,616 2 0062 -- two
-3 600,616,15 2 0063 -- three
-4 600,616 2 0064 -- four
-5 600,601,15 2 0065 -- five
-6 600,616,15 2 0066 -- six
-7 600,601 2 0067 -- seven
-8 600,616,15 2 0070 -- eight
-9 600,616,15 2 0071 -- nine
-: 600,425,15 0 0072 -- colon
-; 600,425,111 0 0073 -- semicolon
-< 600,501 0 0074 -- less
-= 600,398 0 0075 -- equal
-> 600,501 0 0076 -- greater
-? 600,580,14 2 0077 -- question
-@ 600,616,15 2 0100 -- at
-at "
-A 600,562 2 0101 -- A
-B 600,562 2 0102 -- B
-C 600,580,18 2 0103 -- C
-D 600,562 2 0104 -- D
-E 600,562 2 0105 -- E
-F 600,562 2 0106 -- F
-G 600,580,18 2 0107 -- G
-H 600,562 2 0110 -- H
-I 600,562 2 0111 -- I
-J 600,562,18 2 0112 -- J
-K 600,562 2 0113 -- K
-L 600,562 2 0114 -- L
-M 600,562 2 0115 -- M
-N 600,562,12 2 0116 -- N
-O 600,580,18 2 0117 -- O
-P 600,562 2 0120 -- P
-Q 600,580,138 2 0121 -- Q
-R 600,562 2 0122 -- R
-S 600,582,22 2 0123 -- S
-T 600,562 2 0124 -- T
-U 600,562,18 2 0125 -- U
-V 600,562 2 0126 -- V
-W 600,562 2 0127 -- W
-X 600,562 2 0130 -- X
-Y 600,562 2 0131 -- Y
-Z 600,562 2 0132 -- Z
-[ 600,616,102 2 0133 -- bracketleft
-lB "
-\ 600,626,77 2 0134 -- backslash
-rs "
-] 600,616,102 2 0135 -- bracketright
-rB "
-a^ 600,657 2 0136 -- circumflex
-^ "
-_ 600,0,125 0 0137 -- underscore
-` 600,562 2 0140 -- quoteleft
-oq "
-a 600,454,15 0 0141 -- a
-b 600,626,15 2 0142 -- b
-c 600,459,15 0 0143 -- c
-d 600,626,15 2 0144 -- d
-e 600,454,15 0 0145 -- e
-f 600,626 2 0146 -- f
-g 600,454,146 1 0147 -- g
-h 600,626 2 0150 -- h
-i 600,658 2 0151 -- i
-j 600,658,146 3 0152 -- j
-k 600,626 2 0153 -- k
-l 600,626 2 0154 -- l
-m 600,454 0 0155 -- m
-n 600,454 0 0156 -- n
-o 600,454,15 0 0157 -- o
-p 600,454,142 1 0160 -- p
-q 600,454,142 1 0161 -- q
-r 600,454 0 0162 -- r
-s 600,459,17 0 0163 -- s
-t 600,562,15 2 0164 -- t
-u 600,439,15 0 0165 -- u
-v 600,439 0 0166 -- v
-w 600,439 0 0167 -- w
-x 600,439 0 0170 -- x
-y 600,439,142 1 0171 -- y
-z 600,439 0 0172 -- z
-lC 600,616,102 2 0173 -- braceleft
-{ "
-ba 600,750,250 3 0174 -- bar
-| "
-rC 600,616,102 2 0175 -- braceright
-} "
-a~ 600,636 2 0176 -- tilde
-~ "
-bq 600,143,142 1 0200 -- quotesinglbase
-Fo 600,446 0 0201 -- guillemotleft
-char171 "
-Fc 600,446 0 0202 -- guillemotright
-char187 "
-bu 600,430 0 0203 -- bullet
-Fn 600,616,131 2 0204 -- florin
-f/ 600,661,60 2 0205 -- fraction
-%0 600,616,15 2 0206 -- perthousand
-dg 600,580,70 2 0207 -- dagger
-dd 600,580,70 2 0210 -- daggerdbl
-en 600,313 0 0211 -- endash
-em 600,313 0 0212 -- emdash
-fi 600,626 2 0214 -- fi
-fl 600,626 2 0215 -- fl
-.i 600,439 0 0220 -- dotlessi
-ga 600,661 2 0222 -- grave
-a" 600,661 2 0223 -- hungarumlaut
-a. 600,625 2 0224 -- dotaccent
-ab 600,631 2 0225 -- breve
-ah 600,667 2 0226 -- caron
-ao 600,678 2 0227 -- ring
-ho 600,0,199 1 0230 -- ogonek
-lq 600,562 2 0231 -- quotedblleft
-rq 600,562 2 0232 -- quotedblright
-oe 600,454,15 0 0233 -- oe
-/l 600,626 2 0234 -- lslash
-Bq 600,143,142 1 0235 -- quotedblbase
-OE 600,562 2 0236 -- OE
-/L 600,562 2 0237 -- Lslash
-r! 600,449,146 1 0241 -- exclamdown
-char161 "
-ct 600,614,49 2 0242 -- cent
-char162 "
-Po 600,611,28 2 0243 -- sterling
-char163 "
-Cs 600,517 0 0244 -- currency
-char164 "
-Ye 600,562 2 0245 -- yen
-char165 "
-bb 600,675,175 3 0246 -- brokenbar
-char166 "
-sc 600,580,70 2 0247 -- section
-char167 "
-ad 600,625 2 0250 -- dieresis
-char168 "
-co 600,580,18 2 0251 -- copyright
-char169 "
-Of 600,580 2 0252 -- ordfeminine
-char170 "
-fo 600,446 0 0253 -- guilsinglleft
-no 600,413 0 0254 -- logicalnot
-char172 "
-\- 600,313 0 0255 -- minus
-rg 600,580,18 2 0256 -- registered
-char174 "
-a- 600,585 2 0257 -- macron
-char175 "
-de 600,616 2 0260 -- degree
-char176 "
-char177 600,515 0 0261 -- plusminus
-S2 600,616 2 0262 -- twosuperior
-char178 "
-S3 600,616 2 0263 -- threesuperior
-char179 "
-aa 600,661 2 0264 -- acute
-char180 "
-char181 600,439,142 1 0265 -- mu
-ps 600,580,70 2 0266 -- paragraph
-char182 "
-pc 600,351 0 0267 -- periodcentered
-char183 "
-ac 600,0,206 1 0270 -- cedilla
-char184 "
-S1 600,616 2 0271 -- onesuperior
-char185 "
-Om 600,580 2 0272 -- ordmasculine
-char186 "
-fc 600,446 0 0273 -- guilsinglright
-14 600,661,60 2 0274 -- onequarter
-char188 "
-12 600,661,60 2 0275 -- onehalf
-char189 "
-34 600,661,60 2 0276 -- threequarters
-char190 "
-r? 600,449,146 1 0277 -- questiondown
-char191 "
-`A 600,784 2 0300 -- Agrave
-char192 "
-'A 600,784 2 0301 -- Aacute
-char193 "
-^A 600,780 2 0302 -- Acircumflex
-char194 "
-~A 600,759 2 0303 -- Atilde
-char195 "
-:A 600,748 2 0304 -- Adieresis
-char196 "
-oA 600,801 2 0305 -- Aring
-char197 "
-AE 600,562 2 0306 -- AE
-char198 "
-,C 600,580,206 3 0307 -- Ccedilla
-char199 "
-`E 600,784 2 0310 -- Egrave
-char200 "
-'E 600,784 2 0311 -- Eacute
-char201 "
-^E 600,780 2 0312 -- Ecircumflex
-char202 "
-:E 600,748 2 0313 -- Edieresis
-char203 "
-`I 600,784 2 0314 -- Igrave
-char204 "
-'I 600,784 2 0315 -- Iacute
-char205 "
-^I 600,780 2 0316 -- Icircumflex
-char206 "
-:I 600,748 2 0317 -- Idieresis
-char207 "
--D 600,562 2 0320 -- Eth
-char208 "
-~N 600,759,12 2 0321 -- Ntilde
-char209 "
-`O 600,784,18 2 0322 -- Ograve
-char210 "
-'O 600,784,18 2 0323 -- Oacute
-char211 "
-^O 600,780,18 2 0324 -- Ocircumflex
-char212 "
-~O 600,759,18 2 0325 -- Otilde
-char213 "
-:O 600,748,18 2 0326 -- Odieresis
-char214 "
-char215 600,478 0 0327 -- multiply
-/O 600,584,22 2 0330 -- Oslash
-char216 "
-`U 600,784,18 2 0331 -- Ugrave
-char217 "
-'U 600,784,18 2 0332 -- Uacute
-char218 "
-^U 600,780,18 2 0333 -- Ucircumflex
-char219 "
-:U 600,748,18 2 0334 -- Udieresis
-char220 "
-'Y 600,784 2 0335 -- Yacute
-char221 "
-TP 600,562 2 0336 -- Thorn
-char222 "
-ss 600,626,15 2 0337 -- germandbls
-char223 "
-`a 600,661,15 2 0340 -- agrave
-char224 "
-'a 600,661,15 2 0341 -- aacute
-char225 "
-^a 600,657,15 2 0342 -- acircumflex
-char226 "
-~a 600,636,15 2 0343 -- atilde
-char227 "
-:a 600,625,15 2 0344 -- adieresis
-char228 "
-oa 600,678,15 2 0345 -- aring
-char229 "
-ae 600,454,15 0 0346 -- ae
-char230 "
-,c 600,459,206 1 0347 -- ccedilla
-char231 "
-`e 600,661,15 2 0350 -- egrave
-char232 "
-'e 600,661,15 2 0351 -- eacute
-char233 "
-^e 600,657,15 2 0352 -- ecircumflex
-char234 "
-:e 600,625,15 2 0353 -- edieresis
-char235 "
-`i 600,661 2 0354 -- igrave
-char236 "
-'i 600,661 2 0355 -- iacute
-char237 "
-^i 600,657 2 0356 -- icircumflex
-char238 "
-:i 600,625 2 0357 -- idieresis
-char239 "
-Sd 600,626,27 2 0360 -- eth
-char240 "
-~n 600,636 2 0361 -- ntilde
-char241 "
-`o 600,661,15 2 0362 -- ograve
-char242 "
-'o 600,661,15 2 0363 -- oacute
-char243 "
-^o 600,657,15 2 0364 -- ocircumflex
-char244 "
-~o 600,636,15 2 0365 -- otilde
-char245 "
-:o 600,625,15 2 0366 -- odieresis
-char246 "
-char247 600,500 0 0367 -- divide
-/o 600,463,24 0 0370 -- oslash
-char248 "
-`u 600,661,15 2 0371 -- ugrave
-char249 "
-'u 600,661,15 2 0372 -- uacute
-char250 "
-^u 600,657,15 2 0373 -- ucircumflex
-char251 "
-:u 600,625,15 2 0374 -- udieresis
-char252 "
-'y 600,661,142 3 0375 -- yacute
-char253 "
-Tp 600,626,142 3 0376 -- thorn
-char254 "
-:y 600,625,142 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/CBI b/contrib/groff/font/devps/CBI
deleted file mode 100644
index 72b55614d51a..000000000000
--- a/contrib/groff/font/devps/CBI
+++ /dev/null
@@ -1,340 +0,0 @@
-name CBI
-internalname Courier-BoldOblique
-slant 12
-spacewidth 600
-encoding text.enc
-charset
-ha 600,616,0,5,-121,5 2 0000 -- asciicircum
-ti 600,356,0,39,-70,39 0 0001 -- asciitilde
-vS 600,790,22,122,-4,75 2 0002 -- Scaron
-vZ 600,790,0,109,-12,75 2 0003 -- Zcaron
-vs 600,667,17,82,-17,75 2 0004 -- scaron
-vz 600,667,0,82,-31,75 2 0005 -- zcaron
-:Y 600,748,0,158,-59,75 2 0006 -- Ydieresis
-tm 600,562,0,318,-36,75 2 0007 -- trademark
-aq 600,562,0,0,-254 2 0010 -- quotesingle
-space 600 0 0040
-! 600,572,15,0,-166 2 0041 -- exclam
-" 600,562,0,34,-162,34 2 0042 -- quotedbl
-dq "
-# 600,651,45,90,-38,75 2 0043 -- numbersign
-sh "
-$ 600,666,126,79,-37,75 2 0044 -- dollar
-Do "
-% 600,616,15,74,-52,74 2 0045 -- percent
-& 600,543,15,44,-12,44 0 0046 -- ampersand
-' 600,562,0,0,-180 2 0047 -- quoteright
-cq "
-( 600,616,102,42,-216,42 2 0050 -- parenleft
-) 600,616,102,0,-67 2 0051 -- parenright
-* 600,601,0,47,-129,47 2 0052 -- asterisk
-+ 600,478,0,46,-64,46 0 0053 -- plus
-, 600,174,111,0,-49 0 0054 -- comma
-- 600,313,0,17,-93,17 0 0055 -- hyphen
-hy "
-char173 "
-. 600,171,15,0,-157 0 0056 -- period
-/ 600,626,77,76,-41,75 2 0057 -- slash
-sl "
-0 600,616,15,42,-86,42 2 0060 -- zero
-1 600,616,0,11,-43,11 2 0061 -- one
-2 600,616,0,43,-11,43 2 0062 -- two
-3 600,616,15,21,-22,21 2 0063 -- three
-4 600,616,0,8,-32,8 2 0064 -- four
-5 600,601,15,71,-27,71 2 0065 -- five
-6 600,616,15,102,-86,75 2 0066 -- six
-7 600,601,0,72,-97,72 2 0067 -- seven
-8 600,616,15,54,-65,54 2 0070 -- eight
-9 600,616,15,42,-26,42 2 0071 -- nine
-: 600,425,15,0,-156 0 0072 -- colon
-; 600,425,111,0,-49 0 0073 -- semicolon
-< 600,501,0,62,-71,62 0 0074 -- less
-= 600,398,0,64,-46,64 0 0075 -- equal
-> 600,501,0,39,-47,39 0 0076 -- greater
-? 600,580,14,41,-133,41 2 0077 -- question
-@ 600,616,15,91,-16,75 2 0100 -- at
-at "
-A 600,562,0,81,59,75 2 0101 -- A
-B 600,562,0,79,20,75 2 0102 -- B
-C 600,580,18,124,-25,75 2 0103 -- C
-D 600,562,0,114,20,75 2 0104 -- D
-E 600,562,0,119,25,75 2 0105 -- E
-F 600,562,0,133,11,75 2 0106 -- F
-G 600,580,18,124,-25,75 2 0107 -- G
-H 600,562,0,149,30,75 2 0110 -- H
-I 600,562,0,92,-27,75 2 0111 -- I
-J 600,562,18,170,-9,75 2 0112 -- J
-K 600,562,0,141,29,75 2 0113 -- K
-L 600,562,0,85,11,75 2 0114 -- L
-M 600,562,0,171,52,75 2 0115 -- M
-N 600,562,12,179,42,75 2 0116 -- N
-O 600,580,18,95,-24,75 2 0117 -- O
-P 600,562,0,92,2,75 2 0120 -- P
-Q 600,580,138,86,-34,75 2 0121 -- Q
-R 600,562,0,67,26,67 2 0122 -- R
-S 600,582,22,122,-4,75 2 0123 -- S
-T 600,562,0,128,-36,75 2 0124 -- T
-U 600,562,18,165,-51,75 2 0125 -- U
-V 600,562,0,182,-34,75 2 0126 -- V
-W 600,562,0,187,-34,75 2 0127 -- W
-X 600,562,0,139,38,75 2 0130 -- X
-Y 600,562,0,158,-59,75 2 0131 -- Y
-Z 600,562,0,86,-12,75 2 0132 -- Z
-[ 600,616,102,56,-173,56 2 0133 -- bracketleft
-lB "
-\ 600,626,77,0,-173 2 0134 -- backslash
-rs "
-] 600,616,102,0,-53 2 0135 -- bracketright
-rB "
-a^ 600,657,0,56,-162,56 2 0136 -- circumflex
-^ "
-_ 600,0,125,34,77,34 0 0137 -- underscore
-` 600,562,0,0,-247 2 0140 -- quoteleft
-oq "
-a 600,454,15,42,-12,42 0 0141 -- a
-b 600,626,15,86,37,75 2 0142 -- b
-c 600,459,15,81,-31,75 0 0143 -- c
-d 600,626,15,94,-11,75 2 0144 -- d
-e 600,454,15,54,-31,54 0 0145 -- e
-f 600,626,0,127,-33,75 2 0146 -- f
-g 600,454,146,123,9,75 1 0147 -- g
-h 600,626,0,64,32,64 2 0150 -- h
-i 600,658,0,0,-27 2 0151 -- i
-j 600,658,146,30,13,30 3 0152 -- j
-k 600,626,0,92,17,75 2 0153 -- k
-l 600,626,0,0,-27 2 0154 -- l
-m 600,454,0,98,72,75 0 0155 -- m
-n 600,454,0,64,32,64 0 0156 -- n
-o 600,454,15,72,-21,72 0 0157 -- o
-p 600,454,142,72,81,72 1 0160 -- p
-q 600,454,142,134,-11,75 1 0161 -- q
-r 600,454,0,104,3,75 0 0162 -- r
-s 600,459,17,57,-17,57 0 0163 -- s
-t 600,562,15,16,-68,16 2 0164 -- t
-u 600,439,15,41,-20,41 0 0165 -- u
-v 600,439,0,144,-20,75 0 0166 -- v
-w 600,439,0,161,-3,75 0 0167 -- w
-x 600,439,0,120,44,75 0 0170 -- x
-y 600,439,142,144,70,75 1 0171 -- y
-z 600,439,0,63,-31,63 0 0172 -- z
-lC 600,616,102,45,-154,45 2 0173 -- braceleft
-{ "
-ba 600,750,250,0,-152 3 0174 -- bar
-| "
-rC 600,616,102,0,-64 2 0175 -- braceright
-} "
-a~ 600,636,0,92,-150,75 2 0176 -- tilde
-~ "
-bq 600,143,142,0,-95 1 0200 -- quotesinglbase
-Fo 600,446,0,88,-13,75 0 0201 -- guillemotleft
-char171 "
-Fc 600,446,0,97,-22,75 0 0202 -- guillemotright
-char187 "
-bu 600,430,0,0,-147 0 0203 -- bullet
-Fn 600,616,131,151,106,75 2 0204 -- florin
-f/ 600,661,60,157,28,75 2 0205 -- fraction
-%0 600,616,15,192,94,75 2 0206 -- perthousand
-dg 600,580,70,36,-126,36 2 0207 -- dagger
-dd 600,580,70,36,-72,36 2 0210 -- daggerdbl
-en 600,313,0,52,-58,52 0 0211 -- endash
-em 600,313,0,127,17,75 0 0212 -- emdash
-fi 600,626,0,93,38,75 2 0214 -- fi
-fl 600,626,0,93,38,75 2 0215 -- fl
-.i 600,439,0,0,-27 0 0220 -- dotlessi
-ga 600,661,0,0,-222 2 0222 -- grave
-a" 600,661,0,178,-122,75 2 0223 -- hungarumlaut
-a. 600,625,0,0,-296 2 0224 -- dotaccent
-ab 600,631,0,101,-167,75 2 0225 -- breve
-ah 600,667,0,82,-188,75 2 0226 -- caron
-ao 600,678,0,0,-269 2 0227 -- ring
-ho 600,0,199,0,-94 1 0230 -- ogonek
-lq 600,562,0,44,-140,44 2 0231 -- quotedblleft
-rq 600,562,0,94,-70,75 2 0232 -- quotedblright
-oe 600,454,15,111,31,75 0 0233 -- oe
-/l 600,626,0,28,-27,28 2 0234 -- lslash
-Bq 600,143,142,9,15,9 1 0235 -- quotedblbase
-OE 600,562,0,150,24,75 2 0236 -- OE
-/L 600,562,0,85,11,75 2 0237 -- Lslash
-r! 600,449,146,0,-147 1 0241 -- exclamdown
-char161 "
-ct 600,614,49,54,-71,54 2 0242 -- cent
-char162 "
-Po 600,611,28,100,-57,75 2 0243 -- sterling
-char163 "
-Cs 600,517,0,93,-27,75 0 0244 -- currency
-char164 "
-Ye 600,562,0,159,-48,75 2 0245 -- yen
-char165 "
-bb 600,675,175,0,-168 3 0246 -- brokenbar
-char166 "
-sc 600,580,70,69,-24,69 2 0247 -- section
-char167 "
-ad 600,625,0,42,-194,42 2 0250 -- dieresis
-char168 "
-co 600,580,18,117,-3,75 2 0251 -- copyright
-char169 "
-Of 600,580,0,0,-139 2 0252 -- ordfeminine
-char170 "
-fo 600,446,0,0,-146 0 0253 -- guilsinglleft
-no 600,413,0,67,-85,67 0 0254 -- logicalnot
-char172 "
-\- 600,313,0,46,-64,46 0 0255 -- minus
-rg 600,580,18,117,-3,75 2 0256 -- registered
-char174 "
-a- 600,585,0,86,-145,75 2 0257 -- macron
-char175 "
-de 600,616,0,19,-123,19 2 0260 -- degree
-char176 "
-char177 600,515,0,64,-26,64 0 0261 -- plusminus
-S2 600,616,0,0,-142 2 0262 -- twosuperior
-char178 "
-S3 600,616,0,0,-143 2 0263 -- threesuperior
-char179 "
-aa 600,661,0,58,-263,58 2 0264 -- acute
-char180 "
-char181 600,439,142,41,0,41 1 0265 -- mu
-ps 600,580,70,149,-11,75 2 0266 -- paragraph
-char182 "
-pc 600,351,0,0,-199 0 0267 -- periodcentered
-char183 "
-ac 600,0,206,0,-119 1 0270 -- cedilla
-char184 "
-S1 600,616,0,0,-163 2 0271 -- onesuperior
-char185 "
-Om 600,580,0,0,-139 2 0272 -- ordmasculine
-char186 "
-fc 600,446,0,0,-116 0 0273 -- guilsinglright
-14 600,661,60,156,36,75 2 0274 -- onequarter
-char188 "
-12 600,661,60,165,27,75 2 0275 -- onehalf
-char189 "
-34 600,661,60,148,42,75 2 0276 -- threequarters
-char190 "
-r? 600,449,146,0,-51 1 0277 -- questiondown
-char191 "
-`A 600,784,0,81,59,75 2 0300 -- Agrave
-char192 "
-'A 600,784,0,115,59,75 2 0301 -- Aacute
-char193 "
-^A 600,780,0,81,59,75 2 0302 -- Acircumflex
-char194 "
-~A 600,759,0,88,59,75 2 0303 -- Atilde
-char195 "
-:A 600,748,0,81,59,75 2 0304 -- Adieresis
-char196 "
-oA 600,801,0,81,59,75 2 0305 -- Aring
-char197 "
-AE 600,562,0,157,79,75 2 0306 -- AE
-char198 "
-,C 600,580,206,124,-24,75 3 0307 -- Ccedilla
-char199 "
-`E 600,784,0,119,25,75 2 0310 -- Egrave
-char200 "
-'E 600,784,0,119,25,75 2 0311 -- Eacute
-char201 "
-^E 600,780,0,119,25,75 2 0312 -- Ecircumflex
-char202 "
-:E 600,748,0,119,25,75 2 0313 -- Edieresis
-char203 "
-`I 600,784,0,92,-27,75 2 0314 -- Igrave
-char204 "
-'I 600,784,0,92,-27,75 2 0315 -- Iacute
-char205 "
-^I 600,780,0,92,-27,75 2 0316 -- Icircumflex
-char206 "
-:I 600,748,0,92,-27,75 2 0317 -- Idieresis
-char207 "
--D 600,562,0,114,20,75 2 0320 -- Eth
-char208 "
-~N 600,759,12,179,42,75 2 0321 -- Ntilde
-char209 "
-`O 600,784,18,95,-24,75 2 0322 -- Ograve
-char210 "
-'O 600,784,18,95,-24,75 2 0323 -- Oacute
-char211 "
-^O 600,780,18,95,-24,75 2 0324 -- Ocircumflex
-char212 "
-~O 600,759,18,118,-24,75 2 0325 -- Otilde
-char213 "
-:O 600,748,18,95,-24,75 2 0326 -- Odieresis
-char214 "
-char215 600,478,0,56,-55,56 0 0327 -- multiply
-/O 600,584,22,122,2,75 2 0330 -- Oslash
-char216 "
-`U 600,784,18,165,-51,75 2 0331 -- Ugrave
-char217 "
-'U 600,784,18,165,-51,75 2 0332 -- Uacute
-char218 "
-^U 600,780,18,165,-51,75 2 0333 -- Ucircumflex
-char219 "
-:U 600,748,18,165,-51,75 2 0334 -- Udieresis
-char220 "
-'Y 600,784,0,158,-59,75 2 0335 -- Yacute
-char221 "
-TP 600,562,0,69,2,69 2 0336 -- Thorn
-char222 "
-ss 600,626,15,78,28,75 2 0337 -- germandbls
-char223 "
-`a 600,661,15,42,-12,42 2 0340 -- agrave
-char224 "
-'a 600,661,15,58,-12,58 2 0341 -- aacute
-char225 "
-^a 600,657,15,42,-12,42 2 0342 -- acircumflex
-char226 "
-~a 600,636,15,92,-12,75 2 0343 -- atilde
-char227 "
-:a 600,625,15,42,-12,42 2 0344 -- adieresis
-char228 "
-oa 600,678,15,42,-12,42 2 0345 -- aring
-char229 "
-ae 600,454,15,101,29,75 0 0346 -- ae
-char230 "
-,c 600,459,206,81,-31,75 1 0347 -- ccedilla
-char231 "
-`e 600,661,15,54,-31,54 2 0350 -- egrave
-char232 "
-'e 600,661,15,58,-31,58 2 0351 -- eacute
-char233 "
-^e 600,657,15,56,-31,56 2 0352 -- ecircumflex
-char234 "
-:e 600,625,15,54,-31,54 2 0353 -- edieresis
-char235 "
-`i 600,661,0,0,-27 2 0354 -- igrave
-char236 "
-'i 600,661,0,58,-27,58 2 0355 -- iacute
-char237 "
-^i 600,657,0,16,-27,16 2 0356 -- icircumflex
-char238 "
-:i 600,625,0,2,-27,2 2 0357 -- idieresis
-char239 "
-Sd 600,626,27,111,-43,75 2 0360 -- eth
-char240 "
-~n 600,636,0,92,32,75 2 0361 -- ntilde
-char241 "
-`o 600,661,15,72,-21,72 2 0362 -- ograve
-char242 "
-'o 600,661,15,72,-21,72 2 0363 -- oacute
-char243 "
-^o 600,657,15,72,-21,72 2 0364 -- ocircumflex
-char244 "
-~o 600,636,15,92,-21,75 2 0365 -- otilde
-char245 "
-:o 600,625,15,72,-21,72 2 0366 -- odieresis
-char246 "
-char247 600,500,0,46,-64,46 0 0367 -- divide
-/o 600,463,24,87,-5,75 0 0370 -- oslash
-char248 "
-`u 600,661,15,41,-20,41 2 0371 -- ugrave
-char249 "
-'u 600,661,15,58,-20,58 2 0372 -- uacute
-char250 "
-^u 600,657,15,41,-20,41 2 0373 -- ucircumflex
-char251 "
-:u 600,625,15,41,-20,41 2 0374 -- udieresis
-char252 "
-'y 600,661,142,144,70,75 3 0375 -- yacute
-char253 "
-Tp 600,626,142,72,81,72 3 0376 -- thorn
-char254 "
-:y 600,625,142,144,70,75 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/CI b/contrib/groff/font/devps/CI
deleted file mode 100644
index 63ea748beb5d..000000000000
--- a/contrib/groff/font/devps/CI
+++ /dev/null
@@ -1,340 +0,0 @@
-name CI
-internalname Courier-Oblique
-slant 12
-spacewidth 600
-encoding text.enc
-charset
-ha 600,622,0,37,-125,37 2 0000 -- asciicircum
-ti 600,320,0,50,-66,50 0 0001 -- asciitilde
-vS 600,805,20,123,-26,72 2 0002 -- Scaron
-vZ 600,805,0,93,-36,72 2 0003 -- Zcaron
-vs 600,669,15,64,-28,64 2 0004 -- scaron
-vz 600,669,0,74,-49,72 2 0005 -- zcaron
-:Y 600,731,0,145,-83,72 2 0006 -- Ydieresis
-tm 600,562,0,192,-25,72 2 0007 -- trademark
-aq 600,562,0,0,-295 2 0010 -- quotesingle
-space 600 0 0040
-! 600,572,15,0,-193 2 0041 -- exclam
-" 600,562,0,0,-223 2 0042 -- quotedbl
-dq "
-# 600,639,32,46,-83,46 2 0043 -- numbersign
-sh "
-$ 600,662,126,46,-58,46 2 0044 -- dollar
-Do "
-% 600,622,15,49,-84,49 2 0045 -- percent
-& 600,543,15,30,-37,30 0 0046 -- ampersand
-' 600,562,0,0,-233 2 0047 -- quoteright
-cq "
-( 600,622,108,22,-263,22 2 0050 -- parenleft
-) 600,622,108,0,-87 2 0051 -- parenright
-* 600,607,0,30,-162,30 2 0052 -- asterisk
-+ 600,470,0,30,-79,30 0 0053 -- plus
-, 600,122,112,0,-107 0 0054 -- comma
-- 600,285,0,8,-102,8 0 0055 -- hyphen
-hy "
-char173 "
-. 600,109,15,0,-188 0 0056 -- period
-/ 600,629,80,54,-62,54 2 0057 -- slash
-sl "
-0 600,622,15,25,-104,25 2 0060 -- zero
-1 600,622,0,0,-48 2 0061 -- one
-2 600,622,0,18,-20,18 2 0062 -- two
-3 600,622,15,0,-32 2 0063 -- three
-4 600,622,0,0,-58 2 0064 -- four
-5 600,607,15,39,-49,39 2 0065 -- five
-6 600,622,15,79,-105,72 2 0066 -- six
-7 600,607,0,62,-132,62 2 0067 -- seven
-8 600,622,15,38,-82,38 2 0070 -- eight
-9 600,622,15,24,-43,24 2 0071 -- nine
-: 600,385,15,0,-188 0 0072 -- colon
-; 600,385,112,0,-107 0 0073 -- semicolon
-< 600,472,0,60,-46,60 0 0074 -- less
-= 600,376,0,50,-59,50 0 0075 -- equal
-> 600,472,0,49,-35,49 0 0076 -- greater
-? 600,572,15,33,-172,33 2 0077 -- question
-@ 600,622,15,32,-77,32 2 0100 -- at
-at "
-A 600,562,0,57,47,57 2 0101 -- A
-B 600,562,0,66,7,66 2 0102 -- B
-C 600,580,18,105,-43,72 2 0103 -- C
-D 600,562,0,95,7,72 2 0104 -- D
-E 600,562,0,110,-3,72 2 0105 -- E
-F 600,562,0,110,-3,72 2 0106 -- F
-G 600,580,18,95,-33,72 2 0107 -- G
-H 600,562,0,137,18,72 2 0110 -- H
-I 600,562,0,73,-46,72 2 0111 -- I
-J 600,562,18,135,-2,72 2 0112 -- J
-K 600,562,0,121,12,72 2 0113 -- K
-L 600,562,0,57,3,57 2 0114 -- L
-M 600,562,0,165,46,72 2 0115 -- M
-N 600,562,13,162,43,72 2 0116 -- N
-O 600,580,18,75,-44,72 2 0117 -- O
-P 600,562,0,94,-29,72 2 0120 -- P
-Q 600,580,138,75,-45,72 2 0121 -- Q
-R 600,562,0,48,12,48 2 0122 -- R
-S 600,580,20,100,-26,72 2 0123 -- S
-T 600,562,0,115,-58,72 2 0124 -- T
-U 600,562,18,152,-75,72 2 0125 -- U
-V 600,562,13,173,-55,72 2 0126 -- V
-W 600,562,13,172,-56,72 2 0127 -- W
-X 600,562,0,125,27,72 2 0130 -- X
-Y 600,562,0,145,-83,72 2 0131 -- Y
-Z 600,562,0,60,-36,60 2 0132 -- Z
-[ 600,622,108,24,-196,24 2 0133 -- bracketleft
-lB "
-\ 600,629,80,0,-199 2 0134 -- backslash
-rs "
-] 600,622,108,0,-85 2 0135 -- bracketright
-rB "
-a^ 600,654,0,31,-179,31 2 0136 -- circumflex
-^ "
-_ 600,0,125,34,77,34 0 0137 -- underscore
-` 600,562,0,0,-293 2 0140 -- quoteleft
-oq "
-a 600,441,15,19,-26,19 0 0141 -- a
-b 600,629,15,75,21,72 2 0142 -- b
-c 600,441,15,58,-56,58 0 0143 -- c
-d 600,629,15,90,-35,72 2 0144 -- d
-e 600,441,15,48,-56,48 0 0145 -- e
-f 600,629,0,112,-64,72 2 0146 -- f
-g 600,441,157,107,-11,72 1 0147 -- g
-h 600,629,0,42,17,42 2 0150 -- h
-i 600,657,0,0,-45 2 0151 -- i
-j 600,657,157,0,-2 3 0152 -- j
-k 600,629,0,83,-8,72 2 0153 -- k
-l 600,629,0,0,-45 2 0154 -- l
-m 600,441,0,65,55,65 0 0155 -- m
-n 600,441,0,35,24,35 0 0156 -- n
-o 600,441,15,38,-52,38 0 0157 -- o
-p 600,441,157,55,74,55 1 0160 -- p
-q 600,441,157,132,-35,72 1 0161 -- q
-r 600,441,0,86,-10,72 0 0162 -- r
-s 600,441,15,34,-28,34 0 0163 -- s
-t 600,561,15,11,-117,11 2 0164 -- t
-u 600,426,15,22,-51,22 0 0165 -- u
-v 600,426,10,131,-40,72 0 0166 -- v
-w 600,426,10,145,-26,72 0 0167 -- w
-x 600,426,0,105,30,72 0 0170 -- x
-y 600,426,157,133,54,72 1 0171 -- y
-z 600,426,0,43,-49,43 0 0172 -- z
-lC 600,622,108,19,-183,19 2 0173 -- braceleft
-{ "
-ba 600,750,250,0,-172 3 0174 -- bar
-| "
-rC 600,622,108,0,-90 2 0175 -- braceright
-} "
-a~ 600,606,0,79,-162,72 2 0176 -- tilde
-~ "
-bq 600,100,134,0,-135 0 0200 -- quotesinglbase
-Fo 600,446,0,102,-42,72 0 0201 -- guillemotleft
-char171 "
-Fc 600,446,0,68,-8,68 0 0202 -- guillemotright
-char187 "
-bu 600,383,0,0,-174 0 0203 -- bullet
-Fn 600,622,143,121,76,72 2 0204 -- florin
-f/ 600,665,57,96,-34,72 2 0205 -- fraction
-%0 600,622,15,77,-9,72 2 0206 -- perthousand
-dg 600,580,78,0,-167 2 0207 -- dagger
-dd 600,580,78,0,-113 2 0210 -- daggerdbl
-en 600,285,0,36,-74,36 0 0211 -- endash
-em 600,285,0,111,1,72 0 0212 -- emdash
-fi 600,629,0,69,47,69 2 0214 -- fi
-fl 600,629,0,69,47,69 2 0215 -- fl
-.i 600,426,0,0,-45 0 0220 -- dotlessi
-ga 600,672,0,0,-244 2 0222 -- grave
-a" 600,672,0,133,-189,72 2 0223 -- hungarumlaut
-a. 600,580,0,0,-310 2 0224 -- dotaccent
-ab 600,609,0,26,-229,26 2 0225 -- breve
-ah 600,669,0,64,-212,64 2 0226 -- caron
-ao 600,627,0,0,-282 2 0227 -- ring
-ho 600,0,151,0,-157 0 0230 -- ogonek
-lq 600,562,0,0,-212 2 0231 -- quotedblleft
-rq 600,562,0,26,-163,26 2 0232 -- quotedblright
-oe 600,441,15,65,-4,65 0 0233 -- oe
-/l 600,629,0,33,-45,33 2 0234 -- lslash
-Bq 600,100,134,0,-65 0 0235 -- quotedblbase
-OE 600,562,0,122,-9,72 2 0236 -- OE
-/L 600,562,0,57,3,57 2 0237 -- Lslash
-r! 600,430,157,0,-175 1 0241 -- exclamdown
-char161 "
-ct 600,614,49,38,-101,38 2 0242 -- cent
-char162 "
-Po 600,611,21,71,-74,71 2 0243 -- sterling
-char163 "
-Cs 600,506,0,78,-44,72 0 0244 -- currency
-char164 "
-Ye 600,562,0,143,-70,72 2 0245 -- yen
-char165 "
-bb 600,675,175,0,-188 3 0246 -- brokenbar
-char166 "
-sc 600,580,78,40,-54,40 2 0247 -- section
-char167 "
-ad 600,595,0,20,-212,20 2 0250 -- dieresis
-char168 "
-co 600,580,18,117,-3,72 2 0251 -- copyright
-char169 "
-Of 600,580,0,0,-159 2 0252 -- ordfeminine
-char170 "
-fo 600,446,0,0,-154 0 0253 -- guilsinglleft
-no 600,369,0,41,-105,41 0 0254 -- logicalnot
-char172 "
-\- 600,283,0,30,-79,30 0 0255 -- minus
-rg 600,580,18,117,-3,72 2 0256 -- registered
-char174 "
-a- 600,565,0,50,-182,50 2 0257 -- macron
-char175 "
-de 600,622,0,26,-164,26 2 0260 -- degree
-char176 "
-char177 600,558,0,44,-46,44 0 0261 -- plusminus
-S2 600,622,0,0,-180 2 0262 -- twosuperior
-char178 "
-S3 600,622,0,0,-163 2 0263 -- threesuperior
-char179 "
-aa 600,672,0,62,-298,62 2 0264 -- acute
-char180 "
-char181 600,426,157,22,-22,22 1 0265 -- mu
-ps 600,562,78,80,-50,72 2 0266 -- paragraph
-char182 "
-pc 600,327,0,0,-225 0 0267 -- periodcentered
-char183 "
-ac 600,10,151,0,-147 0 0270 -- cedilla
-char184 "
-S1 600,622,0,0,-181 2 0271 -- onesuperior
-char185 "
-Om 600,580,0,0,-160 2 0272 -- ordmasculine
-char186 "
-fc 600,446,0,0,-120 0 0273 -- guilsinglright
-14 600,665,57,124,-15,72 2 0274 -- onequarter
-char188 "
-12 600,665,57,119,-15,72 2 0275 -- onehalf
-char189 "
-34 600,666,56,109,-23,72 2 0276 -- threequarters
-char190 "
-r? 600,430,157,0,-55 1 0277 -- questiondown
-char191 "
-`A 600,793,0,57,47,57 2 0300 -- Agrave
-char192 "
-'A 600,793,0,108,47,72 2 0301 -- Aacute
-char193 "
-^A 600,775,0,57,47,57 2 0302 -- Acircumflex
-char194 "
-~A 600,732,0,106,47,72 2 0303 -- Atilde
-char195 "
-:A 600,731,0,57,47,57 2 0304 -- Adieresis
-char196 "
-oA 600,753,0,57,47,57 2 0305 -- Aring
-char197 "
-AE 600,562,0,105,47,72 2 0306 -- AE
-char198 "
-,C 600,580,151,108,-43,72 2 0307 -- Ccedilla
-char199 "
-`E 600,793,0,110,-3,72 2 0310 -- Egrave
-char200 "
-'E 600,793,0,118,-3,72 2 0311 -- Eacute
-char201 "
-^E 600,775,0,110,-3,72 2 0312 -- Ecircumflex
-char202 "
-:E 600,731,0,110,-3,72 2 0313 -- Edieresis
-char203 "
-`I 600,793,0,73,-46,72 2 0314 -- Igrave
-char204 "
-'I 600,793,0,88,-46,72 2 0315 -- Iacute
-char205 "
-^I 600,775,0,73,-46,72 2 0316 -- Icircumflex
-char206 "
-:I 600,731,0,73,-46,72 2 0317 -- Idieresis
-char207 "
--D 600,562,0,95,7,72 2 0320 -- Eth
-char208 "
-~N 600,732,13,162,43,72 2 0321 -- Ntilde
-char209 "
-`O 600,793,18,75,-44,72 2 0322 -- Ograve
-char210 "
-'O 600,793,18,88,-44,72 2 0323 -- Oacute
-char211 "
-^O 600,775,18,75,-44,72 2 0324 -- Ocircumflex
-char212 "
-~O 600,732,18,106,-44,72 2 0325 -- Otilde
-char213 "
-:O 600,731,18,75,-44,72 2 0326 -- Odieresis
-char214 "
-char215 600,470,0,57,-53,57 0 0327 -- multiply
-/O 600,629,80,75,-44,72 2 0330 -- Oslash
-char216 "
-`U 600,793,18,152,-75,72 2 0331 -- Ugrave
-char217 "
-'U 600,793,18,152,-75,72 2 0332 -- Uacute
-char218 "
-^U 600,775,18,152,-75,72 2 0333 -- Ucircumflex
-char219 "
-:U 600,731,18,152,-75,72 2 0334 -- Udieresis
-char220 "
-'Y 600,793,0,145,-83,72 2 0335 -- Yacute
-char221 "
-TP 600,562,0,56,-29,56 2 0336 -- Thorn
-char222 "
-ss 600,629,15,67,2,67 2 0337 -- germandbls
-char223 "
-`a 600,672,15,19,-26,19 2 0340 -- agrave
-char224 "
-'a 600,672,15,62,-26,62 2 0341 -- aacute
-char225 "
-^a 600,654,15,31,-26,31 2 0342 -- acircumflex
-char226 "
-~a 600,606,15,79,-26,72 2 0343 -- atilde
-char227 "
-:a 600,595,15,20,-26,20 2 0344 -- adieresis
-char228 "
-oa 600,627,15,19,-26,19 2 0345 -- aring
-char229 "
-ae 600,441,15,76,9,72 0 0346 -- ae
-char230 "
-,c 600,441,151,64,-56,64 0 0347 -- ccedilla
-char231 "
-`e 600,672,15,48,-56,48 2 0350 -- egrave
-char232 "
-'e 600,672,15,62,-56,62 2 0351 -- eacute
-char233 "
-^e 600,654,15,48,-56,48 2 0352 -- ecircumflex
-char234 "
-:e 600,595,15,48,-56,48 2 0353 -- edieresis
-char235 "
-`i 600,672,0,0,-45 2 0354 -- igrave
-char236 "
-'i 600,672,0,62,-45,62 2 0355 -- iacute
-char237 "
-^i 600,654,0,1,-45,1 2 0356 -- icircumflex
-char238 "
-:i 600,595,0,0,-45 2 0357 -- idieresis
-char239 "
-Sd 600,629,15,89,-52,72 2 0360 -- eth
-char240 "
-~n 600,606,0,79,24,72 2 0361 -- ntilde
-char241 "
-`o 600,672,15,38,-52,38 2 0362 -- ograve
-char242 "
-'o 600,672,15,62,-52,62 2 0363 -- oacute
-char243 "
-^o 600,654,15,38,-52,38 2 0364 -- ocircumflex
-char244 "
-~o 600,606,15,79,-52,72 2 0365 -- otilde
-char245 "
-:o 600,595,15,38,-52,38 2 0366 -- odieresis
-char246 "
-char247 600,467,0,23,-86,23 0 0367 -- divide
-/o 600,506,80,38,-52,38 0 0370 -- oslash
-char248 "
-`u 600,672,15,22,-51,22 2 0371 -- ugrave
-char249 "
-'u 600,672,15,52,-51,52 2 0372 -- uacute
-char250 "
-^u 600,654,15,22,-51,22 2 0373 -- ucircumflex
-char251 "
-:u 600,595,15,22,-51,22 2 0374 -- udieresis
-char252 "
-'y 600,672,157,133,54,72 3 0375 -- yacute
-char253 "
-Tp 600,629,157,55,74,55 3 0376 -- thorn
-char254 "
-:y 600,595,157,133,54,72 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/CR b/contrib/groff/font/devps/CR
deleted file mode 100644
index fc3c91e090c4..000000000000
--- a/contrib/groff/font/devps/CR
+++ /dev/null
@@ -1,339 +0,0 @@
-name CR
-internalname Courier
-spacewidth 600
-encoding text.enc
-charset
-ha 600,622 2 0000 -- asciicircum
-ti 600,320 0 0001 -- asciitilde
-vS 600,805,20 2 0002 -- Scaron
-vZ 600,805 2 0003 -- Zcaron
-vs 600,669,15 2 0004 -- scaron
-vz 600,669 2 0005 -- zcaron
-:Y 600,731 2 0006 -- Ydieresis
-tm 600,562 2 0007 -- trademark
-aq 600,562 2 0010 -- quotesingle
-space 600 0 0040
-! 600,572,15 2 0041 -- exclam
-" 600,562 2 0042 -- quotedbl
-dq "
-# 600,639,32 2 0043 -- numbersign
-sh "
-$ 600,662,126 2 0044 -- dollar
-Do "
-% 600,622,15 2 0045 -- percent
-& 600,543,15 0 0046 -- ampersand
-' 600,562 2 0047 -- quoteright
-cq "
-( 600,622,108 2 0050 -- parenleft
-) 600,622,108 2 0051 -- parenright
-* 600,607 2 0052 -- asterisk
-+ 600,470 0 0053 -- plus
-, 600,122,112 0 0054 -- comma
-- 600,285 0 0055 -- hyphen
-hy "
-char173 "
-. 600,109,15 0 0056 -- period
-/ 600,629,80 2 0057 -- slash
-sl "
-0 600,622,15 2 0060 -- zero
-1 600,622 2 0061 -- one
-2 600,622 2 0062 -- two
-3 600,622,15 2 0063 -- three
-4 600,622 2 0064 -- four
-5 600,607,15 2 0065 -- five
-6 600,622,15 2 0066 -- six
-7 600,607 2 0067 -- seven
-8 600,622,15 2 0070 -- eight
-9 600,622,15 2 0071 -- nine
-: 600,385,15 0 0072 -- colon
-; 600,385,112 0 0073 -- semicolon
-< 600,472 0 0074 -- less
-= 600,376 0 0075 -- equal
-> 600,472 0 0076 -- greater
-? 600,572,15 2 0077 -- question
-@ 600,622,15 2 0100 -- at
-at "
-A 600,562 2 0101 -- A
-B 600,562 2 0102 -- B
-C 600,580,18 2 0103 -- C
-D 600,562 2 0104 -- D
-E 600,562 2 0105 -- E
-F 600,562 2 0106 -- F
-G 600,580,18 2 0107 -- G
-H 600,562 2 0110 -- H
-I 600,562 2 0111 -- I
-J 600,562,18 2 0112 -- J
-K 600,562 2 0113 -- K
-L 600,562 2 0114 -- L
-M 600,562 2 0115 -- M
-N 600,562,13 2 0116 -- N
-O 600,580,18 2 0117 -- O
-P 600,562 2 0120 -- P
-Q 600,580,138 2 0121 -- Q
-R 600,562 2 0122 -- R
-S 600,580,20 2 0123 -- S
-T 600,562 2 0124 -- T
-U 600,562,18 2 0125 -- U
-V 600,562,13 2 0126 -- V
-W 600,562,13 2 0127 -- W
-X 600,562 2 0130 -- X
-Y 600,562 2 0131 -- Y
-Z 600,562 2 0132 -- Z
-[ 600,622,108 2 0133 -- bracketleft
-lB "
-\ 600,629,80 2 0134 -- backslash
-rs "
-] 600,622,108 2 0135 -- bracketright
-rB "
-a^ 600,654 2 0136 -- circumflex
-^ "
-_ 600,0,125 0 0137 -- underscore
-` 600,562 2 0140 -- quoteleft
-oq "
-a 600,441,15 0 0141 -- a
-b 600,629,15 2 0142 -- b
-c 600,441,15 0 0143 -- c
-d 600,629,15 2 0144 -- d
-e 600,441,15 0 0145 -- e
-f 600,629 2 0146 -- f
-g 600,441,157 1 0147 -- g
-h 600,629 2 0150 -- h
-i 600,657 2 0151 -- i
-j 600,657,157 3 0152 -- j
-k 600,629 2 0153 -- k
-l 600,629 2 0154 -- l
-m 600,441 0 0155 -- m
-n 600,441 0 0156 -- n
-o 600,441,15 0 0157 -- o
-p 600,441,157 1 0160 -- p
-q 600,441,157 1 0161 -- q
-r 600,441 0 0162 -- r
-s 600,441,15 0 0163 -- s
-t 600,561,15 2 0164 -- t
-u 600,426,15 0 0165 -- u
-v 600,426,10 0 0166 -- v
-w 600,426,10 0 0167 -- w
-x 600,426 0 0170 -- x
-y 600,426,157 1 0171 -- y
-z 600,426 0 0172 -- z
-lC 600,622,108 2 0173 -- braceleft
-{ "
-ba 600,750,250 3 0174 -- bar
-| "
-rC 600,622,108 2 0175 -- braceright
-} "
-a~ 600,606 2 0176 -- tilde
-~ "
-bq 600,100,134 0 0200 -- quotesinglbase
-Fo 600,446 0 0201 -- guillemotleft
-char171 "
-Fc 600,446 0 0202 -- guillemotright
-char187 "
-bu 600,383 0 0203 -- bullet
-Fn 600,622,143 2 0204 -- florin
-f/ 600,665,57 2 0205 -- fraction
-%0 600,622,15 2 0206 -- perthousand
-dg 600,580,78 2 0207 -- dagger
-dd 600,580,78 2 0210 -- daggerdbl
-en 600,285 0 0211 -- endash
-em 600,285 0 0212 -- emdash
-fi 600,629 2 0214 -- fi
-fl 600,629 2 0215 -- fl
-.i 600,426 0 0220 -- dotlessi
-ga 600,672 2 0222 -- grave
-a" 600,672 2 0223 -- hungarumlaut
-a. 600,580 2 0224 -- dotaccent
-ab 600,609 2 0225 -- breve
-ah 600,669 2 0226 -- caron
-ao 600,627 2 0227 -- ring
-ho 600,0,151 0 0230 -- ogonek
-lq 600,562 2 0231 -- quotedblleft
-rq 600,562 2 0232 -- quotedblright
-oe 600,441,15 0 0233 -- oe
-/l 600,629 2 0234 -- lslash
-Bq 600,100,134 0 0235 -- quotedblbase
-OE 600,562 2 0236 -- OE
-/L 600,562 2 0237 -- Lslash
-r! 600,430,157 1 0241 -- exclamdown
-char161 "
-ct 600,614,49 2 0242 -- cent
-char162 "
-Po 600,611,21 2 0243 -- sterling
-char163 "
-Cs 600,506 0 0244 -- currency
-char164 "
-Ye 600,562 2 0245 -- yen
-char165 "
-bb 600,675,175 3 0246 -- brokenbar
-char166 "
-sc 600,580,78 2 0247 -- section
-char167 "
-ad 600,595 2 0250 -- dieresis
-char168 "
-co 600,580,18 2 0251 -- copyright
-char169 "
-Of 600,580 2 0252 -- ordfeminine
-char170 "
-fo 600,446 0 0253 -- guilsinglleft
-no 600,369 0 0254 -- logicalnot
-char172 "
-\- 600,283 0 0255 -- minus
-rg 600,580,18 2 0256 -- registered
-char174 "
-a- 600,565 2 0257 -- macron
-char175 "
-de 600,622 2 0260 -- degree
-char176 "
-char177 600,558 0 0261 -- plusminus
-S2 600,622 2 0262 -- twosuperior
-char178 "
-S3 600,622 2 0263 -- threesuperior
-char179 "
-aa 600,672 2 0264 -- acute
-char180 "
-char181 600,426,157 1 0265 -- mu
-ps 600,562,78 2 0266 -- paragraph
-char182 "
-pc 600,327 0 0267 -- periodcentered
-char183 "
-ac 600,10,151 0 0270 -- cedilla
-char184 "
-S1 600,622 2 0271 -- onesuperior
-char185 "
-Om 600,580 2 0272 -- ordmasculine
-char186 "
-fc 600,446 0 0273 -- guilsinglright
-14 600,665,57 2 0274 -- onequarter
-char188 "
-12 600,665,57 2 0275 -- onehalf
-char189 "
-34 600,666,56 2 0276 -- threequarters
-char190 "
-r? 600,430,157 1 0277 -- questiondown
-char191 "
-`A 600,793 2 0300 -- Agrave
-char192 "
-'A 600,793 2 0301 -- Aacute
-char193 "
-^A 600,775 2 0302 -- Acircumflex
-char194 "
-~A 600,732 2 0303 -- Atilde
-char195 "
-:A 600,731 2 0304 -- Adieresis
-char196 "
-oA 600,753 2 0305 -- Aring
-char197 "
-AE 600,562 2 0306 -- AE
-char198 "
-,C 600,580,151 2 0307 -- Ccedilla
-char199 "
-`E 600,793 2 0310 -- Egrave
-char200 "
-'E 600,793 2 0311 -- Eacute
-char201 "
-^E 600,775 2 0312 -- Ecircumflex
-char202 "
-:E 600,731 2 0313 -- Edieresis
-char203 "
-`I 600,793 2 0314 -- Igrave
-char204 "
-'I 600,793 2 0315 -- Iacute
-char205 "
-^I 600,775 2 0316 -- Icircumflex
-char206 "
-:I 600,731 2 0317 -- Idieresis
-char207 "
--D 600,562 2 0320 -- Eth
-char208 "
-~N 600,732,13 2 0321 -- Ntilde
-char209 "
-`O 600,793,18 2 0322 -- Ograve
-char210 "
-'O 600,793,18 2 0323 -- Oacute
-char211 "
-^O 600,775,18 2 0324 -- Ocircumflex
-char212 "
-~O 600,732,18 2 0325 -- Otilde
-char213 "
-:O 600,731,18 2 0326 -- Odieresis
-char214 "
-char215 600,470 0 0327 -- multiply
-/O 600,629,80 2 0330 -- Oslash
-char216 "
-`U 600,793,18 2 0331 -- Ugrave
-char217 "
-'U 600,793,18 2 0332 -- Uacute
-char218 "
-^U 600,775,18 2 0333 -- Ucircumflex
-char219 "
-:U 600,731,18 2 0334 -- Udieresis
-char220 "
-'Y 600,793 2 0335 -- Yacute
-char221 "
-TP 600,562 2 0336 -- Thorn
-char222 "
-ss 600,629,15 2 0337 -- germandbls
-char223 "
-`a 600,672,15 2 0340 -- agrave
-char224 "
-'a 600,672,15 2 0341 -- aacute
-char225 "
-^a 600,654,15 2 0342 -- acircumflex
-char226 "
-~a 600,606,15 2 0343 -- atilde
-char227 "
-:a 600,595,15 2 0344 -- adieresis
-char228 "
-oa 600,627,15 2 0345 -- aring
-char229 "
-ae 600,441,15 0 0346 -- ae
-char230 "
-,c 600,441,151 0 0347 -- ccedilla
-char231 "
-`e 600,672,15 2 0350 -- egrave
-char232 "
-'e 600,672,15 2 0351 -- eacute
-char233 "
-^e 600,654,15 2 0352 -- ecircumflex
-char234 "
-:e 600,595,15 2 0353 -- edieresis
-char235 "
-`i 600,672 2 0354 -- igrave
-char236 "
-'i 600,672 2 0355 -- iacute
-char237 "
-^i 600,654 2 0356 -- icircumflex
-char238 "
-:i 600,595 2 0357 -- idieresis
-char239 "
-Sd 600,629,15 2 0360 -- eth
-char240 "
-~n 600,606 2 0361 -- ntilde
-char241 "
-`o 600,672,15 2 0362 -- ograve
-char242 "
-'o 600,672,15 2 0363 -- oacute
-char243 "
-^o 600,654,15 2 0364 -- ocircumflex
-char244 "
-~o 600,606,15 2 0365 -- otilde
-char245 "
-:o 600,595,15 2 0366 -- odieresis
-char246 "
-char247 600,467 0 0367 -- divide
-/o 600,506,80 0 0370 -- oslash
-char248 "
-`u 600,672,15 2 0371 -- ugrave
-char249 "
-'u 600,672,15 2 0372 -- uacute
-char250 "
-^u 600,654,15 2 0373 -- ucircumflex
-char251 "
-:u 600,595,15 2 0374 -- udieresis
-char252 "
-'y 600,672,157 3 0375 -- yacute
-char253 "
-Tp 600,629,157 3 0376 -- thorn
-char254 "
-:y 600,595,157 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/DESC.in b/contrib/groff/font/devps/DESC.in
deleted file mode 100644
index e9d26c8457a4..000000000000
--- a/contrib/groff/font/devps/DESC.in
+++ /dev/null
@@ -1,11 +0,0 @@
-res 72000
-hor 1
-vert 1
-sizescale 1000
-unitwidth 1000
-sizes 1000-10000000 0
-styles R I B BI
-family T
-fonts 9 0 0 0 0 0 SS S ZD ZDR
-tcommand
-postpro grops
diff --git a/contrib/groff/font/devps/HB b/contrib/groff/font/devps/HB
deleted file mode 100644
index 96e022eebd4e..000000000000
--- a/contrib/groff/font/devps/HB
+++ /dev/null
@@ -1,561 +0,0 @@
-name HB
-internalname Helvetica-Bold
-spacewidth 278
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -30
-A w -30
-A v -40
-A u -30
-A Y -110
-A W -60
-A V -80
-A U -50
-A T -90
-A Q -40
-A O -40
-A G -50
-A C -40
-B U -10
-B A -30
-D . -30
-D , -30
-D Y -70
-D W -40
-D V -40
-D A -40
-F . -100
-F , -100
-F a -20
-F A -80
-J u -20
-J . -20
-J , -20
-J A -20
-K y -40
-K u -30
-K o -35
-K e -15
-K O -30
-L y -30
-L ' -140
-L cq -140
-L rq -140
-L Y -120
-L W -80
-L V -110
-L T -90
-O . -40
-O , -40
-O Y -70
-O X -50
-O W -50
-O V -50
-O T -40
-O A -50
-P . -120
-P o -40
-P e -30
-P , -120
-P a -30
-P A -100
-Q . 20
-Q , 20
-Q U -10
-R Y -50
-R W -40
-R V -50
-R U -20
-R T -20
-R O -20
-T y -60
-T w -60
-T u -90
-T ; -40
-T r -80
-T . -80
-T o -80
-T - -120
-T hy -120
-T char173 -120
-T e -60
-T , -80
-T : -40
-T a -80
-T O -40
-T A -90
-U . -30
-U , -30
-U A -50
-V u -60
-V ; -40
-V . -120
-V o -90
-V - -80
-V hy -80
-V char173 -80
-V e -50
-V , -120
-V : -40
-V a -60
-V O -50
-V G -50
-V A -80
-W y -20
-W u -45
-W ; -10
-W . -80
-W o -60
-W - -40
-W hy -40
-W char173 -40
-W e -35
-W , -80
-W : -10
-W a -40
-W O -20
-W A -60
-Y u -100
-Y ; -50
-Y . -100
-Y o -100
-Y e -80
-Y , -100
-Y : -50
-Y a -90
-Y O -70
-Y A -110
-a y -20
-a w -15
-a v -15
-a g -10
-b y -20
-b v -20
-b u -20
-b l -10
-c y -10
-c l -20
-c k -20
-c h -10
-, ' -120
-, cq -120
-, rq -120
-d y -15
-d w -15
-d v -15
-d d -10
-e y -15
-e x -15
-e w -15
-e v -15
-e . 20
-e , 10
-f ' 30
-f cq 30
-f rq 30
-f . -10
-f o -20
-f e -10
-f , -10
-g g -10
-g e 10
-h y -20
-k o -15
-l y -15
-l w -15
-m y -30
-m u -20
-n y -20
-n v -40
-n u -10
-o y -20
-o x -30
-o w -15
-o v -20
-p y -15
-. ' -120
-. cq -120
-. rq -120
-` ` -46
-` oq -46
-oq ` -46
-oq oq -46
-' v -20
-cq v -20
-' s -60
-cq s -60
-' r -40
-cq r -40
-' ' -46
-' cq -46
-cq ' -46
-cq cq -46
-' l -20
-cq l -20
-' d -80
-cq d -80
-r y 10
-r v 10
-r t 20
-r s -15
-r q -20
-r . -60
-r o -20
-r - -20
-r hy -20
-r char173 -20
-r g -15
-r d -20
-r , -60
-r c -20
-s w -15
-v . -80
-v o -30
-v , -80
-v a -20
-w . -40
-w o -20
-w , -40
-x e -10
-y . -80
-y o -25
-y e -10
-y , -80
-y a -30
-z e 10
-charset
-ha 584,698 2 0000 -- asciicircum
-ti 584,343 0 0001 -- asciitilde
-vS 667,936,19 2 0002 -- Scaron
-vZ 611,936 2 0003 -- Zcaron
-vs 556,750,14 2 0004 -- scaron
-vz 500,750 2 0005 -- zcaron
-:Y 667,915 2 0006 -- Ydieresis
-tm 1000,718 2 0007 -- trademark
-aq 238,718 2 0010 -- quotesingle
-space 278 0 0040
-! 333,718 2 0041 -- exclam
-" 474,718 2 0042 -- quotedbl
-dq "
-# 556,698 2 0043 -- numbersign
-sh "
-$ 556,775,115 2 0044 -- dollar
-Do "
-% 889,710,19 2 0045 -- percent
-& 722,718,19 2 0046 -- ampersand
-' 278,718 2 0047 -- quoteright
-cq "
-( 333,734,208 3 0050 -- parenleft
-) 333,734,208 3 0051 -- parenright
-* 389,718 2 0052 -- asterisk
-+ 584,506 0 0053 -- plus
-, 278,146,168 0 0054 -- comma
-- 333,345 0 0055 -- hyphen
-hy "
-char173 "
-. 278,146 0 0056 -- period
-/ 278,737,19 2 0057 -- slash
-sl "
-0 556,710,19 2 0060 -- zero
-1 556,710 2 0061 -- one
-2 556,710 2 0062 -- two
-3 556,710,19 2 0063 -- three
-4 556,710 2 0064 -- four
-5 556,698,19 2 0065 -- five
-6 556,710,19 2 0066 -- six
-7 556,698 2 0067 -- seven
-8 556,710,19 2 0070 -- eight
-9 556,710,19 2 0071 -- nine
-: 333,512 0 0072 -- colon
-; 333,512,168 0 0073 -- semicolon
-< 584,514,8 0 0074 -- less
-= 584,419 0 0075 -- equal
-> 584,514,8 0 0076 -- greater
-? 611,727 2 0077 -- question
-@ 975,737,19 2 0100 -- at
-at "
-A 722,718 2 0101 -- A
-B 722,718 2 0102 -- B
-C 722,737,19 2 0103 -- C
-D 722,718 2 0104 -- D
-E 667,718 2 0105 -- E
-F 611,718 2 0106 -- F
-G 778,737,19 2 0107 -- G
-H 722,718 2 0110 -- H
-I 278,718 2 0111 -- I
-J 556,718,18 2 0112 -- J
-K 722,718 2 0113 -- K
-L 611,718 2 0114 -- L
-M 833,718 2 0115 -- M
-N 722,718 2 0116 -- N
-O 778,737,19 2 0117 -- O
-P 667,718 2 0120 -- P
-Q 778,737,52 2 0121 -- Q
-R 722,718 2 0122 -- R
-S 667,737,19 2 0123 -- S
-T 611,718 2 0124 -- T
-U 722,718,19 2 0125 -- U
-V 667,718 2 0126 -- V
-W 944,718 2 0127 -- W
-X 667,718 2 0130 -- X
-Y 667,718 2 0131 -- Y
-Z 611,718 2 0132 -- Z
-[ 333,722,196 2 0133 -- bracketleft
-lB "
-\ 278,737,19 2 0134 -- backslash
-rs "
-] 333,722,196 2 0135 -- bracketright
-rB "
-a^ 333,750 2 0136 -- circumflex
-^ "
-_ 556,0,125 0 0137 -- underscore
-` 278,727 2 0140 -- quoteleft
-oq "
-a 556,546,14 0 0141 -- a
-b 611,718,14 2 0142 -- b
-c 556,546,14 0 0143 -- c
-d 611,718,14 2 0144 -- d
-e 556,546,14 0 0145 -- e
-f 333,727 2 0146 -- f
-g 611,546,217 1 0147 -- g
-h 611,718 2 0150 -- h
-i 278,725 2 0151 -- i
-j 278,725,214 3 0152 -- j
-k 556,718 2 0153 -- k
-l 278,718 2 0154 -- l
-m 889,546 0 0155 -- m
-n 611,546 0 0156 -- n
-o 611,546,14 0 0157 -- o
-p 611,546,207 1 0160 -- p
-q 611,546,207 1 0161 -- q
-r 389,546 0 0162 -- r
-s 556,546,14 0 0163 -- s
-t 333,676,6 2 0164 -- t
-u 611,532,14 0 0165 -- u
-v 556,532 0 0166 -- v
-w 778,532 0 0167 -- w
-x 556,532 0 0170 -- x
-y 556,532,214 1 0171 -- y
-z 500,532 0 0172 -- z
-lC 389,722,196 2 0173 -- braceleft
-{ "
-ba 280,737,19 2 0174 -- bar
-| "
-rC 389,722,196 2 0175 -- braceright
-} "
-a~ 333,737 2 0176 -- tilde
-~ "
-bq 278,127,146 0 0200 -- quotesinglbase
-Fo 556,484 0 0201 -- guillemotleft
-char171 "
-Fc 556,484 0 0202 -- guillemotright
-char187 "
-bu 350,524 0 0203 -- bullet
-Fn 556,737,210 3 0204 -- florin
-f/ 167,710,19 2 0205 -- fraction
-%0 1000,710,19 2 0206 -- perthousand
-dg 556,718,171 2 0207 -- dagger
-dd 556,718,171 2 0210 -- daggerdbl
-en 556,333 0 0211 -- endash
-em 1000,333 0 0212 -- emdash
-fi 611,727 2 0214 -- fi
-fl 611,727 2 0215 -- fl
-.i 278,532 0 0220 -- dotlessi
-ga 333,750 2 0222 -- grave
-a" 333,750 2 0223 -- hungarumlaut
-a. 333,729 2 0224 -- dotaccent
-ab 333,750 2 0225 -- breve
-ah 333,750 2 0226 -- caron
-ao 333,776 2 0227 -- ring
-ho 333,0,228 1 0230 -- ogonek
-lq 500,727 2 0231 -- quotedblleft
-rq 500,718 2 0232 -- quotedblright
-oe 944,546,14 0 0233 -- oe
-/l 278,718 2 0234 -- lslash
-Bq 500,127,146 0 0235 -- quotedblbase
-OE 1000,737,19 2 0236 -- OE
-/L 611,718 2 0237 -- Lslash
-r! 333,532,186 0 0241 -- exclamdown
-char161 "
-ct 556,628,118 0 0242 -- cent
-char162 "
-Po 556,718,16 2 0243 -- sterling
-char163 "
-Cs 556,636 0 0244 -- currency
-char164 "
-Ye 556,698 2 0245 -- yen
-char165 "
-bb 280,737,19 2 0246 -- brokenbar
-char166 "
-sc 556,727,184 2 0247 -- section
-char167 "
-ad 333,729 2 0250 -- dieresis
-char168 "
-co 737,737,19 2 0251 -- copyright
-char169 "
-Of 370,737 2 0252 -- ordfeminine
-char170 "
-fo 333,484 0 0253 -- guilsinglleft
-no 584,419 0 0254 -- logicalnot
-char172 "
-\- 584,309 0 0255 -- minus
-rg 737,737,19 2 0256 -- registered
-char174 "
-a- 333,678 2 0257 -- macron
-char175 "
-de 400,712 2 0260 -- degree
-char176 "
-char177 584,506 0 0261 -- plusminus
-S2 333,710 2 0262 -- twosuperior
-char178 "
-S3 333,710 2 0263 -- threesuperior
-char179 "
-aa 333,750 2 0264 -- acute
-char180 "
-char181 611,532,207 1 0265 -- mu
-ps 556,700,191 2 0266 -- paragraph
-char182 "
-pc 278,334 0 0267 -- periodcentered
-char183 "
-ac 333,0,228 1 0270 -- cedilla
-char184 "
-S1 333,710 2 0271 -- onesuperior
-char185 "
-Om 365,737 2 0272 -- ordmasculine
-char186 "
-fc 333,484 0 0273 -- guilsinglright
-14 834,710,19 2 0274 -- onequarter
-char188 "
-12 834,710,19 2 0275 -- onehalf
-char189 "
-34 834,710,19 2 0276 -- threequarters
-char190 "
-r? 611,532,195 0 0277 -- questiondown
-char191 "
-`A 722,936 2 0300 -- Agrave
-char192 "
-'A 722,936 2 0301 -- Aacute
-char193 "
-^A 722,936 2 0302 -- Acircumflex
-char194 "
-~A 722,923 2 0303 -- Atilde
-char195 "
-:A 722,915 2 0304 -- Adieresis
-char196 "
-oA 722,962 2 0305 -- Aring
-char197 "
-AE 1000,718 2 0306 -- AE
-char198 "
-,C 722,737,228 3 0307 -- Ccedilla
-char199 "
-`E 667,936 2 0310 -- Egrave
-char200 "
-'E 667,936 2 0311 -- Eacute
-char201 "
-^E 667,936 2 0312 -- Ecircumflex
-char202 "
-:E 667,915 2 0313 -- Edieresis
-char203 "
-`I 278,936 2 0314 -- Igrave
-char204 "
-'I 278,936 2 0315 -- Iacute
-char205 "
-^I 278,936 2 0316 -- Icircumflex
-char206 "
-:I 278,915 2 0317 -- Idieresis
-char207 "
--D 722,718 2 0320 -- Eth
-char208 "
-~N 722,923 2 0321 -- Ntilde
-char209 "
-`O 778,936,19 2 0322 -- Ograve
-char210 "
-'O 778,936,19 2 0323 -- Oacute
-char211 "
-^O 778,936,19 2 0324 -- Ocircumflex
-char212 "
-~O 778,923,19 2 0325 -- Otilde
-char213 "
-:O 778,915,19 2 0326 -- Odieresis
-char214 "
-char215 584,505 0 0327 -- multiply
-/O 778,745,27 2 0330 -- Oslash
-char216 "
-`U 722,936,19 2 0331 -- Ugrave
-char217 "
-'U 722,936,19 2 0332 -- Uacute
-char218 "
-^U 722,936,19 2 0333 -- Ucircumflex
-char219 "
-:U 722,915,19 2 0334 -- Udieresis
-char220 "
-'Y 667,936 2 0335 -- Yacute
-char221 "
-TP 667,718 2 0336 -- Thorn
-char222 "
-ss 611,731,14 2 0337 -- germandbls
-char223 "
-`a 556,750,14 2 0340 -- agrave
-char224 "
-'a 556,750,14 2 0341 -- aacute
-char225 "
-^a 556,750,14 2 0342 -- acircumflex
-char226 "
-~a 556,737,14 2 0343 -- atilde
-char227 "
-:a 556,729,14 2 0344 -- adieresis
-char228 "
-oa 556,776,14 2 0345 -- aring
-char229 "
-ae 889,546,14 0 0346 -- ae
-char230 "
-,c 556,546,228 1 0347 -- ccedilla
-char231 "
-`e 556,750,14 2 0350 -- egrave
-char232 "
-'e 556,750,14 2 0351 -- eacute
-char233 "
-^e 556,750,14 2 0352 -- ecircumflex
-char234 "
-:e 556,729,14 2 0353 -- edieresis
-char235 "
-`i 278,750 2 0354 -- igrave
-char236 "
-'i 278,750 2 0355 -- iacute
-char237 "
-^i 278,750 2 0356 -- icircumflex
-char238 "
-:i 278,729 2 0357 -- idieresis
-char239 "
-Sd 611,737,14 2 0360 -- eth
-char240 "
-~n 611,737 2 0361 -- ntilde
-char241 "
-`o 611,750,14 2 0362 -- ograve
-char242 "
-'o 611,750,14 2 0363 -- oacute
-char243 "
-^o 611,750,14 2 0364 -- ocircumflex
-char244 "
-~o 611,737,14 2 0365 -- otilde
-char245 "
-:o 611,729,14 2 0366 -- odieresis
-char246 "
-char247 584,548,42 0 0367 -- divide
-/o 611,560,29 0 0370 -- oslash
-char248 "
-`u 611,750,14 2 0371 -- ugrave
-char249 "
-'u 611,750,14 2 0372 -- uacute
-char250 "
-^u 611,750,14 2 0373 -- ucircumflex
-char251 "
-:u 611,729,14 2 0374 -- udieresis
-char252 "
-'y 556,750,214 3 0375 -- yacute
-char253 "
-Tp 611,718,208 3 0376 -- thorn
-char254 "
-:y 556,729,214 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/HBI b/contrib/groff/font/devps/HBI
deleted file mode 100644
index a12e389a7daa..000000000000
--- a/contrib/groff/font/devps/HBI
+++ /dev/null
@@ -1,562 +0,0 @@
-name HBI
-internalname Helvetica-BoldOblique
-slant 12
-spacewidth 278
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -30
-A w -30
-A v -40
-A u -30
-A Y -110
-A W -60
-A V -80
-A U -50
-A T -90
-A Q -40
-A O -40
-A G -50
-A C -40
-B U -10
-B A -30
-D . -30
-D , -30
-D Y -70
-D W -40
-D V -40
-D A -40
-F . -100
-F , -100
-F a -20
-F A -80
-J u -20
-J . -20
-J , -20
-J A -20
-K y -40
-K u -30
-K o -35
-K e -15
-K O -30
-L y -30
-L ' -140
-L cq -140
-L rq -140
-L Y -120
-L W -80
-L V -110
-L T -90
-O . -40
-O , -40
-O Y -70
-O X -50
-O W -50
-O V -50
-O T -40
-O A -50
-P . -120
-P o -40
-P e -30
-P , -120
-P a -30
-P A -100
-Q . 20
-Q , 20
-Q U -10
-R Y -50
-R W -40
-R V -50
-R U -20
-R T -20
-R O -20
-T y -60
-T w -60
-T u -90
-T ; -40
-T r -80
-T . -80
-T o -80
-T - -120
-T hy -120
-T char173 -120
-T e -60
-T , -80
-T : -40
-T a -80
-T O -40
-T A -90
-U . -30
-U , -30
-U A -50
-V u -60
-V ; -40
-V . -120
-V o -90
-V - -80
-V hy -80
-V char173 -80
-V e -50
-V , -120
-V : -40
-V a -60
-V O -50
-V G -50
-V A -80
-W y -20
-W u -45
-W ; -10
-W . -80
-W o -60
-W - -40
-W hy -40
-W char173 -40
-W e -35
-W , -80
-W : -10
-W a -40
-W O -20
-W A -60
-Y u -100
-Y ; -50
-Y . -100
-Y o -100
-Y e -80
-Y , -100
-Y : -50
-Y a -90
-Y O -70
-Y A -110
-a y -20
-a w -15
-a v -15
-a g -10
-b y -20
-b v -20
-b u -20
-b l -10
-c y -10
-c l -20
-c k -20
-c h -10
-, ' -120
-, cq -120
-, rq -120
-d y -15
-d w -15
-d v -15
-d d -10
-e y -15
-e x -15
-e w -15
-e v -15
-e . 20
-e , 10
-f ' 30
-f cq 30
-f rq 30
-f . -10
-f o -20
-f e -10
-f , -10
-g g -10
-g e 10
-h y -20
-k o -15
-l y -15
-l w -15
-m y -30
-m u -20
-n y -20
-n v -40
-n u -10
-o y -20
-o x -30
-o w -15
-o v -20
-p y -15
-. ' -120
-. cq -120
-. rq -120
-` ` -46
-` oq -46
-oq ` -46
-oq oq -46
-' v -20
-cq v -20
-' s -60
-cq s -60
-' r -40
-cq r -40
-' ' -46
-' cq -46
-cq ' -46
-cq cq -46
-' l -20
-cq l -20
-' d -80
-cq d -80
-r y 10
-r v 10
-r t 20
-r s -15
-r q -20
-r . -60
-r o -20
-r - -20
-r hy -20
-r char173 -20
-r g -15
-r d -20
-r , -60
-r c -20
-s w -15
-v . -80
-v o -30
-v , -80
-v a -20
-w . -40
-w o -20
-w , -40
-x e -10
-y . -80
-y o -25
-y e -10
-y , -80
-y a -30
-z e 10
-charset
-ha 584,698,0,57,-81,57 2 0000 -- asciicircum
-ti 584,343,0,43,-65,43 0 0001 -- asciitilde
-vS 667,936,19,101,-31,90 2 0002 -- Scaron
-vZ 611,936,0,176,25,90 2 0003 -- Zcaron
-vs 556,750,14,108,-13,90 2 0004 -- scaron
-vz 500,750,0,136,30,90 2 0005 -- zcaron
-:Y 667,915,0,189,-118,90 2 0006 -- Ydieresis
-tm 1000,718,0,159,-129,90 2 0007 -- trademark
-aq 238,718,0,133,-115,90 2 0010 -- quotesingle
-space 278 0 0040
-! 333,718,0,114,-44,90 2 0041 -- exclam
-" 474,718,0,105,-143,90 2 0042 -- quotedbl
-dq "
-# 556,698,0,138,-10,90 2 0043 -- numbersign
-sh "
-$ 556,775,115,116,-17,90 2 0044 -- dollar
-Do "
-% 889,710,19,62,-86,62 2 0045 -- percent
-& 722,718,19,60,-39,60 2 0046 -- ampersand
-' 278,718,0,134,-117,90 2 0047 -- quoteright
-cq "
-( 333,734,208,187,-26,90 3 0050 -- parenleft
-) 333,734,208,86,75,86 3 0051 -- parenright
-* 389,718,0,142,-96,90 2 0052 -- asterisk
-+ 584,506,0,76,-32,76 0 0053 -- plus
-, 278,146,168,17,22,17 0 0054 -- comma
-- 333,345,0,96,-23,90 0 0055 -- hyphen
-hy "
-char173 "
-. 278,146,0,17,-14,17 0 0056 -- period
-/ 278,737,19,240,87,90 2 0057 -- slash
-sl "
-0 556,710,19,111,-36,90 2 0060 -- zero
-1 556,710,0,23,-123,23 2 0061 -- one
-2 556,710,0,113,24,90 2 0062 -- two
-3 556,710,19,102,-15,90 2 0063 -- three
-4 556,710,0,92,-10,90 2 0064 -- four
-5 556,698,19,130,-14,90 2 0065 -- five
-6 556,710,19,113,-35,90 2 0066 -- six
-7 556,698,0,170,-75,90 2 0067 -- seven
-8 556,710,19,110,-19,90 2 0070 -- eight
-9 556,710,19,109,-28,90 2 0071 -- nine
-: 333,512,0,68,-42,68 0 0072 -- colon
-; 333,512,168,68,-6,68 0 0073 -- semicolon
-< 584,514,8,121,-32,90 0 0074 -- less
-= 584,419,0,99,-8,90 0 0075 -- equal
-> 584,514,8,75,14,75 0 0076 -- greater
-? 611,727,0,110,-115,90 2 0077 -- question
-@ 975,737,19,29,-136,29 2 0100 -- at
-at "
-A 722,718,0,30,30,30 2 0101 -- A
-B 722,718,0,92,-26,90 2 0102 -- B
-C 722,737,19,117,-57,90 2 0103 -- C
-D 722,718,0,105,-26,90 2 0104 -- D
-E 667,718,0,140,-26,90 2 0105 -- E
-F 611,718,0,179,-26,90 2 0106 -- F
-G 778,737,19,89,-58,89 2 0107 -- G
-H 722,718,0,132,-21,90 2 0110 -- H
-I 278,718,0,139,-14,90 2 0111 -- I
-J 556,718,18,131,-10,90 2 0112 -- J
-K 722,718,0,186,-37,90 2 0113 -- K
-L 611,718,0,50,-26,50 2 0114 -- L
-M 833,718,0,135,-19,90 2 0115 -- M
-N 722,718,0,135,-19,90 2 0116 -- N
-O 778,737,19,95,-57,90 2 0117 -- O
-P 667,718,0,121,-26,90 2 0120 -- P
-Q 778,737,52,95,-57,90 2 0121 -- Q
-R 722,718,0,106,-26,90 2 0122 -- R
-S 667,737,19,101,-31,90 2 0123 -- S
-T 611,718,0,190,-90,90 2 0124 -- T
-U 722,718,19,132,-66,90 2 0125 -- U
-V 667,718,0,184,-122,90 2 0126 -- V
-W 944,718,0,188,-119,90 2 0127 -- W
-X 667,718,0,174,36,90 2 0130 -- X
-Y 667,718,0,189,-118,90 2 0131 -- Y
-Z 611,718,0,176,25,90 2 0132 -- Z
-[ 333,722,196,179,29,90 2 0133 -- bracketleft
-lB "
-\ 278,737,19,79,-74,79 2 0134 -- backslash
-rs "
-] 333,722,196,140,68,90 2 0135 -- bracketright
-rB "
-a^ 333,750,0,188,-68,90 2 0136 -- circumflex
-^ "
-_ 556,0,125,34,77,34 0 0137 -- underscore
-` 278,727,0,133,-115,90 2 0140 -- quoteleft
-oq "
-a 556,546,14,77,-5,77 0 0141 -- a
-b 611,718,14,84,-11,84 2 0142 -- b
-c 556,546,14,93,-29,90 0 0143 -- c
-d 611,718,14,143,-32,90 2 0144 -- d
-e 556,546,14,87,-20,87 0 0145 -- e
-f 333,727,0,186,-37,90 2 0146 -- f
-g 611,546,217,105,12,90 1 0147 -- g
-h 611,718,0,68,-15,68 2 0150 -- h
-i 278,725,0,135,-19,90 2 0151 -- i
-j 278,725,214,135,92,90 3 0152 -- j
-k 556,718,0,164,-19,90 2 0153 -- k
-l 278,718,0,134,-19,90 2 0154 -- l
-m 889,546,0,70,-14,70 0 0155 -- m
-n 611,546,0,68,-15,68 0 0156 -- n
-o 611,546,14,82,-32,82 0 0157 -- o
-p 611,546,207,84,32,84 1 0160 -- p
-q 611,546,207,104,-30,90 1 0161 -- q
-r 389,546,0,150,-14,90 0 0162 -- r
-s 556,546,14,78,-13,78 0 0163 -- s
-t 333,676,6,139,-50,90 2 0164 -- t
-u 611,532,14,97,-48,90 0 0165 -- u
-v 556,532,0,150,-76,90 0 0166 -- v
-w 778,532,0,154,-73,90 0 0167 -- w
-x 556,532,0,142,35,90 0 0170 -- x
-y 556,532,214,146,8,90 1 0171 -- y
-z 500,532,0,133,30,90 0 0172 -- z
-lC 389,722,196,179,-44,90 2 0173 -- braceleft
-{ "
-ba 280,737,19,123,-30,90 2 0174 -- bar
-| "
-rC 389,722,196,68,68,68 2 0175 -- braceright
-} "
-a~ 333,737,0,224,-63,90 2 0176 -- tilde
-~ "
-bq 278,127,146,8,9,8 0 0200 -- quotesinglbase
-Fo 556,484,0,65,-85,65 0 0201 -- guillemotleft
-char171 "
-Fc 556,484,0,34,-54,34 0 0202 -- guillemotright
-char187 "
-bu 350,524,0,120,-33,90 0 0203 -- bullet
-Fn 556,737,210,163,100,90 3 0204 -- florin
-f/ 167,710,19,370,224,90 2 0205 -- fraction
-%0 1000,710,19,88,-26,88 2 0206 -- perthousand
-dg 556,718,171,120,-68,90 2 0207 -- dagger
-dd 556,718,171,122,4,90 2 0210 -- daggerdbl
-en 556,333,0,121,2,90 0 0211 -- endash
-em 1000,333,0,121,2,90 0 0212 -- emdash
-fi 611,727,0,135,-37,90 2 0214 -- fi
-fl 611,727,0,134,-37,90 2 0215 -- fl
-.i 278,532,0,94,-19,90 0 0220 -- dotlessi
-ga 333,750,0,70,-86,70 2 0222 -- grave
-a" 333,750,0,362,-87,90 2 0223 -- hungarumlaut
-a. 333,729,0,102,-185,90 2 0224 -- dotaccent
-ab 333,750,0,211,-106,90 2 0225 -- breve
-ah 333,750,0,219,-99,90 2 0226 -- caron
-ao 333,776,0,137,-150,90 2 0227 -- ring
-ho 333,0,228,0,9 1 0230 -- ogonek
-lq 500,727,0,138,-110,90 2 0231 -- quotedblleft
-rq 500,718,0,139,-112,90 2 0232 -- quotedblright
-oe 944,546,14,83,-32,83 0 0233 -- oe
-/l 278,718,0,179,10,90 2 0234 -- lslash
-Bq 500,127,146,13,14,13 0 0235 -- quotedblbase
-OE 1000,737,19,164,-49,90 2 0236 -- OE
-/L 611,718,0,50,16,50 2 0237 -- Lslash
-r! 333,532,186,70,0,70 0 0241 -- exclamdown
-char161 "
-ct 556,628,118,93,-29,90 0 0242 -- cent
-char162 "
-Po 556,718,16,129,0,90 2 0243 -- sterling
-char163 "
-Cs 556,636,0,174,23,90 0 0244 -- currency
-char164 "
-Ye 556,698,0,207,-10,90 2 0245 -- yen
-char165 "
-bb 280,737,19,123,-30,90 2 0246 -- brokenbar
-char166 "
-sc 556,727,184,92,-11,90 2 0247 -- section
-char167 "
-ad 333,729,0,199,-87,90 2 0250 -- dieresis
-char168 "
-co 737,737,19,148,-6,90 2 0251 -- copyright
-char169 "
-Of 370,737,0,145,-42,90 2 0252 -- ordfeminine
-char170 "
-fo 333,484,0,70,-80,70 0 0253 -- guilsinglleft
-no 584,419,0,99,-55,90 0 0254 -- logicalnot
-char172 "
-\- 584,309,0,76,-32,76 0 0255 -- minus
-rg 737,737,19,147,-5,90 2 0256 -- registered
-char174 "
-a- 333,678,0,200,-72,90 2 0257 -- macron
-char175 "
-de 400,712,0,117,-125,90 2 0260 -- degree
-char176 "
-char177 584,506,0,91,10,90 0 0261 -- plusminus
-S2 333,710,0,166,-19,90 2 0262 -- twosuperior
-char178 "
-S3 333,710,0,158,-41,90 2 0263 -- threesuperior
-char179 "
-aa 333,750,0,232,-186,90 2 0264 -- acute
-char180 "
-char181 611,532,207,97,28,90 1 0265 -- mu
-ps 556,700,191,182,-48,90 2 0266 -- paragraph
-char182 "
-pc 278,334,0,48,-60,48 0 0267 -- periodcentered
-char183 "
-ac 333,0,228,0,87 1 0270 -- cedilla
-char184 "
-S1 333,710,0,105,-98,90 2 0271 -- onesuperior
-char185 "
-Om 365,737,0,170,-42,90 2 0272 -- ordmasculine
-char186 "
-fc 333,484,0,39,-49,39 0 0273 -- guilsinglright
-14 834,710,19,22,-82,22 2 0274 -- onequarter
-char188 "
-12 834,710,19,74,-82,74 2 0275 -- onehalf
-char189 "
-34 834,710,19,55,-49,55 2 0276 -- threequarters
-char190 "
-r? 611,532,195,0,-3 0 0277 -- questiondown
-char191 "
-`A 722,936,0,30,30,30 2 0300 -- Agrave
-char192 "
-'A 722,936,0,78,30,78 2 0301 -- Aacute
-char193 "
-^A 722,936,0,34,30,34 2 0302 -- Acircumflex
-char194 "
-~A 722,923,0,69,30,69 2 0303 -- Atilde
-char195 "
-:A 722,915,0,44,30,44 2 0304 -- Adieresis
-char196 "
-oA 722,962,0,30,30,30 2 0305 -- Aring
-char197 "
-AE 1000,718,0,150,45,90 2 0306 -- AE
-char198 "
-,C 722,737,228,117,-57,90 3 0307 -- Ccedilla
-char199 "
-`E 667,936,0,140,-26,90 2 0310 -- Egrave
-char200 "
-'E 667,936,0,140,-26,90 2 0311 -- Eacute
-char201 "
-^E 667,936,0,140,-26,90 2 0312 -- Ecircumflex
-char202 "
-:E 667,915,0,140,-26,90 2 0313 -- Edieresis
-char203 "
-`I 278,936,0,139,-14,90 2 0314 -- Igrave
-char204 "
-'I 278,936,0,300,-14,90 2 0315 -- Iacute
-char205 "
-^I 278,936,0,256,-14,90 2 0316 -- Icircumflex
-char206 "
-:I 278,915,0,266,-14,90 2 0317 -- Idieresis
-char207 "
--D 722,718,0,105,-12,90 2 0320 -- Eth
-char208 "
-~N 722,923,0,135,-19,90 2 0321 -- Ntilde
-char209 "
-`O 778,936,19,95,-57,90 2 0322 -- Ograve
-char210 "
-'O 778,936,19,95,-57,90 2 0323 -- Oacute
-char211 "
-^O 778,936,19,95,-57,90 2 0324 -- Ocircumflex
-char212 "
-~O 778,923,19,95,-57,90 2 0325 -- Otilde
-char213 "
-:O 778,915,19,95,-57,90 2 0326 -- Odieresis
-char214 "
-char215 584,505,0,101,-7,90 0 0327 -- multiply
-/O 778,745,27,166,15,90 2 0330 -- Oslash
-char216 "
-`U 722,936,19,132,-66,90 2 0331 -- Ugrave
-char217 "
-'U 722,936,19,132,-66,90 2 0332 -- Uacute
-char218 "
-^U 722,936,19,132,-66,90 2 0333 -- Ucircumflex
-char219 "
-:U 722,915,19,132,-66,90 2 0334 -- Udieresis
-char220 "
-'Y 667,936,0,189,-118,90 2 0335 -- Yacute
-char221 "
-TP 667,718,0,99,-26,90 2 0336 -- Thorn
-char222 "
-ss 611,731,14,96,-19,90 2 0337 -- germandbls
-char223 "
-`a 556,750,14,77,-5,77 2 0340 -- agrave
-char224 "
-'a 556,750,14,121,-5,90 2 0341 -- aacute
-char225 "
-^a 556,750,14,77,-5,77 2 0342 -- acircumflex
-char226 "
-~a 556,737,14,113,-5,90 2 0343 -- atilde
-char227 "
-:a 556,729,14,88,-5,88 2 0344 -- adieresis
-char228 "
-oa 556,776,14,77,-5,77 2 0345 -- aring
-char229 "
-ae 889,546,14,84,-6,84 0 0346 -- ae
-char230 "
-,c 556,546,228,93,-29,90 1 0347 -- ccedilla
-char231 "
-`e 556,750,14,87,-20,87 2 0350 -- egrave
-char232 "
-'e 556,750,14,121,-20,90 2 0351 -- eacute
-char233 "
-^e 556,750,14,87,-20,87 2 0352 -- ecircumflex
-char234 "
-:e 556,729,14,88,-20,88 2 0353 -- edieresis
-char235 "
-`i 278,750,0,98,-19,90 2 0354 -- igrave
-char236 "
-'i 278,750,0,260,-19,90 2 0355 -- iacute
-char237 "
-^i 278,750,0,216,-19,90 2 0356 -- icircumflex
-char238 "
-:i 278,729,0,227,-19,90 2 0357 -- idieresis
-char239 "
-Sd 611,737,14,109,-32,90 2 0360 -- eth
-char240 "
-~n 611,737,0,85,-15,85 2 0361 -- ntilde
-char241 "
-`o 611,750,14,82,-32,82 2 0362 -- ograve
-char242 "
-'o 611,750,14,93,-32,90 2 0363 -- oacute
-char243 "
-^o 611,750,14,82,-32,82 2 0364 -- ocircumflex
-char244 "
-~o 611,737,14,85,-32,85 2 0365 -- otilde
-char245 "
-:o 611,729,14,82,-32,82 2 0366 -- odieresis
-char246 "
-char247 584,548,42,76,-32,76 0 0367 -- divide
-/o 611,560,29,140,28,90 0 0370 -- oslash
-char248 "
-`u 611,750,14,97,-48,90 2 0371 -- ugrave
-char249 "
-'u 611,750,14,97,-48,90 2 0372 -- uacute
-char250 "
-^u 611,750,14,97,-48,90 2 0373 -- ucircumflex
-char251 "
-:u 611,729,14,97,-48,90 2 0374 -- udieresis
-char252 "
-'y 556,750,214,146,8,90 3 0375 -- yacute
-char253 "
-Tp 611,718,208,84,32,84 3 0376 -- thorn
-char254 "
-:y 556,729,214,146,8,90 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/HI b/contrib/groff/font/devps/HI
deleted file mode 100644
index 1846122f9581..000000000000
--- a/contrib/groff/font/devps/HI
+++ /dev/null
@@ -1,630 +0,0 @@
-name HI
-internalname Helvetica-Oblique
-slant 12
-spacewidth 278
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -40
-A w -40
-A v -40
-A u -30
-A Y -100
-A W -50
-A V -70
-A U -50
-A T -120
-A Q -30
-A O -30
-A G -30
-A C -30
-B . -20
-B , -20
-B U -10
-C . -30
-C , -30
-D . -70
-D , -70
-D Y -90
-D W -40
-D V -70
-D A -40
-F r -45
-F . -150
-F o -30
-F e -30
-F , -150
-F a -50
-F A -80
-J u -20
-J . -30
-J , -30
-J a -20
-J A -20
-K y -50
-K u -30
-K o -40
-K e -40
-K O -50
-L y -30
-L ' -160
-L cq -160
-L rq -140
-L Y -140
-L W -70
-L V -110
-L T -110
-O . -40
-O , -40
-O Y -70
-O X -60
-O W -30
-O V -50
-O T -40
-O A -20
-P . -180
-P o -50
-P e -50
-P , -180
-P a -40
-P A -120
-Q U -10
-R Y -50
-R W -30
-R V -50
-R U -40
-R T -30
-R O -20
-S . -20
-S , -20
-T y -120
-T w -120
-T u -120
-T ; -20
-T r -120
-T . -120
-T o -120
-T - -140
-T hy -140
-T char173 -140
-T e -120
-T , -120
-T : -20
-T a -120
-T O -40
-T A -120
-U . -40
-U , -40
-U A -40
-V u -70
-V ; -40
-V . -125
-V o -80
-V - -80
-V hy -80
-V char173 -80
-V e -80
-V , -125
-V : -40
-V a -70
-V O -40
-V G -40
-V A -80
-W y -20
-W u -30
-W . -80
-W o -30
-W - -40
-W hy -40
-W char173 -40
-W e -30
-W , -80
-W a -40
-W O -20
-W A -50
-Y u -110
-Y ; -60
-Y . -140
-Y o -140
-Y i -20
-Y - -140
-Y hy -140
-Y char173 -140
-Y e -140
-Y , -140
-Y : -60
-Y a -140
-Y O -85
-Y A -110
-a y -30
-a w -20
-a v -20
-b y -20
-b v -20
-b u -20
-b . -40
-b l -20
-b , -40
-b b -10
-c k -20
-c , -15
-, ' -100
-, cq -100
-, rq -100
-e y -20
-e x -30
-e w -20
-e v -30
-e . -15
-e , -15
-f ' 50
-f cq 50
-f rq 60
-f . -30
-f o -30
-f e -30
-f .i -28
-f , -30
-f a -30
-g r -10
-h y -30
-k o -20
-k e -20
-m y -15
-m u -10
-n y -15
-n v -20
-n u -10
-o y -30
-o x -30
-o w -15
-o v -15
-o . -40
-o , -40
-/o z -55
-char248 z -55
-/o y -70
-char248 y -70
-/o x -85
-char248 x -85
-/o w -70
-char248 w -70
-/o v -70
-char248 v -70
-/o u -55
-char248 u -55
-/o t -55
-char248 t -55
-/o s -55
-char248 s -55
-/o r -55
-char248 r -55
-/o q -55
-char248 q -55
-/o . -95
-char248 . -95
-/o p -55
-char248 p -55
-/o o -55
-char248 o -55
-/o n -55
-char248 n -55
-/o m -55
-char248 m -55
-/o l -55
-char248 l -55
-/o k -55
-char248 k -55
-/o j -55
-char248 j -55
-/o i -55
-char248 i -55
-/o h -55
-char248 h -55
-/o g -55
-char248 g -55
-/o f -55
-char248 f -55
-/o e -55
-char248 e -55
-/o d -55
-char248 d -55
-/o , -95
-char248 , -95
-/o c -55
-char248 c -55
-/o b -55
-char248 b -55
-/o a -55
-char248 a -55
-p y -30
-p . -35
-p , -35
-. ' -100
-. cq -100
-. rq -100
-` ` -57
-` oq -57
-oq ` -57
-oq oq -57
-' s -50
-cq s -50
-' r -50
-cq r -50
-' ' -57
-' cq -57
-cq ' -57
-cq cq -57
-' d -50
-cq d -50
-r y 30
-r v 30
-r u 15
-r t 40
-r ; 30
-r . -50
-r p 30
-r n 25
-r m 25
-r l 15
-r k 15
-r i 15
-r , -50
-r : 30
-r a -10
-s w -30
-s . -15
-s , -15
-v . -80
-v o -25
-v e -25
-v , -80
-v a -25
-w . -60
-w o -10
-w e -10
-w , -60
-w a -15
-x e -30
-y . -100
-y o -20
-y e -20
-y , -100
-y a -20
-z o -15
-z e -15
-charset
-ha 469,688,0,120,8,89 2 0000 -- asciicircum
-ti 584,326,0,46,-61,46 0 0001 -- asciitilde
-vS 667,929,19,96,-40,89 2 0002 -- Scaron
-vZ 611,929,0,180,27,89 2 0003 -- Zcaron
-vs 500,734,15,102,-13,89 2 0004 -- scaron
-vz 500,734,0,121,19,89 2 0005 -- zcaron
-:Y 667,901,0,189,-117,89 2 0006 -- Ydieresis
-tm 1000,718,0,106,-136,89 2 0007 -- trademark
-aq 191,718,0,144,-107,89 2 0010 -- quotesingle
-space 278 0 0040
-! 278,718,0,112,-40,89 2 0041 -- exclam
-" 355,718,0,133,-118,89 2 0042 -- quotedbl
-dq "
-# 556,688,0,125,-23,89 2 0043 -- numbersign
-sh "
-$ 556,775,115,111,-19,89 2 0044 -- dollar
-Do "
-% 889,703,19,50,-97,50 2 0045 -- percent
-& 667,718,15,30,-27,30 2 0046 -- ampersand
-' 222,718,0,138,-101,89 2 0047 -- quoteright
-cq "
-( 333,733,207,171,-58,89 3 0050 -- parenleft
-) 333,733,207,54,59,54 3 0051 -- parenright
-* 389,718,0,136,-115,89 2 0052 -- asterisk
-+ 584,505,0,72,-35,72 0 0053 -- plus
-, 278,106,147,0,-6 0 0054 -- comma
-- 333,322,0,74,-43,74 0 0055 -- hyphen
-hy "
-char173 "
-. 278,106,0,0,-37 0 0056 -- period
-/ 278,737,19,224,71,89 2 0057 -- slash
-sl "
-0 556,703,19,102,-43,89 2 0060 -- zero
-1 556,703,0,2,-157,2 2 0061 -- one
-2 556,703,0,111,24,89 2 0062 -- two
-3 556,703,19,104,-25,89 2 0063 -- three
-4 556,703,0,70,-11,70 2 0064 -- four
-5 556,688,19,115,-18,89 2 0065 -- five
-6 556,703,19,109,-41,89 2 0066 -- six
-7 556,688,0,163,-87,89 2 0067 -- seven
-8 556,703,19,101,-24,89 2 0070 -- eight
-9 556,703,19,103,-32,89 2 0071 -- nine
-: 278,516,0,73,-37,73 0 0072 -- colon
-; 278,516,147,73,-6,73 0 0073 -- semicolon
-< 584,495,0,107,-44,89 0 0074 -- less
-= 584,390,0,94,-13,89 0 0075 -- equal
-> 584,495,0,63,0,63 0 0076 -- greater
-? 556,727,0,104,-111,89 2 0077 -- question
-@ 1015,737,19,0,-165 2 0100 -- at
-at "
-A 667,718,0,37,36,37 2 0101 -- A
-B 667,718,0,95,-24,89 2 0102 -- B
-C 722,737,19,110,-58,89 2 0103 -- C
-D 722,718,0,92,-31,89 2 0104 -- D
-E 667,718,0,145,-36,89 2 0105 -- E
-F 611,718,0,175,-36,89 2 0106 -- F
-G 778,737,19,71,-61,71 2 0107 -- G
-H 722,718,0,127,-27,89 2 0110 -- H
-I 278,718,0,113,-41,89 2 0111 -- I
-J 500,718,19,131,3,89 2 0112 -- J
-K 667,718,0,191,-26,89 2 0113 -- K
-L 556,718,0,49,-26,49 2 0114 -- L
-M 833,718,0,131,-23,89 2 0115 -- M
-N 722,718,0,127,-26,89 2 0116 -- N
-O 778,737,19,98,-55,89 2 0117 -- O
-P 667,718,0,120,-36,89 2 0120 -- P
-Q 778,737,56,98,-55,89 2 0121 -- Q
-R 722,718,0,101,-38,89 2 0122 -- R
-S 667,737,19,96,-40,89 2 0123 -- S
-T 611,718,0,189,-98,89 2 0124 -- T
-U 722,718,19,125,-73,89 2 0125 -- U
-V 667,718,0,183,-123,89 2 0126 -- V
-W 944,718,0,187,-119,89 2 0127 -- W
-X 667,718,0,173,31,89 2 0130 -- X
-Y 667,718,0,189,-117,89 2 0131 -- Y
-Z 611,718,0,180,27,89 2 0132 -- Z
-[ 278,722,196,175,29,89 2 0133 -- bracketleft
-lB "
-\ 278,737,19,63,-90,63 2 0134 -- backslash
-rs "
-] 278,722,196,140,64,89 2 0135 -- bracketright
-rB "
-a^ 333,734,0,155,-97,89 2 0136 -- circumflex
-^ "
-_ 556,0,125,34,77,34 0 0137 -- underscore
-` 222,725,0,151,-115,89 2 0140 -- quoteleft
-oq "
-a 556,538,15,53,-11,53 0 0141 -- a
-b 556,718,15,78,-8,78 2 0142 -- b
-c 500,538,15,103,-24,89 0 0143 -- c
-d 556,718,15,146,-34,89 2 0144 -- d
-e 556,538,15,72,-34,72 0 0145 -- e
-f 278,728,0,188,-36,89 2 0146 -- f
-g 556,538,220,104,8,89 1 0147 -- g
-h 556,718,0,67,-15,67 2 0150 -- h
-i 222,718,0,136,-17,89 2 0151 -- i
-j 222,718,210,136,110,89 3 0152 -- j
-k 500,718,0,150,-17,89 2 0153 -- k
-l 222,718,0,136,-17,89 2 0154 -- l
-m 833,538,0,69,-15,69 0 0155 -- m
-n 556,538,0,67,-15,67 0 0156 -- n
-o 556,538,14,79,-33,79 0 0157 -- o
-p 556,538,207,78,36,78 1 0160 -- p
-q 556,538,207,99,-34,89 1 0161 -- q
-r 333,538,0,163,-27,89 0 0162 -- r
-s 500,538,15,79,-13,79 0 0163 -- s
-t 278,669,7,140,-52,89 2 0164 -- t
-u 556,523,15,94,-44,89 0 0165 -- u
-v 500,523,0,153,-69,89 0 0166 -- v
-w 722,523,0,148,-75,89 0 0167 -- w
-x 500,523,0,144,39,89 0 0170 -- x
-y 500,523,214,150,35,89 1 0171 -- y
-z 500,523,0,121,19,89 0 0172 -- z
-lC 334,722,196,161,-42,89 2 0173 -- braceleft
-{ "
-ba 260,737,19,114,-40,89 2 0174 -- bar
-| "
-rC 334,722,196,70,50,70 2 0175 -- braceright
-} "
-a~ 333,722,0,207,-75,89 2 0176 -- tilde
-~ "
-bq 222,106,149,8,29,8 0 0200 -- quotesinglbase
-Fo 556,446,0,48,-96,48 0 0201 -- guillemotleft
-char171 "
-Fc 556,446,0,22,-70,22 0 0202 -- guillemotright
-char187 "
-bu 350,517,0,113,-41,89 0 0203 -- bullet
-Fn 556,737,207,148,102,89 3 0204 -- florin
-f/ 167,703,19,365,220,89 2 0205 -- fraction
-%0 1000,703,19,79,-38,79 2 0206 -- perthousand
-dg 556,718,159,116,-85,89 2 0207 -- dagger
-dd 556,718,159,117,-2,89 2 0210 -- daggerdbl
-en 556,313,0,117,-1,89 0 0211 -- endash
-em 1000,313,0,117,-1,89 0 0212 -- emdash
-fi 500,728,0,137,-36,89 2 0214 -- fi
-fl 500,728,0,135,-36,89 2 0215 -- fl
-.i 278,523,0,66,-45,66 0 0220 -- dotlessi
-ga 333,734,0,54,-120,54 2 0222 -- grave
-a" 333,734,0,282,-107,89 2 0223 -- hungarumlaut
-a. 333,706,0,79,-199,79 2 0224 -- dotaccent
-ab 333,731,0,193,-117,89 2 0225 -- breve
-ah 333,734,0,185,-127,89 2 0226 -- caron
-ao 333,756,0,119,-164,89 2 0227 -- ring
-ho 333,0,225,0,7 1 0230 -- ogonek
-lq 333,725,0,178,-88,89 2 0231 -- quotedblleft
-rq 333,718,0,165,-74,89 2 0232 -- quotedblright
-oe 944,538,15,70,-33,70 0 0233 -- oe
-/l 222,718,0,175,9,89 2 0234 -- lslash
-Bq 333,106,149,35,56,35 0 0235 -- quotedblbase
-OE 1000,737,19,166,-48,89 2 0236 -- OE
-/L 556,718,0,49,9,49 2 0237 -- Lslash
-r! 333,523,195,43,-27,43 0 0241 -- exclamdown
-char161 "
-ct 556,623,115,78,-45,78 0 0242 -- cent
-char162 "
-Po 556,718,16,128,1,89 2 0243 -- sterling
-char163 "
-Cs 556,603,0,140,-10,89 0 0244 -- currency
-char164 "
-Ye 556,688,0,193,-31,89 2 0245 -- yen
-char165 "
-bb 260,737,19,114,-40,89 2 0246 -- brokenbar
-char166 "
-sc 556,737,191,78,-26,78 2 0247 -- section
-char167 "
-ad 333,706,0,160,-118,89 2 0250 -- dieresis
-char168 "
-co 737,737,19,150,-4,89 2 0251 -- copyright
-char169 "
-Of 370,737,0,129,-50,89 2 0252 -- ordfeminine
-char170 "
-fo 333,446,0,57,-87,57 0 0253 -- guilsinglleft
-no 584,390,0,94,-56,89 0 0254 -- logicalnot
-char172 "
-\- 584,289,0,72,-35,72 0 0255 -- minus
-rg 737,737,19,150,-4,89 2 0256 -- registered
-char174 "
-a- 333,684,0,185,-93,89 2 0257 -- macron
-char175 "
-de 400,703,0,118,-119,89 2 0260 -- degree
-char176 "
-char177 584,506,0,84,11,84 0 0261 -- plusminus
-S2 333,703,0,166,-14,89 2 0262 -- twosuperior
-char178 "
-S3 333,703,0,153,-40,89 2 0263 -- threesuperior
-char179 "
-aa 333,734,0,192,-198,89 2 0264 -- acute
-char180 "
-char181 556,523,207,94,26,89 1 0265 -- mu
-ps 537,718,173,163,-76,89 2 0266 -- paragraph
-char182 "
-pc 278,315,0,29,-79,29 0 0267 -- periodcentered
-char183 "
-ac 333,0,225,0,48 1 0270 -- cedilla
-char184 "
-S1 333,703,0,88,-116,88 2 0271 -- onesuperior
-char185 "
-Om 365,737,0,153,-50,89 2 0272 -- ordmasculine
-char186 "
-fc 333,446,0,31,-61,31 0 0273 -- guilsinglright
-14 834,703,19,18,-100,18 2 0274 -- onequarter
-char188 "
-12 834,703,19,55,-64,55 2 0275 -- onehalf
-char189 "
-34 834,703,19,77,-80,77 2 0276 -- threequarters
-char190 "
-r? 611,525,201,0,-35 0 0277 -- questiondown
-char191 "
-`A 667,929,0,37,36,37 2 0300 -- Agrave
-char192 "
-'A 667,929,0,66,36,66 2 0301 -- Aacute
-char193 "
-^A 667,929,0,37,36,37 2 0302 -- Acircumflex
-char194 "
-~A 667,917,0,82,36,82 2 0303 -- Atilde
-char195 "
-:A 667,901,0,37,36,37 2 0304 -- Adieresis
-char196 "
-oA 667,931,0,37,36,37 2 0305 -- Aring
-char197 "
-AE 1000,718,0,147,42,89 2 0306 -- AE
-char198 "
-,C 722,737,225,110,-58,89 3 0307 -- Ccedilla
-char199 "
-`E 667,929,0,145,-36,89 2 0310 -- Egrave
-char200 "
-'E 667,929,0,145,-36,89 2 0311 -- Eacute
-char201 "
-^E 667,929,0,145,-36,89 2 0312 -- Ecircumflex
-char202 "
-:E 667,901,0,145,-36,89 2 0313 -- Edieresis
-char203 "
-`I 278,929,0,123,-41,89 2 0314 -- Igrave
-char204 "
-'I 278,929,0,261,-41,89 2 0315 -- Iacute
-char205 "
-^I 278,929,0,224,-41,89 2 0316 -- Icircumflex
-char206 "
-:I 278,901,0,230,-41,89 2 0317 -- Idieresis
-char207 "
--D 722,718,0,92,-19,89 2 0320 -- Eth
-char208 "
-~N 722,917,0,127,-26,89 2 0321 -- Ntilde
-char209 "
-`O 778,929,19,98,-55,89 2 0322 -- Ograve
-char210 "
-'O 778,929,19,98,-55,89 2 0323 -- Oacute
-char211 "
-^O 778,929,19,98,-55,89 2 0324 -- Ocircumflex
-char212 "
-~O 778,917,19,98,-55,89 2 0325 -- Otilde
-char213 "
-:O 778,901,19,98,-55,89 2 0326 -- Odieresis
-char214 "
-char215 584,506,0,108,0,89 0 0327 -- multiply
-/O 778,737,19,162,7,89 2 0330 -- Oslash
-char216 "
-`U 722,929,19,125,-73,89 2 0331 -- Ugrave
-char217 "
-'U 722,929,19,125,-73,89 2 0332 -- Uacute
-char218 "
-^U 722,929,19,125,-73,89 2 0333 -- Ucircumflex
-char219 "
-:U 722,901,19,125,-73,89 2 0334 -- Udieresis
-char220 "
-'Y 667,929,0,189,-117,89 2 0335 -- Yacute
-char221 "
-TP 667,718,0,95,-36,89 2 0336 -- Thorn
-char222 "
-ss 611,728,15,97,-17,89 2 0337 -- germandbls
-char223 "
-`a 556,734,15,53,-11,53 2 0340 -- agrave
-char224 "
-'a 556,734,15,81,-11,81 2 0341 -- aacute
-char225 "
-^a 556,734,15,53,-11,53 2 0342 -- acircumflex
-char226 "
-~a 556,722,15,86,-11,86 2 0343 -- atilde
-char227 "
-:a 556,706,15,53,-11,53 2 0344 -- adieresis
-char228 "
-oa 556,756,15,53,-11,53 2 0345 -- aring
-char229 "
-ae 889,538,15,70,-11,70 0 0346 -- ae
-char230 "
-,c 500,538,225,103,-24,89 1 0347 -- ccedilla
-char231 "
-`e 556,734,15,72,-34,72 2 0350 -- egrave
-char232 "
-'e 556,734,15,81,-34,81 2 0351 -- eacute
-char233 "
-^e 556,734,15,72,-34,72 2 0352 -- ecircumflex
-char234 "
-:e 556,706,15,72,-34,72 2 0353 -- edieresis
-char235 "
-`i 278,734,0,82,-45,82 2 0354 -- igrave
-char236 "
-'i 278,734,0,220,-45,89 2 0355 -- iacute
-char237 "
-^i 278,734,0,183,-45,89 2 0356 -- icircumflex
-char238 "
-:i 278,706,0,188,-45,89 2 0357 -- idieresis
-char239 "
-Sd 556,737,15,111,-31,89 2 0360 -- eth
-char240 "
-~n 556,722,0,86,-15,86 2 0361 -- ntilde
-char241 "
-`o 556,734,14,79,-33,79 2 0362 -- ograve
-char242 "
-'o 556,734,14,81,-33,81 2 0363 -- oacute
-char243 "
-^o 556,734,14,79,-33,79 2 0364 -- ocircumflex
-char244 "
-~o 556,722,14,96,-33,89 2 0365 -- otilde
-char245 "
-:o 556,706,14,79,-33,79 2 0366 -- odieresis
-char246 "
-char247 584,524,19,72,-35,72 0 0367 -- divide
-/o 611,545,22,86,21,86 0 0370 -- oslash
-char248 "
-`u 556,734,15,94,-44,89 2 0371 -- ugrave
-char249 "
-'u 556,734,15,94,-44,89 2 0372 -- uacute
-char250 "
-^u 556,734,15,94,-44,89 2 0373 -- ucircumflex
-char251 "
-:u 556,706,15,94,-44,89 2 0374 -- udieresis
-char252 "
-'y 500,734,214,150,35,89 3 0375 -- yacute
-char253 "
-Tp 556,718,207,78,36,78 3 0376 -- thorn
-char254 "
-:y 500,706,214,150,35,89 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/HNB b/contrib/groff/font/devps/HNB
deleted file mode 100644
index ded481586b64..000000000000
--- a/contrib/groff/font/devps/HNB
+++ /dev/null
@@ -1,561 +0,0 @@
-name HNB
-internalname Helvetica-Narrow-Bold
-spacewidth 228
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -24
-A w -24
-A v -32
-A u -24
-A Y -89
-A W -48
-A V -65
-A U -40
-A T -73
-A Q -32
-A O -32
-A G -40
-A C -32
-B U -7
-B A -24
-D . -24
-D , -24
-D Y -56
-D W -32
-D V -32
-D A -32
-F . -81
-F , -81
-F a -15
-F A -65
-J u -15
-J . -15
-J , -15
-J A -15
-K y -32
-K u -24
-K o -28
-K e -11
-K O -24
-L y -24
-L ' -114
-L cq -114
-L rq -114
-L Y -97
-L W -65
-L V -89
-L T -73
-O . -32
-O , -32
-O Y -56
-O X -40
-O W -40
-O V -40
-O T -32
-O A -40
-P . -97
-P o -32
-P e -24
-P , -97
-P a -24
-P A -81
-Q . 16
-Q , 16
-Q U -7
-R Y -40
-R W -32
-R V -40
-R U -15
-R T -15
-R O -15
-T y -48
-T w -48
-T u -73
-T ; -32
-T r -65
-T . -65
-T o -65
-T - -97
-T hy -97
-T char173 -97
-T e -48
-T , -65
-T : -32
-T a -65
-T O -32
-T A -73
-U . -24
-U , -24
-U A -40
-V u -48
-V ; -32
-V . -97
-V o -73
-V - -65
-V hy -65
-V char173 -65
-V e -40
-V , -97
-V : -32
-V a -48
-V O -40
-V G -40
-V A -65
-W y -15
-W u -36
-W ; -7
-W . -65
-W o -48
-W - -32
-W hy -32
-W char173 -32
-W e -28
-W , -65
-W : -7
-W a -32
-W O -15
-W A -48
-Y u -81
-Y ; -40
-Y . -81
-Y o -81
-Y e -65
-Y , -81
-Y : -40
-Y a -73
-Y O -56
-Y A -89
-a y -15
-a w -11
-a v -11
-a g -7
-b y -15
-b v -15
-b u -15
-b l -7
-c y -7
-c l -15
-c k -15
-c h -7
-, ' -97
-, cq -97
-, rq -97
-d y -11
-d w -11
-d v -11
-d d -7
-e y -11
-e x -11
-e w -11
-e v -11
-e . 16
-e , 8
-f ' 25
-f cq 25
-f rq 25
-f . -7
-f o -15
-f e -7
-f , -7
-g g -7
-g e 8
-h y -15
-k o -11
-l y -11
-l w -11
-m y -24
-m u -15
-n y -15
-n v -32
-n u -7
-o y -15
-o x -24
-o w -11
-o v -15
-p y -11
-. ' -97
-. cq -97
-. rq -97
-` ` -37
-` oq -37
-oq ` -37
-oq oq -37
-' v -15
-cq v -15
-' s -48
-cq s -48
-' r -32
-cq r -32
-' ' -37
-' cq -37
-cq ' -37
-cq cq -37
-' l -15
-cq l -15
-' d -65
-cq d -65
-r y 8
-r v 8
-r t 16
-r s -11
-r q -15
-r . -48
-r o -15
-r - -15
-r hy -15
-r char173 -15
-r g -11
-r d -15
-r , -48
-r c -15
-s w -11
-v . -65
-v o -24
-v , -65
-v a -15
-w . -32
-w o -15
-w , -32
-x e -7
-y . -65
-y o -20
-y e -7
-y , -65
-y a -24
-z e 8
-charset
-ha 479,698 2 0000 -- asciicircum
-ti 479,343 0 0001 -- asciitilde
-vS 547,936,19 2 0002 -- Scaron
-vZ 501,936 2 0003 -- Zcaron
-vs 456,750,14 2 0004 -- scaron
-vz 410,750 2 0005 -- zcaron
-:Y 547,915 2 0006 -- Ydieresis
-tm 820,718 2 0007 -- trademark
-aq 195,718 2 0010 -- quotesingle
-space 228 0 0040
-! 273,718 2 0041 -- exclam
-" 389,718 2 0042 -- quotedbl
-dq "
-# 456,698 2 0043 -- numbersign
-sh "
-$ 456,775,115 2 0044 -- dollar
-Do "
-% 729,710,19 2 0045 -- percent
-& 592,718,19 2 0046 -- ampersand
-' 228,718 2 0047 -- quoteright
-cq "
-( 273,734,208 3 0050 -- parenleft
-) 273,734,208 3 0051 -- parenright
-* 319,718 2 0052 -- asterisk
-+ 479,506 0 0053 -- plus
-, 228,146,168 0 0054 -- comma
-- 273,345 0 0055 -- hyphen
-hy "
-char173 "
-. 228,146 0 0056 -- period
-/ 228,737,19 2 0057 -- slash
-sl "
-0 456,710,19 2 0060 -- zero
-1 456,710 2 0061 -- one
-2 456,710 2 0062 -- two
-3 456,710,19 2 0063 -- three
-4 456,710 2 0064 -- four
-5 456,698,19 2 0065 -- five
-6 456,710,19 2 0066 -- six
-7 456,698 2 0067 -- seven
-8 456,710,19 2 0070 -- eight
-9 456,710,19 2 0071 -- nine
-: 273,512 0 0072 -- colon
-; 273,512,168 0 0073 -- semicolon
-< 479,514,8 0 0074 -- less
-= 479,419 0 0075 -- equal
-> 479,514,8 0 0076 -- greater
-? 501,727 2 0077 -- question
-@ 800,737,19 2 0100 -- at
-at "
-A 592,718 2 0101 -- A
-B 592,718 2 0102 -- B
-C 592,737,19 2 0103 -- C
-D 592,718 2 0104 -- D
-E 547,718 2 0105 -- E
-F 501,718 2 0106 -- F
-G 638,737,19 2 0107 -- G
-H 592,718 2 0110 -- H
-I 228,718 2 0111 -- I
-J 456,718,18 2 0112 -- J
-K 592,718 2 0113 -- K
-L 501,718 2 0114 -- L
-M 683,718 2 0115 -- M
-N 592,718 2 0116 -- N
-O 638,737,19 2 0117 -- O
-P 547,718 2 0120 -- P
-Q 638,737,52 2 0121 -- Q
-R 592,718 2 0122 -- R
-S 547,737,19 2 0123 -- S
-T 501,718 2 0124 -- T
-U 592,718,19 2 0125 -- U
-V 547,718 2 0126 -- V
-W 774,718 2 0127 -- W
-X 547,718 2 0130 -- X
-Y 547,718 2 0131 -- Y
-Z 501,718 2 0132 -- Z
-[ 273,722,196 2 0133 -- bracketleft
-lB "
-\ 228,737,19 2 0134 -- backslash
-rs "
-] 273,722,196 2 0135 -- bracketright
-rB "
-a^ 273,750 2 0136 -- circumflex
-^ "
-_ 456,0,125 0 0137 -- underscore
-` 228,727 2 0140 -- quoteleft
-oq "
-a 456,546,14 0 0141 -- a
-b 501,718,14 2 0142 -- b
-c 456,546,14 0 0143 -- c
-d 501,718,14 2 0144 -- d
-e 456,546,14 0 0145 -- e
-f 273,727 2 0146 -- f
-g 501,546,217 1 0147 -- g
-h 501,718 2 0150 -- h
-i 228,725 2 0151 -- i
-j 228,725,214 3 0152 -- j
-k 456,718 2 0153 -- k
-l 228,718 2 0154 -- l
-m 729,546 0 0155 -- m
-n 501,546 0 0156 -- n
-o 501,546,14 0 0157 -- o
-p 501,546,207 1 0160 -- p
-q 501,546,207 1 0161 -- q
-r 319,546 0 0162 -- r
-s 456,546,14 0 0163 -- s
-t 273,676,6 2 0164 -- t
-u 501,532,14 0 0165 -- u
-v 456,532 0 0166 -- v
-w 638,532 0 0167 -- w
-x 456,532 0 0170 -- x
-y 456,532,214 1 0171 -- y
-z 410,532 0 0172 -- z
-lC 319,722,196 2 0173 -- braceleft
-{ "
-ba 230,737,19 2 0174 -- bar
-| "
-rC 319,722,196 2 0175 -- braceright
-} "
-a~ 273,737 2 0176 -- tilde
-~ "
-bq 228,127,146 0 0200 -- quotesinglbase
-Fo 456,484 0 0201 -- guillemotleft
-char171 "
-Fc 456,484 0 0202 -- guillemotright
-char187 "
-bu 287,524 0 0203 -- bullet
-Fn 456,737,210 3 0204 -- florin
-f/ 137,710,19 2 0205 -- fraction
-%0 820,710,19 2 0206 -- perthousand
-dg 456,718,171 2 0207 -- dagger
-dd 456,718,171 2 0210 -- daggerdbl
-en 456,333 0 0211 -- endash
-em 820,333 0 0212 -- emdash
-fi 501,727 2 0214 -- fi
-fl 501,727 2 0215 -- fl
-.i 228,532 0 0220 -- dotlessi
-ga 273,750 2 0222 -- grave
-a" 273,750 2 0223 -- hungarumlaut
-a. 273,729 2 0224 -- dotaccent
-ab 273,750 2 0225 -- breve
-ah 273,750 2 0226 -- caron
-ao 273,776 2 0227 -- ring
-ho 273,0,228 1 0230 -- ogonek
-lq 410,727 2 0231 -- quotedblleft
-rq 410,718 2 0232 -- quotedblright
-oe 774,546,14 0 0233 -- oe
-/l 228,718 2 0234 -- lslash
-Bq 410,127,146 0 0235 -- quotedblbase
-OE 820,737,19 2 0236 -- OE
-/L 501,718 2 0237 -- Lslash
-r! 273,532,186 0 0241 -- exclamdown
-char161 "
-ct 456,628,118 0 0242 -- cent
-char162 "
-Po 456,718,16 2 0243 -- sterling
-char163 "
-Cs 456,636 0 0244 -- currency
-char164 "
-Ye 456,698 2 0245 -- yen
-char165 "
-bb 230,737,19 2 0246 -- brokenbar
-char166 "
-sc 456,727,184 2 0247 -- section
-char167 "
-ad 273,729 2 0250 -- dieresis
-char168 "
-co 604,737,19 2 0251 -- copyright
-char169 "
-Of 303,737 2 0252 -- ordfeminine
-char170 "
-fo 273,484 0 0253 -- guilsinglleft
-no 479,419 0 0254 -- logicalnot
-char172 "
-\- 479,309 0 0255 -- minus
-rg 604,737,19 2 0256 -- registered
-char174 "
-a- 273,678 2 0257 -- macron
-char175 "
-de 328,712 2 0260 -- degree
-char176 "
-char177 479,506 0 0261 -- plusminus
-S2 273,710 2 0262 -- twosuperior
-char178 "
-S3 273,710 2 0263 -- threesuperior
-char179 "
-aa 273,750 2 0264 -- acute
-char180 "
-char181 501,532,207 1 0265 -- mu
-ps 456,700,191 2 0266 -- paragraph
-char182 "
-pc 228,334 0 0267 -- periodcentered
-char183 "
-ac 273,0,228 1 0270 -- cedilla
-char184 "
-S1 273,710 2 0271 -- onesuperior
-char185 "
-Om 299,737 2 0272 -- ordmasculine
-char186 "
-fc 273,484 0 0273 -- guilsinglright
-14 684,710,19 2 0274 -- onequarter
-char188 "
-12 684,710,19 2 0275 -- onehalf
-char189 "
-34 684,710,19 2 0276 -- threequarters
-char190 "
-r? 501,532,195 0 0277 -- questiondown
-char191 "
-`A 592,936 2 0300 -- Agrave
-char192 "
-'A 592,936 2 0301 -- Aacute
-char193 "
-^A 592,936 2 0302 -- Acircumflex
-char194 "
-~A 592,923 2 0303 -- Atilde
-char195 "
-:A 592,915 2 0304 -- Adieresis
-char196 "
-oA 592,962 2 0305 -- Aring
-char197 "
-AE 820,718 2 0306 -- AE
-char198 "
-,C 592,737,228 3 0307 -- Ccedilla
-char199 "
-`E 547,936 2 0310 -- Egrave
-char200 "
-'E 547,936 2 0311 -- Eacute
-char201 "
-^E 547,936 2 0312 -- Ecircumflex
-char202 "
-:E 547,915 2 0313 -- Edieresis
-char203 "
-`I 228,936 2 0314 -- Igrave
-char204 "
-'I 228,936 2 0315 -- Iacute
-char205 "
-^I 228,936 2 0316 -- Icircumflex
-char206 "
-:I 228,915 2 0317 -- Idieresis
-char207 "
--D 592,718 2 0320 -- Eth
-char208 "
-~N 592,923 2 0321 -- Ntilde
-char209 "
-`O 638,936,19 2 0322 -- Ograve
-char210 "
-'O 638,936,19 2 0323 -- Oacute
-char211 "
-^O 638,936,19 2 0324 -- Ocircumflex
-char212 "
-~O 638,923,19 2 0325 -- Otilde
-char213 "
-:O 638,915,19 2 0326 -- Odieresis
-char214 "
-char215 479,505 0 0327 -- multiply
-/O 638,745,27 2 0330 -- Oslash
-char216 "
-`U 592,936,19 2 0331 -- Ugrave
-char217 "
-'U 592,936,19 2 0332 -- Uacute
-char218 "
-^U 592,936,19 2 0333 -- Ucircumflex
-char219 "
-:U 592,915,19 2 0334 -- Udieresis
-char220 "
-'Y 547,936 2 0335 -- Yacute
-char221 "
-TP 547,718 2 0336 -- Thorn
-char222 "
-ss 501,731,14 2 0337 -- germandbls
-char223 "
-`a 456,750,14 2 0340 -- agrave
-char224 "
-'a 456,750,14 2 0341 -- aacute
-char225 "
-^a 456,750,14 2 0342 -- acircumflex
-char226 "
-~a 456,737,14 2 0343 -- atilde
-char227 "
-:a 456,729,14 2 0344 -- adieresis
-char228 "
-oa 456,776,14 2 0345 -- aring
-char229 "
-ae 729,546,14 0 0346 -- ae
-char230 "
-,c 456,546,228 1 0347 -- ccedilla
-char231 "
-`e 456,750,14 2 0350 -- egrave
-char232 "
-'e 456,750,14 2 0351 -- eacute
-char233 "
-^e 456,750,14 2 0352 -- ecircumflex
-char234 "
-:e 456,729,14 2 0353 -- edieresis
-char235 "
-`i 228,750 2 0354 -- igrave
-char236 "
-'i 228,750 2 0355 -- iacute
-char237 "
-^i 228,750 2 0356 -- icircumflex
-char238 "
-:i 228,729 2 0357 -- idieresis
-char239 "
-Sd 501,737,14 2 0360 -- eth
-char240 "
-~n 501,737 2 0361 -- ntilde
-char241 "
-`o 501,750,14 2 0362 -- ograve
-char242 "
-'o 501,750,14 2 0363 -- oacute
-char243 "
-^o 501,750,14 2 0364 -- ocircumflex
-char244 "
-~o 501,737,14 2 0365 -- otilde
-char245 "
-:o 501,729,14 2 0366 -- odieresis
-char246 "
-char247 479,548,42 0 0367 -- divide
-/o 501,560,29 0 0370 -- oslash
-char248 "
-`u 501,750,14 2 0371 -- ugrave
-char249 "
-'u 501,750,14 2 0372 -- uacute
-char250 "
-^u 501,750,14 2 0373 -- ucircumflex
-char251 "
-:u 501,729,14 2 0374 -- udieresis
-char252 "
-'y 456,750,214 3 0375 -- yacute
-char253 "
-Tp 501,718,208 3 0376 -- thorn
-char254 "
-:y 456,729,214 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/HNBI b/contrib/groff/font/devps/HNBI
deleted file mode 100644
index a5809e15c3c3..000000000000
--- a/contrib/groff/font/devps/HNBI
+++ /dev/null
@@ -1,562 +0,0 @@
-name HNBI
-internalname Helvetica-Narrow-BoldOblique
-slant 12
-spacewidth 228
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -30
-A w -30
-A v -40
-A u -30
-A Y -110
-A W -60
-A V -80
-A U -50
-A T -90
-A Q -40
-A O -40
-A G -50
-A C -40
-B U -10
-B A -30
-D . -30
-D , -30
-D Y -70
-D W -40
-D V -40
-D A -40
-F . -100
-F , -100
-F a -20
-F A -80
-J u -20
-J . -20
-J , -20
-J A -20
-K y -40
-K u -30
-K o -35
-K e -15
-K O -30
-L y -30
-L ' -140
-L cq -140
-L rq -140
-L Y -120
-L W -80
-L V -110
-L T -90
-O . -40
-O , -40
-O Y -70
-O X -50
-O W -50
-O V -50
-O T -40
-O A -50
-P . -120
-P o -40
-P e -30
-P , -120
-P a -30
-P A -100
-Q . 20
-Q , 20
-Q U -10
-R Y -50
-R W -40
-R V -50
-R U -20
-R T -20
-R O -20
-T y -60
-T w -60
-T u -90
-T ; -40
-T r -80
-T . -80
-T o -80
-T - -120
-T hy -120
-T char173 -120
-T e -60
-T , -80
-T : -40
-T a -80
-T O -40
-T A -90
-U . -30
-U , -30
-U A -50
-V u -60
-V ; -40
-V . -120
-V o -90
-V - -80
-V hy -80
-V char173 -80
-V e -50
-V , -120
-V : -40
-V a -60
-V O -50
-V G -50
-V A -80
-W y -20
-W u -45
-W ; -10
-W . -80
-W o -60
-W - -40
-W hy -40
-W char173 -40
-W e -35
-W , -80
-W : -10
-W a -40
-W O -20
-W A -60
-Y u -100
-Y ; -50
-Y . -100
-Y o -100
-Y e -80
-Y , -100
-Y : -50
-Y a -90
-Y O -70
-Y A -110
-a y -20
-a w -15
-a v -15
-a g -10
-b y -20
-b v -20
-b u -20
-b l -10
-c y -10
-c l -20
-c k -20
-c h -10
-, ' -120
-, cq -120
-, rq -120
-d y -15
-d w -15
-d v -15
-d d -10
-e y -15
-e x -15
-e w -15
-e v -15
-e . 20
-e , 10
-f ' 30
-f cq 30
-f rq 30
-f . -10
-f o -20
-f e -10
-f , -10
-g g -10
-g e 10
-h y -20
-k o -15
-l y -15
-l w -15
-m y -30
-m u -20
-n y -20
-n v -40
-n u -10
-o y -20
-o x -30
-o w -15
-o v -20
-p y -15
-. ' -120
-. cq -120
-. rq -120
-` ` -46
-` oq -46
-oq ` -46
-oq oq -46
-' v -20
-cq v -20
-' s -60
-cq s -60
-' r -40
-cq r -40
-' ' -46
-' cq -46
-cq ' -46
-cq cq -46
-' l -20
-cq l -20
-' d -80
-cq d -80
-r y 10
-r v 10
-r t 20
-r s -15
-r q -20
-r . -60
-r o -20
-r - -20
-r hy -20
-r char173 -20
-r g -15
-r d -20
-r , -60
-r c -20
-s w -15
-v . -80
-v o -30
-v , -80
-v a -20
-w . -40
-w o -20
-w , -40
-x e -10
-y . -80
-y o -25
-y e -10
-y , -80
-y a -30
-z e 10
-charset
-ha 479,698,0,55,-57,55 2 0000 -- asciicircum
-ti 479,343,0,44,-44,44 0 0001 -- asciitilde
-vS 547,936,19,91,-16,90 2 0002 -- Scaron
-vZ 501,936,0,153,30,90 2 0003 -- Zcaron
-vs 456,750,14,98,-2,90 2 0004 -- scaron
-vz 410,750,0,121,34,90 2 0005 -- zcaron
-:Y 547,915,0,164,-87,90 2 0006 -- Ydieresis
-tm 820,718,0,139,-96,90 2 0007 -- trademark
-aq 195,718,0,118,-85,90 2 0010 -- quotesingle
-space 228 0 0040
-! 273,718,0,102,-27,90 2 0041 -- exclam
-" 389,718,0,94,-108,90 2 0042 -- quotedbl
-dq "
-# 456,698,0,122,1,90 2 0043 -- numbersign
-sh "
-$ 456,775,115,104,-5,90 2 0044 -- dollar
-Do "
-% 729,710,19,60,-62,60 2 0045 -- percent
-& 592,718,19,58,-23,58 2 0046 -- ampersand
-' 228,718,0,119,-87,90 2 0047 -- quoteright
-cq "
-( 273,734,208,162,-12,90 3 0050 -- parenleft
-) 273,734,208,79,71,79 3 0051 -- parenright
-* 319,718,0,125,-70,90 2 0052 -- asterisk
-+ 479,506,0,71,-17,71 0 0053 -- plus
-, 228,146,168,23,27,23 0 0054 -- comma
-- 273,345,0,88,-10,88 0 0055 -- hyphen
-hy "
-char173 "
-. 228,146,0,23,-2,23 0 0056 -- period
-/ 228,737,19,205,80,90 2 0057 -- slash
-sl "
-0 456,710,19,100,-21,90 2 0060 -- zero
-1 456,710,0,28,-92,28 2 0061 -- one
-2 456,710,0,102,29,90 2 0062 -- two
-3 456,710,19,93,-4,90 2 0063 -- three
-4 456,710,0,84,0,84 2 0064 -- four
-5 456,698,19,116,-3,90 2 0065 -- five
-6 456,710,19,101,-20,90 2 0066 -- six
-7 456,698,0,149,-52,90 2 0067 -- seven
-8 456,710,19,99,-7,90 2 0070 -- eight
-9 456,710,19,98,-14,90 2 0071 -- nine
-: 273,512,0,65,-25,65 0 0072 -- colon
-; 273,512,168,65,4,65 0 0073 -- semicolon
-< 479,514,8,108,-17,90 0 0074 -- less
-= 479,419,0,90,2,90 0 0075 -- equal
-> 479,514,8,71,20,71 0 0076 -- greater
-? 501,727,0,99,-85,90 2 0077 -- question
-@ 800,737,19,32,-102,32 2 0100 -- at
-at "
-A 592,718,0,34,34,34 2 0101 -- A
-B 592,718,0,84,-12,84 2 0102 -- B
-C 592,737,19,105,-38,90 2 0103 -- C
-D 592,718,0,95,-12,90 2 0104 -- D
-E 547,718,0,123,-12,90 2 0105 -- E
-F 501,718,0,155,-12,90 2 0106 -- F
-G 638,737,19,82,-39,82 2 0107 -- G
-H 592,718,0,117,-8,90 2 0110 -- H
-I 228,718,0,123,-2,90 2 0111 -- I
-J 456,718,18,116,1,90 2 0112 -- J
-K 592,718,0,161,-21,90 2 0113 -- K
-L 501,718,0,50,-12,50 2 0114 -- L
-M 683,718,0,119,-7,90 2 0115 -- M
-N 592,718,0,119,-7,90 2 0116 -- N
-O 638,737,19,87,-38,87 2 0117 -- O
-P 547,718,0,108,-12,90 2 0120 -- P
-Q 638,737,52,87,-38,87 2 0121 -- Q
-R 592,718,0,96,-12,90 2 0122 -- R
-S 547,737,19,91,-16,90 2 0123 -- S
-T 501,718,0,164,-64,90 2 0124 -- T
-U 592,718,19,117,-46,90 2 0125 -- U
-V 547,718,0,159,-91,90 2 0126 -- V
-W 774,718,0,163,-88,90 2 0127 -- W
-X 547,718,0,151,39,90 2 0130 -- X
-Y 547,718,0,164,-87,90 2 0131 -- Y
-Z 501,718,0,153,30,90 2 0132 -- Z
-[ 273,722,196,156,33,90 2 0133 -- bracketleft
-lB "
-\ 228,737,19,74,-51,74 2 0134 -- backslash
-rs "
-] 273,722,196,124,64,90 2 0135 -- bracketright
-rB "
-a^ 273,750,0,164,-47,90 2 0136 -- circumflex
-^ "
-_ 456,0,125,37,72,37 0 0137 -- underscore
-` 228,727,0,118,-86,90 2 0140 -- quoteleft
-oq "
-a 456,546,14,72,5,72 0 0141 -- a
-b 501,718,14,78,0,78 2 0142 -- b
-c 456,546,14,85,-15,85 0 0143 -- c
-d 501,718,14,126,-17,90 2 0144 -- d
-e 456,546,14,80,-8,80 0 0145 -- e
-f 273,727,0,162,-21,90 2 0146 -- f
-g 501,546,217,95,19,90 1 0147 -- g
-h 501,718,0,65,-3,65 2 0150 -- h
-i 228,725,0,120,-7,90 2 0151 -- i
-j 228,725,214,120,85,90 3 0152 -- j
-k 456,718,0,143,-7,90 2 0153 -- k
-l 228,718,0,119,-7,90 2 0154 -- l
-m 729,546,0,67,-2,67 0 0155 -- m
-n 501,546,0,65,-3,65 0 0156 -- n
-o 501,546,14,76,-17,76 0 0157 -- o
-p 501,546,207,78,35,78 1 0160 -- p
-q 501,546,207,94,-16,90 1 0161 -- q
-r 319,546,0,132,-2,90 0 0162 -- r
-s 456,546,14,73,-2,73 0 0163 -- s
-t 273,676,6,123,-32,90 2 0164 -- t
-u 501,532,14,89,-30,89 0 0165 -- u
-v 456,532,0,132,-53,90 0 0166 -- v
-w 638,532,0,135,-51,90 0 0167 -- w
-x 456,532,0,125,38,90 0 0170 -- x
-y 456,532,214,129,16,90 1 0171 -- y
-z 410,532,0,118,34,90 0 0172 -- z
-lC 319,722,196,156,-27,90 2 0173 -- braceleft
-{ "
-ba 230,737,19,109,-16,90 2 0174 -- bar
-| "
-rC 319,722,196,64,64,64 2 0175 -- braceright
-} "
-a~ 273,737,0,192,-42,90 2 0176 -- tilde
-~ "
-bq 228,127,146,16,16,16 0 0200 -- quotesinglbase
-Fo 456,484,0,62,-61,62 0 0201 -- guillemotleft
-char171 "
-Fc 456,484,0,37,-35,37 0 0202 -- guillemotright
-char187 "
-bu 287,524,0,108,-18,90 0 0203 -- bullet
-Fn 456,737,210,142,91,90 3 0204 -- florin
-f/ 137,710,19,312,193,90 2 0205 -- fraction
-%0 820,710,19,81,-12,81 2 0206 -- perthousand
-dg 456,718,171,107,-47,90 2 0207 -- dagger
-dd 456,718,171,109,12,90 2 0210 -- daggerdbl
-en 456,333,0,108,10,90 0 0211 -- endash
-em 820,333,0,108,10,90 0 0212 -- emdash
-fi 501,727,0,120,-21,90 2 0214 -- fi
-fl 501,727,0,119,-21,90 2 0215 -- fl
-.i 228,532,0,86,-7,86 0 0220 -- dotlessi
-ga 273,750,0,67,-62,67 2 0222 -- grave
-a" 273,750,0,306,-63,90 2 0223 -- hungarumlaut
-a. 273,729,0,93,-142,90 2 0224 -- dotaccent
-ab 273,750,0,182,-78,90 2 0225 -- breve
-ah 273,750,0,189,-73,90 2 0226 -- caron
-ao 273,776,0,121,-114,90 2 0227 -- ring
-ho 273,0,228,0,17 1 0230 -- ogonek
-lq 410,727,0,122,-82,90 2 0231 -- quotedblleft
-rq 410,718,0,123,-82,90 2 0232 -- quotedblright
-oe 774,546,14,77,-17,77 0 0233 -- oe
-/l 228,718,0,156,17,90 2 0234 -- lslash
-Bq 410,127,146,20,21,20 0 0235 -- quotedblbase
-OE 820,737,19,143,-31,90 2 0236 -- OE
-/L 501,718,0,50,22,50 2 0237 -- Lslash
-r! 273,532,186,67,9,67 0 0241 -- exclamdown
-char161 "
-ct 456,628,118,85,-15,85 0 0242 -- cent
-char162 "
-Po 456,718,16,114,9,90 2 0243 -- sterling
-char163 "
-Cs 456,636,0,152,28,90 0 0244 -- currency
-char164 "
-Ye 456,698,0,179,1,90 2 0245 -- yen
-char165 "
-bb 230,737,19,109,-16,90 2 0246 -- brokenbar
-char166 "
-sc 456,727,184,85,0,85 2 0247 -- section
-char167 "
-ad 273,729,0,172,-62,90 2 0250 -- dieresis
-char168 "
-co 604,737,19,131,4,90 2 0251 -- copyright
-char169 "
-Of 303,737,0,128,-25,90 2 0252 -- ordfeminine
-char170 "
-fo 273,484,0,66,-56,66 0 0253 -- guilsinglleft
-no 479,419,0,90,-36,90 0 0254 -- logicalnot
-char172 "
-\- 479,309,0,71,-17,71 0 0255 -- minus
-rg 604,737,19,130,5,90 2 0256 -- registered
-char174 "
-a- 273,678,0,173,-50,90 2 0257 -- macron
-char175 "
-de 328,712,0,105,-93,90 2 0260 -- degree
-char176 "
-char177 479,506,0,83,17,83 0 0261 -- plusminus
-S2 273,710,0,145,-7,90 2 0262 -- twosuperior
-char178 "
-S3 273,710,0,138,-25,90 2 0263 -- threesuperior
-char179 "
-aa 273,750,0,200,-144,90 2 0264 -- acute
-char180 "
-char181 501,532,207,89,32,89 1 0265 -- mu
-ps 456,700,191,158,-30,90 2 0266 -- paragraph
-char182 "
-pc 228,334,0,48,-40,48 0 0267 -- periodcentered
-char183 "
-ac 273,0,228,0,80 1 0270 -- cedilla
-char184 "
-S1 273,710,0,95,-71,90 2 0271 -- onesuperior
-char185 "
-Om 299,737,0,149,-25,90 2 0272 -- ordmasculine
-char186 "
-fc 273,484,0,41,-31,41 0 0273 -- guilsinglright
-14 684,710,19,27,-58,27 2 0274 -- onequarter
-char188 "
-12 684,710,19,70,-58,70 2 0275 -- onehalf
-char189 "
-34 684,710,19,54,-32,54 2 0276 -- threequarters
-char190 "
-r? 501,532,195,8,6,8 0 0277 -- questiondown
-char191 "
-`A 592,936,0,34,34,34 2 0300 -- Agrave
-char192 "
-'A 592,936,0,73,34,73 2 0301 -- Aacute
-char193 "
-^A 592,936,0,37,34,37 2 0302 -- Acircumflex
-char194 "
-~A 592,923,0,66,34,66 2 0303 -- Atilde
-char195 "
-:A 592,915,0,46,34,46 2 0304 -- Adieresis
-char196 "
-oA 592,962,0,34,34,34 2 0305 -- Aring
-char197 "
-AE 820,718,0,132,46,90 2 0306 -- AE
-char198 "
-,C 592,737,228,105,-38,90 3 0307 -- Ccedilla
-char199 "
-`E 547,936,0,123,-12,90 2 0310 -- Egrave
-char200 "
-'E 547,936,0,123,-12,90 2 0311 -- Eacute
-char201 "
-^E 547,936,0,123,-12,90 2 0312 -- Ecircumflex
-char202 "
-:E 547,915,0,123,-12,90 2 0313 -- Edieresis
-char203 "
-`I 228,936,0,123,-2,90 2 0314 -- Igrave
-char204 "
-'I 228,936,0,255,-2,90 2 0315 -- Iacute
-char205 "
-^I 228,936,0,219,-2,90 2 0316 -- Icircumflex
-char206 "
-:I 228,915,0,227,-2,90 2 0317 -- Idieresis
-char207 "
--D 592,718,0,95,-1,90 2 0320 -- Eth
-char208 "
-~N 592,923,0,119,-7,90 2 0321 -- Ntilde
-char209 "
-`O 638,936,19,87,-38,87 2 0322 -- Ograve
-char210 "
-'O 638,936,19,87,-38,87 2 0323 -- Oacute
-char211 "
-^O 638,936,19,87,-38,87 2 0324 -- Ocircumflex
-char212 "
-~O 638,923,19,87,-38,87 2 0325 -- Otilde
-char213 "
-:O 638,915,19,87,-38,87 2 0326 -- Odieresis
-char214 "
-char215 479,505,0,91,3,90 0 0327 -- multiply
-/O 638,745,27,145,21,90 2 0330 -- Oslash
-char216 "
-`U 592,936,19,117,-46,90 2 0331 -- Ugrave
-char217 "
-'U 592,936,19,117,-46,90 2 0332 -- Uacute
-char218 "
-^U 592,936,19,117,-46,90 2 0333 -- Ucircumflex
-char219 "
-:U 592,915,19,117,-46,90 2 0334 -- Udieresis
-char220 "
-'Y 547,936,0,164,-87,90 2 0335 -- Yacute
-char221 "
-TP 547,718,0,91,-12,90 2 0336 -- Thorn
-char222 "
-ss 501,731,14,88,-7,88 2 0337 -- germandbls
-char223 "
-`a 456,750,14,72,5,72 2 0340 -- agrave
-char224 "
-'a 456,750,14,108,5,90 2 0341 -- aacute
-char225 "
-^a 456,750,14,72,5,72 2 0342 -- acircumflex
-char226 "
-~a 456,737,14,101,5,90 2 0343 -- atilde
-char227 "
-:a 456,729,14,81,5,81 2 0344 -- adieresis
-char228 "
-oa 456,776,14,72,5,72 2 0345 -- aring
-char229 "
-ae 729,546,14,78,4,78 0 0346 -- ae
-char230 "
-,c 456,546,228,85,-15,85 1 0347 -- ccedilla
-char231 "
-`e 456,750,14,80,-8,80 2 0350 -- egrave
-char232 "
-'e 456,750,14,108,-8,90 2 0351 -- eacute
-char233 "
-^e 456,750,14,80,-8,80 2 0352 -- ecircumflex
-char234 "
-:e 456,729,14,81,-8,81 2 0353 -- edieresis
-char235 "
-`i 228,750,0,90,-7,90 2 0354 -- igrave
-char236 "
-'i 228,750,0,222,-7,90 2 0355 -- iacute
-char237 "
-^i 228,750,0,186,-7,90 2 0356 -- icircumflex
-char238 "
-:i 228,729,0,195,-7,90 2 0357 -- idieresis
-char239 "
-Sd 501,737,14,98,-17,90 2 0360 -- eth
-char240 "
-~n 501,737,0,78,-3,78 2 0361 -- ntilde
-char241 "
-`o 501,750,14,76,-17,76 2 0362 -- ograve
-char242 "
-'o 501,750,14,86,-17,86 2 0363 -- oacute
-char243 "
-^o 501,750,14,76,-17,76 2 0364 -- ocircumflex
-char244 "
-~o 501,737,14,78,-17,78 2 0365 -- otilde
-char245 "
-:o 501,729,14,76,-17,76 2 0366 -- odieresis
-char246 "
-char247 479,548,42,71,-17,71 0 0367 -- divide
-/o 501,560,29,124,32,90 0 0370 -- oslash
-char248 "
-`u 501,750,14,89,-30,89 2 0371 -- ugrave
-char249 "
-'u 501,750,14,89,-30,89 2 0372 -- uacute
-char250 "
-^u 501,750,14,89,-30,89 2 0373 -- ucircumflex
-char251 "
-:u 501,729,14,89,-30,89 2 0374 -- udieresis
-char252 "
-'y 456,750,214,129,16,90 3 0375 -- yacute
-char253 "
-Tp 501,718,208,78,35,78 3 0376 -- thorn
-char254 "
-:y 456,729,214,129,16,90 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/HNI b/contrib/groff/font/devps/HNI
deleted file mode 100644
index c9ab4ec63087..000000000000
--- a/contrib/groff/font/devps/HNI
+++ /dev/null
@@ -1,630 +0,0 @@
-name HNI
-internalname Helvetica-Narrow-Oblique
-slant 12
-spacewidth 228
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -40
-A w -40
-A v -40
-A u -30
-A Y -100
-A W -50
-A V -70
-A U -50
-A T -120
-A Q -30
-A O -30
-A G -30
-A C -30
-B . -20
-B , -20
-B U -10
-C . -30
-C , -30
-D . -70
-D , -70
-D Y -90
-D W -40
-D V -70
-D A -40
-F r -45
-F . -150
-F o -30
-F e -30
-F , -150
-F a -50
-F A -80
-J u -20
-J . -30
-J , -30
-J a -20
-J A -20
-K y -50
-K u -30
-K o -40
-K e -40
-K O -50
-L y -30
-L ' -160
-L cq -160
-L rq -140
-L Y -140
-L W -70
-L V -110
-L T -110
-O . -40
-O , -40
-O Y -70
-O X -60
-O W -30
-O V -50
-O T -40
-O A -20
-P . -180
-P o -50
-P e -50
-P , -180
-P a -40
-P A -120
-Q U -10
-R Y -50
-R W -30
-R V -50
-R U -40
-R T -30
-R O -20
-S . -20
-S , -20
-T y -120
-T w -120
-T u -120
-T ; -20
-T r -120
-T . -120
-T o -120
-T - -140
-T hy -140
-T char173 -140
-T e -120
-T , -120
-T : -20
-T a -120
-T O -40
-T A -120
-U . -40
-U , -40
-U A -40
-V u -70
-V ; -40
-V . -125
-V o -80
-V - -80
-V hy -80
-V char173 -80
-V e -80
-V , -125
-V : -40
-V a -70
-V O -40
-V G -40
-V A -80
-W y -20
-W u -30
-W . -80
-W o -30
-W - -40
-W hy -40
-W char173 -40
-W e -30
-W , -80
-W a -40
-W O -20
-W A -50
-Y u -110
-Y ; -60
-Y . -140
-Y o -140
-Y i -20
-Y - -140
-Y hy -140
-Y char173 -140
-Y e -140
-Y , -140
-Y : -60
-Y a -140
-Y O -85
-Y A -110
-a y -30
-a w -20
-a v -20
-b y -20
-b v -20
-b u -20
-b . -40
-b l -20
-b , -40
-b b -10
-c k -20
-c , -15
-, ' -100
-, cq -100
-, rq -100
-e y -20
-e x -30
-e w -20
-e v -30
-e . -15
-e , -15
-f ' 50
-f cq 50
-f rq 60
-f . -30
-f o -30
-f e -30
-f .i -28
-f , -30
-f a -30
-g r -10
-h y -30
-k o -20
-k e -20
-m y -15
-m u -10
-n y -15
-n v -20
-n u -10
-o y -30
-o x -30
-o w -15
-o v -15
-o . -40
-o , -40
-/o z -55
-char248 z -55
-/o y -70
-char248 y -70
-/o x -85
-char248 x -85
-/o w -70
-char248 w -70
-/o v -70
-char248 v -70
-/o u -55
-char248 u -55
-/o t -55
-char248 t -55
-/o s -55
-char248 s -55
-/o r -55
-char248 r -55
-/o q -55
-char248 q -55
-/o . -95
-char248 . -95
-/o p -55
-char248 p -55
-/o o -55
-char248 o -55
-/o n -55
-char248 n -55
-/o m -55
-char248 m -55
-/o l -55
-char248 l -55
-/o k -55
-char248 k -55
-/o j -55
-char248 j -55
-/o i -55
-char248 i -55
-/o h -55
-char248 h -55
-/o g -55
-char248 g -55
-/o f -55
-char248 f -55
-/o e -55
-char248 e -55
-/o d -55
-char248 d -55
-/o , -95
-char248 , -95
-/o c -55
-char248 c -55
-/o b -55
-char248 b -55
-/o a -55
-char248 a -55
-p y -30
-p . -35
-p , -35
-. ' -100
-. cq -100
-. rq -100
-` ` -57
-` oq -57
-oq ` -57
-oq oq -57
-' s -50
-cq s -50
-' r -50
-cq r -50
-' ' -57
-' cq -57
-cq ' -57
-cq cq -57
-' d -50
-cq d -50
-r y 30
-r v 30
-r u 15
-r t 40
-r ; 30
-r . -50
-r p 30
-r n 25
-r m 25
-r l 15
-r k 15
-r i 15
-r , -50
-r : 30
-r a -10
-s w -30
-s . -15
-s , -15
-v . -80
-v o -25
-v e -25
-v , -80
-v a -25
-w . -60
-w o -10
-w e -10
-w , -60
-w a -15
-x e -30
-y . -100
-y o -20
-y e -20
-y , -100
-y a -20
-z o -15
-z e -15
-charset
-ha 385,688,0,107,15,89 2 0000 -- asciicircum
-ti 479,326,0,47,-41,47 0 0001 -- asciitilde
-vS 547,929,19,87,-24,87 2 0002 -- Scaron
-vZ 501,929,0,156,31,89 2 0003 -- Zcaron
-vs 410,734,15,93,-2,89 2 0004 -- scaron
-vz 410,734,0,108,25,89 2 0005 -- zcaron
-:Y 547,901,0,164,-87,89 2 0006 -- Ydieresis
-tm 820,718,0,96,-102,89 2 0007 -- trademark
-aq 157,718,0,126,-79,89 2 0010 -- quotesingle
-space 228 0 0040
-! 228,718,0,100,-24,89 2 0041 -- exclam
-" 291,718,0,118,-88,89 2 0042 -- quotedbl
-dq "
-# 456,688,0,111,-10,89 2 0043 -- numbersign
-sh "
-$ 456,775,115,100,-7,89 2 0044 -- dollar
-Do "
-% 729,703,19,50,-70,50 2 0045 -- percent
-& 547,718,15,33,-13,33 2 0046 -- ampersand
-' 182,718,0,122,-74,89 2 0047 -- quoteright
-cq "
-( 273,733,207,149,-39,89 3 0050 -- parenleft
-) 273,733,207,53,57,53 3 0051 -- parenright
-* 319,718,0,120,-85,89 2 0052 -- asterisk
-+ 479,505,0,68,-20,68 0 0053 -- plus
-, 228,106,147,0,4 0 0054 -- comma
-- 273,322,0,70,-27,70 0 0055 -- hyphen
-hy "
-char173 "
-. 228,106,0,0,-21 0 0056 -- period
-/ 228,737,19,192,67,89 2 0057 -- slash
-sl "
-0 456,703,19,93,-27,89 2 0060 -- zero
-1 456,703,0,11,-120,11 2 0061 -- one
-2 456,703,0,100,29,89 2 0062 -- two
-3 456,703,19,94,-11,89 2 0063 -- three
-4 456,703,0,66,0,66 2 0064 -- four
-5 456,688,19,103,-5,89 2 0065 -- five
-6 456,703,19,98,-24,89 2 0066 -- six
-7 456,688,0,143,-62,89 2 0067 -- seven
-8 456,703,19,91,-10,89 2 0070 -- eight
-9 456,703,19,93,-17,89 2 0071 -- nine
-: 228,516,0,69,-21,69 0 0072 -- colon
-; 228,516,147,69,4,69 0 0073 -- semicolon
-< 479,495,0,97,-27,89 0 0074 -- less
-= 479,390,0,86,-2,86 0 0075 -- equal
-> 479,495,0,61,9,61 0 0076 -- greater
-? 456,727,0,94,-82,89 2 0077 -- question
-@ 832,737,19,9,-126,9 2 0100 -- at
-at "
-A 547,718,0,39,39,39 2 0101 -- A
-B 547,718,0,86,-11,86 2 0102 -- B
-C 592,737,19,98,-38,89 2 0103 -- C
-D 592,718,0,84,-16,84 2 0104 -- D
-E 547,718,0,128,-21,89 2 0105 -- E
-F 501,718,0,152,-21,89 2 0106 -- F
-G 638,737,19,67,-41,67 2 0107 -- G
-H 592,718,0,113,-13,89 2 0110 -- H
-I 228,718,0,101,-25,89 2 0111 -- I
-J 410,718,19,116,11,89 2 0112 -- J
-K 547,718,0,165,-12,89 2 0113 -- K
-L 456,718,0,49,-12,49 2 0114 -- L
-M 683,718,0,116,-10,89 2 0115 -- M
-N 592,718,0,113,-12,89 2 0116 -- N
-O 638,737,19,89,-36,89 2 0117 -- O
-P 547,718,0,107,-21,89 2 0120 -- P
-Q 638,737,56,89,-36,89 2 0121 -- Q
-R 592,718,0,92,-22,89 2 0122 -- R
-S 547,737,19,87,-24,87 2 0123 -- S
-T 501,718,0,164,-72,89 2 0124 -- T
-U 592,718,19,111,-51,89 2 0125 -- U
-V 547,718,0,159,-92,89 2 0126 -- V
-W 774,718,0,162,-88,89 2 0127 -- W
-X 547,718,0,150,34,89 2 0130 -- X
-Y 547,718,0,164,-87,89 2 0131 -- Y
-Z 501,718,0,156,31,89 2 0132 -- Z
-[ 228,722,196,153,33,89 2 0133 -- bracketleft
-lB "
-\ 228,737,19,61,-65,61 2 0134 -- backslash
-rs "
-] 228,722,196,124,61,89 2 0135 -- bracketright
-rB "
-a^ 273,734,0,136,-71,89 2 0136 -- circumflex
-^ "
-_ 456,0,125,37,72,37 0 0137 -- underscore
-` 182,725,0,133,-85,89 2 0140 -- quoteleft
-oq "
-a 456,538,15,52,0,52 0 0141 -- a
-b 456,718,15,73,2,73 2 0142 -- b
-c 410,538,15,94,-11,89 0 0143 -- c
-d 456,718,15,128,-19,89 2 0144 -- d
-e 456,538,15,68,-19,68 0 0145 -- e
-f 228,728,0,163,-21,89 2 0146 -- f
-g 456,538,220,94,16,89 1 0147 -- g
-h 456,718,0,64,-3,64 2 0150 -- h
-i 182,718,0,120,-5,89 2 0151 -- i
-j 182,718,210,120,99,89 3 0152 -- j
-k 410,718,0,132,-5,89 2 0153 -- k
-l 182,718,0,120,-5,89 2 0154 -- l
-m 683,538,0,66,-3,66 0 0155 -- m
-n 456,538,0,64,-3,64 0 0156 -- n
-o 456,538,14,73,-18,73 0 0157 -- o
-p 456,538,207,73,39,73 1 0160 -- p
-q 456,538,207,90,-19,89 1 0161 -- q
-r 273,538,0,142,-13,89 0 0162 -- r
-s 410,538,15,74,-2,74 0 0163 -- s
-t 228,669,7,124,-34,89 2 0164 -- t
-u 456,523,15,86,-27,86 0 0165 -- u
-v 410,523,0,135,-48,89 0 0166 -- v
-w 592,523,0,131,-53,89 0 0167 -- w
-x 410,523,0,127,41,89 0 0170 -- x
-y 410,523,214,132,38,89 1 0171 -- y
-z 410,523,0,108,25,89 0 0172 -- z
-lC 274,722,196,141,-25,89 2 0173 -- braceleft
-{ "
-ba 213,737,19,102,-24,89 2 0174 -- bar
-| "
-rC 274,722,196,67,50,67 2 0175 -- braceright
-} "
-a~ 273,722,0,179,-52,89 2 0176 -- tilde
-~ "
-bq 182,106,149,15,33,15 0 0200 -- quotesinglbase
-Fo 456,446,0,48,-70,48 0 0201 -- guillemotleft
-char171 "
-Fc 456,446,0,27,-48,27 0 0202 -- guillemotright
-char187 "
-bu 287,517,0,102,-24,89 0 0203 -- bullet
-Fn 456,737,207,131,93,89 3 0204 -- florin
-f/ 137,703,19,309,189,89 2 0205 -- fraction
-%0 820,703,19,74,-22,74 2 0206 -- perthousand
-dg 456,718,159,104,-60,89 2 0207 -- dagger
-dd 456,718,159,105,7,89 2 0210 -- daggerdbl
-en 456,313,0,104,8,89 0 0211 -- endash
-em 820,313,0,105,8,89 0 0212 -- emdash
-fi 410,728,0,121,-21,89 2 0214 -- fi
-fl 410,728,0,119,-21,89 2 0215 -- fl
-.i 228,523,0,63,-28,63 0 0220 -- dotlessi
-ga 273,734,0,53,-89,53 2 0222 -- grave
-a" 273,734,0,240,-79,89 2 0223 -- hungarumlaut
-a. 273,706,0,74,-154,74 2 0224 -- dotaccent
-ab 273,731,0,168,-87,89 2 0225 -- breve
-ah 273,734,0,161,-95,89 2 0226 -- caron
-ao 273,756,0,107,-125,89 2 0227 -- ring
-ho 273,0,225,0,15 1 0230 -- ogonek
-lq 273,725,0,155,-63,89 2 0231 -- quotedblleft
-rq 273,718,0,144,-52,89 2 0232 -- quotedblright
-oe 774,538,15,67,-18,67 0 0233 -- oe
-/l 182,718,0,152,16,89 2 0234 -- lslash
-Bq 273,106,149,37,55,37 0 0235 -- quotedblbase
-OE 820,737,19,145,-30,89 2 0236 -- OE
-/L 456,718,0,49,16,49 2 0237 -- Lslash
-r! 273,523,195,44,-13,44 0 0241 -- exclamdown
-char161 "
-ct 456,623,115,73,-28,73 0 0242 -- cent
-char162 "
-Po 456,718,16,114,10,89 2 0243 -- sterling
-char163 "
-Cs 456,603,0,124,1,89 0 0244 -- currency
-char164 "
-Ye 456,688,0,167,-17,89 2 0245 -- yen
-char165 "
-bb 213,737,19,102,-24,89 2 0246 -- brokenbar
-char166 "
-sc 456,737,191,73,-13,73 2 0247 -- section
-char167 "
-ad 273,706,0,140,-88,89 2 0250 -- dieresis
-char168 "
-co 604,737,19,133,6,89 2 0251 -- copyright
-char169 "
-Of 303,737,0,115,-32,89 2 0252 -- ordfeminine
-char170 "
-fo 273,446,0,56,-62,56 0 0253 -- guilsinglleft
-no 479,390,0,86,-37,86 0 0254 -- logicalnot
-char172 "
-\- 479,289,0,68,-20,68 0 0255 -- minus
-rg 604,737,19,133,6,89 2 0256 -- registered
-char174 "
-a- 273,684,0,161,-67,89 2 0257 -- macron
-char175 "
-de 328,703,0,106,-88,89 2 0260 -- degree
-char176 "
-char177 479,506,0,78,18,78 0 0261 -- plusminus
-S2 273,703,0,145,-2,89 2 0262 -- twosuperior
-char178 "
-S3 273,703,0,135,-24,89 2 0263 -- threesuperior
-char179 "
-aa 273,734,0,167,-153,89 2 0264 -- acute
-char180 "
-char181 456,523,207,86,30,86 1 0265 -- mu
-ps 440,718,173,143,-53,89 2 0266 -- paragraph
-char182 "
-pc 228,315,0,33,-56,33 0 0267 -- periodcentered
-char183 "
-ac 273,0,225,0,48 1 0270 -- cedilla
-char184 "
-S1 273,703,0,82,-86,82 2 0271 -- onesuperior
-char185 "
-Om 299,737,0,135,-32,89 2 0272 -- ordmasculine
-char186 "
-fc 273,446,0,34,-41,34 0 0273 -- guilsinglright
-14 684,703,19,24,-73,24 2 0274 -- onequarter
-char188 "
-12 684,703,19,54,-43,54 2 0275 -- onehalf
-char189 "
-34 684,703,19,72,-56,72 2 0276 -- threequarters
-char190 "
-r? 501,525,201,0,-20 0 0277 -- questiondown
-char191 "
-`A 547,929,0,39,39,39 2 0300 -- Agrave
-char192 "
-'A 547,929,0,63,39,63 2 0301 -- Aacute
-char193 "
-^A 547,929,0,39,39,39 2 0302 -- Acircumflex
-char194 "
-~A 547,917,0,76,39,76 2 0303 -- Atilde
-char195 "
-:A 547,901,0,39,39,39 2 0304 -- Adieresis
-char196 "
-oA 547,931,0,39,39,39 2 0305 -- Aring
-char197 "
-AE 820,718,0,129,43,89 2 0306 -- AE
-char198 "
-,C 592,737,225,98,-38,89 3 0307 -- Ccedilla
-char199 "
-`E 547,929,0,128,-21,89 2 0310 -- Egrave
-char200 "
-'E 547,929,0,128,-21,89 2 0311 -- Eacute
-char201 "
-^E 547,929,0,128,-21,89 2 0312 -- Ecircumflex
-char202 "
-:E 547,901,0,128,-21,89 2 0313 -- Edieresis
-char203 "
-`I 228,929,0,110,-25,89 2 0314 -- Igrave
-char204 "
-'I 228,929,0,223,-25,89 2 0315 -- Iacute
-char205 "
-^I 228,929,0,193,-25,89 2 0316 -- Icircumflex
-char206 "
-:I 228,901,0,197,-25,89 2 0317 -- Idieresis
-char207 "
--D 592,718,0,84,-7,84 2 0320 -- Eth
-char208 "
-~N 592,917,0,113,-12,89 2 0321 -- Ntilde
-char209 "
-`O 638,929,19,89,-36,89 2 0322 -- Ograve
-char210 "
-'O 638,929,19,89,-36,89 2 0323 -- Oacute
-char211 "
-^O 638,929,19,89,-36,89 2 0324 -- Ocircumflex
-char212 "
-~O 638,917,19,89,-36,89 2 0325 -- Otilde
-char213 "
-:O 638,901,19,89,-36,89 2 0326 -- Odieresis
-char214 "
-char215 479,506,0,97,9,89 0 0327 -- multiply
-/O 638,737,19,142,15,89 2 0330 -- Oslash
-char216 "
-`U 592,929,19,111,-51,89 2 0331 -- Ugrave
-char217 "
-'U 592,929,19,111,-51,89 2 0332 -- Uacute
-char218 "
-^U 592,929,19,111,-51,89 2 0333 -- Ucircumflex
-char219 "
-:U 592,901,19,111,-51,89 2 0334 -- Udieresis
-char220 "
-'Y 547,929,0,164,-87,89 2 0335 -- Yacute
-char221 "
-TP 547,718,0,87,-21,87 2 0336 -- Thorn
-char222 "
-ss 501,728,15,88,-5,88 2 0337 -- germandbls
-char223 "
-`a 456,734,15,52,0,52 2 0340 -- agrave
-char224 "
-'a 456,734,15,75,0,75 2 0341 -- aacute
-char225 "
-^a 456,734,15,52,0,52 2 0342 -- acircumflex
-char226 "
-~a 456,722,15,80,0,80 2 0343 -- atilde
-char227 "
-:a 456,706,15,52,0,52 2 0344 -- adieresis
-char228 "
-oa 456,756,15,52,0,52 2 0345 -- aring
-char229 "
-ae 729,538,15,67,0,67 0 0346 -- ae
-char230 "
-,c 410,538,225,94,-11,89 1 0347 -- ccedilla
-char231 "
-`e 456,734,15,68,-19,68 2 0350 -- egrave
-char232 "
-'e 456,734,15,75,-19,75 2 0351 -- eacute
-char233 "
-^e 456,734,15,68,-19,68 2 0352 -- ecircumflex
-char234 "
-:e 456,706,15,68,-19,68 2 0353 -- edieresis
-char235 "
-`i 228,734,0,76,-28,76 2 0354 -- igrave
-char236 "
-'i 228,734,0,189,-28,89 2 0355 -- iacute
-char237 "
-^i 228,734,0,159,-28,89 2 0356 -- icircumflex
-char238 "
-:i 228,706,0,163,-28,89 2 0357 -- idieresis
-char239 "
-Sd 456,737,15,100,-17,89 2 0360 -- eth
-char240 "
-~n 456,722,0,80,-3,80 2 0361 -- ntilde
-char241 "
-`o 456,734,14,73,-18,73 2 0362 -- ograve
-char242 "
-'o 456,734,14,75,-18,75 2 0363 -- oacute
-char243 "
-^o 456,734,14,73,-18,73 2 0364 -- ocircumflex
-char244 "
-~o 456,722,14,88,-18,88 2 0365 -- otilde
-char245 "
-:o 456,706,14,73,-18,73 2 0366 -- odieresis
-char246 "
-char247 479,524,19,68,-20,68 0 0367 -- divide
-/o 501,545,22,80,26,80 0 0370 -- oslash
-char248 "
-`u 456,734,15,86,-27,86 2 0371 -- ugrave
-char249 "
-'u 456,734,15,86,-27,86 2 0372 -- uacute
-char250 "
-^u 456,734,15,86,-27,86 2 0373 -- ucircumflex
-char251 "
-:u 456,706,15,86,-27,86 2 0374 -- udieresis
-char252 "
-'y 410,734,214,132,38,89 3 0375 -- yacute
-char253 "
-Tp 456,718,207,73,39,73 3 0376 -- thorn
-char254 "
-:y 410,706,214,132,38,89 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/HNR b/contrib/groff/font/devps/HNR
deleted file mode 100644
index e4f30ee68ed6..000000000000
--- a/contrib/groff/font/devps/HNR
+++ /dev/null
@@ -1,629 +0,0 @@
-name HNR
-internalname Helvetica-Narrow
-spacewidth 228
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -32
-A w -32
-A v -32
-A u -24
-A Y -81
-A W -40
-A V -56
-A U -40
-A T -97
-A Q -24
-A O -24
-A G -24
-A C -24
-B . -15
-B , -15
-B U -7
-C . -24
-C , -24
-D . -56
-D , -56
-D Y -73
-D W -32
-D V -56
-D A -32
-F r -36
-F . -122
-F o -24
-F e -24
-F , -122
-F a -40
-F A -65
-J u -15
-J . -24
-J , -24
-J a -15
-J A -15
-K y -40
-K u -24
-K o -32
-K e -32
-K O -40
-L y -24
-L ' -130
-L cq -130
-L rq -114
-L Y -114
-L W -56
-L V -89
-L T -89
-O . -32
-O , -32
-O Y -56
-O X -48
-O W -24
-O V -40
-O T -32
-O A -15
-P . -147
-P o -40
-P e -40
-P , -147
-P a -32
-P A -97
-Q U -7
-R Y -40
-R W -24
-R V -40
-R U -32
-R T -24
-R O -15
-S . -15
-S , -15
-T y -97
-T w -97
-T u -97
-T ; -15
-T r -97
-T . -97
-T o -97
-T - -114
-T hy -114
-T char173 -114
-T e -97
-T , -97
-T : -15
-T a -97
-T O -32
-T A -97
-U . -32
-U , -32
-U A -32
-V u -56
-V ; -32
-V . -102
-V o -65
-V - -65
-V hy -65
-V char173 -65
-V e -65
-V , -102
-V : -32
-V a -56
-V O -32
-V G -32
-V A -65
-W y -15
-W u -24
-W . -65
-W o -24
-W - -32
-W hy -32
-W char173 -32
-W e -24
-W , -65
-W a -32
-W O -15
-W A -40
-Y u -89
-Y ; -48
-Y . -114
-Y o -114
-Y i -15
-Y - -114
-Y hy -114
-Y char173 -114
-Y e -114
-Y , -114
-Y : -48
-Y a -114
-Y O -69
-Y A -89
-a y -24
-a w -15
-a v -15
-b y -15
-b v -15
-b u -15
-b . -32
-b l -15
-b , -32
-b b -7
-c k -15
-c , -11
-, ' -81
-, cq -81
-, rq -81
-e y -15
-e x -24
-e w -15
-e v -24
-e . -11
-e , -11
-f ' 41
-f cq 41
-f rq 49
-f . -24
-f o -24
-f e -24
-f .i -22
-f , -24
-f a -24
-g r -7
-h y -24
-k o -15
-k e -15
-m y -11
-m u -7
-n y -11
-n v -15
-n u -7
-o y -24
-o x -24
-o w -11
-o v -11
-o . -32
-o , -32
-/o z -44
-char248 z -44
-/o y -56
-char248 y -56
-/o x -69
-char248 x -69
-/o w -56
-char248 w -56
-/o v -56
-char248 v -56
-/o u -44
-char248 u -44
-/o t -44
-char248 t -44
-/o s -44
-char248 s -44
-/o r -44
-char248 r -44
-/o q -44
-char248 q -44
-/o . -77
-char248 . -77
-/o p -44
-char248 p -44
-/o o -44
-char248 o -44
-/o n -44
-char248 n -44
-/o m -44
-char248 m -44
-/o l -44
-char248 l -44
-/o k -44
-char248 k -44
-/o j -44
-char248 j -44
-/o i -44
-char248 i -44
-/o h -44
-char248 h -44
-/o g -44
-char248 g -44
-/o f -44
-char248 f -44
-/o e -44
-char248 e -44
-/o d -44
-char248 d -44
-/o , -77
-char248 , -77
-/o c -44
-char248 c -44
-/o b -44
-char248 b -44
-/o a -44
-char248 a -44
-p y -24
-p . -28
-p , -28
-. ' -81
-. cq -81
-. rq -81
-` ` -46
-` oq -46
-oq ` -46
-oq oq -46
-' s -40
-cq s -40
-' r -40
-cq r -40
-' ' -46
-' cq -46
-cq ' -46
-cq cq -46
-' d -40
-cq d -40
-r y 25
-r v 25
-r u 12
-r t 33
-r ; 25
-r . -40
-r p 25
-r n 21
-r m 21
-r l 12
-r k 12
-r i 12
-r , -40
-r : 25
-r a -7
-s w -24
-s . -11
-s , -11
-v . -65
-v o -20
-v e -20
-v , -65
-v a -20
-w . -48
-w o -7
-w e -7
-w , -48
-w a -11
-x e -24
-y . -81
-y o -15
-y e -15
-y , -81
-y a -15
-z o -11
-z e -11
-charset
-ha 385,688 2 0000 -- asciicircum
-ti 479,326 0 0001 -- asciitilde
-vS 547,929,19 2 0002 -- Scaron
-vZ 501,929 2 0003 -- Zcaron
-vs 410,734,15 2 0004 -- scaron
-vz 410,734 2 0005 -- zcaron
-:Y 547,901 2 0006 -- Ydieresis
-tm 820,718 2 0007 -- trademark
-aq 157,718 2 0010 -- quotesingle
-space 228 0 0040
-! 228,718 2 0041 -- exclam
-" 291,718 2 0042 -- quotedbl
-dq "
-# 456,688 2 0043 -- numbersign
-sh "
-$ 456,775,115 2 0044 -- dollar
-Do "
-% 729,703,19 2 0045 -- percent
-& 547,718,15 2 0046 -- ampersand
-' 182,718 2 0047 -- quoteright
-cq "
-( 273,733,207 3 0050 -- parenleft
-) 273,733,207 3 0051 -- parenright
-* 319,718 2 0052 -- asterisk
-+ 479,505 0 0053 -- plus
-, 228,106,147 0 0054 -- comma
-- 273,322 0 0055 -- hyphen
-hy "
-char173 "
-. 228,106 0 0056 -- period
-/ 228,737,19 2 0057 -- slash
-sl "
-0 456,703,19 2 0060 -- zero
-1 456,703 2 0061 -- one
-2 456,703 2 0062 -- two
-3 456,703,19 2 0063 -- three
-4 456,703 2 0064 -- four
-5 456,688,19 2 0065 -- five
-6 456,703,19 2 0066 -- six
-7 456,688 2 0067 -- seven
-8 456,703,19 2 0070 -- eight
-9 456,703,19 2 0071 -- nine
-: 228,516 0 0072 -- colon
-; 228,516,147 0 0073 -- semicolon
-< 479,495 0 0074 -- less
-= 479,390 0 0075 -- equal
-> 479,495 0 0076 -- greater
-? 456,727 2 0077 -- question
-@ 832,737,19 2 0100 -- at
-at "
-A 547,718 2 0101 -- A
-B 547,718 2 0102 -- B
-C 592,737,19 2 0103 -- C
-D 592,718 2 0104 -- D
-E 547,718 2 0105 -- E
-F 501,718 2 0106 -- F
-G 638,737,19 2 0107 -- G
-H 592,718 2 0110 -- H
-I 228,718 2 0111 -- I
-J 410,718,19 2 0112 -- J
-K 547,718 2 0113 -- K
-L 456,718 2 0114 -- L
-M 683,718 2 0115 -- M
-N 592,718 2 0116 -- N
-O 638,737,19 2 0117 -- O
-P 547,718 2 0120 -- P
-Q 638,737,56 2 0121 -- Q
-R 592,718 2 0122 -- R
-S 547,737,19 2 0123 -- S
-T 501,718 2 0124 -- T
-U 592,718,19 2 0125 -- U
-V 547,718 2 0126 -- V
-W 774,718 2 0127 -- W
-X 547,718 2 0130 -- X
-Y 547,718 2 0131 -- Y
-Z 501,718 2 0132 -- Z
-[ 228,722,196 2 0133 -- bracketleft
-lB "
-\ 228,737,19 2 0134 -- backslash
-rs "
-] 228,722,196 2 0135 -- bracketright
-rB "
-a^ 273,734 2 0136 -- circumflex
-^ "
-_ 456,0,125 0 0137 -- underscore
-` 182,725 2 0140 -- quoteleft
-oq "
-a 456,538,15 0 0141 -- a
-b 456,718,15 2 0142 -- b
-c 410,538,15 0 0143 -- c
-d 456,718,15 2 0144 -- d
-e 456,538,15 0 0145 -- e
-f 228,728 2 0146 -- f
-g 456,538,220 1 0147 -- g
-h 456,718 2 0150 -- h
-i 182,718 2 0151 -- i
-j 182,718,210 3 0152 -- j
-k 410,718 2 0153 -- k
-l 182,718 2 0154 -- l
-m 683,538 0 0155 -- m
-n 456,538 0 0156 -- n
-o 456,538,14 0 0157 -- o
-p 456,538,207 1 0160 -- p
-q 456,538,207 1 0161 -- q
-r 273,538 0 0162 -- r
-s 410,538,15 0 0163 -- s
-t 228,669,7 2 0164 -- t
-u 456,523,15 0 0165 -- u
-v 410,523 0 0166 -- v
-w 592,523 0 0167 -- w
-x 410,523 0 0170 -- x
-y 410,523,214 1 0171 -- y
-z 410,523 0 0172 -- z
-lC 274,722,196 2 0173 -- braceleft
-{ "
-ba 213,737,19 2 0174 -- bar
-| "
-rC 274,722,196 2 0175 -- braceright
-} "
-a~ 273,722 2 0176 -- tilde
-~ "
-bq 182,106,149 0 0200 -- quotesinglbase
-Fo 456,446 0 0201 -- guillemotleft
-char171 "
-Fc 456,446 0 0202 -- guillemotright
-char187 "
-bu 287,517 0 0203 -- bullet
-Fn 456,737,207 3 0204 -- florin
-f/ 137,703,19 2 0205 -- fraction
-%0 820,703,19 2 0206 -- perthousand
-dg 456,718,159 2 0207 -- dagger
-dd 456,718,159 2 0210 -- daggerdbl
-en 456,313 0 0211 -- endash
-em 820,313 0 0212 -- emdash
-fi 410,728 2 0214 -- fi
-fl 410,728 2 0215 -- fl
-.i 228,523 0 0220 -- dotlessi
-ga 273,734 2 0222 -- grave
-a" 273,734 2 0223 -- hungarumlaut
-a. 273,706 2 0224 -- dotaccent
-ab 273,731 2 0225 -- breve
-ah 273,734 2 0226 -- caron
-ao 273,756 2 0227 -- ring
-ho 273,0,225 1 0230 -- ogonek
-lq 273,725 2 0231 -- quotedblleft
-rq 273,718 2 0232 -- quotedblright
-oe 774,538,15 0 0233 -- oe
-/l 182,718 2 0234 -- lslash
-Bq 273,106,149 0 0235 -- quotedblbase
-OE 820,737,19 2 0236 -- OE
-/L 456,718 2 0237 -- Lslash
-r! 273,523,195 0 0241 -- exclamdown
-char161 "
-ct 456,623,115 0 0242 -- cent
-char162 "
-Po 456,718,16 2 0243 -- sterling
-char163 "
-Cs 456,603 0 0244 -- currency
-char164 "
-Ye 456,688 2 0245 -- yen
-char165 "
-bb 213,737,19 2 0246 -- brokenbar
-char166 "
-sc 456,737,191 2 0247 -- section
-char167 "
-ad 273,706 2 0250 -- dieresis
-char168 "
-co 604,737,19 2 0251 -- copyright
-char169 "
-Of 303,737 2 0252 -- ordfeminine
-char170 "
-fo 273,446 0 0253 -- guilsinglleft
-no 479,390 0 0254 -- logicalnot
-char172 "
-\- 479,289 0 0255 -- minus
-rg 604,737,19 2 0256 -- registered
-char174 "
-a- 273,684 2 0257 -- macron
-char175 "
-de 328,703 2 0260 -- degree
-char176 "
-char177 479,506 0 0261 -- plusminus
-S2 273,703 2 0262 -- twosuperior
-char178 "
-S3 273,703 2 0263 -- threesuperior
-char179 "
-aa 273,734 2 0264 -- acute
-char180 "
-char181 456,523,207 1 0265 -- mu
-ps 440,718,173 2 0266 -- paragraph
-char182 "
-pc 228,315 0 0267 -- periodcentered
-char183 "
-ac 273,0,225 1 0270 -- cedilla
-char184 "
-S1 273,703 2 0271 -- onesuperior
-char185 "
-Om 299,737 2 0272 -- ordmasculine
-char186 "
-fc 273,446 0 0273 -- guilsinglright
-14 684,703,19 2 0274 -- onequarter
-char188 "
-12 684,703,19 2 0275 -- onehalf
-char189 "
-34 684,703,19 2 0276 -- threequarters
-char190 "
-r? 501,525,201 0 0277 -- questiondown
-char191 "
-`A 547,929 2 0300 -- Agrave
-char192 "
-'A 547,929 2 0301 -- Aacute
-char193 "
-^A 547,929 2 0302 -- Acircumflex
-char194 "
-~A 547,917 2 0303 -- Atilde
-char195 "
-:A 547,901 2 0304 -- Adieresis
-char196 "
-oA 547,931 2 0305 -- Aring
-char197 "
-AE 820,718 2 0306 -- AE
-char198 "
-,C 592,737,225 3 0307 -- Ccedilla
-char199 "
-`E 547,929 2 0310 -- Egrave
-char200 "
-'E 547,929 2 0311 -- Eacute
-char201 "
-^E 547,929 2 0312 -- Ecircumflex
-char202 "
-:E 547,901 2 0313 -- Edieresis
-char203 "
-`I 228,929 2 0314 -- Igrave
-char204 "
-'I 228,929 2 0315 -- Iacute
-char205 "
-^I 228,929 2 0316 -- Icircumflex
-char206 "
-:I 228,901 2 0317 -- Idieresis
-char207 "
--D 592,718 2 0320 -- Eth
-char208 "
-~N 592,917 2 0321 -- Ntilde
-char209 "
-`O 638,929,19 2 0322 -- Ograve
-char210 "
-'O 638,929,19 2 0323 -- Oacute
-char211 "
-^O 638,929,19 2 0324 -- Ocircumflex
-char212 "
-~O 638,917,19 2 0325 -- Otilde
-char213 "
-:O 638,901,19 2 0326 -- Odieresis
-char214 "
-char215 479,506 0 0327 -- multiply
-/O 638,737,19 2 0330 -- Oslash
-char216 "
-`U 592,929,19 2 0331 -- Ugrave
-char217 "
-'U 592,929,19 2 0332 -- Uacute
-char218 "
-^U 592,929,19 2 0333 -- Ucircumflex
-char219 "
-:U 592,901,19 2 0334 -- Udieresis
-char220 "
-'Y 547,929 2 0335 -- Yacute
-char221 "
-TP 547,718 2 0336 -- Thorn
-char222 "
-ss 501,728,15 2 0337 -- germandbls
-char223 "
-`a 456,734,15 2 0340 -- agrave
-char224 "
-'a 456,734,15 2 0341 -- aacute
-char225 "
-^a 456,734,15 2 0342 -- acircumflex
-char226 "
-~a 456,722,15 2 0343 -- atilde
-char227 "
-:a 456,706,15 2 0344 -- adieresis
-char228 "
-oa 456,756,15 2 0345 -- aring
-char229 "
-ae 729,538,15 0 0346 -- ae
-char230 "
-,c 410,538,225 1 0347 -- ccedilla
-char231 "
-`e 456,734,15 2 0350 -- egrave
-char232 "
-'e 456,734,15 2 0351 -- eacute
-char233 "
-^e 456,734,15 2 0352 -- ecircumflex
-char234 "
-:e 456,706,15 2 0353 -- edieresis
-char235 "
-`i 228,734 2 0354 -- igrave
-char236 "
-'i 228,734 2 0355 -- iacute
-char237 "
-^i 228,734 2 0356 -- icircumflex
-char238 "
-:i 228,706 2 0357 -- idieresis
-char239 "
-Sd 456,737,15 2 0360 -- eth
-char240 "
-~n 456,722 2 0361 -- ntilde
-char241 "
-`o 456,734,14 2 0362 -- ograve
-char242 "
-'o 456,734,14 2 0363 -- oacute
-char243 "
-^o 456,734,14 2 0364 -- ocircumflex
-char244 "
-~o 456,722,14 2 0365 -- otilde
-char245 "
-:o 456,706,14 2 0366 -- odieresis
-char246 "
-char247 479,524,19 0 0367 -- divide
-/o 501,545,22 0 0370 -- oslash
-char248 "
-`u 456,734,15 2 0371 -- ugrave
-char249 "
-'u 456,734,15 2 0372 -- uacute
-char250 "
-^u 456,734,15 2 0373 -- ucircumflex
-char251 "
-:u 456,706,15 2 0374 -- udieresis
-char252 "
-'y 410,734,214 3 0375 -- yacute
-char253 "
-Tp 456,718,207 3 0376 -- thorn
-char254 "
-:y 410,706,214 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/HR b/contrib/groff/font/devps/HR
deleted file mode 100644
index 3f89e25855a5..000000000000
--- a/contrib/groff/font/devps/HR
+++ /dev/null
@@ -1,629 +0,0 @@
-name HR
-internalname Helvetica
-spacewidth 278
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -40
-A w -40
-A v -40
-A u -30
-A Y -100
-A W -50
-A V -70
-A U -50
-A T -120
-A Q -30
-A O -30
-A G -30
-A C -30
-B . -20
-B , -20
-B U -10
-C . -30
-C , -30
-D . -70
-D , -70
-D Y -90
-D W -40
-D V -70
-D A -40
-F r -45
-F . -150
-F o -30
-F e -30
-F , -150
-F a -50
-F A -80
-J u -20
-J . -30
-J , -30
-J a -20
-J A -20
-K y -50
-K u -30
-K o -40
-K e -40
-K O -50
-L y -30
-L ' -160
-L cq -160
-L rq -140
-L Y -140
-L W -70
-L V -110
-L T -110
-O . -40
-O , -40
-O Y -70
-O X -60
-O W -30
-O V -50
-O T -40
-O A -20
-P . -180
-P o -50
-P e -50
-P , -180
-P a -40
-P A -120
-Q U -10
-R Y -50
-R W -30
-R V -50
-R U -40
-R T -30
-R O -20
-S . -20
-S , -20
-T y -120
-T w -120
-T u -120
-T ; -20
-T r -120
-T . -120
-T o -120
-T - -140
-T hy -140
-T char173 -140
-T e -120
-T , -120
-T : -20
-T a -120
-T O -40
-T A -120
-U . -40
-U , -40
-U A -40
-V u -70
-V ; -40
-V . -125
-V o -80
-V - -80
-V hy -80
-V char173 -80
-V e -80
-V , -125
-V : -40
-V a -70
-V O -40
-V G -40
-V A -80
-W y -20
-W u -30
-W . -80
-W o -30
-W - -40
-W hy -40
-W char173 -40
-W e -30
-W , -80
-W a -40
-W O -20
-W A -50
-Y u -110
-Y ; -60
-Y . -140
-Y o -140
-Y i -20
-Y - -140
-Y hy -140
-Y char173 -140
-Y e -140
-Y , -140
-Y : -60
-Y a -140
-Y O -85
-Y A -110
-a y -30
-a w -20
-a v -20
-b y -20
-b v -20
-b u -20
-b . -40
-b l -20
-b , -40
-b b -10
-c k -20
-c , -15
-, ' -100
-, cq -100
-, rq -100
-e y -20
-e x -30
-e w -20
-e v -30
-e . -15
-e , -15
-f ' 50
-f cq 50
-f rq 60
-f . -30
-f o -30
-f e -30
-f .i -28
-f , -30
-f a -30
-g r -10
-h y -30
-k o -20
-k e -20
-m y -15
-m u -10
-n y -15
-n v -20
-n u -10
-o y -30
-o x -30
-o w -15
-o v -15
-o . -40
-o , -40
-/o z -55
-char248 z -55
-/o y -70
-char248 y -70
-/o x -85
-char248 x -85
-/o w -70
-char248 w -70
-/o v -70
-char248 v -70
-/o u -55
-char248 u -55
-/o t -55
-char248 t -55
-/o s -55
-char248 s -55
-/o r -55
-char248 r -55
-/o q -55
-char248 q -55
-/o . -95
-char248 . -95
-/o p -55
-char248 p -55
-/o o -55
-char248 o -55
-/o n -55
-char248 n -55
-/o m -55
-char248 m -55
-/o l -55
-char248 l -55
-/o k -55
-char248 k -55
-/o j -55
-char248 j -55
-/o i -55
-char248 i -55
-/o h -55
-char248 h -55
-/o g -55
-char248 g -55
-/o f -55
-char248 f -55
-/o e -55
-char248 e -55
-/o d -55
-char248 d -55
-/o , -95
-char248 , -95
-/o c -55
-char248 c -55
-/o b -55
-char248 b -55
-/o a -55
-char248 a -55
-p y -30
-p . -35
-p , -35
-. ' -100
-. cq -100
-. rq -100
-` ` -57
-` oq -57
-oq ` -57
-oq oq -57
-' s -50
-cq s -50
-' r -50
-cq r -50
-' ' -57
-' cq -57
-cq ' -57
-cq cq -57
-' d -50
-cq d -50
-r y 30
-r v 30
-r u 15
-r t 40
-r ; 30
-r . -50
-r p 30
-r n 25
-r m 25
-r l 15
-r k 15
-r i 15
-r , -50
-r : 30
-r a -10
-s w -30
-s . -15
-s , -15
-v . -80
-v o -25
-v e -25
-v , -80
-v a -25
-w . -60
-w o -10
-w e -10
-w , -60
-w a -15
-x e -30
-y . -100
-y o -20
-y e -20
-y , -100
-y a -20
-z o -15
-z e -15
-charset
-ha 469,688 2 0000 -- asciicircum
-ti 584,326 0 0001 -- asciitilde
-vS 667,929,19 2 0002 -- Scaron
-vZ 611,929 2 0003 -- Zcaron
-vs 500,734,15 2 0004 -- scaron
-vz 500,734 2 0005 -- zcaron
-:Y 667,901 2 0006 -- Ydieresis
-tm 1000,718 2 0007 -- trademark
-aq 191,718 2 0010 -- quotesingle
-space 278 0 0040
-! 278,718 2 0041 -- exclam
-" 355,718 2 0042 -- quotedbl
-dq "
-# 556,688 2 0043 -- numbersign
-sh "
-$ 556,775,115 2 0044 -- dollar
-Do "
-% 889,703,19 2 0045 -- percent
-& 667,718,15 2 0046 -- ampersand
-' 222,718 2 0047 -- quoteright
-cq "
-( 333,733,207 3 0050 -- parenleft
-) 333,733,207 3 0051 -- parenright
-* 389,718 2 0052 -- asterisk
-+ 584,505 0 0053 -- plus
-, 278,106,147 0 0054 -- comma
-- 333,322 0 0055 -- hyphen
-hy "
-char173 "
-. 278,106 0 0056 -- period
-/ 278,737,19 2 0057 -- slash
-sl "
-0 556,703,19 2 0060 -- zero
-1 556,703 2 0061 -- one
-2 556,703 2 0062 -- two
-3 556,703,19 2 0063 -- three
-4 556,703 2 0064 -- four
-5 556,688,19 2 0065 -- five
-6 556,703,19 2 0066 -- six
-7 556,688 2 0067 -- seven
-8 556,703,19 2 0070 -- eight
-9 556,703,19 2 0071 -- nine
-: 278,516 0 0072 -- colon
-; 278,516,147 0 0073 -- semicolon
-< 584,495 0 0074 -- less
-= 584,390 0 0075 -- equal
-> 584,495 0 0076 -- greater
-? 556,727 2 0077 -- question
-@ 1015,737,19 2 0100 -- at
-at "
-A 667,718 2 0101 -- A
-B 667,718 2 0102 -- B
-C 722,737,19 2 0103 -- C
-D 722,718 2 0104 -- D
-E 667,718 2 0105 -- E
-F 611,718 2 0106 -- F
-G 778,737,19 2 0107 -- G
-H 722,718 2 0110 -- H
-I 278,718 2 0111 -- I
-J 500,718,19 2 0112 -- J
-K 667,718 2 0113 -- K
-L 556,718 2 0114 -- L
-M 833,718 2 0115 -- M
-N 722,718 2 0116 -- N
-O 778,737,19 2 0117 -- O
-P 667,718 2 0120 -- P
-Q 778,737,56 2 0121 -- Q
-R 722,718 2 0122 -- R
-S 667,737,19 2 0123 -- S
-T 611,718 2 0124 -- T
-U 722,718,19 2 0125 -- U
-V 667,718 2 0126 -- V
-W 944,718 2 0127 -- W
-X 667,718 2 0130 -- X
-Y 667,718 2 0131 -- Y
-Z 611,718 2 0132 -- Z
-[ 278,722,196 2 0133 -- bracketleft
-lB "
-\ 278,737,19 2 0134 -- backslash
-rs "
-] 278,722,196 2 0135 -- bracketright
-rB "
-a^ 333,734 2 0136 -- circumflex
-^ "
-_ 556,0,125 0 0137 -- underscore
-` 222,725 2 0140 -- quoteleft
-oq "
-a 556,538,15 0 0141 -- a
-b 556,718,15 2 0142 -- b
-c 500,538,15 0 0143 -- c
-d 556,718,15 2 0144 -- d
-e 556,538,15 0 0145 -- e
-f 278,728 2 0146 -- f
-g 556,538,220 1 0147 -- g
-h 556,718 2 0150 -- h
-i 222,718 2 0151 -- i
-j 222,718,210 3 0152 -- j
-k 500,718 2 0153 -- k
-l 222,718 2 0154 -- l
-m 833,538 0 0155 -- m
-n 556,538 0 0156 -- n
-o 556,538,14 0 0157 -- o
-p 556,538,207 1 0160 -- p
-q 556,538,207 1 0161 -- q
-r 333,538 0 0162 -- r
-s 500,538,15 0 0163 -- s
-t 278,669,7 2 0164 -- t
-u 556,523,15 0 0165 -- u
-v 500,523 0 0166 -- v
-w 722,523 0 0167 -- w
-x 500,523 0 0170 -- x
-y 500,523,214 1 0171 -- y
-z 500,523 0 0172 -- z
-lC 334,722,196 2 0173 -- braceleft
-{ "
-ba 260,737,19 2 0174 -- bar
-| "
-rC 334,722,196 2 0175 -- braceright
-} "
-a~ 333,722 2 0176 -- tilde
-~ "
-bq 222,106,149 0 0200 -- quotesinglbase
-Fo 556,446 0 0201 -- guillemotleft
-char171 "
-Fc 556,446 0 0202 -- guillemotright
-char187 "
-bu 350,517 0 0203 -- bullet
-Fn 556,737,207 3 0204 -- florin
-f/ 167,703,19 2 0205 -- fraction
-%0 1000,703,19 2 0206 -- perthousand
-dg 556,718,159 2 0207 -- dagger
-dd 556,718,159 2 0210 -- daggerdbl
-en 556,313 0 0211 -- endash
-em 1000,313 0 0212 -- emdash
-fi 500,728 2 0214 -- fi
-fl 500,728 2 0215 -- fl
-.i 278,523 0 0220 -- dotlessi
-ga 333,734 2 0222 -- grave
-a" 333,734 2 0223 -- hungarumlaut
-a. 333,706 2 0224 -- dotaccent
-ab 333,731 2 0225 -- breve
-ah 333,734 2 0226 -- caron
-ao 333,756 2 0227 -- ring
-ho 333,0,225 1 0230 -- ogonek
-lq 333,725 2 0231 -- quotedblleft
-rq 333,718 2 0232 -- quotedblright
-oe 944,538,15 0 0233 -- oe
-/l 222,718 2 0234 -- lslash
-Bq 333,106,149 0 0235 -- quotedblbase
-OE 1000,737,19 2 0236 -- OE
-/L 556,718 2 0237 -- Lslash
-r! 333,523,195 0 0241 -- exclamdown
-char161 "
-ct 556,623,115 0 0242 -- cent
-char162 "
-Po 556,718,16 2 0243 -- sterling
-char163 "
-Cs 556,603 0 0244 -- currency
-char164 "
-Ye 556,688 2 0245 -- yen
-char165 "
-bb 260,737,19 2 0246 -- brokenbar
-char166 "
-sc 556,737,191 2 0247 -- section
-char167 "
-ad 333,706 2 0250 -- dieresis
-char168 "
-co 737,737,19 2 0251 -- copyright
-char169 "
-Of 370,737 2 0252 -- ordfeminine
-char170 "
-fo 333,446 0 0253 -- guilsinglleft
-no 584,390 0 0254 -- logicalnot
-char172 "
-\- 584,289 0 0255 -- minus
-rg 737,737,19 2 0256 -- registered
-char174 "
-a- 333,684 2 0257 -- macron
-char175 "
-de 400,703 2 0260 -- degree
-char176 "
-char177 584,506 0 0261 -- plusminus
-S2 333,703 2 0262 -- twosuperior
-char178 "
-S3 333,703 2 0263 -- threesuperior
-char179 "
-aa 333,734 2 0264 -- acute
-char180 "
-char181 556,523,207 1 0265 -- mu
-ps 537,718,173 2 0266 -- paragraph
-char182 "
-pc 278,315 0 0267 -- periodcentered
-char183 "
-ac 333,0,225 1 0270 -- cedilla
-char184 "
-S1 333,703 2 0271 -- onesuperior
-char185 "
-Om 365,737 2 0272 -- ordmasculine
-char186 "
-fc 333,446 0 0273 -- guilsinglright
-14 834,703,19 2 0274 -- onequarter
-char188 "
-12 834,703,19 2 0275 -- onehalf
-char189 "
-34 834,703,19 2 0276 -- threequarters
-char190 "
-r? 611,525,201 0 0277 -- questiondown
-char191 "
-`A 667,929 2 0300 -- Agrave
-char192 "
-'A 667,929 2 0301 -- Aacute
-char193 "
-^A 667,929 2 0302 -- Acircumflex
-char194 "
-~A 667,917 2 0303 -- Atilde
-char195 "
-:A 667,901 2 0304 -- Adieresis
-char196 "
-oA 667,931 2 0305 -- Aring
-char197 "
-AE 1000,718 2 0306 -- AE
-char198 "
-,C 722,737,225 3 0307 -- Ccedilla
-char199 "
-`E 667,929 2 0310 -- Egrave
-char200 "
-'E 667,929 2 0311 -- Eacute
-char201 "
-^E 667,929 2 0312 -- Ecircumflex
-char202 "
-:E 667,901 2 0313 -- Edieresis
-char203 "
-`I 278,929 2 0314 -- Igrave
-char204 "
-'I 278,929 2 0315 -- Iacute
-char205 "
-^I 278,929 2 0316 -- Icircumflex
-char206 "
-:I 278,901 2 0317 -- Idieresis
-char207 "
--D 722,718 2 0320 -- Eth
-char208 "
-~N 722,917 2 0321 -- Ntilde
-char209 "
-`O 778,929,19 2 0322 -- Ograve
-char210 "
-'O 778,929,19 2 0323 -- Oacute
-char211 "
-^O 778,929,19 2 0324 -- Ocircumflex
-char212 "
-~O 778,917,19 2 0325 -- Otilde
-char213 "
-:O 778,901,19 2 0326 -- Odieresis
-char214 "
-char215 584,506 0 0327 -- multiply
-/O 778,737,19 2 0330 -- Oslash
-char216 "
-`U 722,929,19 2 0331 -- Ugrave
-char217 "
-'U 722,929,19 2 0332 -- Uacute
-char218 "
-^U 722,929,19 2 0333 -- Ucircumflex
-char219 "
-:U 722,901,19 2 0334 -- Udieresis
-char220 "
-'Y 667,929 2 0335 -- Yacute
-char221 "
-TP 667,718 2 0336 -- Thorn
-char222 "
-ss 611,728,15 2 0337 -- germandbls
-char223 "
-`a 556,734,15 2 0340 -- agrave
-char224 "
-'a 556,734,15 2 0341 -- aacute
-char225 "
-^a 556,734,15 2 0342 -- acircumflex
-char226 "
-~a 556,722,15 2 0343 -- atilde
-char227 "
-:a 556,706,15 2 0344 -- adieresis
-char228 "
-oa 556,756,15 2 0345 -- aring
-char229 "
-ae 889,538,15 0 0346 -- ae
-char230 "
-,c 500,538,225 1 0347 -- ccedilla
-char231 "
-`e 556,734,15 2 0350 -- egrave
-char232 "
-'e 556,734,15 2 0351 -- eacute
-char233 "
-^e 556,734,15 2 0352 -- ecircumflex
-char234 "
-:e 556,706,15 2 0353 -- edieresis
-char235 "
-`i 278,734 2 0354 -- igrave
-char236 "
-'i 278,734 2 0355 -- iacute
-char237 "
-^i 278,734 2 0356 -- icircumflex
-char238 "
-:i 278,706 2 0357 -- idieresis
-char239 "
-Sd 556,737,15 2 0360 -- eth
-char240 "
-~n 556,722 2 0361 -- ntilde
-char241 "
-`o 556,734,14 2 0362 -- ograve
-char242 "
-'o 556,734,14 2 0363 -- oacute
-char243 "
-^o 556,734,14 2 0364 -- ocircumflex
-char244 "
-~o 556,722,14 2 0365 -- otilde
-char245 "
-:o 556,706,14 2 0366 -- odieresis
-char246 "
-char247 584,524,19 0 0367 -- divide
-/o 611,545,22 0 0370 -- oslash
-char248 "
-`u 556,734,15 2 0371 -- ugrave
-char249 "
-'u 556,734,15 2 0372 -- uacute
-char250 "
-^u 556,734,15 2 0373 -- ucircumflex
-char251 "
-:u 556,706,15 2 0374 -- udieresis
-char252 "
-'y 500,734,214 3 0375 -- yacute
-char253 "
-Tp 556,718,207 3 0376 -- thorn
-char254 "
-:y 500,706,214 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/Makefile.sub b/contrib/groff/font/devps/Makefile.sub
deleted file mode 100644
index 08b61e27df84..000000000000
--- a/contrib/groff/font/devps/Makefile.sub
+++ /dev/null
@@ -1,35 +0,0 @@
-DEV=ps
-DISTFILES=text.enc download \
- S ZD ZDR SS AB ABI AI AR BMB BMBI BMI BMR \
- CB CBI CI CR HB HBI HI HR HNB HNBI HNI HNR \
- NB NBI NI NR PB PBI PI PR TB TBI TI TR ZCMI
-PSFILES=prologue symbolsl.pfa zapfdr.pfa
-DEVGENFILES=generate/Makefile generate/afmname generate/dingbats.map \
- generate/dingbats.rmap generate/lgreekmap generate/symbol.sed \
- generate/symbolchars generate/symbolsl.afm generate/textmap
-DEVFILES=DESC $(PSFILES) $(DISTFILES) $(DEVGENFILES)
-
-CLEANADD=DESC $(PSFILES)
-
-DESC: DESC.in
- -rm -f DESC
- cat $(srcdir)/DESC.in >DESC
- echo broken $(BROKEN_SPOOLER_FLAGS) >>DESC
- if test "$(PAGE)" = A4; then \
- echo "paperlength 841890" >>DESC; \
- else \
- echo "paperlength 792000" >>DESC; \
- fi
- test -z '$(PSPRINT)' || echo print '$(PSPRINT)' >>DESC
-
-fonts: DESC
- $(MAKE) -f $(srcdir)/generate/Makefile \
- srcdir=$(srcdir)/generate DESC=$(srcdir)/DESC.in
-
-prologue: prologue.ps
-zapfdr.pfa: zapfdr.ps
-symbolsl.pfa: symbolsl.ps
-
-$(PSFILES):
- -rm -f $@
- sed -f $(srcdir)/psstrip.sed $? >$@
diff --git a/contrib/groff/font/devps/NB b/contrib/groff/font/devps/NB
deleted file mode 100644
index 1a926cb812d4..000000000000
--- a/contrib/groff/font/devps/NB
+++ /dev/null
@@ -1,473 +0,0 @@
-name NB
-internalname NewCenturySchlbk-Bold
-spacewidth 287
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -18
-A w -18
-A v -18
-A ' -74
-A cq -74
-A rq -74
-A Y -91
-A W -74
-A V -74
-A U -18
-A T -55
-C . -18
-C , -18
-D . -25
-D , -25
-F r -18
-F . -125
-F o -55
-F i -18
-F e -55
-F , -125
-F a -74
-J u -18
-J . -55
-J o -18
-J e -18
-J , -55
-J a -18
-J A -18
-K y -25
-K u -18
-L y -25
-L ' -100
-L cq -100
-L rq -100
-L Y -74
-L W -74
-L V -100
-L T -100
-N . -18
-N , -18
-O . -25
-O , -25
-O T 10
-P . -150
-P o -55
-P e -55
-P , -150
-P a -55
-P A -74
-S . -18
-S , -18
-T u -18
-T r -18
-T . -100
-T o -74
-T i -18
-T - -125
-T hy -125
-T char173 -125
-T e -74
-T , -100
-T a -74
-T O 10
-T A -55
-U . -25
-U , -25
-U A -18
-V u -55
-V ; -37
-V . -125
-V o -74
-V i -18
-V - -100
-V hy -100
-V char173 -100
-V e -74
-V , -125
-V : -37
-V a -74
-V A -74
-W y -25
-W u -37
-W ; -55
-W . -100
-W o -74
-W i -18
-W - -100
-W hy -100
-W char173 -100
-W e -74
-W , -100
-W : -55
-W a -74
-W A -74
-Y u -55
-Y ; -25
-Y . -100
-Y o -100
-Y i -18
-Y - -125
-Y hy -125
-Y char173 -125
-Y e -100
-Y , -100
-Y : -25
-Y a -100
-Y A -91
-, ' -18
-, cq -18
-, rq -18
-f ' 75
-f cq 75
-f rq 75
-. ' -18
-. cq -18
-. rq -18
-lq A -74
-` A -74
-oq A -74
-' s -25
-cq s -25
-' d -25
-cq d -25
-r . -74
-r , -74
-v . -100
-v , -100
-w . -100
-w , -100
-y . -100
-y , -100
-charset
-ha 606,690 2 0000 -- asciicircum
-ti 606,346 0 0001 -- asciitilde
-vS 667,952,15 2 0002 -- Scaron
-vZ 667,952 2 0003 -- Zcaron
-vs 500,725,15 2 0004 -- scaron
-vz 537,725 2 0005 -- zcaron
-:Y 722,921 2 0006 -- Ydieresis
-tm 1000,722 2 0007 -- trademark
-aq 241,737 2 0010 -- quotesingle
-space 287 0 0040
-! 296,737,15 2 0041 -- exclam
-" 333,737 2 0042 -- quotedbl
-dq "
-# 574,690 2 0043 -- numbersign
-sh "
-$ 574,810,141 2 0044 -- dollar
-Do "
-% 833,705,15 2 0045 -- percent
-& 852,737,15 2 0046 -- ampersand
-' 241,737 2 0047 -- quoteright
-cq "
-( 389,745,117 2 0050 -- parenleft
-) 389,745,117 2 0051 -- parenright
-* 500,737 2 0052 -- asterisk
-+ 606,506 0 0053 -- plus
-, 278,175,184 0 0054 -- comma
-- 333,302 0 0055 -- hyphen
-hy "
-char173 "
-. 278,175,15 0 0056 -- period
-/ 278,737,15 2 0057 -- slash
-sl "
-0 574,705,15 2 0060 -- zero
-1 574,705 2 0061 -- one
-2 574,705 2 0062 -- two
-3 574,705,15 2 0063 -- three
-4 574,705 2 0064 -- four
-5 574,705,15 2 0065 -- five
-6 574,705,15 2 0066 -- six
-7 574,705,15 2 0067 -- seven
-8 574,705,15 2 0070 -- eight
-9 574,705,15 2 0071 -- nine
-: 278,485,15 0 0072 -- colon
-; 278,485,184 0 0073 -- semicolon
-< 606,515,9 0 0074 -- less
-= 606,403 0 0075 -- equal
-> 606,515,9 0 0076 -- greater
-? 500,737,15 2 0077 -- question
-@ 747,737,15 2 0100 -- at
-at "
-A 759,737 2 0101 -- A
-B 778,722 2 0102 -- B
-C 778,737,15 2 0103 -- C
-D 833,722 2 0104 -- D
-E 759,722 2 0105 -- E
-F 722,722 2 0106 -- F
-G 833,737,15 2 0107 -- G
-H 870,722 2 0110 -- H
-I 444,722 2 0111 -- I
-J 648,722,15 2 0112 -- J
-K 815,722 2 0113 -- K
-L 722,722 2 0114 -- L
-M 981,722 2 0115 -- M
-N 833,722,10 2 0116 -- N
-O 833,737,15 2 0117 -- O
-P 759,722 2 0120 -- P
-Q 833,737,189 2 0121 -- Q
-R 815,722,15 2 0122 -- R
-S 667,737,15 2 0123 -- S
-T 722,722 2 0124 -- T
-U 833,722,15 2 0125 -- U
-V 759,722,10 2 0126 -- V
-W 981,722,10 2 0127 -- W
-X 722,722 2 0130 -- X
-Y 722,722 2 0131 -- Y
-Z 667,722 2 0132 -- Z
-[ 389,737,109 2 0133 -- bracketleft
-lB "
-\ 606,737,15 2 0134 -- backslash
-rs "
-] 389,737,109 2 0135 -- bracketright
-rB "
-a^ 333,725 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 241,737 2 0140 -- quoteleft
-oq "
-a 611,485,15 0 0141 -- a
-b 648,737,15 2 0142 -- b
-c 556,485,15 0 0143 -- c
-d 667,737,15 2 0144 -- d
-e 574,485,15 0 0145 -- e
-f 389,737 2 0146 -- f
-g 611,535,205 1 0147 -- g
-h 685,737 2 0150 -- h
-i 370,737 2 0151 -- i
-j 352,737,205 3 0152 -- j
-k 667,737 2 0153 -- k
-l 352,737 2 0154 -- l
-m 963,485 0 0155 -- m
-n 685,485 0 0156 -- n
-o 611,485,15 0 0157 -- o
-p 667,485,205 1 0160 -- p
-q 648,485,205 1 0161 -- q
-r 519,485 0 0162 -- r
-s 500,485,15 0 0163 -- s
-t 426,675,15 2 0164 -- t
-u 685,475,15 0 0165 -- u
-v 611,475,10 0 0166 -- v
-w 889,475,10 0 0167 -- w
-x 611,475 0 0170 -- x
-y 611,475,205 1 0171 -- y
-z 537,475 0 0172 -- z
-lC 389,737,109 2 0173 -- braceleft
-{ "
-ba 606,750,250 3 0174 -- bar
-| "
-rC 389,737,109 2 0175 -- braceright
-} "
-a~ 333,705 2 0176 -- tilde
-~ "
-bq 241,175,184 0 0200 -- quotesinglbase
-Fo 500,397 0 0201 -- guillemotleft
-char171 "
-Fc 500,397 0 0202 -- guillemotright
-char187 "
-bu 606,542 0 0203 -- bullet
-Fn 574,737,205 3 0204 -- florin
-f/ 167,705,15 2 0205 -- fraction
-%0 1000,705,15 2 0206 -- perthousand
-dg 500,737,101 2 0207 -- dagger
-dd 500,737,89 2 0210 -- daggerdbl
-en 500,292 0 0211 -- endash
-em 1000,292 0 0212 -- emdash
-fi 685,737 2 0214 -- fi
-fl 685,737 2 0215 -- fl
-.i 370,475 0 0220 -- dotlessi
-ga 333,737 2 0222 -- grave
-a" 333,737 2 0223 -- hungarumlaut
-a. 333,694 2 0224 -- dotaccent
-ab 333,714 2 0225 -- breve
-ah 333,725 2 0226 -- caron
-ao 333,761 2 0227 -- ring
-ho 333,3,163 0 0230 -- ogonek
-lq 481,737 2 0231 -- quotedblleft
-rq 481,737 2 0232 -- quotedblright
-oe 907,485,15 0 0233 -- oe
-/l 352,737 2 0234 -- lslash
-Bq 481,175,184 0 0235 -- quotedblbase
-OE 1000,722 2 0236 -- OE
-/L 722,722 2 0237 -- Lslash
-r! 296,547,205 1 0241 -- exclamdown
-char161 "
-ct 574,572,102 0 0242 -- cent
-char162 "
-Po 574,705,15 2 0243 -- sterling
-char163 "
-Cs 574,605 0 0244 -- currency
-char164 "
-Ye 574,690 2 0245 -- yen
-char165 "
-bb 606,675,175 2 0246 -- brokenbar
-char166 "
-sc 500,737,86 2 0247 -- section
-char167 "
-ad 333,694 2 0250 -- dieresis
-char168 "
-co 747,737,15 2 0251 -- copyright
-char169 "
-Of 367,705 2 0252 -- ordfeminine
-char170 "
-fo 333,397 0 0253 -- guilsinglleft
-no 606,403 0 0254 -- logicalnot
-char172 "
-\- 606,307 0 0255 -- minus
-rg 747,737,15 2 0256 -- registered
-char174 "
-a- 333,664 0 0257 -- macron
-char175 "
-de 400,705 2 0260 -- degree
-char176 "
-char177 606,506 0 0261 -- plusminus
-S2 344,705 2 0262 -- twosuperior
-char178 "
-S3 344,705 2 0263 -- threesuperior
-char179 "
-aa 333,737 2 0264 -- acute
-char180 "
-char181 685,475,205 1 0265 -- mu
-ps 747,722,71 2 0266 -- paragraph
-char182 "
-pc 278,372 0 0267 -- periodcentered
-char183 "
-ac 333,0,224 1 0270 -- cedilla
-char184 "
-S1 344,705 2 0271 -- onesuperior
-char185 "
-Om 367,705 2 0272 -- ordmasculine
-char186 "
-fc 333,397 0 0273 -- guilsinglright
-14 861,705,15 2 0274 -- onequarter
-char188 "
-12 861,705,15 2 0275 -- onehalf
-char189 "
-34 861,705,15 2 0276 -- threequarters
-char190 "
-r? 500,547,205 1 0277 -- questiondown
-char191 "
-`A 759,964 2 0300 -- Agrave
-char192 "
-'A 759,964 2 0301 -- Aacute
-char193 "
-^A 759,952 2 0302 -- Acircumflex
-char194 "
-~A 759,932 2 0303 -- Atilde
-char195 "
-:A 759,921 2 0304 -- Adieresis
-char196 "
-oA 759,988 2 0305 -- Aring
-char197 "
-AE 981,722 2 0306 -- AE
-char198 "
-,C 778,737,224 3 0307 -- Ccedilla
-char199 "
-`E 759,964 2 0310 -- Egrave
-char200 "
-'E 759,964 2 0311 -- Eacute
-char201 "
-^E 759,952 2 0312 -- Ecircumflex
-char202 "
-:E 759,921 2 0313 -- Edieresis
-char203 "
-`I 444,964 2 0314 -- Igrave
-char204 "
-'I 444,964 2 0315 -- Iacute
-char205 "
-^I 444,952 2 0316 -- Icircumflex
-char206 "
-:I 444,921 2 0317 -- Idieresis
-char207 "
--D 833,722 2 0320 -- Eth
-char208 "
-~N 833,932,10 2 0321 -- Ntilde
-char209 "
-`O 833,964,15 2 0322 -- Ograve
-char210 "
-'O 833,964,15 2 0323 -- Oacute
-char211 "
-^O 833,952,15 2 0324 -- Ocircumflex
-char212 "
-~O 833,932,15 2 0325 -- Otilde
-char213 "
-:O 833,921,15 2 0326 -- Odieresis
-char214 "
-char215 606,491 0 0327 -- multiply
-/O 833,775,53 2 0330 -- Oslash
-char216 "
-`U 833,964,15 2 0331 -- Ugrave
-char217 "
-'U 833,964,15 2 0332 -- Uacute
-char218 "
-^U 833,952,15 2 0333 -- Ucircumflex
-char219 "
-:U 833,921,15 2 0334 -- Udieresis
-char220 "
-'Y 722,964 2 0335 -- Yacute
-char221 "
-TP 759,722 2 0336 -- Thorn
-char222 "
-ss 611,737,15 2 0337 -- germandbls
-char223 "
-`a 611,737,15 2 0340 -- agrave
-char224 "
-'a 611,737,15 2 0341 -- aacute
-char225 "
-^a 611,725,15 2 0342 -- acircumflex
-char226 "
-~a 611,705,15 2 0343 -- atilde
-char227 "
-:a 611,694,15 2 0344 -- adieresis
-char228 "
-oa 611,761,15 2 0345 -- aring
-char229 "
-ae 870,485,15 0 0346 -- ae
-char230 "
-,c 556,485,224 1 0347 -- ccedilla
-char231 "
-`e 574,737,15 2 0350 -- egrave
-char232 "
-'e 574,737,15 2 0351 -- eacute
-char233 "
-^e 574,725,15 2 0352 -- ecircumflex
-char234 "
-:e 574,694,15 2 0353 -- edieresis
-char235 "
-`i 370,737 2 0354 -- igrave
-char236 "
-'i 370,737 2 0355 -- iacute
-char237 "
-^i 370,725 2 0356 -- icircumflex
-char238 "
-:i 370,694 2 0357 -- idieresis
-char239 "
-Sd 611,737,15 2 0360 -- eth
-char240 "
-~n 685,705 2 0361 -- ntilde
-char241 "
-`o 611,737,15 2 0362 -- ograve
-char242 "
-'o 611,737,15 2 0363 -- oacute
-char243 "
-^o 611,725,15 2 0364 -- ocircumflex
-char244 "
-~o 611,705,15 2 0365 -- otilde
-char245 "
-:o 611,694,15 2 0366 -- odieresis
-char246 "
-char247 606,546,40 0 0367 -- divide
-/o 611,573,103 0 0370 -- oslash
-char248 "
-`u 685,737,15 2 0371 -- ugrave
-char249 "
-'u 685,737,15 2 0372 -- uacute
-char250 "
-^u 685,725,15 2 0373 -- ucircumflex
-char251 "
-:u 685,694,15 2 0374 -- udieresis
-char252 "
-'y 611,737,205 3 0375 -- yacute
-char253 "
-Tp 667,737,205 3 0376 -- thorn
-char254 "
-:y 611,694,205 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/NBI b/contrib/groff/font/devps/NBI
deleted file mode 100644
index 97e4f46cd51b..000000000000
--- a/contrib/groff/font/devps/NBI
+++ /dev/null
@@ -1,594 +0,0 @@
-name NBI
-internalname NewCenturySchlbk-BoldItalic
-slant 16
-spacewidth 287
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -33
-A w -25
-A v -10
-A u -15
-A ' -95
-A cq -95
-A rq -95
-A Y -70
-A W -84
-A V -100
-A U -32
-A T 5
-A Q 5
-A O 5
-A G 5
-A C 5
-B . 15
-B , 15
-B U 15
-B A -11
-C A -5
-D . -11
-D , -11
-D Y 6
-D W -11
-D V -18
-F r -27
-F . -91
-F o -47
-F i -41
-F e -41
-F , -91
-F a -47
-F A -79
-J u -39
-J . -74
-J o -40
-J e -33
-J , -74
-J a -40
-J A -30
-K y -48
-K u -4
-K o -4
-K e 18
-L y -30
-L ' -100
-L cq -100
-L rq -100
-L Y -55
-L W -69
-L V -97
-L T -75
-N . -49
-N , -49
-O . -18
-O , -18
-O X -18
-O W -15
-O V -24
-O A -5
-P . -100
-P o -40
-P e -33
-P , -100
-P a -40
-P A -80
-R W -14
-R V -24
-S . -18
-S , -18
-T y -30
-T w -30
-T u -22
-T r -9
-T . -55
-T o -40
-T i -22
-T - -75
-T hy -75
-T char173 -75
-T h -9
-T e -33
-T , -55
-T a -40
-T O 11
-T A -60
-U . -25
-U , -25
-U A -42
-V u -70
-V ; 6
-V . -94
-V o -71
-V i -35
-V - -94
-V hy -94
-V char173 -94
-V e -66
-V , -94
-V : -49
-V a -55
-V O -19
-V G -12
-V A -100
-W y -41
-W u -25
-W ; -22
-W . -86
-W o -33
-W i -27
-W - -61
-W hy -61
-W char173 -61
-W h 5
-W e -39
-W , -86
-W : -22
-W a -33
-W O -11
-W A -66
-Y u -58
-Y ; -55
-Y . -91
-Y o -77
-Y i -22
-Y - -91
-Y hy -91
-Y char173 -91
-Y e -71
-Y , -91
-Y : -55
-Y a -77
-Y A -79
-a y -8
-a w -8
-a v 6
-b y -6
-b v 8
-b . 6
-b , 6
-c y -20
-c . -8
-c l -13
-c k -8
-c h -18
-c , -8
-, ' -18
-, cq -18
-, rq -18
-d y -15
-d w -15
-e y -15
-e x -5
-e w -15
-e p -11
-e g -4
-e b -8
-f ' 105
-f cq 105
-f rq 105
-f . -28
-f o 7
-f l 7
-f i 7
-f e 14
-f .i 7
-f , -28
-f a 8
-g y -11
-g r 11
-g . -5
-g , -5
-h y -20
-i v 7
-k y -15
-k o -22
-k e -16
-l y -7
-l w -7
-m y -20
-m u -11
-n y -20
-n v -7
-n u -11
-o y -11
-o w -8
-o v 6
-p y -4
-p . 8
-p , 8
-. ' -18
-. cq -18
-. rq -18
-lq ` 20
-lq oq 20
-lq A -60
-` A -80
-oq A -80
-' v -16
-cq v -16
-' t -22
-cq t -22
-' s -46
-cq s -46
-' r -9
-cq r -9
-' l -22
-cq l -22
-' d -41
-cq d -41
-r y -20
-r v -7
-r u -11
-r t -11
-r ; 9
-r s -20
-r ' 9
-r cq 9
-r . -90
-r p -17
-r o -11
-r l -14
-r k 9
-r i -14
-r - -16
-r hy -16
-r char173 -16
-r g -11
-r e -7
-r d -7
-r , -90
-r : 9
-r a -11
-s . 11
-s , 11
-v . -11
-v o -6
-v , -11
-v a -6
-w . -17
-w o -14
-w e -8
-w , -17
-w a -14
-x e 5
-y . -25
-y o 8
-y e 15
-y , -25
-y a 8
-z e 4
-charset
-ha 606,690,0,0,-16 2 0000 -- asciicircum
-ti 606,346,0,0,-22 0 0001 -- asciitilde
-vS 685,930,15,31,49,31 2 0002 -- Scaron
-vZ 704,930,0,57,83,57 2 0003 -- Zcaron
-vs 481,705,15,46,50,46 2 0004 -- scaron
-vz 519,695,15,4,69,4 2 0005 -- zcaron
-:Y 704,915,0,121,37,109 2 0006 -- Ydieresis
-tm 950,722,0,117,8,109 2 0007 -- trademark
-aq 287,737,0,13,-62,13 2 0010 -- quotesingle
-space 287 0 0040
-! 333,737,15,50,50,50 2 0041 -- exclam
-" 400,737,0,78,-16,78 2 0042 -- quotedbl
-dq "
-# 574,690,0,20,20,20 2 0043 -- numbersign
-sh "
-$ 574,810,120,41,41,41 2 0044 -- dollar
-Do "
-% 889,727,28,0,-4 2 0045 -- percent
-& 889,737,15,0,18 2 0046 -- ampersand
-' 259,737,0,66,2,66 2 0047 -- quoteright
-cq "
-( 407,745,117,97,-22,97 2 0050 -- parenleft
-) 407,745,117,0,120 2 0051 -- parenright
-* 500,737,0,48,-8,48 2 0052 -- asterisk
-+ 606,506 0 0053 -- plus
-, 287,157,192,0,107 0 0054 -- comma
-- 333,299,0,0,48 0 0055 -- hyphen
-hy "
-char173 "
-. 287,157,15,0,70 0 0056 -- period
-/ 278,737,15,92,91,92 2 0057 -- slash
-sl "
-0 574,705,15,29,29,29 2 0060 -- zero
-1 574,705,0,0,25 2 0061 -- one
-2 574,705,3,14,88,14 2 0062 -- two
-3 574,705,15,12,57,12 2 0063 -- three
-4 574,705,0,20,63,20 2 0064 -- four
-5 574,705,15,50,50,50 2 0065 -- five
-6 574,705,15,50,19,50 2 0066 -- six
-7 574,705,15,69,-14,69 2 0067 -- seven
-8 574,705,15,28,50,28 2 0070 -- eight
-9 574,705,15,19,50,19 2 0071 -- nine
-: 287,477,15,0,70 0 0072 -- colon
-; 287,477,192,0,107 0 0073 -- semicolon
-< 606,515,9 0 0074 -- less
-= 606,403 0 0075 -- equal
-> 606,514,8 0 0076 -- greater
-? 481,737,15,20,-29,20 2 0077 -- question
-@ 747,737,15,54,54,54 2 0100 -- at
-at "
-A 741,737,0,25,125,25 2 0101 -- A
-B 759,722,0,12,100,12 2 0102 -- B
-C 759,737,15,50,13,50 2 0103 -- C
-D 833,722,0,13,97,13 2 0104 -- D
-E 741,722,0,39,91,39 2 0105 -- E
-F 704,722,0,76,91,76 2 0106 -- F
-G 815,737,15,40,13,40 2 0107 -- G
-H 870,722,0,91,91,91 2 0110 -- H
-I 444,722,0,91,91,91 2 0111 -- I
-J 667,722,15,91,70,91 2 0112 -- J
-K 778,722,0,104,91,104 2 0113 -- K
-L 704,722,0,16,91,16 2 0114 -- L
-M 944,722,0,94,94,94 2 0115 -- M
-N 852,722,10,111,111,109 2 0116 -- N
-O 833,737,15,13,13,13 2 0117 -- O
-P 741,722,0,39,91,39 2 0120 -- P
-Q 833,737,189,13,13,13 2 0121 -- Q
-R 796,722,15,3,91,3 2 0122 -- R
-S 685,737,15,31,49,31 2 0123 -- S
-T 722,722,0,87,9,87 2 0124 -- T
-U 833,722,15,117,-38,109 2 0125 -- U
-V 741,722,10,111,18,109 2 0126 -- V
-W 944,722,10,106,10,106 2 0127 -- W
-X 741,722,0,110,132,109 2 0130 -- X
-Y 704,722,0,121,37,109 2 0131 -- Y
-Z 704,722,0,57,83,57 2 0132 -- Z
-[ 407,737,109,107,49,107 2 0133 -- bracketleft
-lB "
-\ 606,737,15,0,-111 2 0134 -- backslash
-rs "
-] 407,737,109,5,151,5 2 0135 -- bracketright
-rB "
-a^ 333,705,0,82,27,82 2 0136 -- circumflex
-^ "
-_ 500,0,125,50,50,50 0 0137 -- underscore
-` 259,737,0,65,3,65 2 0140 -- quoteleft
-oq "
-a 667,477,15,19,44,19 0 0141 -- a
-b 611,737,15,0,21 2 0142 -- b
-c 537,477,15,0,50 0 0143 -- c
-d 667,737,15,43,50,43 2 0144 -- d
-e 519,477,15,10,50,10 0 0145 -- e
-f 389,737,205,211,98,109 3 0146 -- f
-g 611,528,205,43,113,43 1 0147 -- g
-h 685,737,15,4,50,4 2 0150 -- h
-i 389,737,15,6,18,6 2 0151 -- i
-j 370,737,205,27,255,27 3 0152 -- j
-k 648,737,15,0,61 2 0153 -- k
-l 389,737,15,36,18,36 2 0154 -- l
-m 944,477,15,15,50,15 0 0155 -- m
-n 685,477,15,4,50,4 0 0156 -- n
-o 574,477,15,6,50,6 0 0157 -- o
-p 648,477,205,0,169 1 0160 -- p
-q 630,477,205,7,50,7 1 0161 -- q
-r 519,486,0,58,50,58 0 0162 -- r
-s 481,477,15,4,50,4 0 0163 -- s
-t 407,650,15,46,26,46 2 0164 -- t
-u 685,477,15,0,20 0 0165 -- u
-v 556,477,15,0,20 0 0166 -- v
-w 833,477,15,0,20 0 0167 -- w
-x 574,477,15,50,96,50 0 0170 -- x
-y 519,477,205,24,116,24 1 0171 -- y
-z 519,477,15,4,69,4 0 0172 -- z
-lC 407,737,109,51,-2,51 2 0173 -- braceleft
-{ "
-ba 606,750,250,0,-199 3 0174 -- bar
-| "
-rC 407,737,109,0,75 2 0175 -- braceright
-} "
-a~ 333,690,0,115,22,109 2 0176 -- tilde
-~ "
-bq 259,157,192,0,107 0 0200 -- quotesinglbase
-Fo 481,407,0,18,85,18 0 0201 -- guillemotleft
-char171 "
-Fc 481,407,0,22,81,22 0 0202 -- guillemotright
-char187 "
-bu 606,542,0,0,-72 0 0203 -- bullet
-Fn 574,737,205,51,93,51 3 0204 -- florin
-f/ 167,705,15,216,216,109 2 0205 -- fraction
-%0 1167,727,28,30,30,30 2 0206 -- perthousand
-dg 500,737,146,58,2,58 2 0207 -- dagger
-dd 500,737,150,58,110,58 2 0210 -- daggerdbl
-en 500,287,0,29,97,29 0 0211 -- endash
-em 1000,287,0,29,97,29 0 0212 -- emdash
-fi 685,737,205,6,120,6 3 0214 -- fi
-fl 685,737,205,36,120,36 3 0215 -- fl
-.i 389,477,15,6,18,6 0 0220 -- dotlessi
-ga 333,722,0,11,-24,11 2 0222 -- grave
-a" 333,722,0,197,35,109 2 0223 -- hungarumlaut
-a. 333,690,0,6,-95,6 2 0224 -- dotaccent
-ab 333,698,0,107,-17,107 2 0225 -- breve
-ah 333,705,0,120,-10,109 2 0226 -- caron
-ao 333,746,0,52,-61,52 2 0227 -- ring
-ho 333,0,155,0,-18 0 0230 -- ogonek
-lq 481,737,0,90,-4,90 2 0231 -- quotedblleft
-rq 481,737,0,79,7,79 2 0232 -- quotedblright
-oe 852,477,15,10,56,10 0 0233 -- oe
-/l 389,737,15,51,45,51 2 0234 -- lslash
-Bq 481,157,192,0,107 0 0235 -- quotedblbase
-OE 963,722,0,76,21,76 2 0236 -- OE
-/L 704,722,0,16,91,16 2 0237 -- Lslash
-r! 333,547,205,6,94,6 1 0241 -- exclamdown
-char161 "
-ct 574,578,144,0,20 0 0242 -- cent
-char162 "
-Po 574,705,15,42,68,42 2 0243 -- sterling
-char163 "
-Cs 574,605,0,23,23,23 0 0244 -- currency
-char164 "
-Ye 574,690,0,105,33,105 2 0245 -- yen
-char165 "
-bb 606,675,175,0,-199 2 0246 -- brokenbar
-char166 "
-sc 500,737,146,65,80,65 2 0247 -- section
-char167 "
-ad 333,690,0,110,17,109 2 0250 -- dieresis
-char168 "
-co 747,737,15,53,52,53 2 0251 -- copyright
-char169 "
-Of 412,705,0,98,3,98 2 0252 -- ordfeminine
-char170 "
-fo 278,407,0,16,75,16 0 0253 -- guilsinglleft
-no 606,403 0 0254 -- logicalnot
-char172 "
-\- 606,307 0 0255 -- minus
-rg 747,737,15,53,52,53 2 0256 -- registered
-char174 "
-a- 333,649,0,121,3,109 2 0257 -- macron
-char175 "
-de 400,705,0,22,-36,22 2 0260 -- degree
-char176 "
-char177 606,506 0 0261 -- plusminus
-S2 344,705,0,68,67,68 2 0262 -- twosuperior
-char178 "
-S3 344,705,0,67,47,67 2 0263 -- threesuperior
-char179 "
-aa 333,722,0,89,-73,89 2 0264 -- acute
-char180 "
-char181 685,477,205,0,139 1 0265 -- mu
-ps 650,722,131,81,25,81 2 0266 -- paragraph
-char182 "
-pc 287,372,0,0,-7 0 0267 -- periodcentered
-char183 "
-ac 333,3,220,0,71 1 0270 -- cedilla
-char184 "
-S1 344,705,0,32,31,32 2 0271 -- onesuperior
-char185 "
-Om 356,705,0,88,8,88 2 0272 -- ordmasculine
-char186 "
-fc 278,407,0,15,76,15 0 0273 -- guilsinglright
-14 861,705,15,0,33 2 0274 -- onequarter
-char188 "
-12 861,705,15,0,33 2 0275 -- onehalf
-char189 "
-34 861,705,15,0,15 2 0276 -- threequarters
-char190 "
-r? 481,547,205,0,50 1 0277 -- questiondown
-char191 "
-`A 741,947,0,25,125,25 2 0300 -- Agrave
-char192 "
-'A 741,947,0,25,125,25 2 0301 -- Aacute
-char193 "
-^A 741,930,0,25,125,25 2 0302 -- Acircumflex
-char194 "
-~A 741,915,0,25,125,25 2 0303 -- Atilde
-char195 "
-:A 741,915,0,25,125,25 2 0304 -- Adieresis
-char196 "
-oA 741,991,0,25,125,25 2 0305 -- Aring
-char197 "
-AE 889,722,0,76,136,76 2 0306 -- AE
-char198 "
-,C 759,737,220,50,13,50 3 0307 -- Ccedilla
-char199 "
-`E 741,947,0,39,91,39 2 0310 -- Egrave
-char200 "
-'E 741,947,0,39,91,39 2 0311 -- Eacute
-char201 "
-^E 741,930,0,39,91,39 2 0312 -- Ecircumflex
-char202 "
-:E 741,915,0,39,91,39 2 0313 -- Edieresis
-char203 "
-`I 444,947,0,91,91,91 2 0314 -- Igrave
-char204 "
-'I 444,947,0,94,91,94 2 0315 -- Iacute
-char205 "
-^I 444,930,0,91,91,91 2 0316 -- Icircumflex
-char206 "
-:I 444,915,0,115,91,109 2 0317 -- Idieresis
-char207 "
--D 833,722,0,13,97,13 2 0320 -- Eth
-char208 "
-~N 852,915,10,111,111,109 2 0321 -- Ntilde
-char209 "
-`O 833,947,15,13,13,13 2 0322 -- Ograve
-char210 "
-'O 833,947,15,13,13,13 2 0323 -- Oacute
-char211 "
-^O 833,930,15,13,13,13 2 0324 -- Ocircumflex
-char212 "
-~O 833,915,15,13,13,13 2 0325 -- Otilde
-char213 "
-:O 833,915,15,13,13,13 2 0326 -- Odieresis
-char214 "
-char215 606,491,0,0,-15 0 0327 -- multiply
-/O 833,790,68,15,15,15 2 0330 -- Oslash
-char216 "
-`U 833,947,15,117,-38,109 2 0331 -- Ugrave
-char217 "
-'U 833,947,15,117,-38,109 2 0332 -- Uacute
-char218 "
-^U 833,930,15,117,-38,109 2 0333 -- Ucircumflex
-char219 "
-:U 833,915,15,117,-38,109 2 0334 -- Udieresis
-char220 "
-'Y 704,947,0,121,37,109 2 0335 -- Yacute
-char221 "
-TP 741,722,0,0,91 2 0336 -- Thorn
-char222 "
-ss 574,737,205,16,141,16 3 0337 -- germandbls
-char223 "
-`a 667,722,15,19,44,19 2 0340 -- agrave
-char224 "
-'a 667,722,15,19,44,19 2 0341 -- aacute
-char225 "
-^a 667,705,15,19,44,19 2 0342 -- acircumflex
-char226 "
-~a 667,690,15,19,44,19 2 0343 -- atilde
-char227 "
-:a 667,690,15,19,44,19 2 0344 -- adieresis
-char228 "
-oa 667,746,15,19,44,19 2 0345 -- aring
-char229 "
-ae 815,477,15,10,68,10 0 0346 -- ae
-char230 "
-,c 537,477,220,0,50 1 0347 -- ccedilla
-char231 "
-`e 519,722,15,10,50,10 2 0350 -- egrave
-char232 "
-'e 519,722,15,10,50,10 2 0351 -- eacute
-char233 "
-^e 519,705,15,10,50,10 2 0352 -- ecircumflex
-char234 "
-:e 519,690,15,17,50,17 2 0353 -- edieresis
-char235 "
-`i 389,715,15,6,18,6 2 0354 -- igrave
-char236 "
-'i 389,715,15,31,18,31 2 0355 -- iacute
-char237 "
-^i 389,698,15,24,29,24 2 0356 -- icircumflex
-char238 "
-:i 389,683,15,52,19,52 2 0357 -- idieresis
-char239 "
-Sd 574,752,15,6,50,6 2 0360 -- eth
-char240 "
-~n 685,690,15,4,50,4 2 0361 -- ntilde
-char241 "
-`o 574,722,15,6,50,6 2 0362 -- ograve
-char242 "
-'o 574,722,15,6,50,6 2 0363 -- oacute
-char243 "
-^o 574,705,15,6,50,6 2 0364 -- ocircumflex
-char244 "
-~o 574,690,15,6,50,6 2 0365 -- otilde
-char245 "
-:o 574,690,15,6,50,6 2 0366 -- odieresis
-char246 "
-char247 606,546,40 0 0367 -- divide
-/o 574,583,121,6,50,6 0 0370 -- oslash
-char248 "
-`u 685,722,15,0,20 2 0371 -- ugrave
-char249 "
-'u 685,722,15,0,20 2 0372 -- uacute
-char250 "
-^u 685,705,15,0,20 2 0373 -- ucircumflex
-char251 "
-:u 685,690,15,0,20 2 0374 -- udieresis
-char252 "
-'y 519,722,205,24,116,24 3 0375 -- yacute
-char253 "
-Tp 648,737,205,0,169 3 0376 -- thorn
-char254 "
-:y 519,690,205,24,116,24 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/NI b/contrib/groff/font/devps/NI
deleted file mode 100644
index af7c79ff6735..000000000000
--- a/contrib/groff/font/devps/NI
+++ /dev/null
@@ -1,535 +0,0 @@
-name NI
-internalname NewCenturySchlbk-Italic
-slant 16
-spacewidth 278
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -55
-A w -18
-A v -18
-A u -18
-A ' -125
-A cq -125
-A rq -125
-A Y -55
-A W -74
-A V -74
-A U -37
-A T -30
-A Q -18
-A O -18
-A G -18
-A C -18
-B . -50
-B , -50
-C . -50
-C , -50
-D . -50
-D , -50
-D Y -18
-D W -18
-D V -18
-F r -55
-F . -125
-F o -55
-F i -10
-F e -55
-F , -125
-F a -55
-F A -35
-G . -50
-G , -50
-J u -18
-J . -100
-J o -37
-J e -37
-J , -100
-J a -37
-J A -18
-L y -50
-L ' -125
-L cq -125
-L rq -125
-L Y -100
-L W -100
-L V -100
-L T -100
-N . -60
-N , -60
-O . -50
-O , -50
-O Y -18
-O X -18
-O V -18
-O T 18
-P . -125
-P o -55
-P e -55
-P , -125
-P a -55
-P A -50
-Q . -20
-Q , -20
-R Y -18
-R W -18
-R V -18
-R U -18
-S . -50
-S , -50
-T y -50
-T w -50
-T u -50
-T ; -50
-T r -50
-T . -100
-T o -74
-T i -18
-T - -100
-T hy -100
-T char173 -100
-T h -25
-T e -74
-T , -100
-T : -50
-T a -74
-T O 18
-U . -100
-U , -100
-U A -18
-V u -75
-V ; -75
-V . -100
-V o -75
-V i -50
-V - -100
-V hy -100
-V char173 -100
-V e -75
-V , -100
-V : -75
-V a -75
-V A -37
-W y -55
-W u -55
-W ; -75
-W . -100
-W o -55
-W i -20
-W - -75
-W hy -75
-W char173 -75
-W h -20
-W e -55
-W , -100
-W : -75
-W a -55
-W A -55
-Y u -100
-Y ; -75
-Y . -100
-Y o -100
-Y i -25
-Y - -100
-Y hy -100
-Y char173 -100
-Y e -100
-Y , -100
-Y : -75
-Y a -100
-Y A -55
-b . -50
-b , -50
-b b -10
-c . -50
-c k -18
-c h -18
-c , -50
-, ' -37
-, cq -37
-, rq -37
-e . -37
-e , -37
-f ' 75
-f cq 75
-f rq 75
-f . -75
-f o -10
-f , -75
-g . -50
-g , -50
-l y -10
-o . -50
-o , -50
-p . -50
-p , -50
-. ' -37
-. cq -37
-. rq -37
-lq A -75
-` ` -37
-` oq -37
-oq ` -37
-oq oq -37
-` A -75
-oq A -75
-' s -25
-cq s -25
-' ' -37
-' cq -37
-cq ' -37
-cq cq -37
-' d -37
-cq d -37
-r ; -25
-r s -10
-r . -125
-r k -18
-r - -75
-r hy -75
-r char173 -75
-r , -125
-r : -25
-s . -50
-s , -50
-v . -75
-v , -75
-w . -75
-w , -75
-y . -75
-y , -75
-charset
-ha 606,690,0,0,-39 2 0000 -- asciicircum
-ti 606,322,0,0,-22 0 0001 -- asciitilde
-vS 667,946,15,21,56,21 2 0002 -- Scaron
-vZ 667,946,0,50,75,50 2 0003 -- Zcaron
-vs 444,690,15,40,48,40 2 0004 -- scaron
-vz 463,690,15,30,83,30 2 0005 -- zcaron
-:Y 685,902,0,125,19,107 2 0006 -- Ydieresis
-tm 950,722,0,68,18,68 2 0007 -- trademark
-aq 278,737,0,9,-101,9 2 0010 -- quotesingle
-space 278 0 0040
-! 333,737,15,20,33,20 2 0041 -- exclam
-" 400,737,0,13,-77,13 2 0042 -- quotedbl
-dq "
-# 556,690,0,22,22,22 2 0043 -- numbersign
-sh "
-$ 556,808,142,30,46,30 2 0044 -- dollar
-Do "
-% 833,705,15,7,7,7 2 0045 -- percent
-& 852,737,15,0,26 2 0046 -- ampersand
-' 204,737,0,75,11,75 2 0047 -- quoteright
-cq "
-( 333,745,117,128,-3,107 2 0050 -- parenleft
-) 333,745,117,0,143 2 0051 -- parenright
-* 500,737,0,50,-30,50 2 0052 -- asterisk
-+ 606,506 0 0053 -- plus
-, 278,109,165,0,89 0 0054 -- comma
-- 333,274,0,0,18 0 0055 -- hyphen
-hy "
-char173 "
-. 278,109,15,0,33 0 0056 -- period
-/ 606,737,15,0,-82 2 0057 -- slash
-sl "
-0 556,705,15,20,20,20 2 0060 -- zero
-1 556,705 2 0061 -- one
-2 556,705,0,0,87 2 0062 -- two
-3 556,705,15,0,52 2 0063 -- three
-4 556,705,0,6,58,6 2 0064 -- four
-5 556,705,15,34,46,34 2 0065 -- five
-6 556,705,15,42,14,42 2 0066 -- six
-7 556,705,15,55,-19,55 2 0067 -- seven
-8 556,705,15,20,44,20 2 0070 -- eight
-9 556,705,15,14,42,14 2 0071 -- nine
-: 278,466,15,1,33,1 0 0072 -- colon
-; 278,466,165,1,89,1 0 0073 -- semicolon
-< 606,514,8,0,14 0 0074 -- less
-= 606,389 0 0075 -- equal
-> 606,514,8,14,-14,14 0 0076 -- greater
-? 444,737,15,23,-52,23 2 0077 -- question
-@ 747,737,15,53,52,53 2 0100 -- at
-at "
-A 704,737,0,14,137,14 2 0101 -- A
-B 722,722,0,0,83 2 0102 -- B
-C 722,737,15,40,10,40 2 0103 -- C
-D 778,722,0,10,83,10 2 0104 -- D
-E 722,722,0,28,83,28 2 0105 -- E
-F 667,722,0,83,83,83 2 0106 -- F
-G 778,737,15,35,10,35 2 0107 -- G
-H 833,722,0,83,83,83 2 0110 -- H
-I 407,722,0,78,83,78 2 0111 -- I
-J 611,722,15,90,64,90 2 0112 -- J
-K 741,722,0,125,83,107 2 0113 -- K
-L 667,722,0,10,83,10 2 0114 -- L
-M 944,722,0,83,83,83 2 0115 -- M
-N 815,722,15,101,101,101 2 0116 -- N
-O 778,737,15,10,10,10 2 0117 -- O
-P 667,722,0,50,83,50 2 0120 -- P
-Q 778,737,190,10,10,10 2 0121 -- Q
-R 741,722,15,1,95,1 2 0122 -- R
-S 667,737,15,21,56,21 2 0123 -- S
-T 685,722,0,90,10,90 2 0124 -- T
-U 815,722,15,102,-43,102 2 0125 -- U
-V 704,722,10,125,14,107 2 0126 -- V
-W 926,722,10,102,-3,102 2 0127 -- W
-X 704,722,0,125,125,107 2 0130 -- X
-Y 685,722,0,125,19,107 2 0131 -- Y
-Z 667,722,0,50,75,50 2 0132 -- Z
-[ 333,737,109,105,105,105 2 0133 -- bracketleft
-lB "
-\ 606,737,15,0,-82 2 0134 -- backslash
-rs "
-] 333,737,109,83,127,83 2 0135 -- bracketright
-rB "
-a^ 333,690,0,48,13,48 2 0136 -- circumflex
-^ "
-_ 500,0,125,50,50,50 0 0137 -- underscore
-` 204,737,0,75,11,75 2 0140 -- quoteleft
-oq "
-a 574,466,15,0,48 0 0141 -- a
-b 556,737,15,0,18 2 0142 -- b
-c 444,466,15,0,48 0 0143 -- c
-d 611,737,15,24,48,24 2 0144 -- d
-e 444,466,15,0,56 0 0145 -- e
-f 333,737,205,187,118,107 3 0146 -- f
-g 537,497,205,36,129,36 1 0147 -- g
-h 611,737,15,1,36,1 2 0150 -- h
-i 333,715,15,0,21 2 0151 -- i
-j 315,715,205,53,216,53 3 0152 -- j
-k 556,737,15,0,50 2 0153 -- k
-l 333,737,15,9,36,9 2 0154 -- l
-m 889,466,15,1,36,1 0 0155 -- m
-n 611,466,15,1,36,1 0 0156 -- n
-o 500,466,15,0,48 0 0157 -- o
-p 574,466,205,0,151 1 0160 -- p
-q 556,466,205,0,48 1 0161 -- q
-r 444,466,0,40,40,40 0 0162 -- r
-s 444,466,15,0,48 0 0163 -- s
-t 352,619,15,26,26,26 2 0164 -- t
-u 611,466,15,0,6 0 0165 -- u
-v 519,466,15,0,19 0 0166 -- v
-w 778,466,15,0,19 0 0167 -- w
-x 500,466,15,21,83,21 0 0170 -- x
-y 500,466,205,0,133 1 0171 -- y
-z 463,466,15,3,83,3 0 0172 -- z
-lC 333,737,109,111,12,107 2 0173 -- braceleft
-{ "
-ba 606,750,250,0,-217 3 0174 -- bar
-| "
-rC 333,737,109,0,137 2 0175 -- braceright
-} "
-a~ 333,649,0,100,-2,100 2 0176 -- tilde
-~ "
-bq 204,109,165,0,128 0 0200 -- quotesinglbase
-Fo 426,402,0,26,65,26 0 0201 -- guillemotleft
-char171 "
-Fc 426,402,0,26,65,26 0 0202 -- guillemotright
-char187 "
-bu 606,542,0,0,-72 0 0203 -- bullet
-Fn 556,737,205,63,108,63 3 0204 -- florin
-f/ 167,705,15,184,184,107 2 0205 -- fraction
-%0 1000,705,15,44,44,44 2 0206 -- perthousand
-dg 500,737,147,56,-1,56 2 0207 -- dagger
-dd 500,737,147,56,104,56 2 0210 -- daggerdbl
-en 500,268,0,37,77,37 0 0211 -- endash
-em 1000,268,0,37,77,37 0 0212 -- emdash
-fi 611,737,205,0,118 3 0214 -- fi
-fl 611,737,205,26,118,26 3 0215 -- fl
-.i 333,466,15,0,21 0 0220 -- dotlessi
-ga 333,690,0,0,-21 2 0222 -- grave
-a" 333,690,0,172,18,107 2 0223 -- hungarumlaut
-a. 333,646,0,0,-96 2 0224 -- dotaccent
-ab 333,677,0,87,-19,87 2 0225 -- breve
-ah 333,690,0,95,-23,95 2 0226 -- caron
-ao 333,712,0,31,-64,31 2 0227 -- ring
-ho 333,0,215,0,-18 1 0230 -- ogonek
-lq 389,737,0,67,11,67 2 0231 -- quotedblleft
-rq 389,737,0,67,11,67 2 0232 -- quotedblright
-oe 778,466,15,0,48 0 0233 -- oe
-/l 333,737,15,57,75,57 2 0234 -- lslash
-Bq 389,109,165,0,128 0 0235 -- quotedblbase
-OE 981,722,0,44,10,44 2 0236 -- OE
-/L 667,722,0,10,83,10 2 0237 -- Lslash
-r! 333,547,205,0,72 1 0241 -- exclamdown
-char161 "
-ct 556,580,144,0,-12 0 0242 -- cent
-char162 "
-Po 556,705,15,38,63,38 2 0243 -- sterling
-char163 "
-Cs 556,597,0,24,24,24 0 0244 -- currency
-char164 "
-Ye 556,690,0,118,10,107 2 0245 -- yen
-char165 "
-bb 606,675,175,0,-217 2 0246 -- brokenbar
-char166 "
-sc 500,737,147,30,60,30 2 0247 -- section
-char167 "
-ad 333,646,0,76,-9,76 2 0250 -- dieresis
-char168 "
-co 747,737,15,53,52,53 2 0251 -- copyright
-char169 "
-Of 422,705,0,48,-22,48 2 0252 -- ordfeminine
-char170 "
-fo 333,402,0,0,10 0 0253 -- guilsinglleft
-no 606,389 0 0254 -- logicalnot
-char172 "
-\- 606,289 0 0255 -- minus
-rg 747,737,15,53,52,53 2 0256 -- registered
-char174 "
-a- 333,610,0,80,-2,80 0 0257 -- macron
-char175 "
-de 400,705,0,22,-36,22 2 0260 -- degree
-char176 "
-char177 606,506 0 0261 -- plusminus
-S2 333,705,0,76,50,76 2 0262 -- twosuperior
-char178 "
-S3 333,705,0,76,28,76 2 0263 -- threesuperior
-char179 "
-aa 333,690,0,72,-82,72 2 0264 -- acute
-char180 "
-char181 611,466,205,0,110 1 0265 -- mu
-ps 650,722,132,65,2,65 2 0266 -- paragraph
-char182 "
-pc 278,374,0,0,-21 0 0267 -- periodcentered
-char183 "
-ac 333,0,215,0,47 1 0270 -- cedilla
-char184 "
-S1 333,705,0,28,16,28 2 0271 -- onesuperior
-char185 "
-Om 372,705,0,48,-16,48 2 0272 -- ordmasculine
-char186 "
-fc 333,402,0,0,10 0 0273 -- guilsinglright
-14 834,705,15,0,16 2 0274 -- onequarter
-char188 "
-12 834,705,15,0,16 2 0275 -- onehalf
-char189 "
-34 834,705,15,0,28 2 0276 -- threequarters
-char190 "
-r? 444,547,205,0,53 1 0277 -- questiondown
-char191 "
-`A 704,946,0,14,137,14 2 0300 -- Agrave
-char192 "
-'A 704,946,0,14,137,14 2 0301 -- Aacute
-char193 "
-^A 704,946,0,14,137,14 2 0302 -- Acircumflex
-char194 "
-~A 704,905,0,14,137,14 2 0303 -- Atilde
-char195 "
-:A 704,902,0,14,137,14 2 0304 -- Adieresis
-char196 "
-oA 704,958,0,14,137,14 2 0305 -- Aring
-char197 "
-AE 870,722,0,68,137,68 2 0306 -- AE
-char198 "
-,C 722,737,215,40,10,40 3 0307 -- Ccedilla
-char199 "
-`E 722,946,0,28,83,28 2 0310 -- Egrave
-char200 "
-'E 722,946,0,28,83,28 2 0311 -- Eacute
-char201 "
-^E 722,946,0,28,83,28 2 0312 -- Ecircumflex
-char202 "
-:E 722,902,0,28,83,28 2 0313 -- Edieresis
-char203 "
-`I 407,946,0,78,83,78 2 0314 -- Igrave
-char204 "
-'I 407,946,0,95,83,95 2 0315 -- Iacute
-char205 "
-^I 407,946,0,78,83,78 2 0316 -- Icircumflex
-char206 "
-:I 407,902,0,99,83,99 2 0317 -- Idieresis
-char207 "
--D 778,722,0,10,83,10 2 0320 -- Eth
-char208 "
-~N 815,905,15,101,101,101 2 0321 -- Ntilde
-char209 "
-`O 778,946,15,10,10,10 2 0322 -- Ograve
-char210 "
-'O 778,946,15,10,10,10 2 0323 -- Oacute
-char211 "
-^O 778,946,15,10,10,10 2 0324 -- Ocircumflex
-char212 "
-~O 778,905,15,10,10,10 2 0325 -- Otilde
-char213 "
-:O 778,902,15,10,10,10 2 0326 -- Odieresis
-char214 "
-char215 606,482,0,0,-24 0 0327 -- multiply
-/O 778,780,68,20,34,20 2 0330 -- Oslash
-char216 "
-`U 815,946,15,102,-43,102 2 0331 -- Ugrave
-char217 "
-'U 815,946,15,102,-43,102 2 0332 -- Uacute
-char218 "
-^U 815,946,15,102,-43,102 2 0333 -- Ucircumflex
-char219 "
-:U 815,902,15,102,-43,102 2 0334 -- Udieresis
-char220 "
-'Y 685,946,0,125,19,107 2 0335 -- Yacute
-char221 "
-TP 667,722,0,10,83,10 2 0336 -- Thorn
-char222 "
-ss 556,737,205,19,126,19 3 0337 -- germandbls
-char223 "
-`a 574,690,15,0,48 2 0340 -- agrave
-char224 "
-'a 574,690,15,0,48 2 0341 -- aacute
-char225 "
-^a 574,690,15,0,48 2 0342 -- acircumflex
-char226 "
-~a 574,649,15,0,48 2 0343 -- atilde
-char227 "
-:a 574,646,15,0,48 2 0344 -- adieresis
-char228 "
-oa 574,712,15,0,48 2 0345 -- aring
-char229 "
-ae 722,466,15,0,68 0 0346 -- ae
-char230 "
-,c 444,466,215,0,48 1 0347 -- ccedilla
-char231 "
-`e 444,690,15,0,56 2 0350 -- egrave
-char232 "
-'e 444,690,15,17,56,17 2 0351 -- eacute
-char233 "
-^e 444,690,15,0,56 2 0352 -- ecircumflex
-char234 "
-:e 444,646,15,21,56,21 2 0353 -- edieresis
-char235 "
-`i 333,690,15,0,21 2 0354 -- igrave
-char236 "
-'i 333,690,15,72,21,72 2 0355 -- iacute
-char237 "
-^i 333,690,15,48,21,48 2 0356 -- icircumflex
-char238 "
-:i 333,646,15,76,21,76 2 0357 -- idieresis
-char239 "
-Sd 500,737,15,0,48 2 0360 -- eth
-char240 "
-~n 611,649,15,1,36,1 2 0361 -- ntilde
-char241 "
-`o 500,690,15,0,48 2 0362 -- ograve
-char242 "
-'o 500,690,15,0,48 2 0363 -- oacute
-char243 "
-^o 500,690,15,0,48 2 0364 -- ocircumflex
-char244 "
-~o 500,649,15,17,48,17 2 0365 -- otilde
-char245 "
-:o 500,646,15,0,48 2 0366 -- odieresis
-char246 "
-char247 606,528,22 0 0367 -- divide
-/o 500,549,121,0,48 0 0370 -- oslash
-char248 "
-`u 611,690,15,0,6 2 0371 -- ugrave
-char249 "
-'u 611,690,15,0,6 2 0372 -- uacute
-char250 "
-^u 611,690,15,0,6 2 0373 -- ucircumflex
-char251 "
-:u 611,646,15,0,6 2 0374 -- udieresis
-char252 "
-'y 500,690,205,0,133 3 0375 -- yacute
-char253 "
-Tp 574,737,205,0,151 3 0376 -- thorn
-char254 "
-:y 500,646,205,0,133 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/NR b/contrib/groff/font/devps/NR
deleted file mode 100644
index b111f5d2b7c5..000000000000
--- a/contrib/groff/font/devps/NR
+++ /dev/null
@@ -1,522 +0,0 @@
-name NR
-internalname NewCenturySchlbk-Roman
-spacewidth 278
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -37
-A w -25
-A v -37
-A ' -74
-A cq -74
-A rq -74
-A Y -75
-A W -50
-A V -75
-A U -30
-A T -18
-B . -37
-B , -37
-B A -18
-C . -37
-C , -37
-C A -18
-D . -37
-D , -37
-D Y -18
-D V -18
-F r -10
-F . -125
-F o -55
-F i -10
-F e -55
-F , -125
-F a -65
-F A -50
-G . -37
-G , -37
-J u -25
-J . -74
-J o -25
-J e -25
-J , -74
-J a -25
-J A -18
-K y -25
-K o 10
-K e 10
-L y -25
-L ' -100
-L cq -100
-L rq -100
-L Y -74
-L W -74
-L V -91
-L T -75
-N . -55
-N , -55
-O . -37
-O , -37
-O Y -18
-O V -18
-O T 10
-P . -125
-P o -37
-P e -37
-P , -125
-P a -37
-P A -55
-Q . -25
-Q , -25
-S . -37
-S , -37
-T ; -37
-T . -125
-T o -55
-T - -100
-T hy -100
-T char173 -100
-T e -55
-T , -125
-T : -37
-T a -55
-T O 10
-T A -18
-U . -100
-U , -100
-U A -30
-V u -75
-V ; -75
-V . -125
-V o -75
-V i -18
-V - -100
-V hy -100
-V char173 -100
-V e -75
-V , -125
-V : -75
-V a -85
-V O -18
-V A -74
-W y -55
-W u -55
-W ; -100
-W . -125
-W o -60
-W i -18
-W - -100
-W hy -100
-W char173 -100
-W e -60
-W , -125
-W : -100
-W a -75
-W A -50
-Y u -91
-Y ; -75
-Y . -100
-Y o -100
-Y i -18
-Y - -125
-Y hy -125
-Y char173 -125
-Y e -100
-Y , -100
-Y : -75
-Y a -100
-Y O -18
-Y A -75
-a y -10
-a w -10
-a v -10
-b . -18
-b , -18
-c . -18
-c l -7
-c k -7
-c h -7
-c , -18
-, ' -37
-, cq -37
-, rq -37
-e . -18
-e , -18
-f ' 100
-f cq 100
-f rq 100
-f . -37
-f , -37
-g . -25
-g , -25
-o . -18
-o , -18
-p . -18
-p , -18
-. ' -37
-. cq -37
-. rq -37
-lq A -74
-` ` -25
-` oq -25
-oq ` -25
-oq oq -25
-` A -74
-oq A -74
-' s -25
-cq s -25
-' ' -25
-' cq -25
-cq ' -25
-cq cq -25
-' d -37
-cq d -37
-r . -100
-r - -37
-r hy -37
-r char173 -37
-r , -100
-s . -25
-s , -25
-v . -125
-v , -125
-w . -125
-w , -125
-w a -18
-y . -125
-y , -125
-charset
-ha 606,690 2 0000 -- asciicircum
-ti 606,322 0 0001 -- asciitilde
-vS 630,933,15 2 0002 -- Scaron
-vZ 611,933 2 0003 -- Zcaron
-vs 463,695,15 2 0004 -- scaron
-vz 481,695 2 0005 -- zcaron
-:Y 704,883 2 0006 -- Ydieresis
-tm 1000,722 2 0007 -- trademark
-aq 204,737 2 0010 -- quotesingle
-space 278 0 0040
-! 296,737,15 2 0041 -- exclam
-" 389,737 2 0042 -- quotedbl
-dq "
-# 556,690 2 0043 -- numbersign
-sh "
-$ 556,813,138 2 0044 -- dollar
-Do "
-% 833,705,15 2 0045 -- percent
-& 815,737,15 2 0046 -- ampersand
-' 204,737 2 0047 -- quoteright
-cq "
-( 333,745,117 2 0050 -- parenleft
-) 333,745,117 2 0051 -- parenright
-* 500,737 2 0052 -- asterisk
-+ 606,506 0 0053 -- plus
-, 278,109,185 0 0054 -- comma
-- 333,277 0 0055 -- hyphen
-hy "
-char173 "
-. 278,109,15 0 0056 -- period
-/ 278,737,15 2 0057 -- slash
-sl "
-0 556,705,15 2 0060 -- zero
-1 556,705 2 0061 -- one
-2 556,705 2 0062 -- two
-3 556,705,15 2 0063 -- three
-4 556,705 2 0064 -- four
-5 556,705,15 2 0065 -- five
-6 556,705,15 2 0066 -- six
-7 556,705,15 2 0067 -- seven
-8 556,705,15 2 0070 -- eight
-9 556,705,15 2 0071 -- nine
-: 278,474,15 0 0072 -- colon
-; 278,474,185 0 0073 -- semicolon
-< 606,514,8 0 0074 -- less
-= 606,389 0 0075 -- equal
-> 606,514,8 0 0076 -- greater
-? 444,737,15 2 0077 -- question
-@ 737,737,15 2 0100 -- at
-at "
-A 722,737 2 0101 -- A
-B 722,722 2 0102 -- B
-C 722,737,15 2 0103 -- C
-D 778,722 2 0104 -- D
-E 722,722 2 0105 -- E
-F 667,722 2 0106 -- F
-G 778,737,15 2 0107 -- G
-H 833,722 2 0110 -- H
-I 407,722 2 0111 -- I
-J 556,722,15 2 0112 -- J
-K 778,722 2 0113 -- K
-L 667,722 2 0114 -- L
-M 944,722 2 0115 -- M
-N 815,722,15 2 0116 -- N
-O 778,737,15 2 0117 -- O
-P 667,722 2 0120 -- P
-Q 778,737,190 2 0121 -- Q
-R 722,722,15 2 0122 -- R
-S 630,737,15 2 0123 -- S
-T 667,722 2 0124 -- T
-U 815,722,15 2 0125 -- U
-V 722,722,10 2 0126 -- V
-W 981,722,10 2 0127 -- W
-X 704,722 2 0130 -- X
-Y 704,722 2 0131 -- Y
-Z 611,722 2 0132 -- Z
-[ 333,737,109 2 0133 -- bracketleft
-lB "
-\ 606,737,15 2 0134 -- backslash
-rs "
-] 333,737,109 2 0135 -- bracketright
-rB "
-a^ 333,695 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 204,737 2 0140 -- quoteleft
-oq "
-a 556,479,15 0 0141 -- a
-b 556,737,15 2 0142 -- b
-c 444,479,15 0 0143 -- c
-d 574,737,15 2 0144 -- d
-e 500,479,15 0 0145 -- e
-f 333,737 2 0146 -- f
-g 537,494,205 1 0147 -- g
-h 611,737 2 0150 -- h
-i 315,722 2 0151 -- i
-j 296,722,205 3 0152 -- j
-k 593,737 2 0153 -- k
-l 315,737 2 0154 -- l
-m 889,479 0 0155 -- m
-n 611,479 0 0156 -- n
-o 500,479,15 0 0157 -- o
-p 574,479,205 1 0160 -- p
-q 556,479,205 1 0161 -- q
-r 444,479 0 0162 -- r
-s 463,479,15 0 0163 -- s
-t 389,666,15 2 0164 -- t
-u 611,464,15 0 0165 -- u
-v 537,464,10 0 0166 -- v
-w 778,464,10 0 0167 -- w
-x 537,464 0 0170 -- x
-y 537,464,205 1 0171 -- y
-z 481,464 0 0172 -- z
-lC 333,737,109 2 0173 -- braceleft
-{ "
-ba 606,750,250 3 0174 -- bar
-| "
-rC 333,737,109 2 0175 -- braceright
-} "
-a~ 333,655 0 0176 -- tilde
-~ "
-bq 204,109,185 0 0200 -- quotesinglbase
-Fo 426,398 0 0201 -- guillemotleft
-char171 "
-Fc 426,398 0 0202 -- guillemotright
-char187 "
-bu 606,542 0 0203 -- bullet
-Fn 556,737,205 3 0204 -- florin
-f/ 167,705,15 2 0205 -- fraction
-%0 1000,705,15 2 0206 -- perthousand
-dg 500,737,147 2 0207 -- dagger
-dd 500,737,149 2 0210 -- daggerdbl
-en 556,268 0 0211 -- endash
-em 1000,268 0 0212 -- emdash
-fi 611,737 2 0214 -- fi
-fl 611,737 2 0215 -- fl
-.i 315,464 0 0220 -- dotlessi
-ga 333,699 2 0222 -- grave
-a" 333,699 2 0223 -- hungarumlaut
-a. 333,645 0 0224 -- dotaccent
-ab 333,685 2 0225 -- breve
-ah 333,695 2 0226 -- caron
-ao 333,722 2 0227 -- ring
-ho 333,0,215 1 0230 -- ogonek
-lq 389,737 2 0231 -- quotedblleft
-rq 389,737 2 0232 -- quotedblright
-oe 833,479,15 0 0233 -- oe
-/l 315,737 2 0234 -- lslash
-Bq 389,109,185 0 0235 -- quotedblbase
-OE 1000,722 2 0236 -- OE
-/L 667,722 2 0237 -- Lslash
-r! 296,547,205 1 0241 -- exclamdown
-char161 "
-ct 556,584,141 0 0242 -- cent
-char162 "
-Po 556,705,15 2 0243 -- sterling
-char163 "
-Cs 556,597 0 0244 -- currency
-char164 "
-Ye 556,690 2 0245 -- yen
-char165 "
-bb 606,675,175 2 0246 -- brokenbar
-char166 "
-sc 500,737,147 2 0247 -- section
-char167 "
-ad 333,645 0 0250 -- dieresis
-char168 "
-co 737,737,15 2 0251 -- copyright
-char169 "
-Of 334,705 2 0252 -- ordfeminine
-char170 "
-fo 259,398 0 0253 -- guilsinglleft
-no 606,389 0 0254 -- logicalnot
-char172 "
-\- 606,289 0 0255 -- minus
-rg 737,737,15 2 0256 -- registered
-char174 "
-a- 333,623 0 0257 -- macron
-char175 "
-de 400,705 2 0260 -- degree
-char176 "
-char177 606,506 0 0261 -- plusminus
-S2 333,705 2 0262 -- twosuperior
-char178 "
-S3 333,705 2 0263 -- threesuperior
-char179 "
-aa 333,699 2 0264 -- acute
-char180 "
-char181 611,464,205 1 0265 -- mu
-ps 606,722,132 2 0266 -- paragraph
-char182 "
-pc 278,374 0 0267 -- periodcentered
-char183 "
-ac 333,0,215 1 0270 -- cedilla
-char184 "
-S1 333,705 2 0271 -- onesuperior
-char185 "
-Om 300,705 2 0272 -- ordmasculine
-char186 "
-fc 259,398 0 0273 -- guilsinglright
-14 834,705,15 2 0274 -- onequarter
-char188 "
-12 834,705,15 2 0275 -- onehalf
-char189 "
-34 834,705,15 2 0276 -- threequarters
-char190 "
-r? 444,547,205 1 0277 -- questiondown
-char191 "
-`A 722,937 2 0300 -- Agrave
-char192 "
-'A 722,937 2 0301 -- Aacute
-char193 "
-^A 722,933 2 0302 -- Acircumflex
-char194 "
-~A 722,893 2 0303 -- Atilde
-char195 "
-:A 722,883 2 0304 -- Adieresis
-char196 "
-oA 722,965 2 0305 -- Aring
-char197 "
-AE 1000,722 2 0306 -- AE
-char198 "
-,C 722,737,215 3 0307 -- Ccedilla
-char199 "
-`E 722,937 2 0310 -- Egrave
-char200 "
-'E 722,937 2 0311 -- Eacute
-char201 "
-^E 722,933 2 0312 -- Ecircumflex
-char202 "
-:E 722,883 2 0313 -- Edieresis
-char203 "
-`I 407,937 2 0314 -- Igrave
-char204 "
-'I 407,937 2 0315 -- Iacute
-char205 "
-^I 407,933 2 0316 -- Icircumflex
-char206 "
-:I 407,883 2 0317 -- Idieresis
-char207 "
--D 778,722 2 0320 -- Eth
-char208 "
-~N 815,893,15 2 0321 -- Ntilde
-char209 "
-`O 778,937,15 2 0322 -- Ograve
-char210 "
-'O 778,937,15 2 0323 -- Oacute
-char211 "
-^O 778,933,15 2 0324 -- Ocircumflex
-char212 "
-~O 778,893,15 2 0325 -- Otilde
-char213 "
-:O 778,883,15 2 0326 -- Odieresis
-char214 "
-char215 606,482 0 0327 -- multiply
-/O 778,778,56 2 0330 -- Oslash
-char216 "
-`U 815,937,15 2 0331 -- Ugrave
-char217 "
-'U 815,937,15 2 0332 -- Uacute
-char218 "
-^U 815,933,15 2 0333 -- Ucircumflex
-char219 "
-:U 815,883,15 2 0334 -- Udieresis
-char220 "
-'Y 704,937 2 0335 -- Yacute
-char221 "
-TP 667,722 2 0336 -- Thorn
-char222 "
-ss 574,737,15 2 0337 -- germandbls
-char223 "
-`a 556,699,15 2 0340 -- agrave
-char224 "
-'a 556,699,15 2 0341 -- aacute
-char225 "
-^a 556,695,15 2 0342 -- acircumflex
-char226 "
-~a 556,655,15 0 0343 -- atilde
-char227 "
-:a 556,645,15 0 0344 -- adieresis
-char228 "
-oa 556,732,15 2 0345 -- aring
-char229 "
-ae 796,479,15 0 0346 -- ae
-char230 "
-,c 444,479,215 1 0347 -- ccedilla
-char231 "
-`e 500,699,15 2 0350 -- egrave
-char232 "
-'e 500,699,15 2 0351 -- eacute
-char233 "
-^e 500,695,15 2 0352 -- ecircumflex
-char234 "
-:e 500,645,15 0 0353 -- edieresis
-char235 "
-`i 315,699 2 0354 -- igrave
-char236 "
-'i 315,699 2 0355 -- iacute
-char237 "
-^i 315,695 2 0356 -- icircumflex
-char238 "
-:i 315,645 0 0357 -- idieresis
-char239 "
-Sd 500,752,15 2 0360 -- eth
-char240 "
-~n 611,655 0 0361 -- ntilde
-char241 "
-`o 500,699,15 2 0362 -- ograve
-char242 "
-'o 500,699,15 2 0363 -- oacute
-char243 "
-^o 500,695,15 2 0364 -- ocircumflex
-char244 "
-~o 500,655,15 0 0365 -- otilde
-char245 "
-:o 500,645,15 0 0366 -- odieresis
-char246 "
-char247 606,528,22 0 0367 -- divide
-/o 500,561,97 0 0370 -- oslash
-char248 "
-`u 611,699,15 2 0371 -- ugrave
-char249 "
-'u 611,699,15 2 0372 -- uacute
-char250 "
-^u 611,695,15 2 0373 -- ucircumflex
-char251 "
-:u 611,645,15 0 0374 -- udieresis
-char252 "
-'y 537,699,205 3 0375 -- yacute
-char253 "
-Tp 574,737,205 3 0376 -- thorn
-char254 "
-:y 537,645,205 1 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/PB b/contrib/groff/font/devps/PB
deleted file mode 100644
index 0f327d3480f1..000000000000
--- a/contrib/groff/font/devps/PB
+++ /dev/null
@@ -1,461 +0,0 @@
-name PB
-internalname Palatino-Bold
-spacewidth 250
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -70
-A w -70
-A v -70
-A ' -92
-A cq -92
-A Y -111
-A W -90
-A V -129
-A T -92
-F . -111
-F , -111
-F A -55
-L y -74
-L ' -74
-L cq -74
-L Y -92
-L W -92
-L V -92
-L T -74
-P . -129
-P , -129
-P A -74
-R y -30
-R Y -55
-R W -37
-R V -74
-R T -55
-T y -90
-T w -90
-T u -129
-T ; -74
-T s -111
-T r -111
-T . -92
-T o -111
-T i -55
-T - -92
-T hy -92
-T char173 -92
-T e -111
-T , -92
-T : -74
-T c -129
-T a -111
-T A -92
-V y -90
-V u -92
-V ; -74
-V r -111
-V . -129
-V o -111
-V i -55
-V - -92
-V hy -92
-V char173 -92
-V e -111
-V , -129
-V : -74
-V a -111
-V A -129
-W y -74
-W u -74
-W ; -37
-W r -74
-W . -37
-W o -74
-W i -37
-W - -37
-W hy -37
-W char173 -37
-W e -74
-W , -92
-W : -37
-W a -74
-W A -90
-Y v -74
-Y u -74
-Y ; -55
-Y q -92
-Y . -74
-Y p -74
-Y o -74
-Y i -55
-Y - -74
-Y hy -74
-Y char173 -74
-Y e -74
-Y , -74
-Y : -55
-Y a -74
-Y A -55
-f ' 37
-f cq 37
-f f -18
-1 1 -37
-` ` -55
-` oq -55
-oq ` -55
-oq oq -55
-' t -18
-cq t -18
-' s -55
-cq s -55
-' ' -55
-' cq -55
-cq ' -55
-cq cq -55
-r ' 55
-r cq 55
-r . -55
-r - -18
-r hy -18
-r char173 -18
-r , -55
-v . -111
-v , -111
-w . -92
-w , -92
-y . -92
-y , -92
-charset
-ha 606,678 2 0000 -- asciicircum
-ti 606,342 0 0001 -- asciitilde
-vS 611,909,17 2 0002 -- Scaron
-vZ 667,909,3 2 0003 -- Zcaron
-vs 444,693,17 2 0004 -- scaron
-vz 500,693,3 2 0005 -- zcaron
-:Y 667,895,3 2 0006 -- Ydieresis
-tm 998,678 2 0007 -- trademark
-aq 227,695 2 0010 -- quotesingle
-space 250 0 0040
-! 278,688,12 2 0041 -- exclam
-" 402,695 2 0042 -- quotedbl
-dq "
-# 500,673 2 0043 -- numbersign
-sh "
-$ 500,721,114 2 0044 -- dollar
-Do "
-% 889,714,9 2 0045 -- percent
-& 833,684,17 2 0046 -- ampersand
-' 278,695 2 0047 -- quoteright
-cq "
-( 333,723,104 2 0050 -- parenleft
-) 333,723,104 2 0051 -- parenright
-* 444,695 2 0052 -- asterisk
-+ 606,505 0 0053 -- plus
-, 250,141,166 0 0054 -- comma
-- 333,305 0 0055 -- hyphen
-hy "
-char173 "
-. 250,144,12 0 0056 -- period
-/ 296,720,17 2 0057 -- slash
-sl "
-0 500,660,17 2 0060 -- zero
-1 500,670,3 2 0061 -- one
-2 500,660,3 2 0062 -- two
-3 500,660,17 2 0063 -- three
-4 500,672,3 2 0064 -- four
-5 500,656,17 2 0065 -- five
-6 500,660,17 2 0066 -- six
-7 500,656,3 2 0067 -- seven
-8 500,660,17 2 0070 -- eight
-9 500,660,17 2 0071 -- nine
-: 250,454,12 0 0072 -- colon
-; 250,454,166 0 0073 -- semicolon
-< 606,519,15 0 0074 -- less
-= 606,396 0 0075 -- equal
-> 606,519,15 0 0076 -- greater
-? 444,687,12 2 0077 -- question
-@ 747,681,12 2 0100 -- at
-at "
-A 778,686,3 2 0101 -- A
-B 667,681,3 2 0102 -- B
-C 722,695,17 2 0103 -- C
-D 833,681,3 2 0104 -- D
-E 611,681,4 2 0105 -- E
-F 556,681,3 2 0106 -- F
-G 833,695,17 2 0107 -- G
-H 833,681,3 2 0110 -- H
-I 389,681,3 2 0111 -- I
-J 389,681,213 2 0112 -- J
-K 778,681,3 2 0113 -- K
-L 611,681,4 2 0114 -- L
-M 1000,681,10 2 0115 -- M
-N 833,681,16 2 0116 -- N
-O 833,695,17 2 0117 -- O
-P 611,681,3 2 0120 -- P
-Q 833,695,184 2 0121 -- Q
-R 722,681,3 2 0122 -- R
-S 611,695,17 2 0123 -- S
-T 667,681,3 2 0124 -- T
-U 778,681,17 2 0125 -- U
-V 778,681,3 2 0126 -- V
-W 1000,686,3 2 0127 -- W
-X 667,695,3 2 0130 -- X
-Y 667,695,3 2 0131 -- Y
-Z 667,681,3 2 0132 -- Z
-[ 333,720,104 2 0133 -- bracketleft
-lB "
-\ 606,720 2 0134 -- backslash
-rs "
-] 333,720,104 2 0135 -- bracketright
-rB "
-a^ 333,681 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 278,695 2 0140 -- quoteleft
-oq "
-a 500,471,17 0 0141 -- a
-b 611,720,17 2 0142 -- b
-c 444,471,17 0 0143 -- c
-d 611,720,17 2 0144 -- d
-e 500,471,17 0 0145 -- e
-f 389,720,3 2 0146 -- f
-g 556,471,266 1 0147 -- g
-h 611,720,3 2 0150 -- h
-i 333,706,3 2 0151 -- i
-j 333,706,266 3 0152 -- j
-k 611,720,3 2 0153 -- k
-l 333,720,3 2 0154 -- l
-m 889,471,3 0 0155 -- m
-n 611,471,3 0 0156 -- n
-o 556,471,17 0 0157 -- o
-p 611,471,258 1 0160 -- p
-q 611,471,258 1 0161 -- q
-r 389,471,3 0 0162 -- r
-s 444,471,17 0 0163 -- s
-t 333,632,17 2 0164 -- t
-u 611,471,17 0 0165 -- u
-v 556,459,3 0 0166 -- v
-w 833,471,3 0 0167 -- w
-x 500,471,3 0 0170 -- x
-y 556,459,266 1 0171 -- y
-z 500,459,3 0 0172 -- z
-lC 310,725,117 2 0173 -- braceleft
-{ "
-ba 606,720 2 0174 -- bar
-| "
-rC 310,725,117 2 0175 -- braceright
-} "
-a~ 333,661 2 0176 -- tilde
-~ "
-bq 333,130,160 0 0200 -- quotesinglbase
-Fo 500,438 0 0201 -- guillemotleft
-char171 "
-Fc 500,438 0 0202 -- guillemotright
-char187 "
-bu 606,516 0 0203 -- bullet
-Fn 500,703,242 2 0204 -- florin
-f/ 167,660 2 0205 -- fraction
-%0 1000,724,9 2 0206 -- perthousand
-dg 500,682,6 2 0207 -- dagger
-dd 500,682,245 2 0210 -- daggerdbl
-en 500,291 0 0211 -- endash
-em 1000,291 0 0212 -- emdash
-fi 611,720,3 2 0214 -- fi
-fl 611,720,3 2 0215 -- fl
-.i 333,471,3 0 0220 -- dotlessi
-ga 333,691 2 0222 -- grave
-a" 333,691 2 0223 -- hungarumlaut
-a. 333,671 2 0224 -- dotaccent
-ab 333,669 2 0225 -- breve
-ah 333,685 2 0226 -- caron
-ao 333,700 2 0227 -- ring
-ho 333,0,246 0 0230 -- ogonek
-lq 500,695 2 0231 -- quotedblleft
-rq 500,695 2 0232 -- quotedblright
-oe 833,471,17 0 0233 -- oe
-/l 333,720,3 2 0234 -- lslash
-Bq 500,130,160 0 0235 -- quotedblbase
-OE 1000,695,17 2 0236 -- OE
-/L 611,681,4 2 0237 -- Lslash
-r! 278,471,227 0 0241 -- exclamdown
-char161 "
-ct 500,554,106 0 0242 -- cent
-char162 "
-Po 500,676,19 2 0243 -- sterling
-char163 "
-Cs 500,533 0 0244 -- currency
-char164 "
-Ye 500,695,3 2 0245 -- yen
-char165 "
-bb 606,720 2 0246 -- brokenbar
-char166 "
-sc 500,695,217 2 0247 -- section
-char167 "
-ad 333,671 2 0250 -- dieresis
-char168 "
-co 747,695,17 2 0251 -- copyright
-char169 "
-Of 438,660 2 0252 -- ordfeminine
-char170 "
-fo 389,438 0 0253 -- guilsinglleft
-no 606,396 0 0254 -- logicalnot
-char172 "
-\- 606,298 0 0255 -- minus
-rg 747,695,17 2 0256 -- registered
-char174 "
-a- 333,609 0 0257 -- macron
-char175 "
-de 400,660 2 0260 -- degree
-char176 "
-char177 606,505 0 0261 -- plusminus
-S2 300,660 2 0262 -- twosuperior
-char178 "
-S3 300,667 2 0263 -- threesuperior
-char179 "
-aa 333,691 2 0264 -- acute
-char180 "
-char181 611,471,225 0 0265 -- mu
-ps 641,683,161 2 0266 -- paragraph
-char182 "
-pc 250,335 0 0267 -- periodcentered
-char183 "
-ac 333,0,225 0 0270 -- cedilla
-char184 "
-S1 300,665 2 0271 -- onesuperior
-char185 "
-Om 488,660 2 0272 -- ordmasculine
-char186 "
-fc 389,438 0 0273 -- guilsinglright
-14 750,665,2 2 0274 -- onequarter
-char188 "
-12 750,665,2 2 0275 -- onehalf
-char189 "
-34 750,667,2 2 0276 -- threequarters
-char190 "
-r? 444,471,231 0 0277 -- questiondown
-char191 "
-`A 778,915,3 2 0300 -- Agrave
-char192 "
-'A 778,915,3 2 0301 -- Aacute
-char193 "
-^A 778,905,3 2 0302 -- Acircumflex
-char194 "
-~A 778,885,3 2 0303 -- Atilde
-char195 "
-:A 778,895,3 2 0304 -- Adieresis
-char196 "
-oA 778,924,3 2 0305 -- Aring
-char197 "
-AE 1000,681,4 2 0306 -- AE
-char198 "
-,C 722,695,225 2 0307 -- Ccedilla
-char199 "
-`E 611,915,4 2 0310 -- Egrave
-char200 "
-'E 611,915,4 2 0311 -- Eacute
-char201 "
-^E 611,905,4 2 0312 -- Ecircumflex
-char202 "
-:E 611,895,4 2 0313 -- Edieresis
-char203 "
-`I 389,915,3 2 0314 -- Igrave
-char204 "
-'I 389,915,3 2 0315 -- Iacute
-char205 "
-^I 389,905,3 2 0316 -- Icircumflex
-char206 "
-:I 389,895,3 2 0317 -- Idieresis
-char207 "
--D 833,681,3 2 0320 -- Eth
-char208 "
-~N 833,885,16 2 0321 -- Ntilde
-char209 "
-`O 833,915,17 2 0322 -- Ograve
-char210 "
-'O 833,915,17 2 0323 -- Oacute
-char211 "
-^O 833,905,17 2 0324 -- Ocircumflex
-char212 "
-~O 833,885,17 2 0325 -- Otilde
-char213 "
-:O 833,895,17 2 0326 -- Odieresis
-char214 "
-char215 606,483 0 0327 -- multiply
-/O 833,698,20 2 0330 -- Oslash
-char216 "
-`U 778,915,17 2 0331 -- Ugrave
-char217 "
-'U 778,915,17 2 0332 -- Uacute
-char218 "
-^U 778,905,17 2 0333 -- Ucircumflex
-char219 "
-:U 778,895,17 2 0334 -- Udieresis
-char220 "
-'Y 667,915,3 2 0335 -- Yacute
-char221 "
-TP 611,681,3 2 0336 -- Thorn
-char222 "
-ss 611,720,17 2 0337 -- germandbls
-char223 "
-`a 500,711,17 2 0340 -- agrave
-char224 "
-'a 500,711,17 2 0341 -- aacute
-char225 "
-^a 500,701,17 2 0342 -- acircumflex
-char226 "
-~a 500,673,17 2 0343 -- atilde
-char227 "
-:a 500,691,17 2 0344 -- adieresis
-char228 "
-oa 500,700,17 2 0345 -- aring
-char229 "
-ae 778,471,17 0 0346 -- ae
-char230 "
-,c 444,471,225 0 0347 -- ccedilla
-char231 "
-`e 500,711,17 2 0350 -- egrave
-char232 "
-'e 500,711,17 2 0351 -- eacute
-char233 "
-^e 500,701,17 2 0352 -- ecircumflex
-char234 "
-:e 500,691,17 2 0353 -- edieresis
-char235 "
-`i 333,711,3 2 0354 -- igrave
-char236 "
-'i 333,711,3 2 0355 -- iacute
-char237 "
-^i 333,701,3 2 0356 -- icircumflex
-char238 "
-:i 333,691,3 2 0357 -- idieresis
-char239 "
-Sd 556,720,17 2 0360 -- eth
-char240 "
-~n 611,673,3 2 0361 -- ntilde
-char241 "
-`o 556,711,17 2 0362 -- ograve
-char242 "
-'o 556,711,17 2 0363 -- oacute
-char243 "
-^o 556,701,17 2 0364 -- ocircumflex
-char244 "
-~o 556,673,17 2 0365 -- otilde
-char245 "
-:o 556,691,17 2 0366 -- odieresis
-char246 "
-char247 606,510 0 0367 -- divide
-/o 556,471,18 0 0370 -- oslash
-char248 "
-`u 611,711,17 2 0371 -- ugrave
-char249 "
-'u 611,711,17 2 0372 -- uacute
-char250 "
-^u 611,701,17 2 0373 -- ucircumflex
-char251 "
-:u 611,691,17 2 0374 -- udieresis
-char252 "
-'y 556,711,266 3 0375 -- yacute
-char253 "
-Tp 611,720,258 3 0376 -- thorn
-char254 "
-:y 556,691,266 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/PBI b/contrib/groff/font/devps/PBI
deleted file mode 100644
index 7ec5ff3ebfe1..000000000000
--- a/contrib/groff/font/devps/PBI
+++ /dev/null
@@ -1,463 +0,0 @@
-name PBI
-internalname Palatino-BoldItalic
-slant 10
-spacewidth 250
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -55
-A w -37
-A v -55
-A ' -55
-A cq -55
-A Y -74
-A W -74
-A V -74
-A T -55
-F . -111
-F , -111
-F A -74
-L y -37
-L ' -55
-L cq -55
-L Y -74
-L W -74
-L V -74
-L T -74
-P . -129
-P , -129
-P A -92
-R y -20
-R Y -37
-R W -55
-R V -55
-R T -37
-T y -80
-T w -50
-T u -92
-T ; -55
-T s -92
-T r -92
-T . -55
-T o -111
-T i -74
-T - -92
-T hy -92
-T char173 -92
-T e -111
-T , -55
-T : -55
-T c -92
-T a -111
-T O -18
-T A -55
-V y -50
-V u -50
-V ; -37
-V r -74
-V . -111
-V o -74
-V i -50
-V - -37
-V hy -37
-V char173 -37
-V e -74
-V , -111
-V : -37
-V a -92
-V A -74
-W y -30
-W u -30
-W ; -18
-W r -30
-W . -55
-W o -55
-W i -30
-W e -55
-W , -55
-W : -28
-W a -74
-W A -74
-Y v -30
-Y u -50
-Y ; -55
-Y q -92
-Y . -55
-Y p -74
-Y o -111
-Y i -54
-Y - -55
-Y hy -55
-Y char173 -55
-Y e -92
-Y , -55
-Y : -55
-Y a -111
-Y A -55
-f ' 37
-f cq 37
-f f -37
-1 1 -55
-` ` -55
-` oq -55
-oq ` -55
-oq oq -55
-' t -18
-cq t -18
-' s -37
-cq s -37
-' ' -55
-' cq -55
-cq ' -55
-cq cq -55
-r ' 55
-r cq 55
-r q -18
-r . -55
-r o -18
-r h -18
-r g -18
-r e -18
-r , -55
-r c -18
-v . -55
-v , -55
-w . -55
-w , -55
-y . -37
-y , -37
-charset
-ha 606,678,0,0,-13 2 0000 -- asciicircum
-ti 606,346,0,0,-1 0 0001 -- asciitilde
-vS 556,896,17,51,0,51 2 0002 -- Scaron
-vZ 667,896,3,59,49,59 2 0003 -- Zcaron
-vs 444,692,17,95,25,66 2 0004 -- scaron
-vz 500,692,17,67,19,66 2 0005 -- zcaron
-:Y 611,880,3,114,-4,66 2 0006 -- Ydieresis
-tm 1000,678,0,11,12,11 2 0007 -- trademark
-aq 250,720,0,93,-77,66 2 0010 -- quotesingle
-space 250 0 0040
-! 333,695,17,39,-8,39 2 0041 -- exclam
-" 500,720,0,43,-87,43 2 0042 -- quotedbl
-dq "
-# 500,673,0,46,46,46 2 0043 -- numbersign
-sh "
-$ 500,737,108,27,30,27 2 0044 -- dollar
-Do "
-% 889,697,17,0,-6 2 0045 -- percent
-& 833,695,17,28,-24,28 2 0046 -- ampersand
-' 278,720,0,74,-26,66 2 0047 -- quoteright
-cq "
-( 333,723,129,85,-8,66 2 0050 -- parenleft
-) 333,723,129,15,62,15 2 0051 -- parenright
-* 444,695,0,45,-34,45 2 0052 -- asterisk
-+ 606,501,5 0 0053 -- plus
-, 250,147,164,8,83,8 0 0054 -- comma
-- 389,300,0,23,13,23 0 0055 -- hyphen
-hy "
-char173 "
-. 250,135,17,0,2 0 0056 -- period
-/ 315,720,17,50,49,50 2 0057 -- slash
-sl "
-0 500,683,17,40,8,40 2 0060 -- zero
-1 500,678,3,0,9 2 0061 -- one
-2 500,683,3,4,49,4 2 0062 -- two
-3 500,683,17,0,42 2 0063 -- three
-4 500,683,3,37,47,37 2 0064 -- four
-5 500,675,17,31,36,31 2 0065 -- five
-6 500,683,17,38,11,38 2 0066 -- six
-7 500,674,3,94,-19,66 2 0067 -- seven
-8 500,683,17,34,24,34 2 0070 -- eight
-9 500,683,17,41,23,41 2 0071 -- nine
-: 250,452,17,36,12,36 0 0072 -- colon
-; 250,452,164,47,83,47 0 0073 -- semicolon
-< 606,517,21,2,1,2 0 0074 -- less
-= 606,390,0,0,-1 0 0075 -- equal
-> 606,517,21,1,2,1 0 0076 -- greater
-? 444,695,17,56,-41,56 2 0077 -- question
-@ 833,681,12,0,-32 2 0100 -- at
-at "
-A 722,683,3,13,85,13 2 0101 -- A
-B 667,681,3,12,42,12 2 0102 -- B
-C 685,695,17,60,-19,60 2 0103 -- C
-D 778,682,3,19,50,19 2 0104 -- D
-E 611,681,3,45,39,45 2 0105 -- E
-F 556,681,3,87,56,66 2 0106 -- F
-G 778,695,17,22,-22,22 2 0107 -- G
-H 778,681,3,98,62,66 2 0110 -- H
-I 389,681,3,73,51,66 2 0111 -- I
-J 389,681,207,78,79,66 2 0112 -- J
-K 722,681,3,74,60,66 2 0113 -- K
-L 611,681,3,17,24,17 2 0114 -- L
-M 944,681,17,91,73,66 2 0115 -- M
-N 778,681,3,101,52,66 2 0116 -- N
-O 833,695,17,11,-26,11 2 0117 -- O
-P 667,681,3,56,39,56 2 0120 -- P
-Q 833,695,222,11,-26,11 2 0121 -- Q
-R 722,681,3,25,46,25 2 0122 -- R
-S 556,695,17,11,0,11 2 0123 -- S
-T 611,681,3,113,-6,66 2 0124 -- T
-U 778,681,17,97,-33,66 2 0125 -- U
-V 667,681,3,128,-17,66 2 0126 -- V
-W 1000,689,3,123,-17,66 2 0127 -- W
-X 722,681,3,100,59,66 2 0130 -- X
-Y 611,695,3,114,-4,66 2 0131 -- Y
-Z 667,681,3,59,49,59 2 0132 -- Z
-[ 333,723,102,98,5,66 2 0133 -- bracketleft
-lB "
-\ 606,720,0,0,-22 2 0134 -- backslash
-rs "
-] 333,723,102,32,71,32 2 0135 -- bracketright
-rB "
-a^ 333,684,0,132,-38,66 2 0136 -- circumflex
-^ "
-_ 500,0,125,50,50,50 0 0137 -- underscore
-` 278,720,0,63,-15,63 2 0140 -- quoteleft
-oq "
-a 556,470,17,13,6,13 0 0141 -- a
-b 537,726,17,7,6,7 2 0142 -- b
-c 444,469,17,42,18,42 0 0143 -- c
-d 556,726,17,44,12,44 2 0144 -- d
-e 444,469,17,24,22,24 0 0145 -- e
-f 333,726,271,166,180,66 3 0146 -- f
-g 500,469,271,79,100,66 1 0147 -- g
-h 556,726,17,16,28,16 2 0150 -- h
-i 333,695,17,29,24,29 2 0151 -- i
-j 333,695,271,40,114,40 3 0152 -- j
-k 556,726,17,22,16,22 2 0153 -- k
-l 333,726,17,35,-14,35 2 0154 -- l
-m 833,469,17,20,31,20 0 0155 -- m
-n 556,469,17,15,33,15 0 0156 -- n
-o 556,469,17,0,2 0 0157 -- o
-p 556,469,271,10,71,10 1 0160 -- p
-q 537,469,271,26,18,26 1 0161 -- q
-r 389,469,17,72,30,66 0 0162 -- r
-s 444,469,17,12,25,12 0 0163 -- s
-t 389,636,17,70,8,66 2 0164 -- t
-u 556,469,17,15,28,15 0 0165 -- u
-v 556,469,17,7,31,7 0 0166 -- v
-w 833,469,17,19,23,19 0 0167 -- w
-x 500,469,17,50,58,50 0 0170 -- x
-y 556,469,271,35,37,35 1 0171 -- y
-z 500,469,17,20,19,20 0 0172 -- z
-lC 333,720,105,51,32,51 2 0173 -- braceleft
-{ "
-ba 606,720,0,0,-209 2 0174 -- bar
-| "
-rC 333,720,105,32,51,32 2 0175 -- braceright
-} "
-a~ 333,654,0,158,-32,66 2 0176 -- tilde
-~ "
-bq 250,145,144,20,53,20 0 0200 -- quotesinglbase
-Fo 500,446,0,8,15,8 0 0201 -- guillemotleft
-char171 "
-Fc 500,443,0,8,15,8 0 0202 -- guillemotright
-char187 "
-bu 606,516,0,0,-81 0 0203 -- bullet
-Fn 500,690,242,29,42,29 2 0204 -- florin
-f/ 167,683,0,221,220,66 2 0205 -- fraction
-%0 1000,691,17,0,-15 2 0206 -- perthousand
-dg 556,685,3,0,-17 2 0207 -- dagger
-dd 556,693,153,31,17,31 2 0210 -- daggerdbl
-en 500,282,0,62,62,62 0 0211 -- endash
-em 1000,282,0,62,62,62 0 0212 -- emdash
-fi 611,726,271,27,180,27 3 0214 -- fi
-fl 611,726,271,70,180,66 3 0215 -- fl
-.i 333,469,17,10,24,10 0 0220 -- dotlessi
-ga 333,699,0,39,-60,39 2 0222 -- grave
-a" 333,699,0,126,78,66 2 0223 -- hungarumlaut
-a. 333,668,0,42,-152,42 2 0224 -- dotaccent
-ab 333,680,0,129,-46,66 2 0225 -- breve
-ah 333,684,0,162,-63,66 2 0226 -- caron
-ao 556,714,0,0,-227 2 0227 -- ring
-ho 333,0,206,0,18 0 0230 -- ogonek
-lq 500,720,0,61,-15,61 2 0231 -- quotedblleft
-rq 500,720,0,69,-23,66 2 0232 -- quotedblright
-oe 778,469,17,27,2,27 0 0233 -- oe
-/l 333,726,17,82,37,66 2 0234 -- lslash
-Bq 500,145,144,0,68 0 0235 -- quotedblbase
-OE 944,695,17,67,11,66 2 0236 -- OE
-/L 611,681,3,17,44,17 2 0237 -- Lslash
-r! 333,479,225,0,48 0 0241 -- exclamdown
-char161 "
-ct 500,547,105,6,-2,6 0 0242 -- cent
-char162 "
-Po 500,683,5,51,29,51 2 0243 -- sterling
-char163 "
-Cs 500,533,0,18,18,18 0 0244 -- currency
-char164 "
-Ye 500,695,3,88,39,66 2 0245 -- yen
-char165 "
-bb 606,720,0,0,-209 2 0246 -- brokenbar
-char166 "
-sc 556,695,151,0,3 2 0247 -- section
-char167 "
-ad 333,668,0,143,-40,66 2 0250 -- dieresis
-char168 "
-co 747,695,17,23,24,23 2 0251 -- copyright
-char169 "
-Of 333,684,0,72,3,66 2 0252 -- ordfeminine
-char170 "
-fo 333,446,0,9,-10,9 0 0253 -- guilsinglleft
-no 606,390,0,0,-1 0 0254 -- logicalnot
-char172 "
-\- 606,292,0,0,-1 0 0255 -- minus
-rg 747,695,17,23,24,23 2 0256 -- registered
-char174 "
-a- 333,608,0,135,-26,66 0 0257 -- macron
-char175 "
-de 400,683 2 0260 -- degree
-char176 "
-char177 606,501 0 0261 -- plusminus
-S2 300,683,0,71,24,66 2 0262 -- twosuperior
-char178 "
-S3 300,683,0,60,27,60 2 0263 -- threesuperior
-char179 "
-aa 333,699,0,109,-103,66 2 0264 -- acute
-char180 "
-char181 556,469,232,15,65,15 0 0265 -- mu
-ps 556,681,204,123,36,66 2 0266 -- paragraph
-char182 "
-pc 250,324,0,6,-17,6 0 0267 -- periodcentered
-char183 "
-ac 333,5,218,0,38 0 0270 -- cedilla
-char184 "
-S1 300,680,0,48,9,48 2 0271 -- onesuperior
-char185 "
-Om 333,683,0,63,-1,63 2 0272 -- ordmasculine
-char186 "
-fc 333,443,0,0,15 0 0273 -- guilsinglright
-14 750,683,2,32,32,32 2 0274 -- onequarter
-char188 "
-12 750,683,2,36,36,36 2 0275 -- onehalf
-char189 "
-34 750,683,2,32,32,32 2 0276 -- threequarters
-char190 "
-r? 444,479,226,0,62 0 0277 -- questiondown
-char191 "
-`A 722,911,3,13,85,13 2 0300 -- Agrave
-char192 "
-'A 722,911,3,13,85,13 2 0301 -- Aacute
-char193 "
-^A 722,896,3,13,85,13 2 0302 -- Acircumflex
-char194 "
-~A 722,866,3,13,85,13 2 0303 -- Atilde
-char195 "
-:A 722,880,3,13,85,13 2 0304 -- Adieresis
-char196 "
-oA 722,926,3,13,85,13 2 0305 -- Aring
-char197 "
-AE 944,681,3,33,79,33 2 0306 -- AE
-char198 "
-,C 685,695,218,60,-19,60 2 0307 -- Ccedilla
-char199 "
-`E 611,911,3,45,39,45 2 0310 -- Egrave
-char200 "
-'E 611,911,3,45,39,45 2 0311 -- Eacute
-char201 "
-^E 611,896,3,45,39,45 2 0312 -- Ecircumflex
-char202 "
-:E 611,880,3,45,39,45 2 0313 -- Edieresis
-char203 "
-`I 389,911,3,73,51,66 2 0314 -- Igrave
-char204 "
-'I 389,911,3,81,51,66 2 0315 -- Iacute
-char205 "
-^I 389,896,3,104,51,66 2 0316 -- Icircumflex
-char206 "
-:I 389,880,3,115,51,66 2 0317 -- Idieresis
-char207 "
--D 778,682,3,19,50,19 2 0320 -- Eth
-char208 "
-~N 778,866,3,101,52,66 2 0321 -- Ntilde
-char209 "
-`O 833,911,17,11,-26,11 2 0322 -- Ograve
-char210 "
-'O 833,911,17,11,-26,11 2 0323 -- Oacute
-char211 "
-^O 833,896,17,11,-26,11 2 0324 -- Ocircumflex
-char212 "
-~O 833,866,17,11,-26,11 2 0325 -- Otilde
-char213 "
-:O 833,880,17,11,-26,11 2 0326 -- Odieresis
-char214 "
-char215 606,479,0,0,-22 0 0327 -- multiply
-/O 833,730,54,14,-7,14 2 0330 -- Oslash
-char216 "
-`U 778,911,17,97,-33,66 2 0331 -- Ugrave
-char217 "
-'U 778,911,17,97,-33,66 2 0332 -- Uacute
-char218 "
-^U 778,896,17,97,-33,66 2 0333 -- Ucircumflex
-char219 "
-:U 778,880,17,97,-33,66 2 0334 -- Udieresis
-char220 "
-'Y 611,911,3,114,-4,66 2 0335 -- Yacute
-char221 "
-TP 667,681,3,27,39,27 2 0336 -- Thorn
-char222 "
-ss 556,726,271,43,181,43 3 0337 -- germandbls
-char223 "
-`a 556,719,17,13,6,13 2 0340 -- agrave
-char224 "
-'a 556,719,17,13,6,13 2 0341 -- aacute
-char225 "
-^a 556,704,17,21,6,21 2 0342 -- acircumflex
-char226 "
-~a 556,666,17,47,6,47 2 0343 -- atilde
-char227 "
-:a 556,688,17,32,6,32 2 0344 -- adieresis
-char228 "
-oa 556,714,17,13,6,13 2 0345 -- aring
-char229 "
-ae 738,469,17,23,6,23 0 0346 -- ae
-char230 "
-,c 444,469,218,42,18,42 0 0347 -- ccedilla
-char231 "
-`e 444,719,17,24,22,24 2 0350 -- egrave
-char232 "
-'e 444,719,17,54,22,54 2 0351 -- eacute
-char233 "
-^e 444,704,17,77,22,66 2 0352 -- ecircumflex
-char234 "
-:e 444,688,17,88,22,66 2 0353 -- edieresis
-char235 "
-`i 333,719,17,39,24,39 2 0354 -- igrave
-char236 "
-'i 333,719,17,109,24,66 2 0355 -- iacute
-char237 "
-^i 333,704,17,120,24,66 2 0356 -- icircumflex
-char238 "
-:i 333,688,17,143,24,66 2 0357 -- idieresis
-char239 "
-Sd 556,726,17,40,2,40 2 0360 -- eth
-char240 "
-~n 556,666,17,47,33,47 2 0361 -- ntilde
-char241 "
-`o 556,719,17,0,2 2 0362 -- ograve
-char242 "
-'o 556,719,17,0,2 2 0363 -- oacute
-char243 "
-^o 556,704,17,9,2,9 2 0364 -- ocircumflex
-char244 "
-~o 556,666,17,47,2,47 2 0365 -- otilde
-char245 "
-:o 556,688,17,32,2,32 2 0366 -- odieresis
-char246 "
-char247 606,501,5 0 0367 -- divide
-/o 556,506,50,16,36,16 0 0370 -- oslash
-char248 "
-`u 556,719,17,15,28,15 2 0371 -- ugrave
-char249 "
-'u 556,719,17,15,28,15 2 0372 -- uacute
-char250 "
-^u 556,704,17,15,28,15 2 0373 -- ucircumflex
-char251 "
-:u 556,688,17,32,28,32 2 0374 -- udieresis
-char252 "
-'y 556,719,271,35,37,35 3 0375 -- yacute
-char253 "
-Tp 556,726,271,10,71,10 3 0376 -- thorn
-char254 "
-:y 556,688,271,35,37,35 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/PI b/contrib/groff/font/devps/PI
deleted file mode 100644
index d35c7f8a4192..000000000000
--- a/contrib/groff/font/devps/PI
+++ /dev/null
@@ -1,465 +0,0 @@
-name PI
-internalname Palatino-Italic
-slant 10
-spacewidth 250
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -55
-A w -37
-A v -37
-A ' -55
-A cq -55
-A Y -55
-A W -55
-A V -74
-A T -55
-F . -111
-F , -111
-F A -111
-L y -37
-L ' -37
-L cq -37
-L Y -74
-L W -74
-L V -74
-L T -74
-P . -129
-P , -129
-P A -129
-R y -37
-R Y -55
-R W -55
-R V -74
-R T -55
-T y -92
-T w -92
-T u -111
-T ; -74
-T s -111
-T r -111
-T . -74
-T o -111
-T i -55
-T - -55
-T hy -55
-T char173 -55
-T e -111
-T , -74
-T : -74
-T c -111
-T a -111
-T O -18
-T A -92
-V y -74
-V u -74
-V ; -37
-V r -92
-V . -129
-V o -74
-V i -74
-V - -55
-V hy -55
-V char173 -55
-V e -92
-V , -129
-V : -37
-V a -74
-V A -210
-W y -20
-W u -20
-W ; -18
-W r -20
-W . -55
-W o -20
-W i -20
-W - -18
-W hy -18
-W char173 -18
-W e -20
-W , -55
-W : -18
-W a -20
-W A -92
-Y v -74
-Y u -92
-Y ; -74
-Y q -92
-Y . -92
-Y p -74
-Y o -111
-Y i -55
-Y - -74
-Y hy -74
-Y char173 -74
-Y e -111
-Y , -92
-Y : -74
-Y a -92
-Y A -92
-f ' 55
-f cq 55
-1 1 -55
-` ` -74
-` oq -74
-oq ` -74
-oq oq -74
-' t -37
-cq t -37
-' s -55
-cq s -55
-' ' -74
-' cq -74
-cq ' -74
-cq cq -74
-r ' 37
-r cq 37
-r q -18
-r . -74
-r o -18
-r h -18
-r g -18
-r e -18
-r , -74
-r c -18
-v . -55
-v , -55
-w . -55
-w , -55
-y . -37
-y , -37
-charset
-ha 606,689,0,0,-1 2 0000 -- asciicircum
-ti 606,339,0,0,-1 0 0001 -- asciitilde
-vS 556,907,18,33,8,33 2 0002 -- Scaron
-vZ 667,907,3,20,30,20 2 0003 -- Zcaron
-vs 389,687,11,80,41,68 2 0004 -- scaron
-vz 444,687,11,53,51,53 2 0005 -- zcaron
-:Y 667,847,3,58,-2,58 2 0006 -- Ydieresis
-tm 1000,689,0,1,-2,1 2 0007 -- trademark
-aq 333,733,0,5,-90,5 2 0010 -- quotesingle
-space 250 0 0040
-! 333,733,8,9,-26,9 2 0041 -- exclam
-" 500,733,0,5,-90,5 2 0042 -- quotedbl
-dq "
-# 500,692,0,45,46,45 2 0043 -- numbersign
-sh "
-$ 500,733,113,2,35,2 2 0044 -- dollar
-Do "
-% 889,710,7,0,-24 2 0045 -- percent
-& 778,692,18,38,3,38 2 0046 -- ampersand
-' 278,733,0,30,-28,30 2 0047 -- quoteright
-cq "
-( 333,733,106,48,-4,48 2 0050 -- parenleft
-) 333,733,106,0,48 2 0051 -- parenright
-* 389,706,0,61,-26,61 2 0052 -- asterisk
-+ 606,504,0,0,-1 0 0053 -- plus
-, 250,123,143,3,42,3 0 0054 -- comma
-- 333,281,0,21,31,21 0 0055 -- hyphen
-hy "
-char173 "
-. 250,112,5,0,-3 0 0056 -- period
-/ 296,733,119,146,90,68 2 0057 -- slash
-sl "
-0 500,699,11,30,14,30 2 0060 -- zero
-1 500,699,3,0,-4 2 0061 -- one
-2 500,699,3,0,38 2 0062 -- two
-3 500,699,11,0,28 2 0063 -- three
-4 500,699,3,28,35,28 2 0064 -- four
-5 500,693,11,41,36,41 2 0065 -- five
-6 500,699,11,19,1,19 2 0066 -- six
-7 500,692,3,52,-3,52 2 0067 -- seven
-8 500,699,11,19,14,19 2 0070 -- eight
-9 500,699,11,18,18,18 2 0071 -- nine
-: 250,458,5,7,6,7 0 0072 -- colon
-; 250,456,146,19,59,19 0 0073 -- semicolon
-< 606,516,6,0,-3 0 0074 -- less
-= 606,378,0,0,-1 0 0075 -- equal
-> 606,516,6,0,-3 0 0076 -- greater
-? 500,706,8,0,-64 2 0077 -- question
-@ 747,706,18,21,23,21 2 0100 -- at
-at "
-A 722,705,3,5,69,5 2 0101 -- A
-B 611,692,6,0,24 2 0102 -- B
-C 667,706,18,34,5,34 2 0103 -- C
-D 778,692,3,13,22,13 2 0104 -- D
-E 611,692,3,9,20,9 2 0105 -- E
-F 556,692,3,42,50,42 2 0106 -- F
-G 722,706,18,22,0,22 2 0107 -- G
-H 778,692,3,72,53,68 2 0110 -- H
-I 333,692,3,71,43,68 2 0111 -- I
-J 333,692,206,75,85,68 2 0112 -- J
-K 667,692,3,66,37,66 2 0113 -- K
-L 556,692,3,17,34,17 2 0114 -- L
-M 944,692,18,46,69,46 2 0115 -- M
-N 778,692,11,76,48,68 2 0116 -- N
-O 778,706,18,20,-3,20 2 0117 -- O
-P 611,692,3,33,41,33 2 0120 -- P
-Q 778,706,201,20,-3,20 2 0121 -- Q
-R 667,692,3,22,41,22 2 0122 -- R
-S 556,706,18,0,8 2 0123 -- S
-T 611,692,3,74,-3,68 2 0124 -- T
-U 778,692,18,70,-38,68 2 0125 -- U
-V 722,692,8,82,-25,68 2 0126 -- V
-W 944,700,8,86,-21,68 2 0127 -- W
-X 722,692,3,62,30,62 2 0130 -- X
-Y 667,705,3,58,-2,58 2 0131 -- Y
-Z 667,692,3,20,30,20 2 0132 -- Z
-[ 333,733,100,43,32,43 2 0133 -- bracketleft
-lB "
-\ 606,733,0,0,-31 2 0134 -- backslash
-rs "
-] 333,733,100,32,43,32 2 0135 -- bracketright
-rB "
-a^ 333,679,0,67,-6,67 2 0136 -- circumflex
-^ "
-_ 500,0,125,50,50,50 0 0137 -- underscore
-` 278,733,0,30,-28,30 2 0140 -- quoteleft
-oq "
-a 444,482,11,12,46,12 0 0141 -- a
-b 463,733,11,20,13,20 2 0142 -- b
-c 407,482,11,32,25,32 0 0143 -- c
-d 500,733,11,33,33,33 2 0144 -- d
-e 389,482,11,35,35,35 0 0145 -- e
-f 278,733,276,185,212,68 3 0146 -- f
-g 500,482,276,48,87,48 1 0147 -- g
-h 500,733,9,21,40,21 2 0150 -- h
-i 278,712,9,36,16,36 2 0151 -- i
-j 278,712,276,37,120,37 3 0152 -- j
-k 444,733,9,55,42,55 2 0153 -- k
-l 278,733,9,23,14,23 2 0154 -- l
-m 778,482,9,12,26,12 0 0155 -- m
-n 556,482,9,8,26,8 0 0156 -- n
-o 444,482,11,17,33,17 0 0157 -- o
-p 500,482,276,15,57,15 1 0160 -- p
-q 463,482,276,19,26,19 1 0161 -- q
-r 389,482,9,45,24,45 0 0162 -- r
-s 389,482,11,6,41,6 0 0163 -- s
-t 333,646,9,27,9,27 2 0164 -- t
-u 556,482,11,6,18,6 0 0165 -- u
-v 500,482,11,27,29,27 0 0166 -- v
-w 722,482,11,27,29,27 0 0167 -- w
-x 500,482,11,34,41,34 0 0170 -- x
-y 500,482,276,40,58,40 1 0171 -- y
-z 444,482,11,22,51,22 0 0172 -- z
-lC 333,733,100,36,35,36 2 0173 -- braceleft
-{ "
-ba 606,733,0,0,-225 2 0174 -- bar
-| "
-rC 333,733,100,35,36,35 2 0175 -- braceright
-} "
-a~ 333,638,0,107,-13,68 0 0176 -- tilde
-~ "
-bq 278,120,122,0,23 0 0200 -- quotesinglbase
-Fo 500,440,0,0,-7 0 0201 -- guillemotleft
-char171 "
-Fc 500,440,0,0,-13 0 0202 -- guillemotright
-char187 "
-bu 500,526,0,0,-36 0 0203 -- bullet
-Fn 500,708,276,20,45,20 3 0204 -- florin
-f/ 167,699,0,220,220,68 2 0205 -- fraction
-%0 1000,717,6,0,-22 2 0206 -- perthousand
-dg 500,692,0,19,2,19 2 0207 -- dagger
-dd 500,692,162,44,40,44 2 0210 -- daggerdbl
-en 500,278,0,60,60,60 0 0211 -- endash
-em 1000,278,0,60,60,60 0 0212 -- emdash
-fi 528,733,276,24,212,24 3 0214 -- fi
-fl 545,733,276,25,212,25 3 0215 -- fl
-.i 278,482,9,13,16,13 0 0220 -- dotlessi
-ga 333,687,0,27,-36,27 2 0222 -- grave
-a" 333,730,0,102,4,68 2 0223 -- hungarumlaut
-a. 333,645,0,0,-125 2 0224 -- dotaccent
-ab 333,677,0,110,-42,68 2 0225 -- breve
-ah 333,679,0,126,-54,68 2 0226 -- caron
-ao 333,708,0,76,-109,68 2 0227 -- ring
-ho 333,0,207,0,12 0 0230 -- ogonek
-lq 500,733,0,25,-48,25 2 0231 -- quotedblleft
-rq 500,733,0,25,-48,25 2 0232 -- quotedblright
-oe 669,482,11,35,33,35 0 0233 -- oe
-/l 278,733,9,74,60,68 2 0234 -- lslash
-Bq 500,120,122,0,7 0 0235 -- quotedblbase
-OE 1028,706,18,11,-6,11 2 0236 -- OE
-/L 556,692,3,17,66,17 2 0237 -- Lslash
-r! 333,467,276,0,35 1 0241 -- exclamdown
-char161 "
-ct 500,551,96,0,-6 0 0242 -- cent
-char162 "
-Po 500,708,18,29,48,29 2 0243 -- sterling
-char163 "
-Cs 500,577,0,36,36,36 0 0244 -- currency
-char164 "
-Ye 500,699,3,62,15,62 2 0245 -- yen
-char165 "
-bb 606,733,0,0,-225 2 0246 -- brokenbar
-char166 "
-sc 500,706,220,13,36,13 2 0247 -- section
-char167 "
-ad 333,637,0,95,-28,68 0 0250 -- dieresis
-char168 "
-co 747,706,18,39,39,39 2 0251 -- copyright
-char169 "
-Of 333,699,0,38,-10,38 2 0252 -- ordfeminine
-char170 "
-fo 333,440,0,0,-7 0 0253 -- guilsinglleft
-no 606,378,0,0,-1 0 0254 -- logicalnot
-char172 "
-\- 606,280,0,0,-1 0 0255 -- minus
-rg 747,706,18,39,39,39 2 0256 -- registered
-char174 "
-a- 333,589,0,103,-24,68 0 0257 -- macron
-char175 "
-de 400,689,0,40,-40,40 2 0260 -- degree
-char176 "
-char177 606,504,0,0,-1 0 0261 -- plusminus
-S2 300,699,0,40,37,40 2 0262 -- twosuperior
-char178 "
-S3 300,699,0,54,22,54 2 0263 -- threesuperior
-char179 "
-aa 333,687,0,63,-72,63 2 0264 -- acute
-char180 "
-char181 556,482,226,6,35,6 0 0265 -- mu
-ps 500,692,224,161,17,68 2 0266 -- paragraph
-char182 "
-pc 250,312,0,0,-3 0 0267 -- periodcentered
-char183 "
-ac 333,0,216,0,59 0 0270 -- cedilla
-char184 "
-S1 300,699,0,35,-11,35 2 0271 -- onesuperior
-char185 "
-Om 333,699,0,39,-16,39 2 0272 -- ordmasculine
-char186 "
-fc 333,440,0,0,-13 0 0273 -- guilsinglright
-14 750,699,2,15,19,15 2 0274 -- onequarter
-char188 "
-12 750,699,2,21,19,21 2 0275 -- onehalf
-char189 "
-34 750,699,2,15,15,15 2 0276 -- threequarters
-char190 "
-r? 500,467,246,0,-7 0 0277 -- questiondown
-char191 "
-`A 722,897,3,5,69,5 2 0300 -- Agrave
-char192 "
-'A 722,897,3,5,69,5 2 0301 -- Aacute
-char193 "
-^A 722,889,3,5,69,5 2 0302 -- Acircumflex
-char194 "
-~A 722,866,3,5,69,5 2 0303 -- Atilde
-char195 "
-:A 722,847,3,5,69,5 2 0304 -- Adieresis
-char196 "
-oA 722,918,3,5,69,5 2 0305 -- Aring
-char197 "
-AE 941,692,3,11,54,11 2 0306 -- AE
-char198 "
-,C 667,706,216,34,5,34 2 0307 -- Ccedilla
-char199 "
-`E 611,897,3,9,20,9 2 0310 -- Egrave
-char200 "
-'E 611,897,3,9,20,9 2 0311 -- Eacute
-char201 "
-^E 611,889,3,9,20,9 2 0312 -- Ecircumflex
-char202 "
-:E 611,847,3,9,20,9 2 0313 -- Edieresis
-char203 "
-`I 333,897,3,71,43,68 2 0314 -- Igrave
-char204 "
-'I 333,897,3,123,43,68 2 0315 -- Iacute
-char205 "
-^I 333,889,3,107,43,68 2 0316 -- Icircumflex
-char206 "
-:I 333,847,3,135,43,68 2 0317 -- Idieresis
-char207 "
--D 778,692,3,13,31,13 2 0320 -- Eth
-char208 "
-~N 778,866,11,76,48,68 2 0321 -- Ntilde
-char209 "
-`O 778,897,18,20,-3,20 2 0322 -- Ograve
-char210 "
-'O 778,897,18,20,-3,20 2 0323 -- Oacute
-char211 "
-^O 778,889,18,20,-3,20 2 0324 -- Ocircumflex
-char212 "
-~O 778,866,18,20,-3,20 2 0325 -- Otilde
-char213 "
-:O 778,847,18,20,-3,20 2 0326 -- Odieresis
-char214 "
-char215 606,474,0,0,-33 0 0327 -- multiply
-/O 778,721,39,34,18,34 2 0330 -- Oslash
-char216 "
-`U 778,897,18,70,-38,68 2 0331 -- Ugrave
-char217 "
-'U 778,897,18,70,-38,68 2 0332 -- Uacute
-char218 "
-^U 778,889,18,70,-38,68 2 0333 -- Ucircumflex
-char219 "
-:U 778,847,18,70,-38,68 2 0334 -- Udieresis
-char220 "
-'Y 667,897,3,58,-2,58 2 0335 -- Yacute
-char221 "
-TP 611,692,3,9,41,9 2 0336 -- Thorn
-char222 "
-ss 500,733,276,38,210,38 3 0337 -- germandbls
-char223 "
-`a 444,707,11,12,46,12 2 0340 -- agrave
-char224 "
-'a 444,707,11,20,46,20 2 0341 -- aacute
-char225 "
-^a 444,699,11,12,46,12 2 0342 -- acircumflex
-char226 "
-~a 444,650,11,52,46,52 2 0343 -- atilde
-char227 "
-:a 444,657,11,40,46,40 2 0344 -- adieresis
-char228 "
-oa 444,728,11,12,46,12 2 0345 -- aring
-char229 "
-ae 638,482,11,35,49,35 0 0346 -- ae
-char230 "
-,c 407,482,216,32,25,32 0 0347 -- ccedilla
-char231 "
-`e 389,707,11,35,35,35 2 0350 -- egrave
-char232 "
-'e 389,707,11,55,35,55 2 0351 -- eacute
-char233 "
-^e 389,699,11,59,35,59 2 0352 -- ecircumflex
-char234 "
-:e 389,657,11,67,35,67 2 0353 -- edieresis
-char235 "
-`i 278,707,9,43,16,43 2 0354 -- igrave
-char236 "
-'i 278,707,9,103,16,68 2 0355 -- iacute
-char237 "
-^i 278,699,9,95,21,68 2 0356 -- icircumflex
-char238 "
-:i 278,657,9,123,16,68 2 0357 -- idieresis
-char239 "
-Sd 444,733,11,84,33,68 2 0360 -- eth
-char240 "
-~n 556,650,9,8,26,8 2 0361 -- ntilde
-char241 "
-`o 444,707,11,17,33,17 2 0362 -- ograve
-char242 "
-'o 444,707,11,20,33,20 2 0363 -- oacute
-char243 "
-^o 444,699,11,17,33,17 2 0364 -- ocircumflex
-char244 "
-~o 444,650,11,52,33,52 2 0365 -- otilde
-char245 "
-:o 444,657,11,40,33,40 2 0366 -- odieresis
-char246 "
-char247 606,504,0,0,-1 0 0367 -- divide
-/o 444,510,24,66,68,66 0 0370 -- oslash
-char248 "
-`u 556,707,11,6,18,6 2 0371 -- ugrave
-char249 "
-'u 556,707,11,6,18,6 2 0372 -- uacute
-char250 "
-^u 556,699,11,6,18,6 2 0373 -- ucircumflex
-char251 "
-:u 556,657,11,6,18,6 2 0374 -- udieresis
-char252 "
-'y 500,707,276,40,58,40 3 0375 -- yacute
-char253 "
-Tp 500,733,276,0,89 3 0376 -- thorn
-char254 "
-:y 500,657,276,40,58,40 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/PR b/contrib/groff/font/devps/PR
deleted file mode 100644
index 2eccf3c12fbb..000000000000
--- a/contrib/groff/font/devps/PR
+++ /dev/null
@@ -1,466 +0,0 @@
-name PR
-internalname Palatino-Roman
-spacewidth 250
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -74
-A w -74
-A v -92
-A ' -74
-A cq -74
-A Y -111
-A W -74
-A V -111
-A T -74
-F . -92
-F , -92
-F A -74
-L y -55
-L ' -74
-L cq -74
-L Y -92
-L W -74
-L V -92
-L T -74
-P . -129
-P , -129
-P A -92
-R y -37
-R Y -37
-R W -37
-R V -55
-R T -37
-T y -90
-T w -90
-T u -90
-T ; -55
-T s -90
-T r -90
-T . -74
-T o -92
-T i -55
-T - -55
-T hy -55
-T char173 -55
-T e -92
-T , -74
-T : -55
-T c -111
-T a -92
-T O -18
-T A -74
-V y -92
-V u -92
-V ; -55
-V r -92
-V . -129
-V o -111
-V i -55
-V - -74
-V hy -74
-V char173 -74
-V e -111
-V , -129
-V : -55
-V a -92
-V A -111
-W y -50
-W u -50
-W ; -18
-W r -74
-W . -92
-W o -92
-W i -55
-W - -55
-W hy -55
-W char173 -55
-W e -92
-W , -92
-W : -18
-W a -92
-W A -92
-Y v -90
-Y u -90
-Y ; -74
-Y q -90
-Y . -111
-Y p -111
-Y o -92
-Y i -55
-Y - -92
-Y hy -92
-Y char173 -92
-Y e -92
-Y , -111
-Y : -74
-Y a -92
-Y A -92
-f ' 55
-f cq 55
-f f -18
-1 1 -55
-` ` -37
-` oq -37
-oq ` -37
-oq oq -37
-' ' -37
-' cq -37
-cq ' -37
-cq cq -37
-r u -8
-r ' 74
-r cq 74
-r q -18
-r . -74
-r o -18
-r - -18
-r hy -18
-r char173 -18
-r h -18
-r g -18
-r e -18
-r d -18
-r , -74
-r c -18
-v . -111
-v , -111
-w . -92
-w , -92
-y . -111
-y , -111
-charset
-ha 606,689 2 0000 -- asciicircum
-ti 606,347 0 0001 -- asciitilde
-vS 525,908,20 2 0002 -- Scaron
-vZ 667,908,3 2 0003 -- Zcaron
-vs 424,685,20 2 0004 -- scaron
-vz 500,685,3 2 0005 -- zcaron
-:Y 667,868,3 2 0006 -- Ydieresis
-tm 979,689 2 0007 -- trademark
-aq 208,709 2 0010 -- quotesingle
-space 250 0 0040
-! 278,694,5 2 0041 -- exclam
-" 371,709 2 0042 -- quotedbl
-dq "
-# 500,684 2 0043 -- numbersign
-sh "
-$ 500,731,116 2 0044 -- dollar
-Do "
-% 840,709,20 2 0045 -- percent
-& 778,689,20 2 0046 -- ampersand
-' 278,709 2 0047 -- quoteright
-cq "
-( 333,726,215 2 0050 -- parenleft
-) 333,726,215 2 0051 -- parenright
-* 389,689 2 0052 -- asterisk
-+ 606,512 0 0053 -- plus
-, 250,123,155 0 0054 -- comma
-- 333,287 0 0055 -- hyphen
-hy "
-char173 "
-. 250,111,5 0 0056 -- period
-/ 606,726,119 2 0057 -- slash
-sl "
-0 500,689,20 2 0060 -- zero
-1 500,694,3 2 0061 -- one
-2 500,689,3 2 0062 -- two
-3 500,689,20 2 0063 -- three
-4 500,694,3 2 0064 -- four
-5 500,689,20 2 0065 -- five
-6 500,689,20 2 0066 -- six
-7 500,689,3 2 0067 -- seven
-8 500,689,20 2 0070 -- eight
-9 500,689,20 2 0071 -- nine
-: 250,456,5 0 0072 -- colon
-; 250,456,153 0 0073 -- semicolon
-< 606,522 0 0074 -- less
-= 606,386 0 0075 -- equal
-> 606,522 0 0076 -- greater
-? 444,694,5 2 0077 -- question
-@ 747,694,20 2 0100 -- at
-at "
-A 778,700,3 2 0101 -- A
-B 611,692,3 2 0102 -- B
-C 709,709,20 2 0103 -- C
-D 774,692,3 2 0104 -- D
-E 611,692,3 2 0105 -- E
-F 556,692,3 2 0106 -- F
-G 763,709,20 2 0107 -- G
-H 832,692,3 2 0110 -- H
-I 337,692,3 2 0111 -- I
-J 333,692,194 2 0112 -- J
-K 726,692,3 2 0113 -- K
-L 611,692,3 2 0114 -- L
-M 946,692,13 2 0115 -- M
-N 831,692,20 2 0116 -- N
-O 786,709,20 2 0117 -- O
-P 604,692,3 2 0120 -- P
-Q 786,709,176 2 0121 -- Q
-R 668,692,3 2 0122 -- R
-S 525,709,20 2 0123 -- S
-T 613,692,3 2 0124 -- T
-U 778,692,20 2 0125 -- U
-V 722,692,9 2 0126 -- V
-W 1000,700,9 2 0127 -- W
-X 667,700,3 2 0130 -- X
-Y 667,704,3 2 0131 -- Y
-Z 667,692,3 2 0132 -- Z
-[ 333,726,184 2 0133 -- bracketleft
-lB "
-\ 606,726 2 0134 -- backslash
-rs "
-] 333,726,184 2 0135 -- bracketright
-rB "
-a^ 333,677 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 278,709 2 0140 -- quoteleft
-oq "
-a 500,469,12 0 0141 -- a
-b 553,726,12 2 0142 -- b
-c 444,469,20 0 0143 -- c
-d 611,726,12 2 0144 -- d
-e 479,469,20 0 0145 -- e
-f 333,728,3 2 0146 -- f
-g 556,469,283 1 0147 -- g
-h 582,726,3 2 0150 -- h
-i 291,687,3 2 0151 -- i
-j 234,688,283 3 0152 -- j
-k 556,726,12 2 0153 -- k
-l 291,726,3 2 0154 -- l
-m 883,469,3 0 0155 -- m
-n 582,469,3 0 0156 -- n
-o 546,469,20 0 0157 -- o
-p 601,469,281 1 0160 -- p
-q 560,469,281 1 0161 -- q
-r 395,469,3 0 0162 -- r
-s 424,469,20 0 0163 -- s
-t 326,621,12 2 0164 -- t
-u 603,469,12 0 0165 -- u
-v 565,459,7 0 0166 -- v
-w 834,469,7 0 0167 -- w
-x 516,469,3 0 0170 -- x
-y 556,459,283 1 0171 -- y
-z 500,462,3 0 0172 -- z
-lC 333,726,175 2 0173 -- braceleft
-{ "
-ba 606,726 2 0174 -- bar
-| "
-rC 333,726,175 2 0175 -- braceright
-} "
-a~ 333,640 2 0176 -- tilde
-~ "
-bq 278,110,153 0 0200 -- quotesinglbase
-Fo 500,428 0 0201 -- guillemotleft
-char171 "
-Fc 500,428 0 0202 -- guillemotright
-char187 "
-bu 606,516 0 0203 -- bullet
-Fn 500,706,262 2 0204 -- florin
-f/ 167,689 2 0205 -- fraction
-%0 1144,709,20 2 0206 -- perthousand
-dg 500,694,5 2 0207 -- dagger
-dd 500,694,249 2 0210 -- daggerdbl
-en 500,277 0 0211 -- endash
-em 1000,277 0 0212 -- emdash
-fi 605,728,3 2 0214 -- fi
-fl 608,728,3 2 0215 -- fl
-.i 287,469,3 0 0220 -- dotlessi
-ga 333,677 2 0222 -- grave
-a" 380,687 2 0223 -- hungarumlaut
-a. 250,637 2 0224 -- dotaccent
-ab 333,664 2 0225 -- breve
-ah 333,677 2 0226 -- caron
-ao 333,696 2 0227 -- ring
-ho 313,0,165 0 0230 -- ogonek
-lq 500,709 2 0231 -- quotedblleft
-rq 500,709 2 0232 -- quotedblright
-oe 827,469,20 0 0233 -- oe
-/l 291,726,3 2 0234 -- lslash
-Bq 500,110,153 0 0235 -- quotedblbase
-OE 998,709,20 2 0236 -- OE
-/L 611,692,3 2 0237 -- Lslash
-r! 278,469,225 0 0241 -- exclamdown
-char161 "
-ct 500,562,101 0 0242 -- cent
-char162 "
-Po 500,694,13 2 0243 -- sterling
-char163 "
-Cs 500,531 0 0244 -- currency
-char164 "
-Ye 500,701,3 2 0245 -- yen
-char165 "
-bb 606,726 2 0246 -- brokenbar
-char166 "
-sc 500,709,219 2 0247 -- section
-char167 "
-ad 333,637 2 0250 -- dieresis
-char168 "
-co 747,706,18 2 0251 -- copyright
-char169 "
-Of 333,709 2 0252 -- ordfeminine
-char170 "
-fo 331,428 0 0253 -- guilsinglleft
-no 606,386 0 0254 -- logicalnot
-char172 "
-\- 606,289 0 0255 -- minus
-rg 747,706,18 2 0256 -- registered
-char174 "
-a- 333,591 0 0257 -- macron
-char175 "
-de 400,689 2 0260 -- degree
-char176 "
-char177 606,512 0 0261 -- plusminus
-S2 300,689 2 0262 -- twosuperior
-char178 "
-S3 300,689 2 0263 -- threesuperior
-char179 "
-aa 333,677 2 0264 -- acute
-char180 "
-char181 603,469,236 0 0265 -- mu
-ps 628,694,150 2 0266 -- paragraph
-char182 "
-pc 250,319 0 0267 -- periodcentered
-char183 "
-ac 333,0,225 0 0270 -- cedilla
-char184 "
-S1 300,692 2 0271 -- onesuperior
-char185 "
-Om 333,709 2 0272 -- ordmasculine
-char186 "
-fc 331,428 0 0273 -- guilsinglright
-14 750,692,3 2 0274 -- onequarter
-char188 "
-12 750,692,3 2 0275 -- onehalf
-char189 "
-34 750,689,3 2 0276 -- threequarters
-char190 "
-r? 444,469,231 0 0277 -- questiondown
-char191 "
-`A 778,908,3 2 0300 -- Agrave
-char192 "
-'A 778,908,3 2 0301 -- Aacute
-char193 "
-^A 778,908,3 2 0302 -- Acircumflex
-char194 "
-~A 778,871,3 2 0303 -- Atilde
-char195 "
-:A 778,868,3 2 0304 -- Adieresis
-char196 "
-oA 778,927,3 2 0305 -- Aring
-char197 "
-AE 944,692,3 2 0306 -- AE
-char198 "
-,C 709,709,225 2 0307 -- Ccedilla
-char199 "
-`E 611,908,3 2 0310 -- Egrave
-char200 "
-'E 611,908,3 2 0311 -- Eacute
-char201 "
-^E 611,908,3 2 0312 -- Ecircumflex
-char202 "
-:E 611,868,3 2 0313 -- Edieresis
-char203 "
-`I 337,908,3 2 0314 -- Igrave
-char204 "
-'I 337,908,3 2 0315 -- Iacute
-char205 "
-^I 337,908,3 2 0316 -- Icircumflex
-char206 "
-:I 337,868,3 2 0317 -- Idieresis
-char207 "
--D 774,692,3 2 0320 -- Eth
-char208 "
-~N 831,871,20 2 0321 -- Ntilde
-char209 "
-`O 786,908,20 2 0322 -- Ograve
-char210 "
-'O 786,908,20 2 0323 -- Oacute
-char211 "
-^O 786,908,20 2 0324 -- Ocircumflex
-char212 "
-~O 786,883,20 2 0325 -- Otilde
-char213 "
-:O 786,868,20 2 0326 -- Odieresis
-char214 "
-char215 606,474 0 0327 -- multiply
-/O 833,709,20 2 0330 -- Oslash
-char216 "
-`U 778,908,20 2 0331 -- Ugrave
-char217 "
-'U 778,908,20 2 0332 -- Uacute
-char218 "
-^U 778,908,20 2 0333 -- Ucircumflex
-char219 "
-:U 778,868,20 2 0334 -- Udieresis
-char220 "
-'Y 667,908,3 2 0335 -- Yacute
-char221 "
-TP 604,692,3 2 0336 -- Thorn
-char222 "
-ss 556,731,9 2 0337 -- germandbls
-char223 "
-`a 500,697,12 2 0340 -- agrave
-char224 "
-'a 500,697,12 2 0341 -- aacute
-char225 "
-^a 500,697,12 2 0342 -- acircumflex
-char226 "
-~a 500,652,12 2 0343 -- atilde
-char227 "
-:a 500,657,12 2 0344 -- adieresis
-char228 "
-oa 500,716,12 2 0345 -- aring
-char229 "
-ae 758,469,20 0 0346 -- ae
-char230 "
-,c 444,469,225 0 0347 -- ccedilla
-char231 "
-`e 479,697,20 2 0350 -- egrave
-char232 "
-'e 479,697,20 2 0351 -- eacute
-char233 "
-^e 479,697,20 2 0352 -- ecircumflex
-char234 "
-:e 479,657,20 2 0353 -- edieresis
-char235 "
-`i 287,697,3 2 0354 -- igrave
-char236 "
-'i 287,697,3 2 0355 -- iacute
-char237 "
-^i 287,697,3 2 0356 -- icircumflex
-char238 "
-:i 287,657,3 2 0357 -- idieresis
-char239 "
-Sd 546,728,20 2 0360 -- eth
-char240 "
-~n 582,652,3 2 0361 -- ntilde
-char241 "
-`o 546,697,20 2 0362 -- ograve
-char242 "
-'o 546,697,20 2 0363 -- oacute
-char243 "
-^o 546,697,20 2 0364 -- ocircumflex
-char244 "
-~o 546,652,20 2 0365 -- otilde
-char245 "
-:o 546,657,20 2 0366 -- odieresis
-char246 "
-char247 606,512 0 0367 -- divide
-/o 556,474,23 0 0370 -- oslash
-char248 "
-`u 603,697,12 2 0371 -- ugrave
-char249 "
-'u 603,697,12 2 0372 -- uacute
-char250 "
-^u 603,697,12 2 0373 -- ucircumflex
-char251 "
-:u 603,657,12 2 0374 -- udieresis
-char252 "
-'y 556,697,283 3 0375 -- yacute
-char253 "
-Tp 601,726,281 3 0376 -- thorn
-char254 "
-:y 556,657,283 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/S b/contrib/groff/font/devps/S
deleted file mode 100644
index 3cf77d9da18f..000000000000
--- a/contrib/groff/font/devps/S
+++ /dev/null
@@ -1,227 +0,0 @@
-name S
-internalname Symbol
-special
-spacewidth 250
-charset
-space 250 0 0040
-! 333,672,17 3 0041 -- exclam
-fa 713,705 3 0042 -- universal
-# 500,673,16 3 0043 -- numbersign
-sh "
-te 549,707 3 0044 -- existential
-% 833,655,36 3 0045 -- percent
-& 778,661,18 3 0046 -- ampersand
-st 439,500,17 3 0047 -- suchthat
-( 333,673,191 3 0050 -- parenleft
-) 333,673,191 3 0051 -- parenright
-** 500,551 3 0052 -- asteriskmath
-+ 549,533 3 0053 -- plus
-pl "
-, 250,104,152 3 0054 -- comma
-\- 549,288 3 0055 -- minus
-mi "
-. 250,95,17 3 0056 -- period
-/ 278,646,18 3 0057 -- slash
-sl "
-0 500,685,17 3 0060 -- zero
-1 500,673 3 0061 -- one
-2 500,686 3 0062 -- two
-3 500,685,17 3 0063 -- three
-4 500,685 3 0064 -- four
-5 500,685,17 3 0065 -- five
-6 500,685,17 3 0066 -- six
-7 500,673,16 3 0067 -- seven
-8 500,685,18 3 0070 -- eight
-9 500,685,18 3 0071 -- nine
-: 278,460,17 3 0072 -- colon
-; 278,460,152 3 0073 -- semicolon
-< 549,522 3 0074 -- less
-= 549,390 3 0075 -- equal
-eq "
-> 549,522 3 0076 -- greater
-? 444,686,17 3 0077 -- question
-=~ 549,475 3 0100 -- congruent
-*A 722,673 3 0101 -- Alpha
-*B 667,673 3 0102 -- Beta
-*X 722,673 3 0103 -- Chi
-*D 612,688 3 0104 -- Delta
-*E 611,673 3 0105 -- Epsilon
-*F 763,673 3 0106 -- Phi
-*G 603,673 3 0107 -- Gamma
-*Y 722,673 3 0110 -- Eta
-*I 333,673 3 0111 -- Iota
-+h 631,689,18 3 0112 -- theta1
-*K 722,673 3 0113 -- Kappa
-*L 686,688 3 0114 -- Lambda
-*M 889,673 3 0115 -- Mu
-*N 722,673,8 3 0116 -- Nu
-*O 722,685,17 3 0117 -- Omicron
-*P 768,673 3 0120 -- Pi
-*H 741,685,17 3 0121 -- Theta
-*R 556,673 3 0122 -- Rho
-*S 592,673 3 0123 -- Sigma
-*T 611,673 3 0124 -- Tau
---- 690,673 3 0125 -- Upsilon
-ts 439,500,233 3 0126 -- sigma1
-*W 768,688 3 0127 -- Omega
-*C 645,673 3 0130 -- Xi
-*Q 795,684 3 0131 -- Psi
-*Z 611,673 3 0132 -- Zeta
-[ 333,674,155 3 0133 -- bracketleft
-lB "
-3d 863,478 3 0134 -- therefore
-tf "
-] 333,674,155 3 0135 -- bracketright
-rB "
-pp 658,674 3 0136 -- perpendicular
-_ 500,0,252 3 0137 -- underscore
-radicalex 500,917 3 0140 -- radicalex
-*a 631,500,18 3 0141 -- alpha
-*b 549,741,223 3 0142 -- beta
-*x 549,499,231 3 0143 -- chi
-*d 494,740,19 3 0144 -- delta
-*e 439,502,19 3 0145 -- epsilon
-*f 521,671,224 3 0146 -- phi
-*g 411,499,225 3 0147 -- gamma
-*y 603,514,202 3 0150 -- eta
-*i 329,503,17 3 0151 -- iota
-+f 603,499,224 3 0152 -- phi1
-*k 549,501 3 0153 -- kappa
-*l 549,739,17 3 0154 -- lambda
-char181 576,500,223 3 0155 -- mu
-*m "
-*n 521,507,16 3 0156 -- nu
-*o 549,499,19 3 0157 -- omicron
-*p 549,487,19 3 0160 -- pi
-*h 521,690,17 3 0161 -- theta
-*r 549,499,230 3 0162 -- rho
-*s 603,500,21 3 0163 -- sigma
-*t 439,500,19 3 0164 -- tau
-*u 576,507,18 3 0165 -- upsilon
-+p 713,583,18 3 0166 -- omega1
-*w 686,500,17 3 0167 -- omega
-*c 493,766,224 3 0170 -- xi
-*q 686,500,228 3 0171 -- psi
-*z 494,756,225 3 0172 -- zeta
-lC 480,673,183 3 0173 -- braceleft
-{ "
-ba 200,673,177 3 0174 -- bar
-| "
-rC 480,673,183 3 0175 -- braceright
-} "
-ap 549,307 3 0176 -- similar
-*U 620,685 3 0241 -- Upsilon1
-fm 247,735 3 0242 -- minute
-<= 549,639 3 0243 -- lessequal
-f/ 167,677,12 3 0244 -- fraction
-if 713,404 3 0245 -- infinity
-Fn 500,686,193 3 0246 -- florin
-CL 753,533,26 3 0247 -- club
-DI 753,550,36 3 0250 -- diamond
-HE 753,532,33 3 0251 -- heart
-SP 753,548,36 3 0252 -- spade
-<> 1042,511,15 3 0253 -- arrowboth
-<- 987,511,15 3 0254 -- arrowleft
-ua 603,910 3 0255 -- arrowup
-arrowverttp "
--> 987,511,15 3 0256 -- arrowright
-da 603,888,22 3 0257 -- arrowdown
-arrowvertbt "
-de 400,685 3 0260 -- degree
-char176 "
-char177 549,645 3 0261 -- plusminus
-+- "
-sd 411,737 3 0262 -- second
->= 549,639 3 0263 -- greaterequal
-char215 549,524 3 0264 -- multiply
-mu "
-pt 713,404 3 0265 -- proportional
-pd 494,746,20 3 0266 -- partialdiff
-bu 460,473 3 0267 -- bullet
-char247 549,456 3 0270 -- divide
-di "
-!= 549,549,25 3 0271 -- notequal
-== 549,443 3 0272 -- equivalence
-~~ 549,394 3 0273 -- approxequal
-~= "
---- 1000,95,17 3 0274 -- ellipsis
-arrowvertex 603,1010,120 3 0275 -- arrowvertex
-an 1000,276 3 0276 -- arrowhorizex
-CR 658,629,16 3 0277 -- carriagereturn
-Ah 823,658,18 3 0300 -- aleph
-Im 686,740,53 3 0301 -- Ifraktur
-Re 795,734,15 3 0302 -- Rfraktur
-wp 987,573,211 3 0303 -- weierstrass
-c* 768,673,17 3 0304 -- circlemultiply
-c+ 768,675,15 3 0305 -- circleplus
-es 823,719,24 3 0306 -- emptyset
-ca 768,509 3 0307 -- intersection
-cu 768,492,17 3 0310 -- union
-sp 713,470 3 0311 -- propersuperset
-ip 713,470,125 3 0312 -- reflexsuperset
-nb 713,540,70 3 0313 -- notsubset
-sb 713,470 3 0314 -- propersubset
-ib 713,470,125 3 0315 -- reflexsubset
-mo 713,468 3 0316 -- element
-nm 713,555,58 3 0317 -- notelement
-/_ 768,673 3 0320 -- angle
-gr 713,718,19 3 0321 -- gradient
---- 790,673,17 3 0322 -- registerserif
---- 790,675,15 3 0323 -- copyrightserif
---- 890,673 3 0324 -- trademarkserif
-product 823,751,101 3 0325 -- product
-sr 549,917,38 3 0326 -- radical
-md 250,310 3 0327 -- dotmath
-no 713,288 3 0330 -- logicalnot
-char172 "
-AN 603,454 3 0331 -- logicaland
-OR 603,477 3 0332 -- logicalor
-hA 1042,510,20 3 0333 -- arrowdblboth
-lA 987,513,15 3 0334 -- arrowdblleft
-uA 603,911 3 0335 -- arrowdblup
-rA 987,508,20 3 0336 -- arrowdblright
-dA 603,890,19 3 0337 -- arrowdbldown
-lz 494,745 3 0340 -- lozenge
-la 329,746,198 3 0341 -- angleleft
---- 790,670,20 3 0342 -- registersans
---- 790,675,15 3 0343 -- copyrightsans
---- 786,673 3 0344 -- trademarksans
-sum 713,752,108 3 0345 -- summation
-parenlefttp 384,926,293 3 0346 -- parenlefttp
-parenleftex 384,920,80 3 0347 -- parenleftex
-parenleftbt 384,920,293 3 0350 -- parenleftbt
-bracketlefttp 384,925,75 3 0351 -- bracketlefttp
-lc "
-bracketleftex 384,925,75 3 0352 -- bracketleftex
-bracketleftbt 384,925,75 3 0353 -- bracketleftbt
-lf "
-bracelefttp 494,925,75 3 0354 -- bracelefttp
-lt "
-braceleftmid 494,925,75 3 0355 -- braceleftmid
-lk "
-braceleftbt 494,925,75 3 0356 -- braceleftbt
-lb "
-braceex 494,925,75 3 0357 -- braceex
-bracerightex "
-braceleftex "
-barex "
-bv "
-ra 329,746,198 3 0361 -- angleright
-is 274,916,107,67,52,-10 3 0362 -- integral
---- 686,921,83 3 0363 -- integraltp
---- 686,975,88 3 0364 -- integralex
---- 686,921,81 3 0365 -- integralbt
-parenrighttp 384,926,293 3 0366 -- parenrighttp
-parenrightex 384,920,80 3 0367 -- parenrightex
-parenrightbt 384,920,293 3 0370 -- parenrightbt
-bracketrighttp 384,925,75 3 0371 -- bracketrighttp
-rc "
-bracketrightex 384,925,75 3 0372 -- bracketrightex
-bracketrightbt 384,925,75 3 0373 -- bracketrightbt
-rf "
-bracerighttp 494,925,75 3 0374 -- bracerighttp
-rt "
-bracerightmid 494,925,75 3 0375 -- bracerightmid
-rk "
-bracerightbt 494,925,75 3 0376 -- bracerightbt
-rb "
diff --git a/contrib/groff/font/devps/SS b/contrib/groff/font/devps/SS
deleted file mode 100644
index 933eb1c15837..000000000000
--- a/contrib/groff/font/devps/SS
+++ /dev/null
@@ -1,194 +0,0 @@
-name SS
-internalname Symbol-Slanted
-special
-slant 15.5
-spacewidth 223
-charset
-space 223 0 0040
---- 296,599,15,137,-72,99 3 0041 -- exclam
---- 635,627,0,216,-173,99 3 0042 -- universal
---- 445,599,15,162,-21,99 3 0043 -- numbersign
---- 489,629,0,183,28,99 3 0044 -- existential
---- 741,583,32,75,-97,75 3 0045 -- percent
---- 692,589,16,103,-18,99 3 0046 -- ampersand
---- 391,444,15,109,6,99 3 0047 -- suchthat
---- 296,599,170,203,-39,99 3 0050 -- parenleft
---- 296,600,170,93,72,93 3 0051 -- parenright
---- 445,490,0,105,-76,99 3 0052 -- asteriskmath
---- 489,474,0,123,-26,99 3 0053 -- plus
---- 223,93,136,10,41,10 3 0054 -- comma
---- 489,256,0,117,-24,99 3 0055 -- minus
---- 223,85,15,1,-20,1 3 0056 -- period
---- 247,575,15,208,55,99 3 0057 -- slash
---- 445,610,15,142,-40,99 3 0060 -- zero
---- 445,599,0,56,-57,56 3 0061 -- one
---- 445,611,0,129,28,99 3 0062 -- two
---- 445,611,16,115,-6,99 3 0063 -- three
---- 445,610,0,135,-8,99 3 0064 -- four
---- 445,610,15,188,14,99 3 0065 -- five
---- 445,610,16,193,-37,99 3 0066 -- six
---- 445,599,15,190,-101,99 3 0067 -- seven
---- 445,611,16,141,-32,99 3 0070 -- eight
---- 445,609,15,140,-2,99 3 0071 -- nine
---- 247,409,15,89,-31,89 3 0072 -- colon
---- 247,409,136,99,17,99 3 0073 -- semicolon
---- 489,464,0,171,-37,99 3 0074 -- less
---- 489,347,0,147,1,99 3 0075 -- equal
---- 489,464,0,108,27,99 3 0076 -- greater
---- 395,610,15,172,-113,99 3 0077 -- question
---- 489,423,0,158,40,99 3 0100 -- congruent
---- 643,599,0,21,47,21 3 0101 -- Alpha
---- 594,598,0,101,24,99 3 0102 -- Beta
---- 643,599,0,205,58,99 3 0103 -- Chi
---- 545,612,0,46,45,46 3 0104 -- Delta
---- 544,599,0,194,22,99 3 0105 -- Epsilon
---- 679,598,0,132,-55,99 3 0106 -- Phi
---- 537,599,0,227,19,99 3 0107 -- Gamma
---- 643,599,0,243,15,99 3 0110 -- Eta
---- 296,599,0,222,22,99 3 0111 -- Iota
-+h 562,614,15,133,-58,99 3 0112 -- theta1
---- 643,598,0,185,19,99 3 0113 -- Kappa
---- 611,612,0,49,45,49 3 0114 -- Lambda
---- 791,599,0,233,22,99 3 0115 -- Mu
---- 643,599,7,234,24,99 3 0116 -- Nu
---- 643,610,15,154,-62,99 3 0117 -- Omicron
---- 684,599,0,213,28,99 3 0120 -- Pi
---- 659,610,15,138,-62,99 3 0121 -- Theta
---- 495,599,0,200,25,99 3 0122 -- Rho
---- 527,599,0,186,45,99 3 0123 -- Sigma
---- 544,599,0,229,-109,99 3 0124 -- Tau
---- 614,599,0,240,-125,99 3 0125 -- Upsilon
-ts 391,445,208,151,-28,99 3 0126 -- sigma1
---- 684,612,0,126,20,99 3 0127 -- Omega
---- 574,598,0,176,14,99 3 0130 -- Xi
---- 708,608,0,227,-138,99 3 0131 -- Psi
---- 544,599,0,231,11,99 3 0132 -- Zeta
---- 296,599,138,207,16,99 3 0133 -- bracketleft
---- 768,426,0,0,-110 3 0134 -- therefore
---- 296,599,138,159,64,99 3 0135 -- bracketright
---- 586,600,0,60,37,60 3 0136 -- perpendicular
---- 445,0,224,0,122 3 0137 -- underscore
---- 445,816,0,829,-622,99 3 0140 -- radicalex
-*a 562,445,15,146,-34,99 3 0141 -- alpha
-*b 489,659,198,139,57,99 3 0142 -- beta
-*x 489,445,206,134,98,99 3 0143 -- chi
-*d 440,658,16,181,-33,99 3 0144 -- delta
-*e 391,447,17,127,1,99 3 0145 -- epsilon
-*f 464,596,200,103,-28,99 3 0146 -- phi
-*g 366,444,200,252,-42,99 3 0147 -- gamma
-*y 537,457,180,68,-50,68 3 0150 -- eta
-*i 293,448,16,53,-47,53 3 0151 -- iota
-+f 537,444,199,117,-42,99 3 0152 -- phi1
-*k 489,447,0,182,-56,99 3 0153 -- kappa
-*l 489,658,16,91,29,91 3 0154 -- lambda
-*m 513,445,198,70,68,70 3 0155 -- mu
-*n 464,451,15,134,-69,99 3 0156 -- nu
-*o 489,444,17,87,-36,87 3 0157 -- omicron
-*p 489,433,18,160,-8,99 3 0160 -- pi
-*h 464,614,16,140,-53,99 3 0161 -- theta
-*r 489,444,205,82,69,82 3 0162 -- rho
-*s 537,445,19,175,-37,99 3 0163 -- sigma
-*t 391,445,16,170,-45,99 3 0164 -- tau
-*u 513,451,15,95,-55,95 3 0165 -- upsilon
-+p 635,519,15,173,-28,99 3 0166 -- omega1
-*w 611,445,16,126,-35,99 3 0167 -- omega
-*c 439,681,200,126,-20,99 3 0170 -- xi
-*q 611,445,203,198,-91,99 3 0171 -- psi
-*z 440,673,200,190,-50,99 3 0172 -- zeta
---- 427,599,163,163,-66,99 3 0173 -- braceleft
---- 178,599,158,179,41,99 3 0174 -- bar
---- 427,599,163,67,31,67 3 0175 -- braceright
---- 489,273,0,110,-28,99 3 0176 -- similar
---- 552,609,0,208,-84,99 3 0241 -- Upsilon1
---- 220,654,0,223,-106,99 3 0242 -- minute
---- 489,569,0,206,24,99 3 0243 -- lessequal
---- 149,603,11,391,214,99 3 0244 -- fraction
---- 635,360,0,107,-41,99 3 0245 -- infinity
---- 445,612,172,219,86,99 3 0246 -- florin
---- 670,474,23,25,-69,25 3 0247 -- club
---- 670,490,32,0,-148 3 0250 -- diamond
---- 670,473,29,59,-155,59 3 0251 -- heart
---- 670,488,32,0,-82 3 0252 -- spade
---- 927,455,13,103,-40,99 3 0253 -- arrowboth
---- 878,455,13,87,-47,87 3 0254 -- arrowleft
---- 537,810,0,204,-173,99 3 0255 -- arrowup
---- 878,455,13,94,-55,94 3 0256 -- arrowright
---- 537,790,20,85,-54,85 3 0257 -- arrowdown
---- 356,609,0,160,-137,99 3 0260 -- degree
---- 489,574,0,154,41,99 3 0261 -- plusminus
---- 366,656,0,244,-100,99 3 0262 -- second
---- 489,569,0,143,24,99 3 0263 -- greaterequal
---- 489,466,0,170,22,99 3 0264 -- multiply
---- 635,360,0,82,-40,82 3 0265 -- proportional
---- 440,664,18,152,-12,99 3 0266 -- partialdiff
---- 409,421,0,95,-68,95 3 0267 -- bullet
---- 489,406,0,119,-24,99 3 0270 -- divide
---- 489,489,22,148,-1,99 3 0271 -- notequal
---- 489,394,0,163,15,99 3 0272 -- equivalence
---- 489,351,0,133,-7,99 3 0273 -- approxequal
---- 890,85,15,0,-57 3 0274 -- ellipsis
---- 537,899,107,92,-166,92 3 0275 -- arrowvertex
---- 890,246,0,171,42,99 3 0276 -- arrowhorizex
---- 586,560,14,174,10,99 3 0277 -- carriagereturn
---- 732,586,16,58,-109,58 3 0300 -- aleph
---- 611,659,47,123,24,99 3 0301 -- Ifraktur
---- 708,653,13,175,-21,99 3 0302 -- Rfraktur
---- 878,510,188,50,-62,50 3 0303 -- weierstrass
---- 684,599,15,124,-64,99 3 0304 -- circlemultiply
---- 684,601,13,125,-65,99 3 0305 -- circleplus
---- 732,640,21,202,12,99 3 0306 -- emptyset
---- 684,453,0,80,14,80 3 0307 -- intersection
---- 684,438,15,154,-60,99 3 0310 -- union
---- 635,418,0,90,32,90 3 0311 -- propersuperset
---- 635,418,111,89,67,89 3 0312 -- reflexsuperset
---- 635,481,62,159,-37,99 3 0313 -- notsubset
---- 635,418,0,159,-37,99 3 0314 -- propersubset
---- 635,418,111,159,34,99 3 0315 -- reflexsubset
---- 635,417,0,0,-43 3 0316 -- element
---- 635,494,52,0,-24 3 0317 -- notelement
---- 684,599,0,199,27,99 3 0320 -- angle
---- 635,639,17,220,-181,99 3 0321 -- gradient
---- 703,596,18,110,-70,99 3 0322 -- registerserif
---- 703,601,13,113,-72,99 3 0323 -- copyrightserif
---- 792,599,0,205,-119,99 3 0324 -- trademarkserif
---- 732,668,90,238,56,99 3 0325 -- product
---- 489,816,34,272,-84,99 3 0326 -- radical
---- 223,276,0,52,-81,52 3 0327 -- dotmath
---- 635,256,0,100,-28,99 3 0330 -- logicalnot
---- 537,404,0,32,29,32 3 0331 -- logicaland
---- 537,424,0,152,-101,99 3 0332 -- logicalor
---- 927,454,18,101,-42,99 3 0333 -- arrowdblboth
---- 878,457,13,114,-46,99 3 0334 -- arrowdblleft
---- 537,811,0,201,-102,99 3 0335 -- arrowdblup
---- 878,452,18,89,-21,89 3 0336 -- arrowdblright
---- 537,792,17,152,-53,99 3 0337 -- arrowdbldown
---- 440,663,0,129,-71,99 3 0340 -- lozenge
---- 293,664,176,229,-48,99 3 0341 -- angleleft
---- 703,596,18,110,-70,99 3 0342 -- registersans
---- 703,601,13,111,-70,99 3 0343 -- copyrightsans
---- 700,599,0,182,-129,99 3 0344 -- trademarksans
---- 635,669,96,171,65,99 3 0345 -- summation
---- 342,824,261,350,96,99 3 0346 -- parenlefttp
---- 342,823,76,46,38,46 3 0347 -- parenleftex
---- 342,824,261,47,-63,47 3 0350 -- parenleftbt
---- 342,824,71,268,72,99 3 0351 -- bracketlefttp
---- 342,823,70,13,72,13 3 0352 -- bracketleftex
---- 342,824,71,14,72,14 3 0353 -- bracketleftbt
---- 440,824,67,258,-108,99 3 0354 -- bracelefttp
---- 440,832,76,96,-76,96 3 0355 -- braceleftmid
---- 440,824,62,94,-169,94 3 0356 -- braceleftbt
---- 440,832,71,96,-107,96 3 0357 -- braceex
---- 293,664,176,102,79,99 3 0361 -- angleright
---- 244,815,95,305,63,99 3 0362 -- integral
---- 611,820,74,312,-222,99 3 0363 -- integraltp
---- 611,868,78,79,-221,79 3 0364 -- integralex
---- 611,820,72,64,20,64 3 0365 -- integralbt
---- 342,824,261,206,-223,99 3 0366 -- parenrighttp
---- 342,823,76,365,-281,99 3 0367 -- parenrightex
---- 342,824,261,365,80,99 3 0370 -- parenrightbt
---- 342,824,71,285,-199,99 3 0371 -- bracketrighttp
---- 342,823,70,285,-200,99 3 0372 -- bracketrightex
---- 342,824,71,285,54,99 3 0373 -- bracketrightbt
---- 440,824,67,35,-108,35 3 0374 -- bracerighttp
---- 440,832,76,127,-105,99 3 0375 -- bracerightmid
---- 440,824,62,94,54,94 3 0376 -- bracerightbt
diff --git a/contrib/groff/font/devps/TB b/contrib/groff/font/devps/TB
deleted file mode 100644
index 4d1fc8ca77d7..000000000000
--- a/contrib/groff/font/devps/TB
+++ /dev/null
@@ -1,548 +0,0 @@
-name TB
-internalname Times-Bold
-spacewidth 250
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -74
-A w -90
-A v -100
-A u -50
-A ' -74
-A cq -74
-A p -25
-A Y -100
-A W -130
-A V -145
-A U -50
-A T -95
-A Q -45
-A O -45
-A G -55
-A C -55
-B U -10
-B A -30
-D . -20
-D Y -40
-D W -40
-D V -40
-D A -35
-F . -110
-F o -25
-F e -25
-F , -92
-F a -25
-F A -90
-J u -15
-J . -20
-J o -15
-J e -15
-J a -15
-J A -30
-K y -45
-K u -15
-K o -25
-K e -25
-K O -30
-L y -55
-L ' -110
-L cq -110
-L rq -20
-L Y -92
-L W -92
-L V -92
-L T -92
-N A -20
-O Y -50
-O X -40
-O W -50
-O V -50
-O T -40
-O A -40
-P . -110
-P o -20
-P e -20
-P , -92
-P a -10
-P A -74
-Q . -20
-Q U -10
-R Y -35
-R W -35
-R V -55
-R U -30
-R T -40
-R O -30
-T y -74
-T w -74
-T u -92
-T ; -74
-T r -74
-T . -90
-T o -92
-T i -18
-T - -92
-T hy -92
-T char173 -92
-T e -92
-T , -74
-T : -74
-T a -92
-T O -18
-T A -90
-U . -50
-U , -50
-U A -60
-V u -92
-V ; -92
-V . -145
-V o -100
-V i -37
-V - -74
-V hy -74
-V char173 -74
-V e -100
-V , -129
-V : -92
-V a -92
-V O -45
-V G -30
-V A -135
-W y -60
-W u -50
-W ; -55
-W . -92
-W o -75
-W i -18
-W - -37
-W hy -37
-W char173 -37
-W e -65
-W , -92
-W : -55
-W a -65
-W O -10
-W A -120
-Y u -92
-Y ; -92
-Y . -92
-Y o -111
-Y i -37
-Y - -92
-Y hy -92
-Y char173 -92
-Y e -111
-Y , -92
-Y : -92
-Y a -85
-Y O -35
-Y A -110
-a v -25
-b v -15
-b u -20
-b . -40
-b b -10
-, ' -55
-, cq -55
-, rq -45
-d w -15
-e v -15
-f ' 55
-f cq 55
-f rq 50
-f . -15
-f o -25
-f i -25
-f .i -35
-f , -15
-g . -15
-h y -15
-i v -10
-k y -15
-k o -15
-k e -10
-n v -40
-o w -10
-o v -10
-. ' -55
-. cq -55
-. rq -55
-lq A -10
-` ` -63
-` oq -63
-oq ` -63
-oq oq -63
-` A -10
-oq A -10
-' v -20
-cq v -20
-' s -37
-cq s -37
-' r -20
-cq r -20
-' ' -63
-' cq -63
-cq ' -63
-cq cq -63
-' d -20
-cq d -20
-r v -10
-r q -18
-r . -100
-r p -10
-r o -18
-r n -15
-r - -37
-r hy -37
-r char173 -37
-r g -10
-r e -18
-r , -92
-r c -18
-v . -70
-v o -10
-v e -10
-v , -55
-v a -10
-w . -70
-w o -10
-w , -55
-y . -70
-y o -25
-y e -10
-y , -55
-charset
-ha 581,676 2 0000 -- asciicircum
-ti 520,333 0 0001 -- asciitilde
-vS 556,914,19 2 0002 -- Scaron
-vZ 667,914 2 0003 -- Zcaron
-vs 389,704,14 2 0004 -- scaron
-vz 444,704 2 0005 -- zcaron
-:Y 722,877 2 0006 -- Ydieresis
-tm 1000,676 2 0007 -- trademark
-aq 278,691 2 0010 -- quotesingle
-space 250 0 0040
-! 333,691,13 2 0041 -- exclam
-" 555,691 2 0042 -- quotedbl
-dq "
-# 500,700 2 0043 -- numbersign
-sh "
-$ 500,750,99 2 0044 -- dollar
-Do "
-% 1000,692,14 2 0045 -- percent
-& 833,691,16 2 0046 -- ampersand
-' 333,691 2 0047 -- quoteright
-cq "
-( 333,694,168 2 0050 -- parenleft
-) 333,694,168 2 0051 -- parenright
-* 500,691 2 0052 -- asterisk
-+ 570,506 0 0053 -- plus
-, 250,155,180 0 0054 -- comma
-- 333,287 0 0055 -- hyphen
-hy "
-char173 "
-. 250,156,13 0 0056 -- period
-/ 278,691,19 2 0057 -- slash
-sl "
-0 500,688,13 2 0060 -- zero
-1 500,688 2 0061 -- one
-2 500,688 2 0062 -- two
-3 500,688,14 2 0063 -- three
-4 500,688 2 0064 -- four
-5 500,676,8 2 0065 -- five
-6 500,688,13 2 0066 -- six
-7 500,676 2 0067 -- seven
-8 500,688,13 2 0070 -- eight
-9 500,688,13 2 0071 -- nine
-: 333,472,13 0 0072 -- colon
-; 333,472,180 0 0073 -- semicolon
-< 570,514,8 0 0074 -- less
-= 570,399 0 0075 -- equal
-> 570,514,8 0 0076 -- greater
-? 500,689,13 2 0077 -- question
-@ 930,691,19 2 0100 -- at
-at "
-A 722,690 2 0101 -- A
-B 667,676 2 0102 -- B
-C 722,691,19 2 0103 -- C
-D 722,676 2 0104 -- D
-E 667,676 2 0105 -- E
-F 611,676 2 0106 -- F
-G 778,691,19 2 0107 -- G
-H 778,676 2 0110 -- H
-I 389,676 2 0111 -- I
-J 500,676,96 2 0112 -- J
-K 778,676 2 0113 -- K
-L 667,676 2 0114 -- L
-M 944,676 2 0115 -- M
-N 722,676,18 2 0116 -- N
-O 778,691,19 2 0117 -- O
-P 611,676 2 0120 -- P
-Q 778,691,176 2 0121 -- Q
-R 722,676 2 0122 -- R
-S 556,692,19 2 0123 -- S
-T 667,676 2 0124 -- T
-U 722,676,19 2 0125 -- U
-V 722,676,18 2 0126 -- V
-W 1000,676,15 2 0127 -- W
-X 722,676 2 0130 -- X
-Y 722,676 2 0131 -- Y
-Z 667,676 2 0132 -- Z
-[ 333,678,149 2 0133 -- bracketleft
-lB "
-\ 278,691,19 2 0134 -- backslash
-rs "
-] 333,678,149 2 0135 -- bracketright
-rB "
-a^ 333,704 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 333,691 2 0140 -- quoteleft
-oq "
-a 500,473,14 0 0141 -- a
-b 556,676,14 2 0142 -- b
-c 444,473,14 0 0143 -- c
-d 556,676,14 2 0144 -- d
-e 444,473,14 0 0145 -- e
-f 333,691 2 0146 -- f
-g 500,473,206 1 0147 -- g
-h 556,676 2 0150 -- h
-i 278,691 2 0151 -- i
-j 333,691,203 3 0152 -- j
-k 556,676 2 0153 -- k
-l 278,676 2 0154 -- l
-m 833,473 0 0155 -- m
-n 556,473 0 0156 -- n
-o 500,473,14 0 0157 -- o
-p 556,473,205 1 0160 -- p
-q 556,473,205 1 0161 -- q
-r 444,473 0 0162 -- r
-s 389,473,14 0 0163 -- s
-t 333,630,12 2 0164 -- t
-u 556,461,14 0 0165 -- u
-v 500,461,14 0 0166 -- v
-w 722,461,14 0 0167 -- w
-x 500,461 0 0170 -- x
-y 500,461,205 1 0171 -- y
-z 444,461 0 0172 -- z
-lC 394,698,175 2 0173 -- braceleft
-{ "
-ba 220,691,19 2 0174 -- bar
-| "
-rC 394,698,175 2 0175 -- braceright
-} "
-a~ 333,674 2 0176 -- tilde
-~ "
-bq 333,155,180 0 0200 -- quotesinglbase
-Fo 500,415 0 0201 -- guillemotleft
-char171 "
-Fc 500,415 0 0202 -- guillemotright
-char187 "
-bu 350,478 0 0203 -- bullet
-Fn 500,706,155 2 0204 -- florin
-f/ 167,688,12 2 0205 -- fraction
-%0 1000,706,29 2 0206 -- perthousand
-dg 500,691,134 2 0207 -- dagger
-dd 500,691,132 2 0210 -- daggerdbl
-en 500,271 0 0211 -- endash
-em 1000,271 0 0212 -- emdash
-fi 556,691 2 0214 -- fi
-fl 556,691 2 0215 -- fl
-.i 278,461 0 0220 -- dotlessi
-ga 333,713 2 0222 -- grave
-a" 333,713 2 0223 -- hungarumlaut
-a. 333,667 2 0224 -- dotaccent
-ab 333,691 2 0225 -- breve
-ah 333,704 2 0226 -- caron
-ao 333,740 2 0227 -- ring
-ho 333,44,173 0 0230 -- ogonek
-lq 500,691 2 0231 -- quotedblleft
-rq 500,691 2 0232 -- quotedblright
-oe 722,473,14 0 0233 -- oe
-/l 278,676 2 0234 -- lslash
-Bq 500,155,180 0 0235 -- quotedblbase
-OE 1000,684,5 2 0236 -- OE
-/L 667,676 2 0237 -- Lslash
-r! 333,501,203 1 0241 -- exclamdown
-char161 "
-ct 500,588,140 0 0242 -- cent
-char162 "
-Po 500,684,14 2 0243 -- sterling
-char163 "
-Cs 500,613 0 0244 -- currency
-char164 "
-Ye 500,676 2 0245 -- yen
-char165 "
-bb 220,691,19 2 0246 -- brokenbar
-char166 "
-sc 500,691,132 2 0247 -- section
-char167 "
-ad 333,667 2 0250 -- dieresis
-char168 "
-co 747,691,19 2 0251 -- copyright
-char169 "
-Of 300,688 2 0252 -- ordfeminine
-char170 "
-fo 333,415 0 0253 -- guilsinglleft
-no 570,399 0 0254 -- logicalnot
-char172 "
-\- 570,297 0 0255 -- minus
-rg 747,691,19 2 0256 -- registered
-char174 "
-a- 333,637 2 0257 -- macron
-char175 "
-de 400,688 2 0260 -- degree
-char176 "
-char177 570,506 0 0261 -- plusminus
-S2 300,688 2 0262 -- twosuperior
-char178 "
-S3 300,688 2 0263 -- threesuperior
-char179 "
-aa 333,713 2 0264 -- acute
-char180 "
-char181 556,461,206 1 0265 -- mu
-ps 540,676,186 2 0266 -- paragraph
-char182 "
-pc 250,417 0 0267 -- periodcentered
-char183 "
-ac 333,0,218 1 0270 -- cedilla
-char184 "
-S1 300,688 2 0271 -- onesuperior
-char185 "
-Om 330,688 2 0272 -- ordmasculine
-char186 "
-fc 333,415 0 0273 -- guilsinglright
-14 750,688,12 2 0274 -- onequarter
-char188 "
-12 750,688,12 2 0275 -- onehalf
-char189 "
-34 750,688,12 2 0276 -- threequarters
-char190 "
-r? 500,501,201 0 0277 -- questiondown
-char191 "
-`A 722,923 2 0300 -- Agrave
-char192 "
-'A 722,923 2 0301 -- Aacute
-char193 "
-^A 722,914 2 0302 -- Acircumflex
-char194 "
-~A 722,884 2 0303 -- Atilde
-char195 "
-:A 722,877 2 0304 -- Adieresis
-char196 "
-oA 722,935 2 0305 -- Aring
-char197 "
-AE 1000,676 2 0306 -- AE
-char198 "
-,C 722,691,218 3 0307 -- Ccedilla
-char199 "
-`E 667,923 2 0310 -- Egrave
-char200 "
-'E 667,923 2 0311 -- Eacute
-char201 "
-^E 667,914 2 0312 -- Ecircumflex
-char202 "
-:E 667,877 2 0313 -- Edieresis
-char203 "
-`I 389,923 2 0314 -- Igrave
-char204 "
-'I 389,923 2 0315 -- Iacute
-char205 "
-^I 389,914 2 0316 -- Icircumflex
-char206 "
-:I 389,877 2 0317 -- Idieresis
-char207 "
--D 722,676 2 0320 -- Eth
-char208 "
-~N 722,884,18 2 0321 -- Ntilde
-char209 "
-`O 778,923,19 2 0322 -- Ograve
-char210 "
-'O 778,923,19 2 0323 -- Oacute
-char211 "
-^O 778,914,19 2 0324 -- Ocircumflex
-char212 "
-~O 778,884,19 2 0325 -- Otilde
-char213 "
-:O 778,877,19 2 0326 -- Odieresis
-char214 "
-char215 570,490 0 0327 -- multiply
-/O 778,737,74 2 0330 -- Oslash
-char216 "
-`U 722,923,19 2 0331 -- Ugrave
-char217 "
-'U 722,923,19 2 0332 -- Uacute
-char218 "
-^U 722,914,19 2 0333 -- Ucircumflex
-char219 "
-:U 722,877,19 2 0334 -- Udieresis
-char220 "
-'Y 722,928 2 0335 -- Yacute
-char221 "
-TP 611,676 2 0336 -- Thorn
-char222 "
-ss 556,691,12 2 0337 -- germandbls
-char223 "
-`a 500,713,14 2 0340 -- agrave
-char224 "
-'a 500,713,14 2 0341 -- aacute
-char225 "
-^a 500,704,14 2 0342 -- acircumflex
-char226 "
-~a 500,674,14 2 0343 -- atilde
-char227 "
-:a 500,667,14 2 0344 -- adieresis
-char228 "
-oa 500,740,14 2 0345 -- aring
-char229 "
-ae 722,473,14 0 0346 -- ae
-char230 "
-,c 444,473,218 1 0347 -- ccedilla
-char231 "
-`e 444,713,14 2 0350 -- egrave
-char232 "
-'e 444,713,14 2 0351 -- eacute
-char233 "
-^e 444,704,14 2 0352 -- ecircumflex
-char234 "
-:e 444,667,14 2 0353 -- edieresis
-char235 "
-`i 278,713 2 0354 -- igrave
-char236 "
-'i 278,713 2 0355 -- iacute
-char237 "
-^i 278,704 2 0356 -- icircumflex
-char238 "
-:i 278,667 2 0357 -- idieresis
-char239 "
-Sd 500,691,14 2 0360 -- eth
-char240 "
-~n 556,674 2 0361 -- ntilde
-char241 "
-`o 500,713,14 2 0362 -- ograve
-char242 "
-'o 500,713,14 2 0363 -- oacute
-char243 "
-^o 500,704,14 2 0364 -- ocircumflex
-char244 "
-~o 500,674,14 2 0365 -- otilde
-char245 "
-:o 500,667,14 2 0366 -- odieresis
-char246 "
-char247 570,537,31 0 0367 -- divide
-/o 500,549,92 0 0370 -- oslash
-char248 "
-`u 556,713,14 2 0371 -- ugrave
-char249 "
-'u 556,713,14 2 0372 -- uacute
-char250 "
-^u 556,704,14 2 0373 -- ucircumflex
-char251 "
-:u 556,667,14 2 0374 -- udieresis
-char252 "
-'y 500,713,205 3 0375 -- yacute
-char253 "
-Tp 556,676,205 3 0376 -- thorn
-char254 "
-:y 500,667,205 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/TBI b/contrib/groff/font/devps/TBI
deleted file mode 100644
index a79efb7503ea..000000000000
--- a/contrib/groff/font/devps/TBI
+++ /dev/null
@@ -1,531 +0,0 @@
-name TBI
-internalname Times-BoldItalic
-slant 15
-spacewidth 250
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -74
-A w -74
-A v -74
-A u -30
-A ' -74
-A cq -74
-A Y -70
-A W -100
-A V -95
-A U -50
-A T -55
-A Q -55
-A O -50
-A G -60
-A C -65
-B U -10
-B A -25
-D Y -50
-D W -40
-D V -50
-D A -25
-F r -50
-F . -129
-F o -70
-F i -40
-F e -100
-F , -129
-F a -95
-F A -100
-J u -40
-J . -10
-J o -40
-J e -40
-J , -10
-J a -40
-J A -25
-K y -20
-K u -20
-K o -25
-K e -25
-K O -30
-L y -37
-L ' -55
-L cq -55
-L Y -37
-L W -37
-L V -37
-L T -18
-N A -30
-O Y -50
-O X -40
-O W -50
-O V -50
-O T -40
-O A -40
-P . -129
-P o -55
-P e -50
-P , -129
-P a -40
-P A -85
-Q U -10
-R Y -18
-R W -18
-R V -18
-R U -40
-R T -30
-R O -40
-T y -37
-T w -37
-T u -37
-T ; -74
-T r -37
-T . -92
-T o -95
-T i -37
-T - -92
-T hy -92
-T char173 -92
-T e -92
-T , -92
-T : -74
-T a -92
-T O -18
-T A -55
-U A -45
-V u -55
-V ; -74
-V . -129
-V o -111
-V i -55
-V - -70
-V hy -70
-V char173 -70
-V e -111
-V , -129
-V : -74
-V a -111
-V O -30
-V G -10
-V A -85
-W y -55
-W u -55
-W ; -55
-W . -74
-W o -80
-W i -37
-W - -50
-W hy -50
-W char173 -50
-W e -90
-W , -74
-W : -55
-W a -85
-W O -15
-W A -74
-Y u -92
-Y ; -92
-Y . -74
-Y o -111
-Y i -55
-Y - -92
-Y hy -92
-Y char173 -92
-Y e -111
-Y , -92
-Y : -92
-Y a -92
-Y O -25
-Y A -74
-b u -20
-b . -40
-b b -10
-c k -10
-c h -10
-, ' -95
-, cq -95
-, rq -95
-e b -10
-f ' 55
-f cq 55
-f . -10
-f o -10
-f f -18
-f e -10
-f .i -30
-f , -10
-k o -10
-k e -30
-n v -40
-o y -10
-o x -10
-o w -25
-o v -15
-. ' -95
-. cq -95
-. rq -95
-` ` -74
-` oq -74
-oq ` -74
-oq oq -74
-' v -15
-cq v -15
-' t -37
-cq t -37
-' s -74
-cq s -74
-' r -15
-cq r -15
-' ' -74
-' cq -74
-cq ' -74
-cq cq -74
-' d -15
-cq d -15
-r . -65
-r , -65
-v . -37
-v o -15
-v e -15
-v , -37
-w . -37
-w o -15
-w e -10
-w , -37
-w a -10
-x e -10
-y . -37
-y , -37
-charset
-ha 570,669,0,0,-17 2 0000 -- asciicircum
-ti 570,333,0,0,-4 0 0001 -- asciitilde
-vS 556,897,18,20,48,20 2 0002 -- Scaron
-vZ 611,897,0,29,61,29 2 0003 -- Zcaron
-vs 389,690,13,100,69,99 2 0004 -- scaron
-vz 389,690,78,85,93,85 2 0005 -- zcaron
-:Y 611,862,0,98,-23,98 2 0006 -- Ydieresis
-tm 1000,669,0,18,18,18 2 0007 -- trademark
-aq 278,685,0,40,-78,40 2 0010 -- quotesingle
-space 250 0 0040
-! 389,684,13,31,-17,31 2 0041 -- exclam
-" 555,685,0,31,-86,31 2 0042 -- quotedbl
-dq "
-# 500,700,0,83,83,83 2 0043 -- numbersign
-sh "
-$ 500,733,100,47,70,47 2 0044 -- dollar
-Do "
-% 833,692,10,10,11,10 2 0045 -- percent
-& 778,682,19,0,45 2 0046 -- ampersand
-' 333,685,0,19,-48,19 2 0047 -- quoteright
-cq "
-( 333,685,179,61,22,61 2 0050 -- parenleft
-) 333,685,179,0,94 2 0051 -- parenright
-* 500,685,0,6,-15,6 2 0052 -- asterisk
-+ 570,506,0,17,17,17 0 0053 -- plus
-, 250,134,182,0,110 0 0054 -- comma
-- 333,282,0,0,48 0 0055 -- hyphen
-hy "
-char173 "
-. 250,135,13,0,59 0 0056 -- period
-/ 278,685,18,114,114,99 2 0057 -- slash
-sl "
-0 500,683,14,27,33,27 2 0060 -- zero
-1 500,683,0,0,45 2 0061 -- one
-2 500,683,0,0,77 2 0062 -- two
-3 500,683,13,0,65 2 0063 -- three
-4 500,683,0,53,65,53 2 0064 -- four
-5 500,669,13,37,61,37 2 0065 -- five
-6 500,679,15,59,27,59 2 0066 -- six
-7 500,669,0,75,-2,75 2 0067 -- seven
-8 500,683,13,26,47,26 2 0070 -- eight
-9 500,683,10,25,62,25 2 0071 -- nine
-: 333,459,13,0,27 0 0072 -- colon
-; 333,459,183,0,75 0 0073 -- semicolon
-< 570,514,8,19,19,19 0 0074 -- less
-= 570,399,0,17,17,17 0 0075 -- equal
-> 570,514,8,19,19,19 0 0076 -- greater
-? 500,684,13,20,-29,20 2 0077 -- question
-@ 832,685,18,0,-13 2 0100 -- at
-at "
-A 667,683,0,0,117 2 0101 -- A
-B 667,669,0,7,74,7 2 0102 -- B
-C 667,685,18,60,18,60 2 0103 -- C
-D 722,669,0,13,96,13 2 0104 -- D
-E 667,669,0,36,77,36 2 0105 -- E
-F 667,669,0,43,63,43 2 0106 -- F
-G 722,685,18,34,29,34 2 0107 -- G
-H 778,669,0,71,74,71 2 0110 -- H
-I 389,669,0,67,82,67 2 0111 -- I
-J 500,669,99,74,96,74 2 0112 -- J
-K 667,669,0,85,71,85 2 0113 -- K
-L 611,669,0,29,72,29 2 0114 -- L
-M 889,669,12,78,79,78 2 0115 -- M
-N 722,669,15,76,77,76 2 0116 -- N
-O 722,685,18,19,23,19 2 0117 -- O
-P 611,669,0,52,77,52 2 0120 -- P
-Q 722,685,208,19,23,19 3 0121 -- Q
-R 667,669,0,6,79,6 2 0122 -- R
-S 556,685,18,20,48,20 2 0123 -- S
-T 611,669,0,89,0,89 2 0124 -- T
-U 722,669,18,72,-17,72 2 0125 -- U
-V 667,669,18,98,-15,98 2 0126 -- V
-W 889,669,18,101,-15,99 2 0127 -- W
-X 667,669,0,77,74,77 2 0130 -- X
-Y 611,669,0,98,-23,98 2 0131 -- Y
-Z 611,669,0,29,61,29 2 0132 -- Z
-[ 333,674,159,79,87,79 2 0133 -- bracketleft
-lB "
-\ 278,685,18,51,51,51 2 0134 -- backslash
-rs "
-] 333,674,157,60,106,60 2 0135 -- bracketright
-rB "
-a^ 333,690,0,84,10,84 2 0136 -- circumflex
-^ "
-_ 500,0,125,50,50,50 0 0137 -- underscore
-` 333,685,0,49,-78,49 2 0140 -- quoteleft
-oq "
-a 500,462,14,5,71,5 0 0141 -- a
-b 500,699,13,0,64 2 0142 -- b
-c 444,462,13,0,55 0 0143 -- c
-d 500,699,13,67,71,67 2 0144 -- d
-e 444,462,13,4,45,4 0 0145 -- e
-f 333,698,205,163,219,99 3 0146 -- f
-g 500,462,203,28,102,28 1 0147 -- g
-h 556,699,9,0,63 2 0150 -- h
-i 278,684,9,35,48,35 2 0151 -- i
-j 278,684,207,51,239,51 3 0152 -- j
-k 500,699,8,33,73,33 2 0153 -- k
-l 278,699,9,62,48,62 2 0154 -- l
-m 778,462,9,0,64 0 0155 -- m
-n 556,462,9,0,56 0 0156 -- n
-o 500,462,13,0,53 0 0157 -- o
-p 500,462,205,0,170 1 0160 -- p
-q 500,462,205,21,49,21 1 0161 -- q
-r 389,462,0,50,71,50 0 0162 -- r
-s 389,462,13,0,69 0 0163 -- s
-t 278,594,9,53,61,53 2 0164 -- t
-u 556,462,9,0,35 0 0165 -- u
-v 444,462,13,7,34,7 0 0166 -- v
-w 667,462,13,0,34 0 0167 -- w
-x 500,462,13,19,96,19 0 0170 -- x
-y 444,462,205,0,144 1 0171 -- y
-z 389,449,78,29,93,29 0 0172 -- z
-lC 348,686,187,138,45,99 2 0173 -- braceleft
-{ "
-ba 220,685,18,0,-16 2 0174 -- bar
-| "
-rC 348,686,187,4,179,4 2 0175 -- braceright
-} "
-a~ 333,655,0,124,2,99 2 0176 -- tilde
-~ "
-bq 333,134,182,0,55 0 0200 -- quotesinglbase
-Fo 500,415,0,18,38,18 0 0201 -- guillemotleft
-char171 "
-Fc 500,415,0,18,38,18 0 0202 -- guillemotright
-char187 "
-bu 350,525,0,50,50,50 0 0203 -- bullet
-Fn 500,707,156,87,137,87 2 0204 -- florin
-f/ 167,683,14,207,219,99 2 0205 -- fraction
-%0 1000,706,29,46,43,46 2 0206 -- perthousand
-dg 500,685,145,44,-41,44 2 0207 -- dagger
-dd 500,685,139,43,40,43 2 0210 -- daggerdbl
-en 500,269,0,27,90,27 0 0211 -- endash
-em 1000,269,0,27,90,27 0 0212 -- emdash
-fi 556,703,205,8,238,8 3 0214 -- fi
-fl 556,704,205,47,236,47 3 0215 -- fl
-.i 278,462,9,10,48,10 0 0220 -- dotlessi
-ga 333,697,0,14,-35,14 2 0222 -- grave
-a" 333,697,0,215,-19,99 2 0223 -- hungarumlaut
-a. 333,655,0,10,-113,10 2 0224 -- dotaccent
-ab 333,678,0,104,-21,99 2 0225 -- breve
-ah 333,690,0,128,-29,99 2 0226 -- caron
-ao 333,729,0,57,-77,57 2 0227 -- ring
-ho 333,44,173,0,90 0 0230 -- ogonek
-lq 500,685,0,63,-3,63 2 0231 -- quotedblleft
-rq 500,685,0,63,-3,63 2 0232 -- quotedblright
-oe 722,462,13,2,44,2 0 0233 -- oe
-/l 278,699,9,73,63,73 2 0234 -- lslash
-Bq 500,134,182,0,107 0 0235 -- quotedblbase
-OE 944,677,8,52,27,52 2 0236 -- OE
-/L 611,669,0,29,72,29 2 0237 -- Lslash
-r! 389,492,205,0,31 1 0241 -- exclamdown
-char161 "
-ct 500,576,143,0,8 0 0242 -- cent
-char162 "
-Po 500,683,12,60,82,60 2 0243 -- sterling
-char163 "
-Cs 500,586,0,76,76,76 0 0244 -- currency
-char164 "
-Ye 500,669,0,178,17,99 2 0245 -- yen
-char165 "
-bb 220,685,18,0,-16 2 0246 -- brokenbar
-char166 "
-sc 500,685,143,9,14,9 2 0247 -- section
-char167 "
-ad 333,655,0,114,-5,99 2 0250 -- dieresis
-char168 "
-co 747,685,18,21,20,21 2 0251 -- copyright
-char169 "
-Of 266,685,0,114,34,99 2 0252 -- ordfeminine
-char170 "
-fo 333,415,0,20,18,20 0 0253 -- guilsinglleft
-no 606,399,0,0,-1 0 0254 -- logicalnot
-char172 "
-\- 606,297,0,0,-1 0 0255 -- minus
-rg 747,685,18,21,20,21 2 0256 -- registered
-char174 "
-a- 333,623,0,110,-1,99 2 0257 -- macron
-char175 "
-de 400,683,0,19,-33,19 2 0260 -- degree
-char176 "
-char177 570,506,0,17,17,17 0 0261 -- plusminus
-S2 300,683,0,63,48,63 2 0262 -- twosuperior
-char178 "
-S3 300,683,0,71,33,71 2 0263 -- threesuperior
-char179 "
-aa 333,697,0,96,-89,96 2 0264 -- acute
-char180 "
-char181 576,449,207,0,110 1 0265 -- mu
-ps 500,669,193,112,107,99 2 0266 -- paragraph
-char182 "
-pc 250,405,0,0,-1 0 0267 -- periodcentered
-char183 "
-ac 333,5,218,0,130 1 0270 -- cedilla
-char184 "
-S1 300,683,0,51,20,51 2 0271 -- onesuperior
-char185 "
-Om 300,685,0,97,-6,97 2 0272 -- ordmasculine
-char186 "
-fc 333,415,0,0,40 0 0273 -- guilsinglright
-14 750,683,14,21,43,21 2 0274 -- onequarter
-char188 "
-12 750,683,14,23,59,23 2 0275 -- onehalf
-char189 "
-34 750,683,14,26,43,26 2 0276 -- threequarters
-char190 "
-r? 500,492,205,0,20 1 0277 -- questiondown
-char191 "
-`A 667,904,0,0,117 2 0300 -- Agrave
-char192 "
-'A 667,904,0,0,117 2 0301 -- Aacute
-char193 "
-^A 667,897,0,0,117 2 0302 -- Acircumflex
-char194 "
-~A 667,862,0,0,117 2 0303 -- Atilde
-char195 "
-:A 667,862,0,0,117 2 0304 -- Adieresis
-char196 "
-oA 667,921,0,0,117 2 0305 -- Aring
-char197 "
-AE 944,669,0,24,114,24 2 0306 -- AE
-char198 "
-,C 667,685,218,60,18,60 3 0307 -- Ccedilla
-char199 "
-`E 667,904,0,36,77,36 2 0310 -- Egrave
-char200 "
-'E 667,904,0,36,77,36 2 0311 -- Eacute
-char201 "
-^E 667,897,0,36,77,36 2 0312 -- Ecircumflex
-char202 "
-:E 667,862,0,36,77,36 2 0313 -- Edieresis
-char203 "
-`I 389,904,0,67,82,67 2 0314 -- Igrave
-char204 "
-'I 389,904,0,73,82,73 2 0315 -- Iacute
-char205 "
-^I 389,897,0,81,82,81 2 0316 -- Icircumflex
-char206 "
-:I 389,862,0,106,82,99 2 0317 -- Idieresis
-char207 "
--D 722,669,0,28,81,28 2 0320 -- Eth
-char208 "
-~N 722,862,15,76,77,76 2 0321 -- Ntilde
-char209 "
-`O 722,904,18,19,23,19 2 0322 -- Ograve
-char210 "
-'O 722,904,18,19,23,19 2 0323 -- Oacute
-char211 "
-^O 722,897,18,19,23,19 2 0324 -- Ocircumflex
-char212 "
-~O 722,862,18,19,23,19 2 0325 -- Otilde
-char213 "
-:O 722,862,18,19,23,19 2 0326 -- Odieresis
-char214 "
-char215 570,490,0,2,2,2 0 0327 -- multiply
-/O 722,764,125,19,23,19 2 0330 -- Oslash
-char216 "
-`U 722,904,18,72,-17,72 2 0331 -- Ugrave
-char217 "
-'U 722,904,18,72,-17,72 2 0332 -- Uacute
-char218 "
-^U 722,897,18,72,-17,72 2 0333 -- Ucircumflex
-char219 "
-:U 722,862,18,72,-17,72 2 0334 -- Udieresis
-char220 "
-'Y 611,904,0,98,-23,98 2 0335 -- Yacute
-char221 "
-TP 611,669,0,12,77,12 2 0336 -- Thorn
-char222 "
-ss 500,705,200,23,250,23 2 0337 -- germandbls
-char223 "
-`a 500,697,14,5,71,5 2 0340 -- agrave
-char224 "
-'a 500,697,14,13,71,13 2 0341 -- aacute
-char225 "
-^a 500,690,14,5,71,5 2 0342 -- acircumflex
-char226 "
-~a 500,655,14,41,71,41 2 0343 -- atilde
-char227 "
-:a 500,655,14,21,71,21 2 0344 -- adieresis
-char228 "
-oa 500,729,14,5,71,5 2 0345 -- aring
-char229 "
-ae 722,462,13,1,55,1 0 0346 -- ae
-char230 "
-,c 444,462,218,0,74 1 0347 -- ccedilla
-char231 "
-`e 444,697,13,4,45,4 2 0350 -- egrave
-char232 "
-'e 444,697,13,41,45,41 2 0351 -- eacute
-char233 "
-^e 444,690,13,29,45,29 2 0352 -- ecircumflex
-char234 "
-:e 444,655,13,49,45,49 2 0353 -- edieresis
-char235 "
-`i 278,697,9,32,48,32 2 0354 -- igrave
-char236 "
-'i 278,697,9,124,48,99 2 0355 -- iacute
-char237 "
-^i 278,690,9,97,52,97 2 0356 -- icircumflex
-char238 "
-:i 278,655,9,132,48,99 2 0357 -- idieresis
-char239 "
-Sd 500,699,13,4,53,4 2 0360 -- eth
-char240 "
-~n 556,655,9,0,56 2 0361 -- ntilde
-char241 "
-`o 500,697,13,0,53 2 0362 -- ograve
-char242 "
-'o 500,697,13,13,53,13 2 0363 -- oacute
-char243 "
-^o 500,690,13,1,53,1 2 0364 -- ocircumflex
-char244 "
-~o 500,655,13,41,53,41 2 0365 -- otilde
-char245 "
-:o 500,655,13,16,53,16 2 0366 -- odieresis
-char246 "
-char247 570,535,29,17,17,17 0 0367 -- divide
-/o 500,560,119,0,53 0 0370 -- oslash
-char248 "
-`u 556,697,9,0,35 2 0371 -- ugrave
-char249 "
-'u 556,697,9,0,35 2 0372 -- uacute
-char250 "
-^u 556,690,9,0,35 2 0373 -- ucircumflex
-char251 "
-:u 556,655,9,0,35 2 0374 -- udieresis
-char252 "
-'y 444,697,205,41,144,41 3 0375 -- yacute
-char253 "
-Tp 500,699,205,0,170 3 0376 -- thorn
-char254 "
-:y 444,655,205,44,144,44 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/TI b/contrib/groff/font/devps/TI
deleted file mode 100644
index 992089d96037..000000000000
--- a/contrib/groff/font/devps/TI
+++ /dev/null
@@ -1,544 +0,0 @@
-name TI
-internalname Times-Italic
-slant 7
-spacewidth 250
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -55
-A w -55
-A v -55
-A u -20
-A ' -37
-A cq -37
-A Y -55
-A W -95
-A V -105
-A U -50
-A T -37
-A Q -40
-A O -40
-A G -35
-A C -30
-B U -10
-B A -25
-D Y -40
-D W -40
-D V -40
-D A -35
-F r -55
-F . -135
-F o -105
-F i -45
-F e -75
-F , -135
-F a -75
-F A -115
-J u -35
-J . -25
-J o -25
-J e -25
-J , -25
-J a -35
-J A -40
-K y -40
-K u -40
-K o -40
-K e -35
-K O -50
-L y -30
-L ' -37
-L cq -37
-L Y -20
-L W -55
-L V -55
-L T -20
-N A -27
-O Y -50
-O X -40
-O W -50
-O V -50
-O T -40
-O A -55
-P . -135
-P o -80
-P e -80
-P , -135
-P a -80
-P A -90
-Q U -10
-R Y -18
-R W -18
-R V -18
-R U -40
-R O -40
-T y -74
-T w -74
-T u -55
-T ; -65
-T r -55
-T . -74
-T o -92
-T i -55
-T - -74
-T hy -74
-T char173 -74
-T e -92
-T , -74
-T : -55
-T a -92
-T O -18
-T A -50
-U . -25
-U , -25
-U A -40
-V u -74
-V ; -74
-V . -129
-V o -111
-V i -74
-V - -55
-V hy -55
-V char173 -55
-V e -111
-V , -129
-V : -65
-V a -111
-V O -30
-V A -60
-W y -70
-W u -55
-W ; -65
-W . -92
-W o -92
-W i -55
-W - -37
-W hy -37
-W char173 -37
-W e -92
-W , -92
-W : -65
-W a -92
-W O -25
-W A -60
-Y u -92
-Y ; -65
-Y . -92
-Y o -92
-Y i -74
-Y - -74
-Y hy -74
-Y char173 -74
-Y e -92
-Y , -92
-Y : -65
-Y a -92
-Y O -15
-Y A -50
-a g -10
-b u -20
-b . -40
-c k -20
-c h -15
-, ' -140
-, cq -140
-, rq -140
-e y -30
-e x -20
-e w -15
-e v -15
-e . -15
-e g -40
-e , -10
-f ' 92
-f cq 92
-f . -15
-f i -20
-f f -18
-f .i -60
-f , -10
-g . -15
-g g -10
-g e -10
-g , -10
-k y -10
-k o -10
-k e -10
-n v -40
-o v -10
-o g -10
-. ' -140
-. cq -140
-. rq -140
-` ` -111
-` oq -111
-oq ` -111
-oq oq -111
-' v -10
-cq v -10
-' t -30
-cq t -30
-' s -40
-cq s -40
-' r -25
-cq r -25
-' ' -111
-' cq -111
-cq ' -111
-cq cq -111
-' d -25
-cq d -25
-r s -10
-r q -37
-r . -111
-r o -45
-r - -20
-r hy -20
-r char173 -20
-r g -37
-r e -37
-r d -37
-r , -111
-r c -37
-r a -15
-v . -74
-v , -74
-w . -74
-w , -74
-y . -55
-y , -55
-charset
-ha 422,666,0,50,50,43 2 0000 -- asciicircum
-ti 541,323,0,11,10,11 0 0001 -- asciitilde
-vS 500,873,18,70,33,43 2 0002 -- Scaron
-vZ 556,873,0,100,56,43 2 0003 -- Zcaron
-vs 389,661,13,115,34,43 2 0004 -- scaron
-vz 389,661,81,95,52,43 2 0005 -- zcaron
-:Y 556,818,0,127,-28,43 2 0006 -- Ydieresis
-tm 980,653,0,27,20,27 2 0007 -- trademark
-aq 214,666,0,77,-82,43 2 0010 -- quotesingle
-space 250 0 0040
-! 333,667,11,19,11,19 2 0041 -- exclam
-" 420,666,0,62,-94,43 2 0042 -- quotedbl
-dq "
-# 500,676,0,90,48,43 2 0043 -- numbersign
-sh "
-$ 500,731,89,47,19,43 2 0044 -- dollar
-Do "
-% 833,676,13,7,-29,7 2 0045 -- percent
-& 778,666,18,0,-26 2 0046 -- ampersand
-' 333,666,0,7,-101,7 2 0047 -- quoteright
-cq "
-( 333,669,181,32,8,32 2 0050 -- parenleft
-) 333,669,180,6,34,6 2 0051 -- parenright
-* 500,666,0,42,-78,42 2 0052 -- asterisk
-+ 675,506,0,0,-36 0 0053 -- plus
-, 250,101,129,0,54 0 0054 -- comma
-- 333,255,0,0,1 0 0055 -- hyphen
-hy "
-char173 "
-. 250,100,11,0,23 0 0056 -- period
-/ 278,666,18,158,115,43 2 0057 -- slash
-sl "
-0 500,676,7,47,18,43 2 0060 -- zero
-1 500,676,0,0,1 2 0061 -- one
-2 500,676,0,2,38,2 2 0062 -- two
-3 500,676,7,15,35,15 2 0063 -- three
-4 500,676,0,29,49,29 2 0064 -- four
-5 500,666,7,41,35,41 2 0065 -- five
-6 500,686,7,71,20,43 2 0066 -- six
-7 500,666,8,87,-25,43 2 0067 -- seven
-8 500,676,7,43,20,43 2 0070 -- eight
-9 500,676,17,42,27,42 2 0071 -- nine
-: 333,441,11 0 0072 -- colon
-; 333,441,129,0,23 0 0073 -- semicolon
-< 675,514,8,0,-34 0 0074 -- less
-= 675,386,0,0,-36 0 0075 -- equal
-> 675,514,8,0,-34 0 0076 -- greater
-? 500,664,12,22,-82,22 2 0077 -- question
-@ 920,666,18,0,-68 2 0100 -- at
-at "
-A 611,668,0,3,101,3 2 0101 -- A
-B 611,653,0,27,58,27 2 0102 -- B
-C 667,666,18,72,-16,43 2 0103 -- C
-D 722,653,0,28,58,28 2 0104 -- D
-E 611,653,0,73,51,43 2 0105 -- E
-F 611,653,0,84,42,43 2 0106 -- F
-G 722,666,18,50,-2,43 2 0107 -- G
-H 722,653,0,95,58,43 2 0110 -- H
-I 333,653,0,101,58,43 2 0111 -- I
-J 444,653,18,97,56,43 2 0112 -- J
-K 667,653,0,105,43,43 2 0113 -- K
-L 556,653,0,53,58,43 2 0114 -- L
-M 833,653,0,90,68,43 2 0115 -- M
-N 667,653,15,110,70,43 2 0116 -- N
-O 722,666,18,27,-10,27 2 0117 -- O
-P 611,653,0,44,50,43 2 0120 -- P
-Q 722,666,182,27,-9,27 2 0121 -- Q
-R 611,653,0,27,63,27 2 0122 -- R
-S 500,667,18,58,33,43 2 0123 -- S
-T 556,653,0,127,-9,43 2 0124 -- T
-U 722,653,18,93,-52,43 2 0125 -- U
-V 611,653,18,127,-26,43 2 0126 -- V
-W 833,653,18,123,-21,43 2 0127 -- W
-X 611,653,0,94,79,43 2 0130 -- X
-Y 556,653,0,127,-28,43 2 0131 -- Y
-Z 556,653,0,100,56,43 2 0132 -- Z
-[ 389,663,153,52,29,43 2 0133 -- bracketleft
-lB "
-\ 278,666,18,91,91,43 2 0134 -- backslash
-rs "
-] 389,663,153,43,38,43 2 0135 -- bracketright
-rB "
-a^ 333,661,0,102,-41,43 2 0136 -- circumflex
-^ "
-_ 500,0,125,50,50,43 0 0137 -- underscore
-` 333,666,0,27,-121,27 2 0140 -- quoteleft
-oq "
-a 500,441,11,26,33,26 0 0141 -- a
-b 500,683,11,23,27,23 2 0142 -- b
-c 444,441,11,31,20,31 0 0143 -- c
-d 500,683,13,77,35,43 2 0144 -- d
-e 444,441,11,18,19,18 0 0145 -- e
-f 278,678,207,196,197,43 3 0146 -- f
-g 500,441,206,22,42,22 1 0147 -- g
-h 500,683,9,28,31,28 2 0150 -- h
-i 278,654,11,36,1,36 2 0151 -- i
-j 278,654,207,48,174,43 3 0152 -- j
-k 444,683,11,67,36,43 2 0153 -- k
-l 278,683,11,51,9,43 2 0154 -- l
-m 722,441,9,32,38,32 0 0155 -- m
-n 500,441,9,24,36,24 0 0156 -- n
-o 500,441,11,18,23,18 0 0157 -- o
-p 500,441,205,19,125,19 1 0160 -- p
-q 500,441,209,33,25,33 1 0161 -- q
-r 389,441,0,73,5,43 0 0162 -- r
-s 389,442,13,27,34,27 0 0163 -- s
-t 278,546,11,68,13,43 2 0164 -- t
-u 500,441,11,25,8,25 0 0165 -- u
-v 444,441,18,32,29,32 0 0166 -- v
-w 667,441,18,31,34,31 0 0167 -- w
-x 444,441,11,53,77,43 0 0170 -- x
-y 444,441,206,32,74,32 1 0171 -- y
-z 389,428,81,41,52,41 0 0172 -- z
-lC 400,687,177,57,-1,43 2 0173 -- braceleft
-{ "
-ba 275,666,18,0,-55 2 0174 -- bar
-| "
-rC 400,687,177,0,57 2 0175 -- braceright
-} "
-a~ 333,624,0,144,-50,43 2 0176 -- tilde
-~ "
-bq 333,101,129,0,6 0 0200 -- quotesinglbase
-Fo 500,403,0,0,-3 0 0201 -- guillemotleft
-char171 "
-Fc 500,403,0,0,-5 0 0202 -- guillemotright
-char187 "
-bu 350,461,0,10,10,10 0 0203 -- bullet
-Fn 500,682,182,57,25,43 2 0204 -- florin
-f/ 167,676,10,220,219,43 2 0205 -- fraction
-%0 1000,706,19,60,25,43 2 0206 -- perthousand
-dg 500,666,159,38,-51,38 2 0207 -- dagger
-dd 500,666,143,41,28,41 2 0210 -- daggerdbl
-en 500,243,0,55,56,43 0 0211 -- endash
-em 889,243,0,55,56,43 0 0212 -- emdash
-fi 500,681,207,31,191,31 3 0214 -- fi
-fl 500,682,204,68,191,43 3 0215 -- fl
-.i 278,441,11,7,1,7 0 0220 -- dotlessi
-ga 333,664,0,28,-71,28 2 0222 -- grave
-a" 333,664,0,203,-43,43 2 0223 -- hungarumlaut
-a. 333,606,0,22,-157,22 2 0224 -- dotaccent
-ab 333,650,0,135,-67,43 2 0225 -- breve
-ah 333,661,0,143,-71,43 2 0226 -- caron
-ao 333,691,0,72,-105,43 2 0227 -- ring
-ho 333,40,169,0,70 0 0230 -- ogonek
-lq 556,666,0,8,-116,8 2 0231 -- quotedblleft
-rq 556,666,0,0,-101 2 0232 -- quotedblright
-oe 667,441,12,29,30,29 0 0233 -- oe
-/l 278,683,11,79,13,43 2 0234 -- lslash
-Bq 556,101,129,0,-7 0 0235 -- quotedblbase
-OE 944,666,8,70,1,43 2 0236 -- OE
-/L 556,653,0,53,58,43 2 0237 -- Lslash
-r! 389,473,205,0,-9 1 0241 -- exclamdown
-char161 "
-ct 500,560,143,22,-27,22 2 0242 -- cent
-char162 "
-Po 500,670,6,67,40,43 2 0243 -- sterling
-char163 "
-Cs 500,597,0,72,72,43 2 0244 -- currency
-char164 "
-Ye 500,653,0,153,23,43 2 0245 -- yen
-char165 "
-bb 275,666,18,0,-55 2 0246 -- brokenbar
-char166 "
-sc 500,666,162,11,-3,11 2 0247 -- section
-char167 "
-ad 333,606,0,122,-57,43 2 0250 -- dieresis
-char168 "
-co 760,666,18,9,9,9 2 0251 -- copyright
-char169 "
-Of 276,676,0,126,8,43 2 0252 -- ordfeminine
-char170 "
-fo 333,403,0,0,-1 0 0253 -- guilsinglleft
-no 675,386,0,0,-36 0 0254 -- logicalnot
-char172 "
-\- 675,286,0,0,-36 0 0255 -- minus
-rg 760,666,18,9,9,9 2 0256 -- registered
-char174 "
-a- 333,583,0,128,-49,43 2 0257 -- macron
-char175 "
-de 400,676,0,37,-51,37 2 0260 -- degree
-char176 "
-char177 675,506,0,0,-36 0 0261 -- plusminus
-S2 300,676,0,74,17,43 2 0262 -- twosuperior
-char178 "
-S3 300,676,0,89,7,43 2 0263 -- threesuperior
-char179 "
-aa 333,664,0,120,-130,43 2 0264 -- acute
-char180 "
-char181 500,428,209,47,80,43 1 0265 -- mu
-ps 523,653,123,143,-5,43 2 0266 -- paragraph
-char182 "
-pc 250,310,0,0,-20 0 0267 -- periodcentered
-char183 "
-ac 333,0,217,0,80 1 0270 -- cedilla
-char184 "
-S1 300,676,0,34,7,34 2 0271 -- onesuperior
-char185 "
-Om 310,676,0,102,-17,43 2 0272 -- ordmasculine
-char186 "
-fc 333,403,0,0,-2 0 0273 -- guilsinglright
-14 750,676,10,36,17,36 2 0274 -- onequarter
-char188 "
-12 750,676,10,49,16,43 2 0275 -- onehalf
-char189 "
-34 750,676,10,36,27,36 2 0276 -- threequarters
-char190 "
-r? 500,471,205,0,22 1 0277 -- questiondown
-char191 "
-`A 611,876,0,3,101,3 2 0300 -- Agrave
-char192 "
-'A 611,876,0,3,101,3 2 0301 -- Aacute
-char193 "
-^A 611,873,0,3,101,3 2 0302 -- Acircumflex
-char194 "
-~A 611,836,0,5,101,5 2 0303 -- Atilde
-char195 "
-:A 611,818,0,3,101,3 2 0304 -- Adieresis
-char196 "
-oA 611,883,0,3,101,3 2 0305 -- Aring
-char197 "
-AE 889,653,0,72,77,43 2 0306 -- AE
-char198 "
-,C 667,666,217,72,-16,43 3 0307 -- Ccedilla
-char199 "
-`E 611,876,0,73,51,43 2 0310 -- Egrave
-char200 "
-'E 611,876,0,73,51,43 2 0311 -- Eacute
-char201 "
-^E 611,873,0,73,51,43 2 0312 -- Ecircumflex
-char202 "
-:E 611,818,0,73,51,43 2 0313 -- Edieresis
-char203 "
-`I 333,876,0,101,58,43 2 0314 -- Igrave
-char204 "
-'I 333,876,0,130,58,43 2 0315 -- Iacute
-char205 "
-^I 333,873,0,142,58,43 2 0316 -- Icircumflex
-char206 "
-:I 333,818,0,152,58,43 2 0317 -- Idieresis
-char207 "
--D 722,653,0,28,58,28 2 0320 -- Eth
-char208 "
-~N 667,836,15,110,70,43 2 0321 -- Ntilde
-char209 "
-`O 722,876,18,27,-10,27 2 0322 -- Ograve
-char210 "
-'O 722,876,18,27,-10,27 2 0323 -- Oacute
-char211 "
-^O 722,873,18,27,-10,27 2 0324 -- Ocircumflex
-char212 "
-~O 722,836,18,27,-10,27 2 0325 -- Otilde
-char213 "
-:O 722,818,18,27,-10,27 2 0326 -- Odieresis
-char214 "
-char215 675,497,0,0,-43 0 0327 -- multiply
-/O 722,722,105,27,-10,27 2 0330 -- Oslash
-char216 "
-`U 722,876,18,93,-52,43 2 0331 -- Ugrave
-char217 "
-'U 722,876,18,93,-52,43 2 0332 -- Uacute
-char218 "
-^U 722,873,18,93,-52,43 2 0333 -- Ucircumflex
-char219 "
-:U 722,818,18,93,-52,43 2 0334 -- Udieresis
-char220 "
-'Y 556,876,0,127,-28,43 2 0335 -- Yacute
-char221 "
-TP 611,653,0,8,50,8 2 0336 -- Thorn
-char222 "
-ss 500,679,207,43,218,43 3 0337 -- germandbls
-char223 "
-`a 500,664,11,26,33,26 2 0340 -- agrave
-char224 "
-'a 500,664,11,37,33,37 2 0341 -- aacute
-char225 "
-^a 500,661,11,26,33,26 2 0342 -- acircumflex
-char226 "
-~a 500,624,11,61,33,43 2 0343 -- atilde
-char227 "
-:a 500,606,11,39,33,39 2 0344 -- adieresis
-char228 "
-oa 500,691,11,26,33,26 2 0345 -- aring
-char229 "
-ae 667,441,11,23,27,23 0 0346 -- ae
-char230 "
-,c 444,441,217,31,24,31 1 0347 -- ccedilla
-char231 "
-`e 444,664,11,18,19,18 2 0350 -- egrave
-char232 "
-'e 444,664,11,65,19,43 2 0351 -- eacute
-char233 "
-^e 444,661,11,47,19,43 2 0352 -- ecircumflex
-char234 "
-:e 444,606,11,57,19,43 2 0353 -- edieresis
-char235 "
-`i 278,664,11,56,1,43 2 0354 -- igrave
-char236 "
-'i 278,664,11,128,1,43 2 0355 -- iacute
-char237 "
-^i 278,661,11,100,16,43 2 0356 -- icircumflex
-char238 "
-:i 278,606,11,125,1,43 2 0357 -- idieresis
-char239 "
-Sd 500,683,11,32,23,32 2 0360 -- eth
-char240 "
-~n 500,624,9,26,36,26 2 0361 -- ntilde
-char241 "
-`o 500,664,11,18,23,18 2 0362 -- ograve
-char242 "
-'o 500,664,11,37,23,37 2 0363 -- oacute
-char243 "
-^o 500,661,11,18,23,18 2 0364 -- ocircumflex
-char244 "
-~o 500,624,11,46,23,43 2 0365 -- otilde
-char245 "
-:o 500,606,11,39,23,39 2 0366 -- odieresis
-char246 "
-char247 675,517,11,0,-36 0 0367 -- divide
-/o 500,554,135,19,22,19 2 0370 -- oslash
-char248 "
-`u 500,664,11,25,8,25 2 0371 -- ugrave
-char249 "
-'u 500,664,11,27,8,27 2 0372 -- uacute
-char250 "
-^u 500,661,11,25,8,25 2 0373 -- ucircumflex
-char251 "
-:u 500,606,11,29,8,29 2 0374 -- udieresis
-char252 "
-'y 444,664,206,65,74,43 3 0375 -- yacute
-char253 "
-Tp 500,683,205,19,125,19 3 0376 -- thorn
-char254 "
-:y 444,606,206,47,74,43 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/TR b/contrib/groff/font/devps/TR
deleted file mode 100644
index 6b98075d5cb1..000000000000
--- a/contrib/groff/font/devps/TR
+++ /dev/null
@@ -1,536 +0,0 @@
-name TR
-internalname Times-Roman
-spacewidth 250
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A y -92
-A w -92
-A v -74
-A ' -111
-A cq -111
-A Y -105
-A W -90
-A V -135
-A U -55
-A T -111
-A Q -55
-A O -55
-A G -40
-A C -40
-B U -10
-B A -35
-D Y -55
-D W -30
-D V -40
-D A -40
-F . -80
-F o -15
-F , -80
-F a -15
-F A -74
-J A -60
-K y -25
-K u -15
-K o -35
-K e -25
-K O -30
-L y -55
-L ' -92
-L cq -92
-L Y -100
-L W -74
-L V -100
-L T -92
-N A -35
-O Y -50
-O X -40
-O W -35
-O V -50
-O T -40
-O A -35
-P . -111
-P , -111
-P a -15
-P A -92
-Q U -10
-R Y -65
-R W -55
-R V -80
-R U -40
-R T -60
-R O -40
-T y -80
-T w -80
-T u -45
-T ; -55
-T r -35
-T . -74
-T o -80
-T i -35
-T - -92
-T hy -92
-T char173 -92
-T e -70
-T , -74
-T : -50
-T a -80
-T O -18
-T A -93
-U A -40
-V u -75
-V ; -74
-V . -129
-V o -129
-V i -60
-V - -100
-V hy -100
-V char173 -100
-V e -111
-V , -129
-V : -74
-V a -111
-V O -40
-V G -15
-V A -135
-W y -73
-W u -50
-W ; -37
-W . -92
-W o -80
-W i -40
-W - -65
-W hy -65
-W char173 -65
-W e -80
-W , -92
-W : -37
-W a -80
-W O -10
-W A -120
-Y u -111
-Y ; -92
-Y . -129
-Y o -110
-Y i -55
-Y - -111
-Y hy -111
-Y char173 -111
-Y e -100
-Y , -129
-Y : -92
-Y a -100
-Y O -30
-Y A -120
-a w -15
-a v -20
-b v -15
-b u -20
-b . -40
-c y -15
-, ' -70
-, cq -70
-, rq -70
-e y -15
-e x -15
-e w -25
-e v -25
-e g -15
-f ' 55
-f cq 55
-f i -20
-f f -25
-f .i -50
-f a -10
-g a -5
-h y -5
-i v -25
-k y -15
-k o -10
-k e -10
-l w -10
-n y -15
-n v -40
-o y -10
-o w -25
-o v -15
-p y -10
-. ' -70
-. cq -70
-. rq -70
-lq A -80
-` ` -74
-` oq -74
-oq ` -74
-oq oq -74
-` A -80
-oq A -80
-' v -50
-cq v -50
-' t -18
-cq t -18
-' s -55
-cq s -55
-' r -50
-cq r -50
-' ' -74
-' cq -74
-cq ' -74
-cq cq -74
-' l -10
-cq l -10
-' d -50
-cq d -50
-r . -55
-r - -20
-r hy -20
-r char173 -20
-r g -18
-r , -40
-v . -65
-v o -20
-v e -15
-v , -65
-v a -25
-w . -65
-w o -10
-w , -65
-w a -10
-x e -15
-y . -65
-y , -65
-charset
-ha 469,662 2 0000 -- asciicircum
-ti 541,323 0 0001 -- asciitilde
-vS 556,886,14 2 0002 -- Scaron
-vZ 611,886 2 0003 -- Zcaron
-vs 389,674,10 2 0004 -- scaron
-vz 444,674 2 0005 -- zcaron
-:Y 722,835 2 0006 -- Ydieresis
-tm 980,662 2 0007 -- trademark
-aq 180,676 2 0010 -- quotesingle
-space 250 0 0040
-! 333,676,9 2 0041 -- exclam
-" 408,676 2 0042 -- quotedbl
-dq "
-# 500,662 2 0043 -- numbersign
-sh "
-$ 500,727,87 2 0044 -- dollar
-Do "
-% 833,676,13 2 0045 -- percent
-& 778,676,13 2 0046 -- ampersand
-' 333,676 2 0047 -- quoteright
-cq "
-( 333,676,177 2 0050 -- parenleft
-) 333,676,177 2 0051 -- parenright
-* 500,676 2 0052 -- asterisk
-+ 564,506 0 0053 -- plus
-, 250,102,141 0 0054 -- comma
-- 333,257 0 0055 -- hyphen
-hy "
-char173 "
-. 250,100,11 0 0056 -- period
-/ 278,676,14 2 0057 -- slash
-sl "
-0 500,676,14 2 0060 -- zero
-1 500,676 2 0061 -- one
-2 500,676 2 0062 -- two
-3 500,676,14 2 0063 -- three
-4 500,676 2 0064 -- four
-5 500,688,14 2 0065 -- five
-6 500,684,14 2 0066 -- six
-7 500,662,8 2 0067 -- seven
-8 500,676,14 2 0070 -- eight
-9 500,676,22 2 0071 -- nine
-: 278,459,11 0 0072 -- colon
-; 278,459,141 0 0073 -- semicolon
-< 564,514,8 0 0074 -- less
-= 564,386 0 0075 -- equal
-> 564,514,8 0 0076 -- greater
-? 444,676,8 2 0077 -- question
-@ 921,676,14 2 0100 -- at
-at "
-A 722,674 2 0101 -- A
-B 667,662 2 0102 -- B
-C 667,676,14 2 0103 -- C
-D 722,662 2 0104 -- D
-E 611,662 2 0105 -- E
-F 556,662 2 0106 -- F
-G 722,676,14 2 0107 -- G
-H 722,662 2 0110 -- H
-I 333,662 2 0111 -- I
-J 389,662,14 2 0112 -- J
-K 722,662 2 0113 -- K
-L 611,662 2 0114 -- L
-M 889,662 2 0115 -- M
-N 722,662,11 2 0116 -- N
-O 722,676,14 2 0117 -- O
-P 556,662 2 0120 -- P
-Q 722,676,178 2 0121 -- Q
-R 667,662 2 0122 -- R
-S 556,676,14 2 0123 -- S
-T 611,662 2 0124 -- T
-U 722,662,14 2 0125 -- U
-V 722,662,11 2 0126 -- V
-W 944,662,11 2 0127 -- W
-X 722,662 2 0130 -- X
-Y 722,662 2 0131 -- Y
-Z 611,662 2 0132 -- Z
-[ 333,662,156 2 0133 -- bracketleft
-lB "
-\ 278,676,14 2 0134 -- backslash
-rs "
-] 333,662,156 2 0135 -- bracketright
-rB "
-a^ 333,674 2 0136 -- circumflex
-^ "
-_ 500,0,125 0 0137 -- underscore
-` 333,676 2 0140 -- quoteleft
-oq "
-a 444,460,10 0 0141 -- a
-b 500,683,10 2 0142 -- b
-c 444,460,10 0 0143 -- c
-d 500,683,10 2 0144 -- d
-e 444,460,10 0 0145 -- e
-f 333,683 2 0146 -- f
-g 500,460,218 1 0147 -- g
-h 500,683 2 0150 -- h
-i 278,683 2 0151 -- i
-j 278,683,218 3 0152 -- j
-k 500,683 2 0153 -- k
-l 278,683 2 0154 -- l
-m 778,460 0 0155 -- m
-n 500,460 0 0156 -- n
-o 500,460,10 0 0157 -- o
-p 500,460,217 1 0160 -- p
-q 500,460,217 1 0161 -- q
-r 333,460 0 0162 -- r
-s 389,460,10 0 0163 -- s
-t 278,579,10 2 0164 -- t
-u 500,450,10 0 0165 -- u
-v 500,450,14 0 0166 -- v
-w 722,450,14 0 0167 -- w
-x 500,450 0 0170 -- x
-y 500,450,218 1 0171 -- y
-z 444,450 0 0172 -- z
-lC 480,680,181 2 0173 -- braceleft
-{ "
-ba 200,676,14 2 0174 -- bar
-| "
-rC 480,680,181 2 0175 -- braceright
-} "
-a~ 333,638 2 0176 -- tilde
-~ "
-bq 333,102,141 0 0200 -- quotesinglbase
-Fo 500,416 0 0201 -- guillemotleft
-char171 "
-Fc 500,416 0 0202 -- guillemotright
-char187 "
-bu 350,466 0 0203 -- bullet
-Fn 500,676,189 2 0204 -- florin
-f/ 167,676,14 2 0205 -- fraction
-%0 1000,706,19 2 0206 -- perthousand
-dg 500,676,149 2 0207 -- dagger
-dd 500,676,153 2 0210 -- daggerdbl
-en 500,250 0 0211 -- endash
-em 1000,250 0 0212 -- emdash
-fi 556,683 2 0214 -- fi
-fl 556,683 2 0215 -- fl
-.i 278,460 0 0220 -- dotlessi
-ga 333,678 2 0222 -- grave
-a" 333,678 2 0223 -- hungarumlaut
-a. 333,623 2 0224 -- dotaccent
-ab 333,664 2 0225 -- breve
-ah 333,674 2 0226 -- caron
-ao 333,711 2 0227 -- ring
-ho 333,0,165 0 0230 -- ogonek
-lq 444,676 2 0231 -- quotedblleft
-rq 444,676 2 0232 -- quotedblright
-oe 722,460,10 0 0233 -- oe
-/l 278,683 2 0234 -- lslash
-Bq 444,102,141 0 0235 -- quotedblbase
-OE 889,668,6 2 0236 -- OE
-/L 611,662 2 0237 -- Lslash
-r! 333,467,218 1 0241 -- exclamdown
-char161 "
-ct 500,579,138 2 0242 -- cent
-char162 "
-Po 500,676,8 2 0243 -- sterling
-char163 "
-Cs 500,602 2 0244 -- currency
-char164 "
-Ye 500,662 2 0245 -- yen
-char165 "
-bb 200,676,14 2 0246 -- brokenbar
-char166 "
-sc 500,676,148 2 0247 -- section
-char167 "
-ad 333,623 2 0250 -- dieresis
-char168 "
-co 760,676,14 2 0251 -- copyright
-char169 "
-Of 276,676 2 0252 -- ordfeminine
-char170 "
-fo 333,416 0 0253 -- guilsinglleft
-no 564,386 0 0254 -- logicalnot
-char172 "
-\- 564,286 0 0255 -- minus
-rg 760,676,14 2 0256 -- registered
-char174 "
-a- 333,601 2 0257 -- macron
-char175 "
-de 400,676 2 0260 -- degree
-char176 "
-char177 564,506 0 0261 -- plusminus
-S2 300,676 2 0262 -- twosuperior
-char178 "
-S3 300,676 2 0263 -- threesuperior
-char179 "
-aa 333,678 2 0264 -- acute
-char180 "
-char181 500,450,218 1 0265 -- mu
-ps 453,662,154 2 0266 -- paragraph
-char182 "
-pc 250,310 0 0267 -- periodcentered
-char183 "
-ac 333,0,215 0 0270 -- cedilla
-char184 "
-S1 300,676 2 0271 -- onesuperior
-char185 "
-Om 310,676 2 0272 -- ordmasculine
-char186 "
-fc 333,416 0 0273 -- guilsinglright
-14 750,676,14 2 0274 -- onequarter
-char188 "
-12 750,676,14 2 0275 -- onehalf
-char189 "
-34 750,676,14 2 0276 -- threequarters
-char190 "
-r? 444,466,218 1 0277 -- questiondown
-char191 "
-`A 722,890 2 0300 -- Agrave
-char192 "
-'A 722,890 2 0301 -- Aacute
-char193 "
-^A 722,886 2 0302 -- Acircumflex
-char194 "
-~A 722,850 2 0303 -- Atilde
-char195 "
-:A 722,835 2 0304 -- Adieresis
-char196 "
-oA 722,898 2 0305 -- Aring
-char197 "
-AE 889,662 2 0306 -- AE
-char198 "
-,C 667,676,215 2 0307 -- Ccedilla
-char199 "
-`E 611,890 2 0310 -- Egrave
-char200 "
-'E 611,890 2 0311 -- Eacute
-char201 "
-^E 611,886 2 0312 -- Ecircumflex
-char202 "
-:E 611,835 2 0313 -- Edieresis
-char203 "
-`I 333,890 2 0314 -- Igrave
-char204 "
-'I 333,890 2 0315 -- Iacute
-char205 "
-^I 333,886 2 0316 -- Icircumflex
-char206 "
-:I 333,835 2 0317 -- Idieresis
-char207 "
--D 722,662 2 0320 -- Eth
-char208 "
-~N 722,850,11 2 0321 -- Ntilde
-char209 "
-`O 722,890,14 2 0322 -- Ograve
-char210 "
-'O 722,890,14 2 0323 -- Oacute
-char211 "
-^O 722,886,14 2 0324 -- Ocircumflex
-char212 "
-~O 722,850,14 2 0325 -- Otilde
-char213 "
-:O 722,835,14 2 0326 -- Odieresis
-char214 "
-char215 564,497 0 0327 -- multiply
-/O 722,734,80 2 0330 -- Oslash
-char216 "
-`U 722,890,14 2 0331 -- Ugrave
-char217 "
-'U 722,890,14 2 0332 -- Uacute
-char218 "
-^U 722,886,14 2 0333 -- Ucircumflex
-char219 "
-:U 722,835,14 2 0334 -- Udieresis
-char220 "
-'Y 722,890 2 0335 -- Yacute
-char221 "
-TP 556,662 2 0336 -- Thorn
-char222 "
-ss 500,683,9 2 0337 -- germandbls
-char223 "
-`a 444,678,10 2 0340 -- agrave
-char224 "
-'a 444,678,10 2 0341 -- aacute
-char225 "
-^a 444,674,10 2 0342 -- acircumflex
-char226 "
-~a 444,638,10 2 0343 -- atilde
-char227 "
-:a 444,623,10 2 0344 -- adieresis
-char228 "
-oa 444,711,10 2 0345 -- aring
-char229 "
-ae 667,460,10 0 0346 -- ae
-char230 "
-,c 444,460,215 0 0347 -- ccedilla
-char231 "
-`e 444,678,10 2 0350 -- egrave
-char232 "
-'e 444,678,10 2 0351 -- eacute
-char233 "
-^e 444,674,10 2 0352 -- ecircumflex
-char234 "
-:e 444,623,10 2 0353 -- edieresis
-char235 "
-`i 278,678 2 0354 -- igrave
-char236 "
-'i 278,678 2 0355 -- iacute
-char237 "
-^i 278,674 2 0356 -- icircumflex
-char238 "
-:i 278,623 2 0357 -- idieresis
-char239 "
-Sd 500,686,10 2 0360 -- eth
-char240 "
-~n 500,638 2 0361 -- ntilde
-char241 "
-`o 500,678,10 2 0362 -- ograve
-char242 "
-'o 500,678,10 2 0363 -- oacute
-char243 "
-^o 500,674,10 2 0364 -- ocircumflex
-char244 "
-~o 500,638,10 2 0365 -- otilde
-char245 "
-:o 500,623,10 2 0366 -- odieresis
-char246 "
-char247 564,516,10 0 0367 -- divide
-/o 500,551,112 0 0370 -- oslash
-char248 "
-`u 500,678,10 2 0371 -- ugrave
-char249 "
-'u 500,678,10 2 0372 -- uacute
-char250 "
-^u 500,674,10 2 0373 -- ucircumflex
-char251 "
-:u 500,623,10 2 0374 -- udieresis
-char252 "
-'y 500,678,218 3 0375 -- yacute
-char253 "
-Tp 500,683,217 3 0376 -- thorn
-char254 "
-:y 500,623,218 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/ZCMI b/contrib/groff/font/devps/ZCMI
deleted file mode 100644
index e25c2a6426f1..000000000000
--- a/contrib/groff/font/devps/ZCMI
+++ /dev/null
@@ -1,494 +0,0 @@
-name ZCMI
-internalname ZapfChancery-MediumItalic
-slant 14
-spacewidth 220
-encoding text.enc
-ligatures fi fl 0
-kernpairs
-A ' -40
-A cq -40
-A rq -40
-A U -10
-A T 10
-A Q 10
-A O 10
-A G -30
-A C 20
-D . -30
-D , -20
-D Y 10
-D A -10
-F . -40
-F i 10
-F , -30
-G . -20
-G , -10
-J . -20
-J , -10
-K u -20
-K o -20
-K e -20
-L y -10
-L ' -25
-L cq -25
-L rq -25
-L W -10
-L V -20
-O . -20
-O , -10
-O Y 10
-O T 20
-O A -20
-P . -50
-P o -10
-P e -10
-P , -40
-P a -20
-P A -10
-Q U -10
-R Y 10
-R W 10
-R T 20
-T o -20
-T i 20
-T - -20
-T hy -20
-T char173 -20
-T h 20
-T e -20
-T a -20
-T O 30
-T A 10
-V . -100
-V o -20
-V e -20
-V , -90
-V a -20
-V O 10
-V G -20
-W . -50
-W o -20
-W i 10
-W h 10
-W e -20
-W , -40
-W a -20
-W O 10
-Y u -20
-Y . -50
-Y o -50
-Y i 10
-Y e -40
-Y , -40
-Y a -60
-b . -30
-b l -20
-b , -20
-b b -20
-c k -10
-, ' -70
-, cq -70
-, rq -70
-d w -20
-d v -10
-d d -40
-e y 10
-f ' 30
-f cq 30
-f rq 30
-f . -50
-f f -50
-f e -10
-f , -40
-f a -20
-g y 10
-g . -30
-g i 10
-g e 10
-g , -20
-g a 10
-k y 10
-k o -10
-k e -20
-m y 10
-m u 10
-n y 20
-o . -30
-o , -20
-p . -30
-p p -10
-p , -20
-. ' -80
-. cq -80
-. rq -80
-lq ` 20
-lq oq 20
-lq A 10
-` ` -115
-` oq -115
-oq ` -115
-oq oq -115
-` A 10
-oq A 10
-' v 30
-cq v 30
-' t 20
-cq t 20
-' s -25
-cq s -25
-' r 30
-cq r 30
-' ' -115
-' cq -115
-cq ' -115
-cq cq -115
-' rq 20
-cq rq 20
-' l 20
-cq l 20
-r . -50
-r i 10
-r , -40
-s . -20
-s , -10
-v . -30
-v , -20
-w . -30
-w o 10
-w h 20
-w , -20
-charset
-ha 520,594,0,62,-82,62 2 0000 -- asciicircum
-ti 520,320,0,69,-73,69 0 0001 -- asciitilde
-vS 460,831,81,184,5,87 2 0002 -- Scaron
-vZ 620,831,19,99,8,87 2 0003 -- Zcaron
-vs 320,659,14,194,4,87 2 0004 -- scaron
-vz 440,659,14,124,24,87 2 0005 -- zcaron
-:Y 560,762,168,264,9,87 2 0006 -- Ydieresis
-tm 1000,594,0,96,-77,87 2 0007 -- trademark
-aq 160,610,0,105,-95,87 2 0010 -- quotesingle
-space 220 0 0040
-! 280,610,14,123,-69,87 2 0041 -- exclam
-" 220,610,0,163,-70,87 2 0042 -- quotedbl
-dq "
-# 440,594,0,131,-33,87 2 0043 -- numbersign
-sh "
-$ 440,709,144,118,-10,87 2 0044 -- dollar
-Do "
-% 680,700,160,80,-82,80 2 0045 -- percent
-& 780,610,16,185,-76,87 2 0046 -- ampersand
-' 240,610,0,148,-118,87 2 0047 -- quoteright
-cq "
-( 260,664,216,201,-46,87 2 0050 -- parenleft
-) 220,664,216,132,63,87 2 0051 -- parenright
-* 420,610,0,109,-89,87 2 0052 -- asterisk
-+ 520,426,0,73,-67,73 0 0053 -- plus
-, 220,148,140,43,25,43 0 0054 -- comma
-- 280,248,0,104,-19,87 0 0055 -- hyphen
-hy "
-char173 "
-. 220,128,14,58,-52,58 0 0056 -- period
-/ 340,610,16,168,-24,87 2 0057 -- slash
-sl "
-0 440,610,16,148,-29,87 2 0060 -- zero
-1 440,610,0,38,9,38 2 0061 -- one
-2 440,610,16,95,33,87 2 0062 -- two
-3 440,610,16,95,49,87 2 0063 -- three
-4 440,610,35,109,-27,87 2 0064 -- four
-5 440,679,16,205,-10,87 2 0065 -- five
-6 440,610,16,166,-40,87 2 0066 -- six
-7 440,645,33,171,-107,87 2 0067 -- seven
-8 440,610,16,139,-15,87 2 0070 -- eight
-9 440,610,16,127,18,87 2 0071 -- nine
-: 260,438,14,86,-48,86 0 0072 -- colon
-; 240,438,140,109,21,87 0 0073 -- semicolon
-< 520,468,0,57,-89,57 0 0074 -- less
-= 520,340,0,73,-67,73 0 0075 -- equal
-> 520,468,0,57,-89,57 0 0076 -- greater
-? 380,610,14,125,-100,87 2 0077 -- question
-@ 700,610,16,103,-77,87 2 0100 -- at
-at "
-A 620,632,16,127,37,87 2 0101 -- A
-B 600,640,6,124,-35,87 2 0102 -- B
-C 520,610,16,161,-43,87 2 0103 -- C
-D 700,640,6,118,-36,87 2 0104 -- D
-E 620,618,12,139,-41,87 2 0105 -- E
-F 580,629,118,263,-70,87 2 0106 -- F
-G 620,610,242,139,-98,87 2 0107 -- G
-H 680,708,16,248,32,87 2 0110 -- H
-I 380,594,0,174,-49,87 2 0111 -- I
-J 400,594,147,188,64,87 2 0112 -- J
-K 660,610,153,234,-3,87 2 0113 -- K
-L 580,610,16,127,-3,87 2 0114 -- L
-M 840,722,16,230,-8,87 2 0115 -- M
-N 700,708,168,265,-35,87 2 0116 -- N
-O 600,610,16,110,-44,87 2 0117 -- O
-P 540,628,0,168,8,87 2 0120 -- P
-Q 600,610,177,225,-34,87 2 0121 -- Q
-R 600,640,168,255,-8,87 2 0122 -- R
-S 460,610,81,148,5,87 2 0123 -- S
-T 500,667,0,294,-13,87 2 0124 -- T
-U 740,617,16,102,-76,87 2 0125 -- U
-V 640,714,16,220,-74,87 2 0126 -- V
-W 880,723,16,216,-44,87 2 0127 -- W
-X 560,610,16,189,80,87 2 0130 -- X
-Y 560,647,168,264,9,87 2 0131 -- Y
-Z 620,624,19,99,8,87 2 0132 -- Z
-[ 240,655,207,215,63,87 2 0133 -- bracketleft
-lB "
-\ 480,610,16,94,-90,87 2 0134 -- backslash
-rs "
-] 320,655,207,121,77,87 2 0135 -- bracketright
-rB "
-a^ 340,649,0,153,-173,87 2 0136 -- circumflex
-^ "
-_ 500,0,125,50,50,50 0 0137 -- underscore
-` 240,610,0,149,-119,87 2 0140 -- quoteleft
-oq "
-a 420,438,15,115,-42,87 0 0141 -- a
-b 420,714,23,122,-32,87 2 0142 -- b
-c 340,438,14,116,-37,87 0 0143 -- c
-d 440,714,14,261,-52,87 2 0144 -- d
-e 340,438,14,113,-37,87 0 0145 -- e
-f 320,714,314,277,169,87 3 0146 -- f
-g 400,438,314,153,158,87 1 0147 -- g
-h 440,714,14,134,-5,87 2 0150 -- h
-i 240,635,14,151,-50,87 2 0151 -- i
-j 220,635,314,162,162,87 3 0152 -- j
-k 440,714,184,238,-37,87 2 0153 -- k
-l 240,714,14,290,-52,87 2 0154 -- l
-m 620,438,14,134,-36,87 0 0155 -- m
-n 460,438,14,134,-51,87 0 0156 -- n
-o 400,438,14,99,-37,87 0 0157 -- o
-p 440,432,314,94,73,87 1 0160 -- p
-q 400,510,300,140,-37,87 1 0161 -- q
-r 300,438,14,174,-51,87 0 0162 -- r
-s 320,438,14,133,4,87 0 0163 -- s
-t 320,539,14,156,-56,87 2 0164 -- t
-u 460,438,14,118,-52,87 0 0165 -- u
-v 440,488,14,143,-37,87 0 0166 -- v
-w 680,488,14,152,-37,87 0 0167 -- w
-x 420,438,195,219,-20,87 0 0170 -- x
-y 400,438,314,133,74,87 1 0171 -- y
-z 440,445,14,118,24,87 0 0172 -- z
-lC 240,655,207,193,-5,87 2 0173 -- braceleft
-{ "
-ba 520,714,16,0,-270 2 0174 -- bar
-| "
-rC 240,655,207,128,60,87 2 0175 -- braceright
-} "
-a~ 440,619,0,132,-193,87 2 0176 -- tilde
-~ "
-bq 180,146,121,61,29,61 0 0200 -- quotesinglbase
-Fo 340,414,0,66,-48,66 0 0201 -- guillemotleft
-char171 "
-Fc 380,414,0,45,-67,45 0 0202 -- guillemotright
-char187 "
-bu 600,445,0,0,-178 0 0203 -- bullet
-Fn 440,610,314,192,114,87 3 0204 -- florin
-f/ 60,610,16,310,231,87 2 0205 -- fraction
-%0 960,700,160,95,-62,87 2 0206 -- perthousand
-dg 460,610,37,158,-88,87 2 0207 -- dagger
-dd 480,610,59,103,-88,87 2 0210 -- daggerdbl
-en 500,239,0,115,-1,87 0 0211 -- endash
-em 1000,239,0,115,-1,87 0 0212 -- emdash
-fi 520,714,314,135,174,87 3 0214 -- fi
-fl 520,714,314,200,174,87 3 0215 -- fl
-.i 240,438,14,116,-50,87 0 0220 -- dotlessi
-ga 220,659,0,169,-143,87 2 0222 -- grave
-a" 400,659,0,145,-158,87 2 0223 -- hungarumlaut
-a. 220,610,0,158,-186,87 2 0224 -- dotaccent
-ab 440,631,0,111,-203,87 2 0225 -- breve
-ah 340,659,0,184,-204,87 2 0226 -- caron
-ao 300,659,0,166,-190,87 2 0227 -- ring
-ho 280,6,191,3,12,3 0 0230 -- ogonek
-lq 340,610,0,174,-119,87 2 0231 -- quotedblleft
-rq 360,610,0,143,-108,87 2 0232 -- quotedblright
-oe 560,438,14,118,-28,87 0 0233 -- oe
-/l 300,714,14,265,-71,87 2 0234 -- lslash
-Bq 280,146,121,51,64,51 0 0235 -- quotedblbase
-OE 820,610,16,139,-13,87 2 0236 -- OE
-/L 580,610,16,127,1,87 2 0237 -- Lslash
-r! 280,438,186,76,-22,76 0 0241 -- exclamdown
-char161 "
-ct 440,543,134,86,-72,86 2 0242 -- cent
-char162 "
-Po 440,610,52,116,66,87 2 0243 -- sterling
-char163 "
-Cs 440,509,0,84,0,84 0 0244 -- currency
-char164 "
-Ye 440,647,168,223,51,87 2 0245 -- yen
-char165 "
-bb 520,714,16,0,-270 2 0246 -- brokenbar
-char166 "
-sc 420,610,215,144,-3,87 2 0247 -- section
-char167 "
-ad 360,610,0,159,-193,87 2 0250 -- dieresis
-char168 "
-co 740,610,16,73,-87,73 2 0251 -- copyright
-char169 "
-Of 260,610,0,176,-61,87 2 0252 -- ordfeminine
-char170 "
-fo 240,414,0,68,-48,68 0 0253 -- guilsinglleft
-no 520,340,0,73,-67,73 0 0254 -- logicalnot
-char172 "
-\- 520,242,0,73,-67,73 0 0255 -- minus
-rg 740,610,16,73,-87,73 2 0256 -- registered
-char174 "
-a- 440,578,0,75,-172,75 2 0257 -- macron
-char175 "
-de 400,610,0,107,-121,87 2 0260 -- degree
-char176 "
-char177 520,436,0,73,-67,73 0 0261 -- plusminus
-S2 264,610,0,140,-22,87 2 0262 -- twosuperior
-char178 "
-S3 264,610,0,134,-9,87 2 0263 -- threesuperior
-char179 "
-aa 300,659,0,172,-215,87 2 0264 -- acute
-char180 "
-char181 460,438,314,113,43,87 1 0265 -- mu
-ps 500,594,199,188,-55,87 2 0266 -- paragraph
-char182 "
-pc 220,310,0,71,-89,71 0 0267 -- periodcentered
-char183 "
-ac 300,6,191,0,38 0 0270 -- cedilla
-char184 "
-S1 264,610,0,97,-33,87 2 0271 -- onesuperior
-char185 "
-Om 260,610,0,163,-78,87 2 0272 -- ordmasculine
-char186 "
-fc 260,414,0,56,-56,56 0 0273 -- guilsinglright
-14 660,610,16,92,-6,87 2 0274 -- onequarter
-char188 "
-12 660,610,16,92,-6,87 2 0275 -- onehalf
-char189 "
-34 660,610,16,96,11,87 2 0276 -- threequarters
-char190 "
-r? 400,438,186,37,-32,37 0 0277 -- questiondown
-char191 "
-`A 620,821,16,127,37,87 2 0300 -- Agrave
-char192 "
-'A 620,821,16,132,37,87 2 0301 -- Aacute
-char193 "
-^A 620,821,16,127,37,87 2 0302 -- Acircumflex
-char194 "
-~A 620,771,16,132,37,87 2 0303 -- Atilde
-char195 "
-:A 620,762,16,139,37,87 2 0304 -- Adieresis
-char196 "
-oA 620,831,16,127,37,87 2 0305 -- Aring
-char197 "
-AE 740,594,16,109,71,87 2 0306 -- AE
-char198 "
-,C 520,610,191,161,-43,87 2 0307 -- Ccedilla
-char199 "
-`E 620,821,12,139,-41,87 2 0310 -- Egrave
-char200 "
-'E 620,821,12,139,-41,87 2 0311 -- Eacute
-char201 "
-^E 620,821,12,139,-41,87 2 0312 -- Ecircumflex
-char202 "
-:E 620,762,12,139,-41,87 2 0313 -- Edieresis
-char203 "
-`I 380,821,0,174,-49,87 2 0314 -- Igrave
-char204 "
-'I 380,821,0,202,-49,87 2 0315 -- Iacute
-char205 "
-^I 380,821,0,174,-49,87 2 0316 -- Icircumflex
-char206 "
-:I 380,762,0,189,-49,87 2 0317 -- Idieresis
-char207 "
--D 700,640,6,118,-36,87 2 0320 -- Eth
-char208 "
-~N 700,761,168,265,-35,87 2 0321 -- Ntilde
-char209 "
-`O 600,821,16,110,-44,87 2 0322 -- Ograve
-char210 "
-'O 600,821,16,110,-44,87 2 0323 -- Oacute
-char211 "
-^O 600,821,16,110,-44,87 2 0324 -- Ocircumflex
-char212 "
-~O 600,761,16,110,-44,87 2 0325 -- Otilde
-char213 "
-:O 600,762,16,110,-44,87 2 0326 -- Odieresis
-char214 "
-char215 520,410,0,57,-83,57 0 0327 -- multiply
-/O 660,672,78,141,-33,87 2 0330 -- Oslash
-char216 "
-`U 740,821,16,102,-76,87 2 0331 -- Ugrave
-char217 "
-'U 740,821,16,102,-76,87 2 0332 -- Uacute
-char218 "
-^U 740,821,16,102,-76,87 2 0333 -- Ucircumflex
-char219 "
-:U 740,762,16,102,-76,87 2 0334 -- Udieresis
-char220 "
-'Y 560,821,168,264,9,87 2 0335 -- Yacute
-char221 "
-TP 540,623,0,157,-2,87 2 0336 -- Thorn
-char222 "
-ss 420,714,314,172,177,87 3 0337 -- germandbls
-char223 "
-`a 420,659,15,115,-42,87 2 0340 -- agrave
-char224 "
-'a 420,659,15,122,-42,87 2 0341 -- aacute
-char225 "
-^a 420,649,15,115,-42,87 2 0342 -- acircumflex
-char226 "
-~a 420,619,15,152,-42,87 2 0343 -- atilde
-char227 "
-:a 420,610,15,115,-42,87 2 0344 -- adieresis
-char228 "
-oa 420,659,15,115,-42,87 2 0345 -- aring
-char229 "
-ae 540,468,14,134,-17,87 0 0346 -- ae
-char230 "
-,c 340,438,191,116,-12,87 0 0347 -- ccedilla
-char231 "
-`e 340,659,14,113,-37,87 2 0350 -- egrave
-char232 "
-'e 340,659,14,172,-37,87 2 0351 -- eacute
-char233 "
-^e 340,649,14,143,-37,87 2 0352 -- ecircumflex
-char234 "
-:e 340,610,14,159,-37,87 2 0353 -- edieresis
-char235 "
-`i 240,659,14,116,-50,87 2 0354 -- igrave
-char236 "
-'i 240,659,14,202,-50,87 2 0355 -- iacute
-char237 "
-^i 240,649,14,173,-50,87 2 0356 -- icircumflex
-char238 "
-:i 240,610,14,179,-50,87 2 0357 -- idieresis
-char239 "
-Sd 400,714,14,172,-37,87 2 0360 -- eth
-char240 "
-~n 460,619,14,134,-51,87 2 0361 -- ntilde
-char241 "
-`o 400,659,14,99,-37,87 2 0362 -- ograve
-char242 "
-'o 400,659,14,132,-37,87 2 0363 -- oacute
-char243 "
-^o 400,649,14,103,-37,87 2 0364 -- ocircumflex
-char244 "
-~o 400,619,14,152,-37,87 2 0365 -- otilde
-char245 "
-:o 400,610,14,129,-37,87 2 0366 -- odieresis
-char246 "
-char247 520,440,14,73,-67,73 0 0367 -- divide
-/o 440,488,64,150,4,87 0 0370 -- oslash
-char248 "
-`u 460,659,14,118,-52,87 2 0371 -- ugrave
-char249 "
-'u 460,659,14,118,-52,87 2 0372 -- uacute
-char250 "
-^u 460,649,14,118,-52,87 2 0373 -- ucircumflex
-char251 "
-:u 460,610,14,118,-52,87 2 0374 -- udieresis
-char252 "
-'y 400,659,314,133,74,87 3 0375 -- yacute
-char253 "
-Tp 440,714,314,115,88,87 3 0376 -- thorn
-char254 "
-:y 400,610,314,133,74,87 3 0377 -- ydieresis
-char255 "
diff --git a/contrib/groff/font/devps/ZD b/contrib/groff/font/devps/ZD
deleted file mode 100644
index 3066c39b7c84..000000000000
--- a/contrib/groff/font/devps/ZD
+++ /dev/null
@@ -1,193 +0,0 @@
-name ZD
-internalname ZapfDingbats
-special
-spacewidth 278
-charset
-space 278 0 0040
---- 974,621 3 0041 -- a1
---- 961,611 3 0042 -- a2
---- 974,621 3 0043 -- a202
---- 980,692 3 0044 -- a3
---- 719,566 3 0045 -- a4
---- 789,705,14 3 0046 -- a5
---- 790,705,14 3 0047 -- a119
---- 791,705,13 3 0050 -- a118
---- 690,553 3 0051 -- a117
---- 960,568 3 0052 -- a11
-rh 939,559 3 0053 -- a12
---- 549,705,11 3 0054 -- a13
---- 855,632 3 0055 -- a14
---- 911,642 3 0056 -- a15
---- 933,550 3 0057 -- a16
---- 911,642 3 0060 -- a105
---- 945,553 3 0061 -- a17
---- 974,587 3 0062 -- a18
-OK 755,705,13 3 0063 -- a19
---- 846,705,14 3 0064 -- a20
---- 762,692 3 0065 -- a21
---- 761,692 3 0066 -- a22
---- 571,661,68 3 0067 -- a23
---- 677,705,13 3 0070 -- a24
---- 763,692 3 0071 -- a25
---- 760,692 3 0072 -- a26
---- 759,692 3 0073 -- a27
---- 754,692 3 0074 -- a28
---- 494,692 3 0075 -- a6
---- 552,692 3 0076 -- a7
---- 537,692 3 0077 -- a8
---- 577,596 3 0100 -- a9
---- 692,705,14 3 0101 -- a10
---- 786,705,14 3 0102 -- a29
---- 788,705,14 3 0103 -- a30
---- 788,705,14 3 0104 -- a31
---- 790,705,14 3 0105 -- a32
---- 793,705,13 3 0106 -- a33
---- 794,705,13 3 0107 -- a34
---- 816,705,14 3 0110 -- a35
---- 823,705,14 3 0111 -- a36
---- 789,705,14 3 0112 -- a37
---- 841,705,14 3 0113 -- a38
---- 823,705,14 3 0114 -- a39
---- 833,705,14 3 0115 -- a40
---- 816,705,13 3 0116 -- a41
---- 831,705,14 3 0117 -- a42
---- 923,705,14 3 0120 -- a43
---- 744,692 3 0121 -- a44
---- 723,692 3 0122 -- a45
---- 749,692 3 0123 -- a46
---- 790,705,14 3 0124 -- a47
---- 792,705,14 3 0125 -- a48
---- 695,706,14 3 0126 -- a49
---- 776,699,6 3 0127 -- a50
---- 768,699,7 3 0130 -- a51
---- 792,705,14 3 0131 -- a52
---- 759,692 3 0132 -- a53
---- 707,704,13 3 0133 -- a54
---- 708,705,14 3 0134 -- a55
---- 682,705,14 3 0135 -- a56
---- 701,705,14 3 0136 -- a57
---- 826,705,14 3 0137 -- a58
---- 815,705,14 3 0140 -- a59
---- 789,705,14 3 0141 -- a60
---- 789,705,14 3 0142 -- a61
---- 707,705,14 3 0143 -- a62
---- 687,692 3 0144 -- a63
---- 696,691 3 0145 -- a64
---- 689,692 3 0146 -- a65
---- 786,705,14 3 0147 -- a66
---- 787,705,14 3 0150 -- a67
---- 713,705,14 3 0151 -- a68
---- 791,705,14 3 0152 -- a69
---- 785,705,14 3 0153 -- a70
---- 791,705,14 3 0154 -- a71
---- 873,705,14 3 0155 -- a72
---- 761,692 3 0156 -- a73
---- 762,692 3 0157 -- a74
---- 762,692 3 0160 -- a203
---- 759,692 3 0161 -- a75
---- 759,692 3 0162 -- a204
---- 892,705 3 0163 -- a76
---- 892,692,14 3 0164 -- a77
---- 788,705,14 3 0165 -- a78
---- 784,705,14 3 0166 -- a79
---- 438,705,14 3 0167 -- a81
---- 138,692 3 0170 -- a82
---- 277,692 3 0171 -- a83
---- 415,692 3 0172 -- a84
---- 392,705 3 0173 -- a97
---- 392,705 3 0174 -- a98
---- 668,705 3 0175 -- a99
---- 668,705 3 0176 -- a100
---- 732,806,143 3 0241 -- a101
---- 544,706,14 3 0242 -- a102
---- 544,705,14 3 0243 -- a103
---- 910,651 3 0244 -- a104
---- 667,705,14 3 0245 -- a106
---- 760,705,14 3 0246 -- a107
---- 760,569 3 0247 -- a108
---- 776,705 3 0250 -- a112
---- 595,705,14 3 0251 -- a111
---- 694,705,14 3 0252 -- a110
---- 626,705 3 0253 -- a109
---- 788,705,14 3 0254 -- a120
---- 788,705,14 3 0255 -- a121
---- 788,705,14 3 0256 -- a122
---- 788,705,14 3 0257 -- a123
---- 788,705,14 3 0260 -- a124
---- 788,705,14 3 0261 -- a125
---- 788,705,14 3 0262 -- a126
---- 788,705,14 3 0263 -- a127
---- 788,705,14 3 0264 -- a128
---- 788,705,14 3 0265 -- a129
---- 788,705,14 3 0266 -- a130
---- 788,705,14 3 0267 -- a131
---- 788,705,14 3 0270 -- a132
---- 788,705,14 3 0271 -- a133
---- 788,705,14 3 0272 -- a134
---- 788,705,14 3 0273 -- a135
---- 788,705,14 3 0274 -- a136
---- 788,705,14 3 0275 -- a137
---- 788,705,14 3 0276 -- a138
---- 788,705,14 3 0277 -- a139
---- 788,705,14 3 0300 -- a140
---- 788,705,14 3 0301 -- a141
---- 788,705,14 3 0302 -- a142
---- 788,705,14 3 0303 -- a143
---- 788,705,14 3 0304 -- a144
---- 788,705,14 3 0305 -- a145
---- 788,705,14 3 0306 -- a146
---- 788,705,14 3 0307 -- a147
---- 788,705,14 3 0310 -- a148
---- 788,705,14 3 0311 -- a149
---- 788,705,14 3 0312 -- a150
---- 788,705,14 3 0313 -- a151
---- 788,705,14 3 0314 -- a152
---- 788,705,14 3 0315 -- a153
---- 788,705,14 3 0316 -- a154
---- 788,705,14 3 0317 -- a155
---- 788,705,14 3 0320 -- a156
---- 788,705,14 3 0321 -- a157
---- 788,705,14 3 0322 -- a158
---- 788,705,14 3 0323 -- a159
---- 894,634 3 0324 -- a160
---- 838,540 3 0325 -- a161
---- 1016,540 3 0326 -- a163
---- 458,820,127 3 0327 -- a164
---- 748,597 3 0330 -- a196
---- 924,552 3 0331 -- a165
---- 748,597 3 0332 -- a192
---- 918,526 3 0333 -- a166
---- 927,660 3 0334 -- a167
---- 928,562 3 0335 -- a168
---- 928,563 3 0336 -- a169
---- 834,537 3 0337 -- a170
---- 873,599 3 0340 -- a171
---- 828,588 3 0341 -- a172
---- 924,594 3 0342 -- a173
---- 924,594 3 0343 -- a162
---- 917,692 3 0344 -- a174
---- 930,608 3 0345 -- a175
---- 931,608 3 0346 -- a176
---- 463,791,99 3 0347 -- a177
---- 883,623 3 0350 -- a178
---- 836,648 3 0351 -- a179
---- 836,648 3 0352 -- a193
---- 867,591 3 0353 -- a180
---- 867,591 3 0354 -- a199
---- 696,648 3 0355 -- a181
---- 696,648 3 0356 -- a200
---- 874,619 3 0357 -- a182
---- 874,615 3 0361 -- a201
---- 760,692 3 0362 -- a183
---- 946,533 3 0363 -- a184
---- 771,655 3 0364 -- a197
---- 865,481 3 0365 -- a185
---- 771,655 3 0366 -- a194
---- 888,712,19 3 0367 -- a198
---- 967,568 3 0370 -- a186
---- 888,712,19 3 0371 -- a195
---- 831,579 3 0372 -- a187
---- 873,578 3 0373 -- a188
---- 927,542 3 0374 -- a189
---- 970,616 3 0375 -- a190
---- 918,593 3 0376 -- a191
diff --git a/contrib/groff/font/devps/ZDR b/contrib/groff/font/devps/ZDR
deleted file mode 100644
index ab5b54f7c0e9..000000000000
--- a/contrib/groff/font/devps/ZDR
+++ /dev/null
@@ -1,193 +0,0 @@
-name ZDR
-internalname ZapfDingbats-Reverse
-special
-spacewidth 278
-charset
-space 278 0 0040
---- 974,621 3 0041 -- a1
---- 961,611 3 0042 -- a2
---- 974,621 3 0043 -- a202
---- 980,692 3 0044 -- a3
---- 719,566 3 0045 -- a4
---- 789,705,14 3 0046 -- a5
---- 790,705,14 3 0047 -- a119
---- 791,705,13 3 0050 -- a118
---- 690,553 3 0051 -- a117
---- 960,568 3 0052 -- a11
-lh 939,559 3 0053 -- a12
---- 549,705,11 3 0054 -- a13
---- 855,632 3 0055 -- a14
---- 911,642 3 0056 -- a15
---- 933,550 3 0057 -- a16
---- 911,642 3 0060 -- a105
---- 945,553 3 0061 -- a17
---- 974,587 3 0062 -- a18
---- 755,705,13 3 0063 -- a19
---- 846,705,14 3 0064 -- a20
---- 762,692 3 0065 -- a21
---- 761,692 3 0066 -- a22
---- 571,661,68 3 0067 -- a23
---- 677,705,13 3 0070 -- a24
---- 763,692 3 0071 -- a25
---- 760,692 3 0072 -- a26
---- 759,692 3 0073 -- a27
---- 754,692 3 0074 -- a28
---- 494,692 3 0075 -- a6
---- 552,692 3 0076 -- a7
---- 537,692 3 0077 -- a8
---- 577,596 3 0100 -- a9
---- 692,705,14 3 0101 -- a10
---- 786,705,14 3 0102 -- a29
---- 788,705,14 3 0103 -- a30
---- 788,705,14 3 0104 -- a31
---- 790,705,14 3 0105 -- a32
---- 793,705,13 3 0106 -- a33
---- 794,705,13 3 0107 -- a34
---- 816,705,14 3 0110 -- a35
---- 823,705,14 3 0111 -- a36
---- 789,705,14 3 0112 -- a37
---- 841,705,14 3 0113 -- a38
---- 823,705,14 3 0114 -- a39
---- 833,705,14 3 0115 -- a40
---- 816,705,13 3 0116 -- a41
---- 831,705,14 3 0117 -- a42
---- 923,705,14 3 0120 -- a43
---- 744,692 3 0121 -- a44
---- 723,692 3 0122 -- a45
---- 749,692 3 0123 -- a46
---- 790,705,14 3 0124 -- a47
---- 792,705,14 3 0125 -- a48
---- 695,706,14 3 0126 -- a49
---- 776,699,6 3 0127 -- a50
---- 768,699,7 3 0130 -- a51
---- 792,705,14 3 0131 -- a52
---- 759,692 3 0132 -- a53
---- 707,704,13 3 0133 -- a54
---- 708,705,14 3 0134 -- a55
---- 682,705,14 3 0135 -- a56
---- 701,705,14 3 0136 -- a57
---- 826,705,14 3 0137 -- a58
---- 815,705,14 3 0140 -- a59
---- 789,705,14 3 0141 -- a60
---- 789,705,14 3 0142 -- a61
---- 707,705,14 3 0143 -- a62
---- 687,692 3 0144 -- a63
---- 696,691 3 0145 -- a64
---- 689,692 3 0146 -- a65
---- 786,705,14 3 0147 -- a66
---- 787,705,14 3 0150 -- a67
---- 713,705,14 3 0151 -- a68
---- 791,705,14 3 0152 -- a69
---- 785,705,14 3 0153 -- a70
---- 791,705,14 3 0154 -- a71
---- 873,705,14 3 0155 -- a72
---- 761,692 3 0156 -- a73
---- 762,692 3 0157 -- a74
---- 762,692 3 0160 -- a203
---- 759,692 3 0161 -- a75
---- 759,692 3 0162 -- a204
---- 892,705 3 0163 -- a76
---- 892,692,14 3 0164 -- a77
---- 788,705,14 3 0165 -- a78
---- 784,705,14 3 0166 -- a79
---- 438,705,14 3 0167 -- a81
---- 138,692 3 0170 -- a82
---- 277,692 3 0171 -- a83
---- 415,692 3 0172 -- a84
---- 392,705 3 0173 -- a97
---- 392,705 3 0174 -- a98
---- 668,705 3 0175 -- a99
---- 668,705 3 0176 -- a100
---- 732,806,143 3 0241 -- a101
---- 544,706,14 3 0242 -- a102
---- 544,705,14 3 0243 -- a103
---- 910,651 3 0244 -- a104
---- 667,705,14 3 0245 -- a106
---- 760,705,14 3 0246 -- a107
---- 760,569 3 0247 -- a108
---- 776,705 3 0250 -- a112
---- 595,705,14 3 0251 -- a111
---- 694,705,14 3 0252 -- a110
---- 626,705 3 0253 -- a109
---- 788,705,14 3 0254 -- a120
---- 788,705,14 3 0255 -- a121
---- 788,705,14 3 0256 -- a122
---- 788,705,14 3 0257 -- a123
---- 788,705,14 3 0260 -- a124
---- 788,705,14 3 0261 -- a125
---- 788,705,14 3 0262 -- a126
---- 788,705,14 3 0263 -- a127
---- 788,705,14 3 0264 -- a128
---- 788,705,14 3 0265 -- a129
---- 788,705,14 3 0266 -- a130
---- 788,705,14 3 0267 -- a131
---- 788,705,14 3 0270 -- a132
---- 788,705,14 3 0271 -- a133
---- 788,705,14 3 0272 -- a134
---- 788,705,14 3 0273 -- a135
---- 788,705,14 3 0274 -- a136
---- 788,705,14 3 0275 -- a137
---- 788,705,14 3 0276 -- a138
---- 788,705,14 3 0277 -- a139
---- 788,705,14 3 0300 -- a140
---- 788,705,14 3 0301 -- a141
---- 788,705,14 3 0302 -- a142
---- 788,705,14 3 0303 -- a143
---- 788,705,14 3 0304 -- a144
---- 788,705,14 3 0305 -- a145
---- 788,705,14 3 0306 -- a146
---- 788,705,14 3 0307 -- a147
---- 788,705,14 3 0310 -- a148
---- 788,705,14 3 0311 -- a149
---- 788,705,14 3 0312 -- a150
---- 788,705,14 3 0313 -- a151
---- 788,705,14 3 0314 -- a152
---- 788,705,14 3 0315 -- a153
---- 788,705,14 3 0316 -- a154
---- 788,705,14 3 0317 -- a155
---- 788,705,14 3 0320 -- a156
---- 788,705,14 3 0321 -- a157
---- 788,705,14 3 0322 -- a158
---- 788,705,14 3 0323 -- a159
---- 894,634 3 0324 -- a160
---- 838,540 3 0325 -- a161
---- 1016,540 3 0326 -- a163
---- 458,820,127 3 0327 -- a164
---- 748,597 3 0330 -- a196
---- 924,552 3 0331 -- a165
---- 748,597 3 0332 -- a192
---- 918,526 3 0333 -- a166
---- 927,660 3 0334 -- a167
---- 928,562 3 0335 -- a168
---- 928,563 3 0336 -- a169
---- 834,537 3 0337 -- a170
---- 873,599 3 0340 -- a171
---- 828,588 3 0341 -- a172
---- 924,594 3 0342 -- a173
---- 924,594 3 0343 -- a162
---- 917,692 3 0344 -- a174
---- 930,608 3 0345 -- a175
---- 931,608 3 0346 -- a176
---- 463,791,99 3 0347 -- a177
---- 883,623 3 0350 -- a178
---- 836,648 3 0351 -- a179
---- 836,648 3 0352 -- a193
---- 867,591 3 0353 -- a180
---- 867,591 3 0354 -- a199
---- 696,648 3 0355 -- a181
---- 696,648 3 0356 -- a200
---- 874,619 3 0357 -- a182
---- 874,615 3 0361 -- a201
---- 760,692 3 0362 -- a183
---- 946,533 3 0363 -- a184
---- 771,655 3 0364 -- a197
---- 865,481 3 0365 -- a185
---- 771,655 3 0366 -- a194
---- 888,712,19 3 0367 -- a198
---- 967,568 3 0370 -- a186
---- 888,712,19 3 0371 -- a195
---- 831,579 3 0372 -- a187
---- 873,578 3 0373 -- a188
---- 927,542 3 0374 -- a189
---- 970,616 3 0375 -- a190
---- 918,593 3 0376 -- a191
diff --git a/contrib/groff/font/devps/download b/contrib/groff/font/devps/download
deleted file mode 100644
index b98885cdbbab..000000000000
--- a/contrib/groff/font/devps/download
+++ /dev/null
@@ -1,5 +0,0 @@
-# List of downloadable fonts
-# PostScript-name Filename
-
-Symbol-Slanted symbolsl.pfa
-ZapfDingbats-Reverse zapfdr.pfa
diff --git a/contrib/groff/font/devps/generate/Makefile b/contrib/groff/font/devps/generate/Makefile
deleted file mode 100644
index 897385f2d530..000000000000
--- a/contrib/groff/font/devps/generate/Makefile
+++ /dev/null
@@ -1,227 +0,0 @@
-# Copyright (C) 1989-2000 Free Software Foundation, Inc.
-# Written by James Clark (jjc@jclark.com)
-#
-# This file is part of groff.
-#
-# groff is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2, or (at your option) any later
-# version.
-#
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with groff; see the file COPYING. If not, write to the Free Software
-# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# This is set up so you can do
-# make -f generate/Makefile
-# in the parent directory of this directory.
-
-# The following line is required for DOS/Windows systems, since
-# this Makefile needs a Unixy shell to run.
-SHELL = /bin/sh
-
-# Directory containing AFM files. Must not be current directory.
-# Either long names (eg Times-Roman.afm) or short names (eg timesr.afm)
-# may be used. See the afmname script.
-afmdir=/usr/local/lib/afm
-srcdir=generate
-
-SPECIALFONTS=S
-DINGBATSFONTS=ZD ZDR
-GREEKFONTS=SS
-TEXTFONTS=AB ABI AI AR BMB BMBI BMI BMR CB CBI CI CR HB HBI HI HR HNB HNBI \
- HNI HNR NB NBI NI NR PB PBI PI PR TB TBI TI TR ZCMI
-
-FONTS=$(TEXTFONTS) $(SPECIALFONTS) $(GREEKFONTS) $(DINGBATSFONTS)
-
-DESC=$(srcdir)/../DESC
-AFMTODIT=afmtodit -d$(DESC)
-IFLAG=-i 50
-NOLIGFLAG=-n
-TEXTENC=$(srcdir)/../text.enc
-EFLAG=-e $(TEXTENC)
-TEXTMAP=$(srcdir)/textmap
-AFMNAME=$(srcdir)/afmname
-
-all: $(FONTS)
-
-TR:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Times-Roman.afm` $(TEXTMAP) $@
-
-TB:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Times-Bold.afm` $(TEXTMAP) $@
-
-TI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) -a 7 \
- `$(AFMNAME) $(afmdir)/Times-Italic.afm` $(TEXTMAP) $@
-
-TBI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Times-BoldItalic.afm` $(TEXTMAP) $@
-
-HR:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Helvetica.afm` $(TEXTMAP) $@
-
-HB:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Helvetica-Bold.afm` $(TEXTMAP) $@
-
-HI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Helvetica-Oblique.afm` $(TEXTMAP) $@
-
-HBI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Helvetica-BoldOblique.afm` $(TEXTMAP) $@
-
-CR:
- $(AFMTODIT) $(NOLIGFLAG) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Courier.afm` $(TEXTMAP) $@
-
-CB:
- $(AFMTODIT) $(NOLIGFLAG) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Courier-Bold.afm` $(TEXTMAP) $@
-
-CI:
- $(AFMTODIT) $(NOLIGFLAG) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Courier-Oblique.afm` $(TEXTMAP) $@
-
-CBI:
- $(AFMTODIT) $(NOLIGFLAG) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Courier-BoldOblique.afm` $(TEXTMAP) $@
-
-PR:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Palatino-Roman.afm` $(TEXTMAP) $@
-
-PB:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Palatino-Bold.afm` $(TEXTMAP) $@
-
-PI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Palatino-Italic.afm` $(TEXTMAP) $@
-
-PBI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Palatino-BoldItalic.afm` $(TEXTMAP) $@
-
-NR:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/NewCenturySchlbk-Roman.afm` $(TEXTMAP) $@
-
-NB:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/NewCenturySchlbk-Bold.afm` $(TEXTMAP) $@
-
-NI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/NewCenturySchlbk-Italic.afm` $(TEXTMAP) $@
-
-NBI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/NewCenturySchlbk-BoldItalic.afm` $(TEXTMAP) $@
-
-BMR:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Bookman-Light.afm` $(TEXTMAP) $@
-
-BMB:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Bookman-Demi.afm` $(TEXTMAP) $@
-
-BMI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Bookman-LightItalic.afm` $(TEXTMAP) $@
-
-BMBI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Bookman-DemiItalic.afm` $(TEXTMAP) $@
-
-AR:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/AvantGarde-Book.afm` $(TEXTMAP) $@
-
-AB:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/AvantGarde-Demi.afm` $(TEXTMAP) $@
-
-AI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/AvantGarde-BookOblique.afm` $(TEXTMAP) $@
-
-ABI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/AvantGarde-DemiOblique.afm` $(TEXTMAP) $@
-
-HNR:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Helvetica-Narrow.afm` $(TEXTMAP) $@
-
-HNB:
- $(AFMTODIT) $(EFLAG) \
- `$(AFMNAME) $(afmdir)/Helvetica-Narrow-Bold.afm` $(TEXTMAP) $@
-
-HNI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Helvetica-Narrow-Oblique.afm` $(TEXTMAP) $@
-
-HNBI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/Helvetica-Narrow-BoldOblique.afm` $(TEXTMAP) $@
-
-ZCMI:
- $(AFMTODIT) $(EFLAG) $(IFLAG) \
- `$(AFMNAME) $(afmdir)/ZapfChancery-MediumItalic.afm` $(TEXTMAP) $@
-
-ZD:
- $(AFMTODIT) -s \
- `$(AFMNAME) $(afmdir)/ZapfDingbats.afm` $(srcdir)/dingbats.map $@
-
-SS: $(srcdir)/symbolsl.afm
- $(AFMTODIT) -s $(IFLAG) $(srcdir)/symbolsl.afm $(srcdir)/lgreekmap $@
-
-S: symbol.afm
- $(AFMTODIT) -s symbol.afm symbolmap $@
-
-ZDR: zapfdr.afm
- $(AFMTODIT) -s zapfdr.afm $(srcdir)/dingbats.rmap $@
-
-symbol.afm: $(srcdir)/symbol.sed
- -rm -f $@
- sed -f $(srcdir)/symbol.sed `$(AFMNAME) $(afmdir)/Symbol.afm` >$@
-
-zapfdr.afm:
- -rm -f $@
- sed -e '/^FontName /s/ZapfDingbats/ZapfDingbats-Reverse/' \
- `$(AFMNAME) $(afmdir)/ZapfDingbats.afm` >$@
-
-ZD: $(srcdir)/dingbats.map
-ZDR: $(srcdir)/dingbats.rmap
-$(TEXTFONTS): $(TEXTMAP) $(TEXTENC)
-$(SPECIALFONTS): symbolmap
-$(GREEKFONTS): $(srcdir)/lgreekmap
-$(FONTS): $(DESC)
-
-symbolmap: $(TEXTMAP) $(srcdir)/symbolchars
- cat $(TEXTMAP) $(srcdir)/symbolchars >$@
-
-clean:
- -rm -f symbolmap symbol.afm zapfdr.afm
-
-realclean: clean
- -rm -f $(FONTS)
-
-extraclean: realclean
- -rm -f core *~ "#*"
-
-.PHONY: all clean realclean extraclean
-
diff --git a/contrib/groff/font/devps/generate/afmname b/contrib/groff/font/devps/generate/afmname
deleted file mode 100755
index 3e837df222c1..000000000000
--- a/contrib/groff/font/devps/generate/afmname
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-# Fix the path name of an AFM file.
-if test -f "$1"
-then
- echo "$1"
-else
- echo `dirname $1`/`basename $1 .afm | awk '
-/^AvantGarde-Book$/ { print "avangbk" }
-/^AvantGarde-BookOblique$/ { print "avangbko" }
-/^AvantGarde-Demi$/ { print "avangd" }
-/^AvantGarde-DemiOblique$/ { print "avangdo" }
-/^Bookman-Demi$/ { print "bookmd" }
-/^Bookman-DemiItalic$/ { print "bookmdi" }
-/^Bookman-Light$/ { print "bookml" }
-/^Bookman-LightItalic$/ { print "bookmli" }
-/^Courier$/ { print "couri" }
-/^Courier-Bold$/ { print "courib" }
-/^Courier-BoldOblique$/ { print "couribo" }
-/^Courier-Oblique$/ { print "courio" }
-/^Helvetica$/ { print "helve" }
-/^Helvetica-Bold$/ { print "helveb" }
-/^Helvetica-BoldOblique$/ { print "helvebo" }
-/^Helvetica-Narrow$/ { print "helven" }
-/^Helvetica-Narrow-Bold$/ { print "helvenb" }
-/^Helvetica-Narrow-BoldOblique$/ { print "helvenbo" }
-/^Helvetica-Narrow-Oblique$/ { print "helveno" }
-/^Helvetica-Oblique$/ { print "helveo" }
-/^NewCenturySchlbk-Bold$/ { print "newcsb" }
-/^NewCenturySchlbk-BoldItalic$/ { print "newcsbi" }
-/^NewCenturySchlbk-Italic$/ { print "newcsi" }
-/^NewCenturySchlbk-Roman$/ { print "newcsr" }
-/^Palatino-Bold$/ { print "palatb" }
-/^Palatino-BoldItalic$/ { print "palatbi" }
-/^Palatino-Italic$/ { print "palati" }
-/^Palatino-Roman$/ { print "palatr" }
-/^Symbol$/ { print "symbol" }
-/^Times-Bold$/ { print "timesb" }
-/^Times-BoldItalic$/ { print "timesbi" }
-/^Times-Italic$/ { print "timesi" }
-/^Times-Roman$/ { print "timesr" }
-/^ZapfChancery-MediumItalic$/ { print "zapfcmi" }
-/^ZapfDingbats$/ { print "zapfd" }
-' `.afm
-fi
diff --git a/contrib/groff/font/devps/generate/dingbats.map b/contrib/groff/font/devps/generate/dingbats.map
deleted file mode 100644
index 3a97fa99b05c..000000000000
--- a/contrib/groff/font/devps/generate/dingbats.map
+++ /dev/null
@@ -1,2 +0,0 @@
-a19 OK
-a12 rh
diff --git a/contrib/groff/font/devps/generate/dingbats.rmap b/contrib/groff/font/devps/generate/dingbats.rmap
deleted file mode 100644
index ccc14cb2dfa0..000000000000
--- a/contrib/groff/font/devps/generate/dingbats.rmap
+++ /dev/null
@@ -1 +0,0 @@
-a12 lh
diff --git a/contrib/groff/font/devps/generate/lgreekmap b/contrib/groff/font/devps/generate/lgreekmap
deleted file mode 100644
index 0b0c19780854..000000000000
--- a/contrib/groff/font/devps/generate/lgreekmap
+++ /dev/null
@@ -1,28 +0,0 @@
-alpha *a
-beta *b
-chi *x
-delta *d
-epsilon *e
-eta *y
-gamma *g
-iota *i
-kappa *k
-lambda *l
-mu *m
-nu *n
-omega *w
-omega1 +p
-omicron *o
-phi *f
-phi1 +f
-pi *p
-psi *q
-rho *r
-sigma *s
-tau *t
-theta *h
-theta1 +h
-upsilon *u
-xi *c
-zeta *z
-sigma1 ts
diff --git a/contrib/groff/font/devps/generate/symbol.sed b/contrib/groff/font/devps/generate/symbol.sed
deleted file mode 100644
index b4b02aba6a55..000000000000
--- a/contrib/groff/font/devps/generate/symbol.sed
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sed -f
-# Tweak the AFM file for the Symbol font.
-/^C .*[ ;]N bracketlefttp[ ;]/bx
-/^C .*[ ;]N bracketleftex[ ;]/bx
-/^C .*[ ;]N bracketleftbt[ ;]/bx
-/^C .*[ ;]N bracketrighttp[ ;]/bx
-/^C .*[ ;]N bracketrightex[ ;]/bx
-/^C .*[ ;]N bracketrightbt[ ;]/bx
-/^C .*[ ;]N bracelefttp[ ;]/bx
-/^C .*[ ;]N braceleftmid[ ;]/bx
-/^C .*[ ;]N braceleftbt[ ;]/bx
-/^C .*[ ;]N bracerighttp[ ;]/bx
-/^C .*[ ;]N bracerightmid[ ;]/bx
-/^C .*[ ;]N bracerightbt[ ;]/bx
-/^C .*[ ;]N braceex[ ;]/bx
-/^C .*[ ;]N parenleftex[ ;]/by
-/^C .*[ ;]N parenrightex[ ;]/by
-/^C .*[ ;]N parenleftbt[ ;]/bz
-/^C .*[ ;]N parenrightbt[ ;]/bz
-/^EndCharMetrics/a\
-italicCorrection integral 67\
-leftItalicCorrection integral 52\
-subscriptCorrection integral -10
-b
-:x
-s/B \([-0-9][0-9]*\) [-0-9][0-9]* \([-0-9][0-9]*\) [-0-9][0-9]*/B \1 -75 \2 925/
-b
-:y
-s/B \([-0-9][0-9]*\) [-0-9][0-9]* \([-0-9][0-9]*\) [-0-9][0-9]*/B \1 -80 \2 920/
-b
-:z
-s/B \([-0-9][0-9]*\) \([-0-9][0-9]*\) \([-0-9][0-9]*\) [-0-9][0-9]*/B \1 \2 \3 920/
-b
diff --git a/contrib/groff/font/devps/generate/symbolchars b/contrib/groff/font/devps/generate/symbolchars
deleted file mode 100644
index 41ec3e466353..000000000000
--- a/contrib/groff/font/devps/generate/symbolchars
+++ /dev/null
@@ -1,60 +0,0 @@
-plus pl
-minus mi
-plusminus +-
-equal eq
-divide di
-multiply mu
-arrowup arrowverttp
-arrowdown arrowvertbt
-Alpha *A
-Beta *B
-Chi *X
-Delta *D
-Epsilon *E
-Eta *Y
-Gamma *G
-Iota *I
-Kappa *K
-Lambda *L
-Mu *M
-Nu *N
-Omega *W
-Omicron *O
-Phi *F
-Pi *P
-Psi *Q
-Rho *R
-Sigma *S
-Tau *T
-Theta *H
-Upsilon1 *U
-Xi *C
-Zeta *Z
-alpha *a
-beta *b
-chi *x
-delta *d
-epsilon *e
-eta *y
-gamma *g
-iota *i
-kappa *k
-lambda *l
-mu *m
-nu *n
-omega *w
-omega1 +p
-omicron *o
-phi *f
-phi1 +f
-pi *p
-psi *q
-rho *r
-sigma *s
-sigma1 ts
-tau *t
-theta *h
-theta1 +h
-upsilon *u
-xi *c
-zeta *z
diff --git a/contrib/groff/font/devps/generate/symbolsl.afm b/contrib/groff/font/devps/generate/symbolsl.afm
deleted file mode 100644
index 90939ada9697..000000000000
--- a/contrib/groff/font/devps/generate/symbolsl.afm
+++ /dev/null
@@ -1,203 +0,0 @@
-StartFontMetrics 2.0
-FontName Symbol-Slanted
-Version 001.001
-FamilyName Symbol
-ItalicAngle -15.5
-IsFixedPitch false
-UnderlineThickness 54
-Weight Medium
-UnderlinePosition -98
-FullName Symbol
-FontBBox -241 -261 1250 899
-StartCharMetrics 189
-C 32 ; WX 223 ; N space ; B 223 0 223 0 ;
-C 33 ; WX 296 ; N exclam ; B 122 -15 383 599 ;
-C 34 ; WX 635 ; N universal ; B 223 0 801 627 ;
-C 35 ; WX 445 ; N numbersign ; B 71 -15 557 599 ;
-C 36 ; WX 489 ; N existential ; B 22 0 622 629 ;
-C 37 ; WX 741 ; N percent ; B 147 -32 766 583 ;
-C 38 ; WX 692 ; N ampersand ; B 68 -16 745 589 ;
-C 39 ; WX 391 ; N suchthat ; B 44 -15 450 444 ;
-C 40 ; WX 296 ; N parenleft ; B 89 -170 449 599 ;
-C 41 ; WX 296 ; N parenright ; B -22 -170 339 600 ;
-C 42 ; WX 445 ; N asteriskmath ; B 126 119 500 490 ;
-C 43 ; WX 489 ; N plus ; B 76 0 562 474 ;
-C 44 ; WX 223 ; N comma ; B 9 -136 183 93 ;
-C 45 ; WX 489 ; N minus ; B 74 207 556 256 ;
-C 46 ; WX 223 ; N period ; B 70 -15 174 85 ;
-C 47 ; WX 247 ; N slash ; B -5 -15 405 575 ;
-C 48 ; WX 445 ; N zero ; B 90 -15 537 610 ;
-C 49 ; WX 445 ; N one ; B 107 0 451 599 ;
-C 50 ; WX 445 ; N two ; B 22 0 524 611 ;
-C 51 ; WX 445 ; N three ; B 56 -16 510 611 ;
-C 52 ; WX 445 ; N four ; B 58 0 530 610 ;
-C 53 ; WX 445 ; N five ; B 36 -15 583 610 ;
-C 54 ; WX 445 ; N six ; B 87 -16 588 610 ;
-C 55 ; WX 445 ; N seven ; B 151 -15 585 599 ;
-C 56 ; WX 445 ; N eight ; B 82 -16 536 611 ;
-C 57 ; WX 445 ; N nine ; B 52 -15 535 609 ;
-C 58 ; WX 247 ; N colon ; B 81 -15 286 409 ;
-C 59 ; WX 247 ; N semicolon ; B 33 -136 296 409 ;
-C 60 ; WX 489 ; N less ; B 87 0 610 464 ;
-C 61 ; WX 489 ; N equal ; B 49 126 586 347 ;
-C 62 ; WX 489 ; N greater ; B 23 0 547 464 ;
-C 63 ; WX 395 ; N question ; B 163 -15 517 610 ;
-C 64 ; WX 489 ; N congruent ; B 10 0 597 423 ;
-C 65 ; WX 643 ; N Alpha ; B 3 0 614 599 ;
-C 66 ; WX 594 ; N Beta ; B 26 0 645 598 ;
-C 67 ; WX 643 ; N Chi ; B -8 0 798 599 ;
-C 68 ; WX 545 ; N Delta ; B 5 0 541 612 ;
-C 69 ; WX 544 ; N Epsilon ; B 28 0 688 599 ;
-C 70 ; WX 679 ; N Phi ; B 105 0 761 598 ;
-C 71 ; WX 537 ; N Gamma ; B 31 0 714 599 ;
-C 72 ; WX 643 ; N Eta ; B 35 0 836 599 ;
-C 73 ; WX 296 ; N Iota ; B 28 0 468 599 ;
-C 74 ; WX 562 ; N theta1 ; B 108 -15 645 614 ;
-C 75 ; WX 643 ; N Kappa ; B 31 0 778 598 ;
-C 76 ; WX 611 ; N Lambda ; B 5 0 610 612 ;
-C 77 ; WX 791 ; N Mu ; B 28 0 974 599 ;
-C 78 ; WX 643 ; N Nu ; B 26 -7 827 599 ;
-C 79 ; WX 643 ; N Omicron ; B 112 -15 747 610 ;
-C 80 ; WX 684 ; N Pi ; B 22 0 847 599 ;
-C 81 ; WX 659 ; N Theta ; B 112 -15 747 610 ;
-C 82 ; WX 495 ; N Rho ; B 25 0 645 599 ;
-C 83 ; WX 527 ; N Sigma ; B 5 0 663 599 ;
-C 84 ; WX 544 ; N Tau ; B 159 0 723 599 ;
-C 85 ; WX 614 ; N Upsilon ; B 175 0 804 599 ;
-C 86 ; WX 391 ; N sigma1 ; B 78 -208 492 445 ;
-C 87 ; WX 684 ; N Omega ; B 30 0 760 612 ;
-C 88 ; WX 574 ; N Xi ; B 36 0 700 598 ;
-C 89 ; WX 708 ; N Psi ; B 188 0 885 608 ;
-C 90 ; WX 544 ; N Zeta ; B 39 0 725 599 ;
-C 91 ; WX 296 ; N bracketleft ; B 34 -138 453 599 ;
-C 92 ; WX 768 ; N therefore ; B 160 0 645 426 ;
-C 93 ; WX 296 ; N bracketright ; B -14 -138 405 599 ;
-C 94 ; WX 586 ; N perpendicular ; B 13 0 596 600 ;
-C 95 ; WX 445 ; N underscore ; B -72 -224 390 -183 ;
-C 96 ; WX 445 ; N radicalex ; B 672 784 1224 816 ;
-C 97 ; WX 562 ; N alpha ; B 84 -15 658 445 ;
-C 98 ; WX 489 ; N beta ; B -7 -198 578 659 ;
-C 99 ; WX 489 ; N chi ; B -48 -206 573 445 ;
-C 100 ; WX 440 ; N delta ; B 83 -16 571 658 ;
-C 101 ; WX 391 ; N epsilon ; B 49 -17 468 447 ;
-C 102 ; WX 464 ; N phi ; B 78 -200 517 596 ;
-C 103 ; WX 366 ; N gamma ; B 92 -200 568 444 ;
-C 104 ; WX 537 ; N eta ; B 100 -180 555 457 ;
-C 105 ; WX 293 ; N iota ; B 97 -16 296 448 ;
-C 106 ; WX 537 ; N phi1 ; B 92 -199 604 444 ;
-C 107 ; WX 489 ; N kappa ; B 106 0 621 447 ;
-C 108 ; WX 489 ; N lambda ; B 21 -16 530 658 ;
-C 109 ; WX 513 ; N mu ; B -18 -198 533 445 ;
-C 110 ; WX 464 ; N nu ; B 119 -15 548 451 ;
-C 111 ; WX 489 ; N omicron ; B 86 -17 526 444 ;
-C 112 ; WX 489 ; N pi ; B 58 -18 599 433 ;
-C 113 ; WX 464 ; N theta ; B 103 -16 554 614 ;
-C 114 ; WX 489 ; N rho ; B -19 -205 521 444 ;
-C 115 ; WX 537 ; N sigma ; B 87 -19 662 445 ;
-C 116 ; WX 391 ; N tau ; B 95 -16 511 445 ;
-C 117 ; WX 513 ; N upsilon ; B 105 -15 558 451 ;
-C 118 ; WX 635 ; N omega1 ; B 78 -15 758 519 ;
-C 119 ; WX 611 ; N omega ; B 85 -16 687 445 ;
-C 120 ; WX 439 ; N xi ; B 70 -200 515 681 ;
-C 121 ; WX 611 ; N psi ; B 141 -203 759 445 ;
-C 122 ; WX 440 ; N zeta ; B 100 -200 580 673 ;
-C 123 ; WX 427 ; N braceleft ; B 116 -163 540 599 ;
-C 124 ; WX 178 ; N bar ; B 9 -158 307 599 ;
-C 125 ; WX 427 ; N braceright ; B 19 -163 444 599 ;
-C 126 ; WX 489 ; N similar ; B 78 181 549 273 ;
-C 161 ; WX 552 ; N Upsilon1 ; B 134 0 710 609 ;
-C 162 ; WX 220 ; N minute ; B 156 408 393 654 ;
-C 163 ; WX 489 ; N lessequal ; B 26 0 645 569 ;
-C 164 ; WX 149 ; N fraction ; B -164 -11 490 603 ;
-C 165 ; WX 635 ; N infinity ; B 91 111 692 360 ;
-C 166 ; WX 445 ; N florin ; B -36 -172 614 612 ;
-C 167 ; WX 670 ; N club ; B 119 -23 645 474 ;
-C 168 ; WX 670 ; N diamond ; B 198 -32 605 490 ;
-C 169 ; WX 670 ; N heart ; B 205 -29 679 473 ;
-C 170 ; WX 670 ; N spade ; B 132 -32 604 488 ;
-C 171 ; WX 927 ; N arrowboth ; B 90 -13 980 455 ;
-C 172 ; WX 878 ; N arrowleft ; B 97 -13 915 455 ;
-C 173 ; WX 537 ; N arrowup ; B 223 0 691 810 ;
-C 174 ; WX 878 ; N arrowright ; B 105 -13 922 455 ;
-C 175 ; WX 537 ; N arrowdown ; B 104 -20 572 790 ;
-C 176 ; WX 356 ; N degree ; B 187 343 466 609 ;
-C 177 ; WX 489 ; N plusminus ; B 9 0 593 574 ;
-C 178 ; WX 366 ; N second ; B 150 408 560 656 ;
-C 179 ; WX 489 ; N greaterequal ; B 26 0 582 569 ;
-C 180 ; WX 489 ; N multiply ; B 28 7 609 466 ;
-C 181 ; WX 635 ; N proportional ; B 90 110 667 360 ;
-C 182 ; WX 440 ; N partialdiff ; B 62 -18 542 664 ;
-C 183 ; WX 409 ; N bullet ; B 118 101 454 421 ;
-C 184 ; WX 489 ; N divide ; B 74 63 558 406 ;
-C 185 ; WX 489 ; N notequal ; B 51 -22 587 489 ;
-C 186 ; WX 489 ; N equivalence ; B 35 73 602 394 ;
-C 187 ; WX 489 ; N approxequal ; B 57 120 572 351 ;
-C 188 ; WX 890 ; N ellipsis ; B 107 -15 804 85 ;
-C 189 ; WX 537 ; N arrowvertex ; B 216 -107 579 899 ;
-C 190 ; WX 890 ; N arrowhorizex ; B 8 196 1011 246 ;
-C 191 ; WX 586 ; N carriagereturn ; B 40 -14 710 560 ;
-C 192 ; WX 732 ; N aleph ; B 159 -16 740 586 ;
-C 193 ; WX 611 ; N Ifraktur ; B 26 -47 684 659 ;
-C 194 ; WX 708 ; N Rfraktur ; B 71 -13 833 653 ;
-C 195 ; WX 878 ; N weierstrass ; B 112 -188 878 510 ;
-C 196 ; WX 684 ; N circlemultiply ; B 114 -15 758 599 ;
-C 197 ; WX 684 ; N circleplus ; B 115 -13 759 601 ;
-C 198 ; WX 732 ; N emptyset ; B 38 -21 884 640 ;
-C 199 ; WX 684 ; N intersection ; B 36 0 714 453 ;
-C 200 ; WX 684 ; N union ; B 110 -15 788 438 ;
-C 201 ; WX 635 ; N propersuperset ; B 18 0 675 418 ;
-C 202 ; WX 635 ; N reflexsuperset ; B -17 -111 674 418 ;
-C 203 ; WX 635 ; N notsubset ; B 87 -62 744 481 ;
-C 204 ; WX 635 ; N propersubset ; B 87 0 744 418 ;
-C 205 ; WX 635 ; N reflexsubset ; B 16 -111 744 418 ;
-C 206 ; WX 635 ; N element ; B 93 0 579 417 ;
-C 207 ; WX 635 ; N notelement ; B 74 -52 579 494 ;
-C 208 ; WX 684 ; N angle ; B 23 0 833 599 ;
-C 209 ; WX 635 ; N gradient ; B 231 -17 805 639 ;
-C 210 ; WX 703 ; N registerserif ; B 120 -18 763 596 ;
-C 211 ; WX 703 ; N copyrightserif ; B 122 -13 766 601 ;
-C 212 ; WX 792 ; N trademarkserif ; B 169 261 947 599 ;
-C 213 ; WX 732 ; N product ; B -6 -90 920 668 ;
-C 214 ; WX 489 ; N radical ; B 134 -34 711 816 ;
-C 215 ; WX 223 ; N dotmath ; B 131 187 225 276 ;
-C 216 ; WX 635 ; N logicalnot ; B 78 0 685 256 ;
-C 217 ; WX 537 ; N logicaland ; B 21 0 519 404 ;
-C 218 ; WX 537 ; N logicalor ; B 151 0 639 424 ;
-C 219 ; WX 927 ; N arrowdblboth ; B 92 -18 978 454 ;
-C 220 ; WX 878 ; N arrowdblleft ; B 96 -13 942 457 ;
-C 221 ; WX 537 ; N arrowdblup ; B 152 2 688 811 ;
-C 222 ; WX 878 ; N arrowdblright ; B 71 -18 917 452 ;
-C 223 ; WX 537 ; N arrowdbldown ; B 103 -17 639 792 ;
-C 224 ; WX 440 ; N lozenge ; B 121 0 519 663 ;
-C 225 ; WX 293 ; N angleleft ; B 98 -176 472 664 ;
-C 226 ; WX 703 ; N registersans ; B 120 -18 763 596 ;
-C 227 ; WX 703 ; N copyrightsans ; B 120 -13 764 601 ;
-C 228 ; WX 700 ; N trademarksans ; B 179 261 832 599 ;
-C 229 ; WX 635 ; N summation ; B -15 -96 756 669 ;
-C 230 ; WX 342 ; N parenlefttp ; B -46 -261 642 824 ;
-C 231 ; WX 342 ; N parenleftex ; B 12 -76 338 823 ;
-C 232 ; WX 342 ; N parenleftbt ; B 113 -261 339 824 ;
-C 233 ; WX 342 ; N bracketlefttp ; B -22 -71 560 824 ;
-C 234 ; WX 342 ; N bracketleftex ; B -22 -70 305 823 ;
-C 235 ; WX 342 ; N bracketleftbt ; B -22 -71 306 824 ;
-C 236 ; WX 440 ; N bracelefttp ; B 158 -67 648 824 ;
-C 237 ; WX 440 ; N braceleftmid ; B 126 -76 486 832 ;
-C 238 ; WX 440 ; N braceleftbt ; B 219 -62 484 824 ;
-C 239 ; WX 440 ; N braceex ; B 157 -71 486 832 ;
-C 241 ; WX 293 ; N angleright ; B -29 -176 345 664 ;
-C 242 ; WX 244 ; N integral ; B -13 -95 499 815 ;
-C 243 ; WX 611 ; N integraltp ; B 272 -74 873 820 ;
-C 244 ; WX 611 ; N integralex ; B 271 -78 640 868 ;
-C 245 ; WX 611 ; N integralbt ; B 30 -72 625 820 ;
-C 246 ; WX 342 ; N parenrighttp ; B 273 -261 498 824 ;
-C 247 ; WX 342 ; N parenrightex ; B 331 -76 657 823 ;
-C 248 ; WX 342 ; N parenrightbt ; B -30 -261 657 824 ;
-C 249 ; WX 342 ; N bracketrighttp ; B 249 -71 577 824 ;
-C 250 ; WX 342 ; N bracketrightex ; B 250 -70 577 823 ;
-C 251 ; WX 342 ; N bracketrightbt ; B -4 -71 577 824 ;
-C 252 ; WX 440 ; N bracerighttp ; B 158 -67 425 824 ;
-C 253 ; WX 440 ; N bracerightmid ; B 155 -76 517 832 ;
-C 254 ; WX 440 ; N bracerightbt ; B -4 -62 484 824 ;
-C -1 ; WX 703 ; N apple ; B 136 -2 784 719 ;
-EndCharMetrics
-EndFontMetrics
diff --git a/contrib/groff/font/devps/generate/textmap b/contrib/groff/font/devps/generate/textmap
deleted file mode 100644
index 5b5e0ea85c83..000000000000
--- a/contrib/groff/font/devps/generate/textmap
+++ /dev/null
@@ -1,453 +0,0 @@
-a a
-b b
-c c
-d d
-e e
-f f
-g g
-h h
-i i
-j j
-k k
-l l
-m m
-n n
-o o
-p p
-q q
-r r
-s s
-t t
-u u
-v v
-w w
-x x
-y y
-z z
-A A
-B B
-C C
-D D
-E E
-F F
-G G
-H H
-I I
-J J
-K K
-L L
-M M
-N N
-O O
-P P
-Q Q
-R R
-S S
-T T
-U U
-V V
-W W
-X X
-Y Y
-Z Z
-AE AE
-Aacute 'A
-Acircumflex ^A
-Adieresis :A
-Agrave `A
-Aring oA
-Atilde ~A
-Cacute 'C
-Ccedilla ,C
-Eacute 'E
-Ecircumflex ^E
-Edieresis :E
-Egrave `E
-Eth -D
-IJ IJ
-Iacute 'I
-Icircumflex ^I
-Idieresis :I
-Ifraktur Im
-Igrave `I
-Lslash /L
-Ntilde ~N
-OE OE
-Oacute 'O
-Ocircumflex ^O
-Odieresis :O
-Ograve `O
-Oslash /O
-Otilde ~O
-Rfraktur Re
-Scaron vS
-Thorn TP
-Uacute 'U
-Ucircumflex ^U
-Udieresis :U
-Ugrave `U
-Yacute 'Y
-Ydieresis :Y
-Zcaron vZ
-aacute 'a
-acircumflex ^a
-acute aa
-adieresis :a
-ae ae
-agrave `a
-angle /_
-angleleft la
-angleright ra
-aleph Ah
-ampersand &
-approxequal ~~
-aring oa
-arrowboth <>
-arrowdblboth hA
-arrowdbldown dA
-arrowdblleft lA
-arrowdblright rA
-arrowdblup uA
-arrowdown da
-arrowleft <-
-arrowright ->
-arrowup ua
-asciicircum ha
-asciitilde ti
-asterisk *
-asteriskmath **
-at @
-at at
-atilde ~a
-backslash \
-backslash rs
-bar ba
-bar |
-bell bs
-braceleft lC
-braceleft {
-braceright rC
-braceright }
-bracketleft [
-bracketleft lB
-bracketright ]
-bracketright rB
-breve ab
-brokenbar bb
-bullet bu
-cacute 'c
-caron ah
-ccedilla ,c
-cedilla ac
-cent ct
-checkmark OK
-circle ci
-circlemultiply c*
-circleplus c+
-circumflex a^
-circumflex ^
-colon :
-comma ,
-congruent =~
-copyright co
-currency Cs
-dagger dg
-daggerdbl dd
-degree de
-dieresis ad
-dollar $
-dollar Do
-dotaccent a.
-dotlessi .i
-dotlessj .j
-dotmath md
-eacute 'e
-ecircumflex ^e
-edieresis :e
-egrave `e
-eight 8
-element mo
-emdash em
-emptyset es
-endash en
-equal =
-equalmath eq
-equivalence ==
-eth Sd
-exclam !
-exclamdown r!
-existential te
-ff ff
-ffi Fi
-ffl Fl
-fi fi
-five 5
-fl fl
-florin Fn
-four 4
-germandbls ss
-gradient gr
-grave ga
-greater >
-greaterequal >=
-guillemotleft Fo
-guillemotright Fc
-guilsinglleft fo
-guilsinglright fc
-handleft lh
-handright rh
-hbar -h
-hungarumlaut a"
-hyphen -
-hyphen hy
-iacute 'i
-icircumflex ^i
-idieresis :i
-igrave `i
-ij ij
-infinity if
-integral is
-intersection ca
-less <
-lessequal <=
-logicaland AN
-logicalnot no
-logicalor OR
-lozenge lz
-lslash /l
-macron a-
-minus \-
-minusplus -+
-minute fm
-nine 9
-notelement nm
-notequal !=
-notequivalence ne
-notpropersuperset nc
-notsubset nb
-ntilde ~n
-numbersign #
-numbersign sh
-oacute 'o
-ocircumflex ^o
-odieresis :o
-oe oe
-ogonek ho
-ograve `o
-one 1
-onehalf 12
-onequarter 14
-onesuperior S1
-ordfeminine Of
-ordmasculine Om
-oslash /o
-otilde ~o
-paragraph ps
-parenleft (
-parenright )
-partialdiff pd
-percent %
-period .
-periodcentered pc
-perthousand %0
-perpendicular pp
-plus +
-plusmath pl
-propersubset sb
-propersuperset sp
-proportional pt
-question ?
-questiondown r?
-quotedbl "
-quotedbl dq
-quotedblbase Bq
-quotedblleft lq
-quotedblright rq
-quoteleft `
-quoteleft oq
-quoteright '
-quoteright cq
-quotesingle aq
-quotesinglbase bq
-reflexsubset ib
-reflexsuperset ip
-registered rg
-ring ao
-scaron vs
-second sd
-section sc
-semicolon ;
-seven 7
-similar ap
-similarequal ~=
-six 6
-slash /
-slash sl
-square sq
-sterling Po
-therefore 3d
-therefore tf
-thorn Tp
-three 3
-threequarters 34
-threesuperior S3
-tilde a~
-tilde ~
-trademark tm
-two 2
-twosuperior S2
-uacute 'u
-ucircumflex ^u
-udieresis :u
-ugrave `u
-underscore _
-union cu
-universal fa
-weierstrass wp
-yacute 'y
-ydieresis :y
-yen Ye
-zcaron vz
-zero 0
-exclamdown char161
-cent char162
-sterling char163
-currency char164
-yen char165
-brokenbar char166
-section char167
-dieresis char168
-copyright char169
-ordfeminine char170
-guillemotleft char171
-logicalnot char172
-hyphen char173
-registered char174
-macron char175
-degree char176
-plusminus char177
-twosuperior char178
-threesuperior char179
-acute char180
-mu char181
-paragraph char182
-periodcentered char183
-cedilla char184
-onesuperior char185
-ordmasculine char186
-guillemotright char187
-onequarter char188
-onehalf char189
-threequarters char190
-questiondown char191
-Agrave char192
-Aacute char193
-Acircumflex char194
-Atilde char195
-Adieresis char196
-Aring char197
-AE char198
-Ccedilla char199
-Egrave char200
-Eacute char201
-Ecircumflex char202
-Edieresis char203
-Igrave char204
-Iacute char205
-Icircumflex char206
-Idieresis char207
-Eth char208
-Ntilde char209
-Ograve char210
-Oacute char211
-Ocircumflex char212
-Otilde char213
-Odieresis char214
-multiply char215
-Oslash char216
-Ugrave char217
-Uacute char218
-Ucircumflex char219
-Udieresis char220
-Yacute char221
-Thorn char222
-germandbls char223
-agrave char224
-aacute char225
-acircumflex char226
-atilde char227
-adieresis char228
-aring char229
-ae char230
-ccedilla char231
-egrave char232
-eacute char233
-ecircumflex char234
-edieresis char235
-igrave char236
-iacute char237
-icircumflex char238
-idieresis char239
-eth char240
-ntilde char241
-ograve char242
-oacute char243
-ocircumflex char244
-otilde char245
-odieresis char246
-divide char247
-oslash char248
-ugrave char249
-uacute char250
-ucircumflex char251
-udieresis char252
-yacute char253
-thorn char254
-ydieresis char255
-fraction f/
-club CL
-diamond DI
-heart HE
-spade SP
-carriagereturn CR
-suchthat st
-bracelefttp bracelefttp
-braceleftmid braceleftmid
-braceleftbt braceleftbt
-braceex braceex
-braceex bracerightex
-braceex braceleftex
-braceex barex
-bracerighttp bracerighttp
-bracerightmid bracerightmid
-bracerightbt bracerightbt
-parenlefttp parenlefttp
-parenleftbt parenleftbt
-parenleftex parenleftex
-parenrighttp parenrighttp
-parenrightbt parenrightbt
-parenrightex parenrightex
-bracketlefttp bracketlefttp
-bracketleftbt bracketleftbt
-bracketleftex bracketleftex
-bracketrighttp bracketrighttp
-bracketrightbt bracketrightbt
-bracketrightex bracketrightex
-radical sr
-radicalex radicalex
-approxequal ~=
-bracketlefttp lc
-bracketleftbt lf
-bracketrighttp rc
-bracketrightbt rf
-bracelefttp lt
-braceleftmid lk
-braceleftbt lb
-braceex bv
-bracerighttp rt
-bracerightmid rk
-bracerightbt rb
-summation sum
-product product
-arrowvertex arrowvertex
-arrowhorizex an
diff --git a/contrib/groff/font/devps/prologue.ps b/contrib/groff/font/devps/prologue.ps
deleted file mode 100644
index b7bad1c5ba73..000000000000
--- a/contrib/groff/font/devps/prologue.ps
+++ /dev/null
@@ -1,228 +0,0 @@
-%!PS-Adobe-3.0 Resource-ProcSet
-
-/setpacking where {
- pop
- currentpacking
- true setpacking
-} if
-
-/grops 120 dict dup begin
-
-% The ASCII code of the space character.
-/SC 32 def
-
-/A /show load def
-/B { 0 SC 3 -1 roll widthshow } bind def
-/C { 0 exch ashow } bind def
-/D { 0 exch 0 SC 5 2 roll awidthshow } bind def
-/E { 0 rmoveto show } bind def
-/F { 0 rmoveto 0 SC 3 -1 roll widthshow } bind def
-/G { 0 rmoveto 0 exch ashow } bind def
-/H { 0 rmoveto 0 exch 0 SC 5 2 roll awidthshow } bind def
-/I { 0 exch rmoveto show } bind def
-/J { 0 exch rmoveto 0 SC 3 -1 roll widthshow } bind def
-/K { 0 exch rmoveto 0 exch ashow } bind def
-/L { 0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow } bind def
-/M { rmoveto show } bind def
-/N { rmoveto 0 SC 3 -1 roll widthshow } bind def
-/O { rmoveto 0 exch ashow } bind def
-/P { rmoveto 0 exch 0 SC 5 2 roll awidthshow } bind def
-/Q { moveto show } bind def
-/R { moveto 0 SC 3 -1 roll widthshow } bind def
-/S { moveto 0 exch ashow } bind def
-/T { moveto 0 exch 0 SC 5 2 roll awidthshow } bind def
-
-% name size font SF -
-
-/SF {
- findfont exch
- [ exch dup 0 exch 0 exch neg 0 0 ] makefont
- dup setfont
- [ exch /setfont cvx ] cvx bind def
-} bind def
-
-% name a c d font MF -
-
-/MF {
- findfont
- [ 5 2 roll
- 0 3 1 roll % b
- neg 0 0 ] makefont
- dup setfont
- [ exch /setfont cvx ] cvx bind def
-} bind def
-
-/level0 0 def
-/RES 0 def
-/PL 0 def
-/LS 0 def
-
-% Enable manual feed.
-% MANUAL -
-
-/MANUAL {
- statusdict begin /manualfeed true store end
-} bind def
-
-% Guess the page length.
-% This assumes that the imageable area is vertically centered on the page.
-% PLG - length
-
-/PLG {
- gsave newpath clippath pathbbox grestore
- exch pop add exch pop
-} bind def
-
-% BP -
-
-/BP {
- /level0 save def
- 1 setlinecap
- 1 setlinejoin
- 72 RES div dup scale
- LS {
- 90 rotate
- } {
- 0 PL translate
- } ifelse
- 1 -1 scale
-} bind def
-
-/EP {
- level0 restore
- showpage
-} bind def
-
-
-% centerx centery radius startangle endangle DA -
-
-/DA {
- newpath arcn stroke
-} bind def
-
-% x y SN - x' y'
-% round a position to nearest (pixel + (.25,.25))
-
-/SN {
- transform
- .25 sub exch .25 sub exch
- round .25 add exch round .25 add exch
- itransform
-} bind def
-
-% endx endy startx starty DL -
-% we round the endpoints of the line, so that parallel horizontal
-% and vertical lines will appear even
-
-/DL {
- SN
- moveto
- SN
- lineto stroke
-} bind def
-
-% centerx centery radius DC -
-
-/DC {
- newpath 0 360 arc closepath
-} bind def
-
-
-/TM matrix def
-
-% width height centerx centery DE -
-
-/DE {
- TM currentmatrix pop
- translate scale newpath 0 0 .5 0 360 arc closepath
- TM setmatrix
-} bind def
-
-% these are for splines
-
-/RC /rcurveto load def
-/RL /rlineto load def
-/ST /stroke load def
-/MT /moveto load def
-/CL /closepath load def
-
-% fill the last path
-
-% amount FL -
-
-/FL {
- currentgray exch setgray fill setgray
-} bind def
-
-% fill with the ``current color''
-
-/BL /fill load def
-
-/LW /setlinewidth load def
-% new_font_name encoding_vector old_font_name RE -
-
-/RE {
- findfont
- dup maxlength 1 index /FontName known not { 1 add } if dict begin
- {
- 1 index /FID ne { def } { pop pop } ifelse
- } forall
- /Encoding exch def
- dup /FontName exch def
- currentdict end definefont pop
-} bind def
-
-/DEFS 0 def
-
-% hpos vpos EBEGIN -
-
-/EBEGIN {
- moveto
- DEFS begin
-} bind def
-
-/EEND /end load def
-
-/CNT 0 def
-/level1 0 def
-
-% llx lly newwid wid newht ht newllx newlly PBEGIN -
-
-/PBEGIN {
- /level1 save def
- translate
- div 3 1 roll div exch scale
- neg exch neg exch translate
- % set the graphics state to default values
- 0 setgray
- 0 setlinecap
- 1 setlinewidth
- 0 setlinejoin
- 10 setmiterlimit
- [] 0 setdash
- /setstrokeadjust where {
- pop
- false setstrokeadjust
- } if
- /setoverprint where {
- pop
- false setoverprint
- } if
- newpath
- /CNT countdictstack def
- userdict begin
- /showpage {} def
-} bind def
-
-/PEND {
- clear
- countdictstack CNT sub { end } repeat
- level1 restore
-} bind def
-
-end def
-
-/setpacking where {
- pop
- setpacking
-} if
diff --git a/contrib/groff/font/devps/psstrip.sed b/contrib/groff/font/devps/psstrip.sed
deleted file mode 100644
index 3e61775af778..000000000000
--- a/contrib/groff/font/devps/psstrip.sed
+++ /dev/null
@@ -1,7 +0,0 @@
-/^%[%!]/b
-s/%.*//
-s/^[ ][ ]*//
-s/[ ][ ]*$//
-/^$/d
-s|[ ]*\([][}{/]\)|\1|g
-s|\([][}{/]\)[ ]*|\1|g
diff --git a/contrib/groff/font/devps/symbol.afm b/contrib/groff/font/devps/symbol.afm
deleted file mode 100644
index 33cba6a487ff..000000000000
--- a/contrib/groff/font/devps/symbol.afm
+++ /dev/null
@@ -1,212 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Wed Jan 17 21:48:26 1990
-Comment UniqueID 27004
-Comment VMusage 28489 37622
-FontName Symbol
-FullName Symbol
-FamilyName Symbol
-Weight Medium
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -180 -293 1090 1010
-UnderlinePosition -98
-UnderlineThickness 54
-Version 001.007
-Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved.
-EncodingScheme FontSpecific
-StartCharMetrics 189
-C 32 ; WX 250 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 333 ; N exclam ; B 128 -17 240 672 ;
-C 34 ; WX 713 ; N universal ; B 31 0 681 705 ;
-C 35 ; WX 500 ; N numbersign ; B 20 -16 481 673 ;
-C 36 ; WX 549 ; N existential ; B 25 0 478 707 ;
-C 37 ; WX 833 ; N percent ; B 63 -36 771 655 ;
-C 38 ; WX 778 ; N ampersand ; B 41 -18 750 661 ;
-C 39 ; WX 439 ; N suchthat ; B 48 -17 414 500 ;
-C 40 ; WX 333 ; N parenleft ; B 53 -191 300 673 ;
-C 41 ; WX 333 ; N parenright ; B 30 -191 277 673 ;
-C 42 ; WX 500 ; N asteriskmath ; B 65 134 427 551 ;
-C 43 ; WX 549 ; N plus ; B 10 0 539 533 ;
-C 44 ; WX 250 ; N comma ; B 56 -152 194 104 ;
-C 45 ; WX 549 ; N minus ; B 11 233 535 288 ;
-C 46 ; WX 250 ; N period ; B 69 -17 181 95 ;
-C 47 ; WX 278 ; N slash ; B 0 -18 254 646 ;
-C 48 ; WX 500 ; N zero ; B 23 -17 471 685 ;
-C 49 ; WX 500 ; N one ; B 117 0 390 673 ;
-C 50 ; WX 500 ; N two ; B 25 0 475 686 ;
-C 51 ; WX 500 ; N three ; B 39 -17 435 685 ;
-C 52 ; WX 500 ; N four ; B 16 0 469 685 ;
-C 53 ; WX 500 ; N five ; B 29 -17 443 685 ;
-C 54 ; WX 500 ; N six ; B 36 -17 467 685 ;
-C 55 ; WX 500 ; N seven ; B 24 -16 448 673 ;
-C 56 ; WX 500 ; N eight ; B 54 -18 440 685 ;
-C 57 ; WX 500 ; N nine ; B 31 -18 460 685 ;
-C 58 ; WX 278 ; N colon ; B 81 -17 193 460 ;
-C 59 ; WX 278 ; N semicolon ; B 83 -152 221 460 ;
-C 60 ; WX 549 ; N less ; B 26 0 523 522 ;
-C 61 ; WX 549 ; N equal ; B 11 141 537 390 ;
-C 62 ; WX 549 ; N greater ; B 26 0 523 522 ;
-C 63 ; WX 444 ; N question ; B 70 -17 412 686 ;
-C 64 ; WX 549 ; N congruent ; B 11 0 537 475 ;
-C 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ;
-C 66 ; WX 667 ; N Beta ; B 29 0 592 673 ;
-C 67 ; WX 722 ; N Chi ; B -9 0 704 673 ;
-C 68 ; WX 612 ; N Delta ; B 6 0 608 688 ;
-C 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ;
-C 70 ; WX 763 ; N Phi ; B 26 0 741 673 ;
-C 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ;
-C 72 ; WX 722 ; N Eta ; B 39 0 729 673 ;
-C 73 ; WX 333 ; N Iota ; B 32 0 316 673 ;
-C 74 ; WX 631 ; N theta1 ; B 18 -18 623 689 ;
-C 75 ; WX 722 ; N Kappa ; B 35 0 722 673 ;
-C 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ;
-C 77 ; WX 889 ; N Mu ; B 28 0 887 673 ;
-C 78 ; WX 722 ; N Nu ; B 29 -8 720 673 ;
-C 79 ; WX 722 ; N Omicron ; B 41 -17 715 685 ;
-C 80 ; WX 768 ; N Pi ; B 25 0 745 673 ;
-C 81 ; WX 741 ; N Theta ; B 41 -17 715 685 ;
-C 82 ; WX 556 ; N Rho ; B 28 0 563 673 ;
-C 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ;
-C 84 ; WX 611 ; N Tau ; B 33 0 607 673 ;
-C 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ;
-C 86 ; WX 439 ; N sigma1 ; B 40 -233 436 500 ;
-C 87 ; WX 768 ; N Omega ; B 34 0 736 688 ;
-C 88 ; WX 645 ; N Xi ; B 40 0 599 673 ;
-C 89 ; WX 795 ; N Psi ; B 15 0 781 684 ;
-C 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ;
-C 91 ; WX 333 ; N bracketleft ; B 86 -155 299 674 ;
-C 92 ; WX 863 ; N therefore ; B 163 0 701 478 ;
-C 93 ; WX 333 ; N bracketright ; B 33 -155 246 674 ;
-C 94 ; WX 658 ; N perpendicular ; B 15 0 652 674 ;
-C 95 ; WX 500 ; N underscore ; B -2 -252 502 -206 ;
-C 96 ; WX 500 ; N radicalex ; B 480 881 1090 917 ;
-C 97 ; WX 631 ; N alpha ; B 41 -18 622 500 ;
-C 98 ; WX 549 ; N beta ; B 61 -223 515 741 ;
-C 99 ; WX 549 ; N chi ; B 12 -231 522 499 ;
-C 100 ; WX 494 ; N delta ; B 40 -19 481 740 ;
-C 101 ; WX 439 ; N epsilon ; B 22 -19 427 502 ;
-C 102 ; WX 521 ; N phi ; B 27 -224 490 671 ;
-C 103 ; WX 411 ; N gamma ; B 5 -225 484 499 ;
-C 104 ; WX 603 ; N eta ; B 0 -202 527 514 ;
-C 105 ; WX 329 ; N iota ; B 0 -17 301 503 ;
-C 106 ; WX 603 ; N phi1 ; B 36 -224 587 499 ;
-C 107 ; WX 549 ; N kappa ; B 33 0 558 501 ;
-C 108 ; WX 549 ; N lambda ; B 24 -17 548 739 ;
-C 109 ; WX 576 ; N mu ; B 33 -223 567 500 ;
-C 110 ; WX 521 ; N nu ; B -9 -16 475 507 ;
-C 111 ; WX 549 ; N omicron ; B 35 -19 501 499 ;
-C 112 ; WX 549 ; N pi ; B 10 -19 530 487 ;
-C 113 ; WX 521 ; N theta ; B 43 -17 485 690 ;
-C 114 ; WX 549 ; N rho ; B 50 -230 490 499 ;
-C 115 ; WX 603 ; N sigma ; B 30 -21 588 500 ;
-C 116 ; WX 439 ; N tau ; B 10 -19 418 500 ;
-C 117 ; WX 576 ; N upsilon ; B 7 -18 535 507 ;
-C 118 ; WX 713 ; N omega1 ; B 12 -18 671 583 ;
-C 119 ; WX 686 ; N omega ; B 42 -17 684 500 ;
-C 120 ; WX 493 ; N xi ; B 27 -224 469 766 ;
-C 121 ; WX 686 ; N psi ; B 12 -228 701 500 ;
-C 122 ; WX 494 ; N zeta ; B 60 -225 467 756 ;
-C 123 ; WX 480 ; N braceleft ; B 58 -183 397 673 ;
-C 124 ; WX 200 ; N bar ; B 65 -177 135 673 ;
-C 125 ; WX 480 ; N braceright ; B 79 -183 418 673 ;
-C 126 ; WX 549 ; N similar ; B 17 203 529 307 ;
-C 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 685 ;
-C 162 ; WX 247 ; N minute ; B 27 459 228 735 ;
-C 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ;
-C 164 ; WX 167 ; N fraction ; B -180 -12 340 677 ;
-C 165 ; WX 713 ; N infinity ; B 26 124 688 404 ;
-C 166 ; WX 500 ; N florin ; B 2 -193 494 686 ;
-C 167 ; WX 753 ; N club ; B 86 -26 660 533 ;
-C 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ;
-C 169 ; WX 753 ; N heart ; B 117 -33 631 532 ;
-C 170 ; WX 753 ; N spade ; B 113 -36 629 548 ;
-C 171 ; WX 1042 ; N arrowboth ; B 24 -15 1024 511 ;
-C 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ;
-C 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ;
-C 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ;
-C 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ;
-C 176 ; WX 400 ; N degree ; B 50 385 350 685 ;
-C 177 ; WX 549 ; N plusminus ; B 10 0 539 645 ;
-C 178 ; WX 411 ; N second ; B 20 459 413 737 ;
-C 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ;
-C 180 ; WX 549 ; N multiply ; B 17 8 533 524 ;
-C 181 ; WX 713 ; N proportional ; B 27 123 639 404 ;
-C 182 ; WX 494 ; N partialdiff ; B 26 -20 462 746 ;
-C 183 ; WX 460 ; N bullet ; B 50 113 410 473 ;
-C 184 ; WX 549 ; N divide ; B 10 71 536 456 ;
-C 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ;
-C 186 ; WX 549 ; N equivalence ; B 14 82 538 443 ;
-C 187 ; WX 549 ; N approxequal ; B 14 135 527 394 ;
-C 188 ; WX 1000 ; N ellipsis ; B 111 -17 889 95 ;
-C 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ;
-C 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ;
-C 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ;
-C 192 ; WX 823 ; N aleph ; B 175 -18 661 658 ;
-C 193 ; WX 686 ; N Ifraktur ; B 10 -53 578 740 ;
-C 194 ; WX 795 ; N Rfraktur ; B 26 -15 759 734 ;
-C 195 ; WX 987 ; N weierstrass ; B 159 -211 870 573 ;
-C 196 ; WX 768 ; N circlemultiply ; B 43 -17 733 673 ;
-C 197 ; WX 768 ; N circleplus ; B 43 -15 733 675 ;
-C 198 ; WX 823 ; N emptyset ; B 39 -24 781 719 ;
-C 199 ; WX 768 ; N intersection ; B 40 0 732 509 ;
-C 200 ; WX 768 ; N union ; B 40 -17 732 492 ;
-C 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ;
-C 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ;
-C 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ;
-C 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ;
-C 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ;
-C 206 ; WX 713 ; N element ; B 45 0 505 468 ;
-C 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ;
-C 208 ; WX 768 ; N angle ; B 26 0 738 673 ;
-C 209 ; WX 713 ; N gradient ; B 36 -19 681 718 ;
-C 210 ; WX 790 ; N registerserif ; B 50 -17 740 673 ;
-C 211 ; WX 790 ; N copyrightserif ; B 51 -15 741 675 ;
-C 212 ; WX 890 ; N trademarkserif ; B 18 293 855 673 ;
-C 213 ; WX 823 ; N product ; B 25 -101 803 751 ;
-C 214 ; WX 549 ; N radical ; B 10 -38 515 917 ;
-C 215 ; WX 250 ; N dotmath ; B 69 210 169 310 ;
-C 216 ; WX 713 ; N logicalnot ; B 15 0 680 288 ;
-C 217 ; WX 603 ; N logicaland ; B 23 0 583 454 ;
-C 218 ; WX 603 ; N logicalor ; B 30 0 578 477 ;
-C 219 ; WX 1042 ; N arrowdblboth ; B 27 -20 1023 510 ;
-C 220 ; WX 987 ; N arrowdblleft ; B 30 -15 939 513 ;
-C 221 ; WX 603 ; N arrowdblup ; B 39 2 567 911 ;
-C 222 ; WX 987 ; N arrowdblright ; B 45 -20 954 508 ;
-C 223 ; WX 603 ; N arrowdbldown ; B 44 -19 572 890 ;
-C 224 ; WX 494 ; N lozenge ; B 18 0 466 745 ;
-C 225 ; WX 329 ; N angleleft ; B 25 -198 306 746 ;
-C 226 ; WX 790 ; N registersans ; B 50 -20 740 670 ;
-C 227 ; WX 790 ; N copyrightsans ; B 49 -15 739 675 ;
-C 228 ; WX 786 ; N trademarksans ; B 5 293 725 673 ;
-C 229 ; WX 713 ; N summation ; B 14 -108 695 752 ;
-C 230 ; WX 384 ; N parenlefttp ; B 40 -293 436 926 ;
-C 231 ; WX 384 ; N parenleftex ; B 40 -80 92 920 ;
-C 232 ; WX 384 ; N parenleftbt ; B 40 -293 436 920 ;
-C 233 ; WX 384 ; N bracketlefttp ; B 0 -75 341 925 ;
-C 234 ; WX 384 ; N bracketleftex ; B 0 -75 55 925 ;
-C 235 ; WX 384 ; N bracketleftbt ; B 0 -75 340 925 ;
-C 236 ; WX 494 ; N bracelefttp ; B 201 -75 439 925 ;
-C 237 ; WX 494 ; N braceleftmid ; B 14 -75 255 925 ;
-C 238 ; WX 494 ; N braceleftbt ; B 201 -75 439 925 ;
-C 239 ; WX 494 ; N braceex ; B 201 -75 255 925 ;
-C 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ;
-C 242 ; WX 274 ; N integral ; B 2 -107 291 916 ;
-C 243 ; WX 686 ; N integraltp ; B 332 -83 715 921 ;
-C 244 ; WX 686 ; N integralex ; B 332 -88 415 975 ;
-C 245 ; WX 686 ; N integralbt ; B 39 -81 415 921 ;
-C 246 ; WX 384 ; N parenrighttp ; B 54 -293 450 926 ;
-C 247 ; WX 384 ; N parenrightex ; B 398 -80 450 920 ;
-C 248 ; WX 384 ; N parenrightbt ; B 54 -293 450 920 ;
-C 249 ; WX 384 ; N bracketrighttp ; B 22 -75 360 925 ;
-C 250 ; WX 384 ; N bracketrightex ; B 305 -75 360 925 ;
-C 251 ; WX 384 ; N bracketrightbt ; B 20 -75 360 925 ;
-C 252 ; WX 494 ; N bracerighttp ; B 17 -75 255 925 ;
-C 253 ; WX 494 ; N bracerightmid ; B 201 -75 442 925 ;
-C 254 ; WX 494 ; N bracerightbt ; B 17 -75 255 925 ;
-C -1 ; WX 790 ; N apple ; B 56 -3 733 808 ;
-EndCharMetrics
-italicCorrection integral 67
-leftItalicCorrection integral 52
-subscriptCorrection integral -10
-EndFontMetrics
diff --git a/contrib/groff/font/devps/symbolmap b/contrib/groff/font/devps/symbolmap
deleted file mode 100644
index 03d6e70bea21..000000000000
--- a/contrib/groff/font/devps/symbolmap
+++ /dev/null
@@ -1,513 +0,0 @@
-a a
-b b
-c c
-d d
-e e
-f f
-g g
-h h
-i i
-j j
-k k
-l l
-m m
-n n
-o o
-p p
-q q
-r r
-s s
-t t
-u u
-v v
-w w
-x x
-y y
-z z
-A A
-B B
-C C
-D D
-E E
-F F
-G G
-H H
-I I
-J J
-K K
-L L
-M M
-N N
-O O
-P P
-Q Q
-R R
-S S
-T T
-U U
-V V
-W W
-X X
-Y Y
-Z Z
-AE AE
-Aacute 'A
-Acircumflex ^A
-Adieresis :A
-Agrave `A
-Aring oA
-Atilde ~A
-Cacute 'C
-Ccedilla ,C
-Eacute 'E
-Ecircumflex ^E
-Edieresis :E
-Egrave `E
-Eth -D
-IJ IJ
-Iacute 'I
-Icircumflex ^I
-Idieresis :I
-Ifraktur Im
-Igrave `I
-Lslash /L
-Ntilde ~N
-OE OE
-Oacute 'O
-Ocircumflex ^O
-Odieresis :O
-Ograve `O
-Oslash /O
-Otilde ~O
-Rfraktur Re
-Scaron vS
-Thorn TP
-Uacute 'U
-Ucircumflex ^U
-Udieresis :U
-Ugrave `U
-Yacute 'Y
-Ydieresis :Y
-Zcaron vZ
-aacute 'a
-acircumflex ^a
-acute aa
-adieresis :a
-ae ae
-agrave `a
-angle /_
-angleleft la
-angleright ra
-aleph Ah
-ampersand &
-approxequal ~~
-aring oa
-arrowboth <>
-arrowdblboth hA
-arrowdbldown dA
-arrowdblleft lA
-arrowdblright rA
-arrowdblup uA
-arrowdown da
-arrowleft <-
-arrowright ->
-arrowup ua
-asciicircum ha
-asciitilde ti
-asterisk *
-asteriskmath **
-at @
-at at
-atilde ~a
-backslash \
-backslash rs
-bar ba
-bar |
-bell bs
-braceleft lC
-braceleft {
-braceright rC
-braceright }
-bracketleft [
-bracketleft lB
-bracketright ]
-bracketright rB
-breve ab
-brokenbar bb
-bullet bu
-cacute 'c
-caron ah
-ccedilla ,c
-cedilla ac
-cent ct
-checkmark OK
-circle ci
-circlemultiply c*
-circleplus c+
-circumflex a^
-circumflex ^
-colon :
-comma ,
-congruent =~
-copyright co
-currency Cs
-dagger dg
-daggerdbl dd
-degree de
-dieresis ad
-dollar $
-dollar Do
-dotaccent a.
-dotlessi .i
-dotlessj .j
-dotmath md
-eacute 'e
-ecircumflex ^e
-edieresis :e
-egrave `e
-eight 8
-element mo
-emdash em
-emptyset es
-endash en
-equal =
-equalmath eq
-equivalence ==
-eth Sd
-exclam !
-exclamdown r!
-existential te
-ff ff
-ffi Fi
-ffl Fl
-fi fi
-five 5
-fl fl
-florin Fn
-four 4
-germandbls ss
-gradient gr
-grave ga
-greater >
-greaterequal >=
-guillemotleft Fo
-guillemotright Fc
-guilsinglleft fo
-guilsinglright fc
-handleft lh
-handright rh
-hbar -h
-hungarumlaut a"
-hyphen -
-hyphen hy
-iacute 'i
-icircumflex ^i
-idieresis :i
-igrave `i
-ij ij
-infinity if
-integral is
-intersection ca
-less <
-lessequal <=
-logicaland AN
-logicalnot no
-logicalor OR
-lozenge lz
-lslash /l
-macron a-
-minus \-
-minusplus -+
-minute fm
-nine 9
-notelement nm
-notequal !=
-notequivalence ne
-notpropersuperset nc
-notsubset nb
-ntilde ~n
-numbersign #
-numbersign sh
-oacute 'o
-ocircumflex ^o
-odieresis :o
-oe oe
-ogonek ho
-ograve `o
-one 1
-onehalf 12
-onequarter 14
-onesuperior S1
-ordfeminine Of
-ordmasculine Om
-oslash /o
-otilde ~o
-paragraph ps
-parenleft (
-parenright )
-partialdiff pd
-percent %
-period .
-periodcentered pc
-perthousand %0
-perpendicular pp
-plus +
-plusmath pl
-propersubset sb
-propersuperset sp
-proportional pt
-question ?
-questiondown r?
-quotedbl "
-quotedbl dq
-quotedblbase Bq
-quotedblleft lq
-quotedblright rq
-quoteleft `
-quoteleft oq
-quoteright '
-quoteright cq
-quotesingle aq
-quotesinglbase bq
-reflexsubset ib
-reflexsuperset ip
-registered rg
-ring ao
-scaron vs
-second sd
-section sc
-semicolon ;
-seven 7
-similar ap
-similarequal ~=
-six 6
-slash /
-slash sl
-square sq
-sterling Po
-therefore 3d
-therefore tf
-thorn Tp
-three 3
-threequarters 34
-threesuperior S3
-tilde a~
-tilde ~
-trademark tm
-two 2
-twosuperior S2
-uacute 'u
-ucircumflex ^u
-udieresis :u
-ugrave `u
-underscore _
-union cu
-universal fa
-weierstrass wp
-yacute 'y
-ydieresis :y
-yen Ye
-zcaron vz
-zero 0
-exclamdown char161
-cent char162
-sterling char163
-currency char164
-yen char165
-brokenbar char166
-section char167
-dieresis char168
-copyright char169
-ordfeminine char170
-guillemotleft char171
-logicalnot char172
-hyphen char173
-registered char174
-macron char175
-degree char176
-plusminus char177
-twosuperior char178
-threesuperior char179
-acute char180
-mu char181
-paragraph char182
-periodcentered char183
-cedilla char184
-onesuperior char185
-ordmasculine char186
-guillemotright char187
-onequarter char188
-onehalf char189
-threequarters char190
-questiondown char191
-Agrave char192
-Aacute char193
-Acircumflex char194
-Atilde char195
-Adieresis char196
-Aring char197
-AE char198
-Ccedilla char199
-Egrave char200
-Eacute char201
-Ecircumflex char202
-Edieresis char203
-Igrave char204
-Iacute char205
-Icircumflex char206
-Idieresis char207
-Eth char208
-Ntilde char209
-Ograve char210
-Oacute char211
-Ocircumflex char212
-Otilde char213
-Odieresis char214
-multiply char215
-Oslash char216
-Ugrave char217
-Uacute char218
-Ucircumflex char219
-Udieresis char220
-Yacute char221
-Thorn char222
-germandbls char223
-agrave char224
-aacute char225
-acircumflex char226
-atilde char227
-adieresis char228
-aring char229
-ae char230
-ccedilla char231
-egrave char232
-eacute char233
-ecircumflex char234
-edieresis char235
-igrave char236
-iacute char237
-icircumflex char238
-idieresis char239
-eth char240
-ntilde char241
-ograve char242
-oacute char243
-ocircumflex char244
-otilde char245
-odieresis char246
-divide char247
-oslash char248
-ugrave char249
-uacute char250
-ucircumflex char251
-udieresis char252
-yacute char253
-thorn char254
-ydieresis char255
-fraction f/
-club CL
-diamond DI
-heart HE
-spade SP
-carriagereturn CR
-suchthat st
-bracelefttp bracelefttp
-braceleftmid braceleftmid
-braceleftbt braceleftbt
-braceex braceex
-braceex bracerightex
-braceex braceleftex
-braceex barex
-bracerighttp bracerighttp
-bracerightmid bracerightmid
-bracerightbt bracerightbt
-parenlefttp parenlefttp
-parenleftbt parenleftbt
-parenleftex parenleftex
-parenrighttp parenrighttp
-parenrightbt parenrightbt
-parenrightex parenrightex
-bracketlefttp bracketlefttp
-bracketleftbt bracketleftbt
-bracketleftex bracketleftex
-bracketrighttp bracketrighttp
-bracketrightbt bracketrightbt
-bracketrightex bracketrightex
-radical sr
-radicalex radicalex
-approxequal ~=
-bracketlefttp lc
-bracketleftbt lf
-bracketrighttp rc
-bracketrightbt rf
-bracelefttp lt
-braceleftmid lk
-braceleftbt lb
-braceex bv
-bracerighttp rt
-bracerightmid rk
-bracerightbt rb
-summation sum
-product product
-arrowvertex arrowvertex
-arrowhorizex an
-plus pl
-minus mi
-plusminus +-
-equal eq
-divide di
-multiply mu
-arrowup arrowverttp
-arrowdown arrowvertbt
-Alpha *A
-Beta *B
-Chi *X
-Delta *D
-Epsilon *E
-Eta *Y
-Gamma *G
-Iota *I
-Kappa *K
-Lambda *L
-Mu *M
-Nu *N
-Omega *W
-Omicron *O
-Phi *F
-Pi *P
-Psi *Q
-Rho *R
-Sigma *S
-Tau *T
-Theta *H
-Upsilon1 *U
-Xi *C
-Zeta *Z
-alpha *a
-beta *b
-chi *x
-delta *d
-epsilon *e
-eta *y
-gamma *g
-iota *i
-kappa *k
-lambda *l
-mu *m
-nu *n
-omega *w
-omega1 +p
-omicron *o
-phi *f
-phi1 +f
-pi *p
-psi *q
-rho *r
-sigma *s
-sigma1 ts
-tau *t
-theta *h
-theta1 +h
-upsilon *u
-xi *c
-zeta *z
diff --git a/contrib/groff/font/devps/symbolsl.ps b/contrib/groff/font/devps/symbolsl.ps
deleted file mode 100644
index d384203e2c77..000000000000
--- a/contrib/groff/font/devps/symbolsl.ps
+++ /dev/null
@@ -1,41 +0,0 @@
-%!PS-Adobe-3.0 Resource-Font
-%%DocumentNeededResources: font Symbol
-
-% newfontname matrix oldfontname MakeTransformedFont
-
-/MakeTransformedFont {
- findfont dup maxlength dict begin
- {
- exch dup dup /FID ne exch /UniqueID ne and {
- exch def
- } {
- pop pop
- } ifelse
- } forall
- % first copy FontBBox
- /FontBBox
- % FontBBox sometimes seems to have the executable
- % attribute set
- % so to get the array on the stack, we have to do this
- currentdict /FontBBox get
- 4 array copy def
- % now transform it
- FontBBox aload pop
- 4 index transform 4 2 roll
- 4 index transform 4 2 roll
- FontBBox astore pop
- % matrix
- % now transform FontMatrix
- FontMatrix exch matrix concatmatrix
- /FontMatrix exch def
- dup /FontName exch def
- currentdict end
- definefont pop
-} bind def
-
-%%IncludeResource: font Symbol
-
-/Symbol-Slanted
-[.89 0.0 15.5 dup sin exch cos div .89 0.0 0.0]
-/Symbol
-MakeTransformedFont
diff --git a/contrib/groff/font/devps/text.enc b/contrib/groff/font/devps/text.enc
deleted file mode 100644
index dde5bb7c04db..000000000000
--- a/contrib/groff/font/devps/text.enc
+++ /dev/null
@@ -1,231 +0,0 @@
-asciicircum 0
-asciitilde 1
-Scaron 2
-Zcaron 3
-scaron 4
-zcaron 5
-Ydieresis 6
-trademark 7
-quotesingle 8
-space 32
-exclam 33
-quotedbl 34
-numbersign 35
-dollar 36
-percent 37
-ampersand 38
-quoteright 39
-parenleft 40
-parenright 41
-asterisk 42
-plus 43
-comma 44
-hyphen 45
-period 46
-slash 47
-zero 48
-one 49
-two 50
-three 51
-four 52
-five 53
-six 54
-seven 55
-eight 56
-nine 57
-colon 58
-semicolon 59
-less 60
-equal 61
-greater 62
-question 63
-at 64
-A 65
-B 66
-C 67
-D 68
-E 69
-F 70
-G 71
-H 72
-I 73
-J 74
-K 75
-L 76
-M 77
-N 78
-O 79
-P 80
-Q 81
-R 82
-S 83
-T 84
-U 85
-V 86
-W 87
-X 88
-Y 89
-Z 90
-bracketleft 91
-backslash 92
-bracketright 93
-circumflex 94
-underscore 95
-quoteleft 96
-a 97
-b 98
-c 99
-d 100
-e 101
-f 102
-g 103
-h 104
-i 105
-j 106
-k 107
-l 108
-m 109
-n 110
-o 111
-p 112
-q 113
-r 114
-s 115
-t 116
-u 117
-v 118
-w 119
-x 120
-y 121
-z 122
-braceleft 123
-bar 124
-braceright 125
-tilde 126
-quotesinglbase 128
-guillemotleft 129
-guillemotright 130
-bullet 131
-florin 132
-fraction 133
-perthousand 134
-dagger 135
-daggerdbl 136
-endash 137
-emdash 138
-ff 139
-fi 140
-fl 141
-ffi 142
-ffl 143
-dotlessi 144
-dotlessj 145
-grave 146
-hungarumlaut 147
-dotaccent 148
-breve 149
-caron 150
-ring 151
-ogonek 152
-quotedblleft 153
-quotedblright 154
-oe 155
-lslash 156
-quotedblbase 157
-OE 158
-Lslash 159
-exclamdown 161
-cent 162
-sterling 163
-currency 164
-yen 165
-brokenbar 166
-section 167
-dieresis 168
-copyright 169
-ordfeminine 170
-guilsinglleft 171
-logicalnot 172
-registered 174
-minus 173
-macron 175
-degree 176
-plusminus 177
-twosuperior 178
-threesuperior 179
-acute 180
-mu 181
-paragraph 182
-periodcentered 183
-cedilla 184
-onesuperior 185
-ordmasculine 186
-guilsinglright 187
-onequarter 188
-onehalf 189
-threequarters 190
-questiondown 191
-Agrave 192
-Aacute 193
-Acircumflex 194
-Atilde 195
-Adieresis 196
-Aring 197
-AE 198
-Ccedilla 199
-Egrave 200
-Eacute 201
-Ecircumflex 202
-Edieresis 203
-Igrave 204
-Iacute 205
-Icircumflex 206
-Idieresis 207
-Eth 208
-Ntilde 209
-Ograve 210
-Oacute 211
-Ocircumflex 212
-Otilde 213
-Odieresis 214
-multiply 215
-Oslash 216
-Ugrave 217
-Uacute 218
-Ucircumflex 219
-Udieresis 220
-Yacute 221
-Thorn 222
-germandbls 223
-agrave 224
-aacute 225
-acircumflex 226
-atilde 227
-adieresis 228
-aring 229
-ae 230
-ccedilla 231
-egrave 232
-eacute 233
-ecircumflex 234
-edieresis 235
-igrave 236
-iacute 237
-icircumflex 238
-idieresis 239
-eth 240
-ntilde 241
-ograve 242
-oacute 243
-ocircumflex 244
-otilde 245
-odieresis 246
-divide 247
-oslash 248
-ugrave 249
-uacute 250
-ucircumflex 251
-udieresis 252
-yacute 253
-thorn 254
-ydieresis 255
diff --git a/contrib/groff/font/devps/zapfdr.afm b/contrib/groff/font/devps/zapfdr.afm
deleted file mode 100644
index ce216de44a6f..000000000000
--- a/contrib/groff/font/devps/zapfdr.afm
+++ /dev/null
@@ -1,222 +0,0 @@
-StartFontMetrics 2.0
-Comment Copyright (c) 1985, 1987, 1988, 1989 Adobe Systems Incorporated. All rights reserved.
-Comment Creation Date: Fri Dec 1 12:57:42 1989
-Comment UniqueID 26200
-Comment VMusage 39281 49041
-FontName ZapfDingbats-Reverse
-FullName ITC Zapf Dingbats
-FamilyName ITC Zapf Dingbats
-Weight Medium
-ItalicAngle 0
-IsFixedPitch false
-FontBBox -1 -143 981 820
-UnderlinePosition -98
-UnderlineThickness 54
-Version 001.004
-Notice Copyright (c) 1985, 1987, 1988, 1989 Adobe Systems Incorporated. All rights reserved.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation.
-EncodingScheme FontSpecific
-StartCharMetrics 202
-C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
-C 33 ; WX 974 ; N a1 ; B 35 72 939 621 ;
-C 34 ; WX 961 ; N a2 ; B 35 81 927 611 ;
-C 35 ; WX 974 ; N a202 ; B 35 72 939 621 ;
-C 36 ; WX 980 ; N a3 ; B 35 0 945 692 ;
-C 37 ; WX 719 ; N a4 ; B 34 139 685 566 ;
-C 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ;
-C 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ;
-C 40 ; WX 791 ; N a118 ; B 35 -13 761 705 ;
-C 41 ; WX 690 ; N a117 ; B 35 138 655 553 ;
-C 42 ; WX 960 ; N a11 ; B 35 123 925 568 ;
-C 43 ; WX 939 ; N a12 ; B 35 134 904 559 ;
-C 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ;
-C 45 ; WX 855 ; N a14 ; B 34 59 820 632 ;
-C 46 ; WX 911 ; N a15 ; B 35 50 876 642 ;
-C 47 ; WX 933 ; N a16 ; B 35 139 899 550 ;
-C 48 ; WX 911 ; N a105 ; B 35 50 876 642 ;
-C 49 ; WX 945 ; N a17 ; B 35 139 909 553 ;
-C 50 ; WX 974 ; N a18 ; B 35 104 938 587 ;
-C 51 ; WX 755 ; N a19 ; B 34 -13 721 705 ;
-C 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ;
-C 53 ; WX 762 ; N a21 ; B 35 0 727 692 ;
-C 54 ; WX 761 ; N a22 ; B 35 0 727 692 ;
-C 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ;
-C 56 ; WX 677 ; N a24 ; B 36 -13 642 705 ;
-C 57 ; WX 763 ; N a25 ; B 35 0 728 692 ;
-C 58 ; WX 760 ; N a26 ; B 35 0 726 692 ;
-C 59 ; WX 759 ; N a27 ; B 35 0 725 692 ;
-C 60 ; WX 754 ; N a28 ; B 35 0 720 692 ;
-C 61 ; WX 494 ; N a6 ; B 35 0 460 692 ;
-C 62 ; WX 552 ; N a7 ; B 35 0 517 692 ;
-C 63 ; WX 537 ; N a8 ; B 35 0 503 692 ;
-C 64 ; WX 577 ; N a9 ; B 35 96 542 596 ;
-C 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ;
-C 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ;
-C 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ;
-C 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ;
-C 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ;
-C 70 ; WX 793 ; N a33 ; B 35 -13 759 705 ;
-C 71 ; WX 794 ; N a34 ; B 35 -13 759 705 ;
-C 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ;
-C 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ;
-C 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ;
-C 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ;
-C 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ;
-C 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ;
-C 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ;
-C 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ;
-C 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ;
-C 81 ; WX 744 ; N a44 ; B 35 0 710 692 ;
-C 82 ; WX 723 ; N a45 ; B 35 0 688 692 ;
-C 83 ; WX 749 ; N a46 ; B 35 0 714 692 ;
-C 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ;
-C 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ;
-C 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ;
-C 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ;
-C 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ;
-C 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ;
-C 90 ; WX 759 ; N a53 ; B 35 0 725 692 ;
-C 91 ; WX 707 ; N a54 ; B 35 -13 672 704 ;
-C 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ;
-C 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ;
-C 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ;
-C 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ;
-C 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ;
-C 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ;
-C 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ;
-C 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ;
-C 100 ; WX 687 ; N a63 ; B 36 0 651 692 ;
-C 101 ; WX 696 ; N a64 ; B 35 0 661 691 ;
-C 102 ; WX 689 ; N a65 ; B 35 0 655 692 ;
-C 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ;
-C 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ;
-C 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ;
-C 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ;
-C 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ;
-C 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ;
-C 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ;
-C 110 ; WX 761 ; N a73 ; B 35 0 726 692 ;
-C 111 ; WX 762 ; N a74 ; B 35 0 727 692 ;
-C 112 ; WX 762 ; N a203 ; B 35 0 727 692 ;
-C 113 ; WX 759 ; N a75 ; B 35 0 725 692 ;
-C 114 ; WX 759 ; N a204 ; B 35 0 725 692 ;
-C 115 ; WX 892 ; N a76 ; B 35 0 858 705 ;
-C 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ;
-C 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ;
-C 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ;
-C 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ;
-C 120 ; WX 138 ; N a82 ; B 35 0 104 692 ;
-C 121 ; WX 277 ; N a83 ; B 35 0 242 692 ;
-C 122 ; WX 415 ; N a84 ; B 35 0 380 692 ;
-C 123 ; WX 392 ; N a97 ; B 35 263 357 705 ;
-C 124 ; WX 392 ; N a98 ; B 34 263 357 705 ;
-C 125 ; WX 668 ; N a99 ; B 35 263 633 705 ;
-C 126 ; WX 668 ; N a100 ; B 36 263 634 705 ;
-C 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ;
-C 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ;
-C 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ;
-C 164 ; WX 910 ; N a104 ; B 35 40 875 651 ;
-C 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ;
-C 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ;
-C 167 ; WX 760 ; N a108 ; B 0 121 758 569 ;
-C 168 ; WX 776 ; N a112 ; B 35 0 741 705 ;
-C 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ;
-C 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ;
-C 171 ; WX 626 ; N a109 ; B 34 0 591 705 ;
-C 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ;
-C 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ;
-C 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ;
-C 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ;
-C 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ;
-C 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ;
-C 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ;
-C 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ;
-C 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ;
-C 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ;
-C 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ;
-C 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ;
-C 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ;
-C 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ;
-C 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ;
-C 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ;
-C 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ;
-C 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ;
-C 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ;
-C 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ;
-C 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ;
-C 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ;
-C 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ;
-C 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ;
-C 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ;
-C 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ;
-C 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ;
-C 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ;
-C 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ;
-C 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ;
-C 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ;
-C 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ;
-C 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ;
-C 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ;
-C 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ;
-C 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ;
-C 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ;
-C 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ;
-C 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ;
-C 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ;
-C 212 ; WX 894 ; N a160 ; B 35 58 860 634 ;
-C 213 ; WX 838 ; N a161 ; B 35 152 803 540 ;
-C 214 ; WX 1016 ; N a163 ; B 34 152 981 540 ;
-C 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ;
-C 216 ; WX 748 ; N a196 ; B 35 94 698 597 ;
-C 217 ; WX 924 ; N a165 ; B 35 140 890 552 ;
-C 218 ; WX 748 ; N a192 ; B 35 94 698 597 ;
-C 219 ; WX 918 ; N a166 ; B 35 166 884 526 ;
-C 220 ; WX 927 ; N a167 ; B 35 32 892 660 ;
-C 221 ; WX 928 ; N a168 ; B 35 129 891 562 ;
-C 222 ; WX 928 ; N a169 ; B 35 128 893 563 ;
-C 223 ; WX 834 ; N a170 ; B 35 155 799 537 ;
-C 224 ; WX 873 ; N a171 ; B 35 93 838 599 ;
-C 225 ; WX 828 ; N a172 ; B 35 104 791 588 ;
-C 226 ; WX 924 ; N a173 ; B 35 98 889 594 ;
-C 227 ; WX 924 ; N a162 ; B 35 98 889 594 ;
-C 228 ; WX 917 ; N a174 ; B 35 0 882 692 ;
-C 229 ; WX 930 ; N a175 ; B 35 84 896 608 ;
-C 230 ; WX 931 ; N a176 ; B 35 84 896 608 ;
-C 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ;
-C 232 ; WX 883 ; N a178 ; B 35 71 848 623 ;
-C 233 ; WX 836 ; N a179 ; B 35 44 802 648 ;
-C 234 ; WX 836 ; N a193 ; B 35 44 802 648 ;
-C 235 ; WX 867 ; N a180 ; B 35 101 832 591 ;
-C 236 ; WX 867 ; N a199 ; B 35 101 832 591 ;
-C 237 ; WX 696 ; N a181 ; B 35 44 661 648 ;
-C 238 ; WX 696 ; N a200 ; B 35 44 661 648 ;
-C 239 ; WX 874 ; N a182 ; B 35 77 840 619 ;
-C 241 ; WX 874 ; N a201 ; B 35 73 840 615 ;
-C 242 ; WX 760 ; N a183 ; B 35 0 725 692 ;
-C 243 ; WX 946 ; N a184 ; B 35 160 911 533 ;
-C 244 ; WX 771 ; N a197 ; B 34 37 736 655 ;
-C 245 ; WX 865 ; N a185 ; B 35 207 830 481 ;
-C 246 ; WX 771 ; N a194 ; B 34 37 736 655 ;
-C 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ;
-C 248 ; WX 967 ; N a186 ; B 35 124 932 568 ;
-C 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ;
-C 250 ; WX 831 ; N a187 ; B 35 113 796 579 ;
-C 251 ; WX 873 ; N a188 ; B 36 118 838 578 ;
-C 252 ; WX 927 ; N a189 ; B 35 150 891 542 ;
-C 253 ; WX 970 ; N a190 ; B 35 76 931 616 ;
-C 254 ; WX 918 ; N a191 ; B 34 99 884 593 ;
-C -1 ; WX 410 ; N a86 ; B 35 0 375 692 ;
-C -1 ; WX 509 ; N a85 ; B 35 0 475 692 ;
-C -1 ; WX 334 ; N a95 ; B 35 0 299 692 ;
-C -1 ; WX 509 ; N a205 ; B 35 0 475 692 ;
-C -1 ; WX 390 ; N a89 ; B 35 -14 356 705 ;
-C -1 ; WX 234 ; N a87 ; B 35 -14 199 705 ;
-C -1 ; WX 276 ; N a91 ; B 35 0 242 692 ;
-C -1 ; WX 390 ; N a90 ; B 35 -14 355 705 ;
-C -1 ; WX 410 ; N a206 ; B 35 0 375 692 ;
-C -1 ; WX 317 ; N a94 ; B 35 0 283 692 ;
-C -1 ; WX 317 ; N a93 ; B 35 0 283 692 ;
-C -1 ; WX 276 ; N a92 ; B 35 0 242 692 ;
-C -1 ; WX 334 ; N a96 ; B 35 0 299 692 ;
-C -1 ; WX 234 ; N a88 ; B 35 -14 199 705 ;
-EndCharMetrics
-EndFontMetrics
diff --git a/contrib/groff/font/devps/zapfdr.ps b/contrib/groff/font/devps/zapfdr.ps
deleted file mode 100644
index 8283be26db5a..000000000000
--- a/contrib/groff/font/devps/zapfdr.ps
+++ /dev/null
@@ -1,225 +0,0 @@
-%!PS-Adobe-3.0 Resource-Font
-%%DocumentNeededResources: font ZapfDingbats
-
-%%IncludeResource: font ZapfDingbats
-
-/ZapfDingbats findfont [-1 0 0 1 0 0] makefont
-
-dup length 1 add dict begin
-{
- exch dup dup /FID ne exch /UniqueID ne and {
- exch def
- } {
- pop pop
- } ifelse
-} forall
-
-/FontName /ZapfDingbats-Reverse def
-
-/Metrics 202 dict dup begin
- /space [0 -278] def
- /a1 [-939 -974] def
- /a2 [-926 -961] def
- /a202 [-939 -974] def
- /a3 [-945 -980] def
- /a4 [-685 -719] def
- /a5 [-754 -789] def
- /a119 [-755 -790] def
- /a118 [-756 -791] def
- /a117 [-655 -690] def
- /a11 [-925 -960] def
- /a12 [-904 -939] def
- /a13 [-520 -549] def
- /a14 [-821 -855] def
- /a15 [-876 -911] def
- /a16 [-898 -933] def
- /a105 [-876 -911] def
- /a17 [-910 -945] def
- /a18 [-939 -974] def
- /a19 [-721 -755] def
- /a20 [-811 -846] def
- /a21 [-727 -762] def
- /a22 [-726 -761] def
- /a23 [-572 -571] def
- /a24 [-641 -677] def
- /a25 [-728 -763] def
- /a26 [-725 -760] def
- /a27 [-724 -759] def
- /a28 [-719 -754] def
- /a6 [-459 -494] def
- /a7 [-517 -552] def
- /a8 [-502 -537] def
- /a9 [-542 -577] def
- /a10 [-657 -692] def
- /a29 [-751 -786] def
- /a30 [-753 -788] def
- /a31 [-753 -788] def
- /a32 [-755 -790] def
- /a33 [-758 -793] def
- /a34 [-759 -794] def
- /a35 [-781 -816] def
- /a36 [-788 -823] def
- /a37 [-754 -789] def
- /a38 [-806 -841] def
- /a39 [-788 -823] def
- /a40 [-798 -833] def
- /a41 [-781 -816] def
- /a42 [-796 -831] def
- /a43 [-888 -923] def
- /a44 [-709 -744] def
- /a45 [-688 -723] def
- /a46 [-714 -749] def
- /a47 [-756 -790] def
- /a48 [-757 -792] def
- /a49 [-660 -695] def
- /a50 [-741 -776] def
- /a51 [-733 -768] def
- /a52 [-757 -792] def
- /a53 [-724 -759] def
- /a54 [-672 -707] def
- /a55 [-673 -708] def
- /a56 [-647 -682] def
- /a57 [-666 -701] def
- /a58 [-791 -826] def
- /a59 [-780 -815] def
- /a60 [-754 -789] def
- /a61 [-754 -789] def
- /a62 [-673 -707] def
- /a63 [-651 -687] def
- /a64 [-661 -696] def
- /a65 [-654 -689] def
- /a66 [-752 -786] def
- /a67 [-752 -787] def
- /a68 [-678 -713] def
- /a69 [-756 -791] def
- /a70 [-749 -785] def
- /a71 [-756 -791] def
- /a72 [-838 -873] def
- /a73 [-726 -761] def
- /a74 [-727 -762] def
- /a203 [-727 -762] def
- /a75 [-724 -759] def
- /a204 [-724 -759] def
- /a76 [-857 -892] def
- /a77 [-857 -892] def
- /a78 [-753 -788] def
- /a79 [-749 -784] def
- /a81 [-403 -438] def
- /a82 [-103 -138] def
- /a83 [-242 -277] def
- /a84 [-380 -415] def
- /a97 [-357 -392] def
- /a98 [-358 -392] def
- /a99 [-633 -668] def
- /a100 [-632 -668] def
- /a101 [-697 -732] def
- /a102 [-488 -544] def
- /a103 [-510 -544] def
- /a104 [-875 -910] def
- /a106 [-632 -667] def
- /a107 [-725 -760] def
- /a108 [-760 -760] def
- /a112 [-741 -776] def
- /a111 [-561 -595] def
- /a110 [-659 -694] def
- /a109 [-592 -626] def
- /a120 [-753 -788] def
- /a121 [-753 -788] def
- /a122 [-753 -788] def
- /a123 [-753 -788] def
- /a124 [-753 -788] def
- /a125 [-753 -788] def
- /a126 [-753 -788] def
- /a127 [-753 -788] def
- /a128 [-753 -788] def
- /a129 [-753 -788] def
- /a130 [-753 -788] def
- /a131 [-753 -788] def
- /a132 [-753 -788] def
- /a133 [-753 -788] def
- /a134 [-753 -788] def
- /a135 [-753 -788] def
- /a136 [-753 -788] def
- /a137 [-753 -788] def
- /a138 [-753 -788] def
- /a139 [-753 -788] def
- /a140 [-753 -788] def
- /a141 [-753 -788] def
- /a142 [-753 -788] def
- /a143 [-753 -788] def
- /a144 [-753 -788] def
- /a145 [-753 -788] def
- /a146 [-753 -788] def
- /a147 [-753 -788] def
- /a148 [-753 -788] def
- /a149 [-753 -788] def
- /a150 [-753 -788] def
- /a151 [-753 -788] def
- /a152 [-753 -788] def
- /a153 [-753 -788] def
- /a154 [-753 -788] def
- /a155 [-753 -788] def
- /a156 [-753 -788] def
- /a157 [-753 -788] def
- /a158 [-753 -788] def
- /a159 [-753 -788] def
- /a160 [-859 -894] def
- /a161 [-803 -838] def
- /a163 [-982 -1016] def
- /a164 [-423 -458] def
- /a196 [-713 -748] def
- /a165 [-889 -924] def
- /a192 [-713 -748] def
- /a166 [-883 -918] def
- /a167 [-892 -927] def
- /a168 [-893 -928] def
- /a169 [-893 -928] def
- /a170 [-799 -834] def
- /a171 [-838 -873] def
- /a172 [-793 -828] def
- /a173 [-889 -924] def
- /a162 [-889 -924] def
- /a174 [-882 -917] def
- /a175 [-895 -930] def
- /a176 [-896 -931] def
- /a177 [-428 -463] def
- /a178 [-848 -883] def
- /a179 [-801 -836] def
- /a193 [-801 -836] def
- /a180 [-832 -867] def
- /a199 [-832 -867] def
- /a181 [-661 -696] def
- /a200 [-661 -696] def
- /a182 [-839 -874] def
- /a201 [-839 -874] def
- /a183 [-725 -760] def
- /a184 [-911 -946] def
- /a197 [-737 -771] def
- /a185 [-830 -865] def
- /a194 [-737 -771] def
- /a198 [-854 -888] def
- /a186 [-932 -967] def
- /a195 [-854 -888] def
- /a187 [-796 -831] def
- /a188 [-837 -873] def
- /a189 [-892 -927] def
- /a190 [-935 -970] def
- /a191 [-884 -918] def
- /a205 [-474 -509] def
- /a206 [-375 -410] def
- /a85 [-474 -509] def
- /a86 [-375 -410] def
- /a87 [-199 -234] def
- /a88 [-199 -234] def
- /a89 [-355 -390] def
- /a90 [-355 -390] def
- /a91 [-241 -276] def
- /a92 [-241 -276] def
- /a93 [-282 -317] def
- /a94 [-282 -317] def
- /a95 [-299 -334] def
- /a96 [-299 -334] def
-
-end def
-
-/ZapfDingbats-Reverse currentdict end definefont pop
diff --git a/contrib/groff/font/devutf8/DESC.proto b/contrib/groff/font/devutf8/DESC.proto
deleted file mode 100644
index 88399ab16d91..000000000000
--- a/contrib/groff/font/devutf8/DESC.proto
+++ /dev/null
@@ -1,8 +0,0 @@
-res 240
-hor 24
-vert 40
-unitwidth 10
-sizes 10 0
-fonts 4 R I B BI
-tcommand
-postpro grotty
diff --git a/contrib/groff/font/devutf8/Makefile.sub b/contrib/groff/font/devutf8/Makefile.sub
deleted file mode 100644
index f6ce659c0d6e..000000000000
--- a/contrib/groff/font/devutf8/Makefile.sub
+++ /dev/null
@@ -1,32 +0,0 @@
-DEV=utf8
-FONTS=R I B BI
-DEVFILES=$(FONTS) DESC
-CLEANADD=$(FONTS) DESC
-
-RES=240
-CPI=10
-LPI=6
-
-$(FONTS): R.proto
- @echo Making $@
- @-rm -f $@
- @(charwidth=`expr $(RES) / $(CPI)` ; \
- sed -e "s/^name [A-Z]*$$/name $@/" \
- -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
- -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
- -e "s/^internalname .*$$/internalname $@/" \
- -e "/^internalname/s/BI/3/" \
- -e "/^internalname/s/B/2/" \
- -e "/^internalname/s/I/1/" \
- -e "/^internalname .*[^ 0-9]/d" \
- $(srcdir)/R.proto >$@)
-
-DESC: DESC.proto
- @echo Making $@
- @-rm -f $@
- @sed -e "s/^res .*$$/res $(RES)/" \
- -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
- -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
- -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
- $(srcdir)/DESC.proto >$@
-
diff --git a/contrib/groff/font/devutf8/NOTES b/contrib/groff/font/devutf8/NOTES
deleted file mode 100644
index ba597af5b67c..000000000000
--- a/contrib/groff/font/devutf8/NOTES
+++ /dev/null
@@ -1,75 +0,0 @@
-The following from the original troff manual (by Ossanna and Kernighan) is
-unmapped:
-
- \(bs shaded solid ball (Bell System logo, AT&T logo)
-
-Character 0x002D has not been given a name because its Unicode name
-"HYPHEN-MINUS" is so ambiguous that it's unusable for serious typographic use.
-
-The following, mentioned in the original troff manual, are only approximate:
-
- \(lk middle part of big left curly brace
- \(rk middle part of big right curly brace
-
-\(wp has been mapped to 0x2118, because according to unicode.org's
-NamesList-3.0.0.txt, U+2118 "SCRIPT CAPITAL P" is really a Weierstrass p,
-neither SCRIPT not CAPITAL.
-
-The following lines could be added, to define names which are known to
-"devps" but are not documented and not known to "devdvi".
-space 24 0 0x0020
-vS 24 0 0x0160
-vs 24 0 0x0161
-:Y 24 0 0x0178
-vZ 24 0 0x017D
-vz 24 0 0x017E
-3d 24 0 0x2234
-nb 24 0 0x2284
-product 24 0 0x220F
-sum 24 0 0x2211
-SP 24 0 0x2660
-CL 24 0 0x2663
-HE 24 0 0x2665
-DI 24 0 0x2666
-
-The following lines could be added, to define names which are known to e.g.
-"devdvi" but are not known to "devps".
-<< 24 0 0x226A
->> 24 0 0x226B
-
-"devps" maps \(a~ and ~ to asciitilde, which is equivalent to 0x02DC, but
-this glyph is just too small. We map them to 0x007E instead.
-
-"devps" maps \(a^ and ^ to circumflex, which is equivalent to 0x02C6, but
-this glyph is just too small. We map them to 0x005E instead.
-
-"devps" maps *m to mu, which is equivalent to either 0x00B5 or 0x03BC. We
-map it to 0x03BC.
-
-"devps" maps *U to Upsilon1, which is equivalent to 0x03D2. We map it to
-0x03A5 instead.
-
-"devps" maps *W to Omega, which is equivalent to either 0x2126 or 0x03A9. We
-map it to 0x03A9.
-
-"devps" maps *D to Delta, which is equivalent to either 0x2206 or 0x0394. We
-map it to 0x0394.
-
-"devps" maps CR to carriagereturn, which is equivalent to 0x21B5. We map it
-to 0x240D instead.
-
-Using unnamed characters:
-
-Assume you want to use a Unicode character not provided in the list, say
-U+20AC. You need to do two things:
-
-- Add a line
-
- --- 24 0 0x20AC
-
- (the second column is computed as 24 * wcwidth(0x20AC)) to the file
- R.proto, or, when groff is already installed, to the four fonts files in
- $(prefix)/share/groff/<version>/font/devutf8/.
-
-- In your source file, use the notation \N'8364' where 8364 is the decimal
- representation of 0x20AC.
diff --git a/contrib/groff/font/devutf8/R.proto b/contrib/groff/font/devutf8/R.proto
deleted file mode 100644
index 7715ed4d2be0..000000000000
--- a/contrib/groff/font/devutf8/R.proto
+++ /dev/null
@@ -1,473 +0,0 @@
-name R
-internalname 0
-spacewidth 24
-charset
-! 24 0 0x0021
-" 24 0 0x0022
-dq "
-# 24 0 0x0023
-sh "
-$ 24 0 0x0024
-Do "
-% 24 0 0x0025
-& 24 0 0x0026
-aq 24 0 0x0027
-( 24 0 0x0028
-) 24 0 0x0029
-* 24 0 0x002A
-+ 24 0 0x002B
-pl "
-, 24 0 0x002C
---- 24 0 0x002D
-. 24 0 0x002E
-/ 24 0 0x002F
-sl "
-0 24 0 0x0030
-1 24 0 0x0031
-2 24 0 0x0032
-3 24 0 0x0033
-4 24 0 0x0034
-5 24 0 0x0035
-6 24 0 0x0036
-7 24 0 0x0037
-8 24 0 0x0038
-9 24 0 0x0039
-: 24 0 0x003A
-; 24 0 0x003B
-< 24 0 0x003C
-= 24 0 0x003D
-eq "
-> 24 0 0x003E
-? 24 0 0x003F
-@ 24 0 0x0040
-at "
-A 24 0 0x0041
-B 24 0 0x0042
-C 24 0 0x0043
-D 24 0 0x0044
-E 24 0 0x0045
-F 24 0 0x0046
-G 24 0 0x0047
-H 24 0 0x0048
-I 24 0 0x0049
-J 24 0 0x004A
-K 24 0 0x004B
-L 24 0 0x004C
-M 24 0 0x004D
-N 24 0 0x004E
-O 24 0 0x004F
-P 24 0 0x0050
-Q 24 0 0x0051
-R 24 0 0x0052
-S 24 0 0x0053
-T 24 0 0x0054
-U 24 0 0x0055
-V 24 0 0x0056
-W 24 0 0x0057
-X 24 0 0x0058
-Y 24 0 0x0059
-Z 24 0 0x005A
-[ 24 0 0x005B
-lB "
-\ 24 0 0x005C
-rs "
-] 24 0 0x005D
-rB "
-a^ 24 0 0x005E
-^ "
-ha "
-_ 24 0 0x005F
-ru "
-ul "
-\` 24 0 0x0060
-ga "
-a 24 0 0x0061
-b 24 0 0x0062
-c 24 0 0x0063
-d 24 0 0x0064
-e 24 0 0x0065
-f 24 0 0x0066
-g 24 0 0x0067
-h 24 0 0x0068
-i 24 0 0x0069
-j 24 0 0x006A
-k 24 0 0x006B
-l 24 0 0x006C
-m 24 0 0x006D
-n 24 0 0x006E
-o 24 0 0x006F
-p 24 0 0x0070
-q 24 0 0x0071
-r 24 0 0x0072
-s 24 0 0x0073
-t 24 0 0x0074
-u 24 0 0x0075
-v 24 0 0x0076
-w 24 0 0x0077
-x 24 0 0x0078
-y 24 0 0x0079
-z 24 0 0x007A
-lC 24 0 0x007B
-{ "
-ba 24 0 0x007C
-or "
-| "
-rC 24 0 0x007D
-} "
-a~ 24 0 0x007E
-~ "
-ti "
-r! 24 0 0x00A1
-char161 "
-ct 24 0 0x00A2
-char162 "
-Po 24 0 0x00A3
-char163 "
-Cs 24 0 0x00A4
-char164 "
-Ye 24 0 0x00A5
-char165 "
-bb 24 0 0x00A6
-char166 "
-sc 24 0 0x00A7
-char167 "
-ad 24 0 0x00A8
-char168 "
-co 24 0 0x00A9
-char169 "
-Of 24 0 0x00AA
-char170 "
-Fo 24 0 0x00AB
-char171 "
-no 24 0 0x00AC
-char172 "
-shc 24 0 0x00AD
-char173 "
-rg 24 0 0x00AE
-char174 "
-a- 24 0 0x00AF
-char175 "
-de 24 0 0x00B0
-char176 "
-+- 24 0 0x00B1
-char177 "
-S2 24 0 0x00B2
-char178 "
-S3 24 0 0x00B3
-char179 "
-aa 24 0 0x00B4
-char180 "
-char181 24 0 0x00B5
-ps 24 0 0x00B6
-char182 "
-pc 24 0 0x00B7
-char183 "
-ac 24 0 0x00B8
-char184 "
-S1 24 0 0x00B9
-char185 "
-Om 24 0 0x00BA
-char186 "
-Fc 24 0 0x00BB
-char187 "
-14 24 0 0x00BC
-char188 "
-12 24 0 0x00BD
-char189 "
-34 24 0 0x00BE
-char190 "
-r? 24 0 0x00BF
-char191 "
-`A 24 0 0x00C0
-char192 "
-'A 24 0 0x00C1
-char193 "
-^A 24 0 0x00C2
-char194 "
-~A 24 0 0x00C3
-char195 "
-:A 24 0 0x00C4
-char196 "
-oA 24 0 0x00C5
-char197 "
-AE 24 0 0x00C6
-char198 "
-,C 24 0 0x00C7
-char199 "
-`E 24 0 0x00C8
-char200 "
-'E 24 0 0x00C9
-char201 "
-^E 24 0 0x00CA
-char202 "
-:E 24 0 0x00CB
-char203 "
-`I 24 0 0x00CC
-char204 "
-'I 24 0 0x00CD
-char205 "
-^I 24 0 0x00CE
-char206 "
-:I 24 0 0x00CF
-char207 "
--D 24 0 0x00D0
-char208 "
-~N 24 0 0x00D1
-char209 "
-`O 24 0 0x00D2
-char210 "
-'O 24 0 0x00D3
-char211 "
-^O 24 0 0x00D4
-char212 "
-~O 24 0 0x00D5
-char213 "
-:O 24 0 0x00D6
-char214 "
-mu 24 0 0x00D7
-char215 "
-/O 24 0 0x00D8
-char216 "
-`U 24 0 0x00D9
-char217 "
-'U 24 0 0x00DA
-char218 "
-^U 24 0 0x00DB
-char219 "
-:U 24 0 0x00DC
-char220 "
-'Y 24 0 0x00DD
-char221 "
-TP 24 0 0x00DE
-char222 "
-ss 24 0 0x00DF
-char223 "
-`a 24 0 0x00E0
-char224 "
-'a 24 0 0x00E1
-char225 "
-^a 24 0 0x00E2
-char226 "
-~a 24 0 0x00E3
-char227 "
-:a 24 0 0x00E4
-char228 "
-oa 24 0 0x00E5
-char229 "
-ae 24 0 0x00E6
-char230 "
-,c 24 0 0x00E7
-char231 "
-`e 24 0 0x00E8
-char232 "
-'e 24 0 0x00E9
-char233 "
-^e 24 0 0x00EA
-char234 "
-:e 24 0 0x00EB
-char235 "
-`i 24 0 0x00EC
-char236 "
-'i 24 0 0x00ED
-char237 "
-^i 24 0 0x00EE
-char238 "
-:i 24 0 0x00EF
-char239 "
-Sd 24 0 0x00F0
-char240 "
-~n 24 0 0x00F1
-char241 "
-`o 24 0 0x00F2
-char242 "
-'o 24 0 0x00F3
-char243 "
-^o 24 0 0x00F4
-char244 "
-~o 24 0 0x00F5
-char245 "
-:o 24 0 0x00F6
-char246 "
-di 24 0 0x00F7
-char247 "
-/o 24 0 0x00F8
-char248 "
-`u 24 0 0x00F9
-char249 "
-'u 24 0 0x00FA
-char250 "
-^u 24 0 0x00FB
-char251 "
-:u 24 0 0x00FC
-char252 "
-'y 24 0 0x00FD
-char253 "
-Tp 24 0 0x00FE
-char254 "
-:y 24 0 0x00FF
-char255 "
-.i 24 0 0x0131
-/L 24 0 0x0141
-/l 24 0 0x0142
-OE 24 0 0x0152
-oe 24 0 0x0153
-Fn 24 0 0x0192
-ah 24 0 0x02C7
-ab 24 0 0x02D8
-a. 24 0 0x02D9
-ao 24 0 0x02DA
-ho 24 0 0x02DB
-a" 24 0 0x02DD
-*A 24 0 0x0391
-*B 24 0 0x0392
-*G 24 0 0x0393
-*D 24 0 0x0394
-*E 24 0 0x0395
-*Z 24 0 0x0396
-*Y 24 0 0x0397
-*H 24 0 0x0398
-*I 24 0 0x0399
-*K 24 0 0x039A
-*L 24 0 0x039B
-*M 24 0 0x039C
-*N 24 0 0x039D
-*C 24 0 0x039E
-*O 24 0 0x039F
-*P 24 0 0x03A0
-*R 24 0 0x03A1
-*S 24 0 0x03A3
-*T 24 0 0x03A4
-*U 24 0 0x03A5
-*F 24 0 0x03A6
-*X 24 0 0x03A7
-*Q 24 0 0x03A8
-*W 24 0 0x03A9
-*a 24 0 0x03B1
-*b 24 0 0x03B2
-*g 24 0 0x03B3
-*d 24 0 0x03B4
-*e 24 0 0x03B5
-*z 24 0 0x03B6
-*y 24 0 0x03B7
-*h 24 0 0x03B8
-*i 24 0 0x03B9
-*k 24 0 0x03BA
-*l 24 0 0x03BB
-*m 24 0 0x03BC
-*n 24 0 0x03BD
-*c 24 0 0x03BE
-*o 24 0 0x03BF
-*p 24 0 0x03C0
-*r 24 0 0x03C1
-ts 24 0 0x03C2
-*s 24 0 0x03C3
-*t 24 0 0x03C4
-*u 24 0 0x03C5
-*f 24 0 0x03C6
-*x 24 0 0x03C7
-*q 24 0 0x03C8
-*w 24 0 0x03C9
-+h 24 0 0x03D1
-+f 24 0 0x03D5
-+p 24 0 0x03D6
-- 24 0 0x2010
-hy "
-en 24 0 0x2013
-em 24 0 0x2014
-` 24 0 0x2018
-oq "
-' 24 0 0x2019
-cq "
-bq 24 0 0x201A
-lq 24 0 0x201C
-rq 24 0 0x201D
-Bq 24 0 0x201E
-dg 24 0 0x2020
-dd 24 0 0x2021
-bu 24 0 0x2022
-%0 24 0 0x2030
-fm 24 0 0x2032
-sd 24 0 0x2033
-fo 24 0 0x2039
-fc 24 0 0x203A
-rn 24 0 0x203E
-f/ 24 0 0x2044
-Im 24 0 0x2111
-wp 24 0 0x2118
-Re 24 0 0x211C
-tm 24 0 0x2122
-Ah 24 0 0x2135
-<- 24 0 0x2190
-ua 24 0 0x2191
--> 24 0 0x2192
-da 24 0 0x2193
-<> 24 0 0x2194
-lA 24 0 0x21D0
-uA 24 0 0x21D1
-rA 24 0 0x21D2
-dA 24 0 0x21D3
-hA 24 0 0x21D4
-fa 24 0 0x2200
-pd 24 0 0x2202
-te 24 0 0x2203
-es 24 0 0x2205
-gr 24 0 0x2207
-mo 24 0 0x2208
-nm 24 0 0x2209
-st 24 0 0x220B
-\- 24 0 0x2212
-mi "
-** 24 0 0x2217
-sr 24 0 0x221A
-pt 24 0 0x221D
-if 24 0 0x221E
-/_ 24 0 0x2220
-AN 24 0 0x2227
-OR 24 0 0x2228
-ca 24 0 0x2229
-cu 24 0 0x222A
-is 24 0 0x222B
-tf 24 0 0x2234
-ti 24 0 0x223C
-ap "
-=~ 24 0 0x2245
-~~ 24 0 0x2248
-~= "
-!= 24 0 0x2260
-== 24 0 0x2261
-<= 24 0 0x2264
->= 24 0 0x2265
-sb 24 0 0x2282
-sp 24 0 0x2283
-ib 24 0 0x2286
-ip 24 0 0x2287
-c+ 24 0 0x2295
-c* 24 0 0x2297
-pp 24 0 0x22A5
-pc 24 0 0x22C5
-lc 24 0 0x2308
-rc 24 0 0x2309
-lf 24 0 0x230A
-rf 24 0 0x230B
-la 24 0 0x2329
-ra 24 0 0x232A
-CR 24 0 0x240D
-an 24 0 0x2500
-br 24 0 0x2502
-bv "
-rk 24 0 0x251D
-lk 24 0 0x2525
-lt 24 0 0x256D
-rt 24 0 0x256E
-rb 24 0 0x256F
-lb 24 0 0x2570
-sq 24 0 0x25A1
-lz 24 0 0x25CA
-ci 24 0 0x25EF
-lh 24 0 0x261C
-rh 24 0 0x261E
-ff 24 0 0xFB00
-fi 24 0 0xFB01
-fl 24 0 0xFB02
-Fi 24 0 0xFB03
-Fl 24 0 0xFB04
diff --git a/contrib/groff/src/devices/grodvi/Makefile.sub b/contrib/groff/src/devices/grodvi/Makefile.sub
deleted file mode 100644
index 0e5d32cabbd5..000000000000
--- a/contrib/groff/src/devices/grodvi/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=grodvi
-MAN1=grodvi.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=dvi.o
-CCSRCS=$(srcdir)/dvi.cc
diff --git a/contrib/groff/src/devices/grodvi/dvi.cc b/contrib/groff/src/devices/grodvi/dvi.cc
deleted file mode 100644
index 74422f804e24..000000000000
--- a/contrib/groff/src/devices/grodvi/dvi.cc
+++ /dev/null
@@ -1,912 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "driver.h"
-#include "nonposix.h"
-
-#define DEFAULT_LINEWIDTH 40
-static int linewidth = DEFAULT_LINEWIDTH;
-
-static int draw_flag = 1;
-
-/* These values were chosen because:
-
-(MULTIPLIER*SIZESCALE)/(RES*UNITWIDTH) == 1/(2^20 * 72.27)
-
-and 57816 is an exact multiple of both 72.27*SIZESCALE and 72.
-
-The width in the groff font file is the product of MULTIPLIER and the
-width in the tfm file. */
-
-#define RES 57816
-#define RES_7227 (RES/7227)
-#define UNITWIDTH 131072
-#define SIZESCALE 100
-#define MULTIPLIER 1
-
-#define FILL_MAX 1000
-
-class dvi_font : public font {
- dvi_font(const char *);
-public:
- int checksum;
- int design_size;
- ~dvi_font();
- void handle_unknown_font_command(const char *command, const char *arg,
- const char *filename, int lineno);
- static dvi_font *load_dvi_font(const char *);
-};
-
-dvi_font *dvi_font::load_dvi_font(const char *s)
-{
- dvi_font *f = new dvi_font(s);
- if (!f->load()) {
- delete f;
- return 0;
- }
- return f;
-}
-
-dvi_font::dvi_font(const char *nm)
-: font(nm), checksum(0), design_size(0)
-{
-}
-
-dvi_font::~dvi_font()
-{
-}
-
-void dvi_font::handle_unknown_font_command(const char *command,
- const char *arg,
- const char *filename, int lineno)
-{
- char *ptr;
- if (strcmp(command, "checksum") == 0) {
- if (arg == 0)
- fatal_with_file_and_line(filename, lineno,
- "`checksum' command requires an argument");
- checksum = int(strtol(arg, &ptr, 10));
- if (checksum == 0 && ptr == arg) {
- fatal_with_file_and_line(filename, lineno, "bad checksum");
- }
- }
- else if (strcmp(command, "designsize") == 0) {
- if (arg == 0)
- fatal_with_file_and_line(filename, lineno,
- "`designsize' command requires an argument");
- design_size = int(strtol(arg, &ptr, 10));
- if (design_size == 0 && ptr == arg) {
- fatal_with_file_and_line(filename, lineno, "bad design size");
- }
- }
-}
-
-#define FONTS_MAX 256
-
-struct output_font {
- dvi_font *f;
- int point_size;
- output_font() : f(0) { }
-};
-
-class dvi_printer : public printer {
- FILE *fp;
- int max_drift;
- int byte_count;
- int last_bop;
- int page_count;
- int cur_h;
- int cur_v;
- int end_h;
- int max_h;
- int max_v;
- output_font output_font_table[FONTS_MAX];
- font *cur_font;
- int cur_point_size;
- int pushed;
- int pushed_h;
- int pushed_v;
- int have_pushed;
- void preamble();
- void postamble();
- void define_font(int);
- void set_font(int);
- void possibly_begin_line();
-protected:
- enum {
- id_byte = 2,
- set1 = 128,
- put1 = 133,
- put_rule = 137,
- bop = 139,
- eop = 140,
- push = 141,
- pop = 142,
- right1 = 143,
- down1 = 157,
- fnt_num_0 = 171,
- fnt1 = 235,
- xxx1 = 239,
- fnt_def1 = 243,
- pre = 247,
- post = 248,
- post_post = 249,
- filler = 223
- };
- int line_thickness;
-
- void out1(int);
- void out2(int);
- void out3(int);
- void out4(int);
- void moveto(int, int);
- void out_string(const char *);
- void out_signed(unsigned char, int);
- void out_unsigned(unsigned char, int);
- void do_special(const char *);
-public:
- dvi_printer();
- ~dvi_printer();
- font *make_font(const char *);
- void begin_page(int);
- void end_page(int);
- void set_char(int, font *, const environment *, int w, const char *name);
- void special(char *arg, const environment *env, char type);
- void end_of_line();
- void draw(int code, int *p, int np, const environment *env);
-};
-
-
-class draw_dvi_printer : public dvi_printer {
- int output_pen_size;
- int fill;
- void set_line_thickness(const environment *);
- void fill_next();
-public:
- draw_dvi_printer();
- ~draw_dvi_printer();
- void draw(int code, int *p, int np, const environment *env);
- void end_page(int);
-};
-
-dvi_printer::dvi_printer()
-: fp(stdout), byte_count(0), last_bop(-1), page_count(0), max_h(0), max_v(0),
- cur_font(0), cur_point_size(-1), pushed(0), line_thickness(-1)
-{
- if (font::res != RES)
- fatal("resolution must be %1", RES);
- if (font::unitwidth != UNITWIDTH)
- fatal("unitwidth must be %1", UNITWIDTH);
- if (font::hor != 1)
- fatal("hor must be equal to 1");
- if (font::vert != 1)
- fatal("vert must be equal to 1");
- if (font::sizescale != SIZESCALE)
- fatal("sizescale must be equal to %1", SIZESCALE);
- max_drift = font::res/1000; // this is fairly arbitrary
- preamble();
-}
-
-dvi_printer::~dvi_printer()
-{
- postamble();
-}
-
-
-draw_dvi_printer::draw_dvi_printer()
-: output_pen_size(-1), fill(FILL_MAX)
-{
-}
-
-draw_dvi_printer::~draw_dvi_printer()
-{
-}
-
-
-void dvi_printer::out1(int n)
-{
- byte_count += 1;
- putc(n & 0xff, fp);
-}
-
-void dvi_printer::out2(int n)
-{
- byte_count += 2;
- putc((n >> 8) & 0xff, fp);
- putc(n & 0xff, fp);
-}
-
-void dvi_printer::out3(int n)
-{
- byte_count += 3;
- putc((n >> 16) & 0xff, fp);
- putc((n >> 8) & 0xff, fp);
- putc(n & 0xff, fp);
-}
-
-void dvi_printer::out4(int n)
-{
- byte_count += 4;
- putc((n >> 24) & 0xff, fp);
- putc((n >> 16) & 0xff, fp);
- putc((n >> 8) & 0xff, fp);
- putc(n & 0xff, fp);
-}
-
-void dvi_printer::out_string(const char *s)
-{
- out1(strlen(s));
- while (*s != 0)
- out1(*s++);
-}
-
-
-void dvi_printer::end_of_line()
-{
- if (pushed) {
- out1(pop);
- pushed = 0;
- cur_h = pushed_h;
- cur_v = pushed_v;
- }
-}
-
-void dvi_printer::possibly_begin_line()
-{
- if (!pushed) {
- have_pushed = pushed = 1;
- pushed_h = cur_h;
- pushed_v = cur_v;
- out1(push);
- }
-}
-
-int scale(int x, int z)
-{
- int sw;
- int a, b, c, d;
- int alpha, beta;
- alpha = 16*z; beta = 16;
- while (z >= 040000000L) {
- z /= 2; beta /= 2;
- }
- d = x & 255;
- c = (x >> 8) & 255;
- b = (x >> 16) & 255;
- a = (x >> 24) & 255;
- sw = (((((d * z) / 0400) + (c * z)) / 0400) + (b * z)) / beta;
- if (a == 255)
- sw -= alpha;
- else
- assert(a == 0);
- return sw;
-}
-
-
-void dvi_printer::set_char(int index, font *f, const environment *env, int w, const char *name)
-{
- int code = f->get_code(index);
- if (env->size != cur_point_size || f != cur_font) {
- cur_font = f;
- cur_point_size = env->size;
- int i;
- for (i = 0;; i++) {
- if (i >= FONTS_MAX) {
- fatal("too many output fonts required");
- }
- if (output_font_table[i].f == 0) {
- output_font_table[i].f = (dvi_font *)cur_font;
- output_font_table[i].point_size = cur_point_size;
- define_font(i);
- }
- if (output_font_table[i].f == cur_font
- && output_font_table[i].point_size == cur_point_size)
- break;
- }
- set_font(i);
- }
- int distance = env->hpos - cur_h;
- if (env->hpos != end_h && distance != 0) {
- out_signed(right1, distance);
- cur_h = env->hpos;
- }
- else if (distance > max_drift) {
- out_signed(right1, distance - max_drift);
- cur_h = env->hpos - max_drift;
- }
- else if (distance < -max_drift) {
- out_signed(right1, distance + max_drift);
- cur_h = env->hpos + max_drift;
- }
- if (env->vpos != cur_v) {
- out_signed(down1, env->vpos - cur_v);
- cur_v = env->vpos;
- }
- possibly_begin_line();
- end_h = env->hpos + w;
- cur_h += scale(f->get_width(index, UNITWIDTH)/MULTIPLIER,
- cur_point_size*RES_7227);
- if (cur_h > max_h)
- max_h = cur_h;
- if (cur_v > max_v)
- max_v = cur_v;
- if (code >= 0 && code <= 127)
- out1(code);
- else
- out_unsigned(set1, code);
-}
-
-void dvi_printer::define_font(int i)
-{
- out_unsigned(fnt_def1, i);
- dvi_font *f = output_font_table[i].f;
- out4(f->checksum);
- out4(output_font_table[i].point_size*RES_7227);
- out4(int((double(f->design_size)/(1<<20))*RES_7227*100 + .5));
- const char *nm = f->get_internal_name();
- out1(0);
- out_string(nm);
-}
-
-void dvi_printer::set_font(int i)
-{
- if (i >= 0 && i <= 63)
- out1(fnt_num_0 + i);
- else
- out_unsigned(fnt1, i);
-}
-
-void dvi_printer::out_signed(unsigned char base, int param)
-{
- if (-128 <= param && param < 128) {
- out1(base);
- out1(param);
- }
- else if (-32768 <= param && param < 32768) {
- out1(base+1);
- out2(param);
- }
- else if (-(1 << 23) <= param && param < (1 << 23)) {
- out1(base+2);
- out3(param);
- }
- else {
- out1(base+3);
- out4(param);
- }
-}
-
-void dvi_printer::out_unsigned(unsigned char base, int param)
-{
- if (param >= 0) {
- if (param < 256) {
- out1(base);
- out1(param);
- }
- else if (param < 65536) {
- out1(base+1);
- out2(param);
- }
- else if (param < (1 << 24)) {
- out1(base+2);
- out3(param);
- }
- else {
- out1(base+3);
- out4(param);
- }
- }
- else {
- out1(base+3);
- out4(param);
- }
-}
-
-void dvi_printer::preamble()
-{
- out1(pre);
- out1(id_byte);
- out4(254000);
- out4(font::res);
- out4(1000);
- out1(0);
-}
-
-void dvi_printer::postamble()
-{
- int tem = byte_count;
- out1(post);
- out4(last_bop);
- out4(254000);
- out4(font::res);
- out4(1000);
- out4(max_v);
- out4(max_h);
- out2(have_pushed); // stack depth
- out2(page_count);
- int i;
- for (i = 0; i < FONTS_MAX && output_font_table[i].f != 0; i++)
- define_font(i);
- out1(post_post);
- out4(tem);
- out1(id_byte);
- for (i = 0; i < 4 || byte_count % 4 != 0; i++)
- out1(filler);
-}
-
-void dvi_printer::begin_page(int i)
-{
- page_count++;
- int tem = byte_count;
- out1(bop);
- out4(i);
- for (int j = 1; j < 10; j++)
- out4(0);
- out4(last_bop);
- last_bop = tem;
- // By convention position (0,0) in a dvi file is placed at (1in, 1in).
- cur_h = font::res;
- cur_v = font::res;
- end_h = 0;
-}
-
-void dvi_printer::end_page(int)
-{
- if (pushed)
- end_of_line();
- out1(eop);
- cur_font = 0;
-}
-
-void draw_dvi_printer::end_page(int len)
-{
- dvi_printer::end_page(len);
- output_pen_size = -1;
-}
-
-void dvi_printer::do_special(const char *s)
-{
- int len = strlen(s);
- if (len == 0)
- return;
- possibly_begin_line();
- out_unsigned(xxx1, len);
- while (*s)
- out1(*s++);
-}
-
-void dvi_printer::special(char *arg, const environment *env, char type)
-{
- if (type != 'p')
- return;
- moveto(env->hpos, env->vpos);
- do_special(arg);
-}
-
-void dvi_printer::moveto(int h, int v)
-{
- if (h != cur_h) {
- out_signed(right1, h - cur_h);
- cur_h = h;
- if (cur_h > max_h)
- max_h = cur_h;
- }
- if (v != cur_v) {
- out_signed(down1, v - cur_v);
- cur_v = v;
- if (cur_v > max_v)
- max_v = cur_v;
- }
- end_h = 0;
-}
-
-void dvi_printer::draw(int code, int *p, int np, const environment *env)
-{
- if (code == 'l') {
- int x, y;
- int height = 0, width;
- int thickness;
- if (line_thickness < 0)
- thickness = env->size*RES_7227*linewidth/1000;
- else if (line_thickness > 0)
- thickness = line_thickness;
- else
- thickness = 1;
- if (np != 2) {
- error("2 arguments required for line");
- }
- else if (p[0] == 0) {
- // vertical rule
- if (p[1] > 0) {
- x = env->hpos - thickness/2;
- y = env->vpos + p[1] + thickness/2;
- height = p[1] + thickness;
- width = thickness;
- }
- else if (p[1] < 0) {
- x = env->hpos - thickness/2;
- y = env->vpos + thickness/2;
- height = thickness - p[1];
- width = thickness;
- }
- }
- else if (p[1] == 0) {
- if (p[0] > 0) {
- x = env->hpos - thickness/2;
- y = env->vpos + thickness/2;
- height = thickness;
- width = p[0] + thickness;
- }
- else if (p[0] < 0) {
- x = env->hpos - p[0] - thickness/2;
- y = env->vpos + thickness/2;
- height = thickness;
- width = thickness - p[0];
- }
- }
- if (height != 0) {
- moveto(x, y);
- out1(put_rule);
- out4(height);
- out4(width);
- }
- }
- else if (code == 't') {
- if (np == 0) {
- line_thickness = -1;
- }
- else {
- // troff gratuitously adds an extra 0
- if (np != 1 && np != 2)
- error("0 or 1 argument required for thickness");
- else
- line_thickness = p[0];
- }
- }
- else if (code == 'R') {
- if (np != 2)
- error("2 arguments required for rule");
- else if (p[0] != 0 || p[1] != 0) {
- int dh = p[0];
- int dv = p[1];
- int oh = env->hpos;
- int ov = env->vpos;
- if (dv > 0) {
- ov += dv;
- dv = -dv;
- }
- if (dh < 0) {
- oh += dh;
- dh = -dh;
- }
- moveto(oh, ov);
- out1(put_rule);
- out4(-dv);
- out4(dh);
- }
- }
-}
-
-// XXX Will this overflow?
-
-inline int milliinches(int n)
-{
- return (n*1000 + font::res/2)/font::res;
-}
-
-void draw_dvi_printer::set_line_thickness(const environment *env)
-{
- int desired_pen_size
- = milliinches(line_thickness < 0
- // Will this overflow?
- ? env->size*RES_7227*linewidth/1000
- : line_thickness);
- if (desired_pen_size != output_pen_size) {
- char buf[256];
- sprintf(buf, "pn %d", desired_pen_size);
- do_special(buf);
- output_pen_size = desired_pen_size;
- }
-}
-
-void draw_dvi_printer::fill_next()
-{
- char buf[256];
- sprintf(buf, "sh %.3f", double(fill)/FILL_MAX);
- do_special(buf);
-}
-
-void draw_dvi_printer::draw(int code, int *p, int np, const environment *env)
-{
- char buf[1024];
- int fill_flag = 0;
- switch (code) {
- case 'C':
- fill_flag = 1;
- // fall through
- case 'c':
- // troff adds an extra argument to C
- if (np != 1 && !(code == 'C' && np == 2)) {
- error("1 argument required for circle");
- break;
- }
- moveto(env->hpos+p[0]/2, env->vpos);
- if (fill_flag)
- fill_next();
- else
- set_line_thickness(env);
- int rad;
- rad = milliinches(p[0]/2);
- sprintf(buf, "%s 0 0 %d %d 0 6.28319",
- (fill_flag ? "ia" : "ar"),
- rad,
- rad);
- do_special(buf);
- break;
- case 'l':
- if (np != 2) {
- error("2 arguments required for line");
- break;
- }
- moveto(env->hpos, env->vpos);
- set_line_thickness(env);
- do_special("pa 0 0");
- sprintf(buf, "pa %d %d", milliinches(p[0]), milliinches(p[1]));
- do_special(buf);
- do_special("fp");
- break;
- case 'E':
- fill_flag = 1;
- // fall through
- case 'e':
- if (np != 2) {
- error("2 arguments required for ellipse");
- break;
- }
- moveto(env->hpos+p[0]/2, env->vpos);
- if (fill_flag)
- fill_next();
- sprintf(buf, "%s 0 0 %d %d 0 6.28319",
- (fill_flag ? "ia" : "ar"),
- milliinches(p[0]/2),
- milliinches(p[1]/2));
- do_special(buf);
- break;
- case 'P':
- fill_flag = 1;
- // fall through
- case 'p':
- {
- if (np & 1) {
- error("even number of arguments required for polygon");
- break;
- }
- if (np == 0) {
- error("no arguments for polygon");
- break;
- }
- moveto(env->hpos, env->vpos);
- if (fill_flag)
- fill_next();
- else
- set_line_thickness(env);
- do_special("pa 0 0");
- int h = 0, v = 0;
- for (int i = 0; i < np; i += 2) {
- h += p[i];
- v += p[i+1];
- sprintf(buf, "pa %d %d", milliinches(h), milliinches(v));
- do_special(buf);
- }
- do_special("pa 0 0");
- do_special(fill_flag ? "ip" : "fp");
- break;
- }
- case '~':
- {
- if (np & 1) {
- error("even number of arguments required for spline");
- break;
- }
- if (np == 0) {
- error("no arguments for spline");
- break;
- }
- moveto(env->hpos, env->vpos);
- set_line_thickness(env);
- do_special("pa 0 0");
- int h = 0, v = 0;
- for (int i = 0; i < np; i += 2) {
- h += p[i];
- v += p[i+1];
- sprintf(buf, "pa %d %d", milliinches(h), milliinches(v));
- do_special(buf);
- }
- do_special("sp");
- break;
- }
- case 'a':
- {
- if (np != 4) {
- error("4 arguments required for arc");
- break;
- }
- set_line_thickness(env);
- double c[2];
- if (adjust_arc_center(p, c)) {
- int rad = milliinches(int(sqrt(c[0]*c[0] + c[1]*c[1]) + .5));
- moveto(env->hpos + int(c[0]), env->vpos + int(c[1]));
- sprintf(buf, "ar 0 0 %d %d %f %f",
- rad,
- rad,
- atan2(p[1] + p[3] - c[1], p[0] + p[2] - c[0]),
- atan2(-c[1], -c[0]));
- do_special(buf);
- }
- else {
- moveto(env->hpos, env->vpos);
- do_special("pa 0 0");
- sprintf(buf,
- "pa %d %d",
- milliinches(p[0] + p[2]),
- milliinches(p[1] + p[3]));
- do_special(buf);
- do_special("fp");
- }
- break;
- }
- case 't':
- {
- if (np == 0) {
- line_thickness = -1;
- }
- else {
- // troff gratuitously adds an extra 0
- if (np != 1 && np != 2) {
- error("0 or 1 argument required for thickness");
- break;
- }
- line_thickness = p[0];
- }
- break;
- }
- case 'f':
- {
- if (np != 1 && np != 2) {
- error("1 argument required for fill");
- break;
- }
- fill = p[0];
- if (fill < 0 || fill > FILL_MAX)
- fill = FILL_MAX;
- break;
- }
- case 'R':
- {
- if (np != 2) {
- error("2 arguments required for rule");
- break;
- }
- int dh = p[0];
- if (dh == 0)
- break;
- int dv = p[1];
- if (dv == 0)
- break;
- int oh = env->hpos;
- int ov = env->vpos;
- if (dv > 0) {
- ov += dv;
- dv = -dv;
- }
- if (dh < 0) {
- oh += dh;
- dh = -dh;
- }
- moveto(oh, ov);
- out1(put_rule);
- out4(-dv);
- out4(dh);
- break;
- }
- default:
- error("unrecognised drawing command `%1'", char(code));
- break;
- }
-}
-
-font *dvi_printer::make_font(const char *nm)
-{
- return dvi_font::load_dvi_font(nm);
-}
-
-printer *make_printer()
-{
- if (draw_flag)
- return new draw_dvi_printer;
- else
- return new dvi_printer;
-}
-
-static void usage(FILE *stream);
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int c;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((c = getopt_long(argc, argv, "F:vw:d", long_options, NULL)) != EOF)
- switch(c) {
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU grodvi (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'w':
- if (sscanf(optarg, "%d", &linewidth) != 1
- || linewidth < 0 || linewidth > 1000) {
- error("bad line width");
- linewidth = DEFAULT_LINEWIDTH;
- }
- break;
- case 'd':
- draw_flag = 0;
- break;
- case 'F':
- font::command_line_font_dir(optarg);
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
-#ifdef SET_BINARY
- SET_BINARY(fileno(stdout));
-#endif
- if (optind >= argc)
- do_file("-");
- else {
- for (int i = optind; i < argc; i++)
- do_file(argv[i]);
- }
- delete pr;
- return 0;
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [-dv] [-F dir] [-w n] [files ...]\n",
- program_name);
-}
diff --git a/contrib/groff/src/devices/grodvi/grodvi.man b/contrib/groff/src/devices/grodvi/grodvi.man
deleted file mode 100644
index 7aa4431609b1..000000000000
--- a/contrib/groff/src/devices/grodvi/grodvi.man
+++ /dev/null
@@ -1,174 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
-.el .ds tx TeX
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH GRODVI @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-grodvi \- convert groff output to TeX dvi format
-.SH SYNOPSIS
-.B grodvi
-[
-.B \-dv
-] [
-.BI \-w n
-] [
-.BI \-F dir
-] [
-.IR files \|.\|.\|.
-]
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-.B grodvi
-is a driver for
-.B groff
-that produces \*(tx dvi format.
-Normally it should be run by
-.BR groff\ \-Tdvi .
-This will run
-.BR @g@troff\ \-Tdvi ;
-it will also input the macros
-.BR @MACRODIR@/dvi.tmac ;
-if the input is being preprocessed with
-.B @g@eqn
-it will also input
-.BR @FONTDIR@/devdvi/eqnchar .
-.LP
-The dvi file generated by
-.B grodvi
-can be printed by any correctly-written dvi driver.
-The troff drawing primitives are implemented
-using the tpic version 2 specials.
-If the driver does not support these, the
-.B \eD
-commands will not produce any output.
-.LP
-There is an additional drawing command available:
-.TP
-.BI \eD'R\ dh\ dv '
-Draw a rule (solid black rectangle), with one corner
-at the current position, and the diagonally opposite corner
-at the current position
-.RI +( dh , dv ).
-Afterwards the current position will be at the opposite corner. This
-produces a rule in the dvi file and so can be printed even with a
-driver that does not support the tpic specials unlike the other
-.B \eD
-commands.
-.LP
-The groff command
-.BI \eX' anything '
-is translated into the same command in the dvi file as would be
-produced by
-.BI \especial{ anything }
-in \*(tx;
-.I anything may not contain a newline.
-.LP
-Font files for
-.B grodvi
-can be created from tfm files using
-.BR tfmtodit (@MAN1EXT@).
-The font description file should contain the following
-additional commands:
-.Tp \w'\fBinternalname'u+2n
-.BI internalname\ name
-The name of the tfm file (without the
-.B .tfm
-extension) is
-.IR name .
-.TP
-.BI checksum\ n
-The checksum in the tfm file is
-.IR n .
-.TP
-.BI designsize\ n
-The designsize in the tfm file is
-.IR n .
-.LP
-These are automatically generated by
-.B tfmtodit.
-.LP
-In
-.B troff
-the
-.B \eN
-escape sequence can be used to access characters by their position
-in the corresponding tfm file;
-all characters in the tfm file can be accessed this way.
-.SH OPTIONS
-.TP
-.B \-d
-Do not use tpic specials to implement drawing commands.
-Horizontal and vertical lines will be implemented by rules.
-Other drawing commands will be ignored.
-.TP
-.B \-v
-Print the version number.
-.TP
-.BI \-w n
-Set the default line thickness to
-.I n
-thousandths of an em.
-.TP
-.BI \-F dir
-Prepend directory
-.IB dir /devdvi
-to the search path for font and device description files.
-.SH FILES
-.TP
-.B @FONTDIR@/devdvi/DESC
-Device description file.
-.TP
-.BI @FONTDIR@/devdvi/ F
-Font description file for font
-.IR F .
-.TP
-.B @MACRODIR@/dvi.tmac
-Macros for use with
-.BR grodvi .
-.SH BUGS
-Dvi files produced by
-.B grodvi
-use a different resolution (57816 units per inch) to those produced by
-\*(tx.
-Incorrectly written drivers which assume the resolution used by \*(tx,
-rather than using the resolution specified in the dvi file will not
-work with
-.BR grodvi .
-.LP
-When using the
-.B \-d
-option with boxed tables,
-vertical and horizontal lines can sometimes protrude by one pixel.
-This is a consequence of the way \*(tx requires that the heights
-and widths of rules be rounded.
-.SH "SEE ALSO"
-.BR tfmtodit (@MAN1EXT@),
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR groff_out (@MAN5EXT@),
-.BR groff_font (@MAN5EXT@),
-.BR groff_char (@MAN7EXT@)
diff --git a/contrib/groff/src/devices/grohtml/Makefile.sub b/contrib/groff/src/devices/grohtml/Makefile.sub
deleted file mode 100644
index 2c3a55a5d40e..000000000000
--- a/contrib/groff/src/devices/grohtml/Makefile.sub
+++ /dev/null
@@ -1,16 +0,0 @@
-PROG=post-grohtml
-MAN1=grohtml.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
- post-html.o \
- html-text.o \
- output.o
-CCSRCS=\
- $(srcdir)/post-html.cc \
- $(srcdir)/html-text.cc \
- $(srcdir)/output.cc
-HDRS=\
- $(srcdir)/html.h \
- $(srcdir)/html-chars.h \
- $(srcdir)/html-text.h
diff --git a/contrib/groff/src/devices/grohtml/grohtml.man b/contrib/groff/src/devices/grohtml/grohtml.man
deleted file mode 100644
index 8796d8f8cbc6..000000000000
--- a/contrib/groff/src/devices/grohtml/grohtml.man
+++ /dev/null
@@ -1,137 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1999-2000, 2001 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH GROHTML @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-grohtml \- html driver for groff
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fBgrohtml 'u
-.ti \niu
-.B grohtml
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-v?lrn
-.OP \-F dir
-.OP \-i resolution
-.OP \-o image vertical offset
-.RI "[\ " files\|.\|.\|. "\ ]"
-.br
-.ad \na
-.SH DESCRIPTION
-.B grohtml
-translates the output of GNU
-.B troff
-to html.
-Users should always invoke
-.B grohtml
-via the groff command with a
-.B \-Thtml
-option.
-If no files are given,
-.B grohtml
-will read the standard input.
-A filename of
-.B \-
-will also cause
-.B grohtml
-to read the standard input.
-Html output is written to the standard output.
-When
-.B grohtml
-is run by
-.B groff
-options can be passed to
-.B grohtml
-using
-.BR groff 's
-.B \-P
-option.
-.SH OPTIONS
-.TP
-.B \-v
-Displays the version.
-.TP
-.B \-?
-Emits a usage synopsis.
-.TP
-.B -l
-Turns off the production of automatic section links at the top of the document.
-.TP
-.B -r
-Turns off the automatic header and footer line (html rule).
-.TP
-.B -n
-Generate simple heading anchors whenever a section/number heading is found.
-Without the option the anchor value is the textual heading. This can cause problems
-when a heading contains a `?' on some brousers (netscape).
-This flag is automatically turned on if a heading contains an image.
-.TP
-.BI \-F dir
-Prepend directory
-.IB dir /dev name
-to the search path for font and device description files;
-.I name
-is the name of the device, usually
-.BR html .
-.TP
-.BI \-i resolution
-select the resolution for all images.
-By default this is 80 pixels per inch.
-Example: -i100 indicates 100 pixels per inch.
-.TP
-.B \-v
-Print the version number.
-.TP
-.B \-?
-Display usage.
-.SH USAGE
-There are styles called
-.BR R ,
-.BR I ,
-.BR B ,
-and
-.B BI
-mounted at font positions 1 to 4.
-.SH DEPENDENCIES
-.B grohtml
-is dependent upon the png utilities and gs.
-Images are generated whenever a table, picture, equation or line is
-encountered.
-.SH BUGS
-.B Grohtml
-has been completely redesigned and rewritten.
-It is still alpha code.
-.SH "SEE ALSO"
-.BR afmtodit (@MAN1EXT@),
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR psbb (@MAN1EXT@),
-.BR groff_out (@MAN5EXT@),
-.BR groff_font (@MAN5EXT@),
-.BR groff_char (@MAN7EXT@)
diff --git a/contrib/groff/src/devices/grohtml/html-chars.h b/contrib/groff/src/devices/grohtml/html-chars.h
deleted file mode 100644
index f58f8dcc20a8..000000000000
--- a/contrib/groff/src/devices/grohtml/html-chars.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- *
- * Gaius Mulley (gaius@glam.ac.uk) wrote output.cc
- * but it owes a huge amount of ideas and raw code from
- * James Clark (jjc@jclark.com) grops/ps.cc.
- *
- * html-chars.h
- *
- * provides a diacritical character combination table for html
- */
-
-
-
-struct diacritical_desc {
- char *mark;
- char *second_troff_char;
- char translation;
-};
-
-
-static struct diacritical_desc diacritical_table[] = {
- { "ad" , "aeiouyAEIOU" , ':' , }, /* */
- { "ac" , "cC" , ',' , }, /* cedilla */
- { "aa" , "aeiouyAEIOU" , '\'' , }, /* acute */
- { NULL , NULL , (char)0, },
-};
diff --git a/contrib/groff/src/devices/grohtml/html-text.cc b/contrib/groff/src/devices/grohtml/html-text.cc
deleted file mode 100644
index 0b63aa0a1b9d..000000000000
--- a/contrib/groff/src/devices/grohtml/html-text.cc
+++ /dev/null
@@ -1,829 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- *
- * Gaius Mulley (gaius@glam.ac.uk) wrote html-text.cc
- *
- * html-text.cc
- *
- * provide a troff like state machine interface which
- * generates html text.
- */
-
-/*
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "driver.h"
-#include "stringclass.h"
-#include "cset.h"
-
-#if !defined(TRUE)
-# define TRUE (1==1)
-#endif
-#if !defined(FALSE)
-# define FALSE (1==0)
-#endif
-
-
-#include "html-text.h"
-
-
-html_text::html_text (simple_output *op) :
- stackptr(NULL), lastptr(NULL), out(op), space_emitted(TRUE),
- current_indentation(-1), pageoffset(-1), linelength(-1)
-{
-}
-
-html_text::~html_text ()
-{
- flush_text();
-}
-
-/*
- * end_tag - shuts down the tag.
- */
-
-void html_text::end_tag (tag_definition *t)
-{
- switch (t->type) {
-
- case I_TAG: out->put_string("</i>"); break;
- case B_TAG: out->put_string("</b>"); break;
- case P_TAG: out->put_string("</p>").nl().enable_newlines(FALSE); break;
- case SUB_TAG: out->put_string("</sub>"); break;
- case SUP_TAG: out->put_string("</sup>"); break;
- case TT_TAG: out->put_string("</tt>"); break;
- case PRE_TAG: out->put_string("</pre>");
- if (! is_present(TABLE_TAG)) {
- out->nl();
- out->enable_newlines(TRUE);
- }
- break;
- case SMALL_TAG: out->put_string("</small>"); break;
- case BIG_TAG: out->put_string("</big>"); break;
- case TABLE_TAG: issue_table_end(); break;
-
- default:
- error("unrecognised tag");
- }
-}
-
-/*
- * issue_tag - writes out an html tag with argument.
- */
-
-void html_text::issue_tag (char *tagname, char *arg)
-{
- if ((arg == 0) || (strlen(arg) == 0)) {
- out->put_string(tagname);
- out->put_string(">");
- } else {
- out->put_string(tagname);
- out->put_string(" ");
- out->put_string(arg);
- out->put_string(">");
- }
-}
-
-/*
- * start_tag - starts a tag.
- */
-
-void html_text::start_tag (tag_definition *t)
-{
- switch (t->type) {
-
- case I_TAG: issue_tag("<i", t->arg1); break;
- case B_TAG: issue_tag("<b", t->arg1); break;
- case P_TAG: issue_tag("\n<p", t->arg1);
- out->enable_newlines(TRUE); break;
- case SUB_TAG: issue_tag("<sub", t->arg1); break;
- case SUP_TAG: issue_tag("<sup", t->arg1); break;
- case TT_TAG: issue_tag("<tt", t->arg1); break;
- case PRE_TAG: out->nl(); issue_tag("<pre", t->arg1);
- out->enable_newlines(FALSE); break;
- case SMALL_TAG: issue_tag("<small", t->arg1); break;
- case BIG_TAG: issue_tag("<big", t->arg1); break;
- case TABLE_TAG: issue_table_begin(t); break;
- case BREAK_TAG: break;
-
- default:
- error("unrecognised tag");
- }
-}
-
-int html_text::table_is_void (tag_definition *t)
-{
- if (linelength > 0) {
- return( current_indentation*100/linelength <= 0 );
- } else {
- return( FALSE );
- }
-}
-
-void html_text::issue_table_begin (tag_definition *t)
-{
- if (linelength > 0) {
- int width=current_indentation*100/linelength;
-
- if (width > 0) {
- out->put_string("<table width=\"100%\" border=0 rules=\"none\" frame=\"void\"\n cols=\"2\" cellspacing=\"0\" cellpadding=\"0\">").nl();
- out->put_string("<tr valign=\"top\" align=\"left\">").nl();
- if ((t->arg1 == 0) || (strcmp(t->arg1, "") == 0))
- out->put_string("<td width=\"").put_number(width).put_string("%\"></td>");
- else {
- out->put_string("<td width=\"").put_number(width).put_string("%\">").nl();
- out->put_string(t->arg1).put_string("</td>");
- t->arg1[0] = (char)0;
- }
- out->put_string("<td width=\"").put_number(100-width).put_string("%\">").nl();
- }
- }
-}
-
-void html_text::issue_table_end (void)
-{
- out->put_string("</td></table>").nl();
- out->enable_newlines(TRUE);
-}
-
-/*
- * flush_text - flushes html tags which are outstanding on the html stack.
- */
-
-void html_text::flush_text (void)
-{
- int notext=TRUE;
- tag_definition *p=stackptr;
-
- while (stackptr != 0) {
- notext = (notext && (! stackptr->text_emitted));
- if (! notext) {
- end_tag(stackptr);
- }
- p = stackptr;
- stackptr = stackptr->next;
- free(p);
- }
- lastptr = NULL;
-}
-
-/*
- * is_present - returns TRUE if tag is already present on the stack.
- */
-
-int html_text::is_present (HTML_TAG t)
-{
- tag_definition *p=stackptr;
-
- while (p != NULL) {
- if (t == p->type) {
- return( TRUE );
- }
- p = p->next;
- }
- return( FALSE );
-}
-
-/*
- * push_para - adds a new entry onto the html paragraph stack.
- */
-
-void html_text::push_para (HTML_TAG t, char *arg)
-{
- tag_definition *p=(tag_definition *)malloc(sizeof(tag_definition));
-
- p->type = t;
- p->arg1 = arg;
- p->text_emitted = FALSE;
-
- /*
- * if t is a P_TAG or TABLE_TAG or PRE_TAG make sure it goes on the end of the stack.
- * But we insist that a TABLE_TAG is always after a PRE_TAG
- * and that a P_TAG is always after a TABLE_TAG
- */
-
- if (((t == P_TAG) || (t == PRE_TAG) || (t == TABLE_TAG)) &&
- (lastptr != NULL)) {
- if (((lastptr->type == TABLE_TAG) && (t == PRE_TAG)) ||
- ((lastptr->type == P_TAG) && (t == TABLE_TAG))) {
- /*
- * insert p before the lastptr
- */
- if (stackptr == lastptr) {
- /*
- * only on element of the stack
- */
- p->next = stackptr;
- stackptr = p;
- } else {
- /*
- * more than one element is on the stack
- */
- tag_definition *q = stackptr;
-
- while (q->next != lastptr) {
- q = q->next;
- }
- q->next = p;
- p->next = lastptr;
- }
- } else {
- /*
- * store, p, at the end
- */
- lastptr->next = p;
- lastptr = p;
- p->next = NULL;
- }
- } else {
- p->next = stackptr;
- if (stackptr == NULL)
- lastptr = p;
- stackptr = p;
- }
-}
-
-/*
- * do_indent - remember the indent parameters and if
- * indent is > pageoff and indent has changed
- * then we start a html table to implement the indentation.
- */
-
-void html_text::do_indent (char *arg, int indent, int pageoff, int linelen)
-{
- if ((current_indentation != -1) &&
- (pageoffset+current_indentation != indent+pageoff)) {
- /*
- * actual indentation of text has changed, we need to put
- * a table tag onto the stack.
- */
- do_table(arg);
- }
- current_indentation = indent;
- pageoffset = pageoff;
- linelength = linelen;
-}
-
-void html_text::do_table (char *arg)
-{
- int in_pre = is_in_pre();
- // char *para_type = done_para();
- done_pre();
- shutdown(TABLE_TAG); // shutdown a previous table, if present
- remove_break();
- if (in_pre) {
- do_pre();
- }
- // do_para(para_type);
- push_para(TABLE_TAG, arg);
-}
-
-/*
- * done_table - terminates a possibly existing table.
- */
-
-void html_text::done_table (void)
-{
- shutdown(TABLE_TAG);
- space_emitted = TRUE;
-}
-
-/*
- * do_italic - changes to italic
- */
-
-void html_text::do_italic (void)
-{
- done_bold();
- done_tt();
- if (! is_present(I_TAG)) {
- push_para(I_TAG, "");
- }
-}
-
-/*
- * do_bold - changes to bold.
- */
-
-void html_text::do_bold (void)
-{
- done_italic();
- done_tt();
- if (! is_present(B_TAG)) {
- push_para(B_TAG, "");
- }
-}
-
-/*
- * do_tt - changes to teletype.
- */
-
-void html_text::do_tt (void)
-{
- done_bold();
- done_italic();
- if ((! is_present(TT_TAG)) && (! is_present(PRE_TAG))) {
- push_para(TT_TAG, "");
- }
-}
-
-/*
- * do_pre - changes to preformated text.
- */
-
-void html_text::do_pre (void)
-{
- done_bold();
- done_italic();
- done_tt();
- char *type = done_para();
- if (! is_present(PRE_TAG)) {
- push_para(PRE_TAG, "");
- }
-}
-
-/*
- * is_in_pre - returns TRUE if we are currently within a preformatted
- * <pre> block.
- */
-
-int html_text::is_in_pre (void)
-{
- return( is_present(PRE_TAG) );
-}
-
-/*
- * is_in_table - returns TRUE if we are currently within a table.
- */
-
-int html_text::is_in_table (void)
-{
- return( is_present(TABLE_TAG) );
-}
-
-/*
- * shutdown - shuts down an html tag.
- */
-
-char *html_text::shutdown (HTML_TAG t)
-{
- char *arg=NULL;
-
- if (is_present(t)) {
- tag_definition *p =stackptr;
- tag_definition *temp =NULL;
- int notext =TRUE;
-
- while ((stackptr != NULL) && (stackptr->type != t)) {
- notext = (notext && (! stackptr->text_emitted));
- if (! notext) {
- end_tag(stackptr);
- }
-
- /*
- * pop tag
- */
- p = stackptr;
- stackptr = stackptr->next;
- if (stackptr == NULL)
- lastptr = NULL;
-
- /*
- * push tag onto temp stack
- */
- p->next = temp;
- temp = p;
- }
-
- /*
- * and examine stackptr
- */
- if ((stackptr != NULL) && (stackptr->type == t)) {
- if (stackptr->text_emitted) {
- end_tag(stackptr);
- }
- if (t == P_TAG) {
- arg = stackptr->arg1;
- }
- p = stackptr;
- stackptr = stackptr->next;
- if (stackptr == NULL)
- lastptr = NULL;
- free(p);
- }
-
- /*
- * and restore unaffected tags
- */
- while (temp != NULL) {
- push_para(temp->type, temp->arg1);
- p = temp;
- temp = temp->next;
- free(p);
- }
- }
- return( arg );
-}
-
-/*
- * done_bold - shuts downs a bold tag.
- */
-
-void html_text::done_bold (void)
-{
- shutdown(B_TAG);
-}
-
-/*
- * done_italic - shuts downs an italic tag.
- */
-
-void html_text::done_italic (void)
-{
- shutdown(I_TAG);
-}
-
-/*
- * done_sup - shuts downs a sup tag.
- */
-
-void html_text::done_sup (void)
-{
- shutdown(SUP_TAG);
-}
-
-/*
- * done_sub - shuts downs a sub tag.
- */
-
-void html_text::done_sub (void)
-{
- shutdown(SUB_TAG);
-}
-
-/*
- * done_tt - shuts downs a tt tag.
- */
-
-void html_text::done_tt (void)
-{
- shutdown(TT_TAG);
-}
-
-/*
- * done_pre - shuts downs a pre tag.
- */
-
-void html_text::done_pre (void)
-{
- shutdown(PRE_TAG);
-}
-
-/*
- * done_small - shuts downs a small tag.
- */
-
-void html_text::done_small (void)
-{
- shutdown(SMALL_TAG);
-}
-
-/*
- * done_big - shuts downs a big tag.
- */
-
-void html_text::done_big (void)
-{
- shutdown(BIG_TAG);
-}
-
-/*
- * check_emit_text - ensures that all previous tags have been emitted (in order)
- * before the text is written.
- */
-
-void html_text::check_emit_text (tag_definition *t)
-{
- if ((t != NULL) && (! t->text_emitted)) {
- /*
- * we peep and see whether there is a <p> before the <table>
- * in which case we skip the <p>
- */
- if (t->type == TABLE_TAG) {
- if (table_is_void(t)) {
- tag_definition *n = t->next;
- remove_def(t);
- check_emit_text(n);
- } else {
- /*
- * a table which will be emitted, is there a <p> succeeding it?
- */
- if ((t->next != NULL) &&
- (t->next->type == P_TAG) &&
- ((t->next->arg1 == 0) || strcmp(t->next->arg1, "") == 0)) {
- /*
- * yes skip the <p>
- */
- check_emit_text(t->next->next);
- } else {
- check_emit_text(t->next);
- }
- t->text_emitted = TRUE;
- start_tag(t);
- }
- } else {
- check_emit_text(t->next);
- t->text_emitted = TRUE;
- start_tag(t);
- }
- }
-}
-
-/*
- * do_emittext - tells the class that text was written during the current tag.
- */
-
-void html_text::do_emittext (char *s, int length)
-{
- if ((! is_present(P_TAG)) && (! is_present(PRE_TAG)))
- do_para("");
-
- if (is_present(BREAK_TAG)) {
- int text = remove_break();
- check_emit_text(stackptr);
- if (text) {
- if (is_present(PRE_TAG)) {
- out->nl();
- } else {
- out->put_string("<br>").nl();
- }
- }
- } else {
- check_emit_text(stackptr);
- }
- out->put_string(s, length);
- space_emitted = FALSE;
-}
-
-/*
- * do_para- starts a new paragraph
- */
-
-void html_text::do_para (char *arg)
-{
- done_pre();
- if (! is_present(P_TAG)) {
- remove_sub_sup();
- if ((arg != 0) && (strcmp(arg, "") != 0)) {
- remove_tag(TABLE_TAG);
- }
- push_para(P_TAG, arg);
- space_emitted = TRUE;
- }
-}
-
-/*
- * done_para - shuts down a paragraph tag.
- */
-
-char *html_text::done_para (void)
-{
- space_emitted = TRUE;
- return( shutdown(P_TAG) );
-}
-
-/*
- * do_space - issues an end of paragraph
- */
-
-void html_text::do_space (void)
-{
- if (is_in_pre()) {
- do_emittext("", 0);
- } else {
- do_para(done_para());
- }
- space_emitted = TRUE;
-}
-
-/*
- * do_break - issue a break tag.
- */
-
-void html_text::do_break (void)
-{
- if (! is_present(PRE_TAG)) {
- if (emitted_text()) {
- if (! is_present(BREAK_TAG)) {
- push_para(BREAK_TAG, "");
- }
- }
- }
- space_emitted = TRUE;
-}
-
-/*
- * do_newline - issue a newline providing that we are inside a <pre> tag.
- */
-
-void html_text::do_newline (void)
-{
- if (is_present(PRE_TAG)) {
- do_emittext("\n", 1);
- space_emitted = TRUE;
- }
-}
-
-/*
- * emitted_text - returns FALSE if white space has just been written.
- */
-
-int html_text::emitted_text (void)
-{
- return( ! space_emitted);
-}
-
-/*
- * emit_space - writes a space providing that text was written beforehand.
- */
-
-int html_text::emit_space (void)
-{
- if (space_emitted) {
- if (is_present(PRE_TAG)) {
- do_emittext(" ", 1);
- }
- } else {
- out->space_or_newline();
- space_emitted = TRUE;
- }
-}
-
-/*
- * remove_def - removes a definition, t, from the stack.
- */
-
-void html_text::remove_def (tag_definition *t)
-{
- tag_definition *p = stackptr;
- tag_definition *l = 0;
- tag_definition *q = 0;
-
- while ((p != 0) && (p != t)) {
- l = p;
- p = p->next;
- }
- if ((p != 0) && (p == t)) {
- if (p == stackptr) {
- stackptr = stackptr->next;
- if (stackptr == NULL)
- lastptr = NULL;
- q = stackptr;
- } else if (l == 0) {
- error("stack list pointers are wrong");
- } else {
- l->next = p->next;
- q = p->next;
- if (l->next == NULL)
- lastptr = l;
- }
- free(p);
- }
-}
-
-/*
- * remove_tag - removes a tag from the stack.
- */
-
-void html_text::remove_tag (HTML_TAG tag)
-{
- tag_definition *p = stackptr;
-
- while ((p != 0) && (p->type != tag)) {
- p = p->next;
- }
- if ((p != 0) && (p->type == tag))
- remove_def(p);
-}
-
-/*
- * remove_sub_sup - removes a sub or sup tag, should either exist on the stack.
- */
-
-void html_text::remove_sub_sup (void)
-{
- if (is_present(SUB_TAG)) {
- remove_tag(SUB_TAG);
- }
- if (is_present(SUP_TAG)) {
- remove_tag(SUP_TAG);
- }
- if (is_present(PRE_TAG)) {
- remove_tag(PRE_TAG);
- }
-}
-
-/*
- * remove_break - break tags are not balanced thus remove it once it has been emitted.
- * It returns TRUE if text was emitted before the <br> was issued.
- */
-
-int html_text::remove_break (void)
-{
- tag_definition *p = stackptr;
- tag_definition *l = 0;
- tag_definition *q = 0;
-
- while ((p != 0) && (p->type != BREAK_TAG)) {
- l = p;
- p = p->next;
- }
- if ((p != 0) && (p->type == BREAK_TAG)) {
- if (p == stackptr) {
- stackptr = stackptr->next;
- if (stackptr == NULL)
- lastptr = NULL;
- q = stackptr;
- } else if (l == 0) {
- error("stack list pointers are wrong");
- } else {
- l->next = p->next;
- q = p->next;
- if (l->next == NULL)
- lastptr = l;
- }
- free(p);
- }
- /*
- * now determine whether text was issued before <br>
- */
- while (q != 0) {
- if (q->text_emitted) {
- return( TRUE );
- } else {
- q = q->next;
- }
- }
- return( FALSE );
-}
-
-/*
- * do_small - potentially inserts a <small> tag into the html stream.
- * However we check for a <big> tag, if present then we terminate it.
- * Otherwise a <small> tag is inserted.
- */
-
-void html_text::do_small (void)
-{
- if (is_present(BIG_TAG)) {
- done_big();
- } else {
- push_para(SMALL_TAG, "");
- }
-}
-
-/*
- * do_big - is the mirror image of do_small.
- */
-
-void html_text::do_big (void)
-{
- if (is_present(SMALL_TAG)) {
- done_small();
- } else {
- push_para(BIG_TAG, "");
- }
-}
-
-/*
- * do_sup - save a superscript tag on the stack of tags.
- */
-
-void html_text::do_sup (void)
-{
- push_para(SUP_TAG, "");
-}
-
-/*
- * do_sub - save a subscript tag on the stack of tags.
- */
-
-void html_text::do_sub (void)
-{
- push_para(SUB_TAG, "");
-}
-
diff --git a/contrib/groff/src/devices/grohtml/html-text.h b/contrib/groff/src/devices/grohtml/html-text.h
deleted file mode 100644
index c8ab2ac57ccf..000000000000
--- a/contrib/groff/src/devices/grohtml/html-text.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- *
- * Gaius Mulley (gaius@glam.ac.uk) wrote html-text.cc
- *
- * html-text.h
- *
- * provides a state machine interface which generates html text.
- */
-
-/*
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "html.h"
-
-/*
- * html tags
- */
-
-typedef enum {I_TAG, B_TAG, P_TAG, SUB_TAG, SUP_TAG, TT_TAG,
- PRE_TAG, SMALL_TAG, BIG_TAG, BREAK_TAG, TABLE_TAG} HTML_TAG;
-
-typedef struct tag_definition {
- HTML_TAG type;
- char *arg1;
- int text_emitted;
- tag_definition *next;
-} tag_definition ;
-
-/*
- * the state of the current paragraph.
- * It allows post-html.cc to request font changes, paragraph start/end
- * and emits balanced tags with a small amount of peephole optimization.
- */
-
-class html_text {
-public:
- html_text (simple_output *op);
- ~html_text (void);
- void flush_text (void);
- void do_emittext (char *s, int length);
- void do_italic (void);
- void do_bold (void);
- void do_roman (void);
- void do_tt (void);
- void do_pre (void);
- void do_small (void);
- void do_big (void);
- void do_para (char *arg1);
- void do_sup (void);
- void do_sub (void);
- void do_space (void);
- void do_break (void);
- void do_newline (void);
- void do_table (char *arg);
- void done_bold (void);
- void done_italic (void);
- char *done_para (void);
- void done_sup (void);
- void done_sub (void);
- void done_tt (void);
- void done_pre (void);
- void done_small (void);
- void done_big (void);
- void do_indent (char *arg, int indent, int pageoff, int linelen);
- int emitted_text (void);
- int emit_space (void);
- int is_in_pre (void);
- void remove_tag (HTML_TAG tag);
- void remove_sub_sup (void);
- void done_table (void);
- int is_in_table (void);
-
-private:
- tag_definition *stackptr; /* the current paragraph state */
- tag_definition *lastptr; /* the end of the stack */
- simple_output *out;
- int space_emitted;
- int current_indentation; /* current .in value */
- int pageoffset; /* .po value */
- int linelength; /* current line length */
-
- int is_present (HTML_TAG t);
- void end_tag (tag_definition *t);
- void start_tag (tag_definition *t);
- void push_para (HTML_TAG t, char *arg);
- char *shutdown (HTML_TAG t);
- void check_emit_text (tag_definition *t);
- int remove_break (void);
- void issue_tag (char *tagname, char *arg);
- void issue_table_begin (tag_definition *t);
- void issue_table_end (void);
- int table_is_void (tag_definition *t);
- void remove_def (tag_definition *t);
-};
diff --git a/contrib/groff/src/devices/grohtml/html.h b/contrib/groff/src/devices/grohtml/html.h
deleted file mode 100644
index 69b6e35eafc2..000000000000
--- a/contrib/groff/src/devices/grohtml/html.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#if !defined(HTML_H)
-# define HTML_H
-# undef DEBUGGING
-// # define DEBUGGING
-
-/*
- * class and structure needed to buffer words
- */
-
-struct word {
- char *s;
- word *next;
-
- word (const char *w, int n);
- ~word ();
-};
-
-class word_list {
-public:
- word_list ();
- int flush (FILE *f);
- void add_word (const char *s, int n);
- int get_length (void);
-
-private:
- int length;
- word *head;
- word *tail;
-};
-
-class simple_output {
-public:
- simple_output(FILE *, int max_line_length);
- simple_output &put_string(const char *, int);
- simple_output &put_string(const char *s);
- simple_output &put_troffps_char (const char *s);
- simple_output &put_translated_string(const char *s);
- simple_output &put_number(int);
- simple_output &put_float(double);
- simple_output &put_symbol(const char *);
- simple_output &put_literal_symbol(const char *);
- simple_output &set_fixed_point(int);
- simple_output &simple_comment(const char *);
- simple_output &begin_comment(const char *);
- simple_output &comment_arg(const char *);
- simple_output &end_comment();
- simple_output &set_file(FILE *);
- simple_output &include_file(FILE *);
- simple_output &copy_file(FILE *);
- simple_output &end_line();
- simple_output &put_raw_char(char);
- simple_output &special(const char *);
- simple_output &enable_newlines(int);
- simple_output &check_newline(int n);
- simple_output &nl(void);
- simple_output &space_or_newline (void);
- simple_output &begin_tag (void);
- FILE *get_file();
-private:
- FILE *fp;
- int max_line_length; // not including newline
- int col;
- int fixed_point;
- int newlines; // can we issue newlines automatically?
- word_list last_word;
-
- void flush_last_word (void);
- int check_space (const char *s, int n);
-};
-
-inline FILE *simple_output::get_file()
-{
- return fp;
-}
-
-#endif
diff --git a/contrib/groff/src/devices/grohtml/output.cc b/contrib/groff/src/devices/grohtml/output.cc
deleted file mode 100644
index 4c72bba7d35d..000000000000
--- a/contrib/groff/src/devices/grohtml/output.cc
+++ /dev/null
@@ -1,335 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- *
- * Gaius Mulley (gaius@glam.ac.uk) wrote output.cc
- * but it owes a huge amount of ideas and raw code from
- * James Clark (jjc@jclark.com) grops/ps.cc.
- *
- * output.cc
- *
- * provide the simple low level output routines needed by html.cc
- */
-
-/*
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "driver.h"
-#include "stringclass.h"
-#include "cset.h"
-
-#include <time.h>
-#include "html.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if !defined(TRUE)
-# define TRUE (1==1)
-#endif
-#if !defined(FALSE)
-# define FALSE (1==0)
-#endif
-
-/*
- * word - initialise a word and set next to NULL
- */
-
-word::word (const char *w, int n)
- : next(0)
-{
- s = (char *)malloc(n+1);
- strncpy(s, w, n);
- s[n] = (char)0;
-}
-
-/*
- * destroy word and the string copy.
- */
-
-word::~word ()
-{
- free(s);
-}
-
-/*
- * word_list - create an empty word list.
- */
-
-word_list::word_list ()
- : head(0), tail(0), length(0)
-{
-}
-
-/*
- * flush - flush a word list to a FILE, f, and return the
- * length of the buffered string.
- */
-
-int word_list::flush (FILE *f)
-{
- word *t;
- int len=length;
-
- while (head != 0) {
- t = head;
- head = head->next;
- fputs(t->s, f);
- delete t;
- }
- head = 0;
- tail = 0;
- length = 0;
-#if defined(DEBUGGING)
- fflush(f); // just for testing
-#endif
- return( len );
-}
-
-/*
- * add_word - adds a word to the outstanding word list.
- */
-
-void word_list::add_word (const char *s, int n)
-{
- if (head == 0) {
- head = new word(s, n);
- tail = head;
- } else {
- tail->next = new word(s, n);
- tail = tail->next;
- }
- length += n;
-}
-
-/*
- * get_length - returns the number of characters buffered
- */
-
-int word_list::get_length (void)
-{
- return( length );
-}
-
-/*
- * the classes and methods for simple_output manipulation
- */
-
-simple_output::simple_output(FILE *f, int n)
-: fp(f), max_line_length(n), col(0), fixed_point(0), newlines(0)
-{
-}
-
-simple_output &simple_output::set_file(FILE *f)
-{
- if (fp)
- fflush(fp);
- fp = f;
- return *this;
-}
-
-simple_output &simple_output::copy_file(FILE *infp)
-{
- int c;
- while ((c = getc(infp)) != EOF)
- putc(c, fp);
- return *this;
-}
-
-simple_output &simple_output::end_line()
-{
- flush_last_word();
- if (col != 0) {
- putc('\n', fp);
- col = 0;
- }
- return *this;
-}
-
-simple_output &simple_output::special(const char *s)
-{
- return *this;
-}
-
-simple_output &simple_output::simple_comment(const char *s)
-{
- flush_last_word();
- if (col != 0)
- putc('\n', fp);
- fputs("<!-- ", fp);
- fputs(s, fp);
- fputs(" -->\n", fp);
- col = 0;
- return *this;
-}
-
-simple_output &simple_output::begin_comment(const char *s)
-{
- flush_last_word();
- if (col != 0)
- putc('\n', fp);
- col = 0;
- put_string("<!--");
- space_or_newline();
- last_word.add_word(s, strlen(s));
- return *this;
-}
-
-simple_output &simple_output::end_comment()
-{
- flush_last_word();
- space_or_newline();
- put_string("-->").nl();
- return *this;
-}
-
-/*
- * check_newline - checks to see whether we are able to issue
- * a newline and that one is needed.
- */
-
-simple_output &simple_output::check_newline(int n)
-{
- if ((col + n + last_word.get_length() + 1 > max_line_length) && (newlines)) {
- fputc('\n', fp);
- col = last_word.flush(fp);
- }
-}
-
-/*
- * space_or_newline - will emit a newline or a space later on
- * depending upon the current column.
- */
-
-simple_output &simple_output::space_or_newline (void)
-{
-#if defined(DEBUGGING)
- fflush(fp); // just for testing
-#endif
- if ((col + last_word.get_length() + 1 > max_line_length) && (newlines)) {
- fputc('\n', fp);
- if (last_word.get_length() > 0) {
- col = last_word.flush(fp);
- } else {
- col = 0;
- }
- } else {
- if (last_word.get_length() != 0) {
- if (col > 0) {
- fputc(' ', fp);
- col++;
- }
- col += last_word.flush(fp);
- }
- }
-}
-
-/*
- * nl - writes a newline providing that we
- * are not in the first column.
- */
-
-simple_output &simple_output::nl (void)
-{
- space_or_newline();
- col += last_word.flush(fp);
- if (col != 0) {
- fputc('\n', fp);
- col = 0;
- }
- return *this ;
-}
-
-simple_output &simple_output::set_fixed_point(int n)
-{
- assert(n >= 0 && n <= 10);
- fixed_point = n;
- return *this;
-}
-
-simple_output &simple_output::put_raw_char(char c)
-{
- col += last_word.flush(fp);
- putc(c, fp);
- col++;
- return *this;
-}
-
-simple_output &simple_output::put_string(const char *s, int n)
-{
- last_word.add_word(s, n);
- return *this;
-}
-
-simple_output &simple_output::put_string(const char *s)
-{
- last_word.add_word(s, strlen(s));
- return *this;
-}
-
-simple_output &simple_output::put_number(int n)
-{
- char buf[1 + INT_DIGITS + 1];
- sprintf(buf, "%d", n);
- put_string(buf);
- return *this;
-}
-
-simple_output &simple_output::put_float(double d)
-{
- char buf[128];
-
- sprintf(buf, "%.4f", d);
- put_string(buf);
- return *this;
-}
-
-simple_output &simple_output::enable_newlines (int auto_newlines)
-{
- check_newline(0);
- newlines = auto_newlines;
- check_newline(0);
-}
-
-/*
- * flush_last_word - flushes the last word and adjusts the
- * col position. It will insert a newline
- * before the last word if allowed and if
- * necessary.
- */
-
-void simple_output::flush_last_word (void)
-{
- int len=last_word.get_length();
-
- if (len > 0) {
- if (newlines) {
- if (col + len + 1 > max_line_length) {
- fputs("\n", fp);
- col = 0;
- } else {
- fputs(" ", fp);
- col++;
- }
- len += last_word.flush(fp);
- } else {
- fputs(" ", fp);
- col++;
- col += last_word.flush(fp);
- }
- }
-}
diff --git a/contrib/groff/src/devices/grohtml/post-html.cc b/contrib/groff/src/devices/grohtml/post-html.cc
deleted file mode 100644
index 0237bfc10aa3..000000000000
--- a/contrib/groff/src/devices/grohtml/post-html.cc
+++ /dev/null
@@ -1,2933 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- *
- * Gaius Mulley (gaius@glam.ac.uk) wrote post-html.cc
- * but it owes a huge amount of ideas and raw code from
- * James Clark (jjc@jclark.com) grops/ps.cc.
- */
-
-/*
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "driver.h"
-#include "stringclass.h"
-#include "cset.h"
-#include "html.h"
-#include "html-chars.h"
-#include "html-text.h"
-
-#include <time.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <stdio.h>
-#include <fcntl.h>
-
-#if !defined(TRUE)
-# define TRUE (1==1)
-#endif
-#if !defined(FALSE)
-# define FALSE (1==0)
-#endif
-
-#define MAX_STRING_LENGTH 4096
-#define MAX_LINE_LENGTH 60 /* maximum characters we want in a line */
-#define SIZE_INCREMENT 2 /* font size increment <big> = +2 */
-#define BASE_POINT_SIZE 10 /* 10 points is the base size ie html size 3 */
-#define CENTER_TOLERANCE 2 /* how many pixels off center will we still */
-#define ANCHOR_TEMPLATE "heading%d" /* if simple anchor is set we use this */
-#define UNICODE_DESC_START 0x80 /* all character entities above this are */
- /* either encoded by their glyph names or if */
- /* there is no name then we use &#nnn; */
-#define INDENTATION /* #undef INDENTATION to remove .in handling */
-
-typedef enum {CENTERED, LEFT, RIGHT, INLINE} TAG_ALIGNMENT;
-
-/*
- * prototypes
- */
-
-void str_translate_to_html (font *f, char *buf, int buflen, char *str, int len, int and_single);
-char *get_html_translation (font *f, const char *name);
-
-
-static int auto_links = TRUE; /* by default we enable automatic links at */
- /* top of the document. */
-static int auto_rule = TRUE; /* by default we enable an automatic rule */
- /* at the top and bottom of the document */
-static int simple_anchors = FALSE; /* default to anchors with heading text */
-
-
-/*
- * start with a few favorites
- */
-
-void stop () {}
-
-static int min (int a, int b)
-{
- if (a < b) {
- return( a );
- } else {
- return( b );
- }
-}
-
-static int max (int a, int b)
-{
- if (a > b) {
- return( a );
- } else {
- return( b );
- }
-}
-
-/*
- * is_subsection - returns TRUE if a1..a2 is within b1..b2
- */
-
-static int is_subsection (int a1, int a2, int b1, int b2)
-{
- // easier to see whether this is not the case
- return( !((a1 < b1) || (a1 > b2) || (a2 < b1) || (a2 > b2)) );
-}
-
-/*
- * is_intersection - returns TRUE if range a1..a2 intersects with b1..b2
- */
-
-static int is_intersection (int a1, int a2, int b1, int b2)
-{
- // again easier to prove NOT outside limits
- return( ! ((a1 > b2) || (a2 < b1)) );
-}
-
-/*
- * is_digit - returns TRUE if character, ch, is a digit.
- */
-
-static int is_digit (char ch)
-{
- return( (ch >= '0') && (ch <= '9') );
-}
-
-/*
- * the classes and methods for maintaining a list of files.
- */
-
-struct file {
- FILE *fp;
- file *next;
-
- file (FILE *f);
-};
-
-/*
- * file - initialize all fields to NULL
- */
-
-file::file (FILE *f)
- : fp(f), next(0)
-{
-}
-
-class files {
-public:
- files ();
- FILE *get_file (void);
- void start_of_list (void);
- void move_next (void);
- void add_new_file (FILE *f);
-private:
- file *head;
- file *tail;
- file *ptr;
-};
-
-/*
- * files - create an empty list of files.
- */
-
-files::files ()
- : head(0), tail(0), ptr(0)
-{
-}
-
-/*
- * get_file - returns the FILE associated with ptr.
- */
-
-FILE *files::get_file (void)
-{
- if (ptr) {
- return( ptr->fp );
- } else {
- return( 0 );
- }
-}
-
-/*
- * start_of_list - reset the ptr to the start of the list.
- */
-
-void files::start_of_list (void)
-{
- ptr = head;
-}
-
-/*
- * move_next - moves the ptr to the next element on the list.
- */
-
-void files::move_next (void)
-{
- if (ptr != 0)
- ptr = ptr->next;
-}
-
-/*
- * add_new_file - adds a new file, f, to the list.
- */
-
-void files::add_new_file (FILE *f)
-{
- if (head == 0) {
- head = new file(f);
- tail = head;
- } else {
- tail->next = new file(f);
- tail = tail->next;
- }
- ptr = tail;
-}
-
-/*
- * the class and methods for styles
- */
-
-struct style {
- font *f;
- int point_size;
- int font_no;
- int height;
- int slant;
- style ();
- style (font *, int, int, int, int);
- int operator == (const style &) const;
- int operator != (const style &) const;
-};
-
-style::style()
- : f(0)
-{
-}
-
-style::style(font *p, int sz, int h, int sl, int no)
- : f(p), point_size(sz), font_no(no), height(h), slant(sl)
-{
-}
-
-int style::operator==(const style &s) const
-{
- return (f == s.f && point_size == s.point_size
- && height == s.height && slant == s.slant);
-}
-
-int style::operator!=(const style &s) const
-{
- return !(*this == s);
-}
-
-/*
- * the class and methods for retaining ascii text
- */
-
-struct char_block {
- enum { SIZE = 256 };
- char buffer[SIZE];
- int used;
- char_block *next;
-
- char_block();
-};
-
-char_block::char_block()
-: used(0), next(0)
-{
-}
-
-class char_buffer {
-public:
- char_buffer();
- ~char_buffer();
- char *add_string(char *, unsigned int);
-private:
- char_block *head;
- char_block *tail;
-};
-
-char_buffer::char_buffer()
-: head(0), tail(0)
-{
-}
-
-char_buffer::~char_buffer()
-{
- while (head != 0) {
- char_block *temp = head;
- head = head->next;
- delete temp;
- }
-}
-
-char *char_buffer::add_string (char *s, unsigned int length)
-{
- int i=0;
- unsigned int old_used;
-
- if (tail == 0) {
- tail = new char_block;
- head = tail;
- } else {
- if (tail->used + length+1 > char_block::SIZE) {
- tail->next = new char_block;
- tail = tail->next;
- }
- }
- // at this point we have a tail which is ready for the string.
- if (tail->used + length+1 > char_block::SIZE) {
- fatal("need to increase char_block::SIZE");
- }
-
- old_used = tail->used;
- do {
- tail->buffer[tail->used] = s[i];
- tail->used++;
- i++;
- length--;
- } while (length>0);
-
- // add terminating nul character
-
- tail->buffer[tail->used] = '\0';
- tail->used++;
-
- // and return start of new string
-
- return( &tail->buffer[old_used] );
-}
-
-/*
- * the classes and methods for maintaining glyph positions.
- */
-
-class text_glob {
-public:
- text_glob (style *s, char *string, unsigned int length,
- int min_vertical , int min_horizontal,
- int max_vertical , int max_horizontal,
- int is_html , int is_troff_command,
- int is_auto_image,
- int is_a_line , int thickness);
- text_glob (void);
- ~text_glob (void);
- int is_a_line (void);
- int is_a_tag (void);
- int is_raw (void);
- int is_eol (void);
- int is_auto_img (void);
- int is_br (void);
-
- style text_style;
- char *text_string;
- unsigned int text_length;
- int minv, maxv, minh, maxh;
- int is_raw_command; // should the text be sent directly to the device?
- int is_tag; // is this a .br, .sp, .tl etc
- int is_line; // is the command a <line>?
- int is_img_auto; // image created by eqn delim
- int thickness; // the thickness of a line
-};
-
-text_glob::text_glob (style *s, char *string, unsigned int length,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal,
- int is_html, int is_troff_command,
- int is_auto_image,
- int is_a_line, int line_thickness)
- : text_style(*s), text_string(string), text_length(length),
- minv(min_vertical), minh(min_horizontal), maxv(max_vertical), maxh(max_horizontal),
- is_raw_command(is_html), is_tag(is_troff_command), is_img_auto(is_auto_image),
- is_line(is_a_line), thickness(line_thickness)
-{
-}
-
-text_glob::text_glob ()
- : text_string(0), text_length(0), minv(-1), maxv(-1), minh(-1), maxh(-1),
- is_raw_command(FALSE), is_tag(FALSE), is_line(FALSE), thickness(0)
-{
-}
-
-text_glob::~text_glob ()
-{
-}
-
-/*
- * is_a_line - returns TRUE if glob should be converted into an <hr>
- */
-
-int text_glob::is_a_line (void)
-{
- return( is_line );
-}
-
-/*
- * is_a_tag - returns TRUE if glob contains a troff directive.
- */
-
-int text_glob::is_a_tag (void)
-{
- return( is_tag );
-}
-
-/*
- * is_eol - returns TRUE if glob contains the tag eol
- */
-
-int text_glob::is_eol (void)
-{
- return( is_tag && (strcmp(text_string, "html-tag:eol") == 0) );
-}
-
-/*
- * is_raw - returns TRUE if glob contains raw html.
- */
-
-int text_glob::is_raw (void)
-{
- return( is_raw_command );
-}
-
-/*
- * is_auto_img - returns TRUE if the glob contains an automatically
- * generated image.
- */
-
-int text_glob::is_auto_img (void)
-{
- return( is_img_auto );
-}
-
-/*
- * is_br - returns TRUE if the glob is a tag containing a .br
- */
-
-int text_glob::is_br (void)
-{
- return( is_a_tag() && (strcmp("html-tag:.br", text_string) == 0) );
-}
-
-/*
- * the class and methods used to construct ordered double linked lists.
- * In a previous implementation we used templates via #include "ordered-list.h",
- * but this does assume that all C++ compilers can handle this feature. Pragmatically
- * it is safer to assume this is not the case.
- */
-
-struct element_list {
- element_list *right;
- element_list *left;
- text_glob *datum;
- int lineno;
- int minv, maxv, minh, maxh;
-
- element_list (text_glob *d,
- int line_number,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal);
- element_list ();
-};
-
-element_list::element_list ()
- : right(0), left(0), datum(0), lineno(0), minv(-1), maxv(-1), minh(-1), maxh(-1)
-{
-}
-
-/*
- * element_list - create a list element assigning the datum and region parameters.
- */
-
-element_list::element_list (text_glob *in,
- int line_number,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal)
- : right(0), left(0), datum(in), lineno(line_number),
- minv(min_vertical), minh(min_horizontal), maxv(max_vertical), maxh(max_horizontal)
-{
-}
-
-class list {
-public:
- list ();
- ~list ();
- int is_less (element_list *a, element_list *b);
- void add (text_glob *in,
- int line_number,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal);
- void sub_move_right (void);
- void move_right (void);
- void move_left (void);
- int is_empty (void);
- int is_equal_to_tail (void);
- int is_equal_to_head (void);
- void start_from_head (void);
- void start_from_tail (void);
- text_glob *move_right_get_data (void);
- text_glob *move_left_get_data (void);
- text_glob *get_data (void);
-private:
- element_list *head;
- element_list *tail;
- element_list *ptr;
-};
-
-/*
- * list - construct an empty list.
- */
-
-list::list ()
- : head(0), tail(0), ptr(0)
-{
-}
-
-/*
- * ~list - destroy a complete list.
- */
-
-list::~list()
-{
- element_list *temp=head;
-
- do {
- temp = head;
- if (temp != 0) {
- head = head->right;
- delete temp;
- }
- } while ((head != 0) && (head != tail));
-}
-
-/*
- * is_less - returns TRUE if a is left of b if on the same line or
- * if a is higher up the page than b.
- */
-
-int list::is_less (element_list *a, element_list *b)
-{
- // was if (is_intersection(a->minv+1, a->maxv-1, b->minv+1, b->maxv-1)) {
- if (a->lineno < b->lineno) {
- return( TRUE );
- } else if (a->lineno > b->lineno) {
- return( FALSE );
- } else if (is_intersection(a->minv, a->maxv, b->minv, b->maxv)) {
- return( a->minh < b->minh );
- } else {
- return( a->maxv < b->maxv );
- }
-}
-
-/*
- * add - adds a datum to the list in the order specified by the region position.
- */
-
-void list::add (text_glob *in, int line_number, int min_vertical, int min_horizontal, int max_vertical, int max_horizontal)
-{
- // create a new list element with datum and position fields initialized
- element_list *t = new element_list(in, line_number, min_vertical, min_horizontal, max_vertical, max_horizontal);
- element_list *last;
-
- if (head == 0) {
- head = t;
- tail = t;
- t->left = t;
- t->right = t;
- } else {
- last = tail;
-
- while ((last != head) && (is_less(t, last))) {
- last = last->left;
- }
-
- if (is_less(t, last)) {
- t->right = last;
- last->left->right = t;
- t->left = last->left;
- last->left = t;
- // now check for a new head
- if (last == head) {
- head = t;
- }
- } else {
- // add t beyond last
- t->right = last->right;
- t->left = last;
- last->right->left = t;
- last->right = t;
- // now check for a new tail
- if (last == tail) {
- tail = t;
- }
- }
- }
-}
-
-/*
- * sub_move_right - removes the element which is currently pointed to by ptr
- * from the list and moves ptr to the right.
- */
-
-void list::sub_move_right (void)
-{
- element_list *t=ptr->right;
-
- if (head == tail) {
- head = 0;
- if (tail != 0) {
- delete tail;
- }
- tail = 0;
- ptr = 0;
- } else {
- if (head == ptr) {
- head = head->right;
- }
- if (tail == ptr) {
- tail = tail->left;
- }
- ptr->left->right = ptr->right;
- ptr->right->left = ptr->left;
- ptr=t;
- }
-}
-
-/*
- * start_from_head - assigns ptr to the head.
- */
-
-void list::start_from_head (void)
-{
- ptr = head;
-}
-
-/*
- * start_from_tail - assigns ptr to the tail.
- */
-
-void list::start_from_tail (void)
-{
- ptr = tail;
-}
-
-/*
- * is_empty - returns TRUE if the list has no elements.
- */
-
-int list::is_empty (void)
-{
- return( head == 0 );
-}
-
-/*
- * is_equal_to_tail - returns TRUE if the ptr equals the tail.
- */
-
-int list::is_equal_to_tail (void)
-{
- return( ptr == tail );
-}
-
-/*
- * is_equal_to_head - returns TRUE if the ptr equals the head.
- */
-
-int list::is_equal_to_head (void)
-{
- return( ptr == head );
-}
-
-/*
- * move_left - moves the ptr left.
- */
-
-void list::move_left (void)
-{
- ptr = ptr->left;
-}
-
-/*
- * move_right - moves the ptr right.
- */
-
-void list::move_right (void)
-{
- ptr = ptr->right;
-}
-
-/*
- * get_datum - returns the datum referenced via ptr.
- */
-
-text_glob* list::get_data (void)
-{
- return( ptr->datum );
-}
-
-/*
- * move_right_get_data - returns the datum referenced via ptr and moves
- * ptr right.
- */
-
-text_glob* list::move_right_get_data (void)
-{
- ptr = ptr->right;
- if (ptr == head) {
- return( 0 );
- } else {
- return( ptr->datum );
- }
-}
-
-/*
- * move_left_get_data - returns the datum referenced via ptr and moves
- * ptr right.
- */
-
-text_glob* list::move_left_get_data (void)
-{
- ptr = ptr->left;
- if (ptr == tail) {
- return( 0 );
- } else {
- return( ptr->datum );
- }
-}
-
-/*
- * page class and methods
- */
-
-class page {
-public:
- page (void);
- void add (style *s, char *string, unsigned int length,
- int line_number,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal);
- void add_html (style *s, char *string, unsigned int length,
- int line_number,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal);
- void add_tag (style *s, char *string, unsigned int length,
- int line_number,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal);
- void add_line (style *s,
- int line_number,
- int x1, int y1, int x2, int y2,
- int thickness);
- void dump_page (void); // debugging method
-
- // and the data
-
- list glyphs; // position of glyphs and specials on page
- char_buffer buffer; // all characters for this page
-};
-
-page::page()
-{
-}
-
-void page::add (style *s, char *string, unsigned int length,
- int line_number,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal)
-{
- if (length > 0) {
- text_glob *g=new text_glob(s, buffer.add_string(string, length), length,
- min_vertical, min_horizontal, max_vertical, max_horizontal,
- FALSE, FALSE, FALSE, FALSE, 0);
- glyphs.add(g, line_number, min_vertical, min_horizontal, max_vertical, max_horizontal);
- }
-}
-
-/*
- * add_html - add a raw html command, for example mailto, line, background, image etc.
- */
-
-void page::add_html (style *s, char *string, unsigned int length,
- int line_number,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal)
-{
- if (length > 0) {
- text_glob *g=new text_glob(s, buffer.add_string(string, length), length,
- min_vertical, min_horizontal, max_vertical, max_horizontal,
- TRUE, FALSE, FALSE, FALSE, 0);
- glyphs.add(g, line_number, min_vertical, min_horizontal, max_vertical, max_horizontal);
- }
-}
-
-/*
- * add_tag - adds a troff tag, for example: .tl .sp .br
- */
-
-void page::add_tag (style *s, char *string, unsigned int length,
- int line_number,
- int min_vertical, int min_horizontal,
- int max_vertical, int max_horizontal)
-{
- if (length > 0) {
- text_glob *g=new text_glob(s, buffer.add_string(string, length), length,
- min_vertical, min_horizontal, max_vertical, max_horizontal,
- FALSE, TRUE,
- (strncmp(string, "html-tag:.auto-image", 20) == 0),
- FALSE, 0);
- glyphs.add(g, line_number, min_vertical, min_horizontal, max_vertical, max_horizontal);
- }
-}
-
-/*
- * add_line - adds the <line> primitive providing that y1==y2
- */
-
-void page::add_line (style *s,
- int line_number,
- int x1, int y1, int x2, int y2,
- int thickness)
-{
- if (y1 == y2) {
- text_glob *g = new text_glob(s, "", 0,
- min(y1, y2), min(x1, y2), max(y1, y2), max(x1, x2),
- FALSE, TRUE, FALSE, FALSE, thickness);
- glyphs.add(g, line_number, min(y1, y2), min(x1, y2), max(y1, y2), max(x1, x2));
- }
-}
-
-/*
- * dump_page - dump the page contents for debugging purposes.
- */
-
-void page::dump_page(void)
-{
- text_glob *g;
-
- printf("\n\ndebugging start\n");
- glyphs.start_from_head();
- do {
- g = glyphs.get_data();
- printf("%s ", g->text_string);
- glyphs.move_right();
- } while (! glyphs.is_equal_to_head());
- printf("\ndebugging end\n\n");
-}
-
-/*
- * font classes and methods
- */
-
-class html_font : public font {
- html_font(const char *);
-public:
- int encoding_index;
- char *encoding;
- char *reencoded_name;
- ~html_font();
- static html_font *load_html_font(const char *);
-};
-
-html_font *html_font::load_html_font(const char *s)
-{
- html_font *f = new html_font(s);
- if (!f->load()) {
- delete f;
- return 0;
- }
- return f;
-}
-
-html_font::html_font(const char *nm)
-: font(nm)
-{
-}
-
-html_font::~html_font()
-{
-}
-
-/*
- * a simple class to contain the header to this document
- */
-
-class title_desc {
-public:
- title_desc ();
- ~title_desc ();
-
- int has_been_written;
- int has_been_found;
- char text[MAX_STRING_LENGTH];
-};
-
-
-title_desc::title_desc ()
- : has_been_written(FALSE), has_been_found(FALSE)
-{
-}
-
-title_desc::~title_desc ()
-{
-}
-
-class header_desc {
-public:
- header_desc ();
- ~header_desc ();
-
- int no_of_headings; // how many headings have we found?
- char_buffer headings; // all the headings used in the document
- list headers; // list of headers built from .NH and .SH
- int header_level; // current header level
- int written_header; // have we written the header yet?
- char header_buffer[MAX_STRING_LENGTH]; // current header text
-
- void write_headings (FILE *f, int force);
-};
-
-header_desc::header_desc ()
- : no_of_headings(0), header_level(2), written_header(0)
-{
-}
-
-header_desc::~header_desc ()
-{
-}
-
-/*
- * write_headings - emits a list of links for the headings in this document
- */
-
-void header_desc::write_headings (FILE *f, int force)
-{
- text_glob *g;
-
- if (auto_links || force) {
- if (! headers.is_empty()) {
- int h=1;
-
- headers.start_from_head();
- do {
- g = headers.get_data();
- fputs("<a href=\"#", f);
- if (simple_anchors)
- fprintf(f, ANCHOR_TEMPLATE, h);
- else
- fputs(g->text_string, f);
- h++;
- fputs("\">", f);
- fputs(g->text_string, f);
- fputs("</a><br>\n", f);
- headers.move_right();
- } while (! headers.is_equal_to_head());
- fputs("\n", f);
- }
- }
-}
-
-class html_printer : public printer {
- files file_list;
- simple_output html;
- int res;
- int space_char_index;
- int no_of_printed_pages;
- int paper_length;
- enum { SBUF_SIZE = 8192 };
- char sbuf[SBUF_SIZE];
- int sbuf_len;
- int sbuf_start_hpos;
- int sbuf_vpos;
- int sbuf_end_hpos;
- int sbuf_kern;
- style sbuf_style;
- style output_style;
- int output_hpos;
- int output_vpos;
- int output_vpos_max;
- int output_draw_point_size;
- int line_thickness;
- int output_line_thickness;
- unsigned char output_space_code;
- string defs;
- char *inside_font_style;
- int page_number;
- title_desc title;
- title_desc indent; // use title class to remember $1 of .ip
- header_desc header;
- int header_indent;
- int supress_sub_sup;
- int cutoff_heading;
- page *page_contents;
- html_text *current_paragraph;
- int end_center;
- int end_tempindent;
- TAG_ALIGNMENT next_tag;
- int fill_on;
- int linelength;
- int pageoffset;
- int indentation;
- int prev_indent;
- int pointsize;
- int vertical_spacing;
- int line_number;
-
- void flush_sbuf ();
- void set_style (const style &);
- void set_space_code (unsigned char c);
- void do_exec (char *, const environment *);
- void do_import (char *, const environment *);
- void do_def (char *, const environment *);
- void do_mdef (char *, const environment *);
- void do_file (char *, const environment *);
- void set_line_thickness (const environment *);
- void terminate_current_font (void);
- void flush_font (void);
- void add_char_to_sbuf (unsigned char code);
- void add_to_sbuf (unsigned char code, const char *name);
- void write_title (int in_head);
- void determine_diacritical_mark (const char *name, const environment *env);
- int sbuf_continuation (unsigned char code, const char *name, const environment *env, int w);
- char *remove_last_char_from_sbuf ();
- int seen_backwards_escape (char *s, int l);
- void flush_page (void);
- void troff_tag (text_glob *g);
- void flush_globs (void);
- void emit_line (text_glob *g);
- void emit_raw (text_glob *g);
- void translate_to_html (text_glob *g);
- void determine_space (text_glob *g);
- void start_font (const char *name);
- void end_font (const char *name);
- int is_font_courier (font *f);
- int is_courier_until_eol (void);
- void start_size (int from, int to);
- void do_font (text_glob *g);
- void do_center (char *arg);
- void do_break (void);
- void do_eol (void);
- void do_title (void);
- void do_fill (int on);
- void do_heading (char *arg);
- void write_header (void);
- void determine_header_level (int level);
- void do_linelength (char *arg);
- void do_pageoffset (char *arg);
- void do_indentation (char *arg);
- void do_tempindent (char *arg);
- void do_indentedparagraph (void);
- void do_verticalspacing (char *arg);
- void do_pointsize (char *arg);
- void do_centered_image (void);
- void do_left_image (void);
- void do_right_image (void);
- void do_auto_image (text_glob *g, const char *filename);
- void do_links (void);
- void do_flush (void);
- int is_in_middle (int left, int right);
- void do_sup_or_sub (text_glob *g);
- int start_subscript (text_glob *g);
- int end_subscript (text_glob *g);
- int start_superscript (text_glob *g);
- int end_superscript (text_glob *g);
-
- // ADD HERE
-
-public:
- html_printer ();
- ~html_printer ();
- void set_char (int i, font *f, const environment *env, int w, const char *name);
- void draw (int code, int *p, int np, const environment *env);
- void begin_page (int);
- void end_page (int);
- void special (char *arg, const environment *env, char type);
- font *make_font (const char *);
- void end_of_line ();
-};
-
-printer *make_printer()
-{
- return new html_printer;
-}
-
-static void usage(FILE *stream);
-
-void html_printer::set_style(const style &sty)
-{
- const char *fontname = sty.f->get_name();
- if (fontname == 0)
- fatal("no internalname specified for font");
-
-#if 0
- change_font(fontname, (font::res/(72*font::sizescale))*sty.point_size);
-#endif
-}
-
-void html_printer::end_of_line()
-{
- flush_sbuf();
- line_number++;
-}
-
-/*
- * emit_line - writes out a horizontal rule.
- */
-
-void html_printer::emit_line (text_glob *g)
-{
- // --fixme-- needs to know the length in percentage
- html.put_string("<hr>");
-}
-
-/*
- * emit_raw - writes the raw html information directly to the device.
- */
-
-void html_printer::emit_raw (text_glob *g)
-{
- do_font(g);
- if (next_tag == INLINE) {
- determine_space(g);
- current_paragraph->do_emittext(g->text_string, g->text_length);
- } else {
- int in_table=current_paragraph->is_in_table();
-
- current_paragraph->done_para();
- switch (next_tag) {
-
- case CENTERED:
- current_paragraph->do_para("align=center");
- break;
- case LEFT:
- current_paragraph->do_para("align=left");
- break;
- case RIGHT:
- current_paragraph->do_para("align=right");
- break;
- default:
- fatal("unknown enumeration");
- }
- current_paragraph->do_emittext(g->text_string, g->text_length);
- current_paragraph->done_para();
- next_tag = INLINE;
- supress_sub_sup = TRUE;
-#if defined(INDENTATION)
- if (in_table) {
- stop();
- current_paragraph->do_indent(NULL, 0, pageoffset, linelength);
- current_paragraph->do_indent(indent.text, indentation, pageoffset, linelength);
- }
-#endif
- }
-}
-
-/*
- * do_center - handle the .ce commands from troff.
- */
-
-void html_printer::do_center (char *arg)
-{
- int n = atoi(arg);
-
- current_paragraph->do_break();
- current_paragraph->done_para();
- supress_sub_sup = TRUE;
-
- if (n > 0) {
- current_paragraph->do_para("align=center");
- end_center += n;
- } else {
- end_center = 0;
- }
-}
-
-/*
- * do_centered_image - set a flag such that the next html-tag is
- * placed inside a centered paragraph.
- */
-
-void html_printer::do_centered_image (void)
-{
- next_tag = CENTERED;
-}
-
-/*
- * do_right_image - set a flag such that the next html-tag is
- * placed inside a right aligned paragraph.
- */
-
-void html_printer::do_right_image (void)
-{
- next_tag = RIGHT;
-}
-
-/*
- * do_left_image - set a flag such that the next html-tag is
- * placed inside a left aligned paragraph.
- */
-
-void html_printer::do_left_image (void)
-{
- next_tag = LEFT;
-}
-
-/*
- * exists - returns TRUE if filename exists.
- */
-
-static int exists (const char *filename)
-{
- FILE *fp = fopen(filename, "r");
-
- if (fp == 0) {
- return( FALSE );
- } else {
- fclose(fp);
- return( TRUE );
- }
-}
-
-/*
- * generate_img_src - returns a html image tag for the filename
- * providing that the image exists.
- */
-
-static char *generate_img_src (const char *filename)
-{
- static char buffer[MAX_STRING_LENGTH];
-
- while (filename && (filename[0] == ' ')) {
- filename++;
- }
- if (exists(filename)) {
- strcpy(buffer, "<img src=\"");
- strncat(buffer, filename, MAX_STRING_LENGTH-strlen("<img src=\"")-1);
- if (strlen(buffer) < MAX_STRING_LENGTH-3) {
- strncat(buffer, "\">", 3);
- }
- return( (char *)&buffer );
- } else {
- return( 0 );
- }
-}
-
-/*
- * do_auto_image - tests whether the image, indicated by filename,
- * is present, if so then it emits an html image tag.
- * An image tag may be passed through from pic, eqn
- * but the corresponding image might not be created.
- * Consider .EQ delim $$ .EN or an empty .PS .PE.
- */
-
-void html_printer::do_auto_image (text_glob *g, const char *filename)
-{
- char *buffer = generate_img_src(filename);
-
- if (buffer) {
- /*
- * utilize emit_raw by creating a new text_glob.
- */
- text_glob h = *g;
-
- h.text_string = buffer;
- h.text_length = strlen(buffer);
- emit_raw(&h);
- } else {
- next_tag = INLINE;
- }
-}
-
-/*
- * do_title - handle the .tl commands from troff.
- */
-
-void html_printer::do_title (void)
-{
- text_glob *t;
- int removed_from_head;
- char buf[MAX_STRING_LENGTH];
-
- if (page_number == 1) {
- int found_title_start = FALSE;
- if (! page_contents->glyphs.is_empty()) {
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- do {
- t = page_contents->glyphs.get_data();
- removed_from_head = FALSE;
- if (t->is_auto_img()) {
- char *img=generate_img_src((char *)(t->text_string + 20));
-
- if (img) {
- if (found_title_start) {
- strcat(title.text, " ");
- }
- found_title_start = TRUE;
- title.has_been_found = TRUE;
- strcat(title.text, img);
- }
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- removed_from_head = ((!page_contents->glyphs.is_empty()) &&
- (page_contents->glyphs.is_equal_to_head()));
- } else if (t->is_raw_command) {
- /* skip raw commands
- */
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- } else if (t->is_eol()) {
- /* end of title found
- */
- title.has_been_found = TRUE;
- return;
- } else if (t->is_a_tag()) {
- /* end of title found, but move back so that we read this tag and process it
- */
- page_contents->glyphs.move_left(); /* move backwards to last word */
- title.has_been_found = TRUE;
- return;
- } else if (found_title_start) {
- strcat(title.text, " ");
- str_translate_to_html(t->text_style.f, buf, MAX_STRING_LENGTH, t->text_string, t->text_length, TRUE);
- strcat(title.text, buf);
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- removed_from_head = ((!page_contents->glyphs.is_empty()) &&
- (page_contents->glyphs.is_equal_to_head()));
- } else {
- str_translate_to_html(t->text_style.f, buf, MAX_STRING_LENGTH, t->text_string, t->text_length, TRUE);
- strcpy((char *)title.text, buf);
- found_title_start = TRUE;
- title.has_been_found = TRUE;
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- removed_from_head = ((!page_contents->glyphs.is_empty()) &&
- (page_contents->glyphs.is_equal_to_head()));
- }
- } while ((! page_contents->glyphs.is_equal_to_head()) || (removed_from_head));
- }
- // page_contents->glyphs.move_left(); /* move backwards to last word */
- }
-}
-
-void html_printer::write_header (void)
-{
- if (strlen(header.header_buffer) > 0) {
- if (header.header_level > 7) {
- header.header_level = 7;
- }
-
- // firstly we must terminate any font and type faces
- current_paragraph->done_para();
- current_paragraph->done_table();
- supress_sub_sup = TRUE;
-
- if (cutoff_heading+2 > header.header_level) {
- // now we save the header so we can issue a list of links
- header.no_of_headings++;
- style st;
-
- text_glob *h=new text_glob(&st,
- header.headings.add_string(header.header_buffer, strlen(header.header_buffer)),
- strlen(header.header_buffer),
- header.no_of_headings, header.header_level,
- header.no_of_headings, header.header_level,
- FALSE, FALSE, FALSE, FALSE, FALSE);
- header.headers.add(h,
- header.no_of_headings,
- header.no_of_headings, header.no_of_headings,
- header.no_of_headings, header.no_of_headings); // and add this header to the header list
-
- // lastly we generate a tag
-
- html.nl().put_string("<a name=\"");
- if (simple_anchors) {
- char buffer[MAX_LINE_LENGTH];
-
- sprintf(buffer, ANCHOR_TEMPLATE, header.no_of_headings);
- html.put_string(buffer);
- } else {
- html.put_string(header.header_buffer);
- }
- html.put_string("\"></a>").nl();
- }
-
- // and now we issue the real header
- html.put_string("<h");
- html.put_number(header.header_level);
- html.put_string(">");
- html.put_string(header.header_buffer);
- html.put_string("</h");
- html.put_number(header.header_level);
- html.put_string(">").nl();
-
- current_paragraph->do_para("");
- }
-}
-
-void html_printer::determine_header_level (int level)
-{
- if (level == 0) {
- int i;
- int l=strlen(header.header_buffer);
-
- for (i=0; ((i<l) && ((header.header_buffer[i] == '.') || is_digit(header.header_buffer[i]))) ; i++) {
- if (header.header_buffer[i] == '.') {
- level++;
- }
- }
- }
- header.header_level = level+1;
-}
-
-/*
- * do_heading - handle the .SH and .NH and equivalent commands from troff.
- */
-
-void html_printer::do_heading (char *arg)
-{
- text_glob *g;
- text_glob *l = 0;
- char buf[MAX_STRING_LENGTH];
- int level=atoi(arg);
-
- strcpy(header.header_buffer, "");
- page_contents->glyphs.move_right();
- if (! page_contents->glyphs.is_equal_to_head()) {
- g = page_contents->glyphs.get_data();
- do {
- if (g->is_auto_img()) {
- char *img=generate_img_src((char *)(g->text_string + 20));
-
- if (img) {
- simple_anchors = TRUE; // we cannot use full heading anchors with images
- if (l != 0) {
- strcat(header.header_buffer, " ");
- }
- l = g;
- strcat(header.header_buffer, img);
- }
- } else if (! (g->is_a_line() || g->is_a_tag() || g->is_raw())) {
- /*
- * we ignore raw commands when constructing a heading
- */
- if (l != 0) {
- strcat(header.header_buffer, " ");
- }
- l = g;
- str_translate_to_html(g->text_style.f, buf, MAX_STRING_LENGTH, g->text_string, g->text_length, TRUE);
- strcat(header.header_buffer, (char *)buf);
- }
- page_contents->glyphs.move_right();
- g = page_contents->glyphs.get_data();
- } while ((! page_contents->glyphs.is_equal_to_head()) &&
- (! g->is_br()));
- }
-
- determine_header_level(level);
- write_header();
-
- // finally set the output to neutral for after the header
- g = page_contents->glyphs.get_data();
- page_contents->glyphs.move_left(); // so that next time we use old g
-}
-
-/*
- * is_courier_until_eol - returns TRUE if we can see a whole line which is courier
- */
-
-int html_printer::is_courier_until_eol (void)
-{
- text_glob *orig = page_contents->glyphs.get_data();
- int result = TRUE;
- text_glob *g;
-
- if (! page_contents->glyphs.is_equal_to_tail()) {
- page_contents->glyphs.move_right();
- do {
- g = page_contents->glyphs.get_data();
- if (! is_font_courier(g->text_style.f)) {
- result = FALSE;
- }
- page_contents->glyphs.move_right();
- } while ((result) &&
- (! page_contents->glyphs.is_equal_to_head()) &&
- (! g->is_eol()));
-
- /*
- * now restore our previous position.
- */
- while (page_contents->glyphs.get_data() != orig) {
- page_contents->glyphs.move_left();
- }
- }
- return( result );
-}
-
-/*
- * do_linelength - handle the .ll command from troff.
- */
-
-void html_printer::do_linelength (char *arg)
-{
-#if defined(INDENTATION)
- if (fill_on) {
- linelength = atoi(arg);
- current_paragraph->do_indent(indent.text, indentation, pageoffset, linelength);
- }
-#endif
-}
-
-/*
- * do_pageoffset - handle the .po command from troff.
- */
-
-void html_printer::do_pageoffset (char *arg)
-{
-#if defined(INDENTATION)
- pageoffset = atoi(arg);
- if (fill_on) {
- current_paragraph->do_indent(indent.text, indentation, pageoffset, linelength);
- }
-#endif
-}
-
-/*
- * do_indentation - handle the .in command from troff.
- */
-
-void html_printer::do_indentation (char *arg)
-{
-#if defined(INDENTATION)
- if (fill_on) {
- indentation = atoi(arg);
- current_paragraph->do_indent(indent.text, indentation, pageoffset, linelength);
- }
-#endif
-}
-
-/*
- * do_tempindent - handle the .ti command from troff.
- */
-
-void html_printer::do_tempindent (char *arg)
-{
-#if defined(INDENTATION)
- if (fill_on) {
- end_tempindent = 1;
- prev_indent = indentation;
- indentation = atoi(arg);
- current_paragraph->do_indent(indent.text, indentation, pageoffset, linelength);
- }
-#endif
-}
-
-/*
- * do_indentedparagraph - handle the .ip tag, this buffers the next line
- * and passes this to text-text as the left hand
- * column table entry.
- */
-
-void html_printer::do_indentedparagraph (void)
-{
-#if defined(INDENTATION)
- text_glob *t;
- int removed_from_head;
- char buf[MAX_STRING_LENGTH];
- int found_indent_start = FALSE;
-
- indent.has_been_found = FALSE;
- indent.text[0] = (char)0;
-
- if (! page_contents->glyphs.is_empty()) {
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- do {
- t = page_contents->glyphs.get_data();
- removed_from_head = FALSE;
- if (t->is_auto_img()) {
- char *img=generate_img_src((char *)(t->text_string + 20));
-
- if (img) {
- if (found_indent_start) {
- strcat(indent.text, " ");
- }
- found_indent_start = TRUE;
- strcat(indent.text, img);
- }
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- } else if (t->is_raw_command) {
- /* skip raw commands
- */
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- } else if (t->is_a_tag() && (strncmp(t->text_string, "html-tag:.br", 12) == 0)) {
- /* end of indented para found, but move back so that we read this tag and process it
- */
- page_contents->glyphs.move_left(); /* move backwards to last word */
- indent.has_been_found = TRUE;
- return;
- } else if (t->is_a_tag()) {
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- } else if (found_indent_start) {
- strcat(indent.text, " ");
- str_translate_to_html(t->text_style.f, buf, MAX_STRING_LENGTH, t->text_string, t->text_length, TRUE);
- strcat(indent.text, buf);
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- removed_from_head = ((!page_contents->glyphs.is_empty()) &&
- (page_contents->glyphs.is_equal_to_head()));
- } else {
- str_translate_to_html(t->text_style.f, buf, MAX_STRING_LENGTH, t->text_string, t->text_length, TRUE);
- strcpy((char *)indent.text, buf);
- found_indent_start = TRUE;
- indent.has_been_found = TRUE;
- page_contents->glyphs.sub_move_right(); /* move onto next word */
- removed_from_head = ((!page_contents->glyphs.is_empty()) &&
- (page_contents->glyphs.is_equal_to_head()));
- }
- } while ((! page_contents->glyphs.is_equal_to_head()) || (removed_from_head));
- }
- // page_contents->glyphs.move_left(); /* move backwards to last word */
-#endif
-}
-
-/*
- * do_verticalspacing - handle the .vs command from troff.
- */
-
-void html_printer::do_verticalspacing (char *arg)
-{
- vertical_spacing = atoi(arg);
-}
-
-/*
- * do_pointsize - handle the .ps command from troff.
- */
-
-void html_printer::do_pointsize (char *arg)
-{
- pointsize = atoi(arg);
-}
-
-/*
- * do_fill - records whether troff has requested that text be filled.
- */
-
-void html_printer::do_fill (int on)
-{
- current_paragraph->do_break();
- output_hpos = indentation+pageoffset;
- supress_sub_sup = TRUE;
-
- if (fill_on != on) {
- if (on) {
- current_paragraph->done_pre();
- } else {
- current_paragraph->do_pre();
- }
- }
- fill_on = on;
-}
-
-/*
- * do_eol - handle the end of line
- */
-
-void html_printer::do_eol (void)
-{
- if (! fill_on) {
- current_paragraph->do_newline();
- current_paragraph->do_break();
- }
- output_hpos = indentation+pageoffset;
- if (end_center > 0) {
- if (end_center > 1) {
- current_paragraph->do_break();
- }
- end_center--;
- if (end_center == 0) {
- current_paragraph->done_para();
- supress_sub_sup = TRUE;
- }
- }
-}
-
-/*
- * do_flush - flushes all output and tags.
- */
-
-void html_printer::do_flush (void)
-{
- current_paragraph->done_para();
- current_paragraph->done_table();
-}
-
-/*
- * do_links - moves onto a new temporary file and sets auto_links to FALSE.
- */
-
-void html_printer::do_links (void)
-{
- current_paragraph->done_para();
- current_paragraph->done_table();
- auto_links = FALSE; /* from now on only emit under user request */
-#if !defined(DEBUGGING)
- file_list.add_new_file(xtmpfile());
- html.set_file(file_list.get_file());
-#endif
-}
-
-/*
- * do_break - handles the ".br" request and also
- * undoes an outstanding ".ti" command.
- */
-
-void html_printer::do_break (void)
-{
- current_paragraph->do_break();
-#if defined(INDENTATION)
- if (end_tempindent > 0) {
- end_tempindent--;
- if (end_tempindent == 0) {
- indentation = prev_indent;
- current_paragraph->do_indent(indent.text, indentation, pageoffset, linelength);
- }
- }
-#endif
- output_hpos = indentation+pageoffset;
- supress_sub_sup = TRUE;
-}
-
-/*
- * troff_tag - processes the troff tag and manipulates the troff state machine.
- */
-
-void html_printer::troff_tag (text_glob *g)
-{
- /*
- * firstly skip over html-tag:
- */
- char *t=(char *)g->text_string+9;
-
- if (g->is_eol()) {
- do_eol();
- } else if (strncmp(t, ".sp", 3) == 0) {
- current_paragraph->do_space();
- supress_sub_sup = TRUE;
- } else if (strncmp(t, ".br", 3) == 0) {
- do_break();
- } else if (strcmp(t, ".centered-image") == 0) {
- do_centered_image();
- } else if (strcmp(t, ".right-image") == 0) {
- do_right_image();
- } else if (strcmp(t, ".left-image") == 0) {
- do_left_image();
- } else if (strncmp(t, ".auto-image", 11) == 0) {
- char *a = (char *)t+11;
- do_auto_image(g, a);
- } else if (strncmp(t, ".ce", 3) == 0) {
- char *a = (char *)t+3;
- supress_sub_sup = TRUE;
- do_center(a);
- } else if (strncmp(t, ".tl", 3) == 0) {
- supress_sub_sup = TRUE;
- do_title();
- } else if (strncmp(t, ".fi", 3) == 0) {
- do_fill(TRUE);
- } else if (strncmp(t, ".nf", 3) == 0) {
- do_fill(FALSE);
- } else if ((strncmp(t, ".SH", 3) == 0) || (strncmp(t, ".NH", 3) == 0)) {
- char *a = (char *)t+3;
- do_heading(a);
- } else if (strncmp(t, ".ll", 3) == 0) {
- char *a = (char *)t+3;
- do_linelength(a);
- } else if (strncmp(t, ".po", 3) == 0) {
- char *a = (char *)t+3;
- do_pageoffset(a);
- } else if (strncmp(t, ".in", 3) == 0) {
- char *a = (char *)t+3;
- do_indentation(a);
- } else if (strncmp(t, ".ti", 3) == 0) {
- char *a = (char *)t+3;
- do_tempindent(a);
- } else if (strncmp(t, ".vs", 3) == 0) {
- char *a = (char *)t+3;
- do_verticalspacing(a);
- } else if (strncmp(t, ".ip", 3) == 0) {
- do_indentedparagraph();
- } else if (strcmp(t, ".links") == 0) {
- do_links();
- }
-}
-
-/*
- * is_in_middle - returns TRUE if the positions left..right are in the center of the page.
- */
-
-int html_printer::is_in_middle (int left, int right)
-{
- return( abs(abs(left-pageoffset) - abs(pageoffset+linelength-right)) <= CENTER_TOLERANCE );
-}
-
-/*
- * flush_globs - runs through the text glob list and emits html.
- */
-
-void html_printer::flush_globs (void)
-{
- text_glob *g;
-
- if (! page_contents->glyphs.is_empty()) {
- page_contents->glyphs.start_from_head();
- do {
- g = page_contents->glyphs.get_data();
-
- if (strcmp(g->text_string, "XXXXXXX") == 0) {
- stop();
- }
-
- if (g->is_raw()) {
- emit_raw(g);
- } else if (g->is_a_tag()) {
- troff_tag(g);
- } else if (g->is_a_line()) {
- emit_line(g);
- } else {
- translate_to_html(g);
- }
- /*
- * after processing the title (and removing it) the glyph list might be empty
- */
- if (! page_contents->glyphs.is_empty()) {
- page_contents->glyphs.move_right();
- }
- } while (! page_contents->glyphs.is_equal_to_head());
- }
-}
-
-void html_printer::flush_page (void)
-{
- supress_sub_sup = TRUE;
- flush_sbuf();
- // page_contents->dump_page();
- flush_globs();
- current_paragraph->done_para();
- current_paragraph->done_table();
-
- // move onto a new page
- delete page_contents;
- page_contents = new page;
-}
-
-/*
- * determine_space - works out whether we need to write a space.
- * If last glyth is ajoining then no space emitted.
- */
-
-void html_printer::determine_space (text_glob *g)
-{
- if (current_paragraph->is_in_pre()) {
- int space_width = sbuf_style.f->get_space_width(sbuf_style.point_size);
- /*
- * .nf has been specified
- */
- while (output_hpos < g->minh) {
- output_hpos += space_width;
- current_paragraph->emit_space();
- }
- } else {
- if ((output_vpos != g->minv) || (output_hpos < g->minh)) {
- current_paragraph->emit_space();
- }
- }
-}
-
-/*
- * is_font_courier - returns TRUE if the font, f, is courier.
- */
-
-int html_printer::is_font_courier (font *f)
-{
- if (f != 0) {
- const char *fontname = f->get_name();
-
- return( (fontname != 0) && (fontname[0] == 'C') );
- }
- return( FALSE );
-}
-
-/*
- * end_font - shuts down the font corresponding to fontname.
- */
-
-void html_printer::end_font (const char *fontname)
-{
- if (strcmp(fontname, "B") == 0) {
- current_paragraph->done_bold();
- } else if (strcmp(fontname, "I") == 0) {
- current_paragraph->done_italic();
- } else if (strcmp(fontname, "BI") == 0) {
- current_paragraph->done_bold();
- current_paragraph->done_italic();
- } else if (strcmp(fontname, "CR") == 0) {
- current_paragraph->done_tt();
- current_paragraph->done_pre();
- }
-}
-
-/*
- * start_font - starts the font corresponding to name.
- */
-
-void html_printer::start_font (const char *fontname)
-{
- if (strcmp(fontname, "R") == 0) {
- current_paragraph->done_bold();
- current_paragraph->done_italic();
- current_paragraph->done_tt();
- } else if (strcmp(fontname, "B") == 0) {
- current_paragraph->do_bold();
- } else if (strcmp(fontname, "I") == 0) {
- current_paragraph->do_italic();
- } else if (strcmp(fontname, "BI") == 0) {
- current_paragraph->do_bold();
- current_paragraph->do_italic();
- } else if (strcmp(fontname, "CR") == 0) {
- if ((! fill_on) && (is_courier_until_eol())) {
- current_paragraph->do_pre();
- }
- current_paragraph->do_tt();
- }
-}
-
-/*
- * start_size - from is old font size, to is the new font size.
- * The html increase <big> and <small> decrease alters the
- * font size by 20%. We try and map these onto glyph sizes.
- */
-
-void html_printer::start_size (int from, int to)
-{
- if (from < to) {
- while (from < to) {
- current_paragraph->do_big();
- from += SIZE_INCREMENT;
- }
- } else if (from > to) {
- while (from > to) {
- current_paragraph->do_small();
- from -= SIZE_INCREMENT;
- }
- }
-}
-
-/*
- * do_font - checks to see whether we need to alter the html font.
- */
-
-void html_printer::do_font (text_glob *g)
-{
- /*
- * check if the output_style.point_size has not been set yet
- * this allow users to place .ps at the top of their troff files
- * and grohtml can then treat the .ps value as the base font size (3)
- */
- if (output_style.point_size == -1) {
- output_style.point_size = pointsize;
- }
-
- if (g->text_style.f != output_style.f) {
- if (output_style.f != 0) {
- end_font(output_style.f->get_name());
- }
- output_style.f = g->text_style.f;
- if (output_style.f != 0) {
- start_font(output_style.f->get_name());
- }
- }
- if (output_style.point_size != g->text_style.point_size) {
- do_sup_or_sub(g);
- if ((output_style.point_size > 0) &&
- (g->text_style.point_size > 0)) {
- start_size(output_style.point_size, g->text_style.point_size);
- }
- if (g->text_style.point_size > 0) {
- output_style.point_size = g->text_style.point_size;
- }
- }
-}
-
-/*
- * start_subscript - returns TRUE if, g, looks like a subscript start.
- */
-
-int html_printer::start_subscript (text_glob *g)
-{
- int r = font::res;
- int height = output_style.point_size*r/72;
-
- return( (output_style.point_size != 0) &&
- (output_vpos < g->minv) &&
- (output_vpos-height > g->maxv) &&
- (output_style.point_size > g->text_style.point_size) );
-}
-
-/*
- * start_superscript - returns TRUE if, g, looks like a superscript start.
- */
-
-int html_printer::start_superscript (text_glob *g)
-{
- int r = font::res;
- int height = output_style.point_size*r/72;
-
- return( (output_style.point_size != 0) &&
- (output_vpos > g->minv) &&
- (output_vpos-height < g->maxv) &&
- (output_style.point_size > g->text_style.point_size) );
-}
-
-/*
- * end_subscript - returns TRUE if, g, looks like the end of a subscript.
- */
-
-int html_printer::end_subscript (text_glob *g)
-{
- int r = font::res;
- int height = output_style.point_size*r/72;
-
- return( (output_style.point_size != 0) &&
- (g->minv < output_vpos) &&
- (output_vpos-height > g->maxv) &&
- (output_style.point_size < g->text_style.point_size) );
-}
-
-/*
- * end_superscript - returns TRUE if, g, looks like the end of a superscript.
- */
-
-int html_printer::end_superscript (text_glob *g)
-{
- int r = font::res;
- int height = output_style.point_size*r/72;
-
- return( (output_style.point_size != 0) &&
- (g->minv > output_vpos) &&
- (output_vpos-height < g->maxv) &&
- (output_style.point_size < g->text_style.point_size) );
-}
-
-/*
- * do_sup_or_sub - checks to see whether the next glyph is a subscript/superscript
- * start/end and it calls the services of html-text to issue the
- * appropriate tags.
- */
-
-void html_printer::do_sup_or_sub (text_glob *g)
-{
- if (! supress_sub_sup) {
- if (start_subscript(g)) {
- current_paragraph->do_sub();
- } else if (start_superscript(g)) {
- current_paragraph->do_sup();
- } else if (end_subscript(g)) {
- current_paragraph->done_sub();
- } else if (end_superscript(g)) {
- current_paragraph->done_sup();
- }
- }
-}
-
-/*
- * translate_to_html - translates a textual string into html text
- */
-
-void html_printer::translate_to_html (text_glob *g)
-{
- char buf[MAX_STRING_LENGTH];
-
- do_font(g);
- determine_space(g);
- str_translate_to_html(g->text_style.f, buf, MAX_STRING_LENGTH,
- g->text_string, g->text_length, TRUE);
- current_paragraph->do_emittext(buf, strlen(buf));
- output_vpos = g->minv;
- output_hpos = g->maxh;
- output_vpos_max = g->maxv;
- supress_sub_sup = FALSE;
-}
-
-/*
- * flush_sbuf - flushes the current sbuf into the list of glyphs.
- */
-
-void html_printer::flush_sbuf()
-{
- if (sbuf_len > 0) {
- int r=font::res; // resolution of the device
- set_style(sbuf_style);
-
- page_contents->add(&sbuf_style, sbuf, sbuf_len,
- line_number,
- sbuf_vpos-sbuf_style.point_size*r/72, sbuf_start_hpos,
- sbuf_vpos , sbuf_end_hpos);
-
- output_hpos = sbuf_end_hpos;
- output_vpos = sbuf_vpos;
- sbuf_len = 0;
- }
-}
-
-void html_printer::set_line_thickness(const environment *env)
-{
- line_thickness = env->size;
-}
-
-void html_printer::draw(int code, int *p, int np, const environment *env)
-{
- switch (code) {
-
- case 'l':
- if (np == 2) {
- page_contents->add_line(&sbuf_style,
- line_number,
- env->hpos, env->vpos, env->hpos+p[0], env->vpos+p[1], line_thickness);
- } else {
- error("2 arguments required for line");
- }
- break;
- case 't':
- {
- if (np == 0) {
- line_thickness = -1;
- } else {
- // troff gratuitously adds an extra 0
- if (np != 1 && np != 2) {
- error("0 or 1 argument required for thickness");
- break;
- }
- line_thickness = p[0];
- }
- break;
- }
-
- case 'P':
- // fall through
- case 'p':
- {
-#if 0
- if (np & 1) {
- error("even number of arguments required for polygon");
- break;
- }
- if (np == 0) {
- error("no arguments for polygon");
- break;
- }
- // firstly lets add our current position to polygon
- int oh=env->hpos;
- int ov=env->vpos;
- int i=0;
-
- while (i<np) {
- p[i+0] += oh;
- p[i+1] += ov;
- oh = p[i+0];
- ov = p[i+1];
- i += 2;
- }
- // now store polygon in page
- page_contents->add_polygon(code, np, p, env->hpos, env->vpos, env->size, fill);
-#endif
- }
- break;
- case 'E':
- // fall through
- case 'e':
-#if 0
- if (np != 2) {
- error("2 arguments required for ellipse");
- break;
- }
- page_contents->add_line(code,
- env->hpos, env->vpos-p[1]/2, env->hpos+p[0], env->vpos+p[1]/2,
- env->size, fill);
-#endif
- break;
- case 'C':
- // fill circle
-
- case 'c':
- {
-#if 0
- // troff adds an extra argument to C
- if (np != 1 && !(code == 'C' && np == 2)) {
- error("1 argument required for circle");
- break;
- }
- page_contents->add_line(code,
- env->hpos, env->vpos-p[0]/2, env->hpos+p[0], env->vpos+p[0]/2,
- env->size, fill);
-#endif
- }
- break;
- case 'a':
- {
-#if 0
- if (np == 4) {
- double c[2];
-
- if (adjust_arc_center(p, c)) {
- page_contents->add_arc('a', env->hpos, env->vpos, p, c, env->size, fill);
- } else {
- // a straignt line
- page_contents->add_line('l', env->hpos, env->vpos, p[0]+p[2], p[1]+p[3], env->size, fill);
- }
- } else {
- error("4 arguments required for arc");
- }
-#endif
- }
- break;
- case '~':
- {
-#if 0
- if (np & 1) {
- error("even number of arguments required for spline");
- break;
- }
- if (np == 0) {
- error("no arguments for spline");
- break;
- }
- // firstly lets add our current position to spline
- int oh=env->hpos;
- int ov=env->vpos;
- int i=0;
-
- while (i<np) {
- p[i+0] += oh;
- p[i+1] += ov;
- oh = p[i+0];
- ov = p[i+1];
- i += 2;
- }
- page_contents->add_spline('~', env->hpos, env->vpos, np, p, env->size, fill);
-#endif
- }
- break;
- case 'f':
- {
-#if 0
- if (np != 1 && np != 2) {
- error("1 argument required for fill");
- break;
- }
- fill = p[0];
- if (fill < 0 || fill > FILL_MAX) {
- // This means fill with the current color.
- fill = FILL_MAX + 1;
- }
-#endif
- break;
- }
-
- default:
- error("unrecognised drawing command `%1'", char(code));
- break;
- }
-}
-
-html_printer::html_printer()
-: html(0, MAX_LINE_LENGTH),
- no_of_printed_pages(0),
- sbuf_len(0),
- output_hpos(-1),
- output_vpos(-1),
- output_vpos_max(-1),
- line_thickness(-1),
- inside_font_style(0),
- page_number(0),
- header_indent(-1),
- supress_sub_sup(TRUE),
- cutoff_heading(100),
- end_center(0),
- end_tempindent(0),
- next_tag(INLINE),
- fill_on(TRUE),
- pageoffset(0),
- indentation(0),
- prev_indent(0),
- linelength(0),
- line_number(0)
-{
-#if defined(DEBUGGING)
- file_list.add_new_file(stdout);
-#else
- file_list.add_new_file(xtmpfile());
-#endif
- html.set_file(file_list.get_file());
- if (font::hor != 24)
- fatal("horizontal resolution must be 24");
- if (font::vert != 40)
- fatal("vertical resolution must be 40");
-#if 0
- // should be sorted html..
- if (font::res % (font::sizescale*72) != 0)
- fatal("res must be a multiple of 72*sizescale");
-#endif
- int r = font::res;
- int point = 0;
- while (r % 10 == 0) {
- r /= 10;
- point++;
- }
- res = r;
- html.set_fixed_point(point);
- space_char_index = font::name_to_index("space");
- paper_length = font::paperlength;
- linelength = font::res*13/2;
- if (paper_length == 0)
- paper_length = 11*font::res;
-
- page_contents = new page();
-}
-
-/*
- * add_char_to_sbuf - adds a single character to the sbuf.
- */
-
-void html_printer::add_char_to_sbuf (unsigned char code)
-{
- if (sbuf_len < SBUF_SIZE) {
- sbuf[sbuf_len] = code;
- sbuf_len++;
- } else {
- fatal("need to increase SBUF_SIZE");
- }
-}
-
-/*
- * add_to_sbuf - adds character code or name to the sbuf.
- */
-
-void html_printer::add_to_sbuf (unsigned char code, const char *name)
-{
- if (name == 0) {
- add_char_to_sbuf(code);
- } else {
- if (sbuf_style.f != NULL) {
- char *html_glyph = get_html_translation(sbuf_style.f, name);
-
- if (html_glyph == NULL) {
- add_char_to_sbuf(code);
- } else {
- int l = strlen(html_glyph);
- int i;
-
- // Escape the name, so that "&" doesn't get expanded to "&amp;"
- // later during translate_to_html.
- add_char_to_sbuf('\\'); add_char_to_sbuf('(');
-
- for (i=0; i<l; i++) {
- add_char_to_sbuf(html_glyph[i]);
- }
- add_char_to_sbuf('\\'); add_char_to_sbuf(')');
- }
- }
- }
-}
-
-int html_printer::sbuf_continuation (unsigned char code, const char *name,
- const environment *env, int w)
-{
- if (sbuf_end_hpos == env->hpos) {
- add_to_sbuf(code, name);
- sbuf_end_hpos += w + sbuf_kern;
- return( TRUE );
- } else {
- if ((sbuf_len < SBUF_SIZE-1) && (env->hpos >= sbuf_end_hpos) &&
- ((sbuf_kern == 0) || (sbuf_end_hpos - sbuf_kern != env->hpos))) {
- /*
- * lets see whether a space is needed or not
- */
- int space_width = sbuf_style.f->get_space_width(sbuf_style.point_size);
-
- if (env->hpos-sbuf_end_hpos < space_width/2) {
- add_to_sbuf(code, name);
- sbuf_end_hpos = env->hpos + w;
- return( TRUE );
- }
- }
- }
- return( FALSE );
-}
-
-/*
- * seen_backwards_escape - returns TRUE if we can see a escape at position i..l in s
- */
-
-int html_printer::seen_backwards_escape (char *s, int l)
-{
- /*
- * this is tricky so it is broken into components for clarity
- * (we let the compiler put in all back into a complex expression)
- */
- if ((l>0) && (sbuf[l] == '(') && (sbuf[l-1] == '\\')) {
- /*
- * ok seen '\(' but we must now check for '\\('
- */
- if ((l>1) && (sbuf[l-2] == '\\')) {
- /*
- * escaped the escape
- */
- return( FALSE );
- } else {
- return( TRUE );
- }
- } else {
- return( FALSE );
- }
-}
-
-/*
- * reverse - return reversed string.
- */
-
-char *reverse (char *s)
-{
- int i=0;
- int j=strlen(s)-1;
- char t;
-
- while (i<j) {
- t = s[i];
- s[i] = s[j];
- s[j] = t;
- i++;
- j--;
- }
- return( s );
-}
-
-/*
- * remove_last_char_from_sbuf - removes the last character from sbuf.
- */
-
-char *html_printer::remove_last_char_from_sbuf ()
-{
- int l=sbuf_len;
- static char last[MAX_STRING_LENGTH];
-
- if (l>0) {
- l--;
- if ((sbuf[l] == ')') && (l>0) && (sbuf[l-1] == '\\')) {
- /*
- * found terminating escape
- */
- int i=0;
-
- l -= 2;
- while ((l>0) && (! seen_backwards_escape(sbuf, l))) {
- if (sbuf[l] == '\\') {
- if (sbuf[l-1] == '\\') {
- last[i] = sbuf[l];
- i++;
- l--;
- }
- } else {
- last[i] = sbuf[l];
- i++;
- }
- l--;
- }
- last[i] = (char)0;
- sbuf_len = l;
- if (seen_backwards_escape(sbuf, l)) {
- sbuf_len--;
- }
- return( reverse(last) );
- } else {
- if ((sbuf[l] == '\\') && (l>0) && (sbuf[l-1] == '\\')) {
- l -= 2;
- sbuf_len = l;
- return( "\\" );
- } else {
- sbuf_len--;
- last[0] = sbuf[sbuf_len];
- last[1] = (char)0;
- return( last );
- }
- }
- } else {
- return( NULL );
- }
-}
-
-/*
- * get_html_translation - given the position of the character and its name
- * return the device encoding for such character.
- */
-
-char *get_html_translation (font *f, const char *name)
-{
- int index;
-
- if ((f == 0) || (name == 0) || (strcmp(name, "") == 0)) {
- return( NULL );
- } else {
- index = f->name_to_index((char *)name);
- if (index == 0) {
- error("character `%s' not found", name);
- return( NULL );
- } else {
- if (f->contains(index)) {
- return( (char *)f->get_special_device_encoding(index) );
- } else {
- return( NULL );
- }
- }
- }
-}
-
-/*
- * to_unicode - returns a unicode translation of char, ch.
- */
-
-static char *to_unicode (unsigned char ch)
-{
- static char buf[20];
-
- sprintf(buf, "&#%u;", (unsigned int)ch);
- return( buf );
-}
-
-/*
- * char_translate_to_html - convert a single non escaped character
- * into the appropriate html character.
- */
-
-int char_translate_to_html (font *f, char *buf, int buflen, unsigned char ch, int b, int and_single)
-{
- if (and_single) {
- int t, l;
- char *translation;
- char name[2];
-
- name[0] = ch;
- name[1] = (char)0;
- translation = get_html_translation(f, name);
- if ((translation == NULL) && (ch >= UNICODE_DESC_START)) {
- translation = to_unicode(ch);
- }
- if (translation) {
- l = strlen(translation);
- t = max(0, min(l, buflen-b));
- strncpy(&buf[b], translation, t);
- b += t;
- } else {
- if (b<buflen) {
- buf[b] = ch;
- b++;
- }
- }
- } else {
- /*
- * do not attempt to encode single characters
- */
- if (b<buflen) {
- buf[b] = ch;
- b++;
- }
- }
- return( b );
-}
-
-/*
- * str_translate_to_html - converts a string, str, into html text. It places
- * the output input buffer, buf. It truncates string, str, if
- * there is not enough space in buf.
- * It looks up the html character encoding of single characters
- * if, and_single, is TRUE. Characters such as < > & etc.
- */
-
-void str_translate_to_html (font *f, char *buf, int buflen, char *str, int len, int and_single)
-{
- char *translation;
- int e;
- char escaped_char[MAX_STRING_LENGTH];
- int l;
- int i=0;
- int b=0;
- int t=0;
-
-#if 0
- if (strcmp(str, "``@,;:\\\\()[]''") == 0) {
- stop();
- }
-#endif
- while (str[i] != (char)0) {
- if ((str[i]=='\\') && (i+1<len)) {
- i++; // skip the leading backslash
- if (str[i] == '(') {
- // start of escape
- i++;
- e = 0;
- while ((str[i] != (char)0) &&
- (! ((str[i] == '\\') && (i+1<len) && (str[i+1] == ')')))) {
- if (str[i] == '\\') {
- i++;
- }
- escaped_char[e] = str[i];
- e++;
- i++;
- }
- if ((str[i] == '\\') && (i+1<len) && (str[i+1] == ')')) {
- i += 2;
- }
- escaped_char[e] = (char)0;
- if (e > 0) {
- translation = get_html_translation(f, escaped_char);
- if (translation) {
- l = strlen(translation);
- t = max(0, min(l, buflen-b));
- strncpy(&buf[b], translation, t);
- b += t;
- } else {
- int index=f->name_to_index(escaped_char);
-
- if (f->contains(index) && (index != 0)) {
- buf[b] = f->get_code(index);
- b++;
- }
- }
- }
- } else {
- b = char_translate_to_html(f, buf, buflen, str[i], b, and_single);
- i++;
- }
- } else {
- b = char_translate_to_html(f, buf, buflen, str[i], b, and_single);
- i++;
- }
- }
- buf[min(b, buflen)] = (char)0;
-}
-
-/*
- * set_char - adds a character into the sbuf if it is a continuation with the previous
- * word otherwise flush the current sbuf and add character anew.
- */
-
-void html_printer::set_char(int i, font *f, const environment *env, int w, const char *name)
-{
- unsigned char code = f->get_code(i);
-
-#if 0
- if (code == ' ') {
- stop();
- }
-#endif
- style sty(f, env->size, env->height, env->slant, env->fontno);
- if (sty.slant != 0) {
- if (sty.slant > 80 || sty.slant < -80) {
- error("silly slant `%1' degrees", sty.slant);
- sty.slant = 0;
- }
- }
- if ((sbuf_len > 0) && (sbuf_len < SBUF_SIZE) && (sty == sbuf_style) &&
- (sbuf_vpos == env->vpos) && (sbuf_continuation(code, name, env, w))) {
- return;
- } else {
- flush_sbuf();
- sbuf_len = 0;
- add_to_sbuf(code, name);
- sbuf_end_hpos = env->hpos + w;
- sbuf_start_hpos = env->hpos;
- sbuf_vpos = env->vpos;
- sbuf_style = sty;
- sbuf_kern = 0;
- }
-}
-
-/*
- * write_title - writes the title to this document
- */
-
-void html_printer::write_title (int in_head)
-{
- if (title.has_been_found) {
- if (in_head) {
- html.put_string("<title>");
- html.put_string(title.text);
- html.put_string("</title>").nl().nl();
- } else {
- title.has_been_written = TRUE;
- html.put_string("<h1 align=center>");
- html.put_string(title.text);
- html.put_string("</h1>").nl().nl();
- }
- } else if (in_head) {
- // place empty title tags to help conform to `tidy'
- html.put_string("<title></title>").nl();
- }
-}
-
-/*
- * write_rule - emits a html rule tag, if the auto_rule boolean is true.
- */
-
-static void write_rule (void)
-{
- if (auto_rule)
- fputs("<hr>\n", stdout);
-}
-
-void html_printer::begin_page(int n)
-{
- page_number = n;
-#if defined(DEBUGGING)
- html.begin_comment("Page: ").put_string(i_to_a(page_number)).end_comment();;
-#endif
- no_of_printed_pages++;
-
- output_style.f = 0;
- output_style.point_size= -1;
- output_space_code = 32;
- output_draw_point_size = -1;
- output_line_thickness = -1;
- output_hpos = -1;
- output_vpos = -1;
- output_vpos_max = -1;
- current_paragraph = new html_text(&html);
-#if defined(INDENTATION)
- current_paragraph->do_indent(indent.text, indentation, pageoffset, linelength);
-#endif
- current_paragraph->do_para("");
-}
-
-void html_printer::end_page(int)
-{
- flush_sbuf();
- flush_page();
-}
-
-font *html_printer::make_font(const char *nm)
-{
- return html_font::load_html_font(nm);
-}
-
-html_printer::~html_printer()
-{
- current_paragraph->flush_text();
- html.end_line();
- html.set_file(stdout);
- /*
- * 'HTML: The definitive guide', O'Reilly, p47. advises against specifying
- * the dtd, so for the moment I'll leave this commented out.
- * If requested we could always emit it if a command line switch
- * was present.
- *
- * fputs("<!doctype html public \"-//IETF//DTD HTML 4.0//EN\">\n", stdout);
- */
- fputs("<html>\n", stdout);
- fputs("<head>\n", stdout);
- fputs("<meta name=\"generator\" content=\"groff -Thtml, see www.gnu.org\">\n", stdout);
- fputs("<meta name=\"Content-Style\" content=\"text/css\">\n", stdout);
- write_title(TRUE);
- fputs("</head>\n", stdout);
- fputs("<body>\n\n", stdout);
- write_title(FALSE);
- header.write_headings(stdout, FALSE);
- write_rule();
- {
- extern const char *Version_string;
- html.begin_comment("Creator : ")
- .put_string("groff ")
- .put_string("version ")
- .put_string(Version_string)
- .end_comment();
- }
- {
-#ifdef LONG_FOR_TIME_T
- long
-#else
- time_t
-#endif
- t = time(0);
- html.begin_comment("CreationDate: ")
- .put_string(ctime(&t), strlen(ctime(&t))-1)
- .end_comment();
- }
-#if defined(DEBUGGING)
- html.begin_comment("Total number of pages: ").put_string(i_to_a(no_of_printed_pages)).end_comment();
-#endif
- html.end_line();
- html.end_line();
- /*
- * now run through the file list copying each temporary file in turn and emitting the links.
- */
- file_list.start_of_list();
- while (file_list.get_file() != 0) {
- if (fseek(file_list.get_file(), 0L, 0) < 0)
- fatal("fseek on temporary file failed");
- html.copy_file(file_list.get_file());
- fclose(file_list.get_file());
- file_list.move_next();
- if (file_list.get_file() != 0)
- header.write_headings(stdout, TRUE);
- }
- write_rule();
- fputs("</body>\n", stdout);
- fputs("</html>\n", stdout);
-}
-
-/*
- * special - handle all x X requests from troff. For post-html they allow users
- * to pass raw html commands, turn auto linked headings off/on and
- * also allow troff to emit tags to indicate when a: .br, .sp etc occurs.
- */
-
-void html_printer::special(char *s, const environment *env, char type)
-{
- if (type != 'p')
- return;
- if (s != 0) {
- flush_sbuf();
- if (env->fontno >= 0) {
- style sty(get_font_from_index(env->fontno), env->size, env->height, env->slant, env->fontno);
- sbuf_style = sty;
- }
-
- if (strncmp(s, "html:", 5) == 0) {
- int r=font::res; /* resolution of the device */
- char buf[MAX_STRING_LENGTH];
- font *f=sbuf_style.f;
-
- if (f == NULL) {
- int found=FALSE;
-
- f = font::load_font("TR", &found);
- }
- str_translate_to_html(f, buf, MAX_STRING_LENGTH,
- &s[5], strlen(s)-5, FALSE);
-
- /*
- * need to pass rest of string through to html output during flush
- */
- page_contents->add_html(&sbuf_style, buf, strlen(buf),
- line_number,
- env->vpos-env->size*r/72, env->hpos,
- env->vpos , env->hpos);
-
- /*
- * assume that the html command has no width, if it does then hopefully troff
- * will have fudged this in a macro by requesting that the formatting move right by
- * the appropriate width.
- */
- } else if (strncmp(s, "index:", 6) == 0) {
- cutoff_heading = atoi(&s[6]);
- } else if (strncmp(s, "html-tag:", 9) == 0) {
- int r=font::res; /* resolution of the device */
-
- page_contents->add_tag(&sbuf_style, s, strlen(s),
- line_number,
- env->vpos-env->size*r/72, env->hpos,
- env->vpos , env->hpos);
- }
- }
-}
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int c;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((c = getopt_long(argc, argv, "o:i:F:vd?lrn", long_options, NULL))
- != EOF)
- switch(c) {
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU post-grohtml (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'F':
- font::command_line_font_dir(optarg);
- break;
- case 'l':
- auto_links = FALSE;
- break;
- case 'r':
- auto_rule = FALSE;
- break;
- case 'o':
- /* handled by pre-html */
- break;
- case 'i':
- /* handled by pre-html */
- break;
- case 'n':
- simple_anchors = TRUE;
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
- if (optind >= argc) {
- do_file("-");
- } else {
- for (int i = optind; i < argc; i++)
- do_file(argv[i]);
- }
- delete pr;
- return 0;
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [-vld?n] [-F dir] [files ...]\n",
- program_name);
-}
diff --git a/contrib/groff/src/devices/grolbp/Makefile.sub b/contrib/groff/src/devices/grolbp/Makefile.sub
deleted file mode 100644
index d60008b297e9..000000000000
--- a/contrib/groff/src/devices/grolbp/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=grolbp
-MAN1=grolbp.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=lbp.o
-CCSRCS=$(srcdir)/lbp.cc
diff --git a/contrib/groff/src/devices/grolbp/charset.h b/contrib/groff/src/devices/grolbp/charset.h
deleted file mode 100644
index adc76f4282d0..000000000000
--- a/contrib/groff/src/devices/grolbp/charset.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Definition of the WP54 character set
-
-char symset[] = {
-0x57,0x50,0x35,0x34,0x00,0x41,0x76,0x61,0x6e,0x74,0x47,0x61,
-0x72,0x64,0x65,0x2d,0x42,0x6f,0x6f,0x6b,0x00,0x41,0x76,
-0x61,0x6e,0x74,0x47,0x61,0x72,0x64,0x65,0x2d,0x44,0x65,
-0x6d,0x69,0x00,0x41,0x76,0x61,0x6e,0x74,0x47,0x61,0x72,
-0x64,0x65,0x2d,0x42,0x6f,0x6f,0x6b,0x4f,0x62,0x6c,0x69,
-0x71,0x75,0x65,0x00,0x41,0x76,0x61,0x6e,0x74,0x47,0x61,
-0x72,0x64,0x65,0x2d,0x44,0x65,0x6d,0x69,0x4f,0x62,0x6c,
-0x69,0x71,0x75,0x65,0x00,0x42,0x6f,0x6f,0x6b,0x6d,0x61,
-0x6e,0x2d,0x4c,0x69,0x67,0x68,0x74,0x00,0x42,0x6f,0x6f,
-0x6b,0x6d,0x61,0x6e,0x2d,0x44,0x65,0x6d,0x69,0x00,0x42,
-0x6f,0x6f,0x6b,0x6d,0x61,0x6e,0x2d,0x4c,0x69,0x67,0x68,
-0x74,0x49,0x74,0x61,0x6c,0x69,0x63,0x00,0x42,0x6f,0x6f,
-0x6b,0x6d,0x61,0x6e,0x2d,0x44,0x65,0x6d,0x69,0x49,0x74,
-0x61,0x6c,0x69,0x63,0x00,0x43,0x65,0x6e,0x74,0x75,0x72,
-0x79,0x53,0x63,0x68,0x6c,0x62,0x6b,0x2d,0x52,0x6f,0x6d,
-0x61,0x6e,0x00,0x43,0x65,0x6e,0x74,0x75,0x72,0x79,0x53,
-0x63,0x68,0x6c,0x62,0x6b,0x2d,0x42,0x6f,0x6c,0x64,0x00,
-0x43,0x65,0x6e,0x74,0x75,0x72,0x79,0x53,0x63,0x68,0x6c,
-0x62,0x6b,0x2d,0x49,0x74,0x61,0x6c,0x69,0x63,0x00,0x43,
-0x65,0x6e,0x74,0x75,0x72,0x79,0x53,0x63,0x68,0x6c,0x62,
-0x6b,0x2d,0x42,0x6f,0x6c,0x64,0x49,0x74,0x61,0x6c,0x69,
-0x63,0x00,0x44,0x75,0x74,0x63,0x68,0x2d,0x52,0x6f,0x6d,
-0x61,0x6e,0x00,0x44,0x75,0x74,0x63,0x68,0x2d,0x42,0x6f,
-0x6c,0x64,0x00,0x44,0x75,0x74,0x63,0x68,0x2d,0x49,0x74,
-0x61,0x6c,0x69,0x63,0x00,0x44,0x75,0x74,0x63,0x68,0x2d,
-0x42,0x6f,0x6c,0x64,0x49,0x74,0x61,0x6c,0x69,0x63,0x00,
-0x53,0x77,0x69,0x73,0x73,0x00,0x53,0x77,0x69,0x73,0x73,
-0x2d,0x42,0x6f,0x6c,0x64,0x00,0x53,0x77,0x69,0x73,0x73,
-0x2d,0x4f,0x62,0x6c,0x69,0x71,0x75,0x65,0x00,0x53,0x77,
-0x69,0x73,0x73,0x2d,0x42,0x6f,0x6c,0x64,0x4f,0x62,0x6c,
-0x69,0x71,0x75,0x65,0x00,0x53,0x77,0x69,0x73,0x73,0x2d,
-0x4e,0x61,0x72,0x72,0x6f,0x77,0x00,0x53,0x77,0x69,0x73,
-0x73,0x2d,0x4e,0x61,0x72,0x72,0x6f,0x77,0x2d,0x42,0x6f,
-0x6c,0x64,0x00,0x53,0x77,0x69,0x73,0x73,0x2d,0x4e,0x61,
-0x72,0x72,0x6f,0x77,0x2d,0x4f,0x62,0x6c,0x69,0x71,0x75,
-0x65,0x00,0x53,0x77,0x69,0x73,0x73,0x2d,0x4e,0x61,0x72,
-0x72,0x6f,0x77,0x2d,0x42,0x6f,0x6c,0x64,0x4f,0x62,0x6c,
-0x69,0x71,0x75,0x65,0x00,0x5a,0x61,0x70,0x66,0x43,0x61,
-0x6c,0x6c,0x69,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x2d,
-0x52,0x6f,0x6d,0x61,0x6e,0x00,0x5a,0x61,0x70,0x66,0x43,
-0x61,0x6c,0x6c,0x69,0x67,0x72,0x61,0x70,0x68,0x69,0x63,
-0x2d,0x42,0x6f,0x6c,0x64,0x00,0x5a,0x61,0x70,0x66,0x43,
-0x61,0x6c,0x6c,0x69,0x67,0x72,0x61,0x70,0x68,0x69,0x63,
-0x2d,0x49,0x74,0x61,0x6c,0x69,0x63,0x00,0x5a,0x61,0x70,
-0x66,0x43,0x61,0x6c,0x6c,0x69,0x67,0x72,0x61,0x70,0x68,
-0x69,0x63,0x2d,0x42,0x6f,0x6c,0x64,0x49,0x74,0x61,0x6c,
-0x69,0x63,0x00,0x5a,0x61,0x70,0x66,0x43,0x68,0x61,0x6e,
-0x63,0x65,0x72,0x79,0x2d,0x4d,0x65,0x64,0x69,0x75,0x6d,
-0x49,0x74,0x61,0x6c,0x69,0x63,0x00,0x00,0x09,0x00,0x0A,
-0x00,0x0B,0x00,0x0E,0x00,0x14,0x00,0x17,0x00,0x18,0x00,
-0x1F,0x00,0x20,0x00,0x36,0x00,0x37,0x00,0x38,0x00,0x45,0x00,
-0x47,0x00,0x48,0x00,0x80,0x00,0x82,0x00,0x83,0x00,0x84,
-0x00,0x85,0x00,0x87,0x00,0x8B,0x00,0x8C,0x00,0x8D,0x00,0x8E,
-0x00,0x8F,0x00,0x90,0x00,0x91,0x00,0x92,0x00,0x95,0x00,0x96,
-0x00,0x97,0x00,0x98,0x00,0x99,0x00,0x9C,0x00,0x9E,0x00,
-0x9F,0x00,0xA0,0x00,0xA1,0x00,0xA2,0x00,0xA3,0x00,0xCB,0x00,
-0xCC,0x00,0xCD,0x00,0xCE,0x00,0xD1,0x00,0xD3,0x00,0xD4,
-0x00,0xD5,0x00,0xD6,0x00,0xFA,0x00,0xFB,0x00,0xFC,0x00,0xFD,
-0x00,0xCF,0x00,0x26,0x00,0x7E,0x03,0x05,0x00,0xA5,0x00,
-0xA6,0x00,0xA8,0x00,0xAA,0x00,0xAD,0x00,0xAE,0x00,0xAF,0x00,
-0xB0,0x00,0xB1,0x00,0xB2,0x00,0xB3,0x00,0xB5,0x00,0xB6,0x00,
-0xB8,0x00,0xB9,0x00,0xBA,0x00,0xBB,0x00,0xBC,0x00,0xBE,
-0x00,0xBF,0x00,0xC0,0x00,0xC1,0x00,0xC6,0x00,0xDC,0x00,0xEB,
-0x00,0xEC,0x00,0xF2,0x00,0xF3,0x00,0x15,0x00,0x16,0x00,
-0x86
-};
diff --git a/contrib/groff/src/devices/grolbp/grolbp.man b/contrib/groff/src/devices/grolbp/grolbp.man
deleted file mode 100644
index d567c1aa8143..000000000000
--- a/contrib/groff/src/devices/grolbp/grolbp.man
+++ /dev/null
@@ -1,357 +0,0 @@
-'\" t
-.\" The above line should force the use of tbl as a preprocessor
-.\" vim: set syntax=nroff :
-.\" The above line should set vim into nroff mode
-.ig
-Copyright (C) 1994-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-
-Modified by Francisco Andrés Verdú <pandres@dragonet.es> for the grolbp
-program.
-..
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH GROLBP @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-grolbp \- groff driver for Canon CAPSL printers (LBP-4 and LBP-8 series laser printers).
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fBgrolbp 'u
-.ti \niu
-.B grolpb
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-l
-.OP \-\-landscape
-.OP \-v
-.OP \-\-version
-.OP \-c n
-.OP \-\-copies= numcopies
-.OP \-p paper_size
-.OP \-\-papersize= paper_size
-.OP \-o orientation
-.OP \-\-orientation= orientation
-.OP \-F dir
-.OP \-\-fontdir= dir
-.OP \-h
-.OP \-\-help
-.RI "[\ " files\|.\|.\|. "\ ]"
-.br
-.ad \na
-.SH DESCRIPTION
-.B grolbp
-is a driver for
-.B groff
-that produces output in CAPSL and VDM format suitable for Canon LBP\-4 and
-LBP\-8 printers.
-.LP
-For compatibility with grolj4 there is an additional drawing command
-available:
-.TP
-.BI \eD'R\ dh\ dv '
-Draw a rule (i.e.\ a solid black rectangle), with one corner at the current
-position, and the diagonally opposite corner at the current position
-.RI +( dh , dv ).
-.SH OPTIONS
-Note that there can be whitespace between a one-letter option and its
-argument; on the other hand, there must be whitespace and/or an equal sign
-(`=') between a long-name option and its argument.
-.TP
-.BI \-c numcopies
-.TQ
-.BI \-\-copies= numcopies
-Print
-.I numcopies
-copies of each page.
-.TP
-.B \-l
-.TQ
-.B \-\-landscape
-Print the document with a landscape orientation.
-.TP
-.BI \-p paper_size
-.TQ
-.BI \-\-papersize= paper_size
-Set the paper size to
-.IR paper_size ,
-which must be a valid paper size description as indicated in the section
-.BR "PAPER SIZES" .
-.TP
-.BI \-o orientation
-.TQ
-.BI \-\-orientation= orientation
-Print the document with
-.I orientation
-orientation, which must be `portrait' or `landscape'.
-.TP
-.B \-v
-.TQ
-.B \-\-version
-Print the version number.
-.TP
-.BI \-F dir
-.TQ
-.BI \-\-fontdir= dir
-Prepend directory
-.IB dir /devlbp
-to the search path for font and device description files.
-.TP
-.B \-h
-.TQ
-.B \-\-help
-Print a short help text.
-.SH TYPEFACES
-The driver supports the Dutch, Swiss and Swiss-Narrow scalable typefaces,
-each one in the Regular, Bold, Italic and Bold-Italic styles.
-Additionally, the Courier and Elite monospaced typefaces at the sizes 8 and
-12 points (for Courier) resp. 8 and 10 points (for Elite) are supported,
-each one in the Regular, Bold and Italic styles.
-.PP
-The following chart summarizes the font names you can use to access these
-fonts:
-.PP
-.TS
-tab(|) allbox center;
-c c c c c
-ab c c c c
-.
-Typeface | Regular | Bold | Italic | Bold-Italic
-Dutch | TR | TB | TI | TBI
-Swiss | HR | HB | HI | HBI
-Swiss Narrow | HNR | HNB | HNI | HNBI
-Courier | CR | CB | CI |
-Elite | ER | EB | EI |
-.TE
-.PP
-.SH PAPER SIZES
-The paper size can be set in the
-.B DESC
-file or with command line options to
-.BR grolbp .
-If the paper size is specified both ways, the command line options take
-precedence over the contents of the
-.B DESC
-file (this applies to the page orientation too).
-.PP
-To set the paper size in the
-.B DESC
-file, insert in that file a line containing
-.B papersize
-.IR desired_papersize ,
-where
-.I desired_papersize
-is:
-.IP \(bu 4
-One of the recognized paper sizes: `a4', `letter', `legal' or `executive'.
-.IP \(bu 4
-A custom defined paper size, as described in the
-.B CUSTOM PAPER SIZES
-subsection below.
-.IP \(bu 4
-The name of a file (e.g.
-.IR /etc/papersize )
-whose first line must be the desired paper size in one of the above formats.
-.PP
-If there are various papersize lines in the
-.B DESC
-file, only the first valid one is used.
-.PP
-To set the paper size in the command line, add
-.sp 1
-.in +2m
-.BI \-p \ desired_papersize
-.in -2m
-.sp 1
-or
-.sp 1
-.in +2m
-.BI \-\-papersize= desired_papersize
-.in -2m
-.sp 1
-to the other
-.B grolbp
-options, where
-.B desired_papersize
-is in the same format as in the
-.B DESC
-file.
-.PP
-Paper sizes are case insensitive (i.e., `A4' is the same as `a4').
-.PP
-If no paper size is specified in the
-.B DESC
-file or the command line, a default size of A4 is used.
-.TP
-.SH CUSTOM PAPER SIZES
-Custom defined paper sizes are in the form
-.BI cust length x width
-where
-.I length
-and
-.I width
-are the dimensions of the paper you want to to use, specified in printer
-units (1/300 of an inch).
-For instance, to print in a postcard sized paper which is two inches long
-and four inches wide you can insert a line containing
-.sp 1
-.in +2m
-.B papersize cust600x1200
-.in -2m
-.sp 1
-at the beginning of the
-.B DESC
-file.
-.SH PAGE ORIENTATION
-As with the page size, the orientation of the printed page
-.RB ( portrait
-or
-.BR landscape )
-can be set in the
-.B DESC
-file or with command line options.
-It is also case insensitive.
-.PP
-To set the orientation in the
-.B DESC
-file, insert a line with the following content:
-.sp 1
-.in +2m
-.B orientation
-.RB [ portrait | landscape ]
-.in -2m
-.sp 1
-As with paper sizes, only the first valid orientation command in the
-.B DESC
-file is used.
-.PP
-To set the page orientation with command line options you can use the
-.B \-o
-or
-.B \-\-orientation
-option with the same parameters
-.RB ( portrait
-or
-.BR landscape )
-as in the
-.B DESC
-file.
-Or you can use the
-.B \-l
-option to force the pages to be printed in landscape.
-.SH FONT FILE FORMAT
-In addition to the usual commands described in
-.BR groff_font (@MAN5EXT@),
-.B grolbp
-provides the command
-.I lbpname
-which sets the font name sent to the printer when requesting this font.
-The syntax of this command is:
-.sp 1
-.in +2m
-.B lbpname
-.I printer_font_name
-.in -2m
-.IP \(bu
-For bitmapped fonts,
-.I printer_font_name
-has the form
-.sp 1
-.in +2m
-.RI N\(la base_fontname \(ra\(la font_style \(ra
-.in -2m
-.sp 1
-.I base_fontname
-is the font name as it appears in the printers font listings without the
-first letter, up to (but not including) the font size.
-.I font_style
-can be one of the letters
-.BR R ,
-.BR I ,
-or
-.BR B ,
-indicating the font styles Roman, Italic and Bold respectively.
-.IP
-For instance, if the printer's
-.I font listing A
-shows font `Nelite12I.ISO_USA', the corresponding entry in the font
-description file is
-.sp 1
-.in +2m
-.B lbpname NeliteI
-.in -2m
-.IP
-Note that you may need to modify
-.B grolbp
-to add support for new bitmapped fonts, since the available font names and
-font sizes of bitmapped fonts (as documented above) are hard-coded into the
-program.
-.IP \(bu
-For scalable fonts,
-.I printer_font_name
-is identical to the font name as it appears in the printer's
-.IR "font listing A" .
-.IP
-For instance, to select the `Swiss' font in bold style, which appears in
-the printer's
-.I font listing A
-as `Swiss-Bold', the required
-.B lbpname
-command line is
-.sp 1
-.in +2m
-.B lbpname Swiss-Bold
-.in -2m
-.sp 1
-.PP
-The argument of
-.B lbpname
-is case sensitive.
-.SH FILES
-.TP
-.B @FONTDIR@/devlbp/DESC
-Device description file.
-.TP
-.BI @FONTDIR@/devlbp/ F
-Font description file for font
-.IR F .
-.TP
-.B @MACRODIR@/lbp.tmac
-Macros for use with
-.BR grolbp .
-.SH SEE ALSO
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR groff_out (@MAN5EXT@),
-.BR groff_font (@MAN5EXT@),
-.BR groff_char (@MAN7EXT@)
-.\"
-.\" Local Variables:
-.\" mode: nroff
-.\" End:
diff --git a/contrib/groff/src/devices/grolbp/lbp.cc b/contrib/groff/src/devices/grolbp/lbp.cc
deleted file mode 100644
index 69196af464db..000000000000
--- a/contrib/groff/src/devices/grolbp/lbp.cc
+++ /dev/null
@@ -1,765 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1994, 2000, 2001 Free Software Foundation, Inc.
- Written by Francisco Andrés Verdú <pandres@dragonet.es> with many ideas
- taken from the other groff drivers.
-
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/*
-TODO
-
- - Add X command to include bitmaps
-*/
-#define _GNU_SOURCE
-
-#include "driver.h"
-#include "lbp.h"
-#include "charset.h"
-
-#include "nonposix.h"
-
-static short int papersize = -1, // papersize
- orientation = -1 , // orientation
- paperlength = 0, // Custom Paper size
- paperwidth = 0,
- ncopies = 1; // Number of copies
-
-class lbp_font : public font {
-public:
- ~lbp_font();
- void handle_unknown_font_command(const char *command, const char *arg,
- const char *filename, int lineno);
- static lbp_font *load_lbp_font(const char *);
- char *lbpname;
- char is_scalable;
-private:
- lbp_font(const char *);
-};
-
-class lbp_printer : public printer {
-public:
- lbp_printer();
- ~lbp_printer();
- void set_char(int, font *, const environment *, int, const char *name);
- void draw(int code, int *p, int np, const environment *env);
- void begin_page(int);
- void end_page(int page_length);
- font *make_font(const char *);
- void end_of_line();
-private:
- void set_line_thickness(int size, int dot = 0);
- void vdmstart();
- void vdmflush(); // the name vdmend was already used in lbp.h
- void setfillmode(int mode);
- void polygon( int hpos,int vpos,int np,int *p);
- char *font_name(const lbp_font *f, const int siz);
-
- int fill_pattern;
- int fill_mode;
- int cur_hpos;
- int cur_vpos;
- lbp_font *cur_font;
- int cur_size;
- unsigned short cur_symbol_set;
- int line_thickness;
-};
-
-// Compatibility section.
-//
-// Here we define some functions not present in some of the targets
-// platforms
-#ifndef HAVE_STRSEP
-// Solaris 8 doesn't have the strsep function
-static char *strsep(char **pcadena, const char *delim)
-{
- char *p;
-
- p = strtok(*pcadena,delim);
- *pcadena = strtok(NULL,delim);
- return p;
-
-};
-#endif
-
-#ifndef HAVE_STRDUP
-// Ditto with OS/390 and strdup
-static char *strdup(const char *s)
-{
- char *result;
-
- result = (char *)malloc(strlen(s)+1);
- if (result != NULL) strcpy(result,s);
- return result;
-
-}; // strdup
-
-#endif
-lbp_font::lbp_font(const char *nm)
-: font(nm)
-{
-}
-
-lbp_font::~lbp_font()
-{
-}
-
-lbp_font *lbp_font::load_lbp_font(const char *s)
-{
- lbp_font *f = new lbp_font(s);
- f->lbpname = NULL;
- f->is_scalable = 1; // Default is that fonts are scalable
- if (!f->load()) {
- delete f;
- return 0;
- }
- return f;
-}
-
-
-void lbp_font::handle_unknown_font_command(const char *command,
- const char *arg,
- const char *filename, int lineno)
-{
- if (strcmp(command, "lbpname") == 0) {
- if (arg == 0)
- fatal_with_file_and_line(filename, lineno,
- "`%1' command requires an argument",
- command);
- this->lbpname = new char[strlen(arg)+1];
- strcpy(this->lbpname,arg);
- // We Recongnize bitmaped fonts by the first character of it's name
- if (arg[0] == 'N') this->is_scalable = 0;
- // fprintf(stderr,"Loading font \"%s\" \n",arg);
- }; // if (strcmp(command, "lbpname")
- // fprintf(stderr,"Loading font %s \"%s\" in %s at %d\n",command,arg,filename,lineno);
-};
-
-static void wp54charset()
-{
- int i;
-
- lbpputs("\033[714;100;29;0;32;120.}");
- for (i = 0; i < sizeof(symset) ; i++) lbpputc(symset[i]);
- lbpputs("\033[100;0 D");
- return ;
-};
-
-lbp_printer::lbp_printer()
-: fill_pattern(1),
- fill_mode(0),
- cur_hpos(-1),
- cur_font(0),
- cur_size(0),
- cur_symbol_set(0),
- line_thickness(-1)
-{
-#ifdef SET_BINARY
- SET_BINARY(fileno(stdout));
-#endif
- lbpinit(stdout);
- lbpputs("\033c\033;\033[2&z\033[7 I\033[?32h\033[?33h\033[11h");
- wp54charset(); // Define the new symbol set
- lbpputs("\033[7 I\033[?32h\033[?33h\033[11h");
- // Paper size handling
- if (orientation < 0) orientation = 0;// Default orientation is portrait
- if (papersize < 0) papersize = 14; // Default paper size is A4
- if (papersize < 80) // standard paper
- lbpprintf("\033[%dp",(papersize | orientation));
- else // Custom paper
- lbpprintf("\033[%d;%d;%dp",(papersize | orientation),\
- paperlength,paperwidth);
-
- // Number of copies
- lbpprintf("\033[%dv\n",ncopies);
-
- lbpputs("\033[0u\033[1u\033P1y Grolbp\033\\");
- lbpmoveabs(0,0);
- lbpputs("\033[0t\033[2t");
- lbpputs("\033('$2\033)' 1"); // Primary symbol set IBML
- // Secondary symbol set IBMR1
- cur_symbol_set = 0;
-};
-
-lbp_printer::~lbp_printer()
-{
- lbpputs("\033P1y\033\\");
- lbpputs("\033c\033<");
-}
-
-void lbp_printer::begin_page(int)
-{
-}
-
-void lbp_printer::end_page(int)
-{
- if (vdminited()) vdmflush();
- lbpputc('\f');
- cur_hpos = -1;
-}
-
-void lbp_printer::end_of_line()
-{
- cur_hpos = -1; // force absolute motion
-}
-
-char *lbp_printer::font_name(const lbp_font *f, const int siz)
-{
- static char bfont_name[255] ; // The resulting font name
- char type, // Italic, Roman, Bold
- ori, // Normal or Rotated
- *nam; // The font name without other data.
-// nam[strlen(f->lbpname)-2]; // The font name without other data.
- int cpi; // The font size in characters per inch
- // (Bitmaped fonts are monospaced).
-
-
- /* Bitmap font selection is ugly in this printer, so don't expect
- this function to be elegant. */
-
- bfont_name[0] = 0x00;
- if (orientation) // Landscape
- ori = 'R';
- else // Portrait
- ori = 'N';
- type = f->lbpname[strlen(f->lbpname)-1];
- nam = new char[strlen(f->lbpname)-2];
- strncpy(nam,&(f->lbpname[1]),strlen(f->lbpname)-2);
- nam[strlen(f->lbpname)-2] = 0x00;
- // fprintf(stderr,"Bitmap font '%s' %d %c %c \n",nam,siz,type,ori);
- /* Since these fonts are avaiable only at certain sizes,
- 10 and 17 cpi for courier, 12 and 17 cpi for elite,
- we adjust the resulting size. */
- cpi = 17;
- // Fortunately there were only two bitmaped fonts shiped with the printer.
- if (!strcasecmp(nam,"courier"))
- { // Courier font
- if (siz >= 12) cpi = 10;
- else cpi = 17;
- };
- if (!strcasecmp(nam,"elite"))
- { // Elite font
- if (siz >= 10) cpi = 12;
- else cpi = 17;
- };
-
- // Now that we have all the data, let's generate the font name.
- if ((type != 'B') && (type != 'I')) // Roman font
- sprintf(bfont_name,"%c%s%d",ori,nam,cpi);
- else
- sprintf(bfont_name,"%c%s%d%c",ori,nam,cpi,type);
-
- return bfont_name;
-
-}; // lbp_printer::font_name
-
-void lbp_printer::set_char(int index, font *f, const environment *env, int w, const char *name)
-{
- int code = f->get_code(index);
-
- unsigned char ch = code & 0xff;
- unsigned short symbol_set = code >> 8;
- if (f != cur_font) {
- lbp_font *psf = (lbp_font *)f;
- // fprintf(stderr,"Loading font %s \"%d\" \n",psf->lbpname,env->size);
- if (psf->is_scalable)
- { // Scalable font selection is different from bitmaped
- lbpprintf("\033Pz%s.IBML\033\\\033[%d C",psf->lbpname,\
- (int)((env->size*300)/72));
- } else
- { // Bitmaped font
- lbpprintf("\033Pz%s.IBML\033\\\n",font_name(psf,env->size));
- };
- lbpputs("\033)' 1"); // Select IBML and IBMR1 symbol set
- cur_size = env->size;
- cur_font = psf;
- cur_symbol_set = 0;
- }
- if (symbol_set != cur_symbol_set) {
- if ( cur_symbol_set == 3 ) {
- // if current symbol set is Symbol we must restore the font
- lbpprintf("\033Pz%s.IBML\033\\\033[%d C",cur_font->lbpname,\
- (int)((env->size*300)/72));
- }; // if ( cur_symbol_set == 3 )
- switch (symbol_set) {
- case 0: lbpputs("\033('$2\033)' 1"); // Select IBML and IBMR1 symbol sets
- break;
- case 1: lbpputs("\033(d\033)' 1"); // Select wp54 symbol set
- break;
- case 2: lbpputs("\033('$2\033)'!0"); // Select IBMP symbol set
- break;
- case 3: lbpprintf("\033PzSymbol.SYML\033\\\033[%d C",\
- (int)((env->size*300)/72));
- lbpputs("\033(\"!!0\033)\"!!1"); // Select symbol font
- break;
- case 4: lbpputs("\033)\"! 1\033(\"!$2"); // Select PS symbol set
- break;
- }; // switch (symbol_set)
-
-// if (symbol_set == 1) lbpputs("\033(d"); // Select wp54 symbol set
-// else lbpputs("\033('$2\033)' 1"); // Select IBML and IBMR1 symbol sets
- cur_symbol_set = symbol_set;
- }
- if (env->size != cur_size) {
-
- if (!cur_font->is_scalable)
- lbpprintf("\033Pz%s.IBML\033\\\n",font_name(cur_font,env->size));
- else
- lbpprintf("\033[%d C",(int)((env->size*300)/72));
- cur_size = env->size;
- }
- if ((env->hpos != cur_hpos) || (env->vpos != cur_vpos))
- {
- // lbpmoveabs(env->hpos - ((5*300)/16),env->vpos );
- lbpmoveabs(env->hpos - 64,env->vpos - 64 );
- cur_vpos = env->vpos;
- cur_hpos = env->hpos;
- };
- if ((ch & 0x7F) < 32) lbpputs("\033[1.v");
- lbpputc(ch);
- cur_hpos += w;
-};
-
-void
-lbp_printer::vdmstart()
-{
- FILE *f;
- static int changed_origin = 0;
-
- errno = 0;
- f = tmpfile();
- // f = fopen("/tmp/gtmp","w+");
- if (f == NULL) perror("Openinig temp file");
- vdminit(f);
- if (!changed_origin) { // we should change the origin only one time
- changed_origin = 1;
- vdmorigin(-63,0);
- };
- vdmlinewidth(line_thickness);
-
-};
-
-void
-lbp_printer::vdmflush()
-{
- char buffer[1024];
- int bytes_read = 1;
-
- vdmend();
- fflush(lbpoutput);
- /* lets copy the vdm code to the output */
- rewind(vdmoutput);
- do
- {
- bytes_read = fread(buffer,1,sizeof(buffer),vdmoutput);
- bytes_read = fwrite(buffer,1,bytes_read,lbpoutput);
- } while ( bytes_read == sizeof(buffer));
-
- fclose(vdmoutput); // This will also delete the file,
- // since it is created by tmpfile()
- vdmoutput = NULL;
-
-}; // lbp_printer::vdmflush
-
-inline void
-lbp_printer::setfillmode(int mode)
-{
- if (mode != fill_mode) {
- if (mode != 1) vdmsetfillmode(mode,1,0);
- else vdmsetfillmode(mode,1,1); // To get black we must use white
- // inverted
- fill_mode = mode;
- };
-}; // setfillmode
-
-inline void
-lbp_printer::polygon( int hpos,int vpos,int np,int *p)
-{
- //int points[np+2],i;
- int *points,i;
-
- points = new int[np+2];
- points[0] = hpos;
- points[1] = vpos;
-/* fprintf(stderr,"Poligon (%d,%d) ", points[0],points[1]);*/
- for (i = 0; i < np; i++) points[i+2] = p[i];
-/* for (i = 0; i < np; i++) fprintf(stderr," %d ",p[i]);
- fprintf(stderr,"\n"); */
- vdmpolygon((np /2) + 1,points);
-};
-
-void lbp_printer::draw(int code, int *p, int np, const environment *env)
-{
- switch (code) {
- case 't':
- if (np == 0) line_thickness = 1;
- else { // troff gratuitously adds an extra 0
- if (np != 1 && np != 2) {
- error("0 or 1 argument required for thickness");
- break;
- } // if (np != ...
- if (p[0] == 0) line_thickness = 1;
- if (p[0] < 0) // Default = 1 point
- line_thickness = (int)(env->size*30/72);
- line_thickness = (int)((abs(p[0])*env->size)/10);
- if ((line_thickness > 16 ) && (!vdminited()))
- { /* for greater thickness we must use VDM */
- vdmstart();
- /* vdmlinewidth(line_thickness); already done in
- * vdmstart() */
- };
- if (vdminited()) vdmlinewidth(line_thickness);
- // fprintf(stderr,"\nthickness: %d == %d, size %d\n",
- // p[0],line_thickness,env->size );
- } // else
- break;
-
- case 'l': // Line
- if (np != 2) {
- error("2 arguments required for line");
- break;
- };
- if (!vdminited()) vdmstart();
- vdmline(env->hpos,env->vpos,p[0],p[1]);
- /*fprintf(stderr,"\nline: %d,%d - %d,%d thickness %d == %d\n",\
- env->hpos - 64,env->vpos -64, env->hpos - 64 + p[0],\
- env->vpos -64 + p[1],env->size, line_thickness);*/
- break;
- case 'R': // Rule
- if (np != 2) {
- error("2 arguments required for Rule");
- break;
- }
- if (vdminited()) {
- setfillmode(fill_pattern); // Solid Rule
- vdmrectangle(env->hpos,env->vpos,p[0],p[1]);
- }
- else {
- lbpruleabs(env->hpos - 64,env->vpos -64 , p[0], p[1]);
- cur_vpos = p[1];
- cur_hpos = p[0];
- };
- fprintf(stderr,"\nrule: thickness %d == %d\n", env->size, line_thickness);
- break;
- case 'P': // Filled Polygon
- if (!vdminited()) vdmstart();
- setfillmode(fill_pattern);
- polygon(env->hpos,env->vpos,np,p);
- break;
- case 'p': // Empty Polygon
- if (!vdminited()) vdmstart();
- setfillmode(0);
- polygon(env->hpos,env->vpos,np,p);
- break;
- case 'C': // Filled Circle
- if (!vdminited()) vdmstart();
- // fprintf(stderr,"Circle (%d,%d) Fill %d\n",env->hpos,env->vpos,fill_pattern);
- setfillmode(fill_pattern);
- vdmcircle(env->hpos + (p[0]/2),env->vpos,p[0]/2);
- break;
- case 'c': // Empty Circle
- if (!vdminited()) vdmstart();
- setfillmode(0);
- vdmcircle(env->hpos + (p[0]/2),env->vpos,p[0]/2);
- break;
- case 'E': // Filled Ellipse
- if (!vdminited()) vdmstart();
- setfillmode(fill_pattern);
- vdmellipse(env->hpos + (p[0]/2),env->vpos,p[0]/2,p[1]/2,0);
- break;
- case 'e': // Empty Ellipse
- if (!vdminited()) vdmstart();
- setfillmode(0);
- vdmellipse(env->hpos + (p[0]/2),env->vpos,p[0]/2,p[1]/2,0);
- break;
- case 'a': // Arc
- if (!vdminited()) vdmstart();
- setfillmode(0);
- // VDM draws arcs clockwise and pic counterclockwise
- // We must compensate for that, exchanging the starting and
- // ending points
- vdmvarc(env->hpos + p[0],env->vpos+p[1],\
- int(sqrt( double((p[0]*p[0])+(p[1]*p[1])))),\
- p[2],p[3],\
- (-p[0]),(-p[1]),1,2);
- break;
- case '~': // Spline
- if (!vdminited()) vdmstart();
- setfillmode(0);
- vdmspline(np/2,env->hpos,env->vpos,p);
- break;
- case 'f':
- if (np != 1 && np != 2) {
- error("1 argument required for fill");
- break;
- };
- // fprintf(stderr,"Fill %d\n",p[0]);
- if ((p[0] == 1) || (p[0] >= 1000)) { // Black
- fill_pattern = 1;
- break;
- }; // if (p[0] == 1)
- if (p[0] == 0) { // White
- fill_pattern = 0;
- break;
- };
- if ((p[0] > 1) && (p[0] < 1000))
- {
- if (p[0] >= 990) fill_pattern = -23;
- else if (p[0] >= 700) fill_pattern = -28;
- else if (p[0] >= 500) fill_pattern = -27;
- else if (p[0] >= 400) fill_pattern = -26;
- else if (p[0] >= 300) fill_pattern = -25;
- else if (p[0] >= 200) fill_pattern = -22;
- else if (p[0] >= 100) fill_pattern = -24;
- else fill_pattern = -21;
- }; // if (p[0] >= 0 && p[0] <= 1000)
- break;
- default:
- error("unrecognised drawing command `%1'", char(code));
- break;
- }; // switch (code)
- return ;
-};
-
-font *lbp_printer::make_font(const char *nm)
-{
- return lbp_font::load_lbp_font(nm);
-}
-
-
-
-printer *make_printer()
-{
- return new lbp_printer;
-}
-
-static struct
-{
- const char *name;
- int code;
-} papersizes[] =
-{{ "A4", 14 },
-{ "letter", 30 },
-{ "legal", 32 },
-{ "executive", 40 },
-};
-
-
-static int set_papersize(const char *papersize)
-{
- int i;
-
- // First test for a standard (i.e. supported directly by the printer)
- // papersize
- for (i = 0 ; i < sizeof(papersizes)/sizeof(papersizes[0]); i++)
- {
- if (strcasecmp(papersizes[i].name,papersize) == 0)
- return papersizes[i].code;
- };
-
- // Now test for a custom papersize
- if (strncasecmp("cust",papersize,4) == 0)
- {
- char *p ,
- *p1,
- *papsize;
-
- p = papsize = strdup(&papersize[4]);
- if (papsize == NULL) return -1;
- p1 = strsep(&p,"x");
- if (p == NULL)
- { // let's test for an uppercase x
- p = papsize ;
- p1 = strsep(&p,"X");
- if (p == NULL) { free(papsize); return -1;};
- }; // if (p1 == NULL)
- paperlength = atoi(p1);
- if (paperlength == 0) { free(papsize); return -1;};
- paperwidth = atoi(p);
- if (paperwidth == 0) { free(papsize); return -1;};
- free(papsize);
- return 82;
- }; // if (strcnasecmp("cust",papersize,4) == 0)
-
- return -1;
-};
-
-static int handle_papersize_command(const char *arg)
-{
- int n = set_papersize(arg);
-
- if (n < 0)
- { // If is not a standard nor custom paper size
- // let's see if it's a file (i.e /etc/papersize )
- FILE *f = fopen(arg,"r");
- if (f != NULL)
- { // the file exists and is readable
- char psize[255],*p;
- fgets(psize,254,f);
- fclose(f);
- // set_papersize doesn't like the trailing \n
- p = psize; while (*p) p++;
- if (*(--p) == '\n') *p = 0x00;
-
- n = set_papersize(psize);
- }; // if (f != NULL)
- }; // if (n < 0)
-
- return n;
-}; // handle_papersize_command
-
-
-static void handle_unknown_desc_command(const char *command, const char *arg,
- const char *filename, int lineno)
-{
- // papersize command
- if (strcasecmp(command, "papersize") == 0) {
- // We give priority to command line options
- if (papersize > 0) return;
- if (arg == 0)
- error_with_file_and_line(filename, lineno,
- "`papersize' command requires an argument");
- else
- {
- int n = handle_papersize_command(arg);
- if (n < 0)
- error_with_file_and_line(filename, lineno,
- "unknown paper size `%1'", arg);
- else
- papersize = n;
-
- }; // if (arg == 0) ... else ...
- }; // if (strcasecmp(command, "papersize")
-
- // orientation command
- if (strcasecmp(command, "orientation") == 0) {
- // We give priority to command line options
- if (orientation > 0) return;
- if (arg == 0)
- error_with_file_and_line(filename, lineno,
- "`papersize' command requires an argument");
- else {
- if (strcasecmp(arg,"portrait") == 0) orientation = 0;
- else { if (strcasecmp(arg,"landscape") == 0) orientation = 1;
- else error_with_file_and_line(filename, lineno,
- "`orientation' command requires an argument");
- };
- }; // if (arg == 0) ... else ...
- }; // if (strcasecmp(command, "orientation") == 0)
-};
-
-static struct option long_options[] = {
- { "orientation", required_argument, NULL, 'o' },
- { "version", no_argument, NULL, 'v' },
- { "copies", required_argument, NULL, 'c' },
- { "landscape", no_argument, NULL, 'l' },
- { "papersize", required_argument, NULL, 'p' },
- { "fontdir", required_argument, NULL, 'F' },
- { "help", no_argument, NULL, 'h' },
- { NULL, 0, 0, 0 }
- };
-
-static void usage(FILE *stream)
-{
- fprintf(stream,
- "usage: %s [-lvh] [-c n] [-p paper_size] [-F dir] [-o or] "\
- " [files ...]\n"\
- " -o --orientation=[portrait|landscape]\n"\
- " -v --version\n"\
- " -c --copies=numcopies\n"\
- " -l --landscape\n"\
- " -p --papersize=paper_size\n"\
- " -F --fontdir=dir\n"\
- " -h --help\n",
- program_name);
-}; // usage
-
-int main(int argc, char **argv)
-{
- if (program_name == NULL) program_name = strdup(argv[0]);
-
- font::set_unknown_desc_command_handler(handle_unknown_desc_command);
- // command line parsing
- int c = 0;
- int option_index = 0;
-
- while (c >= 0 )
- {
- c = getopt_long (argc, argv, "F:p:lvo:c:h",\
- long_options, &option_index);
- switch (c) {
- case 'F' : font::command_line_font_dir(optarg);
- break;
- case 'p' : {
- int n = handle_papersize_command(optarg);
- if (n < 0)
- error("unknown paper size `%1'", optarg);
- else
- papersize = n;
- break;
- };
- case 'l' : orientation = 1;
- break;
- case 'v' : {
- extern const char *Version_string;
- printf("GNU grolbp (groff) version %s\n",
- Version_string);
- exit(0);
- break;
- };
- case 'o' : {
- if (strcasecmp(optarg,"portrait") == 0)
- orientation = 0;
- else {
- if (strcasecmp(optarg,"landscape") == 0)
- orientation = 1;
- else
- error("unknown orientation '%1'", optarg);
- };
- break;
- };
- case 'c' : {
- char *ptr;
- long n = strtol(optarg, &ptr, 10);
- if ((n <= 0) && (ptr == optarg))
- error("argument for -c must be a positive integer");
- else if (n <= 0 || n > 32767)
- error("out of range argument for -c");
- else
- ncopies = unsigned(n);
- break;
- }
- case 'h' : usage(stdout);
- exit(0);
- break;
- case '?' : usage(stderr);
- exit(1);
- break;
-
- }; // switch (c)
- }; // while (c > 0 )
-
- if (optind >= argc)
- do_file("-");
-
- while (optind < argc) {
- do_file(argv[optind++]);
- };
-
- lbpputs("\033c\033<");
- return 0;
-};
diff --git a/contrib/groff/src/devices/grolbp/lbp.h b/contrib/groff/src/devices/grolbp/lbp.h
deleted file mode 100644
index 6a11b198a8ad..000000000000
--- a/contrib/groff/src/devices/grolbp/lbp.h
+++ /dev/null
@@ -1,511 +0,0 @@
-// -*- C -*-
-/* Copyright (C) 1994, 2000 Free Software Foundation, Inc.
- Written by Francisco Andrés Verdú <pandres@dragonet.es>
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This file contains a set of utility functions to use canon CAPSL printers
- * (lbp-4 and lbp-8 series printers) */
-
-#ifndef LBP_H
-#define LBP_H
-
-#include <stdio.h>
-#include <stdarg.h>
-
-static FILE *lbpoutput = NULL;
-static FILE *vdmoutput = NULL;
-
-static inline void
-lbpinit(FILE *outfile)
-{
- lbpoutput = outfile;
-};
-
-
-static inline void
-lbpprintf(char *format, ... )
-{ /* Taken from cjet */
- va_list stuff;
-
- va_start(stuff, format);
- vfprintf(lbpoutput, format, stuff);
- va_end(stuff);
-};
-
-static inline void
-lbpputs(char *data)
-{
- fputs(data,lbpoutput);
-};
-
-static inline void
-lbpputc(char c)
-{
- fputc(c,lbpoutput);
-};
-
-
-static inline void
-lbpsavestatus(int index )
-{
- fprintf(lbpoutput,"\033[%d%%y",index);
-};
-
-static inline void
-lbprestorestatus(int index )
-{
- fprintf(lbpoutput,"\033[%d%cz",index ,'%');
-};
-
-static inline void
-lbpsavepos(int index)
-{
- fprintf(lbpoutput,"\033[1;%d;0x",index);
-};
-
-static inline void
-lbprestorepos(int index)
-{
- fprintf(lbpoutput,"\033[0;%d;0x",index);
-};
-
-static inline void
-lbprestoreposx(int index)
-{
- fprintf(lbpoutput,"\033[0;%d;1x",index);
-};
-
-static inline void
-lbpmoverel(int despl, char direction)
-{
- fprintf(lbpoutput,"\033[%d%c",despl,direction);
-};
-
-static inline void
-lbplinerel(int width,int despl,char direction )
-{
- fprintf(lbpoutput,"\033[%d;0;9{\033[%d%c\033[9}",width,despl,direction);
-};
-
-static inline void
-lbpmoveabs(int x, int y)
-{
- fprintf(lbpoutput,"\033[%d;%df",y,x);
-};
-
-static inline void
-lbplineto(int x,int y, int width )
-{
- fprintf(lbpoutput,"\033[%d;0;9{",width);
- lbpmoveabs(x,y);
- fprintf(lbpoutput,"\033[9}\n");
-};
-
-static inline void
-lbpruleabs(int x, int y, int hsize, int vsize)
-{
- lbpmoveabs(x,y);
- fprintf(lbpoutput,"\033[0;9;000s");
- lbpmoveabs(x+hsize,y+vsize);
- fprintf(lbpoutput,"\033[9r");
-};
-
-static inline void vdmprintf(char *format, ... );
-
-static inline char *
-vdmnum(int num,char *result)
-{
- char b1,b2,b3;
- char *p = result;
- int nm;
-
- nm = abs(num);
- /* First byte 1024 - 32768 */
- b1 = ((nm >> 10) & 0x3F);
- if (b1) *p++ = b1 | 0x40;
-
- /* Second Byte 16 - 1024 */
- b2 = ((nm >> 4) & 0x3F);
- if ( b1 || b2) *p++= b2 | 0x40;
-
- /* Third byte 0 - 15 */
- b3 = ((nm & 0x0F) | 32);
- if (num >= 0) b3 |= 16;
- *p++ = b3;
- *p = 0x00; /* End of the resulting string */
- return result;
-};
-
-static inline void
-vdmorigin(int newx, int newy)
-{
- char nx[4],ny[4];
-
- vdmprintf("}\"%s%s\x1e",vdmnum(newx,nx),vdmnum(newy,ny));
-}; /* vdmorigin */
-
-
-static inline FILE *
-vdminit(FILE *vdmfile)
-{
- char scale[4],size[4],lineend[4];
-
-/* vdmoutput = tmpfile();*/
- vdmoutput = vdmfile;
- /* Initialize the VDM mode */
- vdmprintf("\033[0&}#GROLBP\x1e!0%s%s\x1e$\x1e}F%s\x1e",\
- vdmnum(-3,scale),vdmnum(1,size),vdmnum(1,lineend));
- return vdmoutput;
-
-};
-
-static inline void
-vdmend()
-{
- vdmprintf("}p\x1e");
-};
-
-static inline void
-vdmprintf(char *format, ... )
-{ /* Taken from cjet */
- va_list stuff;
-
- if (vdmoutput == NULL) vdminit(tmpfile());
- va_start(stuff, format);
- vfprintf(vdmoutput, format, stuff);
- va_end(stuff);
-};
-
-static inline void
-vdmsetfillmode(int pattern,int perimeter, int inverted)
-{
- char patt[4],perim[4],
- rot[4], /* rotation */
- espejo[4], /* espejo */
- inv[4]; /* Inverted */
-
- vdmprintf("I%s%s%s%s%s\x1e",vdmnum(pattern,patt),\
- vdmnum(perimeter,perim),vdmnum(0,rot),
- vdmnum(0,espejo),vdmnum(inverted,inv));
-};
-
-static inline void
-vdmcircle(int centerx, int centery, int radius)
-{
- char x[4],y[4],rad[4];
-
- vdmprintf("5%s%s%s\x1e",vdmnum(centerx,x),vdmnum(centery,y),\
- vdmnum(radius,rad));
-};
-
-static inline void
-vdmaarc(int centerx, int centery, int radius,int startangle,int angle,int style,int arcopen)
-{
- char x[4],y[4],rad[4],stx[4],sty[4],styl[4],op[4];
-
- vdmprintf("}6%s%s%s%s%s%s%s\x1e",vdmnum(arcopen,op),\
- vdmnum(centerx,x),vdmnum(centery,y),\
- vdmnum(radius,rad),vdmnum(startangle,stx),vdmnum(angle,sty),\
- vdmnum(style,styl));
-};
-
-static inline void
-vdmvarc(int centerx, int centery,int radius, int startx, int starty, int endx, int endy,\
- int style,int arcopen)
-{
- char x[4],y[4],rad[4],stx[4],sty[4],enx[4],eny[4],styl[4],op[4];
-
- vdmprintf("}6%s%s%s%s%s%s%s%s\x1e",vdmnum(arcopen,op),\
- vdmnum(centerx,x),vdmnum(centery,y),\
- vdmnum(radius,rad),vdmnum(startx,stx),vdmnum(starty,sty),\
- vdmnum(endx,enx),vdmnum(endy,eny),vdmnum(style,styl));
-};
-
-static inline void
-vdmellipse(int centerx, int centery, int radiusx, int radiusy,int rotation)
-{
- char x[4],y[4],radx[4],rady[4],rotat[4];
-
- vdmprintf("}7%s%s%s%s%s\x1e\n",vdmnum(centerx,x),vdmnum(centery,y),\
- vdmnum(radiusx,radx),vdmnum(radiusy,rady),\
- vdmnum(rotation,rotat));
-};
-
-static inline void
-vdmsetlinetype(int lintype)
-{
- char ltyp[4], expfact[4];
-
- vdmprintf("E1%s%s\x1e",vdmnum(lintype,ltyp),vdmnum(1,expfact));
-
-};
-
-static inline void
-vdmsetlinestyle(int lintype, int pattern,int unionstyle)
-{
- char patt[4],ltip[4],
- rot[4], /* rotation */
- espejo[4], /* espejo */
- in[4]; /* Inverted */
-
- vdmprintf("}G%s%s%s%s%s\x1e",vdmnum(lintype,ltip),\
- vdmnum(pattern,patt),vdmnum(0,rot),
- vdmnum(0,espejo),vdmnum(0,in));
- vdmprintf("}F%s",vdmnum(unionstyle,rot));
-};
-
-static inline void
-vdmlinewidth(int width)
-{
- char wh[4];
-
- vdmprintf("F1%s\x1e",vdmnum(width,wh));
-};
-
-static inline void
-vdmrectangle(int origx, int origy,int dstx, int dsty)
-{
- char xcoord[4],ycoord[4],sdstx[4],sdsty[4];
-
- vdmprintf("}:%s%s%s%s\x1e\n",vdmnum(origx,xcoord),vdmnum(dstx,sdstx),\
- vdmnum(origy,ycoord),vdmnum(dsty,sdsty));
-}; /* polyline */
-
-static inline void
-vdmpolyline(int numpoints, int *points)
-{
- int i,*p = points;
- char xcoord[4],ycoord[4];
-
- if (numpoints < 2) return;
- vdmprintf("1%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord));
- p += 2;
- for (i = 1; i < numpoints ; i++) {
- vdmprintf("%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord));
- p += 2;
- }; /* for */
- vdmprintf("\x1e\n");
-}; /* polyline */
-
-static inline void
-vdmpolygon(int numpoints, int *points)
-{
- int i,*p = points;
- char xcoord[4],ycoord[4];
-
- if (numpoints < 2) return;
- vdmprintf("2%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord));
- p += 2;
- for (i = 1; i < numpoints ; i++) {
- vdmprintf("%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord));
- p += 2;
- }; /* for */
- vdmprintf("\x1e\n");
-
-}; /* vdmpolygon */
-
-
-/************************************************************************
- * Highter level auxiliary functions *
- ************************************************************************/
-static inline int
-vdminited()
-{
- return (vdmoutput != NULL);
-}; /* vdminited */
-
-
-static inline void
-vdmline(int startx, int starty, int sizex, int sizey)
-{
- int points[4];
-
- points[0] = startx;
- points[1] = starty;
- points[2] = sizex;
- points[3] = sizey;
-
- vdmpolyline(2,points);
-
-};
-
-/*#define THRESHOLD .05 */ /* inch */
-#define THRESHOLD 1 /* points (1/300 inch) */
-static inline void
-splinerel(double px,double py,int flush)
-{
- static int lx = 0 ,ly = 0;
- static float pend = 0.0;
- static int dy = 0, despx = 0, despy = 0, sigpend = 0;
- int dxnew ,dynew, sg;
- char xcoord[4],ycoord[4];
- float npend ;
-
- if (flush == -1) {lx = (int)px; ly = (int)py; return;};
-
- if (flush == 0) {
- dxnew = (int)px -lx;
- dynew = (int)py -ly;
- if ((dxnew == 0) && (dynew == 0)) return;
- sg = (dxnew < 0)? -1 : 0;
-/* fprintf(stderr,"s (%d,%d) (%d,%d)\n",dxnew,dynew,despx,despy);*/
- if (dynew == 0) {
- despx = dxnew;
- if ((sg == sigpend) && (dy == 0)){
- return;
- };
- dy = 0;
- }
- else {
- dy = 1;
- npend = (1.0*dxnew)/dynew;
- if (( npend == pend) && (sigpend == sg))
- { despy = dynew; despx = dxnew; return; }
- else
- { sigpend = sg;
- pend = npend;
- }; /* else (( npend == pend) && ... */
- }; /* else (if (dynew == 0)) */
- }; /* if (!flush ) */
-
- /* if we've changed direction we must draw the line */
-/* fprintf(stderr," (%d) %.2f,%.2f\n",flush,(float)px,(float)py);*/
- if ((despx != 0) || (despy != 0)) vdmprintf("%s%s",vdmnum(despx,xcoord),\
- vdmnum(despy,ycoord));
- /*if ((despx != 0) || (despy != 0)) fprintf(stderr,"2
- *%d,%d\n",despx,despy);*/
- if (flush) {
- dxnew = dy = despx = despy = 0;
- return;
- }; /* if (flush) */
- dxnew -= despx;
- dynew -= despy;
- if ((dxnew != 0) || (dynew != 0)) vdmprintf("%s%s",vdmnum(dxnew,xcoord),\
- vdmnum(dynew,ycoord));
-
-/* if ((dxnew != 0) || (dynew != 0)) fprintf(stderr,"3
- * %d,%d\n",dxnew,dynew);*/
- lx = (int)px; ly = (int)py;
- dxnew = dy = despx = despy = 0;
-
-}; /* splinerel */
-
-/**********************************************************************
- * The following code to draw splines is adapted from the transfig package
- */
-static void
-quadratic_spline(double a1,double b1, double a2, double b2, \
- double a3, double b3, double a4, double b4)
-{
- double x1, y1, x4, y4;
- double xmid, ymid;
-
- x1 = a1; y1 = b1;
- x4 = a4; y4 = b4;
- xmid = (a2 + a3)/2.0;
- ymid = (b2 + b3)/2.0;
- if ((fabs(x1 - xmid) < THRESHOLD) && (fabs(y1 - ymid) < THRESHOLD)) {
- splinerel(xmid,ymid,0);
-/* fprintf(tfp, "PA%.4f,%.4f;\n", xmid, ymid);*/
- }
- else {
- quadratic_spline(x1, y1, ((x1+a2)/2.0), ((y1+b2)/2.0),
- ((3.0*a2+a3)/4.0), ((3.0*b2+b3)/4.0), xmid, ymid);
- }
-
- if ((fabs(xmid - x4) < THRESHOLD) && (fabs(ymid - y4) < THRESHOLD)) {
- splinerel(x4,y4,0);
-/* fprintf(tfp, "PA%.4f,%.4f;\n", x4, y4);*/
- }
- else {
- quadratic_spline(xmid, ymid, ((a2+3.0*a3)/4.0), ((b2+3.0*b3)/4.0),
- ((a3+x4)/2.0), ((b3+y4)/2.0), x4, y4);
- };
-}; /* quadratic_spline */
-
-#define XCOORD(i) numbers[(2*i)]
-#define YCOORD(i) numbers[(2*i)+1]
-static void
-vdmspline(int numpoints, int ox,int oy, int *numbers)
-{
- double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4;
- double x1, y1, x2, y2;
- char xcoord[4],ycoord[4];
- int i;
-
- /*p = s->points;
- x1 = p->x/ppi;*/
- x1 = ox;
- y1 = oy;
-/* p = p->next;
- x2 = p->x/ppi;
- y2 = p->y/ppi;*/
- x2 = ox + XCOORD(0);
- y2 = oy + YCOORD(0);
- cx1 = (x1 + x2)/2.0;
- cy1 = (y1 + y2)/2.0;
- cx2 = (x1 + 3.0*x2)/4.0;
- cy2 = (y1 + 3.0*y2)/4.0;
-
-/* fprintf(stderr,"Spline %d (%d,%d)\n",numpoints,(int)x1,(int)y1);*/
- vdmprintf("1%s%s",vdmnum((int)x1,xcoord),vdmnum((int)y1,ycoord));
- splinerel(x1,y1,-1);
- splinerel(cx1,cy1,0);
-/* fprintf(tfp, "PA%.4f,%.4f;PD%.4f,%.4f;\n",
- x1, y1, cx1, cy1);*/
-
- /*for (p = p->next; p != NULL; p = p->next) {*/
- for (i = 1; i < (numpoints); i++) {
- x1 = x2;
- y1 = y2;
-/* x2 = p->x/ppi;
- y2 = p->y/ppi;*/
- x2 = x1 + XCOORD(i);
- y2 = y1 + YCOORD(i);
- cx3 = (3.0*x1 + x2)/4.0;
- cy3 = (3.0*y1 + y2)/4.0;
- cx4 = (x1 + x2)/2.0;
- cy4 = (y1 + y2)/2.0;
- /* fprintf(stderr,"Point (%d,%d) - (%d,%d)\n",(int)x1,(int)(y1),(int)x2,(int)y2);*/
- quadratic_spline(cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4);
- cx1 = cx4;
- cy1 = cy4;
- cx2 = (x1 + 3.0*x2)/4.0;
- cy2 = (y1 + 3.0*y2)/4.0;
- }
- x1 = x2;
- y1 = y2;
-/* p = s->points->next;
- x2 = p->x/ppi;
- y2 = p->y/ppi;*/
- x2 = ox + XCOORD(0);
- y2 = oy + YCOORD(0);
- cx3 = (3.0*x1 + x2)/4.0;
- cy3 = (3.0*y1 + y2)/4.0;
- cx4 = (x1 + x2)/2.0;
- cy4 = (y1 + y2)/2.0;
- splinerel(x1,y1,0);
- splinerel(x1,y1,1);
- /*vdmprintf("%s%s",vdmnum((int)(x1-lx),xcoord),\
- vdmnum((int)(y1-ly),ycoord));*/
- vdmprintf("\x1e\n");
-/* fprintf(tfp, "PA%.4f,%.4f;PU;\n", x1, y1);*/
-
-
-}; /* vdmspline */
-
-
-#endif
diff --git a/contrib/groff/src/devices/grolj4/Makefile.sub b/contrib/groff/src/devices/grolj4/Makefile.sub
deleted file mode 100644
index bbb0cff0dc5a..000000000000
--- a/contrib/groff/src/devices/grolj4/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=grolj4
-MAN1=grolj4.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=lj4.o
-CCSRCS=$(srcdir)/lj4.cc
diff --git a/contrib/groff/src/devices/grolj4/grolj4.man b/contrib/groff/src/devices/grolj4/grolj4.man
deleted file mode 100644
index 891d7dc99e83..000000000000
--- a/contrib/groff/src/devices/grolj4/grolj4.man
+++ /dev/null
@@ -1,144 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1994-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH GROLJ4 @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-grolj4 \- groff driver for HP Laserjet 4 family
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fBgrolj4 'u
-.ti \niu
-.B grolj4
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-lv
-.OP \-d \fR[\fPn\fR]\fP
-.OP \-c n
-.OP \-p paper_size
-.OP \-w n
-.OP \-F dir
-.RI "[\ " files\|.\|.\|. "\ ]"
-.br
-.ad \na
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-.B grolj4
-is a driver for
-.B groff
-that produces output in PCL5 format suitable for an HP Laserjet 4 printer.
-.LP
-There is an additional drawing command available:
-.TP
-.BI \eD'R\ dh\ dv '
-Draw a rule (solid black rectangle), with one corner
-at the current position, and the diagonally opposite corner
-at the current position
-.RI +( dh , dv ).
-Afterwards the current position will be at the opposite corner. This
-generates a PCL fill rectangle command, and so will work on
-printers that do not support HPGL/2 unlike the other
-.B \eD
-commands.
-.SH OPTIONS
-.TP
-.BI \-c n
-Print
-.I n
-copies of each page.
-.TP
-.B \-l
-Print the document with a landscape orientation.
-.TP
-.BI "\-d [" n ]
-Use duplex mode
-.IR n :
-1\ is long-side binding; 2\ is short-side binding;
-default is\ 1.
-.TP
-.BI \-p size
-Set the paper size to
-.IR size ,
-which must be one of
-letter, legal, executive, a4, com10, monarch, c5, b5, dl.
-.TP
-.B \-v
-Print the version number.
-.TP
-.BI \-w n
-Set the default line thickness to
-.I n
-thousandths of an em.
-.TP
-.BI \-F dir
-Prepend directory
-.IB dir /devlj4
-to the search path for font and device description files.
-.LP
-The following four commands are available additionally in the
-.B DESC
-file:
-.TP
-.BI pclweight \ N
-The integer value
-.I N
-must be in the range -7 to +7; default is 0.
-.TP
-.BI pclstyle \ N
-The integer value
-.I N
-must be in the range 0 to 32767; default is 0.
-.TP
-.BI pclproportional \ N
-A boolean flag which can be either 0 or 1; default is 0.
-.TP
-.BI pcltypeface \ N
-The integer value
-.I N
-must be in the range 0 to 65535; default is 0.
-.SH FILES
-.TP
-.B @FONTDIR@/devlj4/DESC
-Device description file.
-.TP
-.BI @FONTDIR@/devlj4/ F
-Font description file for font
-.IR F .
-.TP
-.B @MACRODIR@/lj4.tmac
-Macros for use with
-.BR grolj4 .
-.SH BUGS
-Small dots.
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR groff_out (@MAN5EXT@),
-.BR groff_font (@MAN5EXT@),
-.BR groff_char (@MAN7EXT@)
diff --git a/contrib/groff/src/devices/grolj4/lj4.cc b/contrib/groff/src/devices/grolj4/lj4.cc
deleted file mode 100644
index 9fbc6afa6e05..000000000000
--- a/contrib/groff/src/devices/grolj4/lj4.cc
+++ /dev/null
@@ -1,710 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1994, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/*
-TODO
-
-option to use beziers for circle/ellipse/arc
-option to use lines for spline (for LJ3)
-left/top offset registration
-output bin selection option
-paper source option
-output non-integer parameters using fixed point numbers
-X command to insert contents of file
-X command to specify inline escape sequence (how to specify unprintable chars?)
-X command to include bitmap graphics
-*/
-
-#include "driver.h"
-#include "nonposix.h"
-
-static struct {
- const char *name;
- int code;
- // at 300dpi
- int x_offset_portrait;
- int x_offset_landscape;
-} paper_table[] = {
- { "letter", 2, 75, 60 },
- { "legal", 3, 75, 60 },
- { "executive", 1, 75, 60 },
- { "a4", 26, 71, 59 },
- { "com10", 81, 75, 60 },
- { "monarch", 80, 75, 60 },
- { "c5", 91, 71, 59 },
- { "b5", 100, 71, 59 },
- { "dl", 90, 71, 59 },
-};
-
-static int paper_size = -1;
-static int landscape_flag = 0;
-static int duplex_flag = 0;
-
-// An upper limit on the paper size in centipoints,
-// used for setting HPGL picture frame.
-#define MAX_PAPER_WIDTH (12*720)
-#define MAX_PAPER_HEIGHT (17*720)
-
-// Dotted lines that are thinner than this don't work right.
-#define MIN_DOT_PEN_WIDTH .351
-
-#ifndef DEFAULT_LINE_WIDTH_FACTOR
-// in ems/1000
-#define DEFAULT_LINE_WIDTH_FACTOR 40
-#endif
-
-const int DEFAULT_HPGL_UNITS = 1016;
-int line_width_factor = DEFAULT_LINE_WIDTH_FACTOR;
-unsigned ncopies = 0; // 0 means don't send ncopies command
-
-class lj4_font : public font {
-public:
- ~lj4_font();
- void handle_unknown_font_command(const char *command, const char *arg,
- const char *filename, int lineno);
- static lj4_font *load_lj4_font(const char *);
- int weight;
- int style;
- int proportional;
- int typeface;
-private:
- lj4_font(const char *);
-};
-
-lj4_font::lj4_font(const char *nm)
-: font(nm), weight(0), style(0), proportional(0), typeface(0)
-{
-}
-
-lj4_font::~lj4_font()
-{
-}
-
-lj4_font *lj4_font::load_lj4_font(const char *s)
-{
- lj4_font *f = new lj4_font(s);
- if (!f->load()) {
- delete f;
- return 0;
- }
- return f;
-}
-
-static struct {
- const char *s;
- int lj4_font::*ptr;
- int min;
- int max;
-} command_table[] = {
- { "pclweight", &lj4_font::weight, -7, 7 },
- { "pclstyle", &lj4_font::style, 0, 32767 },
- { "pclproportional", &lj4_font::proportional, 0, 1 },
- { "pcltypeface", &lj4_font::typeface, 0, 65535 },
-};
-
-void lj4_font::handle_unknown_font_command(const char *command,
- const char *arg,
- const char *filename, int lineno)
-{
- for (int i = 0; i < sizeof(command_table)/sizeof(command_table[0]); i++) {
- if (strcmp(command, command_table[i].s) == 0) {
- if (arg == 0)
- fatal_with_file_and_line(filename, lineno,
- "`%1' command requires an argument",
- command);
- char *ptr;
- long n = strtol(arg, &ptr, 10);
- if (n == 0 && ptr == arg)
- fatal_with_file_and_line(filename, lineno,
- "`%1' command requires numeric argument",
- command);
- if (n < command_table[i].min) {
- error_with_file_and_line(filename, lineno,
- "argument for `%1' command must not be less than %2",
- command, command_table[i].min);
- n = command_table[i].min;
- }
- else if (n > command_table[i].max) {
- error_with_file_and_line(filename, lineno,
- "argument for `%1' command must not be greater than %2",
- command, command_table[i].max);
- n = command_table[i].max;
- }
- this->*command_table[i].ptr = int(n);
- break;
- }
- }
-}
-
-class lj4_printer : public printer {
-public:
- lj4_printer();
- ~lj4_printer();
- void set_char(int, font *, const environment *, int, const char *name);
- void draw(int code, int *p, int np, const environment *env);
- void begin_page(int);
- void end_page(int page_length);
- font *make_font(const char *);
- void end_of_line();
-private:
- void set_line_thickness(int size, int dot = 0);
- void hpgl_init();
- void hpgl_start();
- void hpgl_end();
- int moveto(int hpos, int vpos);
- int moveto1(int hpos, int vpos);
-
- int cur_hpos;
- int cur_vpos;
- lj4_font *cur_font;
- int cur_size;
- unsigned short cur_symbol_set;
- int x_offset;
- int line_thickness;
- double pen_width;
- double hpgl_scale;
- int hpgl_inited;
-};
-
-inline
-int lj4_printer::moveto(int hpos, int vpos)
-{
- if (cur_hpos != hpos || cur_vpos != vpos || cur_hpos < 0)
- return moveto1(hpos, vpos);
- else
- return 1;
-}
-
-inline
-void lj4_printer::hpgl_start()
-{
- fputs("\033%1B", stdout);
-}
-
-inline
-void lj4_printer::hpgl_end()
-{
- fputs(";\033%0A", stdout);
-}
-
-lj4_printer::lj4_printer()
-: cur_hpos(-1),
- cur_font(0),
- cur_size(0),
- cur_symbol_set(0),
- line_thickness(-1),
- pen_width(-1.0),
- hpgl_inited(0)
-{
- if (7200 % font::res != 0)
- fatal("invalid resolution %1: resolution must be a factor of 7200",
- font::res);
- fputs("\033E", stdout); // reset
- if (font::res != 300)
- printf("\033&u%dD", font::res); // unit of measure
- if (ncopies > 0)
- printf("\033&l%uX", ncopies);
- if (paper_size < 0)
- paper_size = 0; // default to letter
- printf("\033&l%dA" // paper size
- "\033&l%dO" // orientation
- "\033&l0E", // no top margin
- paper_table[paper_size].code,
- landscape_flag != 0);
- if (landscape_flag)
- x_offset = paper_table[paper_size].x_offset_landscape;
- else
- x_offset = paper_table[paper_size].x_offset_portrait;
- x_offset = (x_offset * font::res) / 300;
- if (duplex_flag)
- printf("\033&l%dS", duplex_flag);
-}
-
-lj4_printer::~lj4_printer()
-{
- fputs("\033E", stdout);
-}
-
-void lj4_printer::begin_page(int)
-{
-}
-
-void lj4_printer::end_page(int)
-{
- putchar('\f');
- cur_hpos = -1;
-}
-
-void lj4_printer::end_of_line()
-{
- cur_hpos = -1; // force absolute motion
-}
-
-inline
-int is_unprintable(unsigned char c)
-{
- return c < 32 && (c == 0 || (7 <= c && c <= 15) || c == 27);
-}
-
-void lj4_printer::set_char(int index, font *f, const environment *env, int w, const char *name)
-{
- int code = f->get_code(index);
-
- unsigned char ch = code & 0xff;
- unsigned short symbol_set = code >> 8;
- if (symbol_set != cur_symbol_set) {
- printf("\033(%d%c", symbol_set/32, (symbol_set & 31) + 64);
- cur_symbol_set = symbol_set;
- }
- if (f != cur_font) {
- lj4_font *psf = (lj4_font *)f;
- // FIXME only output those that are needed
- printf("\033(s%dp%ds%db%dT",
- psf->proportional,
- psf->style,
- psf->weight,
- psf->typeface);
- if (!psf->proportional || !cur_font || !cur_font->proportional)
- cur_size = 0;
- cur_font = psf;
- }
- if (env->size != cur_size) {
- if (cur_font->proportional) {
- static const char *quarters[] = { "", ".25", ".5", ".75" };
- printf("\033(s%d%sV", env->size/4, quarters[env->size & 3]);
- }
- else {
- double pitch = double(font::res)/w;
- // PCL uses the next largest pitch, so round it down.
- pitch = floor(pitch*100.0)/100.0;
- printf("\033(s%.2fH", pitch);
- }
- cur_size = env->size;
- }
- if (!moveto(env->hpos, env->vpos))
- return;
- if (is_unprintable(ch))
- fputs("\033&p1X", stdout);
- putchar(ch);
- cur_hpos += w;
-}
-
-int lj4_printer::moveto1(int hpos, int vpos)
-{
- if (hpos < x_offset || vpos < 0)
- return 0;
- fputs("\033*p", stdout);
- if (cur_hpos < 0)
- printf("%dx%dY", hpos - x_offset, vpos);
- else {
- if (cur_hpos != hpos)
- printf("%s%d%c", hpos > cur_hpos ? "+" : "",
- hpos - cur_hpos, vpos == cur_vpos ? 'X' : 'x');
- if (cur_vpos != vpos)
- printf("%s%dY", vpos > cur_vpos ? "+" : "", vpos - cur_vpos);
- }
- cur_hpos = hpos;
- cur_vpos = vpos;
- return 1;
-}
-
-void lj4_printer::draw(int code, int *p, int np, const environment *env)
-{
- switch (code) {
- case 'R':
- {
- if (np != 2) {
- error("2 arguments required for rule");
- break;
- }
- int hpos = env->hpos;
- int vpos = env->vpos;
- int hsize = p[0];
- int vsize = p[1];
- if (hsize < 0) {
- hpos += hsize;
- hsize = -hsize;
- }
- if (vsize < 0) {
- vpos += vsize;
- vsize = -vsize;
- }
- if (!moveto(hpos, vpos))
- return;
- printf("\033*c%da%db0P", hsize, vsize);
- break;
- }
- case 'l':
- if (np != 2) {
- error("2 arguments required for line");
- break;
- }
- hpgl_init();
- if (!moveto(env->hpos, env->vpos))
- return;
- hpgl_start();
- set_line_thickness(env->size, p[0] == 0 && p[1] == 0);
- printf("PD%d,%d", p[0], p[1]);
- hpgl_end();
- break;
- case 'p':
- case 'P':
- {
- if (np & 1) {
- error("even number of arguments required for polygon");
- break;
- }
- if (np == 0) {
- error("no arguments for polygon");
- break;
- }
- hpgl_init();
- if (!moveto(env->hpos, env->vpos))
- return;
- hpgl_start();
- if (code == 'p')
- set_line_thickness(env->size);
- printf("PMPD%d", p[0]);
- for (int i = 1; i < np; i++)
- printf(",%d", p[i]);
- printf("PM2%cP", code == 'p' ? 'E' : 'F');
- hpgl_end();
- break;
- }
- case '~':
- {
- if (np & 1) {
- error("even number of arguments required for spline");
- break;
- }
- if (np == 0) {
- error("no arguments for spline");
- break;
- }
- hpgl_init();
- if (!moveto(env->hpos, env->vpos))
- return;
- hpgl_start();
- set_line_thickness(env->size);
- printf("PD%d,%d", p[0]/2, p[1]/2);
- const int tnum = 2;
- const int tden = 3;
- if (np > 2) {
- fputs("BR", stdout);
- for (int i = 0; i < np - 2; i += 2) {
- if (i != 0)
- putchar(',');
- printf("%d,%d,%d,%d,%d,%d",
- (p[i]*tnum)/(2*tden),
- (p[i + 1]*tnum)/(2*tden),
- p[i]/2 + (p[i + 2]*(tden - tnum))/(2*tden),
- p[i + 1]/2 + (p[i + 3]*(tden - tnum))/(2*tden),
- (p[i] - p[i]/2) + p[i + 2]/2,
- (p[i + 1] - p[i + 1]/2) + p[i + 3]/2);
- }
- }
- printf("PR%d,%d", p[np - 2] - p[np - 2]/2, p[np - 1] - p[np - 1]/2);
- hpgl_end();
- break;
- }
- case 'c':
- case 'C':
- // troff adds an extra argument to C
- if (np != 1 && !(code == 'C' && np == 2)) {
- error("1 argument required for circle");
- break;
- }
- hpgl_init();
- if (!moveto(env->hpos + p[0]/2, env->vpos))
- return;
- hpgl_start();
- if (code == 'c') {
- set_line_thickness(env->size);
- printf("CI%d", p[0]/2);
- }
- else
- printf("WG%d,0,360", p[0]/2);
- hpgl_end();
- break;
- case 'e':
- case 'E':
- if (np != 2) {
- error("2 arguments required for ellipse");
- break;
- }
- hpgl_init();
- if (!moveto(env->hpos + p[0]/2, env->vpos))
- return;
- hpgl_start();
- printf("SC0,%.4f,0,-%.4f,2", hpgl_scale * double(p[0])/p[1], hpgl_scale);
- if (code == 'e') {
- set_line_thickness(env->size);
- printf("CI%d", p[1]/2);
- }
- else
- printf("WG%d,0,360", p[1]/2);
- printf("SC0,%.4f,0,-%.4f,2", hpgl_scale, hpgl_scale);
- hpgl_end();
- break;
- case 'a':
- {
- if (np != 4) {
- error("4 arguments required for arc");
- break;
- }
- hpgl_init();
- if (!moveto(env->hpos, env->vpos))
- return;
- hpgl_start();
- set_line_thickness(env->size);
- double c[2];
- if (adjust_arc_center(p, c)) {
- double sweep = ((atan2(p[1] + p[3] - c[1], p[0] + p[2] - c[0])
- - atan2(-c[1], -c[0]))
- * 180.0/PI);
- if (sweep > 0.0)
- sweep -= 360.0;
- printf("PDAR%d,%d,%f", int(c[0]), int(c[1]), sweep);
- }
- else
- printf("PD%d,%d", p[0] + p[2], p[1] + p[3]);
- hpgl_end();
- }
- break;
- case 'f':
- if (np != 1 && np != 2) {
- error("1 argument required for fill");
- break;
- }
- hpgl_init();
- hpgl_start();
- if (p[0] >= 0 && p[0] <= 1000)
- printf("FT10,%d", p[0]/10);
- hpgl_end();
- break;
- case 't':
- {
- if (np == 0) {
- line_thickness = -1;
- }
- else {
- // troff gratuitously adds an extra 0
- if (np != 1 && np != 2) {
- error("0 or 1 argument required for thickness");
- break;
- }
- line_thickness = p[0];
- }
- break;
- }
- default:
- error("unrecognised drawing command `%1'", char(code));
- break;
- }
-}
-
-void lj4_printer::hpgl_init()
-{
- if (hpgl_inited)
- return;
- hpgl_inited = 1;
- hpgl_scale = double(DEFAULT_HPGL_UNITS)/font::res;
- printf("\033&f0S" // push position
- "\033*p0x0Y" // move to 0,0
- "\033*c%dx%dy0T" // establish picture frame
- "\033%%1B" // switch to HPGL
- "SP1SC0,%.4f,0,-%.4f,2IR0,100,0,100" // set up scaling
- "LA1,4,2,4" // round line ends and joins
- "PR" // relative plotting
- "TR0" // opaque
- ";\033%%1A" // back to PCL
- "\033&f1S", // pop position
- MAX_PAPER_WIDTH, MAX_PAPER_HEIGHT,
- hpgl_scale, hpgl_scale);
-}
-
-void lj4_printer::set_line_thickness(int size, int dot)
-{
- double pw;
- if (line_thickness < 0)
- pw = (size * (line_width_factor * 25.4))/(font::sizescale * 72000.0);
- else
- pw = line_thickness*25.4/font::res;
- if (dot && pw < MIN_DOT_PEN_WIDTH)
- pw = MIN_DOT_PEN_WIDTH;
- if (pw != pen_width) {
- printf("PW%f", pw);
- pen_width = pw;
- }
-}
-
-font *lj4_printer::make_font(const char *nm)
-{
- return lj4_font::load_lj4_font(nm);
-}
-
-printer *make_printer()
-{
- return new lj4_printer;
-}
-
-static
-int lookup_paper_size(const char *s)
-{
- for (int i = 0; i < sizeof(paper_table)/sizeof(paper_table[0]); i++) {
- // FIXME Perhaps allow unique prefix.
- if (strcasecmp(s, paper_table[i].name) == 0)
- return i;
- }
- return -1;
-}
-
-static
-void handle_unknown_desc_command(const char *command, const char *arg,
- const char *filename, int lineno)
-{
- if (strcmp(command, "papersize") == 0) {
- if (arg == 0)
- error_with_file_and_line(filename, lineno,
- "`papersize' command requires an argument");
- else if (paper_size < 0) {
- int n = lookup_paper_size(arg);
- if (n < 0)
- error_with_file_and_line(filename, lineno,
- "unknown paper size `%1'", arg);
- else
- paper_size = n;
- }
- }
-}
-
-static void usage(FILE *stream);
-
-extern "C" int optopt, optind;
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- font::set_unknown_desc_command_handler(handle_unknown_desc_command);
- int c;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((c = getopt_long(argc, argv, ":F:p:d:lvw:c:", long_options, NULL))
- != EOF)
- switch(c) {
- case 'l':
- landscape_flag = 1;
- break;
- case ':':
- if (optopt == 'd') {
- fprintf(stderr, "duplex assumed to be long-side\n");
- duplex_flag = 1;
- } else
- fprintf(stderr, "option -%c requires an operand\n", optopt);
- fflush(stderr);
- break;
- case 'd':
- if (!isdigit(*optarg)) // this ugly hack prevents -d without
- optind--; // args from messing up the arg list
- duplex_flag = atoi(optarg);
- if (duplex_flag != 1 && duplex_flag != 2) {
- fprintf(stderr, "odd value for duplex; assumed to be long-side\n");
- duplex_flag = 1;
- }
- break;
- case 'p':
- {
- int n = lookup_paper_size(optarg);
- if (n < 0)
- error("unknown paper size `%1'", optarg);
- else
- paper_size = n;
- break;
- }
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU grolj4 (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'F':
- font::command_line_font_dir(optarg);
- break;
- case 'c':
- {
- char *ptr;
- long n = strtol(optarg, &ptr, 10);
- if (n == 0 && ptr == optarg)
- error("argument for -c must be a positive integer");
- else if (n <= 0 || n > 32767)
- error("out of range argument for -c");
- else
- ncopies = unsigned(n);
- break;
- }
- case 'w':
- {
- char *ptr;
- long n = strtol(optarg, &ptr, 10);
- if (n == 0 && ptr == optarg)
- error("argument for -w must be a non-negative integer");
- else if (n < 0 || n > INT_MAX)
- error("out of range argument for -w");
- else
- line_width_factor = int(n);
- break;
- }
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
-#ifdef SET_BINARY
- SET_BINARY(fileno(stdout));
-#endif
- if (optind >= argc)
- do_file("-");
- else {
- for (int i = optind; i < argc; i++)
- do_file(argv[i]);
- }
- delete pr;
- return 0;
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream,
- "usage: %s [-lv] [-d [n]] [-c n] [-p paper_size]\n"
- " [-w n] [-F dir] [files ...]\n",
- program_name);
-}
diff --git a/contrib/groff/src/devices/grops/Makefile.sub b/contrib/groff/src/devices/grops/Makefile.sub
deleted file mode 100644
index 4182527d514f..000000000000
--- a/contrib/groff/src/devices/grops/Makefile.sub
+++ /dev/null
@@ -1,12 +0,0 @@
-PROG=grops
-MAN1=grops.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
- ps.o \
- psrm.o
-CCSRCS=\
- $(srcdir)/ps.cc \
- $(srcdir)/psrm.cc
-HDRS=\
- $(srcdir)/ps.h
diff --git a/contrib/groff/src/devices/grops/TODO b/contrib/groff/src/devices/grops/TODO
deleted file mode 100644
index da67973a2feb..000000000000
--- a/contrib/groff/src/devices/grops/TODO
+++ /dev/null
@@ -1,29 +0,0 @@
-Read PFB files directly.
-
-Generate %%DocumentMedia comment.
-
-Generate %%For comment.
-
-Generate %%Title comment.
-
-For efficiency it might be better to have the printer interface have
-support for the t and u commands.
-
-Angles in arc command: don't generate more digits after the decimal
-point than are necessary.
-
-Possibly generate BoundingBox comment.
-
-Per font composite character mechanism (sufficient for fractions).
-
-Consider whether we ought to do rounding of graphical objects other
-than lines. What's the point?
-
-Error messages should refer to output page number.
-
-Search for downloadable fonts using their PostScript names if not
-found in download file.
-
-Separate path for searching for downloadable font files.
-
-Clip to the BoundingBox when importing documents.
diff --git a/contrib/groff/src/devices/grops/grops.man b/contrib/groff/src/devices/grops/grops.man
deleted file mode 100644
index 1dac72594602..000000000000
--- a/contrib/groff/src/devices/grops/grops.man
+++ /dev/null
@@ -1,861 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH GROPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-grops \- PostScript driver for groff
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fBgrops 'u
-.ti \niu
-.B grops
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-glmv
-.OP \-b n
-.OP \-c n
-.OP \-w n
-.OP \-F dir
-.OP \-P prologue
-.RI "[\ " files\|.\|.\|. "\ ]"
-.br
-.ad \na
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-.B grops
-translates the output of GNU
-.B troff
-to PostScript.
-Normally
-.B grops
-should be invoked by using the groff command
-with a
-.B \-Tps
-option.
-.if '@DEVICE@'ps' (Actually, this is the default for groff.)
-If no files are given,
-.B grops
-will read the standard input.
-A filename of
-.B \-
-will also cause
-.B grops
-to read the standard input.
-PostScript output is written to the standard output.
-When
-.B grops
-is run by
-.B groff
-options can be passed to
-.B grops
-using the
-.B groff
-.B \-P
-option.
-.SH OPTIONS
-.TP
-.BI \-b n
-Workaround broken spoolers and previewers.
-Normally
-.B grops
-produces output that conforms
-the Document Structuring Conventions version 3.0.
-Unfortunately some spoolers and previewers can't handle such output.
-The value of
-.I n
-controls what
-.B grops
-does to its output acceptable to such programs.
-A value of 0 will cause grops not to employ any workarounds.
-Add 1 if no
-.B %%BeginDocumentSetup
-and
-.B %%EndDocumentSetup
-comments should be generated;
-this is needed for early versions of TranScript that get confused by
-anything between the
-.B %%EndProlog
-comment and the first
-.B %%Page
-comment.
-Add 2 if lines in included files beginning with
-.B %!
-should be stripped out; this is needed for Sun's pageview previewer.
-Add 4 if
-.BR %%Page ,
-.BR %%Trailer
-and
-.B %%EndProlog
-comments should be
-stripped out of included files; this is needed for spoolers that
-don't understand the
-.B %%BeginDocument
-and
-.B %%EndDocument
-comments.
-Add 8 if the first line of the PostScript output should be
-.B %!PS-Adobe-2.0
-rather than
-.BR %!PS-Adobe-3.0 ;
-this is needed when using Sun's Newsprint with a printer that requires
-page reversal.
-The default value can be specified by a
-.RS
-.IP
-.BI broken\ n
-.LP
-command in the DESC file.
-Otherwise the default value is 0.
-.RE
-.TP
-.BI \-c n
-Print
-.I n
-copies of each page.
-.TP
-.BI \-g
-Guess the page length.
-This generates PostScript code that guesses the page length.
-The guess will be correct only if the imageable area is vertically
-centered on the page.
-This option allows you to generate documents that can be printed
-both on letter (8.5\(mu11) paper and on A4 paper without change.
-.TP
-.B \-l
-Print the document in landscape format.
-.TP
-.B \-m
-Turn manual feed on for the document.
-.TP
-.BI \-F dir
-Prepend directory
-.IB dir /dev name
-to the search path for prologue, font, and device description files;
-.I name
-is the name of the device, usually
-.BR ps .
-.TP
-.BI \-P prologue-file
-Use the file
-.I prologue-file
-(in the font path) as the prologue instead of the default prologue file
-.BR prologue .
-This option overrides the environment variable
-.SM GROPS_PROLOGUE.
-.TP
-.BI \-w n
-Lines should be drawn using a thickness of
-.I n
-thousandths of an em.
-.TP
-.B \-v
-Print the version number.
-.SH USAGE
-There are styles called
-.BR R ,
-.BR I ,
-.BR B ,
-and
-.B BI
-mounted at font positions 1 to 4.
-The fonts are grouped into families
-.BR A ,
-.BR BM ,
-.BR C ,
-.BR H ,
-.BR HN ,
-.BR N ,
-.B P
-and
-.B T
-having members in each of these styles:
-.de FT
-.if '\\*(.T'ps' .ft \\$1
-..
-.TP
-.B AR
-.FT AR
-AvantGarde-Book
-.FT
-.TP
-.B AI
-.FT AI
-AvantGarde-BookOblique
-.FT
-.TP
-.B AB
-.FT AB
-AvantGarde-Demi
-.FT
-.TP
-.B ABI
-.FT ABI
-AvantGarde-DemiOblique
-.FT
-.TP
-.B BMR
-.FT BMR
-Bookman-Light
-.FT
-.TP
-.B BMI
-.FT BMI
-Bookman-LightItalic
-.FT
-.TP
-.B BMB
-.FT BMB
-Bookman-Demi
-.FT
-.TP
-.B BMBI
-.FT BMBI
-Bookman-DemiItalic
-.FT
-.TP
-.B CR
-.FT CR
-Courier
-.FT
-.TP
-.B CI
-.FT CI
-Courier-Oblique
-.FT
-.TP
-.B CB
-.FT CB
-Courier-Bold
-.FT
-.TP
-.B CBI
-.FT CBI
-Courier-BoldOblique
-.FT
-.TP
-.B HR
-.FT HR
-Helvetica
-.FT
-.TP
-.B HI
-.FT HI
-Helvetica-Oblique
-.FT
-.TP
-.B HB
-.FT HB
-Helvetica-Bold
-.FT
-.TP
-.B HBI
-.FT HBI
-Helvetica-BoldOblique
-.FT
-.TP
-.B HNR
-.FT HNR
-Helvetica-Narrow
-.FT
-.TP
-.B HNI
-.FT HNI
-Helvetica-Narrow-Oblique
-.FT
-.TP
-.B HNB
-.FT HNB
-Helvetica-Narrow-Bold
-.FT
-.TP
-.B HNBI
-.FT HNBI
-Helvetica-Narrow-BoldOblique
-.FT
-.TP
-.B NR
-.FT NR
-NewCenturySchlbk-Roman
-.FT
-.TP
-.B NI
-.FT NI
-NewCenturySchlbk-Italic
-.FT
-.TP
-.B NB
-.FT NB
-NewCenturySchlbk-Bold
-.FT
-.TP
-.B NBI
-.FT NBI
-NewCenturySchlbk-BoldItalic
-.FT
-.TP
-.B PR
-.FT PR
-Palatino-Roman
-.FT
-.TP
-.B PI
-.FT PI
-Palatino-Italic
-.FT
-.TP
-.B PB
-.FT PB
-Palatino-Bold
-.FT
-.TP
-.B PBI
-.FT PBI
-Palatino-BoldItalic
-.FT
-.TP
-.B TR
-.FT TR
-Times-Roman
-.FT
-.TP
-.B TI
-.FT TI
-Times-Italic
-.FT
-.TP
-.B TB
-.FT TB
-Times-Bold
-.FT
-.TP
-.B TBI
-.FT TBI
-Times-BoldItalic
-.FT
-.LP
-There is also the following font which is not a member of a family:
-.TP
-.B ZCMI
-.FT ZCMI
-ZapfChancery-MediumItalic
-.FT
-.LP
-There are also some special fonts called
-.B SS
-and
-.BR S .
-Zapf Dingbats is available as
-.BR ZD
-and a reversed version of ZapfDingbats (with symbols pointing in the opposite
-direction) is available as
-.BR ZDR ;
-most characters in these fonts are unnamed and must be accessed using
-.BR \eN .
-.LP
-.B grops
-understands various X commands produced using the
-.B \eX
-escape sequence;
-.B grops
-will only interpret commands that begin with a
-.B ps:
-tag.
-.TP
-.BI \eX'ps:\ exec\ code '
-This executes the arbitrary PostScript commands in
-.IR code .
-The PostScript currentpoint will be set to the position of the
-.B \eX
-command before executing
-.IR code .
-The origin will be at the top left corner of the page,
-and y coordinates will increase down the page.
-A procedure
-.B u
-will be defined that converts groff units
-to the coordinate system in effect.
-For example,
-.RS
-.IP
-.B
-\&.nr x 1i
-.br
-.B
-\eX'ps: exec \enx u 0 rlineto stroke'
-.br
-.RE
-.IP
-will draw a horizontal line one inch long.
-.I code
-may make changes to the graphics state,
-but any changes will persist only to the
-end of the page.
-A dictionary containing the definitions specified by the
-.B def
-and
-.B mdef
-will be on top of the dictionary stack.
-If your code adds definitions to this dictionary,
-you should allocate space for them using
-.BI \eX'ps\ mdef \ n '\fR.
-Any definitions will persist only until the end of the page.
-If you use the
-.B \eY
-escape sequence with an argument that names a macro,
-.I code
-can extend over multiple lines.
-For example,
-.RS
-.IP
-.nf
-.ft B
-\&.nr x 1i
-\&.de y
-\&ps: exec
-\&\enx u 0 rlineto
-\&stroke
-\&..
-\&\eYy
-.fi
-.ft R
-.LP
-is another way to draw a horizontal line one inch long.
-.RE
-.TP
-.BI \eX'ps:\ file\ name '
-This is the same as the
-.B exec
-command except that the PostScript code is read from file
-.IR name .
-.TP
-.BI \eX'ps:\ def\ code '
-Place a PostScript definition contained in
-.I code
-in the prologue.
-There should be at most one definition per
-.B \eX
-command.
-Long definitions can be split over several
-.B \eX
-commands;
-all the
-.I code
-arguments are simply joined together separated by newlines.
-The definitions are placed in a dictionary which is automatically
-pushed on the dictionary stack when an
-.B exec
-command is executed.
-If you use the
-.B \eY
-escape sequence with an argument that names a macro,
-.I code
-can extend over multiple lines.
-.TP
-.BI \eX'ps:\ mdef\ n\ code '
-Like
-.BR def ,
-except that
-.I code
-may contain up to
-.I n
-definitions.
-.B grops
-needs to know how many definitions
-.I code
-contains
-so that it can create an appropriately sized PostScript dictionary
-to contain them.
-.TP
-.BI \eX'ps:\ import\ file\ llx\ lly\ urx\ ury\ width\ \fR[\fP\ height\ \fR]\fP '
-Import a PostScript graphic from
-.IR file .
-The arguments
-.IR llx ,
-.IR lly ,
-.IR urx ,
-and
-.I ury
-give the bounding box of the graphic in the default PostScript
-coordinate system; they should all be integers;
-.I llx
-and
-.I lly
-are the x and y coordinates of the lower left
-corner of the graphic;
-.I urx
-and
-.I ury
-are the x and y coordinates of the upper right corner of the graphic;
-.I width
-and
-.I height
-are integers that give the desired width and height in groff
-units of the graphic.
-The graphic will be scaled so that it has this width and height
-and translated so that the lower left corner of the graphic is
-located at the position associated with
-.B \eX
-command.
-If the height argument is omitted it will be scaled uniformly in the
-x and y directions so that it has the specified width.
-Note that the contents of the
-.B \eX
-command are not interpreted by
-.BR troff ;
-so vertical space for the graphic is not automatically added,
-and the
-.I width
-and
-.I height
-arguments are not allowed to have attached scaling indicators.
-If the PostScript file complies with the Adobe Document Structuring
-Conventions and contains a
-.B %%BoundingBox
-comment, then the bounding box can be automatically
-extracted from within groff by using the
-.B psbb
-request.
-.RS
-.LP
-The
-.B \-mps
-macros (which are automatically loaded when
-.B grops
-is run by the groff command) include a
-.B PSPIC
-macro which allows a picture to be easily imported.
-This has the format
-.IP
-\&\fB.PSPIC\fP [ \fB\-L\fP | \fB-R\fP | \fB\-I\fP \fIn\fP ]\ \"
-\fI\|file\fP [ \fIwidth\fP [ \fIheight\fP ]]
-.LP
-.I file
-is the name of the file containing the illustration;
-.I width
-and
-.I height
-give the desired width and height of the graphic.
-The
-.I width
-and
-.I height
-arguments may have scaling indicators attached;
-the default scaling indicator is
-.BR i .
-This macro will scale the graphic uniformly
-in the x and y directions so that it is no more than
-.I width
-wide
-and
-.I height
-high.
-By default, the graphic will be horizontally centered.
-The
-.BI \-L
-and
-.BI \-R
-cause the graphic to be left-aligned and right-aligned
-respectively.
-The
-.B \-I
-option causes the graphic to be indented by
-.IR n .
-.RE
-.TP
-.B \eX'ps:\ invis'
-.br
-.ns
-.TP
-.B \eX'ps:\ endinvis'
-No output will be generated for text and drawing commands
-that are bracketed with these
-.B \eX
-commands.
-These commands are intended for use when output from
-.B troff
-will be previewed before being processed with
-.BR grops ;
-if the previewer is unable to display certain characters
-or other constructs, then other substitute characters or constructs
-can be used for previewing by bracketing them with these
-.B \eX
-commands.
-.RS
-.LP
-For example,
-.B gxditview
-is not able to display a proper
-.B \e(em
-character because the standard X11 fonts do not provide it;
-this problem can be overcome by executing the following
-request
-.IP
-.ft B
-.nf
-\&.char \e(em \eX'ps: invis'\e
-\eZ'\ev'-.25m'\eh'.05m'\eD'l .9m 0'\eh'.05m''\e
-\eX'ps: endinvis'\e(em
-.ft
-.fi
-.LP
-In this case,
-.B gxditview
-will be unable to display the
-.B \e(em
-character and will draw the line,
-whereas
-.B grops
-will print the
-.B \e(em
-character
-and ignore the line.
-.RE
-.LP
-The input to
-.B grops
-must be in the format output by
-.BR @g@troff (@MAN1EXT@).
-This is described in
-.BR groff_out (@MAN5EXT@).
-In addition the device and font description files for the device used
-must meet certain requirements.
-The device and font description files supplied for
-.B ps
-device meet all these requirements.
-.BR afmtodit (@MAN1EXT@)
-can be used to create font files from AFM files.
-The resolution must be an integer multiple of 72 times the
-.BR sizescale .
-The
-.B ps
-device uses a resolution of 72000 and a sizescale of 1000.
-The device description file should contain a command
-.IP
-.BI paperlength\ n
-.LP
-which says that output should be generated which is suitable for
-printing on a page whose length is
-.I n
-machine units.
-Each font description file must contain a command
-.IP
-.BI internalname\ psname
-.LP
-which says that the PostScript name of the font is
-.IR psname .
-It may also contain a command
-.IP
-.BI encoding\ enc_file
-.LP
-which says that
-the PostScript font should be reencoded using the encoding described in
-.IR enc_file ;
-this file should consist of a sequence of lines of the form:
-.IP
-.I
-pschar code
-.LP
-where
-.I pschar
-is the PostScript name of the character,
-and
-.I code
-is its position in the encoding expressed as a decimal integer.
-The code for each character given in the font file must correspond
-to the code for the character in encoding file, or to the code in the default
-encoding for the font if the PostScript font is not to be reencoded.
-This code can be used with the
-.B \eN
-escape sequence in
-.B troff
-to select the character,
-even if the character does not have a groff name.
-Every character in the font file must exist in the PostScript font, and
-the widths given in the font file must match the widths used
-in the PostScript font.
-.B grops
-will assume that a character with a groff name of
-.B space
-is blank (makes no marks on the page);
-it can make use of such a character to generate more efficient and
-compact PostScript output.
-.LP
-.B grops
-can automatically include the downloadable fonts necessary
-to print the document.
-Any downloadable fonts which should, when required, be included by
-.B grops
-must be listed in the file
-.BR @FONTDIR@/devps/download ;
-this should consist of lines of the form
-.IP
-.I
-font filename
-.LP
-where
-.I font
-is the PostScript name of the font,
-and
-.I filename
-is the name of the file containing the font;
-lines beginning with
-.B #
-and blank lines are ignored;
-fields may be separated by tabs or spaces;
-.I filename
-will be searched for using the same mechanism that is used
-for groff font metric files.
-The
-.B download
-file itself will also be searched for using this mechanism.
-.LP
-If the file containing a downloadable font or imported document
-conforms to the Adobe Document Structuring Conventions,
-then
-.B grops
-will interpret any comments in the files sufficiently to ensure that its
-own output is conforming.
-It will also supply any needed font resources that are listed in the
-.B download
-file
-as well as any needed file resources.
-It is also able to handle inter-resource dependencies.
-For example, suppose that you have a downloadable font called Garamond,
-and also a downloadable font called Garamond-Outline
-which depends on Garamond
-(typically it would be defined to copy Garamond's font dictionary,
-and change the PaintType),
-then it is necessary for Garamond to be appear before Garamond-Outline
-in the PostScript document.
-.B grops
-will handle this automatically
-provided that the downloadable font file for Garamond-Outline
-indicates its dependence on Garamond by means of
-the Document Structuring Conventions,
-for example by beginning with the following lines
-.IP
-.B
-%!PS-Adobe-3.0 Resource-Font
-.br
-.B
-%%DocumentNeededResources: font Garamond
-.br
-.B
-%%EndComments
-.br
-.B
-%%IncludeResource: font Garamond
-.LP
-In this case both Garamond and Garamond-Outline would need to be listed
-in the
-.B download
-file.
-A downloadable font should not include its own name in a
-.B %%DocumentSuppliedResources
-comment.
-.LP
-.B grops
-will not interpret
-.B %%DocumentFonts
-comments.
-The
-.BR %%DocumentNeededResources ,
-.BR %%DocumentSuppliedResources ,
-.BR %%IncludeResource ,
-.BR %%BeginResource
-and
-.BR %%EndResource
-comments
-(or possibly the old
-.BR %%DocumentNeededFonts ,
-.BR %%DocumentSuppliedFonts ,
-.BR %%IncludeFont ,
-.BR %%BeginFont
-and
-.BR %%EndFont
-comments)
-should be used.
-.SH ENVIRONMENT
-.TP
-.SM
-.B GROPS_PROLOGUE
-If this is set to
-.IR foo ,
-then
-.B grops
-will use the file
-.I foo
-(in the font path) instead of the default prologue file
-.BR prologue .
-The option
-.B \-P
-overrides this environment variable.
-.SH FILES
-.Tp \w'\fB@FONTDIR@/devps/download'u+2n
-.B @FONTDIR@/devps/DESC
-Device description file.
-.TP
-.BI @FONTDIR@/devps/ F
-Font description file for font
-.IR F .
-.TP
-.B @FONTDIR@/devps/download
-List of downloadable fonts.
-.TP
-.B @FONTDIR@/devps/text.enc
-Encoding used for text fonts.
-.TP
-.B @MACRODIR@/ps.tmac
-Macros for use with
-.BR grops ;
-automatically loaded by
-.BR troffrc
-.TP
-.B @MACRODIR@/pspic.tmac
-Definition of
-.B PSPIC
-macro,
-automatically loaded by
-.BR ps.tmac .
-.TP
-.B @MACRODIR@/psold.tmac
-Macros to disable use of characters not present in older
-PostScript printers (e.g. `eth' or `thorn').
-.TP
-.BI /tmp/grops XXXXXX
-Temporary file.
-.SH "SEE ALSO"
-.BR afmtodit (@MAN1EXT@),
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR psbb (@MAN1EXT@),
-.BR groff_out (@MAN5EXT@),
-.BR groff_font (@MAN5EXT@),
-.BR groff_char (@MAN7EXT@)
diff --git a/contrib/groff/src/devices/grops/ps.cc b/contrib/groff/src/devices/grops/ps.cc
deleted file mode 100644
index 98b1a910607e..000000000000
--- a/contrib/groff/src/devices/grops/ps.cc
+++ /dev/null
@@ -1,1570 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "driver.h"
-#include "stringclass.h"
-#include "cset.h"
-#include "nonposix.h"
-
-#include "ps.h"
-#include <time.h>
-
-#ifdef NEED_DECLARATION_PUTENV
-extern "C" {
- int putenv(const char *);
-}
-#endif /* NEED_DECLARATION_PUTENV */
-
-static int landscape_flag = 0;
-static int manual_feed_flag = 0;
-static int ncopies = 1;
-static int linewidth = -1;
-// Non-zero means generate PostScript code that guesses the paper
-// length using the imageable area.
-static int guess_flag = 0;
-
-// Non-zero if -b was specified on the command line.
-static int bflag = 0;
-unsigned broken_flags = 0;
-
-#define DEFAULT_LINEWIDTH 40 /* in ems/1000 */
-#define MAX_LINE_LENGTH 72
-#define FILL_MAX 1000
-
-const char *const dict_name = "grops";
-const char *const defs_dict_name = "DEFS";
-const int DEFS_DICT_SPARE = 50;
-
-double degrees(double r)
-{
- return r*180.0/PI;
-}
-
-double radians(double d)
-{
- return d*PI/180.0;
-}
-
-inline double transform_fill(int fill)
-{
- return 1 - fill/double(FILL_MAX);
-}
-
-// This is used for testing whether a character should be output in the
-// PostScript file using \nnn, so we really want the character to be
-// less than 0200.
-
-inline int is_ascii(char c)
-{
- return (unsigned char)c < 0200;
-}
-
-ps_output::ps_output(FILE *f, int n)
-: fp(f), col(0), max_line_length(n), need_space(0), fixed_point(0)
-{
-}
-
-ps_output &ps_output::set_file(FILE *f)
-{
- fp = f;
- col = 0;
- return *this;
-}
-
-ps_output &ps_output::copy_file(FILE *infp)
-{
- int c;
- while ((c = getc(infp)) != EOF)
- putc(c, fp);
- return *this;
-}
-
-ps_output &ps_output::end_line()
-{
- if (col != 0) {
- putc('\n', fp);
- col = 0;
- need_space = 0;
- }
- return *this;
-}
-
-ps_output &ps_output::special(const char *s)
-{
- if (s == 0 || *s == '\0')
- return *this;
- if (col != 0) {
- putc('\n', fp);
- col = 0;
- }
- fputs(s, fp);
- if (strchr(s, '\0')[-1] != '\n')
- putc('\n', fp);
- need_space = 0;
- return *this;
-}
-
-ps_output &ps_output::simple_comment(const char *s)
-{
- if (col != 0)
- putc('\n', fp);
- putc('%', fp);
- putc('%', fp);
- fputs(s, fp);
- putc('\n', fp);
- col = 0;
- need_space = 0;
- return *this;
-}
-
-ps_output &ps_output::begin_comment(const char *s)
-{
- if (col != 0)
- putc('\n', fp);
- putc('%', fp);
- putc('%', fp);
- fputs(s, fp);
- col = 2 + strlen(s);
- return *this;
-}
-
-ps_output &ps_output::end_comment()
-{
- if (col != 0) {
- putc('\n', fp);
- col = 0;
- }
- need_space = 0;
- return *this;
-}
-
-ps_output &ps_output::comment_arg(const char *s)
-{
- int len = strlen(s);
- if (col + len + 1 > max_line_length) {
- putc('\n', fp);
- fputs("%%+", fp);
- col = 3;
- }
- putc(' ', fp);
- fputs(s, fp);
- col += len + 1;
- return *this;
-}
-
-ps_output &ps_output::set_fixed_point(int n)
-{
- assert(n >= 0 && n <= 10);
- fixed_point = n;
- return *this;
-}
-
-ps_output &ps_output::put_delimiter(char c)
-{
- if (col + 1 > max_line_length) {
- putc('\n', fp);
- col = 0;
- }
- putc(c, fp);
- col++;
- need_space = 0;
- return *this;
-}
-
-ps_output &ps_output::put_string(const char *s, int n)
-{
- int len = 0;
- int i;
- for (i = 0; i < n; i++) {
- char c = s[i];
- if (is_ascii(c) && csprint(c)) {
- if (c == '(' || c == ')' || c == '\\')
- len += 2;
- else
- len += 1;
- }
- else
- len += 4;
- }
- if (len > n*2) {
- if (col + n*2 + 2 > max_line_length && n*2 + 2 <= max_line_length) {
- putc('\n', fp);
- col = 0;
- }
- if (col + 1 > max_line_length) {
- putc('\n', fp);
- col = 0;
- }
- putc('<', fp);
- col++;
- for (i = 0; i < n; i++) {
- if (col + 2 > max_line_length) {
- putc('\n', fp);
- col = 0;
- }
- fprintf(fp, "%02x", s[i] & 0377);
- col += 2;
- }
- putc('>', fp);
- col++;
- }
- else {
- if (col + len + 2 > max_line_length && len + 2 <= max_line_length) {
- putc('\n', fp);
- col = 0;
- }
- if (col + 2 > max_line_length) {
- putc('\n', fp);
- col = 0;
- }
- putc('(', fp);
- col++;
- for (i = 0; i < n; i++) {
- char c = s[i];
- if (is_ascii(c) && csprint(c)) {
- if (c == '(' || c == ')' || c == '\\')
- len = 2;
- else
- len = 1;
- }
- else
- len = 4;
- if (col + len + 1 > max_line_length) {
- putc('\\', fp);
- putc('\n', fp);
- col = 0;
- }
- switch (len) {
- case 1:
- putc(c, fp);
- break;
- case 2:
- putc('\\', fp);
- putc(c, fp);
- break;
- case 4:
- fprintf(fp, "\\%03o", c & 0377);
- break;
- default:
- assert(0);
- }
- col += len;
- }
- putc(')', fp);
- col++;
- }
- need_space = 0;
- return *this;
-}
-
-ps_output &ps_output::put_number(int n)
-{
- char buf[1 + INT_DIGITS + 1];
- sprintf(buf, "%d", n);
- int len = strlen(buf);
- if (col > 0 && col + len + need_space > max_line_length) {
- putc('\n', fp);
- col = 0;
- need_space = 0;
- }
- if (need_space) {
- putc(' ', fp);
- col++;
- }
- fputs(buf, fp);
- col += len;
- need_space = 1;
- return *this;
-}
-
-ps_output &ps_output::put_fix_number(int i)
-{
- const char *p = if_to_a(i, fixed_point);
- int len = strlen(p);
- if (col > 0 && col + len + need_space > max_line_length) {
- putc('\n', fp);
- col = 0;
- need_space = 0;
- }
- if (need_space) {
- putc(' ', fp);
- col++;
- }
- fputs(p, fp);
- col += len;
- need_space = 1;
- return *this;
-}
-
-ps_output &ps_output::put_float(double d)
-{
- char buf[128];
- sprintf(buf, "%.4f", d);
- int len = strlen(buf);
- if (col > 0 && col + len + need_space > max_line_length) {
- putc('\n', fp);
- col = 0;
- need_space = 0;
- }
- if (need_space) {
- putc(' ', fp);
- col++;
- }
- fputs(buf, fp);
- col += len;
- need_space = 1;
- return *this;
-}
-
-ps_output &ps_output::put_symbol(const char *s)
-{
- int len = strlen(s);
- if (col > 0 && col + len + need_space > max_line_length) {
- putc('\n', fp);
- col = 0;
- need_space = 0;
- }
- if (need_space) {
- putc(' ', fp);
- col++;
- }
- fputs(s, fp);
- col += len;
- need_space = 1;
- return *this;
-}
-
-ps_output &ps_output::put_literal_symbol(const char *s)
-{
- int len = strlen(s);
- if (col > 0 && col + len + 1 > max_line_length) {
- putc('\n', fp);
- col = 0;
- }
- putc('/', fp);
- fputs(s, fp);
- col += len + 1;
- need_space = 1;
- return *this;
-}
-
-class ps_font : public font {
- ps_font(const char *);
-public:
- int encoding_index;
- char *encoding;
- char *reencoded_name;
- ~ps_font();
- void handle_unknown_font_command(const char *command, const char *arg,
- const char *filename, int lineno);
- static ps_font *load_ps_font(const char *);
-};
-
-ps_font *ps_font::load_ps_font(const char *s)
-{
- ps_font *f = new ps_font(s);
- if (!f->load()) {
- delete f;
- return 0;
- }
- return f;
-}
-
-ps_font::ps_font(const char *nm)
-: font(nm), encoding_index(-1), encoding(0), reencoded_name(0)
-{
-}
-
-ps_font::~ps_font()
-{
- a_delete encoding;
- a_delete reencoded_name;
-}
-
-void ps_font::handle_unknown_font_command(const char *command, const char *arg,
- const char *filename, int lineno)
-{
- if (strcmp(command, "encoding") == 0) {
- if (arg == 0)
- error_with_file_and_line(filename, lineno,
- "`encoding' command requires an argument");
- else
- encoding = strsave(arg);
- }
-}
-
-static void handle_unknown_desc_command(const char *command, const char *arg,
- const char *filename, int lineno)
-{
- if (strcmp(command, "broken") == 0) {
- if (arg == 0)
- error_with_file_and_line(filename, lineno,
- "`broken' command requires an argument");
- else if (!bflag)
- broken_flags = atoi(arg);
- }
-}
-
-struct style {
- font *f;
- int point_size;
- int height;
- int slant;
- style();
- style(font *, int, int, int);
- int operator==(const style &) const;
- int operator!=(const style &) const;
-};
-
-style::style() : f(0)
-{
-}
-
-style::style(font *p, int sz, int h, int sl)
-: f(p), point_size(sz), height(h), slant(sl)
-{
-}
-
-int style::operator==(const style &s) const
-{
- return (f == s.f && point_size == s.point_size
- && height == s.height && slant == s.slant);
-}
-
-int style::operator!=(const style &s) const
-{
- return !(*this == s);
-}
-
-class ps_printer : public printer {
- FILE *tempfp;
- ps_output out;
- int res;
- int space_char_index;
- int pages_output;
- int paper_length;
- int equalise_spaces;
- enum { SBUF_SIZE = 256 };
- char sbuf[SBUF_SIZE];
- int sbuf_len;
- int sbuf_start_hpos;
- int sbuf_vpos;
- int sbuf_end_hpos;
- int sbuf_space_width;
- int sbuf_space_count;
- int sbuf_space_diff_count;
- int sbuf_space_code;
- int sbuf_kern;
- style sbuf_style;
- style output_style;
- int output_hpos;
- int output_vpos;
- int output_draw_point_size;
- int line_thickness;
- int output_line_thickness;
- int fill;
- unsigned char output_space_code;
- enum { MAX_DEFINED_STYLES = 50 };
- style defined_styles[MAX_DEFINED_STYLES];
- int ndefined_styles;
- int next_encoding_index;
- string defs;
- int ndefs;
- resource_manager rm;
- int invis_count;
-
- void flush_sbuf();
- void set_style(const style &);
- void set_space_code(unsigned char c);
- int set_encoding_index(ps_font *);
- void do_exec(char *, const environment *);
- void do_import(char *, const environment *);
- void do_def(char *, const environment *);
- void do_mdef(char *, const environment *);
- void do_file(char *, const environment *);
- void do_invis(char *, const environment *);
- void do_endinvis(char *, const environment *);
- void set_line_thickness(const environment *);
- void fill_path();
- void encode_fonts();
- void define_encoding(const char *, int);
- void reencode_font(ps_font *);
-public:
- ps_printer();
- ~ps_printer();
- void set_char(int i, font *f, const environment *env, int w, const char *name);
- void draw(int code, int *p, int np, const environment *env);
- void begin_page(int);
- void end_page(int);
- void special(char *arg, const environment *env, char type);
- font *make_font(const char *);
- void end_of_line();
-};
-
-ps_printer::ps_printer()
-: out(0, MAX_LINE_LENGTH),
- pages_output(0),
- sbuf_len(0),
- output_hpos(-1),
- output_vpos(-1),
- line_thickness(-1),
- fill(FILL_MAX + 1),
- ndefined_styles(0),
- next_encoding_index(0),
- ndefs(0),
- invis_count(0)
-{
- tempfp = xtmpfile();
- out.set_file(tempfp);
- if (linewidth < 0)
- linewidth = DEFAULT_LINEWIDTH;
- if (font::hor != 1)
- fatal("horizontal resolution must be 1");
- if (font::vert != 1)
- fatal("vertical resolution must be 1");
- if (font::res % (font::sizescale*72) != 0)
- fatal("res must be a multiple of 72*sizescale");
- int r = font::res;
- int point = 0;
- while (r % 10 == 0) {
- r /= 10;
- point++;
- }
- res = r;
- out.set_fixed_point(point);
- space_char_index = font::name_to_index("space");
- paper_length = font::paperlength;
- if (paper_length == 0)
- paper_length = 11*font::res;
- equalise_spaces = font::res >= 72000;
-}
-
-int ps_printer::set_encoding_index(ps_font *f)
-{
- if (f->encoding_index >= 0)
- return f->encoding_index;
- for (font_pointer_list *p = font_list; p; p = p->next)
- if (p->p != f) {
- char *encoding = ((ps_font *)p->p)->encoding;
- int encoding_index = ((ps_font *)p->p)->encoding_index;
- if (encoding != 0 && encoding_index >= 0
- && strcmp(f->encoding, encoding) == 0) {
- return f->encoding_index = encoding_index;
- }
- }
- return f->encoding_index = next_encoding_index++;
-}
-
-void ps_printer::set_char(int i, font *f, const environment *env, int w, const char *name)
-{
- if (i == space_char_index || invis_count > 0)
- return;
- unsigned char code = f->get_code(i);
- style sty(f, env->size, env->height, env->slant);
- if (sty.slant != 0) {
- if (sty.slant > 80 || sty.slant < -80) {
- error("silly slant `%1' degrees", sty.slant);
- sty.slant = 0;
- }
- }
- if (sbuf_len > 0) {
- if (sbuf_len < SBUF_SIZE
- && sty == sbuf_style
- && sbuf_vpos == env->vpos) {
- if (sbuf_end_hpos == env->hpos) {
- sbuf[sbuf_len++] = code;
- sbuf_end_hpos += w + sbuf_kern;
- return;
- }
- if (sbuf_len == 1 && sbuf_kern == 0) {
- sbuf_kern = env->hpos - sbuf_end_hpos;
- sbuf_end_hpos = env->hpos + sbuf_kern + w;
- sbuf[sbuf_len++] = code;
- return;
- }
- /* If sbuf_end_hpos - sbuf_kern == env->hpos, we are better off
- starting a new string. */
- if (sbuf_len < SBUF_SIZE - 1 && env->hpos >= sbuf_end_hpos
- && (sbuf_kern == 0 || sbuf_end_hpos - sbuf_kern != env->hpos)) {
- if (sbuf_space_code < 0) {
- if (f->contains(space_char_index)) {
- sbuf_space_code = f->get_code(space_char_index);
- sbuf_space_width = env->hpos - sbuf_end_hpos;
- sbuf_end_hpos = env->hpos + w + sbuf_kern;
- sbuf[sbuf_len++] = sbuf_space_code;
- sbuf[sbuf_len++] = code;
- sbuf_space_count++;
- return;
- }
- }
- else {
- int diff = env->hpos - sbuf_end_hpos - sbuf_space_width;
- if (diff == 0 || (equalise_spaces && (diff == 1 || diff == -1))) {
- sbuf_end_hpos = env->hpos + w + sbuf_kern;
- sbuf[sbuf_len++] = sbuf_space_code;
- sbuf[sbuf_len++] = code;
- sbuf_space_count++;
- if (diff == 1)
- sbuf_space_diff_count++;
- else if (diff == -1)
- sbuf_space_diff_count--;
- return;
- }
- }
- }
- }
- flush_sbuf();
- }
- sbuf_len = 1;
- sbuf[0] = code;
- sbuf_end_hpos = env->hpos + w;
- sbuf_start_hpos = env->hpos;
- sbuf_vpos = env->vpos;
- sbuf_style = sty;
- sbuf_space_code = -1;
- sbuf_space_width = 0;
- sbuf_space_count = sbuf_space_diff_count = 0;
- sbuf_kern = 0;
-}
-
-static char *make_encoding_name(int encoding_index)
-{
- static char buf[3 + INT_DIGITS + 1];
- sprintf(buf, "ENC%d", encoding_index);
- return buf;
-}
-
-const char *const WS = " \t\n\r";
-
-void ps_printer::define_encoding(const char *encoding, int encoding_index)
-{
- char *vec[256];
- int i;
- for (i = 0; i < 256; i++)
- vec[i] = 0;
- char *path;
- FILE *fp = font::open_file(encoding, &path);
- if (fp == 0)
- fatal("can't open encoding file `%1'", encoding);
- int lineno = 1;
- char buf[256];
- while (fgets(buf, 512, fp) != 0) {
- char *p = buf;
- while (csspace(*p))
- p++;
- if (*p != '#' && *p != '\0' && (p = strtok(buf, WS)) != 0) {
- char *q = strtok(0, WS);
- int n;
- if (q == 0 || sscanf(q, "%d", &n) != 1 || n < 0 || n >= 256)
- fatal_with_file_and_line(path, lineno, "bad second field");
- vec[n] = new char[strlen(p) + 1];
- strcpy(vec[n], p);
- }
- lineno++;
- }
- a_delete path;
- out.put_literal_symbol(make_encoding_name(encoding_index));
- out.put_delimiter('[');
- for (i = 0; i < 256; i++) {
- if (vec[i] == 0)
- out.put_literal_symbol(".notdef");
- else {
- out.put_literal_symbol(vec[i]);
- a_delete vec[i];
- }
- }
- out.put_delimiter(']').put_symbol("def");
-}
-
-void ps_printer::reencode_font(ps_font *f)
-{
- out.put_literal_symbol(f->reencoded_name)
- .put_symbol(make_encoding_name(f->encoding_index))
- .put_literal_symbol(f->get_internal_name())
- .put_symbol("RE");
-}
-
-void ps_printer::encode_fonts()
-{
- if (next_encoding_index == 0)
- return;
- char *done_encoding = new char[next_encoding_index];
- for (int i = 0; i < next_encoding_index; i++)
- done_encoding[i] = 0;
- for (font_pointer_list *f = font_list; f; f = f->next) {
- int encoding_index = ((ps_font *)f->p)->encoding_index;
- if (encoding_index >= 0) {
- assert(encoding_index < next_encoding_index);
- if (!done_encoding[encoding_index]) {
- done_encoding[encoding_index] = 1;
- define_encoding(((ps_font *)f->p)->encoding, encoding_index);
- }
- reencode_font((ps_font *)f->p);
- }
- }
- a_delete done_encoding;
-}
-
-void ps_printer::set_style(const style &sty)
-{
- char buf[1 + INT_DIGITS + 1];
- for (int i = 0; i < ndefined_styles; i++)
- if (sty == defined_styles[i]) {
- sprintf(buf, "F%d", i);
- out.put_symbol(buf);
- return;
- }
- if (ndefined_styles >= MAX_DEFINED_STYLES)
- ndefined_styles = 0;
- sprintf(buf, "F%d", ndefined_styles);
- out.put_literal_symbol(buf);
- const char *psname = sty.f->get_internal_name();
- if (psname == 0)
- fatal("no internalname specified for font `%1'", sty.f->get_name());
- char *encoding = ((ps_font *)sty.f)->encoding;
- if (encoding != 0) {
- char *s = ((ps_font *)sty.f)->reencoded_name;
- if (s == 0) {
- int ei = set_encoding_index((ps_font *)sty.f);
- char *tem = new char[strlen(psname) + 1 + INT_DIGITS + 1];
- sprintf(tem, "%s@%d", psname, ei);
- psname = tem;
- ((ps_font *)sty.f)->reencoded_name = tem;
- }
- else
- psname = s;
- }
- out.put_fix_number((font::res/(72*font::sizescale))*sty.point_size);
- if (sty.height != 0 || sty.slant != 0) {
- int h = sty.height == 0 ? sty.point_size : sty.height;
- h *= font::res/(72*font::sizescale);
- int c = int(h*tan(radians(sty.slant)) + .5);
- out.put_fix_number(c).put_fix_number(h).put_literal_symbol(psname)
- .put_symbol("MF");
- }
- else {
- out.put_literal_symbol(psname).put_symbol("SF");
- }
- defined_styles[ndefined_styles++] = sty;
-}
-
-void ps_printer::set_space_code(unsigned char c)
-{
- out.put_literal_symbol("SC").put_number(c).put_symbol("def");
-}
-
-void ps_printer::end_of_line()
-{
- flush_sbuf();
- // this ensures that we do an absolute motion to the beginning of a line
- output_vpos = output_hpos = -1;
-}
-
-void ps_printer::flush_sbuf()
-{
- enum {
- NONE,
- RELATIVE_H,
- RELATIVE_V,
- RELATIVE_HV,
- ABSOLUTE
- } motion = NONE;
- int space_flag = 0;
- if (sbuf_len == 0)
- return;
- if (output_style != sbuf_style) {
- set_style(sbuf_style);
- output_style = sbuf_style;
- }
- int extra_space = 0;
- if (output_hpos < 0 || output_vpos < 0)
- motion = ABSOLUTE;
- else {
- if (output_hpos != sbuf_start_hpos)
- motion = RELATIVE_H;
- if (output_vpos != sbuf_vpos) {
- if (motion != NONE)
- motion = RELATIVE_HV;
- else
- motion = RELATIVE_V;
- }
- }
- if (sbuf_space_code >= 0) {
- int w = sbuf_style.f->get_width(space_char_index, sbuf_style.point_size);
- if (w + sbuf_kern != sbuf_space_width) {
- if (sbuf_space_code != output_space_code) {
- set_space_code(sbuf_space_code);
- output_space_code = sbuf_space_code;
- }
- space_flag = 1;
- extra_space = sbuf_space_width - w - sbuf_kern;
- if (sbuf_space_diff_count > sbuf_space_count/2)
- extra_space++;
- else if (sbuf_space_diff_count < -(sbuf_space_count/2))
- extra_space--;
- }
- }
- if (space_flag)
- out.put_fix_number(extra_space);
- if (sbuf_kern != 0)
- out.put_fix_number(sbuf_kern);
- out.put_string(sbuf, sbuf_len);
- char command_array[] = {'A', 'B', 'C', 'D',
- 'E', 'F', 'G', 'H',
- 'I', 'J', 'K', 'L',
- 'M', 'N', 'O', 'P',
- 'Q', 'R', 'S', 'T'};
- char sym[2];
- sym[0] = command_array[motion*4 + space_flag + 2*(sbuf_kern != 0)];
- sym[1] = '\0';
- switch (motion) {
- case NONE:
- break;
- case ABSOLUTE:
- out.put_fix_number(sbuf_start_hpos)
- .put_fix_number(sbuf_vpos);
- break;
- case RELATIVE_H:
- out.put_fix_number(sbuf_start_hpos - output_hpos);
- break;
- case RELATIVE_V:
- out.put_fix_number(sbuf_vpos - output_vpos);
- break;
- case RELATIVE_HV:
- out.put_fix_number(sbuf_start_hpos - output_hpos)
- .put_fix_number(sbuf_vpos - output_vpos);
- break;
- default:
- assert(0);
- }
- out.put_symbol(sym);
- output_hpos = sbuf_end_hpos;
- output_vpos = sbuf_vpos;
- sbuf_len = 0;
-}
-
-
-void ps_printer::set_line_thickness(const environment *env)
-{
- if (line_thickness < 0) {
- if (output_draw_point_size != env->size) {
- // we ought to check for overflow here
- int lw = ((font::res/(72*font::sizescale))*linewidth*env->size)/1000;
- out.put_fix_number(lw).put_symbol("LW");
- output_draw_point_size = env->size;
- output_line_thickness = -1;
- }
- }
- else {
- if (output_line_thickness != line_thickness) {
- out.put_fix_number(line_thickness).put_symbol("LW");
- output_line_thickness = line_thickness;
- output_draw_point_size = -1;
- }
- }
-}
-
-void ps_printer::fill_path()
-{
- if (fill > FILL_MAX)
- out.put_symbol("BL");
- else
- out.put_float(transform_fill(fill)).put_symbol("FL");
-}
-
-void ps_printer::draw(int code, int *p, int np, const environment *env)
-{
- if (invis_count > 0)
- return;
- int fill_flag = 0;
- switch (code) {
- case 'C':
- fill_flag = 1;
- // fall through
- case 'c':
- // troff adds an extra argument to C
- if (np != 1 && !(code == 'C' && np == 2)) {
- error("1 argument required for circle");
- break;
- }
- out.put_fix_number(env->hpos + p[0]/2)
- .put_fix_number(env->vpos)
- .put_fix_number(p[0]/2)
- .put_symbol("DC");
- if (fill_flag) {
- fill_path();
- }
- else {
- set_line_thickness(env);
- out.put_symbol("ST");
- }
- break;
- case 'l':
- if (np != 2) {
- error("2 arguments required for line");
- break;
- }
- set_line_thickness(env);
- out.put_fix_number(p[0] + env->hpos)
- .put_fix_number(p[1] + env->vpos)
- .put_fix_number(env->hpos)
- .put_fix_number(env->vpos)
- .put_symbol("DL");
- break;
- case 'E':
- fill_flag = 1;
- // fall through
- case 'e':
- if (np != 2) {
- error("2 arguments required for ellipse");
- break;
- }
- out.put_fix_number(p[0])
- .put_fix_number(p[1])
- .put_fix_number(env->hpos + p[0]/2)
- .put_fix_number(env->vpos)
- .put_symbol("DE");
- if (fill_flag) {
- fill_path();
- }
- else {
- set_line_thickness(env);
- out.put_symbol("ST");
- }
- break;
- case 'P':
- fill_flag = 1;
- // fall through
- case 'p':
- {
- if (np & 1) {
- error("even number of arguments required for polygon");
- break;
- }
- if (np == 0) {
- error("no arguments for polygon");
- break;
- }
- out.put_fix_number(env->hpos)
- .put_fix_number(env->vpos)
- .put_symbol("MT");
- for (int i = 0; i < np; i += 2)
- out.put_fix_number(p[i])
- .put_fix_number(p[i+1])
- .put_symbol("RL");
- out.put_symbol("CL");
- if (fill_flag) {
- fill_path();
- }
- else {
- set_line_thickness(env);
- out.put_symbol("ST");
- }
- break;
- }
- case '~':
- {
- if (np & 1) {
- error("even number of arguments required for spline");
- break;
- }
- if (np == 0) {
- error("no arguments for spline");
- break;
- }
- out.put_fix_number(env->hpos)
- .put_fix_number(env->vpos)
- .put_symbol("MT");
- out.put_fix_number(p[0]/2)
- .put_fix_number(p[1]/2)
- .put_symbol("RL");
- /* tnum/tden should be between 0 and 1; the closer it is to 1
- the tighter the curve will be to the guiding lines; 2/3
- is the standard value */
- const int tnum = 2;
- const int tden = 3;
- for (int i = 0; i < np - 2; i += 2) {
- out.put_fix_number((p[i]*tnum)/(2*tden))
- .put_fix_number((p[i + 1]*tnum)/(2*tden))
- .put_fix_number(p[i]/2 + (p[i + 2]*(tden - tnum))/(2*tden))
- .put_fix_number(p[i + 1]/2 + (p[i + 3]*(tden - tnum))/(2*tden))
- .put_fix_number((p[i] - p[i]/2) + p[i + 2]/2)
- .put_fix_number((p[i + 1] - p[i + 1]/2) + p[i + 3]/2)
- .put_symbol("RC");
- }
- out.put_fix_number(p[np - 2] - p[np - 2]/2)
- .put_fix_number(p[np - 1] - p[np - 1]/2)
- .put_symbol("RL");
- set_line_thickness(env);
- out.put_symbol("ST");
- }
- break;
- case 'a':
- {
- if (np != 4) {
- error("4 arguments required for arc");
- break;
- }
- set_line_thickness(env);
- double c[2];
- if (adjust_arc_center(p, c))
- out.put_fix_number(env->hpos + int(c[0]))
- .put_fix_number(env->vpos + int(c[1]))
- .put_fix_number(int(sqrt(c[0]*c[0] + c[1]*c[1])))
- .put_float(degrees(atan2(-c[1], -c[0])))
- .put_float(degrees(atan2(p[1] + p[3] - c[1], p[0] + p[2] - c[0])))
- .put_symbol("DA");
- else
- out.put_fix_number(p[0] + p[2] + env->hpos)
- .put_fix_number(p[1] + p[3] + env->vpos)
- .put_fix_number(env->hpos)
- .put_fix_number(env->vpos)
- .put_symbol("DL");
- }
- break;
- case 't':
- {
- if (np == 0) {
- line_thickness = -1;
- }
- else {
- // troff gratuitously adds an extra 0
- if (np != 1 && np != 2) {
- error("0 or 1 argument required for thickness");
- break;
- }
- line_thickness = p[0];
- }
- break;
- }
- case 'f':
- {
- if (np != 1 && np != 2) {
- error("1 argument required for fill");
- break;
- }
- fill = p[0];
- if (fill < 0 || fill > FILL_MAX) {
- // This means fill with the current color.
- fill = FILL_MAX + 1;
- }
- break;
- }
- default:
- error("unrecognised drawing command `%1'", char(code));
- break;
- }
-
- output_hpos = output_vpos = -1;
-}
-
-
-void ps_printer::begin_page(int n)
-{
- out.begin_comment("Page:").comment_arg(i_to_a(n));
- out.comment_arg(i_to_a(++pages_output)).end_comment();
- output_style.f = 0;
- output_space_code = 32;
- output_draw_point_size = -1;
- output_line_thickness = -1;
- output_hpos = output_vpos = -1;
- ndefined_styles = 0;
- out.simple_comment("BeginPageSetup");
- out.put_symbol("BP");
- out.simple_comment("EndPageSetup");
-}
-
-void ps_printer::end_page(int)
-{
- flush_sbuf();
- out.put_symbol("EP");
- if (invis_count != 0) {
- error("missing `endinvis' command");
- invis_count = 0;
- }
-}
-
-font *ps_printer::make_font(const char *nm)
-{
- return ps_font::load_ps_font(nm);
-}
-
-ps_printer::~ps_printer()
-{
- out.simple_comment("Trailer");
- out.put_symbol("end");
- out.simple_comment("EOF");
- if (fseek(tempfp, 0L, 0) < 0)
- fatal("fseek on temporary file failed");
- fputs("%!PS-Adobe-", stdout);
- fputs((broken_flags & USE_PS_ADOBE_2_0) ? "2.0" : "3.0", stdout);
- putchar('\n');
- out.set_file(stdout);
- {
- extern const char *Version_string;
- out.begin_comment("Creator:")
- .comment_arg("groff")
- .comment_arg("version")
- .comment_arg(Version_string)
- .end_comment();
- }
- {
- fputs("%%CreationDate: ", out.get_file());
-#ifdef LONG_FOR_TIME_T
- long
-#else
- time_t
-#endif
- t = time(0);
- fputs(ctime(&t), out.get_file());
- }
- for (font_pointer_list *f = font_list; f; f = f->next) {
- ps_font *psf = (ps_font *)(f->p);
- rm.need_font(psf->get_internal_name());
- }
- rm.print_header_comments(out);
- out.begin_comment("Pages:").comment_arg(i_to_a(pages_output)).end_comment();
- out.begin_comment("PageOrder:").comment_arg("Ascend").end_comment();
-#if 0
- fprintf(out.get_file(), "%%%%DocumentMedia: () %g %g 0 () ()\n",
- font::paperwidth*72.0/font::res,
- paper_length*72.0/font::res);
-#endif
- out.begin_comment("Orientation:")
- .comment_arg(landscape_flag ? "Landscape" : "Portrait")
- .end_comment();
- if (ncopies != 1) {
- out.end_line();
- fprintf(out.get_file(), "%%%%Requirements: numcopies(%d)\n", ncopies);
- }
- out.simple_comment("EndComments");
- out.simple_comment("BeginProlog");
- rm.output_prolog(out);
- if (!(broken_flags & NO_SETUP_SECTION)) {
- out.simple_comment("EndProlog");
- out.simple_comment("BeginSetup");
- }
- rm.document_setup(out);
- out.put_symbol(dict_name).put_symbol("begin");
- if (ndefs > 0)
- ndefs += DEFS_DICT_SPARE;
- out.put_literal_symbol(defs_dict_name)
- .put_number(ndefs + 1)
- .put_symbol("dict")
- .put_symbol("def");
- out.put_symbol(defs_dict_name)
- .put_symbol("begin");
- out.put_literal_symbol("u")
- .put_delimiter('{')
- .put_fix_number(1)
- .put_symbol("mul")
- .put_delimiter('}')
- .put_symbol("bind")
- .put_symbol("def");
- defs += '\0';
- out.special(defs.contents());
- out.put_symbol("end");
- if (ncopies != 1)
- out.put_literal_symbol("#copies").put_number(ncopies).put_symbol("def");
- out.put_literal_symbol("RES").put_number(res).put_symbol("def");
- out.put_literal_symbol("PL");
- if (guess_flag)
- out.put_symbol("PLG");
- else
- out.put_fix_number(paper_length);
- out.put_symbol("def");
- out.put_literal_symbol("LS")
- .put_symbol(landscape_flag ? "true" : "false")
- .put_symbol("def");
- if (manual_feed_flag) {
- out.begin_comment("BeginFeature:")
- .comment_arg("*ManualFeed")
- .comment_arg("True")
- .end_comment()
- .put_symbol("MANUAL")
- .simple_comment("EndFeature");
- }
- encode_fonts();
- out.simple_comment((broken_flags & NO_SETUP_SECTION)
- ? "EndProlog"
- : "EndSetup");
- out.end_line();
- out.copy_file(tempfp);
- fclose(tempfp);
-}
-
-void ps_printer::special(char *arg, const environment *env, char type)
-{
- if (type != 'p')
- return;
- typedef void (ps_printer::*SPECIAL_PROCP)(char *, const environment *);
- static struct {
- const char *name;
- SPECIAL_PROCP proc;
- } proc_table[] = {
- { "exec", &ps_printer::do_exec },
- { "def", &ps_printer::do_def },
- { "mdef", &ps_printer::do_mdef },
- { "import", &ps_printer::do_import },
- { "file", &ps_printer::do_file },
- { "invis", &ps_printer::do_invis },
- { "endinvis", &ps_printer::do_endinvis },
- };
- char *p;
- for (p = arg; *p == ' ' || *p == '\n'; p++)
- ;
- char *tag = p;
- for (; *p != '\0' && *p != ':' && *p != ' ' && *p != '\n'; p++)
- ;
- if (*p == '\0' || strncmp(tag, "ps", p - tag) != 0) {
- error("X command without `ps:' tag ignored");
- return;
- }
- p++;
- for (; *p == ' ' || *p == '\n'; p++)
- ;
- char *command = p;
- for (; *p != '\0' && *p != ' ' && *p != '\n'; p++)
- ;
- if (*command == '\0') {
- error("X command without `ps:' tag ignored");
- return;
- }
- for (int i = 0; i < sizeof(proc_table)/sizeof(proc_table[0]); i++)
- if (strncmp(command, proc_table[i].name, p - command) == 0) {
- (this->*(proc_table[i].proc))(p, env);
- return;
- }
- error("X command `%1' not recognised", command);
-}
-
-// A conforming PostScript document must not have lines longer
-// than 255 characters (excluding line termination characters).
-
-static int check_line_lengths(const char *p)
-{
- for (;;) {
- const char *end = strchr(p, '\n');
- if (end == 0)
- end = strchr(p, '\0');
- if (end - p > 255)
- return 0;
- if (*end == '\0')
- break;
- p = end + 1;
- }
- return 1;
-}
-
-void ps_printer::do_exec(char *arg, const environment *env)
-{
- flush_sbuf();
- while (csspace(*arg))
- arg++;
- if (*arg == '\0') {
- error("missing argument to X exec command");
- return;
- }
- if (!check_line_lengths(arg)) {
- error("lines in X exec command must not be more than 255 characters long");
- return;
- }
- out.put_fix_number(env->hpos)
- .put_fix_number(env->vpos)
- .put_symbol("EBEGIN")
- .special(arg)
- .put_symbol("EEND");
- output_hpos = output_vpos = -1;
- output_style.f = 0;
- output_draw_point_size = -1;
- output_line_thickness = -1;
- ndefined_styles = 0;
- if (!ndefs)
- ndefs = 1;
-}
-
-void ps_printer::do_file(char *arg, const environment *env)
-{
- flush_sbuf();
- while (csspace(*arg))
- arg++;
- if (*arg == '\0') {
- error("missing argument to X file command");
- return;
- }
- const char *filename = arg;
- do {
- ++arg;
- } while (*arg != '\0' && *arg != ' ' && *arg != '\n');
- out.put_fix_number(env->hpos)
- .put_fix_number(env->vpos)
- .put_symbol("EBEGIN");
- rm.import_file(filename, out);
- out.put_symbol("EEND");
- output_hpos = output_vpos = -1;
- output_style.f = 0;
- output_draw_point_size = -1;
- output_line_thickness = -1;
- ndefined_styles = 0;
- if (!ndefs)
- ndefs = 1;
-}
-
-void ps_printer::do_def(char *arg, const environment *)
-{
- flush_sbuf();
- while (csspace(*arg))
- arg++;
- if (!check_line_lengths(arg)) {
- error("lines in X def command must not be more than 255 characters long");
- return;
- }
- defs += arg;
- if (*arg != '\0' && strchr(arg, '\0')[-1] != '\n')
- defs += '\n';
- ndefs++;
-}
-
-// Like def, but the first argument says how many definitions it contains.
-
-void ps_printer::do_mdef(char *arg, const environment *)
-{
- flush_sbuf();
- char *p;
- int n = (int)strtol(arg, &p, 10);
- if (n == 0 && p == arg) {
- error("first argument to X mdef must be an integer");
- return;
- }
- if (n < 0) {
- error("out of range argument `%1' to X mdef command", int(n));
- return;
- }
- arg = p;
- while (csspace(*arg))
- arg++;
- if (!check_line_lengths(arg)) {
- error("lines in X mdef command must not be more than 255 characters long");
- return;
- }
- defs += arg;
- if (*arg != '\0' && strchr(arg, '\0')[-1] != '\n')
- defs += '\n';
- ndefs += n;
-}
-
-void ps_printer::do_import(char *arg, const environment *env)
-{
- flush_sbuf();
- while (*arg == ' ' || *arg == '\n')
- arg++;
- char *p;
- for (p = arg; *p != '\0' && *p != ' ' && *p != '\n'; p++)
- ;
- if (*p != '\0')
- *p++ = '\0';
- int parms[6];
- int nparms = 0;
- while (nparms < 6) {
- char *end;
- long n = strtol(p, &end, 10);
- if (n == 0 && end == p)
- break;
- parms[nparms++] = int(n);
- p = end;
- }
- if (csalpha(*p) && (p[1] == '\0' || p[1] == ' ' || p[1] == '\n')) {
- error("scaling indicators not allowed in arguments for X import command");
- return;
- }
- while (*p == ' ' || *p == '\n')
- p++;
- if (nparms < 5) {
- if (*p == '\0')
- error("too few arguments for X import command");
- else
- error("invalid argument `%1' for X import command", p);
- return;
- }
- if (*p != '\0') {
- error("superflous argument `%1' for X import command", p);
- return;
- }
- int llx = parms[0];
- int lly = parms[1];
- int urx = parms[2];
- int ury = parms[3];
- int desired_width = parms[4];
- int desired_height = parms[5];
- if (desired_width <= 0) {
- error("bad width argument `%1' for X import command: must be > 0",
- desired_width);
- return;
- }
- if (nparms == 6 && desired_height <= 0) {
- error("bad height argument `%1' for X import command: must be > 0",
- desired_height);
- return;
- }
- if (llx == urx) {
- error("llx and urx arguments for X import command must not be equal");
- return;
- }
- if (lly == ury) {
- error("lly and ury arguments for X import command must not be equal");
- return;
- }
- if (nparms == 5) {
- int old_wid = urx - llx;
- int old_ht = ury - lly;
- if (old_wid < 0)
- old_wid = -old_wid;
- if (old_ht < 0)
- old_ht = -old_ht;
- desired_height = int(desired_width*(double(old_ht)/double(old_wid)) + .5);
- }
- if (env->vpos - desired_height < 0)
- warning("top of imported graphic is above the top of the page");
- out.put_number(llx)
- .put_number(lly)
- .put_fix_number(desired_width)
- .put_number(urx - llx)
- .put_fix_number(-desired_height)
- .put_number(ury - lly)
- .put_fix_number(env->hpos)
- .put_fix_number(env->vpos)
- .put_symbol("PBEGIN");
- rm.import_file(arg, out);
- // do this here just in case application defines PEND
- out.put_symbol("end");
- out.put_symbol("PEND");
-}
-
-void ps_printer::do_invis(char *, const environment *)
-{
- invis_count++;
-}
-
-void ps_printer::do_endinvis(char *, const environment *)
-{
- if (invis_count == 0)
- error("unbalanced `endinvis' command");
- else
- --invis_count;
-}
-
-printer *make_printer()
-{
- return new ps_printer;
-}
-
-static void usage(FILE *stream);
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- string env;
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int c;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((c = getopt_long(argc, argv, "F:P:glmc:w:vb:", long_options, NULL))
- != EOF)
- switch(c) {
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU grops (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'c':
- if (sscanf(optarg, "%d", &ncopies) != 1 || ncopies <= 0) {
- error("bad number of copies `%s'", optarg);
- ncopies = 1;
- }
- break;
- case 'g':
- guess_flag = 1;
- break;
- case 'l':
- landscape_flag = 1;
- break;
- case 'm':
- manual_feed_flag = 1;
- break;
- case 'F':
- font::command_line_font_dir(optarg);
- break;
- case 'P':
- env = "GROPS_PROLOGUE";
- env += '=';
- env += optarg;
- env += '\0';
- if (putenv(strsave(env.contents())))
- fatal("putenv failed");
- break;
- case 'w':
- if (sscanf(optarg, "%d", &linewidth) != 1 || linewidth < 0) {
- error("bad linewidth `%1'", optarg);
- linewidth = -1;
- }
- break;
- case 'b':
- // XXX check this
- broken_flags = atoi(optarg);
- bflag = 1;
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
- font::set_unknown_desc_command_handler(handle_unknown_desc_command);
-#ifdef SET_BINARY
- SET_BINARY(fileno(stdout));
-#endif
- if (optind >= argc)
- do_file("-");
- else {
- for (int i = optind; i < argc; i++)
- do_file(argv[i]);
- }
- delete pr;
- return 0;
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream,
- "usage: %s [-glmv] [-b n] [-c n] [-w n] [-P prologue] [-F dir] [files ...]\n",
- program_name);
-}
diff --git a/contrib/groff/src/devices/grops/ps.h b/contrib/groff/src/devices/grops/ps.h
deleted file mode 100644
index 6e78597d1276..000000000000
--- a/contrib/groff/src/devices/grops/ps.h
+++ /dev/null
@@ -1,122 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-class ps_output {
-public:
- ps_output(FILE *, int max_line_length);
- ps_output &put_string(const char *, int);
- ps_output &put_number(int);
- ps_output &put_fix_number(int);
- ps_output &put_float(double);
- ps_output &put_symbol(const char *);
- ps_output &put_literal_symbol(const char *);
- ps_output &set_fixed_point(int);
- ps_output &simple_comment(const char *);
- ps_output &begin_comment(const char *);
- ps_output &comment_arg(const char *);
- ps_output &end_comment();
- ps_output &set_file(FILE *);
- ps_output &include_file(FILE *);
- ps_output &copy_file(FILE *);
- ps_output &end_line();
- ps_output &put_delimiter(char);
- ps_output &special(const char *);
- FILE *get_file();
-private:
- FILE *fp;
- int col;
- int max_line_length; // not including newline
- int need_space;
- int fixed_point;
-};
-
-inline FILE *ps_output::get_file()
-{
- return fp;
-}
-
-enum resource_type {
- RESOURCE_FONT,
- RESOURCE_PROCSET,
- RESOURCE_FILE,
- RESOURCE_ENCODING,
- RESOURCE_FORM,
- RESOURCE_PATTERN
- };
-
-struct resource;
-
-extern string an_empty_string;
-
-class resource_manager {
-public:
- resource_manager();
- ~resource_manager();
- void import_file(const char *filename, ps_output &);
- void need_font(const char *name);
- void print_header_comments(ps_output &);
- void document_setup(ps_output &);
- void output_prolog(ps_output &);
-private:
- unsigned extensions;
- unsigned language_level;
- resource *procset_resource;
- resource *resource_list;
- resource *lookup_resource(resource_type type, string &name,
- string &version = an_empty_string,
- unsigned revision = 0);
- resource *lookup_font(const char *name);
- void read_download_file();
- void supply_resource(resource *r, int rank, FILE *outfp,
- int is_document = 0);
- void process_file(int rank, FILE *fp, const char *filename, FILE *outfp);
- resource *read_file_arg(const char **);
- resource *read_procset_arg(const char **);
- resource *read_font_arg(const char **);
- resource *read_resource_arg(const char **);
- void print_resources_comment(unsigned flag, FILE *outfp);
- void print_extensions_comment(FILE *outfp);
- void print_language_level_comment(FILE *outfp);
- int do_begin_resource(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_include_resource(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_begin_document(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_include_document(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_begin_procset(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_include_procset(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_begin_font(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_include_font(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_begin_file(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_include_file(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int change_to_end_resource(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_begin_preview(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_begin_data(const char *ptr, int rank, FILE *fp, FILE *outfp);
- int do_begin_binary(const char *ptr, int rank, FILE *fp, FILE *outfp);
-};
-
-extern unsigned broken_flags;
-
-// broken_flags is ored from these
-
-enum {
- NO_SETUP_SECTION = 01,
- STRIP_PERCENT_BANG = 02,
- STRIP_STRUCTURE_COMMENTS = 04,
- USE_PS_ADOBE_2_0 = 010
-};
diff --git a/contrib/groff/src/devices/grops/psfig.diff b/contrib/groff/src/devices/grops/psfig.diff
deleted file mode 100644
index 5be080ddd933..000000000000
--- a/contrib/groff/src/devices/grops/psfig.diff
+++ /dev/null
@@ -1,106 +0,0 @@
-These are patches to makes psfig work with groff. They apply to the
-version of psfig in comp.sources.unix/Volume11. After applying them,
-psfig should be recompiled with -DGROFF. The resulting psfig will
-work only with groff, so you might want to install it under a
-different name. The output of this psfig must be processed using the
-macros in the file ../tmac/tmac.psfig. These will automatically add
-the necessary PostScript code to the prologue output by grops. Use of
-the `global' feature in psfig will result in non-conformant PostScript
-which will fail if processed by a page reversal program. Note that
-psfig is unsupported by me (I'm not interested in hearing about psfig
-problems.) For new documents, I recommend using the PostScript
-inclusion features provided by grops.
-
-James Clark
-jjc@jclark.com
-
-*** cmds.c.~1~ Thu Feb 14 16:09:45 1991
---- cmds.c Mon Mar 4 12:49:26 1991
-***************
-*** 245,253 ****
---- 245,261 ----
- (void) sprintf(x, "%.2fp", fx);
- (void) sprintf(y, "%.2fp", fy);
- } else if (!*x) {
-+ #ifndef GROFF
- (void) sprintf(x,"(%.2fp*%s/%.2fp)", fx, y, fy);
-+ #else /* GROFF */
-+ (void) sprintf(x,"(%.0fu*%s/%.0fu)", fx, y, fy);
-+ #endif /* GROFF */
- } else if (!*y) {
-+ #ifndef GROFF
- (void) sprintf(y,"(%.2fp*%s/%.2fp)", fy, x, fx);
-+ #else /* GROFF */
-+ (void) sprintf(y,"(%.0fu*%s/%.0fu)", fy, x, fx);
-+ #endif /* GROFF */
- }
-
- /*
-*** troff.c.~1~ Thu Feb 14 16:09:48 1991
---- troff.c Mon Mar 4 12:48:46 1991
-***************
-*** 26,32 ****
---- 26,36 ----
- }
-
-
-+ #ifndef GROFF
- char incl_file_s[] = "\\X'f%s'";
-+ #else /* GROFF */
-+ char incl_file_s[] = "\\X'ps: file %s'";
-+ #endif /* GROFF */
- includeFile(filenm)
- char *filenm; {
- printf(incl_file_s, filenm);
-***************
-*** 40,52 ****
---- 44,64 ----
- error("buffer overflow");
- }
-
-+ #ifndef GROFF
- char endfig_s[] = "\\X'pendFig'";
-+ #else /* GROFF */
-+ char endfig_s[] = "\\X'ps: exec psfigend'";
-+ #endif /* GROFF */
- endfig() {
- printf(endfig_s);
- }
-
- char startfig_s[] =
-+ #ifndef GROFF
- "\\X'p\\w@\\h@%s@@'\\X'p\\w@\\h@%s@@'\\X'p%.2f'\\X'p%.2f'\\X'p%.2f'\\X'p%.2f'\\X'pstartFig'";
-+ #else /* GROFF */
-+ "\\X'ps: exec \\w@\\h@%s@@ \\w@\\h@%s@@ %.2f %.2f %.2f %.2f psfigstart'";
-+ #endif /* GROFF */
-
- startfig(x, y, llx, lly, urx, ury)
- char *x, *y;
-***************
-*** 57,63 ****
---- 69,79 ----
- }
-
- emitDoClip() {
-+ #ifndef GROFF
- printf("\\X'pdoclip'");
-+ #else /* GROFF */
-+ printf("\\X'ps: exec psfigclip'");
-+ #endif /* GROFF */
- }
-
- flushX()
-***************
-*** 116,122 ****
---- 132,142 ----
-
- #define isWhite(ch) ((ch) == ' ' || (ch) == '\t' || (ch) == '\n')
-
-+ #ifndef GROFF
- char literal_s[] = "\\X'p%s'";
-+ #else /* GROFF */
-+ char literal_s[] = "\\X'ps: exec %s'";
-+ #endif /* GROFF */
- emitLiteral(text)
- char *text; {
- static char litbuf[BUFSZ];
diff --git a/contrib/groff/src/devices/grops/psrm.cc b/contrib/groff/src/devices/grops/psrm.cc
deleted file mode 100644
index b816c6b20cde..000000000000
--- a/contrib/groff/src/devices/grops/psrm.cc
+++ /dev/null
@@ -1,1118 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "driver.h"
-#include "stringclass.h"
-#include "cset.h"
-
-#include "ps.h"
-
-#ifdef NEED_DECLARATION_PUTENV
-extern "C" {
- int putenv(const char *);
-}
-#endif /* NEED_DECLARATION_PUTENV */
-
-#define GROPS_PROLOGUE "prologue"
-
-static void print_ps_string(const string &s, FILE *outfp);
-
-cset white_space("\n\r \t");
-string an_empty_string;
-
-const char *extension_table[] = {
- "DPS",
- "CMYK",
- "Composite",
- "FileSystem",
-};
-
-const int NEXTENSIONS = sizeof(extension_table)/sizeof(extension_table[0]);
-
-const char *resource_table[] = {
- "font",
- "procset",
- "file",
- "encoding",
- "form",
- "pattern",
-};
-
-const int NRESOURCES = sizeof(resource_table)/sizeof(resource_table[0]);
-
-static int read_uint_arg(const char **pp, unsigned *res)
-{
- while (white_space(**pp))
- *pp += 1;
- if (**pp == '\0') {
- error("missing argument");
- return 0;
- }
- const char *start = *pp;
- // XXX use strtoul
- long n = strtol(start, (char **)pp, 10);
- if (n == 0 && *pp == start) {
- error("not an integer");
- return 0;
- }
- if (n < 0) {
- error("argument must not be negative");
- return 0;
- }
- *res = unsigned(n);
- return 1;
-}
-
-struct resource {
- resource *next;
- resource_type type;
- string name;
- enum { NEEDED = 01, SUPPLIED = 02, FONT_NEEDED = 04, BUSY = 010 };
- unsigned flags;
- string version;
- unsigned revision;
- char *filename;
- int rank;
- resource(resource_type, string &, string & = an_empty_string, unsigned = 0);
- ~resource();
- void print_type_and_name(FILE *outfp);
-};
-
-resource::resource(resource_type t, string &n, string &v, unsigned r)
-: next(0), type(t), flags(0), revision(r), filename(0), rank(-1)
-{
- name.move(n);
- version.move(v);
- if (type == RESOURCE_FILE) {
- if (name.search('\0') >= 0)
- error("filename contains a character with code 0");
- filename = name.extract();
- }
-}
-
-resource::~resource()
-{
- a_delete filename;
-}
-
-void resource::print_type_and_name(FILE *outfp)
-{
- fputs(resource_table[type], outfp);
- putc(' ', outfp);
- print_ps_string(name, outfp);
- if (type == RESOURCE_PROCSET) {
- putc(' ', outfp);
- print_ps_string(version, outfp);
- fprintf(outfp, " %u", revision);
- }
-}
-
-resource_manager::resource_manager()
-: extensions(0), language_level(0), resource_list(0)
-{
- read_download_file();
- string procset_name("grops");
- extern const char *version_string;
- extern const char *revision_string;
- unsigned revision_uint;
- if ( !read_uint_arg( &revision_string, &revision_uint) )
- revision_uint = 0;
- string procset_version(version_string);
- procset_resource = lookup_resource(RESOURCE_PROCSET, procset_name,
- procset_version, revision_uint);
- procset_resource->flags |= resource::SUPPLIED;
-}
-
-resource_manager::~resource_manager()
-{
- while (resource_list) {
- resource *tem = resource_list;
- resource_list = resource_list->next;
- delete tem;
- }
-}
-
-resource *resource_manager::lookup_resource(resource_type type,
- string &name,
- string &version,
- unsigned revision)
-{
- resource *r;
- for (r = resource_list; r; r = r->next)
- if (r->type == type
- && r->name == name
- && r->version == version
- && r->revision == revision)
- return r;
- r = new resource(type, name, version, revision);
- r->next = resource_list;
- resource_list = r;
- return r;
-}
-
-// Just a specialized version of lookup_resource().
-
-resource *resource_manager::lookup_font(const char *name)
-{
- resource *r;
- for (r = resource_list; r; r = r->next)
- if (r->type == RESOURCE_FONT
- && strlen(name) == r->name.length()
- && memcmp(name, r->name.contents(), r->name.length()) == 0)
- return r;
- string s(name);
- r = new resource(RESOURCE_FONT, s);
- r->next = resource_list;
- resource_list = r;
- return r;
-}
-
-void resource_manager::need_font(const char *name)
-{
- lookup_font(name)->flags |= resource::FONT_NEEDED;
-}
-
-typedef resource *Presource; // Work around g++ bug.
-
-void resource_manager::document_setup(ps_output &out)
-{
- int nranks = 0;
- resource *r;
- for (r = resource_list; r; r = r->next)
- if (r->rank >= nranks)
- nranks = r->rank + 1;
- if (nranks > 0) {
- // Sort resource_list in reverse order of rank.
- Presource *head = new Presource[nranks + 1];
- Presource **tail = new Presource *[nranks + 1];
- int i;
- for (i = 0; i < nranks + 1; i++) {
- head[i] = 0;
- tail[i] = &head[i];
- }
- for (r = resource_list; r; r = r->next) {
- i = r->rank < 0 ? 0 : r->rank + 1;
- *tail[i] = r;
- tail[i] = &(*tail[i])->next;
- }
- resource_list = 0;
- for (i = 0; i < nranks + 1; i++)
- if (head[i]) {
- *tail[i] = resource_list;
- resource_list = head[i];
- }
- a_delete head;
- a_delete tail;
- // check it
- for (r = resource_list; r; r = r->next)
- if (r->next)
- assert(r->rank >= r->next->rank);
- for (r = resource_list; r; r = r->next)
- if (r->type == RESOURCE_FONT && r->rank >= 0)
- supply_resource(r, -1, out.get_file());
- }
-}
-
-void resource_manager::print_resources_comment(unsigned flag, FILE *outfp)
-{
- int continued = 0;
- for (resource *r = resource_list; r; r = r->next)
- if (r->flags & flag) {
- if (continued)
- fputs("%%+ ", outfp);
- else {
- fputs(flag == resource::NEEDED
- ? "%%DocumentNeededResources: "
- : "%%DocumentSuppliedResources: ",
- outfp);
- continued = 1;
- }
- r->print_type_and_name(outfp);
- putc('\n', outfp);
- }
-}
-
-void resource_manager::print_header_comments(ps_output &out)
-{
- for (resource *r = resource_list; r; r = r->next)
- if (r->type == RESOURCE_FONT && (r->flags & resource::FONT_NEEDED))
- supply_resource(r, 0, 0);
- print_resources_comment(resource::NEEDED, out.get_file());
- print_resources_comment(resource::SUPPLIED, out.get_file());
- print_language_level_comment(out.get_file());
- print_extensions_comment(out.get_file());
-}
-
-void resource_manager::output_prolog(ps_output &out)
-{
- FILE *outfp = out.get_file();
- out.end_line();
- char *path;
- if (!getenv("GROPS_PROLOGUE")) {
- string e = "GROPS_PROLOGUE";
- e += '=';
- e += GROPS_PROLOGUE;
- e += '\0';
- if (putenv(strsave(e.contents())))
- fatal("putenv failed");
- }
- char *prologue = getenv("GROPS_PROLOGUE");
- FILE *fp = font::open_file(prologue, &path);
- if (!fp)
- fatal("can't find `%1'", prologue);
- fputs("%%BeginResource: ", outfp);
- procset_resource->print_type_and_name(outfp);
- putc('\n', outfp);
- process_file(-1, fp, path, outfp);
- fclose(fp);
- a_delete path;
- fputs("%%EndResource\n", outfp);
-}
-
-void resource_manager::import_file(const char *filename, ps_output &out)
-{
- out.end_line();
- string name(filename);
- resource *r = lookup_resource(RESOURCE_FILE, name);
- supply_resource(r, -1, out.get_file(), 1);
-}
-
-void resource_manager::supply_resource(resource *r, int rank, FILE *outfp,
- int is_document)
-{
- if (r->flags & resource::BUSY) {
- r->name += '\0';
- fatal("loop detected in dependency graph for %1 `%2'",
- resource_table[r->type],
- r->name.contents());
- }
- r->flags |= resource::BUSY;
- if (rank > r->rank)
- r->rank = rank;
- char *path;
- FILE *fp = 0;
- if (r->filename != 0) {
- if (r->type == RESOURCE_FONT) {
- fp = font::open_file(r->filename, &path);
- if (!fp) {
- error("can't find `%1'", r->filename);
- a_delete r->filename;
- r->filename = 0;
- }
- }
- else {
- errno = 0;
- fp = fopen(r->filename, "r");
- if (!fp) {
- error("can't open `%1': %2", r->filename, strerror(errno));
- a_delete r->filename;
- r->filename = 0;
- }
- else
- path = r->filename;
- }
- }
- if (fp) {
- if (outfp) {
- if (r->type == RESOURCE_FILE && is_document) {
- fputs("%%BeginDocument: ", outfp);
- print_ps_string(r->name, outfp);
- putc('\n', outfp);
- }
- else {
- fputs("%%BeginResource: ", outfp);
- r->print_type_and_name(outfp);
- putc('\n', outfp);
- }
- }
- process_file(rank, fp, path, outfp);
- fclose(fp);
- if (r->type == RESOURCE_FONT)
- a_delete path;
- if (outfp) {
- if (r->type == RESOURCE_FILE && is_document)
- fputs("%%EndDocument\n", outfp);
- else
- fputs("%%EndResource\n", outfp);
- }
- r->flags |= resource::SUPPLIED;
- }
- else {
- if (outfp) {
- if (r->type == RESOURCE_FILE && is_document) {
- fputs("%%IncludeDocument: ", outfp);
- print_ps_string(r->name, outfp);
- putc('\n', outfp);
- }
- else {
- fputs("%%IncludeResource: ", outfp);
- r->print_type_and_name(outfp);
- putc('\n', outfp);
- }
- }
- r->flags |= resource::NEEDED;
- }
- r->flags &= ~resource::BUSY;
-}
-
-
-#define PS_LINE_MAX 255
-#define PS_MAGIC "%!PS-Adobe-"
-
-static int ps_get_line(char *buf, FILE *fp)
-{
- int c = getc(fp);
- if (c == EOF) {
- buf[0] = '\0';
- return 0;
- }
- current_lineno++;
- int i = 0;
- int err = 0;
- while (c != '\r' && c != '\n' && c != EOF) {
- if ((c < 0x1b && !white_space(c)) || c == 0x7f)
- error("illegal input character code %1", int(c));
- else if (i < PS_LINE_MAX)
- buf[i++] = c;
- else if (!err) {
- err = 1;
- error("PostScript file non-conforming "
- "because length of line exceeds 255");
- }
- c = getc(fp);
- }
- buf[i++] = '\n';
- buf[i] = '\0';
- if (c == '\r') {
- c = getc(fp);
- if (c != EOF && c != '\n')
- ungetc(c, fp);
- }
- return 1;
-}
-
-static int read_text_arg(const char **pp, string &res)
-{
- res.clear();
- while (white_space(**pp))
- *pp += 1;
- if (**pp == '\0') {
- error("missing argument");
- return 0;
- }
- if (**pp != '(') {
- for (; **pp != '\0' && !white_space(**pp); *pp += 1)
- res += **pp;
- return 1;
- }
- *pp += 1;
- res.clear();
- int level = 0;
- for (;;) {
- if (**pp == '\0' || **pp == '\r' || **pp == '\n') {
- error("missing ')'");
- return 0;
- }
- if (**pp == ')') {
- if (level == 0) {
- *pp += 1;
- break;
- }
- res += **pp;
- level--;
- }
- else if (**pp == '(') {
- level++;
- res += **pp;
- }
- else if (**pp == '\\') {
- *pp += 1;
- switch (**pp) {
- case 'n':
- res += '\n';
- break;
- case 'r':
- res += '\n';
- break;
- case 't':
- res += '\t';
- break;
- case 'b':
- res += '\b';
- break;
- case 'f':
- res += '\f';
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- {
- int val = **pp - '0';
- if ((*pp)[1] >= '0' && (*pp)[1] <= '7') {
- *pp += 1;
- val = val*8 + (**pp - '0');
- if ((*pp)[1] >= '0' && (*pp)[1] <= '7') {
- *pp += 1;
- val = val*8 + (**pp - '0');
- }
- }
- }
- break;
- default:
- res += **pp;
- break;
- }
- }
- else
- res += **pp;
- *pp += 1;
- }
- return 1;
-}
-
-resource *resource_manager::read_file_arg(const char **ptr)
-{
- string arg;
- if (!read_text_arg(ptr, arg))
- return 0;
- return lookup_resource(RESOURCE_FILE, arg);
-}
-
-resource *resource_manager::read_font_arg(const char **ptr)
-{
- string arg;
- if (!read_text_arg(ptr, arg))
- return 0;
- return lookup_resource(RESOURCE_FONT, arg);
-}
-
-resource *resource_manager::read_procset_arg(const char **ptr)
-{
- string arg;
- if (!read_text_arg(ptr, arg))
- return 0;
- string version;
- if (!read_text_arg(ptr, version))
- return 0;
- unsigned revision;
- if (!read_uint_arg(ptr, &revision))
- return 0;
- return lookup_resource(RESOURCE_PROCSET, arg, version, revision);
-}
-
-resource *resource_manager::read_resource_arg(const char **ptr)
-{
- while (white_space(**ptr))
- *ptr += 1;
- const char *name = *ptr;
- while (**ptr != '\0' && !white_space(**ptr))
- *ptr += 1;
- if (name == *ptr) {
- error("missing resource type");
- return 0;
- }
- int ri;
- for (ri = 0; ri < NRESOURCES; ri++)
- if (strlen(resource_table[ri]) == *ptr - name
- && memcmp(resource_table[ri], name, *ptr - name) == 0)
- break;
- if (ri >= NRESOURCES) {
- error("unknown resource type");
- return 0;
- }
- if (ri == RESOURCE_PROCSET)
- return read_procset_arg(ptr);
- string arg;
- if (!read_text_arg(ptr, arg))
- return 0;
- return lookup_resource(resource_type(ri), arg);
-}
-
-static const char *matches_comment(const char *buf, const char *comment)
-{
- if (buf[0] != '%' || buf[1] != '%')
- return 0;
- for (buf += 2; *comment; comment++, buf++)
- if (*buf != *comment)
- return 0;
- if (comment[-1] == ':')
- return buf;
- if (*buf == '\0' || white_space(*buf))
- return buf;
- return 0;
-}
-
-// Return 1 if the line should be copied out.
-
-int resource_manager::do_begin_resource(const char *ptr, int, FILE *,
- FILE *)
-{
- resource *r = read_resource_arg(&ptr);
- if (r)
- r->flags |= resource::SUPPLIED;
- return 1;
-}
-
-int resource_manager::do_include_resource(const char *ptr, int rank, FILE *,
- FILE *outfp)
-{
- resource *r = read_resource_arg(&ptr);
- if (r) {
- if (r->type == RESOURCE_FONT) {
- if (rank >= 0)
- supply_resource(r, rank + 1, outfp);
- else
- r->flags |= resource::FONT_NEEDED;
- }
- else
- supply_resource(r, rank, outfp);
- }
- return 0;
-}
-
-int resource_manager::do_begin_document(const char *ptr, int, FILE *,
- FILE *)
-{
- resource *r = read_file_arg(&ptr);
- if (r)
- r->flags |= resource::SUPPLIED;
- return 1;
-}
-
-int resource_manager::do_include_document(const char *ptr, int rank, FILE *,
- FILE *outfp)
-{
- resource *r = read_file_arg(&ptr);
- if (r)
- supply_resource(r, rank, outfp, 1);
- return 0;
-}
-
-int resource_manager::do_begin_procset(const char *ptr, int, FILE *,
- FILE *outfp)
-{
- resource *r = read_procset_arg(&ptr);
- if (r) {
- r->flags |= resource::SUPPLIED;
- if (outfp) {
- fputs("%%BeginResource: ", outfp);
- r->print_type_and_name(outfp);
- putc('\n', outfp);
- }
- }
- return 0;
-}
-
-int resource_manager::do_include_procset(const char *ptr, int rank, FILE *,
- FILE *outfp)
-{
- resource *r = read_procset_arg(&ptr);
- if (r)
- supply_resource(r, rank, outfp);
- return 0;
-}
-
-int resource_manager::do_begin_file(const char *ptr, int, FILE *,
- FILE *outfp)
-{
- resource *r = read_file_arg(&ptr);
- if (r) {
- r->flags |= resource::SUPPLIED;
- if (outfp) {
- fputs("%%BeginResource: ", outfp);
- r->print_type_and_name(outfp);
- putc('\n', outfp);
- }
- }
- return 0;
-}
-
-int resource_manager::do_include_file(const char *ptr, int rank, FILE *,
- FILE *outfp)
-{
- resource *r = read_file_arg(&ptr);
- if (r)
- supply_resource(r, rank, outfp);
- return 0;
-}
-
-int resource_manager::do_begin_font(const char *ptr, int, FILE *,
- FILE *outfp)
-{
- resource *r = read_font_arg(&ptr);
- if (r) {
- r->flags |= resource::SUPPLIED;
- if (outfp) {
- fputs("%%BeginResource: ", outfp);
- r->print_type_and_name(outfp);
- putc('\n', outfp);
- }
- }
- return 0;
-}
-
-int resource_manager::do_include_font(const char *ptr, int rank, FILE *,
- FILE *outfp)
-{
- resource *r = read_font_arg(&ptr);
- if (r) {
- if (rank >= 0)
- supply_resource(r, rank + 1, outfp);
- else
- r->flags |= resource::FONT_NEEDED;
- }
- return 0;
-}
-
-int resource_manager::change_to_end_resource(const char *, int, FILE *,
- FILE *outfp)
-{
- if (outfp)
- fputs("%%EndResource\n", outfp);
- return 0;
-}
-
-int resource_manager::do_begin_preview(const char *, int, FILE *fp, FILE *)
-{
- char buf[PS_LINE_MAX + 2];
- do {
- if (!ps_get_line(buf, fp)) {
- error("end of file in preview section");
- break;
- }
- } while (!matches_comment(buf, "EndPreview"));
- return 0;
-}
-
-int read_one_of(const char **ptr, const char **s, int n)
-{
- while (white_space(**ptr))
- *ptr += 1;
- if (**ptr == '\0')
- return -1;
- const char *start = *ptr;
- do {
- ++(*ptr);
- } while (**ptr != '\0' && !white_space(**ptr));
- for (int i = 0; i < n; i++)
- if (strlen(s[i]) == *ptr - start
- && memcmp(s[i], start, *ptr - start) == 0)
- return i;
- return -1;
-}
-
-int resource_manager::do_begin_data(const char *ptr, int, FILE *fp,
- FILE *outfp)
-{
- while (white_space(*ptr))
- ptr++;
- const char *start = ptr;
- unsigned numberof;
- if (!read_uint_arg(&ptr, &numberof))
- return 0;
- static const char *types[] = { "Binary", "Hex", "ASCII" };
- const int Binary = 0;
- int type = 0;
- static const char *units[] = { "Bytes", "Lines" };
- const int Bytes = 0;
- int unit = Bytes;
- while (white_space(*ptr))
- ptr++;
- if (*ptr != '\0') {
- type = read_one_of(&ptr, types, 3);
- if (type < 0) {
- error("bad data type");
- return 0;
- }
- while (white_space(*ptr))
- ptr++;
- if (*ptr != '\0') {
- unit = read_one_of(&ptr, units, 2);
- if (unit < 0) {
- error("expected `Bytes' or `Lines'");
- return 0;
- }
- }
- }
- if (type != Binary)
- return 1;
- if (outfp) {
- fputs("%%BeginData: ", outfp);
- fputs(start, outfp);
- }
- if (numberof > 0) {
- unsigned bytecount = 0;
- unsigned linecount = 0;
- do {
- int c = getc(fp);
- if (c == EOF) {
- error("end of file within data section");
- return 0;
- }
- if (outfp)
- putc(c, outfp);
- bytecount++;
- if (c == '\r') {
- int cc = getc(fp);
- if (cc != '\n') {
- linecount++;
- current_lineno++;
- }
- if (cc != EOF)
- ungetc(c, fp);
- }
- else if (c == '\n') {
- linecount++;
- current_lineno++;
- }
- } while ((unit == Bytes ? bytecount : linecount) < numberof);
- }
- char buf[PS_LINE_MAX + 2];
- if (!ps_get_line(buf, fp)) {
- error("missing %%%%EndData line");
- return 0;
- }
- if (!matches_comment(buf, "EndData"))
- error("bad %%%%EndData line");
- if (outfp)
- fputs(buf, outfp);
- return 0;
-}
-
-int resource_manager::do_begin_binary(const char *ptr, int, FILE *fp,
- FILE *outfp)
-{
- if (!outfp)
- return 0;
- unsigned count;
- if (!read_uint_arg(&ptr, &count))
- return 0;
- if (outfp)
- fprintf(outfp, "%%%%BeginData: %u Binary Bytes\n", count);
- while (count != 0) {
- int c = getc(fp);
- if (c == EOF) {
- error("end of file within binary section");
- return 0;
- }
- if (outfp)
- putc(c, outfp);
- --count;
- if (c == '\r') {
- int cc = getc(fp);
- if (cc != '\n')
- current_lineno++;
- if (cc != EOF)
- ungetc(c, fp);
- }
- else if (c == '\n')
- current_lineno++;
- }
- char buf[PS_LINE_MAX + 2];
- if (!ps_get_line(buf, fp)) {
- error("missing %%%%EndBinary line");
- return 0;
- }
- if (!matches_comment(buf, "EndBinary")) {
- error("bad %%%%EndBinary line");
- if (outfp)
- fputs(buf, outfp);
- }
- else if (outfp)
- fputs("%%EndData\n", outfp);
- return 0;
-}
-
-static unsigned parse_extensions(const char *ptr)
-{
- unsigned flags = 0;
- for (;;) {
- while (white_space(*ptr))
- ptr++;
- if (*ptr == '\0')
- break;
- const char *name = ptr;
- do {
- ++ptr;
- } while (*ptr != '\0' && !white_space(*ptr));
- int i;
- for (i = 0; i < NEXTENSIONS; i++)
- if (strlen(extension_table[i]) == ptr - name
- && memcmp(extension_table[i], name, ptr - name) == 0) {
- flags |= (1 << i);
- break;
- }
- if (i >= NEXTENSIONS) {
- string s(name, ptr - name);
- s += '\0';
- error("unknown extension `%1'", s.contents());
- }
- }
- return flags;
-}
-
-// XXX if it has not been surrounded with {Begin,End}Document need to strip
-// out Page: Trailer {Begin,End}Prolog {Begin,End}Setup sections.
-
-// XXX Perhaps the decision whether to use BeginDocument or
-// BeginResource: file should be postponed till we have seen
-// the first line of the file.
-
-void resource_manager::process_file(int rank, FILE *fp, const char *filename,
- FILE *outfp)
-{
- // If none of these comments appear in the header section, and we are
- // just analyzing the file (ie outfp is 0), then we can return immediately.
- static const char *header_comment_table[] = {
- "DocumentNeededResources:",
- "DocumentSuppliedResources:",
- "DocumentNeededFonts:",
- "DocumentSuppliedFonts:",
- "DocumentNeededProcSets:",
- "DocumentSuppliedProcSets:",
- "DocumentNeededFiles:",
- "DocumentSuppliedFiles:",
- };
-
- const int NHEADER_COMMENTS = (sizeof(header_comment_table)
- / sizeof(header_comment_table[0]));
- struct comment_info {
- const char *name;
- int (resource_manager::*proc)(const char *, int, FILE *, FILE *);
- };
-
- static comment_info comment_table[] = {
- { "BeginResource:", &resource_manager::do_begin_resource },
- { "IncludeResource:", &resource_manager::do_include_resource },
- { "BeginDocument:", &resource_manager::do_begin_document },
- { "IncludeDocument:", &resource_manager::do_include_document },
- { "BeginProcSet:", &resource_manager::do_begin_procset },
- { "IncludeProcSet:", &resource_manager::do_include_procset },
- { "BeginFont:", &resource_manager::do_begin_font },
- { "IncludeFont:", &resource_manager::do_include_font },
- { "BeginFile:", &resource_manager::do_begin_file },
- { "IncludeFile:", &resource_manager::do_include_file },
- { "EndProcSet", &resource_manager::change_to_end_resource },
- { "EndFont", &resource_manager::change_to_end_resource },
- { "EndFile", &resource_manager::change_to_end_resource },
- { "BeginPreview:", &resource_manager::do_begin_preview },
- { "BeginData:", &resource_manager::do_begin_data },
- { "BeginBinary:", &resource_manager::do_begin_binary },
- };
-
- const int NCOMMENTS = sizeof(comment_table)/sizeof(comment_table[0]);
- char buf[PS_LINE_MAX + 2];
- int saved_lineno = current_lineno;
- const char *saved_filename = current_filename;
- current_filename = filename;
- current_lineno = 0;
- if (!ps_get_line(buf, fp)) {
- current_filename = saved_filename;
- current_lineno = saved_lineno;
- return;
- }
- if (strlen(buf) < sizeof(PS_MAGIC) - 1
- || memcmp(buf, PS_MAGIC, sizeof(PS_MAGIC) - 1) != 0) {
- if (outfp) {
- do {
- if (!(broken_flags & STRIP_PERCENT_BANG)
- || buf[0] != '%' || buf[1] != '!')
- fputs(buf, outfp);
- } while (ps_get_line(buf, fp));
- }
- }
- else {
- if (!(broken_flags & STRIP_PERCENT_BANG) && outfp)
- fputs(buf, outfp);
- int in_header = 1;
- int interesting = 0;
- int had_extensions_comment = 0;
- int had_language_level_comment = 0;
- for (;;) {
- if (!ps_get_line(buf, fp))
- break;
- int copy_this_line = 1;
- if (buf[0] == '%') {
- if (buf[1] == '%') {
- const char *ptr;
- int i;
- for (i = 0; i < NCOMMENTS; i++)
- if ((ptr = matches_comment(buf, comment_table[i].name))) {
- copy_this_line
- = (this->*(comment_table[i].proc))(ptr, rank, fp, outfp);
- break;
- }
- if (i >= NCOMMENTS && in_header) {
- if ((ptr = matches_comment(buf, "EndComments")))
- in_header = 0;
- else if (!had_extensions_comment
- && (ptr = matches_comment(buf, "Extensions:"))) {
- extensions |= parse_extensions(ptr);
- // XXX handle possibility that next line is %%+
- had_extensions_comment = 1;
- }
- else if (!had_language_level_comment
- && (ptr = matches_comment(buf, "LanguageLevel:"))) {
- unsigned ll;
- if (read_uint_arg(&ptr, &ll) && ll > language_level)
- language_level = ll;
- had_language_level_comment = 1;
- }
- else {
- for (i = 0; i < NHEADER_COMMENTS; i++)
- if (matches_comment(buf, header_comment_table[i])) {
- interesting = 1;
- break;
- }
- }
- }
- if ((broken_flags & STRIP_STRUCTURE_COMMENTS)
- && (matches_comment(buf, "EndProlog")
- || matches_comment(buf, "Page:")
- || matches_comment(buf, "Trailer")))
- copy_this_line = 0;
- }
- else if (buf[1] == '!') {
- if (broken_flags & STRIP_PERCENT_BANG)
- copy_this_line = 0;
- }
- }
- else
- in_header = 0;
- if (!outfp && !in_header && !interesting)
- break;
- if (copy_this_line && outfp)
- fputs(buf, outfp);
- }
- }
- current_filename = saved_filename;
- current_lineno = saved_lineno;
-}
-
-void resource_manager::read_download_file()
-{
- char *path = 0;
- FILE *fp = font::open_file("download", &path);
- if (!fp)
- fatal("can't find `download'");
- char buf[512];
- int lineno = 0;
- while (fgets(buf, sizeof(buf), fp)) {
- lineno++;
- char *p = strtok(buf, " \t\r\n");
- if (p == 0 || *p == '#')
- continue;
- char *q = strtok(0, " \t\r\n");
- if (!q)
- fatal_with_file_and_line(path, lineno, "missing filename");
- lookup_font(p)->filename = strsave(q);
- }
- a_delete path;
- fclose(fp);
-}
-
-// XXX Can we share some code with ps_output::put_string()?
-
-static void print_ps_string(const string &s, FILE *outfp)
-{
- int len = s.length();
- const char *str = s.contents();
- int funny = 0;
- if (str[0] == '(')
- funny = 1;
- else {
- for (int i = 0; i < len; i++)
- if (str[i] <= 040 || str[i] > 0176) {
- funny = 1;
- break;
- }
- }
- if (!funny) {
- put_string(s, outfp);
- return;
- }
- int level = 0;
- int i;
- for (i = 0; i < len; i++)
- if (str[i] == '(')
- level++;
- else if (str[i] == ')' && --level < 0)
- break;
- putc('(', outfp);
- for (i = 0; i < len; i++)
- switch (str[i]) {
- case '(':
- case ')':
- if (level != 0)
- putc('\\', outfp);
- putc(str[i], outfp);
- break;
- case '\\':
- fputs("\\\\", outfp);
- break;
- case '\n':
- fputs("\\n", outfp);
- break;
- case '\r':
- fputs("\\r", outfp);
- break;
- case '\t':
- fputs("\\t", outfp);
- break;
- case '\b':
- fputs("\\b", outfp);
- break;
- case '\f':
- fputs("\\f", outfp);
- break;
- default:
- if (str[i] < 040 || str[i] > 0176)
- fprintf(outfp, "\\%03o", str[i] & 0377);
- else
- putc(str[i], outfp);
- break;
- }
- putc(')', outfp);
-}
-
-void resource_manager::print_extensions_comment(FILE *outfp)
-{
- if (extensions) {
- fputs("%%Extensions:", outfp);
- for (int i = 0; i < NEXTENSIONS; i++)
- if (extensions & (1 << i)) {
- putc(' ', outfp);
- fputs(extension_table[i], outfp);
- }
- putc('\n', outfp);
- }
-}
-
-void resource_manager::print_language_level_comment(FILE *outfp)
-{
- if (language_level)
- fprintf(outfp, "%%%%LanguageLevel: %u\n", language_level);
-}
-
diff --git a/contrib/groff/src/devices/grotty/Makefile.sub b/contrib/groff/src/devices/grotty/Makefile.sub
deleted file mode 100644
index 91d3908c00fe..000000000000
--- a/contrib/groff/src/devices/grotty/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=grotty
-MAN1=grotty.n
-XLIBS=$(LIBDRIVER) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=tty.o
-CCSRCS=$(srcdir)/tty.cc
diff --git a/contrib/groff/src/devices/grotty/TODO b/contrib/groff/src/devices/grotty/TODO
deleted file mode 100644
index 3f23dc35d56b..000000000000
--- a/contrib/groff/src/devices/grotty/TODO
+++ /dev/null
@@ -1,3 +0,0 @@
-Document font and device description file usage of grotty.
-
-With -h avoid using a tab when a single space will do.
diff --git a/contrib/groff/src/devices/grotty/grotty.man b/contrib/groff/src/devices/grotty/grotty.man
deleted file mode 100644
index 935c73dc6598..000000000000
--- a/contrib/groff/src/devices/grotty/grotty.man
+++ /dev/null
@@ -1,275 +0,0 @@
-.ig \"-*- nroff -*-
-$FreeBSD$
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.TH GROTTY @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-grotty \- groff driver for typewriter-like devices
-.SH SYNOPSIS
-.B grotty
-[
-.B \-hfbuodBUv
-] [
-.BI \-F dir
-] [
-.IR files \|.\|.\|.
-]
-.PP
-It is possible to have whitespace between the
-.B \-F
-option and its parameter.
-.SH DESCRIPTION
-.B grotty
-translates the output of GNU
-.B troff
-into a form suitable for typewriter-like devices.
-Normally
-.B grotty
-should be invoked by using the
-.B groff
-command
-with a
-.BR \-Tascii ,
-.BR \-Tkoi8-r ,
-.B \-Tlatin1
-or
-.B \-Tutf8
-option on ASCII based systems, and with
-.B \-Tcp1047
-on EBCDIC based hosts.
-If no files are given,
-.B grotty
-will read the standard input.
-A filename of
-.B \-
-will also cause
-.B grotty
-to read the standard input.
-Output is written to the standard output.
-.LP
-Normally
-.B grotty
-prints a bold character
-.I c
-using the sequence
-.RI ` c
-.SM BACKSPACE
-.IR c '
-and a italic character
-.I c
-by the sequence
-.RB ` _
-.SM BACKSPACE
-.IR c '.
-These sequences can be displayed on a terminal
-by piping through
-.BR ul (1).
-Pagers such as
-.BR more (1)
-or
-.BR less (1)
-are also able to display these sequences.
-Use either
-.B \-B
-or
-.B \-U
-when piping into
-.BR less (1);
-use
-.B \-b
-when piping into
-.BR more (1).
-There is no need to filter the output through
-.BR col (1)
-since
-.B grotty
-never outputs reverse line feeds.
-.LP
-The font description file may contain a command
-.IP
-.BI internalname\ n
-.LP
-where
-.I n
-is a decimal integer.
-If the 01 bit in
-.I n
-is set,
-then the font will be treated as an italic font;
-if the 02 bit is set,
-then it will be treated as a bold font.
-The code field in the font description field gives the
-code which will be used to output the character.
-This code can also be used in the
-.B \eN
-escape sequence in
-.BR troff .
-.SH OPTIONS
-.TP
-.BI \-F dir
-Prepend directory
-.IB dir /dev name
-to the search path for font and device description files;
-.I name
-is the name of the device, usually
-.BR ascii ,
-.BR koi8-r ,
-.BR latin1 ,
-.BR utf8 ,
-or
-.BR cp1047 .
-.TP
-.B \-h
-Use horizontal tabs in the output.
-Tabs are assumed to be set every 8 columns.
-.TP
-.B \-f
-Use form feeds in the output.
-A form feed will be output at the end of each page that has no output
-on its last line.
-.TP
-.B \-b
-Suppress the use of overstriking for bold characters.
-.TP
-.B \-u
-Suppress the use of underlining for italic characters.
-.TP
-.B \-B
-Use only overstriking for bold-italic characters.
-.TP
-.B \-U
-Use only underlining for bold-italic characters.
-.TP
-.B \-o
-Suppress overstriking (other than for bold or underlined characters).
-.TP
-.B \-d
-Ignore all
-.B \eD
-commands.
-Without this
-.B grotty
-will render
-.B \eD'l\|.\|.\|.'
-commands that have at least at least one zero argument
-(and so are either horizontal or vertical)
-using
-.BR \- ,
-.B |
-and
-.B +
-characters.
-.TP
-.B \-v
-Print the version number.
-.SH FILES
-.TP
-.B @FONTDIR@/devascii/DESC
-Device description file for
-.B ascii
-device.
-.TP
-.BI @FONTDIR@/devascii/ F
-Font description file for font
-.I F
-of
-.B ascii
-device.
-.TP
-.B @FONTDIR@/devkoi8-r/DESC
-Device description file for
-.B koi8-r
-device.
-.TP
-.BI @FONTDIR@/devkoi8-r/ F
-Font description file for font
-.I F
-of
-.B koi8-r
-device.
-.TP
-.B @FONTDIR@/devlatin1/DESC
-Device description file for
-.B latin1
-device.
-.TP
-.BI @FONTDIR@/devlatin1/ F
-Font description file for font
-.I F
-of
-.B latin1
-device.
-.TP
-.B @FONTDIR@/devutf8/DESC
-Device description file for
-.B utf8
-device.
-.TP
-.BI @FONTDIR@/devutf8/ F
-Font description file for font
-.I F
-of
-.B utf8
-device.
-.TP
-.B @FONTDIR@/devcp1047/DESC
-Device description file for
-.B cp1047
-device.
-.TP
-.BI @FONTDIR@/devcp1047/ F
-Font description file for font
-.I F
-of
-.B cp1047
-device.
-.TP
-.B @MACRODIR@/tty.tmac
-Macros for use with
-.BR grotty .
-.TP
-.B @MACRODIR@/tty-char.tmac
-Additional klugdey character definitions for use with
-.BR grotty .
-.LP
-Note that on EBCDIC hosts, only files for the
-.B cp1047
-device will be installed.
-.SH BUGS
-.LP
-.B grotty
-is intended only for simple documents.
-.LP
-There is no support for fractional horizontal or vertical motions.
-.LP
-There is no support for
-.B \eD
-commands
-other than horizontal and vertical lines.
-.LP
-Characters above the first line (ie with a vertical position of 0)
-cannot be printed.
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR groff_out (@MAN5EXT@),
-.BR groff_font (@MAN5EXT@),
-.BR groff_char (@MAN7EXT@),
-.BR ul (1),
-.BR more (1),
-.BR less (1)
diff --git a/contrib/groff/src/devices/grotty/tty.cc b/contrib/groff/src/devices/grotty/tty.cc
deleted file mode 100644
index a8ee06532075..000000000000
--- a/contrib/groff/src/devices/grotty/tty.cc
+++ /dev/null
@@ -1,509 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "driver.h"
-#include "device.h"
-
-#ifndef SHRT_MIN
-#define SHRT_MIN (-32768)
-#endif
-
-#ifndef SHRT_MAX
-#define SHRT_MAX 32767
-#endif
-
-#define TAB_WIDTH 8
-
-static int horizontal_tab_flag = 0;
-static int form_feed_flag = 0;
-static int bold_flag = 1;
-static int underline_flag = 1;
-static int overstrike_flag = 1;
-static int draw_flag = 1;
-
-enum {
- UNDERLINE_MODE = 0x01,
- BOLD_MODE = 0x02,
- VDRAW_MODE = 0x04,
- HDRAW_MODE = 0x08,
- CU_MODE = 0x10
-};
-
-// Mode to use for bold-underlining.
-static unsigned char bold_underline_mode = BOLD_MODE|UNDERLINE_MODE;
-
-class tty_font : public font {
- tty_font(const char *);
- unsigned char mode;
-public:
- ~tty_font();
- unsigned char get_mode() { return mode; }
-#if 0
- void handle_x_command(int argc, const char **argv);
-#endif
- static tty_font *load_tty_font(const char *);
-};
-
-tty_font *tty_font::load_tty_font(const char *s)
-{
- tty_font *f = new tty_font(s);
- if (!f->load()) {
- delete f;
- return 0;
- }
- const char *num = f->get_internal_name();
- long n;
- if (num != 0 && (n = strtol(num, 0, 0)) != 0)
- f->mode = int(n & (BOLD_MODE|UNDERLINE_MODE));
- if (!underline_flag)
- f->mode &= ~UNDERLINE_MODE;
- if (!bold_flag)
- f->mode &= ~BOLD_MODE;
- if ((f->mode & (BOLD_MODE|UNDERLINE_MODE)) == (BOLD_MODE|UNDERLINE_MODE))
- f->mode = (f->mode & ~(BOLD_MODE|UNDERLINE_MODE)) | bold_underline_mode;
- return f;
-}
-
-tty_font::tty_font(const char *nm)
-: font(nm), mode(0)
-{
-}
-
-tty_font::~tty_font()
-{
-}
-
-#if 0
-void tty_font::handle_x_command(int argc, const char **argv)
-{
- if (argc >= 1 && strcmp(argv[0], "bold") == 0)
- mode |= BOLD_MODE;
- else if (argc >= 1 && strcmp(argv[0], "underline") == 0)
- mode |= UNDERLINE_MODE;
-}
-#endif
-
-class glyph {
- static glyph *free_list;
-public:
- glyph *next;
- short hpos;
- unsigned int code;
- unsigned char mode;
- void *operator new(size_t);
- void operator delete(void *);
- inline int draw_mode() { return mode & (VDRAW_MODE|HDRAW_MODE); }
- inline int order() { return mode & (VDRAW_MODE|HDRAW_MODE|CU_MODE); }
-};
-
-glyph *glyph::free_list = 0;
-
-void *glyph::operator new(size_t)
-{
- if (!free_list) {
- const int BLOCK = 1024;
- free_list = (glyph *)new char[sizeof(glyph) * BLOCK];
- for (int i = 0; i < BLOCK - 1; i++)
- free_list[i].next = free_list + i + 1;
- free_list[BLOCK - 1].next = 0;
- }
- glyph *p = free_list;
- free_list = free_list->next;
- p->next = 0;
- return p;
-}
-
-void glyph::operator delete(void *p)
-{
- if (p) {
- ((glyph *)p)->next = free_list;
- free_list = (glyph *)p;
- }
-}
-
-class tty_printer : public printer {
- int is_utf8;
- glyph **lines;
- int nlines;
- int cached_v;
- int cached_vpos;
- void add_char(unsigned int, int, int, unsigned char);
-public:
- tty_printer(const char *device);
- ~tty_printer();
- void set_char(int, font *, const environment *, int, const char *name);
- void draw(int code, int *p, int np, const environment *env);
- void special(char *arg, const environment *env, char type);
- void put_char(unsigned int);
- void begin_page(int) { }
- void end_page(int page_length);
- font *make_font(const char *);
-};
-
-tty_printer::tty_printer(const char *device) : cached_v(0)
-{
- is_utf8 = !strcmp(device, "utf8");
- nlines = 66;
- lines = new glyph *[nlines];
- for (int i = 0; i < nlines; i++)
- lines[i] = 0;
-}
-
-tty_printer::~tty_printer()
-{
- a_delete lines;
-}
-
-void tty_printer::set_char(int i, font *f, const environment *env,
- int w, const char *name)
-{
- if (w != font::hor)
- fatal("width of character not equal to horizontal resolution");
- add_char(f->get_code(i), env->hpos, env->vpos, ((tty_font *)f)->get_mode());
-}
-
-void tty_printer::add_char(unsigned int c, int h, int v, unsigned char mode)
-{
-#if 0
- // This is too expensive.
- if (h % font::hor != 0)
- fatal("horizontal position not a multiple of horizontal resolution");
-#endif
- int hpos = h / font::hor;
- if (hpos < SHRT_MIN || hpos > SHRT_MAX) {
- error("character with ridiculous horizontal position discarded");
- return;
- }
- int vpos;
- if (v == cached_v && cached_v != 0)
- vpos = cached_vpos;
- else {
- if (v % font::vert != 0)
- fatal("vertical position not a multiple of vertical resolution");
- vpos = v / font::vert;
- if (vpos > nlines) {
- glyph **old_lines = lines;
- lines = new glyph *[vpos + 1];
- memcpy(lines, old_lines, nlines * sizeof(glyph *));
- for (int i = nlines; i <= vpos; i++)
- lines[i] = 0;
- a_delete old_lines;
- nlines = vpos + 1;
- }
- // Note that the first output line corresponds to groff
- // position font::vert.
- if (vpos <= 0) {
- error("character above first line discarded");
- return;
- }
- cached_v = v;
- cached_vpos = vpos;
- }
- glyph *g = new glyph;
- g->hpos = hpos;
- g->code = c;
- g->mode = mode;
-
- // The list will be reversed later. After reversal, it must be in
- // increasing order of hpos, with CU specials before HDRAW characters
- // before VDRAW characters before normal characters at each hpos, and
- // otherwise in order of occurrence.
-
- glyph **pp;
- for (pp = lines + (vpos - 1); *pp; pp = &(*pp)->next)
- if ((*pp)->hpos < hpos
- || ((*pp)->hpos == hpos && (*pp)->order() >= g->order()))
- break;
- g->next = *pp;
- *pp = g;
-}
-
-void tty_printer::special(char *arg, const environment *env, char type)
-{
- if (type == 'u')
- add_char(*arg - '0', env->hpos, env->vpos, CU_MODE);
-}
-
-void tty_printer::draw(int code, int *p, int np, const environment *env)
-{
- if (code != 'l' || !draw_flag)
- return;
- if (np != 2) {
- error("2 arguments required for line");
- return;
- }
- if (p[0] == 0) {
- // vertical line
- int v = env->vpos;
- int len = p[1];
- if (len < 0) {
- v += len;
- len = -len;
- }
- while (len >= 0) {
- add_char('|', env->hpos, v, VDRAW_MODE);
- len -= font::vert;
- v += font::vert;
- }
- }
- if (p[1] == 0) {
- // horizontal line
- int h = env->hpos;
- int len = p[0];
- if (len < 0) {
- h += len;
- len = -len;
- }
- while (len >= 0) {
- add_char('-', h, env->vpos, HDRAW_MODE);
- len -= font::hor;
- h += font::hor;
- }
- }
-}
-
-void tty_printer::put_char(unsigned int wc)
-{
- if (is_utf8 && wc >= 0x80) {
- char buf[6 + 1];
- int count;
- char *p = buf;
- if (wc < 0x800)
- count = 1, *p = (unsigned char)((wc >> 6) | 0xc0);
- else if (wc < 0x10000)
- count = 2, *p = (unsigned char)((wc >> 12) | 0xe0);
- else if (wc < 0x200000)
- count = 3, *p = (unsigned char)((wc >> 18) | 0xf0);
- else if (wc < 0x4000000)
- count = 4, *p = (unsigned char)((wc >> 24) | 0xf8);
- else if (wc <= 0x7fffffff)
- count = 5, *p = (unsigned char)((wc >> 30) | 0xfC);
- else
- return;
- do *++p = (unsigned char)(((wc >> (6 * --count)) & 0x3f) | 0x80);
- while (count > 0);
- *++p = '\0';
- fputs(buf, stdout);
- }
- else {
- putchar(wc);
- }
-}
-
-int cu_flag = 0;
-
-void tty_printer::end_page(int page_length)
-{
- if (page_length % font::vert != 0)
- error("vertical position at end of page not multiple of vertical resolution");
- int lines_per_page = page_length / font::vert;
- int last_line;
- for (last_line = nlines; last_line > 0; last_line--)
- if (lines[last_line - 1])
- break;
-#if 0
- if (last_line > lines_per_page) {
- error("characters past last line discarded");
- do {
- --last_line;
- while (lines[last_line]) {
- glyph *tem = lines[last_line];
- lines[last_line] = tem->next;
- delete tem;
- }
- } while (last_line > lines_per_page);
- }
-#endif
- for (int i = 0; i < last_line; i++) {
- glyph *p = lines[i];
- lines[i] = 0;
- glyph *g = 0;
- while (p) {
- glyph *tem = p->next;
- p->next = g;
- g = p;
- p = tem;
- }
- int hpos = 0;
- glyph *nextp;
- for (p = g; p; delete p, p = nextp) {
- nextp = p->next;
- if (p->mode & CU_MODE) {
- cu_flag = p->code;
- continue;
- }
- if (nextp && p->hpos == nextp->hpos) {
- if (p->draw_mode() == HDRAW_MODE &&
- nextp->draw_mode() == VDRAW_MODE) {
- nextp->code = '+';
- continue;
- }
- if (p->draw_mode() != 0 && p->draw_mode() == nextp->draw_mode()) {
- nextp->code = p->code;
- continue;
- }
- if (!overstrike_flag)
- continue;
- }
- if (hpos > p->hpos) {
- do {
- putchar('\b');
- hpos--;
- } while (hpos > p->hpos);
- }
- else {
- if (horizontal_tab_flag) {
- for (;;) {
- int next_tab_pos = ((hpos + TAB_WIDTH) / TAB_WIDTH) * TAB_WIDTH;
- if (next_tab_pos > p->hpos)
- break;
- if (cu_flag) {
- putchar('_');
- putchar('\b');
- }
- putchar('\t');
- hpos = next_tab_pos;
- }
- }
- for (; hpos < p->hpos; hpos++) {
- if (cu_flag) {
- putchar('_');
- putchar('\b');
- }
- putchar(' ');
- }
- }
- assert(hpos == p->hpos);
- if (p->mode & UNDERLINE_MODE) {
- putchar('_');
- putchar('\b');
- }
- if (p->mode & BOLD_MODE) {
- put_char(p->code);
- putchar('\b');
- }
- put_char(p->code);
- hpos++;
- }
- putchar('\n');
- }
- if (form_feed_flag) {
- if (last_line < lines_per_page)
- putchar('\f');
- }
- else {
- for (; last_line < lines_per_page; last_line++)
- putchar('\n');
- }
-}
-
-font *tty_printer::make_font(const char *nm)
-{
- return tty_font::load_tty_font(nm);
-}
-
-printer *make_printer()
-{
- return new tty_printer(device);
-}
-
-static void usage(FILE *stream);
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int c;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((c = getopt_long(argc, argv, "F:vhfbuoBUd", long_options, NULL))
- != EOF)
- switch(c) {
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU grotty (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'b':
- // Do not embolden by overstriking.
- bold_flag = 0;
- break;
- case 'u':
- // Do not underline.
- underline_flag = 0;
- break;
- case 'o':
- // Do not overstrike (other than emboldening and underlining).
- overstrike_flag = 0;
- break;
- case 'B':
- // Do bold-underlining as bold.
- bold_underline_mode = BOLD_MODE;
- break;
- case 'U':
- // Do bold-underlining as underlining.
- bold_underline_mode = UNDERLINE_MODE;
- break;
- case 'h':
- // Use horizontal tabs.
- horizontal_tab_flag = 1;
- break;
- case 'f':
- form_feed_flag = 1;
- break;
- case 'F':
- font::command_line_font_dir(optarg);
- break;
- case 'd':
- // Ignore \D commands.
- draw_flag = 0;
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
- if (optind >= argc)
- do_file("-");
- else {
- for (int i = optind; i < argc; i++)
- do_file(argv[i]);
- }
- delete pr;
- return 0;
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [-hfvbuodBU] [-F dir] [files ...]\n",
- program_name);
-}
diff --git a/contrib/groff/src/include/Makefile.sub b/contrib/groff/src/include/Makefile.sub
deleted file mode 100644
index cee00d31a314..000000000000
--- a/contrib/groff/src/include/Makefile.sub
+++ /dev/null
@@ -1,42 +0,0 @@
-HDRS=\
- assert.h \
- cmap.h \
- cset.h \
- device.h \
- driver.h \
- errarg.h \
- error.h \
- font.h \
- getopt.h \
- groff-getopt.h \
- htmlindicate.h \
- index.h \
- lib.h \
- macropath.h \
- nonposix.h \
- posix.h \
- printer.h \
- ptable.h \
- refid.h \
- search.h \
- searchpath.h \
- stringclass.h
-GENHDRS=defs.h
-CLEANADD=$(GENHDRS)
-
-all depend: $(GENHDRS)
-
-defs.h: FORCE
- @$(SHELL) $(top_srcdir)/gendef.sh defs.h \
- "PROG_PREFIX=\"$(g)\"" \
- "DEVICE=\"$(DEVICE)\"" \
- "BINPATH=\"$(bindir)\"" \
- "FONTPATH=\"$(fontpath)\"" \
- "MACROPATH=\"$(tmacpath)\"" \
- "INDEX_SUFFIX=\"$(indexext)\"" \
- "COMMON_WORDS_FILE=\"$(common_words_file)\"" \
- "DEFAULT_INDEX_DIR=\"$(indexdir)\"" \
- "DEFAULT_INDEX_NAME=\"$(indexname)\"" \
- "DEFAULT_INDEX=\"$(indexdir)/$(indexname)\""
-
-FORCE:
diff --git a/contrib/groff/src/include/assert.h b/contrib/groff/src/include/assert.h
deleted file mode 100644
index 18d9c2623eda..000000000000
--- a/contrib/groff/src/include/assert.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef ASSERT_H
-#define ASSERT_H
-
-void assertion_failed(int, const char *);
-
-inline void do_assert(int expr, int line, const char *file)
-{
- if (!expr)
- assertion_failed(line, file);
-}
-#endif /* ASSERT_H */
-
-#undef assert
-
-#ifdef NDEBUG
-#define assert(ignore) /* as nothing */
-#else
-#define assert(expr) do_assert(expr, __LINE__, __FILE__)
-#endif
diff --git a/contrib/groff/src/include/cmap.h b/contrib/groff/src/include/cmap.h
deleted file mode 100644
index 1537d4627d7b..000000000000
--- a/contrib/groff/src/include/cmap.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-
-enum cmap_builtin { CMAP_BUILTIN };
-
-class cmap {
-public:
- cmap();
- cmap(cmap_builtin);
- int operator()(unsigned char) const;
- unsigned char &operator[](unsigned char);
-
- friend class cmap_init;
-private:
- unsigned char v[UCHAR_MAX+1];
-};
-
-inline int cmap::operator()(unsigned char c) const
-{
- return v[c];
-}
-
-inline unsigned char &cmap::operator[](unsigned char c)
-{
- return v[c];
-}
-
-extern cmap cmlower;
-extern cmap cmupper;
-
-static class cmap_init {
- static int initialised;
-public:
- cmap_init();
-} _cmap_init;
diff --git a/contrib/groff/src/include/cset.h b/contrib/groff/src/include/cset.h
deleted file mode 100644
index b3a1a976139e..000000000000
--- a/contrib/groff/src/include/cset.h
+++ /dev/null
@@ -1,75 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_CC_LIMITS_H
-#include <limits.h>
-#else /* not HAVE_CC_LIMITS_H */
-#ifndef UCHAR_MAX
-#define UCHAR_MAX 255
-#endif
-#endif /* not HAVE_CC_LIMITS_H */
-
-enum cset_builtin { CSET_BUILTIN };
-
-class cset {
-public:
- cset();
- cset(cset_builtin);
- cset(const char *);
- cset(const unsigned char *);
- int operator()(unsigned char) const;
-
- cset &operator|=(const cset &);
- cset &operator|=(unsigned char);
-
- friend class cset_init;
-private:
- char v[UCHAR_MAX+1];
- void clear();
-};
-
-inline int cset::operator()(unsigned char c) const
-{
- return v[c];
-}
-
-inline cset &cset::operator|=(unsigned char c)
-{
- v[c] = 1;
- return *this;
-}
-
-extern cset csalpha;
-extern cset csupper;
-extern cset cslower;
-extern cset csdigit;
-extern cset csxdigit;
-extern cset csspace;
-extern cset cspunct;
-extern cset csalnum;
-extern cset csprint;
-extern cset csgraph;
-extern cset cscntrl;
-
-static class cset_init {
- static int initialised;
-public:
- cset_init();
-} _cset_init;
diff --git a/contrib/groff/src/include/device.h b/contrib/groff/src/include/device.h
deleted file mode 100644
index 341af8d2a70f..000000000000
--- a/contrib/groff/src/include/device.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-extern const char *device;
diff --git a/contrib/groff/src/include/driver.h b/contrib/groff/src/include/driver.h
deleted file mode 100644
index 97eb89125d02..000000000000
--- a/contrib/groff/src/include/driver.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <errno.h>
-#include <assert.h>
-#include <math.h>
-#include "errarg.h"
-#include "error.h"
-#include "font.h"
-#include "printer.h"
-#include "lib.h"
-
-void do_file(const char *);
-extern printer *pr;
diff --git a/contrib/groff/src/include/errarg.h b/contrib/groff/src/include/errarg.h
deleted file mode 100644
index 0c7957c85ce0..000000000000
--- a/contrib/groff/src/include/errarg.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-class errarg {
- enum { EMPTY, STRING, CHAR, INTEGER, DOUBLE } type;
- union {
- const char *s;
- int n;
- char c;
- double d;
- };
- public:
- errarg();
- errarg(const char *);
- errarg(char);
- errarg(unsigned char);
- errarg(int);
- errarg(double);
- int empty() const;
- void print() const;
-};
-
-extern errarg empty_errarg;
-
-extern void errprint(const char *,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
diff --git a/contrib/groff/src/include/error.h b/contrib/groff/src/include/error.h
deleted file mode 100644
index d26e2c70facd..000000000000
--- a/contrib/groff/src/include/error.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-extern void fatal_with_file_and_line(const char *filename, int lineno,
- const char *format,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-extern void error_with_file_and_line(const char *filename, int lineno,
- const char *format,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-extern void warning_with_file_and_line(const char *filename, int lineno,
- const char *format,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-extern void fatal(const char *,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-extern void error(const char *,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-extern void warning(const char *,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-
-extern const char *program_name;
-extern int current_lineno;
-extern const char *current_filename;
-
diff --git a/contrib/groff/src/include/font.h b/contrib/groff/src/include/font.h
deleted file mode 100644
index 099f97bea180..000000000000
--- a/contrib/groff/src/include/font.h
+++ /dev/null
@@ -1,116 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-typedef void (*FONT_COMMAND_HANDLER)(const char *, const char *,
- const char *, int);
-
-struct font_kern_list;
-struct font_char_metric;
-struct font_widths_cache;
-
-class font {
-public:
- enum {
- LIG_ff = 1,
- LIG_fi = 2,
- LIG_fl = 4,
- LIG_ffi = 8,
- LIG_ffl = 16
- };
-
- virtual ~font();
- int contains(int index);
- int is_special();
- int get_width(int index, int point_size);
- int get_height(int index, int point_size);
- int get_depth(int index, int point_size);
- int get_space_width(int point_size);
- int get_character_type(int index);
- int get_kern(int index1, int index2, int point_size);
- int get_skew(int index, int point_size, int slant);
- int has_ligature(int);
- int get_italic_correction(int index, int point_size);
- int get_left_italic_correction(int index, int point_size);
- int get_subscript_correction(int index, int point_size);
- int get_code(int i);
- const char *get_special_device_encoding(int index);
- const char *get_name();
- const char *get_internal_name();
-
- static font *load_font(const char *, int *not_found = 0);
- static void command_line_font_dir(const char *path);
- static FILE *open_file(const char *name, char **pathp);
- static int load_desc();
- static int name_to_index(const char *);
- static int number_to_index(int);
- static FONT_COMMAND_HANDLER
- set_unknown_desc_command_handler(FONT_COMMAND_HANDLER);
-
- static int res;
- static int hor;
- static int vert;
- static int unitwidth;
- static int paperwidth;
- static int paperlength;
- static int biggestfont;
- static int spare2;
- static int sizescale;
- static int tcommand;
- static int pass_filenames;
- static int use_charnames_in_special;
-
- static const char **font_name_table;
- static const char **style_table;
- static const char *family;
- static int *sizes;
-private:
- unsigned ligatures;
- font_kern_list **kern_hash_table;
- int space_width;
- short *ch_index;
- int nindices;
- font_char_metric *ch;
- int ch_used;
- int ch_size;
- int special;
- char *name;
- char *internalname;
- double slant;
- font_widths_cache *widths_cache;
- static FONT_COMMAND_HANDLER unknown_desc_command_handler;
-
- enum { KERN_HASH_TABLE_SIZE = 503 };
-
- void add_entry(int index, const font_char_metric &);
- void copy_entry(int new_index, int old_index);
- void add_kern(int index1, int index2, int amount);
- static int hash_kern(int i1, int i2);
- void alloc_ch_index(int);
- void extend_ch();
- void compact();
-
- static int scale(int w, int pointsize);
- virtual void handle_unknown_font_command(const char *command,
- const char *arg,
- const char *file, int lineno);
-protected:
- font(const char *);
- int load(int *not_found = 0);
-};
diff --git a/contrib/groff/src/include/getopt.h b/contrib/groff/src/include/getopt.h
deleted file mode 100644
index b0147e9d2ac3..000000000000
--- a/contrib/groff/src/include/getopt.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _GETOPT_H
-
-#ifndef __need_getopt
-# define _GETOPT_H 1
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-#ifndef __need_getopt
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
-# if defined __STDC__ && __STDC__
- const char *name;
-# else
- char *name;
-# endif
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-# define no_argument 0
-# define required_argument 1
-# define optional_argument 2
-#endif /* need getopt */
-
-
-/* Get definitions and prototypes for functions to process the
- arguments in ARGV (ARGC of them, minus the program name) for
- options given in OPTS.
-
- Return the option character from OPTS just read. Return -1 when
- there are no more options. For unrecognized options, or options
- missing arguments, `optopt' is set to the option letter, and '?' is
- returned.
-
- The OPTS string is a list of characters which are recognized option
- letters, optionally followed by colons, specifying that that letter
- takes an argument, to be placed in `optarg'.
-
- If a letter in OPTS is followed by two colons, its argument is
- optional. This behavior is specific to the GNU `getopt'.
-
- The argument `--' causes premature termination of argument
- scanning, explicitly telling `getopt' that there are no more
- options.
-
- If OPTS begins with `--', then non-option arguments are treated as
- arguments to the option '\0'. This behavior is specific to the GNU
- `getopt'. */
-
-#if defined __STDC__ && __STDC__
-# ifdef __GNU_LIBRARY__
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. */
-extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
-# else /* not __GNU_LIBRARY__ */
-extern int getopt ();
-# endif /* __GNU_LIBRARY__ */
-
-# ifndef __need_getopt
-extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
- const struct option *__longopts, int *__longind);
-extern int getopt_long_only (int __argc, char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind);
-
-/* Internal only. Users should not call this directly. */
-extern int _getopt_internal (int __argc, char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts, int *__longind,
- int __long_only);
-# endif
-#else /* not __STDC__ */
-extern int getopt ();
-# ifndef __need_getopt
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-# endif
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-/* Make sure we later can get all the definitions and declarations. */
-#undef __need_getopt
-
-#endif /* getopt.h */
diff --git a/contrib/groff/src/include/groff-getopt.h b/contrib/groff/src/include/groff-getopt.h
deleted file mode 100644
index 1807fc7ccfb9..000000000000
--- a/contrib/groff/src/include/groff-getopt.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- Written by Werner Lemberg (wl@gnu.org)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/*
- This file has to be included from within lib.h instead of getopt.h
- to avoid problems with picky C++ compilers.
-*/
-
-#ifndef _GROFF_GETOPT_H
-#define _GROFF_GETOPT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern char *optarg;
-extern int optind;
-extern int opterr;
-extern int optopt;
-
-struct option
-{
- const char *name;
- int has_arg;
- int *flag;
- int val;
-};
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-extern int getopt(int __argc,
- char *const *__argv,
- const char *__shortopts);
-extern int getopt_long(int __argc,
- char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts,
- int *__longind);
-extern int getopt_long_only(int __argc,
- char *const *__argv,
- const char *__shortopts,
- const struct option *__longopts,
- int *__longind);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GROFF_GETOPT_H */
diff --git a/contrib/groff/src/include/html-strings.h b/contrib/groff/src/include/html-strings.h
deleted file mode 100644
index 710e8d7e816c..000000000000
--- a/contrib/groff/src/include/html-strings.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2001 Free Software Foundation, Inc.
- Written by Gaius Mulley (gaius@glam.ac.uk).
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/*
- * defines the image tags issued by the pre-processors (tbl, pic, eqn)
- * and later detected by pre-html.cc
- */
-
-#define HTML_IMAGE_INLINE_BEGIN "\\O[HTML-IMAGE-INLINE-BEGIN]"
-#define HTML_IMAGE_INLINE_END "\\O[HTML-IMAGE-INLINE-END]"
-#define HTML_IMAGE_CENTERED ".HTML-IMAGE"
-#define HTML_IMAGE_RIGHT ".HTML-IMAGE-RIGHT"
-#define HTML_IMAGE_LEFT ".HTML-IMAGE-LEFT"
-#define HTML_IMAGE_END ".HTML-IMAGE-END"
diff --git a/contrib/groff/src/include/htmlindicate.h b/contrib/groff/src/include/htmlindicate.h
deleted file mode 100644
index 4915ba8a2b15..000000000000
--- a/contrib/groff/src/include/htmlindicate.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Gaius Mulley <gaius@glam.ac.uk>
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef HTMLINDICATE_H
-#define HTMLINDICATE_H
-
-/*
- * graphic_start - emit a html graphic start indicator, but only
- * if one has not already been issued.
- *
- * The boolean, is_inline, should be:
- *
- * FALSE if this is called via EQ, TS, PS, and
- * TRUE if issued via delim $$ $ x over y $ etc.
- */
-extern void graphic_start(int is_inline);
-
-/*
- * graphic_end - emit a html graphic end indicator, but only
- * if a corresponding matching graphic-start has
- * been issued.
- *
- */
-extern void graphic_end();
-
-/*
- * html_begin_suppress - suppresses output for the html device
- * and resets the min/max registers for -Tps
- *
- * The boolean, is_inline, should be:
- *
- * FALSE if this is called via EQ, TS, PS, and
- * TRUE if issued via delim $$ $ x over y $ etc.
- */
-extern void html_begin_suppress(int is_inline);
-
-/*
- * html_end_suppress - end the suppression of output.
- */
-extern void html_end_suppress(int is_inline);
-
-#endif
diff --git a/contrib/groff/src/include/index.h b/contrib/groff/src/include/index.h
deleted file mode 100644
index 7e6081381c2e..000000000000
--- a/contrib/groff/src/include/index.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define INDEX_MAGIC 0x23021964
-#define INDEX_VERSION 1
-
-struct index_header {
- int magic;
- int version;
- int tags_size;
- int table_size;
- int lists_size;
- int strings_size;
- int truncate;
- int shortest;
- int common;
-};
-
-struct tag {
- int filename_index;
- int start;
- int length;
-};
-
-unsigned hash(const char *s, int len);
diff --git a/contrib/groff/src/include/lib.h b/contrib/groff/src/include/lib.h
deleted file mode 100644
index ad416e0a9883..000000000000
--- a/contrib/groff/src/include/lib.h
+++ /dev/null
@@ -1,133 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-extern "C" {
-#ifndef strerror
- char *strerror(int);
-#endif
- const char *i_to_a(int);
- const char *if_to_a(int, int);
-}
-
-/* stdio.h on IRIX and OSF/1 include getopt.h */
-
-#if !(defined(__sgi) || (defined(__osf__) && defined(__alpha)))
-#include <groff-getopt.h>
-#endif
-
-char *strsave(const char *s);
-int is_prime(unsigned);
-
-#include <stdio.h>
-#include <string.h>
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
-FILE *xtmpfile(char **namep=0, char *postfix=0, int do_unlink=1);
-char *xtmptemplate(char *extension=0);
-
-#ifdef NEED_DECLARATION_POPEN
-
-extern "C" { FILE *popen(const char *, const char *); }
-
-#endif /* NEED_DECLARATION_POPEN */
-
-#ifdef NEED_DECLARATION_PCLOSE
-
-extern "C" { int pclose (FILE *); }
-
-#endif /* NEED_DECLARATION_PCLOSE */
-
-int interpret_lf_args(const char *p);
-
-extern char illegal_char_table[];
-
-inline int illegal_input_char(int c)
-{
- return c >= 0 && illegal_char_table[c];
-}
-
-#if !defined(_AIX) && !defined(sinix) && !defined(__sinix__)
-#ifdef HAVE_STRNCASECMP
-#ifdef NEED_DECLARATION_STRNCASECMP
-extern "C" {
- // SunOS's string.h fails to declare this.
- int strncasecmp(const char *, const char *, int);
-}
-#endif /* NEED_DECLARATION_STRNCASECMP */
-#endif /* HAVE_STRNCASECMP */
-#endif /* !_AIX && !sinix && !__sinix__ */
-
-#ifndef HAVE_STRCASECMP
-#define strcasecmp(a,b) strcmp((a),(b))
-#endif
-
-#ifndef HAVE_STRNCASECMP
-#define strncasecmp(a,b,c) strncmp((a),(b),(c))
-#endif
-
-#ifdef HAVE_CC_LIMITS_H
-#include <limits.h>
-#else /* not HAVE_CC_LIMITS_H */
-#define INT_MAX 2147483647
-#endif /* not HAVE_CC_LIMITS_H */
-
-/* It's not safe to rely on people getting INT_MIN right (ie signed). */
-
-#ifdef INT_MIN
-#undef INT_MIN
-#endif
-
-#ifdef CFRONT_ANSI_BUG
-
-/* This works around a bug in cfront 2.0 used with ANSI C compilers. */
-
-#define INT_MIN ((long)(-INT_MAX-1))
-
-#else /* not CFRONT_ANSI_BUG */
-
-#define INT_MIN (-INT_MAX-1)
-
-#endif /* not CFRONT_ANSI_BUG */
-
-/* Maximum number of digits in the decimal representation of an int
-(not including the -). */
-
-#define INT_DIGITS 10
-
-#ifdef PI
-#undef PI
-#endif
-
-const double PI = 3.14159265358979323846;
-
-/* ad_delete deletes an array of objects with destructors;
-a_delete deletes an array of objects without destructors */
-
-#ifdef ARRAY_DELETE_NEEDS_SIZE
-/* for 2.0 systems */
-#define ad_delete(size) delete [size]
-#define a_delete delete
-#else /* not ARRAY_DELETE_NEEDS_SIZE */
-/* for ARM systems */
-#define ad_delete(size) delete []
-#define a_delete delete []
-#endif /* not ARRAY_DELETE_NEEDS_SIZE */
diff --git a/contrib/groff/src/include/macropath.h b/contrib/groff/src/include/macropath.h
deleted file mode 100644
index b4a2bd0cadaa..000000000000
--- a/contrib/groff/src/include/macropath.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-extern search_path macro_path;
-extern search_path safer_macro_path;
-extern search_path config_macro_path;
diff --git a/contrib/groff/src/include/nonposix.h b/contrib/groff/src/include/nonposix.h
deleted file mode 100644
index 51449832ae35..000000000000
--- a/contrib/groff/src/include/nonposix.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- Written by Eli Zaretskii (eliz@is.elta.co.il)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This header file compartmentalize all idiosyncrasies of non-Posix
- systems, such as MS-DOS, MS-Windows, etc. */
-
-#if defined _MSC_VER
-# ifndef _WIN32
-# define _WIN32
-# endif
-# define setmode(f,m) _setmode(f,m)
-#endif
-
-#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN32__))
-
-/* Binary I/O nuisances. Note: "setmode" is right for DJGPP and
- Borland; Windows compilers might need _setmode or some such. */
-# include <fcntl.h>
-# include <io.h>
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
-# define SET_BINARY(f) do {if (!isatty(f)) setmode(f,O_BINARY);} while(0)
-# define FOPEN_RB "rb"
-# define FOPEN_WB "wb"
-# define FOPEN_RWB "wb+"
-# ifdef _MSC_VER
-# define POPEN_RT "rt"
-# define POPEN_WT "wt"
-# define popen(c,m) _popen(c,m)
-# define pclose(p) _pclose(p)
-# define getpid() (1)
-# endif
-# ifndef O_BINARY
-# ifdef _O_BINARY
-# define O_BINARY (_O_BINARY)
-# endif
-# endif
-
-/* The system shell. Groff assumes a Unixy shell, but non-Posix
- systems don't have standard places where it lives, and might not
- have it installed to begin with. We want to give them some leeway. */
-# define BSHELL (system_shell_name())
-# define BSHELL_DASH_C (system_shell_dash_c())
-# define IS_BSHELL(s) (is_system_shell(s))
-
-/* The separator for directories in PATH and other environment
- variables. */
-# define PATH_SEP ";"
-
-/* Characters that separate directories in a path name. */
-# define DIR_SEPS "/\\:"
-
-/* How to tell if the argument is an absolute file name. */
-# define IS_ABSOLUTE(f) \
- ((f)[0] == '/' || (f)[0] == '\\' || (f)[0] && (f)[1] == ':')
-
-/* The executable extension. */
-# define EXE_EXT ".exe"
-
-/* The system null device. */
-# define NULL_DEV "NUL"
-
-/* Prototypes. */
-# ifdef __cplusplus
- extern "C" {
-# endif
- const char * system_shell_name(void);
- const char * system_shell_dash_c(void);
- int is_system_shell(const char *);
-# ifdef __cplusplus
- }
-# endif
-
-#endif
-
-/* Defaults, for Posix systems. */
-
-#ifndef FOPEN_RB
-# define FOPEN_RB "r"
-#endif
-#ifndef FOPEN_WB
-# define FOPEN_WB "w"
-#endif
-#ifndef FOPEN_RWB
-# define FOPEN_RWB "w+"
-#endif
-#ifndef POPEN_RT
-# define POPEN_RT "r"
-#endif
-#ifndef POPEN_WT
-# define POPEN_WT "w"
-#endif
-#ifndef O_BINARY
-# define O_BINARY 0
-#endif
-#ifndef BSHELL
-# define BSHELL "/bin/sh"
-#endif
-#ifndef BSHELL_DASH_C
-# define BSHELL_DASH_C "-c"
-#endif
-#ifndef IS_BSHELL
-# define IS_BSHELL(s) ((s) && strcmp(s,BSHELL) == 0)
-#endif
-#ifndef PATH_SEP
-# define PATH_SEP ":"
-#endif
-#ifndef DIR_SEPS
-# define DIR_SEPS "/"
-#endif
-#ifndef IS_ABSOLUTE
-# define IS_ABSOLUTE(f) ((f)[0] == '/')
-#endif
-#ifndef EXE_EXT
-# define EXE_EXT ""
-#endif
-#ifndef NULL_DEV
-# define NULL_DEV "/dev/null"
-#endif
diff --git a/contrib/groff/src/include/posix.h b/contrib/groff/src/include/posix.h
deleted file mode 100644
index 1b7d5cdc3424..000000000000
--- a/contrib/groff/src/include/posix.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_CC_OSFCN_H
-#include <osfcn.h>
-#else
-#include <fcntl.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#endif
-
-#ifndef S_IRUSR
-#define S_IRUSR 0400
-#endif
-
-#ifndef S_IRGRP
-#define S_IRGRP 0040
-#endif
-
-#ifndef S_IROTH
-#define S_IROTH 0004
-#endif
-
-#ifndef S_ISREG
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-
-#ifndef O_RDONLY
-#define O_RDONLY 0
-#endif
diff --git a/contrib/groff/src/include/printer.h b/contrib/groff/src/include/printer.h
deleted file mode 100644
index beae4d9ab915..000000000000
--- a/contrib/groff/src/include/printer.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct environment {
- int fontno;
- int size;
- int hpos;
- int vpos;
- int height;
- int slant;
-};
-
-struct font;
-
-struct font_pointer_list {
- font *p;
- font_pointer_list *next;
-
- font_pointer_list(font *, font_pointer_list *);
-};
-
-class printer {
-public:
- printer();
- virtual ~printer();
- void load_font(int i, const char *name);
- void set_ascii_char(unsigned char c, const environment *env,
- int *widthp = 0);
- void set_special_char(const char *nm, const environment *env,
- int *widthp = 0);
- void set_numbered_char(int n, const environment *env, int *widthp = 0);
- int set_char_and_width(const char *nm, const environment *env,
- int *widthp, font **f);
- font *get_font_from_index(int fontno);
- virtual void draw(int code, int *p, int np, const environment *env);
- virtual void begin_page(int) = 0;
- virtual void end_page(int page_length) = 0;
- virtual font *make_font(const char *nm);
- virtual void end_of_line();
- virtual void special(char *arg, const environment *env, char type = 'p');
- static int adjust_arc_center(const int *, double *);
-protected:
- font_pointer_list *font_list;
-
- // information about named characters
- int is_char_named;
- int is_named_set;
- char named_command;
- const char *named_char_s;
- int named_char_n;
-
-private:
- font **font_table;
- int nfonts;
- font *find_font(const char *);
- virtual void set_char(int index, font *f, const environment *env,
- int w, const char *name) = 0;
-};
-
-printer *make_printer();
diff --git a/contrib/groff/src/include/ptable.h b/contrib/groff/src/include/ptable.h
deleted file mode 100644
index dc56add0f6c7..000000000000
--- a/contrib/groff/src/include/ptable.h
+++ /dev/null
@@ -1,168 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <assert.h>
-#include <string.h>
-
-#ifdef TRADITIONAL_CPP
-#define name2(a,b) a/**/b
-#else /* not TRADITIONAL_CPP */
-#define name2(a,b) name2x(a,b)
-#define name2x(a,b) a ## b
-#endif /* not TRADITIONAL_CPP */
-
-#define PTABLE(T) name2(T,_ptable)
-#define PASSOC(T) name2(T,_passoc)
-#define PTABLE_ITERATOR(T) name2(T,_ptable_iterator)
-
-extern unsigned next_ptable_size(unsigned);
-extern unsigned long hash_string(const char *);
-
-#define declare_ptable(T) \
- \
-struct PASSOC(T) { \
- char *key; \
- T *val; \
- PASSOC(T)(); \
-}; \
- \
-struct PTABLE(T); \
- \
-class PTABLE_ITERATOR(T) { \
- PTABLE(T) *p; \
- unsigned i; \
-public: \
- PTABLE_ITERATOR(T)(PTABLE(T) *); \
- int next(const char **, T **); \
-}; \
- \
-class PTABLE(T) { \
- PASSOC(T) *v; \
- unsigned size; \
- unsigned used; \
- enum { FULL_NUM = 2, FULL_DEN = 3, INITIAL_SIZE = 17 }; \
-public: \
- PTABLE(T)(); \
- ~PTABLE(T)(); \
- void define(const char *, T *); \
- T *lookup(const char *); \
- friend class PTABLE_ITERATOR(T); \
-};
-
-
-#define implement_ptable(T) \
- \
-PASSOC(T)::PASSOC(T)() \
-: key(0), val(0) \
-{ \
-} \
- \
-PTABLE(T)::PTABLE(T)() \
-{ \
- v = new PASSOC(T)[size = INITIAL_SIZE]; \
- used = 0; \
-} \
- \
-PTABLE(T)::~PTABLE(T)() \
-{ \
- for (unsigned i = 0; i < size; i++) { \
- a_delete v[i].key; \
- delete v[i].val; \
- } \
- a_delete v; \
-} \
- \
-void PTABLE(T)::define(const char *key, T *val) \
-{ \
- assert(key != 0); \
- unsigned long h = hash_string(key); \
- unsigned n; \
- for (n = unsigned(h % size); \
- v[n].key != 0; \
- n = (n == 0 ? size - 1 : n - 1)) \
- if (strcmp(v[n].key, key) == 0) { \
- delete v[n].val; \
- v[n].val = val; \
- return; \
- } \
- if (val == 0) \
- return; \
- if (used*FULL_DEN >= size*FULL_NUM) { \
- PASSOC(T) *oldv = v; \
- unsigned old_size = size; \
- size = next_ptable_size(size); \
- v = new PASSOC(T)[size]; \
- for (unsigned i = 0; i < old_size; i++) \
- if (oldv[i].key != 0) { \
- if (oldv[i].val == 0) \
- a_delete oldv[i].key; \
- else { \
- unsigned j; \
- for (j = unsigned(hash_string(oldv[i].key) % size); \
- v[j].key != 0; \
- j = (j == 0 ? size - 1 : j - 1)) \
- ; \
- v[j].key = oldv[i].key; \
- v[j].val = oldv[i].val; \
- } \
- } \
- for (n = unsigned(h % size); \
- v[n].key != 0; \
- n = (n == 0 ? size - 1 : n - 1)) \
- ; \
- a_delete oldv; \
- } \
- char *temp = new char[strlen(key)+1]; \
- strcpy(temp, key); \
- v[n].key = temp; \
- v[n].val = val; \
- used++; \
-} \
- \
-T *PTABLE(T)::lookup(const char *key) \
-{ \
- assert(key != 0); \
- for (unsigned n = unsigned(hash_string(key) % size); \
- v[n].key != 0; \
- n = (n == 0 ? size - 1 : n - 1)) \
- if (strcmp(v[n].key, key) == 0) \
- return v[n].val; \
- return 0; \
-} \
- \
-PTABLE_ITERATOR(T)::PTABLE_ITERATOR(T)(PTABLE(T) *t) \
-: p(t), i(0) \
-{ \
-} \
- \
-int PTABLE_ITERATOR(T)::next(const char **keyp, T **valp) \
-{ \
- unsigned size = p->size; \
- PASSOC(T) *v = p->v; \
- for (; i < size; i++) \
- if (v[i].key != 0) { \
- *keyp = v[i].key; \
- *valp = v[i].val; \
- i++; \
- return 1; \
- } \
- return 0; \
-}
-
diff --git a/contrib/groff/src/include/refid.h b/contrib/groff/src/include/refid.h
deleted file mode 100644
index 605427e9af9b..000000000000
--- a/contrib/groff/src/include/refid.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-class reference_id {
- int filename_id;
- int pos;
-public:
- reference_id() : filename_id(-1) { }
- reference_id(int fid, int off) : filename_id(fid), pos(off) { }
- unsigned hash() const { return (filename_id << 4) + pos; }
- int is_null() const { return filename_id < 0; }
- friend inline int operator==(const reference_id &, const reference_id &);
-};
-
-inline int operator==(const reference_id &r1, const reference_id &r2)
-{
- return r1.filename_id == r2.filename_id && r1.pos == r2.pos;
-}
diff --git a/contrib/groff/src/include/search.h b/contrib/groff/src/include/search.h
deleted file mode 100644
index 260410e2372b..000000000000
--- a/contrib/groff/src/include/search.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct search_item;
-struct search_item_iterator;
-
-class search_list {
-public:
- search_list();
- ~search_list();
- void add_file(const char *fn, int silent = 0);
- int nfiles() const;
-private:
- search_item *list;
- int niterators;
- int next_fid;
- friend class search_list_iterator;
-};
-
-struct bmpattern;
-
-class linear_searcher {
- const char *ignore_fields;
- int truncate_len;
- bmpattern **keys;
- int nkeys;
- const char *search_and_check(const bmpattern *key, const char *buf,
- const char *bufend, const char **start = 0)
- const;
- int check_match(const char *buf, const char *bufend, const char *match,
- int matchlen, const char **cont, const char **start)
- const;
-public:
- linear_searcher(const char *query, int query_len,
- const char *ign, int trunc);
- ~linear_searcher();
- int search(const char *buf, const char *bufend,
- const char **startp, int *lengthp) const;
-};
-
-class search_list_iterator {
- search_list *list;
- search_item *ptr;
- search_item_iterator *iter;
- char *query;
- linear_searcher searcher;
-public:
- search_list_iterator(search_list *, const char *query);
- ~search_list_iterator();
- int next(const char **, int *, reference_id * = 0);
-};
-
-class search_item {
-protected:
- char *name;
- int filename_id;
-public:
- search_item *next;
- search_item(const char *nm, int fid);
- virtual search_item_iterator *make_search_item_iterator(const char *) = 0;
- virtual ~search_item();
- int is_named(const char *) const;
- virtual int next_filename_id() const;
-};
-
-class search_item_iterator {
- char shut_g_plus_plus_up;
-public:
- virtual ~search_item_iterator();
- virtual int next(const linear_searcher &, const char **ptr, int *lenp,
- reference_id *) = 0;
-};
-
-search_item *make_index_search_item(const char *filename, int fid);
-search_item *make_linear_search_item(int fd, const char *filename, int fid);
-
-extern int linear_truncate_len;
-extern const char *linear_ignore_fields;
-extern int verify_flag;
diff --git a/contrib/groff/src/include/searchpath.h b/contrib/groff/src/include/searchpath.h
deleted file mode 100644
index 4d89a8d04f1d..000000000000
--- a/contrib/groff/src/include/searchpath.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-class search_path {
- char *dirs;
- unsigned init_len;
-public:
- search_path(const char *envvar, const char *standard,
- int add_home, int add_current);
- ~search_path();
- void command_line_dir(const char *);
- FILE *open_file(const char *, char **);
-};
diff --git a/contrib/groff/src/include/stringclass.h b/contrib/groff/src/include/stringclass.h
deleted file mode 100644
index be3a044fb0b0..000000000000
--- a/contrib/groff/src/include/stringclass.h
+++ /dev/null
@@ -1,195 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <string.h>
-#include <stdio.h>
-#include <assert.h>
-
-// Ensure that the first declaration of functions that are later
-// declared as inline declares them as inline.
-
-class string;
-
-inline string operator+(const string &, const string &);
-inline string operator+(const string &, const char *);
-inline string operator+(const char *, const string &);
-inline string operator+(const string &, char);
-inline string operator+(char, const string &);
-inline int operator==(const string &, const string &);
-inline int operator!=(const string &, const string &);
-
-class string {
-public:
- string();
- string(const string &);
- string(const char *);
- string(const char *, int);
- string(char);
-
- ~string();
-
- string &operator=(const string &);
- string &operator=(const char *);
- string &operator=(char);
-
- string &operator+=(const string &);
- string &operator+=(const char *);
- string &operator+=(char);
- void append(const char *, int);
-
- int length() const;
- int empty() const;
- int operator*() const;
-
- string substring(int i, int n) const;
-
- char &operator[](int);
- char operator[](int) const;
-
- void set_length(int i);
- const char *contents() const;
- int search(char) const;
- char *extract() const;
- void clear();
- void move(string &);
-
- friend string operator+(const string &, const string &);
- friend string operator+(const string &, const char *);
- friend string operator+(const char *, const string &);
- friend string operator+(const string &, char);
- friend string operator+(char, const string &);
-
- friend int operator==(const string &, const string &);
- friend int operator!=(const string &, const string &);
- friend int operator<=(const string &, const string &);
- friend int operator<(const string &, const string &);
- friend int operator>=(const string &, const string &);
- friend int operator>(const string &, const string &);
-
-private:
- char *ptr;
- int len;
- int sz;
-
- string(const char *, int, const char *, int); // for use by operator+
- void grow1();
-};
-
-
-inline char &string::operator[](int i)
-{
- assert(i >= 0 && i < len);
- return ptr[i];
-}
-
-inline char string::operator[](int i) const
-{
- assert(i >= 0 && i < len);
- return ptr[i];
-}
-
-inline int string::length() const
-{
- return len;
-}
-
-inline int string::empty() const
-{
- return len == 0;
-}
-
-inline int string::operator*() const
-{
- return len;
-}
-
-inline const char *string::contents() const
-{
- return ptr;
-}
-
-inline string operator+(const string &s1, const string &s2)
-{
- return string(s1.ptr, s1.len, s2.ptr, s2.len);
-}
-
-inline string operator+(const string &s1, const char *s2)
-{
-#ifdef __GNUG__
- if (s2 == 0)
- return s1;
- else
- return string(s1.ptr, s1.len, s2, strlen(s2));
-#else
- return s2 == 0 ? s1 : string(s1.ptr, s1.len, s2, strlen(s2));
-#endif
-}
-
-inline string operator+(const char *s1, const string &s2)
-{
-#ifdef __GNUG__
- if (s1 == 0)
- return s2;
- else
- return string(s1, strlen(s1), s2.ptr, s2.len);
-#else
- return s1 == 0 ? s2 : string(s1, strlen(s1), s2.ptr, s2.len);
-#endif
-}
-
-inline string operator+(const string &s, char c)
-{
- return string(s.ptr, s.len, &c, 1);
-}
-
-inline string operator+(char c, const string &s)
-{
- return string(&c, 1, s.ptr, s.len);
-}
-
-inline int operator==(const string &s1, const string &s2)
-{
- return (s1.len == s2.len
- && (s1.len == 0 || memcmp(s1.ptr, s2.ptr, s1.len) == 0));
-}
-
-inline int operator!=(const string &s1, const string &s2)
-{
- return (s1.len != s2.len
- || (s1.len != 0 && memcmp(s1.ptr, s2.ptr, s1.len) != 0));
-}
-
-inline string string::substring(int i, int n) const
-{
- assert(i >= 0 && i + n <= len);
- return string(ptr + i, n);
-}
-
-inline string &string::operator+=(char c)
-{
- if (len >= sz)
- grow1();
- ptr[len++] = c;
- return *this;
-}
-
-void put_string(const string &, FILE *);
-
-string as_string(int);
diff --git a/contrib/groff/src/libs/libbib/Makefile.sub b/contrib/groff/src/libs/libbib/Makefile.sub
deleted file mode 100644
index 482f01abcf66..000000000000
--- a/contrib/groff/src/libs/libbib/Makefile.sub
+++ /dev/null
@@ -1,14 +0,0 @@
-LIB=bib
-OBJS=\
- common.o \
- index.o \
- linear.o \
- search.o \
- map.o
-CCSRCS=\
- $(srcdir)/common.cc \
- $(srcdir)/index.cc \
- $(srcdir)/linear.cc \
- $(srcdir)/search.cc
-CSRCS=\
- $(srcdir)/map.c
diff --git a/contrib/groff/src/libs/libbib/common.cc b/contrib/groff/src/libs/libbib/common.cc
deleted file mode 100644
index 4b2bcca23e21..000000000000
--- a/contrib/groff/src/libs/libbib/common.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-unsigned hash(const char *s, int len)
-{
-#if 0
- unsigned h = 0, g;
- while (*s != '\0') {
- h <<= 4;
- h += *s++;
- if ((g = h & 0xf0000000) != 0) {
- h ^= g >> 24;
- h ^= g;
- }
- }
-#endif
- unsigned h = 0;
- while (--len >= 0)
- h = *s++ + 65587*h;
- return h;
-}
-
diff --git a/contrib/groff/src/libs/libbib/index.cc b/contrib/groff/src/libs/libbib/index.cc
deleted file mode 100644
index 55737717dcbe..000000000000
--- a/contrib/groff/src/libs/libbib/index.cc
+++ /dev/null
@@ -1,641 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#include "posix.h"
-#include "lib.h"
-#include "cset.h"
-#include "cmap.h"
-#include "errarg.h"
-#include "error.h"
-
-#include "refid.h"
-#include "search.h"
-#include "index.h"
-#include "defs.h"
-
-#include "nonposix.h"
-
-// Interface to mmap.
-extern "C" {
- void *mapread(int fd, int len);
- int unmap(void *, int len);
-}
-
-#if 0
-const
-#endif
-int minus_one = -1;
-
-int verify_flag = 0;
-
-struct word_list;
-
-class index_search_item : public search_item {
- search_item *out_of_date_files;
- index_header header;
- char *buffer;
- void *map_addr;
- int map_len;
- tag *tags;
- int *table;
- int *lists;
- char *pool;
- char *key_buffer;
- char *filename_buffer;
- int filename_buflen;
- char **common_words_table;
- int common_words_table_size;
- const char *ignore_fields;
- time_t mtime;
-
- const char *do_verify();
- const int *search1(const char **pp, const char *end);
- const int *search(const char *ptr, int length, int **temp_listp);
- const char *munge_filename(const char *);
- void read_common_words_file();
- void add_out_of_date_file(int fd, const char *filename, int fid);
-public:
- index_search_item(const char *, int);
- ~index_search_item();
- int load(int fd);
- search_item_iterator *make_search_item_iterator(const char *);
- int verify();
- void check_files();
- int next_filename_id() const;
- friend class index_search_item_iterator;
-};
-
-class index_search_item_iterator : public search_item_iterator {
- index_search_item *indx;
- search_item_iterator *out_of_date_files_iter;
- search_item *next_out_of_date_file;
- const int *found_list;
- int *temp_list;
- char *buf;
- int buflen;
- linear_searcher searcher;
- char *query;
- int get_tag(int tagno, const linear_searcher &, const char **, int *,
- reference_id *);
-public:
- index_search_item_iterator(index_search_item *, const char *);
- ~index_search_item_iterator();
- int next(const linear_searcher &, const char **, int *, reference_id *);
-};
-
-
-index_search_item::index_search_item(const char *filename, int fid)
-: search_item(filename, fid), out_of_date_files(0), buffer(0), map_addr(0),
- map_len(0), key_buffer(0), filename_buffer(0), filename_buflen(0),
- common_words_table(0)
-{
-}
-
-index_search_item::~index_search_item()
-{
- if (buffer)
- free(buffer);
- if (map_addr) {
- if (unmap(map_addr, map_len) < 0)
- error("unmap: %1", strerror(errno));
- }
- while (out_of_date_files) {
- search_item *tem = out_of_date_files;
- out_of_date_files = out_of_date_files->next;
- delete tem;
- }
- a_delete filename_buffer;
- a_delete key_buffer;
- if (common_words_table) {
- for (int i = 0; i < common_words_table_size; i++)
- a_delete common_words_table[i];
- a_delete common_words_table;
- }
-}
-
-class file_closer {
- int *fdp;
-public:
- file_closer(int &fd) : fdp(&fd) { }
- ~file_closer() { close(*fdp); }
-};
-
-// Tell the compiler that a variable is intentionally unused.
-inline void unused(void *) { }
-
-int index_search_item::load(int fd)
-{
- file_closer fd_closer(fd); // close fd on return
- unused(&fd_closer);
- struct stat sb;
- if (fstat(fd, &sb) < 0) {
- error("can't fstat `%1': %2", name, strerror(errno));
- return 0;
- }
- if (!S_ISREG(sb.st_mode)) {
- error("`%1' is not a regular file", name);
- return 0;
- }
- mtime = sb.st_mtime;
- int size = int(sb.st_size);
- char *addr;
- map_addr = mapread(fd, size);
- if (map_addr) {
- addr = (char *)map_addr;
- map_len = size;
- }
- else {
- addr = buffer = (char *)malloc(size);
- if (buffer == 0) {
- error("can't allocate buffer for `%1'", name);
- return 0;
- }
- char *ptr = buffer;
- int bytes_to_read = size;
- while (bytes_to_read > 0) {
- int nread = read(fd, ptr, bytes_to_read);
- if (nread == 0) {
- error("unexpected EOF on `%1'", name);
- return 0;
- }
- if (nread < 0) {
- error("read error on `%1': %2", name, strerror(errno));
- return 0;
- }
- bytes_to_read -= nread;
- ptr += nread;
- }
- }
- header = *(index_header *)addr;
- if (header.magic != INDEX_MAGIC) {
- error("`%1' is not an index file: wrong magic number", name);
- return 0;
- }
- if (header.version != INDEX_VERSION) {
- error("version number in `%1' is wrong: was %2, should be %3",
- name, header.version, INDEX_VERSION);
- return 0;
- }
- int sz = (header.tags_size * sizeof(tag)
- + header.lists_size * sizeof(int)
- + header.table_size * sizeof(int)
- + header.strings_size
- + sizeof(header));
- if (sz != size) {
- error("size of `%1' is wrong: was %2, should be %3",
- name, size, sz);
- return 0;
- }
- tags = (tag *)(addr + sizeof(header));
- lists = (int *)(tags + header.tags_size);
- table = (int *)(lists + header.lists_size);
- pool = (char *)(table + header.table_size);
- ignore_fields = strchr(strchr(pool, '\0') + 1, '\0') + 1;
- key_buffer = new char[header.truncate];
- read_common_words_file();
- return 1;
-}
-
-const char *index_search_item::do_verify()
-{
- if (tags == 0)
- return "not loaded";
- if (lists[header.lists_size - 1] >= 0)
- return "last list element not negative";
- int i;
- for (i = 0; i < header.table_size; i++) {
- int li = table[i];
- if (li >= header.lists_size)
- return "bad list index";
- if (li >= 0) {
- for (int *ptr = lists + li; *ptr >= 0; ptr++) {
- if (*ptr >= header.tags_size)
- return "bad tag index";
- if (*ptr >= ptr[1] && ptr[1] >= 0)
- return "list not ordered";
- }
- }
- }
- for (i = 0; i < header.tags_size; i++) {
- if (tags[i].filename_index >= header.strings_size)
- return "bad index in tags";
- if (tags[i].length < 0)
- return "bad length in tags";
- if (tags[i].start < 0)
- return "bad start in tags";
- }
- if (pool[header.strings_size - 1] != '\0')
- return "last character in pool not nul";
- return 0;
-}
-
-int index_search_item::verify()
-{
- const char *reason = do_verify();
- if (!reason)
- return 1;
- error("`%1' is bad: %2", name, reason);
- return 0;
-}
-
-int index_search_item::next_filename_id() const
-{
- return filename_id + header.strings_size + 1;
-}
-
-search_item_iterator *index_search_item::make_search_item_iterator(
- const char *query)
-{
- return new index_search_item_iterator(this, query);
-}
-
-search_item *make_index_search_item(const char *filename, int fid)
-{
- char *index_filename = new char[strlen(filename) + sizeof(INDEX_SUFFIX)];
- strcpy(index_filename, filename);
- strcat(index_filename, INDEX_SUFFIX);
- int fd = open(index_filename, O_RDONLY | O_BINARY);
- if (fd < 0)
- return 0;
- index_search_item *item = new index_search_item(index_filename, fid);
- a_delete index_filename;
- if (!item->load(fd)) {
- close(fd);
- delete item;
- return 0;
- }
- else if (verify_flag && !item->verify()) {
- delete item;
- return 0;
- }
- else {
- item->check_files();
- return item;
- }
-}
-
-
-index_search_item_iterator::index_search_item_iterator(index_search_item *ind,
- const char *q)
-: indx(ind), out_of_date_files_iter(0), next_out_of_date_file(0), temp_list(0),
- buf(0), buflen(0),
- searcher(q, strlen(q), ind->ignore_fields, ind->header.truncate),
- query(strsave(q))
-{
- found_list = indx->search(q, strlen(q), &temp_list);
- if (!found_list) {
- found_list = &minus_one;
- warning("all keys would have been discarded in constructing index `%1'",
- indx->name);
- }
-}
-
-index_search_item_iterator::~index_search_item_iterator()
-{
- a_delete temp_list;
- a_delete buf;
- a_delete query;
- delete out_of_date_files_iter;
-}
-
-int index_search_item_iterator::next(const linear_searcher &,
- const char **pp, int *lenp,
- reference_id *ridp)
-{
- if (found_list) {
- for (;;) {
- int tagno = *found_list;
- if (tagno == -1)
- break;
- found_list++;
- if (get_tag(tagno, searcher, pp, lenp, ridp))
- return 1;
- }
- found_list = 0;
- next_out_of_date_file = indx->out_of_date_files;
- }
- while (next_out_of_date_file) {
- if (out_of_date_files_iter == 0)
- out_of_date_files_iter
- = next_out_of_date_file->make_search_item_iterator(query);
- if (out_of_date_files_iter->next(searcher, pp, lenp, ridp))
- return 1;
- delete out_of_date_files_iter;
- out_of_date_files_iter = 0;
- next_out_of_date_file = next_out_of_date_file->next;
- }
- return 0;
-}
-
-int index_search_item_iterator::get_tag(int tagno,
- const linear_searcher &searcher,
- const char **pp, int *lenp,
- reference_id *ridp)
-{
- if (tagno < 0 || tagno >= indx->header.tags_size) {
- error("bad tag number");
- return 0;
- }
- tag *tp = indx->tags + tagno;
- const char *filename = indx->munge_filename(indx->pool + tp->filename_index);
- int fd = open(filename, O_RDONLY | O_BINARY);
- if (fd < 0) {
- error("can't open `%1': %2", filename, strerror(errno));
- return 0;
- }
- struct stat sb;
- if (fstat(fd, &sb) < 0) {
- error("can't fstat: %1", strerror(errno));
- close(fd);
- return 0;
- }
- time_t mtime = sb.st_mtime;
- if (mtime > indx->mtime) {
- indx->add_out_of_date_file(fd, filename,
- indx->filename_id + tp->filename_index);
- return 0;
- }
- int res = 0;
- FILE *fp = fdopen(fd, FOPEN_RB);
- if (!fp) {
- error("fdopen failed");
- close(fd);
- return 0;
- }
- if (tp->start != 0 && fseek(fp, long(tp->start), 0) < 0)
- error("can't seek on `%1': %2", filename, strerror(errno));
- else {
- int length = tp->length;
- int err = 0;
- if (length == 0) {
- struct stat sb;
- if (fstat(fileno(fp), &sb) < 0) {
- error("can't stat `%1': %2", filename, strerror(errno));
- err = 1;
- }
- else if (!S_ISREG(sb.st_mode)) {
- error("`%1' is not a regular file", filename);
- err = 1;
- }
- else
- length = int(sb.st_size);
- }
- if (!err) {
- if (length + 2 > buflen) {
- a_delete buf;
- buflen = length + 2;
- buf = new char[buflen];
- }
- if (fread(buf + 1, 1, length, fp) != length)
- error("fread on `%1' failed: %2", filename, strerror(errno));
- else {
- buf[0] = '\n';
- // Remove the CR characters from CRLF pairs.
- int sidx = 1, didx = 1;
- for ( ; sidx < length + 1; sidx++, didx++)
- {
- if (buf[sidx] == '\r')
- {
- if (buf[++sidx] != '\n')
- buf[didx++] = '\r';
- else
- length--;
- }
- if (sidx != didx)
- buf[didx] = buf[sidx];
- }
- buf[length + 1] = '\n';
- res = searcher.search(buf + 1, buf + 2 + length, pp, lenp);
- if (res && ridp)
- *ridp = reference_id(indx->filename_id + tp->filename_index,
- tp->start);
- }
- }
- }
- fclose(fp);
- return res;
-}
-
-const char *index_search_item::munge_filename(const char *filename)
-{
- if (IS_ABSOLUTE(filename))
- return filename;
- const char *cwd = pool;
- int need_slash = (cwd[0] != 0
- && strchr(DIR_SEPS, strchr(cwd, '\0')[-1]) == 0);
- int len = strlen(cwd) + strlen(filename) + need_slash + 1;
- if (len > filename_buflen) {
- a_delete filename_buffer;
- filename_buflen = len;
- filename_buffer = new char[len];
- }
- strcpy(filename_buffer, cwd);
- if (need_slash)
- strcat(filename_buffer, "/");
- strcat(filename_buffer, filename);
- return filename_buffer;
-}
-
-const int *index_search_item::search1(const char **pp, const char *end)
-{
- while (*pp < end && !csalnum(**pp))
- *pp += 1;
- if (*pp >= end)
- return 0;
- const char *start = *pp;
- while (*pp < end && csalnum(**pp))
- *pp += 1;
- int len = *pp - start;
- if (len < header.shortest)
- return 0;
- if (len > header.truncate)
- len = header.truncate;
- int is_number = 1;
- for (int i = 0; i < len; i++)
- if (csdigit(start[i]))
- key_buffer[i] = start[i];
- else {
- key_buffer[i] = cmlower(start[i]);
- is_number = 0;
- }
- if (is_number && !(len == 4 && start[0] == '1' && start[1] == '9'))
- return 0;
- unsigned hc = hash(key_buffer, len);
- if (common_words_table) {
- for (int h = hc % common_words_table_size;
- common_words_table[h];
- --h) {
- if (strlen(common_words_table[h]) == len
- && memcmp(common_words_table[h], key_buffer, len) == 0)
- return 0;
- if (h == 0)
- h = common_words_table_size;
- }
- }
- int li = table[int(hc % header.table_size)];
- return li < 0 ? &minus_one : lists + li;
-}
-
-static void merge(int *result, const int *s1, const int *s2)
-{
- for (; *s1 >= 0; s1++) {
- while (*s2 >= 0 && *s2 < *s1)
- s2++;
- if (*s2 == *s1)
- *result++ = *s2;
- }
- *result++ = -1;
-}
-
-const int *index_search_item::search(const char *ptr, int length,
- int **temp_listp)
-{
- const char *end = ptr + length;
- if (*temp_listp) {
- a_delete *temp_listp;
- *temp_listp = 0;
- }
- const int *first_list = 0;
- while (ptr < end && (first_list = search1(&ptr, end)) == 0)
- ;
- if (!first_list)
- return 0;
- if (*first_list < 0)
- return first_list;
- const int *second_list = 0;
- while (ptr < end && (second_list = search1(&ptr, end)) == 0)
- ;
- if (!second_list)
- return first_list;
- if (*second_list < 0)
- return second_list;
- const int *p;
- for (p = first_list; *p >= 0; p++)
- ;
- int len = p - first_list;
- for (p = second_list; *p >= 0; p++)
- ;
- if (p - second_list < len)
- len = p - second_list;
- int *matches = new int[len + 1];
- merge(matches, first_list, second_list);
- while (ptr < end) {
- const int *list = search1(&ptr, end);
- if (list != 0) {
- if (*list < 0) {
- a_delete matches;
- return list;
- }
- merge(matches, matches, list);
- if (*matches < 0) {
- a_delete matches;
- return &minus_one;
- }
- }
- }
- *temp_listp = matches;
- return matches;
-}
-
-void index_search_item::read_common_words_file()
-{
- if (header.common <= 0)
- return;
- const char *common_words_file = munge_filename(strchr(pool, '\0') + 1);
- errno = 0;
- FILE *fp = fopen(common_words_file, "r");
- if (!fp) {
- error("can't open `%1': %2", common_words_file, strerror(errno));
- return;
- }
- common_words_table_size = 2*header.common + 1;
- while (!is_prime(common_words_table_size))
- common_words_table_size++;
- common_words_table = new char *[common_words_table_size];
- for (int i = 0; i < common_words_table_size; i++)
- common_words_table[i] = 0;
- int count = 0;
- int key_len = 0;
- for (;;) {
- int c = getc(fp);
- while (c != EOF && !csalnum(c))
- c = getc(fp);
- if (c == EOF)
- break;
- do {
- if (key_len < header.truncate)
- key_buffer[key_len++] = cmlower(c);
- c = getc(fp);
- } while (c != EOF && csalnum(c));
- if (key_len >= header.shortest) {
- int h = hash(key_buffer, key_len) % common_words_table_size;
- while (common_words_table[h]) {
- if (h == 0)
- h = common_words_table_size;
- --h;
- }
- common_words_table[h] = new char[key_len + 1];
- memcpy(common_words_table[h], key_buffer, key_len);
- common_words_table[h][key_len] = '\0';
- }
- if (++count >= header.common)
- break;
- key_len = 0;
- if (c == EOF)
- break;
- }
- fclose(fp);
-}
-
-void index_search_item::add_out_of_date_file(int fd, const char *filename,
- int fid)
-{
- search_item **pp;
- for (pp = &out_of_date_files; *pp; pp = &(*pp)->next)
- if ((*pp)->is_named(filename))
- return;
- *pp = make_linear_search_item(fd, filename, fid);
- warning("`%1' modified since `%2' created", filename, name);
-}
-
-void index_search_item::check_files()
-{
- const char *pool_end = pool + header.strings_size;
- for (const char *ptr = strchr(ignore_fields, '\0') + 1;
- ptr < pool_end;
- ptr = strchr(ptr, '\0') + 1) {
- const char *path = munge_filename(ptr);
- struct stat sb;
- if (stat(path, &sb) < 0)
- error("can't stat `%1': %2", path, strerror(errno));
- else if (sb.st_mtime > mtime) {
- int fd = open(path, O_RDONLY | O_BINARY);
- if (fd < 0)
- error("can't open `%1': %2", path, strerror(errno));
- else
- add_out_of_date_file(fd, path, filename_id + (ptr - pool));
- }
- }
-}
diff --git a/contrib/groff/src/libs/libbib/linear.cc b/contrib/groff/src/libs/libbib/linear.cc
deleted file mode 100644
index a8c2a553735d..000000000000
--- a/contrib/groff/src/libs/libbib/linear.cc
+++ /dev/null
@@ -1,503 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <errno.h>
-
-#include "posix.h"
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "cset.h"
-#include "cmap.h"
-#include "nonposix.h"
-
-#include "refid.h"
-#include "search.h"
-
-class file_buffer {
- char *buffer;
- char *bufend;
-public:
- file_buffer();
- ~file_buffer();
- int load(int fd, const char *filename);
- const char *get_start() const;
- const char *get_end() const;
-};
-
-typedef unsigned char uchar;
-
-static uchar map[256];
-static uchar inv_map[256][3];
-
-struct map_init {
- map_init();
-};
-
-static map_init the_map_init;
-
-map_init::map_init()
-{
- int i;
- for (i = 0; i < 256; i++)
- map[i] = csalnum(i) ? cmlower(i) : '\0';
- for (i = 0; i < 256; i++) {
- if (cslower(i)) {
- inv_map[i][0] = i;
- inv_map[i][1] = cmupper(i);
- inv_map[i][2] = '\0';
- }
- else if (csdigit(i)) {
- inv_map[i][0] = i;
- inv_map[i][1] = 0;
- }
- else
- inv_map[i][0] = '\0';
- }
-}
-
-
-class bmpattern {
- char *pat;
- int len;
- int delta[256];
-public:
- bmpattern(const char *pattern, int pattern_length);
- ~bmpattern();
- const char *search(const char *p, const char *end) const;
- int length() const;
-};
-
-bmpattern::bmpattern(const char *pattern, int pattern_length)
-: len(pattern_length)
-{
- pat = new char[len];
- int i;
- for (i = 0; i < len; i++)
- pat[i] = map[uchar(pattern[i])];
- for (i = 0; i < 256; i++)
- delta[i] = len;
- for (i = 0; i < len; i++)
- for (const unsigned char *inv = inv_map[uchar(pat[i])]; *inv; inv++)
- delta[*inv] = len - i - 1;
-}
-
-const char *bmpattern::search(const char *buf, const char *end) const
-{
- int buflen = end - buf;
- if (len > buflen)
- return 0;
- const char *strend;
- if (buflen > len*4)
- strend = end - len*4;
- else
- strend = buf;
- const char *k = buf + len - 1;
- const int *del = delta;
- const char *pattern = pat;
- for (;;) {
- while (k < strend) {
- int t = del[uchar(*k)];
- if (!t)
- break;
- k += t;
- k += del[uchar(*k)];
- k += del[uchar(*k)];
- }
- while (k < end && del[uchar(*k)] != 0)
- k++;
- if (k == end)
- break;
- int j = len - 1;
- const char *s = k;
- for (;;) {
- if (j == 0)
- return s;
- if (map[uchar(*--s)] != uchar(pattern[--j]))
- break;
- }
- k++;
- }
- return 0;
-}
-
-bmpattern::~bmpattern()
-{
- a_delete pat;
-}
-
-inline int bmpattern::length() const
-{
- return len;
-}
-
-
-static const char *find_end(const char *bufend, const char *p);
-
-const char *linear_searcher::search_and_check(const bmpattern *key,
- const char *buf, const char *bufend, const char **start) const
-{
- assert(buf[-1] == '\n');
- assert(bufend[-1] == '\n');
- const char *ptr = buf;
- for (;;) {
- const char *found = key->search(ptr, bufend);
- if (!found)
- break;
- if (check_match(buf, bufend, found, key->length(), &ptr, start))
- return found;
- }
- return 0;
-}
-
-static const char *skip_field(const char *end, const char *p)
-{
- for (;;)
- if (*p++ == '\n') {
- if (p == end || *p == '%')
- break;
- const char *q;
- for (q = p; *q == ' ' || *q == '\t'; q++)
- ;
- if (*q == '\n')
- break;
- p = q + 1;
- }
- return p;
-}
-
-static const char *find_end(const char *bufend, const char *p)
-{
- for (;;)
- if (*p++ == '\n') {
- if (p == bufend)
- break;
- const char *q;
- for (q = p; *q == ' ' || *q == '\t'; q++)
- ;
- if (*q == '\n')
- break;
- p = q + 1;
- }
- return p;
-}
-
-
-int linear_searcher::check_match(const char *buf, const char *bufend,
- const char *match, int matchlen,
- const char **cont, const char **start) const
-{
- *cont = match + 1;
- // The user is required to supply only the first truncate_len characters
- // of the key. If truncate_len <= 0, he must supply all the key.
- if ((truncate_len <= 0 || matchlen < truncate_len)
- && map[uchar(match[matchlen])] != '\0')
- return 0;
-
- // The character before the match must not be an alphanumeric
- // character (unless the alphanumeric character follows one or two
- // percent characters at the beginning of the line), nor must it be
- // a percent character at the beginning of a line, nor a percent
- // character following a percent character at the beginning of a
- // line.
-
- switch (match - buf) {
- case 0:
- break;
- case 1:
- if (match[-1] == '%' || map[uchar(match[-1])] != '\0')
- return 0;
- break;
- case 2:
- if (map[uchar(match[-1])] != '\0' && match[-2] != '%')
- return 0;
- if (match[-1] == '%'
- && (match[-2] == '\n' || match[-2] == '%'))
- return 0;
- break;
- default:
- if (map[uchar(match[-1])] != '\0'
- && !(match[-2] == '%'
- && (match[-3] == '\n'
- || (match[-3] == '%' && match[-4] == '\n'))))
- return 0;
- if (match[-1] == '%'
- && (match[-2] == '\n'
- || (match[-2] == '%' && match[-3] == '\n')))
- return 0;
- }
-
- const char *p = match;
- int had_percent = 0;
- for (;;) {
- if (*p == '\n') {
- if (!had_percent && p[1] == '%') {
- if (p[2] != '\0' && strchr(ignore_fields, p[2]) != 0) {
- *cont = skip_field(bufend, match + matchlen);
- return 0;
- }
- if (!start)
- break;
- had_percent = 1;
- }
- if (p <= buf) {
- if (start)
- *start = p + 1;
- return 1;
- }
- const char *q;
- for (q = p - 1; *q == ' ' || *q == '\t'; q--)
- ;
- if (*q == '\n') {
- if (start)
- *start = p + 1;
- break;
- }
- p = q;
- }
- p--;
- }
- return 1;
-}
-
-file_buffer::file_buffer()
-: buffer(0), bufend(0)
-{
-}
-
-file_buffer::~file_buffer()
-{
- a_delete buffer;
-}
-
-const char *file_buffer::get_start() const
-{
- return buffer ? buffer + 4 : 0;
-}
-
-const char *file_buffer::get_end() const
-{
- return bufend;
-}
-
-int file_buffer::load(int fd, const char *filename)
-{
- struct stat sb;
- if (fstat(fd, &sb) < 0)
- error("can't fstat `%1': %2", filename, strerror(errno));
- else if (!S_ISREG(sb.st_mode))
- error("`%1' is not a regular file", filename);
- else {
- // We need one character extra at the beginning for an additional newline
- // used as a sentinel. We get 4 instead so that the read buffer will be
- // word-aligned. This seems to make the read slightly faster. We also
- // need one character at the end also for an additional newline used as a
- // sentinel.
- int size = int(sb.st_size);
- buffer = new char[size + 4 + 1];
- int nread = read(fd, buffer + 4, size);
- if (nread < 0)
- error("error reading `%1': %2", filename, strerror(errno));
- else if (nread != size)
- error("size of `%1' decreased", filename);
- else {
- char c;
- nread = read(fd, &c, 1);
- if (nread != 0)
- error("size of `%1' increased", filename);
- else if (memchr(buffer + 4, '\0', size < 1024 ? size : 1024) != 0)
- error("database `%1' is a binary file", filename);
- else {
- close(fd);
- buffer[3] = '\n';
- int sidx = 4, didx = 4;
- for ( ; sidx < size + 4; sidx++, didx++)
- {
- if (buffer[sidx] == '\r')
- {
- if (buffer[++sidx] != '\n')
- buffer[didx++] = '\r';
- else
- size--;
- }
- if (sidx != didx)
- buffer[didx] = buffer[sidx];
- }
- bufend = buffer + 4 + size;
- if (bufend[-1] != '\n')
- *bufend++ = '\n';
- return 1;
- }
- }
- a_delete buffer;
- buffer = 0;
- }
- close(fd);
- return 0;
-}
-
-linear_searcher::linear_searcher(const char *query, int query_len,
- const char *ign, int trunc)
-: ignore_fields(ign), truncate_len(trunc), keys(0), nkeys(0)
-{
- const char *query_end = query + query_len;
- int nk = 0;
- const char *p;
- for (p = query; p < query_end; p++)
- if (map[uchar(*p)] != '\0'
- && (p[1] == '\0' || map[uchar(p[1])] == '\0'))
- nk++;
- if (nk == 0)
- return;
- keys = new bmpattern*[nk];
- p = query;
- for (;;) {
- while (p < query_end && map[uchar(*p)] == '\0')
- p++;
- if (p == query_end)
- break;
- const char *start = p;
- while (p < query_end && map[uchar(*p)] != '\0')
- p++;
- keys[nkeys++] = new bmpattern(start, p - start);
- }
- assert(nkeys <= nk);
- if (nkeys == 0) {
- a_delete keys;
- keys = 0;
- }
-}
-
-linear_searcher::~linear_searcher()
-{
- for (int i = 0; i < nkeys; i++)
- delete keys[i];
- a_delete keys;
-}
-
-int linear_searcher::search(const char *buffer, const char *bufend,
- const char **startp, int *lengthp) const
-{
- assert(bufend - buffer > 0);
- assert(buffer[-1] == '\n');
- assert(bufend[-1] == '\n');
- if (nkeys == 0)
- return 0;
- for (;;) {
- const char *refstart;
- const char *found = search_and_check(keys[0], buffer, bufend, &refstart);
- if (!found)
- break;
- const char *refend = find_end(bufend, found + keys[0]->length());
- int i;
- for (i = 1; i < nkeys; i++)
- if (!search_and_check(keys[i], refstart, refend))
- break;
- if (i >= nkeys) {
- *startp = refstart;
- *lengthp = refend - refstart;
- return 1;
- }
- buffer = refend;
- }
- return 0;
-}
-
-class linear_search_item : public search_item {
- file_buffer fbuf;
-public:
- linear_search_item(const char *filename, int fid);
- ~linear_search_item();
- int load(int fd);
- search_item_iterator *make_search_item_iterator(const char *);
- friend class linear_search_item_iterator;
-};
-
-class linear_search_item_iterator : public search_item_iterator {
- linear_search_item *lsi;
- int pos;
-public:
- linear_search_item_iterator(linear_search_item *, const char *query);
- ~linear_search_item_iterator();
- int next(const linear_searcher &, const char **ptr, int *lenp,
- reference_id *ridp);
-};
-
-search_item *make_linear_search_item(int fd, const char *filename, int fid)
-{
- linear_search_item *item = new linear_search_item(filename, fid);
- if (!item->load(fd)) {
- delete item;
- return 0;
- }
- else
- return item;
-}
-
-linear_search_item::linear_search_item(const char *filename, int fid)
-: search_item(filename, fid)
-{
-}
-
-linear_search_item::~linear_search_item()
-{
-}
-
-int linear_search_item::load(int fd)
-{
- return fbuf.load(fd, name);
-}
-
-search_item_iterator *linear_search_item::make_search_item_iterator(
- const char *query)
-{
- return new linear_search_item_iterator(this, query);
-}
-
-linear_search_item_iterator::linear_search_item_iterator(
- linear_search_item *p, const char *)
-: lsi(p), pos(0)
-{
-}
-
-linear_search_item_iterator::~linear_search_item_iterator()
-{
-}
-
-int linear_search_item_iterator::next(const linear_searcher &searcher,
- const char **startp, int *lengthp,
- reference_id *ridp)
-{
- const char *bufstart = lsi->fbuf.get_start();
- const char *bufend = lsi->fbuf.get_end();
- const char *ptr = bufstart + pos;
- if (ptr < bufend && searcher.search(ptr, bufend, startp, lengthp)) {
- pos = *startp + *lengthp - bufstart;
- if (ridp)
- *ridp = reference_id(lsi->filename_id, *startp - bufstart);
- return 1;
- }
- else
- return 0;
-}
diff --git a/contrib/groff/src/libs/libbib/map.c b/contrib/groff/src/libs/libbib/map.c
deleted file mode 100644
index ee5d0087ef1a..000000000000
--- a/contrib/groff/src/libs/libbib/map.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_MMAP
-
-#include <sys/types.h>
-#include <sys/mman.h>
-
-/* The Net-2 man pages says that a MAP_FILE flag is required. */
-#ifndef MAP_FILE
-#define MAP_FILE 0
-#endif
-
-char *mapread(fd, nbytes)
- int fd;
- int nbytes;
-{
- char *p = (char *)mmap((caddr_t)0, (size_t)nbytes, PROT_READ,
- MAP_FILE|MAP_PRIVATE, fd, (off_t)0);
- if (p == (char *)-1)
- return 0;
- /* mmap() shouldn't return 0 since MAP_FIXED wasn't specified. */
- if (p == 0)
- abort();
- return p;
-}
-
-int unmap(p, len)
- char *p;
- int len;
-{
- return munmap((caddr_t)p, len);
-}
-
-#else /* not HAVE_MMAP */
-
-#include <errno.h>
-
-char *mapread(fd, nbytes)
- int fd;
- int nbytes;
-{
- errno = ENODEV;
- return 0;
-}
-
-int unmap(p, len)
- char *p;
- int len;
-{
- errno = EINVAL;
- return -1;
-}
-
-#endif /* not HAVE_MMAP */
diff --git a/contrib/groff/src/libs/libbib/search.cc b/contrib/groff/src/libs/libbib/search.cc
deleted file mode 100644
index 1e027c609711..000000000000
--- a/contrib/groff/src/libs/libbib/search.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#include "posix.h"
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "nonposix.h"
-
-#include "refid.h"
-#include "search.h"
-
-int linear_truncate_len = 6;
-const char *linear_ignore_fields = "XYZ";
-
-search_list::search_list()
-: list(0), niterators(0), next_fid(1)
-{
-}
-
-search_list::~search_list()
-{
- assert(niterators == 0);
- while (list) {
- search_item *tem = list->next;
- delete list;
- list = tem;
- }
-}
-
-void search_list::add_file(const char *filename, int silent)
-{
- search_item *p = make_index_search_item(filename, next_fid);
- if (!p) {
- int fd = open(filename, O_RDONLY | O_BINARY);
- if (fd < 0) {
- if (!silent)
- error("can't open `%1': %2", filename, strerror(errno));
- }
- else
- p = make_linear_search_item(fd, filename, next_fid);
- }
- if (p) {
- search_item **pp;
- for (pp = &list; *pp; pp = &(*pp)->next)
- ;
- *pp = p;
- next_fid = p->next_filename_id();
- }
-}
-
-int search_list::nfiles() const
-{
- int n = 0;
- for (search_item *ptr = list; ptr; ptr = ptr->next)
- n++;
- return n;
-}
-
-search_list_iterator::search_list_iterator(search_list *p, const char *q)
-: list(p), ptr(p->list), iter(0), query(strsave(q)),
- searcher(q, strlen(q), linear_ignore_fields, linear_truncate_len)
-{
- list->niterators += 1;
-}
-
-search_list_iterator::~search_list_iterator()
-{
- list->niterators -= 1;
- a_delete query;
- delete iter;
-}
-
-int search_list_iterator::next(const char **pp, int *lenp, reference_id *ridp)
-{
- while (ptr) {
- if (iter == 0)
- iter = ptr->make_search_item_iterator(query);
- if (iter->next(searcher, pp, lenp, ridp))
- return 1;
- delete iter;
- iter = 0;
- ptr = ptr->next;
- }
- return 0;
-}
-
-search_item::search_item(const char *nm, int fid)
-: name(strsave(nm)), filename_id(fid), next(0)
-{
-}
-
-search_item::~search_item()
-{
- a_delete name;
-}
-
-int search_item::is_named(const char *nm) const
-{
- return strcmp(name, nm) == 0;
-}
-
-int search_item::next_filename_id() const
-{
- return filename_id + 1;
-}
-
-search_item_iterator::~search_item_iterator()
-{
-}
diff --git a/contrib/groff/src/libs/libdriver/Makefile.sub b/contrib/groff/src/libs/libdriver/Makefile.sub
deleted file mode 100644
index d50f060bd917..000000000000
--- a/contrib/groff/src/libs/libdriver/Makefile.sub
+++ /dev/null
@@ -1,7 +0,0 @@
-LIB=driver
-OBJS=\
- input.o \
- printer.o
-CCSRCS=\
- $(srcdir)/input.cc \
- $(srcdir)/printer.cc
diff --git a/contrib/groff/src/libs/libdriver/input.cc b/contrib/groff/src/libs/libdriver/input.cc
deleted file mode 100644
index e19841c1f778..000000000000
--- a/contrib/groff/src/libs/libdriver/input.cc
+++ /dev/null
@@ -1,504 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "driver.h"
-#include "device.h"
-#include "cset.h"
-
-const char *current_filename=0;
-int current_lineno;
-const char *device = 0;
-FILE *current_file;
-
-int get_integer(); // don't read the newline
-int possibly_get_integer(int *);
-char *get_string(int is_long = 0);
-void skip_line();
-
-struct environment_list {
- environment env;
- environment_list *next;
-
- environment_list(const environment &, environment_list *);
-};
-
-environment_list::environment_list(const environment &e, environment_list *p)
-: env(e), next(p)
-{
-}
-
-inline int get_char()
-{
- return getc(current_file);
-}
-
-/*
- * remember_filename - is needed as get_string might overwrite the
- * filename eventually.
- */
-
-void remember_filename(const char *filename)
-{
- if (current_filename != 0) {
- free((char *)current_filename);
- }
- if (strcmp(filename, "-") == 0) {
- filename = "<standard input>";
- }
- current_filename = (const char *)malloc(strlen(filename) + 1);
- if (current_filename == 0) {
- fatal("can't malloc space for filename");
- }
- strcpy((char *)current_filename, (char *)filename);
-}
-
-void do_file(const char *filename)
-{
- int npages = 0;
- if (filename[0] == '-' && filename[1] == '\0') {
- remember_filename(filename);
- current_file = stdin;
- }
- else {
- errno = 0;
- current_file = fopen(filename, "r");
- if (current_file == 0) {
- error("can't open `%1'", filename);
- return;
- }
- remember_filename(filename);
- }
- environment env;
- env.vpos = -1;
- env.hpos = -1;
- env.fontno = -1;
- env.height = 0;
- env.slant = 0;
- environment_list *env_list = 0;
- current_lineno = 1;
- int command;
- char *s;
- command = get_char();
- if (command == EOF)
- return;
- if (command != 'x')
- fatal("the first command must be `x T'");
- s = get_string();
- if (s[0] != 'T')
- fatal("the first command must be `x T'");
- char *dev = get_string();
- if (pr == 0) {
- device = strsave(dev);
- if (!font::load_desc())
- fatal("sorry, I can't continue");
- }
- else {
- if (device == 0 || strcmp(device, dev) != 0)
- fatal("all files must use the same device");
- }
- skip_line();
- env.size = 10*font::sizescale;
- command = get_char();
- if (command != 'x')
- fatal("the second command must be `x res'");
- s = get_string();
- if (s[0] != 'r')
- fatal("the second command must be `x res'");
- int n = get_integer();
- if (n != font::res)
- fatal("resolution does not match");
- n = get_integer();
- if (n != font::hor)
- fatal("horizontal resolution does not match");
- n = get_integer();
- if (n != font::vert)
- fatal("vertical resolution does not match");
- skip_line();
- command = get_char();
- if (command != 'x')
- fatal("the third command must be `x init'");
- s = get_string();
- if (s[0] != 'i')
- fatal("the third command must be `x init'");
- skip_line();
- if (pr == 0)
- pr = make_printer();
- while ((command = get_char()) != EOF) {
- switch (command) {
- case 's':
- env.size = get_integer();
- if (env.height == env.size)
- env.height = 0;
- break;
- case 'f':
- env.fontno = get_integer();
- break;
- case 'F':
- remember_filename(get_string());
- break;
- case 'C':
- {
- if (npages == 0)
- fatal("`C' command illegal before first `p' command");
- char *s = get_string();
- pr->set_special_char(s, &env);
- }
- break;
- case 'N':
- {
- if (npages == 0)
- fatal("`N' command illegal before first `p' command");
- pr->set_numbered_char(get_integer(), &env);
- }
- break;
- case 'H':
- env.hpos = get_integer();
- break;
- case 'h':
- env.hpos += get_integer();
- break;
- case 'V':
- env.vpos = get_integer();
- break;
- case 'v':
- env.vpos += get_integer();
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- int c = get_char();
- if (!csdigit(c))
- fatal("digit expected");
- env.hpos += (command - '0')*10 + (c - '0');
- }
- // fall through
- case 'c':
- {
- if (npages == 0)
- fatal("`c' command illegal before first `p' command");
- int c = get_char();
- if (c == EOF)
- fatal("missing argument to `c' command");
- pr->set_ascii_char(c, &env);
- }
- break;
- case 'n':
- if (npages == 0)
- fatal("`n' command illegal before first `p' command");
- pr->end_of_line();
- (void)get_integer();
- (void)get_integer();
- break;
- case 'w':
- case ' ':
- break;
- case '\n':
- current_lineno++;
- break;
- case 'p':
- if (npages)
- pr->end_page(env.vpos);
- npages++;
- pr->begin_page(get_integer());
- env.vpos = 0;
- break;
- case '{':
- env_list = new environment_list(env, env_list);
- break;
- case '}':
- if (!env_list) {
- fatal("can't pop");
- }
- else {
- env = env_list->env;
- environment_list *tem = env_list;
- env_list = env_list->next;
- delete tem;
- }
- break;
- case 'u':
- {
- if (npages == 0)
- fatal("`u' command illegal before first `p' command");
- int kern = get_integer();
- int c = get_char();
- while (c == ' ')
- c = get_char();
- while (c != EOF) {
- if (c == '\n') {
- current_lineno++;
- break;
- }
- int w;
- pr->set_ascii_char(c, &env, &w);
- env.hpos += w + kern;
- c = get_char();
- if (c == ' ')
- break;
- }
- }
- break;
- case 't':
- {
- if (npages == 0)
- fatal("`t' command illegal before first `p' command");
- int c;
- while ((c = get_char()) != EOF && c != ' ') {
- if (c == '\n') {
- current_lineno++;
- break;
- }
- int w;
- pr->set_ascii_char(c, &env, &w);
- env.hpos += w;
- }
- }
- break;
- case '#':
- skip_line();
- break;
- case 'D':
- {
- if (npages == 0)
- fatal("`D' command illegal before first `p' command");
- int c;
- while ((c = get_char()) == ' ')
- ;
- int n;
- int *p = 0;
- int szp = 0;
- int np;
- for (np = 0; possibly_get_integer(&n); np++) {
- if (np >= szp) {
- if (szp == 0) {
- szp = 16;
- p = new int[szp];
- }
- else {
- int *oldp = p;
- p = new int[szp*2];
- memcpy(p, oldp, szp*sizeof(int));
- szp *= 2;
- a_delete oldp;
- }
- }
- p[np] = n;
- }
- pr->draw(c, p, np, &env);
- if (c == 'e') {
- if (np > 0)
- env.hpos += p[0];
- }
- else if (c == 'f' || c == 't')
- ;
- else {
- int i;
- for (i = 0; i < np/2; i++) {
- env.hpos += p[i*2];
- env.vpos += p[i*2 + 1];
- }
- // there might be an odd number of characters
- if (i*2 < np)
- env.hpos += p[i*2];
- }
- a_delete p;
- skip_line();
- }
- break;
- case 'x':
- {
- char *s = get_string();
- int suppress_skip = 0;
- switch (s[0]) {
- case 'i':
- error("duplicate `x init' command");
- break;
- case 'T':
- error("duplicate `x T' command");
- break;
- case 'r':
- error("duplicate `x res' command");
- break;
- case 'p':
- break;
- case 's':
- break;
- case 't':
- break;
- case 'f':
- {
- int n = get_integer();
- char *name = get_string();
- pr->load_font(n, name);
- }
- break;
- case 'H':
- env.height = get_integer();
- if (env.height == env.size)
- env.height = 0;
- break;
- case 'S':
- env.slant = get_integer();
- break;
- case 'X':
- if (npages == 0)
- fatal("`x X' command illegal before first `p' command");
- pr->special(get_string(1), &env);
- suppress_skip = 1;
- break;
- case 'u':
- // .cu
- pr->special(get_string(), &env, 'u');
- break;
- default:
- error("unrecognised x command `%1'", s);
- }
- if (!suppress_skip)
- skip_line();
- }
- break;
- default:
- error("unrecognised command code %1", int(command));
- skip_line();
- break;
- }
- }
- if (npages)
- pr->end_page(env.vpos);
-}
-
-int get_integer()
-{
- int c = get_char();
- while (c == ' ')
- c = get_char();
- int neg = 0;
- if (c == '-') {
- neg = 1;
- c = get_char();
- }
- if (!csdigit(c))
- fatal("integer expected");
- int total = 0;
- do {
- total = total*10;
- if (neg)
- total -= c - '0';
- else
- total += c - '0';
- c = get_char();
- } while (csdigit(c));
- if (c != EOF)
- ungetc(c, current_file);
- return total;
-}
-
-int possibly_get_integer(int *res)
-{
- int c = get_char();
- while (c == ' ')
- c = get_char();
- int neg = 0;
- if (c == '-') {
- neg = 1;
- c = get_char();
- }
- if (!csdigit(c)) {
- if (c != EOF)
- ungetc(c, current_file);
- return 0;
- }
- int total = 0;
- do {
- total = total*10;
- if (neg)
- total -= c - '0';
- else
- total += c - '0';
- c = get_char();
- } while (csdigit(c));
- if (c != EOF)
- ungetc(c, current_file);
- *res = total;
- return 1;
-}
-
-
-char *get_string(int is_long)
-{
- static char *buf;
- static int buf_size;
- int c = get_char();
- while (c == ' ')
- c = get_char();
- for (int i = 0;; i++) {
- if (i >= buf_size) {
- if (buf_size == 0) {
- buf_size = 16;
- buf = new char[buf_size];
- }
- else {
- char *old_buf = buf;
- int old_size = buf_size;
- buf_size *= 2;
- buf = new char[buf_size];
- memcpy(buf, old_buf, old_size);
- a_delete old_buf;
- }
- }
- if ((!is_long && (c == ' ' || c == '\n')) || c == EOF) {
- buf[i] = '\0';
- break;
- }
- if (is_long && c == '\n') {
- current_lineno++;
- c = get_char();
- if (c == '+')
- c = '\n';
- else {
- buf[i] = '\0';
- break;
- }
- }
- buf[i] = c;
- c = get_char();
- }
- if (c != EOF)
- ungetc(c, current_file);
- return buf;
-}
-
-void skip_line()
-{
- int c;
- while ((c = get_char()) != EOF)
- if (c == '\n') {
- current_lineno++;
- break;
- }
-}
diff --git a/contrib/groff/src/libs/libdriver/printer.cc b/contrib/groff/src/libs/libdriver/printer.cc
deleted file mode 100644
index 4d66f7ba2307..000000000000
--- a/contrib/groff/src/libs/libdriver/printer.cc
+++ /dev/null
@@ -1,271 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "driver.h"
-
-printer *pr = 0;
-
-font_pointer_list::font_pointer_list(font *f, font_pointer_list *fp)
-: p(f), next(fp)
-{
-}
-
-printer::printer()
-: font_list(0), font_table(0), nfonts(0)
-{
-}
-
-printer::~printer()
-{
- a_delete font_table;
- while (font_list) {
- font_pointer_list *tem = font_list;
- font_list = font_list->next;
- delete tem->p;
- delete tem;
- }
- if (ferror(stdout) || fflush(stdout) < 0)
- fatal("output error");
-}
-
-void printer::load_font(int n, const char *nm)
-{
- assert(n >= 0);
- if (n >= nfonts) {
- if (nfonts == 0) {
- nfonts = 10;
- if (nfonts <= n)
- nfonts = n + 1;
- font_table = new font *[nfonts];
- for (int i = 0; i < nfonts; i++)
- font_table[i] = 0;
- }
- else {
- font **old_font_table = font_table;
- int old_nfonts = nfonts;
- nfonts *= 2;
- if (n >= nfonts)
- nfonts = n + 1;
- font_table = new font *[nfonts];
- int i;
- for (i = 0; i < old_nfonts; i++)
- font_table[i] = old_font_table[i];
- for (i = old_nfonts; i < nfonts; i++)
- font_table[i] = 0;
- a_delete old_font_table;
- }
- }
- font *f = find_font(nm);
- font_table[n] = f;
-}
-
-font *printer::find_font(const char *nm)
-{
- for (font_pointer_list *p = font_list; p; p = p->next)
- if (strcmp(p->p->get_name(), nm) == 0)
- return p->p;
- font *f = make_font(nm);
- if (!f)
- fatal("sorry, I can't continue");
- font_list = new font_pointer_list(f, font_list);
- return f;
-}
-
-font *printer::make_font(const char *nm)
-{
- return font::load_font(nm);
-}
-
-void printer::end_of_line()
-{
-}
-
-void printer::special(char *, const environment *, char)
-{
-}
-
-void printer::draw(int, int *, int, const environment *)
-{
-}
-
-void printer::set_ascii_char(unsigned char c, const environment *env,
- int *widthp)
-{
- char buf[2];
- int w;
- font *f;
-
- buf[0] = c;
- buf[1] = '\0';
-
- int i = set_char_and_width(buf, env, &w, &f);
- set_char(i, f, env, w, 0);
- if (widthp) {
- *widthp = w;
- }
-}
-
-void printer::set_special_char(const char *nm, const environment *env,
- int *widthp)
-{
- font *f;
- int w;
- int i = set_char_and_width(nm, env, &w, &f);
- if (i != -1) {
- set_char(i, f, env, w, nm);
- if (widthp) {
- *widthp = w;
- }
- }
-}
-
-int printer::set_char_and_width(const char *nm, const environment *env,
- int *widthp, font **f)
-{
- int i = font::name_to_index(nm);
- int fn = env->fontno;
- if (fn < 0 || fn >= nfonts) {
- error("bad font position `%1'", fn);
- return(-1);
- }
- *f = font_table[fn];
- if (*f == 0) {
- error("no font mounted at `%1'", fn);
- return(-1);
- }
- if (!(*f)->contains(i)) {
- if (nm[0] != '\0' && nm[1] == '\0')
- error("font `%1' does not contain ascii character `%2'",
- (*f)->get_name(),
- nm[0]);
- else
- error("font `%1' does not contain special character `%2'",
- (*f)->get_name(),
- nm);
- return(-1);
- }
- int w = (*f)->get_width(i, env->size);
- if (widthp)
- *widthp = w;
- return( i );
-}
-
-void printer::set_numbered_char(int num, const environment *env, int *widthp)
-{
- int i = font::number_to_index(num);
- int fn = env->fontno;
- if (fn < 0 || fn >= nfonts) {
- error("bad font position `%1'", fn);
- return;
- }
- font *f = font_table[fn];
- if (f == 0) {
- error("no font mounted at `%1'", fn);
- return;
- }
- if (!f->contains(i)) {
- error("font `%1' does not contain numbered character %2",
- f->get_name(),
- num);
- return;
- }
- int w = f->get_width(i, env->size);
- if (widthp)
- *widthp = w;
- set_char(i, f, env, w, 0);
-}
-
-font *printer::get_font_from_index(int fontno)
-{
- if ((fontno >= 0) && (fontno < nfonts))
- return(font_table[fontno]);
- else
- return(0);
-}
-
-// This utility function adjusts the specified center of the
-// arc so that it is equidistant between the specified start
-// and end points. (p[0], p[1]) is a vector from the current
-// point to the center; (p[2], p[3]) is a vector from the
-// center to the end point. If the center can be adjusted,
-// a vector from the current point to the adjusted center is
-// stored in c[0], c[1] and 1 is returned. Otherwise 0 is
-// returned.
-
-#if 1
-int printer::adjust_arc_center(const int *p, double *c)
-{
- // We move the center along a line parallel to the line between
- // the specified start point and end point so that the center
- // is equidistant between the start and end point.
- // It can be proved (using Lagrange multipliers) that this will
- // give the point nearest to the specified center that is equidistant
- // between the start and end point.
-
- double x = p[0] + p[2]; // (x, y) is the end point
- double y = p[1] + p[3];
- double n = x*x + y*y;
- if (n != 0) {
- c[0]= double(p[0]);
- c[1] = double(p[1]);
- double k = .5 - (c[0]*x + c[1]*y)/n;
- c[0] += k*x;
- c[1] += k*y;
- return 1;
- }
- else
- return 0;
-}
-#else
-int printer::adjust_arc_center(const int *p, double *c)
-{
- int x = p[0] + p[2]; // (x, y) is the end point
- int y = p[1] + p[3];
- // Start at the current point; go in the direction of the specified
- // center point until we reach a point that is equidistant between
- // the specified starting point and the specified end point. Place
- // the center of the arc there.
- double n = p[0]*double(x) + p[1]*double(y);
- if (n > 0) {
- double k = (double(x)*x + double(y)*y)/(2.0*n);
- // (cx, cy) is our chosen center
- c[0] = k*p[0];
- c[1] = k*p[1];
- return 1;
- }
- else {
- // We would never reach such a point. So instead start at the
- // specified end point of the arc. Go towards the specified
- // center point until we reach a point that is equidistant between
- // the specified start point and specified end point. Place
- // the center of the arc there.
- n = p[2]*double(x) + p[3]*double(y);
- if (n > 0) {
- double k = 1 - (double(x)*x + double(y)*y)/(2.0*n);
- // (c[0], c[1]) is our chosen center
- c[0] = p[0] + k*p[2];
- c[1] = p[1] + k*p[3];
- return 1;
- }
- else
- return 0;
- }
-}
-#endif
diff --git a/contrib/groff/src/libs/libgroff/Makefile.sub b/contrib/groff/src/libs/libgroff/Makefile.sub
deleted file mode 100644
index 5ce0691af5a8..000000000000
--- a/contrib/groff/src/libs/libgroff/Makefile.sub
+++ /dev/null
@@ -1,84 +0,0 @@
-LIB=groff
-OBJS=\
- assert.o \
- change_lf.o \
- cmap.o \
- cset.o \
- device.o \
- errarg.o \
- error.o \
- fatal.o \
- filename.o \
- font.o \
- fontfile.o \
- getopt.o \
- getopt1.o \
- htmlindicate.o \
- illegal.o \
- lf.o \
- lineno.o \
- macropath.o \
- nametoindex.o \
- new.o \
- prime.o \
- progname.o \
- ptable.o \
- searchpath.o \
- string.o \
- strsave.o \
- tmpfile.o \
- iftoa.o \
- itoa.o \
- matherr.o \
- version.o \
- $(LIBOBJS)
-CCSRCS=\
- $(srcdir)/assert.cc \
- $(srcdir)/change_lf.cc \
- $(srcdir)/cmap.cc \
- $(srcdir)/cset.cc \
- $(srcdir)/device.cc \
- $(srcdir)/errarg.cc \
- $(srcdir)/error.cc \
- $(srcdir)/fatal.cc \
- $(srcdir)/filename.cc \
- $(srcdir)/font.cc \
- $(srcdir)/fontfile.cc \
- $(srcdir)/htmlindicate.cc \
- $(srcdir)/illegal.cc \
- $(srcdir)/lf.cc \
- $(srcdir)/lineno.cc \
- $(srcdir)/macropath.cc \
- $(srcdir)/nametoindex.cc \
- $(srcdir)/new.cc \
- $(srcdir)/prime.cc \
- $(srcdir)/progname.cc \
- $(srcdir)/ptable.cc \
- $(srcdir)/searchpath.cc \
- $(srcdir)/string.cc \
- $(srcdir)/strsave.cc \
- $(srcdir)/tmpfile.cc \
- version.cc
-CSRCS=\
- $(srcdir)/fmod.c \
- $(srcdir)/getcwd.c \
- $(srcdir)/getopt.c \
- $(srcdir)/getopt1.c \
- $(srcdir)/iftoa.c \
- $(srcdir)/itoa.c \
- $(srcdir)/matherr.c \
- $(srcdir)/putenv.c \
- $(srcdir)/strerror.c \
- $(srcdir)/strtol.c
-GENSRCS=\
- version.cc
-
-version=`cat $(top_srcdir)/VERSION`
-revision=`cat $(top_srcdir)/REVISION`
-
-version.cc: $(top_srcdir)/VERSION $(top_srcdir)/REVISION
- @echo Making version.cc
- @echo const char \*version_string = \"$(version)\"\; >$@
- @echo const char \*revision_string = \"$(revision)\"\; >>$@
- @echo const char \*Version_string = \"$(version).$(revision)\"\; | \
- sed -e 's/\.0\"/\"/' >>$@
diff --git a/contrib/groff/src/libs/libgroff/assert.cc b/contrib/groff/src/libs/libgroff/assert.cc
deleted file mode 100644
index 89742e32cbb1..000000000000
--- a/contrib/groff/src/libs/libgroff/assert.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "assert.h"
-
-extern const char *program_name;
-
-void assertion_failed(int lineno, const char *filename)
-{
- if (program_name != 0)
- fprintf(stderr, "%s: ", program_name);
- fprintf(stderr, "Failed assertion at line %d, file `%s'.\n",
- lineno, filename);
- fflush(stderr);
- abort();
-}
diff --git a/contrib/groff/src/libs/libgroff/change_lf.cc b/contrib/groff/src/libs/libgroff/change_lf.cc
deleted file mode 100644
index 2e44af1d5749..000000000000
--- a/contrib/groff/src/libs/libgroff/change_lf.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <string.h>
-
-extern char *strsave(const char *);
-
-extern const char *current_filename;
-extern int current_lineno;
-
-void change_filename(const char *f)
-{
- if (current_filename != 0 && strcmp(current_filename, f) == 0)
- return;
- current_filename = strsave(f);
-}
-
-void change_lineno(int ln)
-{
- current_lineno = ln;
-}
diff --git a/contrib/groff/src/libs/libgroff/cmap.cc b/contrib/groff/src/libs/libgroff/cmap.cc
deleted file mode 100644
index d08f04d03b43..000000000000
--- a/contrib/groff/src/libs/libgroff/cmap.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <ctype.h>
-#ifdef __FreeBSD__
-#include <locale.h>
-#endif
-#include "cmap.h"
-
-cmap cmlower(CMAP_BUILTIN);
-cmap cmupper(CMAP_BUILTIN);
-
-#if defined(isascii) && !defined(__FreeBSD__)
-#define ISASCII(c) isascii(c)
-#else
-#define ISASCII(c) (1)
-#endif
-
-cmap::cmap()
-{
- unsigned char *p = v;
- for (int i = 0; i <= UCHAR_MAX; i++)
- p[i] = i;
-}
-
-cmap::cmap(cmap_builtin)
-{
- // these are initialised by cmap_init::cmap_init()
-}
-
-int cmap_init::initialised = 0;
-
-cmap_init::cmap_init()
-{
- if (initialised)
- return;
- initialised = 1;
-#ifdef __FreeBSD__
- (void) setlocale(LC_CTYPE, "");
-#endif
- for (int i = 0; i <= UCHAR_MAX; i++) {
- cmupper.v[i] = ISASCII(i) && islower(i) ? toupper(i) : i;
- cmlower.v[i] = ISASCII(i) && isupper(i) ? tolower(i) : i;
- }
-}
diff --git a/contrib/groff/src/libs/libgroff/cset.cc b/contrib/groff/src/libs/libgroff/cset.cc
deleted file mode 100644
index a9da1f1fe99a..000000000000
--- a/contrib/groff/src/libs/libgroff/cset.cc
+++ /dev/null
@@ -1,108 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <ctype.h>
-#ifdef __FreeBSD__
-#include <locale.h>
-#endif
-#include "cset.h"
-
-cset csalpha(CSET_BUILTIN);
-cset csupper(CSET_BUILTIN);
-cset cslower(CSET_BUILTIN);
-cset csdigit(CSET_BUILTIN);
-cset csxdigit(CSET_BUILTIN);
-cset csspace(CSET_BUILTIN);
-cset cspunct(CSET_BUILTIN);
-cset csalnum(CSET_BUILTIN);
-cset csprint(CSET_BUILTIN);
-cset csgraph(CSET_BUILTIN);
-cset cscntrl(CSET_BUILTIN);
-
-#if defined(isascii) && !defined(__FreeBSD__)
-#define ISASCII(c) isascii(c)
-#else
-#define ISASCII(c) (1)
-#endif
-
-void cset::clear()
-{
- char *p = v;
- for (int i = 0; i <= UCHAR_MAX; i++)
- p[i] = 0;
-}
-
-cset::cset()
-{
- clear();
-}
-
-cset::cset(const char *s)
-{
- clear();
- while (*s)
- v[(unsigned char)*s++] = 1;
-}
-
-cset::cset(const unsigned char *s)
-{
- clear();
- while (*s)
- v[*s++] = 1;
-}
-
-cset::cset(cset_builtin)
-{
- // these are initialised by cset_init::cset_init()
-}
-
-cset &cset::operator|=(const cset &cs)
-{
- for (int i = 0; i <= UCHAR_MAX; i++)
- if (cs.v[i])
- v[i] = 1;
- return *this;
-}
-
-
-int cset_init::initialised = 0;
-
-cset_init::cset_init()
-{
- if (initialised)
- return;
- initialised = 1;
-#ifdef __FreeBSD__
- (void) setlocale(LC_CTYPE, "");
-#endif
- for (int i = 0; i <= UCHAR_MAX; i++) {
- csalpha.v[i] = ISASCII(i) && isalpha(i);
- csupper.v[i] = ISASCII(i) && isupper(i);
- cslower.v[i] = ISASCII(i) && islower(i);
- csdigit.v[i] = ISASCII(i) && isdigit(i);
- csxdigit.v[i] = ISASCII(i) && isxdigit(i);
- csspace.v[i] = ISASCII(i) && isspace(i);
- cspunct.v[i] = ISASCII(i) && ispunct(i);
- csalnum.v[i] = ISASCII(i) && isalnum(i);
- csprint.v[i] = ISASCII(i) && isprint(i);
- csgraph.v[i] = ISASCII(i) && isgraph(i);
- cscntrl.v[i] = ISASCII(i) && iscntrl(i);
- }
-}
diff --git a/contrib/groff/src/libs/libgroff/device.cc b/contrib/groff/src/libs/libgroff/device.cc
deleted file mode 100644
index 7efbfef25a2d..000000000000
--- a/contrib/groff/src/libs/libgroff/device.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdlib.h>
-#include "device.h"
-#include "defs.h"
-
-const char *device = DEVICE;
-
-struct device_init {
- device_init();
-} _device_init;
-
-device_init::device_init()
-{
- char *tem = getenv("GROFF_TYPESETTER");
- if (tem)
- device = tem;
-}
diff --git a/contrib/groff/src/libs/libgroff/errarg.cc b/contrib/groff/src/libs/libgroff/errarg.cc
deleted file mode 100644
index f8075ea71a49..000000000000
--- a/contrib/groff/src/libs/libgroff/errarg.cc
+++ /dev/null
@@ -1,118 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include "assert.h"
-#include "errarg.h"
-
-errarg::errarg(const char *p) : type(STRING)
-{
- s = p ? p : "(null)";
-}
-
-errarg::errarg() : type(EMPTY)
-{
-}
-
-errarg::errarg(unsigned char cc) : type(CHAR)
-{
- c = cc;
-}
-
-errarg::errarg(int nn) : type(INTEGER)
-{
- n = nn;
-}
-
-errarg::errarg(char cc) : type(CHAR)
-{
- c = cc;
-}
-
-errarg::errarg(double dd) : type(DOUBLE)
-{
- d = dd;
-}
-
-int errarg::empty() const
-{
- return type == EMPTY;
-}
-
-extern "C" {
- const char *i_to_a(int);
-}
-
-void errarg::print() const
-{
- switch (type) {
- case INTEGER:
- fputs(i_to_a(n), stderr);
- break;
- case CHAR:
- putc(c, stderr);
- break;
- case STRING:
- fputs(s, stderr);
- break;
- case DOUBLE:
- fprintf(stderr, "%g", d);
- break;
- case EMPTY:
- break;
- }
-}
-
-errarg empty_errarg;
-
-void errprint(const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- assert(format != 0);
- char c;
- while ((c = *format++) != '\0') {
- if (c == '%') {
- c = *format++;
- switch(c) {
- case '%':
- fputc('%', stderr);
- break;
- case '1':
- assert(!arg1.empty());
- arg1.print();
- break;
- case '2':
- assert(!arg2.empty());
- arg2.print();
- break;
- case '3':
- assert(!arg3.empty());
- arg3.print();
- break;
- default:
- assert(0);
- }
- }
- else
- putc(c, stderr);
- }
-}
diff --git a/contrib/groff/src/libs/libgroff/error.cc b/contrib/groff/src/libs/libgroff/error.cc
deleted file mode 100644
index 53fd629845fc..000000000000
--- a/contrib/groff/src/libs/libgroff/error.cc
+++ /dev/null
@@ -1,137 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "errarg.h"
-#include "error.h"
-
-extern void fatal_error_exit();
-
-enum error_type { WARNING, ERROR, FATAL };
-
-static void do_error_with_file_and_line(const char *filename, int lineno,
- error_type type,
- const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- int need_space = 0;
- if (program_name) {
- fprintf(stderr, "%s:", program_name);
- need_space = 1;
- }
- if (lineno >= 0 && filename != 0) {
- if (strcmp(filename, "-") == 0)
- filename = "<standard input>";
- fprintf(stderr, "%s:%d:", filename, lineno);
- need_space = 1;
- }
- switch (type) {
- case FATAL:
- fputs("fatal error:", stderr);
- need_space = 1;
- break;
- case ERROR:
- break;
- case WARNING:
- fputs("warning:", stderr);
- need_space = 1;
- break;
- }
- if (need_space)
- fputc(' ', stderr);
- errprint(format, arg1, arg2, arg3);
- fputc('\n', stderr);
- fflush(stderr);
- if (type == FATAL)
- fatal_error_exit();
-}
-
-
-static void do_error(error_type type,
- const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- do_error_with_file_and_line(current_filename, current_lineno,
- type, format, arg1, arg2, arg3);
-}
-
-
-void error(const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- do_error(ERROR, format, arg1, arg2, arg3);
-}
-
-void warning(const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- do_error(WARNING, format, arg1, arg2, arg3);
-}
-
-void fatal(const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- do_error(FATAL, format, arg1, arg2, arg3);
-}
-
-void error_with_file_and_line(const char *filename,
- int lineno,
- const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- do_error_with_file_and_line(filename, lineno,
- ERROR, format, arg1, arg2, arg3);
-}
-
-void warning_with_file_and_line(const char *filename,
- int lineno,
- const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- do_error_with_file_and_line(filename, lineno,
- WARNING, format, arg1, arg2, arg3);
-}
-
-void fatal_with_file_and_line(const char *filename,
- int lineno,
- const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- do_error_with_file_and_line(filename, lineno,
- FATAL, format, arg1, arg2, arg3);
-}
diff --git a/contrib/groff/src/libs/libgroff/fatal.cc b/contrib/groff/src/libs/libgroff/fatal.cc
deleted file mode 100644
index 42560dcaf5e7..000000000000
--- a/contrib/groff/src/libs/libgroff/fatal.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdlib.h>
-
-#define FATAL_ERROR_EXIT_CODE 3
-
-void fatal_error_exit()
-{
- exit(FATAL_ERROR_EXIT_CODE);
-}
diff --git a/contrib/groff/src/libs/libgroff/filename.cc b/contrib/groff/src/libs/libgroff/filename.cc
deleted file mode 100644
index 1cbaa93dddfc..000000000000
--- a/contrib/groff/src/libs/libgroff/filename.cc
+++ /dev/null
@@ -1 +0,0 @@
-const char *current_filename = 0;
diff --git a/contrib/groff/src/libs/libgroff/fmod.c b/contrib/groff/src/libs/libgroff/fmod.c
deleted file mode 100644
index 818f946edc04..000000000000
--- a/contrib/groff/src/libs/libgroff/fmod.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <math.h>
-
-double fmod(x, y)
- double x, y;
-{
- double quot = x/y;
- return x - (quot < 0.0 ? ceil(quot) : floor(quot)) * y;
-}
-
diff --git a/contrib/groff/src/libs/libgroff/font.cc b/contrib/groff/src/libs/libgroff/font.cc
deleted file mode 100644
index 6cdd6479b84c..000000000000
--- a/contrib/groff/src/libs/libgroff/font.cc
+++ /dev/null
@@ -1,938 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-#include <math.h>
-#include <stdlib.h>
-#include "errarg.h"
-#include "error.h"
-#include "cset.h"
-#include "font.h"
-#include "lib.h"
-
-const char *const WS = " \t\n\r";
-
-struct font_char_metric {
- char type;
- int code;
- int width;
- int height;
- int depth;
- int pre_math_space;
- int italic_correction;
- int subscript_correction;
- char *special_device_coding;
-};
-
-struct font_kern_list {
- int i1;
- int i2;
- int amount;
- font_kern_list *next;
-
- font_kern_list(int, int, int, font_kern_list * = 0);
-};
-
-struct font_widths_cache {
- font_widths_cache *next;
- int point_size;
- int *width;
-
- font_widths_cache(int, int, font_widths_cache * = 0);
- ~font_widths_cache();
-};
-
-/* text_file */
-
-struct text_file {
- FILE *fp;
- char *path;
- int lineno;
- int size;
- int skip_comments;
- char *buf;
- text_file(FILE *fp, char *p);
- ~text_file();
- int next();
- void error(const char *format,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-};
-
-text_file::text_file(FILE *p, char *s)
-: fp(p), path(s), lineno(0), size(0), skip_comments(1), buf(0)
-{
-}
-
-text_file::~text_file()
-{
- a_delete buf;
- a_delete path;
- if (fp)
- fclose(fp);
-}
-
-
-int text_file::next()
-{
- if (fp == 0)
- return 0;
- if (buf == 0) {
- buf = new char [128];
- size = 128;
- }
- for (;;) {
- int i = 0;
- for (;;) {
- int c = getc(fp);
- if (c == EOF)
- break;
- if (illegal_input_char(c))
- error("illegal input character code `%1'", int(c));
- else {
- if (i + 1 >= size) {
- char *old_buf = buf;
- buf = new char[size*2];
- memcpy(buf, old_buf, size);
- a_delete old_buf;
- size *= 2;
- }
- buf[i++] = c;
- if (c == '\n')
- break;
- }
- }
- if (i == 0)
- break;
- buf[i] = '\0';
- lineno++;
- char *ptr = buf;
- while (csspace(*ptr))
- ptr++;
- if (*ptr != 0 && (!skip_comments || *ptr != '#'))
- return 1;
- }
- return 0;
-}
-
-void text_file::error(const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- error_with_file_and_line(path, lineno, format, arg1, arg2, arg3);
-}
-
-
-/* font functions */
-
-font::font(const char *s)
-: ligatures(0), kern_hash_table(0), space_width(0), ch_index(0), nindices(0),
- ch(0), ch_used(0), ch_size(0), special(0), widths_cache(0)
-{
- name = new char[strlen(s) + 1];
- strcpy(name, s);
- internalname = 0;
- slant = 0.0;
- // load(); // for testing
-}
-
-font::~font()
-{
- a_delete ch;
- a_delete ch_index;
- if (kern_hash_table) {
- for (int i = 0; i < KERN_HASH_TABLE_SIZE; i++) {
- font_kern_list *kerns = kern_hash_table[i];
- while (kerns) {
- font_kern_list *tem = kerns;
- kerns = kerns->next;
- delete tem;
- }
- }
- a_delete kern_hash_table;
- }
- a_delete name;
- a_delete internalname;
- while (widths_cache) {
- font_widths_cache *tem = widths_cache;
- widths_cache = widths_cache->next;
- delete tem;
- }
-}
-
-static int scale_round(int n, int x, int y)
-{
- assert(x >= 0 && y > 0);
- int y2 = y/2;
- if (x == 0)
- return 0;
- if (n >= 0) {
- if (n <= (INT_MAX - y2)/x)
- return (n*x + y2)/y;
- return int(n*double(x)/double(y) + .5);
- }
- else {
- if (-(unsigned)n <= (-(unsigned)INT_MIN - y2)/x)
- return (n*x - y2)/y;
- return int(n*double(x)/double(y) - .5);
- }
-}
-
-inline int font::scale(int w, int sz)
-{
- return sz == unitwidth ? w : scale_round(w, sz, unitwidth);
-}
-
-int font::get_skew(int c, int point_size, int sl)
-{
- int h = get_height(c, point_size);
- return int(h*tan((slant+sl)*PI/180.0) + .5);
-}
-
-int font::contains(int c)
-{
- return c >= 0 && c < nindices && ch_index[c] >= 0;
-}
-
-int font::is_special()
-{
- return special;
-}
-
-font_widths_cache::font_widths_cache(int ps, int ch_size,
- font_widths_cache *p)
-: next(p), point_size(ps)
-{
- width = new int[ch_size];
- for (int i = 0; i < ch_size; i++)
- width[i] = -1;
-}
-
-font_widths_cache::~font_widths_cache()
-{
- a_delete width;
-}
-
-int font::get_width(int c, int point_size)
-{
- assert(c >= 0 && c < nindices);
- int i = ch_index[c];
- assert(i >= 0);
-
- if (point_size == unitwidth)
- return ch[i].width;
-
- if (!widths_cache)
- widths_cache = new font_widths_cache(point_size, ch_size);
- else if (widths_cache->point_size != point_size) {
- font_widths_cache **p;
- for (p = &widths_cache; *p; p = &(*p)->next)
- if ((*p)->point_size == point_size)
- break;
- if (*p) {
- font_widths_cache *tem = *p;
- *p = (*p)->next;
- tem->next = widths_cache;
- widths_cache = tem;
- }
- else
- widths_cache = new font_widths_cache(point_size, ch_size, widths_cache);
- }
- int &w = widths_cache->width[i];
- if (w < 0)
- w = scale(ch[i].width, point_size);
- return w;
-}
-
-int font::get_height(int c, int point_size)
-{
- assert(c >= 0 && c < nindices && ch_index[c] >= 0);
- return scale(ch[ch_index[c]].height, point_size);
-}
-
-int font::get_depth(int c, int point_size)
-{
- assert(c >= 0 && c < nindices && ch_index[c] >= 0);
- return scale(ch[ch_index[c]].depth, point_size);
-}
-
-int font::get_italic_correction(int c, int point_size)
-{
- assert(c >= 0 && c < nindices && ch_index[c] >= 0);
- return scale(ch[ch_index[c]].italic_correction, point_size);
-}
-
-int font::get_left_italic_correction(int c, int point_size)
-{
- assert(c >= 0 && c < nindices && ch_index[c] >= 0);
- return scale(ch[ch_index[c]].pre_math_space, point_size);
-}
-
-int font::get_subscript_correction(int c, int point_size)
-{
- assert(c >= 0 && c < nindices && ch_index[c] >= 0);
- return scale(ch[ch_index[c]].subscript_correction, point_size);
-}
-
-int font::get_space_width(int point_size)
-{
- return scale(space_width, point_size);
-}
-
-font_kern_list::font_kern_list(int c1, int c2, int n, font_kern_list *p)
- : i1(c1), i2(c2), amount(n), next(p)
-{
-}
-
-inline int font::hash_kern(int i1, int i2)
-{
- int n = ((i1 << 10) + i2) % KERN_HASH_TABLE_SIZE;
- return n < 0 ? -n : n;
-}
-
-void font::add_kern(int i1, int i2, int amount)
-{
- if (!kern_hash_table) {
- kern_hash_table = new font_kern_list *[KERN_HASH_TABLE_SIZE];
- for (int i = 0; i < KERN_HASH_TABLE_SIZE; i++)
- kern_hash_table[i] = 0;
- }
- font_kern_list **p = kern_hash_table + hash_kern(i1, i2);
- *p = new font_kern_list(i1, i2, amount, *p);
-}
-
-int font::get_kern(int i1, int i2, int point_size)
-{
- if (kern_hash_table) {
- for (font_kern_list *p = kern_hash_table[hash_kern(i1, i2)]; p; p = p->next)
- if (i1 == p->i1 && i2 == p->i2)
- return scale(p->amount, point_size);
- }
- return 0;
-}
-
-int font::has_ligature(int mask)
-{
- return mask & ligatures;
-}
-
-int font::get_character_type(int c)
-{
- assert(c >= 0 && c < nindices && ch_index[c] >= 0);
- return ch[ch_index[c]].type;
-}
-
-int font::get_code(int c)
-{
- assert(c >= 0 && c < nindices && ch_index[c] >= 0);
- return ch[ch_index[c]].code;
-}
-
-const char *font::get_name()
-{
- return name;
-}
-
-const char *font::get_internal_name()
-{
- return internalname;
-}
-
-const char *font::get_special_device_encoding(int c)
-{
- assert(c >= 0 && c < nindices && ch_index[c] >= 0);
- return( ch[ch_index[c]].special_device_coding );
-}
-
-void font::alloc_ch_index(int index)
-{
- if (nindices == 0) {
- nindices = 128;
- if (index >= nindices)
- nindices = index + 10;
- ch_index = new short[nindices];
- for (int i = 0; i < nindices; i++)
- ch_index[i] = -1;
- }
- else {
- int old_nindices = nindices;
- nindices *= 2;
- if (index >= nindices)
- nindices = index + 10;
- short *old_ch_index = ch_index;
- ch_index = new short[nindices];
- memcpy(ch_index, old_ch_index, sizeof(short)*old_nindices);
- for (int i = old_nindices; i < nindices; i++)
- ch_index[i] = -1;
- a_delete old_ch_index;
- }
-}
-
-void font::extend_ch()
-{
- if (ch == 0)
- ch = new font_char_metric[ch_size = 16];
- else {
- int old_ch_size = ch_size;
- ch_size *= 2;
- font_char_metric *old_ch = ch;
- ch = new font_char_metric[ch_size];
- memcpy(ch, old_ch, old_ch_size*sizeof(font_char_metric));
- a_delete old_ch;
- }
-}
-
-void font::compact()
-{
- int i;
- for (i = nindices - 1; i >= 0; i--)
- if (ch_index[i] >= 0)
- break;
- i++;
- if (i < nindices) {
- short *old_ch_index = ch_index;
- ch_index = new short[i];
- memcpy(ch_index, old_ch_index, i*sizeof(short));
- a_delete old_ch_index;
- nindices = i;
- }
- if (ch_used < ch_size) {
- font_char_metric *old_ch = ch;
- ch = new font_char_metric[ch_used];
- memcpy(ch, old_ch, ch_used*sizeof(font_char_metric));
- a_delete old_ch;
- ch_size = ch_used;
- }
-}
-
-void font::add_entry(int index, const font_char_metric &metric)
-{
- assert(index >= 0);
- if (index >= nindices)
- alloc_ch_index(index);
- assert(index < nindices);
- if (ch_used + 1 >= ch_size)
- extend_ch();
- assert(ch_used + 1 < ch_size);
- ch_index[index] = ch_used;
- ch[ch_used++] = metric;
-}
-
-void font::copy_entry(int new_index, int old_index)
-{
- assert(new_index >= 0 && old_index >= 0 && old_index < nindices);
- if (new_index >= nindices)
- alloc_ch_index(new_index);
- ch_index[new_index] = ch_index[old_index];
-}
-
-font *font::load_font(const char *s, int *not_found)
-{
- font *f = new font(s);
- if (!f->load(not_found)) {
- delete f;
- return 0;
- }
- return f;
-}
-
-static char *trim_arg(char *p)
-{
- if (!p)
- return 0;
- while (csspace(*p))
- p++;
- char *q = strchr(p, '\0');
- while (q > p && csspace(q[-1]))
- q--;
- *q = '\0';
- return p;
-}
-
-// If the font can't be found, then if not_found is non-NULL, it will be set
-// to 1 otherwise a message will be printed.
-
-int font::load(int *not_found)
-{
- char *path;
- FILE *fp;
- if ((fp = open_file(name, &path)) == NULL) {
- if (not_found)
- *not_found = 1;
- else
- error("can't find font file `%1'", name);
- return 0;
- }
- text_file t(fp, path);
- t.skip_comments = 1;
- char *p;
- for (;;) {
- if (!t.next()) {
- t.error("missing charset command");
- return 0;
- }
- p = strtok(t.buf, WS);
- if (strcmp(p, "name") == 0) {
- }
- else if (strcmp(p, "spacewidth") == 0) {
- p = strtok(0, WS);
- int n;
- if (p == 0 || sscanf(p, "%d", &n) != 1 || n <= 0) {
- t.error("bad argument for spacewidth command");
- return 0;
- }
- space_width = n;
- }
- else if (strcmp(p, "slant") == 0) {
- p = strtok(0, WS);
- double n;
- if (p == 0 || sscanf(p, "%lf", &n) != 1 || n >= 90.0 || n <= -90.0) {
- t.error("bad argument for slant command", p);
- return 0;
- }
- slant = n;
- }
- else if (strcmp(p, "ligatures") == 0) {
- for (;;) {
- p = strtok(0, WS);
- if (p == 0 || strcmp(p, "0") == 0)
- break;
- if (strcmp(p, "ff") == 0)
- ligatures |= LIG_ff;
- else if (strcmp(p, "fi") == 0)
- ligatures |= LIG_fi;
- else if (strcmp(p, "fl") == 0)
- ligatures |= LIG_fl;
- else if (strcmp(p, "ffi") == 0)
- ligatures |= LIG_ffi;
- else if (strcmp(p, "ffl") == 0)
- ligatures |= LIG_ffl;
- else {
- t.error("unrecognised ligature `%1'", p);
- return 0;
- }
- }
- }
- else if (strcmp(p, "internalname") == 0) {
- p = strtok(0, WS);
- if (!p) {
- t.error("`internalname command requires argument");
- return 0;
- }
- internalname = new char[strlen(p) + 1];
- strcpy(internalname, p);
- }
- else if (strcmp(p, "special") == 0) {
- special = 1;
- }
- else if (strcmp(p, "kernpairs") != 0 && strcmp(p, "charset") != 0) {
- char *command = p;
- p = strtok(0, "\n");
- handle_unknown_font_command(command, trim_arg(p), t.path, t.lineno);
- }
- else
- break;
- }
- char *command = p;
- int had_charset = 0;
- t.skip_comments = 0;
- while (command) {
- if (strcmp(command, "kernpairs") == 0) {
- for (;;) {
- if (!t.next()) {
- command = 0;
- break;
- }
- char *c1 = strtok(t.buf, WS);
- if (c1 == 0)
- continue;
- char *c2 = strtok(0, WS);
- if (c2 == 0) {
- command = c1;
- break;
- }
- p = strtok(0, WS);
- if (p == 0) {
- t.error("missing kern amount");
- return 0;
- }
- int n;
- if (sscanf(p, "%d", &n) != 1) {
- t.error("bad kern amount `%1'", p);
- return 0;
- }
- int i1 = name_to_index(c1);
- if (i1 < 0) {
- t.error("illegal character `%1'", c1);
- return 0;
- }
- int i2 = name_to_index(c2);
- if (i2 < 0) {
- t.error("illegal character `%1'", c2);
- return 0;
- }
- add_kern(i1, i2, n);
- }
- }
- else if (strcmp(command, "charset") == 0) {
- had_charset = 1;
- int last_index = -1;
- for (;;) {
- if (!t.next()) {
- command = 0;
- break;
- }
- char *nm = strtok(t.buf, WS);
- if (nm == 0)
- continue; // I dont think this should happen
- p = strtok(0, WS);
- if (p == 0) {
- command = nm;
- break;
- }
- if (p[0] == '"') {
- if (last_index == -1) {
- t.error("first charset entry is duplicate");
- return 0;
- }
- if (strcmp(nm, "---") == 0) {
- t.error("unnamed character cannot be duplicate");
- return 0;
- }
- int index = name_to_index(nm);
- if (index < 0) {
- t.error("illegal character `%1'", nm);
- return 0;
- }
- copy_entry(index, last_index);
- }
- else {
- font_char_metric metric;
- metric.height = 0;
- metric.depth = 0;
- metric.pre_math_space = 0;
- metric.italic_correction = 0;
- metric.subscript_correction = 0;
- int nparms = sscanf(p, "%d,%d,%d,%d,%d,%d",
- &metric.width, &metric.height, &metric.depth,
- &metric.italic_correction,
- &metric.pre_math_space,
- &metric.subscript_correction);
- if (nparms < 1) {
- t.error("bad width for `%1'", nm);
- return 0;
- }
- p = strtok(0, WS);
- if (p == 0) {
- t.error("missing character type for `%1'", nm);
- return 0;
- }
- int type;
- if (sscanf(p, "%d", &type) != 1) {
- t.error("bad character type for `%1'", nm);
- return 0;
- }
- if (type < 0 || type > 255) {
- t.error("character code `%1' out of range", type);
- return 0;
- }
- metric.type = type;
- p = strtok(0, WS);
- if (p == 0) {
- t.error("missing code for `%1'", nm);
- return 0;
- }
- char *ptr;
- metric.code = (int)strtol(p, &ptr, 0);
- if (metric.code == 0 && ptr == p) {
- t.error("bad code `%1' for character `%2'", p, nm);
- return 0;
- }
-
- p = strtok(0, WS);
- if ((p == NULL) || (strcmp(p, "--") == 0)) {
- metric.special_device_coding = NULL;
- } else {
- char *name=(char *)malloc(strlen(p)+1);
-
- if (name == NULL) {
- fatal("malloc failed while reading character encoding");
- }
- strcpy(name, p);
- metric.special_device_coding = name;
- }
-
- if (strcmp(nm, "---") == 0) {
- last_index = number_to_index(metric.code);
- add_entry(last_index, metric);
- }
- else {
- last_index = name_to_index(nm);
- if (last_index < 0) {
- t.error("illegal character `%1'", nm);
- return 0;
- }
- add_entry(last_index, metric);
- copy_entry(number_to_index(metric.code), last_index);
- }
- }
- }
- if (last_index == -1) {
- t.error("I didn't seem to find any characters");
- return 0;
- }
- }
- else {
- t.error("unrecognised command `%1' after `kernpairs' or `charset' command", command);
- return 0;
- }
- }
- if (!had_charset) {
- t.error("missing charset command");
- return 0;
- }
- if (space_width == 0)
- space_width = scale_round(unitwidth, res, 72*3*sizescale);
- compact();
- return 1;
-}
-
-static struct {
- const char *command;
- int *ptr;
-} table[] = {
- { "res", &font::res },
- { "hor", &font::hor },
- { "vert", &font::vert },
- { "unitwidth", &font::unitwidth },
- { "paperwidth", &font::paperwidth },
- { "paperlength", &font::paperlength },
- { "spare1", &font::biggestfont },
- { "biggestfont", &font::biggestfont },
- { "spare2", &font::spare2 },
- { "sizescale", &font::sizescale }
- };
-
-
-int font::load_desc()
-{
- int nfonts = 0;
- FILE *fp;
- char *path;
- if ((fp = open_file("DESC", &path)) == 0) {
- error("can't find `DESC' file");
- return 0;
- }
- text_file t(fp, path);
- t.skip_comments = 1;
- res = 0;
- while (t.next()) {
- char *p = strtok(t.buf, WS);
- int found = 0;
- int idx;
- for (idx = 0; !found && idx < sizeof(table)/sizeof(table[0]); idx++)
- if (strcmp(table[idx].command, p) == 0)
- found = 1;
- if (found) {
- char *q = strtok(0, WS);
- if (!q) {
- t.error("missing value for command `%1'", p);
- return 0;
- }
- //int *ptr = &(this->*(table[idx-1].ptr));
- int *ptr = table[idx-1].ptr;
- if (sscanf(q, "%d", ptr) != 1) {
- t.error("bad number `%1'", q);
- return 0;
- }
- }
- else if (strcmp("tcommand", p) == 0) {
- tcommand = 1;
- }
- else if (strcmp("pass_filenames", p) == 0) {
- pass_filenames = 1;
- }
- else if (strcmp("use_charnames_in_special", p) == 0) {
- use_charnames_in_special = 1;
- }
- else if (strcmp("family", p) == 0) {
- p = strtok(0, WS);
- if (!p) {
- t.error("family command requires an argument");
- return 0;
- }
- char *tem = new char[strlen(p)+1];
- strcpy(tem, p);
- family = tem;
- }
- else if (strcmp("fonts", p) == 0) {
- p = strtok(0, WS);
- if (!p || sscanf(p, "%d", &nfonts) != 1 || nfonts <= 0) {
- t.error("bad number of fonts `%1'", p);
- return 0;
- }
- font_name_table = (const char **)new char *[nfonts+1];
- for (int i = 0; i < nfonts; i++) {
- p = strtok(0, WS);
- while (p == 0) {
- if (!t.next()) {
- t.error("end of file while reading list of fonts");
- return 0;
- }
- p = strtok(t.buf, WS);
- }
- char *temp = new char[strlen(p)+1];
- strcpy(temp, p);
- font_name_table[i] = temp;
- }
- p = strtok(0, WS);
- if (p != 0) {
- t.error("font count does not match number of fonts");
- return 0;
- }
- font_name_table[nfonts] = 0;
- }
- else if (strcmp("sizes", p) == 0) {
- int n = 16;
- sizes = new int[n];
- int i = 0;
- for (;;) {
- p = strtok(0, WS);
- while (p == 0) {
- if (!t.next()) {
- t.error("list of sizes must be terminated by `0'");
- return 0;
- }
- p = strtok(t.buf, WS);
- }
- int lower, upper;
- switch (sscanf(p, "%d-%d", &lower, &upper)) {
- case 1:
- upper = lower;
- // fall through
- case 2:
- if (lower <= upper && lower >= 0)
- break;
- // fall through
- default:
- t.error("bad size range `%1'", p);
- return 0;
- }
- if (i + 2 > n) {
- int *old_sizes = sizes;
- sizes = new int[n*2];
- memcpy(sizes, old_sizes, n*sizeof(int));
- n *= 2;
- a_delete old_sizes;
- }
- sizes[i++] = lower;
- if (lower == 0)
- break;
- sizes[i++] = upper;
- }
- if (i == 1) {
- t.error("must have some sizes");
- return 0;
- }
- }
- else if (strcmp("styles", p) == 0) {
- int style_table_size = 5;
- style_table = (const char **)new char *[style_table_size];
- int j;
- for (j = 0; j < style_table_size; j++)
- style_table[j] = 0;
- int i = 0;
- for (;;) {
- p = strtok(0, WS);
- if (p == 0)
- break;
- // leave room for terminating 0
- if (i + 1 >= style_table_size) {
- const char **old_style_table = style_table;
- style_table_size *= 2;
- style_table = (const char **)new char*[style_table_size];
- for (j = 0; j < i; j++)
- style_table[j] = old_style_table[j];
- for (; j < style_table_size; j++)
- style_table[j] = 0;
- a_delete old_style_table;
- }
- char *tem = new char[strlen(p) + 1];
- strcpy(tem, p);
- style_table[i++] = tem;
- }
- }
- else if (strcmp("charset", p) == 0)
- break;
- else if (unknown_desc_command_handler) {
- char *command = p;
- p = strtok(0, "\n");
- (*unknown_desc_command_handler)(command, trim_arg(p), t.path, t.lineno);
- }
- }
- if (res == 0) {
- t.error("missing `res' command");
- return 0;
- }
- if (unitwidth == 0) {
- t.error("missing `unitwidth' command");
- return 0;
- }
- if (font_name_table == 0) {
- t.error("missing `fonts' command");
- return 0;
- }
- if (sizes == 0) {
- t.error("missing `sizes' command");
- return 0;
- }
- if (sizescale < 1) {
- t.error("bad `sizescale' value");
- return 0;
- }
- if (hor < 1) {
- t.error("bad `hor' value");
- return 0;
- }
- if (vert < 1) {
- t.error("bad `vert' value");
- return 0;
- }
- return 1;
-}
-
-void font::handle_unknown_font_command(const char *, const char *,
- const char *, int)
-{
-}
-
-FONT_COMMAND_HANDLER
-font::set_unknown_desc_command_handler(FONT_COMMAND_HANDLER func)
-{
- FONT_COMMAND_HANDLER prev = unknown_desc_command_handler;
- unknown_desc_command_handler = func;
- return prev;
-}
-
diff --git a/contrib/groff/src/libs/libgroff/fontfile.cc b/contrib/groff/src/libs/libgroff/fontfile.cc
deleted file mode 100644
index cc1ad2c4268a..000000000000
--- a/contrib/groff/src/libs/libgroff/fontfile.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "font.h"
-#include "lib.h"
-#include "searchpath.h"
-#include "device.h"
-#include "defs.h"
-
-const char *const FONT_ENV_VAR = "GROFF_FONT_PATH";
-
-static search_path font_path(FONT_ENV_VAR, FONTPATH, 0, 0);
-
-int font::res = 0;
-int font::hor = 1;
-int font::vert = 1;
-int font::unitwidth = 0;
-int font::paperwidth = 0;
-int font::paperlength = 0;
-int font::biggestfont = 0;
-int font::spare2 = 0;
-int font::sizescale = 1;
-int font::tcommand = 0;
-int font::pass_filenames = 0;
-int font::use_charnames_in_special = 0;
-const char **font::font_name_table = 0;
-int *font::sizes = 0;
-const char *font::family = 0;
-const char **font::style_table = 0;
-FONT_COMMAND_HANDLER font::unknown_desc_command_handler = 0;
-
-void font::command_line_font_dir(const char *dir)
-{
- font_path.command_line_dir(dir);
-}
-
-FILE *font::open_file(const char *name, char **pathp)
-{
- char *filename = new char[strlen(name) + strlen(device) + 5];
- sprintf(filename, "dev%s/%s", device, name);
- FILE *fp = font_path.open_file(filename, pathp);
- a_delete filename;
- return fp;
-}
diff --git a/contrib/groff/src/libs/libgroff/getcwd.c b/contrib/groff/src/libs/libgroff/getcwd.c
deleted file mode 100644
index 7a769ffc53f2..000000000000
--- a/contrib/groff/src/libs/libgroff/getcwd.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Partial emulation of getcwd in terms of getwd. */
-
-#include <sys/param.h>
-#include <string.h>
-#include <errno.h>
-
-char *getwd();
-
-char *getcwd(buf, size)
- char *buf;
- int size; /* POSIX says this should be size_t */
-{
- if (size <= 0) {
- errno = EINVAL;
- return 0;
- }
- else {
- char mybuf[MAXPATHLEN];
- int saved_errno = errno;
-
- errno = 0;
- if (!getwd(mybuf)) {
- if (errno == 0)
- ; /* what to do? */
- return 0;
- }
- errno = saved_errno;
- if (strlen(mybuf) + 1 > size) {
- errno = ERANGE;
- return 0;
- }
- strcpy(buf, mybuf);
- return buf;
- }
-}
diff --git a/contrib/groff/src/libs/libgroff/getopt.c b/contrib/groff/src/libs/libgroff/getopt.c
deleted file mode 100644
index 4744e43390ac..000000000000
--- a/contrib/groff/src/libs/libgroff/getopt.c
+++ /dev/null
@@ -1,1055 +0,0 @@
-/* Getopt for GNU.
- NOTE: getopt is now part of the C library, so if you don't know what
- "Keep this file name-space clean" means, talk to drepper@gnu.org
- before changing it!
-
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
- Free Software Foundation, Inc.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
- Ditto for AIX 3.2 and <stdlib.h>. */
-#ifndef _NO_PROTO
-# define _NO_PROTO
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-# ifndef const
-# define const
-# endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-# include <gnu-versions.h>
-# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-# define ELIDE_CODE
-# endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-/* Don't include stdlib.h for non-GNU C libraries because some of them
- contain conflicting prototypes for getopt. */
-# include <stdlib.h>
-# include <unistd.h>
-#endif /* GNU C library. */
-
-#ifdef VMS
-# include <unixlib.h>
-# if HAVE_STRING_H - 0
-# include <string.h>
-# endif
-#endif
-
-#ifndef _
-/* This is for other GNU distributions with internationalized messages.
- When compiling libc, the _ macro is predefined. */
-# ifdef HAVE_LIBINTL_H
-# include <libintl.h>
-# define _(msgid) gettext (msgid)
-# else
-# define _(msgid) (msgid)
-# endif
-#endif
-
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
-
- As `getopt' works, it permutes the elements of ARGV so that,
- when it is done, all the options precede everything else. Thus
- all application programs are extended to handle flexible argument order.
-
- Setting the environment variable POSIXLY_CORRECT disables permutation.
- Then the behavior is completely standard.
-
- GNU application programs can use a third alternative mode in which
- they can distinguish the relative order of options and other arguments. */
-
-#include "getopt.h"
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-/* 1003.2 says this must be 1 before any call. */
-int optind = 1;
-
-/* Formerly, initialization of getopt depended on optind==0, which
- causes problems with re-calling getopt as programs generally don't
- know that. */
-
-int __getopt_initialized;
-
-/* The next char to be scanned in the option-element
- in which the last option character we returned was found.
- This allows us to pick up the scan where we left off.
-
- If this is zero, or a null string, it means resume the scan
- by advancing to the next ARGV-element. */
-
-static char *nextchar;
-
-/* Callers store zero here to inhibit the error message
- for unrecognized options. */
-
-int opterr = 1;
-
-/* Set to an option character which was unrecognized.
- This must be initialized on some systems to avoid linking in the
- system's own getopt implementation. */
-
-int optopt = '?';
-
-/* Describe how to deal with options that follow non-option ARGV-elements.
-
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
- of the list of option characters.
-
- PERMUTE is the default. We permute the contents of ARGV as we scan,
- so that eventually all the non-options are at the end. This allows options
- to be given in any order, even with programs that were not written to
- expect this.
-
- RETURN_IN_ORDER is an option available to programs that were written
- to expect options and other ARGV-elements in any order and that care about
- the ordering of the two. We describe each non-option ARGV-element
- as if it were the argument of an option with character code 1.
- Using `-' as the first character of the list of option characters
- selects this mode of operation.
-
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
-
-static enum
-{
- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-} ordering;
-
-/* Value of POSIXLY_CORRECT environment variable. */
-static char *posixly_correct;
-
-#ifdef __GNU_LIBRARY__
-/* We want to avoid inclusion of string.h with non-GNU libraries
- because there are many ways it can cause trouble.
- On some systems, it contains special magic macros that don't work
- in GCC. */
-# include <string.h>
-# define my_index strchr
-#else
-
-# if HAVE_STRING_H
-# include <string.h>
-# else
-# include <strings.h>
-# endif
-
-/* Avoid depending on library functions or files
- whose names are inconsistent. */
-
-#ifndef getenv
-extern char *getenv ();
-#endif
-
-static char *
-my_index (str, chr)
- const char *str;
- int chr;
-{
- while (*str)
- {
- if (*str == chr)
- return (char *) str;
- str++;
- }
- return 0;
-}
-
-/* If using GCC, we can safely declare strlen this way.
- If not using GCC, it is ok not to declare it. */
-#ifdef __GNUC__
-/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
- That was relevant to code that was here before. */
-# if (!defined __STDC__ || !__STDC__) && !defined strlen
-/* gcc with -traditional declares the built-in strlen to return int,
- and has done so at least since version 2.4.5. -- rms. */
-extern int strlen (const char *);
-# endif /* not __STDC__ */
-#endif /* __GNUC__ */
-
-#endif /* not __GNU_LIBRARY__ */
-
-/* Handle permutation of arguments. */
-
-/* Describe the part of ARGV that contains non-options that have
- been skipped. `first_nonopt' is the index in ARGV of the first of them;
- `last_nonopt' is the index after the last of them. */
-
-static int first_nonopt;
-static int last_nonopt;
-
-#ifdef _LIBC
-/* Bash 2.0 gives us an environment variable containing flags
- indicating ARGV elements that should not be considered arguments. */
-
-/* Defined in getopt_init.c */
-extern char *__getopt_nonoption_flags;
-
-static int nonoption_flags_max_len;
-static int nonoption_flags_len;
-
-static int original_argc;
-static char *const *original_argv;
-
-/* Make sure the environment variable bash 2.0 puts in the environment
- is valid for the getopt call we must make sure that the ARGV passed
- to getopt is that one passed to the process. */
-static void
-__attribute__ ((unused))
-store_args_and_env (int argc, char *const *argv)
-{
- /* XXX This is no good solution. We should rather copy the args so
- that we can compare them later. But we must not use malloc(3). */
- original_argc = argc;
- original_argv = argv;
-}
-# ifdef text_set_element
-text_set_element (__libc_subinit, store_args_and_env);
-# endif /* text_set_element */
-
-# define SWAP_FLAGS(ch1, ch2) \
- if (nonoption_flags_len > 0) \
- { \
- char __tmp = __getopt_nonoption_flags[ch1]; \
- __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
- __getopt_nonoption_flags[ch2] = __tmp; \
- }
-#else /* !_LIBC */
-# define SWAP_FLAGS(ch1, ch2)
-#endif /* _LIBC */
-
-/* Exchange two adjacent subsequences of ARGV.
- One subsequence is elements [first_nonopt,last_nonopt)
- which contains all the non-options that have been skipped so far.
- The other is elements [last_nonopt,optind), which contains all
- the options processed since those non-options were skipped.
-
- `first_nonopt' and `last_nonopt' are relocated so that they describe
- the new indices of the non-options in ARGV after they are moved. */
-
-#if defined __STDC__ && __STDC__
-static void exchange (char **);
-#endif
-
-static void
-exchange (argv)
- char **argv;
-{
- int bottom = first_nonopt;
- int middle = last_nonopt;
- int top = optind;
- char *tem;
-
- /* Exchange the shorter segment with the far end of the longer segment.
- That puts the shorter segment into the right place.
- It leaves the longer segment in the right place overall,
- but it consists of two parts that need to be swapped next. */
-
-#ifdef _LIBC
- /* First make sure the handling of the `__getopt_nonoption_flags'
- string can work normally. Our top argument must be in the range
- of the string. */
- if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
- {
- /* We must extend the array. The user plays games with us and
- presents new arguments. */
- char *new_str = malloc (top + 1);
- if (new_str == NULL)
- nonoption_flags_len = nonoption_flags_max_len = 0;
- else
- {
- memset (__mempcpy (new_str, __getopt_nonoption_flags,
- nonoption_flags_max_len),
- '\0', top + 1 - nonoption_flags_max_len);
- nonoption_flags_max_len = top + 1;
- __getopt_nonoption_flags = new_str;
- }
- }
-#endif
-
- while (top > middle && middle > bottom)
- {
- if (top - middle > middle - bottom)
- {
- /* Bottom segment is the short one. */
- int len = middle - bottom;
- register int i;
-
- /* Swap it with the top part of the top segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[top - (middle - bottom) + i];
- argv[top - (middle - bottom) + i] = tem;
- SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
- }
- /* Exclude the moved bottom segment from further swapping. */
- top -= len;
- }
- else
- {
- /* Top segment is the short one. */
- int len = top - middle;
- register int i;
-
- /* Swap it with the bottom part of the bottom segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[middle + i];
- argv[middle + i] = tem;
- SWAP_FLAGS (bottom + i, middle + i);
- }
- /* Exclude the moved top segment from further swapping. */
- bottom += len;
- }
- }
-
- /* Update records for the slots the non-options now occupy. */
-
- first_nonopt += (optind - last_nonopt);
- last_nonopt = optind;
-}
-
-/* Initialize the internal data when the first call is made. */
-
-#if defined __STDC__ && __STDC__
-static const char *_getopt_initialize (int, char *const *, const char *);
-#endif
-static const char *
-_getopt_initialize (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- /* Start processing options with ARGV-element 1 (since ARGV-element 0
- is the program name); the sequence of previously skipped
- non-option ARGV-elements is empty. */
-
- first_nonopt = last_nonopt = optind;
-
- nextchar = NULL;
-
- posixly_correct = getenv ("POSIXLY_CORRECT");
-
- /* Determine how to handle the ordering of options and nonoptions. */
-
- if (optstring[0] == '-')
- {
- ordering = RETURN_IN_ORDER;
- ++optstring;
- }
- else if (optstring[0] == '+')
- {
- ordering = REQUIRE_ORDER;
- ++optstring;
- }
- else if (posixly_correct != NULL)
- ordering = REQUIRE_ORDER;
- else
- ordering = PERMUTE;
-
-#ifdef _LIBC
- if (posixly_correct == NULL
- && argc == original_argc && argv == original_argv)
- {
- if (nonoption_flags_max_len == 0)
- {
- if (__getopt_nonoption_flags == NULL
- || __getopt_nonoption_flags[0] == '\0')
- nonoption_flags_max_len = -1;
- else
- {
- const char *orig_str = __getopt_nonoption_flags;
- int len = nonoption_flags_max_len = strlen (orig_str);
- if (nonoption_flags_max_len < argc)
- nonoption_flags_max_len = argc;
- __getopt_nonoption_flags =
- (char *) malloc (nonoption_flags_max_len);
- if (__getopt_nonoption_flags == NULL)
- nonoption_flags_max_len = -1;
- else
- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', nonoption_flags_max_len - len);
- }
- }
- nonoption_flags_len = nonoption_flags_max_len;
- }
- else
- nonoption_flags_len = 0;
-#endif
-
- return optstring;
-}
-
-/* Scan elements of ARGV (whose length is ARGC) for option characters
- given in OPTSTRING.
-
- If an element of ARGV starts with '-', and is not exactly "-" or "--",
- then it is an option element. The characters of this element
- (aside from the initial '-') are option characters. If `getopt'
- is called repeatedly, it returns successively each of the option characters
- from each of the option elements.
-
- If `getopt' finds another option character, it returns that character,
- updating `optind' and `nextchar' so that the next call to `getopt' can
- resume the scan with the following option character or ARGV-element.
-
- If there are no more option characters, `getopt' returns -1.
- Then `optind' is the index in ARGV of the first ARGV-element
- that is not an option. (The ARGV-elements have been permuted
- so that those that are not options now come last.)
-
- OPTSTRING is a string containing the legitimate option characters.
- If an option character is seen that is not listed in OPTSTRING,
- return '?' after printing an error message. If you set `opterr' to
- zero, the error message is suppressed but we still return '?'.
-
- If a char in OPTSTRING is followed by a colon, that means it wants an arg,
- so the following text in the same ARGV-element, or the text of the following
- ARGV-element, is returned in `optarg'. Two colons mean an option that
- wants an optional arg; if there is text in the current ARGV-element,
- it is returned in `optarg', otherwise `optarg' is set to zero.
-
- If OPTSTRING starts with `-' or `+', it requests different methods of
- handling the non-option ARGV-elements.
- See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
-
- Long-named options begin with `--' instead of `-'.
- Their names may be abbreviated as long as the abbreviation is unique
- or is an exact match for some defined option. If they have an
- argument, it follows the option name in the same ARGV-element, separated
- from the option name by a `=', or else the in next ARGV-element.
- When `getopt' finds a long-named option, it returns 0 if that option's
- `flag' field is nonzero, the value of the option's `val' field
- if the `flag' field is zero.
-
- The elements of ARGV aren't really const, because we permute them.
- But we pretend they're const in the prototype to be compatible
- with other systems.
-
- LONGOPTS is a vector of `struct option' terminated by an
- element containing a name which is zero.
-
- LONGIND returns the index in LONGOPT of the long-named option found.
- It is only valid when a long-named option has been found by the most
- recent call.
-
- If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- long-named options. */
-
-int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
-{
- int print_errors = opterr;
- if (optstring[0] == ':')
- print_errors = 0;
-
- optarg = NULL;
-
- if (optind == 0 || !__getopt_initialized)
- {
- if (optind == 0)
- optind = 1; /* Don't scan ARGV[0], the program name. */
- optstring = _getopt_initialize (argc, argv, optstring);
- __getopt_initialized = 1;
- }
-
- /* Test whether ARGV[optind] points to a non-option argument.
- Either it does not have option syntax, or there is an environment flag
- from the shell indicating it is not an option. The later information
- is only used when the used in the GNU libc. */
-#ifdef _LIBC
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
- || (optind < nonoption_flags_len \
- && __getopt_nonoption_flags[optind] == '1'))
-#else
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
-#endif
-
- if (nextchar == NULL || *nextchar == '\0')
- {
- /* Advance to the next ARGV-element. */
-
- /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
- moved back by the user (who may also have changed the arguments). */
- if (last_nonopt > optind)
- last_nonopt = optind;
- if (first_nonopt > optind)
- first_nonopt = optind;
-
- if (ordering == PERMUTE)
- {
- /* If we have just processed some options following some non-options,
- exchange them so that the options come first. */
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (last_nonopt != optind)
- first_nonopt = optind;
-
- /* Skip any additional non-options
- and extend the range of non-options previously skipped. */
-
- while (optind < argc && NONOPTION_P)
- optind++;
- last_nonopt = optind;
- }
-
- /* The special ARGV-element `--' means premature end of options.
- Skip it like a null option,
- then exchange with previous non-options as if it were an option,
- then skip everything else like a non-option. */
-
- if (optind != argc && !strcmp (argv[optind], "--"))
- {
- optind++;
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (first_nonopt == last_nonopt)
- first_nonopt = optind;
- last_nonopt = argc;
-
- optind = argc;
- }
-
- /* If we have done all the ARGV-elements, stop the scan
- and back over any non-options that we skipped and permuted. */
-
- if (optind == argc)
- {
- /* Set the next-arg-index to point at the non-options
- that we previously skipped, so the caller will digest them. */
- if (first_nonopt != last_nonopt)
- optind = first_nonopt;
- return -1;
- }
-
- /* If we have come to a non-option and did not permute it,
- either stop the scan or describe it to the caller and pass it by. */
-
- if (NONOPTION_P)
- {
- if (ordering == REQUIRE_ORDER)
- return -1;
- optarg = argv[optind++];
- return 1;
- }
-
- /* We have found another option-ARGV-element.
- Skip the initial punctuation. */
-
- nextchar = (argv[optind] + 1
- + (longopts != NULL && argv[optind][1] == '-'));
- }
-
- /* Decode the current option-ARGV-element. */
-
- /* Check whether the ARGV-element is a long option.
-
- If long_only and the ARGV-element has the form "-f", where f is
- a valid short option, don't consider it an abbreviated form of
- a long option that starts with f. Otherwise there would be no
- way to give the -f short option.
-
- On the other hand, if there's a long option "fubar" and
- the ARGV-element is "-fu", do consider that an abbreviation of
- the long option, just like "--fu", and not "-f" with arg "u".
-
- This distinction seems to be the most useful approach. */
-
- if (longopts != NULL
- && (argv[optind][1] == '-'
- || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = -1;
- int option_index;
-
- for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar)
- == (unsigned int) strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
-
- if (ambig && !exact)
- {
- if (print_errors)
- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[optind]);
- nextchar += strlen (nextchar);
- optind++;
- optopt = 0;
- return '?';
- }
-
- if (pfound != NULL)
- {
- option_index = indfound;
- optind++;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (print_errors)
- {
- if (argv[optind - 1][1] == '-')
- /* --option */
- fprintf (stderr,
- _("%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
- else
- /* +option or -option */
- fprintf (stderr,
- _("%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0], pfound->name);
- }
-
- nextchar += strlen (nextchar);
-
- optopt = pfound->val;
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (print_errors)
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
- nextchar += strlen (nextchar);
- optopt = pfound->val;
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
-
- /* Can't find it as a long option. If this is not getopt_long_only,
- or the option starts with '--' or is not a valid short
- option, then it's an error.
- Otherwise interpret it as a short option. */
- if (!long_only || argv[optind][1] == '-'
- || my_index (optstring, *nextchar) == NULL)
- {
- if (print_errors)
- {
- if (argv[optind][1] == '-')
- /* --option */
- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
- argv[0], nextchar);
- else
- /* +option or -option */
- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[optind][0], nextchar);
- }
- nextchar = (char *) "";
- optind++;
- optopt = 0;
- return '?';
- }
- }
-
- /* Look at and handle the next short option-character. */
-
- {
- char c = *nextchar++;
- char *temp = my_index (optstring, c);
-
- /* Increment `optind' when we start to process its last character. */
- if (*nextchar == '\0')
- ++optind;
-
- if (temp == NULL || c == ':')
- {
- if (print_errors)
- {
- if (posixly_correct)
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr, _("%s: illegal option -- %c\n"),
- argv[0], c);
- else
- fprintf (stderr, _("%s: invalid option -- %c\n"),
- argv[0], c);
- }
- optopt = c;
- return '?';
- }
- /* Convenience. Treat POSIX -W foo same as long option --foo */
- if (temp[0] == 'W' && temp[1] == ';')
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = 0;
- int option_index;
-
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (print_errors)
- {
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr, _("%s: option requires an argument -- %c\n"),
- argv[0], c);
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- return c;
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
-
- /* optarg is now the argument, see if it's in the
- table of longopts. */
-
- for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar) == strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
- if (ambig && !exact)
- {
- if (print_errors)
- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[optind]);
- nextchar += strlen (nextchar);
- optind++;
- return '?';
- }
- if (pfound != NULL)
- {
- option_index = indfound;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (print_errors)
- fprintf (stderr, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-
- nextchar += strlen (nextchar);
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (print_errors)
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
- nextchar += strlen (nextchar);
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
- nextchar = NULL;
- return 'W'; /* Let the application handle it. */
- }
- if (temp[1] == ':')
- {
- if (temp[2] == ':')
- {
- /* This is an option that accepts an argument optionally. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- optind++;
- }
- else
- optarg = NULL;
- nextchar = NULL;
- }
- else
- {
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (print_errors)
- {
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c);
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
- nextchar = NULL;
- }
- }
- return c;
- }
-}
-
-int
-getopt (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- return _getopt_internal (argc, argv, optstring,
- (const struct option *) 0,
- (int *) 0,
- 0);
-}
-
-#endif /* Not ELIDE_CODE. */
-
-#ifdef TEST
-
-/* Compile with -DTEST to make an executable for use in testing
- the above definition of `getopt'. */
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
-
- c = getopt (argc, argv, "abc:d:0123456789");
- if (c == -1)
- break;
-
- switch (c)
- {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/contrib/groff/src/libs/libgroff/getopt1.c b/contrib/groff/src/libs/libgroff/getopt1.c
deleted file mode 100644
index 3d264f2db4d5..000000000000
--- a/contrib/groff/src/libs/libgroff/getopt1.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "getopt.h"
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-#include <gnu-versions.h>
-#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
-}
-
-/* Like getopt_long, but '-' as well as '--' can indicate a long option.
- If an option that starts with '-' (not '--') doesn't match a long option,
- but does match a short option, it is parsed as a short option
- instead. */
-
-int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
-}
-
-
-#endif /* Not ELIDE_CODE. */
-
-#ifdef TEST
-
-#include <stdio.h>
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
- int option_index = 0;
- static struct option long_options[] =
- {
- {"add", 1, 0, 0},
- {"append", 0, 0, 0},
- {"delete", 1, 0, 0},
- {"verbose", 0, 0, 0},
- {"create", 0, 0, 0},
- {"file", 1, 0, 0},
- {0, 0, 0, 0}
- };
-
- c = getopt_long (argc, argv, "abc:d:0123456789",
- long_options, &option_index);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 0:
- printf ("option %s", long_options[option_index].name);
- if (optarg)
- printf (" with arg %s", optarg);
- printf ("\n");
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case 'd':
- printf ("option d with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/contrib/groff/src/libs/libgroff/htmlindicate.cc b/contrib/groff/src/libs/libgroff/htmlindicate.cc
deleted file mode 100644
index 2e6a5d7de6ae..000000000000
--- a/contrib/groff/src/libs/libgroff/htmlindicate.cc
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Gaius Mulley (gaius@glam.ac.uk)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "nonposix.h"
-#include "stringclass.h"
-#include "html-strings.h"
-
-/*
- * This file contains a very simple set of routines shared by
- * tbl, pic, eqn which help the html device driver to make
- * sensible formatting choices. Currently it simply indicates
- * to pre-html when an image is about to be created this is then
- * passes to pre-html.
- * Pre-html runs troff twice, once with -Thtml and once with -Tps.
- * troff -Thtml device driver emits a <src='image'.png> tag
- * and the postscript device driver works out the min/max limits
- * of the graphic region. These region limits are read by pre-html
- * and an image is generated via troff -Tps -> gs -> png
- */
-
-static int is_in_graphic_start = 0;
-static int is_inline_image = 0;
-
-/*
- * html_begin_suppress - emit a start of image tag which will be seen
- * by pre-html.
- */
-void html_begin_suppress(int is_inline)
-{
- if (is_inline)
- put_string(HTML_IMAGE_INLINE_BEGIN, stdout);
- else {
- put_string(HTML_IMAGE_CENTERED, stdout);
- put_string("\n", stdout);
- }
-}
-
-/*
- * html_end_suppress - emit an end of image tag which will be seen
- * by pre-html.
- */
-void html_end_suppress(int is_inline)
-{
- if (is_inline)
- put_string(HTML_IMAGE_INLINE_END, stdout);
- else {
- put_string(HTML_IMAGE_END, stdout);
- put_string("\n", stdout);
- }
-}
-
-/*
- * graphic_start - The boolean, is_inline, should be:
- *
- * FALSE if this is called via EQ, TS, PS, and
- * TRUE if issued via delim $$ $ x over y $ etc.
- */
-void graphic_start(int is_inline)
-{
- if (!is_in_graphic_start) {
- html_begin_suppress(is_inline);
- is_inline_image = is_inline;
- is_in_graphic_start = 1;
- }
-}
-
-/*
- * graphic_end - tell troff that the image region is ending.
- */
-
-void graphic_end()
-{
- if (is_in_graphic_start) {
- html_end_suppress(is_inline_image);
- is_in_graphic_start = 0;
- }
-}
diff --git a/contrib/groff/src/libs/libgroff/iftoa.c b/contrib/groff/src/libs/libgroff/iftoa.c
deleted file mode 100644
index 29a3d894cb4a..000000000000
--- a/contrib/groff/src/libs/libgroff/iftoa.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define INT_DIGITS 19 /* enough for 64-bit integer */
-
-char *if_to_a(i, decimal_point)
- int i, decimal_point;
-{
- /* room for a -, INT_DIGITS digits, a decimal point, and a terminating '\0' */
- static char buf[INT_DIGITS + 3];
- char *p = buf + INT_DIGITS + 2;
- int point = 0;
- buf[INT_DIGITS + 2] = '\0';
- /* assert(decimal_point <= INT_DIGITS); */
- if (i >= 0) {
- do {
- *--p = '0' + (i % 10);
- i /= 10;
- if (++point == decimal_point)
- *--p = '.';
- } while (i != 0 || point < decimal_point);
- }
- else { /* i < 0 */
- do {
- *--p = '0' - (i % 10);
- i /= 10;
- if (++point == decimal_point)
- *--p = '.';
- } while (i != 0 || point < decimal_point);
- *--p = '-';
- }
- if (decimal_point > 0) {
- char *q;
- /* there must be a dot, so this will terminate */
- for (q = buf + INT_DIGITS + 2; q[-1] == '0'; --q)
- ;
- if (q[-1] == '.') {
- if (q - 1 == p) {
- q[-1] = '0';
- q[0] = '\0';
- }
- else
- q[-1] = '\0';
- }
- else
- *q = '\0';
- }
- return p;
-}
diff --git a/contrib/groff/src/libs/libgroff/illegal.cc b/contrib/groff/src/libs/libgroff/illegal.cc
deleted file mode 100644
index 07a9a8a52a04..000000000000
--- a/contrib/groff/src/libs/libgroff/illegal.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* $FreeBSD$ */
-
-#include "lib.h"
-
-// Table of illegal input characters.
-
-char illegal_char_table[256]= {
-#ifndef IS_EBCDIC_HOST
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-#else
- 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1,
- 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-#endif
-};
diff --git a/contrib/groff/src/libs/libgroff/itoa.c b/contrib/groff/src/libs/libgroff/itoa.c
deleted file mode 100644
index 72826b748f7e..000000000000
--- a/contrib/groff/src/libs/libgroff/itoa.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define INT_DIGITS 19 /* enough for 64 bit integer */
-
-char *i_to_a(i)
- int i;
-{
- /* Room for INT_DIGITS digits, - and '\0' */
- static char buf[INT_DIGITS + 2];
- char *p = buf + INT_DIGITS + 1; /* points to terminating '\0' */
- if (i >= 0) {
- do {
- *--p = '0' + (i % 10);
- i /= 10;
- } while (i != 0);
- return p;
- }
- else { /* i < 0 */
- do {
- *--p = '0' - (i % 10);
- i /= 10;
- } while (i != 0);
- *--p = '-';
- }
- return p;
-}
diff --git a/contrib/groff/src/libs/libgroff/lf.cc b/contrib/groff/src/libs/libgroff/lf.cc
deleted file mode 100644
index 34272c7d03d0..000000000000
--- a/contrib/groff/src/libs/libgroff/lf.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <string.h>
-#include <ctype.h>
-#include "cset.h"
-#include "stringclass.h"
-
-extern void change_filename(const char *);
-extern void change_lineno(int);
-
-int interpret_lf_args(const char *p)
-{
- while (*p == ' ')
- p++;
- if (!csdigit(*p))
- return 0;
- int ln = 0;
- do {
- ln *= 10;
- ln += *p++ - '0';
- } while (csdigit(*p));
- if (*p != ' ' && *p != '\n' && *p != '\0')
- return 0;
- while (*p == ' ')
- p++;
- if (*p == '\0' || *p == '\n') {
- change_lineno(ln);
- return 1;
- }
- const char *q;
- for (q = p;
- *q != '\0' && *q != ' ' && *q != '\n' && *q != '\\';
- q++)
- ;
- string tem(p, q - p);
- while (*q == ' ')
- q++;
- if (*q != '\n' && *q != '\0')
- return 0;
- tem += '\0';
- change_filename(tem.contents());
- change_lineno(ln);
- return 1;
-}
diff --git a/contrib/groff/src/libs/libgroff/lineno.cc b/contrib/groff/src/libs/libgroff/lineno.cc
deleted file mode 100644
index f7138dba0210..000000000000
--- a/contrib/groff/src/libs/libgroff/lineno.cc
+++ /dev/null
@@ -1 +0,0 @@
-int current_lineno = 0;
diff --git a/contrib/groff/src/libs/libgroff/macropath.cc b/contrib/groff/src/libs/libgroff/macropath.cc
deleted file mode 100644
index 03c04cbafd79..000000000000
--- a/contrib/groff/src/libs/libgroff/macropath.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "lib.h"
-#include "searchpath.h"
-#include "macropath.h"
-#include "defs.h"
-
-#define MACROPATH_ENVVAR "GROFF_TMAC_PATH"
-
-search_path macro_path(MACROPATH_ENVVAR, MACROPATH, 1, 1);
-search_path safer_macro_path(MACROPATH_ENVVAR, MACROPATH, 1, 0);
-search_path config_macro_path(MACROPATH_ENVVAR, MACROPATH, 0, 0);
diff --git a/contrib/groff/src/libs/libgroff/matherr.c b/contrib/groff/src/libs/libgroff/matherr.c
deleted file mode 100644
index b0097b8b5559..000000000000
--- a/contrib/groff/src/libs/libgroff/matherr.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <math.h>
-#include <errno.h>
-
-#ifdef HAVE_STRUCT_EXCEPTION
-#ifdef TLOSS
-
-int matherr(exc)
-struct exception *exc;
-{
- switch (exc->type) {
- case SING:
- case DOMAIN:
- errno = EDOM;
- break;
- case OVERFLOW:
- case UNDERFLOW:
- case TLOSS:
- case PLOSS:
- errno = ERANGE;
- break;
- }
- return 1;
-}
-
-#endif /* TLOSS */
-#endif /* HAVE_STRUCT_EXCEPTION */
diff --git a/contrib/groff/src/libs/libgroff/nametoindex.cc b/contrib/groff/src/libs/libgroff/nametoindex.cc
deleted file mode 100644
index 578ff349d443..000000000000
--- a/contrib/groff/src/libs/libgroff/nametoindex.cc
+++ /dev/null
@@ -1,118 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-#include <stdlib.h>
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "font.h"
-#include "ptable.h"
-
-declare_ptable(int)
-implement_ptable(int)
-
-class character_indexer {
-public:
- character_indexer();
- ~character_indexer();
- int ascii_char_index(unsigned char);
- int named_char_index(const char *);
- int numbered_char_index(int);
-private:
- enum { NSMALL = 256 };
- int next_index;
- int ascii_index[256];
- int small_number_index[NSMALL];
- PTABLE(int) table;
- int lookup_char(const char *, int);
-};
-
-character_indexer::character_indexer()
-: next_index(0)
-{
- int i;
- for (i = 0; i < 256; i++)
- ascii_index[i] = -1;
- for (i = 0; i < NSMALL; i++)
- small_number_index[i] = -1;
-}
-
-character_indexer::~character_indexer()
-{
-}
-
-int character_indexer::ascii_char_index(unsigned char c)
-{
- if (ascii_index[c] < 0)
- ascii_index[c] = next_index++;
- return ascii_index[c];
-}
-
-int character_indexer::numbered_char_index(int n)
-{
- if (n >= 0 && n < NSMALL) {
- if (small_number_index[n] < 0)
- small_number_index[n] = next_index++;
- return small_number_index[n];
- }
- // Not the most efficient possible implementation.
- char buf[INT_DIGITS + 3];
- buf[0] = ' ';
- strcpy(buf + 1, i_to_a(n));
- return named_char_index(buf);
-}
-
-int character_indexer::named_char_index(const char *s)
-{
- int *np = table.lookup(s);
- if (!np) {
- np = new int;
- *np = next_index++;
- table.define(s, np);
- }
- return *np;
-}
-
-static character_indexer indexer;
-
-int font::number_to_index(int n)
-{
- return indexer.numbered_char_index(n);
-}
-
-int font::name_to_index(const char *s)
-{
- assert(s != 0 && s[0] != '\0' && s[0] != ' ');
- if (s[1] == '\0')
- return indexer.ascii_char_index(s[0]);
- /* char128 and \200 are synonyms */
- if (s[0] == 'c' && s[1] == 'h' && s[2] == 'a' && s[3] == 'r') {
- char *res;
- long n = strtol(s + 4, &res, 10);
- if (res != s + 4 && *res == '\0' && n >= 0 && n < 256)
- return indexer.ascii_char_index((unsigned char)n);
- }
- return indexer.named_char_index(s);
-}
-
diff --git a/contrib/groff/src/libs/libgroff/new.cc b/contrib/groff/src/libs/libgroff/new.cc
deleted file mode 100644
index 8d98591a64af..000000000000
--- a/contrib/groff/src/libs/libgroff/new.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "posix.h"
-#include "nonposix.h"
-
-extern const char *program_name;
-
-static void ewrite(const char *s)
-{
- write(2, s, strlen(s));
-}
-
-void *operator new(size_t size)
-{
- // Avoid relying on the behaviour of malloc(0).
- if (size == 0)
- size++;
-#ifdef COOKIE_BUG
- char *p = (char *)malloc(unsigned(size + 8));
-#else /* not COOKIE_BUG */
- char *p = (char *)malloc(unsigned(size));
-#endif /* not COOKIE_BUG */
- if (p == 0) {
- if (program_name) {
- ewrite(program_name);
- ewrite(": ");
- }
- ewrite("out of memory\n");
- _exit(-1);
- }
-#ifdef COOKIE_BUG
- ((unsigned *)p)[1] = 0;
- return p + 8;
-#else /* not COOKIE_BUG */
- return p;
-#endif /* not COOKIE_BUG */
-}
-
-#ifdef COOKIE_BUG
-
-void operator delete(void *p)
-{
- if (p)
- free((void *)((char *)p - 8));
-}
-
-#endif /* COOKIE_BUG */
diff --git a/contrib/groff/src/libs/libgroff/prime.cc b/contrib/groff/src/libs/libgroff/prime.cc
deleted file mode 100644
index f0b1eadcc68b..000000000000
--- a/contrib/groff/src/libs/libgroff/prime.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <math.h>
-
-int is_prime(unsigned n)
-{
- if (n <= 3)
- return 1;
- if (!(n & 1))
- return 0;
- if (n % 3 == 0)
- return 0;
- unsigned lim = unsigned(sqrt((double)n));
- unsigned d = 5;
- for (;;) {
- if (d > lim)
- break;
- if (n % d == 0)
- return 0;
- d += 2;
- if (d > lim)
- break;
- if (n % d == 0)
- return 0;
- d += 4;
- }
- return 1;
-}
diff --git a/contrib/groff/src/libs/libgroff/progname.cc b/contrib/groff/src/libs/libgroff/progname.cc
deleted file mode 100644
index a70e3419c2be..000000000000
--- a/contrib/groff/src/libs/libgroff/progname.cc
+++ /dev/null
@@ -1 +0,0 @@
-const char *program_name = 0;
diff --git a/contrib/groff/src/libs/libgroff/ptable.cc b/contrib/groff/src/libs/libgroff/ptable.cc
deleted file mode 100644
index 76735c2426de..000000000000
--- a/contrib/groff/src/libs/libgroff/ptable.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "ptable.h"
-#include "errarg.h"
-#include "error.h"
-
-unsigned long hash_string(const char *s)
-{
- assert(s != 0);
- unsigned long h = 0, g;
- while (*s != 0) {
- h <<= 4;
- h += *s++;
- if ((g = h & 0xf0000000) != 0) {
- h ^= g >> 24;
- h ^= g;
- }
- }
- return h;
-}
-
-static const unsigned table_sizes[] = {
-101, 503, 1009, 2003, 3001, 4001, 5003, 10007, 20011, 40009,
-80021, 160001, 500009, 1000003, 2000003, 4000037, 8000009,
-16000057, 32000011, 64000031, 128000003, 0
-};
-
-unsigned next_ptable_size(unsigned n)
-{
- const unsigned *p;
- for (p = table_sizes; *p <= n; p++)
- if (*p == 0)
- fatal("cannot expand table");
- return *p;
-}
diff --git a/contrib/groff/src/libs/libgroff/putenv.c b/contrib/groff/src/libs/libgroff/putenv.c
deleted file mode 100644
index c1ca671ae89f..000000000000
--- a/contrib/groff/src/libs/libgroff/putenv.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Hacked slightly by jjc@jclark.com for groff. */
-
-#include <string.h>
-
-#ifdef __STDC__
-#include <stddef.h>
-typedef void *PTR;
-typedef size_t SIZE_T;
-#else /* not __STDC__ */
-typedef char *PTR;
-typedef int SIZE_T;
-#endif /* not __STDC__ */
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#else /* not HAVE_STDLIB_H */
-PTR malloc();
-#endif /* not HAVE_STDLIB_H */
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-extern char **environ;
-
-/* Put STRING, which is of the form "NAME=VALUE", in the environment. */
-
-int putenv(const char *string)
-{
- char *name_end = strchr(string, '=');
- SIZE_T size;
- char **ep;
-
- if (name_end == NULL)
- {
- /* Remove the variable from the environment. */
- size = strlen(string);
- for (ep = environ; *ep != NULL; ++ep)
- if (!strncmp(*ep, string, size) && (*ep)[size] == '=')
- {
- while (ep[1] != NULL)
- {
- ep[0] = ep[1];
- ++ep;
- }
- *ep = NULL;
- return 0;
- }
- }
-
- size = 0;
- for (ep = environ; *ep != NULL; ++ep)
- if (!strncmp(*ep, string, name_end - string)
- && (*ep)[name_end - string] == '=')
- break;
- else
- ++size;
-
- if (*ep == NULL)
- {
- static char **last_environ = NULL;
- char **new_environ = (char **) malloc((size + 2) * sizeof(char *));
- if (new_environ == NULL)
- return -1;
- (void) memcpy((PTR) new_environ, (PTR) environ, size * sizeof(char *));
- new_environ[size] = (char *) string;
- new_environ[size + 1] = NULL;
- if (last_environ != NULL)
- free((PTR) last_environ);
- last_environ = new_environ;
- environ = new_environ;
- }
- else
- *ep = (char *) string;
-
- return 0;
-}
diff --git a/contrib/groff/src/libs/libgroff/searchpath.cc b/contrib/groff/src/libs/libgroff/searchpath.cc
deleted file mode 100644
index f4e2b90d3151..000000000000
--- a/contrib/groff/src/libs/libgroff/searchpath.cc
+++ /dev/null
@@ -1,132 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "lib.h"
-#include "searchpath.h"
-#include "nonposix.h"
-
-search_path::search_path(const char *envvar, const char *standard,
- int add_home, int add_current)
-{
- char *home = 0;
- if (add_home)
- home = getenv("HOME");
- char *e = 0;
- if (envvar)
- e = getenv(envvar);
- dirs = new char[((e && *e) ? strlen(e) + 1 : 0)
- + (add_current ? 1 + 1 : 0)
- + ((home && *home) ? strlen(home) + 1 : 0)
- + ((standard && *standard) ? strlen(standard) : 0)
- + 1];
- *dirs = '\0';
- if (e && *e) {
- strcat(dirs, e);
- strcat(dirs, PATH_SEP);
- }
- if (add_current) {
- strcat(dirs, ".");
- strcat(dirs, PATH_SEP);
- }
- if (home && *home) {
- strcat(dirs, home);
- strcat(dirs, PATH_SEP);
- }
- if (standard && *standard)
- strcat(dirs, standard);
- init_len = strlen(dirs);
-}
-
-search_path::~search_path()
-{
- // dirs is always allocated
- a_delete dirs;
-}
-
-void search_path::command_line_dir(const char *s)
-{
- char *old = dirs;
- unsigned old_len = strlen(old);
- unsigned slen = strlen(s);
- dirs = new char[old_len + 1 + slen + 1];
- memcpy(dirs, old, old_len - init_len);
- char *p = dirs;
- p += old_len - init_len;
- if (init_len == 0)
- *p++ = PATH_SEP[0];
- memcpy(p, s, slen);
- p += slen;
- if (init_len > 0) {
- *p++ = PATH_SEP[0];
- memcpy(p, old + old_len - init_len, init_len);
- p += init_len;
- }
- *p++ = '\0';
- a_delete old;
-}
-
-FILE *search_path::open_file(const char *name, char **pathp)
-{
- assert(name != 0);
- if (IS_ABSOLUTE(name) || *dirs == '\0') {
- FILE *fp = fopen(name, "r");
- if (fp) {
- if (pathp)
- *pathp = strsave(name);
- return fp;
- }
- else
- return 0;
- }
- unsigned namelen = strlen(name);
- char *p = dirs;
- for (;;) {
- char *end = strchr(p, PATH_SEP[0]);
- if (!end)
- end = strchr(p, '\0');
- int need_slash = end > p && strchr(DIR_SEPS, end[-1]) == 0;
- char *path = new char[(end - p) + need_slash + namelen + 1];
- memcpy(path, p, end - p);
- if (need_slash)
- path[end - p] = '/';
- strcpy(path + (end - p) + need_slash, name);
-#if 0
- fprintf(stderr, "trying `%s'\n", path);
-#endif
- FILE *fp = fopen(path, "r");
- if (fp) {
- if (pathp)
- *pathp = path;
- else
- a_delete path;
- return fp;
- }
- a_delete path;
- if (*end == '\0')
- break;
- p = end + 1;
- }
- return 0;
-}
diff --git a/contrib/groff/src/libs/libgroff/strerror.c b/contrib/groff/src/libs/libgroff/strerror.c
deleted file mode 100644
index 69089f13235f..000000000000
--- a/contrib/groff/src/libs/libgroff/strerror.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-
-#define INT_DIGITS 19 /* enough for 64 bit integer */
-
-#ifndef HAVE_SYS_NERR
-extern int sys_nerr;
-#endif
-#ifndef HAVE_SYS_ERRLIST
-extern char *sys_errlist[];
-#endif
-
-char *strerror(n)
- int n;
-{
- static char buf[sizeof("Error ") + 1 + INT_DIGITS];
- if (n >= 0 && n < sys_nerr && sys_errlist[n] != 0)
- return sys_errlist[n];
- else {
- sprintf(buf, "Error %d", n);
- return buf;
- }
-}
diff --git a/contrib/groff/src/libs/libgroff/string.cc b/contrib/groff/src/libs/libgroff/string.cc
deleted file mode 100644
index 4bcd4cccb047..000000000000
--- a/contrib/groff/src/libs/libgroff/string.cc
+++ /dev/null
@@ -1,311 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include "stringclass.h"
-#include "lib.h"
-
-static char *salloc(int len, int *sizep);
-static void sfree(char *ptr, int size);
-static char *sfree_alloc(char *ptr, int size, int len, int *sizep);
-static char *srealloc(char *ptr, int size, int oldlen, int newlen, int *sizep);
-
-static char *salloc(int len, int *sizep)
-{
- if (len == 0) {
- *sizep = 0;
- return 0;
- }
- else
- return new char[*sizep = len*2];
-}
-
-static void sfree(char *ptr, int)
-{
- a_delete ptr;
-}
-
-static char *sfree_alloc(char *ptr, int oldsz, int len, int *sizep)
-{
- if (oldsz >= len) {
- *sizep = oldsz;
- return ptr;
- }
- a_delete ptr;
- if (len == 0) {
- *sizep = 0;
- return 0;
- }
- else
- return new char[*sizep = len*2];
-}
-
-static char *srealloc(char *ptr, int oldsz, int oldlen, int newlen, int *sizep)
-{
- if (oldsz >= newlen) {
- *sizep = oldsz;
- return ptr;
- }
- if (newlen == 0) {
- a_delete ptr;
- *sizep = 0;
- return 0;
- }
- else {
- char *p = new char[*sizep = newlen*2];
- if (oldlen < newlen && oldlen != 0)
- memcpy(p, ptr, oldlen);
- a_delete ptr;
- return p;
- }
-}
-
-string::string() : ptr(0), len(0), sz(0)
-{
-}
-
-string::string(const char *p, int n) : len(n)
-{
- assert(n >= 0);
- ptr = salloc(n, &sz);
- if (n != 0)
- memcpy(ptr, p, n);
-}
-
-string::string(const char *p)
-{
- if (p == 0) {
- len = 0;
- ptr = 0;
- sz = 0;
- }
- else {
- len = strlen(p);
- ptr = salloc(len, &sz);
- memcpy(ptr, p, len);
- }
-}
-
-string::string(char c) : len(1)
-{
- ptr = salloc(1, &sz);
- *ptr = c;
-}
-
-string::string(const string &s) : len(s.len)
-{
- ptr = salloc(len, &sz);
- if (len != 0)
- memcpy(ptr, s.ptr, len);
-}
-
-string::~string()
-{
- sfree(ptr, sz);
-}
-
-string &string::operator=(const string &s)
-{
- ptr = sfree_alloc(ptr, sz, s.len, &sz);
- len = s.len;
- if (len != 0)
- memcpy(ptr, s.ptr, len);
- return *this;
-}
-
-string &string::operator=(const char *p)
-{
- if (p == 0) {
- sfree(ptr, len);
- len = 0;
- ptr = 0;
- sz = 0;
- }
- else {
- int slen = strlen(p);
- ptr = sfree_alloc(ptr, sz, slen, &sz);
- len = slen;
- memcpy(ptr, p, len);
- }
- return *this;
-}
-
-string &string::operator=(char c)
-{
- ptr = sfree_alloc(ptr, sz, 1, &sz);
- len = 1;
- *ptr = c;
- return *this;
-}
-
-void string::move(string &s)
-{
- sfree(ptr, sz);
- ptr = s.ptr;
- len = s.len;
- sz = s.sz;
- s.ptr = 0;
- s.len = 0;
- s.sz = 0;
-}
-
-void string::grow1()
-{
- ptr = srealloc(ptr, sz, len, len + 1, &sz);
-}
-
-string &string::operator+=(const char *p)
-{
- if (p != 0) {
- int n = strlen(p);
- int newlen = len + n;
- if (newlen > sz)
- ptr = srealloc(ptr, sz, len, newlen, &sz);
- memcpy(ptr + len, p, n);
- len = newlen;
- }
- return *this;
-}
-
-string &string::operator+=(const string &s)
-{
- if (s.len != 0) {
- int newlen = len + s.len;
- if (newlen > sz)
- ptr = srealloc(ptr, sz, len, newlen, &sz);
- memcpy(ptr + len, s.ptr, s.len);
- len = newlen;
- }
- return *this;
-}
-
-void string::append(const char *p, int n)
-{
- if (n > 0) {
- int newlen = len + n;
- if (newlen > sz)
- ptr = srealloc(ptr, sz, len, newlen, &sz);
- memcpy(ptr + len, p, n);
- len = newlen;
- }
-}
-
-string::string(const char *s1, int n1, const char *s2, int n2)
-{
- assert(n1 >= 0 && n2 >= 0);
- len = n1 + n2;
- if (len == 0) {
- sz = 0;
- ptr = 0;
- }
- else {
- ptr = salloc(len, &sz);
- if (n1 == 0)
- memcpy(ptr, s2, n2);
- else {
- memcpy(ptr, s1, n1);
- if (n2 != 0)
- memcpy(ptr + n1, s2, n2);
- }
- }
-}
-
-int operator<=(const string &s1, const string &s2)
-{
- return (s1.len <= s2.len
- ? s1.len == 0 || memcmp(s1.ptr, s2.ptr, s1.len) <= 0
- : s2.len != 0 && memcmp(s1.ptr, s2.ptr, s2.len) < 0);
-}
-
-int operator<(const string &s1, const string &s2)
-{
- return (s1.len < s2.len
- ? s1.len == 0 || memcmp(s1.ptr, s2.ptr, s1.len) <= 0
- : s2.len != 0 && memcmp(s1.ptr, s2.ptr, s2.len) < 0);
-}
-
-int operator>=(const string &s1, const string &s2)
-{
- return (s1.len >= s2.len
- ? s2.len == 0 || memcmp(s1.ptr, s2.ptr, s2.len) >= 0
- : s1.len != 0 && memcmp(s1.ptr, s2.ptr, s1.len) > 0);
-}
-
-int operator>(const string &s1, const string &s2)
-{
- return (s1.len > s2.len
- ? s2.len == 0 || memcmp(s1.ptr, s2.ptr, s2.len) >= 0
- : s1.len != 0 && memcmp(s1.ptr, s2.ptr, s1.len) > 0);
-}
-
-void string::set_length(int i)
-{
- assert(i >= 0);
- if (i > sz)
- ptr = srealloc(ptr, sz, len, i, &sz);
- len = i;
-}
-
-void string::clear()
-{
- len = 0;
-}
-
-int string::search(char c) const
-{
- char *p = ptr ? (char *)memchr(ptr, c, len) : NULL;
- return p ? p - ptr : -1;
-}
-
-// we silently strip nuls
-
-char *string::extract() const
-{
- char *p = ptr;
- int n = len;
- int nnuls = 0;
- int i;
- for (i = 0; i < n; i++)
- if (p[i] == '\0')
- nnuls++;
- char *q = new char[n + 1 - nnuls];
- char *r = q;
- for (i = 0; i < n; i++)
- if (p[i] != '\0')
- *r++ = p[i];
- q[n] = '\0';
- return q;
-}
-
-void put_string(const string &s, FILE *fp)
-{
- int len = s.length();
- const char *ptr = s.contents();
- for (int i = 0; i < len; i++)
- putc(ptr[i], fp);
-}
-
-string as_string(int i)
-{
- static char buf[INT_DIGITS + 2];
- sprintf(buf, "%d", i);
- return string(buf);
-}
-
diff --git a/contrib/groff/src/libs/libgroff/strsave.cc b/contrib/groff/src/libs/libgroff/strsave.cc
deleted file mode 100644
index dfd2b6f40743..000000000000
--- a/contrib/groff/src/libs/libgroff/strsave.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <string.h>
-
-char *strsave(const char *s)
-{
- if (s == 0)
- return 0;
- char *p = new char[strlen(s) + 1];
- strcpy(p, s);
- return p;
-}
-
diff --git a/contrib/groff/src/libs/libgroff/strtol.c b/contrib/groff/src/libs/libgroff/strtol.c
deleted file mode 100644
index 61ce70e98775..000000000000
--- a/contrib/groff/src/libs/libgroff/strtol.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-
-#ifndef LONG_MIN
-#define LONG_MIN (-LONG_MAX-1)
-#endif
-
-#ifdef isascii
-#define ISASCII(c) isascii(c)
-#else
-#define ISASCII(c) (1)
-#endif
-
-long strtol(str, ptr, base)
- char *str, **ptr;
- int base;
-{
- char *start = str;
- int neg = 0;
- long val;
- char *p;
- static char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
-
- while (ISASCII((unsigned char)*str) && isspace((unsigned char)*str))
- str++;
-
- if (*str == '-') {
- neg = 1;
- str++;
- }
- if (base == 0) {
- if (*str == '0') {
- if (str[1] == 'x' || str[1] == 'X') {
- str += 2;
- base = 16;
- }
- else
- base = 8;
- }
- else
- base = 10;
- }
- if (base < 2 || base > 36)
- base = 10;
- else if (base == 16 && *str == '0' && (str[1] == 'x' || str[1] == 'X'))
- str += 2;
-
- p = strchr(digits, (ISASCII((unsigned char)*str)
- && isupper((unsigned char)*str)
- ? tolower((unsigned char)*str)
- : *str));
- if (p == 0 || (val = (p - digits)) >= base) {
- if (base == 16 && str > start && (str[-1] == 'x' || str[-1] == 'X')) {
- if (ptr)
- *ptr = str - 1;
- }
- else {
- if (ptr)
- *ptr = start;
- errno = ERANGE;
- }
- return 0;
- }
- if (neg)
- val = -val;
-
- while (*++str != '\0') {
- int n;
-
- p = strchr(digits, (ISASCII((unsigned char)*str)
- && isupper((unsigned char)*str)
- ? tolower((unsigned char)*str) : *str));
- if (p == 0)
- break;
- n = p - digits;
- if (n >= base)
- break;
- if (neg) {
- if (-(unsigned long)val > (-(unsigned long)LONG_MIN - n)/base) {
- val = LONG_MIN;
- errno = ERANGE;
- }
- else
- val = val*base - n;
- }
- else {
- if (val > (LONG_MAX - n)/base) {
- val = LONG_MAX;
- errno = ERANGE;
- }
- else
- val = val*base + n;
- }
- }
-
- if (ptr)
- *ptr = str;
-
- return val;
-}
diff --git a/contrib/groff/src/libs/libgroff/tmpfile.cc b/contrib/groff/src/libs/libgroff/tmpfile.cc
deleted file mode 100644
index a6c20101667f..000000000000
--- a/contrib/groff/src/libs/libgroff/tmpfile.cc
+++ /dev/null
@@ -1,186 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "posix.h"
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "nonposix.h"
-
-extern "C" {
- // Solaris 2.5.1 has these functions,
- // but its stdlib.h fails to declare them.
- char *mktemp(char *);
- int mkstemp(char *);
-}
-
-// If this is set, create temporary files there
-#define GROFF_TMPDIR_ENVVAR "GROFF_TMPDIR"
-// otherwise if this is set, create temporary files there
-#define TMPDIR_ENVVAR "TMPDIR"
-// otherwise if P_tmpdir is defined, create temporary files there
-#ifdef P_tmpdir
-# define DEFAULT_TMPDIR P_tmpdir
-#else
-// otherwise create temporary files here.
-# define DEFAULT_TMPDIR "/tmp"
-#endif
-// Use this as the prefix for temporary filenames.
-#define TMPFILE_PREFIX "groff"
-
-/*
- * Generate a temporary name template with a postfix
- * immediately after the TMPFILE_PREFIX.
- * It uses the groff preferences for a temporary directory.
- * Note that no file name is either created or opened,
- * only the *template* is returned.
- */
-
-char *xtmptemplate(char *postfix)
-{
- const char *dir = getenv(GROFF_TMPDIR_ENVVAR);
- int postlen = 0;
-
- if (postfix)
- postlen = strlen(postfix);
-
- if (!dir) {
- dir = getenv(TMPDIR_ENVVAR);
- if (!dir)
- dir = DEFAULT_TMPDIR;
- }
-
- size_t dir_len = strlen(dir);
- const char *dir_end = dir + dir_len - 1;
- int needs_slash = strchr(DIR_SEPS, *dir_end) == NULL;
- char *templ = new char[strlen(dir) + needs_slash
- + sizeof(TMPFILE_PREFIX) - 1 + 6 + 1 + postlen];
- strcpy(templ, dir);
- if (needs_slash)
- strcat(templ, "/");
- strcat(templ, TMPFILE_PREFIX);
- if (postlen > 0)
- strcat(templ, postfix);
- strcat(templ, "XXXXXX");
-
- return( templ );
-}
-
-// The trick with unlinking the temporary file while it is still in
-// use is not portable, it will fail on MS-DOS and most MS-Windows
-// filesystems. So it cannot be used on non-Posix systems.
-// Instead, we maintain a list of files to be deleted on exit, and
-// register an atexit function that will remove them all in one go.
-// This should be portable to all platforms.
-
-static struct xtmpfile_list {
- struct xtmpfile_list *next;
- char fname[1];
-} *xtmpfiles_to_delete;
-
-static void remove_tmp_files()
-{
- struct xtmpfile_list *p = xtmpfiles_to_delete;
-
- while (p)
- {
- if (unlink(p->fname) < 0)
- error("cannot unlink `%1': %2", p->fname, strerror(errno));
- struct xtmpfile_list *old = p;
- p = p->next;
- free(old);
- }
-}
-
-static void add_tmp_file(const char *name)
-{
- if (xtmpfiles_to_delete == NULL)
- atexit(remove_tmp_files);
-
- struct xtmpfile_list *p
- = (struct xtmpfile_list *)malloc(sizeof(struct xtmpfile_list)
- + strlen (name));
- if (p == NULL)
- {
- error("cannot unlink `%1': %2", name, strerror(errno));
- return;
- }
- p->next = xtmpfiles_to_delete;
- strcpy(p->fname, name);
- xtmpfiles_to_delete = p;
-}
-
-// Open a temporary file and with fatal error on failure.
-
-#ifndef _MSC_VER
-
-FILE *xtmpfile(char **namep, char *postfix, int do_unlink)
-{
- char *templ = xtmptemplate(postfix);
-
-#ifdef HAVE_MKSTEMP
- errno = 0;
- int fd = mkstemp(templ);
- if (fd < 0)
- fatal("cannot create temporary file: %1", strerror(errno));
- errno = 0;
- FILE *fp = fdopen(fd, FOPEN_RWB); // many callers of xtmpfile use binary I/O
- if (!fp)
- fatal("fdopen: %1", strerror(errno));
-#else /* not HAVE_MKSTEMP */
- if (!mktemp(templ) || !templ[0])
- fatal("cannot create file name for temporary file");
- errno = 0;
- FILE *fp = fopen(templ, FOPEN_RWB);
- if (!fp)
- fatal("cannot open `%1': %2", templ, strerror(errno));
-#endif /* not HAVE_MKSTEMP */
- if (do_unlink)
- add_tmp_file(templ);
- if ((namep != 0) && ((*namep) != 0)) {
- *namep = templ;
- } else {
- a_delete templ;
- }
- return fp;
-}
-
-#else
-
-// FIXME: does MSVC have mktemp or mkstemp? If so, it should now
-// use the version above, as it no longer removes an open file.
-// The version below will NOT work with grohtml, since grohtml
-// wants to know the name of the file opened by xtmpfile!!
-
-// If you're not running Unix, the following will do:
-FILE *xtmpfile(char **namep, char *postfix, int do_unlink)
-{
- FILE *fp = tmpfile();
- if (!fp)
- fatal("couldn't create temporary file");
- return fp;
-}
-
-#endif /* _MSC_VER */
diff --git a/contrib/groff/src/preproc/eqn/Makefile.sub b/contrib/groff/src/preproc/eqn/Makefile.sub
deleted file mode 100644
index 20421e1c4958..000000000000
--- a/contrib/groff/src/preproc/eqn/Makefile.sub
+++ /dev/null
@@ -1,59 +0,0 @@
-PROG=eqn
-MAN1=eqn.n neqn.n
-XLIBS=$(LIBGROFF)
-OBJS=\
- eqn.o \
- main.o \
- lex.o \
- box.o \
- limit.o \
- list.o \
- over.o \
- text.o \
- script.o \
- mark.o \
- other.o \
- delim.o \
- sqrt.o \
- pile.o \
- special.o
-CCSRCS=\
- $(srcdir)/main.cc \
- $(srcdir)/lex.cc \
- $(srcdir)/box.cc \
- $(srcdir)/limit.cc \
- $(srcdir)/list.cc \
- $(srcdir)/over.cc \
- $(srcdir)/text.cc \
- $(srcdir)/script.cc \
- $(srcdir)/mark.cc \
- $(srcdir)/other.cc \
- $(srcdir)/delim.cc \
- $(srcdir)/sqrt.cc \
- $(srcdir)/pile.cc \
- $(srcdir)/special.cc
-HDRS=\
- $(srcdir)/box.h \
- $(srcdir)/eqn.h \
- $(srcdir)/pbox.h
-GRAM=$(srcdir)/eqn.y
-YTABC=$(srcdir)/eqn.cc
-YTABH=$(srcdir)/eqn_tab.h
-NAMEPREFIX=$(g)
-CLEANADD=neqn
-
-all: neqn
-
-neqn: neqn.sh
- -rm -f $@
- sed -e 's/@g@/$(g)/g' \
- -e 's|@BINDIR@|$(bindir)|g' \
- -e $(SH_SCRIPT_SED_CMD) $(srcdir)/neqn.sh >$@
- chmod +x $@
-
-install_data: neqn
- -rm -f $(bindir)/$(NAMEPREFIX)neqn
- $(INSTALL_SCRIPT) neqn $(bindir)/$(NAMEPREFIX)neqn
-
-uninstall_sub:
- -rm -f $(bindir)/$(NAMEPREFIX)neqn
diff --git a/contrib/groff/src/preproc/eqn/TODO b/contrib/groff/src/preproc/eqn/TODO
deleted file mode 100644
index 210d0ab06e4d..000000000000
--- a/contrib/groff/src/preproc/eqn/TODO
+++ /dev/null
@@ -1,49 +0,0 @@
-Use the same size increases for sum prod int as eqn does.
-
-Perhaps chartype should be renamed.
-
-TeX makes {sub,super}script on a single character with an accent
-into an accent onto the (character with the script). Should we do this?
-
-Implement mark and lineups within scripts, matrices and piles, and accents.
-(Why would this be useful?)
-
-Perhaps push hmotions down through lists to avoid upsetting spacing
-adjustments.
-
-Possibly generate .lf commands during compute_metrics phase.
-
-Consider whether there should be extra space at the side of piles.
-
-Provide scriptstyle displaystyle etc.
-
-Provide a nicer matrix syntax, eg
-matrix ccc {
-a then b then c above
-e then f then g above
-h then i then k
-}
-
-Perhaps generate syntax error messages using the style of gpic.
-
-Wide accents.
-
-More use of \Z.
-
-Extensible square roots.
-
-Vphantom
-
-Smash.
-
-Provide a variant of vec that extends over the length of the accentee.
-
-Support vertical arrow delimiters.
-
-Make the following work:
-.EQ
-delim @@
-.EN
-.EQ @<-@
-some equation
-.EN
diff --git a/contrib/groff/src/preproc/eqn/box.cc b/contrib/groff/src/preproc/eqn/box.cc
deleted file mode 100644
index 4e61b5dc3b74..000000000000
--- a/contrib/groff/src/preproc/eqn/box.cc
+++ /dev/null
@@ -1,611 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-const char *current_roman_font;
-
-char *gfont = 0;
-char *grfont = 0;
-char *gbfont = 0;
-int gsize = 0;
-
-int script_size_reduction = -1; // negative means reduce by a percentage
-
-int positive_space = -1;
-int negative_space = -1;
-
-int minimum_size = 5;
-
-int fat_offset = 4;
-int body_height = 85;
-int body_depth = 35;
-
-int over_hang = 0;
-int accent_width = 31;
-int delimiter_factor = 900;
-int delimiter_shortfall = 50;
-
-int null_delimiter_space = 12;
-int script_space = 5;
-int thin_space = 17;
-int medium_space = 22;
-int thick_space = 28;
-
-int num1 = 70;
-int num2 = 40;
-// we don't use num3, because we don't have \atop
-int denom1 = 70;
-int denom2 = 36;
-int axis_height = 26; // in 100ths of an em
-int sup1 = 42;
-int sup2 = 37;
-int sup3 = 28;
-int default_rule_thickness = 4;
-int sub1 = 20;
-int sub2 = 23;
-int sup_drop = 38;
-int sub_drop = 5;
-int x_height = 45;
-int big_op_spacing1 = 11;
-int big_op_spacing2 = 17;
-int big_op_spacing3 = 20;
-int big_op_spacing4 = 60;
-int big_op_spacing5 = 10;
-
-// These are for piles and matrices.
-
-int baseline_sep = 140; // = num1 + denom1
-int shift_down = 26; // = axis_height
-int column_sep = 100; // = em space
-int matrix_side_sep = 17; // = thin space
-
-int nroff = 0; // should we grok ndefine or tdefine?
-
-struct {
- const char *name;
- int *ptr;
-} param_table[] = {
- { "fat_offset", &fat_offset },
- { "over_hang", &over_hang },
- { "accent_width", &accent_width },
- { "delimiter_factor", &delimiter_factor },
- { "delimiter_shortfall", &delimiter_shortfall },
- { "null_delimiter_space", &null_delimiter_space },
- { "script_space", &script_space },
- { "thin_space", &thin_space },
- { "medium_space", &medium_space },
- { "thick_space", &thick_space },
- { "num1", &num1 },
- { "num2", &num2 },
- { "denom1", &denom1 },
- { "denom2", &denom2 },
- { "axis_height", &axis_height },
- { "sup1", &sup1 },
- { "sup2", &sup2 },
- { "sup3", &sup3 },
- { "default_rule_thickness", &default_rule_thickness },
- { "sub1", &sub1 },
- { "sub2", &sub2 },
- { "sup_drop", &sup_drop },
- { "sub_drop", &sub_drop },
- { "x_height", &x_height },
- { "big_op_spacing1", &big_op_spacing1 },
- { "big_op_spacing2", &big_op_spacing2 },
- { "big_op_spacing3", &big_op_spacing3 },
- { "big_op_spacing4", &big_op_spacing4 },
- { "big_op_spacing5", &big_op_spacing5 },
- { "minimum_size", &minimum_size },
- { "baseline_sep", &baseline_sep },
- { "shift_down", &shift_down },
- { "column_sep", &column_sep },
- { "matrix_side_sep", &matrix_side_sep },
- { "draw_lines", &draw_flag },
- { "body_height", &body_height },
- { "body_depth", &body_depth },
- { "nroff", &nroff },
- { 0, 0 }
-};
-
-void set_param(const char *name, int value)
-{
- for (int i = 0; param_table[i].name != 0; i++)
- if (strcmp(param_table[i].name, name) == 0) {
- *param_table[i].ptr = value;
- return;
- }
- error("unrecognised parameter `%1'", name);
-}
-
-int script_style(int style)
-{
- return style > SCRIPT_STYLE ? style - 2 : style;
-}
-
-int cramped_style(int style)
-{
- return (style & 1) ? style - 1 : style;
-}
-
-void set_space(int n)
-{
- if (n < 0)
- negative_space = -n;
- else
- positive_space = n;
-}
-
-// Return 0 if the specified size is bad.
-// The caller is responsible for giving the error message.
-
-int set_gsize(const char *s)
-{
- const char *p = (*s == '+' || *s == '-') ? s + 1 : s;
- char *end;
- long n = strtol(p, &end, 10);
- if (n <= 0 || *end != '\0' || n > INT_MAX)
- return 0;
- if (p > s) {
- if (!gsize)
- gsize = 10;
- if (*s == '+') {
- if (gsize > INT_MAX - n)
- return 0;
- gsize += int(n);
- }
- else {
- if (gsize - n <= 0)
- return 0;
- gsize -= int(n);
- }
- }
- else
- gsize = int(n);
- return 1;
-}
-
-void set_script_reduction(int n)
-{
- script_size_reduction = n;
-}
-
-const char *get_gfont()
-{
- return gfont ? gfont : "I";
-}
-
-const char *get_grfont()
-{
- return grfont ? grfont : "R";
-}
-
-const char *get_gbfont()
-{
- return gbfont ? gbfont : "B";
-}
-
-void set_gfont(const char *s)
-{
- a_delete gfont;
- gfont = strsave(s);
-}
-
-void set_grfont(const char *s)
-{
- a_delete grfont;
- grfont = strsave(s);
-}
-
-void set_gbfont(const char *s)
-{
- a_delete gbfont;
- gbfont = strsave(s);
-}
-
-// this must be precisely 2 characters in length
-#define COMPATIBLE_REG "0C"
-
-void start_string()
-{
- printf(".nr " COMPATIBLE_REG " \\n(.C\n");
- printf(".cp 0\n");
- printf(".ds " LINE_STRING "\n");
-}
-
-void output_string()
-{
- printf("\\*[" LINE_STRING "]\n");
-}
-
-void restore_compatibility()
-{
- printf(".cp \\n(" COMPATIBLE_REG "\n");
-}
-
-void do_text(const char *s)
-{
- printf(".eo\n");
- printf(".as " LINE_STRING " \"%s\n", s);
- printf(".ec\n");
-}
-
-void set_minimum_size(int n)
-{
- minimum_size = n;
-}
-
-void set_script_size()
-{
- if (minimum_size < 0)
- minimum_size = 0;
- if (script_size_reduction >= 0)
- printf(".ps \\n[.s]-%d>?%d\n", script_size_reduction, minimum_size);
- else
- printf(".ps (u;\\n[.s]*7+5/10>?%d)*1z\n", minimum_size);
-}
-
-int box::next_uid = 0;
-
-box::box() : spacing_type(ORDINARY_TYPE), uid(next_uid++)
-{
-}
-
-box::~box()
-{
-}
-
-void box::top_level()
-{
- // debug_print();
- // putc('\n', stderr);
- box *b = this;
- printf(".nr " SAVED_FONT_REG " \\n[.f]\n");
- printf(".ft\n");
- printf(".nr " SAVED_PREV_FONT_REG " \\n[.f]\n");
- printf(".ft %s\n", get_gfont());
- printf(".nr " SAVED_SIZE_REG " \\n[.s]z\n");
- if (gsize > 0) {
- char buf[INT_DIGITS + 1];
- sprintf(buf, "%d", gsize);
- b = new size_box(strsave(buf), b);
- }
- current_roman_font = get_grfont();
- // This catches tabs used within \Z (which aren't allowed).
- b->check_tabs(0);
- int r = b->compute_metrics(DISPLAY_STYLE);
- printf(".ft \\n[" SAVED_PREV_FONT_REG "]\n");
- printf(".ft \\n[" SAVED_FONT_REG "]\n");
- printf(".nr " MARK_OR_LINEUP_FLAG_REG " %d\n", r);
- if (r == FOUND_MARK) {
- printf(".nr " SAVED_MARK_REG " \\n[" MARK_REG "]\n");
- printf(".nr " MARK_WIDTH_REG " 0\\n[" WIDTH_FORMAT "]\n", b->uid);
- }
- else if (r == FOUND_LINEUP)
- printf(".if r" SAVED_MARK_REG " .as " LINE_STRING " \\h'\\n["
- SAVED_MARK_REG "]u-\\n[" MARK_REG "]u'\n");
- else
- assert(r == FOUND_NOTHING);
- // The problem here is that the argument to \f is read in copy mode,
- // so we cannot use \E there; so we hide it in a string instead.
- // Another problem is that if we use \R directly, then the space will
- // prevent it working in a macro argument.
- printf(".ds " SAVE_FONT_STRING " "
- "\\R'" SAVED_INLINE_FONT_REG " \\\\n[.f]'"
- "\\fP"
- "\\R'" SAVED_INLINE_PREV_FONT_REG " \\\\n[.f]'"
- "\\R'" SAVED_INLINE_SIZE_REG " \\\\n[.s]z'"
- "\\s0"
- "\\R'" SAVED_INLINE_PREV_SIZE_REG " \\\\n[.s]z'"
- "\n"
- ".ds " RESTORE_FONT_STRING " "
- "\\f[\\\\n[" SAVED_INLINE_PREV_FONT_REG "]]"
- "\\f[\\\\n[" SAVED_INLINE_FONT_REG "]]"
- "\\s'\\\\n[" SAVED_INLINE_PREV_SIZE_REG "]u'"
- "\\s'\\\\n[" SAVED_INLINE_SIZE_REG "]u'"
- "\n");
- printf(".as " LINE_STRING " \\&\\E*[" SAVE_FONT_STRING "]");
- printf("\\f[%s]", get_gfont());
- printf("\\s'\\En[" SAVED_SIZE_REG "]u'");
- current_roman_font = get_grfont();
- b->output();
- printf("\\E*[" RESTORE_FONT_STRING "]\n");
- if (r == FOUND_LINEUP)
- printf(".if r" SAVED_MARK_REG " .as " LINE_STRING " \\h'\\n["
- MARK_WIDTH_REG "]u-\\n[" SAVED_MARK_REG "]u-(\\n["
- WIDTH_FORMAT "]u-\\n[" MARK_REG "]u)'\n",
- b->uid);
- b->extra_space();
- if (!inline_flag)
- printf(".ne \\n[" HEIGHT_FORMAT "]u-%dM>?0+(\\n["
- DEPTH_FORMAT "]u-%dM>?0)\n",
- b->uid, body_height, b->uid, body_depth);
- delete b;
- next_uid = 0;
-}
-
-// gpic defines this register so as to make geqn not produce `\x's
-#define EQN_NO_EXTRA_SPACE_REG "0x"
-
-void box::extra_space()
-{
- printf(".if !r" EQN_NO_EXTRA_SPACE_REG " "
- ".nr " EQN_NO_EXTRA_SPACE_REG " 0\n");
- if (positive_space >= 0 || negative_space >= 0) {
- if (positive_space > 0)
- printf(".if !\\n[" EQN_NO_EXTRA_SPACE_REG "] "
- ".as " LINE_STRING " \\x'-%dM'\n", positive_space);
- if (negative_space > 0)
- printf(".if !\\n[" EQN_NO_EXTRA_SPACE_REG "] "
- ".as " LINE_STRING " \\x'%dM'\n", negative_space);
- positive_space = negative_space = -1;
- }
- else {
- printf(".if !\\n[" EQN_NO_EXTRA_SPACE_REG "] "
- ".if \\n[" HEIGHT_FORMAT "]>%dM .as " LINE_STRING
- " \\x'-(\\n[" HEIGHT_FORMAT
- "]u-%dM)'\n",
- uid, body_height, uid, body_height);
- printf(".if !\\n[" EQN_NO_EXTRA_SPACE_REG "] "
- ".if \\n[" DEPTH_FORMAT "]>%dM .as " LINE_STRING
- " \\x'\\n[" DEPTH_FORMAT
- "]u-%dM'\n",
- uid, body_depth, uid, body_depth);
- }
-}
-
-int box::compute_metrics(int)
-{
- printf(".nr " WIDTH_FORMAT " 0\n", uid);
- printf(".nr " HEIGHT_FORMAT " 0\n", uid);
- printf(".nr " DEPTH_FORMAT " 0\n", uid);
- return FOUND_NOTHING;
-}
-
-void box::compute_subscript_kern()
-{
- printf(".nr " SUB_KERN_FORMAT " 0\n", uid);
-}
-
-void box::compute_skew()
-{
- printf(".nr " SKEW_FORMAT " 0\n", uid);
-}
-
-void box::output()
-{
-}
-
-void box::check_tabs(int)
-{
-}
-
-int box::is_char()
-{
- return 0;
-}
-
-int box::left_is_italic()
-{
- return 0;
-}
-
-int box::right_is_italic()
-{
- return 0;
-}
-
-void box::hint(unsigned)
-{
-}
-
-void box::handle_char_type(int, int)
-{
-}
-
-
-box_list::box_list(box *pp)
-{
- p = new box*[10];
- for (int i = 0; i < 10; i++)
- p[i] = 0;
- maxlen = 10;
- len = 1;
- p[0] = pp;
-}
-
-void box_list::append(box *pp)
-{
- if (len + 1 > maxlen) {
- box **oldp = p;
- maxlen *= 2;
- p = new box*[maxlen];
- memcpy(p, oldp, sizeof(box*)*len);
- a_delete oldp;
- }
- p[len++] = pp;
-}
-
-box_list::~box_list()
-{
- for (int i = 0; i < len; i++)
- delete p[i];
- a_delete p;
-}
-
-void box_list::list_check_tabs(int level)
-{
- for (int i = 0; i < len; i++)
- p[i]->check_tabs(level);
-}
-
-
-pointer_box::pointer_box(box *pp) : p(pp)
-{
- spacing_type = p->spacing_type;
-}
-
-pointer_box::~pointer_box()
-{
- delete p;
-}
-
-int pointer_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- return r;
-}
-
-void pointer_box::compute_subscript_kern()
-{
- p->compute_subscript_kern();
- printf(".nr " SUB_KERN_FORMAT " \\n[" SUB_KERN_FORMAT "]\n", uid, p->uid);
-}
-
-void pointer_box::compute_skew()
-{
- p->compute_skew();
- printf(".nr " SKEW_FORMAT " 0\\n[" SKEW_FORMAT "]\n",
- uid, p->uid);
-}
-
-void pointer_box::check_tabs(int level)
-{
- p->check_tabs(level);
-}
-
-int simple_box::compute_metrics(int)
-{
- printf(".nr " WIDTH_FORMAT " 0\\w" DELIMITER_CHAR, uid);
- output();
- printf(DELIMITER_CHAR "\n");
- printf(".nr " HEIGHT_FORMAT " 0>?\\n[rst]\n", uid);
- printf(".nr " DEPTH_FORMAT " 0-\\n[rsb]>?0\n", uid);
- printf(".nr " SUB_KERN_FORMAT " 0-\\n[ssc]>?0\n", uid);
- printf(".nr " SKEW_FORMAT " 0\\n[skw]\n", uid);
- return FOUND_NOTHING;
-}
-
-void simple_box::compute_subscript_kern()
-{
- // do nothing, we already computed it in do_metrics
-}
-
-void simple_box::compute_skew()
-{
- // do nothing, we already computed it in do_metrics
-}
-
-int box::is_simple()
-{
- return 0;
-}
-
-int simple_box::is_simple()
-{
- return 1;
-}
-
-quoted_text_box::quoted_text_box(char *s) : text(s)
-{
-}
-
-quoted_text_box::~quoted_text_box()
-{
- a_delete text;
-}
-
-void quoted_text_box::output()
-{
- if (text)
- fputs(text, stdout);
-}
-
-tab_box::tab_box() : disabled(0)
-{
-}
-
-// We treat a tab_box as having width 0 for width computations.
-
-void tab_box::output()
-{
- if (!disabled)
- printf("\\t");
-}
-
-void tab_box::check_tabs(int level)
-{
- if (level > 0) {
- error("tabs allowed only at outermost level");
- disabled = 1;
- }
-}
-
-space_box::space_box()
-{
- spacing_type = SUPPRESS_TYPE;
-}
-
-void space_box::output()
-{
- printf("\\h'%dM'", thick_space);
-}
-
-half_space_box::half_space_box()
-{
- spacing_type = SUPPRESS_TYPE;
-}
-
-void half_space_box::output()
-{
- printf("\\h'%dM'", thin_space);
-}
-
-void box_list::list_debug_print(const char *sep)
-{
- p[0]->debug_print();
- for (int i = 1; i < len; i++) {
- fprintf(stderr, "%s", sep);
- p[i]->debug_print();
- }
-}
-
-void quoted_text_box::debug_print()
-{
- fprintf(stderr, "\"%s\"", (text ? text : ""));
-}
-
-void half_space_box::debug_print()
-{
- fprintf(stderr, "^");
-}
-
-void space_box::debug_print()
-{
- fprintf(stderr, "~");
-}
-
-void tab_box::debug_print()
-{
- fprintf(stderr, "<tab>");
-}
diff --git a/contrib/groff/src/preproc/eqn/box.h b/contrib/groff/src/preproc/eqn/box.h
deleted file mode 100644
index 01bfe96a4ac3..000000000000
--- a/contrib/groff/src/preproc/eqn/box.h
+++ /dev/null
@@ -1,277 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct list_box;
-
-class box {
-private:
- static int next_uid;
-public:
- int spacing_type;
- const int uid;
- box();
- virtual void debug_print() = 0;
- virtual ~box();
- void top_level();
- virtual int compute_metrics(int);
- virtual void compute_subscript_kern();
- virtual void compute_skew();
- virtual void output();
- void extra_space();
- virtual list_box *to_list_box();
- virtual int is_simple();
- virtual int is_char();
- virtual int left_is_italic();
- virtual int right_is_italic();
- virtual void handle_char_type(int, int);
- enum { FOUND_NOTHING = 0, FOUND_MARK = 1, FOUND_LINEUP = 2 };
- void set_spacing_type(char *type);
- virtual void hint(unsigned);
- virtual void check_tabs(int);
-};
-
-class box_list {
-private:
- int maxlen;
-public:
- box **p;
- int len;
-
- box_list(box *);
- ~box_list();
- void append(box *);
- void list_check_tabs(int);
- void list_debug_print(const char *sep);
- friend class list_box;
-};
-
-class list_box : public box {
- int is_script;
- box_list list;
- int sty;
-public:
- list_box(box *);
- void debug_print();
- int compute_metrics(int);
- void compute_subscript_kern();
- void output();
- void check_tabs(int);
- void append(box *);
- list_box *to_list_box();
- void handle_char_type(int, int);
- void compute_sublist_width(int n);
- friend box *make_script_box(box *, box *, box *);
- friend box *make_mark_box(box *);
- friend box *make_lineup_box(box *);
-};
-
-enum alignment { LEFT_ALIGN, RIGHT_ALIGN, CENTER_ALIGN };
-
-class column : public box_list {
- alignment align;
- int space;
-public:
- column(box *);
- void set_alignment(alignment);
- void set_space(int);
- void debug_print(const char *);
-
- friend class matrix_box;
- friend class pile_box;
-};
-
-class pile_box : public box {
- column col;
-public:
- pile_box(box *);
- int compute_metrics(int);
- void output();
- void debug_print();
- void check_tabs(int);
- void set_alignment(alignment a) { col.set_alignment(a); }
- void set_space(int n) { col.set_space(n); }
- void append(box *p) { col.append(p); }
-};
-
-class matrix_box : public box {
-private:
- int len;
- int maxlen;
- column **p;
-public:
- matrix_box(column *);
- ~matrix_box();
- void append(column *);
- int compute_metrics(int);
- void output();
- void check_tabs(int);
- void debug_print();
-};
-
-class pointer_box : public box {
-protected:
- box *p;
-public:
- pointer_box(box *);
- ~pointer_box();
- int compute_metrics(int);
- void compute_subscript_kern();
- void compute_skew();
- void debug_print() = 0;
- void check_tabs(int);
-};
-
-class vcenter_box : public pointer_box {
-public:
- vcenter_box(box *);
- int compute_metrics(int);
- void output();
- void debug_print();
-};
-
-class simple_box : public box {
-public:
- int compute_metrics(int);
- void compute_subscript_kern();
- void compute_skew();
- void output() = 0;
- void debug_print() = 0;
- int is_simple();
-};
-
-class quoted_text_box : public simple_box {
- char *text;
-public:
- quoted_text_box(char *);
- ~quoted_text_box();
- void debug_print();
- void output();
-};
-
-class half_space_box : public simple_box {
-public:
- half_space_box();
- void output();
- void debug_print();
-};
-
-class space_box : public simple_box {
-public:
- space_box();
- void output();
- void debug_print();
-};
-
-class tab_box : public box {
- int disabled;
-public:
- tab_box();
- void output();
- void debug_print();
- void check_tabs(int);
-};
-
-class size_box : public pointer_box {
-private:
- char *size;
-public:
- size_box(char *, box *);
- ~size_box();
- int compute_metrics(int);
- void output();
- void debug_print();
-};
-
-class font_box : public pointer_box {
-private:
- char *f;
-public:
- font_box(char *, box *);
- ~font_box();
- int compute_metrics(int);
- void output();
- void debug_print();
-};
-
-class fat_box : public pointer_box {
-public:
- fat_box(box *);
- int compute_metrics(int);
- void output();
- void debug_print();
-};
-
-class vmotion_box : public pointer_box {
-private:
- int n; // up is >= 0
-public:
- vmotion_box(int, box *);
- int compute_metrics(int);
- void output();
- void debug_print();
-};
-
-class hmotion_box : public pointer_box {
- int n;
-public:
- hmotion_box(int, box *);
- int compute_metrics(int);
- void output();
- void debug_print();
-};
-
-box *split_text(char *);
-box *make_script_box(box *, box *, box *);
-box *make_mark_box(box *);
-box *make_lineup_box(box *);
-box *make_delim_box(char *, box *, char *);
-box *make_sqrt_box(box *);
-box *make_prime_box(box *);
-box *make_over_box(box *, box *);
-box *make_small_over_box(box *, box *);
-box *make_limit_box(box *, box *, box *);
-box *make_accent_box(box *, box *);
-box *make_uaccent_box(box *, box *);
-box *make_overline_box(box *);
-box *make_underline_box(box *);
-box *make_special_box(char *, box *);
-
-void set_space(int);
-int set_gsize(const char *);
-void set_gfont(const char *);
-void set_grfont(const char *);
-void set_gbfont(const char *);
-const char *get_gfont();
-const char *get_grfont();
-const char *get_gbfont();
-void start_string();
-void output_string();
-void do_text(const char *);
-void restore_compatibility();
-void set_script_reduction(int n);
-void set_minimum_size(int n);
-void set_param(const char *name, int value);
-
-void set_char_type(const char *type, char *ch);
-
-void init_char_table();
-void init_extensible();
-void define_extensible(const char *name, const char *ext, const char *top = 0,
- const char *mid = 0, const char *bot = 0);
diff --git a/contrib/groff/src/preproc/eqn/delim.cc b/contrib/groff/src/preproc/eqn/delim.cc
deleted file mode 100644
index 29deded38343..000000000000
--- a/contrib/groff/src/preproc/eqn/delim.cc
+++ /dev/null
@@ -1,381 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-enum left_or_right_t { LEFT_DELIM = 01, RIGHT_DELIM = 02 };
-
-// Small must be none-zero and must exist in each device.
-// Small will be put in the roman font, others are assumed to be
-// on the special font (so no font change will be necessary.)
-
-struct delimiter {
- const char *name;
- int flags;
- const char *small;
- const char *chain_format;
- const char *ext;
- const char *top;
- const char *mid;
- const char *bot;
-} delim_table[] = {
- {
- "(", LEFT_DELIM|RIGHT_DELIM, "(", "\\[parenleft%s]",
- "\\[parenleftex]",
- "\\[parenlefttp]",
- 0,
- "\\[parenleftbt]",
- },
- {
- ")", LEFT_DELIM|RIGHT_DELIM, ")", "\\[parenright%s]",
- "\\[parenrightex]",
- "\\[parenrighttp]",
- 0,
- "\\[parenrightbt]",
- },
- {
- "[", LEFT_DELIM|RIGHT_DELIM, "[", "\\[bracketleft%s]",
- "\\[bracketleftex]",
- "\\[bracketlefttp]",
- 0,
- "\\[bracketleftbt]",
- },
- {
- "]", LEFT_DELIM|RIGHT_DELIM, "]", "\\[bracketright%s]",
- "\\[bracketrightex]",
- "\\[bracketrighttp]",
- 0,
- "\\[bracketrightbt]",
- },
- {
- "{", LEFT_DELIM|RIGHT_DELIM, "{", "\\[braceleft%s]",
- "\\[braceleftex]",
- "\\[bracelefttp]",
- "\\[braceleftmid]",
- "\\[braceleftbt]",
- },
- {
- "}", LEFT_DELIM|RIGHT_DELIM, "}", "\\[braceright%s]",
- "\\[bracerightex]",
- "\\[bracerighttp]",
- "\\[bracerightmid]",
- "\\[bracerightbt]",
- },
- {
- "|", LEFT_DELIM|RIGHT_DELIM, "|", "\\[bar%s]",
- "\\[barex]",
- },
- {
- "floor", LEFT_DELIM, "\\(lf", "\\[floorleft%s]",
- "\\[bracketleftex]",
- 0,
- 0,
- "\\[bracketleftbt]",
- },
- {
- "floor", RIGHT_DELIM, "\\(rf", "\\[floorright%s]",
- "\\[bracketrightex]",
- 0,
- 0,
- "\\[bracketrightbt]",
- },
- {
- "ceiling", LEFT_DELIM, "\\(lc", "\\[ceilingleft%s]",
- "\\[bracketleftex]",
- "\\[bracketlefttp]",
- },
- {
- "ceiling", RIGHT_DELIM, "\\(rc", "\\[ceilingright%s]",
- "\\[bracketrightex]",
- "\\[bracketrighttp]",
- },
- {
- "||", LEFT_DELIM|RIGHT_DELIM, "|", "\\[bar%s]",
- "\\[bardblex]",
- },
- {
- "<", LEFT_DELIM|RIGHT_DELIM, "\\(la", "\\[angleleft%s]",
- },
- {
- ">", LEFT_DELIM|RIGHT_DELIM, "\\(ra", "\\[angleright%s]",
- },
- {
- "uparrow", LEFT_DELIM|RIGHT_DELIM, "\\(ua", "\\[arrowup%s]",
- "\\[arrowvertex]",
- "\\[arrowverttp]",
- },
- {
- "downarrow", LEFT_DELIM|RIGHT_DELIM, "\\(da", "\\[arrowdown%s]",
- "\\[arrowvertex]",
- 0,
- 0,
- "\\[arrowvertbt]",
- },
- {
- "updownarrow", LEFT_DELIM|RIGHT_DELIM, "\\(va", "\\[arrowupdown%s]",
- "\\[arrowvertex]",
- "\\[arrowverttp]",
- 0,
- "\\[arrowvertbt]",
- },
-};
-
-const int DELIM_TABLE_SIZE = int(sizeof(delim_table)/sizeof(delim_table[0]));
-
-class delim_box : public box {
-private:
- char *left;
- char *right;
- box *p;
-public:
- delim_box(char *, box *, char *);
- ~delim_box();
- int compute_metrics(int);
- void output();
- void check_tabs(int);
- void debug_print();
-};
-
-box *make_delim_box(char *l, box *pp, char *r)
-{
- if (l != 0 && *l == '\0') {
- a_delete l;
- l = 0;
- }
- if (r != 0 && *r == '\0') {
- a_delete r;
- r = 0;
- }
- return new delim_box(l, pp, r);
-}
-
-delim_box::delim_box(char *l, box *pp, char *r)
-: left(l), right(r), p(pp)
-{
-}
-
-delim_box::~delim_box()
-{
- a_delete left;
- a_delete right;
- delete p;
-}
-
-static void build_extensible(const char *ext, const char *top, const char *mid,
- const char *bot)
-{
- assert(ext != 0);
- printf(".nr " DELIM_WIDTH_REG " 0\\w" DELIMITER_CHAR "%s" DELIMITER_CHAR "\n",
- ext);
- printf(".nr " EXT_HEIGHT_REG " 0\\n[rst]\n");
- printf(".nr " EXT_DEPTH_REG " 0-\\n[rsb]\n");
- if (top) {
- printf(".nr " DELIM_WIDTH_REG " 0\\n[" DELIM_WIDTH_REG "]"
- ">?\\w" DELIMITER_CHAR "%s" DELIMITER_CHAR "\n",
- top);
- printf(".nr " TOP_HEIGHT_REG " 0\\n[rst]\n");
- printf(".nr " TOP_DEPTH_REG " 0-\\n[rsb]\n");
- }
- if (mid) {
- printf(".nr " DELIM_WIDTH_REG " 0\\n[" DELIM_WIDTH_REG "]"
- ">?\\w" DELIMITER_CHAR "%s" DELIMITER_CHAR "\n",
- mid);
- printf(".nr " MID_HEIGHT_REG " 0\\n[rst]\n");
- printf(".nr " MID_DEPTH_REG " 0-\\n[rsb]\n");
- }
- if (bot) {
- printf(".nr " DELIM_WIDTH_REG " 0\\n[" DELIM_WIDTH_REG "]"
- ">?\\w" DELIMITER_CHAR "%s" DELIMITER_CHAR "\n",
- bot);
- printf(".nr " BOT_HEIGHT_REG " 0\\n[rst]\n");
- printf(".nr " BOT_DEPTH_REG " 0-\\n[rsb]\n");
- }
- printf(".nr " TOTAL_HEIGHT_REG " 0");
- if (top)
- printf("+\\n[" TOP_HEIGHT_REG "]+\\n[" TOP_DEPTH_REG "]");
- if (bot)
- printf("+\\n[" BOT_HEIGHT_REG "]+\\n[" BOT_DEPTH_REG "]");
- if (mid)
- printf("+\\n[" MID_HEIGHT_REG "]+\\n[" MID_DEPTH_REG "]");
- printf("\n");
- // determine how many extensible characters we need
- printf(".nr " TEMP_REG " \\n[" DELTA_REG "]-\\n[" TOTAL_HEIGHT_REG "]");
- if (mid)
- printf("/2");
- printf(">?0+\\n[" EXT_HEIGHT_REG "]+\\n[" EXT_DEPTH_REG "]-1/(\\n["
- EXT_HEIGHT_REG "]+\\n[" EXT_DEPTH_REG "])\n");
-
- printf(".nr " TOTAL_HEIGHT_REG " +(\\n[" EXT_HEIGHT_REG "]+\\n["
- EXT_DEPTH_REG "]*\\n[" TEMP_REG "]");
- if (mid)
- printf("*2");
- printf(")\n");
- printf(".ds " DELIM_STRING " \\Z" DELIMITER_CHAR
- "\\v'-%dM-(\\n[" TOTAL_HEIGHT_REG "]u/2u)'\n",
- axis_height);
- if (top)
- printf(".as " DELIM_STRING " \\v'\\n[" TOP_HEIGHT_REG "]u'"
- "\\Z" DELIMITER_CHAR "%s" DELIMITER_CHAR
- "\\v'\\n[" TOP_DEPTH_REG "]u'\n",
- top);
-
- // this macro appends $2 copies of $3 to string $1
- printf(".de " REPEAT_APPEND_STRING_MACRO "\n"
- ".if \\\\$2 \\{.as \\\\$1 \"\\\\$3\n"
- "." REPEAT_APPEND_STRING_MACRO " \\\\$1 \\\\$2-1 \"\\\\$3\"\n"
- ".\\}\n"
- "..\n");
-
- printf("." REPEAT_APPEND_STRING_MACRO " " DELIM_STRING " \\n[" TEMP_REG "] "
- "\\v'\\n[" EXT_HEIGHT_REG "]u'"
- "\\Z" DELIMITER_CHAR "%s" DELIMITER_CHAR
- "\\v'\\n[" EXT_DEPTH_REG "]u'\n",
- ext);
-
- if (mid) {
- printf(".as " DELIM_STRING " \\v'\\n[" MID_HEIGHT_REG "]u'"
- "\\Z" DELIMITER_CHAR "%s" DELIMITER_CHAR
- "\\v'\\n[" MID_DEPTH_REG "]u'\n",
- mid);
- printf("." REPEAT_APPEND_STRING_MACRO " " DELIM_STRING
- " \\n[" TEMP_REG "] "
- "\\v'\\n[" EXT_HEIGHT_REG "]u'"
- "\\Z" DELIMITER_CHAR "%s" DELIMITER_CHAR
- "\\v'\\n[" EXT_DEPTH_REG "]u'\n",
- ext);
- }
- if (bot)
- printf(".as " DELIM_STRING " \\v'\\n[" BOT_HEIGHT_REG "]u'"
- "\\Z" DELIMITER_CHAR "%s" DELIMITER_CHAR
- "\\v'\\n[" BOT_DEPTH_REG "]u'\n",
- bot);
- printf(".as " DELIM_STRING " " DELIMITER_CHAR "\n");
-}
-
-static void define_extensible_string(char *delim, int uid,
- left_or_right_t left_or_right)
-{
- printf(".ds " DELIM_STRING "\n");
- delimiter *d = delim_table;
- int delim_len = strlen(delim);
- int i;
- for (i = 0; i < DELIM_TABLE_SIZE; i++, d++)
- if (strncmp(delim, d->name, delim_len) == 0
- && (left_or_right & d->flags) != 0)
- break;
- if (i >= DELIM_TABLE_SIZE) {
- error("there is no `%1' delimiter", delim);
- printf(".nr " DELIM_WIDTH_REG " 0\n");
- return;
- }
-
- printf(".nr " DELIM_WIDTH_REG " 0\\w" DELIMITER_CHAR "\\f[%s]%s\\fP" DELIMITER_CHAR "\n"
- ".ds " DELIM_STRING " \\Z" DELIMITER_CHAR
- "\\v'\\n[rsb]u+\\n[rst]u/2u-%dM'\\f[%s]%s\\fP" DELIMITER_CHAR "\n"
- ".nr " TOTAL_HEIGHT_REG " \\n[rst]-\\n[rsb]\n"
- ".if \\n[" TOTAL_HEIGHT_REG "]<\\n[" DELTA_REG "] "
- "\\{",
- current_roman_font, d->small, axis_height,
- current_roman_font, d->small);
-
- char buf[256];
- sprintf(buf, d->chain_format, "\\\\n[" INDEX_REG "]");
- printf(".nr " INDEX_REG " 0\n"
- ".de " TEMP_MACRO "\n"
- ".ie c%s \\{\\\n"
- ".nr " DELIM_WIDTH_REG " 0\\w" DELIMITER_CHAR "%s" DELIMITER_CHAR "\n"
- ".ds " DELIM_STRING " \\Z" DELIMITER_CHAR
- "\\v'\\\\n[rsb]u+\\\\n[rst]u/2u-%dM'%s" DELIMITER_CHAR "\n"
- ".nr " TOTAL_HEIGHT_REG " \\\\n[rst]-\\\\n[rsb]\n"
- ".if \\\\n[" TOTAL_HEIGHT_REG "]<\\n[" DELTA_REG "] "
- "\\{.nr " INDEX_REG " +1\n"
- "." TEMP_MACRO "\n"
- ".\\}\\}\n"
- ".el .nr " INDEX_REG " 0-1\n"
- "..\n"
- "." TEMP_MACRO "\n",
- buf, buf, axis_height, buf);
- if (d->ext) {
- printf(".if \\n[" INDEX_REG "]<0 \\{.if c%s \\{\\\n", d->ext);
- build_extensible(d->ext, d->top, d->mid, d->bot);
- printf(".\\}\\}\n");
- }
- printf(".\\}\n");
- printf(".as " DELIM_STRING " \\h'\\n[" DELIM_WIDTH_REG "]u'\n");
- printf(".nr " WIDTH_FORMAT " +\\n[" DELIM_WIDTH_REG "]\n", uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]"
- ">?(\\n[" TOTAL_HEIGHT_REG "]/2+%dM)\n",
- uid, uid, axis_height);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]"
- ">?(\\n[" TOTAL_HEIGHT_REG "]/2-%dM)\n",
- uid, uid, axis_height);
-}
-
-int delim_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " DELTA_REG " \\n[" HEIGHT_FORMAT "]-%dM"
- ">?(\\n[" DEPTH_FORMAT "]+%dM)\n",
- p->uid, axis_height, p->uid, axis_height);
- printf(".nr " DELTA_REG " 0\\n[" DELTA_REG "]*%d/500"
- ">?(\\n[" DELTA_REG "]*2-%dM)\n",
- delimiter_factor, delimiter_shortfall);
- if (left) {
- define_extensible_string(left, uid, LEFT_DELIM);
- printf(".rn " DELIM_STRING " " LEFT_DELIM_STRING_FORMAT "\n",
- uid);
- if (r)
- printf(".nr " MARK_REG " +\\n[" DELIM_WIDTH_REG "]\n");
- }
- if (right) {
- define_extensible_string(right, uid, RIGHT_DELIM);
- printf(".rn " DELIM_STRING " " RIGHT_DELIM_STRING_FORMAT "\n",
- uid);
- }
- return r;
-}
-
-void delim_box::output()
-{
- if (left)
- printf("\\*[" LEFT_DELIM_STRING_FORMAT "]", uid);
- p->output();
- if (right)
- printf("\\*[" RIGHT_DELIM_STRING_FORMAT "]", uid);
-}
-
-void delim_box::check_tabs(int level)
-{
- p->check_tabs(level);
-}
-
-void delim_box::debug_print()
-{
- fprintf(stderr, "left \"%s\" { ", left ? left : "");
- p->debug_print();
- fprintf(stderr, " }");
- if (right)
- fprintf(stderr, " right \"%s\"", right);
-}
-
diff --git a/contrib/groff/src/preproc/eqn/eqn.h b/contrib/groff/src/preproc/eqn/eqn.h
deleted file mode 100644
index 70b19271cbc1..000000000000
--- a/contrib/groff/src/preproc/eqn/eqn.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "cset.h"
-#include "errarg.h"
-#include "error.h"
-#include "lib.h"
-
-#include "box.h"
-
-extern char start_delim;
-extern char end_delim;
-extern int non_empty_flag;
-extern int inline_flag;
-extern int draw_flag;
-extern int one_size_reduction_flag;
-extern int compatible_flag;
-extern int nroff;
-
-void init_lex(const char *str, const char *filename, int lineno);
-void lex_error(const char *message,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-void init_table(const char *device);
-
-// prefix for all registers, strings, macros
-#define PREFIX "0"
diff --git a/contrib/groff/src/preproc/eqn/eqn.man b/contrib/groff/src/preproc/eqn/eqn.man
deleted file mode 100644
index 381d97de33ab..000000000000
--- a/contrib/groff/src/preproc/eqn/eqn.man
+++ /dev/null
@@ -1,882 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.ie \n(.V<\n(.v .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
-.el .ds tx TeX
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.\" The BSD man macros can't handle " in arguments to font change macros,
-.\" so use \(ts instead of ".
-.tr \(ts"
-.TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-@g@eqn \- format equations for troff
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fB@g@eqn 'u
-.ti \niu
-.B @g@eqn
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-rvCNR
-.OP \-d cc
-.OP \-T name
-.OP \-M dir
-.OP \-f F
-.OP \-s n
-.OP \-p n
-.OP \-m n
-.RI "[\ " files\|.\|.\|. "\ ]"
-.br
-.ad \na
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-This manual page describes the GNU version of
-.BR eqn ,
-which is part of the groff document formatting system.
-.B eqn
-compiles descriptions of equations embedded within
-.B troff
-input files into commands that are understood by
-.BR troff .
-Normally, it should be invoked using the
-.B \-e
-option of
-.BR groff .
-The syntax is quite compatible with Unix eqn.
-The output of GNU eqn cannot be processed with Unix troff;
-it must be processed with GNU troff.
-If no files are given on the command line, the standard input
-will be read.
-A filename of
-.B \-
-will cause the standard input to be read.
-.LP
-.B eqn
-searches for the file
-.B eqnrc
-in the directories given with the
-.B \-M
-option first, then in
-.BR @SYSTEMMACRODIR@ ,
-.BR @LOCALMACRODIR@ ,
-and finally in the standard macro directory
-.BR @MACRODIR@ .
-If it exists, eqn will process it before the other input files.
-The
-.B \-R
-option prevents this.
-.LP
-GNU eqn does not provide the functionality of neqn:
-it does not support low-resolution, typewriter-like devices
-(although it may work adequately for very simple input).
-.SH OPTIONS
-.TP
-.B \-C
-Recognize
-.B .EQ
-and
-.B .EN
-even when followed by a character other than space or newline.
-.TP
-.B \-N
-Don't allow newlines within delimiters.
-This option allows
-.B eqn
-to recover better from missing closing delimiters.
-.TP
-.B \-v
-Print the version number.
-.TP
-.B \-r
-Only one size reduction.
-.TP
-.BI \-m n
-The minimum point-size is
-.IR n .
-eqn will not reduce the size of subscripts or superscripts to
-a smaller size than
-.IR n .
-.TP
-.BI \-T name
-The output is for device
-.IR name .
-The only effect of this is to define a macro
-.I name
-with a value of
-.BR 1 .
-Typically
-.B eqnrc
-will use this to provide definitions appropriate for the output device.
-The default output device is
-.BR @DEVICE@ .
-.TP
-.BI \-M dir
-Search
-.I dir
-for
-.B eqnrc
-before the default directories.
-.TP
-.B \-R
-Don't load
-.BR eqnrc .
-.TP
-.BI \-f F
-This is equivalent to a
-.BI gfont\ F
-command.
-.TP
-.BI \-s n
-This is equivalent to a
-.BI gsize\ n
-command.
-This option is deprecated.
-eqn will normally set equations at whatever the current point size
-is when the equation is encountered.
-.TP
-.BI \-p n
-This says that subscripts and superscripts should be
-.I n
-points smaller than the surrounding text.
-This option is deprecated.
-Normally eqn makes sets subscripts and superscripts at 70%
-of the size of the surrounding text.
-.SH USAGE
-Only the differences between GNU eqn and Unix eqn are described here.
-.LP
-Most of the new features of GNU eqn
-are based on \*(tx.
-There are some references to the differences between \*(tx and GNU eqn below;
-these may safely be ignored if you do not know \*(tx.
-.SS Automatic spacing
-.LP
-.B eqn
-gives each component of an equation a type, and adjusts the spacing
-between components using that type.
-Possible types are:
-.TP \w'punctuation'u+2n
-ordinary
-an ordinary character such as 1 or
-.IR x ;
-.TP
-operator
-a large operator such as
-.ds Su \s+5\(*S\s0
-.if \n(.g .if !c\(*S .ds Su the summation operator
-\*(Su;
-.TP
-binary
-a binary operator such as +;
-.TP
-relation
-a relation such as =;
-.TP
-opening
-a opening bracket such as (;
-.TP
-closing
-a closing bracket such as );
-.TP
-punctuation
-a punctuation character such as ,;
-.TP
-inner
-a subformula contained within brackets;
-.TP
-suppress
-spacing that suppresses automatic spacing adjustment.
-.LP
-Components of an equation get a type in one of two ways.
-.TP
-.BI type\ t\ e
-This yields an equation component that contains
-.I e
-but that has type
-.IR t ,
-where
-.I t
-is one of the types mentioned above.
-For example,
-.B times
-is defined as
-.RS
-.IP
-.B
-type "binary" \e(mu
-.RE
-.IP
-The name of the type doesn't have to be quoted, but quoting protects
-from macro expansion.
-.TP
-.BI chartype\ t\ text
-Unquoted groups of characters are split up into individual characters,
-and the type of each character is looked up;
-this changes the type that is stored for each character;
-it says that the characters in
-.I text
-from now on have type
-.IR t .
-For example,
-.RS
-.IP
-.B
-chartype "punctuation" .,;:
-.RE
-.IP
-would make the characters
-.B .,;:
-have type punctuation
-whenever they subsequently appeared in an equation.
-The type
-.I t
-can also be
-.B letter
-or
-.BR digit ;
-in these cases
-.B chartype
-changes the font type of the characters.
-See the Fonts subsection.
-.SS New primitives
-.TP
-.IB e1\ smallover\ e2
-This is similar to
-.BR over ;
-.B smallover
-reduces the size of
-.I e1
-and
-.IR e2 ;
-it also puts less vertical space between
-.I e1
-or
-.I e2
-and the fraction bar.
-The
-.B over
-primitive corresponds to the \*(tx
-.B \eover
-primitive in display styles;
-.B smallover
-corresponds to
-.B \eover
-in non-display styles.
-.TP
-.BI vcenter\ e
-This vertically centers
-.I e
-about the math axis.
-The math axis is the vertical position about which characters
-such as + and - are centered; also it is the vertical position
-used for the bar of fractions.
-For example,
-.B sum
-is defined as
-.RS
-.IP
-.B
-{ type "operator" vcenter size +5 \e(*S }
-.RE
-.TP
-.IB e1\ accent\ e2
-This sets
-.I e2
-as an accent over
-.IR e1 .
-.I e2
-is assumed to be at the correct height for a lowercase letter;
-.I e2
-will be moved down according if
-.I e1
-is taller or shorter than a lowercase letter.
-For example,
-.B hat
-is defined as
-.RS
-.IP
-.B
-accent { "^" }
-.RE
-.IP
-.BR dotdot ,
-.BR dot ,
-.BR tilde ,
-.B vec
-and
-.B dyad
-are also defined using the
-.B accent
-primitive.
-.TP
-.IB e1\ uaccent\ e2
-This sets
-.I e2
-as an accent under
-.IR e1 .
-.I e2
-is assumed to be at the correct height for a character without a descender;
-.I e2
-will be moved down if
-.I e1
-has a descender.
-.B utilde
-is pre-defined using
-.B uaccent
-as a tilde accent below the baseline.
-.TP
-.BI split\ \(ts text \(ts
-This has the same effect as simply
-.RS
-.IP
-.I text
-.RE
-.IP
-but
-.I text
-is not subject to macro expansion because it is quoted;
-.I text
-will be split up and the spacing between individual characters
-will be adjusted.
-.TP
-.BI nosplit\ text
-This has the same effect as
-.RS
-.IP
-.BI \(ts text \(ts
-.RE
-.IP
-but because
-.I text
-is not quoted it will be subject to macro expansion;
-.I text
-will not be split up
-and the spacing between individual characters will not be adjusted.
-.TP
-.IB e\ opprime
-This is a variant of
-.B prime
-that acts as an operator on
-.IR e .
-It produces a different result from
-.B prime
-in a case such as
-.BR A\ opprime\ sub\ 1 :
-with
-.B opprime
-the
-.B 1
-will be tucked under the prime as a subscript to the
-.B A
-(as is conventional in mathematical typesetting),
-whereas with
-.B prime
-the
-.B 1
-will be a subscript to the prime character.
-The precedence of
-.B opprime
-is the same as that of
-.B bar
-and
-.BR under ,
-which is higher than that of everything except
-.B accent
-and
-.BR uaccent .
-In unquoted text a
-.B '
-that is not the first character will be treated like
-.BR opprime .
-.TP
-.BI special\ text\ e
-This constructs a new object from
-.I e
-using a
-.BR @g@troff (@MAN1EXT@)
-macro named
-.IR text .
-When the macro is called,
-the string
-.B 0s
-will contain the output for
-.IR e ,
-and the number registers
-.BR 0w ,
-.BR 0h ,
-.BR 0d ,
-.BR 0skern
-and
-.BR 0skew
-will contain the width, height, depth, subscript kern, and skew of
-.IR e .
-(The
-.I "subscript kern"
-of an object says how much a subscript on that object should be tucked in;
-the
-.I skew
-of an object says how far to the right of the center of the object an
-accent over the object should be placed.)
-The macro must modify
-.B 0s
-so that it will output the desired result with its origin at the current
-point, and increase the current horizontal position by the width
-of the object.
-The number registers must also be modified so that they correspond to the
-result.
-.RS
-.LP
-For example, suppose you wanted a construct that `cancels' an expression
-by drawing a diagonal line through it.
-.IP
-.nf
-.ft B
-.ne 6+\n(.Vu
-\&.EQ
-define cancel 'special Ca'
-\&.EN
-\&.de Ca
-\&.ds 0s \eZ'\e\e*(0s'\ev'\e\en(0du'\eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\ev'\e\en(0hu'
-\&..
-.ft
-.fi
-.LP
-Then you could cancel an expression
-.I e
-with
-.BI cancel\ {\ e\ }
-.LP
-Here's a more complicated construct that draws a box round an expression:
-.IP
-.nf
-.ft B
-.ne 11+\n(.Vu
-\&.EQ
-define box 'special Bx'
-\&.EN
-\&.de Bx
-\&.ds 0s \eZ'\eh'1n'\e\e*(0s'\e
-\eZ'\ev'\e\en(0du+1n'\eD'l \e\en(0wu+2n 0'\eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e
-\eD'l -\e\en(0wu-2n 0'\eD'l 0 \e\en(0hu+\e\en(0du+2n''\eh'\e\en(0wu+2n'
-\&.nr 0w +2n
-\&.nr 0d +1n
-\&.nr 0h +1n
-\&..
-.ft
-.fi
-.RE
-.SS Customization
-The appearance of equations is controlled by
-a large number of parameters. These can be set using
-the
-.B set
-command.
-.TP
-.BI set\ p\ n
-This sets parameter
-.I p
-to value
-.I n ;
-.I n
-is an integer.
-For example,
-.RS
-.IP
-.B
-set x_height 45
-.RE
-.IP
-says that
-.B eqn
-should assume an x height of 0.45 ems.
-.RS
-.LP
-Possible parameters are as follows.
-Values are in units of hundredths of an em unless otherwise stated.
-These descriptions are intended to be expository rather than
-definitive.
-.TP \w'\fBdefault_rule_thickness'u+2n
-.B minimum_size
-.B eqn
-will not set anything at a smaller point-size than this.
-The value is in points.
-.TP
-.B fat_offset
-The
-.B fat
-primitive emboldens an equation
-by overprinting two copies of the equation
-horizontally offset by this amount.
-.TP
-.B over_hang
-A fraction bar will be longer by twice this amount than
-the maximum of the widths of the numerator and denominator;
-in other words, it will overhang the numerator and
-denominator by at least this amount.
-.TP
-.B accent_width
-When
-.B bar
-or
-.B under
-is applied to a single character,
-the line will be this long.
-Normally,
-.B bar
-or
-.B under
-produces a line whose length is the width of the object to which it applies;
-in the case of a single character,
-this tends to produce a line that looks too long.
-.TP
-.B delimiter_factor
-Extensible delimiters produced with the
-.B left
-and
-.B right
-primitives will have a combined height and depth of at least this many
-thousandths of twice the maximum amount by which the sub-equation that
-the delimiters enclose extends away from the axis.
-.TP
-.B delimiter_shortfall
-Extensible delimiters produced with the
-.B left
-and
-.B right
-primitives will have a combined height and depth
-not less than the difference of
-twice the maximum amount by which the sub-equation that
-the delimiters enclose extends away from the axis
-and this amount.
-.TP
-.B null_delimiter_space
-This much horizontal space is inserted
-on each side of a fraction.
-.TP
-.B script_space
-The width of subscripts and superscripts is increased by this amount.
-.TP
-.B thin_space
-This amount of space is automatically inserted after punctuation
-characters.
-.TP
-.B medium_space
-This amount of space is automatically inserted on either side
-of binary operators.
-.TP
-.B thick_space
-This amount of space is automatically inserted on either side of
-relations.
-.TP
-.B x_height
-The height of lowercase letters without ascenders such as x.
-.TP
-.B axis_height
-The height above the baseline of the center of characters
-such as \(pl and \(mi.
-It is important that this value is correct for the font
-you are using.
-.TP
-.B default_rule_thickness
-This should set to the thickness of the
-.B \e(ru
-character, or the thickness of horizontal lines produced with the
-.B \eD
-escape sequence.
-.TP
-.B num1
-The
-.B over
-command will shift up the numerator by at least this amount.
-.TP
-.B num2
-The
-.B smallover
-command will shift up the numerator by at least this amount.
-.TP
-.B denom1
-The
-.B over
-command will shift down the denominator by at least this amount.
-.TP
-.B denom2
-The
-.B smallover
-command will shift down the denominator by at least this amount.
-.TP
-.B sup1
-Normally superscripts will be shifted up by at least this amount.
-.TP
-.B sup2
-Superscripts within superscripts or upper limits
-or numerators of
-.B smallover
-fractions
-will be shifted up by at least this amount.
-This is usually less than sup1.
-.TP
-.B sup3
-Superscripts within denominators or square roots
-or subscripts or lower limits will be shifted up by at least
-this amount.
-This is usually less than sup2.
-.TP
-.B sub1
-Subscripts will normally be shifted down by at least this amount.
-.TP
-.B sub2
-When there is both a subscript and a superscript, the subscript
-will be shifted down by at least this amount.
-.TP
-.B sup_drop
-The baseline of a superscript will be no more
-than this much amount below the top of the object on
-which the superscript is set.
-.TP
-.B sub_drop
-The baseline of a subscript will be at least this much below
-the bottom of the object on which the subscript is set.
-.TP
-.B big_op_spacing1
-The baseline of an upper limit will be at least this
-much above the top of the object on which the limit is set.
-.TP
-.B big_op_spacing2
-The baseline of a lower limit will be at least this
-much below the bottom of the object on which the limit is set.
-.TP
-.B big_op_spacing3
-The bottom of an upper limit will be at least this much above the
-top of the object on which the limit is set.
-.TP
-.B big_op_spacing4
-The top of a lower limit will be at least this much below
-the bottom of the object on which the limit is set.
-.TP
-.B big_op_spacing5
-This much vertical space will be added above and below limits.
-.TP
-.B baseline_sep
-The baselines of the rows in a pile or matrix will normally be
-this far apart.
-In most cases this should be equal to the sum of
-.B num1
-and
-.BR denom1 .
-.TP
-.B shift_down
-The midpoint between the top baseline and the bottom baseline
-in a matrix or pile will be shifted down by this much from the axis.
-In most cases this should be equal to
-.BR axis_height .
-.TP
-.B column_sep
-This much space will be added between columns in a matrix.
-.TP
-.B matrix_side_sep
-This much space will be added at each side of a matrix.
-.TP
-.B draw_lines
-If this is non-zero, lines will be drawn using the
-.B \eD
-escape sequence, rather than with the
-.B \el
-escape sequence and the
-.B \e(ru
-character.
-.TP
-.B body_height
-The amount by which the height of the equation exceeds this
-will be added as extra space before the line containing the equation
-(using
-.BR \ex .)
-The default value is 85.
-.TP
-.B body_depth
-The amount by which the depth of the equation exceeds this
-will be added as extra space after the line containing the equation
-(using
-.BR \ex .)
-The default value is 35.
-.TP
-.B nroff
-If this is non-zero,
-then
-.B ndefine
-will behave like
-.B define
-and
-.B tdefine
-will be ignored,
-otherwise
-.B tdefine
-will behave like
-.B define
-and
-.B ndefine
-will be ignored.
-The default value is 0
-(This is typically changed to 1 by the
-.B eqnrc
-file for the
-.BR ascii ,
-.BR latin1 ,
-.BR utf8 ,
-and
-.B cp1047
-devices.)
-.LP
-A more precise description of the role of many of these
-parameters can be found in Appendix H of
-.IR The\ \*(txbook .
-.RE
-.SS Macros
-Macros can take arguments.
-In a macro body,
-.BI $ n
-where
-.I n
-is between 1 and 9,
-will be replaced by the
-.IR n-th
-argument if the macro is called with arguments;
-if there are fewer than
-.I n
-arguments, it will be replaced by nothing.
-A word containing a left parenthesis where the part of the word
-before the left parenthesis has been defined using the
-.B define
-command
-will be recognized as a macro call with arguments;
-characters following the left parenthesis
-up to a matching right parenthesis will be treated as comma-separated
-arguments;
-commas inside nested parentheses do not terminate an argument.
-.TP
-.BI sdefine\ name\ X\ anything\ X
-This is like the
-.B define
-command, but
-.I name
-will not be recognized if called with arguments.
-.TP
-.BI include\ \(ts file \(ts
-Include the contents of
-.IR file .
-Lines of
-.I file
-beginning with
-.B .EQ
-or
-.B .EN
-will be ignored.
-.TP
-.BI ifdef\ name\ X\ anything\ X
-If
-.I name
-has been defined by
-.B define
-(or has been automatically defined because
-.I name
-is the output device)
-process
-.IR anything ;
-otherwise ignore
-.IR anything .
-.I X
-can be any character not appearing in
-.IR anything .
-.SS Fonts
-.B eqn
-normally uses at least two fonts to set an equation:
-an italic font for letters,
-and a roman font for everything else.
-The existing
-.B gfont
-command
-changes the font that is used as the italic font.
-By default this is
-.BR I .
-The font that is used as the roman font can be changed
-using the new
-.B grfont
-command.
-.TP
-.BI grfont\ f
-Set the roman font to
-.IR f .
-.LP
-The
-.B italic
-primitive uses the current italic font set by
-.BR gfont ;
-the
-.B roman
-primitive uses the current roman font set by
-.BR grfont .
-There is also a new
-.B gbfont
-command, which changes the font used by the
-.B bold
-primitive.
-If you only use the
-.BR roman ,
-.B italic
-and
-.B bold
-primitives to changes fonts within an equation,
-you can change all the fonts used by your equations
-just by using
-.BR gfont ,
-.B grfont
-and
-.B gbfont
-commands.
-.LP
-You can control which characters are treated as letters
-(and therefore set in italics) by using the
-.B chartype
-command described above.
-A type of
-.B letter
-will cause a character to be set in italic type.
-A type of
-.B digit
-will cause a character to be set in roman type.
-.SH FILES
-.Tp \w'\fB@MACRODIR@/eqnrc'u+2n
-.B @MACRODIR@/eqnrc
-Initialization file.
-.SH BUGS
-Inline equations will be set at the point size that is current at the
-beginning of the input line.
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR groff_font (@MAN5EXT@),
-.I The\ \*(txbook
diff --git a/contrib/groff/src/preproc/eqn/eqn.y b/contrib/groff/src/preproc/eqn/eqn.y
deleted file mode 100644
index 833a0f01072a..000000000000
--- a/contrib/groff/src/preproc/eqn/eqn.y
+++ /dev/null
@@ -1,331 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-%{
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "lib.h"
-#include "box.h"
-extern int non_empty_flag;
-char *strsave(const char *);
-int yylex();
-void yyerror(const char *);
-%}
-
-%union {
- char *str;
- box *b;
- pile_box *pb;
- matrix_box *mb;
- int n;
- column *col;
-}
-
-%token OVER
-%token SMALLOVER
-%token SQRT
-%token SUB
-%token SUP
-%token LPILE
-%token RPILE
-%token CPILE
-%token PILE
-%token LEFT
-%token RIGHT
-%token TO
-%token FROM
-%token SIZE
-%token FONT
-%token ROMAN
-%token BOLD
-%token ITALIC
-%token FAT
-%token ACCENT
-%token BAR
-%token UNDER
-%token ABOVE
-%token <str> TEXT
-%token <str> QUOTED_TEXT
-%token FWD
-%token BACK
-%token DOWN
-%token UP
-%token MATRIX
-%token COL
-%token LCOL
-%token RCOL
-%token CCOL
-%token MARK
-%token LINEUP
-%token TYPE
-%token VCENTER
-%token PRIME
-%token SPLIT
-%token NOSPLIT
-%token UACCENT
-%token SPECIAL
-
-/* these are handled in the lexer */
-%token SPACE
-%token GFONT
-%token GSIZE
-%token DEFINE
-%token NDEFINE
-%token TDEFINE
-%token SDEFINE
-%token UNDEF
-%token IFDEF
-%token INCLUDE
-%token DELIM
-%token CHARTYPE
-%token SET
-%token GRFONT
-%token GBFONT
-
-/* The original eqn manual says that `left' is right associative. It's lying.
-Consider `left ( ~ left ( ~ right ) right )'. */
-
-%right LEFT
-%left RIGHT
-%right LPILE RPILE CPILE PILE TEXT QUOTED_TEXT MATRIX MARK LINEUP '^' '~' '\t' '{' SPLIT NOSPLIT
-%right FROM TO
-%left SQRT OVER SMALLOVER
-%right SUB SUP
-%right ROMAN BOLD ITALIC FAT FONT SIZE FWD BACK DOWN UP TYPE VCENTER SPECIAL
-%right BAR UNDER PRIME
-%left ACCENT UACCENT
-
-%type <b> mark from_to sqrt_over script simple equation nonsup
-%type <n> number
-%type <str> text delim
-%type <pb> pile_element_list pile_arg
-%type <mb> column_list
-%type <col> column column_arg column_element_list
-
-%%
-top:
- /* empty */
- | equation
- { $1->top_level(); non_empty_flag = 1; }
- ;
-
-equation:
- mark
- { $$ = $1; }
- | equation mark
- {
- list_box *lb = $1->to_list_box();
- if (!lb)
- lb = new list_box($1);
- lb->append($2);
- $$ = lb;
- }
- ;
-
-mark:
- from_to
- { $$ = $1; }
- | MARK mark
- { $$ = make_mark_box($2); }
- | LINEUP mark
- { $$ = make_lineup_box($2); }
- ;
-
-from_to:
- sqrt_over %prec FROM
- { $$ = $1; }
- | sqrt_over TO from_to
- { $$ = make_limit_box($1, 0, $3); }
- | sqrt_over FROM sqrt_over
- { $$ = make_limit_box($1, $3, 0); }
- | sqrt_over FROM sqrt_over TO from_to
- { $$ = make_limit_box($1, $3, $5); }
- | sqrt_over FROM sqrt_over FROM from_to
- { $$ = make_limit_box($1, make_limit_box($3, $5, 0), 0); }
- ;
-
-sqrt_over:
- script
- { $$ = $1; }
- | SQRT sqrt_over
- { $$ = make_sqrt_box($2); }
- | sqrt_over OVER sqrt_over
- { $$ = make_over_box($1, $3); }
- | sqrt_over SMALLOVER sqrt_over
- { $$ = make_small_over_box($1, $3); }
- ;
-
-script:
- nonsup
- { $$ = $1; }
- | simple SUP script
- { $$ = make_script_box($1, 0, $3); }
- ;
-
-nonsup:
- simple %prec SUP
- { $$ = $1; }
- | simple SUB nonsup
- { $$ = make_script_box($1, $3, 0); }
- | simple SUB simple SUP script
- { $$ = make_script_box($1, $3, $5); }
- ;
-
-simple:
- TEXT
- { $$ = split_text($1); }
- | QUOTED_TEXT
- { $$ = new quoted_text_box($1); }
- | SPLIT QUOTED_TEXT
- { $$ = split_text($2); }
- | NOSPLIT TEXT
- { $$ = new quoted_text_box($2); }
- | '^'
- { $$ = new half_space_box; }
- | '~'
- { $$ = new space_box; }
- | '\t'
- { $$ = new tab_box; }
- | '{' equation '}'
- { $$ = $2; }
- | PILE pile_arg
- { $2->set_alignment(CENTER_ALIGN); $$ = $2; }
- | LPILE pile_arg
- { $2->set_alignment(LEFT_ALIGN); $$ = $2; }
- | RPILE pile_arg
- { $2->set_alignment(RIGHT_ALIGN); $$ = $2; }
- | CPILE pile_arg
- { $2->set_alignment(CENTER_ALIGN); $$ = $2; }
- | MATRIX '{' column_list '}'
- { $$ = $3; }
- | LEFT delim equation RIGHT delim
- { $$ = make_delim_box($2, $3, $5); }
- | LEFT delim equation
- { $$ = make_delim_box($2, $3, 0); }
- | simple BAR
- { $$ = make_overline_box($1); }
- | simple UNDER
- { $$ = make_underline_box($1); }
- | simple PRIME
- { $$ = make_prime_box($1); }
- | simple ACCENT simple
- { $$ = make_accent_box($1, $3); }
- | simple UACCENT simple
- { $$ = make_uaccent_box($1, $3); }
- | ROMAN simple
- { $$ = new font_box(strsave(get_grfont()), $2); }
- | BOLD simple
- { $$ = new font_box(strsave(get_gbfont()), $2); }
- | ITALIC simple
- { $$ = new font_box(strsave(get_gfont()), $2); }
- | FAT simple
- { $$ = new fat_box($2); }
- | FONT text simple
- { $$ = new font_box($2, $3); }
- | SIZE text simple
- { $$ = new size_box($2, $3); }
- | FWD number simple
- { $$ = new hmotion_box($2, $3); }
- | BACK number simple
- { $$ = new hmotion_box(-$2, $3); }
- | UP number simple
- { $$ = new vmotion_box($2, $3); }
- | DOWN number simple
- { $$ = new vmotion_box(-$2, $3); }
- | TYPE text simple
- { $3->set_spacing_type($2); $$ = $3; }
- | VCENTER simple
- { $$ = new vcenter_box($2); }
- | SPECIAL text simple
- { $$ = make_special_box($2, $3); }
- ;
-
-number:
- text
- {
- int n;
- if (sscanf($1, "%d", &n) == 1)
- $$ = n;
- a_delete $1;
- }
- ;
-
-pile_element_list:
- equation
- { $$ = new pile_box($1); }
- | pile_element_list ABOVE equation
- { $1->append($3); $$ = $1; }
- ;
-
-pile_arg:
- '{' pile_element_list '}'
- { $$ = $2; }
- | number '{' pile_element_list '}'
- { $3->set_space($1); $$ = $3; }
- ;
-
-column_list:
- column
- { $$ = new matrix_box($1); }
- | column_list column
- { $1->append($2); $$ = $1; }
- ;
-
-column_element_list:
- equation
- { $$ = new column($1); }
- | column_element_list ABOVE equation
- { $1->append($3); $$ = $1; }
- ;
-
-column_arg:
- '{' column_element_list '}'
- { $$ = $2; }
- | number '{' column_element_list '}'
- { $3->set_space($1); $$ = $3; }
- ;
-
-column:
- COL column_arg
- { $2->set_alignment(CENTER_ALIGN); $$ = $2; }
- | LCOL column_arg
- { $2->set_alignment(LEFT_ALIGN); $$ = $2; }
- | RCOL column_arg
- { $2->set_alignment(RIGHT_ALIGN); $$ = $2; }
- | CCOL column_arg
- { $2->set_alignment(CENTER_ALIGN); $$ = $2; }
- ;
-
-text: TEXT
- { $$ = $1; }
- | QUOTED_TEXT
- { $$ = $1; }
- ;
-
-delim:
- text
- { $$ = $1; }
- | '{'
- { $$ = strsave("{"); }
- | '}'
- { $$ = strsave("}"); }
- ;
-
-%%
diff --git a/contrib/groff/src/preproc/eqn/lex.cc b/contrib/groff/src/preproc/eqn/lex.cc
deleted file mode 100644
index 25faec2bcecf..000000000000
--- a/contrib/groff/src/preproc/eqn/lex.cc
+++ /dev/null
@@ -1,1165 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "eqn_tab.h"
-#include "stringclass.h"
-#include "ptable.h"
-
-struct definition {
- char is_macro;
- char is_simple;
- union {
- int tok;
- char *contents;
- };
- definition();
- ~definition();
-};
-
-definition::definition() : is_macro(1), is_simple(0)
-{
- contents = 0;
-}
-
-definition::~definition()
-{
- if (is_macro)
- a_delete contents;
-}
-
-declare_ptable(definition)
-implement_ptable(definition)
-
-PTABLE(definition) macro_table;
-
-static struct {
- const char *name;
- int token;
-} token_table[] = {
- { "over", OVER },
- { "smallover", SMALLOVER },
- { "sqrt", SQRT },
- { "sub", SUB },
- { "sup", SUP },
- { "lpile", LPILE },
- { "rpile", RPILE },
- { "cpile", CPILE },
- { "pile", PILE },
- { "left", LEFT },
- { "right", RIGHT },
- { "to", TO },
- { "from", FROM },
- { "size", SIZE },
- { "font", FONT },
- { "roman", ROMAN },
- { "bold", BOLD },
- { "italic", ITALIC },
- { "fat", FAT },
- { "bar", BAR },
- { "under", UNDER },
- { "accent", ACCENT },
- { "uaccent", UACCENT },
- { "above", ABOVE },
- { "fwd", FWD },
- { "back", BACK },
- { "down", DOWN },
- { "up", UP },
- { "matrix", MATRIX },
- { "col", COL },
- { "lcol", LCOL },
- { "rcol", RCOL },
- { "ccol", CCOL },
- { "mark", MARK },
- { "lineup", LINEUP },
- { "space", SPACE },
- { "gfont", GFONT },
- { "gsize", GSIZE },
- { "define", DEFINE },
- { "sdefine", SDEFINE },
- { "ndefine", NDEFINE },
- { "tdefine", TDEFINE },
- { "undef", UNDEF },
- { "ifdef", IFDEF },
- { "include", INCLUDE },
- { "copy", INCLUDE },
- { "delim", DELIM },
- { "chartype", CHARTYPE },
- { "type", TYPE },
- { "vcenter", VCENTER },
- { "set", SET },
- { "opprime", PRIME },
- { "grfont", GRFONT },
- { "gbfont", GBFONT },
- { "split", SPLIT },
- { "nosplit", NOSPLIT },
- { "special", SPECIAL },
-};
-
-static struct {
- const char *name;
- const char *def;
-} def_table[] = {
- { "ALPHA", "\\(*A" },
- { "BETA", "\\(*B" },
- { "CHI", "\\(*X" },
- { "DELTA", "\\(*D" },
- { "EPSILON", "\\(*E" },
- { "ETA", "\\(*Y" },
- { "GAMMA", "\\(*G" },
- { "IOTA", "\\(*I" },
- { "KAPPA", "\\(*K" },
- { "LAMBDA", "\\(*L" },
- { "MU", "\\(*M" },
- { "NU", "\\(*N" },
- { "OMEGA", "\\(*W" },
- { "OMICRON", "\\(*O" },
- { "PHI", "\\(*F" },
- { "PI", "\\(*P" },
- { "PSI", "\\(*Q" },
- { "RHO", "\\(*R" },
- { "SIGMA", "\\(*S" },
- { "TAU", "\\(*T" },
- { "THETA", "\\(*H" },
- { "UPSILON", "\\(*U" },
- { "XI", "\\(*C" },
- { "ZETA", "\\(*Z" },
- { "Alpha", "\\(*A" },
- { "Beta", "\\(*B" },
- { "Chi", "\\(*X" },
- { "Delta", "\\(*D" },
- { "Epsilon", "\\(*E" },
- { "Eta", "\\(*Y" },
- { "Gamma", "\\(*G" },
- { "Iota", "\\(*I" },
- { "Kappa", "\\(*K" },
- { "Lambda", "\\(*L" },
- { "Mu", "\\(*M" },
- { "Nu", "\\(*N" },
- { "Omega", "\\(*W" },
- { "Omicron", "\\(*O" },
- { "Phi", "\\(*F" },
- { "Pi", "\\(*P" },
- { "Psi", "\\(*Q" },
- { "Rho", "\\(*R" },
- { "Sigma", "\\(*S" },
- { "Tau", "\\(*T" },
- { "Theta", "\\(*H" },
- { "Upsilon", "\\(*U" },
- { "Xi", "\\(*C" },
- { "Zeta", "\\(*Z" },
- { "alpha", "\\(*a" },
- { "beta", "\\(*b" },
- { "chi", "\\(*x" },
- { "delta", "\\(*d" },
- { "epsilon", "\\(*e" },
- { "eta", "\\(*y" },
- { "gamma", "\\(*g" },
- { "iota", "\\(*i" },
- { "kappa", "\\(*k" },
- { "lambda", "\\(*l" },
- { "mu", "\\(*m" },
- { "nu", "\\(*n" },
- { "omega", "\\(*w" },
- { "omicron", "\\(*o" },
- { "phi", "\\(*f" },
- { "pi", "\\(*p" },
- { "psi", "\\(*q" },
- { "rho", "\\(*r" },
- { "sigma", "\\(*s" },
- { "tau", "\\(*t" },
- { "theta", "\\(*h" },
- { "upsilon", "\\(*u" },
- { "xi", "\\(*c" },
- { "zeta", "\\(*z" },
- { "max", "{type \"operator\" roman \"max\"}" },
- { "min", "{type \"operator\" roman \"min\"}" },
- { "lim", "{type \"operator\" roman \"lim\"}" },
- { "sin", "{type \"operator\" roman \"sin\"}" },
- { "cos", "{type \"operator\" roman \"cos\"}" },
- { "tan", "{type \"operator\" roman \"tan\"}" },
- { "sinh", "{type \"operator\" roman \"sinh\"}" },
- { "cosh", "{type \"operator\" roman \"cosh\"}" },
- { "tanh", "{type \"operator\" roman \"tanh\"}" },
- { "arc", "{type \"operator\" roman \"arc\"}" },
- { "log", "{type \"operator\" roman \"log\"}" },
- { "ln", "{type \"operator\" roman \"ln\"}" },
- { "exp", "{type \"operator\" roman \"exp\"}" },
- { "Re", "{type \"operator\" roman \"Re\"}" },
- { "Im", "{type \"operator\" roman \"Im\"}" },
- { "det", "{type \"operator\" roman \"det\"}" },
- { "and", "{roman \"and\"}" },
- { "if", "{roman \"if\"}" },
- { "for", "{roman \"for\"}" },
- { "sum", "{type \"operator\" vcenter size +5 \\(*S}" },
- { "prod", "{type \"operator\" vcenter size +5 \\(*P}" },
- { "int", "{type \"operator\" vcenter size +8 \\(is}" },
- { "union", "{type \"operator\" vcenter size +5 \\(cu}" },
- { "inter", "{type \"operator\" vcenter size +5 \\(ca}" },
- { "times", "type \"binary\" \\(mu" },
- { "ldots", "type \"inner\" { . . . }" },
- { "inf", "\\(if" },
- { "partial", "\\(pd" },
- { "nothing", "\"\"" },
- { "half", "{1 smallover 2}" },
- { "hat_def", "roman \"^\"" },
- { "hat", "accent { hat_def }" },
- { "dot_def", "back 15 \"\\v'-52M'.\\v'52M'\"" },
- { "dot", "accent { dot_def }" },
- { "dotdot_def", "back 25 \"\\v'-52M'..\\v'52M'\"" },
- { "dotdot", "accent { dotdot_def }" },
- { "tilde_def", "\"~\"" },
- { "tilde", "accent { tilde_def }" },
- { "utilde_def", "\"\\v'75M'~\\v'-75M'\"" },
- { "utilde", "uaccent { utilde_def }" },
- { "vec_def", "up 52 size -5 \\(->" },
- { "vec", "accent { vec_def }" },
- { "dyad_def", "up 52 size -5 {\\(<- back 60 \\(->}" },
- { "dyad", "accent { dyad_def }" },
- { "==", "type \"relation\" \\(==" },
- { "!=", "type \"relation\" \\(!=" },
- { "+-", "type \"binary\" \\(+-" },
- { "->", "type \"relation\" \\(->" },
- { "<-", "type \"relation\" \\(<-" },
- { "<<", "{ < back 20 < }" },
- { ">>", "{ > back 20 > }" },
- { "...", "type \"inner\" vcenter { . . . }" },
- { "prime", "'" },
- { "approx", "type \"relation\" \"\\(~=\"" },
- { "grad", "\\(gr" },
- { "del", "\\(gr" },
- { "cdot", "type \"binary\" vcenter ." },
- { "dollar", "$" },
-};
-
-void init_table(const char *device)
-{
- int i;
- for (i = 0; i < sizeof(token_table)/sizeof(token_table[0]); i++) {
- definition *def = new definition;
- def->is_macro = 0;
- def->tok = token_table[i].token;
- macro_table.define(token_table[i].name, def);
- }
- for (i = 0; i < sizeof(def_table)/sizeof(def_table[0]); i++) {
- definition *def = new definition;
- def->is_macro = 1;
- def->contents = strsave(def_table[i].def);
- def->is_simple = 1;
- macro_table.define(def_table[i].name, def);
- }
- definition *def = new definition;
- def->is_macro = 1;
- def->contents = strsave("1");
- macro_table.define(device, def);
-}
-
-class input {
- input *next;
-public:
- input(input *p);
- virtual ~input();
- virtual int get() = 0;
- virtual int peek() = 0;
- virtual int get_location(char **, int *);
-
- friend int get_char();
- friend int peek_char();
- friend int get_location(char **, int *);
- friend void init_lex(const char *str, const char *filename, int lineno);
-};
-
-class file_input : public input {
- FILE *fp;
- char *filename;
- int lineno;
- string line;
- const char *ptr;
- int read_line();
-public:
- file_input(FILE *, const char *, input *);
- ~file_input();
- int get();
- int peek();
- int get_location(char **, int *);
-};
-
-
-class macro_input : public input {
- char *s;
- char *p;
-public:
- macro_input(const char *, input *);
- ~macro_input();
- int get();
- int peek();
-};
-
-class top_input : public macro_input {
- char *filename;
- int lineno;
- public:
- top_input(const char *, const char *, int, input *);
- ~top_input();
- int get();
- int get_location(char **, int *);
-};
-
-class argument_macro_input: public input {
- char *s;
- char *p;
- char *ap;
- int argc;
- char *argv[9];
-public:
- argument_macro_input(const char *, int, char **, input *);
- ~argument_macro_input();
- int get();
- int peek();
-};
-
-input::input(input *x) : next(x)
-{
-}
-
-input::~input()
-{
-}
-
-int input::get_location(char **, int *)
-{
- return 0;
-}
-
-file_input::file_input(FILE *f, const char *fn, input *p)
-: input(p), lineno(0), ptr("")
-{
- fp = f;
- filename = strsave(fn);
-}
-
-file_input::~file_input()
-{
- a_delete filename;
- fclose(fp);
-}
-
-int file_input::read_line()
-{
- for (;;) {
- line.clear();
- lineno++;
- for (;;) {
- int c = getc(fp);
- if (c == EOF)
- break;
- else if (illegal_input_char(c))
- lex_error("illegal input character code %1", c);
- else {
- line += char(c);
- if (c == '\n')
- break;
- }
- }
- if (line.length() == 0)
- return 0;
- if (!(line.length() >= 3 && line[0] == '.' && line[1] == 'E'
- && (line[2] == 'Q' || line[2] == 'N')
- && (line.length() == 3 || line[3] == ' ' || line[3] == '\n'
- || compatible_flag))) {
- line += '\0';
- ptr = line.contents();
- return 1;
- }
- }
-}
-
-int file_input::get()
-{
- if (*ptr != '\0' || read_line())
- return *ptr++ & 0377;
- else
- return EOF;
-}
-
-int file_input::peek()
-{
- if (*ptr != '\0' || read_line())
- return *ptr;
- else
- return EOF;
-}
-
-int file_input::get_location(char **fnp, int *lnp)
-{
- *fnp = filename;
- *lnp = lineno;
- return 1;
-}
-
-macro_input::macro_input(const char *str, input *x) : input(x)
-{
- p = s = strsave(str);
-}
-
-macro_input::~macro_input()
-{
- a_delete s;
-}
-
-int macro_input::get()
-{
- if (p == 0 || *p == '\0')
- return EOF;
- else
- return *p++ & 0377;
-}
-
-int macro_input::peek()
-{
- if (p == 0 || *p == '\0')
- return EOF;
- else
- return *p & 0377;
-}
-
-top_input::top_input(const char *str, const char *fn, int ln, input *x)
-: macro_input(str, x), lineno(ln)
-{
- filename = strsave(fn);
-}
-
-top_input::~top_input()
-{
- a_delete filename;
-}
-
-int top_input::get()
-{
- int c = macro_input::get();
- if (c == '\n')
- lineno++;
- return c;
-}
-
-int top_input::get_location(char **fnp, int *lnp)
-{
- *fnp = filename;
- *lnp = lineno;
- return 1;
-}
-
-// Character representing $1. Must be illegal input character.
-#define ARG1 14
-
-argument_macro_input::argument_macro_input(const char *body, int ac,
- char **av, input *x)
-: input(x), ap(0), argc(ac)
-{
- int i;
- for (i = 0; i < argc; i++)
- argv[i] = av[i];
- p = s = strsave(body);
- int j = 0;
- for (i = 0; s[i] != '\0'; i++)
- if (s[i] == '$' && s[i+1] >= '0' && s[i+1] <= '9') {
- if (s[i+1] != '0')
- s[j++] = ARG1 + s[++i] - '1';
- }
- else
- s[j++] = s[i];
- s[j] = '\0';
-}
-
-
-argument_macro_input::~argument_macro_input()
-{
- for (int i = 0; i < argc; i++)
- a_delete argv[i];
- a_delete s;
-}
-
-int argument_macro_input::get()
-{
- if (ap) {
- if (*ap != '\0')
- return *ap++ & 0377;
- ap = 0;
- }
- if (p == 0)
- return EOF;
- while (*p >= ARG1 && *p <= ARG1 + 8) {
- int i = *p++ - ARG1;
- if (i < argc && argv[i] != 0 && argv[i][0] != '\0') {
- ap = argv[i];
- return *ap++ & 0377;
- }
- }
- if (*p == '\0')
- return EOF;
- return *p++ & 0377;
-}
-
-int argument_macro_input::peek()
-{
- if (ap) {
- if (*ap != '\0')
- return *ap & 0377;
- ap = 0;
- }
- if (p == 0)
- return EOF;
- while (*p >= ARG1 && *p <= ARG1 + 8) {
- int i = *p++ - ARG1;
- if (i < argc && argv[i] != 0 && argv[i][0] != '\0') {
- ap = argv[i];
- return *ap & 0377;
- }
- }
- if (*p == '\0')
- return EOF;
- return *p & 0377;
-}
-
-static input *current_input = 0;
-
-/* we insert a newline between input from different levels */
-
-int get_char()
-{
- if (current_input == 0)
- return EOF;
- else {
- int c = current_input->get();
- if (c != EOF)
- return c;
- else {
- input *tem = current_input;
- current_input = current_input->next;
- delete tem;
- return '\n';
- }
- }
-}
-
-int peek_char()
-{
- if (current_input == 0)
- return EOF;
- else {
- int c = current_input->peek();
- if (c != EOF)
- return c;
- else
- return '\n';
- }
-}
-
-int get_location(char **fnp, int *lnp)
-{
- for (input *p = current_input; p; p = p->next)
- if (p->get_location(fnp, lnp))
- return 1;
- return 0;
-}
-
-string token_buffer;
-const int NCONTEXT = 4;
-string context_ring[NCONTEXT];
-int context_index = 0;
-
-void flush_context()
-{
- for (int i = 0; i < NCONTEXT; i++)
- context_ring[i] = "";
- context_index = 0;
-}
-
-void show_context()
-{
- int i = context_index;
- fputs(" context is\n\t", stderr);
- for (;;) {
- int j = (i + 1) % NCONTEXT;
- if (j == context_index) {
- fputs(">>> ", stderr);
- put_string(context_ring[i], stderr);
- fputs(" <<<", stderr);
- break;
- }
- else if (context_ring[i].length() > 0) {
- put_string(context_ring[i], stderr);
- putc(' ', stderr);
- }
- i = j;
- }
- putc('\n', stderr);
-}
-
-void add_context(const string &s)
-{
- context_ring[context_index] = s;
- context_index = (context_index + 1) % NCONTEXT;
-}
-
-void add_context(char c)
-{
- context_ring[context_index] = c;
- context_index = (context_index + 1) % NCONTEXT;
-}
-
-void add_quoted_context(const string &s)
-{
- string &r = context_ring[context_index];
- r = '"';
- for (int i = 0; i < s.length(); i++)
- if (s[i] == '"')
- r += "\\\"";
- else
- r += s[i];
- r += '"';
- context_index = (context_index + 1) % NCONTEXT;
-}
-
-void init_lex(const char *str, const char *filename, int lineno)
-{
- while (current_input != 0) {
- input *tem = current_input;
- current_input = current_input->next;
- delete tem;
- }
- current_input = new top_input(str, filename, lineno, 0);
- flush_context();
-}
-
-
-void get_delimited_text()
-{
- char *filename;
- int lineno;
- int got_location = get_location(&filename, &lineno);
- int start = get_char();
- while (start == ' ' || start == '\t' || start == '\n')
- start = get_char();
- token_buffer.clear();
- if (start == EOF) {
- if (got_location)
- error_with_file_and_line(filename, lineno,
- "end of input while defining macro");
- else
- error("end of input while defining macro");
- return;
- }
- for (;;) {
- int c = get_char();
- if (c == EOF) {
- if (got_location)
- error_with_file_and_line(filename, lineno,
- "end of input while defining macro");
- else
- error("end of input while defining macro");
- add_context(start + token_buffer);
- return;
- }
- if (c == start)
- break;
- token_buffer += char(c);
- }
- add_context(start + token_buffer + start);
-}
-
-void interpolate_macro_with_args(const char *body)
-{
- char *argv[9];
- int argc = 0;
- int i;
- for (i = 0; i < 9; i++)
- argv[i] = 0;
- int level = 0;
- int c;
- do {
- token_buffer.clear();
- for (;;) {
- c = get_char();
- if (c == EOF) {
- lex_error("end of input while scanning macro arguments");
- break;
- }
- if (level == 0 && (c == ',' || c == ')')) {
- if (token_buffer.length() > 0) {
- token_buffer += '\0';
- argv[argc] = strsave(token_buffer.contents());
- }
- // for `foo()', argc = 0
- if (argc > 0 || c != ')' || i > 0)
- argc++;
- break;
- }
- token_buffer += char(c);
- if (c == '(')
- level++;
- else if (c == ')')
- level--;
- }
- } while (c != ')' && c != EOF);
- current_input = new argument_macro_input(body, argc, argv, current_input);
-}
-
-/* If lookup flag is non-zero the token will be looked up to see
-if it is macro. If it's 1, it will looked up to see if it's a token.
-*/
-
-int get_token(int lookup_flag = 0)
-{
- for (;;) {
- int c = get_char();
- while (c == ' ' || c == '\n')
- c = get_char();
- switch (c) {
- case EOF:
- {
- add_context("end of input");
- }
- return 0;
- case '"':
- {
- int quoted = 0;
- token_buffer.clear();
- for (;;) {
- c = get_char();
- if (c == EOF) {
- lex_error("missing \"");
- break;
- }
- else if (c == '\n') {
- lex_error("newline before end of quoted text");
- break;
- }
- else if (c == '"') {
- if (!quoted)
- break;
- token_buffer[token_buffer.length() - 1] = '"';
- quoted = 0;
- }
- else {
- token_buffer += c;
- quoted = quoted ? 0 : c == '\\';
- }
- }
- }
- add_quoted_context(token_buffer);
- return QUOTED_TEXT;
- case '{':
- case '}':
- case '^':
- case '~':
- case '\t':
- add_context(c);
- return c;
- default:
- {
- int break_flag = 0;
- int quoted = 0;
- token_buffer.clear();
- if (c == '\\')
- quoted = 1;
- else
- token_buffer += c;
- int done = 0;
- while (!done) {
- c = peek_char();
- if (!quoted && lookup_flag != 0 && c == '(') {
- token_buffer += '\0';
- definition *def = macro_table.lookup(token_buffer.contents());
- if (def && def->is_macro && !def->is_simple) {
- (void)get_char(); // skip initial '('
- interpolate_macro_with_args(def->contents);
- break_flag = 1;
- break;
- }
- token_buffer.set_length(token_buffer.length() - 1);
- }
- if (quoted) {
- quoted = 0;
- switch (c) {
- case EOF:
- lex_error("`\\' ignored at end of equation");
- done = 1;
- break;
- case '\n':
- lex_error("`\\' ignored because followed by newline");
- done = 1;
- break;
- case '\t':
- lex_error("`\\' ignored because followed by tab");
- done = 1;
- break;
- case '"':
- (void)get_char();
- token_buffer += '"';
- break;
- default:
- (void)get_char();
- token_buffer += '\\';
- token_buffer += c;
- break;
- }
- }
- else {
- switch (c) {
- case EOF:
- case '{':
- case '}':
- case '^':
- case '~':
- case '"':
- case ' ':
- case '\t':
- case '\n':
- done = 1;
- break;
- case '\\':
- (void)get_char();
- quoted = 1;
- break;
- default:
- (void)get_char();
- token_buffer += char(c);
- break;
- }
- }
- }
- if (break_flag || token_buffer.length() == 0)
- break;
- if (lookup_flag != 0) {
- token_buffer += '\0';
- definition *def = macro_table.lookup(token_buffer.contents());
- token_buffer.set_length(token_buffer.length() - 1);
- if (def) {
- if (def->is_macro) {
- current_input = new macro_input(def->contents, current_input);
- break;
- }
- else if (lookup_flag == 1) {
- add_context(token_buffer);
- return def->tok;
- }
- }
- }
- add_context(token_buffer);
- return TEXT;
- }
- }
- }
-}
-
-void do_include()
-{
- int t = get_token(2);
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad filename for include");
- return;
- }
- token_buffer += '\0';
- const char *filename = token_buffer.contents();
- errno = 0;
- FILE *fp = fopen(filename, "r");
- if (fp == 0) {
- lex_error("can't open included file `%1'", filename);
- return;
- }
- current_input = new file_input(fp, filename, current_input);
-}
-
-void ignore_definition()
-{
- int t = get_token();
- if (t != TEXT) {
- lex_error("bad definition");
- return;
- }
- get_delimited_text();
-}
-
-void do_definition(int is_simple)
-{
- int t = get_token();
- if (t != TEXT) {
- lex_error("bad definition");
- return;
- }
- token_buffer += '\0';
- const char *name = token_buffer.contents();
- definition *def = macro_table.lookup(name);
- if (def == 0) {
- def = new definition;
- macro_table.define(name, def);
- }
- else if (def->is_macro) {
- a_delete def->contents;
- }
- get_delimited_text();
- token_buffer += '\0';
- def->is_macro = 1;
- def->contents = strsave(token_buffer.contents());
- def->is_simple = is_simple;
-}
-
-void do_undef()
-{
- int t = get_token();
- if (t != TEXT) {
- lex_error("bad undef command");
- return;
- }
- token_buffer += '\0';
- macro_table.define(token_buffer.contents(), 0);
-}
-
-void do_gsize()
-{
- int t = get_token(2);
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad argument to gsize command");
- return;
- }
- token_buffer += '\0';
- if (!set_gsize(token_buffer.contents()))
- lex_error("invalid size `%1'", token_buffer.contents());
-}
-
-void do_gfont()
-{
- int t = get_token(2);
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad argument to gfont command");
- return;
- }
- token_buffer += '\0';
- set_gfont(token_buffer.contents());
-}
-
-void do_grfont()
-{
- int t = get_token(2);
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad argument to grfont command");
- return;
- }
- token_buffer += '\0';
- set_grfont(token_buffer.contents());
-}
-
-void do_gbfont()
-{
- int t = get_token(2);
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad argument to gbfont command");
- return;
- }
- token_buffer += '\0';
- set_gbfont(token_buffer.contents());
-}
-
-void do_space()
-{
- int t = get_token(2);
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad argument to space command");
- return;
- }
- token_buffer += '\0';
- char *ptr;
- long n = strtol(token_buffer.contents(), &ptr, 10);
- if (n == 0 && ptr == token_buffer.contents())
- lex_error("bad argument `%1' to space command", token_buffer.contents());
- else
- set_space(int(n));
-}
-
-void do_ifdef()
-{
- int t = get_token();
- if (t != TEXT) {
- lex_error("bad ifdef");
- return;
- }
- token_buffer += '\0';
- definition *def = macro_table.lookup(token_buffer.contents());
- int result = def && def->is_macro && !def->is_simple;
- get_delimited_text();
- if (result) {
- token_buffer += '\0';
- current_input = new macro_input(token_buffer.contents(), current_input);
- }
-}
-
-void do_delim()
-{
- int c = get_char();
- while (c == ' ' || c == '\n')
- c = get_char();
- int d;
- if (c == EOF || (d = get_char()) == EOF)
- lex_error("end of file while reading argument to `delim'");
- else {
- if (c == 'o' && d == 'f' && peek_char() == 'f') {
- (void)get_char();
- start_delim = end_delim = '\0';
- }
- else {
- start_delim = c;
- end_delim = d;
- }
- }
-}
-
-void do_chartype()
-{
- int t = get_token(2);
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad chartype");
- return;
- }
- token_buffer += '\0';
- string type = token_buffer;
- t = get_token();
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad chartype");
- return;
- }
- token_buffer += '\0';
- set_char_type(type.contents(), strsave(token_buffer.contents()));
-}
-
-void do_set()
-{
- int t = get_token(2);
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad set");
- return;
- }
- token_buffer += '\0';
- string param = token_buffer;
- t = get_token();
- if (t != TEXT && t != QUOTED_TEXT) {
- lex_error("bad set");
- return;
- }
- token_buffer += '\0';
- int n;
- if (sscanf(&token_buffer[0], "%d", &n) != 1) {
- lex_error("bad number `%1'", token_buffer.contents());
- return;
- }
- set_param(param.contents(), n);
-}
-
-int yylex()
-{
- for (;;) {
- int tk = get_token(1);
- switch(tk) {
- case UNDEF:
- do_undef();
- break;
- case SDEFINE:
- do_definition(1);
- break;
- case DEFINE:
- do_definition(0);
- break;
- case TDEFINE:
- if (!nroff)
- do_definition(0);
- else
- ignore_definition();
- break;
- case NDEFINE:
- if (nroff)
- do_definition(0);
- else
- ignore_definition();
- break;
- case GSIZE:
- do_gsize();
- break;
- case GFONT:
- do_gfont();
- break;
- case GRFONT:
- do_grfont();
- break;
- case GBFONT:
- do_gbfont();
- break;
- case SPACE:
- do_space();
- break;
- case INCLUDE:
- do_include();
- break;
- case IFDEF:
- do_ifdef();
- break;
- case DELIM:
- do_delim();
- break;
- case CHARTYPE:
- do_chartype();
- break;
- case SET:
- do_set();
- break;
- case QUOTED_TEXT:
- case TEXT:
- token_buffer += '\0';
- yylval.str = strsave(token_buffer.contents());
- // fall through
- default:
- return tk;
- }
- }
-}
-
-void lex_error(const char *message,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- char *filename;
- int lineno;
- if (!get_location(&filename, &lineno))
- error(message, arg1, arg2, arg3);
- else
- error_with_file_and_line(filename, lineno, message, arg1, arg2, arg3);
-}
-
-void yyerror(const char *s)
-{
- char *filename;
- int lineno;
- if (!get_location(&filename, &lineno))
- error(s);
- else
- error_with_file_and_line(filename, lineno, s);
- show_context();
-}
-
diff --git a/contrib/groff/src/preproc/eqn/limit.cc b/contrib/groff/src/preproc/eqn/limit.cc
deleted file mode 100644
index 046885d2a580..000000000000
--- a/contrib/groff/src/preproc/eqn/limit.cc
+++ /dev/null
@@ -1,195 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-class limit_box : public box {
-private:
- box *p;
- box *from;
- box *to;
-public:
- limit_box(box *, box *, box *);
- ~limit_box();
- int compute_metrics(int);
- void output();
- void debug_print();
- void check_tabs(int);
-};
-
-box *make_limit_box(box *pp, box *qq, box *rr)
-{
- return new limit_box(pp, qq, rr);
-}
-
-limit_box::limit_box(box *pp, box *qq, box *rr)
-: p(pp), from(qq), to(rr)
-{
- spacing_type = p->spacing_type;
-}
-
-limit_box::~limit_box()
-{
- delete p;
- delete from;
- delete to;
-}
-
-int limit_box::compute_metrics(int style)
-{
- printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid);
- if (!(style <= SCRIPT_STYLE && one_size_reduction_flag))
- set_script_size();
- printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid);
- int res = 0;
- int mark_uid = -1;
- if (from != 0) {
- res = from->compute_metrics(cramped_style(script_style(style)));
- if (res)
- mark_uid = from->uid;
- }
- if (to != 0) {
- int r = to->compute_metrics(script_style(style));
- if (res && r)
- error("multiple marks and lineups");
- else {
- mark_uid = to->uid;
- res = r;
- }
- }
- printf(".ps \\n[" SIZE_FORMAT "]\n", uid);
- int r = p->compute_metrics(style);
- p->compute_subscript_kern();
- if (res && r)
- error("multiple marks and lineups");
- else {
- mark_uid = p->uid;
- res = r;
- }
- printf(".nr " LEFT_WIDTH_FORMAT " "
- "0\\n[" WIDTH_FORMAT "]",
- uid, p->uid);
- if (from != 0)
- printf(">?(\\n[" SUB_KERN_FORMAT "]+\\n[" WIDTH_FORMAT "])",
- p->uid, from->uid);
- if (to != 0)
- printf(">?(-\\n[" SUB_KERN_FORMAT "]+\\n[" WIDTH_FORMAT "])",
- p->uid, to->uid);
- printf("/2\n");
- printf(".nr " WIDTH_FORMAT " "
- "0\\n[" WIDTH_FORMAT "]",
- uid, p->uid);
- if (from != 0)
- printf(">?(-\\n[" SUB_KERN_FORMAT "]+\\n[" WIDTH_FORMAT "])",
- p->uid, from->uid);
- if (to != 0)
- printf(">?(\\n[" SUB_KERN_FORMAT "]+\\n[" WIDTH_FORMAT "])",
- p->uid, to->uid);
- printf("/2+\\n[" LEFT_WIDTH_FORMAT "]\n", uid);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]", uid, p->uid);
- if (to != 0)
- printf(">?\\n[" WIDTH_FORMAT "]", to->uid);
- if (from != 0)
- printf(">?\\n[" WIDTH_FORMAT "]", from->uid);
- printf("\n");
- if (res)
- printf(".nr " MARK_REG " +(\\n[" LEFT_WIDTH_FORMAT "]"
- "-(\\n[" WIDTH_FORMAT "]/2))\n",
- uid, mark_uid);
- if (to != 0) {
- printf(".nr " SUP_RAISE_FORMAT " %dM+\\n[" DEPTH_FORMAT
- "]>?%dM+\\n[" HEIGHT_FORMAT "]\n",
- uid, big_op_spacing1, to->uid, big_op_spacing3, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" SUP_RAISE_FORMAT "]+\\n["
- HEIGHT_FORMAT "]+%dM\n",
- uid, uid, to->uid, big_op_spacing5);
- }
- else
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- if (from != 0) {
- printf(".nr " SUB_LOWER_FORMAT " %dM+\\n[" HEIGHT_FORMAT
- "]>?%dM+\\n[" DEPTH_FORMAT "]\n",
- uid, big_op_spacing2, from->uid, big_op_spacing4, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" SUB_LOWER_FORMAT "]+\\n["
- DEPTH_FORMAT "]+%dM\n",
- uid, uid, from->uid, big_op_spacing5);
- }
- else
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- return res;
-}
-
-void limit_box::output()
-{
- printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid);
- if (to != 0) {
- printf("\\Z" DELIMITER_CHAR);
- printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid);
- printf("\\h'\\n[" LEFT_WIDTH_FORMAT "]u"
- "+(-\\n[" WIDTH_FORMAT "]u+\\n[" SUB_KERN_FORMAT "]u/2u)'",
- uid, to->uid, p->uid);
- to->output();
- printf(DELIMITER_CHAR);
- }
- if (from != 0) {
- printf("\\Z" DELIMITER_CHAR);
- printf("\\v'\\n[" SUB_LOWER_FORMAT "]u'", uid);
- printf("\\h'\\n[" LEFT_WIDTH_FORMAT "]u"
- "+(-\\n[" SUB_KERN_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u)'",
- uid, p->uid, from->uid);
- from->output();
- printf(DELIMITER_CHAR);
- }
- printf("\\s[\\n[" SIZE_FORMAT "]]", uid);
- printf("\\Z" DELIMITER_CHAR);
- printf("\\h'\\n[" LEFT_WIDTH_FORMAT "]u"
- "-(\\n[" WIDTH_FORMAT "]u/2u)'",
- uid, p->uid);
- p->output();
- printf(DELIMITER_CHAR);
- printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-}
-
-void limit_box::debug_print()
-{
- fprintf(stderr, "{ ");
- p->debug_print();
- fprintf(stderr, " }");
- if (from) {
- fprintf(stderr, " from { ");
- from->debug_print();
- fprintf(stderr, " }");
- }
- if (to) {
- fprintf(stderr, " to { ");
- to->debug_print();
- fprintf(stderr, " }");
- }
-}
-
-void limit_box::check_tabs(int level)
-{
- if (to)
- to->check_tabs(level + 1);
- if (from)
- from->check_tabs(level + 1);
- p->check_tabs(level + 1);
-}
diff --git a/contrib/groff/src/preproc/eqn/list.cc b/contrib/groff/src/preproc/eqn/list.cc
deleted file mode 100644
index 1118fa1b1660..000000000000
--- a/contrib/groff/src/preproc/eqn/list.cc
+++ /dev/null
@@ -1,237 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-list_box *box::to_list_box()
-{
- return 0;
-}
-
-list_box *list_box::to_list_box()
-{
- return this;
-}
-
-void list_box::append(box *pp)
-{
- list_box *q = pp->to_list_box();
- if (q == 0)
- list.append(pp);
- else {
- for (int i = 0; i < q->list.len; i++) {
- list.append(q->list.p[i]);
- q->list.p[i] = 0;
- }
- q->list.len = 0;
- delete q;
- }
-}
-
-list_box::list_box(box *pp) : list(pp), sty(-1)
-{
- list_box *q = pp->to_list_box();
- if (q != 0) {
- // flatten it
- list.p[0] = q->list.p[0];
- for (int i = 1; i < q->list.len; i++) {
- list.append(q->list.p[i]);
- q->list.p[i] = 0;
- }
- q->list.len = 0;
- delete q;
- }
-}
-
-static int compute_spacing(int is_script, int left, int right)
-{
- if (left == SUPPRESS_TYPE || right == SUPPRESS_TYPE)
- return 0;
- if (left == PUNCTUATION_TYPE)
- return is_script ? 0 : thin_space;
- if (left == OPENING_TYPE || right == CLOSING_TYPE)
- return 0;
- if (right == BINARY_TYPE || left == BINARY_TYPE)
- return is_script ? 0 : medium_space;
- if (right == RELATION_TYPE) {
- if (left == RELATION_TYPE)
- return 0;
- else
- return is_script ? 0 : thick_space;
- }
- if (left == RELATION_TYPE)
- return is_script ? 0 : thick_space;
- if (right == OPERATOR_TYPE)
- return thin_space;
- if (left == INNER_TYPE || right == INNER_TYPE)
- return is_script ? 0 : thin_space;
- if (left == OPERATOR_TYPE && right == ORDINARY_TYPE)
- return thin_space;
- return 0;
-}
-
-int list_box::compute_metrics(int style)
-{
- sty = style;
- int i;
- for (i = 0; i < list.len; i++) {
- int t = list.p[i]->spacing_type;
- // 5
- if (t == BINARY_TYPE) {
- int prevt;
- if (i == 0
- || (prevt = list.p[i-1]->spacing_type) == BINARY_TYPE
- || prevt == OPERATOR_TYPE
- || prevt == RELATION_TYPE
- || prevt == OPENING_TYPE
- || prevt == PUNCTUATION_TYPE)
- list.p[i]->spacing_type = ORDINARY_TYPE;
- }
- // 7
- else if ((t == RELATION_TYPE || t == CLOSING_TYPE
- || t == PUNCTUATION_TYPE)
- && i > 0 && list.p[i-1]->spacing_type == BINARY_TYPE)
- list.p[i-1]->spacing_type = ORDINARY_TYPE;
- }
- for (i = 0; i < list.len; i++) {
- unsigned flags = 0;
- if (i - 1 >= 0 && list.p[i - 1]->right_is_italic())
- flags |= HINT_PREV_IS_ITALIC;
- if (i + 1 < list.len && list.p[i + 1]->left_is_italic())
- flags |= HINT_NEXT_IS_ITALIC;
- if (flags)
- list.p[i]->hint(flags);
- }
- is_script = (style <= SCRIPT_STYLE);
- int total_spacing = 0;
- for (i = 1; i < list.len; i++)
- total_spacing += compute_spacing(is_script, list.p[i-1]->spacing_type,
- list.p[i]->spacing_type);
- int res = 0;
- for (i = 0; i < list.len; i++)
- if (!list.p[i]->is_simple()) {
- int r = list.p[i]->compute_metrics(style);
- if (r) {
- if (res)
- error("multiple marks and lineups");
- else {
- compute_sublist_width(i);
- printf(".nr " MARK_REG " +\\n[" TEMP_REG"]\n");
- res = r;
- }
- }
- }
- printf(".nr " WIDTH_FORMAT " %dM", uid, total_spacing);
- for (i = 0; i < list.len; i++)
- if (!list.p[i]->is_simple())
- printf("+\\n[" WIDTH_FORMAT "]", list.p[i]->uid);
- printf("\n");
- printf(".nr " HEIGHT_FORMAT " 0", uid);
- for (i = 0; i < list.len; i++)
- if (!list.p[i]->is_simple())
- printf(">?\\n[" HEIGHT_FORMAT "]", list.p[i]->uid);
- printf("\n");
- printf(".nr " DEPTH_FORMAT " 0", uid);
- for (i = 0; i < list.len; i++)
- if (!list.p[i]->is_simple())
- printf(">?\\n[" DEPTH_FORMAT "]", list.p[i]->uid);
- printf("\n");
- int have_simple = 0;
- for (i = 0; i < list.len && !have_simple; i++)
- have_simple = list.p[i]->is_simple();
- if (have_simple) {
- printf(".nr " WIDTH_FORMAT " +\\w" DELIMITER_CHAR, uid);
- for (i = 0; i < list.len; i++)
- if (list.p[i]->is_simple())
- list.p[i]->output();
- printf(DELIMITER_CHAR "\n");
- printf(".nr " HEIGHT_FORMAT " \\n[rst]>?\\n[" HEIGHT_FORMAT "]\n",
- uid, uid);
- printf(".nr " DEPTH_FORMAT " 0-\\n[rsb]>?\\n[" DEPTH_FORMAT "]\n",
- uid, uid);
- }
- return res;
-}
-
-void list_box::compute_sublist_width(int n)
-{
- int total_spacing = 0;
- int i;
- for (i = 1; i < n + 1 && i < list.len; i++)
- total_spacing += compute_spacing(is_script, list.p[i-1]->spacing_type,
- list.p[i]->spacing_type);
- printf(".nr " TEMP_REG " %dM", total_spacing);
- for (i = 0; i < n; i++)
- if (!list.p[i]->is_simple())
- printf("+\\n[" WIDTH_FORMAT "]", list.p[i]->uid);
- int have_simple = 0;
- for (i = 0; i < n && !have_simple; i++)
- have_simple = list.p[i]->is_simple();
- if (have_simple) {
- printf("+\\w" DELIMITER_CHAR);
- for (i = 0; i < n; i++)
- if (list.p[i]->is_simple())
- list.p[i]->output();
- printf(DELIMITER_CHAR);
- }
- printf("\n");
-}
-
-void list_box::compute_subscript_kern()
-{
- // We can only call compute_subscript_kern if we have called
- // compute_metrics first.
- if (list.p[list.len-1]->is_simple())
- list.p[list.len-1]->compute_metrics(sty);
- list.p[list.len-1]->compute_subscript_kern();
- printf(".nr " SUB_KERN_FORMAT " \\n[" SUB_KERN_FORMAT "]\n",
- uid, list.p[list.len-1]->uid);
-}
-
-void list_box::output()
-{
- for (int i = 0; i < list.len; i++) {
- if (i > 0) {
- int n = compute_spacing(is_script,
- list.p[i-1]->spacing_type,
- list.p[i]->spacing_type);
- if (n > 0)
- printf("\\h'%dM'", n);
- }
- list.p[i]->output();
- }
-}
-
-void list_box::handle_char_type(int st, int ft)
-{
- for (int i = 0; i < list.len; i++)
- list.p[i]->handle_char_type(st, ft);
-}
-
-void list_box::debug_print()
-{
- list.list_debug_print(" ");
-}
-
-void list_box::check_tabs(int level)
-{
- list.list_check_tabs(level);
-}
diff --git a/contrib/groff/src/preproc/eqn/main.cc b/contrib/groff/src/preproc/eqn/main.cc
deleted file mode 100644
index 6dc03f0b0543..000000000000
--- a/contrib/groff/src/preproc/eqn/main.cc
+++ /dev/null
@@ -1,419 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "stringclass.h"
-#include "device.h"
-#include "searchpath.h"
-#include "macropath.h"
-#include "htmlindicate.h"
-#include "pbox.h"
-
-#define STARTUP_FILE "eqnrc"
-
-extern int yyparse();
-
-static char *delim_search (char *, int);
-static int inline_equation (FILE *, string &, string &);
-
-char start_delim = '\0';
-char end_delim = '\0';
-int non_empty_flag;
-int inline_flag;
-int draw_flag = 0;
-int one_size_reduction_flag = 0;
-int compatible_flag = 0;
-int no_newline_in_delim_flag = 0;
-int html = 0;
-// if we encounter a region marked as an image then we
-// do not mark up inline equations.
-int suppress_html = 0;
-
-
-int read_line(FILE *fp, string *p)
-{
- p->clear();
- int c = -1;
- while ((c = getc(fp)) != EOF) {
- if (!illegal_input_char(c))
- *p += char(c);
- else
- error("illegal input character code `%1'", c);
- if (c == '\n')
- break;
- }
- current_lineno++;
- return p->length() > 0;
-}
-
-void do_file(FILE *fp, const char *filename)
-{
- string linebuf;
- string str;
- printf(".lf 1 %s\n", filename);
- current_filename = filename;
- current_lineno = 0;
- while (read_line(fp, &linebuf)) {
- if (linebuf.length() >= 4
- && linebuf[0] == '.' && linebuf[1] == 'l' && linebuf[2] == 'f'
- && (linebuf[3] == ' ' || linebuf[3] == '\n' || compatible_flag)) {
- put_string(linebuf, stdout);
- linebuf += '\0';
- if (interpret_lf_args(linebuf.contents() + 3))
- current_lineno--;
- }
- else if (linebuf.length() >= 12
- && linebuf[0] == '.' && linebuf[1] == 'H' && linebuf[2] == 'T'
- && linebuf[3] == 'M' && linebuf[4] == 'L' && linebuf[5] == '-'
- && linebuf[6] == 'I' && linebuf[7] == 'M' && linebuf[8] == 'A'
- && linebuf[9] == 'G' && linebuf[10] == 'E'
- && linebuf[11] == '\n') {
- put_string(linebuf, stdout);
- suppress_html++;
- }
- else if (linebuf.length() >= 16
- && linebuf[0] == '.' && linebuf[1] == 'H' && linebuf[2] == 'T'
- && linebuf[3] == 'M' && linebuf[4] == 'L' && linebuf[5] == '-'
- && linebuf[6] == 'I' && linebuf[7] == 'M' && linebuf[8] == 'A'
- && linebuf[9] == 'G' && linebuf[10] == 'E' && linebuf[11] == '-'
- && linebuf[12] == 'E' && linebuf[13] == 'N' && linebuf[14] == 'D'
- && linebuf[15] == '\n') {
- put_string(linebuf, stdout);
- suppress_html--;
- }
- else if (linebuf.length() >= 4
- && linebuf[0] == '.'
- && linebuf[1] == 'E'
- && linebuf[2] == 'Q'
- && (linebuf[3] == ' ' || linebuf[3] == '\n'
- || compatible_flag)) {
- if (html && (suppress_html == 0))
- graphic_start(0);
- put_string(linebuf, stdout);
- int start_lineno = current_lineno + 1;
- str.clear();
- for (;;) {
- if (!read_line(fp, &linebuf))
- fatal("end of file before .EN");
- if (linebuf.length() >= 3 && linebuf[0] == '.' && linebuf[1] == 'E') {
- if (linebuf[2] == 'N'
- && (linebuf.length() == 3 || linebuf[3] == ' '
- || linebuf[3] == '\n' || compatible_flag))
- break;
- else if (linebuf[2] == 'Q' && linebuf.length() > 3
- && (linebuf[3] == ' ' || linebuf[3] == '\n'
- || compatible_flag))
- fatal("nested .EQ");
- }
- str += linebuf;
- }
- str += '\0';
- start_string();
- init_lex(str.contents(), current_filename, start_lineno);
- non_empty_flag = 0;
- inline_flag = 0;
- yyparse();
- if (non_empty_flag) {
- printf(".lf %d\n", current_lineno - 1);
- output_string();
- }
- restore_compatibility();
- printf(".lf %d\n", current_lineno);
- put_string(linebuf, stdout);
- if (html && (suppress_html == 0))
- graphic_end();
- }
- else if (start_delim != '\0' && linebuf.search(start_delim) >= 0
- && inline_equation(fp, linebuf, str))
- ;
- else
- put_string(linebuf, stdout);
- }
- current_filename = 0;
- current_lineno = 0;
-}
-
-// Handle an inline equation. Return 1 if it was an inline equation,
-// otherwise.
-static int inline_equation(FILE *fp, string &linebuf, string &str)
-{
- linebuf += '\0';
- char *ptr = &linebuf[0];
- char *start = delim_search(ptr, start_delim);
- if (!start) {
- // It wasn't a delimiter after all.
- linebuf.set_length(linebuf.length() - 1); // strip the '\0'
- return 0;
- }
- start_string();
- inline_flag = 1;
- for (;;) {
- if (no_newline_in_delim_flag && strchr(start + 1, end_delim) == 0) {
- error("missing `%1'", end_delim);
- char *nl = strchr(start + 1, '\n');
- if (nl != 0)
- *nl = '\0';
- do_text(ptr);
- break;
- }
- int start_lineno = current_lineno;
- *start = '\0';
- do_text(ptr);
- ptr = start + 1;
- str.clear();
- for (;;) {
- char *end = strchr(ptr, end_delim);
- if (end != 0) {
- *end = '\0';
- str += ptr;
- ptr = end + 1;
- break;
- }
- str += ptr;
- if (!read_line(fp, &linebuf))
- fatal("end of file before `%1'", end_delim);
- linebuf += '\0';
- ptr = &linebuf[0];
- }
- str += '\0';
- if (html && (suppress_html == 0)) {
- printf(".as %s ", LINE_STRING);
- graphic_start(1);
- printf("\n");
- }
- init_lex(str.contents(), current_filename, start_lineno);
- yyparse();
- if (html && (suppress_html == 0)) {
- printf(".as %s ", LINE_STRING);
- graphic_end();
- printf("\n");
- }
- start = delim_search(ptr, start_delim);
- if (start == 0) {
- char *nl = strchr(ptr, '\n');
- if (nl != 0)
- *nl = '\0';
- do_text(ptr);
- break;
- }
- }
- printf(".lf %d\n", current_lineno);
- output_string();
- restore_compatibility();
- printf(".lf %d\n", current_lineno + 1);
- return 1;
-}
-
-/* Search for delim. Skip over number register and string names etc. */
-
-static char *delim_search(char *ptr, int delim)
-{
- while (*ptr) {
- if (*ptr == delim)
- return ptr;
- if (*ptr++ == '\\') {
- switch (*ptr) {
- case 'n':
- case '*':
- case 'f':
- case 'g':
- case 'k':
- switch (*++ptr) {
- case '\0':
- case '\\':
- break;
- case '(':
- if (*++ptr != '\\' && *ptr != '\0'
- && *++ptr != '\\' && *ptr != '\0')
- ptr++;
- break;
- case '[':
- while (*++ptr != '\0')
- if (*ptr == ']') {
- ptr++;
- break;
- }
- break;
- default:
- ptr++;
- break;
- }
- break;
- case '\\':
- case '\0':
- break;
- default:
- ptr++;
- break;
- }
- }
- }
- return 0;
-}
-
-void usage(FILE *stream)
-{
- fprintf(stream,
- "usage: %s [ -rvDCNR ] -dxx -fn -sn -pn -mn -Mdir -Ts [ files ... ]\n",
- program_name);
-}
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int opt;
- int load_startup_file = 1;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv, "DCRvd:f:p:s:m:T:M:rN", long_options,
- NULL))
- != EOF)
- switch (opt) {
- case 'C':
- compatible_flag = 1;
- break;
- case 'R': // don't load eqnrc
- load_startup_file = 0;
- break;
- case 'M':
- config_macro_path.command_line_dir(optarg);
- break;
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU eqn (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'd':
- if (optarg[0] == '\0' || optarg[1] == '\0')
- error("-d requires two character argument");
- else if (illegal_input_char(optarg[0]))
- error("bad delimiter `%1'", optarg[0]);
- else if (illegal_input_char(optarg[1]))
- error("bad delimiter `%1'", optarg[1]);
- else {
- start_delim = optarg[0];
- end_delim = optarg[1];
- }
- break;
- case 'f':
- set_gfont(optarg);
- break;
- case 'T':
- device = optarg;
- if (strcmp(device, "ps:html") == 0) {
- device = "ps";
- html = 1;
- }
- break;
- case 's':
- if (!set_gsize(optarg))
- error("invalid size `%1'", optarg);
- break;
- case 'p':
- {
- int n;
- if (sscanf(optarg, "%d", &n) == 1)
- set_script_reduction(n);
- else
- error("bad size `%1'", optarg);
- }
- break;
- case 'm':
- {
- int n;
- if (sscanf(optarg, "%d", &n) == 1)
- set_minimum_size(n);
- else
- error("bad size `%1'", optarg);
- }
- break;
- case 'r':
- one_size_reduction_flag = 1;
- break;
- case 'D':
- warning("-D option is obsolete: use `set draw_lines 1' instead");
- draw_flag = 1;
- break;
- case 'N':
- no_newline_in_delim_flag = 1;
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
- init_table(device);
- init_char_table();
- printf(".if !'\\*(.T'%s' "
- ".if !'\\*(.T'html' " // the html device uses `-Tps' to render
- // equations as images
- ".tm warning: %s should have been given a `-T\\*(.T' option\n",
- device, program_name);
- printf(".if '\\*(.T'html' "
- ".if !'%s'ps' "
- ".tm warning: %s should have been given a `-Tps' option\n",
- device, program_name);
- printf(".if '\\*(.T'html' "
- ".if !'%s'ps' "
- ".tm warning: (it is advisable to invoke groff via: groff -Thtml -e)\n",
- device);
- if (load_startup_file) {
- char *path;
- FILE *fp = config_macro_path.open_file(STARTUP_FILE, &path);
- if (fp) {
- do_file(fp, path);
- fclose(fp);
- a_delete path;
- }
- }
- if (optind >= argc)
- do_file(stdin, "-");
- else
- for (int i = optind; i < argc; i++)
- if (strcmp(argv[i], "-") == 0)
- do_file(stdin, "-");
- else {
- errno = 0;
- FILE *fp = fopen(argv[i], "r");
- if (!fp)
- fatal("can't open `%1': %2", argv[i], strerror(errno));
- else {
- do_file(fp, argv[i]);
- fclose(fp);
- }
- }
- if (ferror(stdout) || fflush(stdout) < 0)
- fatal("output error");
- return 0;
-}
diff --git a/contrib/groff/src/preproc/eqn/mark.cc b/contrib/groff/src/preproc/eqn/mark.cc
deleted file mode 100644
index 99d1b75f2f78..000000000000
--- a/contrib/groff/src/preproc/eqn/mark.cc
+++ /dev/null
@@ -1,121 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-class mark_box : public pointer_box {
-public:
- mark_box(box *);
- int compute_metrics(int);
- void output();
- void debug_print();
-};
-
-// we push down marks so that they don't interfere with spacing
-
-box *make_mark_box(box *p)
-{
- list_box *b = p->to_list_box();
- if (b != 0) {
- b->list.p[0] = make_mark_box(b->list.p[0]);
- return b;
- }
- else
- return new mark_box(p);
-}
-
-mark_box::mark_box(box *pp) : pointer_box(pp)
-{
-}
-
-void mark_box::output()
-{
- p->output();
-}
-
-int mark_box::compute_metrics(int style)
-{
- int res = p->compute_metrics(style);
- if (res)
- error("multiple marks and lineups");
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " MARK_REG " 0\n");
- return FOUND_MARK;
-}
-
-void mark_box::debug_print()
-{
- fprintf(stderr, "mark { ");
- p->debug_print();
- fprintf(stderr, " }");
-}
-
-
-class lineup_box : public pointer_box {
-public:
- lineup_box(box *);
- void output();
- int compute_metrics(int style);
- void debug_print();
-};
-
-// we push down lineups so that they don't interfere with spacing
-
-box *make_lineup_box(box *p)
-{
- list_box *b = p->to_list_box();
- if (b != 0) {
- b->list.p[0] = make_lineup_box(b->list.p[0]);
- return b;
- }
- else
- return new lineup_box(p);
-}
-
-lineup_box::lineup_box(box *pp) : pointer_box(pp)
-{
-}
-
-void lineup_box::output()
-{
- p->output();
-}
-
-int lineup_box::compute_metrics(int style)
-{
- int res = p->compute_metrics(style);
- if (res)
- error("multiple marks and lineups");
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " MARK_REG " 0\n");
- return FOUND_LINEUP;
-}
-
-void lineup_box::debug_print()
-{
- fprintf(stderr, "lineup { ");
- p->debug_print();
- fprintf(stderr, " }");
-}
diff --git a/contrib/groff/src/preproc/eqn/neqn.man b/contrib/groff/src/preproc/eqn/neqn.man
deleted file mode 100644
index bca7dc2ed912..000000000000
--- a/contrib/groff/src/preproc/eqn/neqn.man
+++ /dev/null
@@ -1,21 +0,0 @@
-.TH @G@NEQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-@g@neqn \- format equations for ascii output
-.SH SYNOPSIS
-.B @g@neqn
-[@g@eqn options]
-.SH DESCRIPTION
-The
-.B @g@neqn
-program is actually just a shell script which invokes the
-.BR @g@eqn (@MAN1EXT@)
-command with the
-.B ascii
-output device.
-.LP
-Note that
-.B @g@eqn
-does not support low-resolution, typewriter-like devices (although it may
-work adequately for very simple input).
-.SH "SEE ALSO"
-.BR @g@eqn (@MAN1EXT@)
diff --git a/contrib/groff/src/preproc/eqn/neqn.sh b/contrib/groff/src/preproc/eqn/neqn.sh
deleted file mode 100644
index 745599b46a7b..000000000000
--- a/contrib/groff/src/preproc/eqn/neqn.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Provision of this shell script should not be taken to imply that use of
-# GNU eqn with groff -Tascii|-Tlatin1|-Tkoi8-r|-Tutf8|-Tcp1047 is supported.
-# $FreeBSD$
-
-# Default device.
-case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
- *.UTF-8)
- T=utf8 ;;
- iso_8859_1 | *.ISO-8859-1 | *.ISO_8859-1)
- T=latin1 ;;
- *.IBM-1047)
- T=cp1047 ;;
- *.KOI8-R)
- T=koi8-r ;;
- *)
- T=ascii ;;
-esac
-
-: ${GROFF_BIN_PATH=@BINDIR@}
-export PATH=$GROFF_BIN_PATH:$PATH
-exec @g@eqn -T${T} ${1+"$@"}
-
-# eof
diff --git a/contrib/groff/src/preproc/eqn/other.cc b/contrib/groff/src/preproc/eqn/other.cc
deleted file mode 100644
index eb9e50a2bc57..000000000000
--- a/contrib/groff/src/preproc/eqn/other.cc
+++ /dev/null
@@ -1,601 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-class accent_box : public pointer_box {
-private:
- box *ab;
-public:
- accent_box(box *, box *);
- ~accent_box();
- int compute_metrics(int);
- void output();
- void debug_print();
- void check_tabs(int);
-};
-
-box *make_accent_box(box *p, box *q)
-{
- return new accent_box(p, q);
-}
-
-accent_box::accent_box(box *pp, box *qq) : pointer_box(pp), ab(qq)
-{
-}
-
-accent_box::~accent_box()
-{
- delete ab;
-}
-
-#if 0
-int accent_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- p->compute_skew();
- ab->compute_metrics(style);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " SUP_RAISE_FORMAT " \\n[" HEIGHT_FORMAT "]-%dM>?0\n",
- uid, p->uid, x_height);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]+\\n["
- SUP_RAISE_FORMAT "]\n",
- uid, ab->uid, uid);
- return r;
-}
-
-void accent_box::output()
-{
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u+\\n["
- SKEW_FORMAT "]u'",
- p->uid, ab->uid, p->uid);
- printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid);
- ab->output();
- printf("\\h'-\\n[" WIDTH_FORMAT "]u'", ab->uid);
- printf("\\v'\\n[" SUP_RAISE_FORMAT "]u'", uid);
- printf("\\h'-(\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u+\\n["
- SKEW_FORMAT "]u)'",
- p->uid, ab->uid, p->uid);
- p->output();
-}
-#endif
-
-/* This version copes with the possibility of an accent's being wider
-than its accentee. LEFT_WIDTH_FORMAT gives the distance from the
-left edge of the resulting box to the middle of the accentee's box.*/
-
-int accent_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- p->compute_skew();
- ab->compute_metrics(style);
- printf(".nr " LEFT_WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]/2"
- ">?(\\n[" WIDTH_FORMAT "]/2-\\n[" SKEW_FORMAT "])\n",
- uid, p->uid, ab->uid, p->uid);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]/2"
- ">?(\\n[" WIDTH_FORMAT "]/2+\\n[" SKEW_FORMAT "])"
- "+\\n[" LEFT_WIDTH_FORMAT "]\n",
- uid, p->uid, ab->uid, p->uid, uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " SUP_RAISE_FORMAT " \\n[" HEIGHT_FORMAT "]-%dM>?0\n",
- uid, p->uid, x_height);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]+\\n["
- SUP_RAISE_FORMAT "]\n",
- uid, ab->uid, uid);
- if (r)
- printf(".nr " MARK_REG " +\\n[" LEFT_WIDTH_FORMAT "]"
- "-(\\n[" WIDTH_FORMAT "]/2)'\n",
- uid, p->uid);
- return r;
-}
-
-void accent_box::output()
-{
- printf("\\Z" DELIMITER_CHAR);
- printf("\\h'\\n[" LEFT_WIDTH_FORMAT "]u+\\n[" SKEW_FORMAT "]u"
- "-(\\n[" WIDTH_FORMAT "]u/2u)'",
- uid, p->uid, ab->uid);
- printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid);
- ab->output();
- printf(DELIMITER_CHAR);
- printf("\\Z" DELIMITER_CHAR);
- printf("\\h'\\n[" LEFT_WIDTH_FORMAT "]u-(\\n[" WIDTH_FORMAT "]u/2u)'",
- uid, p->uid);
- p->output();
- printf(DELIMITER_CHAR);
- printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-}
-
-void accent_box::check_tabs(int level)
-{
- ab->check_tabs(level + 1);
- p->check_tabs(level + 1);
-}
-
-void accent_box::debug_print()
-{
- fprintf(stderr, "{ ");
- p->debug_print();
- fprintf(stderr, " } accent { ");
- ab->debug_print();
- fprintf(stderr, " }");
-}
-
-class overline_char_box : public simple_box {
-public:
- overline_char_box();
- void output();
- void debug_print();
-};
-
-overline_char_box::overline_char_box()
-{
-}
-
-void overline_char_box::output()
-{
- printf("\\v'-%dM/2u-%dM'", 7*default_rule_thickness, x_height);
- printf((draw_flag ? "\\D'l%dM 0'" : "\\l'%dM\\&\\(ru'"),
- accent_width);
- printf("\\v'%dM/2u+%dM'", 7*default_rule_thickness, x_height);
-}
-
-void overline_char_box::debug_print()
-{
- fprintf(stderr, "<overline char>");
-}
-
-class overline_box : public pointer_box {
-public:
- overline_box(box *);
- int compute_metrics(int);
- void output();
- void debug_print();
-};
-
-box *make_overline_box(box *p)
-{
- if (p->is_char())
- return new accent_box(p, new overline_char_box);
- else
- return new overline_box(p);
-}
-
-overline_box::overline_box(box *pp) : pointer_box(pp)
-{
-}
-
-int overline_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(cramped_style(style));
- // 9
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]+%dM\n",
- uid, p->uid, default_rule_thickness*5);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- return r;
-}
-
-void overline_box::output()
-{
- // 9
- printf("\\Z" DELIMITER_CHAR);
- printf("\\v'-\\n[" HEIGHT_FORMAT "]u-(%dM/2u)'",
- p->uid, 7*default_rule_thickness);
- if (draw_flag)
- printf("\\D'l\\n[" WIDTH_FORMAT "]u 0'", p->uid);
- else
- printf("\\l'\\n[" WIDTH_FORMAT "]u\\&\\(ru'", p->uid);
- printf(DELIMITER_CHAR);
- p->output();
-}
-
-void overline_box::debug_print()
-{
- fprintf(stderr, "{ ");
- p->debug_print();
- fprintf(stderr, " } bar");
-}
-
-class uaccent_box : public pointer_box {
- box *ab;
-public:
- uaccent_box(box *, box *);
- ~uaccent_box();
- int compute_metrics(int);
- void output();
- void compute_subscript_kern();
- void check_tabs(int);
- void debug_print();
-};
-
-box *make_uaccent_box(box *p, box *q)
-{
- return new uaccent_box(p, q);
-}
-
-uaccent_box::uaccent_box(box *pp, box *qq)
-: pointer_box(pp), ab(qq)
-{
-}
-
-uaccent_box::~uaccent_box()
-{
- delete ab;
-}
-
-int uaccent_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- ab->compute_metrics(style);
- printf(".nr " LEFT_WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]/2"
- ">?(\\n[" WIDTH_FORMAT "]/2)\n",
- uid, p->uid, ab->uid);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]/2"
- ">?(\\n[" WIDTH_FORMAT "]/2)"
- "+\\n[" LEFT_WIDTH_FORMAT "]\n",
- uid, p->uid, ab->uid, uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]"
- "+\\n[" DEPTH_FORMAT "]\n",
- uid, p->uid, ab->uid);
- if (r)
- printf(".nr " MARK_REG " +\\n[" LEFT_WIDTH_FORMAT "]"
- "-(\\n[" WIDTH_FORMAT "]/2)'\n",
- uid, p->uid);
- return r;
-}
-
-void uaccent_box::output()
-{
- printf("\\Z" DELIMITER_CHAR);
- printf("\\h'\\n[" LEFT_WIDTH_FORMAT "]u-(\\n[" WIDTH_FORMAT "]u/2u)'",
- uid, ab->uid);
- printf("\\v'\\n[" DEPTH_FORMAT "]u'", p->uid);
- ab->output();
- printf(DELIMITER_CHAR);
- printf("\\Z" DELIMITER_CHAR);
- printf("\\h'\\n[" LEFT_WIDTH_FORMAT "]u-(\\n[" WIDTH_FORMAT "]u/2u)'",
- uid, p->uid);
- p->output();
- printf(DELIMITER_CHAR);
- printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-}
-
-void uaccent_box::check_tabs(int level)
-{
- ab->check_tabs(level + 1);
- p->check_tabs(level + 1);
-}
-
-void uaccent_box::compute_subscript_kern()
-{
- box::compute_subscript_kern(); // want 0 subscript kern
-}
-
-void uaccent_box::debug_print()
-{
- fprintf(stderr, "{ ");
- p->debug_print();
- fprintf(stderr, " } uaccent { ");
- ab->debug_print();
- fprintf(stderr, " }");
-}
-
-class underline_char_box : public simple_box {
-public:
- underline_char_box();
- void output();
- void debug_print();
-};
-
-underline_char_box::underline_char_box()
-{
-}
-
-void underline_char_box::output()
-{
- printf("\\v'%dM/2u'", 7*default_rule_thickness);
- printf((draw_flag ? "\\D'l%dM 0'" : "\\l'%dM\\&\\(ru'"),
- accent_width);
- printf("\\v'-%dM/2u'", 7*default_rule_thickness);
-}
-
-void underline_char_box::debug_print()
-{
- fprintf(stderr, "<underline char>");
-}
-
-
-class underline_box : public pointer_box {
-public:
- underline_box(box *);
- int compute_metrics(int);
- void output();
- void compute_subscript_kern();
- void debug_print();
-};
-
-box *make_underline_box(box *p)
-{
- if (p->is_char())
- return new uaccent_box(p, new underline_char_box);
- else
- return new underline_box(p);
-}
-
-underline_box::underline_box(box *pp) : pointer_box(pp)
-{
-}
-
-int underline_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- // 10
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]+%dM\n",
- uid, p->uid, default_rule_thickness*5);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- return r;
-}
-
-void underline_box::output()
-{
- // 10
- printf("\\Z" DELIMITER_CHAR);
- printf("\\v'\\n[" DEPTH_FORMAT "]u+(%dM/2u)'",
- p->uid, 7*default_rule_thickness);
- if (draw_flag)
- printf("\\D'l\\n[" WIDTH_FORMAT "]u 0'", p->uid);
- else
- printf("\\l'\\n[" WIDTH_FORMAT "]u\\&\\(ru'", p->uid);
- printf(DELIMITER_CHAR);
- p->output();
-}
-
-// we want an underline box to have 0 subscript kern
-
-void underline_box::compute_subscript_kern()
-{
- box::compute_subscript_kern();
-}
-
-void underline_box::debug_print()
-{
- fprintf(stderr, "{ ");
- p->debug_print();
- fprintf(stderr, " } under");
-}
-
-size_box::size_box(char *s, box *pp) : pointer_box(pp), size(s)
-{
-}
-
-int size_box::compute_metrics(int style)
-{
- printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid);
- printf(".ps %s\n", size);
- printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid);
- int r = p->compute_metrics(style);
- printf(".ps \\n[" SIZE_FORMAT "]\n", uid);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- return r;
-}
-
-void size_box::output()
-{
- printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid);
- p->output();
- printf("\\s[\\n[" SIZE_FORMAT "]]", uid);
-}
-
-size_box::~size_box()
-{
- a_delete size;
-}
-
-void size_box::debug_print()
-{
- fprintf(stderr, "size %s { ", size);
- p->debug_print();
- fprintf(stderr, " }");
-}
-
-
-font_box::font_box(char *s, box *pp) : pointer_box(pp), f(s)
-{
-}
-
-font_box::~font_box()
-{
- a_delete f;
-}
-
-int font_box::compute_metrics(int style)
-{
- const char *old_roman_font = current_roman_font;
- current_roman_font = f;
- printf(".nr " FONT_FORMAT " \\n[.f]\n", uid);
- printf(".ft %s\n", f);
- int r = p->compute_metrics(style);
- current_roman_font = old_roman_font;
- printf(".ft \\n[" FONT_FORMAT "]\n", uid);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- return r;
-}
-
-void font_box::output()
-{
- printf("\\f[%s]", f);
- const char *old_roman_font = current_roman_font;
- current_roman_font = f;
- p->output();
- current_roman_font = old_roman_font;
- printf("\\f[\\n[" FONT_FORMAT "]]", uid);
-}
-
-void font_box::debug_print()
-{
- fprintf(stderr, "font %s { ", f);
- p->debug_print();
- fprintf(stderr, " }");
-}
-
-fat_box::fat_box(box *pp) : pointer_box(pp)
-{
-}
-
-int fat_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]+%dM\n",
- uid, p->uid, fat_offset);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- return r;
-}
-
-void fat_box::output()
-{
- p->output();
- printf("\\h'-\\n[" WIDTH_FORMAT "]u'", p->uid);
- printf("\\h'%dM'", fat_offset);
- p->output();
-}
-
-
-void fat_box::debug_print()
-{
- fprintf(stderr, "fat { ");
- p->debug_print();
- fprintf(stderr, " }");
-}
-
-
-vmotion_box::vmotion_box(int i, box *pp) : pointer_box(pp), n(i)
-{
-}
-
-int vmotion_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- if (n > 0) {
- printf(".nr " HEIGHT_FORMAT " %dM+\\n[" HEIGHT_FORMAT "]\n",
- uid, n, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- }
- else {
- printf(".nr " DEPTH_FORMAT " %dM+\\n[" DEPTH_FORMAT "]>?0\n",
- uid, -n, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n",
- uid, p->uid);
- }
- return r;
-}
-
-void vmotion_box::output()
-{
- printf("\\v'%dM'", -n);
- p->output();
- printf("\\v'%dM'", n);
-}
-
-void vmotion_box::debug_print()
-{
- if (n >= 0)
- fprintf(stderr, "up %d { ", n);
- else
- fprintf(stderr, "down %d { ", -n);
- p->debug_print();
- fprintf(stderr, " }");
-}
-
-hmotion_box::hmotion_box(int i, box *pp) : pointer_box(pp), n(i)
-{
-}
-
-int hmotion_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]+%dM\n",
- uid, p->uid, n);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- if (r)
- printf(".nr " MARK_REG " +%dM\n", n);
- return r;
-}
-
-void hmotion_box::output()
-{
- printf("\\h'%dM'", n);
- p->output();
-}
-
-void hmotion_box::debug_print()
-{
- if (n >= 0)
- fprintf(stderr, "fwd %d { ", n);
- else
- fprintf(stderr, "back %d { ", -n);
- p->debug_print();
- fprintf(stderr, " }");
-}
-
-vcenter_box::vcenter_box(box *pp) : pointer_box(pp)
-{
-}
-
-int vcenter_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " SUP_RAISE_FORMAT " \\n[" DEPTH_FORMAT "]-\\n["
- HEIGHT_FORMAT "]/2+%dM\n",
- uid, p->uid, p->uid, axis_height);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]+\\n["
- SUP_RAISE_FORMAT "]>?0\n", uid, p->uid, uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]-\\n["
- SUP_RAISE_FORMAT "]>?0\n", uid, p->uid, uid);
-
- return r;
-}
-
-void vcenter_box::output()
-{
- printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid);
- p->output();
- printf("\\v'\\n[" SUP_RAISE_FORMAT "]u'", uid);
-}
-
-void vcenter_box::debug_print()
-{
- fprintf(stderr, "vcenter { ");
- p->debug_print();
- fprintf(stderr, " }");
-}
-
diff --git a/contrib/groff/src/preproc/eqn/over.cc b/contrib/groff/src/preproc/eqn/over.cc
deleted file mode 100644
index 06b032129fd7..000000000000
--- a/contrib/groff/src/preproc/eqn/over.cc
+++ /dev/null
@@ -1,196 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-class over_box : public box {
-private:
- int reduce_size;
- box *num;
- box *den;
-public:
- over_box(int small, box *, box *);
- ~over_box();
- void debug_print();
- int compute_metrics(int);
- void output();
- void check_tabs(int);
-};
-
-box *make_over_box(box *pp, box *qq)
-{
- return new over_box(0, pp, qq);
-}
-
-box *make_small_over_box(box *pp, box *qq)
-{
- return new over_box(1, pp, qq);
-}
-
-over_box::over_box(int is_small, box *pp, box *qq)
-: reduce_size(is_small), num(pp), den(qq)
-{
- spacing_type = INNER_TYPE;
-}
-
-over_box::~over_box()
-{
- delete num;
- delete den;
-}
-
-int over_box::compute_metrics(int style)
-{
- if (reduce_size) {
- style = script_style(style);
- printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid);
- set_script_size();
- printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid);
- }
- int mark_uid;
- int res = num->compute_metrics(style);
- if (res)
- mark_uid = num->uid;
- int r = den->compute_metrics(cramped_style(style));
- if (r && res)
- error("multiple marks and lineups");
- else {
- mark_uid = den->uid;
- res = r;
- }
- if (reduce_size)
- printf(".ps \\n[" SIZE_FORMAT "]\n", uid);
- printf(".nr " WIDTH_FORMAT " (\\n[" WIDTH_FORMAT "]>?\\n[" WIDTH_FORMAT "]",
- uid, num->uid, den->uid);
- // allow for \(ru being wider than both the numerator and denominator
- if (!draw_flag)
- fputs(">?\\w" DELIMITER_CHAR "\\(ru" DELIMITER_CHAR, stdout);
- printf(")+%dM\n", null_delimiter_space*2 + over_hang*2);
- // 15b
- printf(".nr " SUP_RAISE_FORMAT " %dM\n",
- uid, (reduce_size ? num2 : num1));
- printf(".nr " SUB_LOWER_FORMAT " %dM\n",
- uid, (reduce_size ? denom2 : denom1));
-
- // 15d
- printf(".nr " SUP_RAISE_FORMAT " +(\\n[" DEPTH_FORMAT
- "]-\\n[" SUP_RAISE_FORMAT "]+%dM+(%dM/2)+%dM)>?0\n",
- uid, num->uid, uid, axis_height, default_rule_thickness,
- default_rule_thickness*(reduce_size ? 1 : 3));
- printf(".nr " SUB_LOWER_FORMAT " +(\\n[" HEIGHT_FORMAT
- "]-\\n[" SUB_LOWER_FORMAT "]-%dM+(%dM/2)+%dM)>?0\n",
- uid, den->uid, uid, axis_height, default_rule_thickness,
- default_rule_thickness*(reduce_size ? 1 : 3));
-
-
- printf(".nr " HEIGHT_FORMAT " \\n[" SUP_RAISE_FORMAT "]+\\n["
- HEIGHT_FORMAT "]\n",
- uid, uid, num->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" SUB_LOWER_FORMAT "]+\\n["
- DEPTH_FORMAT "]\n",
- uid, uid, den->uid);
- if (res)
- printf(".nr " MARK_REG " +(\\n[" WIDTH_FORMAT "]-\\n["
- WIDTH_FORMAT "]/2)\n", uid, mark_uid);
- return res;
-}
-
-#define USE_Z
-
-void over_box::output()
-{
- if (reduce_size)
- printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid);
-#ifdef USE_Z
- printf("\\Z" DELIMITER_CHAR);
-#endif
- // move up to the numerator baseline
- printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid);
- // move across so that it's centered
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u'",
- uid, num->uid);
-
- // print the numerator
- num->output();
-
-#ifdef USE_Z
- printf(DELIMITER_CHAR);
-#else
- // back again
- printf("\\h'-\\n[" WIDTH_FORMAT "]u'", num->uid);
- printf("\\h'-(\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u)'",
- uid, num->uid);
- // down again
- printf("\\v'\\n[" SUP_RAISE_FORMAT "]u'", uid);
-#endif
-#ifdef USE_Z
- printf("\\Z" DELIMITER_CHAR);
-#endif
- // move down to the denominator baseline
- printf("\\v'\\n[" SUB_LOWER_FORMAT "]u'", uid);
-
- // move across so that it's centered
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u'",
- uid, den->uid);
-
- // print the the denominator
- den->output();
-
-#ifdef USE_Z
- printf(DELIMITER_CHAR);
-#else
- // back again
- printf("\\h'-\\n[" WIDTH_FORMAT "]u'", den->uid);
- printf("\\h'-(\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u)'",
- uid, den->uid);
- // up again
- printf("\\v'-\\n[" SUB_LOWER_FORMAT "]u'", uid);
-#endif
- if (reduce_size)
- printf("\\s[\\n[" SIZE_FORMAT "]]", uid);
- // draw the line
- printf("\\h'%dM'", null_delimiter_space);
- printf("\\v'-%dM'", axis_height);
- fputs(draw_flag ? "\\D'l" : "\\l'", stdout);
- printf("\\n[" WIDTH_FORMAT "]u-%dM",
- uid, 2*null_delimiter_space);
- fputs(draw_flag ? " 0'" : "\\&\\(ru'", stdout);
- printf("\\v'%dM'", axis_height);
- printf("\\h'%dM'", null_delimiter_space);
-}
-
-void over_box::debug_print()
-{
- fprintf(stderr, "{ ");
- num->debug_print();
- if (reduce_size)
- fprintf(stderr, " } smallover { ");
- else
- fprintf(stderr, " } over { ");
- den->debug_print();
- fprintf(stderr, " }");
-}
-
-void over_box::check_tabs(int level)
-{
- num->check_tabs(level + 1);
- den->check_tabs(level + 1);
-}
diff --git a/contrib/groff/src/preproc/eqn/pbox.h b/contrib/groff/src/preproc/eqn/pbox.h
deleted file mode 100644
index d1f16ac486ae..000000000000
--- a/contrib/groff/src/preproc/eqn/pbox.h
+++ /dev/null
@@ -1,141 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-extern int fat_offset;
-
-extern int over_hang;
-extern int accent_width;
-
-extern int delimiter_factor;
-extern int delimiter_shortfall;
-
-extern int null_delimiter_space;
-extern int script_space;
-extern int thin_space;
-extern int medium_space;
-extern int thick_space;
-
-extern int num1;
-extern int num2;
-// we don't use num3, because we don't have \atop
-extern int denom1;
-extern int denom2;
-extern int axis_height;
-extern int sup1;
-extern int sup2;
-extern int sup3;
-extern int default_rule_thickness;
-extern int sub1;
-extern int sub2;
-extern int sup_drop;
-extern int sub_drop;
-extern int x_height;
-extern int big_op_spacing1;
-extern int big_op_spacing2;
-extern int big_op_spacing3;
-extern int big_op_spacing4;
-extern int big_op_spacing5;
-
-extern int baseline_sep;
-extern int shift_down;
-extern int column_sep;
-extern int matrix_side_sep;
-
-// ms.eqn relies on this!
-
-#define LINE_STRING "10"
-#define MARK_OR_LINEUP_FLAG_REG "MK"
-
-#define WIDTH_FORMAT PREFIX "w%d"
-#define HEIGHT_FORMAT PREFIX "h%d"
-#define DEPTH_FORMAT PREFIX "d%d"
-#define TOTAL_FORMAT PREFIX "t%d"
-#define SIZE_FORMAT PREFIX "z%d"
-#define SMALL_SIZE_FORMAT PREFIX "Z%d"
-#define SUP_RAISE_FORMAT PREFIX "p%d"
-#define SUB_LOWER_FORMAT PREFIX "b%d"
-#define SUB_KERN_FORMAT PREFIX "k%d"
-#define FONT_FORMAT PREFIX "f%d"
-#define SKEW_FORMAT PREFIX "s%d"
-#define LEFT_WIDTH_FORMAT PREFIX "lw%d"
-#define LEFT_DELIM_STRING_FORMAT PREFIX "l%d"
-#define RIGHT_DELIM_STRING_FORMAT PREFIX "r%d"
-#define SQRT_STRING_FORMAT PREFIX "sqr%d"
-#define SQRT_WIDTH_FORMAT PREFIX "sq%d"
-#define BASELINE_SEP_FORMAT PREFIX "bs%d"
-// this needs two parameters, the uid and the column index
-#define COLUMN_WIDTH_FORMAT PREFIX "cw%d,%d"
-
-#define BAR_STRING PREFIX "sqb"
-#define TEMP_REG PREFIX "temp"
-#define MARK_REG PREFIX "mark"
-#define MARK_WIDTH_REG PREFIX "mwidth"
-#define SAVED_MARK_REG PREFIX "smark"
-#define MAX_SIZE_REG PREFIX "mxsz"
-#define REPEAT_APPEND_STRING_MACRO PREFIX "ras"
-#define TOP_HEIGHT_REG PREFIX "th"
-#define TOP_DEPTH_REG PREFIX "td"
-#define MID_HEIGHT_REG PREFIX "mh"
-#define MID_DEPTH_REG PREFIX "md"
-#define BOT_HEIGHT_REG PREFIX "bh"
-#define BOT_DEPTH_REG PREFIX "bd"
-#define EXT_HEIGHT_REG PREFIX "eh"
-#define EXT_DEPTH_REG PREFIX "ed"
-#define TOTAL_HEIGHT_REG PREFIX "tot"
-#define DELTA_REG PREFIX "delta"
-#define DELIM_STRING PREFIX "delim"
-#define DELIM_WIDTH_REG PREFIX "dwidth"
-#define SAVED_FONT_REG PREFIX "sfont"
-#define SAVED_PREV_FONT_REG PREFIX "spfont"
-#define SAVED_INLINE_FONT_REG PREFIX "sifont"
-#define SAVED_INLINE_PREV_FONT_REG PREFIX "sipfont"
-#define SAVED_SIZE_REG PREFIX "ssize"
-#define SAVED_INLINE_SIZE_REG PREFIX "sisize"
-#define SAVED_INLINE_PREV_SIZE_REG PREFIX "sipsize"
-#define SAVE_FONT_STRING PREFIX "sfont"
-#define RESTORE_FONT_STRING PREFIX "rfont"
-#define INDEX_REG PREFIX "i"
-#define TEMP_MACRO PREFIX "tempmac"
-
-#define DELIMITER_CHAR "\\(EQ"
-
-const int CRAMPED_SCRIPT_STYLE = 0;
-const int SCRIPT_STYLE = 1;
-const int CRAMPED_DISPLAY_STYLE = 2;
-const int DISPLAY_STYLE = 3;
-
-extern int script_style(int);
-extern int cramped_style(int);
-
-const int ORDINARY_TYPE = 0;
-const int OPERATOR_TYPE = 1;
-const int BINARY_TYPE = 2;
-const int RELATION_TYPE = 3;
-const int OPENING_TYPE = 4;
-const int CLOSING_TYPE = 5;
-const int PUNCTUATION_TYPE = 6;
-const int INNER_TYPE = 7;
-const int SUPPRESS_TYPE = 8;
-
-void set_script_size();
-
-enum { HINT_PREV_IS_ITALIC = 01, HINT_NEXT_IS_ITALIC = 02 };
-
-extern const char *current_roman_font;
diff --git a/contrib/groff/src/preproc/eqn/pile.cc b/contrib/groff/src/preproc/eqn/pile.cc
deleted file mode 100644
index 0df5241f0fee..000000000000
--- a/contrib/groff/src/preproc/eqn/pile.cc
+++ /dev/null
@@ -1,293 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-// piles and matrices
-
-#include "eqn.h"
-#include "pbox.h"
-
-// SUP_RAISE_FORMAT gives the first baseline
-// BASELINE_SEP_FORMAT gives the separation between baselines
-
-int pile_box::compute_metrics(int style)
-{
- int i;
- for (i = 0; i < col.len; i++)
- col.p[i]->compute_metrics(style);
- printf(".nr " WIDTH_FORMAT " 0", uid);
- for (i = 0; i < col.len; i++)
- printf(">?\\n[" WIDTH_FORMAT "]", col.p[i]->uid);
- printf("\n");
- printf(".nr " BASELINE_SEP_FORMAT " %dM",
- uid, baseline_sep+col.space);
- for (i = 1; i < col.len; i++)
- printf(">?(\\n[" DEPTH_FORMAT "]+\\n[" HEIGHT_FORMAT "]+%dM)",
- col.p[i-1]->uid, col.p[i]->uid, default_rule_thickness*5);
- // round it so that it's a multiple of the vertical resolution
- printf("/\\n(.V+(\\n(.V/2)*\\n(.V\n");
-
- printf(".nr " SUP_RAISE_FORMAT " \\n[" BASELINE_SEP_FORMAT "]*%d/2"
- "+%dM\n",
- uid, uid, col.len-1, axis_height - shift_down);
- printf(".nr " HEIGHT_FORMAT " \\n[" SUP_RAISE_FORMAT "]+\\n["
- HEIGHT_FORMAT "]\n",
- uid, uid, col.p[0]->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" BASELINE_SEP_FORMAT "]*%d+\\n["
- DEPTH_FORMAT "]-\\n[" SUP_RAISE_FORMAT "]\n",
- uid, uid, col.len-1, col.p[col.len-1]->uid, uid);
- return FOUND_NOTHING;
-}
-
-void pile_box::output()
-{
- int i;
- printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid);
- for (i = 0; i < col.len; i++) {
- switch (col.align) {
- case LEFT_ALIGN:
- break;
- case CENTER_ALIGN:
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u'",
- uid, col.p[i]->uid);
- break;
- case RIGHT_ALIGN:
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u'",
- uid, col.p[i]->uid);
- break;
- default:
- assert(0);
- }
- col.p[i]->output();
- printf("\\h'-\\n[" WIDTH_FORMAT "]u'", col.p[i]->uid);
- switch (col.align) {
- case LEFT_ALIGN:
- break;
- case CENTER_ALIGN:
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u'",
- col.p[i]->uid, uid);
- break;
- case RIGHT_ALIGN:
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u'",
- col.p[i]->uid, uid);
- break;
- default:
- assert(0);
- }
- if (i != col.len - 1)
- printf("\\v'\\n[" BASELINE_SEP_FORMAT "]u'", uid);
- }
- printf("\\v'\\n[" SUP_RAISE_FORMAT "]u'", uid);
- printf("\\v'-(%du*\\n[" BASELINE_SEP_FORMAT "]u)'", col.len - 1, uid);
- printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-}
-
-pile_box::pile_box(box *pp) : col(pp)
-{
-}
-
-void pile_box::check_tabs(int level)
-{
- col.list_check_tabs(level);
-}
-
-void pile_box::debug_print()
-{
- col.debug_print("pile");
-}
-
-int matrix_box::compute_metrics(int style)
-{
- int i, j;
- int maxlen = 0;
- int space = 0;
- for (i = 0; i < len; i++) {
- for (j = 0; j < p[i]->len; j++)
- p[i]->p[j]->compute_metrics(style);
- if (p[i]->len > maxlen)
- maxlen = p[i]->len;
- if (p[i]->space > space)
- space = p[i]->space;
- }
- for (i = 0; i < len; i++) {
- printf(".nr " COLUMN_WIDTH_FORMAT " 0", uid, i);
- for (j = 0; j < p[i]->len; j++)
- printf(">?\\n[" WIDTH_FORMAT "]", p[i]->p[j]->uid);
- printf("\n");
- }
- printf(".nr " WIDTH_FORMAT " %dM",
- uid, column_sep*(len-1)+2*matrix_side_sep);
- for (i = 0; i < len; i++)
- printf("+\\n[" COLUMN_WIDTH_FORMAT "]", uid, i);
- printf("\n");
- printf(".nr " BASELINE_SEP_FORMAT " %dM",
- uid, baseline_sep+space);
- for (i = 0; i < len; i++)
- for (j = 1; j < p[i]->len; j++)
- printf(">?(\\n[" DEPTH_FORMAT "]+\\n[" HEIGHT_FORMAT "]+%dM)",
- p[i]->p[j-1]->uid, p[i]->p[j]->uid, default_rule_thickness*5);
- // round it so that it's a multiple of the vertical resolution
- printf("/\\n(.V+(\\n(.V/2)*\\n(.V\n");
- printf(".nr " SUP_RAISE_FORMAT " \\n[" BASELINE_SEP_FORMAT "]*%d/2"
- "+%dM\n",
- uid, uid, maxlen-1, axis_height - shift_down);
- printf(".nr " HEIGHT_FORMAT " 0\\n[" SUP_RAISE_FORMAT "]+(0",
- uid, uid);
- for (i = 0; i < len; i++)
- printf(">?\\n[" HEIGHT_FORMAT "]", p[i]->p[0]->uid);
- printf(")>?0\n");
- printf(".nr " DEPTH_FORMAT " \\n[" BASELINE_SEP_FORMAT "]*%d-\\n["
- SUP_RAISE_FORMAT "]+(0",
- uid, uid, maxlen-1, uid);
- for (i = 0; i < len; i++)
- if (p[i]->len == maxlen)
- printf(">?\\n[" DEPTH_FORMAT "]", p[i]->p[maxlen-1]->uid);
- printf(")>?0\n");
- return FOUND_NOTHING;
-}
-
-void matrix_box::output()
-{
- printf("\\h'%dM'", matrix_side_sep);
- for (int i = 0; i < len; i++) {
- int j;
- printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid);
- for (j = 0; j < p[i]->len; j++) {
- switch (p[i]->align) {
- case LEFT_ALIGN:
- break;
- case CENTER_ALIGN:
- printf("\\h'\\n[" COLUMN_WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u/2u'",
- uid, i, p[i]->p[j]->uid);
- break;
- case RIGHT_ALIGN:
- printf("\\h'\\n[" COLUMN_WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u'",
- uid, i, p[i]->p[j]->uid);
- break;
- default:
- assert(0);
- }
- p[i]->p[j]->output();
- printf("\\h'-\\n[" WIDTH_FORMAT "]u'", p[i]->p[j]->uid);
- switch (p[i]->align) {
- case LEFT_ALIGN:
- break;
- case CENTER_ALIGN:
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" COLUMN_WIDTH_FORMAT "]u/2u'",
- p[i]->p[j]->uid, uid, i);
- break;
- case RIGHT_ALIGN:
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" COLUMN_WIDTH_FORMAT "]u'",
- p[i]->p[j]->uid, uid, i);
- break;
- default:
- assert(0);
- }
- if (j != p[i]->len - 1)
- printf("\\v'\\n[" BASELINE_SEP_FORMAT "]u'", uid);
- }
- printf("\\v'\\n[" SUP_RAISE_FORMAT "]u'", uid);
- printf("\\v'-(%du*\\n[" BASELINE_SEP_FORMAT "]u)'", p[i]->len - 1, uid);
- printf("\\h'\\n[" COLUMN_WIDTH_FORMAT "]u'", uid, i);
- if (i != len - 1)
- printf("\\h'%dM'", column_sep);
- }
- printf("\\h'%dM'", matrix_side_sep);
-}
-
-matrix_box::matrix_box(column *pp)
-{
- p = new column*[10];
- for (int i = 0; i < 10; i++)
- p[i] = 0;
- maxlen = 10;
- len = 1;
- p[0] = pp;
-}
-
-matrix_box::~matrix_box()
-{
- for (int i = 0; i < len; i++)
- delete p[i];
- a_delete p;
-}
-
-void matrix_box::append(column *pp)
-{
- if (len + 1 > maxlen) {
- column **oldp = p;
- maxlen *= 2;
- p = new column*[maxlen];
- memcpy(p, oldp, sizeof(column*)*len);
- a_delete oldp;
- }
- p[len++] = pp;
-}
-
-void matrix_box::check_tabs(int level)
-{
- for (int i = 0; i < len; i++)
- p[i]->list_check_tabs(level);
-}
-
-void matrix_box::debug_print()
-{
- fprintf(stderr, "matrix { ");
- p[0]->debug_print("col");
- for (int i = 1; i < len; i++) {
- fprintf(stderr, " ");
- p[i]->debug_print("col");
- }
- fprintf(stderr, " }");
-}
-
-column::column(box *pp) : box_list(pp), align(CENTER_ALIGN), space(0)
-{
-}
-
-void column::set_alignment(alignment a)
-{
- align = a;
-}
-
-void column::set_space(int n)
-{
- space = n;
-}
-
-void column::debug_print(const char *s)
-{
- char c = '\0'; // shut up -Wall
- switch (align) {
- case LEFT_ALIGN:
- c = 'l';
- break;
- case RIGHT_ALIGN:
- c = 'r';
- break;
- case CENTER_ALIGN:
- c = 'c';
- break;
- default:
- assert(0);
- }
- fprintf(stderr, "%c%s %d { ", c, s, space);
- list_debug_print(" above ");
- fprintf(stderr, " }");
-}
-
diff --git a/contrib/groff/src/preproc/eqn/script.cc b/contrib/groff/src/preproc/eqn/script.cc
deleted file mode 100644
index 7c2e6c258807..000000000000
--- a/contrib/groff/src/preproc/eqn/script.cc
+++ /dev/null
@@ -1,221 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-class script_box : public pointer_box {
-private:
- box *sub;
- box *sup;
-public:
- script_box(box *, box *, box *);
- ~script_box();
- int compute_metrics(int);
- void output();
- void debug_print();
- int left_is_italic();
- void hint(unsigned);
- void check_tabs(int);
-};
-
-/* The idea is that the script should attach to the rightmost box
-of a list. For example, given `2x sup 3', the superscript should
-attach to `x' rather than `2x'. */
-
-box *make_script_box(box *nuc, box *sub, box *sup)
-{
- list_box *b = nuc->to_list_box();
- if (b != 0) {
- b->list.p[b->list.len-1] = make_script_box(b->list.p[b->list.len - 1],
- sub,
- sup);
- return b;
- }
- else
- return new script_box(nuc, sub, sup);
-}
-
-script_box::script_box(box *pp, box *qq, box *rr)
-: pointer_box(pp), sub(qq), sup(rr)
-{
-}
-
-script_box::~script_box()
-{
- delete sub;
- delete sup;
-}
-
-int script_box::left_is_italic()
-{
- return p->left_is_italic();
-}
-
-int script_box::compute_metrics(int style)
-{
- int res = p->compute_metrics(style);
- p->compute_subscript_kern();
- printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid);
- if (!(style <= SCRIPT_STYLE && one_size_reduction_flag))
- set_script_size();
- printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid);
- if (sub != 0)
- sub->compute_metrics(cramped_style(script_style(style)));
- if (sup != 0)
- sup->compute_metrics(script_style(style));
- // 18a
- if (p->is_char()) {
- printf(".nr " SUP_RAISE_FORMAT " 0\n", uid);
- printf(".nr " SUB_LOWER_FORMAT " 0\n", uid);
- }
- else {
- printf(".nr " SUP_RAISE_FORMAT " \\n[" HEIGHT_FORMAT "]-%dM>?0\n",
- uid, p->uid, sup_drop);
- printf(".nr " SUB_LOWER_FORMAT " \\n[" DEPTH_FORMAT "]+%dM\n",
- uid, p->uid, sub_drop);
- }
- printf(".ps \\n[" SIZE_FORMAT "]\n", uid);
- if (sup == 0) {
- assert(sub != 0);
- // 18b
- printf(".nr " SUB_LOWER_FORMAT " \\n[" SUB_LOWER_FORMAT "]>?%dM>?(\\n["
- HEIGHT_FORMAT "]-(%dM*4/5))\n",
- uid, uid, sub1, sub->uid, x_height);
- }
- else {
- // sup != 0
- // 18c
- int p;
- if (style == DISPLAY_STYLE)
- p = sup1;
- else if (style & 1) // not cramped
- p = sup2;
- else
- p = sup3;
- printf(".nr " SUP_RAISE_FORMAT " \\n[" SUP_RAISE_FORMAT
- "]>?%dM>?(\\n[" DEPTH_FORMAT "]+(%dM/4))\n",
- uid, uid, p, sup->uid, x_height);
- // 18d
- if (sub != 0) {
- printf(".nr " SUB_LOWER_FORMAT " \\n[" SUB_LOWER_FORMAT "]>?%dM\n",
- uid, uid, sub2);
- // 18e
- printf(".nr " TEMP_REG " \\n[" DEPTH_FORMAT "]-\\n["
- SUP_RAISE_FORMAT "]+\\n[" HEIGHT_FORMAT "]-\\n["
- SUB_LOWER_FORMAT "]+(4*%dM)\n",
- sup->uid, uid, sub->uid, uid, default_rule_thickness);
- printf(".if \\n[" TEMP_REG "] \\{");
- printf(".nr " SUB_LOWER_FORMAT " +\\n[" TEMP_REG "]\n", uid);
- printf(".nr " TEMP_REG " (%dM*4/5)-\\n[" SUP_RAISE_FORMAT
- "]+\\n[" DEPTH_FORMAT "]>?0\n",
- x_height, uid, sup->uid);
- printf(".nr " SUP_RAISE_FORMAT " +\\n[" TEMP_REG "]\n", uid);
- printf(".nr " SUB_LOWER_FORMAT " -\\n[" TEMP_REG "]\n", uid);
- printf(".\\}\n");
- }
- }
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]", uid, p->uid);
- if (sub != 0 && sup != 0)
- printf("+((\\n[" WIDTH_FORMAT "]-\\n[" SUB_KERN_FORMAT "]>?\\n["
- WIDTH_FORMAT "])+%dM)>?0\n",
- sub->uid, p->uid, sup->uid, script_space);
- else if (sub != 0)
- printf("+(\\n[" WIDTH_FORMAT "]-\\n[" SUB_KERN_FORMAT "]+%dM)>?0\n",
- sub->uid, p->uid, script_space);
- else if (sup != 0)
- printf("+(\\n[" WIDTH_FORMAT "]+%dM)>?0\n", sup->uid, script_space);
- else
- printf("\n");
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]",
- uid, p->uid);
- if (sup != 0)
- printf(">?(\\n[" SUP_RAISE_FORMAT "]+\\n[" HEIGHT_FORMAT "])",
- uid, sup->uid);
- if (sub != 0)
- printf(">?(-\\n[" SUB_LOWER_FORMAT "]+\\n[" HEIGHT_FORMAT "])",
- uid, sub->uid);
- printf("\n");
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]",
- uid, p->uid);
- if (sub != 0)
- printf(">?(\\n[" SUB_LOWER_FORMAT "]+\\n[" DEPTH_FORMAT "])",
- uid, sub->uid);
- if (sup != 0)
- printf(">?(-\\n[" SUP_RAISE_FORMAT "]+\\n[" DEPTH_FORMAT "])",
- uid, sup->uid);
- printf("\n");
- return res;
-}
-
-void script_box::output()
-{
- p->output();
- if (sup != 0) {
- printf("\\Z" DELIMITER_CHAR);
- printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid);
- printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid);
- sup->output();
- printf("\\s[\\n[" SIZE_FORMAT "]]", uid);
- printf(DELIMITER_CHAR);
- }
- if (sub != 0) {
- printf("\\Z" DELIMITER_CHAR);
- printf("\\v'\\n[" SUB_LOWER_FORMAT "]u'", uid);
- printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid);
- printf("\\h'-\\n[" SUB_KERN_FORMAT "]u'", p->uid);
- sub->output();
- printf("\\s[\\n[" SIZE_FORMAT "]]", uid);
- printf(DELIMITER_CHAR);
- }
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u'",
- uid, p->uid);
-}
-
-void script_box::hint(unsigned flags)
-{
- p->hint(flags & ~HINT_NEXT_IS_ITALIC);
-}
-
-void script_box::debug_print()
-{
- fprintf(stderr, "{ ");
- p->debug_print();
- fprintf(stderr, " }");
- if (sub) {
- fprintf(stderr, " sub { ");
- sub->debug_print();
- fprintf(stderr, " }");
- }
- if (sup) {
- fprintf(stderr, " sup { ");
- sup->debug_print();
- fprintf(stderr, " }");
- }
-}
-
-void script_box::check_tabs(int level)
-{
- if (sup)
- sup->check_tabs(level + 1);
- if (sub)
- sub->check_tabs(level + 1);
- p->check_tabs(level);
-}
diff --git a/contrib/groff/src/preproc/eqn/special.cc b/contrib/groff/src/preproc/eqn/special.cc
deleted file mode 100644
index 310261ae4c59..000000000000
--- a/contrib/groff/src/preproc/eqn/special.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-#define STRING_FORMAT PREFIX "str%d"
-
-#define SPECIAL_STRING "0s"
-#define SPECIAL_WIDTH_REG "0w"
-#define SPECIAL_HEIGHT_REG "0h"
-#define SPECIAL_DEPTH_REG "0d"
-#define SPECIAL_SUB_KERN_REG "0skern"
-#define SPECIAL_SKEW_REG "0skew"
-
-/*
-For example:
-
-.de Cl
-.ds 0s \Z'\\*[0s]'\v'\\n(0du'\D'l \\n(0wu -\\n(0hu-\\n(0du'\v'\\n(0hu'
-..
-.EQ
-define cancel 'special Cl'
-.EN
-*/
-
-
-class special_box : public pointer_box {
- char *macro_name;
-public:
- special_box(char *, box *);
- ~special_box();
- int compute_metrics(int);
- void compute_subscript_kern();
- void compute_skew();
- void output();
- void debug_print();
-};
-
-box *make_special_box(char *s, box *p)
-{
- return new special_box(s, p);
-}
-
-special_box::special_box(char *s, box *pp) : pointer_box(pp), macro_name(s)
-{
-}
-
-special_box::~special_box()
-{
- a_delete macro_name;
-}
-
-int special_box::compute_metrics(int style)
-{
- int r = p->compute_metrics(style);
- p->compute_subscript_kern();
- p->compute_skew();
- printf(".ds " SPECIAL_STRING " \"");
- p->output();
- printf("\n");
- printf(".nr " SPECIAL_WIDTH_REG " 0\\n[" WIDTH_FORMAT "]\n", p->uid);
- printf(".nr " SPECIAL_HEIGHT_REG " \\n[" HEIGHT_FORMAT "]\n", p->uid);
- printf(".nr " SPECIAL_DEPTH_REG " \\n[" DEPTH_FORMAT "]\n", p->uid);
- printf(".nr " SPECIAL_SUB_KERN_REG " \\n[" SUB_KERN_FORMAT "]\n", p->uid);
- printf(".nr " SPECIAL_SKEW_REG " 0\\n[" SKEW_FORMAT "]\n", p->uid);
- printf(".%s\n", macro_name);
- printf(".rn " SPECIAL_STRING " " STRING_FORMAT "\n", uid);
- printf(".nr " WIDTH_FORMAT " 0\\n[" SPECIAL_WIDTH_REG "]\n", uid);
- printf(".nr " HEIGHT_FORMAT " 0>?\\n[" SPECIAL_HEIGHT_REG "]\n", uid);
- printf(".nr " DEPTH_FORMAT " 0>?\\n[" SPECIAL_DEPTH_REG "]\n", uid);
- printf(".nr " SUB_KERN_FORMAT " 0>?\\n[" SPECIAL_SUB_KERN_REG "]\n", uid);
- printf(".nr " SKEW_FORMAT " 0\\n[" SPECIAL_SKEW_REG "]\n", uid);
- // User will have to change MARK_REG if appropriate.
- return r;
-}
-
-void special_box::compute_subscript_kern()
-{
- // Already computed in compute_metrics(), so do nothing.
-}
-
-void special_box::compute_skew()
-{
- // Already computed in compute_metrics(), so do nothing.
-}
-
-void special_box::output()
-{
- printf("\\*[" STRING_FORMAT "]", uid);
-}
-
-void special_box::debug_print()
-{
- fprintf(stderr, "special %s { ", macro_name);
- p->debug_print();
- fprintf(stderr, " }");
-}
diff --git a/contrib/groff/src/preproc/eqn/sqrt.cc b/contrib/groff/src/preproc/eqn/sqrt.cc
deleted file mode 100644
index 6109ffeaf67c..000000000000
--- a/contrib/groff/src/preproc/eqn/sqrt.cc
+++ /dev/null
@@ -1,179 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-
-
-class sqrt_box : public pointer_box {
-public:
- sqrt_box(box *);
- int compute_metrics(int style);
- void output();
- void debug_print();
- void check_tabs(int);
-};
-
-box *make_sqrt_box(box *pp)
-{
- return new sqrt_box(pp);
-}
-
-sqrt_box::sqrt_box(box *pp) : pointer_box(pp)
-{
-}
-
-#define SQRT_CHAR "\\(sr"
-#define RADICAL_EXTENSION_CHAR "\\[radicalex]"
-
-#define SQRT_CHAIN "\\[sr\\\\n[" INDEX_REG "]]"
-#define BAR_CHAIN "\\[radicalex\\\\n[" INDEX_REG "]]"
-
-int sqrt_box::compute_metrics(int style)
-{
- // 11
- int r = p->compute_metrics(cramped_style(style));
- printf(".nr " TEMP_REG " \\n[" HEIGHT_FORMAT "]+\\n[" DEPTH_FORMAT
- "]+%dM+(%dM/4)\n",
- p->uid, p->uid, default_rule_thickness,
- (style > SCRIPT_STYLE ? x_height : default_rule_thickness));
- printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid);
- printf(".ds " SQRT_STRING_FORMAT " " SQRT_CHAR "\n", uid);
- printf(".ds " BAR_STRING " " RADICAL_EXTENSION_CHAR "\n");
- printf(".nr " SQRT_WIDTH_FORMAT
- " 0\\w" DELIMITER_CHAR SQRT_CHAR DELIMITER_CHAR "\n",
- uid);
- printf(".if \\n[rst]-\\n[rsb]-%dM<\\n[" TEMP_REG "] \\{",
- default_rule_thickness);
-
- printf(".nr " INDEX_REG " 0\n"
- ".de " TEMP_MACRO "\n"
- ".ie c" SQRT_CHAIN " \\{"
- ".ds " SQRT_STRING_FORMAT " " SQRT_CHAIN "\n"
- ".ie c" BAR_CHAIN " .ds " BAR_STRING " " BAR_CHAIN "\n"
- ".el .ds " BAR_STRING " " RADICAL_EXTENSION_CHAR "\n"
- ".nr " SQRT_WIDTH_FORMAT
- " 0\\w" DELIMITER_CHAR SQRT_CHAIN DELIMITER_CHAR "\n"
- ".if \\\\n[rst]-\\\\n[rsb]-%dM<\\n[" TEMP_REG "] \\{"
- ".nr " INDEX_REG " +1\n"
- "." TEMP_MACRO "\n"
- ".\\}\\}\n"
- ".el .nr " INDEX_REG " 0-1\n"
- "..\n"
- "." TEMP_MACRO "\n",
- uid, uid, default_rule_thickness);
-
- printf(".if \\n[" INDEX_REG "]<0 \\{");
-
- // Determine the maximum point size
- printf(".ps 1000\n");
- printf(".nr " MAX_SIZE_REG " \\n[.s]\n");
- printf(".ps \\n[" SIZE_FORMAT "]\n", uid);
- // We define a macro that will increase the current point size
- // until we get a radical sign that's tall enough or we reach
- // the maximum point size.
- printf(".de " TEMP_MACRO "\n"
- ".nr " SQRT_WIDTH_FORMAT
- " 0\\w" DELIMITER_CHAR "\\*[" SQRT_STRING_FORMAT "]" DELIMITER_CHAR "\n"
- ".if \\\\n[rst]-\\\\n[rsb]-%dM<\\n[" TEMP_REG "]"
- "&(\\\\n[.s]<\\n[" MAX_SIZE_REG "]) \\{"
- ".ps +1\n"
- "." TEMP_MACRO "\n"
- ".\\}\n"
- "..\n"
- "." TEMP_MACRO "\n",
- uid, uid, default_rule_thickness);
-
- printf(".\\}\\}\n");
-
- printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid);
- // set TEMP_REG to the amount by which the radical sign is too big
- printf(".nr " TEMP_REG " \\n[rst]-\\n[rsb]-%dM-\\n[" TEMP_REG "]\n",
- default_rule_thickness);
- // If TEMP_REG is negative, the bottom of the radical sign should
- // be -TEMP_REG above the bottom of p. If it's positive, the bottom
- // of the radical sign should be TEMP_REG/2 below the bottom of p.
- // This calculates the amount by which the baseline of the radical
- // should be raised.
- printf(".nr " SUP_RAISE_FORMAT " (-\\n[" TEMP_REG "]>?(-\\n[" TEMP_REG "]/2))"
- "-\\n[rsb]-\\n[" DEPTH_FORMAT "]\n", uid, p->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]"
- ">?(\\n[" SUP_RAISE_FORMAT "]+\\n[rst])\n",
- uid, p->uid, uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]"
- ">?(-\\n[" SUP_RAISE_FORMAT "]-\\n[rsb])\n",
- uid, p->uid, uid);
- // Do this last, so we don't lose height and depth information on
- // the radical sign.
- // Remember that the width of the bar might be greater than the width of p.
-
- printf(".nr " TEMP_REG " "
- "\\n[" WIDTH_FORMAT "]"
- ">?\\w" DELIMITER_CHAR "\\*[" BAR_STRING "]" DELIMITER_CHAR "\n",
- p->uid);
- printf(".as " SQRT_STRING_FORMAT " "
- "\\l'\\n[" TEMP_REG "]u\\&\\*[" BAR_STRING "]'\n",
- uid);
- printf(".nr " WIDTH_FORMAT " \\n[" TEMP_REG "]"
- "+\\n[" SQRT_WIDTH_FORMAT "]\n",
- uid, uid);
-
- if (r)
- printf(".nr " MARK_REG " +\\n[" SQRT_WIDTH_FORMAT "]\n", uid);
- // the top of the bar might be higher than the top of the radical sign
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]"
- ">?(\\n[" SUP_RAISE_FORMAT "]+\\n[rst])\n",
- uid, p->uid, uid);
- // put a bit of extra space above the bar
- printf(".nr " HEIGHT_FORMAT " +%dM\n", uid, default_rule_thickness);
- printf(".ps \\n[" SIZE_FORMAT "]\n", uid);
- return r;
-}
-
-void sqrt_box::output()
-{
- printf("\\Z" DELIMITER_CHAR);
- printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid);
- printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid);
- printf("\\*[" SQRT_STRING_FORMAT "]", uid);
- printf("\\s[\\n[" SIZE_FORMAT "]]", uid);
- printf(DELIMITER_CHAR);
-
- printf("\\Z" DELIMITER_CHAR);
- printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u"
- "+\\n[" SQRT_WIDTH_FORMAT "]u/2u'",
- uid, p->uid, uid);
- p->output();
- printf(DELIMITER_CHAR);
-
- printf("\\h'\\n[" WIDTH_FORMAT "]u'", uid);
-}
-
-void sqrt_box::debug_print()
-{
- fprintf(stderr, "sqrt { ");
- p->debug_print();
- fprintf(stderr, " }");
-}
-
-void sqrt_box::check_tabs(int level)
-{
- p->check_tabs(level + 1);
-}
diff --git a/contrib/groff/src/preproc/eqn/text.cc b/contrib/groff/src/preproc/eqn/text.cc
deleted file mode 100644
index b0f1700c221d..000000000000
--- a/contrib/groff/src/preproc/eqn/text.cc
+++ /dev/null
@@ -1,528 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "eqn.h"
-#include "pbox.h"
-#include "ptable.h"
-
-class char_box : public simple_box {
- unsigned char c;
- char next_is_italic;
- char prev_is_italic;
-public:
- char_box(unsigned char);
- void debug_print();
- void output();
- int is_char();
- int left_is_italic();
- int right_is_italic();
- void hint(unsigned);
- void handle_char_type(int, int);
-};
-
-class special_char_box : public simple_box {
- char *s;
-public:
- special_char_box(const char *);
- ~special_char_box();
- void output();
- void debug_print();
- int is_char();
- void handle_char_type(int, int);
-};
-
-const char *spacing_type_table[] = {
- "ordinary",
- "operator",
- "binary",
- "relation",
- "opening",
- "closing",
- "punctuation",
- "inner",
- "suppress",
- 0,
-};
-
-const int DIGIT_TYPE = 0;
-const int LETTER_TYPE = 1;
-
-const char *font_type_table[] = {
- "digit",
- "letter",
- 0,
-};
-
-struct char_info {
- int spacing_type;
- int font_type;
- char_info();
-};
-
-char_info::char_info()
-: spacing_type(ORDINARY_TYPE), font_type(DIGIT_TYPE)
-{
-}
-
-static char_info char_table[256];
-
-declare_ptable(char_info)
-implement_ptable(char_info)
-
-PTABLE(char_info) special_char_table;
-
-static int get_special_char_spacing_type(const char *ch)
-{
- char_info *p = special_char_table.lookup(ch);
- return p ? p->spacing_type : ORDINARY_TYPE;
-}
-
-static int get_special_char_font_type(const char *ch)
-{
- char_info *p = special_char_table.lookup(ch);
- return p ? p->font_type : DIGIT_TYPE;
-}
-
-static void set_special_char_type(const char *ch, int st, int ft)
-{
- char_info *p = special_char_table.lookup(ch);
- if (!p) {
- p = new char_info;
- special_char_table.define(ch, p);
- }
- if (st >= 0)
- p->spacing_type = st;
- if (ft >= 0)
- p->font_type = ft;
-}
-
-void init_char_table()
-{
- set_special_char_type("pl", 2, -1); // binary
- set_special_char_type("mi", 2, -1);
- set_special_char_type("eq", 3, -1); // relation
- set_special_char_type("<=", 3, -1);
- set_special_char_type(">=", 3, -1);
- char_table['}'].spacing_type = 5; // closing
- char_table[')'].spacing_type = 5;
- char_table[']'].spacing_type = 5;
- char_table['{'].spacing_type = 4; // opening
- char_table['('].spacing_type = 4;
- char_table['['].spacing_type = 4;
- char_table[','].spacing_type = 6; // punctuation
- char_table[';'].spacing_type = 6;
- char_table[':'].spacing_type = 6;
- char_table['.'].spacing_type = 6;
- char_table['>'].spacing_type = 3;
- char_table['<'].spacing_type = 3;
- char_table['*'].spacing_type = 2; // binary
- for (int i = 0; i < 256; i++)
- if (csalpha(i))
- char_table[i].font_type = LETTER_TYPE;
-}
-
-static int lookup_spacing_type(const char *type)
-{
- for (int i = 0; spacing_type_table[i] != 0; i++)
- if (strcmp(spacing_type_table[i], type) == 0)
- return i;
- return -1;
-}
-
-static int lookup_font_type(const char *type)
-{
- for (int i = 0; font_type_table[i] != 0; i++)
- if (strcmp(font_type_table[i], type) == 0)
- return i;
- return -1;
-}
-
-void box::set_spacing_type(char *type)
-{
- int t = lookup_spacing_type(type);
- if (t < 0)
- error("unrecognised type `%1'", type);
- else
- spacing_type = t;
- a_delete type;
-}
-
-char_box::char_box(unsigned char cc)
-: c(cc), next_is_italic(0), prev_is_italic(0)
-{
- spacing_type = char_table[c].spacing_type;
-}
-
-void char_box::hint(unsigned flags)
-{
- if (flags & HINT_PREV_IS_ITALIC)
- prev_is_italic = 1;
- if (flags & HINT_NEXT_IS_ITALIC)
- next_is_italic = 1;
-}
-
-void char_box::output()
-{
- int font_type = char_table[c].font_type;
- if (font_type != LETTER_TYPE)
- printf("\\f[%s]", current_roman_font);
- if (!prev_is_italic)
- fputs("\\,", stdout);
- if (c == '\\')
- fputs("\\e", stdout);
- else
- putchar(c);
- if (!next_is_italic)
- fputs("\\/", stdout);
- else
- fputs("\\&", stdout); // suppress ligaturing and kerning
- if (font_type != LETTER_TYPE)
- fputs("\\fP", stdout);
-}
-
-int char_box::left_is_italic()
-{
- int font_type = char_table[c].font_type;
- return font_type == LETTER_TYPE;
-}
-
-int char_box::right_is_italic()
-{
- int font_type = char_table[c].font_type;
- return font_type == LETTER_TYPE;
-}
-
-int char_box::is_char()
-{
- return 1;
-}
-
-void char_box::debug_print()
-{
- if (c == '\\') {
- putc('\\', stderr);
- putc('\\', stderr);
- }
- else
- putc(c, stderr);
-}
-
-special_char_box::special_char_box(const char *t)
-{
- s = strsave(t);
- spacing_type = get_special_char_spacing_type(s);
-}
-
-special_char_box::~special_char_box()
-{
- a_delete s;
-}
-
-void special_char_box::output()
-{
- int font_type = get_special_char_font_type(s);
- if (font_type != LETTER_TYPE)
- printf("\\f[%s]", current_roman_font);
- printf("\\,\\[%s]\\/", s);
- if (font_type != LETTER_TYPE)
- printf("\\fP");
-}
-
-int special_char_box::is_char()
-{
- return 1;
-}
-
-void special_char_box::debug_print()
-{
- fprintf(stderr, "\\[%s]", s);
-}
-
-
-void char_box::handle_char_type(int st, int ft)
-{
- if (st >= 0)
- char_table[c].spacing_type = st;
- if (ft >= 0)
- char_table[c].font_type = ft;
-}
-
-void special_char_box::handle_char_type(int st, int ft)
-{
- set_special_char_type(s, st, ft);
-}
-
-void set_char_type(const char *type, char *ch)
-{
- assert(ch != 0);
- int st = lookup_spacing_type(type);
- int ft = lookup_font_type(type);
- if (st < 0 && ft < 0) {
- error("bad character type `%1'", type);
- a_delete ch;
- return;
- }
- box *b = split_text(ch);
- b->handle_char_type(st, ft);
- delete b;
-}
-
-/* We give primes special treatment so that in ``x' sub 2'', the ``2''
-will be tucked under the prime */
-
-class prime_box : public pointer_box {
- box *pb;
-public:
- prime_box(box *);
- ~prime_box();
- int compute_metrics(int style);
- void output();
- void compute_subscript_kern();
- void debug_print();
- void handle_char_type(int, int);
-};
-
-box *make_prime_box(box *pp)
-{
- return new prime_box(pp);
-}
-
-prime_box::prime_box(box *pp) : pointer_box(pp)
-{
- pb = new special_char_box("fm");
-}
-
-prime_box::~prime_box()
-{
- delete pb;
-}
-
-int prime_box::compute_metrics(int style)
-{
- int res = p->compute_metrics(style);
- pb->compute_metrics(style);
- printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]"
- "+\\n[" WIDTH_FORMAT "]\n",
- uid, p->uid, pb->uid);
- printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]"
- ">?\\n[" HEIGHT_FORMAT "]\n",
- uid, p->uid, pb->uid);
- printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]"
- ">?\\n[" DEPTH_FORMAT "]\n",
- uid, p->uid, pb->uid);
- return res;
-}
-
-void prime_box::compute_subscript_kern()
-{
- p->compute_subscript_kern();
- printf(".nr " SUB_KERN_FORMAT " 0\\n[" WIDTH_FORMAT "]"
- "+\\n[" SUB_KERN_FORMAT "]>?0\n",
- uid, pb->uid, p->uid);
-}
-
-void prime_box::output()
-{
- p->output();
- pb->output();
-}
-
-void prime_box::handle_char_type(int st, int ft)
-{
- p->handle_char_type(st, ft);
- pb->handle_char_type(st, ft);
-}
-
-void prime_box::debug_print()
-{
- p->debug_print();
- putc('\'', stderr);
-}
-
-box *split_text(char *text)
-{
- list_box *lb = 0;
- box *fb = 0;
- char *s = text;
- while (*s != '\0') {
- char c = *s++;
- box *b = 0;
- switch (c) {
- case '+':
- b = new special_char_box("pl");
- break;
- case '-':
- b = new special_char_box("mi");
- break;
- case '=':
- b = new special_char_box("eq");
- break;
- case '\'':
- b = new special_char_box("fm");
- break;
- case '<':
- if (*s == '=') {
- b = new special_char_box("<=");
- s++;
- break;
- }
- goto normal_char;
- case '>':
- if (*s == '=') {
- b = new special_char_box(">=");
- s++;
- break;
- }
- goto normal_char;
- case '\\':
- if (*s == '\0') {
- lex_error("bad escape");
- break;
- }
- c = *s++;
- switch (c) {
- case '(':
- {
- char buf[3];
- if (*s != '\0') {
- buf[0] = *s++;
- if (*s != '\0') {
- buf[1] = *s++;
- buf[2] = '\0';
- b = new special_char_box(buf);
- }
- else {
- lex_error("bad escape");
- }
- }
- else {
- lex_error("bad escape");
- }
- }
- break;
- case '[':
- {
- char *ch = s;
- while (*s != ']' && *s != '\0')
- s++;
- if (*s == '\0')
- lex_error("bad escape");
- else {
- *s++ = '\0';
- b = new special_char_box(ch);
- }
- }
- break;
- case 'f':
- case 'g':
- case 'k':
- case 'n':
- case '*':
- {
- char *escape_start = s - 2;
- switch (*s) {
- case '(':
- if (*++s != '\0')
- ++s;
- break;
- case '[':
- for (++s; *s != '\0' && *s != ']'; s++)
- ;
- break;
- }
- if (*s == '\0')
- lex_error("bad escape");
- else {
- ++s;
- char *buf = new char[s - escape_start + 1];
- memcpy(buf, escape_start, s - escape_start);
- buf[s - escape_start] = '\0';
- b = new quoted_text_box(buf);
- }
- }
- break;
- case '-':
- case '_':
- {
- char buf[2];
- buf[0] = c;
- buf[1] = '\0';
- b = new special_char_box(buf);
- }
- break;
- case '`':
- b = new special_char_box("ga");
- break;
- case '\'':
- b = new special_char_box("aa");
- break;
- case 'e':
- case '\\':
- b = new char_box('\\');
- break;
- case '^':
- case '|':
- case '0':
- {
- char buf[3];
- buf[0] = '\\';
- buf[1] = c;
- buf[2] = '\0';
- b = new quoted_text_box(strsave(buf));
- break;
- }
- default:
- lex_error("unquoted escape");
- b = new quoted_text_box(strsave(s - 2));
- s = strchr(s, '\0');
- break;
- }
- break;
- default:
- normal_char:
- b = new char_box(c);
- break;
- }
- while (*s == '\'') {
- if (b == 0)
- b = new quoted_text_box(0);
- b = new prime_box(b);
- s++;
- }
- if (b != 0) {
- if (lb != 0)
- lb->append(b);
- else if (fb != 0) {
- lb = new list_box(fb);
- lb->append(b);
- }
- else
- fb = b;
- }
- }
- delete text;
- if (lb != 0)
- return lb;
- else if (fb != 0)
- return fb;
- else
- return new quoted_text_box(0);
-}
-
diff --git a/contrib/groff/src/preproc/grn/Makefile.sub b/contrib/groff/src/preproc/grn/Makefile.sub
deleted file mode 100644
index ffa0ad209cc4..000000000000
--- a/contrib/groff/src/preproc/grn/Makefile.sub
+++ /dev/null
@@ -1,17 +0,0 @@
-PROG=grn
-MAN1=grn.n
-MLIB=$(LIBM)
-XLIBS=$(LIBGROFF)
-OBJS=\
- hdb.o \
- hpoint.o \
- hgraph.o \
- main.o
-CCSRCS=\
- $(srcdir)/hdb.cc \
- $(srcdir)/hpoint.cc \
- $(srcdir)/hgraph.cc \
- $(srcdir)/main.cc
-HDRS=\
- $(srcdir)/gprint.h
-NAMEPREFIX=$(g)
diff --git a/contrib/groff/src/preproc/grn/README b/contrib/groff/src/preproc/grn/README
deleted file mode 100644
index b5b9fc9abd83..000000000000
--- a/contrib/groff/src/preproc/grn/README
+++ /dev/null
@@ -1,60 +0,0 @@
-This is grn from the Berkeley ditroff distribution. It has no
-AT&T code and is therefore freely distributable.
-
-Tim Theisen <tim@cs.wisc.edu>
-
-=====================================================================
-
-This is the modified code for the groff. It uses the different
-devxxx format that is ascii rather than binary as in the
-Berkeley distribution. Since groff does not have the \Ds option
-for line drawing (dotted, dashed, etc.), this version includes
-the routines for drawing curves and arcs, so it does not use the
-\D~, \Da nor \Dc. Although also included in here is a routine
-for drawing the optional gremlin style curves, it is not used
-because the gremlin editor uses the conventional spline
-algorithm. The Berkeley grn has the choice of different
-stipples. Here, only different shades of gray will be painted
-depending on the gremlin file. It is possible to upgrade this at
-a later time. (Daniel Senderowicz <daniel@synchrods.com> 12/28/99)
-
-=====================================================================
-
-It has been further modified by Werner Lemberg <wl@gnu.org> to fit
-better into the groff package.
-
- . Replaced Makefile with Makefile.sub.
-
- . Removed dev.h since it is unused.
-
- . Renamed grn.1 to grn.man; this man page has been extensively
- revised.
-
- . Used error() and fatal() from libgroff for all source files.
-
- . Renamed *.c to *.cc; updates as needed for C++ (prototypes, proper
- casts, standard header files etc). Heavy formatting.
-
- . main.cc:
-
- Using groff's default values instead of DEVDIR, DEFAULTDEV, PRINTER,
- TYPESETTER, and GREMLIB.
-
- `res' is now an integer.
-
- Added `-C' command flag (for compatibility mode) as with other
- preprocessors.
-
- Added `-F' and `-v' option (similar to troff).
-
- Renamed `-L' option to `-M' for consistence.
-
- Removed `-P' option.
-
- Using font::load_desc() for scanning DESC files.
-
- Removed SYSV-specific code.
-
- Using macro_path.open_file() for getting gremlin graphic files.
-
- Added usage().
diff --git a/contrib/groff/src/preproc/grn/gprint.h b/contrib/groff/src/preproc/grn/gprint.h
deleted file mode 100644
index b25305b3ca03..000000000000
--- a/contrib/groff/src/preproc/grn/gprint.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Last non-groff version: gprint.h 1.1 84/10/08
- *
- * This file contains standard definitions used by the gprint program.
- */
-
-#include <stdio.h>
-#include <math.h>
-
-
-#define xorn(x,y) (x)
- /* was 512 */
-#define yorn(x,y) (511 - (y)) /* switch direction for */
- /* y-coordinates */
-
-#define STYLES 6
-#define SIZES 4
-#define FONTS 4
-#define SOLID -1
-#define DOTTED 004 /* 014 */
-#define DASHED 020 /* 034 */
-#define DOTDASHED 024 /* 054 */
-#define LONGDASHED 074
-
-#define DEFTHICK -1 /* default thicknes */
-#define DEFSTYLE SOLID /* default line style */
-
-#define TRUE 1
-#define FALSE 0
-
-#define nullelt -1
-#define nullpt -1
-#define nullun NULL
-
-#define BOTLEFT 0
-#define BOTRIGHT 1
-#define CENTCENT 2
-#define VECTOR 3
-#define ARC 4
-#define CURVE 5
-#define POLYGON 6
-#define TOPLEFT 10
-#define TOPCENT 11
-#define TOPRIGHT 12
-#define CENTLEFT 13
-#define CENTRIGHT 14
-#define BOTCENT 15
-#define TEXT(t) ( (t <= CENTCENT) || (t >= TOPLEFT) )
-
-/* WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING
- * The above (TEXT) test is dependent on the relative values of the
- * constants and will have to change if these values change or if new
- * commands are added with value greater than BOTCENT
- */
-
-#define NUSER 4
-#define NFONTS 4
-#define NBRUSHES 6
-#define NSIZES 4
-#define NJUSTS 9
-#define NSTIPPLES 16
-
-#define ADD 1
-#define DELETE 2
-#define MOD 3
-
-typedef struct point {
- float x, y;
- struct point *nextpt;
-} POINT;
-
-typedef struct elmt {
- int type, brushf, size, textlength;
- char *textpt;
- POINT *ptlist;
- struct elmt *nextelt, *setnext;
-} ELT;
-
-#define DBNextElt(elt) (elt->nextelt)
-#define DBNextofSet(elt) (elt->setnext)
-#define DBNullelt(elt) (elt == NULL)
-#define Nullpoint(pt) ((pt) == (POINT *) NULL)
-#define PTNextPoint(pt) (pt->nextpt)
-
-/* EOF */
diff --git a/contrib/groff/src/preproc/grn/grn.man b/contrib/groff/src/preproc/grn/grn.man
deleted file mode 100644
index f2613da1b27f..000000000000
--- a/contrib/groff/src/preproc/grn/grn.man
+++ /dev/null
@@ -1,636 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH @G@GRN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-@g@grn \- groff preprocessor for gremlin files
-.SH SYNOPSIS
-.BR @g@grn
-[
-.B \-Cv
-]
-[
-.BI \-T dev
-]
-[
-.BI \-M dir
-]
-[
-.BI \-F dir
-]
-[
-.IR file\.\.\.
-]
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-.I @g@grn
-is a preprocessor for including
-.I gremlin
-pictures in
-.I groff
-input.
-.I @g@grn
-writes to standard output, processing only input lines between two that
-start with
-.B .GS
-and
-.BR .GE.
-Those lines must contain
-.I @g@grn
-commands (see below).
-These commands request a
-.I gremlin
-file, and the picture in that file is
-converted and placed in the
-.I @g@troff
-input stream.
-The
-.B .GS
-request may be followed by a C, L, or R to center, left, or right
-justify the whole
-.I gremlin
-picture (default justification is center).
-If no
-.I file
-is mentioned, the standard input is read.
-At the end of the picture, the position on the page is the bottom of the
-.I gremlin
-picture.
-If the
-.I @g@grn
-entry is ended with
-.B .GF
-instead of
-.BR .GE ,
-the position is left at the top of the picture.
-.PP
-Please note that currently only the \-me macro package has support for
-.BR .GS ,
-.BR .GE ,
-and
-.BR .GF .
-.PP
-The following command-line options are understood:
-.TP
-.BI \-T dev
-Prepare output for printer
-.IR dev .
-The default device is
-.BR @DEVICE@ .
-See
-.BR groff (@MAN1EXT@)
-for acceptable devices.
-.TP
-.BI \-M dir
-Prepend
-.I dir
-to the default search path for
-.I gremlin
-files.
-The default path is (in that order) the current directory, the home
-directory,
-.BR @SYSTEMMACRODIR@ ,
-.BR @LOCALMACRODIR@ ,
-and
-.BR @MACRODIR@ .
-.TP
-.BI \-F dir
-Search
-.I dir
-for subdirectories
-.BI dev name
-.RI ( name
-is the name of the device) for the
-.B DESC
-file before the normal
-.BR @FONTDIR@ .
-.TP
-.B \-C
-Recognize
-.B .GS
-and
-.B .GE
-(resp.
-.BR .GF )
-even when followed by a character other than space or newline.
-.\".TP
-.\".B \-s
-.\"This switch causes the picture to be traversed twice:
-.\"The first time, only the interiors of filled polygons (as borderless
-.\"polygons) are printed.
-.\"The second time, the outline is printed as a series of line segments.
-.\"This way, postprocessors that overwrite rather than merge picture elements
-.\"(such as Postscript) can still have text and graphics on a shaded
-.\"background.
-.TP
-.B \-v
-Print the version number.
-.SH GRN COMMANDS
-Each input line between
-.B .GS
-and
-.B .GE
-may have one
-.I @g@grn
-command.
-Commands consist of one or two strings separated by white space, the first
-string being the command and the second its operand.
-Commands may be upper or lower case and abbreviated down to one character.
-.PP
-Commands that affect a picture's environment (those listed before
-.BR default ,
-see below) are only in effect for the current picture:
-The environment is reinitialized to the defaults at the start of the next
-picture.
-The commands are as follows:
-.TP
-.BI 1\ N
-.TQ
-.BI 2\ N
-.TQ
-.BI 3\ N
-.TQ
-.BI 4\ N
-Set
-.IR gremlin 's
-text size number 1 (2, 3, or 4) to
-.I N
-points.
-The default is 12 (resp. 16, 24, and 36).
-.TP
-.BI roman\ f
-.TQ
-.BI italics\ f
-.TQ
-.BI bold\ f
-.TQ
-.BI special\ f
-Set the roman (italics, bold, or special) font to
-.IR @g@troff 's
-font
-.I f
-(either a name or number).
-The default is R (resp. I, B, and S).
-.TP
-.BI l\ f
-.TQ
-.BI stipple\ f
-Set the stipple font to
-.IR @g@troff 's
-stipple font
-.I f
-(name or number).
-The command
-.B stipple
-may be abbreviated down as far as `st' (to avoid
-confusion with
-.BR special ).
-There is
-.I no
-default for stipples (unless one is set by the default command), and it is
-illegal to include a
-.I gremlin
-picture with polygons without specifying a
-stipple font.
-.TP
-.BI x\ N
-.TQ
-.BI scale\ N
-Magnify the picture (in addition to any default magnification) by
-.IR N ,
-a floating point number larger than zero.
-The command
-.B scale
-may be abbreviated down to `sc'.
-.TP
-.BI narrow\ N
-.TQ
-.BI medium\ N
-.TQ
-.BI thick\ N
-Set the thickness of
-.IR gremlin 's
-narrow (resp. medium and thick) lines to
-.I N
-times 0.15pt (this value can be changed at compile time).
-The default is 1.0 (resp. 3.0 and 5.0), which corresponds to 0.15pt
-(resp. 0.45pt and 0.75pt).
-A thickness value of zero selects the smallest available line thickness.
-Negative values cause the line thickness to be proportional to the current
-point size.
-.TP
-.BI pointscale\ <off/on>
-Scale text to match the picture.
-Gremlin text is usually printed in the point size specified with the
-commands
-.BR 1 ,\ 2 ,\ 3 ,\ or\ 4
-regardless of any scaling factors in the picture.
-Setting
-.B pointscale
-will cause the point sizes to scale with the picture (within
-.IR @g@troff 's
-limitations, of course).
-An operand of anything but
-.I off
-will turn text scaling on.
-.TP
-.B default
-Reset the picture environment defaults to the settings in the current
-picture.
-This is meant to be used as a global parameter setting mechanism at the
-beginning of the
-.I @g@troff
-input file, but can be used at any time to reset the
-default settings.
-.TP
-.BI width\ N
-Forces the picture to be
-.I N
-inches wide.
-This overrides any scaling factors present in the same picture.
-.RB ` width
-.IR 0 '
-is ignored.
-.TP
-.BI height\ N
-Forces picture to be
-.I N
-inches high, overriding other scaling factors.
-If both `width' and `height' are specified the tighter constraint will
-determine the scale of the picture.
-.B Height
-and
-.B width
-commands are not saved with a
-.B default
-command.
-They will, however, affect point size scaling if that option is set.
-.TP
-.BI file\ name
-Get picture from
-.I gremlin
-file
-.I name
-located the current directory (or in the library directory; see the
-.B \-M
-option above).
-If two
-.B file
-commands are given, the second one overrides the first.
-If
-.I name
-doesn't exist, an error message is reported and processing continues from
-the
-.B .GE
-line.
-.SH NOTES ABOUT GROFF
-Since
-.I @g@grn
-is a preprocessor, it doesn't know about current indents, point sizes,
-margins, number registers, etc.
-Consequently, no
-.I @g@troff
-input can be placed between the
-.B .GS
-and
-.B .GE
-requests.
-However,
-.I gremlin
-text is now processed by
-.IR @g@troff ,
-so anything legal in a single line of
-.I @g@troff
-input is legal in a line of
-.I gremlin
-text (barring `.' directives at the beginning of a line).
-Thus, it is possible to have equations within a
-.I gremlin
-figure by including in the
-.I gremlin
-file
-.I eqn
-expressions enclosed by previously defined delimiters (e.g.
-.IR $$ ).
-.PP
-When using
-.I @g@grn
-along with other preprocessors, it is best to run
-.I tbl
-before
-.IR @g@grn ,
-.IR pic ,
-and/or
-.I ideal
-to avoid overworking
-.IR tbl .
-.I Eqn
-should always be run last.
-.PP
-A picture is considered an entity, but that doesn't stop
-.I @g@troff
-from trying to break it up if it falls off the end of a page.
-Placing the picture between `keeps' in \-me macros will ensure proper
-placement.
-.PP
-.I @g@grn
-uses
-.IR @g@troff 's
-number registers
-.B g1
-through
-.B g9
-and sets registers
-.B g1
-and
-.B g2
-to the width and height of the
-.I gremlin
-figure (in device units) before entering the
-.B .GS
-request (this is for those who want to rewrite these macros).
-.SH GREMLIN FILE FORMAT
-There exist two distinct
-.I gremlin
-file formats, the original format from the
-.I AED
-graphic terminal version, and the
-.I SUN
-or
-.I X11
-version.
-An extension to the
-.IR SUN / X11
-version allowing reference points with negative coordinates is
-.B not
-compatible with the
-.I AED
-version.
-As long as a
-.I gremlin
-file does not contain negative coordinates, either format will be read
-correctly by either version of
-.I gremlin
-or
-.IR @g@grn .
-The other difference to the
-.IR SUN / X11
-format is the use of names for picture objects (e.g., POLYGON, CURVE)
-instead of numbers.
-Files representing the same picture are shown in Table 1 in each format.
-.sp
-.DS
-.TS
-center, tab(@);
-l lw(0.1i) l.
-sungremlinfile@@gremlinfile
-0 240.00 128.00@@0 240.00 128.00
-CENTCENT@@2
-240.00 128.00@@240.00 128.00
-185.00 120.00@@185.00 120.00
-240.00 120.00@@240.00 120.00
-296.00 120.00@@296.00 120.00
-*@@-1.00 -1.00
-2 3@@2 3
-10 A Triangle@@10 A Triangle
-POLYGON@@6
-224.00 416.00@@224.00 416.00
-96.00 160.00@@96.00 160.00
-384.00 160.00@@384.00 160.00
-*@@-1.00 -1.00
-5 1@@5 1
-0@@0
--1@@-1
-.T&
-css.
-.sp
-Table 1. File examples
-.TE
-.DE
-.sp
-.IP \(bu
-The first line of each
-.I gremlin
-file contains either the string
-.B gremlinfile
-.RI ( AED
-version) or
-.B sungremlinfile
-.RI ( SUN / X11 )
-.IP \(bu
-The second line of the file contains an orientation, and
-.B x
-and
-.B y
-values for a positioning point, separated by spaces.
-The orientation, either
-.B 0
-or
-.BR 1 ,
-is ignored by the
-.IR SUN / X11
-version.
-.B 0
-means that
-.I gremlin
-will display things in horizontal format (drawing area wider than it is
-tall, with menu across top).
-.B 1
-means that
-.I gremlin
-will display things in vertical format (drawing area taller than it is wide,
-with menu on left side).
-.B x
-and
-.B y
-are floating point values giving a positioning point to be used when this
-file is read into another file.
-The stuff on this line really isn't all that important; a value of ``1 0.00
-0.00'' is suggested.
-.IP \(bu
-The rest of the file consists of zero or more element specifications.
-After the last element specification is a line containing the string ``-1''.
-.SH ELEMENT SPECIFICATIONS
-.IP \(bu
-The first line of each element contains a single decimal number giving the
-type of the element
-.RI ( AED
-version) or its ASCII name
-.RI ( SUN / X11
-version).
-See Table 2.
-.sp
-.DS
-.TS
-center, tab(@);
-css
-ccc
-nll.
-\fIgremlin\fP File Format \(mi Object Type Specification
-.sp
-\fIAED\fP Number@\fISUN\fP/\fIX11\fP Name@Description
-0@BOTLEFT@bottom-left-justified text
-1@BOTRIGHT@bottom-right-justified text
-2@CENTCENT@center-justified text
-3@VECTOR@vector
-4@ARC@arc
-5@CURVE@curve
-6@POLYGON@polygon
-10@TOPLEFT@top-left-justified text
-11@TOPCENT@top-center-justified text
-12@TOPRIGHT@top-right-justified text
-13@CENTLEFT@left-center-justified text
-14@CENTRIGHT@right-center-justified text
-15@BOTCENT@bottom-center-justified text
-.T&
-css.
-.sp
-Table 2.
-Type Specifications in \fIgremlin\fP Files
-.TE
-.DE
-.sp
-.IP \(bu
-After the object type comes a variable number of lines, each specifying a
-point used to display the element.
-Each line contains an x-coordinate and a y-coordinate in floating point
-format, separated by spaces.
-The list of points is terminated by a line containing the string ``-1.0
--1.0''
-.RI ( AED
-version) or a single asterisk, ``*''
-.RI ( SUN / X11
-version).
-.IP \(bu
-After the points comes a line containing two decimal values, giving the
-brush and size for the element.
-The brush determines the style in which things are drawn.
-For vectors, arcs, and curves there are six legal brush values:
-.sp
-.DS
-.TS
-center, tab(@);
-ncw(0.1i)l.
-1 \(mi@@thin dotted lines
-2 \(mi@@thin dot-dashed lines
-3 \(mi@@thick solid lines
-4 \(mi@@thin dashed lines
-5 \(mi@@thin solid lines
-6 \(mi@@medium solid lines
-.TE
-.DE
-.sp
-For polygons, one more value, 0, is legal.
-It specifies a polygon with an invisible border.
-For text, the brush selects a font as follows:
-.sp
-.DS
-.TS
-center, tab(@);
-ncw(0.1i)l.
-1 \(mi@@roman (R font in groff)
-2 \(mi@@italics (I font in groff)
-3 \(mi@@bold (B font in groff)
-4 \(mi@@special (S font in groff)
-.TE
-.DE
-.sp
-If you're using
-.I @g@grn
-to run your pictures through
-.IR groff ,
-the font is really just a starting font:
-The text string can contain formatting sequences like
-``\\fI''
-or
-``\\d''
-which may change the font (as well as do many other things).
-For text, the size field is a decimal value between 1 and 4.
-It selects the size of the font in which the text will be drawn.
-For polygons, this size field is interpreted as a stipple number to fill the
-polygon with.
-The number is used to index into a stipple font at print time.
-.IP \(bu
-The last line of each element contains a decimal number and a string of
-characters, separated by a single space.
-The number is a count of the number of characters in the string.
-This information is only used for text elements, and contains the text
-string.
-There can be spaces inside the text.
-For arcs, curves, and vectors, this line of the element contains the string
-``0''.
-.SH NOTES ON COORDINATES
-.I gremlin
-was designed for
-.IR AED s,
-and its coordinates reflect the
-.I AED
-coordinate space.
-For vertical pictures, x-values range 116 to 511, and y-values from 0 to
-483.
-For horizontal pictures, x-values range from 0 to 511 and y-values range
-from 0 to 367.
-Although you needn't absolutely stick to this range, you'll get best results
-if you at least stay in this vicinity.
-Also, point lists are terminated by a point of (-1, -1), so you shouldn't
-ever use negative coordinates.
-.I gremlin
-writes out coordinates using format ``%f1.2''; it's probably a good idea to
-use the same format if you want to modify the
-.I @g@grn
-code.
-.SH NOTES ON SUN/X11 COORDINATES
-There is no longer a restriction on the range of coordinates used to create
-objects in the
-.IR SUN / X11
-version of
-.IR gremlin .
-However, files with negative coordinates
-.B will
-cause problems if displayed on the
-.IR AED .
-.SH FILES
-.Tp \w'@FONTDIR@/devname/DESC'u+3n
-.BI @FONTDIR@/dev name /DESC
-Device description file for device
-.IR name .
-.SH SEE ALSO
-.BR gremlin (1),
-.BR groff (@MAN1EXT@),
-.BR @g@pic (@MAN1EXT@),
-.BR ideal (1)
-.SH HISTORY
-.PP
-David Slattengren and Barry Roitblat wrote the original Berkeley
-.IR @g@grn .
-.PP
-Daniel Senderowicz and Werner Lemberg modified it for
-.IR groff .
diff --git a/contrib/groff/src/preproc/grn/hdb.cc b/contrib/groff/src/preproc/grn/hdb.cc
deleted file mode 100644
index fd5bb48a679c..000000000000
--- a/contrib/groff/src/preproc/grn/hdb.cc
+++ /dev/null
@@ -1,326 +0,0 @@
-/* Last non-groff version: hdb.c 1.8 (Berkeley) 84/10/20
- *
- * Copyright -C- 1982 Barry S. Roitblat
- *
- * This file contains database routines for the hard copy programs of the
- * gremlin picture editor.
- */
-
-#include "gprint.h"
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "errarg.h"
-#include "error.h"
-
-#define MAXSTRING 128
-
-/* imports from main.cc */
-
-extern int linenum; /* current line number in input file */
-extern char gremlinfile[]; /* name of file currently reading */
-extern int SUNFILE; /* TRUE if SUN gremlin file */
-extern void savebounds(float x, float y);
-
-/* imports from hpoint.cc */
-
-extern POINT *PTInit();
-extern POINT *PTMakePoint(float x, float y, POINT ** pplist);
-
-
-int DBGetType(register char *s);
-
-
-/*
- * This routine returns a pointer to an initialized database element which
- * would be the only element in an empty list.
- */
-ELT *
-DBInit()
-{
- return ((ELT *) NULL);
-} /* end DBInit */
-
-
-/*
- * This routine creates a new element with the specified attributes and
- * links it into database.
- */
-ELT *
-DBCreateElt(int type,
- POINT * pointlist,
- int brush,
- int size,
- char *text,
- ELT **db)
-{
- register ELT *temp;
-
- temp = (ELT *) malloc(sizeof(ELT));
- temp->nextelt = *db;
- temp->type = type;
- temp->ptlist = pointlist;
- temp->brushf = brush;
- temp->size = size;
- temp->textpt = text;
- *db = temp;
- return (temp);
-} /* end CreateElt */
-
-
-/*
- * This routine reads the specified file into a database and returns a
- * pointer to that database.
- */
-ELT *
-DBRead(register FILE *file)
-{
- register int i;
- register int done; /* flag for input exhausted */
- register float nx; /* x holder so x is not set before orienting */
- int type; /* element type */
- ELT *elist; /* pointer to the file's elements */
- POINT *plist; /* pointer for reading in points */
- char string[MAXSTRING], *txt;
- float x, y; /* x and y are read in point coords */
- int len, brush, size;
- int lastpoint;
-
- SUNFILE = FALSE;
- elist = DBInit();
- (void) fscanf(file, "%s\n", string);
- if (strcmp(string, "gremlinfile")) {
- if (strcmp(string, "sungremlinfile")) {
- error("`%1' is not a gremlin file", gremlinfile);
- return (elist);
- }
- SUNFILE = TRUE;
- }
-
- (void) fscanf(file, "%d%f%f\n", &size, &x, &y);
- /* ignore orientation and file positioning point */
-
- done = FALSE;
- while (!done) {
- /* if (fscanf(file,"%s\n", string) == EOF) */
- /* I changed the scanf format because the element */
- /* can have two words (e.g. CURVE SPLINE) */
- if (fscanf(file, "\n%[^\n]\n", string) == EOF) {
- error("`%1', error in file format", gremlinfile);
- return (elist);
- }
-
- type = DBGetType(string); /* interpret element type */
- if (type < 0) { /* no more data */
- done = TRUE;
- (void) fclose(file);
- } else {
-#ifdef UW_FASTSCAN
- (void) xscanf(file, &x, &y); /* always one point */
-#else
- (void) fscanf(file, "%f%f\n", &x, &y); /* always one point */
-#endif /* UW_FASTSCAN */
- plist = PTInit(); /* NULL point list */
-
- /*
- * Files created on the SUN have point lists terminated by a line
- * containing only an asterik ('*'). Files created on the AED have
- * point lists terminated by the coordinate pair (-1.00 -1.00).
- */
- if (TEXT(type)) { /* read only first point for TEXT elements */
- nx = xorn(x, y);
- y = yorn(x, y);
- (void) PTMakePoint(nx, y, &plist);
- savebounds(nx, y);
-
-#ifdef UW_FASTSCAN
- while (xscanf(file, &x, &y));
-#else
- lastpoint = FALSE;
- do {
- fgets(string, MAXSTRING, file);
- if (string[0] == '*') { /* SUN gremlin file */
- lastpoint = TRUE;
- } else {
- (void) sscanf(string, "%f%f", &x, &y);
- if ((x == -1.00 && y == -1.00) && (!SUNFILE))
- lastpoint = TRUE;
- }
- } while (!lastpoint);
-#endif /* UW_FASTSCAN */
- } else { /* not TEXT element */
-#ifdef UW_FASTSCAN
- do {
- nx = xorn(x, y);
- y = yorn(x, y);
- (void) PTMakePoint(nx, y, &plist);
- savebounds(nx, y);
- } while (xscanf(file, &x, &y));
-#else
- lastpoint = FALSE;
- while (!lastpoint) {
- nx = xorn(x, y);
- y = yorn(x, y);
- (void) PTMakePoint(nx, y, &plist);
- savebounds(nx, y);
-
- fgets(string, MAXSTRING, file);
- if (string[0] == '*') { /* SUN gremlin file */
- lastpoint = TRUE;
- } else {
- (void) sscanf(string, "%f%f", &x, &y);
- if ((x == -1.00 && y == -1.00) && (!SUNFILE))
- lastpoint = TRUE;
- }
- }
-#endif /* UW_FASTSCAN */
- }
- (void) fscanf(file, "%d%d\n", &brush, &size);
- (void) fscanf(file, "%d", &len); /* text length */
- (void) getc(file); /* eat blank */
- txt = (char *) malloc((unsigned) len + 1);
- for (i = 0; i < len; ++i) { /* read text */
- txt[i] = getc(file);
- }
- txt[len] = '\0';
- (void) DBCreateElt(type, plist, brush, size, txt, &elist);
- } /* end else */
- } /* end while not done */ ;
- return (elist);
-} /* end DBRead */
-
-
-/*
- * Interpret element type in string s.
- * Old file format consisted of integer element types.
- * New file format has literal names for element types.
- */
-int
-DBGetType(register char *s)
-{
- if (isdigit(s[0]) || (s[0] == '-')) /* old element format or EOF */
- return (atoi(s));
-
- switch (s[0]) {
- case 'P':
- return (POLYGON);
- case 'V':
- return (VECTOR);
- case 'A':
- return (ARC);
- case 'C':
- if (s[1] == 'U')
- return (CURVE);
- switch (s[4]) {
- case 'L':
- return (CENTLEFT);
- case 'C':
- return (CENTCENT);
- case 'R':
- return (CENTRIGHT);
- default:
- fatal("unknown element type");
- }
- case 'B':
- switch (s[3]) {
- case 'L':
- return (BOTLEFT);
- case 'C':
- return (BOTCENT);
- case 'R':
- return (BOTRIGHT);
- default:
- fatal("unknown element type");
- }
- case 'T':
- switch (s[3]) {
- case 'L':
- return (TOPLEFT);
- case 'C':
- return (TOPCENT);
- case 'R':
- return (TOPRIGHT);
- default:
- fatal("unknown element type");
- }
- default:
- fatal("unknown element type");
- }
-
- return 0; /* never reached */
-}
-
-#ifdef UW_FASTSCAN
-/*
- * Optimization hack added by solomon@crys.wisc.edu, 12/2/86.
- * A huge fraction of the time was spent reading floating point numbers from
- * the input file, but the numbers always have the format 'ddd.dd'. Thus
- * the following special-purpose version of fscanf.
- *
- * xscanf(f,xp,yp) does roughly what fscanf(f,"%f%f",xp,yp) does except:
- * -the next piece of input must be of the form
- * <space>* <digit>*'.'<digit>* <space>* <digit>*'.'<digit>*
- * -xscanf eats the character following the second number
- * -xscanf returns 0 for "end-of-data" indication, 1 otherwise, where
- * end-of-data is signalled by a '*' [in which case the rest of the
- * line is gobbled], or by '-1.00 -1.00' [but only if !SUNFILE].
- */
-int
-xscanf(FILE *f,
- float *xp,
- float *yp)
-{
- register int c, i, j, m, frac;
- int iscale = 1, jscale = 1; /* x = i/scale, y=j/jscale */
-
- while ((c = getc(f)) == ' ');
- if (c == '*') {
- while ((c = getc(f)) != '\n');
- return 0;
- }
- i = m = frac = 0;
- while (isdigit(c) || c == '.' || c == '-') {
- if (c == '-') {
- m++;
- c = getc(f);
- continue;
- }
- if (c == '.')
- frac = 1;
- else {
- if (frac)
- iscale *= 10;
- i = 10 * i + c - '0';
- }
- c = getc(f);
- }
- if (m)
- i = -i;
- *xp = (double) i / (double) iscale;
-
- while ((c = getc(f)) == ' ');
- j = m = frac = 0;
- while (isdigit(c) || c == '.' || c == '-') {
- if (c == '-') {
- m++;
- c = getc(f);
- continue;
- }
- if (c == '.')
- frac = 1;
- else {
- if (frac)
- jscale *= 10;
- j = 10 * j + c - '0';
- }
- c = getc(f);
- }
- if (m)
- j = -j;
- *yp = (double) j / (double) jscale;
- return (SUNFILE || i != -iscale || j != -jscale);
-}
-#endif /* UW_FASTSCAN */
-
-/* EOF */
diff --git a/contrib/groff/src/preproc/grn/hgraph.cc b/contrib/groff/src/preproc/grn/hgraph.cc
deleted file mode 100644
index 79637209774e..000000000000
--- a/contrib/groff/src/preproc/grn/hgraph.cc
+++ /dev/null
@@ -1,1043 +0,0 @@
-/* Last non-groff version: hgraph.c 1.14 (Berkeley) 84/11/27
- *
- * This file contains the graphics routines for converting gremlin pictures
- * to troff input.
- */
-
-#include "gprint.h"
-
-#ifdef NEED_DECLARATION_HYPOT
-extern "C" {
- double hypot(double, double);
-}
-#endif /* NEED_DECLARATION_HYPOT */
-
-#define MAXVECT 40
-#define MAXPOINTS 200
-#define LINELENGTH 1
-#define PointsPerInterval 64
-#define pi 3.14159265358979324
-#define twopi (2.0 * pi)
-#define len(a, b) hypot((double)(b.x-a.x), (double)(b.y-a.y))
-
-
-extern int dotshifter; /* for the length of dotted curves */
-
-extern int style[]; /* line and character styles */
-extern double thick[];
-extern char *tfont[];
-extern int tsize[];
-extern int stipple_index[]; /* stipple font index for stipples 0 - 16 */
-extern char *stipple; /* stipple type (cf or ug) */
-
-
-extern double troffscale; /* imports from main.c */
-extern double linethickness;
-extern int linmod;
-extern int lastx;
-extern int lasty;
-extern int lastyline;
-extern int ytop;
-extern int ybottom;
-extern int xleft;
-extern int xright;
-extern enum {
- OUTLINE, FILL, BOTH
-} polyfill;
-
-extern double adj1;
-extern double adj2;
-extern double adj3;
-extern double adj4;
-extern int res;
-
-void HGSetFont(int font, int size);
-void HGPutText(int justify, POINT pnt, register char *string);
-void HGSetBrush(int mode);
-void tmove2(int px, int py);
-void doarc(POINT cp, POINT sp, int angle);
-void tmove(POINT * ptr);
-void cr();
-void drawwig(POINT * ptr);
-void HGtline(int x1, int y1);
-void dx(double x);
-void dy(double y);
-void HGArc(register int cx, register int cy, int px, int py, int angle);
-void picurve(register int *x, register int *y, int npts);
-void Paramaterize(int x[], int y[], float h[], int n);
-void PeriodicSpline(float h[], int z[],
- float dz[], float d2z[], float d3z[],
- int npoints);
-void NaturalEndSpline(float h[], int z[],
- float dz[], float d2z[], float d3z[],
- int npoints);
-
-
-
-/*----------------------------------------------------------------------------*
- | Routine: HGPrintElt (element_pointer, baseline)
- |
- | Results: Examines a picture element and calls the appropriate
- | routine(s) to print them according to their type. After the
- | picture is drawn, current position is (lastx, lasty).
- *----------------------------------------------------------------------------*/
-
-void
-HGPrintElt(ELT *element,
- int baseline)
-{
- register POINT *p1;
- register POINT *p2;
- register int length;
- register int graylevel;
-
- if (!DBNullelt(element) && !Nullpoint((p1 = element->ptlist))) {
- /* p1 always has first point */
- if (TEXT(element->type)) {
- HGSetFont(element->brushf, element->size);
- switch (element->size) {
- case 1:
- p1->y += adj1;
- break;
- case 2:
- p1->y += adj2;
- break;
- case 3:
- p1->y += adj3;
- break;
- case 4:
- p1->y += adj4;
- break;
- default:
- break;
- }
- HGPutText(element->type, *p1, element->textpt);
- } else {
- if (element->brushf) /* if there is a brush, the */
- HGSetBrush(element->brushf); /* graphics need it set */
-
- switch (element->type) {
-
- case ARC:
- p2 = PTNextPoint(p1);
- tmove(p2);
- doarc(*p1, *p2, element->size);
- cr();
- break;
-
- case CURVE:
- length = 0; /* keep track of line length */
- drawwig(p1);
- cr();
- break;
-
- case VECTOR:
- length = 0; /* keep track of line length so */
- tmove(p1); /* single lines don't get long */
- while (!Nullpoint((p1 = PTNextPoint(p1)))) {
- HGtline((int) (p1->x * troffscale),
- (int) (p1->y * troffscale));
- if (length++ > LINELENGTH) {
- length = 0;
- printf("\\\n");
- }
- } /* end while */
- cr();
- break;
-
- case POLYGON:
- {
- /* brushf = style of outline; size = color of fill:
- * on first pass (polyfill=FILL), do the interior using 'P'
- * unless size=0
- * on second pass (polyfill=OUTLINE), do the outline using a series
- * of vectors. It might make more sense to use \D'p ...',
- * but there is no uniform way to specify a 'fill character'
- * that prints as 'no fill' on all output devices (and
- * stipple fonts).
- * If polyfill=BOTH, just use the \D'p ...' command.
- */
- float firstx = p1->x;
- float firsty = p1->y;
-
- length = 0; /* keep track of line length so */
- /* single lines don't get long */
-
- if (polyfill == FILL || polyfill == BOTH) {
- /* do the interior */
- char command = (polyfill == BOTH && element->brushf) ? 'p' : 'P';
-
- /* include outline, if there is one and */
- /* the -p flag was set */
-
- /* switch based on what gremlin gives */
- switch (element->size) {
- case 1:
- graylevel = 1;
- break;
- case 3:
- graylevel = 2;
- break;
- case 12:
- graylevel = 3;
- break;
- case 14:
- graylevel = 4;
- break;
- case 16:
- graylevel = 5;
- break;
- case 19:
- graylevel = 6;
- break;
- case 21:
- graylevel = 7;
- break;
- case 23:
- graylevel = 8;
- break;
- default: /* who's giving something else? */
- graylevel = NSTIPPLES;
- break;
- }
- /* int graylevel = element->size; */
-
- if (graylevel < 0)
- break;
- if (graylevel > NSTIPPLES)
- graylevel = NSTIPPLES;
- printf("\\h'-%du'\\D'f %du'",
- stipple_index[graylevel],
- stipple_index[graylevel]);
- cr();
- tmove(p1);
- printf("\\D'%c", command);
-
- while (!Nullpoint((PTNextPoint(p1)))) {
- p1 = PTNextPoint(p1);
- dx((double) p1->x);
- dy((double) p1->y);
- if (length++ > LINELENGTH) {
- length = 0;
- printf("\\\n");
- }
- } /* end while */
-
- /* close polygon if not done so by user */
- if ((firstx != p1->x) || (firsty != p1->y)) {
- dx((double) firstx);
- dy((double) firsty);
- }
- putchar('\'');
- cr();
- break;
- }
- /* else polyfill == OUTLINE; only draw the outline */
- if (!(element->brushf))
- break;
- length = 0; /* keep track of line length */
- tmove(p1);
-
- while (!Nullpoint((PTNextPoint(p1)))) {
- p1 = PTNextPoint(p1);
- HGtline((int) (p1->x * troffscale),
- (int) (p1->y * troffscale));
- if (length++ > LINELENGTH) {
- length = 0;
- printf("\\\n");
- }
- } /* end while */
-
- /* close polygon if not done so by user */
- if ((firstx != p1->x) || (firsty != p1->y)) {
- HGtline((int) (firstx * troffscale),
- (int) (firsty * troffscale));
- }
- cr();
- break;
- } /* end case POLYGON */
- } /* end switch */
- } /* end else Text */
- } /* end if */
-} /* end PrintElt */
-
-
-/*----------------------------------------------------------------------------*
- | Routine: HGPutText (justification, position_point, string)
- |
- | Results: Given the justification, a point to position with, and a
- | string to put, HGPutText first sends the string into a
- | diversion, moves to the positioning point, then outputs
- | local vertical and horizontal motions as needed to justify
- | the text. After all motions are done, the diversion is
- | printed out.
- *----------------------------------------------------------------------------*/
-
-void
-HGPutText(int justify,
- POINT pnt,
- register char *string)
-{
- int savelasty = lasty; /* vertical motion for text is to be */
- /* ignored. Save current y here */
-
- printf(".nr g8 \\n(.d\n"); /* save current vertical position. */
- printf(".ds g9 \""); /* define string containing the text. */
- while (*string) { /* put out the string */
- if (*string == '\\' &&
- *(string + 1) == '\\') { /* one character at a */
- printf("\\\\\\"); /* time replacing // */
- string++; /* by //// to prevent */
- } /* interpretation at */
- printf("%c", *(string++)); /* printout time */
- }
- printf("\n");
-
- tmove(&pnt); /* move to positioning point */
-
- switch (justify) {
- /* local vertical motions */
- /* (the numbers here are used to be somewhat compatible with gprint) */
- case CENTLEFT:
- case CENTCENT:
- case CENTRIGHT:
- printf("\\v'0.85n'"); /* down half */
- break;
-
- case TOPLEFT:
- case TOPCENT:
- case TOPRIGHT:
- printf("\\v'1.7n'"); /* down whole */
- }
-
- switch (justify) {
- /* local horizontal motions */
- case BOTCENT:
- case CENTCENT:
- case TOPCENT:
- printf("\\h'-\\w'\\*(g9'u/2u'"); /* back half */
- break;
-
- case BOTRIGHT:
- case CENTRIGHT:
- case TOPRIGHT:
- printf("\\h'-\\w'\\*(g9'u'"); /* back whole */
- }
-
- printf("\\&\\*(g9\n"); /* now print the text. */
- printf(".sp |\\n(g8u\n"); /* restore vertical position */
- lasty = savelasty; /* vertical position restored to where it */
- lastx = xleft; /* was before text, also horizontal is at */
- /* left */
-} /* end HGPutText */
-
-
-/*----------------------------------------------------------------------------*
- | Routine: doarc (center_point, start_point, angle)
- |
- | Results: Produces either drawarc command or a drawcircle command
- | depending on the angle needed to draw through.
- *----------------------------------------------------------------------------*/
-
-void
-doarc(POINT cp,
- POINT sp,
- int angle)
-{
- if (angle) /* arc with angle */
- HGArc((int) (cp.x * troffscale), (int) (cp.y * troffscale),
- (int) (sp.x * troffscale), (int) (sp.y * troffscale), angle);
- else /* a full circle (angle == 0) */
- HGArc((int) (cp.x * troffscale), (int) (cp.y * troffscale),
- (int) (sp.x * troffscale), (int) (sp.y * troffscale), 0);
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: HGSetFont (font_number, Point_size)
- |
- | Results: ALWAYS outputs a .ft and .ps directive to troff. This is
- | done because someone may change stuff inside a text string.
- | Changes thickness back to default thickness. Default
- | thickness depends on font and pointsize.
- *----------------------------------------------------------------------------*/
-
-void
-HGSetFont(int font,
- int size)
-{
- printf(".ft %s\n"
- ".ps %d\n", tfont[font - 1], tsize[size - 1]);
- linethickness = DEFTHICK;
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: HGSetBrush (line_mode)
- |
- | Results: Generates the troff commands to set up the line width and
- | style of subsequent lines. Does nothing if no change is
- | needed.
- |
- | Side Efct: Sets `linmode' and `linethicknes'.
- *----------------------------------------------------------------------------*/
-
-void
-HGSetBrush(int mode)
-{
- register int printed = 0;
-
- if (linmod != style[--mode]) {
- /* Groff doesn't understand \Ds, so we take it out */
- /* printf ("\\D's %du'", linmod = style[mode]); */
- linmod = style[mode];
- printed = 1;
- }
- if (linethickness != thick[mode]) {
- linethickness = thick[mode];
- printf("\\h'-%.2fp'\\D't %.2fp'", linethickness, linethickness);
- printed = 1;
- }
- if (printed)
- cr();
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: dx (x_destination)
- |
- | Results: Scales and outputs a number for delta x (with a leading
- | space) given `lastx' and x_destination.
- |
- | Side Efct: Resets `lastx' to x_destination.
- *----------------------------------------------------------------------------*/
-
-void
-dx(double x)
-{
- register int ix = (int) (x * troffscale);
-
- printf(" %du", ix - lastx);
- lastx = ix;
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: dy (y_destination)
- |
- | Results: Scales and outputs a number for delta y (with a leading
- | space) given `lastyline' and y_destination.
- |
- | Side Efct: Resets `lastyline' to y_destination. Since `line' vertical
- | motions don't affect `page' ones, `lasty' isn't updated.
- *----------------------------------------------------------------------------*/
-
-void
-dy(double y)
-{
- register int iy = (int) (y * troffscale);
-
- printf(" %du", iy - lastyline);
- lastyline = iy;
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: tmove2 (px, py)
- |
- | Results: Produces horizontal and vertical moves for troff given the
- | pair of points to move to and knowing the current position.
- | Also puts out a horizontal move to start the line. This is
- | a variation without the .sp command.
- *----------------------------------------------------------------------------*/
-
-void
-tmove2(int px,
- int py)
-{
- register int dx;
- register int dy;
-
- if ((dy = py - lasty)) {
- printf("\\v'%du'", dy);
- }
- lastyline = lasty = py; /* lasty is always set to current */
- if ((dx = px - lastx)) {
- printf("\\h'%du'", dx);
- lastx = px;
- }
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: tmove (point_pointer)
- |
- | Results: Produces horizontal and vertical moves for troff given the
- | pointer of a point to move to and knowing the current
- | position. Also puts out a horizontal move to start the
- | line.
- *----------------------------------------------------------------------------*/
-
-void
-tmove(POINT * ptr)
-{
- register int ix = (int) (ptr->x * troffscale);
- register int iy = (int) (ptr->y * troffscale);
- register int dx;
- register int dy;
-
- if ((dy = iy - lasty)) {
- printf(".sp %du\n", dy);
- }
- lastyline = lasty = iy; /* lasty is always set to current */
- if ((dx = ix - lastx)) {
- printf("\\h'%du'", dx);
- lastx = ix;
- }
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: cr ( )
- |
- | Results: Ends off an input line. `.sp -1' is also added to counteract
- | the vertical move done at the end of text lines.
- |
- | Side Efct: Sets `lastx' to `xleft' for troff's return to left margin.
- *----------------------------------------------------------------------------*/
-
-void
-cr()
-{
- printf("\n.sp -1\n");
- lastx = xleft;
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: line ( )
- |
- | Results: Draws a single solid line to (x,y).
- *----------------------------------------------------------------------------*/
-
-void
-line(int px,
- int py)
-{
- printf("\\D'l");
- printf(" %du", px - lastx);
- printf(" %du'", py - lastyline);
- lastx = px;
- lastyline = lasty = py;
-}
-
-
-/*----------------------------------------------------------------------------
- | Routine: drawwig (ptr)
- |
- | Results: The point sequence found in the structure pointed by ptr is
- | placed in integer arrays for further manipulation by the
- | existing routing. With the proper parameters, HGCurve is
- | called.
- *----------------------------------------------------------------------------*/
-
-void
-drawwig(POINT * ptr)
-{
- register int npts; /* point list index */
- int x[MAXPOINTS], y[MAXPOINTS]; /* point list */
-
- for (npts = 1; !Nullpoint(ptr); ptr = PTNextPoint(ptr), npts++) {
- x[npts] = (int) (ptr->x * troffscale);
- y[npts] = (int) (ptr->y * troffscale);
- }
- if (--npts) {
- /* HGCurve(&x[0], &y[0], npts); */ /*Gremlin looks different, so... */
- picurve(&x[0], &y[0], npts);
- }
-}
-
-
-/*----------------------------------------------------------------------------
- | Routine: HGArc (xcenter, ycenter, xstart, ystart, angle)
- |
- | Results: This routine plots an arc centered about (cx, cy) counter
- | clockwise starting from the point (px, py) through `angle'
- | degrees. If angle is 0, a full circle is drawn. It does so
- | by creating a draw-path around the arc whose density of
- | points depends on the size of the arc.
- *----------------------------------------------------------------------------*/
-
-void
-HGArc(register int cx,
- register int cy,
- int px,
- int py,
- int angle)
-{
- double xs, ys, resolution, fullcircle;
- int m;
- register int mask;
- register int extent;
- register int nx;
- register int ny;
- register int length;
- register double epsilon;
-
- xs = px - cx;
- ys = py - cy;
-
- length = 0;
-
- resolution = (1.0 + hypot(xs, ys) / res) * PointsPerInterval;
- /* mask = (1 << (int) log10(resolution + 1.0)) - 1; */
- (void) frexp(resolution, &m); /* A bit more elegant than log10 */
- for (mask = 1; mask < m; mask = mask << 1);
- mask -= 1;
-
- epsilon = 1.0 / resolution;
- fullcircle = (2.0 * pi) * resolution;
- if (angle == 0)
- extent = (int) fullcircle;
- else
- extent = (int) (angle * fullcircle / 360.0);
-
- HGtline(px, py);
- while (--extent >= 0) {
- xs += epsilon * ys;
- nx = cx + (int) (xs + 0.5);
- ys -= epsilon * xs;
- ny = cy + (int) (ys + 0.5);
- if (!(extent & mask)) {
- HGtline(nx, ny); /* put out a point on circle */
- if (length++ > LINELENGTH) {
- length = 0;
- printf("\\\n");
- }
- }
- } /* end for */
-} /* end HGArc */
-
-
-/*----------------------------------------------------------------------------
- | Routine: picurve (xpoints, ypoints, num_of_points)
- |
- | Results: Draws a curve delimited by (not through) the line segments
- | traced by (xpoints, ypoints) point list. This is the `Pic'
- | style curve.
- *----------------------------------------------------------------------------*/
-
-void
-picurve(register int *x,
- register int *y,
- int npts)
-{
- register int nseg; /* effective resolution for each curve */
- register int xp; /* current point (and temporary) */
- register int yp;
- int pxp, pyp; /* previous point (to make lines from) */
- int i; /* inner curve segment traverser */
- int length = 0;
- double w; /* position factor */
- double t1, t2, t3; /* calculation temps */
-
- if (x[1] == x[npts] && y[1] == y[npts]) {
- x[0] = x[npts - 1]; /* if the lines' ends meet, make */
- y[0] = y[npts - 1]; /* sure the curve meets */
- x[npts + 1] = x[2];
- y[npts + 1] = y[2];
- } else { /* otherwise, make the ends of the */
- x[0] = x[1]; /* curve touch the ending points of */
- y[0] = y[1]; /* the line segments */
- x[npts + 1] = x[npts];
- y[npts + 1] = y[npts];
- }
-
- pxp = (x[0] + x[1]) / 2; /* make the last point pointers */
- pyp = (y[0] + y[1]) / 2; /* point to the start of the 1st line */
- tmove2(pxp, pyp);
-
- for (; npts--; x++, y++) { /* traverse the line segments */
- xp = x[0] - x[1];
- yp = y[0] - y[1];
- nseg = (int) hypot((double) xp, (double) yp);
- xp = x[1] - x[2];
- yp = y[1] - y[2];
- /* `nseg' is the number of line */
- /* segments that will be drawn for */
- /* each curve segment. */
- nseg = (int) ((double) (nseg + (int) hypot((double) xp, (double) yp)) /
- res * PointsPerInterval);
-
- for (i = 1; i < nseg; i++) {
- w = (double) i / (double) nseg;
- t1 = w * w;
- t3 = t1 + 1.0 - (w + w);
- t2 = 2.0 - (t3 + t1);
- xp = (((int) (t1 * x[2] + t2 * x[1] + t3 * x[0])) + 1) / 2;
- yp = (((int) (t1 * y[2] + t2 * y[1] + t3 * y[0])) + 1) / 2;
-
- HGtline(xp, yp);
- if (length++ > LINELENGTH) {
- length = 0;
- printf("\\\n");
- }
- }
- }
-}
-
-
-/*----------------------------------------------------------------------------
- | Routine: HGCurve(xpoints, ypoints, num_points)
- |
- | Results: This routine generates a smooth curve through a set of
- | points. The method used is the parametric spline curve on
- | unit knot mesh described in `Spline Curve Techniques' by
- | Patrick Baudelaire, Robert Flegal, and Robert Sproull --
- | Xerox Parc.
- *----------------------------------------------------------------------------*/
-
-void
-HGCurve(int *x,
- int *y,
- int numpoints)
-{
- float h[MAXPOINTS], dx[MAXPOINTS], dy[MAXPOINTS];
- float d2x[MAXPOINTS], d2y[MAXPOINTS], d3x[MAXPOINTS], d3y[MAXPOINTS];
- float t, t2, t3;
- register int j;
- register int k;
- register int nx;
- register int ny;
- int lx, ly;
- int length = 0;
-
- lx = x[1];
- ly = y[1];
- tmove2(lx, ly);
-
- /*
- * Solve for derivatives of the curve at each point separately for x and y
- * (parametric).
- */
- Paramaterize(x, y, h, numpoints);
-
- /* closed curve */
- if ((x[1] == x[numpoints]) && (y[1] == y[numpoints])) {
- PeriodicSpline(h, x, dx, d2x, d3x, numpoints);
- PeriodicSpline(h, y, dy, d2y, d3y, numpoints);
- } else {
- NaturalEndSpline(h, x, dx, d2x, d3x, numpoints);
- NaturalEndSpline(h, y, dy, d2y, d3y, numpoints);
- }
-
- /*
- * generate the curve using the above information and PointsPerInterval
- * vectors between each specified knot.
- */
-
- for (j = 1; j < numpoints; ++j) {
- if ((x[j] == x[j + 1]) && (y[j] == y[j + 1]))
- continue;
- for (k = 0; k <= PointsPerInterval; ++k) {
- t = (float) k *h[j] / (float) PointsPerInterval;
- t2 = t * t;
- t3 = t * t * t;
- nx = x[j] + (int) (t * dx[j] + t2 * d2x[j] / 2 + t3 * d3x[j] / 6);
- ny = y[j] + (int) (t * dy[j] + t2 * d2y[j] / 2 + t3 * d3y[j] / 6);
- HGtline(nx, ny);
- if (length++ > LINELENGTH) {
- length = 0;
- printf("\\\n");
- }
- } /* end for k */
- } /* end for j */
-} /* end HGCurve */
-
-
-/*----------------------------------------------------------------------------
- | Routine: Paramaterize (xpoints, ypoints, hparams, num_points)
- |
- | Results: This routine calculates parameteric values for use in
- | calculating curves. The parametric values are returned
- | in the array h. The values are an approximation of
- | cumulative arc lengths of the curve (uses cord length).
- | For additional information, see paper cited below.
- *----------------------------------------------------------------------------*/
-
-void
-Paramaterize(int x[],
- int y[],
- float h[],
- int n)
-{
- register int dx;
- register int dy;
- register int i;
- register int j;
- float u[MAXPOINTS];
-
- for (i = 1; i <= n; ++i) {
- u[i] = 0;
- for (j = 1; j < i; j++) {
- dx = x[j + 1] - x[j];
- dy = y[j + 1] - y[j];
- /* Here was overflowing, so I changed it. */
- /* u[i] += sqrt ((double) (dx * dx + dy * dy)); */
- u[i] += hypot((double) dx, (double) dy);
- }
- }
- for (i = 1; i < n; ++i)
- h[i] = u[i + 1] - u[i];
-} /* end Paramaterize */
-
-
-/*----------------------------------------------------------------------------
- | Routine: PeriodicSpline (h, z, dz, d2z, d3z, npoints)
- |
- | Results: This routine solves for the cubic polynomial to fit a spline
- | curve to the the points specified by the list of values.
- | The Curve generated is periodic. The algorithms for this
- | curve are from the `Spline Curve Techniques' paper cited
- | above.
- *----------------------------------------------------------------------------*/
-
-void
-PeriodicSpline(float h[], /* paramaterization */
- int z[], /* point list */
- float dz[], /* to return the 1st derivative */
- float d2z[], /* 2nd derivative */
- float d3z[], /* 3rd derivative */
- int npoints) /* number of valid points */
-{
- float d[MAXPOINTS];
- float deltaz[MAXPOINTS], a[MAXPOINTS], b[MAXPOINTS];
- float c[MAXPOINTS], r[MAXPOINTS], s[MAXPOINTS];
- int i;
-
- /* step 1 */
- for (i = 1; i < npoints; ++i) {
- deltaz[i] = h[i] ? ((double) (z[i + 1] - z[i])) / h[i] : 0;
- }
- h[0] = h[npoints - 1];
- deltaz[0] = deltaz[npoints - 1];
-
- /* step 2 */
- for (i = 1; i < npoints - 1; ++i) {
- d[i] = deltaz[i + 1] - deltaz[i];
- }
- d[0] = deltaz[1] - deltaz[0];
-
- /* step 3a */
- a[1] = 2 * (h[0] + h[1]);
- b[1] = d[0];
- c[1] = h[0];
- for (i = 2; i < npoints - 1; ++i) {
- a[i] = 2 * (h[i - 1] + h[i]) -
- pow((double) h[i - 1], (double) 2.0) / a[i - 1];
- b[i] = d[i - 1] - h[i - 1] * b[i - 1] / a[i - 1];
- c[i] = -h[i - 1] * c[i - 1] / a[i - 1];
- }
-
- /* step 3b */
- r[npoints - 1] = 1;
- s[npoints - 1] = 0;
- for (i = npoints - 2; i > 0; --i) {
- r[i] = -(h[i] * r[i + 1] + c[i]) / a[i];
- s[i] = (6 * b[i] - h[i] * s[i + 1]) / a[i];
- }
-
- /* step 4 */
- d2z[npoints - 1] = (6 * d[npoints - 2] - h[0] * s[1]
- - h[npoints - 1] * s[npoints - 2])
- / (h[0] * r[1] + h[npoints - 1] * r[npoints - 2]
- + 2 * (h[npoints - 2] + h[0]));
- for (i = 1; i < npoints - 1; ++i) {
- d2z[i] = r[i] * d2z[npoints - 1] + s[i];
- }
- d2z[npoints] = d2z[1];
-
- /* step 5 */
- for (i = 1; i < npoints; ++i) {
- dz[i] = deltaz[i] - h[i] * (2 * d2z[i] + d2z[i + 1]) / 6;
- d3z[i] = h[i] ? (d2z[i + 1] - d2z[i]) / h[i] : 0;
- }
-} /* end PeriodicSpline */
-
-
-/*----------------------------------------------------------------------------
- | Routine: NaturalEndSpline (h, z, dz, d2z, d3z, npoints)
- |
- | Results: This routine solves for the cubic polynomial to fit a spline
- | curve the the points specified by the list of values. The
- | alogrithms for this curve are from the `Spline Curve
- | Techniques' paper cited above.
- *----------------------------------------------------------------------------*/
-
-void
-NaturalEndSpline(float h[], /* parameterization */
- int z[], /* Point list */
- float dz[], /* to return the 1st derivative */
- float d2z[], /* 2nd derivative */
- float d3z[], /* 3rd derivative */
- int npoints) /* number of valid points */
-{
- float d[MAXPOINTS];
- float deltaz[MAXPOINTS], a[MAXPOINTS], b[MAXPOINTS];
- int i;
-
- /* step 1 */
- for (i = 1; i < npoints; ++i) {
- deltaz[i] = h[i] ? ((double) (z[i + 1] - z[i])) / h[i] : 0;
- }
- deltaz[0] = deltaz[npoints - 1];
-
- /* step 2 */
- for (i = 1; i < npoints - 1; ++i) {
- d[i] = deltaz[i + 1] - deltaz[i];
- }
- d[0] = deltaz[1] - deltaz[0];
-
- /* step 3 */
- a[0] = 2 * (h[2] + h[1]);
- b[0] = d[1];
- for (i = 1; i < npoints - 2; ++i) {
- a[i] = 2 * (h[i + 1] + h[i + 2]) -
- pow((double) h[i + 1], (double) 2.0) / a[i - 1];
- b[i] = d[i + 1] - h[i + 1] * b[i - 1] / a[i - 1];
- }
-
- /* step 4 */
- d2z[npoints] = d2z[1] = 0;
- for (i = npoints - 1; i > 1; --i) {
- d2z[i] = (6 * b[i - 2] - h[i] * d2z[i + 1]) / a[i - 2];
- }
-
- /* step 5 */
- for (i = 1; i < npoints; ++i) {
- dz[i] = deltaz[i] - h[i] * (2 * d2z[i] + d2z[i + 1]) / 6;
- d3z[i] = h[i] ? (d2z[i + 1] - d2z[i]) / h[i] : 0;
- }
-} /* end NaturalEndSpline */
-
-
-/*----------------------------------------------------------------------------*
- | Routine: change (x_position, y_position, visible_flag)
- |
- | Results: As HGtline passes from the invisible to visible (or vice
- | versa) portion of a line, change is called to either draw
- | the line, or initialize the beginning of the next one.
- | Change calls line to draw segments if visible_flag is set
- | (which means we're leaving a visible area).
- *----------------------------------------------------------------------------*/
-
-void
-change(register int x,
- register int y,
- register int vis)
-{
- static int length = 0;
-
- if (vis) { /* leaving a visible area, draw it. */
- line(x, y);
- if (length++ > LINELENGTH) {
- length = 0;
- printf("\\\n");
- }
- } else { /* otherwise, we're entering one, remember */
- /* beginning */
- tmove2(x, y);
- }
-}
-
-
-/*----------------------------------------------------------------------------
- | Routine: HGtline (xstart, ystart, xend, yend)
- |
- | Results: Draws a line from current position to (x1,y1) using line(x1,
- | y1) to place individual segments of dotted or dashed lines.
- *----------------------------------------------------------------------------*/
-
-void
-HGtline(int x1,
- int y1)
-{
- register int x0 = lastx;
- register int y0 = lasty;
- register int dx;
- register int dy;
- register int oldcoord;
- register int res1;
- register int visible;
- register int res2;
- register int xinc;
- register int yinc;
- register int dotcounter;
-
- if (linmod == SOLID) {
- line(x1, y1);
- return;
- }
-
- /* for handling different resolutions */
- dotcounter = linmod << dotshifter;
-
- xinc = 1;
- yinc = 1;
- if ((dx = x1 - x0) < 0) {
- xinc = -xinc;
- dx = -dx;
- }
- if ((dy = y1 - y0) < 0) {
- yinc = -yinc;
- dy = -dy;
- }
- res1 = 0;
- res2 = 0;
- visible = 0;
- if (dx >= dy) {
- oldcoord = y0;
- while (x0 != x1) {
- if ((x0 & dotcounter) && !visible) {
- change(x0, y0, 0);
- visible = 1;
- } else if (visible && !(x0 & dotcounter)) {
- change(x0 - xinc, oldcoord, 1);
- visible = 0;
- }
- if (res1 > res2) {
- oldcoord = y0;
- res2 += dx - res1;
- res1 = 0;
- y0 += yinc;
- }
- res1 += dy;
- x0 += xinc;
- }
- } else {
- oldcoord = x0;
- while (y0 != y1) {
- if ((y0 & dotcounter) && !visible) {
- change(x0, y0, 0);
- visible = 1;
- } else if (visible && !(y0 & dotcounter)) {
- change(oldcoord, y0 - yinc, 1);
- visible = 0;
- }
- if (res1 > res2) {
- oldcoord = x0;
- res2 += dy - res1;
- res1 = 0;
- x0 += xinc;
- }
- res1 += dx;
- y0 += yinc;
- }
- }
- if (visible)
- change(x1, y1, 1);
- else
- change(x1, y1, 0);
-}
-
-/* EOF */
diff --git a/contrib/groff/src/preproc/grn/hpoint.cc b/contrib/groff/src/preproc/grn/hpoint.cc
deleted file mode 100644
index f4e1ca827755..000000000000
--- a/contrib/groff/src/preproc/grn/hpoint.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Last non-groff version: hpoint.c 1.1 84/10/08 */
-
-/*
- * This file contains routines for manipulating the point data structures
- * for the gremlin picture editor.
- */
-
-#include <stdlib.h>
-#include "gprint.h"
-
-
-/*
- * Return pointer to empty point list.
- */
-POINT *
-PTInit()
-{
- return ((POINT *) NULL);
-}
-
-
-/*
- * This routine creates a new point with coordinates x and y and links it
- * into the pointlist.
- */
-POINT *
-PTMakePoint(float x,
- float y,
- POINT **pplist)
-{
- register POINT *point;
-
- if (Nullpoint(point = *pplist)) { /* empty list */
- *pplist = (POINT *) malloc(sizeof(POINT));
- point = *pplist;
- } else {
- while (!Nullpoint(point->nextpt))
- point = point->nextpt;
- point->nextpt = (POINT *) malloc(sizeof(POINT));
- point = point->nextpt;
- }
-
- point->x = x;
- point->y = y;
- point->nextpt = PTInit();
- return (point);
-} /* end PTMakePoint */
-
-/* EOF */
diff --git a/contrib/groff/src/preproc/grn/main.cc b/contrib/groff/src/preproc/grn/main.cc
deleted file mode 100644
index 92e64c6ae77b..000000000000
--- a/contrib/groff/src/preproc/grn/main.cc
+++ /dev/null
@@ -1,905 +0,0 @@
-/* Last non-groff version: main.cc 1.23 (Berkeley) 85/08/05
- *
- * Adapted to GNU troff by Daniel Senderowicz 99/12/29.
- *
- * Further refinements by Werner Lemberg 00/02/20.
- *
- *
- * This file contains the main and file system dependent routines for
- * processing gremlin files into troff input. The program watches input go
- * by to standard output, only interpreting things between .GS and .GE
- * lines. Default values (font, size, scale, thickness) may be overridden
- * with a `default' command and are further overridden by commands in the
- * input.
- *
- * Inside the GS and GE, commands are accepted to reconfigure the picture.
- * At most one command may reside on each line, and each command is followed
- * by a parameter separated by white space. The commands are as follows,
- * and may be abbreviated down to one character (with exception of `scale'
- * and `stipple' down to "sc" and "st") and may be upper or lower case.
- *
- * default - Make all settings in the current
- * .GS/.GE the global defaults. Height,
- * width and file are NOT saved.
- * 1, 2, 3, 4 - Set size 1, 2, 3, or 4 (followed by an
- * integer point size).
- * roman, italics, bold, special - Set gremlin's fonts to any other troff
- * font (one or two characters).
- * stipple, l - Use a stipple font for polygons. Arg
- * is troff font name. No Default. Can
- * use only one stipple font per picture.
- * (See below for stipple font index.)
- * scale, x - Scale is IN ADDITION to the global
- * scale factor from the default.
- * pointscale - Turn on scaling point sizes to match
- * `scale' commands. (Optional operand
- * `off' to turn it off.)
- * narrow, medium, thick - Set widths of lines.
- * file - Set the file name to read the gremlin
- * picture from. If the file isn't in
- * the current directory, the gremlin
- * library is tried.
- * width, height - These two commands override any
- * scaling factor that is in effect, and
- * forces the picture to fit into either
- * the height or width specified,
- * whichever makes the picture smaller.
- * The operand for these two commands is
- * a floating-point number in units of
- * inches.
- * l<nn> (integer <nn>) - Set association between stipple <nn>
- * and a stipple `character'. <nn> must
- * be in the range 0 to NSTIPPLES (16)
- * inclusive. The integer operand is an
- * index in the stipple font selected.
- * Valid cf (cifplot) indices are 1-32
- * (although 24 is not defined), valid ug
- * (unigrafix) indices are 1-14, and
- * valid gs (gray scale) indices are
- * 0-16. Nonetheless, any number between
- * 0 and 255 is accepted since new
- * stipple fonts may be added. An
- * integer operand is required.
- *
- * Troff number registers used: g1 through g9. g1 is the width of the
- * picture, and g2 is the height. g3, and g4, save information, g8 and g9
- * are used for text processing and g5-g7 are reserved.
- */
-
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include "gprint.h"
-
-#include "device.h"
-#include "font.h"
-#include "searchpath.h"
-#include "macropath.h"
-
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "defs.h"
-
-/* database imports */
-
-extern void HGPrintElt(ELT *element, int baseline);
-extern ELT *DBInit();
-extern ELT *DBRead(register FILE *file);
-extern POINT *PTInit();
-extern POINT *PTMakePoint(float x, float y, POINT **pplist);
-
-
-#define SUN_SCALEFACTOR 0.70
-
-/* #define DEFSTIPPLE "gs" */
-#define DEFSTIPPLE "cf"
-
-#define MAXINLINE 100 /* input line length */
-
-#define SCREENtoINCH 0.02 /* scaling factor, screen to inches */
-
-#define BIG 999999999999.0 /* unweildly large floating number */
-
-
-static char sccsid[] = "@(#) (Berkeley) 8/5/85, 12/28/99";
-
-int res; /* the printer's resolution goes here */
-
-int dotshifter; /* for the length of dotted curves */
-
-double linethickness; /* brush styles */
-int linmod;
-int lastx; /* point registers for printing elements */
-int lasty;
-int lastyline; /* A line's vertical position is NOT the */
- /* same after that line is over, so for a */
- /* line of drawing commands, vertical */
- /* spacing is kept in lastyline */
-
-/* These are the default fonts, sizes, line styles, */
-/* and thicknesses. They can be modified from a */
-/* `default' command and are reset each time the */
-/* start of a picture (.GS) is found. */
-
-char *deffont[] =
-{"R", "I", "B", "S"};
-int defsize[] =
-{10, 16, 24, 36};
-/* #define BASE_THICKNESS 1.0 */
-#define BASE_THICKNESS 0.15
-double defthick[STYLES] =
-{1 * BASE_THICKNESS,
- 1 * BASE_THICKNESS,
- 5 * BASE_THICKNESS,
- 1 * BASE_THICKNESS,
- 1 * BASE_THICKNESS,
- 3 * BASE_THICKNESS};
-
-/* int cf_stipple_index[NSTIPPLES + 1] = */
-/* {0, 1, 3, 12, 14, 16, 19, 21, 23}; */
-/* a logarithmic scale looks better than a linear one for the gray shades */
-/* */
-/* int other_stipple_index[NSTIPPLES + 1] = */
-/* {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; */
-
-int cf_stipple_index[NSTIPPLES + 1] =
-{0, 18, 32, 56, 100, 178, 316, 562, 1000}; /* only 1-8 used */
-int other_stipple_index[NSTIPPLES + 1] =
-{0, 62, 125, 187, 250, 312, 375, 437, 500,
- 562, 625, 687, 750, 812, 875, 937, 1000};
-
-/* int *defstipple_index = other_stipple_index; */
-int *defstipple_index = cf_stipple_index;
-
-int style[STYLES] =
-{DOTTED, DOTDASHED, SOLID, DASHED, SOLID, SOLID};
-double scale = 1.0; /* no scaling, default */
-int defpoint = 0; /* flag for pointsize scaling */
-char *defstipple = (char *) 0;
-enum {
- OUTLINE, FILL, BOTH
-} polyfill;
-
-/* flag to controll filling of polygons */
-
-double adj1 = 0.0;
-double adj2 = 0.0;
-double adj3 = 0.0;
-double adj4 = 0.0;
-
-double thick[STYLES]; /* thicknesses set by defaults, then by */
- /* commands */
-char *tfont[FONTS]; /* fonts originally set to deffont values, */
- /* then */
-int tsize[SIZES]; /* optionally changed by commands inside */
- /* grn */
-int stipple_index[NSTIPPLES + 1]; /* stipple font file indices */
-char *stipple;
-
-double xscale; /* scaling factor from individual pictures */
-double troffscale; /* scaling factor at output time */
-
-double width; /* user-request maximum width for picture */
- /* (in inches) */
-double height; /* user-request height */
-int pointscale; /* flag for pointsize scaling */
-int setdefault; /* flag for a .GS/.GE to remember all */
- /* settings */
-int sflag; /* -s flag: sort order (do polyfill first) */
-
-double toppoint; /* remember the picture */
-double bottompoint; /* bounds in these variables */
-double leftpoint;
-double rightpoint;
-
-int ytop; /* these are integer versions of the above */
-int ybottom; /* so not to convert each time they're used */
-int xleft;
-int xright;
-
-int linenum = 0; /* line number of input file */
-char inputline[MAXINLINE]; /* spot to filter through the file */
-char *c1 = inputline; /* c1, c2, and c3 will be used to */
-char *c2 = inputline + 1; /* hunt for lines that begin with */
-char *c3 = inputline + 2; /* ".GS" by looking individually */
-char *c4 = inputline + 3; /* needed for compatibility mode */
-char GScommand[MAXINLINE]; /* put user's ".GS" command line here */
-char gremlinfile[MAXINLINE]; /* filename to use for a picture */
-int SUNFILE = FALSE; /* TRUE if SUN gremlin file */
-int compatibility_flag = FALSE; /* TRUE if in compatibility mode */
-
-
-void getres();
-char *doinput(FILE *fp);
-void conv(register FILE *fp, int baseline);
-void savestate();
-int has_polygon(register ELT *elist);
-void interpret(char *line);
-
-
-void
-usage(FILE *stream)
-{
- fprintf(stream,
- "usage: %s [ -vCs ] [ -M dir ] [ -F dir ] [ -T dev ] [ file ]\n",
- program_name);
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: main (argument_count, argument_pointer)
- |
- | Results: Parses the command line, accumulating input file names, then
- | reads the inputs, passing it directly to output until a `.GS'
- | line is read. Main then passes control to `conv' to do the
- | gremlin file conversions.
- *----------------------------------------------------------------------------*/
-
-int
-main(int argc,
- char **argv)
-{
- program_name = argv[0];
- register FILE *fp;
- register int k;
- register char c;
- register int gfil = 0;
- char *file[50];
- char *operand(int *argcp, char ***argvp);
-
- while (--argc) {
- if (**++argv != '-')
- file[gfil++] = *argv;
- else
- switch (c = (*argv)[1]) {
-
- case 0:
- file[gfil++] = NULL;
- break;
-
- case 'C': /* compatibility mode */
- compatibility_flag = TRUE;
- break;
-
- case 'F': /* font path to find DESC */
- font::command_line_font_dir(operand(&argc, &argv));
- break;
-
- case 'T': /* final output typesetter name */
- device = operand(&argc, &argv);
- break;
-
- case 'M': /* set library directory */
- macro_path.command_line_dir(operand(&argc, &argv));
- break;
-
- case 's': /* preserve order of elements */
- sflag = 1;
- break;
-
- case '-':
- if (strcmp(*argv,"--version")==0) {
- case 'v':
- extern const char *Version_string;
- printf("GNU grn (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- if (strcmp(*argv,"--help")==0) {
- case '?':
- usage(stdout);
- exit(0);
- break;
- }
- // fallthrough
- default:
- error("unknown switch: %1", c);
- usage(stderr);
- exit(1);
- }
- }
-
- getres(); /* set the resolution for an output device */
-
- if (gfil == 0) { /* no filename, use standard input */
- file[0] = NULL;
- gfil++;
- }
-
- for (k = 0; k < gfil; k++) {
- if (file[k] != NULL) {
- if ((fp = fopen(file[k], "r")) == NULL)
- fatal("can't open %1", file[k]);
- } else
- fp = stdin;
-
- while (doinput(fp) != NULL) {
- if (*c1 == '.' && *c2 == 'G' && *c3 == 'S') {
- if (compatibility_flag ||
- *c4 == '\n' || *c4 == ' ' || *c4 == '\0')
- conv(fp, linenum);
- else
- fputs(inputline, stdout);
- } else
- fputs(inputline, stdout);
- }
- }
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: char * operand (& argc, & argv)
- |
- | Results: Returns address of the operand given with a command-line
- | option. It uses either `-Xoperand' or `-X operand', whichever
- | is present. The program is terminated if no option is
- | present.
- |
- | Side Efct: argc and argv are updated as necessary.
- *----------------------------------------------------------------------------*/
-
-char *
-operand(int *argcp,
- char ***argvp)
-{
- if ((**argvp)[2])
- return (**argvp + 2); /* operand immediately follows */
- if ((--*argcp) <= 0) { /* no operand */
- error("command-line option operand missing.");
- exit(8);
- }
- return (*(++(*argvp))); /* operand is next word */
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: getres ()
- |
- | Results: Sets `res' to the resolution of the output device.
- *----------------------------------------------------------------------------*/
-
-void
-getres()
-{
- int linepiece;
-
- if (!font::load_desc())
- fatal("sorry, I can't continue");
-
- res = font::res;
-
- /* Correct the brush thicknesses based on res */
- /* if (res >= 256) {
- defthick[0] = res >> 8;
- defthick[1] = res >> 8;
- defthick[2] = res >> 4;
- defthick[3] = res >> 8;
- defthick[4] = res >> 8;
- defthick[5] = res >> 6;
- } */
-
- linepiece = res >> 9;
- for (dotshifter = 0; linepiece; dotshifter++)
- linepiece = linepiece >> 1;
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: char * doinput (file_pointer)
- |
- | Results: A line of input is read into `inputline'.
- |
- | Side Efct: "linenum" is incremented.
- |
- | Bugs: Lines longer than MAXINLINE are NOT checked, except for
- | updating `linenum'.
- *----------------------------------------------------------------------------*/
-
-char *
-doinput(FILE *fp)
-{
- char *k;
-
- if ((k = fgets(inputline, MAXINLINE, fp)) == NULL)
- return k;
- if (strchr(inputline, '\n')) /* ++ only if it's a complete line */
- linenum++;
- return (char *) !NULL;
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: initpic ( )
- |
- | Results: Sets all parameters to the normal defaults, possibly
- | overridden by a setdefault command. Initialize the picture
- | variables, and output the startup commands to troff to begin
- | the picture.
- *----------------------------------------------------------------------------*/
-
-void
-initpic()
-{
- register int i;
-
- for (i = 0; i < STYLES; i++) { /* line thickness defaults */
- thick[i] = defthick[i];
- }
- for (i = 0; i < FONTS; i++) { /* font name defaults */
- tfont[i] = deffont[i];
- }
- for (i = 0; i < SIZES; i++) { /* font size defaults */
- tsize[i] = defsize[i];
- }
- for (i = 0; i <= NSTIPPLES; i++) { /* stipple font file default indices */
- stipple_index[i] = defstipple_index[i];
- }
- stipple = defstipple;
-
- gremlinfile[0] = 0; /* filename is `null' */
- setdefault = 0; /* this is not the default settings (yet) */
-
- toppoint = BIG; /* set the picture bounds out */
- bottompoint = -BIG; /* of range so they'll be set */
- leftpoint = BIG; /* by `savebounds' on input */
- rightpoint = -BIG;
-
- pointscale = defpoint; /* flag for scaling point sizes default */
- xscale = scale; /* default scale of individual pictures */
- width = 0.0; /* size specifications input by user */
- height = 0.0;
-
- linethickness = DEFTHICK; /* brush styles */
- linmod = DEFSTYLE;
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: conv (file_pointer, starting_line)
- |
- | Results: At this point, we just passed a `.GS' line in the input
- | file. conv reads the input and calls `interpret' to process
- | commands, gathering up information until a `.GE' line is
- | found. It then calls `HGPrint' to do the translation of the
- | gremlin file to troff commands.
- *----------------------------------------------------------------------------*/
-
-void
-conv(register FILE *fp,
- int baseline)
-{
- register FILE *gfp = NULL; /* input file pointer */
- register int done = 0; /* flag to remember if finished */
- register ELT *e; /* current element pointer */
- ELT *PICTURE; /* whole picture data base pointer */
- double temp; /* temporary calculating area */
- /* POINT ptr; */ /* coordinates of a point to pass to `mov' */
- /* routine */
- int flyback; /* flag `want to end up at the top of the */
- /* picture?' */
- int compat; /* test character after .GE or .GF */
-
-
- initpic(); /* set defaults, ranges, etc. */
- strcpy(GScommand, inputline); /* save `.GS' line for later */
-
- do {
- done = (doinput(fp) == NULL); /* test for EOF */
- flyback = (*c3 == 'F'); /* and .GE or .GF */
- compat = (compatibility_flag ||
- *c4 == '\n' || *c4 == ' ' || *c4 == '\0');
- done |= (*c1 == '.' && *c2 == 'G' && (*c3 == 'E' || flyback) &&
- compat);
-
- if (done) {
- if (setdefault)
- savestate();
-
- if (!gremlinfile[0]) {
- if (!setdefault)
- error("at line %1: no picture filename.\n", baseline);
- return;
- }
- char *path;
- gfp = macro_path.open_file(gremlinfile, &path);
- if (!gfp)
- return;
- PICTURE = DBRead(gfp); /* read picture file */
- fclose(gfp);
- a_delete path;
- if (DBNullelt(PICTURE))
- return; /* If a request is made to make the */
- /* picture fit into a specific area, */
- /* set the scale to do that. */
-
- if (stipple == (char *) NULL) /* if user forgot stipple */
- if (has_polygon(PICTURE)) /* and picture has a polygon */
- stipple = DEFSTIPPLE; /* then set the default */
-
- if ((temp = bottompoint - toppoint) < 0.1)
- temp = 0.1;
- temp = (height != 0.0) ? height / (temp * SCREENtoINCH) : BIG;
- if ((troffscale = rightpoint - leftpoint) < 0.1)
- troffscale = 0.1;
- troffscale = (width != 0.0) ?
- width / (troffscale * SCREENtoINCH) : BIG;
- if (temp == BIG && troffscale == BIG)
- troffscale = xscale;
- else {
- if (temp < troffscale)
- troffscale = temp;
- } /* here, troffscale is the */
- /* picture's scaling factor */
- if (pointscale) {
- register int i; /* do pointscaling here, when */
- /* scale is known, before output */
- for (i = 0; i < SIZES; i++)
- tsize[i] = (int) (troffscale * (double) tsize[i] + 0.5);
- }
-
- /* change to device units */
- troffscale *= SCREENtoINCH * res; /* from screen units */
-
- ytop = (int) (toppoint * troffscale); /* calculate integer */
- ybottom = (int) (bottompoint * troffscale); /* versions of the */
- xleft = (int) (leftpoint * troffscale); /* picture limits */
- xright = (int) (rightpoint * troffscale);
-
- /* save stuff in number registers, */
- /* register g1 = picture width and */
- /* register g2 = picture height, */
- /* set vertical spacing, no fill, */
- /* and break (to make sure picture */
- /* starts on left), and put out the */
- /* user's `.GS' line. */
- printf(".br\n"
- ".nr g1 %du\n"
- ".nr g2 %du\n"
- "%s"
- ".nr g3 \\n(.f\n"
- ".nr g4 \\n(.s\n"
- "\\0\n"
- ".sp -1\n",
- xright - xleft, ybottom - ytop, GScommand);
-
- if (stipple) /* stipple requested for this picture */
- printf(".st %s\n", stipple);
- lastx = xleft; /* note where we are (upper left */
- lastyline = lasty = ytop; /* corner of the picture) */
-
- /* Just dump everything in the order it appears.
- *
- * If -s command-line option, traverse picture twice: First time,
- * print only the interiors of filled polygons (as borderless
- * polygons). Second time, print the outline as series of line
- * segments. This way, postprocessors that overwrite rather than
- * merge picture elements (such as Postscript) can still have text and
- * graphics on a shaded background.
- */
- /* if (sflag) */
- if (!sflag) { /* changing the default for filled polygons */
- e = PICTURE;
- polyfill = FILL;
- while (!DBNullelt(e)) {
- printf(".mk\n");
- if (e->type == POLYGON)
- HGPrintElt(e, baseline);
- printf(".rt\n");
- lastx = xleft;
- lastyline = lasty = ytop;
- e = DBNextElt(e);
- }
- }
- e = PICTURE;
-
- /* polyfill = !sflag ? BOTH : OUTLINE; */
- polyfill = sflag ? BOTH : OUTLINE; /* changing the default */
- while (!DBNullelt(e)) {
- printf(".mk\n");
- HGPrintElt(e, baseline);
- printf(".rt\n");
- lastx = xleft;
- lastyline = lasty = ytop;
- e = DBNextElt(e);
- }
-
- /* decide where to end picture */
-
- /* I changed everything here. I always use the combination .mk and */
- /* .rt so once finished I just space down the heigth of the picture */
- /* that is \n(g2u */
- if (flyback) { /* end picture at upper left */
- /* ptr.x = leftpoint;
- ptr.y = toppoint; */
- } else { /* end picture at lower left */
- /* ptr.x = leftpoint;
- ptr.y = bottompoint; */
- printf(".sp \\n(g2u\n");
- }
-
- /* tmove(&ptr); */ /* restore default line parameters */
-
- /* restore everything to the way it was before the .GS, then put */
- /* out the `.GE' line from user */
-
- /* printf("\\D't %du'\\D's %du'\n", DEFTHICK, DEFSTYLE); */
- /* groff doesn't understand the \Ds command */
-
- printf("\\D't %du'\n", DEFTHICK);
- if (flyback) /* make sure we end up at top of */
- printf(".sp -1\n"); /* picture if `flying back' */
- if (stipple) /* restore stipple to previous */
- printf(".st\n");
- printf(".br\n"
- ".ft \\n(g3\n"
- ".ps \\n(g4\n"
- "%s", inputline);
- } else
- interpret(inputline); /* take commands from the input file */
- } while (!done);
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: savestate ( )
- |
- | Results: all the current scaling / font size / font name / thickness
- | / pointscale settings are saved to be the defaults. Scaled
- | point sizes are NOT saved. The scaling is done each time a
- | new picture is started.
- |
- | Side Efct: scale, and def* are modified.
- *----------------------------------------------------------------------------*/
-
-void
-savestate()
-{
- register int i;
-
- for (i = 0; i < STYLES; i++) /* line thickness defaults */
- defthick[i] = thick[i];
- for (i = 0; i < FONTS; i++) /* font name defaults */
- deffont[i] = tfont[i];
- for (i = 0; i < SIZES; i++) /* font size defaults */
- defsize[i] = tsize[i];
- for (i = 0; i <= NSTIPPLES; i++) /* stipple font file default indices */
- defstipple_index[i] = stipple_index[i];
-
- defstipple = stipple; /* if stipple has been set, it's remembered */
- scale *= xscale; /* default scale of individual pictures */
- defpoint = pointscale; /* flag for scaling pointsizes from x factors */
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: savebounds (x_coordinate, y_coordinate)
- |
- | Results: Keeps track of the maximum and minimum extent of a picture
- | in the global variables: left-, right-, top- and
- | bottompoint. `savebounds' assumes that the points have been
- | oriented to the correct direction. No scaling has taken
- | place, though.
- *----------------------------------------------------------------------------*/
-
-void
-savebounds(float x,
- float y)
-{
- if (x < leftpoint)
- leftpoint = x;
- if (x > rightpoint)
- rightpoint = x;
- if (y < toppoint)
- toppoint = y;
- if (y > bottompoint)
- bottompoint = y;
-}
-
-
-/*----------------------------------------------------------------------------*
- | Routine: interpret (character_string)
- |
- | Results: Commands are taken from the input string and performed.
- | Commands are separated by the endofline, and are of the
- | format:
- | string1 string2
- |
- | where string1 is the command and string2 is the argument.
- |
- | Side Efct: Font and size strings, plus the gremlin file name and the
- | width and height variables are set by this routine.
- *----------------------------------------------------------------------------*/
-
-void
-interpret(char *line)
-{
- char str1[MAXINLINE];
- char str2[MAXINLINE];
- register char *chr;
- register int i;
- double par;
-
- str2[0] = '\0';
- sscanf(line, "%80s%80s", &str1[0], &str2[0]);
- for (chr = &str1[0]; *chr; chr++) /* convert command to */
- if (isupper(*chr))
- *chr = tolower(*chr); /* lower case */
-
- switch (str1[0]) {
-
- case '1':
- case '2': /* font sizes */
- case '3':
- case '4':
- i = atoi(str2);
- if (i > 0 && i < 1000)
- tsize[str1[0] - '1'] = i;
- else
- error("bad font size value at line %1", linenum);
- break;
-
- case 'r': /* roman */
- if (str2[0] < '0')
- goto nofont;
- tfont[0] = (char *) malloc(strlen(str2) + 1);
- strcpy(tfont[0], str2);
- break;
-
- case 'i': /* italics */
- if (str2[0] < '0')
- goto nofont;
- tfont[1] = (char *) malloc(strlen(str2) + 1);
- strcpy(tfont[1], str2);
- break;
-
- case 'b': /* bold */
- if (str2[0] < '0')
- goto nofont;
- tfont[2] = (char *) malloc(strlen(str2) + 1);
- strcpy(tfont[2], str2);
- break;
-
- case 's': /* special */
- if (str1[1] == 'c')
- goto scalecommand; /* or scale */
-
- if (str2[0] < '0') {
- nofont:
- error("no fontname specified in line %1", linenum);
- break;
- }
- if (str1[1] == 't')
- goto stipplecommand; /* or stipple */
-
- tfont[3] = (char *) malloc(strlen(str2) + 1);
- strcpy(tfont[3], str2);
- break;
-
- case 'l': /* l */
- if (isdigit(str1[1])) { /* set stipple index */
- int index = atoi(str1 + 1), val;
-
- if (index < 0 || index > NSTIPPLES) {
- error("bad stipple number %1 at line %2", index, linenum);
- break;
- }
- if (!defstipple_index)
- defstipple_index = other_stipple_index;
- val = atoi(str2);
- if (val >= 0 && val < 256)
- stipple_index[index] = val;
- else
- error("bad stipple index value at line %1", linenum);
- break;
- }
-
- stipplecommand: /* set stipple name */
- stipple = (char *) malloc(strlen(str2) + 1);
- strcpy(stipple, str2);
- /* if its a `known' font (currently only `cf'), set indicies */
- if (strcmp(stipple, "cf") == 0)
- defstipple_index = cf_stipple_index;
- else
- defstipple_index = other_stipple_index;
- for (i = 0; i <= NSTIPPLES; i++)
- stipple_index[i] = defstipple_index[i];
- break;
-
- case 'a': /* text adjust */
- par = atof(str2);
- switch (str1[1]) {
- case '1':
- adj1 = par;
- break;
- case '2':
- adj2 = par;
- break;
- case '3':
- adj3 = par;
- break;
- case '4':
- adj4 = par;
- break;
- default:
- error("bad adjust command at line %1", linenum);
- break;
- }
- break;
-
- case 't': /* thick */
- thick[2] = defthick[0] * atof(str2);
- break;
-
- case 'm': /* medium */
- thick[5] = defthick[0] * atof(str2);
- break;
-
- case 'n': /* narrow */
- thick[0] = thick[1] = thick[3] = thick[4] =
- defthick[0] * atof(str2);
- break;
-
- case 'x': /* x */
- scalecommand: /* scale */
- par = atof(str2);
- if (par > 0.0)
- xscale *= par;
- else
- error("illegal scale value on line %1", linenum);
- break;
-
- case 'f': /* file */
- strcpy(gremlinfile, str2);
- break;
-
- case 'w': /* width */
- width = atof(str2);
- if (width < 0.0)
- width = -width;
- break;
-
- case 'h': /* height */
- height = atof(str2);
- if (height < 0.0)
- height = -height;
- break;
-
- case 'd': /* defaults */
- setdefault = 1;
- break;
-
- case 'p': /* pointscale */
- if (strcmp("off", str2))
- pointscale = 1;
- else
- pointscale = 0;
- break;
-
- default:
- error("unknown command `%1' on line %2", str1, linenum);
- exit(8);
- break;
- };
-}
-
-
-/*
- * return TRUE if picture contains a polygon
- * otherwise FALSE
- */
-
-int
-has_polygon(register ELT *elist)
-{
- while (!DBNullelt(elist)) {
- if (elist->type == POLYGON)
- return (1);
- elist = DBNextElt(elist);
- }
-
- return (0);
-}
-
-/* EOF */
diff --git a/contrib/groff/src/preproc/html/Makefile.sub b/contrib/groff/src/preproc/html/Makefile.sub
deleted file mode 100644
index 9d5045a97b31..000000000000
--- a/contrib/groff/src/preproc/html/Makefile.sub
+++ /dev/null
@@ -1,7 +0,0 @@
-PROG=pre-grohtml
-# MAN1=pre-grohtml.n
-MAN1=
-XLIBS=$(LIBGROFF)
-OBJS=pre-html.o pushbackbuffer.o
-CCSRCS=$(srcdir)/pre-html.cc $(srcdir)/pushbackbuffer.cc
-NAMEPREFIX=$(g)
diff --git a/contrib/groff/src/preproc/html/pre-html.cc b/contrib/groff/src/preproc/html/pre-html.cc
deleted file mode 100644
index 8357dd6e4603..000000000000
--- a/contrib/groff/src/preproc/html/pre-html.cc
+++ /dev/null
@@ -1,1160 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Gaius Mulley (gaius@glam.ac.uk).
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define PREHTMLC
-
-#include <stdio.h>
-#include <signal.h>
-#include <ctype.h>
-#include <string.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "stringclass.h"
-#include "posix.h"
-#include "defs.h"
-
-#include <errno.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef _POSIX_VERSION
-#include <sys/wait.h>
-#define PID_T pid_t
-#else /* not _POSIX_VERSION */
-#define PID_T int
-#endif /* not _POSIX_VERSION */
-
-extern char *strerror();
-
-#include "pre-html.h"
-#include "pushbackbuffer.h"
-#include "html-strings.h"
-
-#define POSTSCRIPTRES 72000 // maybe there is a better way to find this? --fixme--
-#define DEFAULT_IMAGE_RES 80 // 80 pixels per inch resolution
-#define DEFAULT_VERTICAL_OFFSET 45 // DEFAULT_VERTICAL_OFFSET/72 of an inch
-#define IMAGE_BOARDER_PIXELS 0
-#define MAX_WIDTH 8 // inches
-#define INLINE_LEADER_CHAR '\\'
-
-#define TRANSPARENT "-background \"#FFF\" -transparent \"#FFF\""
-
-#if 0
-# define DEBUGGING
-# define DEBUG_HTML
-#endif
-
-#if !defined(TRUE)
-# define TRUE (1==1)
-#endif
-#if !defined(FALSE)
-# define FALSE (1==0)
-#endif
-
-void stop() {}
-
-typedef enum {CENTERED, LEFT, RIGHT, INLINE} IMAGE_ALIGNMENT;
-
-static int stdoutfd = 1; // output file descriptor - normally 1 but might move
- // -1 means closed
-static int copyofstdoutfd =-1; // a copy of stdout, so we can restore stdout when
- // writing to post-html
-static char *psFileName = 0; // name of postscript file
-static char *regionFileName = 0; // name of file containing all image regions
-static char *imagePageStem = 0; // stem of all files containing page images
-static char *image_device = "pnmraw";
-static int image_res = DEFAULT_IMAGE_RES;
-static int vertical_offset= DEFAULT_VERTICAL_OFFSET;
-static char *image_template = 0; // image template filename
-static int troff_arg = 0; // troff arg index
-static char *command_prefix = 0; // optional prefix for some installations.
-static char *troff_command = 0;
-#if defined(DEBUGGING)
-static int debug = FALSE;
-static char *troffFileName = 0; // output of pre-html output which is sent to troff -Tps
-static char *htmlFileName = 0; // output of pre-html output which is sent to troff -Thtml
-#endif
-
-
-/*
- * Images are generated via postscript, gs and the pnm utilities.
- */
-
-#define IMAGE_DEVICE "-Tps"
-
-/*
- * prototypes
- */
-static int do_file(const char *filename);
-
-/*
- * sys_fatal - writes a fatal error message. Taken from src/roff/groff/pipeline.c
- */
-
-void sys_fatal (const char *s)
-{
- fprintf(stderr, "%s: %s: %s", program_name, s, strerror(errno));
-}
-
-/*
- * the class and methods for retaining ascii text
- */
-
-struct char_block {
- enum { SIZE = 256 };
- char buffer[SIZE];
- int used;
- char_block *next;
-
- char_block();
-};
-
-/*
- * char_block - constructor, sets the, used, and, next, fields to zero.
- */
-
-char_block::char_block()
-: used(0), next(0)
-{
-}
-
-class char_buffer {
-public:
- char_buffer();
- ~char_buffer();
- int read_file(FILE *fp);
- int do_html(int argc, char *argv[]);
- int do_image(int argc, char *argv[]);
- void write_file_html(void);
- void write_file_troff(void);
- void write_upto_newline (char_block **t, int *i, int is_html);
- int can_see(char_block **t, int *i, char *string);
- int skip_spaces(char_block **t, int *i);
- void skip_to_newline(char_block **t, int *i);
-private:
- char_block *head;
- char_block *tail;
-};
-
-/*
- * char_buffer - constructor
- */
-
-char_buffer::char_buffer()
-: head(0), tail(0)
-{
-}
-
-/*
- * char_buffer - deconstructor, throws aways the whole buffer list.
- */
-
-char_buffer::~char_buffer()
-{
- while (head != 0) {
- char_block *temp = head;
- head = head->next;
- delete temp;
- }
-}
-
-/*
- * read_file - read in a complete file, fp, placing the contents inside char_blocks.
- */
-
-int char_buffer::read_file (FILE *fp)
-{
- int i=0;
- unsigned int old_used;
- int n;
-
- while (! feof(fp)) {
- if (tail == 0) {
- tail = new char_block;
- head = tail;
- } else {
- if (tail->used == char_block::SIZE) {
- tail->next = new char_block;
- tail = tail->next;
- }
- }
- // at this point we have a tail which is ready for the next SIZE bytes of the file
-
- n = fread(tail->buffer, sizeof(char), char_block::SIZE-tail->used, fp);
- if (n <= 0) {
- // error
- return( 0 );
- } else {
- tail->used += n*sizeof(char);
- }
- }
- return( 1 );
-}
-
-/*
- * writeNbytes - writes n bytes to stdout.
- */
-
-static void writeNbytes (char *s, int l)
-{
- int n=0;
- int r;
-
- while (n<l) {
- r = write(stdoutfd, s, l-n);
- if (r<0) {
- sys_fatal("write");
- }
- n += r;
- s += r;
- }
-}
-
-/*
- * writeString - writes a string to stdout.
- */
-
-static void writeString (char *s)
-{
- writeNbytes(s, strlen(s));
-}
-
-/*
- * makeFileName - creates the image filename template.
- */
-
-void makeFileName ()
-{
- char buffer[8192];
-
- sprintf(buffer, "grohtml-%d", (int)getpid());
- strcat(buffer, "-%d");
- image_template = (char *)malloc(strlen(buffer)+1);
- strcpy(image_template, buffer);
-}
-
-/*
- * write_end_image - ends the image. It writes out the image extents if we are using -Tps.
- */
-
-static void write_end_image (int is_html)
-{
- if (is_html) {
- /*
- * emit image name and enable output
- */
- writeString("\\O2\\O1\\O4\n");
- } else {
- /*
- * postscript, therefore emit image boundaries
- */
- writeString("\\O2\\O4\n");
- }
-}
-
-/*
- * write_start_image - writes the troff which will:
- *
- * (i) disable html output for the following image
- * (ii) reset the max/min x/y registers during postscript
- * rendering.
- */
-
-static void write_start_image (IMAGE_ALIGNMENT pos, int is_html)
-{
- if (pos == INLINE) {
- writeString("\\O3\\O5'");
- writeString(image_template); writeString(".png'");
- } else {
- writeString(".begin \\{\\\n");
- switch (pos) {
-
- case LEFT:
- writeString(". image l ");
- break;
- case RIGHT:
- writeString(". image r ");
- break;
- case CENTERED:
- default:
- writeString(". image c ");
- }
- writeString(image_template); writeString(".png\n");
- if (! is_html) {
- writeString(".bp\n");
- writeString(".tl ''''\n");
- }
- writeString("\\}\n");
- }
- if (is_html) {
- writeString("\\O0\n");
- } else {
- // reset min/max registers
- writeString("\\O0\\O1\n");
- }
-}
-
-/*
- * write_upto_newline - writes the contents of the buffer until a newline is seen.
- * It checks for HTML_IMAGE_INLINE_BEGIN and HTML_IMAGE_INLINE_END
- * and if they are present it processes them.
- */
-
-void char_buffer::write_upto_newline (char_block **t, int *i, int is_html)
-{
- int j=*i;
-
- if (*t) {
- while ((j < (*t)->used) && ((*t)->buffer[j] != '\n') &&
- ((*t)->buffer[j] != INLINE_LEADER_CHAR)) {
- j++;
- }
- if ((j < (*t)->used) && ((*t)->buffer[j] == '\n')) {
- j++;
- }
- writeNbytes((*t)->buffer+(*i), j-(*i));
- if ((*t)->buffer[j] == INLINE_LEADER_CHAR) {
- if (can_see(t, &j, HTML_IMAGE_INLINE_BEGIN))
- write_start_image(INLINE, is_html);
- else if (can_see(t, &j, HTML_IMAGE_INLINE_END))
- write_end_image(is_html);
- else {
- if (j < (*t)->used) {
- *i = j;
- j++;
- writeNbytes((*t)->buffer+(*i), j-(*i));
- }
- }
- }
- if (j == (*t)->used) {
- *i = 0;
- if ((*t)->buffer[j-1] == '\n') {
- *t = (*t)->next;
- } else {
- *t = (*t)->next;
- write_upto_newline(t, i, is_html);
- }
- } else {
- // newline was seen
- *i = j;
- }
- }
-}
-
-/*
- * can_see - returns TRUE if we can see string in t->buffer[i] onwards
- */
-
-int char_buffer::can_see (char_block **t, int *i, char *string)
-{
- int j = 0;
- int l = strlen(string);
- int k = *i;
- char_block *s = *t;
-
- while (s) {
- while ((k<s->used) && (j<l) && (s->buffer[k] == string[j])) {
- j++;
- k++;
- }
- if (j == l) {
- *i = k;
- *t = s;
- return( TRUE );
- } else if ((k<s->used) && (s->buffer[k] != string[j])) {
- return( FALSE );
- }
- s = s->next;
- k = 0;
- }
- return( FALSE );
-}
-
-/*
- * skip_spaces - returns TRUE if we have not run out of data.
- * It also consumes spaces.
- */
-
-int char_buffer::skip_spaces(char_block **t, int *i)
-{
- char_block *s = *t;
- int k = *i;
-
- while (s) {
- while ((k<s->used) && (isspace(s->buffer[k]))) {
- k++;
- }
- if (k == s->used) {
- k = 0;
- s = s->next;
- } else {
- *i = k;
- return( TRUE );
- }
- }
- return( FALSE );
-}
-
-/*
- * skip_to_newline - skips all characters until a newline is seen.
- * The newline is also consumed.
- */
-
-void char_buffer::skip_to_newline (char_block **t, int *i)
-{
- int j=*i;
-
- if (*t) {
- while ((j < (*t)->used) && ((*t)->buffer[j] != '\n')) {
- j++;
- }
- if ((j < (*t)->used) && ((*t)->buffer[j] == '\n')) {
- j++;
- }
- if (j == (*t)->used) {
- *i = 0;
- if ((*t)->buffer[j-1] == '\n') {
- *t = (*t)->next;
- } else {
- *t = (*t)->next;
- skip_to_newline(t, i);
- }
- } else {
- // newline was seen
- *i = j;
- }
- }
-}
-
-/*
- * write_file_troff - writes the buffer to stdout (troff).
- */
-
-void char_buffer::write_file_troff (void)
-{
- char_block *t=head;
- int r;
- int i=0;
-
- if (t != 0) {
- do {
- /*
- * remember to check the shortest string last
- */
- if (can_see(&t, &i, HTML_IMAGE_END)) {
- write_end_image(FALSE);
- skip_to_newline(&t, &i);
- } else if (can_see(&t, &i, HTML_IMAGE_LEFT)) {
- write_start_image(LEFT, FALSE);
- skip_to_newline(&t, &i);
- } else if (can_see(&t, &i, HTML_IMAGE_RIGHT)) {
- write_start_image(RIGHT, FALSE);
- skip_to_newline(&t, &i);
- } else if (can_see(&t, &i, HTML_IMAGE_CENTERED)) {
- write_start_image(CENTERED, FALSE);
- skip_to_newline(&t, &i);
- } else {
- write_upto_newline(&t, &i, FALSE);
- }
- } while (t != 0);
- }
- if (close(stdoutfd) < 0)
- sys_fatal("close");
-
- // now we grab fd=1 so that the next pipe cannot use fd=1
- if (stdoutfd == 1) {
- if (dup(2) != stdoutfd) {
- sys_fatal("dup failed to use fd=1");
- }
- }
-}
-
-/*
- * the image class remembers the position of all images in the postscript file
- * and assigns names for each image.
- */
-
-struct imageItem {
- imageItem *next;
- int X1;
- int Y1;
- int X2;
- int Y2;
- char *imageName;
- int resolution;
- int maxx;
- int pageNo;
-
- imageItem (int x1, int y1, int x2, int y2, int page, int res, int max_width, char *name);
- ~imageItem ();
-};
-
-/*
- * imageItem - constructor
- */
-
-imageItem::imageItem (int x1, int y1, int x2, int y2, int page, int res, int max_width, char *name)
-{
- X1 = x1;
- Y1 = y1;
- X2 = x2;
- Y2 = y2;
- pageNo = page;
- resolution = res;
- maxx = max_width;
- imageName = name;
- next = 0;
-}
-
-/*
- * imageItem - deconstructor
- */
-
-imageItem::~imageItem ()
-{
-}
-
-/*
- * imageList - class containing a list of imageItems.
- */
-
-class imageList {
-private:
- imageItem *head;
- imageItem *tail;
- int count;
-public:
- imageList();
- ~imageList();
- void add(int x1, int y1, int x2, int y2, int page, int res, int maxx, char *name);
-};
-
-/*
- * imageList - constructor.
- */
-
-imageList::imageList ()
- : head(0), tail(0), count(0)
-{
-}
-
-/*
- * imageList - deconstructor.
- */
-
-imageList::~imageList ()
-{
- while (head != 0) {
- imageItem *i = head;
- head = head->next;
- delete i;
- }
-}
-
-/*
- * createAllPages - creates a set of images, one per page.
- */
-
-static void createAllPages (void)
-{
- char buffer[4096];
-
- sprintf(buffer,
- "echo showpage | gs -q -dSAFER -sDEVICE=%s -r%d -sOutputFile=%s%%d %s - > /dev/null 2>&1 \n",
- image_device,
- image_res,
- imagePageStem,
- psFileName);
-#if defined(DEBUGGING)
- fwrite(buffer, sizeof(char), strlen(buffer), stderr);
- fflush(stderr);
-#endif
- system(buffer);
-}
-
-/*
- * removeAllPages - removes all page images.
- */
-
-static void removeAllPages (void)
-{
-#if !defined(DEBUGGING)
- char buffer[4096];
- int i=1;
-
- do {
- sprintf(buffer, "%s%d", imagePageStem, i);
- i++;
- } while (remove(buffer) == 0);
-#endif
-}
-
-/*
- * abs - returns the absolute value.
- */
-
-int abs (int x)
-{
- if (x < 0) {
- return( -x );
- } else {
- return( x );
- }
-}
-
-/*
- * min - returns the minimum of two numbers.
- */
-
-int min (int x, int y)
-{
- if (x < y) {
- return( x );
- } else {
- return( y );
- }
-}
-
-/*
- * max - returns the maximum of two numbers.
- */
-
-int max (int x, int y)
-{
- if (x > y) {
- return( x );
- } else {
- return( y );
- }
-}
-
-/*
- * createImage - generates a minimal png file from the set of page images.
- */
-
-static void createImage (imageItem *i)
-{
- if (i->X1 != -1) {
- char buffer[4096];
- int x1 = max(min(i->X1, i->X2)*image_res/POSTSCRIPTRES-1*IMAGE_BOARDER_PIXELS, 0);
- int y1 = max((image_res*vertical_offset/72)+min(i->Y1, i->Y2)*image_res/POSTSCRIPTRES-IMAGE_BOARDER_PIXELS, 0);
- int x2 = max(i->X1, i->X2)*image_res/POSTSCRIPTRES+1*IMAGE_BOARDER_PIXELS;
- int y2 = (image_res*vertical_offset/72)+max(i->Y1, i->Y2)*image_res/POSTSCRIPTRES+1*IMAGE_BOARDER_PIXELS;
-
- sprintf(buffer,
- "pnmcut %d %d %d %d < %s%d | pnmtopng %s > %s \n",
- x1, y1, x2-x1+1, y2-y1+1,
- imagePageStem,
- i->pageNo,
- TRANSPARENT,
- i->imageName);
-#if defined(DEBUGGING)
- fprintf(stderr, buffer);
-#endif
- system(buffer);
-#if defined(DEBUGGING)
- } else {
- fprintf(stderr, "ignoring image as x1 coord is -1\n");
- fflush(stderr);
-#endif
- }
-}
-
-/*
- * add - an image description to the imageList.
- */
-
-void imageList::add (int x1, int y1, int x2, int y2, int page, int res, int maxx, char *name)
-{
- imageItem *i = new imageItem(x1, y1, x2, y2, page, res, maxx, name);
-
- if (head == 0) {
- head = i;
- tail = i;
- } else {
- tail->next = i;
- tail = i;
- }
- createImage(i);
-}
-
-static imageList listOfImages; // list of images defined by the region file.
-
-/*
- * write_file_html - writes the buffer to stdout (troff).
- * It writes out the file replacing template image names with
- * actual image names.
- */
-
-void char_buffer::write_file_html (void)
-{
- char_block *t =head;
- char *name;
- int i=0;
-
- if (t != 0) {
- stop();
- do {
- /*
- * remember to check the shortest string last
- */
- if (can_see(&t, &i, HTML_IMAGE_END)) {
- write_end_image(TRUE);
- skip_to_newline(&t, &i);
- } else if (can_see(&t, &i, HTML_IMAGE_LEFT)) {
- write_start_image(LEFT, TRUE);
- skip_to_newline(&t, &i);
- } else if (can_see(&t, &i, HTML_IMAGE_RIGHT)) {
- write_start_image(RIGHT, TRUE);
- skip_to_newline(&t, &i);
- } else if (can_see(&t, &i, HTML_IMAGE_CENTERED)) {
- stop();
- write_start_image(CENTERED, TRUE);
- skip_to_newline(&t, &i);
- } else {
- write_upto_newline(&t, &i, TRUE);
- }
- } while (t != 0);
- }
- if (close(stdoutfd) < 0)
- sys_fatal("close");
-
- // now we grab fd=1 so that the next pipe cannot use fd=1
- if (stdoutfd == 1) {
- if (dup(2) != stdoutfd) {
- sys_fatal("dup failed to use fd=1");
- }
- }
-}
-
-/*
- * generateImages - parses the region file and generates images
- * from the postscript file. The region file
- * contains the x1,y1 x2,y2 extents of each
- * image.
- */
-
-static void generateImages (char *regionFileName)
-{
- pushBackBuffer *f=new pushBackBuffer(regionFileName);
- char ch;
-
- while (f->putPB(f->getPB()) != eof) {
- if (f->isString("grohtml-info:page")) {
- int page = f->readInt();
- int x1 = f->readInt();
- int y1 = f->readInt();
- int x2 = f->readInt();
- int y2 = f->readInt();
- int maxx = max(f->readInt(), MAX_WIDTH*image_res);
- char *name = f->readString();
- int res = POSTSCRIPTRES; // --fixme-- prefer (f->readInt()) providing that troff can discover the value
- listOfImages.add(x1, y1, x2, y2, page, res, maxx, name);
- while ((f->putPB(f->getPB()) != '\n') &&
- (f->putPB(f->getPB()) != eof)) {
- ch = f->getPB();
- }
- if (f->putPB(f->getPB()) == '\n') {
- ch = f->getPB();
- }
- } else {
- /*
- * write any error messages out to the user
- */
- fputc(f->getPB(), stderr);
- }
- }
-}
-
-/*
- * replaceFd - replace a file descriptor, was, with, willbe.
- */
-
-static void replaceFd (int was, int willbe)
-{
- int dupres;
-
- if (was != willbe) {
- if (close(was)<0) {
- sys_fatal("close");
- }
- dupres = dup(willbe);
- if (dupres != was) {
- sys_fatal("dup");
- fprintf(stderr, "trying to replace fd=%d with %d dup used %d\n", was, willbe, dupres);
- if (willbe == 1) {
- fprintf(stderr, "likely that stdout should be opened before %d\n", was);
- }
- exit(1);
- }
- if (close(willbe) < 0) {
- sys_fatal("close");
- }
- }
-}
-
-/*
- * waitForChild - waits for child, pid, to exit.
- */
-
-static void waitForChild (PID_T pid)
-{
- PID_T waitpd;
- int status;
-
- waitpd = wait(&status);
- if (waitpd != pid)
- sys_fatal("wait");
-}
-
-/*
- * alterDeviceTo - if toImage is set then the arg list is altered to include
- * IMAGE_DEVICE and we invoke groff rather than troff.
- * else
- * set -Thtml and troff
- */
-
-static void alterDeviceTo (int argc, char *argv[], int toImage)
-{
- int i=0;
-
- if (toImage) {
- while (i < argc) {
- if (strcmp(argv[i], "-Thtml") == 0) {
- argv[i] = IMAGE_DEVICE;
- }
- i++;
- }
- argv[troff_arg] = "groff"; /* rather than troff */
- } else {
- while (i < argc) {
- if (strcmp(argv[i], IMAGE_DEVICE) == 0) {
- argv[i] = "-Thtml";
- }
- i++;
- }
- argv[troff_arg] = troff_command; /* use troff */
- }
-}
-
-/*
- * do_html - sets the troff number htmlflip and
- * writes out the buffer to troff -Thtml
- */
-
-int char_buffer::do_html(int argc, char *argv[])
-{
- int pdes[2];
- PID_T pid;
-
- if (pipe(pdes) < 0)
- sys_fatal("pipe");
-
- alterDeviceTo(argc, argv, 0);
- argv += troff_arg; // skip all arguments up to troff/groff
- argc -= troff_arg;
-
-#if defined(DEBUG_HTML)
- write_file_html();
- writeString("--------------- troff --------------------------\n");
- write_file_troff();
-#else
- pid = fork();
- if (pid < 0)
- sys_fatal("fork");
-
- if (pid == 0) {
- // child
- replaceFd(0, pdes[0]);
- // close end we are not using
- if (close(pdes[1])<0)
- sys_fatal("close");
- replaceFd(1, copyofstdoutfd); // and restore stdout
-
- execvp(argv[0], argv);
- error("couldn't exec %1: %2", argv[0], strerror(errno), (char *)0);
- fflush(stderr); /* just in case error() doesn't */
- exit(1);
- } else {
- // parent
-
-#if defined(DEBUGGING)
- /*
- * slight security risk so only enabled if compiled with defined(DEBUGGING)
- */
- if (debug) {
- replaceFd(1, creat(htmlFileName, S_IWUSR|S_IRUSR));
- write_file_html();
- }
-#endif
- replaceFd(1, pdes[1]);
- // close end we are not using
- if (close(pdes[0])<0)
- sys_fatal("close");
-
- write_file_html();
- waitForChild(pid);
- }
-#endif
- return( 0 );
-}
-
-/*
- * addps4html - appends -rps4html=1 onto the command list for troff.
- */
-
-char **addps4html (int argc, char *argv[])
-{
- char **new_argv = (char **)malloc((argc+2)*sizeof(char *));
- int i=0;
-
- while (i<argc) {
- new_argv[i] = argv[i];
- i++;
- }
- new_argv[argc] = "-rps4html=1";
- argc++;
- new_argv[argc] = NULL;
- return( new_argv );
-}
-
-/*
- * do_image - writes out the buffer to troff -Tps
- */
-
-int char_buffer::do_image(int argc, char *argv[])
-{
- PID_T pid;
- int pdes[2];
-
- if (pipe(pdes) < 0)
- sys_fatal("pipe");
-
- alterDeviceTo(argc, argv, 1);
- argv += troff_arg; // skip all arguments up to troff/groff
- argc -= troff_arg;
- argv = addps4html(argc, argv);
- argc++;
-
- pid = fork();
- if (pid == 0) {
- // child
-
- int psFd = creat(psFileName, S_IWUSR|S_IRUSR);
- int regionFd = creat(regionFileName, S_IWUSR|S_IRUSR);
-
- replaceFd(1, psFd);
- replaceFd(0, pdes[0]);
- replaceFd(2, regionFd);
-
- // close end we are not using
- if (close(pdes[1])<0)
- sys_fatal("close");
-
- execvp(argv[0], argv);
- error("couldn't exec %1: %2", argv[0], strerror(errno), (char *)0);
- fflush(stderr); /* just in case error() doesn't */
- exit(1);
- } else {
- // parent
-
-#if defined(DEBUGGING)
- /*
- * slight security risk so only enabled if compiled with defined(DEBUGGING)
- */
- if (debug) {
- replaceFd(1, creat(troffFileName, S_IWUSR|S_IRUSR));
- write_file_troff();
- }
-#endif
- replaceFd(1, pdes[1]);
- write_file_troff();
- waitForChild(pid);
- }
- return( 0 );
-}
-
-static char_buffer inputFile;
-
-
-/*
- * usage - emit usage arguments.
- */
-
-void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s troffname [-P-o vertical_image_offset] [-P-i image_resolution] [troff flags] [files]\n", program_name);
- fprintf(stream, " vertical_image_offset (default %d/72 of an inch)\n", vertical_offset);
- fprintf(stream, " image_resolution (default %d) pixels per inch\n", image_res);
-}
-
-/*
- * scanArguments - scans for -P-i and -P-o arguments.
- */
-
-int scanArguments (int argc, char **argv)
-{
- int i=1;
-
- while (i<argc) {
- if (strncmp(argv[i], "-i", 2) == 0) {
- image_res = atoi((char *)(argv[i]+2));
- } else if (strncmp(argv[i], "-o", 2) == 0) {
- vertical_offset = atoi((char *)(argv[i]+2));
- } else if ((strcmp(argv[i], "-v") == 0)
- || (strcmp(argv[i], "--version") == 0)) {
- extern const char *Version_string;
- printf("GNU pre-grohtml (groff) version %s\n", Version_string);
- exit(0);
- } else if ((strcmp(argv[i], "-h") == 0)
- || (strcmp(argv[i], "--help") == 0)
- || (strcmp(argv[i], "-?") == 0)) {
- usage(stdout);
- exit(0);
- } else if (strcmp(argv[i], "troff") == 0) {
- /* remember troff argument number */
- troff_arg = i;
-#if defined(DEBUGGING)
- } else if (strcmp(argv[i], "-d") == 0) {
- debug = TRUE;
-#endif
- } else if (argv[i][0] != '-') {
- return( i );
- }
- i++;
- }
- return( argc );
-}
-
-/*
- * makeTempFiles - name the temporary files
- */
-
-static void makeTempFiles (void)
-{
-#if defined(DEBUGGING)
- psFileName = "/tmp/prehtml-ps";
- regionFileName = "/tmp/prehtml-region";
- imagePageStem = "/tmp/prehtml-page";
- troffFileName = "/tmp/prehtml-troff";
- htmlFileName = "/tmp/prehtml-html";
-#else
- psFileName = mktemp(xtmptemplate("-ps-"));
- regionFileName = mktemp(xtmptemplate("-regions-"));
- imagePageStem = mktemp(xtmptemplate("-page-"));
-#endif
-}
-
-/*
- * removeTempFiles - remove the temporary files
- */
-
-static void removeTempFiles (void)
-{
-#if !defined(DEBUGGING)
- remove(psFileName);
- remove(regionFileName);
-#endif
-}
-
-/*
- * findPrefix - finds the optional prefix to the groff utilities.
- * It also builds the 'troff' executable name.
- */
-
-static void findPrefix (void)
-{
- command_prefix = getenv("GROFF_COMMAND_PREFIX");
- if (!command_prefix)
- command_prefix = PROG_PREFIX;
- troff_command = (char *)malloc(strlen("troff")+strlen(command_prefix)+1);
- strcpy(troff_command, command_prefix);
- strcat(troff_command, "troff");
-}
-
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- int i;
- int found=0;
- int ok=1;
-
- findPrefix();
- makeFileName();
- i = scanArguments(argc, argv);
- while (i < argc) {
- if (argv[i][0] != '-') {
- /* found source file */
- ok = do_file(argv[i]);
- if (! ok) {
- return( 0 );
- }
- found = 1;
- }
- i++;
- }
-
- copyofstdoutfd=dup(stdoutfd);
-
- if (! found) {
- do_file("-");
- }
- makeTempFiles();
- ok = inputFile.do_image(argc, argv);
- if (ok == 0) {
- createAllPages();
- generateImages(regionFileName);
- ok = inputFile.do_html(argc, argv);
- removeAllPages();
- }
- removeTempFiles();
- return ok;
-}
-
-static int do_file(const char *filename)
-{
- FILE *fp;
-
- current_filename = filename;
- if (strcmp(filename, "-") == 0) {
- fp = stdin;
- } else {
- fp = fopen(filename, "r");
- if (fp == 0) {
- error("can't open `%1': %2", filename, strerror(errno));
- return 0;
- }
- }
-
- if (inputFile.read_file(fp)) {
- }
-
- if (fp != stdin)
- fclose(fp);
- current_filename = 0;
- return 1;
-}
diff --git a/contrib/groff/src/preproc/html/pre-html.h b/contrib/groff/src/preproc/html/pre-html.h
deleted file mode 100644
index f9a590c17b7e..000000000000
--- a/contrib/groff/src/preproc/html/pre-html.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Gaius Mulley (gaius@glam.ac.uk).
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/*
- * defines functions implemented within pre-html.c
- */
-
-#if !defined(PREHTMLH)
-# define PREHTMLH
-# if defined(PREHTMLC)
-# define EXTERN
-# else
-# define EXTERN extern
-# endif
-
-
-extern void sys_fatal (const char *s);
-
-#undef EXTERN
-#endif
diff --git a/contrib/groff/src/preproc/html/pushbackbuffer.cc b/contrib/groff/src/preproc/html/pushbackbuffer.cc
deleted file mode 100644
index 1d380f4da942..000000000000
--- a/contrib/groff/src/preproc/html/pushbackbuffer.cc
+++ /dev/null
@@ -1,337 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Gaius Mulley (gaius@glam.ac.uk).
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <signal.h>
-#include <ctype.h>
-#include <string.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "stringclass.h"
-#include "posix.h"
-
-#include <errno.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "pushbackbuffer.h"
-#include "pre-html.h"
-
-#if !defined(TRUE)
-# define TRUE (1==1)
-#endif
-
-#if !defined(FALSE)
-# define FALSE (1==0)
-#endif
-
-# define ERROR(X) (fprintf(stderr, "%s:%d error %s\n", __FILE__, __LINE__, X) && \
- (fflush(stderr)) && localexit(1))
-
-
-#define MAXPUSHBACKSTACK 4096 /* maximum number of character that can be pushed back */
-
-
-/*
- * constructor for pushBackBuffer
- */
-
-pushBackBuffer::pushBackBuffer (char *filename)
-{
- charStack = (char *)malloc(MAXPUSHBACKSTACK);
- if (charStack == 0) {
- sys_fatal("malloc");
- }
- stackPtr = 0; /* index to push back stack */
- debug = 0;
- verbose = 0;
- eofFound = FALSE;
- lineNo = 1;
- if (strcmp(filename, "") != 0) {
- stdIn = dup(0);
- close(0);
- if (open(filename, O_RDONLY) != 0) {
- sys_fatal("when trying to open file");
- } else {
- fileName = filename;
- }
- }
-}
-
-pushBackBuffer::~pushBackBuffer ()
-{
- int old;
-
- if (charStack != 0) {
- free(charStack);
- }
- close(0);
- /* restore stdin in file descriptor 0 */
- old = dup(stdIn);
- close(stdIn);
-}
-
-/*
- * localexit - wraps exit with a return code to aid the ERROR macro.
- */
-
-int localexit (int i)
-{
- exit(i);
- return( 1 );
-}
-
-/*
- * getPB - returns a character, possibly a pushed back character.
- */
-
-char pushBackBuffer::getPB (void)
-{
- if (stackPtr>0) {
- stackPtr--;
- return( charStack[stackPtr] );
- } else {
- char ch;
-
- if (read(0, &ch, 1) == 1) {
- if (verbose) {
- printf("%c", ch);
- }
- if (ch == '\n') {
- lineNo++;
- }
- return( ch );
- } else {
- eofFound = TRUE;
- return( eof );
- }
- }
-}
-
-/*
- * putPB - pushes a character onto the push back stack.
- * The same character is returned.
- */
-
-char pushBackBuffer::putPB (char ch)
-{
- if (stackPtr<MAXPUSHBACKSTACK) {
- charStack[stackPtr] = ch ;
- stackPtr++;
- } else {
- ERROR("max push back stack exceeded, increase MAXPUSHBACKSTACK constant");
- }
- return( ch );
-}
-
-/*
- * isWhite - returns TRUE if a white character is found. This character is NOT consumed.
- */
-
-static int isWhite (char ch)
-{
- return( (ch==' ') || (ch == '\t') || (ch == '\n') );
-}
-
-/*
- * skipToNewline - skips characters until a newline is seen.
- */
-
-void pushBackBuffer::skipToNewline (void)
-{
- char ch;
-
- while ((putPB(getPB()) != '\n') && (! eofFound)) {
- ch = getPB();
- }
-}
-
-/*
- * skipUntilToken - skips until a token is seen
- */
-
-void pushBackBuffer::skipUntilToken (void)
-{
- char ch;
-
- while ((isWhite(putPB(getPB())) || (putPB(getPB()) == '#')) && (! eofFound)) {
- ch = getPB();
- if (ch == '#') {
- skipToNewline();
- }
- }
-}
-
-/*
- * isString - returns TRUE if the string, s, matches the pushed back string.
- * if TRUE is returned then this string is consumed, otherwise it is
- * left alone.
- */
-
-int pushBackBuffer::isString (char *s)
-{
- int length=strlen(s);
- int i=0;
- int j;
-
- while ((i<length) && (putPB(getPB())==s[i])) {
- if (getPB() != s[i]) {
- ERROR("assert failed");
- }
- i++;
- }
- if (i==length) {
- return( TRUE );
- } else {
- i--;
- while (i>=0) {
- if (putPB(s[i]) != s[i]) {
- ERROR("assert failed");
- }
- i--;
- }
- }
- return( FALSE );
-}
-
-/*
- * isDigit - returns TRUE if the character, ch, is a digit.
- */
-
-static int isDigit (char ch)
-{
- return( ((ch>='0') && (ch<='9')) );
-}
-
-/*
- * isHexDigit - returns TRUE if the character, ch, is a hex digit.
- */
-
-static int isHexDigit (char ch)
-{
- return( (isDigit(ch)) || ((ch>='a') && (ch<='f')) );
-}
-
-/*
- * readInt - returns an integer from the input stream.
- */
-
-int pushBackBuffer::readInt (void)
-{
- int c =0;
- int i =0;
- int s =1;
- char ch=getPB();
-
- while (isWhite(ch)) {
- ch=getPB();
- }
- // now read integer
-
- if (ch == '-') {
- s = -1;
- ch = getPB();
- }
- while (isDigit(ch)) {
- i *= 10;
- if ((ch>='0') && (ch<='9')) {
- i += (int)(ch-'0');
- }
- ch = getPB();
- c++;
- }
- if (ch != putPB(ch)) {
- ERROR("assert failed");
- }
- return( i*s );
-}
-
-/*
- * convertToFloat - converts integers, a and b into a.b
- */
-
-static float convertToFloat (int a, int b)
-{
- int c=10;
- float f;
-
- while (b>c) {
- c *= 10;
- }
- f = ((float)a) + (((float)b)/((float)c));
- return( f );
-}
-
-/*
- * readNumber - returns a float representing the word just read.
- */
-
-float pushBackBuffer::readNumber (void)
-{
- int integer;
- int fraction;
- char ch;
- float f;
-
- integer = readInt();
- if (putPB(getPB()) == '.') {
- ch = getPB();
- fraction = readInt();
- f = convertToFloat(integer, fraction);
- return( f );
- } else {
- return( (float)integer );
- }
-}
-
-/*
- * readString - reads a string terminated by white space
- * and returns a malloced area of memory containing
- * a copy of the characters.
- */
-
-char *pushBackBuffer::readString (void)
-{
- char buffer[MAXPUSHBACKSTACK];
- char *string = 0;
- int i=0;
- char ch=getPB();
-
- while (isWhite(ch)) {
- ch=getPB();
- }
- while ((i < MAXPUSHBACKSTACK) && (! isWhite(ch)) && (! eofFound)) {
- buffer[i] = ch;
- i++;
- ch = getPB();
- }
- if (i < MAXPUSHBACKSTACK) {
- buffer[i] = (char)0;
- string = (char *)malloc(strlen(buffer)+1);
- strcpy(string, buffer);
- }
- return( string );
-}
diff --git a/contrib/groff/src/preproc/html/pushbackbuffer.h b/contrib/groff/src/preproc/html/pushbackbuffer.h
deleted file mode 100644
index 93cb3f1a4e82..000000000000
--- a/contrib/groff/src/preproc/html/pushbackbuffer.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// -*- C -*-
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Gaius Mulley (gaius@glam.ac.uk).
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-#define eof (char)-1
-
-
-/*
- * defines the class and methods implemented within pushbackbuffer.cc
- */
-
-class pushBackBuffer
-{
- private:
- char *charStack;
- int stackPtr; /* index to push back stack */
- int debug;
- int verbose;
- int eofFound;
- char *fileName;
- int lineNo;
- int stdIn;
-
- public:
- pushBackBuffer (char *);
- ~ pushBackBuffer ();
- char getPB (void);
- char putPB (char ch);
- void skipUntilToken (void);
- void skipToNewline (void);
- float readNumber (void);
- int readInt (void);
- char *readString (void);
- int isString (char *string);
-};
-
-
diff --git a/contrib/groff/src/preproc/pic/Makefile.sub b/contrib/groff/src/preproc/pic/Makefile.sub
deleted file mode 100644
index f1e292731c14..000000000000
--- a/contrib/groff/src/preproc/pic/Makefile.sub
+++ /dev/null
@@ -1,31 +0,0 @@
-PROG=pic
-MAN1=pic.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
- pic.o \
- lex.o \
- main.o \
- object.o \
- common.o \
- troff.o \
- tex.o
- # fig.o
-CCSRCS=\
- $(srcdir)/lex.cc \
- $(srcdir)/main.cc \
- $(srcdir)/object.cc \
- $(srcdir)/common.cc \
- $(srcdir)/troff.cc \
- $(srcdir)/tex.cc
-HDRS=\
- $(srcdir)/common.h \
- $(srcdir)/object.h \
- $(srcdir)/output.h \
- $(srcdir)/pic.h \
- $(srcdir)/position.h \
- $(srcdir)/text.h
-GRAM=$(srcdir)/pic.y
-YTABC=$(srcdir)/pic.cc
-YTABH=$(srcdir)/pic_tab.h
-NAMEPREFIX=$(g)
diff --git a/contrib/groff/src/preproc/pic/TODO b/contrib/groff/src/preproc/pic/TODO
deleted file mode 100644
index 2346b575e1de..000000000000
--- a/contrib/groff/src/preproc/pic/TODO
+++ /dev/null
@@ -1,37 +0,0 @@
-Dotted and dashed ellipses.
-
-In troff mode, dotted and dashed splines.
-
-Make DELIMITED have type lstr; this would allow us to give better
-error messages for problems within the body of for and if constructs.
-
-In troff mode without -x, fake \D't' with .ps commands.
-
-Perhaps an option to set command char.
-
-Add an output class for dumb line printers. It wouldn't be pretty but
-it would be better than nothing. Integrate it with texinfo. Useful
-for groff -Tascii as well.
-
-Option to allow better positioning of arrowheads on arcs.
-
-Perhaps add PostScript output mode.
-
-Change the interface to the output class so that output devices have
-the opportunity to handle arrowheads themselves.
-
-Consider whether the line thickness should scale.
-
-Consider whether the test in a for loop should be fuzzy (as it
-apparently is in grap).
-
-Possibly change fillval so that zero is black.
-
-Provide a way of getting text blocks (positioned with `.in' rather
-than \h), into pic. Should be possible to use block of diverted text
-in pic. Possibly something similar to T{ and T} in tbl.
-
-Option to provide macro backtraces.
-
-Have a path that is searched by `copy' statement. Set by environment
-variable or command line option.
diff --git a/contrib/groff/src/preproc/pic/common.cc b/contrib/groff/src/preproc/pic/common.cc
deleted file mode 100644
index e83ef3122583..000000000000
--- a/contrib/groff/src/preproc/pic/common.cc
+++ /dev/null
@@ -1,497 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "pic.h"
-#include "common.h"
-
-// output a dashed circle as a series of arcs
-
-void common_output::dashed_circle(const position &cent, double rad,
- const line_type &lt)
-{
- assert(lt.type == line_type::dashed);
- line_type slt = lt;
- slt.type = line_type::solid;
- double dash_angle = lt.dash_width/rad;
- int ndashes;
- double gap_angle;
- if (dash_angle >= M_PI/4.0) {
- if (dash_angle < M_PI/2.0) {
- gap_angle = M_PI/2.0 - dash_angle;
- ndashes = 4;
- }
- else if (dash_angle < M_PI) {
- gap_angle = M_PI - dash_angle;
- ndashes = 2;
- }
- else {
- circle(cent, rad, slt, -1.0);
- return;
- }
- }
- else {
- ndashes = 4*int(ceil(M_PI/(4.0*dash_angle)));
- gap_angle = (M_PI*2.0)/ndashes - dash_angle;
- }
- for (int i = 0; i < ndashes; i++) {
- double start_angle = i*(dash_angle+gap_angle) - dash_angle/2.0;
- solid_arc(cent, rad, start_angle, start_angle + dash_angle, lt);
- }
-}
-
-// output a dotted circle as a series of dots
-
-void common_output::dotted_circle(const position &cent, double rad,
- const line_type &lt)
-{
- assert(lt.type == line_type::dotted);
- double gap_angle = lt.dash_width/rad;
- int ndots;
- if (gap_angle >= M_PI/2.0) {
- // always have at least 2 dots
- gap_angle = M_PI;
- ndots = 2;
- }
- else {
- ndots = 4*int(M_PI/(2.0*gap_angle));
- gap_angle = (M_PI*2.0)/ndots;
- }
- double ang = 0.0;
- for (int i = 0; i < ndots; i++, ang += gap_angle)
- dot(cent + position(cos(ang), sin(ang))*rad, lt);
-}
-
-// return non-zero iff we can compute a center
-
-int compute_arc_center(const position &start, const position &cent,
- const position &end, position *result)
-{
- // This finds the point along the vector from start to cent that
- // is equidistant between start and end.
- distance c = cent - start;
- distance e = end - start;
- double n = c*e;
- if (n == 0.0)
- return 0;
- *result = start + c*((e*e)/(2.0*n));
- return 1;
-}
-
-// output a dashed arc as a series of arcs
-
-void common_output::dashed_arc(const position &start, const position &cent,
- const position &end, const line_type &lt)
-{
- assert(lt.type == line_type::dashed);
- position c;
- if (!compute_arc_center(start, cent, end, &c)) {
- line(start, &end, 1, lt);
- return;
- }
- distance start_offset = start - c;
- distance end_offset = end - c;
- double start_angle = atan2(start_offset.y, start_offset.x);
- double end_angle = atan2(end_offset.y, end_offset.x);
- double rad = hypot(c - start);
- double dash_angle = lt.dash_width/rad;
- double total_angle = end_angle - start_angle;
- while (total_angle < 0)
- total_angle += M_PI + M_PI;
- if (total_angle <= dash_angle*2.0) {
- solid_arc(cent, rad, start_angle, end_angle, lt);
- return;
- }
- int ndashes = int((total_angle - dash_angle)/(dash_angle*2.0) + .5);
- double dash_and_gap_angle = (total_angle - dash_angle)/ndashes;
- for (int i = 0; i <= ndashes; i++)
- solid_arc(cent, rad, start_angle + i*dash_and_gap_angle,
- start_angle + i*dash_and_gap_angle + dash_angle, lt);
-}
-
-// output a dotted arc as a series of dots
-
-void common_output::dotted_arc(const position &start, const position &cent,
- const position &end, const line_type &lt)
-{
- assert(lt.type == line_type::dotted);
- position c;
- if (!compute_arc_center(start, cent, end, &c)) {
- line(start, &end, 1, lt);
- return;
- }
- distance start_offset = start - c;
- distance end_offset = end - c;
- double start_angle = atan2(start_offset.y, start_offset.x);
- double total_angle = atan2(end_offset.y, end_offset.x) - start_angle;
- while (total_angle < 0)
- total_angle += M_PI + M_PI;
- double rad = hypot(c - start);
- int ndots = int(total_angle/(lt.dash_width/rad) + .5);
- if (ndots == 0)
- dot(start, lt);
- else {
- for (int i = 0; i <= ndots; i++) {
- double a = start_angle + (total_angle*i)/ndots;
- dot(cent + position(cos(a), sin(a))*rad, lt);
- }
- }
-}
-
-void common_output::solid_arc(const position &cent, double rad,
- double start_angle, double end_angle,
- const line_type &lt)
-{
- line_type slt = lt;
- slt.type = line_type::solid;
- arc(cent + position(cos(start_angle), sin(start_angle))*rad,
- cent,
- cent + position(cos(end_angle), sin(end_angle))*rad,
- slt);
-}
-
-
-void common_output::rounded_box(const position &cent, const distance &dim,
- double rad, const line_type &lt, double fill)
-{
- if (fill >= 0.0)
- filled_rounded_box(cent, dim, rad, fill);
- switch (lt.type) {
- case line_type::invisible:
- break;
- case line_type::dashed:
- dashed_rounded_box(cent, dim, rad, lt);
- break;
- case line_type::dotted:
- dotted_rounded_box(cent, dim, rad, lt);
- break;
- case line_type::solid:
- solid_rounded_box(cent, dim, rad, lt);
- break;
- default:
- assert(0);
- }
-}
-
-
-void common_output::dashed_rounded_box(const position &cent,
- const distance &dim, double rad,
- const line_type &lt)
-{
- line_type slt = lt;
- slt.type = line_type::solid;
-
- double hor_length = dim.x + (M_PI/2.0 - 2.0)*rad;
- int n_hor_dashes = int(hor_length/(lt.dash_width*2.0) + .5);
- double hor_gap_width = (n_hor_dashes != 0
- ? hor_length/n_hor_dashes - lt.dash_width
- : 0.0);
-
- double vert_length = dim.y + (M_PI/2.0 - 2.0)*rad;
- int n_vert_dashes = int(vert_length/(lt.dash_width*2.0) + .5);
- double vert_gap_width = (n_vert_dashes != 0
- ? vert_length/n_vert_dashes - lt.dash_width
- : 0.0);
- // Note that each corner arc has to be split into two for dashing,
- // because one part is dashed using vert_gap_width, and the other
- // using hor_gap_width.
- double offset = lt.dash_width/2.0;
- dash_arc(cent + position(dim.x/2.0 - rad, -dim.y/2.0 + rad), rad,
- -M_PI/4.0, 0, slt, lt.dash_width, vert_gap_width, &offset);
- dash_line(cent + position(dim.x/2.0, -dim.y/2.0 + rad),
- cent + position(dim.x/2.0, dim.y/2.0 - rad),
- slt, lt.dash_width, vert_gap_width, &offset);
- dash_arc(cent + position(dim.x/2.0 - rad, dim.y/2.0 - rad), rad,
- 0, M_PI/4.0, slt, lt.dash_width, vert_gap_width, &offset);
-
- offset = lt.dash_width/2.0;
- dash_arc(cent + position(dim.x/2.0 - rad, dim.y/2.0 - rad), rad,
- M_PI/4.0, M_PI/2, slt, lt.dash_width, hor_gap_width, &offset);
- dash_line(cent + position(dim.x/2.0 - rad, dim.y/2.0),
- cent + position(-dim.x/2.0 + rad, dim.y/2.0),
- slt, lt.dash_width, hor_gap_width, &offset);
- dash_arc(cent + position(-dim.x/2.0 + rad, dim.y/2.0 - rad), rad,
- M_PI/2, 3*M_PI/4.0, slt, lt.dash_width, hor_gap_width, &offset);
-
- offset = lt.dash_width/2.0;
- dash_arc(cent + position(-dim.x/2.0 + rad, dim.y/2.0 - rad), rad,
- 3.0*M_PI/4.0, M_PI, slt, lt.dash_width, vert_gap_width, &offset);
- dash_line(cent + position(-dim.x/2.0, dim.y/2.0 - rad),
- cent + position(-dim.x/2.0, -dim.y/2.0 + rad),
- slt, lt.dash_width, vert_gap_width, &offset);
- dash_arc(cent + position(-dim.x/2.0 + rad, -dim.y/2.0 + rad), rad,
- M_PI, 5.0*M_PI/4.0, slt, lt.dash_width, vert_gap_width, &offset);
-
- offset = lt.dash_width/2.0;
- dash_arc(cent + position(-dim.x/2.0 + rad, -dim.y/2.0 + rad), rad,
- 5*M_PI/4.0, 3*M_PI/2.0, slt, lt.dash_width, hor_gap_width, &offset);
- dash_line(cent + position(-dim.x/2.0 + rad, -dim.y/2.0),
- cent + position(dim.x/2.0 - rad, -dim.y/2.0),
- slt, lt.dash_width, hor_gap_width, &offset);
- dash_arc(cent + position(dim.x/2.0 - rad, -dim.y/2.0 + rad), rad,
- 3*M_PI/2, 7*M_PI/4, slt, lt.dash_width, hor_gap_width, &offset);
-}
-
-// Used by dashed_rounded_box.
-
-void common_output::dash_arc(const position &cent, double rad,
- double start_angle, double end_angle,
- const line_type &lt,
- double dash_width, double gap_width,
- double *offsetp)
-{
- double length = (end_angle - start_angle)*rad;
- double pos = 0.0;
- for (;;) {
- if (*offsetp >= dash_width) {
- double rem = dash_width + gap_width - *offsetp;
- if (pos + rem > length) {
- *offsetp += length - pos;
- break;
- }
- else {
- pos += rem;
- *offsetp = 0.0;
- }
- }
- else {
- double rem = dash_width - *offsetp;
- if (pos + rem > length) {
- solid_arc(cent, rad, start_angle + pos/rad, end_angle, lt);
- *offsetp += length - pos;
- break;
- }
- else {
- solid_arc(cent, rad, start_angle + pos/rad,
- start_angle + (pos + rem)/rad, lt);
- pos += rem;
- *offsetp = dash_width;
- }
- }
- }
-}
-
-// Used by dashed_rounded_box.
-
-void common_output::dash_line(const position &start, const position &end,
- const line_type &lt,
- double dash_width, double gap_width,
- double *offsetp)
-{
- distance dist = end - start;
- double length = hypot(dist);
- if (length == 0.0)
- return;
- double pos = 0.0;
- for (;;) {
- if (*offsetp >= dash_width) {
- double rem = dash_width + gap_width - *offsetp;
- if (pos + rem > length) {
- *offsetp += length - pos;
- break;
- }
- else {
- pos += rem;
- *offsetp = 0.0;
- }
- }
- else {
- double rem = dash_width - *offsetp;
- if (pos + rem > length) {
- line(start + dist*(pos/length), &end, 1, lt);
- *offsetp += length - pos;
- break;
- }
- else {
- position p(start + dist*((pos + rem)/length));
- line(start + dist*(pos/length), &p, 1, lt);
- pos += rem;
- *offsetp = dash_width;
- }
- }
- }
-}
-
-void common_output::dotted_rounded_box(const position &cent,
- const distance &dim, double rad,
- const line_type &lt)
-{
- line_type slt = lt;
- slt.type = line_type::solid;
-
- double hor_length = dim.x + (M_PI/2.0 - 2.0)*rad;
- int n_hor_dots = int(hor_length/lt.dash_width + .5);
- double hor_gap_width = (n_hor_dots != 0
- ? hor_length/n_hor_dots
- : lt.dash_width);
-
- double vert_length = dim.y + (M_PI/2.0 - 2.0)*rad;
- int n_vert_dots = int(vert_length/lt.dash_width + .5);
- double vert_gap_width = (n_vert_dots != 0
- ? vert_length/n_vert_dots
- : lt.dash_width);
- double epsilon = lt.dash_width/(rad*100.0);
-
- double offset = 0.0;
- dot_arc(cent + position(dim.x/2.0 - rad, -dim.y/2.0 + rad), rad,
- -M_PI/4.0, 0, slt, vert_gap_width, &offset);
- dot_line(cent + position(dim.x/2.0, -dim.y/2.0 + rad),
- cent + position(dim.x/2.0, dim.y/2.0 - rad),
- slt, vert_gap_width, &offset);
- dot_arc(cent + position(dim.x/2.0 - rad, dim.y/2.0 - rad), rad,
- 0, M_PI/4.0 - epsilon, slt, vert_gap_width, &offset);
-
- offset = 0.0;
- dot_arc(cent + position(dim.x/2.0 - rad, dim.y/2.0 - rad), rad,
- M_PI/4.0, M_PI/2, slt, hor_gap_width, &offset);
- dot_line(cent + position(dim.x/2.0 - rad, dim.y/2.0),
- cent + position(-dim.x/2.0 + rad, dim.y/2.0),
- slt, hor_gap_width, &offset);
- dot_arc(cent + position(-dim.x/2.0 + rad, dim.y/2.0 - rad), rad,
- M_PI/2, 3*M_PI/4.0 - epsilon, slt, hor_gap_width, &offset);
-
- offset = 0.0;
- dot_arc(cent + position(-dim.x/2.0 + rad, dim.y/2.0 - rad), rad,
- 3.0*M_PI/4.0, M_PI, slt, vert_gap_width, &offset);
- dot_line(cent + position(-dim.x/2.0, dim.y/2.0 - rad),
- cent + position(-dim.x/2.0, -dim.y/2.0 + rad),
- slt, vert_gap_width, &offset);
- dot_arc(cent + position(-dim.x/2.0 + rad, -dim.y/2.0 + rad), rad,
- M_PI, 5.0*M_PI/4.0 - epsilon, slt, vert_gap_width, &offset);
-
- offset = 0.0;
- dot_arc(cent + position(-dim.x/2.0 + rad, -dim.y/2.0 + rad), rad,
- 5*M_PI/4.0, 3*M_PI/2.0, slt, hor_gap_width, &offset);
- dot_line(cent + position(-dim.x/2.0 + rad, -dim.y/2.0),
- cent + position(dim.x/2.0 - rad, -dim.y/2.0),
- slt, hor_gap_width, &offset);
- dot_arc(cent + position(dim.x/2.0 - rad, -dim.y/2.0 + rad), rad,
- 3*M_PI/2, 7*M_PI/4 - epsilon, slt, hor_gap_width, &offset);
-}
-
-// Used by dotted_rounded_box.
-
-void common_output::dot_arc(const position &cent, double rad,
- double start_angle, double end_angle,
- const line_type &lt, double gap_width,
- double *offsetp)
-{
- double length = (end_angle - start_angle)*rad;
- double pos = 0.0;
- for (;;) {
- if (*offsetp == 0.0) {
- double ang = start_angle + pos/rad;
- dot(cent + position(cos(ang), sin(ang))*rad, lt);
- }
- double rem = gap_width - *offsetp;
- if (pos + rem > length) {
- *offsetp += length - pos;
- break;
- }
- else {
- pos += rem;
- *offsetp = 0.0;
- }
- }
-}
-
-// Used by dotted_rounded_box.
-
-void common_output::dot_line(const position &start, const position &end,
- const line_type &lt, double gap_width,
- double *offsetp)
-{
- distance dist = end - start;
- double length = hypot(dist);
- if (length == 0.0)
- return;
- double pos = 0.0;
- for (;;) {
- if (*offsetp == 0.0)
- dot(start + dist*(pos/length), lt);
- double rem = gap_width - *offsetp;
- if (pos + rem > length) {
- *offsetp += length - pos;
- break;
- }
- else {
- pos += rem;
- *offsetp = 0.0;
- }
- }
-}
-
-
-void common_output::solid_rounded_box(const position &cent,
- const distance &dim, double rad,
- const line_type &lt)
-{
- position tem = cent - dim/2.0;
- arc(tem + position(0.0, rad),
- tem + position(rad, rad),
- tem + position(rad, 0.0),
- lt);
- tem = cent + position(-dim.x/2.0, dim.y/2.0);
- arc(tem + position(rad, 0.0),
- tem + position(rad, -rad),
- tem + position(0.0, -rad),
- lt);
- tem = cent + dim/2.0;
- arc(tem + position(0.0, -rad),
- tem + position(-rad, -rad),
- tem + position(-rad, 0.0),
- lt);
- tem = cent + position(dim.x/2.0, -dim.y/2.0);
- arc(tem + position(-rad, 0.0),
- tem + position(-rad, rad),
- tem + position(0.0, rad),
- lt);
- position end;
- end = cent + position(-dim.x/2.0, dim.y/2.0 - rad);
- line(cent - dim/2.0 + position(0.0, rad), &end, 1, lt);
- end = cent + position(dim.x/2.0 - rad, dim.y/2.0);
- line(cent + position(-dim.x/2.0 + rad, dim.y/2.0), &end, 1, lt);
- end = cent + position(dim.x/2.0, -dim.y/2.0 + rad);
- line(cent + position(dim.x/2.0, dim.y/2.0 - rad), &end, 1, lt);
- end = cent + position(-dim.x/2.0 + rad, -dim.y/2.0);
- line(cent + position(dim.x/2.0 - rad, -dim.y/2.0), &end, 1, lt);
-}
-
-void common_output::filled_rounded_box(const position &cent,
- const distance &dim, double rad,
- double fill)
-{
- line_type ilt;
- ilt.type = line_type::invisible;
- circle(cent + position(dim.x/2.0 - rad, dim.y/2.0 - rad), rad, ilt, fill);
- circle(cent + position(-dim.x/2.0 + rad, dim.y/2.0 - rad), rad, ilt, fill);
- circle(cent + position(-dim.x/2.0 + rad, -dim.y/2.0 + rad), rad, ilt, fill);
- circle(cent + position(dim.x/2.0 - rad, -dim.y/2.0 + rad), rad, ilt, fill);
- position vec[4];
- vec[0] = cent + position(dim.x/2.0, dim.y/2.0 - rad);
- vec[1] = cent + position(-dim.x/2.0, dim.y/2.0 - rad);
- vec[2] = cent + position(-dim.x/2.0, -dim.y/2.0 + rad);
- vec[3] = cent + position(dim.x/2.0, -dim.y/2.0 + rad);
- polygon(vec, 4, ilt, fill);
- vec[0] = cent + position(dim.x/2.0 - rad, dim.y/2.0);
- vec[1] = cent + position(-dim.x/2.0 + rad, dim.y/2.0);
- vec[2] = cent + position(-dim.x/2.0 + rad, -dim.y/2.0);
- vec[3] = cent + position(dim.x/2.0 - rad, -dim.y/2.0);
- polygon(vec, 4, ilt, fill);
-}
diff --git a/contrib/groff/src/preproc/pic/common.h b/contrib/groff/src/preproc/pic/common.h
deleted file mode 100644
index 25a6e10c689c..000000000000
--- a/contrib/groff/src/preproc/pic/common.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-class common_output : public output {
-private:
- void dash_line(const position &start, const position &end,
- const line_type &lt, double dash_width, double gap_width,
- double *offsetp);
- void dash_arc(const position &cent, double rad,
- double start_angle, double end_angle, const line_type &lt,
- double dash_width, double gap_width, double *offsetp);
- void dot_line(const position &start, const position &end,
- const line_type &lt, double gap_width, double *offsetp);
- void dot_arc(const position &cent, double rad,
- double start_angle, double end_angle, const line_type &lt,
- double gap_width, double *offsetp);
-protected:
- virtual void dot(const position &, const line_type &) = 0;
- void dashed_circle(const position &, double rad, const line_type &);
- void dotted_circle(const position &, double rad, const line_type &);
- void dashed_arc(const position &, const position &, const position &,
- const line_type &);
- void dotted_arc(const position &, const position &, const position &,
- const line_type &);
- virtual void solid_arc(const position &cent, double rad, double start_angle,
- double end_angle, const line_type &lt);
- void dashed_rounded_box(const position &, const distance &, double,
- const line_type &);
- void dotted_rounded_box(const position &, const distance &, double,
- const line_type &);
- void solid_rounded_box(const position &, const distance &, double,
- const line_type &);
- void filled_rounded_box(const position &, const distance &, double, double);
-public:
- void start_picture(double sc, const position &ll, const position &ur) = 0;
- void finish_picture() = 0;
- void circle(const position &, double rad, const line_type &, double) = 0;
- void text(const position &, text_piece *, int, double) = 0;
- void line(const position &, const position *, int n, const line_type &) = 0;
- void polygon(const position *, int n, const line_type &, double) = 0;
- void spline(const position &, const position *, int n,
- const line_type &) = 0;
- void arc(const position &, const position &, const position &,
- const line_type &) = 0;
- void ellipse(const position &, const distance &,
- const line_type &, double) = 0;
- void rounded_box(const position &, const distance &, double,
- const line_type &, double);
-};
-
-int compute_arc_center(const position &start, const position &cent,
- const position &end, position *result);
-
diff --git a/contrib/groff/src/preproc/pic/lex.cc b/contrib/groff/src/preproc/pic/lex.cc
deleted file mode 100644
index 5b6d439a0440..000000000000
--- a/contrib/groff/src/preproc/pic/lex.cc
+++ /dev/null
@@ -1,1940 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "pic.h"
-#include "ptable.h"
-#include "object.h"
-#include "pic_tab.h"
-
-declare_ptable(char)
-implement_ptable(char)
-
-PTABLE(char) macro_table;
-
-class macro_input : public input {
- char *s;
- char *p;
-public:
- macro_input(const char *);
- ~macro_input();
- int get();
- int peek();
-};
-
-class argument_macro_input : public input {
- char *s;
- char *p;
- char *ap;
- int argc;
- char *argv[9];
-public:
- argument_macro_input(const char *, int, char **);
- ~argument_macro_input();
- int get();
- int peek();
-};
-
-input::input() : next(0)
-{
-}
-
-input::~input()
-{
-}
-
-int input::get_location(const char **, int *)
-{
- return 0;
-}
-
-file_input::file_input(FILE *f, const char *fn)
-: fp(f), filename(fn), lineno(0), ptr("")
-{
-}
-
-file_input::~file_input()
-{
- fclose(fp);
-}
-
-int file_input::read_line()
-{
- for (;;) {
- line.clear();
- lineno++;
- for (;;) {
- int c = getc(fp);
- if (c == EOF)
- break;
- else if (illegal_input_char(c))
- lex_error("illegal input character code %1", c);
- else {
- line += char(c);
- if (c == '\n')
- break;
- }
- }
- if (line.length() == 0)
- return 0;
- if (!(line.length() >= 3 && line[0] == '.' && line[1] == 'P'
- && (line[2] == 'S' || line[2] == 'E' || line[2] == 'F')
- && (line.length() == 3 || line[3] == ' ' || line[3] == '\n'
- || compatible_flag))) {
- line += '\0';
- ptr = line.contents();
- return 1;
- }
- }
-}
-
-int file_input::get()
-{
- if (*ptr != '\0' || read_line())
- return (unsigned char)*ptr++;
- else
- return EOF;
-}
-
-int file_input::peek()
-{
- if (*ptr != '\0' || read_line())
- return (unsigned char)*ptr;
- else
- return EOF;
-}
-
-int file_input::get_location(const char **fnp, int *lnp)
-{
- *fnp = filename;
- *lnp = lineno;
- return 1;
-}
-
-macro_input::macro_input(const char *str)
-{
- p = s = strsave(str);
-}
-
-macro_input::~macro_input()
-{
- a_delete s;
-}
-
-int macro_input::get()
-{
- if (p == 0 || *p == '\0')
- return EOF;
- else
- return (unsigned char)*p++;
-}
-
-int macro_input::peek()
-{
- if (p == 0 || *p == '\0')
- return EOF;
- else
- return (unsigned char)*p;
-}
-
-// Character representing $1. Must be illegal input character.
-#define ARG1 14
-
-char *process_body(const char *body)
-{
- char *s = strsave(body);
- int j = 0;
- for (int i = 0; s[i] != '\0'; i++)
- if (s[i] == '$' && s[i+1] >= '0' && s[i+1] <= '9') {
- if (s[i+1] != '0')
- s[j++] = ARG1 + s[++i] - '1';
- }
- else
- s[j++] = s[i];
- s[j] = '\0';
- return s;
-}
-
-
-argument_macro_input::argument_macro_input(const char *body, int ac, char **av)
-: ap(0), argc(ac)
-{
- for (int i = 0; i < argc; i++)
- argv[i] = av[i];
- p = s = process_body(body);
-}
-
-
-argument_macro_input::~argument_macro_input()
-{
- for (int i = 0; i < argc; i++)
- a_delete argv[i];
- a_delete s;
-}
-
-int argument_macro_input::get()
-{
- if (ap) {
- if (*ap != '\0')
- return (unsigned char)*ap++;
- ap = 0;
- }
- if (p == 0)
- return EOF;
- while (*p >= ARG1 && *p <= ARG1 + 8) {
- int i = *p++ - ARG1;
- if (i < argc && argv[i] != 0 && argv[i][0] != '\0') {
- ap = argv[i];
- return (unsigned char)*ap++;
- }
- }
- if (*p == '\0')
- return EOF;
- return (unsigned char)*p++;
-}
-
-int argument_macro_input::peek()
-{
- if (ap) {
- if (*ap != '\0')
- return (unsigned char)*ap;
- ap = 0;
- }
- if (p == 0)
- return EOF;
- while (*p >= ARG1 && *p <= ARG1 + 8) {
- int i = *p++ - ARG1;
- if (i < argc && argv[i] != 0 && argv[i][0] != '\0') {
- ap = argv[i];
- return (unsigned char)*ap;
- }
- }
- if (*p == '\0')
- return EOF;
- return (unsigned char)*p;
-}
-
-class input_stack {
- static input *current_input;
- static int bol_flag;
-public:
- static void push(input *);
- static void clear();
- static int get_char();
- static int peek_char();
- static int get_location(const char **fnp, int *lnp);
- static void push_back(unsigned char c, int was_bol = 0);
- static int bol();
-};
-
-input *input_stack::current_input = 0;
-int input_stack::bol_flag = 0;
-
-inline int input_stack::bol()
-{
- return bol_flag;
-}
-
-void input_stack::clear()
-{
- while (current_input != 0) {
- input *tem = current_input;
- current_input = current_input->next;
- delete tem;
- }
- bol_flag = 1;
-}
-
-void input_stack::push(input *in)
-{
- in->next = current_input;
- current_input = in;
-}
-
-void lex_init(input *top)
-{
- input_stack::clear();
- input_stack::push(top);
-}
-
-void lex_cleanup()
-{
- while (input_stack::get_char() != EOF)
- ;
-}
-
-int input_stack::get_char()
-{
- while (current_input != 0) {
- int c = current_input->get();
- if (c != EOF) {
- bol_flag = c == '\n';
- return c;
- }
- // don't pop the top-level input off the stack
- if (current_input->next == 0)
- return EOF;
- input *tem = current_input;
- current_input = current_input->next;
- delete tem;
- }
- return EOF;
-}
-
-int input_stack::peek_char()
-{
- while (current_input != 0) {
- int c = current_input->peek();
- if (c != EOF)
- return c;
- if (current_input->next == 0)
- return EOF;
- input *tem = current_input;
- current_input = current_input->next;
- delete tem;
- }
- return EOF;
-}
-
-class char_input : public input {
- int c;
-public:
- char_input(int);
- int get();
- int peek();
-};
-
-char_input::char_input(int n) : c((unsigned char)n)
-{
-}
-
-int char_input::get()
-{
- int n = c;
- c = EOF;
- return n;
-}
-
-int char_input::peek()
-{
- return c;
-}
-
-void input_stack::push_back(unsigned char c, int was_bol)
-{
- push(new char_input(c));
- bol_flag = was_bol;
-}
-
-int input_stack::get_location(const char **fnp, int *lnp)
-{
- for (input *p = current_input; p; p = p->next)
- if (p->get_location(fnp, lnp))
- return 1;
- return 0;
-}
-
-string context_buffer;
-
-string token_buffer;
-double token_double;
-int token_int;
-
-void interpolate_macro_with_args(const char *body)
-{
- char *argv[9];
- int argc = 0;
- int i;
- for (i = 0; i < 9; i++)
- argv[i] = 0;
- int level = 0;
- int c;
- enum { NORMAL, IN_STRING, IN_STRING_QUOTED } state = NORMAL;
- do {
- token_buffer.clear();
- for (;;) {
- c = input_stack::get_char();
- if (c == EOF) {
- lex_error("end of input while scanning macro arguments");
- break;
- }
- if (state == NORMAL && level == 0 && (c == ',' || c == ')')) {
- if (token_buffer.length() > 0) {
- token_buffer += '\0';
- argv[argc] = strsave(token_buffer.contents());
- }
- // for `foo()', argc = 0
- if (argc > 0 || c != ')' || i > 0)
- argc++;
- break;
- }
- token_buffer += char(c);
- switch (state) {
- case NORMAL:
- if (c == '"')
- state = IN_STRING;
- else if (c == '(')
- level++;
- else if (c == ')')
- level--;
- break;
- case IN_STRING:
- if (c == '"')
- state = NORMAL;
- else if (c == '\\')
- state = IN_STRING_QUOTED;
- break;
- case IN_STRING_QUOTED:
- state = IN_STRING;
- break;
- }
- }
- } while (c != ')' && c != EOF);
- input_stack::push(new argument_macro_input(body, argc, argv));
-}
-
-static int docmp(const char *s1, int n1, const char *s2, int n2)
-{
- if (n1 < n2) {
- int r = memcmp(s1, s2, n1);
- return r ? r : -1;
- }
- else if (n1 > n2) {
- int r = memcmp(s1, s2, n2);
- return r ? r : 1;
- }
- else
- return memcmp(s1, s2, n1);
-}
-
-int lookup_keyword(const char *str, int len)
-{
- static struct keyword {
- const char *name;
- int token;
- } table[] = {
- { "Here", HERE },
- { "above", ABOVE },
- { "aligned", ALIGNED },
- { "and", AND },
- { "arc", ARC },
- { "arrow", ARROW },
- { "at", AT },
- { "atan2", ATAN2 },
- { "below", BELOW },
- { "between", BETWEEN },
- { "bottom", BOTTOM },
- { "box", BOX },
- { "by", BY },
- { "ccw", CCW },
- { "center", CENTER },
- { "chop", CHOP },
- { "circle", CIRCLE },
- { "command", COMMAND },
- { "copy", COPY },
- { "cos", COS },
- { "cw", CW },
- { "dashed", DASHED },
- { "define", DEFINE },
- { "diam", DIAMETER },
- { "diameter", DIAMETER },
- { "do", DO },
- { "dotted", DOTTED },
- { "down", DOWN },
- { "ellipse", ELLIPSE },
- { "else", ELSE },
- { "end", END },
- { "exp", EXP },
- { "fill", FILL },
- { "filled", FILL },
- { "for", FOR },
- { "from", FROM },
- { "height", HEIGHT },
- { "ht", HEIGHT },
- { "if", IF },
- { "int", INT },
- { "invis", INVISIBLE },
- { "invisible", INVISIBLE },
- { "last", LAST },
- { "left", LEFT },
- { "line", LINE },
- { "ljust", LJUST },
- { "log", LOG },
- { "lower", LOWER },
- { "max", K_MAX },
- { "min", K_MIN },
- { "move", MOVE },
- { "of", OF },
- { "plot", PLOT },
- { "print", PRINT },
- { "rad", RADIUS },
- { "radius", RADIUS },
- { "rand", RAND },
- { "reset", RESET },
- { "right", RIGHT },
- { "rjust", RJUST },
- { "same", SAME },
- { "sh", SH },
- { "sin", SIN },
- { "solid", SOLID },
- { "spline", SPLINE },
- { "sprintf", SPRINTF },
- { "sqrt", SQRT },
- { "srand", SRAND },
- { "start", START },
- { "the", THE },
- { "then", THEN },
- { "thick", THICKNESS },
- { "thickness", THICKNESS },
- { "thru", THRU },
- { "to", TO },
- { "top", TOP },
- { "undef", UNDEF },
- { "until", UNTIL },
- { "up", UP },
- { "upper", UPPER },
- { "way", WAY },
- { "wid", WIDTH },
- { "width", WIDTH },
- { "with", WITH },
- };
-
- const keyword *start = table;
- const keyword *end = table + sizeof(table)/sizeof(table[0]);
- while (start < end) {
- // start <= target < end
- const keyword *mid = start + (end - start)/2;
-
- int cmp = docmp(str, len, mid->name, strlen(mid->name));
- if (cmp == 0)
- return mid->token;
- if (cmp < 0)
- end = mid;
- else
- start = mid + 1;
- }
- return 0;
-}
-
-int get_token_after_dot(int c)
-{
- // get_token deals with the case where c is a digit
- switch (c) {
- case 'h':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- context_buffer = ".ht";
- return DOT_HT;
- }
- else if (c == 'e') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'i') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'g') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'h') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- context_buffer = ".height";
- return DOT_HT;
- }
- input_stack::push_back('h');
- }
- input_stack::push_back('g');
- }
- input_stack::push_back('i');
- }
- input_stack::push_back('e');
- }
- input_stack::push_back('h');
- return '.';
- case 'x':
- input_stack::get_char();
- context_buffer = ".x";
- return DOT_X;
- case 'y':
- input_stack::get_char();
- context_buffer = ".y";
- return DOT_Y;
- case 'c':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'e') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'n') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'e') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'r') {
- input_stack::get_char();
- context_buffer = ".center";
- return DOT_C;
- }
- input_stack::push_back('e');
- }
- input_stack::push_back('t');
- }
- input_stack::push_back('n');
- }
- input_stack::push_back('e');
- }
- context_buffer = ".c";
- return DOT_C;
- case 'n':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'e') {
- input_stack::get_char();
- context_buffer = ".ne";
- return DOT_NE;
- }
- else if (c == 'w') {
- input_stack::get_char();
- context_buffer = ".nw";
- return DOT_NW;
- }
- else {
- context_buffer = ".n";
- return DOT_N;
- }
- break;
- case 'e':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'n') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'd') {
- input_stack::get_char();
- context_buffer = ".end";
- return DOT_END;
- }
- input_stack::push_back('n');
- context_buffer = ".e";
- return DOT_E;
- }
- context_buffer = ".e";
- return DOT_E;
- case 'w':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'i') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'd') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'h') {
- input_stack::get_char();
- context_buffer = ".width";
- return DOT_WID;
- }
- input_stack::push_back('t');
- }
- context_buffer = ".wid";
- return DOT_WID;
- }
- input_stack::push_back('i');
- }
- context_buffer = ".w";
- return DOT_W;
- case 's':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'e') {
- input_stack::get_char();
- context_buffer = ".se";
- return DOT_SE;
- }
- else if (c == 'w') {
- input_stack::get_char();
- context_buffer = ".sw";
- return DOT_SW;
- }
- else {
- if (c == 't') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'a') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'r') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- context_buffer = ".start";
- return DOT_START;
- }
- input_stack::push_back('r');
- }
- input_stack::push_back('a');
- }
- input_stack::push_back('t');
- }
- context_buffer = ".s";
- return DOT_S;
- }
- break;
- case 't':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'o') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'p') {
- input_stack::get_char();
- context_buffer = ".top";
- return DOT_N;
- }
- input_stack::push_back('o');
- }
- context_buffer = ".t";
- return DOT_N;
- case 'l':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'e') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'f') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- context_buffer = ".left";
- return DOT_W;
- }
- input_stack::push_back('f');
- }
- input_stack::push_back('e');
- }
- context_buffer = ".l";
- return DOT_W;
- case 'r':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'a') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'd') {
- input_stack::get_char();
- context_buffer = ".rad";
- return DOT_RAD;
- }
- input_stack::push_back('a');
- }
- else if (c == 'i') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'g') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'h') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- context_buffer = ".right";
- return DOT_E;
- }
- input_stack::push_back('h');
- }
- input_stack::push_back('g');
- }
- input_stack::push_back('i');
- }
- context_buffer = ".r";
- return DOT_E;
- case 'b':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'o') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'o') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'm') {
- input_stack::get_char();
- context_buffer = ".bottom";
- return DOT_S;
- }
- input_stack::push_back('o');
- }
- input_stack::push_back('t');
- }
- context_buffer = ".bot";
- return DOT_S;
- }
- input_stack::push_back('o');
- }
- context_buffer = ".b";
- return DOT_S;
- default:
- context_buffer = '.';
- return '.';
- }
-}
-
-int get_token(int lookup_flag)
-{
- context_buffer.clear();
- for (;;) {
- int n = 0;
- int bol = input_stack::bol();
- int c = input_stack::get_char();
- if (bol && c == command_char) {
- token_buffer.clear();
- token_buffer += c;
- // the newline is not part of the token
- for (;;) {
- c = input_stack::peek_char();
- if (c == EOF || c == '\n')
- break;
- input_stack::get_char();
- token_buffer += char(c);
- }
- context_buffer = token_buffer;
- return COMMAND_LINE;
- }
- switch (c) {
- case EOF:
- return EOF;
- case ' ':
- case '\t':
- break;
- case '\\':
- {
- int d = input_stack::peek_char();
- if (d != '\n') {
- context_buffer = '\\';
- return '\\';
- }
- input_stack::get_char();
- break;
- }
- case '#':
- do {
- c = input_stack::get_char();
- } while (c != '\n' && c != EOF);
- if (c == '\n')
- context_buffer = '\n';
- return c;
- case '"':
- context_buffer = '"';
- token_buffer.clear();
- for (;;) {
- c = input_stack::get_char();
- if (c == '\\') {
- context_buffer += '\\';
- c = input_stack::peek_char();
- if (c == '"') {
- input_stack::get_char();
- token_buffer += '"';
- context_buffer += '"';
- }
- else
- token_buffer += '\\';
- }
- else if (c == '\n') {
- error("newline in string");
- break;
- }
- else if (c == EOF) {
- error("missing `\"'");
- break;
- }
- else if (c == '"') {
- context_buffer += '"';
- break;
- }
- else {
- context_buffer += char(c);
- token_buffer += char(c);
- }
- }
- return TEXT;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- int overflow = 0;
- n = 0;
- for (;;) {
- if (n > (INT_MAX - 9)/10) {
- overflow = 1;
- break;
- }
- n *= 10;
- n += c - '0';
- context_buffer += char(c);
- c = input_stack::peek_char();
- if (c == EOF || !csdigit(c))
- break;
- c = input_stack::get_char();
- }
- token_double = n;
- if (overflow) {
- for (;;) {
- token_double *= 10.0;
- token_double += c - '0';
- context_buffer += char(c);
- c = input_stack::peek_char();
- if (c == EOF || !csdigit(c))
- break;
- c = input_stack::get_char();
- }
- // if somebody asks for 1000000000000th, we will silently
- // give them INT_MAXth
- double temp = token_double; // work around gas 1.34/sparc bug
- if (token_double > INT_MAX)
- n = INT_MAX;
- else
- n = int(temp);
- }
- }
- switch (c) {
- case 'i':
- case 'I':
- context_buffer += char(c);
- input_stack::get_char();
- return NUMBER;
- case '.':
- {
- context_buffer += '.';
- input_stack::get_char();
- got_dot:
- double factor = 1.0;
- for (;;) {
- c = input_stack::peek_char();
- if (!c == EOF || !csdigit(c))
- break;
- input_stack::get_char();
- context_buffer += char(c);
- factor /= 10.0;
- if (c != '0')
- token_double += factor*(c - '0');
- }
- if (c != 'e' && c != 'E') {
- if (c == 'i' || c == 'I') {
- context_buffer += char(c);
- input_stack::get_char();
- }
- return NUMBER;
- }
- }
- // fall through
- case 'e':
- case 'E':
- {
- int echar = c;
- input_stack::get_char();
- c = input_stack::peek_char();
- int sign = '+';
- if (c == '+' || c == '-') {
- sign = c;
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == EOF || !csdigit(c)) {
- input_stack::push_back(sign);
- input_stack::push_back(echar);
- return NUMBER;
- }
- context_buffer += char(echar);
- context_buffer += char(sign);
- }
- else {
- if (c == EOF || !csdigit(c)) {
- input_stack::push_back(echar);
- return NUMBER;
- }
- context_buffer += char(echar);
- }
- input_stack::get_char();
- context_buffer += char(c);
- n = c - '0';
- for (;;) {
- c = input_stack::peek_char();
- if (c == EOF || !csdigit(c))
- break;
- input_stack::get_char();
- context_buffer += char(c);
- n = n*10 + (c - '0');
- }
- if (sign == '-')
- n = -n;
- if (c == 'i' || c == 'I') {
- context_buffer += char(c);
- input_stack::get_char();
- }
- token_double *= pow(10.0, n);
- return NUMBER;
- }
- case 'n':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'd') {
- input_stack::get_char();
- token_int = n;
- context_buffer += "nd";
- return ORDINAL;
- }
- input_stack::push_back('n');
- return NUMBER;
- case 'r':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'd') {
- input_stack::get_char();
- token_int = n;
- context_buffer += "rd";
- return ORDINAL;
- }
- input_stack::push_back('r');
- return NUMBER;
- case 't':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'h') {
- input_stack::get_char();
- token_int = n;
- context_buffer += "th";
- return ORDINAL;
- }
- input_stack::push_back('t');
- return NUMBER;
- case 's':
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- token_int = n;
- context_buffer += "st";
- return ORDINAL;
- }
- input_stack::push_back('s');
- return NUMBER;
- default:
- return NUMBER;
- }
- break;
- case '\'':
- {
- c = input_stack::peek_char();
- if (c == 't') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == 'h') {
- input_stack::get_char();
- context_buffer = "'th";
- return TH;
- }
- else
- input_stack::push_back('t');
- }
- context_buffer = "'";
- return '\'';
- }
- case '.':
- {
- c = input_stack::peek_char();
- if (c != EOF && csdigit(c)) {
- n = 0;
- token_double = 0.0;
- context_buffer = '.';
- goto got_dot;
- }
- return get_token_after_dot(c);
- }
- case '<':
- c = input_stack::peek_char();
- if (c == '-') {
- input_stack::get_char();
- c = input_stack::peek_char();
- if (c == '>') {
- input_stack::get_char();
- context_buffer = "<->";
- return DOUBLE_ARROW_HEAD;
- }
- context_buffer = "<-";
- return LEFT_ARROW_HEAD;
- }
- else if (c == '=') {
- input_stack::get_char();
- context_buffer = "<=";
- return LESSEQUAL;
- }
- context_buffer = "<";
- return '<';
- case '-':
- c = input_stack::peek_char();
- if (c == '>') {
- input_stack::get_char();
- context_buffer = "->";
- return RIGHT_ARROW_HEAD;
- }
- context_buffer = "-";
- return '-';
- case '!':
- c = input_stack::peek_char();
- if (c == '=') {
- input_stack::get_char();
- context_buffer = "!=";
- return NOTEQUAL;
- }
- context_buffer = "!";
- return '!';
- case '>':
- c = input_stack::peek_char();
- if (c == '=') {
- input_stack::get_char();
- context_buffer = ">=";
- return GREATEREQUAL;
- }
- context_buffer = ">";
- return '>';
- case '=':
- c = input_stack::peek_char();
- if (c == '=') {
- input_stack::get_char();
- context_buffer = "==";
- return EQUALEQUAL;
- }
- context_buffer = "=";
- return '=';
- case '&':
- c = input_stack::peek_char();
- if (c == '&') {
- input_stack::get_char();
- context_buffer = "&&";
- return ANDAND;
- }
- context_buffer = "&";
- return '&';
- case '|':
- c = input_stack::peek_char();
- if (c == '|') {
- input_stack::get_char();
- context_buffer = "||";
- return OROR;
- }
- context_buffer = "|";
- return '|';
- default:
- if (c != EOF && csalpha(c)) {
- token_buffer.clear();
- token_buffer = c;
- for (;;) {
- c = input_stack::peek_char();
- if (c == EOF || (!csalnum(c) && c != '_'))
- break;
- input_stack::get_char();
- token_buffer += char(c);
- }
- int tok = lookup_keyword(token_buffer.contents(),
- token_buffer.length());
- if (tok != 0) {
- context_buffer = token_buffer;
- return tok;
- }
- char *def = 0;
- if (lookup_flag) {
- token_buffer += '\0';
- def = macro_table.lookup(token_buffer.contents());
- token_buffer.set_length(token_buffer.length() - 1);
- if (def) {
- if (c == '(') {
- input_stack::get_char();
- interpolate_macro_with_args(def);
- }
- else
- input_stack::push(new macro_input(def));
- }
- }
- if (!def) {
- context_buffer = token_buffer;
- if (csupper(token_buffer[0]))
- return LABEL;
- else
- return VARIABLE;
- }
- }
- else {
- context_buffer = char(c);
- return (unsigned char)c;
- }
- break;
- }
- }
-}
-
-int get_delimited()
-{
- token_buffer.clear();
- int c = input_stack::get_char();
- while (c == ' ' || c == '\t' || c == '\n')
- c = input_stack::get_char();
- if (c == EOF) {
- lex_error("missing delimiter");
- return 0;
- }
- context_buffer = char(c);
- int had_newline = 0;
- int start = c;
- int level = 0;
- enum { NORMAL, IN_STRING, IN_STRING_QUOTED, DELIM_END } state = NORMAL;
- for (;;) {
- c = input_stack::get_char();
- if (c == EOF) {
- lex_error("missing closing delimiter");
- return 0;
- }
- if (c == '\n')
- had_newline = 1;
- else if (!had_newline)
- context_buffer += char(c);
- switch (state) {
- case NORMAL:
- if (start == '{') {
- if (c == '{') {
- level++;
- break;
- }
- if (c == '}') {
- if (--level < 0)
- state = DELIM_END;
- break;
- }
- }
- else {
- if (c == start) {
- state = DELIM_END;
- break;
- }
- }
- if (c == '"')
- state = IN_STRING;
- break;
- case IN_STRING_QUOTED:
- if (c == '\n')
- state = NORMAL;
- else
- state = IN_STRING;
- break;
- case IN_STRING:
- if (c == '"' || c == '\n')
- state = NORMAL;
- else if (c == '\\')
- state = IN_STRING_QUOTED;
- break;
- case DELIM_END:
- // This case it just to shut cfront 2.0 up.
- default:
- assert(0);
- }
- if (state == DELIM_END)
- break;
- token_buffer += c;
- }
- return 1;
-}
-
-void do_define()
-{
- int t = get_token(0); // do not expand what we are defining
- if (t != VARIABLE && t != LABEL) {
- lex_error("can only define variable or placename");
- return;
- }
- token_buffer += '\0';
- string nm = token_buffer;
- const char *name = nm.contents();
- if (!get_delimited())
- return;
- token_buffer += '\0';
- macro_table.define(name, strsave(token_buffer.contents()));
-}
-
-void do_undef()
-{
- int t = get_token(0); // do not expand what we are undefining
- if (t != VARIABLE && t != LABEL) {
- lex_error("can only define variable or placename");
- return;
- }
- token_buffer += '\0';
- macro_table.define(token_buffer.contents(), 0);
-}
-
-
-class for_input : public input {
- char *var;
- char *body;
- double to;
- int by_is_multiplicative;
- double by;
- const char *p;
- int done_newline;
-public:
- for_input(char *, double, int, double, char *);
- ~for_input();
- int get();
- int peek();
-};
-
-for_input::for_input(char *vr, double t, int bim, double b, char *bd)
-: var(vr), body(bd), to(t), by_is_multiplicative(bim), by(b), p(body),
- done_newline(0)
-{
-}
-
-for_input::~for_input()
-{
- a_delete var;
- a_delete body;
-}
-
-int for_input::get()
-{
- if (p == 0)
- return EOF;
- for (;;) {
- if (*p != '\0')
- return (unsigned char)*p++;
- if (!done_newline) {
- done_newline = 1;
- return '\n';
- }
- double val;
- if (!lookup_variable(var, &val)) {
- lex_error("body of `for' terminated enclosing block");
- return EOF;
- }
- if (by_is_multiplicative)
- val *= by;
- else
- val += by;
- define_variable(var, val);
- if (val > to) {
- p = 0;
- return EOF;
- }
- p = body;
- done_newline = 0;
- }
-}
-
-int for_input::peek()
-{
- if (p == 0)
- return EOF;
- if (*p != '\0')
- return (unsigned char)*p;
- if (!done_newline)
- return '\n';
- double val;
- if (!lookup_variable(var, &val))
- return EOF;
- if (by_is_multiplicative) {
- if (val * by > to)
- return EOF;
- }
- else {
- if (val + by > to)
- return EOF;
- }
- if (*body == '\0')
- return EOF;
- return (unsigned char)*body;
-}
-
-void do_for(char *var, double from, double to, int by_is_multiplicative,
- double by, char *body)
-{
- define_variable(var, from);
- if (from <= to)
- input_stack::push(new for_input(var, to, by_is_multiplicative, by, body));
-}
-
-
-void do_copy(const char *filename)
-{
- errno = 0;
- FILE *fp = fopen(filename, "r");
- if (fp == 0) {
- lex_error("can't open `%1': %2", filename, strerror(errno));
- return;
- }
- input_stack::push(new file_input(fp, filename));
-}
-
-class copy_thru_input : public input {
- int done;
- char *body;
- char *until;
- const char *p;
- const char *ap;
- int argv[9];
- int argc;
- string line;
- int get_line();
- virtual int inget() = 0;
-public:
- copy_thru_input(const char *b, const char *u);
- ~copy_thru_input();
- int get();
- int peek();
-};
-
-class copy_file_thru_input : public copy_thru_input {
- input *in;
-public:
- copy_file_thru_input(input *, const char *b, const char *u);
- ~copy_file_thru_input();
- int inget();
-};
-
-copy_file_thru_input::copy_file_thru_input(input *i, const char *b,
- const char *u)
-: copy_thru_input(b, u), in(i)
-{
-}
-
-copy_file_thru_input::~copy_file_thru_input()
-{
- delete in;
-}
-
-int copy_file_thru_input::inget()
-{
- if (!in)
- return EOF;
- else
- return in->get();
-}
-
-class copy_rest_thru_input : public copy_thru_input {
-public:
- copy_rest_thru_input(const char *, const char *u);
- int inget();
-};
-
-copy_rest_thru_input::copy_rest_thru_input(const char *b, const char *u)
-: copy_thru_input(b, u)
-{
-}
-
-int copy_rest_thru_input::inget()
-{
- while (next != 0) {
- int c = next->get();
- if (c != EOF)
- return c;
- if (next->next == 0)
- return EOF;
- input *tem = next;
- next = next->next;
- delete tem;
- }
- return EOF;
-
-}
-
-copy_thru_input::copy_thru_input(const char *b, const char *u)
-: done(0)
-{
- ap = 0;
- body = process_body(b);
- p = 0;
- until = strsave(u);
-}
-
-
-copy_thru_input::~copy_thru_input()
-{
- a_delete body;
- a_delete until;
-}
-
-int copy_thru_input::get()
-{
- if (ap) {
- if (*ap != '\0')
- return (unsigned char)*ap++;
- ap = 0;
- }
- for (;;) {
- if (p == 0) {
- if (!get_line())
- break;
- p = body;
- }
- if (*p == '\0') {
- p = 0;
- return '\n';
- }
- while (*p >= ARG1 && *p <= ARG1 + 8) {
- int i = *p++ - ARG1;
- if (i < argc && line[argv[i]] != '\0') {
- ap = line.contents() + argv[i];
- return (unsigned char)*ap++;
- }
- }
- if (*p != '\0')
- return (unsigned char)*p++;
- }
- return EOF;
-}
-
-int copy_thru_input::peek()
-{
- if (ap) {
- if (*ap != '\0')
- return (unsigned char)*ap;
- ap = 0;
- }
- for (;;) {
- if (p == 0) {
- if (!get_line())
- break;
- p = body;
- }
- if (*p == '\0')
- return '\n';
- while (*p >= ARG1 && *p <= ARG1 + 8) {
- int i = *p++ - ARG1;
- if (i < argc && line[argv[i]] != '\0') {
- ap = line.contents() + argv[i];
- return (unsigned char)*ap;
- }
- }
- if (*p != '\0')
- return (unsigned char)*p;
- }
- return EOF;
-}
-
-int copy_thru_input::get_line()
-{
- if (done)
- return 0;
- line.clear();
- argc = 0;
- int c = inget();
- for (;;) {
- while (c == ' ')
- c = inget();
- if (c == EOF || c == '\n')
- break;
- if (argc == 9) {
- do {
- c = inget();
- } while (c != '\n' && c != EOF);
- break;
- }
- argv[argc++] = line.length();
- do {
- line += char(c);
- c = inget();
- } while (c != ' ' && c != '\n');
- line += '\0';
- }
- if (until != 0 && argc > 0 && strcmp(&line[argv[0]], until) == 0) {
- done = 1;
- return 0;
- }
- return argc > 0 || c == '\n';
-}
-
-class simple_file_input : public input {
- const char *filename;
- int lineno;
- FILE *fp;
-public:
- simple_file_input(FILE *, const char *);
- ~simple_file_input();
- int get();
- int peek();
- int get_location(const char **, int *);
-};
-
-simple_file_input::simple_file_input(FILE *p, const char *s)
-: filename(s), lineno(1), fp(p)
-{
-}
-
-simple_file_input::~simple_file_input()
-{
- // don't delete the filename
- fclose(fp);
-}
-
-int simple_file_input::get()
-{
- int c = getc(fp);
- while (illegal_input_char(c)) {
- error("illegal input character code %1", c);
- c = getc(fp);
- }
- if (c == '\n')
- lineno++;
- return c;
-}
-
-int simple_file_input::peek()
-{
- int c = getc(fp);
- while (illegal_input_char(c)) {
- error("illegal input character code %1", c);
- c = getc(fp);
- }
- if (c != EOF)
- ungetc(c, fp);
- return c;
-}
-
-int simple_file_input::get_location(const char **fnp, int *lnp)
-{
- *fnp = filename;
- *lnp = lineno;
- return 1;
-}
-
-
-void copy_file_thru(const char *filename, const char *body, const char *until)
-{
- errno = 0;
- FILE *fp = fopen(filename, "r");
- if (fp == 0) {
- lex_error("can't open `%1': %2", filename, strerror(errno));
- return;
- }
- input *in = new copy_file_thru_input(new simple_file_input(fp, filename),
- body, until);
- input_stack::push(in);
-}
-
-void copy_rest_thru(const char *body, const char *until)
-{
- input_stack::push(new copy_rest_thru_input(body, until));
-}
-
-void push_body(const char *s)
-{
- input_stack::push(new char_input('\n'));
- input_stack::push(new macro_input(s));
-}
-
-int delim_flag = 0;
-
-char *get_thru_arg()
-{
- int c = input_stack::peek_char();
- while (c == ' ') {
- input_stack::get_char();
- c = input_stack::peek_char();
- }
- if (c != EOF && csalpha(c)) {
- // looks like a macro
- input_stack::get_char();
- token_buffer = c;
- for (;;) {
- c = input_stack::peek_char();
- if (c == EOF || (!csalnum(c) && c != '_'))
- break;
- input_stack::get_char();
- token_buffer += char(c);
- }
- context_buffer = token_buffer;
- token_buffer += '\0';
- char *def = macro_table.lookup(token_buffer.contents());
- if (def)
- return strsave(def);
- // I guess it wasn't a macro after all; so push the macro name back.
- // -2 because we added a '\0'
- for (int i = token_buffer.length() - 2; i >= 0; i--)
- input_stack::push_back(token_buffer[i]);
- }
- if (get_delimited()) {
- token_buffer += '\0';
- return strsave(token_buffer.contents());
- }
- else
- return 0;
-}
-
-int lookahead_token = -1;
-string old_context_buffer;
-
-void do_lookahead()
-{
- if (lookahead_token == -1) {
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- }
-}
-
-int yylex()
-{
- if (delim_flag) {
- assert(lookahead_token == -1);
- if (delim_flag == 2) {
- if ((yylval.str = get_thru_arg()) != 0)
- return DELIMITED;
- else
- return 0;
- }
- else {
- if (get_delimited()) {
- token_buffer += '\0';
- yylval.str = strsave(token_buffer.contents());
- return DELIMITED;
- }
- else
- return 0;
- }
- }
- for (;;) {
- int t;
- if (lookahead_token >= 0) {
- t = lookahead_token;
- lookahead_token = -1;
- }
- else
- t = get_token(1);
- switch (t) {
- case '\n':
- return ';';
- case EOF:
- return 0;
- case DEFINE:
- do_define();
- break;
- case UNDEF:
- do_undef();
- break;
- case ORDINAL:
- yylval.n = token_int;
- return t;
- case NUMBER:
- yylval.x = token_double;
- return t;
- case COMMAND_LINE:
- case TEXT:
- token_buffer += '\0';
- if (!input_stack::get_location(&yylval.lstr.filename,
- &yylval.lstr.lineno)) {
- yylval.lstr.filename = 0;
- yylval.lstr.lineno = -1;
- }
- yylval.lstr.str = strsave(token_buffer.contents());
- return t;
- case LABEL:
- case VARIABLE:
- token_buffer += '\0';
- yylval.str = strsave(token_buffer.contents());
- return t;
- case LEFT:
- // change LEFT to LEFT_CORNER when followed by OF
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- if (lookahead_token == OF)
- return LEFT_CORNER;
- else
- return t;
- case RIGHT:
- // change RIGHT to RIGHT_CORNER when followed by OF
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- if (lookahead_token == OF)
- return RIGHT_CORNER;
- else
- return t;
- case UPPER:
- // recognise UPPER only before LEFT or RIGHT
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- if (lookahead_token != LEFT && lookahead_token != RIGHT) {
- yylval.str = strsave("upper");
- return VARIABLE;
- }
- else
- return t;
- case LOWER:
- // recognise LOWER only before LEFT or RIGHT
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- if (lookahead_token != LEFT && lookahead_token != RIGHT) {
- yylval.str = strsave("lower");
- return VARIABLE;
- }
- else
- return t;
- case TOP:
- // recognise TOP only before OF
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- if (lookahead_token != OF) {
- yylval.str = strsave("top");
- return VARIABLE;
- }
- else
- return t;
- case BOTTOM:
- // recognise BOTTOM only before OF
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- if (lookahead_token != OF) {
- yylval.str = strsave("bottom");
- return VARIABLE;
- }
- else
- return t;
- case CENTER:
- // recognise CENTER only before OF
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- if (lookahead_token != OF) {
- yylval.str = strsave("center");
- return VARIABLE;
- }
- else
- return t;
- case START:
- // recognise START only before OF
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- if (lookahead_token != OF) {
- yylval.str = strsave("start");
- return VARIABLE;
- }
- else
- return t;
- case END:
- // recognise END only before OF
- old_context_buffer = context_buffer;
- lookahead_token = get_token(1);
- if (lookahead_token != OF) {
- yylval.str = strsave("end");
- return VARIABLE;
- }
- else
- return t;
- default:
- return t;
- }
- }
-}
-
-void lex_error(const char *message,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- const char *filename;
- int lineno;
- if (!input_stack::get_location(&filename, &lineno))
- error(message, arg1, arg2, arg3);
- else
- error_with_file_and_line(filename, lineno, message, arg1, arg2, arg3);
-}
-
-void lex_warning(const char *message,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- const char *filename;
- int lineno;
- if (!input_stack::get_location(&filename, &lineno))
- warning(message, arg1, arg2, arg3);
- else
- warning_with_file_and_line(filename, lineno, message, arg1, arg2, arg3);
-}
-
-void yyerror(const char *s)
-{
- const char *filename;
- int lineno;
- const char *context = 0;
- if (lookahead_token == -1) {
- if (context_buffer.length() > 0) {
- context_buffer += '\0';
- context = context_buffer.contents();
- }
- }
- else {
- if (old_context_buffer.length() > 0) {
- old_context_buffer += '\0';
- context = old_context_buffer.contents();
- }
- }
- if (!input_stack::get_location(&filename, &lineno)) {
- if (context) {
- if (context[0] == '\n' && context[1] == '\0')
- error("%1 before newline", s);
- else
- error("%1 before `%2'", s, context);
- }
- else
- error("%1 at end of picture", s);
- }
- else {
- if (context) {
- if (context[0] == '\n' && context[1] == '\0')
- error_with_file_and_line(filename, lineno, "%1 before newline", s);
- else
- error_with_file_and_line(filename, lineno, "%1 before `%2'",
- s, context);
- }
- else
- error_with_file_and_line(filename, lineno, "%1 at end of picture", s);
- }
-}
-
diff --git a/contrib/groff/src/preproc/pic/main.cc b/contrib/groff/src/preproc/pic/main.cc
deleted file mode 100644
index 87d2b9300074..000000000000
--- a/contrib/groff/src/preproc/pic/main.cc
+++ /dev/null
@@ -1,635 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "pic.h"
-
-extern int yyparse();
-
-output *out;
-
-int flyback_flag;
-int zero_length_line_flag = 0;
-// Non-zero means we're using a groff driver.
-int driver_extension_flag = 1;
-int compatible_flag = 0;
-int safer_flag = 1;
-int command_char = '.'; // the character that introduces lines
- // that should be passed through tranparently
-static int lf_flag = 1; // non-zero if we should attempt to understand
- // lines beginning with `.lf'
-
-// Non-zero means a parse error was encountered.
-static int had_parse_error = 0;
-
-void do_file(const char *filename);
-
-class top_input : public input {
- FILE *fp;
- int bol;
- int eof;
- int push_back[3];
- int start_lineno;
-public:
- top_input(FILE *);
- int get();
- int peek();
- int get_location(const char **, int *);
-};
-
-top_input::top_input(FILE *p) : fp(p), bol(1), eof(0)
-{
- push_back[0] = push_back[1] = push_back[2] = EOF;
- start_lineno = current_lineno;
-}
-
-int top_input::get()
-{
- if (eof)
- return EOF;
- if (push_back[2] != EOF) {
- int c = push_back[2];
- push_back[2] = EOF;
- return c;
- }
- else if (push_back[1] != EOF) {
- int c = push_back[1];
- push_back[1] = EOF;
- return c;
- }
- else if (push_back[0] != EOF) {
- int c = push_back[0];
- push_back[0] = EOF;
- return c;
- }
- int c = getc(fp);
- while (illegal_input_char(c)) {
- error("illegal input character code %1", int(c));
- c = getc(fp);
- bol = 0;
- }
- if (bol && c == '.') {
- c = getc(fp);
- if (c == 'P') {
- c = getc(fp);
- if (c == 'F' || c == 'E') {
- int d = getc(fp);
- if (d != EOF)
- ungetc(d, fp);
- if (d == EOF || d == ' ' || d == '\n' || compatible_flag) {
- eof = 1;
- flyback_flag = c == 'F';
- return EOF;
- }
- push_back[0] = c;
- push_back[1] = 'P';
- return '.';
- }
- if (c == 'S') {
- c = getc(fp);
- if (c != EOF)
- ungetc(c, fp);
- if (c == EOF || c == ' ' || c == '\n' || compatible_flag) {
- error("nested .PS");
- eof = 1;
- return EOF;
- }
- push_back[0] = 'S';
- push_back[1] = 'P';
- return '.';
- }
- if (c != EOF)
- ungetc(c, fp);
- push_back[0] = 'P';
- return '.';
- }
- else {
- if (c != EOF)
- ungetc(c, fp);
- return '.';
- }
- }
- if (c == '\n') {
- bol = 1;
- current_lineno++;
- return '\n';
- }
- bol = 0;
- if (c == EOF) {
- eof = 1;
- error("end of file before .PE or .PF");
- error_with_file_and_line(current_filename, start_lineno - 1,
- ".PS was here");
- }
- return c;
-}
-
-int top_input::peek()
-{
- if (eof)
- return EOF;
- if (push_back[2] != EOF)
- return push_back[2];
- if (push_back[1] != EOF)
- return push_back[1];
- if (push_back[0] != EOF)
- return push_back[0];
- int c = getc(fp);
- while (illegal_input_char(c)) {
- error("illegal input character code %1", int(c));
- c = getc(fp);
- bol = 0;
- }
- if (bol && c == '.') {
- c = getc(fp);
- if (c == 'P') {
- c = getc(fp);
- if (c == 'F' || c == 'E') {
- int d = getc(fp);
- if (d != EOF)
- ungetc(d, fp);
- if (d == EOF || d == ' ' || d == '\n' || compatible_flag) {
- eof = 1;
- flyback_flag = c == 'F';
- return EOF;
- }
- push_back[0] = c;
- push_back[1] = 'P';
- push_back[2] = '.';
- return '.';
- }
- if (c == 'S') {
- c = getc(fp);
- if (c != EOF)
- ungetc(c, fp);
- if (c == EOF || c == ' ' || c == '\n' || compatible_flag) {
- error("nested .PS");
- eof = 1;
- return EOF;
- }
- push_back[0] = 'S';
- push_back[1] = 'P';
- push_back[2] = '.';
- return '.';
- }
- if (c != EOF)
- ungetc(c, fp);
- push_back[0] = 'P';
- push_back[1] = '.';
- return '.';
- }
- else {
- if (c != EOF)
- ungetc(c, fp);
- push_back[0] = '.';
- return '.';
- }
- }
- if (c != EOF)
- ungetc(c, fp);
- if (c == '\n')
- return '\n';
- return c;
-}
-
-int top_input::get_location(const char **filenamep, int *linenop)
-{
- *filenamep = current_filename;
- *linenop = current_lineno;
- return 1;
-}
-
-void do_picture(FILE *fp)
-{
- flyback_flag = 0;
- int c;
- while ((c = getc(fp)) == ' ')
- ;
- if (c == '<') {
- string filename;
- while ((c = getc(fp)) == ' ')
- ;
- while (c != EOF && c != ' ' && c != '\n') {
- filename += char(c);
- c = getc(fp);
- }
- if (c == ' ') {
- do {
- c = getc(fp);
- } while (c != EOF && c != '\n');
- }
- if (c == '\n')
- current_lineno++;
- if (filename.length() == 0)
- error("missing filename after `<'");
- else {
- filename += '\0';
- const char *old_filename = current_filename;
- int old_lineno = current_lineno;
- // filenames must be permanent
- do_file(strsave(filename.contents()));
- current_filename = old_filename;
- current_lineno = old_lineno;
- }
- out->set_location(current_filename, current_lineno);
- }
- else {
- out->set_location(current_filename, current_lineno);
- string start_line;
- while (c != EOF) {
- if (c == '\n') {
- current_lineno++;
- break;
- }
- start_line += c;
- c = getc(fp);
- }
- if (c == EOF)
- return;
- start_line += '\0';
- double wid, ht;
- switch (sscanf(&start_line[0], "%lf %lf", &wid, &ht)) {
- case 1:
- ht = 0.0;
- break;
- case 2:
- break;
- default:
- ht = wid = 0.0;
- break;
- }
- out->set_desired_width_height(wid, ht);
- out->set_args(start_line.contents());
- lex_init(new top_input(fp));
- if (yyparse()) {
- had_parse_error = 1;
- lex_error("giving up on this picture");
- }
- parse_cleanup();
- lex_cleanup();
-
- // skip the rest of the .PF/.PE line
- while ((c = getc(fp)) != EOF && c != '\n')
- ;
- if (c == '\n')
- current_lineno++;
- out->set_location(current_filename, current_lineno);
- }
-}
-
-void do_file(const char *filename)
-{
- FILE *fp;
- if (strcmp(filename, "-") == 0)
- fp = stdin;
- else {
- errno = 0;
- fp = fopen(filename, "r");
- if (fp == 0)
- fatal("can't open `%1': %2", filename, strerror(errno));
- }
- out->set_location(filename, 1);
- current_filename = filename;
- current_lineno = 1;
- enum { START, MIDDLE, HAD_DOT, HAD_P, HAD_PS, HAD_l, HAD_lf } state = START;
- for (;;) {
- int c = getc(fp);
- if (c == EOF)
- break;
- switch (state) {
- case START:
- if (c == '.')
- state = HAD_DOT;
- else {
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case MIDDLE:
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- break;
- case HAD_DOT:
- if (c == 'P')
- state = HAD_P;
- else if (lf_flag && c == 'l')
- state = HAD_l;
- else {
- putchar('.');
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case HAD_P:
- if (c == 'S')
- state = HAD_PS;
- else {
- putchar('.');
- putchar('P');
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case HAD_PS:
- if (c == ' ' || c == '\n' || compatible_flag) {
- ungetc(c, fp);
- do_picture(fp);
- state = START;
- }
- else {
- fputs(".PS", stdout);
- putchar(c);
- state = MIDDLE;
- }
- break;
- case HAD_l:
- if (c == 'f')
- state = HAD_lf;
- else {
- putchar('.');
- putchar('l');
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case HAD_lf:
- if (c == ' ' || c == '\n' || compatible_flag) {
- string line;
- while (c != EOF) {
- line += c;
- if (c == '\n') {
- current_lineno++;
- break;
- }
- c = getc(fp);
- }
- line += '\0';
- interpret_lf_args(line.contents());
- printf(".lf%s", line.contents());
- state = START;
- }
- else {
- fputs(".lf", stdout);
- putchar(c);
- state = MIDDLE;
- }
- break;
- default:
- assert(0);
- }
- }
- switch (state) {
- case START:
- break;
- case MIDDLE:
- putchar('\n');
- break;
- case HAD_DOT:
- fputs(".\n", stdout);
- break;
- case HAD_P:
- fputs(".P\n", stdout);
- break;
- case HAD_PS:
- fputs(".PS\n", stdout);
- break;
- case HAD_l:
- fputs(".l\n", stdout);
- break;
- case HAD_lf:
- fputs(".lf\n", stdout);
- break;
- }
- if (fp != stdin)
- fclose(fp);
-}
-
-#ifdef FIG_SUPPORT
-void do_whole_file(const char *filename)
-{
- // Do not set current_filename.
- FILE *fp;
- if (strcmp(filename, "-") == 0)
- fp = stdin;
- else {
- errno = 0;
- fp = fopen(filename, "r");
- if (fp == 0)
- fatal("can't open `%1': %2", filename, strerror(errno));
- }
- lex_init(new file_input(fp, filename));
- if (yyparse())
- had_parse_error = 1;
- parse_cleanup();
- lex_cleanup();
-}
-#endif
-
-void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [ -nvC ] [ filename ... ]\n", program_name);
-#ifdef TEX_SUPPORT
- fprintf(stream, " %s -t [ -cvzC ] [ filename ... ]\n", program_name);
-#endif
-#ifdef FIG_SUPPORT
- fprintf(stream, " %s -f [ -v ] [ filename ]\n", program_name);
-#endif
-}
-
-#ifdef __MSDOS__
-static char *fix_program_name(char *arg, char *dflt)
-{
- if (!arg)
- return dflt;
- char *prog = strchr(arg, '\0');
- for (;;) {
- if (prog == arg)
- break;
- --prog;
- if (strchr("\\/:", *prog)) {
- prog++;
- break;
- }
- }
- char *ext = strchr(prog, '.');
- if (ext)
- *ext = '\0';
- for (char *p = prog; *p; p++)
- if ('A' <= *p && *p <= 'Z')
- *p = 'a' + (*p - 'A');
- return prog;
-}
-#endif /* __MSDOS__ */
-
-int main(int argc, char **argv)
-{
-#ifdef __MSDOS__
- argv[0] = fix_program_name(argv[0], "pic");
-#endif /* __MSDOS__ */
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int opt;
-#ifdef TEX_SUPPORT
- int tex_flag = 0;
- int tpic_flag = 0;
-#endif
-#ifdef FIG_SUPPORT
- int whole_file_flag = 0;
- int fig_flag = 0;
-#endif
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv, "T:CDSUtcvnxzpf", long_options, NULL))
- != EOF)
- switch (opt) {
- case 'C':
- compatible_flag = 1;
- break;
- case 'D':
- case 'T':
- break;
- case 'S':
- safer_flag = 1;
- break;
- case 'U':
- safer_flag = 0;
- break;
- case 'f':
-#ifdef FIG_SUPPORT
- whole_file_flag++;
- fig_flag++;
-#else
- fatal("fig support not included");
-#endif
- break;
- case 'n':
- driver_extension_flag = 0;
- break;
- case 'p':
- case 'x':
- warning("-%1 option is obsolete", char(opt));
- break;
- case 't':
-#ifdef TEX_SUPPORT
- tex_flag++;
-#else
- fatal("TeX support not included");
-#endif
- break;
- case 'c':
-#ifdef TEX_SUPPORT
- tpic_flag++;
-#else
- fatal("TeX support not included");
-#endif
- break;
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU pic (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'z':
- // zero length lines will be printed as dots
- zero_length_line_flag++;
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
- parse_init();
-#ifdef TEX_SUPPORT
- if (tpic_flag) {
- out = make_tpic_output();
- lf_flag = 0;
- }
- else if (tex_flag) {
- out = make_tex_output();
- command_char = '\\';
- lf_flag = 0;
- }
- else
-#endif
-#ifdef FIG_SUPPORT
- if (fig_flag)
- out = make_fig_output();
- else
-#endif
- out = make_troff_output();
-#ifdef FIG_SUPPORT
- if (whole_file_flag) {
- if (optind >= argc)
- do_whole_file("-");
- else if (argc - optind > 1) {
- usage(stderr);
- exit(1);
- } else
- do_whole_file(argv[optind]);
- }
- else {
-#endif
- if (optind >= argc)
- do_file("-");
- else
- for (int i = optind; i < argc; i++)
- do_file(argv[i]);
-#ifdef FIG_SUPPORT
- }
-#endif
- delete out;
- if (ferror(stdout) || fflush(stdout) < 0)
- fatal("output error");
- return had_parse_error;
-}
-
diff --git a/contrib/groff/src/preproc/pic/object.cc b/contrib/groff/src/preproc/pic/object.cc
deleted file mode 100644
index 6b346330e4e2..000000000000
--- a/contrib/groff/src/preproc/pic/object.cc
+++ /dev/null
@@ -1,1833 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "pic.h"
-#include "ptable.h"
-#include "object.h"
-
-void print_object_list(object *);
-
-line_type::line_type()
-: type(solid), thickness(1.0)
-{
-}
-
-output::output() : args(0), desired_height(0.0), desired_width(0.0)
-{
-}
-
-output::~output()
-{
- a_delete args;
-}
-
-void output::set_desired_width_height(double wid, double ht)
-{
- desired_width = wid;
- desired_height = ht;
-}
-
-void output::set_args(const char *s)
-{
- a_delete args;
- if (s == 0 || *s == '\0')
- args = 0;
- else
- args = strsave(s);
-}
-
-void output::command(const char *, const char *, int)
-{
-}
-
-void output::set_location(const char *, int)
-{
-}
-
-int output::supports_filled_polygons()
-{
- return 0;
-}
-
-void output::begin_block(const position &, const position &)
-{
-}
-
-void output::end_block()
-{
-}
-
-double output::compute_scale(double sc, const position &ll, const position &ur)
-{
- distance dim = ur - ll;
- if (desired_width != 0.0 || desired_height != 0.0) {
- sc = 0.0;
- if (desired_width != 0.0) {
- if (dim.x == 0.0)
- error("width specified for picture with zero width");
- else
- sc = dim.x/desired_width;
- }
- if (desired_height != 0.0) {
- if (dim.y == 0.0)
- error("height specified for picture with zero height");
- else {
- double tem = dim.y/desired_height;
- if (tem > sc)
- sc = tem;
- }
- }
- return sc == 0.0 ? 1.0 : sc;
- }
- else {
- if (sc <= 0.0)
- sc = 1.0;
- distance sdim = dim/sc;
- double max_width = 0.0;
- lookup_variable("maxpswid", &max_width);
- double max_height = 0.0;
- lookup_variable("maxpsht", &max_height);
- if ((max_width > 0.0 && sdim.x > max_width)
- || (max_height > 0.0 && sdim.y > max_height)) {
- double xscale = dim.x/max_width;
- double yscale = dim.y/max_height;
- return xscale > yscale ? xscale : yscale;
- }
- else
- return sc;
- }
-}
-
-position::position(const place &pl)
-{
- if (pl.obj != 0) {
- // Use two statements to work around bug in SGI C++.
- object *tem = pl.obj;
- *this = tem->origin();
- }
- else {
- x = pl.x;
- y = pl.y;
- }
-}
-
-position::position() : x(0.0), y(0.0)
-{
-}
-
-position::position(double a, double b) : x(a), y(b)
-{
-}
-
-
-int operator==(const position &a, const position &b)
-{
- return a.x == b.x && a.y == b.y;
-}
-
-int operator!=(const position &a, const position &b)
-{
- return a.x != b.x || a.y != b.y;
-}
-
-position &position::operator+=(const position &a)
-{
- x += a.x;
- y += a.y;
- return *this;
-}
-
-position &position::operator-=(const position &a)
-{
- x -= a.x;
- y -= a.y;
- return *this;
-}
-
-position &position::operator*=(double a)
-{
- x *= a;
- y *= a;
- return *this;
-}
-
-position &position::operator/=(double a)
-{
- x /= a;
- y /= a;
- return *this;
-}
-
-position operator-(const position &a)
-{
- return position(-a.x, -a.y);
-}
-
-position operator+(const position &a, const position &b)
-{
- return position(a.x + b.x, a.y + b.y);
-}
-
-position operator-(const position &a, const position &b)
-{
- return position(a.x - b.x, a.y - b.y);
-}
-
-position operator/(const position &a, double n)
-{
- return position(a.x/n, a.y/n);
-}
-
-position operator*(const position &a, double n)
-{
- return position(a.x*n, a.y*n);
-}
-
-// dot product
-
-double operator*(const position &a, const position &b)
-{
- return a.x*b.x + a.y*b.y;
-}
-
-double hypot(const position &a)
-{
- return hypot(a.x, a.y);
-}
-
-struct arrow_head_type {
- double height;
- double width;
- int solid;
-};
-
-void draw_arrow(const position &pos, const distance &dir,
- const arrow_head_type &aht, const line_type &lt)
-{
- double hyp = hypot(dir);
- if (hyp == 0.0) {
- error("cannot draw arrow on object with zero length");
- return;
- }
- position base = -dir;
- base *= aht.height/hyp;
- position n(dir.y, -dir.x);
- n *= aht.width/(hyp*2.0);
- line_type slt = lt;
- slt.type = line_type::solid;
- if (aht.solid && out->supports_filled_polygons()) {
- position v[3];
- v[0] = pos;
- v[1] = pos + base + n;
- v[2] = pos + base - n;
- // A value > 1 means fill with the current color.
- out->polygon(v, 3, slt, 2.0);
- }
- else {
- position v[2];
- v[0] = pos;
- v[1] = pos + base + n;
- out->line(pos + base - n, v, 2, slt);
- }
-}
-
-object::object() : prev(0), next(0)
-{
-}
-
-object::~object()
-{
-}
-
-void object::move_by(const position &)
-{
-}
-
-void object::print()
-{
-}
-
-void object::print_text()
-{
-}
-
-int object::blank()
-{
- return 0;
-}
-
-struct bounding_box {
- int blank;
- position ll;
- position ur;
-
- bounding_box();
- void encompass(const position &);
-};
-
-bounding_box::bounding_box()
-: blank(1)
-{
-}
-
-void bounding_box::encompass(const position &pos)
-{
- if (blank) {
- ll = pos;
- ur = pos;
- blank = 0;
- }
- else {
- if (pos.x < ll.x)
- ll.x = pos.x;
- if (pos.y < ll.y)
- ll.y = pos.y;
- if (pos.x > ur.x)
- ur.x = pos.x;
- if (pos.y > ur.y)
- ur.y = pos.y;
- }
-}
-
-void object::update_bounding_box(bounding_box *)
-{
-}
-
-position object::origin()
-{
- return position(0.0,0.0);
-}
-
-position object::north()
-{
- return origin();
-}
-
-position object::south()
-{
- return origin();
-}
-
-position object::east()
-{
- return origin();
-}
-
-position object::west()
-{
- return origin();
-}
-
-position object::north_east()
-{
- return origin();
-}
-
-position object::north_west()
-{
- return origin();
-}
-
-position object::south_east()
-{
- return origin();
-}
-
-position object::south_west()
-{
- return origin();
-}
-
-position object::start()
-{
- return origin();
-}
-
-position object::end()
-{
- return origin();
-}
-
-position object::center()
-{
- return origin();
-}
-
-double object::width()
-{
- return 0.0;
-}
-
-double object::radius()
-{
- return 0.0;
-}
-
-double object::height()
-{
- return 0.0;
-}
-
-place *object::find_label(const char *)
-{
- return 0;
-}
-
-segment::segment(const position &a, int n, segment *p)
-: is_absolute(n), pos(a), next(p)
-{
-}
-
-text_item::text_item(char *t, const char *fn, int ln)
-: next(0), text(t), filename(fn), lineno(ln)
-{
- adj.h = CENTER_ADJUST;
- adj.v = NONE_ADJUST;
-}
-
-text_item::~text_item()
-{
- a_delete text;
-}
-
-object_spec::object_spec(object_type t) : type(t)
-{
- flags = 0;
- tbl = 0;
- segment_list = 0;
- segment_width = segment_height = 0.0;
- segment_is_absolute = 0;
- text = 0;
- with = 0;
- dir = RIGHT_DIRECTION;
-}
-
-object_spec::~object_spec()
-{
- delete tbl;
- while (segment_list != 0) {
- segment *tem = segment_list;
- segment_list = segment_list->next;
- delete tem;
- }
- object *p = oblist.head;
- while (p != 0) {
- object *tem = p;
- p = p->next;
- delete tem;
- }
- while (text != 0) {
- text_item *tem = text;
- text = text->next;
- delete tem;
- }
- delete with;
-}
-
-class command_object : public object {
- char *s;
- const char *filename;
- int lineno;
-public:
- command_object(char *, const char *, int);
- ~command_object();
- object_type type() { return OTHER_OBJECT; }
- void print();
-};
-
-command_object::command_object(char *p, const char *fn, int ln)
-: s(p), filename(fn), lineno(ln)
-{
-}
-
-command_object::~command_object()
-{
- a_delete s;
-}
-
-void command_object::print()
-{
- out->command(s, filename, lineno);
-}
-
-object *make_command_object(char *s, const char *fn, int ln)
-{
- return new command_object(s, fn, ln);
-}
-
-class mark_object : public object {
-public:
- mark_object();
- object_type type();
-};
-
-object *make_mark_object()
-{
- return new mark_object();
-}
-
-mark_object::mark_object()
-{
-}
-
-object_type mark_object::type()
-{
- return MARK_OBJECT;
-}
-
-object_list::object_list() : head(0), tail(0)
-{
-}
-
-void object_list::append(object *obj)
-{
- if (tail == 0) {
- obj->next = obj->prev = 0;
- head = tail = obj;
- }
- else {
- obj->prev = tail;
- obj->next = 0;
- tail->next = obj;
- tail = obj;
- }
-}
-
-void object_list::wrap_up_block(object_list *ol)
-{
- object *p;
- for (p = tail; p && p->type() != MARK_OBJECT; p = p->prev)
- ;
- assert(p != 0);
- ol->head = p->next;
- if (ol->head) {
- ol->tail = tail;
- ol->head->prev = 0;
- }
- else
- ol->tail = 0;
- tail = p->prev;
- if (tail)
- tail->next = 0;
- else
- head = 0;
- delete p;
-}
-
-text_piece::text_piece()
-: text(0), filename(0), lineno(-1)
-{
- adj.h = CENTER_ADJUST;
- adj.v = NONE_ADJUST;
-}
-
-text_piece::~text_piece()
-{
- a_delete text;
-}
-
-class graphic_object : public object {
- int ntext;
- text_piece *text;
- int aligned;
-protected:
- line_type lt;
-public:
- graphic_object();
- ~graphic_object();
- object_type type() = 0;
- void print_text();
- void add_text(text_item *, int);
- void set_dotted(double);
- void set_dashed(double);
- void set_thickness(double);
- void set_invisible();
- virtual void set_fill(double);
-};
-
-graphic_object::graphic_object() : ntext(0), text(0), aligned(0)
-{
-}
-
-void graphic_object::set_dotted(double wid)
-{
- lt.type = line_type::dotted;
- lt.dash_width = wid;
-}
-
-void graphic_object::set_dashed(double wid)
-{
- lt.type = line_type::dashed;
- lt.dash_width = wid;
-}
-
-void graphic_object::set_thickness(double th)
-{
- lt.thickness = th;
-}
-
-void graphic_object::set_fill(double)
-{
-}
-
-void graphic_object::set_invisible()
-{
- lt.type = line_type::invisible;
-}
-
-void graphic_object::add_text(text_item *t, int a)
-{
- aligned = a;
- int len = 0;
- text_item *p;
- for (p = t; p; p = p->next)
- len++;
- if (len == 0)
- text = 0;
- else {
- text = new text_piece[len];
- for (p = t, len = 0; p; p = p->next, len++) {
- text[len].text = p->text;
- p->text = 0;
- text[len].adj = p->adj;
- text[len].filename = p->filename;
- text[len].lineno = p->lineno;
- }
- }
- ntext = len;
-}
-
-void graphic_object::print_text()
-{
- double angle = 0.0;
- if (aligned) {
- position d(end() - start());
- if (d.x != 0.0 || d.y != 0.0)
- angle = atan2(d.y, d.x);
- }
- if (text != 0)
- out->text(center(), text, ntext, angle);
-}
-
-graphic_object::~graphic_object()
-{
- if (text)
- ad_delete(ntext) text;
-}
-
-class rectangle_object : public graphic_object {
-protected:
- position cent;
- position dim;
-public:
- rectangle_object(const position &);
- double width() { return dim.x; }
- double height() { return dim.y; }
- position origin() { return cent; }
- position center() { return cent; }
- position north() { return position(cent.x, cent.y + dim.y/2.0); }
- position south() { return position(cent.x, cent.y - dim.y/2.0); }
- position east() { return position(cent.x + dim.x/2.0, cent.y); }
- position west() { return position(cent.x - dim.x/2.0, cent.y); }
- position north_east() { return position(cent.x + dim.x/2.0, cent.y + dim.y/2.0); }
- position north_west() { return position(cent.x - dim.x/2.0, cent.y + dim.y/2.0); }
- position south_east() { return position(cent.x + dim.x/2.0, cent.y - dim.y/2.0); }
- position south_west() { return position(cent.x - dim.x/2.0, cent.y - dim.y/2.0); }
- object_type type() = 0;
- void update_bounding_box(bounding_box *);
- void move_by(const position &);
-};
-
-rectangle_object::rectangle_object(const position &d)
-: dim(d)
-{
-}
-
-void rectangle_object::update_bounding_box(bounding_box *p)
-{
- p->encompass(cent - dim/2.0);
- p->encompass(cent + dim/2.0);
-}
-
-void rectangle_object::move_by(const position &a)
-{
- cent += a;
-}
-
-class closed_object : public rectangle_object {
-public:
- closed_object(const position &);
- object_type type() = 0;
- void set_fill(double);
-protected:
- double fill; // < 0 if not filled
-};
-
-closed_object::closed_object(const position &pos)
-: rectangle_object(pos), fill(-1.0)
-{
-}
-
-void closed_object::set_fill(double f)
-{
- assert(f >= 0.0);
- fill = f;
-}
-
-
-class box_object : public closed_object {
- double xrad;
- double yrad;
-public:
- box_object(const position &, double);
- object_type type() { return BOX_OBJECT; }
- void print();
- position north_east();
- position north_west();
- position south_east();
- position south_west();
-};
-
-box_object::box_object(const position &pos, double r)
-: closed_object(pos), xrad(dim.x > 0 ? r : -r), yrad(dim.y > 0 ? r : -r)
-{
-}
-
-const double CHOP_FACTOR = 1.0 - 1.0/M_SQRT2;
-
-position box_object::north_east()
-{
- return position(cent.x + dim.x/2.0 - CHOP_FACTOR*xrad,
- cent.y + dim.y/2.0 - CHOP_FACTOR*yrad);
-}
-
-position box_object::north_west()
-{
- return position(cent.x - dim.x/2.0 + CHOP_FACTOR*xrad,
- cent.y + dim.y/2.0 - CHOP_FACTOR*yrad);
-}
-
-position box_object::south_east()
-{
- return position(cent.x + dim.x/2.0 - CHOP_FACTOR*xrad,
- cent.y - dim.y/2.0 + CHOP_FACTOR*yrad);
-}
-
-position box_object::south_west()
-{
- return position(cent.x - dim.x/2.0 + CHOP_FACTOR*xrad,
- cent.y - dim.y/2.0 + CHOP_FACTOR*yrad);
-}
-
-void box_object::print()
-{
- if (lt.type == line_type::invisible && fill < 0.0)
- return;
- if (xrad == 0.0) {
- distance dim2 = dim/2.0;
- position vec[4];
- vec[0] = cent + position(dim2.x, -dim2.y);
- vec[1] = cent + position(dim2.x, dim2.y);
- vec[2] = cent + position(-dim2.x, dim2.y);
- vec[3] = cent + position(-dim2.x, -dim2.y);
- out->polygon(vec, 4, lt, fill);
- }
- else {
- distance abs_dim(fabs(dim.x), fabs(dim.y));
- out->rounded_box(cent, abs_dim, fabs(xrad), lt, fill);
- }
-}
-
-graphic_object *object_spec::make_box(position *curpos, direction *dirp)
-{
- static double last_box_height;
- static double last_box_width;
- static double last_box_radius;
- static int have_last_box = 0;
- if (!(flags & HAS_HEIGHT)) {
- if ((flags & IS_SAME) && have_last_box)
- height = last_box_height;
- else
- lookup_variable("boxht", &height);
- }
- if (!(flags & HAS_WIDTH)) {
- if ((flags & IS_SAME) && have_last_box)
- width = last_box_width;
- else
- lookup_variable("boxwid", &width);
- }
- if (!(flags & HAS_RADIUS)) {
- if ((flags & IS_SAME) && have_last_box)
- radius = last_box_radius;
- else
- lookup_variable("boxrad", &radius);
- }
- last_box_width = width;
- last_box_height = height;
- last_box_radius = radius;
- have_last_box = 1;
- radius = fabs(radius);
- if (radius*2.0 > fabs(width))
- radius = fabs(width/2.0);
- if (radius*2.0 > fabs(height))
- radius = fabs(height/2.0);
- box_object *p = new box_object(position(width, height), radius);
- if (!position_rectangle(p, curpos, dirp)) {
- delete p;
- p = 0;
- }
- return p;
-}
-
-// return non-zero for success
-
-int object_spec::position_rectangle(rectangle_object *p,
- position *curpos, direction *dirp)
-{
- position pos;
- dir = *dirp; // ignore any direction in attribute list
- position motion;
- switch (dir) {
- case UP_DIRECTION:
- motion.y = p->height()/2.0;
- break;
- case DOWN_DIRECTION:
- motion.y = -p->height()/2.0;
- break;
- case LEFT_DIRECTION:
- motion.x = -p->width()/2.0;
- break;
- case RIGHT_DIRECTION:
- motion.x = p->width()/2.0;
- break;
- default:
- assert(0);
- }
- if (flags & HAS_AT) {
- pos = at;
- if (flags & HAS_WITH) {
- place offset;
- place here;
- here.obj = p;
- if (!with->follow(here, &offset))
- return 0;
- pos -= offset;
- }
- }
- else {
- pos = *curpos;
- pos += motion;
- }
- p->move_by(pos);
- pos += motion;
- *curpos = pos;
- return 1;
-}
-
-class block_object : public rectangle_object {
- object_list oblist;
- PTABLE(place) *tbl;
-public:
- block_object(const position &, const object_list &ol, PTABLE(place) *t);
- ~block_object();
- place *find_label(const char *);
- object_type type();
- void move_by(const position &);
- void print();
-};
-
-block_object::block_object(const position &d, const object_list &ol,
- PTABLE(place) *t)
-: rectangle_object(d), oblist(ol), tbl(t)
-{
-}
-
-block_object::~block_object()
-{
- delete tbl;
- object *p = oblist.head;
- while (p != 0) {
- object *tem = p;
- p = p->next;
- delete tem;
- }
-}
-
-void block_object::print()
-{
- out->begin_block(south_west(), north_east());
- print_object_list(oblist.head);
- out->end_block();
-}
-
-static void adjust_objectless_places(PTABLE(place) *tbl, const position &a)
-{
- // Adjust all the labels that aren't attached to objects.
- PTABLE_ITERATOR(place) iter(tbl);
- const char *key;
- place *pl;
- while (iter.next(&key, &pl))
- if (key && csupper(key[0]) && pl->obj == 0) {
- pl->x += a.x;
- pl->y += a.y;
- }
-}
-
-void block_object::move_by(const position &a)
-{
- cent += a;
- for (object *p = oblist.head; p; p = p->next)
- p->move_by(a);
- adjust_objectless_places(tbl, a);
-}
-
-
-place *block_object::find_label(const char *name)
-{
- return tbl->lookup(name);
-}
-
-object_type block_object::type()
-{
- return BLOCK_OBJECT;
-}
-
-graphic_object *object_spec::make_block(position *curpos, direction *dirp)
-{
- bounding_box bb;
- for (object *p = oblist.head; p; p = p->next)
- p->update_bounding_box(&bb);
- position dim;
- if (!bb.blank) {
- position m = -(bb.ll + bb.ur)/2.0;
- for (object *p = oblist.head; p; p = p->next)
- p->move_by(m);
- adjust_objectless_places(tbl, m);
- dim = bb.ur - bb.ll;
- }
- if (flags & HAS_WIDTH)
- dim.x = width;
- if (flags & HAS_HEIGHT)
- dim.y = height;
- block_object *block = new block_object(dim, oblist, tbl);
- if (!position_rectangle(block, curpos, dirp)) {
- delete block;
- block = 0;
- }
- tbl = 0;
- oblist.head = oblist.tail = 0;
- return block;
-}
-
-class text_object : public rectangle_object {
-public:
- text_object(const position &);
- object_type type() { return TEXT_OBJECT; }
-};
-
-text_object::text_object(const position &d)
-: rectangle_object(d)
-{
-}
-
-graphic_object *object_spec::make_text(position *curpos, direction *dirp)
-{
- if (!(flags & HAS_HEIGHT)) {
- lookup_variable("textht", &height);
- int nitems = 0;
- for (text_item *t = text; t; t = t->next)
- nitems++;
- height *= nitems;
- }
- if (!(flags & HAS_WIDTH))
- lookup_variable("textwid", &width);
- text_object *p = new text_object(position(width, height));
- if (!position_rectangle(p, curpos, dirp)) {
- delete p;
- p = 0;
- }
- return p;
-}
-
-
-class ellipse_object : public closed_object {
-public:
- ellipse_object(const position &);
- position north_east() { return position(cent.x + dim.x/(M_SQRT2*2.0),
- cent.y + dim.y/(M_SQRT2*2.0)); }
- position north_west() { return position(cent.x - dim.x/(M_SQRT2*2.0),
- cent.y + dim.y/(M_SQRT2*2.0)); }
- position south_east() { return position(cent.x + dim.x/(M_SQRT2*2.0),
- cent.y - dim.y/(M_SQRT2*2.0)); }
- position south_west() { return position(cent.x - dim.x/(M_SQRT2*2.0),
- cent.y - dim.y/(M_SQRT2*2.0)); }
- double radius() { return dim.x/2.0; }
- object_type type() { return ELLIPSE_OBJECT; }
- void print();
-};
-
-ellipse_object::ellipse_object(const position &d)
-: closed_object(d)
-{
-}
-
-void ellipse_object::print()
-{
- if (lt.type == line_type::invisible && fill < 0.0)
- return;
- out->ellipse(cent, dim, lt, fill);
-}
-
-graphic_object *object_spec::make_ellipse(position *curpos, direction *dirp)
-{
- static double last_ellipse_height;
- static double last_ellipse_width;
- static int have_last_ellipse = 0;
- if (!(flags & HAS_HEIGHT)) {
- if ((flags & IS_SAME) && have_last_ellipse)
- height = last_ellipse_height;
- else
- lookup_variable("ellipseht", &height);
- }
- if (!(flags & HAS_WIDTH)) {
- if ((flags & IS_SAME) && have_last_ellipse)
- width = last_ellipse_width;
- else
- lookup_variable("ellipsewid", &width);
- }
- last_ellipse_width = width;
- last_ellipse_height = height;
- have_last_ellipse = 1;
- ellipse_object *p = new ellipse_object(position(width, height));
- if (!position_rectangle(p, curpos, dirp)) {
- delete p;
- return 0;
- }
- return p;
-}
-
-class circle_object : public ellipse_object {
-public:
- circle_object(double);
- object_type type() { return CIRCLE_OBJECT; }
- void print();
-};
-
-circle_object::circle_object(double diam)
-: ellipse_object(position(diam, diam))
-{
-}
-
-void circle_object::print()
-{
- if (lt.type == line_type::invisible && fill < 0.0)
- return;
- out->circle(cent, dim.x/2.0, lt, fill);
-}
-
-graphic_object *object_spec::make_circle(position *curpos, direction *dirp)
-{
- static double last_circle_radius;
- static int have_last_circle = 0;
- if (!(flags & HAS_RADIUS)) {
- if ((flags & IS_SAME) && have_last_circle)
- radius = last_circle_radius;
- else
- lookup_variable("circlerad", &radius);
- }
- last_circle_radius = radius;
- have_last_circle = 1;
- circle_object *p = new circle_object(radius*2.0);
- if (!position_rectangle(p, curpos, dirp)) {
- delete p;
- return 0;
- }
- return p;
-}
-
-class move_object : public graphic_object {
- position strt;
- position en;
-public:
- move_object(const position &s, const position &e);
- position origin() { return en; }
- object_type type() { return MOVE_OBJECT; }
- void update_bounding_box(bounding_box *);
- void move_by(const position &);
-};
-
-move_object::move_object(const position &s, const position &e)
-: strt(s), en(e)
-{
-}
-
-void move_object::update_bounding_box(bounding_box *p)
-{
- p->encompass(strt);
- p->encompass(en);
-}
-
-void move_object::move_by(const position &a)
-{
- strt += a;
- en += a;
-}
-
-graphic_object *object_spec::make_move(position *curpos, direction *dirp)
-{
- static position last_move;
- static int have_last_move = 0;
- *dirp = dir;
- // No need to look at at since `at' attribute sets `from' attribute.
- position startpos = (flags & HAS_FROM) ? from : *curpos;
- if (!(flags & HAS_SEGMENT)) {
- if ((flags && IS_SAME) && have_last_move)
- segment_pos = last_move;
- else {
- switch (dir) {
- case UP_DIRECTION:
- segment_pos.y = segment_height;
- break;
- case DOWN_DIRECTION:
- segment_pos.y = -segment_height;
- break;
- case LEFT_DIRECTION:
- segment_pos.x = -segment_width;
- break;
- case RIGHT_DIRECTION:
- segment_pos.x = segment_width;
- break;
- default:
- assert(0);
- }
- }
- }
- segment_list = new segment(segment_pos, segment_is_absolute, segment_list);
- // Reverse the segment_list so that it's in forward order.
- segment *old = segment_list;
- segment_list = 0;
- while (old != 0) {
- segment *tem = old->next;
- old->next = segment_list;
- segment_list = old;
- old = tem;
- }
- // Compute the end position.
- position endpos = startpos;
- for (segment *s = segment_list; s; s = s->next)
- if (s->is_absolute)
- endpos = s->pos;
- else
- endpos += s->pos;
- have_last_move = 1;
- last_move = endpos - startpos;
- move_object *p = new move_object(startpos, endpos);
- *curpos = endpos;
- return p;
-}
-
-class linear_object : public graphic_object {
-protected:
- char arrow_at_start;
- char arrow_at_end;
- arrow_head_type aht;
- position strt;
- position en;
-public:
- linear_object(const position &s, const position &e);
- position start() { return strt; }
- position end() { return en; }
- void move_by(const position &);
- void update_bounding_box(bounding_box *) = 0;
- object_type type() = 0;
- void add_arrows(int at_start, int at_end, const arrow_head_type &);
-};
-
-class line_object : public linear_object {
-protected:
- position *v;
- int n;
-public:
- line_object(const position &s, const position &e, position *, int);
- ~line_object();
- position origin() { return strt; }
- position center() { return (strt + en)/2.0; }
- position north() { return (en.y - strt.y) > 0 ? en : strt; }
- position south() { return (en.y - strt.y) < 0 ? en : strt; }
- position east() { return (en.x - strt.x) > 0 ? en : strt; }
- position west() { return (en.x - strt.x) < 0 ? en : strt; }
- object_type type() { return LINE_OBJECT; }
- void update_bounding_box(bounding_box *);
- void print();
- void move_by(const position &);
-};
-
-class arrow_object : public line_object {
-public:
- arrow_object(const position &, const position &, position *, int);
- object_type type() { return ARROW_OBJECT; }
-};
-
-class spline_object : public line_object {
-public:
- spline_object(const position &, const position &, position *, int);
- object_type type() { return SPLINE_OBJECT; }
- void print();
- void update_bounding_box(bounding_box *);
-};
-
-linear_object::linear_object(const position &s, const position &e)
-: arrow_at_start(0), arrow_at_end(0), strt(s), en(e)
-{
-}
-
-void linear_object::move_by(const position &a)
-{
- strt += a;
- en += a;
-}
-
-void linear_object::add_arrows(int at_start, int at_end,
- const arrow_head_type &a)
-{
- arrow_at_start = at_start;
- arrow_at_end = at_end;
- aht = a;
-}
-
-line_object::line_object(const position &s, const position &e,
- position *p, int i)
-: linear_object(s, e), v(p), n(i)
-{
-}
-
-void line_object::print()
-{
- if (lt.type == line_type::invisible)
- return;
- out->line(strt, v, n, lt);
- if (arrow_at_start)
- draw_arrow(strt, strt-v[0], aht, lt);
- if (arrow_at_end)
- draw_arrow(en, v[n-1] - (n > 1 ? v[n - 2] : strt), aht, lt);
-}
-
-void line_object::update_bounding_box(bounding_box *p)
-{
- p->encompass(strt);
- for (int i = 0; i < n; i++)
- p->encompass(v[i]);
-}
-
-void line_object::move_by(const position &pos)
-{
- linear_object::move_by(pos);
- for (int i = 0; i < n; i++)
- v[i] += pos;
-}
-
-void spline_object::update_bounding_box(bounding_box *p)
-{
- p->encompass(strt);
- p->encompass(en);
- /*
-
- If
-
- p1 = q1/2 + q2/2
- p2 = q1/6 + q2*5/6
- p3 = q2*5/6 + q3/6
- p4 = q2/2 + q3/2
- [ the points for the Bezier cubic ]
-
- and
-
- t = .5
-
- then
-
- (1-t)^3*p1 + 3*t*(t - 1)^2*p2 + 3*t^2*(1-t)*p3 + t^3*p4
- [ the equation for the Bezier cubic ]
-
- = .125*q1 + .75*q2 + .125*q3
-
- */
- for (int i = 1; i < n; i++)
- p->encompass((i == 1 ? strt : v[i-2])*.125 + v[i-1]*.75 + v[i]*.125);
-}
-
-arrow_object::arrow_object(const position &s, const position &e,
- position *p, int i)
-: line_object(s, e, p, i)
-{
-}
-
-spline_object::spline_object(const position &s, const position &e,
- position *p, int i)
-: line_object(s, e, p, i)
-{
-}
-
-void spline_object::print()
-{
- if (lt.type == line_type::invisible)
- return;
- out->spline(strt, v, n, lt);
- if (arrow_at_start)
- draw_arrow(strt, strt-v[0], aht, lt);
- if (arrow_at_end)
- draw_arrow(en, v[n-1] - (n > 1 ? v[n - 2] : strt), aht, lt);
-}
-
-line_object::~line_object()
-{
- a_delete v;
-}
-
-linear_object *object_spec::make_line(position *curpos, direction *dirp)
-{
- static position last_line;
- static int have_last_line = 0;
- *dirp = dir;
- // No need to look at at since `at' attribute sets `from' attribute.
- position startpos = (flags & HAS_FROM) ? from : *curpos;
- if (!(flags & HAS_SEGMENT)) {
- if ((flags & IS_SAME) && (type == LINE_OBJECT || type == ARROW_OBJECT)
- && have_last_line)
- segment_pos = last_line;
- else
- switch (dir) {
- case UP_DIRECTION:
- segment_pos.y = segment_height;
- break;
- case DOWN_DIRECTION:
- segment_pos.y = -segment_height;
- break;
- case LEFT_DIRECTION:
- segment_pos.x = -segment_width;
- break;
- case RIGHT_DIRECTION:
- segment_pos.x = segment_width;
- break;
- default:
- assert(0);
- }
- }
- segment_list = new segment(segment_pos, segment_is_absolute, segment_list);
- // reverse the segment_list so that it's in forward order
- segment *old = segment_list;
- segment_list = 0;
- while (old != 0) {
- segment *tem = old->next;
- old->next = segment_list;
- segment_list = old;
- old = tem;
- }
- // Absolutise all movements
- position endpos = startpos;
- int nsegments = 0;
- segment *s;
- for (s = segment_list; s; s = s->next, nsegments++)
- if (s->is_absolute)
- endpos = s->pos;
- else {
- endpos += s->pos;
- s->pos = endpos;
- s->is_absolute = 1; // to avoid confusion
- }
- // handle chop
- line_object *p = 0;
- position *v = new position[nsegments];
- int i = 0;
- for (s = segment_list; s; s = s->next, i++)
- v[i] = s->pos;
- if (flags & IS_DEFAULT_CHOPPED) {
- lookup_variable("circlerad", &start_chop);
- end_chop = start_chop;
- flags |= IS_CHOPPED;
- }
- if (flags & IS_CHOPPED) {
- position start_chop_vec, end_chop_vec;
- if (start_chop != 0.0) {
- start_chop_vec = v[0] - startpos;
- start_chop_vec *= start_chop / hypot(start_chop_vec);
- }
- if (end_chop != 0.0) {
- end_chop_vec = (v[nsegments - 1]
- - (nsegments > 1 ? v[nsegments - 2] : startpos));
- end_chop_vec *= end_chop / hypot(end_chop_vec);
- }
- startpos += start_chop_vec;
- v[nsegments - 1] -= end_chop_vec;
- endpos -= end_chop_vec;
- }
- switch (type) {
- case SPLINE_OBJECT:
- p = new spline_object(startpos, endpos, v, nsegments);
- break;
- case ARROW_OBJECT:
- p = new arrow_object(startpos, endpos, v, nsegments);
- break;
- case LINE_OBJECT:
- p = new line_object(startpos, endpos, v, nsegments);
- break;
- default:
- assert(0);
- }
- have_last_line = 1;
- last_line = endpos - startpos;
- *curpos = endpos;
- return p;
-}
-
-class arc_object : public linear_object {
- int clockwise;
- position cent;
- double rad;
-public:
- arc_object(int, const position &, const position &, const position &);
- position origin() { return cent; }
- position center() { return cent; }
- double radius() { return rad; }
- position north();
- position south();
- position east();
- position west();
- position north_east();
- position north_west();
- position south_east();
- position south_west();
- void update_bounding_box(bounding_box *);
- object_type type() { return ARC_OBJECT; }
- void print();
- void move_by(const position &pos);
-};
-
-arc_object::arc_object(int cw, const position &s, const position &e,
- const position &c)
-: linear_object(s, e), clockwise(cw), cent(c)
-{
- rad = hypot(c - s);
-}
-
-void arc_object::move_by(const position &pos)
-{
- linear_object::move_by(pos);
- cent += pos;
-}
-
-// we get arc corners from the corresponding circle
-
-position arc_object::north()
-{
- position result(cent);
- result.y += rad;
- return result;
-}
-
-position arc_object::south()
-{
- position result(cent);
- result.y -= rad;
- return result;
-}
-
-position arc_object::east()
-{
- position result(cent);
- result.x += rad;
- return result;
-}
-
-position arc_object::west()
-{
- position result(cent);
- result.x -= rad;
- return result;
-}
-
-position arc_object::north_east()
-{
- position result(cent);
- result.x += rad/M_SQRT2;
- result.y += rad/M_SQRT2;
- return result;
-}
-
-position arc_object::north_west()
-{
- position result(cent);
- result.x -= rad/M_SQRT2;
- result.y += rad/M_SQRT2;
- return result;
-}
-
-position arc_object::south_east()
-{
- position result(cent);
- result.x += rad/M_SQRT2;
- result.y -= rad/M_SQRT2;
- return result;
-}
-
-position arc_object::south_west()
-{
- position result(cent);
- result.x -= rad/M_SQRT2;
- result.y -= rad/M_SQRT2;
- return result;
-}
-
-
-void arc_object::print()
-{
- if (lt.type == line_type::invisible)
- return;
- if (clockwise)
- out->arc(en, cent, strt, lt);
- else
- out->arc(strt, cent, en, lt);
- if (arrow_at_start) {
- position c = cent - strt;
- draw_arrow(strt,
- (clockwise ? position(c.y, -c.x) : position(-c.y, c.x)),
- aht, lt);
- }
- if (arrow_at_end) {
- position e = en - cent;
- draw_arrow(en,
- (clockwise ? position(e.y, -e.x) : position(-e.y, e.x)),
- aht, lt);
- }
-}
-
-inline double max(double a, double b)
-{
- return a > b ? a : b;
-}
-
-void arc_object::update_bounding_box(bounding_box *p)
-{
- p->encompass(strt);
- p->encompass(en);
- position start_offset = strt - cent;
- if (start_offset.x == 0.0 && start_offset.y == 0.0)
- return;
- position end_offset = en - cent;
- if (end_offset.x == 0.0 && end_offset.y == 0.0)
- return;
- double start_quad = atan2(start_offset.y, start_offset.x)/(M_PI/2.0);
- double end_quad = atan2(end_offset.y, end_offset.x)/(M_PI/2.0);
- if (clockwise) {
- double temp = start_quad;
- start_quad = end_quad;
- end_quad = temp;
- }
- if (start_quad < 0.0)
- start_quad += 4.0;
- while (end_quad <= start_quad)
- end_quad += 4.0;
- double radius = max(hypot(start_offset), hypot(end_offset));
- for (int q = int(start_quad) + 1; q < end_quad; q++) {
- position offset;
- switch (q % 4) {
- case 0:
- offset.x = radius;
- break;
- case 1:
- offset.y = radius;
- break;
- case 2:
- offset.x = -radius;
- break;
- case 3:
- offset.y = -radius;
- break;
- }
- p->encompass(cent + offset);
- }
-}
-
-// We ignore the with attribute. The at attribute always refers to the center.
-
-linear_object *object_spec::make_arc(position *curpos, direction *dirp)
-{
- *dirp = dir;
- int cw = (flags & IS_CLOCKWISE) != 0;
- // compute the start
- position startpos;
- if (flags & HAS_FROM)
- startpos = from;
- else
- startpos = *curpos;
- if (!(flags & HAS_RADIUS))
- lookup_variable("arcrad", &radius);
- // compute the end
- position endpos;
- if (flags & HAS_TO)
- endpos = to;
- else {
- position m(radius, radius);
- // Adjust the signs.
- if (cw) {
- if (dir == DOWN_DIRECTION || dir == LEFT_DIRECTION)
- m.x = -m.x;
- if (dir == DOWN_DIRECTION || dir == RIGHT_DIRECTION)
- m.y = -m.y;
- *dirp = direction((dir + 3) % 4);
- }
- else {
- if (dir == UP_DIRECTION || dir == LEFT_DIRECTION)
- m.x = -m.x;
- if (dir == DOWN_DIRECTION || dir == LEFT_DIRECTION)
- m.y = -m.y;
- *dirp = direction((dir + 1) % 4);
- }
- endpos = startpos + m;
- }
- // compute the center
- position centerpos;
- if (flags & HAS_AT)
- centerpos = at;
- else if (startpos == endpos)
- centerpos = startpos;
- else {
- position h = (endpos - startpos)/2.0;
- double d = hypot(h);
- if (radius <= 0)
- radius = .25;
- // make the radius big enough
- while (radius < d)
- radius *= 2.0;
- double alpha = acos(d/radius);
- double theta = atan2(h.y, h.x);
- if (cw)
- theta -= alpha;
- else
- theta += alpha;
- centerpos = position(cos(theta), sin(theta))*radius + startpos;
- }
- arc_object *p = new arc_object(cw, startpos, endpos, centerpos);
- *curpos = endpos;
- return p;
-}
-
-graphic_object *object_spec::make_linear(position *curpos, direction *dirp)
-{
- linear_object *obj;
- if (type == ARC_OBJECT)
- obj = make_arc(curpos, dirp);
- else
- obj = make_line(curpos, dirp);
- if (type == ARROW_OBJECT
- && (flags & (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD)) == 0)
- flags |= HAS_RIGHT_ARROW_HEAD;
- if (obj && (flags & (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD))) {
- arrow_head_type a;
- int at_start = (flags & HAS_LEFT_ARROW_HEAD) != 0;
- int at_end = (flags & HAS_RIGHT_ARROW_HEAD) != 0;
- if (flags & HAS_HEIGHT)
- a.height = height;
- else
- lookup_variable("arrowht", &a.height);
- if (flags & HAS_WIDTH)
- a.width = width;
- else
- lookup_variable("arrowwid", &a.width);
- double solid;
- lookup_variable("arrowhead", &solid);
- a.solid = solid != 0.0;
- obj->add_arrows(at_start, at_end, a);
- }
- return obj;
-}
-
-object *object_spec::make_object(position *curpos, direction *dirp)
-{
- graphic_object *obj = 0;
- switch (type) {
- case BLOCK_OBJECT:
- obj = make_block(curpos, dirp);
- break;
- case BOX_OBJECT:
- obj = make_box(curpos, dirp);
- break;
- case TEXT_OBJECT:
- obj = make_text(curpos, dirp);
- break;
- case ELLIPSE_OBJECT:
- obj = make_ellipse(curpos, dirp);
- break;
- case CIRCLE_OBJECT:
- obj = make_circle(curpos, dirp);
- break;
- case MOVE_OBJECT:
- obj = make_move(curpos, dirp);
- break;
- case ARC_OBJECT:
- case LINE_OBJECT:
- case SPLINE_OBJECT:
- case ARROW_OBJECT:
- obj = make_linear(curpos, dirp);
- break;
- case MARK_OBJECT:
- case OTHER_OBJECT:
- default:
- assert(0);
- break;
- }
- if (obj) {
- if (flags & IS_INVISIBLE)
- obj->set_invisible();
- if (text != 0)
- obj->add_text(text, (flags & IS_ALIGNED) != 0);
- if (flags & IS_DOTTED)
- obj->set_dotted(dash_width);
- else if (flags & IS_DASHED)
- obj->set_dashed(dash_width);
- double th;
- if (flags & HAS_THICKNESS)
- th = thickness;
- else
- lookup_variable("linethick", &th);
- obj->set_thickness(th);
- if (flags & (IS_DEFAULT_FILLED|IS_FILLED)) {
- if (flags & IS_DEFAULT_FILLED)
- lookup_variable("fillval", &fill);
- if (fill < 0.0)
- error("bad fill value %1", fill);
- else
- obj->set_fill(fill);
- }
- }
- return obj;
-}
-
-struct string_list {
- string_list *next;
- char *str;
- string_list(char *);
- ~string_list();
-};
-
-string_list::string_list(char *s)
-: next(0), str(s)
-{
-}
-
-string_list::~string_list()
-{
- a_delete str;
-}
-
-/* A path is used to hold the argument to the with attribute. For example,
-`.nw' or `.A.s' or `.A'. The major operation on a path is to take a
-place and follow the path through the place to place within the place.
-Note that `.A.B.C.sw' will work. */
-
-path::path(corner c)
-: crn(c), label_list(0), ypath(0)
-{
-}
-
-path::path(char *l, corner c)
-: crn(c), ypath(0)
-{
- label_list = new string_list(l);
-}
-
-path::~path()
-{
- while (label_list) {
- string_list *tem = label_list;
- label_list = label_list->next;
- delete tem;
- }
- delete ypath;
-}
-
-void path::append(corner c)
-{
- assert(crn == 0);
- crn = c;
-}
-
-void path::append(char *s)
-{
- string_list **p;
- for (p = &label_list; *p; p = &(*p)->next)
- ;
- *p = new string_list(s);
-}
-
-void path::set_ypath(path *p)
-{
- ypath = p;
-}
-
-// return non-zero for success
-
-int path::follow(const place &pl, place *result) const
-{
- const place *p = &pl;
- for (string_list *lb = label_list; lb; lb = lb->next)
- if (p->obj == 0 || (p = p->obj->find_label(lb->str)) == 0) {
- lex_error("object does not contain a place `%1'", lb->str);
- return 0;
- }
- if (crn == 0 || p->obj == 0)
- *result = *p;
- else {
- position pos = ((p->obj)->*(crn))();
- result->x = pos.x;
- result->y = pos.y;
- result->obj = 0;
- }
- if (ypath) {
- place tem;
- if (!ypath->follow(pl, &tem))
- return 0;
- result->y = tem.y;
- if (result->obj != tem.obj)
- result->obj = 0;
- }
- return 1;
-}
-
-void print_object_list(object *p)
-{
- for (; p; p = p->next) {
- p->print();
- p->print_text();
- }
-}
-
-void print_picture(object *obj)
-{
- bounding_box bb;
- for (object *p = obj; p; p = p->next)
- p->update_bounding_box(&bb);
- double scale;
- lookup_variable("scale", &scale);
- out->start_picture(scale, bb.ll, bb.ur);
- print_object_list(obj);
- out->finish_picture();
-}
-
diff --git a/contrib/groff/src/preproc/pic/object.h b/contrib/groff/src/preproc/pic/object.h
deleted file mode 100644
index 2748e81e8465..000000000000
--- a/contrib/groff/src/preproc/pic/object.h
+++ /dev/null
@@ -1,217 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct place;
-
-enum object_type {
- OTHER_OBJECT,
- BOX_OBJECT,
- CIRCLE_OBJECT,
- ELLIPSE_OBJECT,
- ARC_OBJECT,
- SPLINE_OBJECT,
- LINE_OBJECT,
- ARROW_OBJECT,
- MOVE_OBJECT,
- TEXT_OBJECT,
- BLOCK_OBJECT,
- MARK_OBJECT
- };
-
-struct bounding_box;
-
-struct object {
- object *prev;
- object *next;
- object();
- virtual ~object();
- virtual position origin();
- virtual double width();
- virtual double radius();
- virtual double height();
- virtual position north();
- virtual position south();
- virtual position east();
- virtual position west();
- virtual position north_east();
- virtual position north_west();
- virtual position south_east();
- virtual position south_west();
- virtual position start();
- virtual position end();
- virtual position center();
- virtual place *find_label(const char *);
- virtual void move_by(const position &);
- virtual int blank();
- virtual void update_bounding_box(bounding_box *);
- virtual object_type type() = 0;
- virtual void print();
- virtual void print_text();
-};
-
-typedef position (object::*corner)();
-
-struct place {
- object *obj;
- double x, y;
-};
-
-struct string_list;
-
-class path {
- corner crn;
- string_list *label_list;
- path *ypath;
-public:
- path(corner = 0);
- path(char *, corner = 0);
- ~path();
- void append(corner);
- void append(char *);
- void set_ypath(path *);
- int follow(const place &, place *) const;
-};
-
-struct object_list {
- object *head;
- object *tail;
- object_list();
- void append(object *);
- void wrap_up_block(object_list *);
-};
-
-declare_ptable(place)
-
-// these go counterclockwise
-enum direction {
- RIGHT_DIRECTION,
- UP_DIRECTION,
- LEFT_DIRECTION,
- DOWN_DIRECTION
- };
-
-struct graphics_state {
- double x, y;
- direction dir;
-};
-
-struct saved_state : public graphics_state {
- saved_state *prev;
- PTABLE(place) *tbl;
-};
-
-
-struct text_item {
- text_item *next;
- char *text;
- adjustment adj;
- const char *filename;
- int lineno;
-
- text_item(char *, const char *, int);
- ~text_item();
-};
-
-const unsigned long IS_DOTTED = 01;
-const unsigned long IS_DASHED = 02;
-const unsigned long IS_CLOCKWISE = 04;
-const unsigned long IS_INVISIBLE = 020;
-const unsigned long HAS_LEFT_ARROW_HEAD = 040;
-const unsigned long HAS_RIGHT_ARROW_HEAD = 0100;
-const unsigned long HAS_SEGMENT = 0200;
-const unsigned long IS_SAME = 0400;
-const unsigned long HAS_FROM = 01000;
-const unsigned long HAS_AT = 02000;
-const unsigned long HAS_WITH = 04000;
-const unsigned long HAS_HEIGHT = 010000;
-const unsigned long HAS_WIDTH = 020000;
-const unsigned long HAS_RADIUS = 040000;
-const unsigned long HAS_TO = 0100000;
-const unsigned long IS_CHOPPED = 0200000;
-const unsigned long IS_DEFAULT_CHOPPED = 0400000;
-const unsigned long HAS_THICKNESS = 01000000;
-const unsigned long IS_FILLED = 02000000;
-const unsigned long IS_DEFAULT_FILLED = 04000000;
-const unsigned long IS_ALIGNED = 010000000;
-
-struct segment {
- int is_absolute;
- position pos;
- segment *next;
- segment(const position &, int, segment *);
-};
-
-struct rectangle_object;
-struct graphic_object;
-struct linear_object;
-
-struct object_spec {
- unsigned long flags;
- object_type type;
- object_list oblist;
- PTABLE(place) *tbl;
- double dash_width;
- position from;
- position to;
- position at;
- position by;
- path *with;
- text_item *text;
- double height;
- double radius;
- double width;
- double segment_width;
- double segment_height;
- double start_chop;
- double end_chop;
- double thickness;
- double fill;
- direction dir;
- segment *segment_list;
- position segment_pos;
- int segment_is_absolute;
-
- object_spec(object_type);
- ~object_spec();
- object *make_object(position *, direction *);
- graphic_object *make_box(position *, direction *);
- graphic_object *make_block(position *, direction *);
- graphic_object *make_text(position *, direction *);
- graphic_object *make_ellipse(position *, direction *);
- graphic_object *make_circle(position *, direction *);
- linear_object *make_line(position *, direction *);
- linear_object *make_arc(position *, direction *);
- graphic_object *make_linear(position *, direction *);
- graphic_object *make_move(position *, direction *);
- int position_rectangle(rectangle_object *p, position *curpos,
- direction *dirp);
-};
-
-
-object *make_object(object_spec *, position *, direction *);
-
-object *make_mark_object();
-object *make_command_object(char *, const char *, int);
-
-int lookup_variable(const char *name, double *val);
-void define_variable(const char *name, double val);
-
-void print_picture(object *);
-
diff --git a/contrib/groff/src/preproc/pic/output.h b/contrib/groff/src/preproc/pic/output.h
deleted file mode 100644
index ac490db463e3..000000000000
--- a/contrib/groff/src/preproc/pic/output.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct line_type {
- enum { invisible, solid, dotted, dashed } type;
- double dash_width;
- double thickness; // the thickness is in points
-
- line_type();
-};
-
-
-class output {
-protected:
- char *args;
- double desired_height; // zero if no height specified
- double desired_width; // zero if no depth specified
- double compute_scale(double, const position &, const position &);
-public:
- output();
- virtual ~output();
- void set_desired_width_height(double wid, double ht);
- void set_args(const char *);
- virtual void start_picture(double sc, const position &ll, const position &ur) = 0;
- virtual void finish_picture() = 0;
- virtual void circle(const position &, double rad,
- const line_type &, double) = 0;
- virtual void text(const position &, text_piece *, int, double) = 0;
- virtual void line(const position &, const position *, int n,
- const line_type &) = 0;
- virtual void polygon(const position *, int n,
- const line_type &, double) = 0;
- virtual void spline(const position &, const position *, int n,
- const line_type &) = 0;
- virtual void arc(const position &, const position &, const position &,
- const line_type &) = 0;
- virtual void ellipse(const position &, const distance &,
- const line_type &, double) = 0;
- virtual void rounded_box(const position &, const distance &, double,
- const line_type &, double) = 0;
- virtual void command(const char *, const char *, int);
- virtual void set_location(const char *, int);
- virtual int supports_filled_polygons();
- virtual void begin_block(const position &ll, const position &ur);
- virtual void end_block();
-};
-
-extern output *out;
-
-/* #define FIG_SUPPORT 1 */
-#define TEX_SUPPORT 1
-
-output *make_troff_output();
-
-#ifdef TEX_SUPPORT
-output *make_tex_output();
-output *make_tpic_output();
-#endif /* TEX_SUPPORT */
-
-#ifdef FIG_SUPPORT
-output *make_fig_output();
-#endif /* FIG_SUPPORT */
diff --git a/contrib/groff/src/preproc/pic/pic.h b/contrib/groff/src/preproc/pic/pic.h
deleted file mode 100644
index 36c36d1b8a00..000000000000
--- a/contrib/groff/src/preproc/pic/pic.h
+++ /dev/null
@@ -1,104 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#ifdef NEED_DECLARATION_HYPOT
-extern "C" {
- double hypot(double, double);
-}
-#endif /* NEED_DECLARATION_HYPOT */
-
-#include "assert.h"
-#include "cset.h"
-#include "lib.h"
-#include "stringclass.h"
-#include "errarg.h"
-#include "error.h"
-#include "position.h"
-#include "text.h"
-#include "output.h"
-
-#ifndef M_SQRT2
-#define M_SQRT2 1.41421356237309504880
-#endif
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-class input {
- input *next;
-public:
- input();
- virtual ~input();
- virtual int get() = 0;
- virtual int peek() = 0;
- virtual int get_location(const char **, int *);
- friend class input_stack;
- friend class copy_rest_thru_input;
-};
-
-class file_input : public input {
- FILE *fp;
- const char *filename;
- int lineno;
- string line;
- const char *ptr;
- int read_line();
-public:
- file_input(FILE *, const char *);
- ~file_input();
- int get();
- int peek();
- int get_location(const char **, int *);
-};
-
-void lex_init(input *);
-int get_location(char **, int *);
-
-void do_copy(const char *file);
-void parse_init();
-void parse_cleanup();
-
-void lex_error(const char *message,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-void lex_warning(const char *message,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-void lex_cleanup();
-
-extern int flyback_flag;
-extern int command_char;
-// zero_length_line_flag is non-zero if zero-length lines are drawn
-// as dots by the output device
-extern int zero_length_line_flag;
-extern int driver_extension_flag;
-extern int compatible_flag;
-extern int safer_flag;
diff --git a/contrib/groff/src/preproc/pic/pic.man b/contrib/groff/src/preproc/pic/pic.man
deleted file mode 100644
index e18702171187..000000000000
--- a/contrib/groff/src/preproc/pic/pic.man
+++ /dev/null
@@ -1,883 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
-.el .ds tx TeX
-.ie \n(.g .ds ic \/
-.el .ds ic \^
-.\" The BSD man macros can't handle " in arguments to font change macros,
-.\" so use \(ts instead of ".
-.tr \(ts"
-.TH @G@PIC @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-@g@pic \- compile pictures for troff or TeX
-.SH SYNOPSIS
-.B @g@pic
-[
-.B \-nvCSU
-]
-[
-.I filename
-\&.\|.\|.
-]
-.br
-.B @g@pic
-.B \-t
-[
-.B \-cvzCSU
-]
-[
-.I filename
-\&.\|.\|.
-]
-.SH DESCRIPTION
-This manual page describes the GNU version of
-.BR pic ,
-which is part of the groff document formatting system.
-.B pic
-compiles descriptions of pictures embedded within
-.B troff
-or \*(tx input files into commands that are understood by \*(tx or
-.BR troff .
-Each picture starts with a line beginning with
-.B .PS
-and ends with a line beginning with
-.BR .PE .
-Anything outside of
-.B .PS
-and
-.B .PE
-is passed through without change.
-.LP
-It is the user's responsibility to provide appropriate definitions of the
-.B PS
-and
-.B PE
-macros.
-When the macro package being used does not supply such definitions
-(for example, old versions of \-ms),
-appropriate definitions can be obtained with
-.BR \-mpic :
-these will center each picture.
-.SH OPTIONS
-Options that do not take arguments may be grouped behind a single
-.BR \- .
-The special option
-.B \-\^\-
-can be used to mark the end of the options.
-A filename of
-.B \-
-refers to the standard input.
-.TP
-.B \-C
-Recognize
-.B .PS
-and
-.B .PE
-even when followed by a character other than space or newline.
-.TP
-.B \-S
-Safer mode; do not execute
-.B sh
-commands.
-This can be useful when operating on untrustworthy input.
-(enabled by default)
-.TP
-.B \-U
-Unsafe mode; revert the default option
-.BR \-S .
-.TP
-.B \-n
-Don't use the groff extensions to the troff drawing commands.
-You should use this if you are using a postprocessor that doesn't support
-these extensions.
-The extensions are described in
-.BR groff_out (@MAN5EXT@).
-The
-.B \-n
-option also causes
-.B pic
-not to use zero-length lines to draw dots in troff mode.
-.TP
-.B \-t
-\*(tx mode.
-.TP
-.B \-c
-Be more compatible with
-.BR tpic .
-Implies
-.BR \-t .
-Lines beginning with
-.B \e
-are not passed through transparently.
-Lines beginning with
-.B .
-are passed through with the initial
-.B .
-changed to
-.BR \e .
-A line beginning with
-.B .ps
-is given special treatment:
-it takes an optional integer argument specifying
-the line thickness (pen size) in milliinches;
-a missing argument restores the previous line thickness;
-the default line thickness is 8 milliinches.
-The line thickness thus specified takes effect only
-when a non-negative line thickness has not been
-specified by use of the
-.B thickness
-attribute or by setting the
-.B linethick
-variable.
-.TP
-.B \-v
-Print the version number.
-.TP
-.B \-z
-In \*(tx mode draw dots using zero-length lines.
-.LP
-The following options supported by other versions of
-.B pic
-are ignored:
-.TP
-.B \-D
-Draw all lines using the \eD escape sequence.
-.B pic
-always does this.
-.TP
-.BI \-T \ dev
-Generate output for the
-.B troff
-device
-.IR dev .
-This is unnecessary because the
-.B troff
-output generated by
-.B pic
-is device-independent.
-.SH USAGE
-This section describes only the differences between GNU
-.B pic
-and the original version of
-.BR pic .
-Many of these differences also apply to newer versions of Unix
-.BR pic .
-.SS \*(tx mode
-.LP
-\*(tx mode is enabled by the
-.B \-t
-option.
-In \*(tx mode,
-.B pic
-will define a vbox called
-.B \egraph
-for each picture.
-You must yourself print that vbox using, for example, the command
-.RS
-.LP
-.B
-\ecenterline{\ebox\egraph}
-.RE
-.LP
-Actually, since the vbox has a height of zero this will produce
-slightly more vertical space above the picture than below it;
-.RS
-.LP
-.B
-\ecenterline{\eraise 1em\ebox\egraph}
-.RE
-.LP
-would avoid this.
-.LP
-You must use a \*(tx driver that supports the
-.B tpic
-specials, version 2.
-.LP
-Lines beginning with
-.B \e
-are passed through transparently; a
-.B %
-is added to the end of the line to avoid unwanted spaces.
-You can safely use this feature to change fonts or to
-change the value of
-.BR \ebaselineskip .
-Anything else may well produce undesirable results; use at your own risk.
-Lines beginning with a period are not given any special treatment.
-.SS Commands
-.TP
-\fBfor\fR \fIvariable\fR \fB=\fR \fIexpr1\fR \fBto\fR \fIexpr2\fR \
-[\fBby\fR [\fB*\fR]\fIexpr3\fR] \fBdo\fR \fIX\fR \fIbody\fR \fIX\fR
-Set
-.I variable
-to
-.IR expr1 .
-While the value of
-.I variable
-is less than or equal to
-.IR expr2 ,
-do
-.I body
-and increment
-.I variable
-by
-.IR expr3 ;
-if
-.B by
-is not given, increment
-.I variable
-by 1.
-If
-.I expr3
-is prefixed by
-.B *
-then
-.I variable
-will instead be multiplied by
-.IR expr3 .
-.I X
-can be any character not occurring in
-.IR body .
-.TP
-\fBif\fR \fIexpr\fR \fBthen\fR \fIX\fR \fIif-true\fR \fIX\fR \
-[\fBelse\fR \fIY\fR \fIif-false\fR \fIY\fR]
-Evaluate
-.IR expr ;
-if it is non-zero then do
-.IR if-true ,
-otherwise do
-.IR if-false .
-.I X
-can be any character not occurring in
-.IR if-true .
-.I Y
-can be any character not occurring in
-.IR if-false .
-.TP
-\fBprint\fR \fIarg\fR\|.\|.\|.
-Concatenate the arguments and print as a line on stderr.
-Each
-.I arg
-must be an expression, a position, or text.
-This is useful for debugging.
-.TP
-\fBcommand\fR \fIarg\fR\|.\|.\|.
-Concatenate the arguments
-and pass them through as a line to troff or\*(tx.
-Each
-.I arg
-must be an expression, a position, or text.
-This has a similar effect to a line beginning with
-.B .
-or
-.BR \e ,
-but allows the values of variables to be passed through.
-.TP
-\fBsh\fR \fIX\fR \fIcommand\fR \fIX\fR
-Pass
-.I command
-to a shell.
-.I X
-can be any character not occurring in
-.IR command .
-.TP
-\fBcopy\fR \fB"\fIfilename\fB"\fR
-Include
-.I filename
-at this point in the file.
-.TP
-\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fIX\fR \fIbody\fR \fIX\fR \
-[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR]
-.ns
-.TP
-\fBcopy\fR [\fB"\fIfilename\fB"\fR] \fBthru\fR \fImacro\fR \
-[\fBuntil\fR \fB"\fIword\*(ic\fB"\fR]
-This construct does
-.I body
-once for each line of
-.IR filename ;
-the line is split into blank-delimited words,
-and occurrences of
-.BI $ i
-in
-.IR body ,
-for
-.I i
-between 1 and 9,
-are replaced by the
-.IR i -th
-word of the line.
-If
-.I filename
-is not given, lines are taken from the current input up to
-.BR .PE .
-If an
-.B until
-clause is specified,
-lines will be read only until a line the first word of which is
-.IR word ;
-that line will then be discarded.
-.I X
-can be any character not occurring in
-.IR body .
-For example,
-.RS
-.IP
-.ft B
-.nf
-\&.PS
-copy thru % circle at ($1,$2) % until "END"
-1 2
-3 4
-5 6
-END
-box
-\&.PE
-.ft
-.fi
-.RE
-.IP
-is equivalent to
-.RS
-.IP
-.ft B
-.nf
-\&.PS
-circle at (1,2)
-circle at (3,4)
-circle at (5,6)
-box
-\&.PE
-.ft
-.fi
-.RE
-.IP
-The commands to be performed for each line can also be taken
-from a macro defined earlier by giving the name of the macro
-as the argument to
-.BR thru .
-.LP
-.B reset
-.br
-.ns
-.TP
-\fBreset\fI variable1\fB,\fI variable2 .\^.\^.
-Reset pre-defined variables
-.IR variable1 ,
-.I variable2
-\&.\^.\^. to their default values.
-If no arguments are given, reset all pre-defined variables
-to their default values.
-Note that assigning a value to
-.B scale
-also causes all pre-defined variables that control dimensions
-to be reset to their default values times the new value of scale.
-.TP
-\fBplot\fR \fIexpr\fR [\fB"\fItext\*(ic\fB"\fR]
-This is a text object which is constructed by using
-.I text
-as a format string for sprintf
-with an argument of
-.IR expr .
-If
-.I text
-is omitted a format string of
-.B "\(ts%g\(ts"
-is used.
-Attributes can be specified in the same way as for a normal text
-object.
-Be very careful that you specify an appropriate format string;
-.B pic
-does only very limited checking of the string.
-This is deprecated in favour of
-.BR sprintf .
-.TP
-.IB variable := expr
-This is similar to
-.B =
-except
-.I variable
-must already be defined,
-and the value of
-.I variable
-will be changed only in the innermost block in which it is defined.
-(By contrast,
-.B =
-defines the variable in the current block if it is not already defined there,
-and then changes the value in the current block.)
-.LP
-Arguments of the form
-.IP
-.IR X\ anything\ X
-.LP
-are also allowed to be of the form
-.IP
-.BI {\ anything\ }
-.LP
-In this case
-.I anything
-can contain balanced occurrences of
-.B {
-and
-.BR } .
-Strings may contain
-.I X
-or imbalanced occurrences of
-.B {
-and
-.BR } .
-.SS Expressions
-The syntax for expressions has been significantly extended:
-.LP
-.IB x\ ^\ y
-(exponentiation)
-.br
-.BI sin( x )
-.br
-.BI cos( x )
-.br
-.BI atan2( y , \ x )
-.br
-.BI log( x )
-(base 10)
-.br
-.BI exp( x )
-(base 10, ie 10\v'-.4m'\fIx\*(ic\fR\v'.4m')
-.br
-.BI sqrt( x )
-.br
-.BI int( x )
-.br
-.B rand()
-(return a random number between 0 and 1)
-.br
-.BI rand( x )
-(return a random number between 1 and
-.IR x ;
-deprecated)
-.br
-.BI srand( x )
-(set the random number seed)
-.br
-.BI max( e1 , \ e2 )
-.br
-.BI min( e1 , \ e2 )
-.br
-.BI ! e
-.br
-\fIe1\fB && \fIe2\fR
-.br
-\fIe1\fB || \fIe2\fR
-.br
-\fIe1\fB == \fIe2\fR
-.br
-\fIe1\fB != \fIe2\fR
-.br
-\fIe1\fB >= \fIe2\fR
-.br
-\fIe1\fB > \fIe2\fR
-.br
-\fIe1\fB <= \fIe2\fR
-.br
-\fIe1\fB < \fIe2\fR
-.br
-\fB"\fIstr1\*(ic\fB" == "\fIstr2\*(ic\fB"\fR
-.br
-\fB"\fIstr1\*(ic\fB" != "\fIstr2\*(ic\fB"\fR
-.br
-.LP
-String comparison expressions must be parenthesised in some contexts
-to avoid ambiguity.
-.SS Other Changes
-.LP
-A bare expression,
-.IR expr ,
-is acceptable as an attribute;
-it is equivalent to
-.IR dir\ expr ,
-where
-.I dir
-is the current direction.
-For example
-.IP
-.B line 2i
-.LP
-means draw a line 2 inches long in the current direction.
-.LP
-The maximum width and height of the picture are taken from the variables
-.B maxpswid
-and
-.BR maxpsht .
-Initially these have values 8.5 and 11.
-.LP
-Scientific notation is allowed for numbers.
-For example
-.RS
-.B
-x = 5e\-2
-.RE
-.LP
-Text attributes can be compounded.
-For example,
-.RS
-.B
-"foo" above ljust
-.RE
-is legal.
-.LP
-There is no limit to the depth to which blocks can be examined.
-For example,
-.RS
-.B
-[A: [B: [C: box ]]] with .A.B.C.sw at 1,2
-.br
-.B
-circle at last [\^].A.B.C
-.RE
-is acceptable.
-.LP
-Arcs now have compass points
-determined by the circle of which the arc is a part.
-.LP
-Circles and arcs can be dotted or dashed.
-In \*(tx mode splines can be dotted or dashed.
-.LP
-Boxes can have rounded corners.
-The
-.B rad
-attribute specifies the radius of the quarter-circles at each corner.
-If no
-.B rad
-or
-.B diam
-attribute is given, a radius of
-.B boxrad
-is used.
-Initially,
-.B boxrad
-has a value of 0.
-A box with rounded corners can be dotted or dashed.
-.LP
-The
-.B .PS
-line can have a second argument specifying a maximum height for
-the picture.
-If the width of zero is specified the width will be ignored in computing
-the scaling factor for the picture.
-Note that GNU
-.B pic
-will always scale a picture by the same amount vertically as horizontally.
-This is different from the
-.SM DWB
-2.0
-.B pic
-which may scale a picture by a different amount vertically than
-horizontally if a height is specified.
-.LP
-Each text object has an invisible box associated with it.
-The compass points of a text object are determined by this box.
-The implicit motion associated with the object is also determined
-by this box.
-The dimensions of this box are taken from the width and height attributes;
-if the width attribute is not supplied then the width will be taken to be
-.BR textwid ;
-if the height attribute is not supplied then the height will be taken to be
-the number of text strings associated with the object
-times
-.BR textht .
-Initially
-.B textwid
-and
-.B textht
-have a value of 0.
-.LP
-In places where a quoted text string can be used,
-an expression of the form
-.IP
-.BI sprintf(\(ts format \(ts,\ arg ,\fR.\|.\|.\fB)
-.LP
-can also be used;
-this will produce the arguments formatted according to
-.IR format ,
-which should be a string as described in
-.BR printf (3)
-appropriate for the number of arguments supplied,
-using only the
-.BR e ,
-.BR f ,
-.B g
-or
-.B %
-format characters.
-.LP
-The thickness of the lines used to draw objects is controlled by the
-.B linethick
-variable.
-This gives the thickness of lines in points.
-A negative value means use the default thickness:
-in \*(tx output mode, this means use a thickness of 8 milliinches;
-in \*(tx output mode with the
-.B -c
-option, this means use the line thickness specified by
-.B .ps
-lines;
-in troff output mode, this means use a thickness proportional
-to the pointsize.
-A zero value means draw the thinnest possible line supported by
-the output device.
-Initially it has a value of -1.
-There is also a
-.BR thick [ ness ]
-attribute.
-For example,
-.RS
-.LP
-.B circle thickness 1.5
-.RE
-.LP
-would draw a circle using a line with a thickness of 1.5 points.
-The thickness of lines is not affected by the
-value of the
-.B scale
-variable, nor by the width or height given in the
-.B .PS
-line.
-.LP
-Boxes (including boxes with rounded corners),
-circles and ellipses can be filled by giving then an attribute of
-.BR fill [ ed ].
-This takes an optional argument of an expression with a value between
-0 and 1; 0 will fill it with white, 1 with black, values in between
-with a proportionally gray shade.
-A value greater than 1 can also be used:
-this means fill with the
-shade of gray that is currently being used for text and lines.
-Normally this will be black, but output devices may provide
-a mechanism for changing this.
-Without an argument, then the value of the variable
-.B fillval
-will be used.
-Initially this has a value of 0.5.
-The invisible attribute does not affect the filling of objects.
-Any text associated with a filled object will be added after the
-object has been filled, so that the text will not be obscured
-by the filling.
-.LP
-Arrow heads will be drawn as solid triangles if the variable
-.B arrowhead
-is non-zero and either \*(tx mode is enabled or
-the
-.B \-x
-option has been given.
-Initially
-.B arrowhead
-has a value of 1.
-.LP
-The troff output of
-.B pic
-is device-independent.
-The
-.B \-T
-option is therefore redundant.
-All numbers are taken to be in inches; numbers are never interpreted
-to be in troff machine units.
-.LP
-Objects can have an
-.B aligned
-attribute.
-This will only work when the postprocessor is
-.BR grops .
-Any text associated with an object having the
-.B aligned
-attribute will be rotated about the center of the object
-so that it is aligned in the direction from the start point
-to the end point of the object.
-Note that this attribute will have no effect for objects whose start and
-end points are coincident.
-.LP
-In places where
-.IB n th
-is allowed
-.BI ` expr 'th
-is also allowed.
-Note that
-.B 'th
-is a single token: no space is allowed between the
-.B '
-and the
-.BR th .
-For example,
-.IP
-.B
-.nf
-for i = 1 to 4 do {
- line from `i'th box.nw to `i+1'th box.se
-}
-.fi
-.SH CONVERSION
-To obtain a stand-alone picture from a
-.B pic
-file, enclose your
-.B pic
-code with
-.B .PS
-and
-.B .PE
-requests;
-.B roff
-configuration commands may be added at the beginning of the file, but no
-.B roff
-text.
-.LP
-It is necessary to feed this file into
-.B groff
-without adding any page information, so you must check which
-.B .PS
-and
-.B .PE
-requests are actually called.
-For example, the mm macro package adds a page number, which is very
-annoying.
-At the moment, calling standard
-.B groff
-without any macro package works.
-Alternatively, you can define your own requests, e.g. to do nothing:
-.LP
-.RS
-.nf
-.ft B
-\&.de PS
-\&..
-\&.de PE
-\&..
-.ft
-.fi
-.RE
-.LP
-.B groff
-itself does not provide direct conversion into other graphics file
-formats.
-But there are lots of possibilities if you first transform your picture
-into PostScript\*R format using the
-.B groff
-option
-.BR -Tps .
-Since this
-.IR ps -file
-lacks BoundingBox information it is not very useful by itself, but it
-may be fed into other conversion programs, usually named
-.BI ps2 other
-or
-.BI psto other
-or the like.
-Moreover, the PostScript interpreter
-.B ghostscript
-.RB ( gs )
-has built-in graphics conversion devices that are called with the option
-.LP
-.RS
-.BI "gs -sDEVICE=" <devname>
-.RE
-.LP
-Call
-.RS
-.B gs --help
-.RE
-.LP
-for a list of the available devices.
-.LP
-As the Encapsulated PostScript File Format
-.B EPS
-is getting more and more important, and the conversion wasn't regarded
-trivial in the past you might be interested to know that there is a
-conversion tool named
-.B ps2eps
-which does the right job.
-It is much better than the tool
-.B ps2epsi
-packaged with
-.BR gs .
-.LP
-For bitmapped graphic formats, you should use
-.BR pstopnm ;
-the resulting (intermediate)
-.B PNM
-file can be then converted to virtually any graphics format using the tools
-of the
-.B netpbm
-package .
-.SH FILES
-.Tp \w'\fB@MACRODIR@/pic.tmac'u+3n
-.B
-@MACRODIR@/pic.tmac
-Example definitions of the
-.B PS
-and
-.B PE
-macros.
-.SH "SEE ALSO"
-.BR @g@troff (@MAN1EXT@),
-.BR groff_out (@MAN5EXT@),
-.BR tex (1),
-.BR gs (1),
-.BR ps2eps (1),
-.BR pstopnm (1),
-.BR ps2epsi (1),
-.BR pnm (5)
-.LP
-Tpic: Pic for \*(tx
-.LP
-Brian W. Kernighan,
-PIC \(em A Graphics Language for Typesetting (User Manual).
-AT&T Bell Laboratories, Computing Science Technical Report No.\ 116
-<URL:http://cm.bell-labs.com/cm/cs/cstr/116.ps.gz>
-(revised May, 1991).
-.LP
-.B ps2eps
-is available from CTAN mirrors, e.g.
-.br
-<ftp://ftp.dante.de/tex-archive/support/ps2eps/>
-.LP
-W. Richard Stevens - Turning PIC Into HTML
-.br
-<http://www.kohala.com/start/troff/pic2html.html>
-.LP
-W. Richard Stevens - Examples of picMacros
-.br
-<http://www.kohala.com/start/troff/pic.examples.ps>
-.SH BUGS
-.LP
-Input characters that are illegal for
-.B groff
-(ie those with
-.SM ASCII
-code 0 or between 013 and 037 octal or between 0200 and 0237 octal)
-are rejected even in \*(tx mode.
-.LP
-The interpretation of
-.B fillval
-is incompatible with the pic in 10th edition Unix,
-which interprets 0 as black and 1 as white.
-.LP
-PostScript\*R is a registered trademark of Adobe Systems Incorporation.
diff --git a/contrib/groff/src/preproc/pic/pic.y b/contrib/groff/src/preproc/pic/pic.y
deleted file mode 100644
index 38b960a6615e..000000000000
--- a/contrib/groff/src/preproc/pic/pic.y
+++ /dev/null
@@ -1,1812 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-%{
-#include "pic.h"
-#include "ptable.h"
-#include "object.h"
-
-extern int delim_flag;
-extern void do_copy(const char *);
-extern void copy_rest_thru(const char *, const char *);
-extern void copy_file_thru(const char *, const char *, const char *);
-extern void push_body(const char *);
-extern void do_for(char *var, double from, double to,
- int by_is_multiplicative, double by, char *body);
-extern void do_lookahead();
-
-#ifndef HAVE_FMOD
-extern "C" {
- double fmod(double, double);
-}
-#endif
-
-#undef rand
-#undef srand
-extern "C" {
- int rand();
-#ifdef RET_TYPE_SRAND_IS_VOID
- void srand(unsigned int);
-#else
- int srand(unsigned int);
-#endif
-}
-
-/* Maximum number of characters produced by printf("%g") */
-#define GDIGITS 14
-
-int yylex();
-void yyerror(const char *);
-
-void reset(const char *nm);
-void reset_all();
-
-place *lookup_label(const char *);
-void define_label(const char *label, const place *pl);
-
-direction current_direction;
-position current_position;
-
-implement_ptable(place)
-
-PTABLE(place) top_table;
-
-PTABLE(place) *current_table = &top_table;
-saved_state *current_saved_state = 0;
-
-object_list olist;
-
-const char *ordinal_postfix(int n);
-const char *object_type_name(object_type type);
-char *format_number(const char *form, double n);
-char *do_sprintf(const char *form, const double *v, int nv);
-
-%}
-
-
-%union {
- char *str;
- int n;
- double x;
- struct { double x, y; } pair;
- struct { double x; char *body; } if_data;
- struct { char *str; const char *filename; int lineno; } lstr;
- struct { double *v; int nv; int maxv; } dv;
- struct { double val; int is_multiplicative; } by;
- place pl;
- object *obj;
- corner crn;
- path *pth;
- object_spec *spec;
- saved_state *pstate;
- graphics_state state;
- object_type obtype;
-}
-
-%token <str> LABEL
-%token <str> VARIABLE
-%token <x> NUMBER
-%token <lstr> TEXT
-%token <lstr> COMMAND_LINE
-%token <str> DELIMITED
-%token <n> ORDINAL
-%token TH
-%token LEFT_ARROW_HEAD
-%token RIGHT_ARROW_HEAD
-%token DOUBLE_ARROW_HEAD
-%token LAST
-%token UP
-%token DOWN
-%token LEFT
-%token RIGHT
-%token BOX
-%token CIRCLE
-%token ELLIPSE
-%token ARC
-%token LINE
-%token ARROW
-%token MOVE
-%token SPLINE
-%token HEIGHT
-%token RADIUS
-%token WIDTH
-%token DIAMETER
-%token UP
-%token DOWN
-%token RIGHT
-%token LEFT
-%token FROM
-%token TO
-%token AT
-%token WITH
-%token BY
-%token THEN
-%token SOLID
-%token DOTTED
-%token DASHED
-%token CHOP
-%token SAME
-%token INVISIBLE
-%token LJUST
-%token RJUST
-%token ABOVE
-%token BELOW
-%token OF
-%token THE
-%token WAY
-%token BETWEEN
-%token AND
-%token HERE
-%token DOT_N
-%token DOT_E
-%token DOT_W
-%token DOT_S
-%token DOT_NE
-%token DOT_SE
-%token DOT_NW
-%token DOT_SW
-%token DOT_C
-%token DOT_START
-%token DOT_END
-%token DOT_X
-%token DOT_Y
-%token DOT_HT
-%token DOT_WID
-%token DOT_RAD
-%token SIN
-%token COS
-%token ATAN2
-%token LOG
-%token EXP
-%token SQRT
-%token K_MAX
-%token K_MIN
-%token INT
-%token RAND
-%token SRAND
-%token COPY
-%token THRU
-%token TOP
-%token BOTTOM
-%token UPPER
-%token LOWER
-%token SH
-%token PRINT
-%token CW
-%token CCW
-%token FOR
-%token DO
-%token IF
-%token ELSE
-%token ANDAND
-%token OROR
-%token NOTEQUAL
-%token EQUALEQUAL
-%token LESSEQUAL
-%token GREATEREQUAL
-%token LEFT_CORNER
-%token RIGHT_CORNER
-%token CENTER
-%token END
-%token START
-%token RESET
-%token UNTIL
-%token PLOT
-%token THICKNESS
-%token FILL
-%token ALIGNED
-%token SPRINTF
-%token COMMAND
-
-%token DEFINE
-%token UNDEF
-
-/* this ensures that plot 17 "%g" parses as (plot 17 "%g") */
-%left PLOT
-%left TEXT SPRINTF
-
-/* give text adjustments higher precedence than TEXT, so that
-box "foo" above ljust == box ("foo" above ljust)
-*/
-
-%left LJUST RJUST ABOVE BELOW
-
-%left LEFT RIGHT
-/* Give attributes that take an optional expression a higher
-precedence than left and right, so that eg `line chop left'
-parses properly. */
-%left CHOP SOLID DASHED DOTTED UP DOWN FILL
-%left LABEL
-
-%left VARIABLE NUMBER '(' SIN COS ATAN2 LOG EXP SQRT K_MAX K_MIN INT RAND SRAND LAST
-%left ORDINAL HERE '`'
-
-/* these need to be lower than '-' */
-%left HEIGHT RADIUS WIDTH DIAMETER FROM TO AT THICKNESS
-
-/* these must have higher precedence than CHOP so that `label %prec CHOP'
-works */
-%left DOT_N DOT_E DOT_W DOT_S DOT_NE DOT_SE DOT_NW DOT_SW DOT_C
-%left DOT_START DOT_END TOP BOTTOM LEFT_CORNER RIGHT_CORNER
-%left UPPER LOWER CENTER START END
-
-%left ','
-%left OROR
-%left ANDAND
-%left EQUALEQUAL NOTEQUAL
-%left '<' '>' LESSEQUAL GREATEREQUAL
-
-%left BETWEEN OF
-%left AND
-
-%left '+' '-'
-%left '*' '/' '%'
-%right '!'
-%right '^'
-
-%type <x> expr any_expr text_expr
-%type <by> optional_by
-%type <pair> expr_pair position_not_place
-%type <if_data> simple_if
-%type <obj> nth_primitive
-%type <crn> corner
-%type <pth> path label_path relative_path
-%type <pl> place label element element_list middle_element_list
-%type <spec> object_spec
-%type <pair> position
-%type <obtype> object_type
-%type <n> optional_ordinal_last ordinal
-%type <str> until
-%type <dv> sprintf_args
-%type <lstr> text print_args print_arg
-
-%%
-
-top:
- optional_separator
- | element_list
- {
- if (olist.head)
- print_picture(olist.head);
- }
- ;
-
-
-element_list:
- optional_separator middle_element_list optional_separator
- { $$ = $2; }
- ;
-
-middle_element_list:
- element
- { $$ = $1; }
- | middle_element_list separator element
- { $$ = $1; }
- ;
-
-optional_separator:
- /* empty */
- | separator
- ;
-
-separator:
- ';'
- | separator ';'
- ;
-
-placeless_element:
- VARIABLE '=' any_expr
- {
- define_variable($1, $3);
- a_delete $1;
- }
- | VARIABLE ':' '=' any_expr
- {
- place *p = lookup_label($1);
- if (!p) {
- lex_error("variable `%1' not defined", $1);
- YYABORT;
- }
- p->obj = 0;
- p->x = $4;
- p->y = 0.0;
- a_delete $1;
- }
- | UP
- { current_direction = UP_DIRECTION; }
- | DOWN
- { current_direction = DOWN_DIRECTION; }
- | LEFT
- { current_direction = LEFT_DIRECTION; }
- | RIGHT
- { current_direction = RIGHT_DIRECTION; }
- | COMMAND_LINE
- {
- olist.append(make_command_object($1.str, $1.filename,
- $1.lineno));
- }
- | COMMAND print_args
- {
- olist.append(make_command_object($2.str, $2.filename,
- $2.lineno));
- }
- | PRINT print_args
- {
- fprintf(stderr, "%s\n", $2.str);
- a_delete $2.str;
- fflush(stderr);
- }
- | SH
- { delim_flag = 1; }
- DELIMITED
- {
- delim_flag = 0;
- if (safer_flag)
- lex_error("unsafe to run command `%1'", $3);
- else
- system($3);
- a_delete $3;
- }
- | COPY TEXT
- {
- if (yychar < 0)
- do_lookahead();
- do_copy($2.str);
- // do not delete the filename
- }
- | COPY TEXT THRU
- { delim_flag = 2; }
- DELIMITED
- { delim_flag = 0; }
- until
- {
- if (yychar < 0)
- do_lookahead();
- copy_file_thru($2.str, $5, $7);
- // do not delete the filename
- a_delete $5;
- a_delete $7;
- }
- | COPY THRU
- { delim_flag = 2; }
- DELIMITED
- { delim_flag = 0; }
- until
- {
- if (yychar < 0)
- do_lookahead();
- copy_rest_thru($4, $6);
- a_delete $4;
- a_delete $6;
- }
- | FOR VARIABLE '=' expr TO expr optional_by DO
- { delim_flag = 1; }
- DELIMITED
- {
- delim_flag = 0;
- if (yychar < 0)
- do_lookahead();
- do_for($2, $4, $6, $7.is_multiplicative, $7.val, $10);
- }
- | simple_if
- {
- if (yychar < 0)
- do_lookahead();
- if ($1.x != 0.0)
- push_body($1.body);
- a_delete $1.body;
- }
- | simple_if ELSE
- { delim_flag = 1; }
- DELIMITED
- {
- delim_flag = 0;
- if (yychar < 0)
- do_lookahead();
- if ($1.x != 0.0)
- push_body($1.body);
- else
- push_body($4);
- a_delete $1.body;
- a_delete $4;
- }
- | reset_variables
- | RESET
- { define_variable("scale", 1.0); }
- ;
-
-reset_variables:
- RESET VARIABLE
- { reset($2); a_delete $2; }
- | reset_variables VARIABLE
- { reset($2); a_delete $2; }
- | reset_variables ',' VARIABLE
- { reset($3); a_delete $3; }
- ;
-
-print_args:
- print_arg
- { $$ = $1; }
- | print_args print_arg
- {
- $$.str = new char[strlen($1.str) + strlen($2.str) + 1];
- strcpy($$.str, $1.str);
- strcat($$.str, $2.str);
- a_delete $1.str;
- a_delete $2.str;
- if ($1.filename) {
- $$.filename = $1.filename;
- $$.lineno = $1.lineno;
- }
- else if ($2.filename) {
- $$.filename = $2.filename;
- $$.lineno = $2.lineno;
- }
- }
- ;
-
-print_arg:
- expr %prec ','
- {
- $$.str = new char[GDIGITS + 1];
- sprintf($$.str, "%g", $1);
- $$.filename = 0;
- $$.lineno = 0;
- }
- | text
- { $$ = $1; }
- | position %prec ','
- {
- $$.str = new char[GDIGITS + 2 + GDIGITS + 1];
- sprintf($$.str, "%g, %g", $1.x, $1.y);
- $$.filename = 0;
- $$.lineno = 0;
- }
-
-simple_if:
- IF any_expr THEN
- { delim_flag = 1; }
- DELIMITED
- { delim_flag = 0; $$.x = $2; $$.body = $5; }
- ;
-
-until:
- /* empty */
- { $$ = 0; }
- | UNTIL TEXT
- { $$ = $2.str; }
- ;
-
-any_expr:
- expr
- { $$ = $1; }
- | text_expr
- { $$ = $1; }
- ;
-
-text_expr:
- text EQUALEQUAL text
- {
- $$ = strcmp($1.str, $3.str) == 0;
- a_delete $1.str;
- a_delete $3.str;
- }
- | text NOTEQUAL text
- {
- $$ = strcmp($1.str, $3.str) != 0;
- a_delete $1.str;
- a_delete $3.str;
- }
- | text_expr ANDAND text_expr
- { $$ = ($1 != 0.0 && $3 != 0.0); }
- | text_expr ANDAND expr
- { $$ = ($1 != 0.0 && $3 != 0.0); }
- | expr ANDAND text_expr
- { $$ = ($1 != 0.0 && $3 != 0.0); }
- | text_expr OROR text_expr
- { $$ = ($1 != 0.0 || $3 != 0.0); }
- | text_expr OROR expr
- { $$ = ($1 != 0.0 || $3 != 0.0); }
- | expr OROR text_expr
- { $$ = ($1 != 0.0 || $3 != 0.0); }
- | '!' text_expr
- { $$ = ($2 == 0.0); }
- ;
-
-
-optional_by:
- /* empty */
- { $$.val = 1.0; $$.is_multiplicative = 0; }
- | BY expr
- { $$.val = $2; $$.is_multiplicative = 0; }
- | BY '*' expr
- { $$.val = $3; $$.is_multiplicative = 1; }
- ;
-
-element:
- object_spec
- {
- $$.obj = $1->make_object(&current_position,
- &current_direction);
- if ($$.obj == 0)
- YYABORT;
- delete $1;
- if ($$.obj)
- olist.append($$.obj);
- else {
- $$.x = current_position.x;
- $$.y = current_position.y;
- }
- }
- | LABEL ':' optional_separator element
- { $$ = $4; define_label($1, & $$); a_delete $1; }
- | LABEL ':' optional_separator position_not_place
- {
- $$.obj = 0;
- $$.x = $4.x;
- $$.y = $4.y;
- define_label($1, & $$);
- a_delete $1;
- }
- | LABEL ':' optional_separator place
- {
- $$ = $4;
- define_label($1, & $$);
- a_delete $1;
- }
- | '{'
- {
- $<state>$.x = current_position.x;
- $<state>$.y = current_position.y;
- $<state>$.dir = current_direction;
- }
- element_list '}'
- {
- current_position.x = $<state>2.x;
- current_position.y = $<state>2.y;
- current_direction = $<state>2.dir;
- }
- optional_element
- {
- $$ = $3;
- }
- | placeless_element
- {
- $$.obj = 0;
- $$.x = current_position.x;
- $$.y = current_position.y;
- }
- ;
-
-optional_element:
- /* empty */
- {}
- | element
- {}
- ;
-
-object_spec:
- BOX
- {
- $$ = new object_spec(BOX_OBJECT);
- }
- | CIRCLE
- {
- $$ = new object_spec(CIRCLE_OBJECT);
- }
- | ELLIPSE
- {
- $$ = new object_spec(ELLIPSE_OBJECT);
- }
- | ARC
- {
- $$ = new object_spec(ARC_OBJECT);
- $$->dir = current_direction;
- }
- | LINE
- {
- $$ = new object_spec(LINE_OBJECT);
- lookup_variable("lineht", & $$->segment_height);
- lookup_variable("linewid", & $$->segment_width);
- $$->dir = current_direction;
- }
- | ARROW
- {
- $$ = new object_spec(ARROW_OBJECT);
- lookup_variable("lineht", & $$->segment_height);
- lookup_variable("linewid", & $$->segment_width);
- $$->dir = current_direction;
- }
- | MOVE
- {
- $$ = new object_spec(MOVE_OBJECT);
- lookup_variable("moveht", & $$->segment_height);
- lookup_variable("movewid", & $$->segment_width);
- $$->dir = current_direction;
- }
- | SPLINE
- {
- $$ = new object_spec(SPLINE_OBJECT);
- lookup_variable("lineht", & $$->segment_height);
- lookup_variable("linewid", & $$->segment_width);
- $$->dir = current_direction;
- }
- | text %prec TEXT
- {
- $$ = new object_spec(TEXT_OBJECT);
- $$->text = new text_item($1.str, $1.filename, $1.lineno);
- }
- | PLOT expr
- {
- $$ = new object_spec(TEXT_OBJECT);
- $$->text = new text_item(format_number(0, $2), 0, -1);
- }
- | PLOT expr text
- {
- $$ = new object_spec(TEXT_OBJECT);
- $$->text = new text_item(format_number($3.str, $2),
- $3.filename, $3.lineno);
- a_delete $3.str;
- }
- | '['
- {
- saved_state *p = new saved_state;
- $<pstate>$ = p;
- p->x = current_position.x;
- p->y = current_position.y;
- p->dir = current_direction;
- p->tbl = current_table;
- p->prev = current_saved_state;
- current_position.x = 0.0;
- current_position.y = 0.0;
- current_table = new PTABLE(place);
- current_saved_state = p;
- olist.append(make_mark_object());
- }
- element_list ']'
- {
- current_position.x = $<pstate>2->x;
- current_position.y = $<pstate>2->y;
- current_direction = $<pstate>2->dir;
- $$ = new object_spec(BLOCK_OBJECT);
- olist.wrap_up_block(& $$->oblist);
- $$->tbl = current_table;
- current_table = $<pstate>2->tbl;
- current_saved_state = $<pstate>2->prev;
- delete $<pstate>2;
- }
- | object_spec HEIGHT expr
- {
- $$ = $1;
- $$->height = $3;
- $$->flags |= HAS_HEIGHT;
- }
- | object_spec RADIUS expr
- {
- $$ = $1;
- $$->radius = $3;
- $$->flags |= HAS_RADIUS;
- }
- | object_spec WIDTH expr
- {
- $$ = $1;
- $$->width = $3;
- $$->flags |= HAS_WIDTH;
- }
- | object_spec DIAMETER expr
- {
- $$ = $1;
- $$->radius = $3/2.0;
- $$->flags |= HAS_RADIUS;
- }
- | object_spec expr %prec HEIGHT
- {
- $$ = $1;
- $$->flags |= HAS_SEGMENT;
- switch ($$->dir) {
- case UP_DIRECTION:
- $$->segment_pos.y += $2;
- break;
- case DOWN_DIRECTION:
- $$->segment_pos.y -= $2;
- break;
- case RIGHT_DIRECTION:
- $$->segment_pos.x += $2;
- break;
- case LEFT_DIRECTION:
- $$->segment_pos.x -= $2;
- break;
- }
- }
- | object_spec UP
- {
- $$ = $1;
- $$->dir = UP_DIRECTION;
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.y += $$->segment_height;
- }
- | object_spec UP expr
- {
- $$ = $1;
- $$->dir = UP_DIRECTION;
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.y += $3;
- }
- | object_spec DOWN
- {
- $$ = $1;
- $$->dir = DOWN_DIRECTION;
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.y -= $$->segment_height;
- }
- | object_spec DOWN expr
- {
- $$ = $1;
- $$->dir = DOWN_DIRECTION;
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.y -= $3;
- }
- | object_spec RIGHT
- {
- $$ = $1;
- $$->dir = RIGHT_DIRECTION;
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.x += $$->segment_width;
- }
- | object_spec RIGHT expr
- {
- $$ = $1;
- $$->dir = RIGHT_DIRECTION;
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.x += $3;
- }
- | object_spec LEFT
- {
- $$ = $1;
- $$->dir = LEFT_DIRECTION;
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.x -= $$->segment_width;
- }
- | object_spec LEFT expr
- {
- $$ = $1;
- $$->dir = LEFT_DIRECTION;
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.x -= $3;
- }
- | object_spec FROM position
- {
- $$ = $1;
- $$->flags |= HAS_FROM;
- $$->from.x = $3.x;
- $$->from.y = $3.y;
- }
- | object_spec TO position
- {
- $$ = $1;
- if ($$->flags & HAS_SEGMENT)
- $$->segment_list = new segment($$->segment_pos,
- $$->segment_is_absolute,
- $$->segment_list);
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.x = $3.x;
- $$->segment_pos.y = $3.y;
- $$->segment_is_absolute = 1;
- $$->flags |= HAS_TO;
- $$->to.x = $3.x;
- $$->to.y = $3.y;
- }
- | object_spec AT position
- {
- $$ = $1;
- $$->flags |= HAS_AT;
- $$->at.x = $3.x;
- $$->at.y = $3.y;
- if ($$->type != ARC_OBJECT) {
- $$->flags |= HAS_FROM;
- $$->from.x = $3.x;
- $$->from.y = $3.y;
- }
- }
- | object_spec WITH path
- {
- $$ = $1;
- $$->flags |= HAS_WITH;
- $$->with = $3;
- }
- | object_spec BY expr_pair
- {
- $$ = $1;
- $$->flags |= HAS_SEGMENT;
- $$->segment_pos.x += $3.x;
- $$->segment_pos.y += $3.y;
- }
- | object_spec THEN
- {
- $$ = $1;
- if ($$->flags & HAS_SEGMENT) {
- $$->segment_list = new segment($$->segment_pos,
- $$->segment_is_absolute,
- $$->segment_list);
- $$->flags &= ~HAS_SEGMENT;
- $$->segment_pos.x = $$->segment_pos.y = 0.0;
- $$->segment_is_absolute = 0;
- }
- }
- | object_spec SOLID
- {
- $$ = $1; // nothing
- }
- | object_spec DOTTED
- {
- $$ = $1;
- $$->flags |= IS_DOTTED;
- lookup_variable("dashwid", & $$->dash_width);
- }
- | object_spec DOTTED expr
- {
- $$ = $1;
- $$->flags |= IS_DOTTED;
- $$->dash_width = $3;
- }
- | object_spec DASHED
- {
- $$ = $1;
- $$->flags |= IS_DASHED;
- lookup_variable("dashwid", & $$->dash_width);
- }
- | object_spec DASHED expr
- {
- $$ = $1;
- $$->flags |= IS_DASHED;
- $$->dash_width = $3;
- }
- | object_spec FILL
- {
- $$ = $1;
- $$->flags |= IS_DEFAULT_FILLED;
- }
- | object_spec FILL expr
- {
- $$ = $1;
- $$->flags |= IS_FILLED;
- $$->fill = $3;
- }
- | object_spec CHOP
- {
- $$ = $1;
- // line chop chop means line chop 0 chop 0
- if ($$->flags & IS_DEFAULT_CHOPPED) {
- $$->flags |= IS_CHOPPED;
- $$->flags &= ~IS_DEFAULT_CHOPPED;
- $$->start_chop = $$->end_chop = 0.0;
- }
- else if ($$->flags & IS_CHOPPED) {
- $$->end_chop = 0.0;
- }
- else {
- $$->flags |= IS_DEFAULT_CHOPPED;
- }
- }
- | object_spec CHOP expr
- {
- $$ = $1;
- if ($$->flags & IS_DEFAULT_CHOPPED) {
- $$->flags |= IS_CHOPPED;
- $$->flags &= ~IS_DEFAULT_CHOPPED;
- $$->start_chop = 0.0;
- $$->end_chop = $3;
- }
- else if ($$->flags & IS_CHOPPED) {
- $$->end_chop = $3;
- }
- else {
- $$->start_chop = $$->end_chop = $3;
- $$->flags |= IS_CHOPPED;
- }
- }
- | object_spec SAME
- {
- $$ = $1;
- $$->flags |= IS_SAME;
- }
- | object_spec INVISIBLE
- {
- $$ = $1;
- $$->flags |= IS_INVISIBLE;
- }
- | object_spec LEFT_ARROW_HEAD
- {
- $$ = $1;
- $$->flags |= HAS_LEFT_ARROW_HEAD;
- }
- | object_spec RIGHT_ARROW_HEAD
- {
- $$ = $1;
- $$->flags |= HAS_RIGHT_ARROW_HEAD;
- }
- | object_spec DOUBLE_ARROW_HEAD
- {
- $$ = $1;
- $$->flags |= (HAS_LEFT_ARROW_HEAD|HAS_RIGHT_ARROW_HEAD);
- }
- | object_spec CW
- {
- $$ = $1;
- $$->flags |= IS_CLOCKWISE;
- }
- | object_spec CCW
- {
- $$ = $1;
- $$->flags &= ~IS_CLOCKWISE;
- }
- | object_spec text %prec TEXT
- {
- $$ = $1;
- text_item **p;
- for (p = & $$->text; *p; p = &(*p)->next)
- ;
- *p = new text_item($2.str, $2.filename, $2.lineno);
- }
- | object_spec LJUST
- {
- $$ = $1;
- if ($$->text) {
- text_item *p;
- for (p = $$->text; p->next; p = p->next)
- ;
- p->adj.h = LEFT_ADJUST;
- }
- }
- | object_spec RJUST
- {
- $$ = $1;
- if ($$->text) {
- text_item *p;
- for (p = $$->text; p->next; p = p->next)
- ;
- p->adj.h = RIGHT_ADJUST;
- }
- }
- | object_spec ABOVE
- {
- $$ = $1;
- if ($$->text) {
- text_item *p;
- for (p = $$->text; p->next; p = p->next)
- ;
- p->adj.v = ABOVE_ADJUST;
- }
- }
- | object_spec BELOW
- {
- $$ = $1;
- if ($$->text) {
- text_item *p;
- for (p = $$->text; p->next; p = p->next)
- ;
- p->adj.v = BELOW_ADJUST;
- }
- }
- | object_spec THICKNESS expr
- {
- $$ = $1;
- $$->flags |= HAS_THICKNESS;
- $$->thickness = $3;
- }
- | object_spec ALIGNED
- {
- $$ = $1;
- $$->flags |= IS_ALIGNED;
- }
- ;
-
-text:
- TEXT
- {
- $$ = $1;
- }
- | SPRINTF '(' TEXT sprintf_args ')'
- {
- $$.filename = $3.filename;
- $$.lineno = $3.lineno;
- $$.str = do_sprintf($3.str, $4.v, $4.nv);
- a_delete $4.v;
- a_delete $3.str;
- }
- ;
-
-sprintf_args:
- /* empty */
- {
- $$.v = 0;
- $$.nv = 0;
- $$.maxv = 0;
- }
- | sprintf_args ',' expr
- {
- $$ = $1;
- if ($$.nv >= $$.maxv) {
- if ($$.nv == 0) {
- $$.v = new double[4];
- $$.maxv = 4;
- }
- else {
- double *oldv = $$.v;
- $$.maxv *= 2;
- $$.v = new double[$$.maxv];
- memcpy($$.v, oldv, $$.nv*sizeof(double));
- a_delete oldv;
- }
- }
- $$.v[$$.nv] = $3;
- $$.nv += 1;
- }
- ;
-
-position:
- position_not_place
- { $$ = $1; }
- | place
- {
- position pos = $1;
- $$.x = pos.x;
- $$.y = pos.y;
- }
- ;
-
-position_not_place:
- expr_pair
- { $$ = $1; }
- | position '+' expr_pair
- {
- $$.x = $1.x + $3.x;
- $$.y = $1.y + $3.y;
- }
- | position '-' expr_pair
- {
- $$.x = $1.x - $3.x;
- $$.y = $1.y - $3.y;
- }
- | '(' position ',' position ')'
- {
- $$.x = $2.x;
- $$.y = $4.y;
- }
- | expr between position AND position
- {
- $$.x = (1.0 - $1)*$3.x + $1*$5.x;
- $$.y = (1.0 - $1)*$3.y + $1*$5.y;
- }
- | expr '<' position ',' position '>'
- {
- $$.x = (1.0 - $1)*$3.x + $1*$5.x;
- $$.y = (1.0 - $1)*$3.y + $1*$5.y;
- }
- ;
-
-between:
- BETWEEN
- | OF THE WAY BETWEEN
- ;
-
-expr_pair:
- expr ',' expr
- { $$.x = $1; $$.y = $3; }
- | '(' expr_pair ')'
- { $$ = $2; }
- ;
-
-place:
- label %prec CHOP /* line at A left == line (at A) left */
- { $$ = $1; }
- | label corner
- {
- path pth($2);
- if (!pth.follow($1, & $$))
- YYABORT;
- }
- | corner label
- {
- path pth($1);
- if (!pth.follow($2, & $$))
- YYABORT;
- }
- | corner OF label
- {
- path pth($1);
- if (!pth.follow($3, & $$))
- YYABORT;
- }
- | HERE
- {
- $$.x = current_position.x;
- $$.y = current_position.y;
- $$.obj = 0;
- }
- ;
-
-label:
- LABEL
- {
- place *p = lookup_label($1);
- if (!p) {
- lex_error("there is no place `%1'", $1);
- YYABORT;
- }
- $$ = *p;
- a_delete $1;
- }
- | nth_primitive
- {
- $$.obj = $1;
- }
- | label '.' LABEL
- {
- path pth($3);
- if (!pth.follow($1, & $$))
- YYABORT;
- }
- ;
-
-ordinal:
- ORDINAL
- { $$ = $1; }
- | '`' any_expr TH
- {
- // XXX Check for overflow (and non-integers?).
- $$ = (int)$2;
- }
- ;
-
-optional_ordinal_last:
- LAST
- { $$ = 1; }
- | ordinal LAST
- { $$ = $1; }
- ;
-
-nth_primitive:
- ordinal object_type
- {
- int count = 0;
- object *p;
- for (p = olist.head; p != 0; p = p->next)
- if (p->type() == $2 && ++count == $1) {
- $$ = p;
- break;
- }
- if (p == 0) {
- lex_error("there is no %1%2 %3", $1, ordinal_postfix($1),
- object_type_name($2));
- YYABORT;
- }
- }
- | optional_ordinal_last object_type
- {
- int count = 0;
- object *p;
- for (p = olist.tail; p != 0; p = p->prev)
- if (p->type() == $2 && ++count == $1) {
- $$ = p;
- break;
- }
- if (p == 0) {
- lex_error("there is no %1%2 last %3", $1,
- ordinal_postfix($1), object_type_name($2));
- YYABORT;
- }
- }
- ;
-
-object_type:
- BOX
- { $$ = BOX_OBJECT; }
- | CIRCLE
- { $$ = CIRCLE_OBJECT; }
- | ELLIPSE
- { $$ = ELLIPSE_OBJECT; }
- | ARC
- { $$ = ARC_OBJECT; }
- | LINE
- { $$ = LINE_OBJECT; }
- | ARROW
- { $$ = ARROW_OBJECT; }
- | SPLINE
- { $$ = SPLINE_OBJECT; }
- | '[' ']'
- { $$ = BLOCK_OBJECT; }
- | TEXT
- { $$ = TEXT_OBJECT; }
- ;
-
-label_path:
- '.' LABEL
- {
- $$ = new path($2);
- }
- | label_path '.' LABEL
- {
- $$ = $1;
- $$->append($3);
- }
- ;
-
-relative_path:
- corner
- {
- $$ = new path($1);
- }
- /* give this a lower precedence than LEFT and RIGHT so that
- [A: box] with .A left == [A: box] with (.A left) */
-
- | label_path %prec TEXT
- {
- $$ = $1;
- }
- | label_path corner
- {
- $$ = $1;
- $$->append($2);
- }
- ;
-
-path:
- relative_path
- {
- $$ = $1;
- }
- | '(' relative_path ',' relative_path ')'
- {
- $$ = $2;
- $$->set_ypath($4);
- }
- /* The rest of these rules are a compatibility sop. */
- | ORDINAL LAST object_type relative_path
- {
- lex_warning("`%1%2 last %3' in `with' argument ignored",
- $1, ordinal_postfix($1), object_type_name($3));
- $$ = $4;
- }
- | LAST object_type relative_path
- {
- lex_warning("`last %1' in `with' argument ignored",
- object_type_name($2));
- $$ = $3;
- }
- | ORDINAL object_type relative_path
- {
- lex_warning("`%1%2 %3' in `with' argument ignored",
- $1, ordinal_postfix($1), object_type_name($2));
- $$ = $3;
- }
- | LABEL relative_path
- {
- lex_warning("initial `%1' in `with' argument ignored", $1);
- a_delete $1;
- $$ = $2;
- }
- ;
-
-corner:
- DOT_N
- { $$ = &object::north; }
- | DOT_E
- { $$ = &object::east; }
- | DOT_W
- { $$ = &object::west; }
- | DOT_S
- { $$ = &object::south; }
- | DOT_NE
- { $$ = &object::north_east; }
- | DOT_SE
- { $$ = &object:: south_east; }
- | DOT_NW
- { $$ = &object::north_west; }
- | DOT_SW
- { $$ = &object::south_west; }
- | DOT_C
- { $$ = &object::center; }
- | DOT_START
- { $$ = &object::start; }
- | DOT_END
- { $$ = &object::end; }
- | TOP
- { $$ = &object::north; }
- | BOTTOM
- { $$ = &object::south; }
- | LEFT
- { $$ = &object::west; }
- | RIGHT
- { $$ = &object::east; }
- | UPPER LEFT
- { $$ = &object::north_west; }
- | LOWER LEFT
- { $$ = &object::south_west; }
- | UPPER RIGHT
- { $$ = &object::north_east; }
- | LOWER RIGHT
- { $$ = &object::south_east; }
- | LEFT_CORNER
- { $$ = &object::west; }
- | RIGHT_CORNER
- { $$ = &object::east; }
- | UPPER LEFT_CORNER
- { $$ = &object::north_west; }
- | LOWER LEFT_CORNER
- { $$ = &object::south_west; }
- | UPPER RIGHT_CORNER
- { $$ = &object::north_east; }
- | LOWER RIGHT_CORNER
- { $$ = &object::south_east; }
- | CENTER
- { $$ = &object::center; }
- | START
- { $$ = &object::start; }
- | END
- { $$ = &object::end; }
- ;
-
-expr:
- VARIABLE
- {
- if (!lookup_variable($1, & $$)) {
- lex_error("there is no variable `%1'", $1);
- YYABORT;
- }
- a_delete $1;
- }
- | NUMBER
- { $$ = $1; }
- | place DOT_X
- {
- if ($1.obj != 0)
- $$ = $1.obj->origin().x;
- else
- $$ = $1.x;
- }
- | place DOT_Y
- {
- if ($1.obj != 0)
- $$ = $1.obj->origin().y;
- else
- $$ = $1.y;
- }
- | place DOT_HT
- {
- if ($1.obj != 0)
- $$ = $1.obj->height();
- else
- $$ = 0.0;
- }
- | place DOT_WID
- {
- if ($1.obj != 0)
- $$ = $1.obj->width();
- else
- $$ = 0.0;
- }
- | place DOT_RAD
- {
- if ($1.obj != 0)
- $$ = $1.obj->radius();
- else
- $$ = 0.0;
- }
- | expr '+' expr
- { $$ = $1 + $3; }
- | expr '-' expr
- { $$ = $1 - $3; }
- | expr '*' expr
- { $$ = $1 * $3; }
- | expr '/' expr
- {
- if ($3 == 0.0) {
- lex_error("division by zero");
- YYABORT;
- }
- $$ = $1/$3;
- }
- | expr '%' expr
- {
- if ($3 == 0.0) {
- lex_error("modulus by zero");
- YYABORT;
- }
- $$ = fmod($1, $3);
- }
- | expr '^' expr
- {
- errno = 0;
- $$ = pow($1, $3);
- if (errno == EDOM) {
- lex_error("arguments to `^' operator out of domain");
- YYABORT;
- }
- if (errno == ERANGE) {
- lex_error("result of `^' operator out of range");
- YYABORT;
- }
- }
- | '-' expr %prec '!'
- { $$ = -$2; }
- | '(' any_expr ')'
- { $$ = $2; }
- | SIN '(' any_expr ')'
- {
- errno = 0;
- $$ = sin($3);
- if (errno == ERANGE) {
- lex_error("sin result out of range");
- YYABORT;
- }
- }
- | COS '(' any_expr ')'
- {
- errno = 0;
- $$ = cos($3);
- if (errno == ERANGE) {
- lex_error("cos result out of range");
- YYABORT;
- }
- }
- | ATAN2 '(' any_expr ',' any_expr ')'
- {
- errno = 0;
- $$ = atan2($3, $5);
- if (errno == EDOM) {
- lex_error("atan2 argument out of domain");
- YYABORT;
- }
- if (errno == ERANGE) {
- lex_error("atan2 result out of range");
- YYABORT;
- }
- }
- | LOG '(' any_expr ')'
- {
- errno = 0;
- $$ = log10($3);
- if (errno == ERANGE) {
- lex_error("log result out of range");
- YYABORT;
- }
- }
- | EXP '(' any_expr ')'
- {
- errno = 0;
- $$ = pow(10.0, $3);
- if (errno == ERANGE) {
- lex_error("exp result out of range");
- YYABORT;
- }
- }
- | SQRT '(' any_expr ')'
- {
- errno = 0;
- $$ = sqrt($3);
- if (errno == EDOM) {
- lex_error("sqrt argument out of domain");
- YYABORT;
- }
- }
- | K_MAX '(' any_expr ',' any_expr ')'
- { $$ = $3 > $5 ? $3 : $5; }
- | K_MIN '(' any_expr ',' any_expr ')'
- { $$ = $3 < $5 ? $3 : $5; }
- | INT '(' any_expr ')'
- { $$ = floor($3); }
- | RAND '(' any_expr ')'
- { $$ = 1.0 + floor(((rand()&0x7fff)/double(0x7fff))*$3); }
- | RAND '(' ')'
- {
- /* return a random number in the range [0,1) */
- /* portable, but not very random */
- $$ = (rand() & 0x7fff) / double(0x8000);
- }
- | SRAND '(' any_expr ')'
- { $$ = 0; srand((unsigned int)$3); }
- | expr '<' expr
- { $$ = ($1 < $3); }
- | expr LESSEQUAL expr
- { $$ = ($1 <= $3); }
- | expr '>' expr
- { $$ = ($1 > $3); }
- | expr GREATEREQUAL expr
- { $$ = ($1 >= $3); }
- | expr EQUALEQUAL expr
- { $$ = ($1 == $3); }
- | expr NOTEQUAL expr
- { $$ = ($1 != $3); }
- | expr ANDAND expr
- { $$ = ($1 != 0.0 && $3 != 0.0); }
- | expr OROR expr
- { $$ = ($1 != 0.0 || $3 != 0.0); }
- | '!' expr
- { $$ = ($2 == 0.0); }
-
- ;
-
-%%
-
-/* bison defines const to be empty unless __STDC__ is defined, which it
-isn't under cfront */
-
-#ifdef const
-#undef const
-#endif
-
-static struct {
- const char *name;
- double val;
- int scaled; // non-zero if val should be multiplied by scale
-} defaults_table[] = {
- { "arcrad", .25, 1 },
- { "arrowht", .1, 1 },
- { "arrowwid", .05, 1 },
- { "circlerad", .25, 1 },
- { "boxht", .5, 1 },
- { "boxwid", .75, 1 },
- { "boxrad", 0.0, 1 },
- { "dashwid", .05, 1 },
- { "ellipseht", .5, 1 },
- { "ellipsewid", .75, 1 },
- { "moveht", .5, 1 },
- { "movewid", .5, 1 },
- { "lineht", .5, 1 },
- { "linewid", .5, 1 },
- { "textht", 0.0, 1 },
- { "textwid", 0.0, 1 },
- { "scale", 1.0, 0 },
- { "linethick", -1.0, 0 }, // in points
- { "fillval", .5, 0 },
- { "arrowhead", 1.0, 0 },
- { "maxpswid", 8.5, 0 },
- { "maxpsht", 11.0, 0 },
-};
-
-place *lookup_label(const char *label)
-{
- saved_state *state = current_saved_state;
- PTABLE(place) *tbl = current_table;
- for (;;) {
- place *pl = tbl->lookup(label);
- if (pl)
- return pl;
- if (!state)
- return 0;
- tbl = state->tbl;
- state = state->prev;
- }
-}
-
-void define_label(const char *label, const place *pl)
-{
- place *p = new place;
- *p = *pl;
- current_table->define(label, p);
-}
-
-int lookup_variable(const char *name, double *val)
-{
- place *pl = lookup_label(name);
- if (pl) {
- *val = pl->x;
- return 1;
- }
- return 0;
-}
-
-void define_variable(const char *name, double val)
-{
- place *p = new place;
- p->obj = 0;
- p->x = val;
- p->y = 0.0;
- current_table->define(name, p);
- if (strcmp(name, "scale") == 0) {
- // When the scale changes, reset all scaled pre-defined variables to
- // their default values.
- for (int i = 0; i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++)
- if (defaults_table[i].scaled)
- define_variable(defaults_table[i].name, val*defaults_table[i].val);
- }
-}
-
-// called once only (not once per parse)
-
-void parse_init()
-{
- current_direction = RIGHT_DIRECTION;
- current_position.x = 0.0;
- current_position.y = 0.0;
- // This resets everything to its default value.
- reset_all();
-}
-
-void reset(const char *nm)
-{
- for (int i = 0; i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++)
- if (strcmp(nm, defaults_table[i].name) == 0) {
- double val = defaults_table[i].val;
- if (defaults_table[i].scaled) {
- double scale;
- lookup_variable("scale", &scale);
- val *= scale;
- }
- define_variable(defaults_table[i].name, val);
- return;
- }
- lex_error("`%1' is not a predefined variable", nm);
-}
-
-void reset_all()
-{
- // We only have to explicitly reset the pre-defined variables that
- // aren't scaled because `scale' is not scaled, and changing the
- // value of `scale' will reset all the pre-defined variables that
- // are scaled.
- for (int i = 0; i < sizeof(defaults_table)/sizeof(defaults_table[0]); i++)
- if (!defaults_table[i].scaled)
- define_variable(defaults_table[i].name, defaults_table[i].val);
-}
-
-// called after each parse
-
-void parse_cleanup()
-{
- while (current_saved_state != 0) {
- delete current_table;
- current_table = current_saved_state->tbl;
- saved_state *tem = current_saved_state;
- current_saved_state = current_saved_state->prev;
- delete tem;
- }
- assert(current_table == &top_table);
- PTABLE_ITERATOR(place) iter(current_table);
- const char *key;
- place *pl;
- while (iter.next(&key, &pl))
- if (pl->obj != 0) {
- position pos = pl->obj->origin();
- pl->obj = 0;
- pl->x = pos.x;
- pl->y = pos.y;
- }
- while (olist.head != 0) {
- object *tem = olist.head;
- olist.head = olist.head->next;
- delete tem;
- }
- olist.tail = 0;
- current_direction = RIGHT_DIRECTION;
- current_position.x = 0.0;
- current_position.y = 0.0;
-}
-
-const char *ordinal_postfix(int n)
-{
- if (n < 10 || n > 20)
- switch (n % 10) {
- case 1:
- return "st";
- case 2:
- return "nd";
- case 3:
- return "rd";
- }
- return "th";
-}
-
-const char *object_type_name(object_type type)
-{
- switch (type) {
- case BOX_OBJECT:
- return "box";
- case CIRCLE_OBJECT:
- return "circle";
- case ELLIPSE_OBJECT:
- return "ellipse";
- case ARC_OBJECT:
- return "arc";
- case SPLINE_OBJECT:
- return "spline";
- case LINE_OBJECT:
- return "line";
- case ARROW_OBJECT:
- return "arrow";
- case MOVE_OBJECT:
- return "move";
- case TEXT_OBJECT:
- return "\"\"";
- case BLOCK_OBJECT:
- return "[]";
- case OTHER_OBJECT:
- case MARK_OBJECT:
- default:
- break;
- }
- return "object";
-}
-
-static char sprintf_buf[1024];
-
-char *format_number(const char *form, double n)
-{
- if (form == 0)
- form = "%g";
- else {
- // this is a fairly feeble attempt at validation of the format
- int nspecs = 0;
- for (const char *p = form; *p != '\0'; p++)
- if (*p == '%') {
- if (p[1] == '%')
- p++;
- else
- nspecs++;
- }
- if (nspecs > 1) {
- lex_error("bad format `%1'", form);
- return strsave(form);
- }
- }
- sprintf(sprintf_buf, form, n);
- return strsave(sprintf_buf);
-}
-
-char *do_sprintf(const char *form, const double *v, int nv)
-{
- string result;
- int i = 0;
- string one_format;
- while (*form) {
- if (*form == '%') {
- one_format += *form++;
- for (; *form != '\0' && strchr("#-+ 0123456789.", *form) != 0; form++)
- one_format += *form;
- if (*form == '\0' || strchr("eEfgG%", *form) == 0) {
- lex_error("bad sprintf format");
- result += one_format;
- result += form;
- break;
- }
- if (*form == '%') {
- one_format += *form++;
- one_format += '\0';
- sprintf(sprintf_buf, one_format.contents());
- }
- else {
- if (i >= nv) {
- lex_error("too few arguments to sprintf");
- result += one_format;
- result += form;
- break;
- }
- one_format += *form++;
- one_format += '\0';
- sprintf(sprintf_buf, one_format.contents(), v[i++]);
- }
- one_format.clear();
- result += sprintf_buf;
- }
- else
- result += *form++;
- }
- result += '\0';
- return strsave(result.contents());
-}
diff --git a/contrib/groff/src/preproc/pic/position.h b/contrib/groff/src/preproc/pic/position.h
deleted file mode 100644
index ab7d5469c006..000000000000
--- a/contrib/groff/src/preproc/pic/position.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct place;
-struct position {
- double x;
- double y;
- position(double, double );
- position();
- position(const place &);
- position &operator+=(const position &);
- position &operator-=(const position &);
- position &operator*=(double);
- position &operator/=(double);
-};
-
-position operator-(const position &);
-position operator+(const position &, const position &);
-position operator-(const position &, const position &);
-position operator/(const position &, double);
-position operator*(const position &, double);
-// dot product
-double operator*(const position &, const position &);
-int operator==(const position &, const position &);
-int operator!=(const position &, const position &);
-
-double hypot(const position &a);
-
-typedef position distance;
-
diff --git a/contrib/groff/src/preproc/pic/tex.cc b/contrib/groff/src/preproc/pic/tex.cc
deleted file mode 100644
index 2a91b621c62d..000000000000
--- a/contrib/groff/src/preproc/pic/tex.cc
+++ /dev/null
@@ -1,412 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "pic.h"
-
-#ifdef TEX_SUPPORT
-
-#include "common.h"
-
-class tex_output : public common_output {
-public:
- tex_output();
- ~tex_output();
- void start_picture(double, const position &ll, const position &ur);
- void finish_picture();
- void text(const position &, text_piece *, int, double);
- void line(const position &, const position *, int n,
- const line_type &);
- void polygon(const position *, int n,
- const line_type &, double);
- void spline(const position &, const position *, int n,
- const line_type &);
- void arc(const position &, const position &, const position &,
- const line_type &);
- void circle(const position &, double rad, const line_type &, double);
- void ellipse(const position &, const distance &, const line_type &, double);
- void command(const char *, const char *, int);
- int supports_filled_polygons();
-private:
- position upper_left;
- double height;
- double width;
- double scale;
- double pen_size;
-
- void point(const position &);
- void dot(const position &, const line_type &);
- void solid_arc(const position &cent, double rad, double start_angle,
- double end_angle, const line_type &lt);
- position transform(const position &);
-protected:
- virtual void set_pen_size(double ps);
-};
-
-// convert inches to milliinches
-
-inline int milliinches(double x)
-{
- return int(x*1000.0 + .5);
-}
-
-inline position tex_output::transform(const position &pos)
-{
- return position((pos.x - upper_left.x)/scale,
- (upper_left.y - pos.y)/scale);
-}
-
-output *make_tex_output()
-{
- return new tex_output;
-}
-
-tex_output::tex_output()
-{
-}
-
-tex_output::~tex_output()
-{
-}
-
-const int DEFAULT_PEN_SIZE = 8;
-
-void tex_output::set_pen_size(double ps)
-{
- if (ps < 0.0)
- ps = -1.0;
- if (ps != pen_size) {
- pen_size = ps;
- printf(" \\special{pn %d}%%\n",
- ps < 0.0 ? DEFAULT_PEN_SIZE : int(ps*(1000.0/72.0) + .5));
- }
-}
-
-void tex_output::start_picture(double sc, const position &ll,
- const position &ur)
-{
- upper_left.x = ll.x;
- upper_left.y = ur.y;
- scale = compute_scale(sc, ll, ur);
- height = (ur.y - ll.y)/scale;
- width = (ur.x - ll.x)/scale;
- /* the point of \vskip 0pt is to ensure that the vtop gets
- a height of 0 rather than the height of the hbox; this
- might be non-zero if text from text attributes lies outside pic's
- idea of the bounding box of the picture. */
- fputs("\\expandafter\\ifx\\csname graph\\endcsname\\relax \\csname newbox\\endcsname\\graph\\fi\n"
- "\\expandafter\\ifx\\csname graphtemp\\endcsname\\relax \\csname newdimen\\endcsname\\graphtemp\\fi\n"
- "\\setbox\\graph=\\vtop{\\vskip 0pt\\hbox{%\n",
- stdout);
- pen_size = -2.0;
-}
-
-void tex_output::finish_picture()
-{
- printf(" \\hbox{\\vrule depth%.3fin width0pt height 0pt}%%\n"
- " \\kern %.3fin\n"
- " }%%\n"
- "}%%\n",
- height, width);
-}
-
-void tex_output::text(const position &center, text_piece *v, int n, double)
-{
- position c = transform(center);
- for (int i = 0; i < n; i++)
- if (v[i].text != 0 && *v[i].text != '\0') {
- int j = 2*i - n + 1;
- if (v[i].adj.v == ABOVE_ADJUST)
- j--;
- else if (v[i].adj.v == BELOW_ADJUST)
- j++;
- if (j == 0) {
- printf(" \\graphtemp=.5ex\\advance\\graphtemp by %.3fin\n", c.y);
- }
- else {
- printf(" \\graphtemp=\\baselineskip"
- "\\multiply\\graphtemp by %d"
- "\\divide\\graphtemp by 2\n"
- " \\advance\\graphtemp by .5ex"
- "\\advance\\graphtemp by %.3fin\n",
- j, c.y);
- }
- printf(" \\rlap{\\kern %.3fin\\lower\\graphtemp", c.x);
- fputs("\\hbox to 0pt{", stdout);
- if (v[i].adj.h != LEFT_ADJUST)
- fputs("\\hss ", stdout);
- fputs(v[i].text, stdout);
- if (v[i].adj.h != RIGHT_ADJUST)
- fputs("\\hss", stdout);
- fputs("}}%\n", stdout);
- }
-}
-
-void tex_output::point(const position &pos)
-{
- position p = transform(pos);
- printf(" \\special{pa %d %d}%%\n", milliinches(p.x), milliinches(p.y));
-}
-
-void tex_output::line(const position &start, const position *v, int n,
- const line_type &lt)
-{
- set_pen_size(lt.thickness);
- point(start);
- for (int i = 0; i < n; i++)
- point(v[i]);
- fputs(" \\special{", stdout);
- switch(lt.type) {
- case line_type::invisible:
- fputs("ip", stdout);
- break;
- case line_type::solid:
- fputs("fp", stdout);
- break;
- case line_type::dotted:
- printf("dt %.3f", lt.dash_width/scale);
- break;
- case line_type::dashed:
- printf("da %.3f", lt.dash_width/scale);
- break;
- }
- fputs("}%\n", stdout);
-}
-
-void tex_output::polygon(const position *v, int n,
- const line_type &lt, double fill)
-{
- if (fill >= 0.0) {
- if (fill > 1.0)
- fill = 1.0;
- printf(" \\special{sh %.3f}%%\n", fill);
- }
- line(v[n-1], v, n, lt);
-}
-
-void tex_output::spline(const position &start, const position *v, int n,
- const line_type &lt)
-{
- if (lt.type == line_type::invisible)
- return;
- set_pen_size(lt.thickness);
- point(start);
- for (int i = 0; i < n; i++)
- point(v[i]);
- fputs(" \\special{sp", stdout);
- switch(lt.type) {
- case line_type::solid:
- break;
- case line_type::dotted:
- printf(" %.3f", -lt.dash_width/scale);
- break;
- case line_type::dashed:
- printf(" %.3f", lt.dash_width/scale);
- break;
- case line_type::invisible:
- assert(0);
- }
- fputs("}%\n", stdout);
-}
-
-void tex_output::solid_arc(const position &cent, double rad,
- double start_angle, double end_angle,
- const line_type &lt)
-{
- set_pen_size(lt.thickness);
- position c = transform(cent);
- printf(" \\special{ar %d %d %d %d %f %f}%%\n",
- milliinches(c.x),
- milliinches(c.y),
- milliinches(rad/scale),
- milliinches(rad/scale),
- -end_angle,
- (-end_angle > -start_angle) ? (double)M_PI * 2 - start_angle
- : -start_angle);
-}
-
-void tex_output::arc(const position &start, const position &cent,
- const position &end, const line_type &lt)
-{
- switch (lt.type) {
- case line_type::invisible:
- break;
- case line_type::dashed:
- dashed_arc(start, cent, end, lt);
- break;
- case line_type::dotted:
- dotted_arc(start, cent, end, lt);
- break;
- case line_type::solid:
- {
- position c;
- if (!compute_arc_center(start, cent, end, &c)) {
- line(start, &end, 1, lt);
- break;
- }
- solid_arc(c,
- hypot(cent - start),
- atan2(start.y - c.y, start.x - c.x),
- atan2(end.y - c.y, end.x - c.x),
- lt);
- break;
- }
- }
-}
-
-void tex_output::circle(const position &cent, double rad,
- const line_type &lt, double fill)
-{
- if (fill >= 0.0 && lt.type != line_type::solid) {
- if (fill > 1.0)
- fill = 1.0;
- line_type ilt;
- ilt.type = line_type::invisible;
- ellipse(cent, position(rad*2.0, rad*2.0), ilt, fill);
- }
- switch (lt.type) {
- case line_type::dashed:
- dashed_circle(cent, rad, lt);
- break;
- case line_type::invisible:
- break;
- case line_type::solid:
- ellipse(cent, position(rad*2.0,rad*2.0), lt, fill);
- break;
- case line_type::dotted:
- dotted_circle(cent, rad, lt);
- break;
- default:
- assert(0);
- }
-}
-
-void tex_output::ellipse(const position &cent, const distance &dim,
- const line_type &lt, double fill)
-{
- if (lt.type == line_type::invisible) {
- if (fill < 0.0)
- return;
- }
- else
- set_pen_size(lt.thickness);
- if (fill >= 0.0) {
- if (fill > 1.0)
- fill = 1.0;
- printf(" \\special{sh %.3f}%%\n", fill);
- }
- position c = transform(cent);
- printf(" \\special{%s %d %d %d %d 0 6.28319}%%\n",
- (lt.type == line_type::invisible ? "ia" : "ar"),
- milliinches(c.x),
- milliinches(c.y),
- milliinches(dim.x/(2.0*scale)),
- milliinches(dim.y/(2.0*scale)));
-}
-
-void tex_output::command(const char *s, const char *, int)
-{
- fputs(s, stdout);
- putchar('%'); // avoid unwanted spaces
- putchar('\n');
-}
-
-int tex_output::supports_filled_polygons()
-{
- return 1;
-}
-
-void tex_output::dot(const position &pos, const line_type &lt)
-{
- if (zero_length_line_flag) {
- line_type slt = lt;
- slt.type = line_type::solid;
- line(pos, &pos, 1, slt);
- }
- else {
- int dot_rad = int(lt.thickness*(1000.0/(72.0*2)) + .5);
- if (dot_rad == 0)
- dot_rad = 1;
- position p = transform(pos);
- printf(" \\special{sh 1}%%\n"
- " \\special{ia %d %d %d %d 0 6.28319}%%\n",
- milliinches(p.x), milliinches(p.y), dot_rad, dot_rad);
- }
-}
-
-class tpic_output : public tex_output {
-public:
- tpic_output();
- void command(const char *, const char *, int);
-private:
- void set_pen_size(double ps);
- int default_pen_size;
- int prev_default_pen_size;
-};
-
-tpic_output::tpic_output()
-: default_pen_size(DEFAULT_PEN_SIZE), prev_default_pen_size(DEFAULT_PEN_SIZE)
-{
-}
-
-void tpic_output::command(const char *s, const char *filename, int lineno)
-{
- assert(s[0] == '.');
- if (s[1] == 'p' && s[2] == 's' && (s[3] == '\0' || !csalpha(s[3]))) {
- const char *p = s + 3;
- while (csspace(*p))
- p++;
- if (*p == '\0') {
- int temp = default_pen_size;
- default_pen_size = prev_default_pen_size;
- prev_default_pen_size = temp;
- }
- else {
- char *ptr;
- int temp = (int)strtol(p, &ptr, 10);
- if (temp == 0 && ptr == p)
- error_with_file_and_line(filename, lineno,
- "argument to `.ps' not an integer");
- else if (temp < 0)
- error_with_file_and_line(filename, lineno,
- "negative pen size");
- else {
- prev_default_pen_size = default_pen_size;
- default_pen_size = temp;
- }
- }
- }
- else
- printf("\\%s%%\n", s + 1);
-}
-
-void tpic_output::set_pen_size(double ps)
-{
- if (ps < 0.0)
- printf(" \\special{pn %d}%%\n", default_pen_size);
- else
- tex_output::set_pen_size(ps);
-}
-
-output *make_tpic_output()
-{
- return new tpic_output;
-}
-
-#endif
diff --git a/contrib/groff/src/preproc/pic/text.h b/contrib/groff/src/preproc/pic/text.h
deleted file mode 100644
index f9d34875075f..000000000000
--- a/contrib/groff/src/preproc/pic/text.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// -*- C++ -*-
-
-enum hadjustment {
- CENTER_ADJUST,
- LEFT_ADJUST,
- RIGHT_ADJUST
- };
-
-enum vadjustment {
- NONE_ADJUST,
- ABOVE_ADJUST,
- BELOW_ADJUST
- };
-
-struct adjustment {
- hadjustment h;
- vadjustment v;
-};
-
-struct text_piece {
- char *text;
- adjustment adj;
- const char *filename;
- int lineno;
-
- text_piece();
- ~text_piece();
-};
diff --git a/contrib/groff/src/preproc/pic/troff.cc b/contrib/groff/src/preproc/pic/troff.cc
deleted file mode 100644
index 62fe540ae3a6..000000000000
--- a/contrib/groff/src/preproc/pic/troff.cc
+++ /dev/null
@@ -1,504 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "pic.h"
-#include "common.h"
-#include "htmlindicate.h"
-
-
-const double RELATIVE_THICKNESS = -1.0;
-const double BAD_THICKNESS = -2.0;
-
-class simple_output : public common_output {
- virtual void simple_line(const position &, const position &) = 0;
- virtual void simple_spline(const position &, const position *, int n) = 0;
- virtual void simple_arc(const position &, const position &,
- const position &) = 0;
- virtual void simple_circle(int, const position &, double rad) = 0;
- virtual void simple_ellipse(int, const position &, const distance &) = 0;
- virtual void simple_polygon(int, const position *, int) = 0;
- virtual void line_thickness(double) = 0;
- virtual void set_fill(double) = 0;
- void dot(const position &, const line_type &) = 0;
-public:
- void start_picture(double sc, const position &ll, const position &ur) = 0;
- void finish_picture() = 0;
- void text(const position &, text_piece *, int, double) = 0;
- void line(const position &, const position *, int n,
- const line_type &);
- void polygon(const position *, int n,
- const line_type &, double);
- void spline(const position &, const position *, int n,
- const line_type &);
- void arc(const position &, const position &, const position &,
- const line_type &);
- void circle(const position &, double rad, const line_type &, double);
- void ellipse(const position &, const distance &, const line_type &, double);
- int supports_filled_polygons();
-};
-
-int simple_output::supports_filled_polygons()
-{
- return driver_extension_flag != 0;
-}
-
-void simple_output::arc(const position &start, const position &cent,
- const position &end, const line_type &lt)
-{
- switch (lt.type) {
- case line_type::solid:
- line_thickness(lt.thickness);
- simple_arc(start, cent, end);
- break;
- case line_type::invisible:
- break;
- case line_type::dashed:
- dashed_arc(start, cent, end, lt);
- break;
- case line_type::dotted:
- dotted_arc(start, cent, end, lt);
- break;
- }
-}
-
-void simple_output::line(const position &start, const position *v, int n,
- const line_type &lt)
-{
- position pos = start;
- line_thickness(lt.thickness);
- for (int i = 0; i < n; i++) {
- switch (lt.type) {
- case line_type::solid:
- simple_line(pos, v[i]);
- break;
- case line_type::dotted:
- {
- distance vec(v[i] - pos);
- double dist = hypot(vec);
- int ndots = int(dist/lt.dash_width + .5);
- if (ndots == 0)
- dot(pos, lt);
- else {
- vec /= double(ndots);
- for (int j = 0; j <= ndots; j++)
- dot(pos + vec*j, lt);
- }
- }
- break;
- case line_type::dashed:
- {
- distance vec(v[i] - pos);
- double dist = hypot(vec);
- if (dist <= lt.dash_width*2.0)
- simple_line(pos, v[i]);
- else {
- int ndashes = int((dist - lt.dash_width)/(lt.dash_width*2.0) + .5);
- distance dash_vec = vec*(lt.dash_width/dist);
- double dash_gap = (dist - lt.dash_width)/ndashes;
- distance dash_gap_vec = vec*(dash_gap/dist);
- for (int j = 0; j <= ndashes; j++) {
- position s(pos + dash_gap_vec*j);
- simple_line(s, s + dash_vec);
- }
- }
- }
- break;
- case line_type::invisible:
- break;
- default:
- assert(0);
- }
- pos = v[i];
- }
-}
-
-void simple_output::spline(const position &start, const position *v, int n,
- const line_type &lt)
-{
- line_thickness(lt.thickness);
- simple_spline(start, v, n);
-}
-
-void simple_output::polygon(const position *v, int n,
- const line_type &lt, double fill)
-{
- if (driver_extension_flag) {
- if (fill >= 0.0) {
- set_fill(fill);
- simple_polygon(1, v, n);
- }
- }
- if (lt.type == line_type::solid && driver_extension_flag) {
- line_thickness(lt.thickness);
- simple_polygon(0, v, n);
- }
- else if (lt.type != line_type::invisible) {
- line_thickness(lt.thickness);
- line(v[n - 1], v, n, lt);
- }
-}
-
-void simple_output::circle(const position &cent, double rad,
- const line_type &lt, double fill)
-{
- if (driver_extension_flag && fill >= 0.0) {
- set_fill(fill);
- simple_circle(1, cent, rad);
- }
- line_thickness(lt.thickness);
- switch (lt.type) {
- case line_type::invisible:
- break;
- case line_type::dashed:
- dashed_circle(cent, rad, lt);
- break;
- case line_type::dotted:
- dotted_circle(cent, rad, lt);
- break;
- case line_type::solid:
- simple_circle(0, cent, rad);
- break;
- default:
- assert(0);
- }
-}
-
-void simple_output::ellipse(const position &cent, const distance &dim,
- const line_type &lt, double fill)
-{
- if (driver_extension_flag && fill >= 0.0) {
- set_fill(fill);
- simple_ellipse(1, cent, dim);
- }
- if (lt.type != line_type::invisible)
- line_thickness(lt.thickness);
- switch (lt.type) {
- case line_type::invisible:
- break;
- case line_type::dotted:
- case line_type::dashed:
- case line_type::solid:
- simple_ellipse(0, cent, dim);
- break;
- default:
- assert(0);
- }
-}
-
-#define FILL_MAX 1000
-
-class troff_output : public simple_output {
- const char *last_filename;
- position upper_left;
- double height;
- double scale;
- double last_line_thickness;
- double last_fill;
-public:
- troff_output();
- ~troff_output();
- void start_picture(double, const position &ll, const position &ur);
- void finish_picture();
- void text(const position &, text_piece *, int, double);
- void dot(const position &, const line_type &);
- void command(const char *, const char *, int);
- void set_location(const char *, int);
- void simple_line(const position &, const position &);
- void simple_spline(const position &, const position *, int n);
- void simple_arc(const position &, const position &, const position &);
- void simple_circle(int, const position &, double rad);
- void simple_ellipse(int, const position &, const distance &);
- void simple_polygon(int, const position *, int);
- void line_thickness(double p);
- void set_fill(double);
- position transform(const position &);
-};
-
-output *make_troff_output()
-{
- return new troff_output;
-}
-
-troff_output::troff_output()
-: last_filename(0), last_line_thickness(BAD_THICKNESS), last_fill(-1.0)
-{
-}
-
-troff_output::~troff_output()
-{
-}
-
-inline position troff_output::transform(const position &pos)
-{
- return position((pos.x - upper_left.x)/scale,
- (upper_left.y - pos.y)/scale);
-}
-
-#define FILL_REG "00"
-
-// If this register > 0, then pic will generate \X'ps: ...' commands
-// if the aligned attribute is used.
-#define GROPS_REG "0p"
-
-// If this register is defined, geqn won't produce `\x's.
-#define EQN_NO_EXTRA_SPACE_REG "0x"
-
-void troff_output::start_picture(double sc,
- const position &ll, const position &ur)
-{
- upper_left.x = ll.x;
- upper_left.y = ur.y;
- scale = compute_scale(sc, ll, ur);
- height = (ur.y - ll.y)/scale;
- double width = (ur.x - ll.x)/scale;
- graphic_start(0);
- printf(".PS %.3fi %.3fi", height, width);
- if (args)
- printf(" %s\n", args);
- else
- putchar('\n');
- printf(".\\\" %g %g %g %g\n", ll.x, ll.y, ur.x, ur.y);
- printf(".\\\" %.3fi %.3fi %.3fi %.3fi\n", 0.0, height, width, 0.0);
- printf(".nr " FILL_REG " \\n(.u\n.nf\n");
- printf(".nr " EQN_NO_EXTRA_SPACE_REG " 1\n");
- // This guarantees that if the picture is used in a diversion it will
- // have the right width.
- printf("\\h'%.3fi'\n.sp -1\n", width);
-}
-
-void troff_output::finish_picture()
-{
- line_thickness(BAD_THICKNESS);
- last_fill = -1.0; // force it to be reset for each picture
- if (!flyback_flag)
- printf(".sp %.3fi+1\n", height);
- printf(".if \\n(" FILL_REG " .fi\n");
- printf(".br\n");
- printf(".nr " EQN_NO_EXTRA_SPACE_REG " 0\n");
- // this is a little gross
- set_location(current_filename, current_lineno);
- fputs(flyback_flag ? ".PF\n" : ".PE\n", stdout);
- graphic_end();
-}
-
-void troff_output::command(const char *s,
- const char *filename, int lineno)
-{
- if (filename != 0)
- set_location(filename, lineno);
- fputs(s, stdout);
- putchar('\n');
-}
-
-void troff_output::simple_circle(int filled, const position &cent, double rad)
-{
- position c = transform(cent);
- printf("\\h'%.3fi'"
- "\\v'%.3fi'"
- "\\D'%c%.3fi'"
- "\n.sp -1\n",
- c.x - rad/scale,
- c.y,
- (filled ? 'C' : 'c'),
- rad*2.0/scale);
-}
-
-void troff_output::simple_ellipse(int filled, const position &cent,
- const distance &dim)
-{
- position c = transform(cent);
- printf("\\h'%.3fi'"
- "\\v'%.3fi'"
- "\\D'%c%.3fi %.3fi'"
- "\n.sp -1\n",
- c.x - dim.x/(2.0*scale),
- c.y,
- (filled ? 'E' : 'e'),
- dim.x/scale, dim.y/scale);
-}
-
-void troff_output::simple_arc(const position &start, const distance &cent,
- const distance &end)
-{
- position s = transform(start);
- position c = transform(cent);
- distance cv = c - s;
- distance ev = transform(end) - c;
- printf("\\h'%.3fi'"
- "\\v'%.3fi'"
- "\\D'a%.3fi %.3fi %.3fi %.3fi'"
- "\n.sp -1\n",
- s.x, s.y, cv.x, cv.y, ev.x, ev.y);
-}
-
-void troff_output::simple_line(const position &start, const position &end)
-{
- position s = transform(start);
- distance ev = transform(end) - s;
- printf("\\h'%.3fi'"
- "\\v'%.3fi'"
- "\\D'l%.3fi %.3fi'"
- "\n.sp -1\n",
- s.x, s.y, ev.x, ev.y);
-}
-
-void troff_output::simple_spline(const position &start,
- const position *v, int n)
-{
- position pos = transform(start);
- printf("\\h'%.3fi'"
- "\\v'%.3fi'",
- pos.x, pos.y);
- fputs("\\D'~", stdout);
- for (int i = 0; i < n; i++) {
- position temp = transform(v[i]);
- distance d = temp - pos;
- pos = temp;
- if (i != 0)
- putchar(' ');
- printf("%.3fi %.3fi", d.x, d.y);
- }
- printf("'\n.sp -1\n");
-}
-
-// a solid polygon
-
-void troff_output::simple_polygon(int filled, const position *v, int n)
-{
- position pos = transform(v[0]);
- printf("\\h'%.3fi'"
- "\\v'%.3fi'",
- pos.x, pos.y);
- printf("\\D'%c", (filled ? 'P' : 'p'));
- for (int i = 1; i < n; i++) {
- position temp = transform(v[i]);
- distance d = temp - pos;
- pos = temp;
- if (i != 1)
- putchar(' ');
- printf("%.3fi %.3fi", d.x, d.y);
- }
- printf("'\n.sp -1\n");
-}
-
-const double TEXT_AXIS = 0.22; // in ems
-
-static const char *choose_delimiter(const char *text)
-{
- if (strchr(text, '\'') == 0)
- return "'";
- else
- return "\\(ts";
-}
-
-void troff_output::text(const position &center, text_piece *v, int n,
- double ang)
-{
- line_thickness(BAD_THICKNESS); // the text might use lines (eg in equations)
- int rotate_flag = 0;
- if (driver_extension_flag && ang != 0.0) {
- rotate_flag = 1;
- position c = transform(center);
- printf(".if \\n(" GROPS_REG " \\{\\\n"
- "\\h'%.3fi'"
- "\\v'%.3fi'"
- "\\X'ps: exec gsave currentpoint 2 copy translate %.4f rotate neg exch neg exch translate'"
- "\n.sp -1\n"
- ".\\}\n",
- c.x, c.y, -ang*180.0/M_PI);
- }
- for (int i = 0; i < n; i++)
- if (v[i].text != 0 && *v[i].text != '\0') {
- position c = transform(center);
- if (v[i].filename != 0)
- set_location(v[i].filename, v[i].lineno);
- printf("\\h'%.3fi", c.x);
- const char *delim = choose_delimiter(v[i].text);
- if (v[i].adj.h == RIGHT_ADJUST)
- printf("-\\w%s%s%su", delim, v[i].text, delim);
- else if (v[i].adj.h != LEFT_ADJUST)
- printf("-(\\w%s%s%su/2u)", delim, v[i].text, delim);
- putchar('\'');
- printf("\\v'%.3fi-(%dv/2u)+%dv+%.2fm",
- c.y,
- n - 1,
- i,
- TEXT_AXIS);
- if (v[i].adj.v == ABOVE_ADJUST)
- printf("-.5v");
- else if (v[i].adj.v == BELOW_ADJUST)
- printf("+.5v");
- putchar('\'');
- fputs(v[i].text, stdout);
- fputs("\n.sp -1\n", stdout);
- }
- if (rotate_flag)
- printf(".if '\\*(.T'ps' \\{\\\n"
- "\\X'ps: exec grestore'\n.sp -1\n"
- ".\\}\n");
-}
-
-void troff_output::line_thickness(double p)
-{
- if (p < 0.0)
- p = RELATIVE_THICKNESS;
- if (driver_extension_flag && p != last_line_thickness) {
- printf("\\D't %.3fp'\\h'%.3fp'\n.sp -1\n", p, -p);
- last_line_thickness = p;
- }
-}
-
-void troff_output::set_fill(double f)
-{
- if (driver_extension_flag && f != last_fill) {
- printf("\\D'f %du'\\h'%du'\n.sp -1\n", int(f*FILL_MAX), -int(f*FILL_MAX));
- last_fill = f;
- }
-}
-
-const double DOT_AXIS = .044;
-
-void troff_output::dot(const position &cent, const line_type &lt)
-{
- if (driver_extension_flag) {
- line_thickness(lt.thickness);
- simple_line(cent, cent);
- }
- else {
- position c = transform(cent);
- printf("\\h'%.3fi-(\\w'.'u/2u)'"
- "\\v'%.3fi+%.2fm'"
- ".\n.sp -1\n",
- c.x,
- c.y,
- DOT_AXIS);
- }
-}
-
-void troff_output::set_location(const char *s, int n)
-{
- if (last_filename != 0 && strcmp(s, last_filename) == 0)
- printf(".lf %d\n", n);
- else {
- printf(".lf %d %s\n", n, s);
- last_filename = s;
- }
-}
diff --git a/contrib/groff/src/preproc/refer/Makefile.sub b/contrib/groff/src/preproc/refer/Makefile.sub
deleted file mode 100644
index 1631b5e36e05..000000000000
--- a/contrib/groff/src/preproc/refer/Makefile.sub
+++ /dev/null
@@ -1,23 +0,0 @@
-PROG=refer
-MAN1=refer.n
-XLIBS=$(LIBBIB) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
- command.o \
- label.o \
- ref.o \
- refer.o \
- token.o
-CCSRCS=\
- $(srcdir)/command.cc \
- $(srcdir)/ref.cc \
- $(srcdir)/refer.cc \
- $(srcdir)/token.cc
-HDRS=\
- $(srcdir)/refer.h \
- $(srcdir)/token.h \
- $(srcdir)/command.h \
- $(srcdir)/ref.h
-GRAM=$(srcdir)/label.y
-YTABC=$(srcdir)/label.cc
-NAMEPREFIX=$(g)
diff --git a/contrib/groff/src/preproc/refer/TODO b/contrib/groff/src/preproc/refer/TODO
deleted file mode 100644
index 5bbd9bff1e8c..000000000000
--- a/contrib/groff/src/preproc/refer/TODO
+++ /dev/null
@@ -1,124 +0,0 @@
-inline references
-
-Some sort of macro/subroutine that can cover several references.
-
-move-punctuation should ignore multiple punctuation characters.
-
-Make the index files machine independent.
-
-Allow search keys to be negated (with !) to indicate that the
-reference should not contain the key. Ignore negated keys during
-indexed searching.
-
-Provide an option with lkbib and lookbib that prints the location
-(filename, position) of each reference. Need to map filename_id's
-back to filenames.
-
-Rename join-authors to join-fields. Have a separate label-join-fields
-command used by @ and #.
-
-Have some sort of quantifier: eg $.n#A means execute `$.n' for each
-instance of an A field, setting $ to that field, and then join the
-results using the join-authors command.
-
-no-text-in-bracket command which says not to allow post_text and
-pre_text when the [] flags has been given. Useful for superscripted
-footnotes.
-
-Make it possible to translate - to \(en in page ranges.
-
-Trim eign a bit.
-
-In indexed searching discard all numeric keys except dates.
-
-Allow `\ ' to separate article from first word.
-
-%also
-
-Option automatically to supply [] flags in every reference.
-
-See if we can avoid requiring a comma before jr. and so on
-in find_last_name().
-
-Cache sortified authors in authors string during tentative evaluation of
-label specification.
-
-Possibly don't allow * and % expressions in the first part of ?:, | or
-& expressions.
-
-Handle better the case where <> occurs inside functions and in the
-first operand of ~. Or perhaps implement <> using some magic character
-in the string.
-
-Should special treatment be given to lines beginning with . in
-references? (Unix refer seems to treat them like `%').
-
-Add global flag to control whether all files should be stat-ed after
-loading, and whether they should be stat-ed before each search.
-Perhaps make this dependent on the number of files there are.
-
-Option to truncate keys to truncate_len in linear searching.
-
-Allow multiple -f options in indxbib.
-
-In indxbib, possibly store common words rather than common words
-filename. In this case store only words that are actually present in
-the file.
-
-Perhaps we should put out an obnoxious copyright message when lookbib
-starts up.
-
-Provide an option that writes a file containing just the references
-actually used. Useful if you want to distribute a document.
-
-Have a magic token such that
-%A <sort stuff><magic token><print stuff>
-will print as though it were
-%A <print stuff>
-but sort as though it were
-%A <sort stuff>
-Do we need this if we can specify author alternatives for sorting?
-No, provided we have separate alternatives for @.
-
-In consider_authors when last names are ambiguous we might be able to
-use just the first name and not Jr. bit. Or we might be able to
-abbreviate the author.
-
-It ought to be possible to specify an alternative field to sort on
-instead of date. (ie if there's a field giving the type of document --
-these references should sort after any years)
-
-Provide a way to execute a command using a command-line option.
-
-Option to set the label-spec as a command-line option (-L).
-
-Command to to specify which fields can occur multiple times:
-multiple AE
-
-Command to specify how various fields sort:
-aort-as-name A
-sort-as-date D
-sort-as-title T
-sort-as-other O
-
-Command to specify which fields are author fields:
-# if we don't have A use field Q
-author-fields AQ
-
-Commands to set properties of tokens.
-sortify-token \(ae ae
-uppercase-token \[ae] \[AE]
-
-Command to set the names of months:
-months january february march april may ...
-
-Perhaps provide some sort of macro capability:
-# perhaps a macro capability
-defmacro foo
-annotation-field $1
-endef
-
-Command to control strings used in capitalization
-capitalize-start \s+2
-capitalize-end \s-2
-(perhaps make these arguments to the capitalize command.)
diff --git a/contrib/groff/src/preproc/refer/command.cc b/contrib/groff/src/preproc/refer/command.cc
deleted file mode 100644
index 004189eeb03a..000000000000
--- a/contrib/groff/src/preproc/refer/command.cc
+++ /dev/null
@@ -1,807 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "refer.h"
-#include "refid.h"
-#include "search.h"
-#include "command.h"
-
-cset cs_field_name = csalpha;
-
-class input_item {
- input_item *next;
- char *filename;
- int first_lineno;
- string buffer;
- const char *ptr;
- const char *end;
-public:
- input_item(string &, const char *, int = 1);
- ~input_item();
- int get_char();
- int peek_char();
- void skip_char();
- int get_location(const char **, int *);
-
- friend class input_stack;
-};
-
-input_item::input_item(string &s, const char *fn, int ln)
-: filename(strsave(fn)), first_lineno(ln)
-{
- buffer.move(s);
- ptr = buffer.contents();
- end = ptr + buffer.length();
-}
-
-input_item::~input_item()
-{
- a_delete filename;
-}
-
-inline int input_item::peek_char()
-{
- if (ptr >= end)
- return EOF;
- else
- return (unsigned char)*ptr;
-}
-
-inline int input_item::get_char()
-{
- if (ptr >= end)
- return EOF;
- else
- return (unsigned char)*ptr++;
-}
-
-inline void input_item::skip_char()
-{
- ptr++;
-}
-
-int input_item::get_location(const char **filenamep, int *linenop)
-{
- *filenamep = filename;
- if (ptr == buffer.contents())
- *linenop = first_lineno;
- else {
- int ln = first_lineno;
- const char *e = ptr - 1;
- for (const char *p = buffer.contents(); p < e; p++)
- if (*p == '\n')
- ln++;
- *linenop = ln;
- }
- return 1;
-}
-
-class input_stack {
- static input_item *top;
-public:
- static void init();
- static int get_char();
- static int peek_char();
- static void skip_char() { top->skip_char(); }
- static void push_file(const char *);
- static void push_string(string &, const char *, int);
- static void error(const char *format,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-};
-
-input_item *input_stack::top = 0;
-
-void input_stack::init()
-{
- while (top) {
- input_item *tem = top;
- top = top->next;
- delete tem;
- }
-}
-
-int input_stack::get_char()
-{
- while (top) {
- int c = top->get_char();
- if (c >= 0)
- return c;
- input_item *tem = top;
- top = top->next;
- delete tem;
- }
- return -1;
-}
-
-int input_stack::peek_char()
-{
- while (top) {
- int c = top->peek_char();
- if (c >= 0)
- return c;
- input_item *tem = top;
- top = top->next;
- delete tem;
- }
- return -1;
-}
-
-void input_stack::push_file(const char *fn)
-{
- FILE *fp;
- if (strcmp(fn, "-") == 0) {
- fp = stdin;
- fn = "<standard input>";
- }
- else {
- errno = 0;
- fp = fopen(fn, "r");
- if (fp == 0) {
- error("can't open `%1': %2", fn, strerror(errno));
- return;
- }
- }
- string buf;
- int bol = 1;
- int lineno = 1;
- for (;;) {
- int c = getc(fp);
- if (bol && c == '.') {
- // replace lines beginning with .R1 or .R2 with a blank line
- c = getc(fp);
- if (c == 'R') {
- c = getc(fp);
- if (c == '1' || c == '2') {
- int cc = c;
- c = getc(fp);
- if (compatible_flag || c == ' ' || c == '\n' || c == EOF) {
- while (c != '\n' && c != EOF)
- c = getc(fp);
- }
- else {
- buf += '.';
- buf += 'R';
- buf += cc;
- }
- }
- else {
- buf += '.';
- buf += 'R';
- }
- }
- else
- buf += '.';
- }
- if (c == EOF)
- break;
- if (illegal_input_char(c))
- error_with_file_and_line(fn, lineno,
- "illegal input character code %1", int(c));
- else {
- buf += c;
- if (c == '\n') {
- bol = 1;
- lineno++;
- }
- else
- bol = 0;
- }
- }
- if (fp != stdin)
- fclose(fp);
- if (buf.length() > 0 && buf[buf.length() - 1] != '\n')
- buf += '\n';
- input_item *it = new input_item(buf, fn);
- it->next = top;
- top = it;
-}
-
-void input_stack::push_string(string &s, const char *filename, int lineno)
-{
- input_item *it = new input_item(s, filename, lineno);
- it->next = top;
- top = it;
-}
-
-void input_stack::error(const char *format, const errarg &arg1,
- const errarg &arg2, const errarg &arg3)
-{
- const char *filename;
- int lineno;
- for (input_item *it = top; it; it = it->next)
- if (it->get_location(&filename, &lineno)) {
- error_with_file_and_line(filename, lineno, format, arg1, arg2, arg3);
- return;
- }
- ::error(format, arg1, arg2, arg3);
-}
-
-void command_error(const char *format, const errarg &arg1,
- const errarg &arg2, const errarg &arg3)
-{
- input_stack::error(format, arg1, arg2, arg3);
-}
-
-// # not recognized in ""
-// \<newline> is recognized in ""
-// # does not conceal newline
-// if missing closing quote, word extends to end of line
-// no special treatment of \ other than before newline
-// \<newline> not recognized after #
-// ; allowed as alternative to newline
-// ; not recognized in ""
-// don't clear word_buffer; just append on
-// return -1 for EOF, 0 for newline, 1 for word
-
-int get_word(string &word_buffer)
-{
- int c = input_stack::get_char();
- for (;;) {
- if (c == '#') {
- do {
- c = input_stack::get_char();
- } while (c != '\n' && c != EOF);
- break;
- }
- if (c == '\\' && input_stack::peek_char() == '\n')
- input_stack::skip_char();
- else if (c != ' ' && c != '\t')
- break;
- c = input_stack::get_char();
- }
- if (c == EOF)
- return -1;
- if (c == '\n' || c == ';')
- return 0;
- if (c == '"') {
- for (;;) {
- c = input_stack::peek_char();
- if (c == EOF || c == '\n')
- break;
- input_stack::skip_char();
- if (c == '"') {
- int d = input_stack::peek_char();
- if (d == '"')
- input_stack::skip_char();
- else
- break;
- }
- else if (c == '\\') {
- int d = input_stack::peek_char();
- if (d == '\n')
- input_stack::skip_char();
- else
- word_buffer += '\\';
- }
- else
- word_buffer += c;
- }
- return 1;
- }
- word_buffer += c;
- for (;;) {
- c = input_stack::peek_char();
- if (c == ' ' || c == '\t' || c == '\n' || c == '#' || c == ';')
- break;
- input_stack::skip_char();
- if (c == '\\') {
- int d = input_stack::peek_char();
- if (d == '\n')
- input_stack::skip_char();
- else
- word_buffer += '\\';
- }
- else
- word_buffer += c;
- }
- return 1;
-}
-
-union argument {
- const char *s;
- int n;
-};
-
-// This is for debugging.
-
-static void echo_command(int argc, argument *argv)
-{
- for (int i = 0; i < argc; i++)
- fprintf(stderr, "%s\n", argv[i].s);
-}
-
-static void include_command(int argc, argument *argv)
-{
- assert(argc == 1);
- input_stack::push_file(argv[0].s);
-}
-
-static void capitalize_command(int argc, argument *argv)
-{
- if (argc > 0)
- capitalize_fields = argv[0].s;
- else
- capitalize_fields.clear();
-}
-
-static void accumulate_command(int, argument *)
-{
- accumulate = 1;
-}
-
-static void no_accumulate_command(int, argument *)
-{
- accumulate = 0;
-}
-
-static void move_punctuation_command(int, argument *)
-{
- move_punctuation = 1;
-}
-
-static void no_move_punctuation_command(int, argument *)
-{
- move_punctuation = 0;
-}
-
-static void sort_command(int argc, argument *argv)
-{
- if (argc == 0)
- sort_fields = "AD";
- else
- sort_fields = argv[0].s;
- accumulate = 1;
-}
-
-static void no_sort_command(int, argument *)
-{
- sort_fields.clear();
-}
-
-static void articles_command(int argc, argument *argv)
-{
- articles.clear();
- int i;
- for (i = 0; i < argc; i++) {
- articles += argv[i].s;
- articles += '\0';
- }
- int len = articles.length();
- for (i = 0; i < len; i++)
- articles[i] = cmlower(articles[i]);
-}
-
-static void database_command(int argc, argument *argv)
-{
- for (int i = 0; i < argc; i++)
- database_list.add_file(argv[i].s);
-}
-
-static void default_database_command(int, argument *)
-{
- search_default = 1;
-}
-
-static void no_default_database_command(int, argument *)
-{
- search_default = 0;
-}
-
-static void bibliography_command(int argc, argument *argv)
-{
- const char *saved_filename = current_filename;
- int saved_lineno = current_lineno;
- int saved_label_in_text = label_in_text;
- label_in_text = 0;
- if (!accumulate)
- fputs(".]<\n", stdout);
- for (int i = 0; i < argc; i++)
- do_bib(argv[i].s);
- if (accumulate)
- output_references();
- else
- fputs(".]>\n", stdout);
- current_filename = saved_filename;
- current_lineno = saved_lineno;
- label_in_text = saved_label_in_text;
-}
-
-static void annotate_command(int argc, argument *argv)
-{
- if (argc > 0)
- annotation_field = argv[0].s[0];
- else
- annotation_field = 'X';
- if (argc == 2)
- annotation_macro = argv[1].s;
- else
- annotation_macro = "AP";
-}
-
-static void no_annotate_command(int, argument *)
-{
- annotation_macro.clear();
- annotation_field = -1;
-}
-
-static void reverse_command(int, argument *argv)
-{
- reverse_fields = argv[0].s;
-}
-
-static void no_reverse_command(int, argument *)
-{
- reverse_fields.clear();
-}
-
-static void abbreviate_command(int argc, argument *argv)
-{
- abbreviate_fields = argv[0].s;
- period_before_initial = argc > 1 ? argv[1].s : ". ";
- period_before_last_name = argc > 2 ? argv[2].s : ". ";
- period_before_other = argc > 3 ? argv[3].s : ". ";
- period_before_hyphen = argc > 4 ? argv[4].s : ".";
-}
-
-static void no_abbreviate_command(int, argument *)
-{
- abbreviate_fields.clear();
-}
-
-string search_ignore_fields;
-
-static void search_ignore_command(int argc, argument *argv)
-{
- if (argc > 0)
- search_ignore_fields = argv[0].s;
- else
- search_ignore_fields = "XYZ";
- search_ignore_fields += '\0';
- linear_ignore_fields = search_ignore_fields.contents();
-}
-
-static void no_search_ignore_command(int, argument *)
-{
- linear_ignore_fields = "";
-}
-
-static void search_truncate_command(int argc, argument *argv)
-{
- if (argc > 0)
- linear_truncate_len = argv[0].n;
- else
- linear_truncate_len = 6;
-}
-
-static void no_search_truncate_command(int, argument *)
-{
- linear_truncate_len = -1;
-}
-
-static void discard_command(int argc, argument *argv)
-{
- if (argc == 0)
- discard_fields = "XYZ";
- else
- discard_fields = argv[0].s;
- accumulate = 1;
-}
-
-static void no_discard_command(int, argument *)
-{
- discard_fields.clear();
-}
-
-static void label_command(int, argument *argv)
-{
- set_label_spec(argv[0].s);
-}
-
-static void abbreviate_label_ranges_command(int argc, argument *argv)
-{
- abbreviate_label_ranges = 1;
- label_range_indicator = argc > 0 ? argv[0].s : "-";
-}
-
-static void no_abbreviate_label_ranges_command(int, argument *)
-{
- abbreviate_label_ranges = 0;
-}
-
-static void label_in_reference_command(int, argument *)
-{
- label_in_reference = 1;
-}
-
-static void no_label_in_reference_command(int, argument *)
-{
- label_in_reference = 0;
-}
-
-static void label_in_text_command(int, argument *)
-{
- label_in_text = 1;
-}
-
-static void no_label_in_text_command(int, argument *)
-{
- label_in_text = 0;
-}
-
-static void sort_adjacent_labels_command(int, argument *)
-{
- sort_adjacent_labels = 1;
-}
-
-static void no_sort_adjacent_labels_command(int, argument *)
-{
- sort_adjacent_labels = 0;
-}
-
-static void date_as_label_command(int argc, argument *argv)
-{
- if (set_date_label_spec(argc > 0 ? argv[0].s : "D%a*"))
- date_as_label = 1;
-}
-
-static void no_date_as_label_command(int, argument *)
-{
- date_as_label = 0;
-}
-
-static void short_label_command(int, argument *argv)
-{
- if (set_short_label_spec(argv[0].s))
- short_label_flag = 1;
-}
-
-static void no_short_label_command(int, argument *)
-{
- short_label_flag = 0;
-}
-
-static void compatible_command(int, argument *)
-{
- compatible_flag = 1;
-}
-
-static void no_compatible_command(int, argument *)
-{
- compatible_flag = 0;
-}
-
-static void join_authors_command(int argc, argument *argv)
-{
- join_authors_exactly_two = argv[0].s;
- join_authors_default = argc > 1 ? argv[1].s : argv[0].s;
- join_authors_last_two = argc == 3 ? argv[2].s : argv[0].s;
-}
-
-static void bracket_label_command(int, argument *argv)
-{
- pre_label = argv[0].s;
- post_label = argv[1].s;
- sep_label = argv[2].s;
-}
-
-static void separate_label_second_parts_command(int, argument *argv)
-{
- separate_label_second_parts = argv[0].s;
-}
-
-static void et_al_command(int argc, argument *argv)
-{
- et_al = argv[0].s;
- et_al_min_elide = argv[1].n;
- if (et_al_min_elide < 1)
- et_al_min_elide = 1;
- et_al_min_total = argc >= 3 ? argv[2].n : 0;
-}
-
-static void no_et_al_command(int, argument *)
-{
- et_al.clear();
- et_al_min_elide = 0;
-}
-
-typedef void (*command_t)(int, argument *);
-
-/* arg_types is a string describing the numbers and types of arguments.
-s means a string, i means an integer, f is a list of fields, F is
-a single field,
-? means that the previous argument is optional, * means that the
-previous argument can occur any number of times. */
-
-struct {
- const char *name;
- command_t func;
- const char *arg_types;
-} command_table[] = {
- { "include", include_command, "s" },
- { "echo", echo_command, "s*" },
- { "capitalize", capitalize_command, "f?" },
- { "accumulate", accumulate_command, "" },
- { "no-accumulate", no_accumulate_command, "" },
- { "move-punctuation", move_punctuation_command, "" },
- { "no-move-punctuation", no_move_punctuation_command, "" },
- { "sort", sort_command, "s?" },
- { "no-sort", no_sort_command, "" },
- { "articles", articles_command, "s*" },
- { "database", database_command, "ss*" },
- { "default-database", default_database_command, "" },
- { "no-default-database", no_default_database_command, "" },
- { "bibliography", bibliography_command, "ss*" },
- { "annotate", annotate_command, "F?s?" },
- { "no-annotate", no_annotate_command, "" },
- { "reverse", reverse_command, "s" },
- { "no-reverse", no_reverse_command, "" },
- { "abbreviate", abbreviate_command, "ss?s?s?s?" },
- { "no-abbreviate", no_abbreviate_command, "" },
- { "search-ignore", search_ignore_command, "f?" },
- { "no-search-ignore", no_search_ignore_command, "" },
- { "search-truncate", search_truncate_command, "i?" },
- { "no-search-truncate", no_search_truncate_command, "" },
- { "discard", discard_command, "f?" },
- { "no-discard", no_discard_command, "" },
- { "label", label_command, "s" },
- { "abbreviate-label-ranges", abbreviate_label_ranges_command, "s?" },
- { "no-abbreviate-label-ranges", no_abbreviate_label_ranges_command, "" },
- { "label-in-reference", label_in_reference_command, "" },
- { "no-label-in-reference", no_label_in_reference_command, "" },
- { "label-in-text", label_in_text_command, "" },
- { "no-label-in-text", no_label_in_text_command, "" },
- { "sort-adjacent-labels", sort_adjacent_labels_command, "" },
- { "no-sort-adjacent-labels", no_sort_adjacent_labels_command, "" },
- { "date-as-label", date_as_label_command, "s?" },
- { "no-date-as-label", no_date_as_label_command, "" },
- { "short-label", short_label_command, "s" },
- { "no-short-label", no_short_label_command, "" },
- { "compatible", compatible_command, "" },
- { "no-compatible", no_compatible_command, "" },
- { "join-authors", join_authors_command, "sss?" },
- { "bracket-label", bracket_label_command, "sss" },
- { "separate-label-second-parts", separate_label_second_parts_command, "s" },
- { "et-al", et_al_command, "sii?" },
- { "no-et-al", no_et_al_command, "" },
-};
-
-static int check_args(const char *types, const char *name,
- int argc, argument *argv)
-{
- int argno = 0;
- while (*types) {
- if (argc == 0) {
- if (types[1] == '?')
- break;
- else if (types[1] == '*') {
- assert(types[2] == '\0');
- break;
- }
- else {
- input_stack::error("missing argument for command `%1'", name);
- return 0;
- }
- }
- switch (*types) {
- case 's':
- break;
- case 'i':
- {
- char *ptr;
- long n = strtol(argv->s, &ptr, 10);
- if ((n == 0 && ptr == argv->s)
- || *ptr != '\0') {
- input_stack::error("argument %1 for command `%2' must be an integer",
- argno + 1, name);
- return 0;
- }
- argv->n = (int)n;
- break;
- }
- case 'f':
- {
- for (const char *ptr = argv->s; *ptr != '\0'; ptr++)
- if (!cs_field_name(*ptr)) {
- input_stack::error("argument %1 for command `%2' must be a list of fields",
- argno + 1, name);
- return 0;
- }
- break;
- }
- case 'F':
- if (argv->s[0] == '\0' || argv->s[1] != '\0'
- || !cs_field_name(argv->s[0])) {
- input_stack::error("argument %1 for command `%2' must be a field name",
- argno + 1, name);
- return 0;
- }
- break;
- default:
- assert(0);
- }
- if (types[1] == '?')
- types += 2;
- else if (types[1] != '*')
- types += 1;
- --argc;
- ++argv;
- ++argno;
- }
- if (argc > 0) {
- input_stack::error("too many arguments for command `%1'", name);
- return 0;
- }
- return 1;
-}
-
-static void execute_command(const char *name, int argc, argument *argv)
-{
- for (int i = 0; i < sizeof(command_table)/sizeof(command_table[0]); i++)
- if (strcmp(name, command_table[i].name) == 0) {
- if (check_args(command_table[i].arg_types, name, argc, argv))
- (*command_table[i].func)(argc, argv);
- return;
- }
- input_stack::error("unknown command `%1'", name);
-}
-
-static void command_loop()
-{
- string command;
- for (;;) {
- command.clear();
- int res = get_word(command);
- if (res != 1) {
- if (res == 0)
- continue;
- break;
- }
- int argc = 0;
- command += '\0';
- while ((res = get_word(command)) == 1) {
- argc++;
- command += '\0';
- }
- argument *argv = new argument[argc];
- const char *ptr = command.contents();
- for (int i = 0; i < argc; i++)
- argv[i].s = ptr = strchr(ptr, '\0') + 1;
- execute_command(command.contents(), argc, argv);
- a_delete argv;
- if (res == -1)
- break;
- }
-}
-
-void process_commands(const char *file)
-{
- input_stack::init();
- input_stack::push_file(file);
- command_loop();
-}
-
-void process_commands(string &s, const char *file, int lineno)
-{
- input_stack::init();
- input_stack::push_string(s, file, lineno);
- command_loop();
-}
diff --git a/contrib/groff/src/preproc/refer/command.h b/contrib/groff/src/preproc/refer/command.h
deleted file mode 100644
index c7085db6927b..000000000000
--- a/contrib/groff/src/preproc/refer/command.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-void process_commands(const char *file);
-void process_commands(string &s, const char *file, int lineno);
-
-extern int accumulate;
-extern int move_punctuation;
-extern int search_default;
-extern search_list database_list;
-extern int label_in_text;
-extern int label_in_reference;
-extern int sort_adjacent_labels;
-extern string pre_label;
-extern string post_label;
-extern string sep_label;
-
-extern void do_bib(const char *);
-extern void output_references();
diff --git a/contrib/groff/src/preproc/refer/label.y b/contrib/groff/src/preproc/refer/label.y
deleted file mode 100644
index 2648b98552dc..000000000000
--- a/contrib/groff/src/preproc/refer/label.y
+++ /dev/null
@@ -1,1177 +0,0 @@
-/* -*- C++ -*-
- Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-%{
-
-#include "refer.h"
-#include "refid.h"
-#include "ref.h"
-#include "token.h"
-
-int yylex();
-void yyerror(const char *);
-int yyparse();
-
-static const char *format_serial(char c, int n);
-
-struct label_info {
- int start;
- int length;
- int count;
- int total;
- label_info(const string &);
-};
-
-label_info *lookup_label(const string &label);
-
-struct expression {
- enum {
- // Does the tentative label depend on the reference?
- CONTAINS_VARIABLE = 01,
- CONTAINS_STAR = 02,
- CONTAINS_FORMAT = 04,
- CONTAINS_AT = 010
- };
- virtual ~expression() { }
- virtual void evaluate(int, const reference &, string &,
- substring_position &) = 0;
- virtual unsigned analyze() { return 0; }
-};
-
-class at_expr : public expression {
-public:
- at_expr() { }
- void evaluate(int, const reference &, string &, substring_position &);
- unsigned analyze() { return CONTAINS_VARIABLE|CONTAINS_AT; }
-};
-
-class format_expr : public expression {
- char type;
- int width;
- int first_number;
-public:
- format_expr(char c, int w = 0, int f = 1)
- : type(c), width(w), first_number(f) { }
- void evaluate(int, const reference &, string &, substring_position &);
- unsigned analyze() { return CONTAINS_FORMAT; }
-};
-
-class field_expr : public expression {
- int number;
- char name;
-public:
- field_expr(char nm, int num) : number(num), name(nm) { }
- void evaluate(int, const reference &, string &, substring_position &);
- unsigned analyze() { return CONTAINS_VARIABLE; }
-};
-
-class literal_expr : public expression {
- string s;
-public:
- literal_expr(const char *ptr, int len) : s(ptr, len) { }
- void evaluate(int, const reference &, string &, substring_position &);
-};
-
-class unary_expr : public expression {
-protected:
- expression *expr;
-public:
- unary_expr(expression *e) : expr(e) { }
- ~unary_expr() { delete expr; }
- void evaluate(int, const reference &, string &, substring_position &) = 0;
- unsigned analyze() { return expr ? expr->analyze() : 0; }
-};
-
-// This caches the analysis of an expression.
-
-class analyzed_expr : public unary_expr {
- unsigned flags;
-public:
- analyzed_expr(expression *);
- void evaluate(int, const reference &, string &, substring_position &);
- unsigned analyze() { return flags; }
-};
-
-class star_expr : public unary_expr {
-public:
- star_expr(expression *e) : unary_expr(e) { }
- void evaluate(int, const reference &, string &, substring_position &);
- unsigned analyze() {
- return ((expr ? (expr->analyze() & ~CONTAINS_VARIABLE) : 0)
- | CONTAINS_STAR);
- }
-};
-
-typedef void map_func(const char *, const char *, string &);
-
-class map_expr : public unary_expr {
- map_func *func;
-public:
- map_expr(expression *e, map_func *f) : unary_expr(e), func(f) { }
- void evaluate(int, const reference &, string &, substring_position &);
-};
-
-typedef const char *extractor_func(const char *, const char *, const char **);
-
-class extractor_expr : public unary_expr {
- int part;
- extractor_func *func;
-public:
- enum { BEFORE = +1, MATCH = 0, AFTER = -1 };
- extractor_expr(expression *e, extractor_func *f, int pt)
- : unary_expr(e), part(pt), func(f) { }
- void evaluate(int, const reference &, string &, substring_position &);
-};
-
-class truncate_expr : public unary_expr {
- int n;
-public:
- truncate_expr(expression *e, int i) : unary_expr(e), n(i) { }
- void evaluate(int, const reference &, string &, substring_position &);
-};
-
-class separator_expr : public unary_expr {
-public:
- separator_expr(expression *e) : unary_expr(e) { }
- void evaluate(int, const reference &, string &, substring_position &);
-};
-
-class binary_expr : public expression {
-protected:
- expression *expr1;
- expression *expr2;
-public:
- binary_expr(expression *e1, expression *e2) : expr1(e1), expr2(e2) { }
- ~binary_expr() { delete expr1; delete expr2; }
- void evaluate(int, const reference &, string &, substring_position &) = 0;
- unsigned analyze() {
- return (expr1 ? expr1->analyze() : 0) | (expr2 ? expr2->analyze() : 0);
- }
-};
-
-class alternative_expr : public binary_expr {
-public:
- alternative_expr(expression *e1, expression *e2) : binary_expr(e1, e2) { }
- void evaluate(int, const reference &, string &, substring_position &);
-};
-
-class list_expr : public binary_expr {
-public:
- list_expr(expression *e1, expression *e2) : binary_expr(e1, e2) { }
- void evaluate(int, const reference &, string &, substring_position &);
-};
-
-class substitute_expr : public binary_expr {
-public:
- substitute_expr(expression *e1, expression *e2) : binary_expr(e1, e2) { }
- void evaluate(int, const reference &, string &, substring_position &);
-};
-
-class ternary_expr : public expression {
-protected:
- expression *expr1;
- expression *expr2;
- expression *expr3;
-public:
- ternary_expr(expression *e1, expression *e2, expression *e3)
- : expr1(e1), expr2(e2), expr3(e3) { }
- ~ternary_expr() { delete expr1; delete expr2; delete expr3; }
- void evaluate(int, const reference &, string &, substring_position &) = 0;
- unsigned analyze() {
- return ((expr1 ? expr1->analyze() : 0)
- | (expr2 ? expr2->analyze() : 0)
- | (expr3 ? expr3->analyze() : 0));
- }
-};
-
-class conditional_expr : public ternary_expr {
-public:
- conditional_expr(expression *e1, expression *e2, expression *e3)
- : ternary_expr(e1, e2, e3) { }
- void evaluate(int, const reference &, string &, substring_position &);
-};
-
-static expression *parsed_label = 0;
-static expression *parsed_date_label = 0;
-static expression *parsed_short_label = 0;
-
-static expression *parse_result;
-
-string literals;
-
-%}
-
-%union {
- int num;
- expression *expr;
- struct { int ndigits; int val; } dig;
- struct { int start; int len; } str;
-}
-
-/* uppercase or lowercase letter */
-%token <num> TOKEN_LETTER
-/* literal characters */
-%token <str> TOKEN_LITERAL
-/* digit */
-%token <num> TOKEN_DIGIT
-
-%type <expr> conditional
-%type <expr> alternative
-%type <expr> list
-%type <expr> string
-%type <expr> substitute
-%type <expr> optional_conditional
-%type <num> number
-%type <dig> digits
-%type <num> optional_number
-%type <num> flag
-
-%%
-
-expr:
- optional_conditional
- { parse_result = ($1 ? new analyzed_expr($1) : 0); }
- ;
-
-conditional:
- alternative
- { $$ = $1; }
- | alternative '?' optional_conditional ':' conditional
- { $$ = new conditional_expr($1, $3, $5); }
- ;
-
-optional_conditional:
- /* empty */
- { $$ = 0; }
- | conditional
- { $$ = $1; }
- ;
-
-alternative:
- list
- { $$ = $1; }
- | alternative '|' list
- { $$ = new alternative_expr($1, $3); }
- | alternative '&' list
- { $$ = new conditional_expr($1, $3, 0); }
- ;
-
-list:
- substitute
- { $$ = $1; }
- | list substitute
- { $$ = new list_expr($1, $2); }
- ;
-
-substitute:
- string
- { $$ = $1; }
- | substitute '~' string
- { $$ = new substitute_expr($1, $3); }
- ;
-
-string:
- '@'
- { $$ = new at_expr; }
- | TOKEN_LITERAL
- {
- $$ = new literal_expr(literals.contents() + $1.start,
- $1.len);
- }
- | TOKEN_LETTER
- { $$ = new field_expr($1, 0); }
- | TOKEN_LETTER number
- { $$ = new field_expr($1, $2 - 1); }
- | '%' TOKEN_LETTER
- {
- switch ($2) {
- case 'I':
- case 'i':
- case 'A':
- case 'a':
- $$ = new format_expr($2);
- break;
- default:
- command_error("unrecognized format `%1'", char($2));
- $$ = new format_expr('a');
- break;
- }
- }
-
- | '%' digits
- {
- $$ = new format_expr('0', $2.ndigits, $2.val);
- }
- | string '.' flag TOKEN_LETTER optional_number
- {
- switch ($4) {
- case 'l':
- $$ = new map_expr($1, lowercase);
- break;
- case 'u':
- $$ = new map_expr($1, uppercase);
- break;
- case 'c':
- $$ = new map_expr($1, capitalize);
- break;
- case 'r':
- $$ = new map_expr($1, reverse_name);
- break;
- case 'a':
- $$ = new map_expr($1, abbreviate_name);
- break;
- case 'y':
- $$ = new extractor_expr($1, find_year, $3);
- break;
- case 'n':
- $$ = new extractor_expr($1, find_last_name, $3);
- break;
- default:
- $$ = $1;
- command_error("unknown function `%1'", char($4));
- break;
- }
- }
-
- | string '+' number
- { $$ = new truncate_expr($1, $3); }
- | string '-' number
- { $$ = new truncate_expr($1, -$3); }
- | string '*'
- { $$ = new star_expr($1); }
- | '(' optional_conditional ')'
- { $$ = $2; }
- | '<' optional_conditional '>'
- { $$ = new separator_expr($2); }
- ;
-
-optional_number:
- /* empty */
- { $$ = -1; }
- | number
- { $$ = $1; }
- ;
-
-number:
- TOKEN_DIGIT
- { $$ = $1; }
- | number TOKEN_DIGIT
- { $$ = $1*10 + $2; }
- ;
-
-digits:
- TOKEN_DIGIT
- { $$.ndigits = 1; $$.val = $1; }
- | digits TOKEN_DIGIT
- { $$.ndigits = $1.ndigits + 1; $$.val = $1.val*10 + $2; }
- ;
-
-
-flag:
- /* empty */
- { $$ = 0; }
- | '+'
- { $$ = 1; }
- | '-'
- { $$ = -1; }
- ;
-
-%%
-
-/* bison defines const to be empty unless __STDC__ is defined, which it
-isn't under cfront */
-
-#ifdef const
-#undef const
-#endif
-
-const char *spec_ptr;
-const char *spec_end;
-const char *spec_cur;
-
-int yylex()
-{
- while (spec_ptr < spec_end && csspace(*spec_ptr))
- spec_ptr++;
- spec_cur = spec_ptr;
- if (spec_ptr >= spec_end)
- return 0;
- unsigned char c = *spec_ptr++;
- if (csalpha(c)) {
- yylval.num = c;
- return TOKEN_LETTER;
- }
- if (csdigit(c)) {
- yylval.num = c - '0';
- return TOKEN_DIGIT;
- }
- if (c == '\'') {
- yylval.str.start = literals.length();
- for (; spec_ptr < spec_end; spec_ptr++) {
- if (*spec_ptr == '\'') {
- if (++spec_ptr < spec_end && *spec_ptr == '\'')
- literals += '\'';
- else {
- yylval.str.len = literals.length() - yylval.str.start;
- return TOKEN_LITERAL;
- }
- }
- else
- literals += *spec_ptr;
- }
- yylval.str.len = literals.length() - yylval.str.start;
- return TOKEN_LITERAL;
- }
- return c;
-}
-
-int set_label_spec(const char *label_spec)
-{
- spec_cur = spec_ptr = label_spec;
- spec_end = strchr(label_spec, '\0');
- literals.clear();
- if (yyparse())
- return 0;
- delete parsed_label;
- parsed_label = parse_result;
- return 1;
-}
-
-int set_date_label_spec(const char *label_spec)
-{
- spec_cur = spec_ptr = label_spec;
- spec_end = strchr(label_spec, '\0');
- literals.clear();
- if (yyparse())
- return 0;
- delete parsed_date_label;
- parsed_date_label = parse_result;
- return 1;
-}
-
-int set_short_label_spec(const char *label_spec)
-{
- spec_cur = spec_ptr = label_spec;
- spec_end = strchr(label_spec, '\0');
- literals.clear();
- if (yyparse())
- return 0;
- delete parsed_short_label;
- parsed_short_label = parse_result;
- return 1;
-}
-
-void yyerror(const char *message)
-{
- if (spec_cur < spec_end)
- command_error("label specification %1 before `%2'", message, spec_cur);
- else
- command_error("label specification %1 at end of string",
- message, spec_cur);
-}
-
-void at_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &)
-{
- if (tentative)
- ref.canonicalize_authors(result);
- else {
- const char *end, *start = ref.get_authors(&end);
- if (start)
- result.append(start, end - start);
- }
-}
-
-void format_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &)
-{
- if (tentative)
- return;
- const label_info *lp = ref.get_label_ptr();
- int num = lp == 0 ? ref.get_number() : lp->count;
- if (type != '0')
- result += format_serial(type, num + 1);
- else {
- const char *ptr = i_to_a(num + first_number);
- int pad = width - strlen(ptr);
- while (--pad >= 0)
- result += '0';
- result += ptr;
- }
-}
-
-static const char *format_serial(char c, int n)
-{
- assert(n > 0);
- static char buf[128]; // more than enough.
- switch (c) {
- case 'i':
- case 'I':
- {
- char *p = buf;
- // troff uses z and w to represent 10000 and 5000 in Roman
- // numerals; I can find no historical basis for this usage
- const char *s = c == 'i' ? "zwmdclxvi" : "ZWMDCLXVI";
- if (n >= 40000)
- return i_to_a(n);
- while (n >= 10000) {
- *p++ = s[0];
- n -= 10000;
- }
- for (int i = 1000; i > 0; i /= 10, s += 2) {
- int m = n/i;
- n -= m*i;
- switch (m) {
- case 3:
- *p++ = s[2];
- /* falls through */
- case 2:
- *p++ = s[2];
- /* falls through */
- case 1:
- *p++ = s[2];
- break;
- case 4:
- *p++ = s[2];
- *p++ = s[1];
- break;
- case 8:
- *p++ = s[1];
- *p++ = s[2];
- *p++ = s[2];
- *p++ = s[2];
- break;
- case 7:
- *p++ = s[1];
- *p++ = s[2];
- *p++ = s[2];
- break;
- case 6:
- *p++ = s[1];
- *p++ = s[2];
- break;
- case 5:
- *p++ = s[1];
- break;
- case 9:
- *p++ = s[2];
- *p++ = s[0];
- }
- }
- *p = 0;
- break;
- }
- case 'a':
- case 'A':
- {
- char *p = buf;
- // this is derived from troff/reg.c
- while (n > 0) {
- int d = n % 26;
- if (d == 0)
- d = 26;
- n -= d;
- n /= 26;
- *p++ = c + d - 1; // ASCII dependent
- }
- *p-- = 0;
- // Reverse it.
- char *q = buf;
- while (q < p) {
- char temp = *q;
- *q = *p;
- *p = temp;
- --p;
- ++q;
- }
- break;
- }
- default:
- assert(0);
- }
- return buf;
-}
-
-void field_expr::evaluate(int, const reference &ref,
- string &result, substring_position &)
-{
- const char *end;
- const char *start = ref.get_field(name, &end);
- if (start) {
- start = nth_field(number, start, &end);
- if (start)
- result.append(start, end - start);
- }
-}
-
-void literal_expr::evaluate(int, const reference &,
- string &result, substring_position &)
-{
- result += s;
-}
-
-analyzed_expr::analyzed_expr(expression *e)
-: unary_expr(e), flags(e ? e->analyze() : 0)
-{
-}
-
-void analyzed_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &pos)
-{
- if (expr)
- expr->evaluate(tentative, ref, result, pos);
-}
-
-void star_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &pos)
-{
- const label_info *lp = ref.get_label_ptr();
- if (!tentative
- && (lp == 0 || lp->total > 1)
- && expr)
- expr->evaluate(tentative, ref, result, pos);
-}
-
-void separator_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &pos)
-{
- int start_length = result.length();
- int is_first = pos.start < 0;
- if (expr)
- expr->evaluate(tentative, ref, result, pos);
- if (is_first) {
- pos.start = start_length;
- pos.length = result.length() - start_length;
- }
-}
-
-void map_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &)
-{
- if (expr) {
- string temp;
- substring_position temp_pos;
- expr->evaluate(tentative, ref, temp, temp_pos);
- (*func)(temp.contents(), temp.contents() + temp.length(), result);
- }
-}
-
-void extractor_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &)
-{
- if (expr) {
- string temp;
- substring_position temp_pos;
- expr->evaluate(tentative, ref, temp, temp_pos);
- const char *end, *start = (*func)(temp.contents(),
- temp.contents() + temp.length(),
- &end);
- switch (part) {
- case BEFORE:
- if (start)
- result.append(temp.contents(), start - temp.contents());
- else
- result += temp;
- break;
- case MATCH:
- if (start)
- result.append(start, end - start);
- break;
- case AFTER:
- if (start)
- result.append(end, temp.contents() + temp.length() - end);
- break;
- default:
- assert(0);
- }
- }
-}
-
-static void first_part(int len, const char *ptr, const char *end,
- string &result)
-{
- for (;;) {
- const char *token_start = ptr;
- if (!get_token(&ptr, end))
- break;
- const token_info *ti = lookup_token(token_start, ptr);
- int counts = ti->sortify_non_empty(token_start, ptr);
- if (counts && --len < 0)
- break;
- if (counts || ti->is_accent())
- result.append(token_start, ptr - token_start);
- }
-}
-
-static void last_part(int len, const char *ptr, const char *end,
- string &result)
-{
- const char *start = ptr;
- int count = 0;
- for (;;) {
- const char *token_start = ptr;
- if (!get_token(&ptr, end))
- break;
- const token_info *ti = lookup_token(token_start, ptr);
- if (ti->sortify_non_empty(token_start, ptr))
- count++;
- }
- ptr = start;
- int skip = count - len;
- if (skip > 0) {
- for (;;) {
- const char *token_start = ptr;
- if (!get_token(&ptr, end))
- assert(0);
- const token_info *ti = lookup_token(token_start, ptr);
- if (ti->sortify_non_empty(token_start, ptr) && --skip < 0) {
- ptr = token_start;
- break;
- }
- }
- }
- first_part(len, ptr, end, result);
-}
-
-void truncate_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &)
-{
- if (expr) {
- string temp;
- substring_position temp_pos;
- expr->evaluate(tentative, ref, temp, temp_pos);
- const char *start = temp.contents();
- const char *end = start + temp.length();
- if (n > 0)
- first_part(n, start, end, result);
- else if (n < 0)
- last_part(-n, start, end, result);
- }
-}
-
-void alternative_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &pos)
-{
- int start_length = result.length();
- if (expr1)
- expr1->evaluate(tentative, ref, result, pos);
- if (result.length() == start_length && expr2)
- expr2->evaluate(tentative, ref, result, pos);
-}
-
-void list_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &pos)
-{
- if (expr1)
- expr1->evaluate(tentative, ref, result, pos);
- if (expr2)
- expr2->evaluate(tentative, ref, result, pos);
-}
-
-void substitute_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &pos)
-{
- int start_length = result.length();
- if (expr1)
- expr1->evaluate(tentative, ref, result, pos);
- if (result.length() > start_length && result[result.length() - 1] == '-') {
- // ought to see if pos covers the -
- result.set_length(result.length() - 1);
- if (expr2)
- expr2->evaluate(tentative, ref, result, pos);
- }
-}
-
-void conditional_expr::evaluate(int tentative, const reference &ref,
- string &result, substring_position &pos)
-{
- string temp;
- substring_position temp_pos;
- if (expr1)
- expr1->evaluate(tentative, ref, temp, temp_pos);
- if (temp.length() > 0) {
- if (expr2)
- expr2->evaluate(tentative, ref, result, pos);
- }
- else {
- if (expr3)
- expr3->evaluate(tentative, ref, result, pos);
- }
-}
-
-void reference::pre_compute_label()
-{
- if (parsed_label != 0
- && (parsed_label->analyze() & expression::CONTAINS_VARIABLE)) {
- label.clear();
- substring_position temp_pos;
- parsed_label->evaluate(1, *this, label, temp_pos);
- label_ptr = lookup_label(label);
- }
-}
-
-void reference::compute_label()
-{
- label.clear();
- if (parsed_label)
- parsed_label->evaluate(0, *this, label, separator_pos);
- if (short_label_flag && parsed_short_label)
- parsed_short_label->evaluate(0, *this, short_label, short_separator_pos);
- if (date_as_label) {
- string new_date;
- if (parsed_date_label) {
- substring_position temp_pos;
- parsed_date_label->evaluate(0, *this, new_date, temp_pos);
- }
- set_date(new_date);
- }
- if (label_ptr)
- label_ptr->count += 1;
-}
-
-void reference::immediate_compute_label()
-{
- if (label_ptr)
- label_ptr->total = 2; // force use of disambiguator
- compute_label();
-}
-
-int reference::merge_labels(reference **v, int n, label_type type,
- string &result)
-{
- if (abbreviate_label_ranges)
- return merge_labels_by_number(v, n, type, result);
- else
- return merge_labels_by_parts(v, n, type, result);
-}
-
-int reference::merge_labels_by_number(reference **v, int n, label_type type,
- string &result)
-{
- if (n <= 1)
- return 0;
- int num = get_number();
- // Only merge three or more labels.
- if (v[0]->get_number() != num + 1
- || v[1]->get_number() != num + 2)
- return 0;
- int i;
- for (i = 2; i < n; i++)
- if (v[i]->get_number() != num + i + 1)
- break;
- result = get_label(type);
- result += label_range_indicator;
- result += v[i - 1]->get_label(type);
- return i;
-}
-
-const substring_position &reference::get_separator_pos(label_type type) const
-{
- if (type == SHORT_LABEL && short_label_flag)
- return short_separator_pos;
- else
- return separator_pos;
-}
-
-const string &reference::get_label(label_type type) const
-{
- if (type == SHORT_LABEL && short_label_flag)
- return short_label;
- else
- return label;
-}
-
-int reference::merge_labels_by_parts(reference **v, int n, label_type type,
- string &result)
-{
- if (n <= 0)
- return 0;
- const string &lb = get_label(type);
- const substring_position &sp = get_separator_pos(type);
- if (sp.start < 0
- || sp.start != v[0]->get_separator_pos(type).start
- || memcmp(lb.contents(), v[0]->get_label(type).contents(),
- sp.start) != 0)
- return 0;
- result = lb;
- int i = 0;
- do {
- result += separate_label_second_parts;
- const substring_position &s = v[i]->get_separator_pos(type);
- int sep_end_pos = s.start + s.length;
- result.append(v[i]->get_label(type).contents() + sep_end_pos,
- v[i]->get_label(type).length() - sep_end_pos);
- } while (++i < n
- && sp.start == v[i]->get_separator_pos(type).start
- && memcmp(lb.contents(), v[i]->get_label(type).contents(),
- sp.start) == 0);
- return i;
-}
-
-string label_pool;
-
-label_info::label_info(const string &s)
-: start(label_pool.length()), length(s.length()), count(0), total(1)
-{
- label_pool += s;
-}
-
-static label_info **label_table = 0;
-static int label_table_size = 0;
-static int label_table_used = 0;
-
-label_info *lookup_label(const string &label)
-{
- if (label_table == 0) {
- label_table = new label_info *[17];
- label_table_size = 17;
- for (int i = 0; i < 17; i++)
- label_table[i] = 0;
- }
- unsigned h = hash_string(label.contents(), label.length()) % label_table_size;
- label_info **ptr;
- for (ptr = label_table + h;
- *ptr != 0;
- (ptr == label_table)
- ? (ptr = label_table + label_table_size - 1)
- : ptr--)
- if ((*ptr)->length == label.length()
- && memcmp(label_pool.contents() + (*ptr)->start, label.contents(),
- label.length()) == 0) {
- (*ptr)->total += 1;
- return *ptr;
- }
- label_info *result = *ptr = new label_info(label);
- if (++label_table_used * 2 > label_table_size) {
- // Rehash the table.
- label_info **old_table = label_table;
- int old_size = label_table_size;
- label_table_size = next_size(label_table_size);
- label_table = new label_info *[label_table_size];
- int i;
- for (i = 0; i < label_table_size; i++)
- label_table[i] = 0;
- for (i = 0; i < old_size; i++)
- if (old_table[i]) {
- unsigned h = hash_string(label_pool.contents() + old_table[i]->start,
- old_table[i]->length);
- label_info **p;
- for (p = label_table + (h % label_table_size);
- *p != 0;
- (p == label_table)
- ? (p = label_table + label_table_size - 1)
- : --p)
- ;
- *p = old_table[i];
- }
- a_delete old_table;
- }
- return result;
-}
-
-void clear_labels()
-{
- for (int i = 0; i < label_table_size; i++) {
- delete label_table[i];
- label_table[i] = 0;
- }
- label_table_used = 0;
- label_pool.clear();
-}
-
-static void consider_authors(reference **start, reference **end, int i);
-
-void compute_labels(reference **v, int n)
-{
- if (parsed_label
- && (parsed_label->analyze() & expression::CONTAINS_AT)
- && sort_fields.length() >= 2
- && sort_fields[0] == 'A'
- && sort_fields[1] == '+')
- consider_authors(v, v + n, 0);
- for (int i = 0; i < n; i++)
- v[i]->compute_label();
-}
-
-
-/* A reference with a list of authors <A0,A1,...,AN> _needs_ author i
-where 0 <= i <= N if there exists a reference with a list of authors
-<B0,B1,...,BM> such that <A0,A1,...,AN> != <B0,B1,...,BM> and M >= i
-and Aj = Bj for 0 <= j < i. In this case if we can't say ``A0,
-A1,...,A(i-1) et al'' because this would match both <A0,A1,...,AN> and
-<B0,B1,...,BM>. If a reference needs author i we only have to call
-need_author(j) for some j >= i such that the reference also needs
-author j. */
-
-/* This function handles 2 tasks:
-determine which authors are needed (cannot be elided with et al.);
-determine which authors can have only last names in the labels.
-
-References >= start and < end have the same first i author names.
-Also they're sorted by A+. */
-
-static void consider_authors(reference **start, reference **end, int i)
-{
- if (start >= end)
- return;
- reference **p = start;
- if (i >= (*p)->get_nauthors()) {
- for (++p; p < end && i >= (*p)->get_nauthors(); p++)
- ;
- if (p < end && i > 0) {
- // If we have an author list <A B C> and an author list <A B C D>,
- // then both lists need C.
- for (reference **q = start; q < end; q++)
- (*q)->need_author(i - 1);
- }
- start = p;
- }
- while (p < end) {
- reference **last_name_start = p;
- reference **name_start = p;
- for (++p;
- p < end && i < (*p)->get_nauthors()
- && same_author_last_name(**last_name_start, **p, i);
- p++) {
- if (!same_author_name(**name_start, **p, i)) {
- consider_authors(name_start, p, i + 1);
- name_start = p;
- }
- }
- consider_authors(name_start, p, i + 1);
- if (last_name_start == name_start) {
- for (reference **q = last_name_start; q < p; q++)
- (*q)->set_last_name_unambiguous(i);
- }
- // If we have an author list <A B C D> and <A B C E>, then the lists
- // need author D and E respectively.
- if (name_start > start || p < end) {
- for (reference **q = last_name_start; q < p; q++)
- (*q)->need_author(i);
- }
- }
-}
-
-int same_author_last_name(const reference &r1, const reference &r2, int n)
-{
- const char *ae1;
- const char *as1 = r1.get_sort_field(0, n, 0, &ae1);
- assert(as1 != 0);
- const char *ae2;
- const char *as2 = r2.get_sort_field(0, n, 0, &ae2);
- assert(as2 != 0);
- return ae1 - as1 == ae2 - as2 && memcmp(as1, as2, ae1 - as1) == 0;
-}
-
-int same_author_name(const reference &r1, const reference &r2, int n)
-{
- const char *ae1;
- const char *as1 = r1.get_sort_field(0, n, -1, &ae1);
- assert(as1 != 0);
- const char *ae2;
- const char *as2 = r2.get_sort_field(0, n, -1, &ae2);
- assert(as2 != 0);
- return ae1 - as1 == ae2 - as2 && memcmp(as1, as2, ae1 - as1) == 0;
-}
-
-
-void int_set::set(int i)
-{
- assert(i >= 0);
- int bytei = i >> 3;
- if (bytei >= v.length()) {
- int old_length = v.length();
- v.set_length(bytei + 1);
- for (int j = old_length; j <= bytei; j++)
- v[j] = 0;
- }
- v[bytei] |= 1 << (i & 7);
-}
-
-int int_set::get(int i) const
-{
- assert(i >= 0);
- int bytei = i >> 3;
- return bytei >= v.length() ? 0 : (v[bytei] & (1 << (i & 7))) != 0;
-}
-
-void reference::set_last_name_unambiguous(int i)
-{
- last_name_unambiguous.set(i);
-}
-
-void reference::need_author(int n)
-{
- if (n > last_needed_author)
- last_needed_author = n;
-}
-
-const char *reference::get_authors(const char **end) const
-{
- if (!computed_authors) {
- ((reference *)this)->computed_authors = 1;
- string &result = ((reference *)this)->authors;
- int na = get_nauthors();
- result.clear();
- for (int i = 0; i < na; i++) {
- if (last_name_unambiguous.get(i)) {
- const char *e, *start = get_author_last_name(i, &e);
- assert(start != 0);
- result.append(start, e - start);
- }
- else {
- const char *e, *start = get_author(i, &e);
- assert(start != 0);
- result.append(start, e - start);
- }
- if (i == last_needed_author
- && et_al.length() > 0
- && et_al_min_elide > 0
- && last_needed_author + et_al_min_elide < na
- && na >= et_al_min_total) {
- result += et_al;
- break;
- }
- if (i < na - 1) {
- if (na == 2)
- result += join_authors_exactly_two;
- else if (i < na - 2)
- result += join_authors_default;
- else
- result += join_authors_last_two;
- }
- }
- }
- const char *start = authors.contents();
- *end = start + authors.length();
- return start;
-}
-
-int reference::get_nauthors() const
-{
- if (nauthors < 0) {
- const char *dummy;
- int na;
- for (na = 0; get_author(na, &dummy) != 0; na++)
- ;
- ((reference *)this)->nauthors = na;
- }
- return nauthors;
-}
diff --git a/contrib/groff/src/preproc/refer/ref.cc b/contrib/groff/src/preproc/refer/ref.cc
deleted file mode 100644
index c3517b194598..000000000000
--- a/contrib/groff/src/preproc/refer/ref.cc
+++ /dev/null
@@ -1,1160 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
-Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "refer.h"
-#include "refid.h"
-#include "ref.h"
-#include "token.h"
-
-static const char *find_day(const char *, const char *, const char **);
-static int find_month(const char *start, const char *end);
-static void abbreviate_names(string &);
-
-#define DEFAULT_ARTICLES "the\000a\000an"
-
-string articles(DEFAULT_ARTICLES, sizeof(DEFAULT_ARTICLES));
-
-// Multiple occurrences of fields are separated by FIELD_SEPARATOR.
-const char FIELD_SEPARATOR = '\0';
-
-const char MULTI_FIELD_NAMES[] = "AE";
-const char *AUTHOR_FIELDS = "AQ";
-
-enum { OTHER, JOURNAL_ARTICLE, BOOK, ARTICLE_IN_BOOK, TECH_REPORT, BELL_TM };
-
-const char *reference_types[] = {
- "other",
- "journal-article",
- "book",
- "article-in-book",
- "tech-report",
- "bell-tm",
-};
-
-static string temp_fields[256];
-
-reference::reference(const char *start, int len, reference_id *ridp)
-: h(0), merged(0), no(-1), field(0), nfields(0), label_ptr(0),
- computed_authors(0), last_needed_author(-1), nauthors(-1)
-{
- int i;
- for (i = 0; i < 256; i++)
- field_index[i] = NULL_FIELD_INDEX;
- if (ridp)
- rid = *ridp;
- if (start == 0)
- return;
- if (len <= 0)
- return;
- const char *end = start + len;
- const char *ptr = start;
- assert(*ptr == '%');
- while (ptr < end) {
- if (ptr + 1 < end && ptr[1] != '\0'
- && ((ptr[1] != '%' && ptr[1] == annotation_field)
- || (ptr + 2 < end && ptr[1] == '%' && ptr[2] != '\0'
- && discard_fields.search(ptr[2]) < 0))) {
- if (ptr[1] == '%')
- ptr++;
- string &f = temp_fields[(unsigned char)ptr[1]];
- ptr += 2;
- while (ptr < end && csspace(*ptr))
- ptr++;
- for (;;) {
- for (;;) {
- if (ptr >= end) {
- f += '\n';
- break;
- }
- f += *ptr;
- if (*ptr++ == '\n')
- break;
- }
- if (ptr >= end || *ptr == '%')
- break;
- }
- }
- else if (ptr + 1 < end && ptr[1] != '\0' && ptr[1] != '%'
- && discard_fields.search(ptr[1]) < 0) {
- string &f = temp_fields[(unsigned char)ptr[1]];
- if (f.length() > 0) {
- if (strchr(MULTI_FIELD_NAMES, ptr[1]) != 0)
- f += FIELD_SEPARATOR;
- else
- f.clear();
- }
- ptr += 2;
- if (ptr < end) {
- if (*ptr == ' ')
- ptr++;
- for (;;) {
- const char *p = ptr;
- while (ptr < end && *ptr != '\n')
- ptr++;
- // strip trailing white space
- const char *q = ptr;
- while (q > p && q[-1] != '\n' && csspace(q[-1]))
- q--;
- while (p < q)
- f += *p++;
- if (ptr >= end)
- break;
- ptr++;
- if (ptr >= end)
- break;
- if (*ptr == '%')
- break;
- f += ' ';
- }
- }
- }
- else {
- // skip this field
- for (;;) {
- while (ptr < end && *ptr++ != '\n')
- ;
- if (ptr >= end || *ptr == '%')
- break;
- }
- }
- }
- for (i = 0; i < 256; i++)
- if (temp_fields[i].length() > 0)
- nfields++;
- field = new string[nfields];
- int j = 0;
- for (i = 0; i < 256; i++)
- if (temp_fields[i].length() > 0) {
- field[j].move(temp_fields[i]);
- if (abbreviate_fields.search(i) >= 0)
- abbreviate_names(field[j]);
- field_index[i] = j;
- j++;
- }
-}
-
-reference::~reference()
-{
- if (nfields > 0)
- ad_delete(nfields) field;
-}
-
-// ref is the inline, this is the database ref
-
-void reference::merge(reference &ref)
-{
- int i;
- for (i = 0; i < 256; i++)
- if (field_index[i] != NULL_FIELD_INDEX)
- temp_fields[i].move(field[field_index[i]]);
- for (i = 0; i < 256; i++)
- if (ref.field_index[i] != NULL_FIELD_INDEX)
- temp_fields[i].move(ref.field[ref.field_index[i]]);
- for (i = 0; i < 256; i++)
- field_index[i] = NULL_FIELD_INDEX;
- int old_nfields = nfields;
- nfields = 0;
- for (i = 0; i < 256; i++)
- if (temp_fields[i].length() > 0)
- nfields++;
- if (nfields != old_nfields) {
- if (old_nfields > 0)
- ad_delete(old_nfields) field;
- field = new string[nfields];
- }
- int j = 0;
- for (i = 0; i < 256; i++)
- if (temp_fields[i].length() > 0) {
- field[j].move(temp_fields[i]);
- field_index[i] = j;
- j++;
- }
- merged = 1;
-}
-
-void reference::insert_field(unsigned char c, string &s)
-{
- assert(s.length() > 0);
- if (field_index[c] != NULL_FIELD_INDEX) {
- field[field_index[c]].move(s);
- return;
- }
- assert(field_index[c] == NULL_FIELD_INDEX);
- string *old_field = field;
- field = new string[nfields + 1];
- int pos = 0;
- int i;
- for (i = 0; i < int(c); i++)
- if (field_index[i] != NULL_FIELD_INDEX)
- pos++;
- for (i = 0; i < pos; i++)
- field[i].move(old_field[i]);
- field[pos].move(s);
- for (i = pos; i < nfields; i++)
- field[i + 1].move(old_field[i]);
- if (nfields > 0)
- ad_delete(nfields) old_field;
- nfields++;
- field_index[c] = pos;
- for (i = c + 1; i < 256; i++)
- if (field_index[i] != NULL_FIELD_INDEX)
- field_index[i] += 1;
-}
-
-void reference::delete_field(unsigned char c)
-{
- if (field_index[c] == NULL_FIELD_INDEX)
- return;
- string *old_field = field;
- field = new string[nfields - 1];
- int i;
- for (i = 0; i < int(field_index[c]); i++)
- field[i].move(old_field[i]);
- for (i = field_index[c]; i < nfields - 1; i++)
- field[i].move(old_field[i + 1]);
- if (nfields > 0)
- ad_delete(nfields) old_field;
- nfields--;
- field_index[c] = NULL_FIELD_INDEX;
- for (i = c + 1; i < 256; i++)
- if (field_index[i] != NULL_FIELD_INDEX)
- field_index[i] -= 1;
-}
-
-void reference::compute_hash_code()
-{
- if (!rid.is_null())
- h = rid.hash();
- else {
- h = 0;
- for (int i = 0; i < nfields; i++)
- if (field[i].length() > 0) {
- h <<= 4;
- h ^= hash_string(field[i].contents(), field[i].length());
- }
- }
-}
-
-void reference::set_number(int n)
-{
- no = n;
-}
-
-const char SORT_SEP = '\001';
-const char SORT_SUB_SEP = '\002';
-const char SORT_SUB_SUB_SEP = '\003';
-
-// sep specifies additional word separators
-
-void sortify_words(const char *s, const char *end, const char *sep,
- string &result)
-{
- int non_empty = 0;
- int need_separator = 0;
- for (;;) {
- const char *token_start = s;
- if (!get_token(&s, end))
- break;
- if ((s - token_start == 1
- && (*token_start == ' '
- || *token_start == '\n'
- || (sep && *token_start != '\0'
- && strchr(sep, *token_start) != 0)))
- || (s - token_start == 2
- && token_start[0] == '\\' && token_start[1] == ' ')) {
- if (non_empty)
- need_separator = 1;
- }
- else {
- const token_info *ti = lookup_token(token_start, s);
- if (ti->sortify_non_empty(token_start, s)) {
- if (need_separator) {
- result += ' ';
- need_separator = 0;
- }
- ti->sortify(token_start, s, result);
- non_empty = 1;
- }
- }
- }
-}
-
-void sortify_word(const char *s, const char *end, string &result)
-{
- for (;;) {
- const char *token_start = s;
- if (!get_token(&s, end))
- break;
- const token_info *ti = lookup_token(token_start, s);
- ti->sortify(token_start, s, result);
- }
-}
-
-void sortify_other(const char *s, int len, string &key)
-{
- sortify_words(s, s + len, 0, key);
-}
-
-void sortify_title(const char *s, int len, string &key)
-{
- const char *end = s + len;
- for (; s < end && (*s == ' ' || *s == '\n'); s++)
- ;
- const char *ptr = s;
- for (;;) {
- const char *token_start = ptr;
- if (!get_token(&ptr, end))
- break;
- if (ptr - token_start == 1
- && (*token_start == ' ' || *token_start == '\n'))
- break;
- }
- if (ptr < end) {
- int first_word_len = ptr - s - 1;
- const char *ae = articles.contents() + articles.length();
- for (const char *a = articles.contents();
- a < ae;
- a = strchr(a, '\0') + 1)
- if (first_word_len == strlen(a)) {
- int j;
- for (j = 0; j < first_word_len; j++)
- if (a[j] != cmlower(s[j]))
- break;
- if (j >= first_word_len) {
- s = ptr;
- for (; s < end && (*s == ' ' || *s == '\n'); s++)
- ;
- break;
- }
- }
- }
- sortify_words(s, end, 0, key);
-}
-
-void sortify_name(const char *s, int len, string &key)
-{
- const char *last_name_end;
- const char *last_name = find_last_name(s, s + len, &last_name_end);
- sortify_word(last_name, last_name_end, key);
- key += SORT_SUB_SUB_SEP;
- if (last_name > s)
- sortify_words(s, last_name, ".", key);
- key += SORT_SUB_SUB_SEP;
- if (last_name_end < s + len)
- sortify_words(last_name_end, s + len, ".,", key);
-}
-
-void sortify_date(const char *s, int len, string &key)
-{
- const char *year_end;
- const char *year_start = find_year(s, s + len, &year_end);
- if (!year_start) {
- // Things without years are often `forthcoming', so it makes sense
- // that they sort after things with explicit years.
- key += 'A';
- sortify_words(s, s + len, 0, key);
- return;
- }
- int n = year_end - year_start;
- while (n < 4) {
- key += '0';
- n++;
- }
- while (year_start < year_end)
- key += *year_start++;
- int m = find_month(s, s + len);
- if (m < 0)
- return;
- key += 'A' + m;
- const char *day_end;
- const char *day_start = find_day(s, s + len, &day_end);
- if (!day_start)
- return;
- if (day_end - day_start == 1)
- key += '0';
- while (day_start < day_end)
- key += *day_start++;
-}
-
-// SORT_{SUB,SUB_SUB}_SEP can creep in from use of @ in label specification.
-
-void sortify_label(const char *s, int len, string &key)
-{
- const char *end = s + len;
- for (;;) {
- const char *ptr;
- for (ptr = s;
- ptr < end && *ptr != SORT_SUB_SEP && *ptr != SORT_SUB_SUB_SEP;
- ptr++)
- ;
- if (ptr > s)
- sortify_words(s, ptr, 0, key);
- s = ptr;
- if (s >= end)
- break;
- key += *s++;
- }
-}
-
-void reference::compute_sort_key()
-{
- if (sort_fields.length() == 0)
- return;
- sort_fields += '\0';
- const char *sf = sort_fields.contents();
- while (*sf != '\0') {
- if (sf > sort_fields)
- sort_key += SORT_SEP;
- char f = *sf++;
- int n = 1;
- if (*sf == '+') {
- n = INT_MAX;
- sf++;
- }
- else if (csdigit(*sf)) {
- char *ptr;
- long l = strtol(sf, &ptr, 10);
- if (l == 0 && ptr == sf)
- ;
- else {
- sf = ptr;
- if (l < 0) {
- n = 1;
- }
- else {
- n = int(l);
- }
- }
- }
- if (f == '.')
- sortify_label(label.contents(), label.length(), sort_key);
- else if (f == AUTHOR_FIELDS[0])
- sortify_authors(n, sort_key);
- else
- sortify_field(f, n, sort_key);
- }
- sort_fields.set_length(sort_fields.length() - 1);
-}
-
-void reference::sortify_authors(int n, string &result) const
-{
- for (const char *p = AUTHOR_FIELDS; *p != '\0'; p++)
- if (contains_field(*p)) {
- sortify_field(*p, n, result);
- return;
- }
- sortify_field(AUTHOR_FIELDS[0], n, result);
-}
-
-void reference::canonicalize_authors(string &result) const
-{
- int len = result.length();
- sortify_authors(INT_MAX, result);
- if (result.length() > len)
- result += SORT_SUB_SEP;
-}
-
-void reference::sortify_field(unsigned char f, int n, string &result) const
-{
- typedef void (*sortify_t)(const char *, int, string &);
- sortify_t sortifier = sortify_other;
- switch (f) {
- case 'A':
- case 'E':
- sortifier = sortify_name;
- break;
- case 'D':
- sortifier = sortify_date;
- break;
- case 'B':
- case 'J':
- case 'T':
- sortifier = sortify_title;
- break;
- }
- int fi = field_index[(unsigned char)f];
- if (fi != NULL_FIELD_INDEX) {
- string &str = field[fi];
- const char *start = str.contents();
- const char *end = start + str.length();
- for (int i = 0; i < n && start < end; i++) {
- const char *p = start;
- while (start < end && *start != FIELD_SEPARATOR)
- start++;
- if (i > 0)
- result += SORT_SUB_SEP;
- (*sortifier)(p, start - p, result);
- if (start < end)
- start++;
- }
- }
-}
-
-int compare_reference(const reference &r1, const reference &r2)
-{
- assert(r1.no >= 0);
- assert(r2.no >= 0);
- const char *s1 = r1.sort_key.contents();
- int n1 = r1.sort_key.length();
- const char *s2 = r2.sort_key.contents();
- int n2 = r2.sort_key.length();
- for (; n1 > 0 && n2 > 0; --n1, --n2, ++s1, ++s2)
- if (*s1 != *s2)
- return (int)(unsigned char)*s1 - (int)(unsigned char)*s2;
- if (n2 > 0)
- return -1;
- if (n1 > 0)
- return 1;
- return r1.no - r2.no;
-}
-
-int same_reference(const reference &r1, const reference &r2)
-{
- if (!r1.rid.is_null() && r1.rid == r2.rid)
- return 1;
- if (r1.h != r2.h)
- return 0;
- if (r1.nfields != r2.nfields)
- return 0;
- int i = 0;
- for (i = 0; i < 256; i++)
- if (r1.field_index != r2.field_index)
- return 0;
- for (i = 0; i < r1.nfields; i++)
- if (r1.field[i] != r2.field[i])
- return 0;
- return 1;
-}
-
-const char *find_last_name(const char *start, const char *end,
- const char **endp)
-{
- const char *ptr = start;
- const char *last_word = start;
- for (;;) {
- const char *token_start = ptr;
- if (!get_token(&ptr, end))
- break;
- if (ptr - token_start == 1) {
- if (*token_start == ',') {
- *endp = token_start;
- return last_word;
- }
- else if (*token_start == ' ' || *token_start == '\n') {
- if (ptr < end && *ptr != ' ' && *ptr != '\n')
- last_word = ptr;
- }
- }
- }
- *endp = end;
- return last_word;
-}
-
-void abbreviate_name(const char *ptr, const char *end, string &result)
-{
- const char *last_name_end;
- const char *last_name_start = find_last_name(ptr, end, &last_name_end);
- int need_period = 0;
- for (;;) {
- const char *token_start = ptr;
- if (!get_token(&ptr, last_name_start))
- break;
- const token_info *ti = lookup_token(token_start, ptr);
- if (need_period) {
- if ((ptr - token_start == 1 && *token_start == ' ')
- || (ptr - token_start == 2 && token_start[0] == '\\'
- && token_start[1] == ' '))
- continue;
- if (ti->is_upper())
- result += period_before_initial;
- else
- result += period_before_other;
- need_period = 0;
- }
- result.append(token_start, ptr - token_start);
- if (ti->is_upper()) {
- const char *lower_ptr = ptr;
- int first_token = 1;
- for (;;) {
- token_start = ptr;
- if (!get_token(&ptr, last_name_start))
- break;
- if ((ptr - token_start == 1 && *token_start == ' ')
- || (ptr - token_start == 2 && token_start[0] == '\\'
- && token_start[1] == ' '))
- break;
- ti = lookup_token(token_start, ptr);
- if (ti->is_hyphen()) {
- const char *ptr1 = ptr;
- if (get_token(&ptr1, last_name_start)) {
- ti = lookup_token(ptr, ptr1);
- if (ti->is_upper()) {
- result += period_before_hyphen;
- result.append(token_start, ptr1 - token_start);
- ptr = ptr1;
- }
- }
- }
- else if (ti->is_upper()) {
- // MacDougal -> MacD.
- result.append(lower_ptr, ptr - lower_ptr);
- lower_ptr = ptr;
- first_token = 1;
- }
- else if (first_token && ti->is_accent()) {
- result.append(token_start, ptr - token_start);
- lower_ptr = ptr;
- }
- first_token = 0;
- }
- need_period = 1;
- }
- }
- if (need_period)
- result += period_before_last_name;
- result.append(last_name_start, end - last_name_start);
-}
-
-static void abbreviate_names(string &result)
-{
- string str;
- str.move(result);
- const char *ptr = str.contents();
- const char *end = ptr + str.length();
- while (ptr < end) {
- const char *name_end = (char *)memchr(ptr, FIELD_SEPARATOR, end - ptr);
- if (name_end == 0)
- name_end = end;
- abbreviate_name(ptr, name_end, result);
- if (name_end >= end)
- break;
- ptr = name_end + 1;
- result += FIELD_SEPARATOR;
- }
-}
-
-void reverse_name(const char *ptr, const char *name_end, string &result)
-{
- const char *last_name_end;
- const char *last_name_start = find_last_name(ptr, name_end, &last_name_end);
- result.append(last_name_start, last_name_end - last_name_start);
- while (last_name_start > ptr
- && (last_name_start[-1] == ' ' || last_name_start[-1] == '\n'))
- last_name_start--;
- if (last_name_start > ptr) {
- result += ", ";
- result.append(ptr, last_name_start - ptr);
- }
- if (last_name_end < name_end)
- result.append(last_name_end, name_end - last_name_end);
-}
-
-void reverse_names(string &result, int n)
-{
- if (n <= 0)
- return;
- string str;
- str.move(result);
- const char *ptr = str.contents();
- const char *end = ptr + str.length();
- while (ptr < end) {
- if (--n < 0) {
- result.append(ptr, end - ptr);
- break;
- }
- const char *name_end = (char *)memchr(ptr, FIELD_SEPARATOR, end - ptr);
- if (name_end == 0)
- name_end = end;
- reverse_name(ptr, name_end, result);
- if (name_end >= end)
- break;
- ptr = name_end + 1;
- result += FIELD_SEPARATOR;
- }
-}
-
-// Return number of field separators.
-
-int join_fields(string &f)
-{
- const char *ptr = f.contents();
- int len = f.length();
- int nfield_seps = 0;
- int j;
- for (j = 0; j < len; j++)
- if (ptr[j] == FIELD_SEPARATOR)
- nfield_seps++;
- if (nfield_seps == 0)
- return 0;
- string temp;
- int field_seps_left = nfield_seps;
- for (j = 0; j < len; j++) {
- if (ptr[j] == FIELD_SEPARATOR) {
- if (nfield_seps == 1)
- temp += join_authors_exactly_two;
- else if (--field_seps_left == 0)
- temp += join_authors_last_two;
- else
- temp += join_authors_default;
- }
- else
- temp += ptr[j];
- }
- f = temp;
- return nfield_seps;
-}
-
-void uppercase(const char *start, const char *end, string &result)
-{
- for (;;) {
- const char *token_start = start;
- if (!get_token(&start, end))
- break;
- const token_info *ti = lookup_token(token_start, start);
- ti->upper_case(token_start, start, result);
- }
-}
-
-void lowercase(const char *start, const char *end, string &result)
-{
- for (;;) {
- const char *token_start = start;
- if (!get_token(&start, end))
- break;
- const token_info *ti = lookup_token(token_start, start);
- ti->lower_case(token_start, start, result);
- }
-}
-
-void capitalize(const char *ptr, const char *end, string &result)
-{
- int in_small_point_size = 0;
- for (;;) {
- const char *start = ptr;
- if (!get_token(&ptr, end))
- break;
- const token_info *ti = lookup_token(start, ptr);
- const char *char_end = ptr;
- int is_lower = ti->is_lower();
- if ((is_lower || ti->is_upper()) && get_token(&ptr, end)) {
- const token_info *ti2 = lookup_token(char_end, ptr);
- if (!ti2->is_accent())
- ptr = char_end;
- }
- if (is_lower) {
- if (!in_small_point_size) {
- result += "\\s-2";
- in_small_point_size = 1;
- }
- ti->upper_case(start, char_end, result);
- result.append(char_end, ptr - char_end);
- }
- else {
- if (in_small_point_size) {
- result += "\\s+2";
- in_small_point_size = 0;
- }
- result.append(start, ptr - start);
- }
- }
- if (in_small_point_size)
- result += "\\s+2";
-}
-
-void capitalize_field(string &str)
-{
- string temp;
- capitalize(str.contents(), str.contents() + str.length(), temp);
- str.move(temp);
-}
-
-int is_terminated(const char *ptr, const char *end)
-{
- const char *last_token = end;
- for (;;) {
- const char *p = ptr;
- if (!get_token(&ptr, end))
- break;
- last_token = p;
- }
- return end - last_token == 1
- && (*last_token == '.' || *last_token == '!' || *last_token == '?');
-}
-
-void reference::output(FILE *fp)
-{
- fputs(".]-\n", fp);
- for (int i = 0; i < 256; i++)
- if (field_index[i] != NULL_FIELD_INDEX && i != annotation_field) {
- string &f = field[field_index[i]];
- if (!csdigit(i)) {
- int j = reverse_fields.search(i);
- if (j >= 0) {
- int n;
- int len = reverse_fields.length();
- if (++j < len && csdigit(reverse_fields[j])) {
- n = reverse_fields[j] - '0';
- for (++j; j < len && csdigit(reverse_fields[j]); j++)
- // should check for overflow
- n = n*10 + reverse_fields[j] - '0';
- }
- else
- n = INT_MAX;
- reverse_names(f, n);
- }
- }
- int is_multiple = join_fields(f) > 0;
- if (capitalize_fields.search(i) >= 0)
- capitalize_field(f);
- if (memchr(f.contents(), '\n', f.length()) == 0) {
- fprintf(fp, ".ds [%c ", i);
- if (f[0] == ' ' || f[0] == '\\' || f[0] == '"')
- putc('"', fp);
- put_string(f, fp);
- putc('\n', fp);
- }
- else {
- fprintf(fp, ".de [%c\n", i);
- put_string(f, fp);
- fputs("..\n", fp);
- }
- if (i == 'P') {
- int multiple_pages = 0;
- const char *s = f.contents();
- const char *end = f.contents() + f.length();
- for (;;) {
- const char *token_start = s;
- if (!get_token(&s, end))
- break;
- const token_info *ti = lookup_token(token_start, s);
- if (ti->is_hyphen() || ti->is_range_sep()) {
- multiple_pages = 1;
- break;
- }
- }
- fprintf(fp, ".nr [P %d\n", multiple_pages);
- }
- else if (i == 'E')
- fprintf(fp, ".nr [E %d\n", is_multiple);
- }
- for (const char *p = "TAO"; *p; p++) {
- int fi = field_index[(unsigned char)*p];
- if (fi != NULL_FIELD_INDEX) {
- string &f = field[fi];
- fprintf(fp, ".nr [%c %d\n", *p,
- is_terminated(f.contents(), f.contents() + f.length()));
- }
- }
- int t = classify();
- fprintf(fp, ".][ %d %s\n", t, reference_types[t]);
- if (annotation_macro.length() > 0 && annotation_field >= 0
- && field_index[annotation_field] != NULL_FIELD_INDEX) {
- putc('.', fp);
- put_string(annotation_macro, fp);
- putc('\n', fp);
- put_string(field[field_index[annotation_field]], fp);
- }
-}
-
-void reference::print_sort_key_comment(FILE *fp)
-{
- fputs(".\\\"", fp);
- put_string(sort_key, fp);
- putc('\n', fp);
-}
-
-const char *find_year(const char *start, const char *end, const char **endp)
-{
- for (;;) {
- while (start < end && !csdigit(*start))
- start++;
- const char *ptr = start;
- if (start == end)
- break;
- while (ptr < end && csdigit(*ptr))
- ptr++;
- if (ptr - start == 4 || ptr - start == 3
- || (ptr - start == 2
- && (start[0] >= '4' || (start[0] == '3' && start[1] >= '2')))) {
- *endp = ptr;
- return start;
- }
- start = ptr;
- }
- return 0;
-}
-
-static const char *find_day(const char *start, const char *end,
- const char **endp)
-{
- for (;;) {
- while (start < end && !csdigit(*start))
- start++;
- const char *ptr = start;
- if (start == end)
- break;
- while (ptr < end && csdigit(*ptr))
- ptr++;
- if ((ptr - start == 1 && start[0] != '0')
- || (ptr - start == 2 &&
- (start[0] == '1'
- || start[0] == '2'
- || (start[0] == '3' && start[1] <= '1')
- || (start[0] == '0' && start[1] != '0')))) {
- *endp = ptr;
- return start;
- }
- start = ptr;
- }
- return 0;
-}
-
-static int find_month(const char *start, const char *end)
-{
- static const char *months[] = {
- "january",
- "february",
- "march",
- "april",
- "may",
- "june",
- "july",
- "august",
- "september",
- "october",
- "november",
- "december",
- };
- for (;;) {
- while (start < end && !csalpha(*start))
- start++;
- const char *ptr = start;
- if (start == end)
- break;
- while (ptr < end && csalpha(*ptr))
- ptr++;
- if (ptr - start >= 3) {
- for (int i = 0; i < sizeof(months)/sizeof(months[0]); i++) {
- const char *q = months[i];
- const char *p = start;
- for (; p < ptr; p++, q++)
- if (cmlower(*p) != *q)
- break;
- if (p >= ptr)
- return i;
- }
- }
- start = ptr;
- }
- return -1;
-}
-
-int reference::contains_field(char c) const
-{
- return field_index[(unsigned char)c] != NULL_FIELD_INDEX;
-}
-
-int reference::classify()
-{
- if (contains_field('J'))
- return JOURNAL_ARTICLE;
- if (contains_field('B'))
- return ARTICLE_IN_BOOK;
- if (contains_field('G'))
- return TECH_REPORT;
- if (contains_field('R'))
- return TECH_REPORT;
- if (contains_field('I'))
- return BOOK;
- if (contains_field('M'))
- return BELL_TM;
- return OTHER;
-}
-
-const char *reference::get_year(const char **endp) const
-{
- if (field_index['D'] != NULL_FIELD_INDEX) {
- string &date = field[field_index['D']];
- const char *start = date.contents();
- const char *end = start + date.length();
- return find_year(start, end, endp);
- }
- else
- return 0;
-}
-
-const char *reference::get_field(unsigned char c, const char **endp) const
-{
- if (field_index[c] != NULL_FIELD_INDEX) {
- string &f = field[field_index[c]];
- const char *start = f.contents();
- *endp = start + f.length();
- return start;
- }
- else
- return 0;
-}
-
-const char *reference::get_date(const char **endp) const
-{
- return get_field('D', endp);
-}
-
-const char *nth_field(int i, const char *start, const char **endp)
-{
- while (--i >= 0) {
- start = (char *)memchr(start, FIELD_SEPARATOR, *endp - start);
- if (!start)
- return 0;
- start++;
- }
- const char *e = (char *)memchr(start, FIELD_SEPARATOR, *endp - start);
- if (e)
- *endp = e;
- return start;
-}
-
-const char *reference::get_author(int i, const char **endp) const
-{
- for (const char *f = AUTHOR_FIELDS; *f != '\0'; f++) {
- const char *start = get_field(*f, endp);
- if (start) {
- if (strchr(MULTI_FIELD_NAMES, *f) != 0)
- return nth_field(i, start, endp);
- else if (i == 0)
- return start;
- else
- return 0;
- }
- }
- return 0;
-}
-
-const char *reference::get_author_last_name(int i, const char **endp) const
-{
- for (const char *f = AUTHOR_FIELDS; *f != '\0'; f++) {
- const char *start = get_field(*f, endp);
- if (start) {
- if (strchr(MULTI_FIELD_NAMES, *f) != 0) {
- start = nth_field(i, start, endp);
- if (!start)
- return 0;
- }
- if (*f == 'A')
- return find_last_name(start, *endp, endp);
- else
- return start;
- }
- }
- return 0;
-}
-
-void reference::set_date(string &d)
-{
- if (d.length() == 0)
- delete_field('D');
- else
- insert_field('D', d);
-}
-
-int same_year(const reference &r1, const reference &r2)
-{
- const char *ye1;
- const char *ys1 = r1.get_year(&ye1);
- const char *ye2;
- const char *ys2 = r2.get_year(&ye2);
- if (ys1 == 0) {
- if (ys2 == 0)
- return same_date(r1, r2);
- else
- return 0;
- }
- else if (ys2 == 0)
- return 0;
- else if (ye1 - ys1 != ye2 - ys2)
- return 0;
- else
- return memcmp(ys1, ys2, ye1 - ys1) == 0;
-}
-
-int same_date(const reference &r1, const reference &r2)
-{
- const char *e1;
- const char *s1 = r1.get_date(&e1);
- const char *e2;
- const char *s2 = r2.get_date(&e2);
- if (s1 == 0)
- return s2 == 0;
- else if (s2 == 0)
- return 0;
- else if (e1 - s1 != e2 - s2)
- return 0;
- else
- return memcmp(s1, s2, e1 - s1) == 0;
-}
-
-const char *reference::get_sort_field(int i, int si, int ssi,
- const char **endp) const
-{
- const char *start = sort_key.contents();
- const char *end = start + sort_key.length();
- if (i < 0) {
- *endp = end;
- return start;
- }
- while (--i >= 0) {
- start = (char *)memchr(start, SORT_SEP, end - start);
- if (!start)
- return 0;
- start++;
- }
- const char *e = (char *)memchr(start, SORT_SEP, end - start);
- if (e)
- end = e;
- if (si < 0) {
- *endp = end;
- return start;
- }
- while (--si >= 0) {
- start = (char *)memchr(start, SORT_SUB_SEP, end - start);
- if (!start)
- return 0;
- start++;
- }
- e = (char *)memchr(start, SORT_SUB_SEP, end - start);
- if (e)
- end = e;
- if (ssi < 0) {
- *endp = end;
- return start;
- }
- while (--ssi >= 0) {
- start = (char *)memchr(start, SORT_SUB_SUB_SEP, end - start);
- if (!start)
- return 0;
- start++;
- }
- e = (char *)memchr(start, SORT_SUB_SUB_SEP, end - start);
- if (e)
- end = e;
- *endp = end;
- return start;
-}
-
diff --git a/contrib/groff/src/preproc/refer/ref.h b/contrib/groff/src/preproc/refer/ref.h
deleted file mode 100644
index 13a984a4c727..000000000000
--- a/contrib/groff/src/preproc/refer/ref.h
+++ /dev/null
@@ -1,120 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct label_info;
-
-enum label_type { NORMAL_LABEL, SHORT_LABEL };
-const int N_LABEL_TYPES = 2;
-
-struct substring_position {
- int start;
- int length;
- substring_position() : start(-1) { }
-};
-
-class int_set {
- string v;
-public:
- int_set() { }
- void set(int i);
- int get(int i) const;
-};
-
-class reference {
-private:
- unsigned h;
- reference_id rid;
- int merged;
- string sort_key;
- int no;
- string *field;
- int nfields;
- unsigned char field_index[256];
- enum { NULL_FIELD_INDEX = 255 };
- string label;
- substring_position separator_pos;
- string short_label;
- substring_position short_separator_pos;
- label_info *label_ptr;
- string authors;
- int computed_authors;
- int last_needed_author;
- int nauthors;
- int_set last_name_unambiguous;
-
- int contains_field(char) const;
- void insert_field(unsigned char, string &s);
- void delete_field(unsigned char);
- void set_date(string &);
- const char *get_sort_field(int i, int si, int ssi, const char **endp) const;
- int merge_labels_by_parts(reference **, int, label_type, string &);
- int merge_labels_by_number(reference **, int, label_type, string &);
-public:
- reference(const char * = 0, int = -1, reference_id * = 0);
- ~reference();
- void output(FILE *);
- void print_sort_key_comment(FILE *);
- void set_number(int);
- int get_number() const { return no; }
- unsigned hash() const { return h; }
- const string &get_label(label_type type) const;
- const substring_position &get_separator_pos(label_type) const;
- int is_merged() const { return merged; }
- void compute_sort_key();
- void compute_hash_code();
- void pre_compute_label();
- void compute_label();
- void immediate_compute_label();
- int classify();
- void merge(reference &);
- int merge_labels(reference **, int, label_type, string &);
- int get_nauthors() const;
- void need_author(int);
- void set_last_name_unambiguous(int);
- void sortify_authors(int, string &) const;
- void canonicalize_authors(string &) const;
- void sortify_field(unsigned char, int, string &) const;
- const char *get_author(int, const char **) const;
- const char *get_author_last_name(int, const char **) const;
- const char *get_date(const char **) const;
- const char *get_year(const char **) const;
- const char *get_field(unsigned char, const char **) const;
- const label_info *get_label_ptr() const { return label_ptr; }
- const char *get_authors(const char **) const;
- // for sorting
- friend int compare_reference(const reference &r1, const reference &r2);
- // for merging
- friend int same_reference(const reference &, const reference &);
- friend int same_year(const reference &, const reference &);
- friend int same_date(const reference &, const reference &);
- friend int same_author_last_name(const reference &, const reference &, int);
- friend int same_author_name(const reference &, const reference &, int);
-};
-
-const char *find_year(const char *, const char *, const char **);
-const char *find_last_name(const char *, const char *, const char **);
-
-const char *nth_field(int i, const char *start, const char **endp);
-
-void capitalize(const char *ptr, const char *end, string &result);
-void reverse_name(const char *ptr, const char *end, string &result);
-void uppercase(const char *ptr, const char *end, string &result);
-void lowercase(const char *ptr, const char *end, string &result);
-void abbreviate_name(const char *ptr, const char *end, string &result);
diff --git a/contrib/groff/src/preproc/refer/refer.cc b/contrib/groff/src/preproc/refer/refer.cc
deleted file mode 100644
index b6cefc5859cf..000000000000
--- a/contrib/groff/src/preproc/refer/refer.cc
+++ /dev/null
@@ -1,1234 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "refer.h"
-#include "refid.h"
-#include "ref.h"
-#include "token.h"
-#include "search.h"
-#include "command.h"
-
-const char PRE_LABEL_MARKER = '\013';
-const char POST_LABEL_MARKER = '\014';
-const char LABEL_MARKER = '\015'; // label_type is added on
-
-#define FORCE_LEFT_BRACKET 04
-#define FORCE_RIGHT_BRACKET 010
-
-static FILE *outfp = stdout;
-
-string capitalize_fields;
-string reverse_fields;
-string abbreviate_fields;
-string period_before_last_name = ". ";
-string period_before_initial = ".";
-string period_before_hyphen = "";
-string period_before_other = ". ";
-string sort_fields;
-int annotation_field = -1;
-string annotation_macro;
-string discard_fields = "XYZ";
-string pre_label = "\\*([.";
-string post_label = "\\*(.]";
-string sep_label = ", ";
-int accumulate = 0;
-int move_punctuation = 0;
-int abbreviate_label_ranges = 0;
-string label_range_indicator;
-int label_in_text = 1;
-int label_in_reference = 1;
-int date_as_label = 0;
-int sort_adjacent_labels = 0;
-// Join exactly two authors with this.
-string join_authors_exactly_two = " and ";
-// When there are more than two authors join the last two with this.
-string join_authors_last_two = ", and ";
-// Otherwise join authors with this.
-string join_authors_default = ", ";
-string separate_label_second_parts = ", ";
-// Use this string to represent that there are other authors.
-string et_al = " et al";
-// Use et al only if it can replace at least this many authors.
-int et_al_min_elide = 2;
-// Use et al only if the total number of authors is at least this.
-int et_al_min_total = 3;
-
-
-int compatible_flag = 0;
-
-int short_label_flag = 0;
-
-static int recognize_R1_R2 = 1;
-
-search_list database_list;
-int search_default = 1;
-static int default_database_loaded = 0;
-
-static reference **citation = 0;
-static int ncitations = 0;
-static int citation_max = 0;
-
-static reference **reference_hash_table = 0;
-static int hash_table_size;
-static int nreferences = 0;
-
-static int need_syncing = 0;
-string pending_line;
-string pending_lf_lines;
-
-static void output_pending_line();
-static unsigned immediately_handle_reference(const string &);
-static void immediately_output_references();
-static unsigned store_reference(const string &);
-static void divert_to_temporary_file();
-static reference *make_reference(const string &, unsigned *);
-static void usage(FILE *stream);
-static void do_file(const char *);
-static void split_punct(string &line, string &punct);
-static void output_citation_group(reference **v, int n, label_type, FILE *fp);
-static void possibly_load_default_database();
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- outfp = stdout;
- int finished_options = 0;
- int bib_flag = 0;
- int done_spec = 0;
-
- for (--argc, ++argv;
- !finished_options && argc > 0 && argv[0][0] == '-'
- && argv[0][1] != '\0';
- argv++, argc--) {
- const char *opt = argv[0] + 1;
- while (opt != 0 && *opt != '\0') {
- switch (*opt) {
- case 'C':
- compatible_flag = 1;
- opt++;
- break;
- case 'B':
- bib_flag = 1;
- label_in_reference = 0;
- label_in_text = 0;
- ++opt;
- if (*opt == '\0') {
- annotation_field = 'X';
- annotation_macro = "AP";
- }
- else if (csalnum(opt[0]) && opt[1] == '.' && opt[2] != '\0') {
- annotation_field = opt[0];
- annotation_macro = opt + 2;
- }
- opt = 0;
- break;
- case 'P':
- move_punctuation = 1;
- opt++;
- break;
- case 'R':
- recognize_R1_R2 = 0;
- opt++;
- break;
- case 'S':
- // Not a very useful spec.
- set_label_spec("(A.n|Q)', '(D.y|D)");
- done_spec = 1;
- pre_label = " (";
- post_label = ")";
- sep_label = "; ";
- opt++;
- break;
- case 'V':
- verify_flag = 1;
- opt++;
- break;
- case 'f':
- {
- const char *num = 0;
- if (*++opt == '\0') {
- if (argc > 1) {
- num = *++argv;
- --argc;
- }
- else {
- error("option `f' requires an argument");
- usage(stderr);
- exit(1);
- }
- }
- else {
- num = opt;
- opt = 0;
- }
- const char *ptr;
- for (ptr = num; *ptr; ptr++)
- if (!csdigit(*ptr)) {
- error("bad character `%1' in argument to -f option", *ptr);
- break;
- }
- if (*ptr == '\0') {
- string spec;
- spec = '%';
- spec += num;
- spec += '\0';
- set_label_spec(spec.contents());
- done_spec = 1;
- }
- break;
- }
- case 'b':
- label_in_text = 0;
- label_in_reference = 0;
- opt++;
- break;
- case 'e':
- accumulate = 1;
- opt++;
- break;
- case 'c':
- capitalize_fields = ++opt;
- opt = 0;
- break;
- case 'k':
- {
- char buf[5];
- if (csalpha(*++opt))
- buf[0] = *opt++;
- else {
- if (*opt != '\0')
- error("bad field name `%1'", *opt++);
- buf[0] = 'L';
- }
- buf[1] = '~';
- buf[2] = '%';
- buf[3] = 'a';
- buf[4] = '\0';
- set_label_spec(buf);
- done_spec = 1;
- }
- break;
- case 'a':
- {
- const char *ptr;
- for (ptr = ++opt; *ptr; ptr++)
- if (!csdigit(*ptr)) {
- error("argument to `a' option not a number");
- break;
- }
- if (*ptr == '\0') {
- reverse_fields = 'A';
- reverse_fields += opt;
- }
- opt = 0;
- }
- break;
- case 'i':
- linear_ignore_fields = ++opt;
- opt = 0;
- break;
- case 'l':
- {
- char buf[INT_DIGITS*2 + 11]; // A.n+2D.y-3%a
- strcpy(buf, "A.n");
- if (*++opt != '\0' && *opt != ',') {
- char *ptr;
- long n = strtol(opt, &ptr, 10);
- if (n == 0 && ptr == opt) {
- error("bad integer `%1' in `l' option", opt);
- opt = 0;
- break;
- }
- if (n < 0)
- n = 0;
- opt = ptr;
- sprintf(strchr(buf, '\0'), "+%ld", n);
- }
- strcat(buf, "D.y");
- if (*opt == ',')
- opt++;
- if (*opt != '\0') {
- char *ptr;
- long n = strtol(opt, &ptr, 10);
- if (n == 0 && ptr == opt) {
- error("bad integer `%1' in `l' option", opt);
- opt = 0;
- break;
- }
- if (n < 0)
- n = 0;
- sprintf(strchr(buf, '\0'), "-%ld", n);
- opt = ptr;
- if (*opt != '\0')
- error("argument to `l' option not of form `m,n'");
- }
- strcat(buf, "%a");
- if (!set_label_spec(buf))
- assert(0);
- done_spec = 1;
- }
- break;
- case 'n':
- search_default = 0;
- opt++;
- break;
- case 'p':
- {
- const char *filename = 0;
- if (*++opt == '\0') {
- if (argc > 1) {
- filename = *++argv;
- argc--;
- }
- else {
- error("option `p' requires an argument");
- usage(stderr);
- exit(1);
- }
- }
- else {
- filename = opt;
- opt = 0;
- }
- database_list.add_file(filename);
- }
- break;
- case 's':
- if (*++opt == '\0')
- sort_fields = "AD";
- else {
- sort_fields = opt;
- opt = 0;
- }
- accumulate = 1;
- break;
- case 't':
- {
- char *ptr;
- long n = strtol(opt, &ptr, 10);
- if (n == 0 && ptr == opt) {
- error("bad integer `%1' in `t' option", opt);
- opt = 0;
- break;
- }
- if (n < 1)
- n = 1;
- linear_truncate_len = int(n);
- opt = ptr;
- break;
- }
- case '-':
- if (opt[1] == '\0') {
- finished_options = 1;
- opt++;
- break;
- }
- if (strcmp(opt,"-version")==0) {
- case 'v':
- extern const char *Version_string;
- printf("GNU refer (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- if (strcmp(opt,"-help")==0) {
- usage(stdout);
- exit(0);
- break;
- }
- // fall through
- default:
- error("unrecognized option `%1'", *opt);
- usage(stderr);
- exit(1);
- break;
- }
- }
- }
- if (!done_spec)
- set_label_spec("%1");
- if (argc <= 0) {
- if (bib_flag)
- do_bib("-");
- else
- do_file("-");
- }
- else {
- for (int i = 0; i < argc; i++) {
- if (bib_flag)
- do_bib(argv[i]);
- else
- do_file(argv[i]);
- }
- }
- if (accumulate)
- output_references();
- if (fflush(stdout) < 0)
- fatal("output error");
- return 0;
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream,
-"usage: %s [-benvCPRS] [-aN] [-cXYZ] [-fN] [-iXYZ] [-kX] [-lM,N] [-p file]\n"
-" [-sXYZ] [-tN] [-BL.M] [files ...]\n",
- program_name);
-}
-
-static void possibly_load_default_database()
-{
- if (search_default && !default_database_loaded) {
- char *filename = getenv("REFER");
- if (filename)
- database_list.add_file(filename);
- else
- database_list.add_file(DEFAULT_INDEX, 1);
- default_database_loaded = 1;
- }
-}
-
-static int is_list(const string &str)
-{
- const char *start = str.contents();
- const char *end = start + str.length();
- while (end > start && csspace(end[-1]))
- end--;
- while (start < end && csspace(*start))
- start++;
- return end - start == 6 && memcmp(start, "$LIST$", 6) == 0;
-}
-
-static void do_file(const char *filename)
-{
- FILE *fp;
- if (strcmp(filename, "-") == 0) {
- fp = stdin;
- }
- else {
- errno = 0;
- fp = fopen(filename, "r");
- if (fp == 0) {
- error("can't open `%1': %2", filename, strerror(errno));
- return;
- }
- }
- current_filename = filename;
- fprintf(outfp, ".lf 1 %s\n", filename);
- string line;
- current_lineno = 0;
- for (;;) {
- line.clear();
- for (;;) {
- int c = getc(fp);
- if (c == EOF) {
- if (line.length() > 0)
- line += '\n';
- break;
- }
- if (illegal_input_char(c))
- error("illegal input character code %1", c);
- else {
- line += c;
- if (c == '\n')
- break;
- }
- }
- int len = line.length();
- if (len == 0)
- break;
- current_lineno++;
- if (len >= 2 && line[0] == '.' && line[1] == '[') {
- int start_lineno = current_lineno;
- int start_of_line = 1;
- string str;
- string post;
- string pre(line.contents() + 2, line.length() - 3);
- for (;;) {
- int c = getc(fp);
- if (c == EOF) {
- error_with_file_and_line(current_filename, start_lineno,
- "missing `.]' line");
- break;
- }
- if (start_of_line)
- current_lineno++;
- if (start_of_line && c == '.') {
- int d = getc(fp);
- if (d == ']') {
- while ((d = getc(fp)) != '\n' && d != EOF) {
- if (illegal_input_char(d))
- error("illegal input character code %1", d);
- else
- post += d;
- }
- break;
- }
- if (d != EOF)
- ungetc(d, fp);
- }
- if (illegal_input_char(c))
- error("illegal input character code %1", c);
- else
- str += c;
- start_of_line = (c == '\n');
- }
- if (is_list(str)) {
- output_pending_line();
- if (accumulate)
- output_references();
- else
- error("found `$LIST$' but not accumulating references");
- }
- else {
- unsigned flags = (accumulate
- ? store_reference(str)
- : immediately_handle_reference(str));
- if (label_in_text) {
- if (accumulate && outfp == stdout)
- divert_to_temporary_file();
- if (pending_line.length() == 0) {
- warning("can't attach citation to previous line");
- }
- else
- pending_line.set_length(pending_line.length() - 1);
- string punct;
- if (move_punctuation)
- split_punct(pending_line, punct);
- int have_text = pre.length() > 0 || post.length() > 0;
- label_type lt = label_type(flags & ~(FORCE_LEFT_BRACKET
- |FORCE_RIGHT_BRACKET));
- if ((flags & FORCE_LEFT_BRACKET) || !have_text)
- pending_line += PRE_LABEL_MARKER;
- pending_line += pre;
- char lm = LABEL_MARKER + (int)lt;
- pending_line += lm;
- pending_line += post;
- if ((flags & FORCE_RIGHT_BRACKET) || !have_text)
- pending_line += POST_LABEL_MARKER;
- pending_line += punct;
- pending_line += '\n';
- }
- }
- need_syncing = 1;
- }
- else if (len >= 4
- && line[0] == '.' && line[1] == 'l' && line[2] == 'f'
- && (compatible_flag || line[3] == '\n' || line[3] == ' ')) {
- pending_lf_lines += line;
- line += '\0';
- if (interpret_lf_args(line.contents() + 3))
- current_lineno--;
- }
- else if (recognize_R1_R2
- && len >= 4
- && line[0] == '.' && line[1] == 'R' && line[2] == '1'
- && (compatible_flag || line[3] == '\n' || line[3] == ' ')) {
- line.clear();
- int start_of_line = 1;
- int start_lineno = current_lineno;
- for (;;) {
- int c = getc(fp);
- if (c != EOF && start_of_line)
- current_lineno++;
- if (start_of_line && c == '.') {
- c = getc(fp);
- if (c == 'R') {
- c = getc(fp);
- if (c == '2') {
- c = getc(fp);
- if (compatible_flag || c == ' ' || c == '\n' || c == EOF) {
- while (c != EOF && c != '\n')
- c = getc(fp);
- break;
- }
- else {
- line += '.';
- line += 'R';
- line += '2';
- }
- }
- else {
- line += '.';
- line += 'R';
- }
- }
- else
- line += '.';
- }
- if (c == EOF) {
- error_with_file_and_line(current_filename, start_lineno,
- "missing `.R2' line");
- break;
- }
- if (illegal_input_char(c))
- error("illegal input character code %1", int(c));
- else {
- line += c;
- start_of_line = c == '\n';
- }
- }
- output_pending_line();
- if (accumulate)
- output_references();
- else
- nreferences = 0;
- process_commands(line, current_filename, start_lineno + 1);
- need_syncing = 1;
- }
- else {
- output_pending_line();
- pending_line = line;
- }
- }
- need_syncing = 0;
- output_pending_line();
- if (fp != stdin)
- fclose(fp);
-}
-
-class label_processing_state {
- enum {
- NORMAL,
- PENDING_LABEL,
- PENDING_LABEL_POST,
- PENDING_LABEL_POST_PRE,
- PENDING_POST
- } state;
- label_type type; // type of pending labels
- int count; // number of pending labels
- reference **rptr; // pointer to next reference
- int rcount; // number of references left
- FILE *fp;
- int handle_pending(int c);
-public:
- label_processing_state(reference **, int, FILE *);
- ~label_processing_state();
- void process(int c);
-};
-
-static void output_pending_line()
-{
- if (label_in_text && !accumulate && ncitations > 0) {
- label_processing_state state(citation, ncitations, outfp);
- int len = pending_line.length();
- for (int i = 0; i < len; i++)
- state.process((unsigned char)(pending_line[i]));
- }
- else
- put_string(pending_line, outfp);
- pending_line.clear();
- if (pending_lf_lines.length() > 0) {
- put_string(pending_lf_lines, outfp);
- pending_lf_lines.clear();
- }
- if (!accumulate)
- immediately_output_references();
- if (need_syncing) {
- fprintf(outfp, ".lf %d %s\n", current_lineno, current_filename);
- need_syncing = 0;
- }
-}
-
-static void split_punct(string &line, string &punct)
-{
- const char *start = line.contents();
- const char *end = start + line.length();
- const char *ptr = start;
- const char *last_token_start = 0;
- for (;;) {
- if (ptr >= end)
- break;
- last_token_start = ptr;
- if (*ptr == PRE_LABEL_MARKER || *ptr == POST_LABEL_MARKER
- || (*ptr >= LABEL_MARKER && *ptr < LABEL_MARKER + N_LABEL_TYPES))
- ptr++;
- else if (!get_token(&ptr, end))
- break;
- }
- if (last_token_start) {
- const token_info *ti = lookup_token(last_token_start, end);
- if (ti->is_punct()) {
- punct.append(last_token_start, end - last_token_start);
- line.set_length(last_token_start - start);
- }
- }
-}
-
-static void divert_to_temporary_file()
-{
- outfp = xtmpfile();
-}
-
-static void store_citation(reference *ref)
-{
- if (ncitations >= citation_max) {
- if (citation == 0)
- citation = new reference*[citation_max = 100];
- else {
- reference **old_citation = citation;
- citation_max *= 2;
- citation = new reference *[citation_max];
- memcpy(citation, old_citation, ncitations*sizeof(reference *));
- a_delete old_citation;
- }
- }
- citation[ncitations++] = ref;
-}
-
-static unsigned store_reference(const string &str)
-{
- if (reference_hash_table == 0) {
- reference_hash_table = new reference *[17];
- hash_table_size = 17;
- for (int i = 0; i < hash_table_size; i++)
- reference_hash_table[i] = 0;
- }
- unsigned flags;
- reference *ref = make_reference(str, &flags);
- ref->compute_hash_code();
- unsigned h = ref->hash();
- reference **ptr;
- for (ptr = reference_hash_table + (h % hash_table_size);
- *ptr != 0;
- ((ptr == reference_hash_table)
- ? (ptr = reference_hash_table + hash_table_size - 1)
- : --ptr))
- if (same_reference(**ptr, *ref))
- break;
- if (*ptr != 0) {
- if (ref->is_merged())
- warning("fields ignored because reference already used");
- delete ref;
- ref = *ptr;
- }
- else {
- *ptr = ref;
- ref->set_number(nreferences);
- nreferences++;
- ref->pre_compute_label();
- ref->compute_sort_key();
- if (nreferences*2 >= hash_table_size) {
- // Rehash it.
- reference **old_table = reference_hash_table;
- int old_size = hash_table_size;
- hash_table_size = next_size(hash_table_size);
- reference_hash_table = new reference*[hash_table_size];
- int i;
- for (i = 0; i < hash_table_size; i++)
- reference_hash_table[i] = 0;
- for (i = 0; i < old_size; i++)
- if (old_table[i]) {
- reference **p;
- for (p = (reference_hash_table
- + (old_table[i]->hash() % hash_table_size));
- *p;
- ((p == reference_hash_table)
- ? (p = reference_hash_table + hash_table_size - 1)
- : --p))
- ;
- *p = old_table[i];
- }
- a_delete old_table;
- }
- }
- if (label_in_text)
- store_citation(ref);
- return flags;
-}
-
-unsigned immediately_handle_reference(const string &str)
-{
- unsigned flags;
- reference *ref = make_reference(str, &flags);
- ref->set_number(nreferences);
- if (label_in_text || label_in_reference) {
- ref->pre_compute_label();
- ref->immediate_compute_label();
- }
- nreferences++;
- store_citation(ref);
- return flags;
-}
-
-static void immediately_output_references()
-{
- for (int i = 0; i < ncitations; i++) {
- reference *ref = citation[i];
- if (label_in_reference) {
- fputs(".ds [F ", outfp);
- const string &label = ref->get_label(NORMAL_LABEL);
- if (label.length() > 0
- && (label[0] == ' ' || label[0] == '\\' || label[0] == '"'))
- putc('"', outfp);
- put_string(label, outfp);
- putc('\n', outfp);
- }
- ref->output(outfp);
- delete ref;
- }
- ncitations = 0;
-}
-
-static void output_citation_group(reference **v, int n, label_type type,
- FILE *fp)
-{
- if (sort_adjacent_labels) {
- // Do an insertion sort. Usually n will be very small.
- for (int i = 1; i < n; i++) {
- int num = v[i]->get_number();
- reference *temp = v[i];
- int j;
- for (j = i - 1; j >= 0 && v[j]->get_number() > num; j--)
- v[j + 1] = v[j];
- v[j + 1] = temp;
- }
- }
- // This messes up if !accumulate.
- if (accumulate && n > 1) {
- // remove duplicates
- int j = 1;
- for (int i = 1; i < n; i++)
- if (v[i]->get_label(type) != v[i - 1]->get_label(type))
- v[j++] = v[i];
- n = j;
- }
- string merged_label;
- for (int i = 0; i < n; i++) {
- int nmerged = v[i]->merge_labels(v + i + 1, n - i - 1, type, merged_label);
- if (nmerged > 0) {
- put_string(merged_label, fp);
- i += nmerged;
- }
- else
- put_string(v[i]->get_label(type), fp);
- if (i < n - 1)
- put_string(sep_label, fp);
- }
-}
-
-
-label_processing_state::label_processing_state(reference **p, int n, FILE *f)
-: state(NORMAL), count(0), rptr(p), rcount(n), fp(f)
-{
-}
-
-label_processing_state::~label_processing_state()
-{
- int handled = handle_pending(EOF);
- assert(!handled);
- assert(rcount == 0);
-}
-
-int label_processing_state::handle_pending(int c)
-{
- switch (state) {
- case NORMAL:
- break;
- case PENDING_LABEL:
- if (c == POST_LABEL_MARKER) {
- state = PENDING_LABEL_POST;
- return 1;
- }
- else {
- output_citation_group(rptr, count, type, fp);
- rptr += count ;
- rcount -= count;
- state = NORMAL;
- }
- break;
- case PENDING_LABEL_POST:
- if (c == PRE_LABEL_MARKER) {
- state = PENDING_LABEL_POST_PRE;
- return 1;
- }
- else {
- output_citation_group(rptr, count, type, fp);
- rptr += count;
- rcount -= count;
- put_string(post_label, fp);
- state = NORMAL;
- }
- break;
- case PENDING_LABEL_POST_PRE:
- if (c >= LABEL_MARKER
- && c < LABEL_MARKER + N_LABEL_TYPES
- && c - LABEL_MARKER == type) {
- count += 1;
- state = PENDING_LABEL;
- return 1;
- }
- else {
- output_citation_group(rptr, count, type, fp);
- rptr += count;
- rcount -= count;
- put_string(sep_label, fp);
- state = NORMAL;
- }
- break;
- case PENDING_POST:
- if (c == PRE_LABEL_MARKER) {
- put_string(sep_label, fp);
- state = NORMAL;
- return 1;
- }
- else {
- put_string(post_label, fp);
- state = NORMAL;
- }
- break;
- }
- return 0;
-}
-
-void label_processing_state::process(int c)
-{
- if (handle_pending(c))
- return;
- assert(state == NORMAL);
- switch (c) {
- case PRE_LABEL_MARKER:
- put_string(pre_label, fp);
- state = NORMAL;
- break;
- case POST_LABEL_MARKER:
- state = PENDING_POST;
- break;
- case LABEL_MARKER:
- case LABEL_MARKER + 1:
- count = 1;
- state = PENDING_LABEL;
- type = label_type(c - LABEL_MARKER);
- break;
- default:
- state = NORMAL;
- putc(c, fp);
- break;
- }
-}
-
-extern "C" {
-
-int rcompare(const void *p1, const void *p2)
-{
- return compare_reference(**(reference **)p1, **(reference **)p2);
-}
-
-}
-
-void output_references()
-{
- assert(accumulate);
- if (nreferences > 0) {
- int j = 0;
- int i;
- for (i = 0; i < hash_table_size; i++)
- if (reference_hash_table[i] != 0)
- reference_hash_table[j++] = reference_hash_table[i];
- assert(j == nreferences);
- for (; j < hash_table_size; j++)
- reference_hash_table[j] = 0;
- qsort(reference_hash_table, nreferences, sizeof(reference*), rcompare);
- for (i = 0; i < nreferences; i++)
- reference_hash_table[i]->set_number(i);
- compute_labels(reference_hash_table, nreferences);
- }
- if (outfp != stdout) {
- rewind(outfp);
- {
- label_processing_state state(citation, ncitations, stdout);
- int c;
- while ((c = getc(outfp)) != EOF)
- state.process(c);
- }
- ncitations = 0;
- fclose(outfp);
- outfp = stdout;
- }
- if (nreferences > 0) {
- fputs(".]<\n", outfp);
- for (int i = 0; i < nreferences; i++) {
- if (sort_fields.length() > 0)
- reference_hash_table[i]->print_sort_key_comment(outfp);
- if (label_in_reference) {
- fputs(".ds [F ", outfp);
- const string &label = reference_hash_table[i]->get_label(NORMAL_LABEL);
- if (label.length() > 0
- && (label[0] == ' ' || label[0] == '\\' || label[0] == '"'))
- putc('"', outfp);
- put_string(label, outfp);
- putc('\n', outfp);
- }
- reference_hash_table[i]->output(outfp);
- delete reference_hash_table[i];
- reference_hash_table[i] = 0;
- }
- fputs(".]>\n", outfp);
- nreferences = 0;
- }
- clear_labels();
-}
-
-static reference *find_reference(const char *query, int query_len)
-{
- // This is so that error messages look better.
- while (query_len > 0 && csspace(query[query_len - 1]))
- query_len--;
- string str;
- for (int i = 0; i < query_len; i++)
- str += query[i] == '\n' ? ' ' : query[i];
- str += '\0';
- possibly_load_default_database();
- search_list_iterator iter(&database_list, str.contents());
- reference_id rid;
- const char *start;
- int len;
- if (!iter.next(&start, &len, &rid)) {
- error("no matches for `%1'", str.contents());
- return 0;
- }
- const char *end = start + len;
- while (start < end) {
- if (*start == '%')
- break;
- while (start < end && *start++ != '\n')
- ;
- }
- if (start >= end) {
- error("found a reference for `%1' but it didn't contain any fields",
- str.contents());
- return 0;
- }
- reference *result = new reference(start, end - start, &rid);
- if (iter.next(&start, &len, &rid))
- warning("multiple matches for `%1'", str.contents());
- return result;
-}
-
-static reference *make_reference(const string &str, unsigned *flagsp)
-{
- const char *start = str.contents();
- const char *end = start + str.length();
- const char *ptr = start;
- while (ptr < end) {
- if (*ptr == '%')
- break;
- while (ptr < end && *ptr++ != '\n')
- ;
- }
- *flagsp = 0;
- for (; start < ptr; start++) {
- if (*start == '#')
- *flagsp = (SHORT_LABEL | (*flagsp & (FORCE_RIGHT_BRACKET
- | FORCE_LEFT_BRACKET)));
- else if (*start == '[')
- *flagsp |= FORCE_LEFT_BRACKET;
- else if (*start == ']')
- *flagsp |= FORCE_RIGHT_BRACKET;
- else if (!csspace(*start))
- break;
- }
- if (start >= end) {
- error("empty reference");
- return new reference;
- }
- reference *database_ref = 0;
- if (start < ptr)
- database_ref = find_reference(start, ptr - start);
- reference *inline_ref = 0;
- if (ptr < end)
- inline_ref = new reference(ptr, end - ptr);
- if (inline_ref) {
- if (database_ref) {
- database_ref->merge(*inline_ref);
- delete inline_ref;
- return database_ref;
- }
- else
- return inline_ref;
- }
- else if (database_ref)
- return database_ref;
- else
- return new reference;
-}
-
-static void do_ref(const string &str)
-{
- if (accumulate)
- (void)store_reference(str);
- else {
- (void)immediately_handle_reference(str);
- immediately_output_references();
- }
-}
-
-static void trim_blanks(string &str)
-{
- const char *start = str.contents();
- const char *end = start + str.length();
- while (end > start && end[-1] != '\n' && csspace(end[-1]))
- --end;
- str.set_length(end - start);
-}
-
-void do_bib(const char *filename)
-{
- FILE *fp;
- if (strcmp(filename, "-") == 0)
- fp = stdin;
- else {
- errno = 0;
- fp = fopen(filename, "r");
- if (fp == 0) {
- error("can't open `%1': %2", filename, strerror(errno));
- return;
- }
- current_filename = filename;
- }
- enum {
- START, MIDDLE, BODY, BODY_START, BODY_BLANK, BODY_DOT
- } state = START;
- string body;
- for (;;) {
- int c = getc(fp);
- if (c == EOF)
- break;
- if (illegal_input_char(c)) {
- error("illegal input character code %1", c);
- continue;
- }
- switch (state) {
- case START:
- if (c == '%') {
- body = c;
- state = BODY;
- }
- else if (c != '\n')
- state = MIDDLE;
- break;
- case MIDDLE:
- if (c == '\n')
- state = START;
- break;
- case BODY:
- body += c;
- if (c == '\n')
- state = BODY_START;
- break;
- case BODY_START:
- if (c == '\n') {
- do_ref(body);
- state = START;
- }
- else if (c == '.')
- state = BODY_DOT;
- else if (csspace(c)) {
- state = BODY_BLANK;
- body += c;
- }
- else {
- body += c;
- state = BODY;
- }
- break;
- case BODY_BLANK:
- if (c == '\n') {
- trim_blanks(body);
- do_ref(body);
- state = START;
- }
- else if (csspace(c))
- body += c;
- else {
- body += c;
- state = BODY;
- }
- break;
- case BODY_DOT:
- if (c == ']') {
- do_ref(body);
- state = MIDDLE;
- }
- else {
- body += '.';
- body += c;
- state = c == '\n' ? BODY_START : BODY;
- }
- break;
- default:
- assert(0);
- }
- if (c == '\n')
- current_lineno++;
- }
- switch (state) {
- case START:
- case MIDDLE:
- break;
- case BODY:
- body += '\n';
- do_ref(body);
- break;
- case BODY_DOT:
- case BODY_START:
- do_ref(body);
- break;
- case BODY_BLANK:
- trim_blanks(body);
- do_ref(body);
- break;
- }
- fclose(fp);
-}
-
-// from the Dragon Book
-
-unsigned hash_string(const char *s, int len)
-{
- const char *end = s + len;
- unsigned h = 0, g;
- while (s < end) {
- h <<= 4;
- h += *s++;
- if ((g = h & 0xf0000000) != 0) {
- h ^= g >> 24;
- h ^= g;
- }
- }
- return h;
-}
-
-int next_size(int n)
-{
- static const int table_sizes[] = {
- 101, 503, 1009, 2003, 3001, 4001, 5003, 10007, 20011, 40009,
- 80021, 160001, 500009, 1000003, 2000003, 4000037, 8000009,
- 16000057, 32000011, 64000031, 128000003, 0
- };
-
- const int *p;
- for (p = table_sizes; *p <= n && *p != 0; p++)
- ;
- assert(*p != 0);
- return *p;
-}
-
diff --git a/contrib/groff/src/preproc/refer/refer.h b/contrib/groff/src/preproc/refer/refer.h
deleted file mode 100644
index f0ab3cd70957..000000000000
--- a/contrib/groff/src/preproc/refer/refer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <string.h>
-#include <errno.h>
-
-#include "errarg.h"
-#include "error.h"
-#include "lib.h"
-#include "stringclass.h"
-#include "cset.h"
-#include "cmap.h"
-
-#include "defs.h"
-
-unsigned hash_string(const char *, int);
-int next_size(int);
-
-extern string capitalize_fields;
-extern string reverse_fields;
-extern string abbreviate_fields;
-extern string period_before_last_name;
-extern string period_before_initial;
-extern string period_before_hyphen;
-extern string period_before_other;
-extern string sort_fields;
-extern int annotation_field;
-extern string annotation_macro;
-extern string discard_fields;
-extern string articles;
-extern int abbreviate_label_ranges;
-extern string label_range_indicator;
-extern int date_as_label;
-extern string join_authors_exactly_two;
-extern string join_authors_last_two;
-extern string join_authors_default;
-extern string separate_label_second_parts;
-extern string et_al;
-extern int et_al_min_elide;
-extern int et_al_min_total;
-
-extern int compatible_flag;
-
-extern int set_label_spec(const char *);
-extern int set_date_label_spec(const char *);
-extern int set_short_label_spec(const char *);
-
-extern int short_label_flag;
-
-void clear_labels();
-void command_error(const char *,
- const errarg &arg1 = empty_errarg,
- const errarg &arg2 = empty_errarg,
- const errarg &arg3 = empty_errarg);
-
-struct reference;
-
-void compute_labels(reference **, int);
diff --git a/contrib/groff/src/preproc/refer/refer.man b/contrib/groff/src/preproc/refer/refer.man
deleted file mode 100644
index 13708cf0e568..000000000000
--- a/contrib/groff/src/preproc/refer/refer.man
+++ /dev/null
@@ -1,1302 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.\" The BSD man macros can't handle " in arguments to font change macros,
-.\" so use \(ts instead of ".
-.tr \(ts"
-.TH @G@REFER @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-@g@refer \- preprocess bibliographic references for groff
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fB@g@refer 'u
-.ti \niu
-.B @g@refer
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-benvCPRS
-.OP \-a n
-.OP \-c fields
-.OP \-f n
-.OP \-i fields
-.OP \-k field
-.OP \-l m,n
-.OP \-p filename
-.OP \-s fields
-.OP \-t n
-.OP \-B field.macro
-.RI [\ filename \|.\|.\|.\ ]
-.br
-.ad \na
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-This file documents the GNU version of
-.BR refer ,
-which is part of the groff document formatting system.
-.B refer
-copies the contents of
-.IR filename \|.\|.\|.
-to the standard output,
-except that lines between
-.B .[
-and
-.B .]
-are interpreted as citations,
-and lines between
-.B .R1
-and
-.B .R2
-are interpreted as commands about how citations are to be processed.
-.LP
-Each citation specifies a reference.
-The citation can specify a reference that is contained in
-a bibliographic database by giving a set of keywords
-that only that reference contains.
-Alternatively it can specify a reference by supplying a database
-record in the citation.
-A combination of these alternatives is also possible.
-.LP
-For each citation,
-.B refer
-can produce a mark in the text.
-This mark consists of some label which can be separated from
-the text and from other labels in various ways.
-For each reference it also outputs
-.B groff
-commands that can be used by a macro package to produce a formatted
-reference for each citation.
-The output of
-.B refer
-must therefore be processed using a suitable macro package.
-The
-.B \-ms
-and
-.B \-me
-macros are both suitable.
-The commands to format a citation's reference can be output immediately after
-the citation,
-or the references may be accumulated,
-and the commands output at some later point.
-If the references are accumulated, then multiple citations of the same
-reference will produce a single formatted reference.
-.LP
-The interpretation of lines between
-.B .R1
-and
-.B .R2
-as commands is a new feature of GNU refer.
-Documents making use of this feature can still be processed by
-Unix refer just by adding the lines
-.RS
-.LP
-.nf
-.ft B
-\&.de R1
-\&.ig R2
-\&..
-.ft
-.fi
-.RE
-to the beginning of the document.
-This will cause
-.B troff
-to ignore everything between
-.B .R1
-and
-.BR .R2 .
-The effect of some commands can also be achieved by options.
-These options are supported mainly for compatibility with Unix refer.
-It is usually more convenient to use commands.
-.LP
-.B refer
-generates
-.B .lf
-lines so that filenames and line numbers in messages produced
-by commands that read
-.B refer
-output will be correct;
-it also interprets lines beginning with
-.B .lf
-so that filenames and line numbers in the messages and
-.B .lf
-lines that it produces will be accurate even if the input has been
-preprocessed by a command such as
-.BR @g@soelim (@MAN1EXT@).
-.SH OPTIONS
-.LP
-Most options are equivalent to commands
-(for a description of these commands see the
-.B Commands
-subsection):
-.TP
-.B \-b
-.B
-no-label-in-text; no-label-in-reference
-.TP
-.B \-e
-.B accumulate
-.TP
-.B \-n
-.B no-default-database
-.TP
-.B \-C
-.B compatible
-.TP
-.B \-P
-.B move-punctuation
-.TP
-.B \-S
-.B
-label "(A.n|Q) ', ' (D.y|D)"; bracket-label " (" ) "; "
-.TP
-.BI \-a n
-.B reverse
-.BI A n
-.TP
-.BI \-c fields
-.B capitalize
-.I fields
-.TP
-.BI \-f n
-.B label
-.BI % n
-.TP
-.BI \-i fields
-.B search-ignore
-.I fields
-.TP
-.B \-k
-.B label
-.B L\(ti%a
-.TP
-.BI \-k field
-.B label
-.IB field \(ti%a
-.TP
-.B \-l
-.B label
-.BI A.nD.y%a
-.TP
-.BI \-l m
-.B label
-.BI A.n+ m D.y%a
-.TP
-.BI \-l, n
-.B label
-.BI A.nD.y\- n %a
-.TP
-.BI \-l m , n
-.B label
-.BI A.n+ m D.y\- n %a
-.TP
-.BI \-p filename
-.B database
-.I filename
-.TP
-.BI \-s spec
-.B sort
-.I spec
-.TP
-.BI \-t n
-.B search-truncate
-.I n
-.LP
-These options are equivalent to the following commands with the
-addition that the filenames specified on the command line are
-processed as if they were arguments to the
-.B bibliography
-command instead of in the normal way:
-.TP
-.B \-B
-.B
-annotate X AP; no-label-in-reference
-.TP
-.BI \-B field . macro
-.B annotate
-.I field
-.IB macro ;
-.B no-label-in-reference
-.LP
-The following options have no equivalent commands:
-.TP
-.B \-v
-Print the version number.
-.TP
-.B \-R
-Don't recognize lines beginning with
-.BR .R1 / .R2 .
-.SH USAGE
-.SS Bibliographic databases
-The bibliographic database is a text file consisting of records
-separated by one or more blank lines.
-Within each record fields start with a
-.B %
-at the beginning of a line.
-Each field has a one character name that immediately follows the
-.BR % .
-It is best to use only upper and lower case letters for the names
-of fields.
-The name of the field should be followed by exactly one space,
-and then by the contents of the field.
-Empty fields are ignored.
-The conventional meaning of each field is as follows:
-.TP
-.B A
-The name of an author.
-If the name contains a title such as
-.B Jr.
-at the end,
-it should be separated from the last name by a comma.
-There can be multiple occurrences of the
-.B A
-field.
-The order is significant.
-It is a good idea always to supply an
-.B A
-field or a
-.B Q
-field.
-.TP
-.B B
-For an article that is part of a book, the title of the book
-.TP
-.B C
-The place (city) of publication.
-.TP
-.B D
-The date of publication.
-The year should be specified in full.
-If the month is specified, the name rather than the number of the month
-should be used, but only the first three letters are required.
-It is a good idea always to supply a
-.B D
-field;
-if the date is unknown, a value such as
-.B in press
-or
-.B unknown
-can be used.
-.TP
-.B E
-For an article that is part of a book, the name of an editor of the book.
-Where the work has editors and no authors,
-the names of the editors should be given as
-.B A
-fields and
-.B ,\ (ed)
-or
-.B ,\ (eds)
-should be appended to the last author.
-.TP
-.B G
-US Government ordering number.
-.TP
-.B I
-The publisher (issuer).
-.TP
-.B J
-For an article in a journal, the name of the journal.
-.TP
-.B K
-Keywords to be used for searching.
-.TP
-.B L
-Label.
-.TP
-.B N
-Journal issue number.
-.TP
-.B O
-Other information.
-This is usually printed at the end of the reference.
-.TP
-.B P
-Page number.
-A range of pages can be specified as
-.IB m \- n\fR.
-.TP
-.B Q
-The name of the author, if the author is not a person.
-This will only be used if there are no
-.B A
-fields.
-There can only be one
-.B Q
-field.
-.TP
-.B R
-Technical report number.
-.TP
-.B S
-Series name.
-.TP
-.B T
-Title.
-For an article in a book or journal,
-this should be the title of the article.
-.TP
-.B V
-Volume number of the journal or book.
-.TP
-.B X
-Annotation.
-.LP
-For all fields except
-.B A
-and
-.BR E ,
-if there is more than one occurrence of a particular field in a record,
-only the last such field will be used.
-.LP
-If accent strings are used, they should follow the character to be accented.
-This means that the
-.B AM
-macro must be used with the
-.B \-ms
-macros.
-Accent strings should not be quoted:
-use one
-.B \e
-rather than two.
-.SS Citations
-The format of a citation is
-.RS
-.BI .[ opening-text
-.br
-.I
-flags keywords
-.br
-.I fields
-.br
-.BI .] closing-text
-.RE
-.LP
-The
-.IR opening-text ,
-.IR closing-text
-and
-.I flags
-components are optional.
-Only one of the
-.I keywords
-and
-.I fields
-components need be specified.
-.LP
-The
-.I keywords
-component says to search the bibliographic databases for a reference
-that contains all the words in
-.IR keywords .
-It is an error if more than one reference if found.
-.LP
-The
-.I fields
-components specifies additional fields to replace or supplement
-those specified in the reference.
-When references are being accumulated and the
-.I keywords
-component is non-empty,
-then additional fields should be specified only on the first
-occasion that a particular reference is cited,
-and will apply to all citations of that reference.
-.LP
-The
-.I opening-text
-and
-.I closing-text
-component specifies strings to be used to bracket the label instead
-of the strings specified in the
-.B bracket-label
-command.
-If either of these components is non-empty,
-the strings specified in the
-.B bracket-label
-command will not be used;
-this behaviour can be altered using the
-.B [
-and
-.B ]
-flags.
-Note that leading and trailing spaces are significant for these components.
-.LP
-The
-.I flags
-component is a list of
-non-alphanumeric characters each of which modifies the treatment
-of this particular citation.
-Unix refer will treat these flags as part of the keywords and
-so will ignore them since they are non-alphanumeric.
-The following flags are currently recognized:
-.TP
-.B #
-This says to use the label specified by the
-.B short-label
-command,
-instead of that specified by the
-.B label
-command.
-If no short label has been specified, the normal label will be used.
-Typically the short label is used with author-date labels
-and consists of only the date and possibly a disambiguating letter;
-the
-.B #
-is supposed to be suggestive of a numeric type of label.
-.TP
-.B [
-Precede
-.I opening-text
-with the first string specified in the
-.B bracket-label
-command.
-.TP
-.B ]
-Follow
-.I closing-text
-with the second string specified in the
-.B bracket-label
-command.
-.LP
-One advantages of using the
-.B [
-and
-.B ]
-flags rather than including the brackets in
-.I opening-text
-and
-.I closing-text
-is that
-you can change the style of bracket used in the document just by changing the
-.B bracket-label
-command.
-Another advantage is that sorting and merging of citations
-will not necessarily be inhibited if the flags are used.
-.LP
-If a label is to be inserted into the text,
-it will be attached to the line preceding the
-.B .[
-line.
-If there is no such line, then an extra line will be inserted before the
-.B .[
-line and a warning will be given.
-.LP
-There is no special notation for making a citation to multiple references.
-Just use a sequence of citations, one for each reference.
-Don't put anything between the citations.
-The labels for all the citations will be attached to the line preceding
-the first citation.
-The labels may also be sorted or merged.
-See the description of the
-.B <>
-label expression, and of the
-.B sort-adjacent-labels
-and
-.B abbreviate-label-ranges
-command.
-A label will not be merged if its citation has a non-empty
-.I opening-text
-or
-.IR closing-text .
-However, the labels for a citation using the
-.B ]
-flag and without any
-.I closing-text
-immediately followed by a citation using the
-.B [
-flag and without any
-.I opening-text
-may be sorted and merged
-even though the first citation's
-.I opening-text
-or the second citation's
-.I closing-text
-is non-empty.
-(If you wish to prevent this just make the first citation's
-.I closing-text
-.BR \e& .)
-.SS Commands
-Commands are contained between lines starting with
-.B .R1
-and
-.BR .R2 .
-Recognition of these lines can be prevented by the
-.B \-R
-option.
-When a
-.B .R1
-line is recognized any accumulated references are flushed out.
-Neither
-.B .R1
-nor
-.B .R2
-lines,
-nor anything between them
-is output.
-.LP
-Commands are separated by newlines or
-.BR ; s.
-.B #
-introduces a comment that extends to the end of the line
-(but does not conceal the newline).
-Each command is broken up into words.
-Words are separated by spaces or tabs.
-A word that begins with
-.B \(ts
-extends to the next
-.B \(ts
-that is not followed by another
-.BR \(ts .
-If there is no such
-.B \(ts
-the word extends to the end of the line.
-Pairs of
-.B \(ts
-in a word beginning with
-.B \(ts
-collapse to a single
-.BR \(ts .
-Neither
-.B #
-nor
-.B ;
-are recognized inside
-.BR \(ts s.
-A line can be continued by ending it with
-.BR \e ;
-this works everywhere except after a
-.BR # .
-.LP
-.ds n \fR*
-Each command
-.I name
-that is marked with \*n has an associated negative command
-.BI no- name
-that undoes the effect of
-.IR name .
-For example, the
-.B no-sort
-command specifies that references should not be sorted.
-The negative commands take no arguments.
-.LP
-In the following description each argument must be a single word;
-.I field
-is used for a single upper or lower case letter naming a field;
-.I fields
-is used for a sequence of such letters;
-.I m
-and
-.I n
-are used for a non-negative numbers;
-.I string
-is used for an arbitrary string;
-.I filename
-is used for the name of a file.
-.Tp \w'\fBabbreviate-label-ranges'u+2n
-.BI abbreviate\*n\ fields\ string1\ string2\ string3\ string4
-Abbreviate the first names of
-.IR fields .
-An initial letter will be separated from another initial letter by
-.IR string1 ,
-from the last name by
-.IR string2 ,
-and from anything else
-(such as a
-.B von
-or
-.BR de )
-by
-.IR string3 .
-These default to a period followed by a space.
-In a hyphenated first name,
-the initial of the first part of the name will be separated from the hyphen by
-.IR string4 ;
-this defaults to a period.
-No attempt is made to handle any ambiguities that might
-result from abbreviation.
-Names are abbreviated before sorting and before
-label construction.
-.TP
-.BI abbreviate-label-ranges\*n\ string
-Three or more adjacent labels that refer to consecutive references
-will be abbreviated to a label consisting
-of the first label, followed by
-.I string
-followed by the last label.
-This is mainly useful with numeric labels.
-If
-.I string
-is omitted it defaults to
-.BR \- .
-.TP
-.B accumulate\*n
-Accumulate references instead of writing out each reference
-as it is encountered.
-Accumulated references will be written out whenever a reference
-of the form
-.RS
-.IP
-.B .[
-.br
-.B $LIST$
-.br
-.B .]
-.LP
-is encountered,
-after all input files hve been processed,
-and whenever
-.B .R1
-line is recognized.
-.RE
-.TP
-.BI annotate\*n\ field\ string
-.I field
-is an annotation;
-print it at the end of the reference as a paragraph preceded by the line
-.RS
-.IP
-.BI . string
-.LP
-If
-.I macro
-is omitted it will default to
-.BR AP ;
-if
-.I field
-is also omitted it will default to
-.BR X .
-Only one field can be an annotation.
-.RE
-.TP
-.BI articles\ string \fR\|.\|.\|.
-.IR string \|.\|.\|.
-are definite or indefinite articles, and should be ignored at the beginning of
-.B T
-fields when sorting.
-Initially,
-.BR the ,
-.B a
-and
-.B an
-are recognized as articles.
-.TP
-.BI bibliography\ filename \fR\|.\|.\|.
-Write out all the references contained in the bibliographic databases
-.IR filename \|.\|.\|.
-.TP
-.BI bracket-label\ string1\ string2\ string3
-In the text, bracket each label
-with
-.I string1
-and
-.IR string2 .
-An occurrence of
-.I string2
-immediately followed by
-.I string1
-will be turned into
-.IR string3 .
-The default behaviour is
-.RS
-.IP
-.B
-bracket-label \e*([. \e*(.] ", "
-.RE
-.TP
-.BI capitalize\ fields
-Convert
-.I fields
-to caps and small caps.
-.TP
-.B compatible\*n
-Recognize
-.B .R1
-and
-.B .R2
-even when followed by a character other than space or newline.
-.TP
-.BI database\ filename \fR\|.\|.\|.
-Search the bibliographic databases
-.IR filename \|.\|.\|.
-For each
-.I filename
-if an index
-.IB filename @INDEX_SUFFIX@
-created by
-.BR @g@indxbib (@MAN1EXT@)
-exists, then it will be searched instead;
-each index can cover multiple databases.
-.TP
-.BI date-as-label\*n\ string
-.I string
-is a label expression that specifies a string with which to replace the
-.B D
-field after constructing the label.
-See the
-.B "Label expressions"
-subsection for a description of label expressions.
-This command is useful if you do not want explicit labels in the
-reference list, but instead want to handle any necessary
-disambiguation by qualifying the date in some way.
-The label used in the text would typically be some combination of the
-author and date.
-In most cases you should also use the
-.B no-label-in-reference
-command.
-For example,
-.RS
-.IP
-.B
-date-as-label D.+yD.y%a*D.-y
-.LP
-would attach a disambiguating letter to the year part of the
-.B D
-field in the reference.
-.RE
-.TP
-.B default-database\*n
-The default database should be searched.
-This is the default behaviour, so the negative version of
-this command is more useful.
-refer determines whether the default database should be searched
-on the first occasion that it needs to do a search.
-Thus a
-.B no-default-database
-command must be given before then,
-in order to be effective.
-.TP
-.BI discard\*n\ fields
-When the reference is read,
-.I fields
-should be discarded;
-no string definitions for
-.I fields
-will be output.
-Initially,
-.I fields
-are
-.BR XYZ .
-.TP
-.BI et-al\*n\ string\ m\ n
-Control use of
-.B
-et al
-in the evaluation of
-.B @
-expressions in label expressions.
-If the number of authors needed to make the author sequence
-unambiguous is
-.I u
-and the total number of authors is
-.I t
-then the last
-.IR t \|\-\| u
-authors will be replaced by
-.I string
-provided that
-.IR t \|\-\| u
-is not less than
-.I m
-and
-.I t
-is not less than
-.IR n .
-The default behaviour is
-.RS
-.IP
-.B
-et-al " et al" 2 3
-.RE
-.TP
-.BI include\ filename
-Include
-.I filename
-and interpret the contents as commands.
-.TP
-.BI join-authors\ string1\ string2\ string3
-This says how authors should be joined together.
-When there are exactly two authors, they will be joined with
-.IR string1 .
-When there are more than two authors, all but the last two will
-be joined with
-.IR string2 ,
-and the last two authors will be joined with
-.IR string3 .
-If
-.I string3
-is omitted,
-it will default to
-.IR string1 ;
-if
-.I string2
-is also omitted it will also default to
-.IR string1 .
-For example,
-.RS
-.IP
-.B
-join-authors " and " ", " ", and "
-.LP
-will restore the default method for joining authors.
-.RE
-.TP
-.B label-in-reference\*n
-When outputting the reference,
-define the string
-.B [F
-to be the reference's label.
-This is the default behaviour; so the negative version
-of this command is more useful.
-.TP
-.B label-in-text\*n
-For each reference output a label in the text.
-The label will be separated from the surrounding text as described in the
-.B bracket-label
-command.
-This is the default behaviour; so the negative version
-of this command is more useful.
-.TP
-.BI label\ string
-.I string
-is a label expression describing how to label each reference.
-.TP
-.BI separate-label-second-parts\ string
-When merging two-part labels, separate the second part of the second
-label from the first label with
-.IR string .
-See the description of the
-.B <>
-label expression.
-.TP
-.B move-punctuation\*n
-In the text, move any punctuation at the end of line past the label.
-It is usually a good idea to give this command unless you are using
-superscripted numbers as labels.
-.TP
-.BI reverse\*n\ string
-Reverse the fields whose names
-are in
-.IR string .
-Each field name can be followed by a number which says
-how many such fields should be reversed.
-If no number is given for a field, all such fields will be reversed.
-.TP
-.BI search-ignore\*n\ fields
-While searching for keys in databases for which no index exists,
-ignore the contents of
-.IR fields .
-Initially, fields
-.B XYZ
-are ignored.
-.TP
-.BI search-truncate\*n\ n
-Only require the first
-.I n
-characters of keys to be given.
-In effect when searching for a given key
-words in the database are truncated to the maximum of
-.I n
-and the length of the key.
-Initially
-.I n
-is 6.
-.TP
-.BI short-label\*n\ string
-.I string
-is a label expression that specifies an alternative (usually shorter)
-style of label.
-This is used when the
-.B #
-flag is given in the citation.
-When using author-date style labels, the identity of the author
-or authors is sometimes clear from the context, and so it
-may be desirable to omit the author or authors from the label.
-The
-.B short-label
-command will typically be used to specify a label containing just
-a date and possibly a disambiguating letter.
-.TP
-.BI sort\*n\ string
-Sort references according to
-.BR string .
-References will automatically be accumulated.
-.I string
-should be a list of field names, each followed by a number,
-indicating how many fields with the name should be used for sorting.
-.B +
-can be used to indicate that all the fields with the name should be used.
-Also
-.B .
-can be used to indicate the references should be sorted using the
-(tentative) label.
-(The
-.B
-Label expressions
-subsection describes the concept of a tentative label.)
-.TP
-.B sort-adjacent-labels\*n
-Sort labels that are adjacent in the text according to their
-position in the reference list.
-This command should usually be given if the
-.B abbreviate-label-ranges
-command has been given,
-or if the label expression contains a
-.B <>
-expression.
-This will have no effect unless references are being accumulated.
-.SS Label expressions
-.LP
-Label expressions can be evaluated both normally and tentatively.
-The result of normal evaluation is used for output.
-The result of tentative evaluation, called the
-.I
-tentative label,
-is used to gather the information
-that normal evaluation needs to disambiguate the label.
-Label expressions specified by the
-.B date-as-label
-and
-.B short-label
-commands are not evaluated tentatively.
-Normal and tentative evaluation are the same for all types
-of expression other than
-.BR @ ,
-.BR * ,
-and
-.B %
-expressions.
-The description below applies to normal evaluation,
-except where otherwise specified.
-.TP
-.I field
-.TQ
-.I field\ n
-The
-.IR n -th
-part of
-.IR field .
-If
-.I n
-is omitted, it defaults to 1.
-.TP
-.BI ' string '
-The characters in
-.I string
-literally.
-.TP
-.B @
-All the authors joined as specified by the
-.B join-authors
-command.
-The whole of each author's name will be used.
-However, if the references are sorted by author
-(that is the sort specification starts with
-.BR A+ ),
-then authors' last names will be used instead, provided that this does
-not introduce ambiguity,
-and also an initial subsequence of the authors may be used
-instead of all the authors, again provided that this does not
-introduce ambiguity.
-The use of only the last name for the
-.IR i -th
-author of some reference
-is considered to be ambiguous if
-there is some other reference,
-such that the first
-.IR i \|-\|1
-authors of the references are the same,
-the
-.IR i -th
-authors are not the same,
-but the
-.IR i -th
-authors' last names are the same.
-A proper initial subsequence of the sequence
-of authors for some reference is considered to be ambiguous if there is
-a reference with some other sequence of authors which also has
-that subsequence as a proper initial subsequence.
-When an initial subsequence of authors is used, the remaining
-authors are replaced by the string specified by the
-.B et-al
-command;
-this command may also specify additional requirements that must be
-met before an initial subsequence can be used.
-.B @
-tentatively evaluates to a canonical representation of the authors,
-such that authors that compare equally for sorting purpose
-will have the same representation.
-.TP
-.BI % n
-.TQ
-.B %a
-.TQ
-.B %A
-.TQ
-.B %i
-.TQ
-.B %I
-The serial number of the reference formatted according to the character
-following the
-.BR % .
-The serial number of a reference is 1 plus the number of earlier references
-with same tentative label as this reference.
-These expressions tentatively evaluate to an empty string.
-.TP
-.IB expr *
-If there is another reference with the same tentative label as
-this reference, then
-.IR expr ,
-otherwise an empty string.
-It tentatively evaluates to an empty string.
-.TP
-.IB expr + n
-.TQ
-.IB expr \- n
-The first
-.RB ( + )
-or last
-.RB ( \- )
-.I n
-upper or lower case letters or digits of
-.IR expr .
-Troff special characters (such as
-.BR \e('a )
-count as a single letter.
-Accent strings are retained but do not count towards the total.
-.TP
-.IB expr .l
-.I expr
-converted to lowercase.
-.TP
-.IB expr .u
-.I expr
-converted to uppercase.
-.TP
-.IB expr .c
-.I expr
-converted to caps and small caps.
-.TP
-.IB expr .r
-.I expr
-reversed so that the last name is first.
-.TP
-.IB expr .a
-.I expr
-with first names abbreviated.
-Note that fields specified in the
-.B abbreviate
-command are abbreviated before any labels are evaluated.
-Thus
-.B .a
-is useful only when you want a field to be abbreviated in a label
-but not in a reference.
-.TP
-.IB expr .y
-The year part of
-.IR expr .
-.TP
-.IB expr .+y
-The part of
-.I expr
-before the year, or the whole of
-.I expr
-if it does not contain a year.
-.TP
-.IB expr .\-y
-The part of
-.I expr
-after the year, or an empty string if
-.I expr
-does not contain a year.
-.TP
-.IB expr .n
-The last name part of
-.IR expr .
-.TP
-.IB expr1 \(ti expr2
-.I expr1
-except that if the last character of
-.I expr1
-is
-.B \-
-then it will be replaced by
-.IR expr2 .
-.TP
-.I expr1\ expr2
-The concatenation of
-.I expr1
-and
-.IR expr2 .
-.TP
-.IB expr1 | expr2
-If
-.I expr1
-is non-empty then
-.I expr1
-otherwise
-.IR expr2 .
-.TP
-.IB expr1 & expr2
-If
-.I expr1
-is non-empty
-then
-.I expr2
-otherwise an empty string.
-.TP
-.IB expr1 ? expr2 : expr3
-If
-.I expr1
-is non-empty
-then
-.I expr2
-otherwise
-.IR expr3 .
-.TP
-.BI < expr >
-The label is in two parts, which are separated by
-.IR expr .
-Two adjacent two-part labels which have the same first part will be
-merged by appending the second part of the second label onto the first
-label separated by the string specified in the
-.B separate-label-second-parts
-command (initially, a comma followed by a space); the resulting label
-will also be a two-part label with the same first part as before
-merging, and so additional labels can be merged into it.
-Note that it is permissible for the first part to be empty;
-this maybe desirable for expressions used in the
-.B short-label
-command.
-.TP
-.BI ( expr )
-The same as
-.IR expr .
-Used for grouping.
-.LP
-The above expressions are listed in order of precedence
-(highest first);
-.B &
-and
-.B |
-have the same precedence.
-.SS Macro interface
-Each reference starts with a call to the macro
-.BR ]- .
-The string
-.B [F
-will be defined to be the label for this reference,
-unless the
-.B no-label-in-reference
-command has been given.
-There then follows a series of string definitions,
-one for each field:
-string
-.BI [ X
-corresponds to field
-.IR X .
-The number register
-.B [P
-is set to 1 if the
-.B P
-field contains a range of pages.
-The
-.BR [T ,
-.B [A
-and
-.B [O
-number registers are set to 1 according as the
-.BR T ,
-.B A
-and
-.B O
-fields end with one of the characters
-.BR .?! .
-The
-.B [E
-number register will be set to 1 if the
-.B [E
-string contains more than one name.
-The reference is followed by a call to the
-.B ][
-macro.
-The first argument to this macro gives a number representing
-the type of the reference.
-If a reference contains a
-.B J
-field, it will be classified as type 1,
-otherwise if it contains a
-.B B
-field, it will type 3,
-otherwise if it contains a
-.B G
-or
-.B R
-field it will be type 4,
-otherwise if contains a
-.B I
-field it will be type 2,
-otherwise it will be type 0.
-The second argument is a symbolic name for the type:
-.BR other ,
-.BR journal-article ,
-.BR book ,
-.B article-in-book
-or
-.BR tech-report .
-Groups of references that have been accumulated
-or are produced by the
-.B bibliography
-command are preceded by a call to the
-.B ]<
-macro and followed by a call to the
-.B ]>
-macro.
-.SH FILES
-.Tp \w'\fB@DEFAULT_INDEX@'u+2n
-.B @DEFAULT_INDEX@
-Default database.
-.TP
-.IB file @INDEX_SUFFIX@
-Index files.
-.SH "SEE ALSO"
-.BR @g@indxbib (@MAN1EXT@),
-.BR @g@lookbib (@MAN1EXT@),
-.BR lkbib (@MAN1EXT@)
-.br
-.SH BUGS
-In label expressions,
-.B <>
-expressions are ignored inside
-.BI . char
-expressions.
diff --git a/contrib/groff/src/preproc/refer/token.cc b/contrib/groff/src/preproc/refer/token.cc
deleted file mode 100644
index 1cf6890f24d4..000000000000
--- a/contrib/groff/src/preproc/refer/token.cc
+++ /dev/null
@@ -1,378 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "refer.h"
-#include "token.h"
-
-#define TOKEN_TABLE_SIZE 1009
-// I believe in Icelandic thorn sorts after z.
-#define THORN_SORT_KEY "{"
-
-struct token_table_entry {
- const char *tok;
- token_info ti;
- token_table_entry();
-};
-
-token_table_entry token_table[TOKEN_TABLE_SIZE];
-int ntokens = 0;
-
-static void skip_name(const char **ptr, const char *end)
-{
- if (*ptr < end) {
- switch (*(*ptr)++) {
- case '(':
- if (*ptr < end) {
- *ptr += 1;
- if (*ptr < end)
- *ptr += 1;
- }
- break;
- case '[':
- while (*ptr < end)
- if (*(*ptr)++ == ']')
- break;
- break;
- }
- }
-}
-
-int get_token(const char **ptr, const char *end)
-{
- if (*ptr >= end)
- return 0;
- char c = *(*ptr)++;
- if (c == '\\' && *ptr < end) {
- switch (**ptr) {
- default:
- *ptr += 1;
- break;
- case '(':
- case '[':
- skip_name(ptr, end);
- break;
- case '*':
- case 'f':
- *ptr += 1;
- skip_name(ptr, end);
- break;
- }
- }
- return 1;
-}
-
-token_info::token_info()
-: type(TOKEN_OTHER), sort_key(0), other_case(0)
-{
-}
-
-void token_info::set(token_type t, const char *sk, const char *oc)
-{
- assert(oc == 0 || t == TOKEN_UPPER || t == TOKEN_LOWER);
- type = t;
- sort_key = sk;
- other_case = oc;
-}
-
-void token_info::sortify(const char *start, const char *end, string &result)
- const
-{
- if (sort_key)
- result += sort_key;
- else if (type == TOKEN_UPPER || type == TOKEN_LOWER) {
- for (; start < end; start++)
- if (csalpha(*start))
- result += cmlower(*start);
- }
-}
-
-int token_info::sortify_non_empty(const char *start, const char *end) const
-{
- if (sort_key)
- return *sort_key != '\0';
- if (type != TOKEN_UPPER && type != TOKEN_LOWER)
- return 0;
- for (; start < end; start++)
- if (csalpha(*start))
- return 1;
- return 0;
-}
-
-
-void token_info::lower_case(const char *start, const char *end,
- string &result) const
-{
- if (type != TOKEN_UPPER) {
- while (start < end)
- result += *start++;
- }
- else if (other_case)
- result += other_case;
- else {
- while (start < end)
- result += cmlower(*start++);
- }
-}
-
-void token_info::upper_case(const char *start, const char *end,
- string &result) const
-{
- if (type != TOKEN_LOWER) {
- while (start < end)
- result += *start++;
- }
- else if (other_case)
- result += other_case;
- else {
- while (start < end)
- result += cmupper(*start++);
- }
-}
-
-token_table_entry::token_table_entry()
-: tok(0)
-{
-}
-
-static void store_token(const char *tok, token_type typ,
- const char *sk = 0, const char *oc = 0)
-{
- unsigned n = hash_string(tok, strlen(tok)) % TOKEN_TABLE_SIZE;
- for (;;) {
- if (token_table[n].tok == 0) {
- if (++ntokens == TOKEN_TABLE_SIZE)
- assert(0);
- token_table[n].tok = tok;
- break;
- }
- if (strcmp(tok, token_table[n].tok) == 0)
- break;
- if (n == 0)
- n = TOKEN_TABLE_SIZE - 1;
- else
- --n;
- }
- token_table[n].ti.set(typ, sk, oc);
-}
-
-
-token_info default_token_info;
-
-const token_info *lookup_token(const char *start, const char *end)
-{
- unsigned n = hash_string(start, end - start) % TOKEN_TABLE_SIZE;
- for (;;) {
- if (token_table[n].tok == 0)
- break;
- if (strlen(token_table[n].tok) == end - start
- && memcmp(token_table[n].tok, start, end - start) == 0)
- return &(token_table[n].ti);
- if (n == 0)
- n = TOKEN_TABLE_SIZE - 1;
- else
- --n;
- }
- return &default_token_info;
-}
-
-static void init_ascii()
-{
- const char *p;
- for (p = "abcdefghijklmnopqrstuvwxyz"; *p; p++) {
- char buf[2];
- buf[0] = *p;
- buf[1] = '\0';
- store_token(strsave(buf), TOKEN_LOWER);
- buf[0] = cmupper(buf[0]);
- store_token(strsave(buf), TOKEN_UPPER);
- }
- for (p = "0123456789"; *p; p++) {
- char buf[2];
- buf[0] = *p;
- buf[1] = '\0';
- const char *s = strsave(buf);
- store_token(s, TOKEN_OTHER, s);
- }
- for (p = ".,:;?!"; *p; p++) {
- char buf[2];
- buf[0] = *p;
- buf[1] = '\0';
- store_token(strsave(buf), TOKEN_PUNCT);
- }
- store_token("-", TOKEN_HYPHEN);
-}
-
-static void store_letter(const char *lower, const char *upper,
- const char *sort_key = 0)
-{
- store_token(lower, TOKEN_LOWER, sort_key, upper);
- store_token(upper, TOKEN_UPPER, sort_key, lower);
-}
-
-static void init_letter(unsigned char uc_code, unsigned char lc_code,
- const char *sort_key)
-{
- char lbuf[2];
- lbuf[0] = lc_code;
- lbuf[1] = 0;
- char ubuf[2];
- ubuf[0] = uc_code;
- ubuf[1] = 0;
- store_letter(strsave(lbuf), strsave(ubuf), sort_key);
-}
-
-static void init_latin1()
-{
- init_letter(0xc0, 0xe0, "a");
- init_letter(0xc1, 0xe1, "a");
- init_letter(0xc2, 0xe2, "a");
- init_letter(0xc3, 0xe3, "a");
- init_letter(0xc4, 0xe4, "a");
- init_letter(0xc5, 0xe5, "a");
- init_letter(0xc6, 0xe6, "ae");
- init_letter(0xc7, 0xe7, "c");
- init_letter(0xc8, 0xe8, "e");
- init_letter(0xc9, 0xe9, "e");
- init_letter(0xca, 0xea, "e");
- init_letter(0xcb, 0xeb, "e");
- init_letter(0xcc, 0xec, "i");
- init_letter(0xcd, 0xed, "i");
- init_letter(0xce, 0xee, "i");
- init_letter(0xcf, 0xef, "i");
-
- init_letter(0xd0, 0xf0, "d");
- init_letter(0xd1, 0xf1, "n");
- init_letter(0xd2, 0xf2, "o");
- init_letter(0xd3, 0xf3, "o");
- init_letter(0xd4, 0xf4, "o");
- init_letter(0xd5, 0xf5, "o");
- init_letter(0xd6, 0xf6, "o");
- init_letter(0xd8, 0xf8, "o");
- init_letter(0xd9, 0xf9, "u");
- init_letter(0xda, 0xfa, "u");
- init_letter(0xdb, 0xfb, "u");
- init_letter(0xdc, 0xfc, "u");
- init_letter(0xdd, 0xfd, "y");
- init_letter(0xde, 0xfe, THORN_SORT_KEY);
-
- store_token("\337", TOKEN_LOWER, "ss", "SS");
- store_token("\377", TOKEN_LOWER, "y", "Y");
-}
-
-static void init_two_char_letter(char l1, char l2, char u1, char u2,
- const char *sk = 0)
-{
- char buf[6];
- buf[0] = '\\';
- buf[1] = '(';
- buf[2] = l1;
- buf[3] = l2;
- buf[4] = '\0';
- const char *p = strsave(buf);
- buf[2] = u1;
- buf[3] = u2;
- store_letter(p, strsave(buf), sk);
- buf[1] = '[';
- buf[4] = ']';
- buf[5] = '\0';
- p = strsave(buf);
- buf[2] = l1;
- buf[3] = l2;
- store_letter(strsave(buf), p, sk);
-
-}
-
-static void init_special_chars()
-{
- const char *p;
- for (p = "':^`~"; *p; p++)
- for (const char *q = "aeiouy"; *q; q++) {
- // Use a variable to work around bug in gcc 2.0
- char c = cmupper(*q);
- init_two_char_letter(*p, *q, *p, c);
- }
- for (p = "/l/o~n,coeaeij"; *p; p += 2) {
- // Use variables to work around bug in gcc 2.0
- char c0 = cmupper(p[0]);
- char c1 = cmupper(p[1]);
- init_two_char_letter(p[0], p[1], c0, c1);
- }
- init_two_char_letter('v', 's', 'v', 'S', "s");
- init_two_char_letter('v', 'z', 'v', 'Z', "z");
- init_two_char_letter('o', 'a', 'o', 'A', "a");
- init_two_char_letter('T', 'p', 'T', 'P', THORN_SORT_KEY);
- init_two_char_letter('-', 'd', '-', 'D');
-
- store_token("\\(ss", TOKEN_LOWER, 0, "SS");
- store_token("\\[ss]", TOKEN_LOWER, 0, "SS");
-
- store_token("\\(Sd", TOKEN_LOWER, "d", "\\(-D");
- store_token("\\[Sd]", TOKEN_LOWER, "d", "\\[-D]");
- store_token("\\(hy", TOKEN_HYPHEN);
- store_token("\\[hy]", TOKEN_HYPHEN);
- store_token("\\(en", TOKEN_RANGE_SEP);
- store_token("\\[en]", TOKEN_RANGE_SEP);
-}
-
-static void init_strings()
-{
- char buf[6];
- buf[0] = '\\';
- buf[1] = '*';
- for (const char *p = "'`^^,:~v_o./;"; *p; p++) {
- buf[2] = *p;
- buf[3] = '\0';
- store_token(strsave(buf), TOKEN_ACCENT);
- buf[2] = '[';
- buf[3] = *p;
- buf[4] = ']';
- buf[5] = '\0';
- store_token(strsave(buf), TOKEN_ACCENT);
- }
-
- // -ms special letters
- store_letter("\\*(th", "\\*(Th", THORN_SORT_KEY);
- store_letter("\\*[th]", "\\*[Th]", THORN_SORT_KEY);
- store_letter("\\*(d-", "\\*(D-");
- store_letter("\\*[d-]", "\\*[D-]");
- store_letter("\\*(ae", "\\*(Ae", "ae");
- store_letter("\\*[ae]", "\\*[Ae]", "ae");
- store_letter("\\*(oe", "\\*(Oe", "oe");
- store_letter("\\*[oe]", "\\*[Oe]", "oe");
-
- store_token("\\*3", TOKEN_LOWER, "y", "Y");
- store_token("\\*8", TOKEN_LOWER, "ss", "SS");
- store_token("\\*q", TOKEN_LOWER, "o", "O");
-}
-
-struct token_initer {
- token_initer();
-};
-
-static token_initer the_token_initer;
-
-token_initer::token_initer()
-{
- init_ascii();
- init_latin1();
- init_special_chars();
- init_strings();
- default_token_info.set(TOKEN_OTHER);
-}
diff --git a/contrib/groff/src/preproc/refer/token.h b/contrib/groff/src/preproc/refer/token.h
deleted file mode 100644
index 6da430d6abad..000000000000
--- a/contrib/groff/src/preproc/refer/token.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-enum token_type {
- TOKEN_OTHER,
- TOKEN_UPPER,
- TOKEN_LOWER,
- TOKEN_ACCENT,
- TOKEN_PUNCT,
- TOKEN_HYPHEN,
- TOKEN_RANGE_SEP
-};
-
-class token_info {
-private:
- token_type type;
- const char *sort_key;
- const char *other_case;
-public:
- token_info();
- void set(token_type, const char *sk = 0, const char *oc = 0);
- void lower_case(const char *start, const char *end, string &result) const;
- void upper_case(const char *start, const char *end, string &result) const;
- void sortify(const char *start, const char *end, string &result) const;
- int sortify_non_empty(const char *start, const char *end) const;
- int is_upper() const;
- int is_lower() const;
- int is_accent() const;
- int is_other() const;
- int is_punct() const;
- int is_hyphen() const;
- int is_range_sep() const;
-};
-
-inline int token_info::is_upper() const
-{
- return type == TOKEN_UPPER;
-}
-
-inline int token_info::is_lower() const
-{
- return type == TOKEN_LOWER;
-}
-
-inline int token_info::is_accent() const
-{
- return type == TOKEN_ACCENT;
-}
-
-inline int token_info::is_other() const
-{
- return type == TOKEN_OTHER;
-}
-
-inline int token_info::is_punct() const
-{
- return type == TOKEN_PUNCT;
-}
-
-inline int token_info::is_hyphen() const
-{
- return type == TOKEN_HYPHEN;
-}
-
-inline int token_info::is_range_sep() const
-{
- return type == TOKEN_RANGE_SEP;
-}
-
-int get_token(const char **ptr, const char *end);
-const token_info *lookup_token(const char *start, const char *end);
diff --git a/contrib/groff/src/preproc/soelim/Makefile.sub b/contrib/groff/src/preproc/soelim/Makefile.sub
deleted file mode 100644
index 77007e25f452..000000000000
--- a/contrib/groff/src/preproc/soelim/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=soelim
-MAN1=soelim.n
-XLIBS=$(LIBGROFF)
-OBJS=soelim.o
-CCSRCS=$(srcdir)/soelim.cc
-NAMEPREFIX=$(g)
diff --git a/contrib/groff/src/preproc/soelim/TODO b/contrib/groff/src/preproc/soelim/TODO
deleted file mode 100644
index f2a3924ef89f..000000000000
--- a/contrib/groff/src/preproc/soelim/TODO
+++ /dev/null
@@ -1 +0,0 @@
-Understand .pso.
diff --git a/contrib/groff/src/preproc/soelim/soelim.cc b/contrib/groff/src/preproc/soelim/soelim.cc
deleted file mode 100644
index e05f24065ad4..000000000000
--- a/contrib/groff/src/preproc/soelim/soelim.cc
+++ /dev/null
@@ -1,347 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "stringclass.h"
-#include "nonposix.h"
-
-static int include_list_length;
-static char **include_list;
-
-int compatible_flag = 0;
-
-extern int interpret_lf_args(const char *);
-
-int do_file(const char *filename);
-
-
-static void
-include_path_append(char *path)
-{
- ++include_list_length;
- size_t nbytes = include_list_length * sizeof(char *);
- if (include_list)
- include_list = (char **)realloc((void *)include_list, nbytes);
- else
- include_list = (char **)malloc(nbytes);
- if (include_list == NULL)
- {
- fprintf(stderr, "%s: out of memory\n", program_name);
- exit(2);
- }
- include_list[include_list_length - 1] = path;
-}
-
-
-void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [ -vC ] [ -I file ] [ files ]\n", program_name);
-}
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- include_path_append(".");
- int opt;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv, "CI:v", long_options, NULL)) != EOF)
- switch (opt) {
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU soelim (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'C':
- compatible_flag = 1;
- break;
- case 'I':
- include_path_append(optarg);
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
- int nbad = 0;
- if (optind >= argc)
- nbad += !do_file("-");
- else
- for (int i = optind; i < argc; i++)
- nbad += !do_file(argv[i]);
- if (ferror(stdout) || fflush(stdout) < 0)
- fatal("output error");
- return nbad != 0;
-}
-
-void set_location()
-{
- printf(".lf %d %s\n", current_lineno, current_filename);
-}
-
-void do_so(const char *line)
-{
- const char *p = line;
- while (*p == ' ')
- p++;
- string filename;
- int success = 1;
- for (const char *q = p;
- success && *q != '\0' && *q != '\n' && *q != ' ';
- q++)
- if (*q == '\\') {
- switch (*++q) {
- case 'e':
- case '\\':
- filename += '\\';
- break;
- case ' ':
- filename += ' ';
- break;
- default:
- success = 0;
- break;
- }
- }
- else
- filename += char(*q);
- if (success && filename.length() > 0) {
- filename += '\0';
- const char *fn = current_filename;
- int ln = current_lineno;
- current_lineno--;
- if (do_file(filename.contents())) {
- current_filename = fn;
- current_lineno = ln;
- set_location();
- return;
- }
- current_lineno++;
- }
- fputs(".so", stdout);
- fputs(line, stdout);
-}
-
-int do_file(const char *filename)
-{
- FILE *fp;
- string whole_filename;
- if (strcmp(filename, "-") == 0) {
- fp = stdin;
- whole_filename = filename;
- whole_filename += '\0';
- }
- else if (IS_ABSOLUTE(filename)) {
- whole_filename = filename;
- whole_filename += '\0';
- errno = 0;
- fp = fopen(filename, "r");
- if (fp == 0) {
- error("can't open `%1': %2", filename, strerror(errno));
- return 0;
- }
- }
- else {
- size_t j;
- for (j = 0; j < include_list_length; ++j)
- {
- char *path = include_list[j];
- if (0 == strcmp(path, "."))
- whole_filename = filename;
- else
- whole_filename = string(path) + "/" + filename;
- whole_filename += '\0';
- errno = 0;
- fp = fopen(whole_filename.contents(), "r");
- if (fp != 0)
- break;
- if (errno != ENOENT) {
- error("can't open `%1': %2",
- whole_filename.contents(), strerror(errno));
- return 0;
- }
- }
- if (j >= include_list_length)
- {
- errno = ENOENT;
- error("can't open `%1': %2", filename, strerror(errno));
- return 0;
- }
- }
- current_filename = whole_filename.contents();
- current_lineno = 1;
- set_location();
- enum { START, MIDDLE, HAD_DOT, HAD_s, HAD_so, HAD_l, HAD_lf } state = START;
- for (;;) {
- int c = getc(fp);
- if (c == EOF)
- break;
- switch (state) {
- case START:
- if (c == '.')
- state = HAD_DOT;
- else {
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case MIDDLE:
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- break;
- case HAD_DOT:
- if (c == 's')
- state = HAD_s;
- else if (c == 'l')
- state = HAD_l;
- else {
- putchar('.');
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case HAD_s:
- if (c == 'o')
- state = HAD_so;
- else {
- putchar('.');
- putchar('s');
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case HAD_so:
- if (c == ' ' || c == '\n' || compatible_flag) {
- string line;
- for (; c != EOF && c != '\n'; c = getc(fp))
- line += c;
- current_lineno++;
- line += '\n';
- line += '\0';
- do_so(line.contents());
- state = START;
- }
- else {
- fputs(".so", stdout);
- putchar(c);
- state = MIDDLE;
- }
- break;
- case HAD_l:
- if (c == 'f')
- state = HAD_lf;
- else {
- putchar('.');
- putchar('l');
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case HAD_lf:
- if (c == ' ' || c == '\n' || compatible_flag) {
- string line;
- for (; c != EOF && c != '\n'; c = getc(fp))
- line += c;
- current_lineno++;
- line += '\n';
- line += '\0';
- interpret_lf_args(line.contents());
- printf(".lf%s", line.contents());
- state = START;
- }
- else {
- fputs(".lf", stdout);
- putchar(c);
- state = MIDDLE;
- }
- break;
- default:
- assert(0);
- }
- }
- switch (state) {
- case HAD_DOT:
- fputs(".\n", stdout);
- break;
- case HAD_l:
- fputs(".l\n", stdout);
- break;
- case HAD_s:
- fputs(".s\n", stdout);
- break;
- case HAD_lf:
- fputs(".lf\n", stdout);
- break;
- case HAD_so:
- fputs(".so\n", stdout);
- break;
- case MIDDLE:
- putc('\n', stdout);
- break;
- case START:
- break;
- }
- if (fp != stdin)
- fclose(fp);
- current_filename = 0;
- return 1;
-}
diff --git a/contrib/groff/src/preproc/soelim/soelim.man b/contrib/groff/src/preproc/soelim/soelim.man
deleted file mode 100644
index b97ea61262e2..000000000000
--- a/contrib/groff/src/preproc/soelim/soelim.man
+++ /dev/null
@@ -1,85 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.TH @G@SOELIM @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-@g@soelim \- interpret .so requests in groff input
-.SH SYNOPSIS
-.B @g@soelim
-[
-.B \-Cv
-]
-[
-.BI \-I dir
-]
-[
-.IR files \|.\|.\|.\|
-]
-.PP
-It is possible to have whitespace between the
-.B \-I
-command line option and its parameter.
-.SH DESCRIPTION
-.B @g@soelim
-reads
-.I files
-and replaces lines of the form
-.IP
-.BI .so\ file
-.LP
-by the contents of
-.IR file .
-It is useful if files included with
-.B so
-need to be preprocessed.
-Normally,
-.B @g@soelim
-should be invoked with the
-.B \-s
-option of
-.BR groff .
-.PP
-Note that there must be no whitespace between the leading dot and
-the two characters `s' and `o'. Otherwise, only
-.B groff
-interprets the
-.B .so
-request (and
-.B soelim
-ignores it).
-.SH OPTIONS
-.TP
-.B \-C
-Recognize
-.B .so
-even when followed by a character other than space or newline.
-.TP
-.BI \-I dir
-This option may be used to specify a directory to search for
-files (both those on the command line and those named in
-.B \&.so
-lines).
-The current directory is always searched first.
-This option may be specified more than once,
-the directories will be searched in the order specified.
-No directory search is performed for files specified using an absolute path.
-.TP
-.B \-v
-Print the version number.
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@)
diff --git a/contrib/groff/src/preproc/tbl/Makefile.sub b/contrib/groff/src/preproc/tbl/Makefile.sub
deleted file mode 100644
index 224baffcf329..000000000000
--- a/contrib/groff/src/preproc/tbl/Makefile.sub
+++ /dev/null
@@ -1,12 +0,0 @@
-PROG=tbl
-MAN1=tbl.n
-XLIBS=$(LIBGROFF)
-OBJS=\
- main.o \
- table.o
-CCSRCS=\
- $(srcdir)/main.cc \
- $(srcdir)/table.cc
-HDRS=\
- $(srcdir)/table.h
-NAMEPREFIX=$(g)
diff --git a/contrib/groff/src/preproc/tbl/main.cc b/contrib/groff/src/preproc/tbl/main.cc
deleted file mode 100644
index a08ea0be2570..000000000000
--- a/contrib/groff/src/preproc/tbl/main.cc
+++ /dev/null
@@ -1,1528 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "table.h"
-#include "htmlindicate.h"
-
-#define MAX_POINT_SIZE 99
-#define MAX_VERTICAL_SPACING 72
-
-static int compatible_flag = 0;
-
-class table_input {
- FILE *fp;
- enum { START, MIDDLE, REREAD_T, REREAD_TE, REREAD_E, END, ERROR } state;
- string unget_stack;
-public:
- table_input(FILE *);
- int get();
- int ended() { return unget_stack.empty() && state == END; }
- void unget(char);
-};
-
-table_input::table_input(FILE *p)
-: fp(p), state(START)
-{
-}
-
-void table_input::unget(char c)
-{
- assert(c != '\0');
- unget_stack += c;
- if (c == '\n')
- current_lineno--;
-}
-
-int table_input::get()
-{
- int len = unget_stack.length();
- if (len != 0) {
- unsigned char c = unget_stack[len - 1];
- unget_stack.set_length(len - 1);
- if (c == '\n')
- current_lineno++;
- return c;
- }
- int c;
- for (;;) {
- switch (state) {
- case START:
- if ((c = getc(fp)) == '.') {
- if ((c = getc(fp)) == 'T') {
- if ((c = getc(fp)) == 'E') {
- if (compatible_flag) {
- state = END;
- return EOF;
- }
- else {
- c = getc(fp);
- if (c != EOF)
- ungetc(c, fp);
- if (c == EOF || c == ' ' || c == '\n') {
- state = END;
- return EOF;
- }
- state = REREAD_TE;
- return '.';
- }
- }
- else {
- if (c != EOF)
- ungetc(c, fp);
- state = REREAD_T;
- return '.';
- }
- }
- else {
- if (c != EOF)
- ungetc(c, fp);
- state = MIDDLE;
- return '.';
- }
- }
- else if (c == EOF) {
- state = ERROR;
- return EOF;
- }
- else {
- if (c == '\n')
- current_lineno++;
- else {
- state = MIDDLE;
- if (c == '\0') {
- error("illegal input character code 0");
- break;
- }
- }
- return c;
- }
- break;
- case MIDDLE:
- // handle line continuation
- if ((c = getc(fp)) == '\\') {
- c = getc(fp);
- if (c == '\n')
- c = getc(fp); // perhaps state ought to be START now
- else {
- if (c != EOF)
- ungetc(c, fp);
- c = '\\';
- }
- }
- if (c == EOF) {
- state = ERROR;
- return EOF;
- }
- else {
- if (c == '\n') {
- state = START;
- current_lineno++;
- }
- else if (c == '\0') {
- error("illegal input character code 0");
- break;
- }
- return c;
- }
- case REREAD_T:
- state = MIDDLE;
- return 'T';
- case REREAD_TE:
- state = REREAD_E;
- return 'T';
- case REREAD_E:
- state = MIDDLE;
- return 'E';
- case END:
- case ERROR:
- return EOF;
- }
- }
-}
-
-void process_input_file(FILE *);
-void process_table(table_input &in);
-
-void process_input_file(FILE *fp)
-{
- enum { START, MIDDLE, HAD_DOT, HAD_T, HAD_TS, HAD_l, HAD_lf } state;
- state = START;
- int c;
- while ((c = getc(fp)) != EOF)
- switch (state) {
- case START:
- if (c == '.')
- state = HAD_DOT;
- else {
- if (c == '\n')
- current_lineno++;
- else
- state = MIDDLE;
- putchar(c);
- }
- break;
- case MIDDLE:
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- putchar(c);
- break;
- case HAD_DOT:
- if (c == 'T')
- state = HAD_T;
- else if (c == 'l')
- state = HAD_l;
- else {
- putchar('.');
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case HAD_T:
- if (c == 'S')
- state = HAD_TS;
- else {
- putchar('.');
- putchar('T');
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case HAD_TS:
- if (c == ' ' || c == '\n' || compatible_flag) {
- printf(".if '\\*(.T'html' \\X(table-start(\n");
- html_begin_suppress(0);
- putchar('.');
- putchar('T');
- putchar('S');
- while (c != '\n') {
- if (c == EOF) {
- error("end of file at beginning of table");
- return;
- }
- putchar(c);
- c = getc(fp);
- }
- putchar('\n');
- current_lineno++;
- {
- table_input input(fp);
- process_table(input);
- set_troff_location(current_filename, current_lineno);
- if (input.ended()) {
- fputs(".TE", stdout);
- while ((c = getc(fp)) != '\n') {
- if (c == EOF) {
- printf(".if '\\*(.T'html' \\X(table-end(\n");
- html_end_suppress(0);
- putchar('\n');
- return;
- }
- putchar(c);
- }
- putchar('\n');
- printf(".if '\\*(.T'html' \\X(table-end(\n");
- html_end_suppress(0);
- current_lineno++;
- }
- }
- state = START;
- }
- else {
- fputs(".TS", stdout);
- putchar(c);
- state = MIDDLE;
- }
- break;
- case HAD_l:
- if (c == 'f')
- state = HAD_lf;
- else {
- putchar('.');
- putchar('l');
- putchar(c);
- if (c == '\n') {
- current_lineno++;
- state = START;
- }
- else
- state = MIDDLE;
- }
- break;
- case HAD_lf:
- if (c == ' ' || c == '\n' || compatible_flag) {
- string line;
- while (c != EOF) {
- line += c;
- if (c == '\n') {
- current_lineno++;
- break;
- }
- c = getc(fp);
- }
- line += '\0';
- interpret_lf_args(line.contents());
- printf(".lf%s", line.contents());
- state = START;
- }
- else {
- fputs(".lf", stdout);
- putchar(c);
- state = MIDDLE;
- }
- break;
- default:
- assert(0);
- }
- switch(state) {
- case START:
- break;
- case MIDDLE:
- putchar('\n');
- break;
- case HAD_DOT:
- fputs(".\n", stdout);
- break;
- case HAD_l:
- fputs(".l\n", stdout);
- break;
- case HAD_T:
- fputs(".T\n", stdout);
- break;
- case HAD_lf:
- fputs(".lf\n", stdout);
- break;
- case HAD_TS:
- fputs(".TS\n", stdout);
- break;
- }
- if (fp != stdin)
- fclose(fp);
-}
-
-struct options {
- unsigned flags;
- int linesize;
- char delim[2];
- char tab_char;
- char decimal_point_char;
-
- options();
-};
-
-options::options()
-: flags(0), linesize(0), tab_char('\t'), decimal_point_char('.')
-{
- delim[0] = delim[1] = '\0';
-}
-
-// Return non-zero if p and q are the same ignoring case.
-
-int strieq(const char *p, const char *q)
-{
- for (; cmlower(*p) == cmlower(*q); p++, q++)
- if (*p == '\0')
- return 1;
- return 0;
-}
-
-// return 0 if we should give up in this table
-
-options *process_options(table_input &in)
-{
- options *opt = new options;
- string line;
- int level = 0;
- for (;;) {
- int c = in.get();
- if (c == EOF) {
- int i = line.length();
- while (--i >= 0)
- in.unget(line[i]);
- return opt;
- }
- if (c == '\n') {
- in.unget(c);
- int i = line.length();
- while (--i >= 0)
- in.unget(line[i]);
- return opt;
- }
- else if (c == '(')
- level++;
- else if (c == ')')
- level--;
- else if (c == ';' && level == 0) {
- line += '\0';
- break;
- }
- line += c;
- }
- if (line.empty())
- return opt;
- char *p = &line[0];
- for (;;) {
- while (!csalpha(*p) && *p != '\0')
- p++;
- if (*p == '\0')
- break;
- char *q = p;
- while (csalpha(*q))
- q++;
- char *arg = 0;
- if (*q != '(' && *q != '\0')
- *q++ = '\0';
- while (csspace(*q))
- q++;
- if (*q == '(') {
- *q++ = '\0';
- arg = q;
- while (*q != ')' && *q != '\0')
- q++;
- if (*q == '\0')
- error("missing `)'");
- else
- *q++ = '\0';
- }
- if (*p == '\0') {
- if (arg)
- error("argument without option");
- }
- else if (strieq(p, "tab")) {
- if (!arg)
- error("`tab' option requires argument in parentheses");
- else {
- if (arg[0] == '\0' || arg[1] != '\0')
- error("argument to `tab' option must be a single character");
- else
- opt->tab_char = arg[0];
- }
- }
- else if (strieq(p, "linesize")) {
- if (!arg)
- error("`linesize' option requires argument in parentheses");
- else {
- if (sscanf(arg, "%d", &opt->linesize) != 1)
- error("bad linesize `%s'", arg);
- else if (opt->linesize <= 0) {
- error("linesize must be positive");
- opt->linesize = 0;
- }
- }
- }
- else if (strieq(p, "delim")) {
- if (!arg)
- error("`delim' option requires argument in parentheses");
- else if (arg[0] == '\0' || arg[1] == '\0' || arg[2] != '\0')
- error("argument to `delim' option must be two characters");
- else {
- opt->delim[0] = arg[0];
- opt->delim[1] = arg[1];
- }
- }
- else if (strieq(p, "center") || strieq(p, "centre")) {
- if (arg)
- error("`center' option does not take a argument");
- opt->flags |= table::CENTER;
- }
- else if (strieq(p, "expand")) {
- if (arg)
- error("`expand' option does not take a argument");
- opt->flags |= table::EXPAND;
- }
- else if (strieq(p, "box") || strieq(p, "frame")) {
- if (arg)
- error("`box' option does not take a argument");
- opt->flags |= table::BOX;
- }
- else if (strieq(p, "doublebox") || strieq(p, "doubleframe")) {
- if (arg)
- error("`doublebox' option does not take a argument");
- opt->flags |= table::DOUBLEBOX;
- }
- else if (strieq(p, "allbox")) {
- if (arg)
- error("`allbox' option does not take a argument");
- opt->flags |= table::ALLBOX;
- }
- else if (strieq(p, "nokeep")) {
- if (arg)
- error("`nokeep' option does not take a argument");
- opt->flags |= table::NOKEEP;
- }
- else if (strieq(p, "decimalpoint")) {
- if (!arg)
- error("`decimalpoint' option requires argument in parentheses");
- else {
- if (arg[0] == '\0' || arg[1] != '\0')
- error("argument to `decimalpoint' option must be a single character");
- else
- opt->decimal_point_char = arg[0];
- }
- }
- else {
- error("unrecognised global option `%1'", p);
- // delete opt;
- // return 0;
- }
- p = q;
- }
- return opt;
-}
-
-entry_modifier::entry_modifier()
-: vertical_alignment(CENTER), zero_width(0), stagger(0)
-{
- vertical_spacing.inc = vertical_spacing.val = 0;
- point_size.inc = point_size.val = 0;
-}
-
-entry_modifier::~entry_modifier()
-{
-}
-
-entry_format::entry_format() : type(FORMAT_LEFT)
-{
-}
-
-entry_format::entry_format(format_type t) : type(t)
-{
-}
-
-void entry_format::debug_print() const
-{
- switch (type) {
- case FORMAT_LEFT:
- putc('l', stderr);
- break;
- case FORMAT_CENTER:
- putc('c', stderr);
- break;
- case FORMAT_RIGHT:
- putc('r', stderr);
- break;
- case FORMAT_NUMERIC:
- putc('n', stderr);
- break;
- case FORMAT_ALPHABETIC:
- putc('a', stderr);
- break;
- case FORMAT_SPAN:
- putc('s', stderr);
- break;
- case FORMAT_VSPAN:
- putc('^', stderr);
- break;
- case FORMAT_HLINE:
- putc('_', stderr);
- break;
- case FORMAT_DOUBLE_HLINE:
- putc('=', stderr);
- break;
- default:
- assert(0);
- break;
- }
- if (point_size.val != 0) {
- putc('p', stderr);
- if (point_size.inc > 0)
- putc('+', stderr);
- else if (point_size.inc < 0)
- putc('-', stderr);
- fprintf(stderr, "%d ", point_size.val);
- }
- if (vertical_spacing.val != 0) {
- putc('v', stderr);
- if (vertical_spacing.inc > 0)
- putc('+', stderr);
- else if (vertical_spacing.inc < 0)
- putc('-', stderr);
- fprintf(stderr, "%d ", vertical_spacing.val);
- }
- if (!font.empty()) {
- putc('f', stderr);
- put_string(font, stderr);
- putc(' ', stderr);
- }
- switch (vertical_alignment) {
- case entry_modifier::CENTER:
- break;
- case entry_modifier::TOP:
- putc('t', stderr);
- break;
- case entry_modifier::BOTTOM:
- putc('d', stderr);
- break;
- }
- if (zero_width)
- putc('z', stderr);
- if (stagger)
- putc('u', stderr);
-}
-
-struct format {
- int nrows;
- int ncolumns;
- int *separation;
- string *width;
- char *equal;
- entry_format **entry;
- char **vline;
-
- format(int nr, int nc);
- ~format();
- void add_rows(int n);
-};
-
-format::format(int nr, int nc) : nrows(nr), ncolumns(nc)
-{
- int i;
- separation = ncolumns > 1 ? new int[ncolumns - 1] : 0;
- for (i = 0; i < ncolumns-1; i++)
- separation[i] = -1;
- width = new string[ncolumns];
- equal = new char[ncolumns];
- for (i = 0; i < ncolumns; i++)
- equal[i] = 0;
- entry = new entry_format *[nrows];
- for (i = 0; i < nrows; i++)
- entry[i] = new entry_format[ncolumns];
- vline = new char*[nrows];
- for (i = 0; i < nrows; i++) {
- vline[i] = new char[ncolumns+1];
- for (int j = 0; j < ncolumns+1; j++)
- vline[i][j] = 0;
- }
-}
-
-void format::add_rows(int n)
-{
- int i;
- char **old_vline = vline;
- vline = new char*[nrows + n];
- for (i = 0; i < nrows; i++)
- vline[i] = old_vline[i];
- a_delete old_vline;
- for (i = 0; i < n; i++) {
- vline[nrows + i] = new char[ncolumns + 1];
- for (int j = 0; j < ncolumns + 1; j++)
- vline[nrows + i][j] = 0;
- }
- entry_format **old_entry = entry;
- entry = new entry_format *[nrows + n];
- for (i = 0; i < nrows; i++)
- entry[i] = old_entry[i];
- a_delete old_entry;
- for (i = 0; i < n; i++)
- entry[nrows + i] = new entry_format[ncolumns];
- nrows += n;
-}
-
-format::~format()
-{
- a_delete separation;
- ad_delete(ncolumns) width;
- a_delete equal;
- for (int i = 0; i < nrows; i++) {
- a_delete vline[i];
- ad_delete(ncolumns) entry[i];
- }
- a_delete vline;
- a_delete entry;
-}
-
-struct input_entry_format : public entry_format {
- input_entry_format *next;
- string width;
- int separation;
- int vline;
- int pre_vline;
- int last_column;
- int equal;
- input_entry_format(format_type, input_entry_format * = 0);
- ~input_entry_format();
- void debug_print();
-};
-
-input_entry_format::input_entry_format(format_type t, input_entry_format *p)
-: entry_format(t), next(p)
-{
- separation = -1;
- last_column = 0;
- vline = 0;
- pre_vline = 0;
- equal = 0;
-}
-
-input_entry_format::~input_entry_format()
-{
-}
-
-void free_input_entry_format_list(input_entry_format *list)
-{
- while (list) {
- input_entry_format *tem = list;
- list = list->next;
- delete tem;
- }
-}
-
-void input_entry_format::debug_print()
-{
- int i;
- for (i = 0; i < pre_vline; i++)
- putc('|', stderr);
- entry_format::debug_print();
- if (!width.empty()) {
- putc('w', stderr);
- putc('(', stderr);
- put_string(width, stderr);
- putc(')', stderr);
- }
- if (equal)
- putc('e', stderr);
- if (separation >= 0)
- fprintf(stderr, "%d", separation);
- for (i = 0; i < vline; i++)
- putc('|', stderr);
- if (last_column)
- putc(',', stderr);
-}
-
-// Return zero if we should give up on this table.
-// If this is a continuation format line, current_format will be the current
-// format line.
-
-format *process_format(table_input &in, options *opt,
- format *current_format = 0)
-{
- input_entry_format *list = 0;
- int c = in.get();
- for (;;) {
- int pre_vline = 0;
- int got_format = 0;
- int got_period = 0;
- format_type t;
- for (;;) {
- if (c == EOF) {
- error("end of input while processing format");
- free_input_entry_format_list(list);
- return 0;
- }
- switch (c) {
- case 'n':
- case 'N':
- t = FORMAT_NUMERIC;
- got_format = 1;
- break;
- case 'a':
- case 'A':
- got_format = 1;
- t = FORMAT_ALPHABETIC;
- break;
- case 'c':
- case 'C':
- got_format = 1;
- t = FORMAT_CENTER;
- break;
- case 'l':
- case 'L':
- got_format = 1;
- t = FORMAT_LEFT;
- break;
- case 'r':
- case 'R':
- got_format = 1;
- t = FORMAT_RIGHT;
- break;
- case 's':
- case 'S':
- got_format = 1;
- t = FORMAT_SPAN;
- break;
- case '^':
- got_format = 1;
- t = FORMAT_VSPAN;
- break;
- case '_':
- case '-': // tbl also accepts this
- got_format = 1;
- t = FORMAT_HLINE;
- break;
- case '=':
- got_format = 1;
- t = FORMAT_DOUBLE_HLINE;
- break;
- case '.':
- got_period = 1;
- break;
- case '|':
- pre_vline++;
- break;
- case ' ':
- case '\t':
- case '\n':
- break;
- default:
- if (c == opt->tab_char)
- break;
- error("unrecognised format `%1'", char(c));
- free_input_entry_format_list(list);
- return 0;
- }
- if (got_period)
- break;
- c = in.get();
- if (got_format)
- break;
- }
- if (got_period)
- break;
- list = new input_entry_format(t, list);
- if (pre_vline)
- list->pre_vline = pre_vline;
- int success = 1;
- do {
- switch (c) {
- case 't':
- case 'T':
- c = in.get();
- list->vertical_alignment = entry_modifier::TOP;
- break;
- case 'd':
- case 'D':
- c = in.get();
- list->vertical_alignment = entry_modifier::BOTTOM;
- break;
- case 'u':
- case 'U':
- c = in.get();
- list->stagger = 1;
- break;
- case 'z':
- case 'Z':
- c = in.get();
- list->zero_width = 1;
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- int w = 0;
- do {
- w = w*10 + (c - '0');
- c = in.get();
- } while (c != EOF && csdigit(c));
- list->separation = w;
- }
- break;
- case 'f':
- case 'F':
- do {
- c = in.get();
- } while (c == ' ' || c == '\t');
- if (c == EOF) {
- error("missing font name");
- break;
- }
- if (c == '(') {
- for (;;) {
- c = in.get();
- if (c == EOF || c == ' ' || c == '\t') {
- error("missing `)'");
- break;
- }
- if (c == ')') {
- c = in.get();
- break;
- }
- list->font += char(c);
- }
- }
- else {
- list->font = c;
- char cc = c;
- c = in.get();
- if (!csdigit(cc)
- && c != EOF && c != ' ' && c != '\t' && c != '.' && c != '\n') {
- list->font += char(c);
- c = in.get();
- }
- }
- break;
- case 'v':
- case 'V':
- c = in.get();
- list->vertical_spacing.val = 0;
- list->vertical_spacing.inc = 0;
- if (c == '+' || c == '-') {
- list->vertical_spacing.inc = (c == '+' ? 1 : -1);
- c = in.get();
- }
- if (c == EOF || !csdigit(c)) {
- error("`v' modifier must be followed by number");
- list->vertical_spacing.inc = 0;
- }
- else {
- do {
- list->vertical_spacing.val *= 10;
- list->vertical_spacing.val += c - '0';
- c = in.get();
- } while (c != EOF && csdigit(c));
- }
- if (list->vertical_spacing.val > MAX_VERTICAL_SPACING
- || list->vertical_spacing.val < -MAX_VERTICAL_SPACING) {
- error("unreasonable point size");
- list->vertical_spacing.val = 0;
- list->vertical_spacing.inc = 0;
- }
- break;
- case 'p':
- case 'P':
- c = in.get();
- list->point_size.val = 0;
- list->point_size.inc = 0;
- if (c == '+' || c == '-') {
- list->point_size.inc = (c == '+' ? 1 : -1);
- c = in.get();
- }
- if (c == EOF || !csdigit(c)) {
- error("`p' modifier must be followed by number");
- list->point_size.inc = 0;
- }
- else {
- do {
- list->point_size.val *= 10;
- list->point_size.val += c - '0';
- c = in.get();
- } while (c != EOF && csdigit(c));
- }
- if (list->point_size.val > MAX_POINT_SIZE
- || list->point_size.val < -MAX_POINT_SIZE) {
- error("unreasonable point size");
- list->point_size.val = 0;
- list->point_size.inc = 0;
- }
- break;
- case 'w':
- case 'W':
- c = in.get();
- while (c == ' ' || c == '\t')
- c = in.get();
- if (c == '(') {
- list->width = "";
- c = in.get();
- while (c != ')') {
- if (c == EOF || c == '\n') {
- error("missing `)'");
- free_input_entry_format_list(list);
- return 0;
- }
- list->width += c;
- c = in.get();
- }
- c = in.get();
- }
- else {
- if (c == '+' || c == '-') {
- list->width = char(c);
- c = in.get();
- }
- else
- list->width = "";
- if (c == EOF || !csdigit(c))
- error("bad argument for `w' modifier");
- else {
- do {
- list->width += char(c);
- c = in.get();
- } while (c != EOF && csdigit(c));
- }
- }
- break;
- case 'e':
- case 'E':
- c = in.get();
- list->equal++;
- break;
- case '|':
- c = in.get();
- list->vline++;
- break;
- case 'B':
- case 'b':
- c = in.get();
- list->font = "B";
- break;
- case 'I':
- case 'i':
- c = in.get();
- list->font = "I";
- break;
- case ' ':
- case '\t':
- c = in.get();
- break;
- default:
- if (c == opt->tab_char)
- c = in.get();
- else
- success = 0;
- break;
- }
- } while (success);
- if (list->vline > 2) {
- list->vline = 2;
- error("more than 2 vertical bars between key letters");
- }
- if (c == '\n' || c == ',') {
- c = in.get();
- list->last_column = 1;
- }
- }
- if (c == '.') {
- do {
- c = in.get();
- } while (c == ' ' || c == '\t');
- if (c != '\n') {
- error("`.' not last character on line");
- free_input_entry_format_list(list);
- return 0;
- }
- }
- if (!list) {
- error("no format");
- free_input_entry_format_list(list);
- return 0;
- }
- list->last_column = 1;
- // now reverse the list so that the first row is at the beginning
- input_entry_format *rev = 0;
- while (list != 0) {
- input_entry_format *tem = list->next;
- list->next = rev;
- rev = list;
- list = tem;
- }
- list = rev;
- input_entry_format *tem;
-
-#if 0
- for (tem = list; tem; tem = tem->next)
- tem->debug_print();
- putc('\n', stderr);
-#endif
- // compute number of columns and rows
- int ncolumns = 0;
- int nrows = 0;
- int col = 0;
- for (tem = list; tem; tem = tem->next) {
- if (tem->last_column) {
- if (col >= ncolumns)
- ncolumns = col + 1;
- col = 0;
- nrows++;
- }
- else
- col++;
- }
- int row;
- format *f;
- if (current_format) {
- if (ncolumns > current_format->ncolumns) {
- error("cannot increase the number of columns in a continued format");
- free_input_entry_format_list(list);
- return 0;
- }
- f = current_format;
- row = f->nrows;
- f->add_rows(nrows);
- }
- else {
- f = new format(nrows, ncolumns);
- row = 0;
- }
- col = 0;
- for (tem = list; tem; tem = tem->next) {
- f->entry[row][col] = *tem;
- if (col < ncolumns-1) {
- // use the greatest separation
- if (tem->separation > f->separation[col]) {
- if (current_format)
- error("cannot change column separation in continued format");
- else
- f->separation[col] = tem->separation;
- }
- }
- else if (tem->separation >= 0)
- error("column separation specified for last column");
- if (tem->equal && !f->equal[col]) {
- if (current_format)
- error("cannot change which columns are equal in continued format");
- else
- f->equal[col] = 1;
- }
- if (!tem->width.empty()) {
- // use the last width
- if (!f->width[col].empty() && f->width[col] != tem->width)
- error("multiple widths for column %1", col+1);
- f->width[col] = tem->width;
- }
- if (tem->pre_vline) {
- assert(col == 0);
- f->vline[row][col] = tem->pre_vline;
- }
- f->vline[row][col+1] = tem->vline;
- if (tem->last_column) {
- row++;
- col = 0;
- }
- else
- col++;
- }
- free_input_entry_format_list(list);
- for (col = 0; col < ncolumns; col++) {
- entry_format *e = f->entry[f->nrows-1] + col;
- if (e->type != FORMAT_HLINE
- && e->type != FORMAT_DOUBLE_HLINE
- && e->type != FORMAT_SPAN)
- break;
- }
- if (col >= ncolumns) {
- error("last row of format is all lines");
- delete f;
- return 0;
- }
- return f;
-}
-
-table *process_data(table_input &in, format *f, options *opt)
-{
- char tab_char = opt->tab_char;
- int ncolumns = f->ncolumns;
- int current_row = 0;
- int format_index = 0;
- int give_up = 0;
- enum { DATA_INPUT_LINE, TROFF_INPUT_LINE, SINGLE_HLINE, DOUBLE_HLINE } type;
- table *tbl = new table(ncolumns, opt->flags, opt->linesize,
- opt->decimal_point_char);
- if (opt->delim[0] != '\0')
- tbl->set_delim(opt->delim[0], opt->delim[1]);
- for (;;) {
- // first determine what type of line this is
- int c = in.get();
- if (c == EOF)
- break;
- if (c == '.') {
- int d = in.get();
- if (d != EOF && csdigit(d)) {
- in.unget(d);
- type = DATA_INPUT_LINE;
- }
- else {
- in.unget(d);
- type = TROFF_INPUT_LINE;
- }
- }
- else if (c == '_' || c == '=') {
- int d = in.get();
- if (d == '\n') {
- if (c == '_')
- type = SINGLE_HLINE;
- else
- type = DOUBLE_HLINE;
- }
- else {
- in.unget(d);
- type = DATA_INPUT_LINE;
- }
- }
- else {
- type = DATA_INPUT_LINE;
- }
- switch (type) {
- case DATA_INPUT_LINE:
- {
- string input_entry;
- if (format_index >= f->nrows)
- format_index = f->nrows - 1;
- // A format row that is all lines doesn't use up a data line.
- while (format_index < f->nrows - 1) {
- int c;
- for (c = 0; c < ncolumns; c++) {
- entry_format *e = f->entry[format_index] + c;
- if (e->type != FORMAT_HLINE
- && e->type != FORMAT_DOUBLE_HLINE
- // Unfortunately tbl treats a span as needing data.
- // && e->type != FORMAT_SPAN
- )
- break;
- }
- if (c < ncolumns)
- break;
- for (c = 0; c < ncolumns; c++)
- tbl->add_entry(current_row, c, input_entry,
- f->entry[format_index] + c, current_filename,
- current_lineno);
- tbl->add_vlines(current_row, f->vline[format_index]);
- format_index++;
- current_row++;
- }
- entry_format *line_format = f->entry[format_index];
- int col = 0;
- int row_comment = 0;
- for (;;) {
- if (c == tab_char || c == '\n') {
- int ln = current_lineno;
- if (c == '\n')
- --ln;
- while (col < ncolumns
- && line_format[col].type == FORMAT_SPAN) {
- tbl->add_entry(current_row, col, "", &line_format[col],
- current_filename, ln);
- col++;
- }
- if (c == '\n' && input_entry.length() == 2
- && input_entry[0] == 'T' && input_entry[1] == '{') {
- input_entry = "";
- ln++;
- enum {
- START, MIDDLE, GOT_T, GOT_RIGHT_BRACE, GOT_DOT,
- GOT_l, GOT_lf, END
- } state = START;
- while (state != END) {
- c = in.get();
- if (c == EOF)
- break;
- switch (state) {
- case START:
- if (c == 'T')
- state = GOT_T;
- else if (c == '.')
- state = GOT_DOT;
- else {
- input_entry += c;
- if (c != '\n')
- state = MIDDLE;
- }
- break;
- case GOT_T:
- if (c == '}')
- state = GOT_RIGHT_BRACE;
- else {
- input_entry += 'T';
- input_entry += c;
- state = c == '\n' ? START : MIDDLE;
- }
- break;
- case GOT_DOT:
- if (c == 'l')
- state = GOT_l;
- else {
- input_entry += '.';
- input_entry += c;
- state = c == '\n' ? START : MIDDLE;
- }
- break;
- case GOT_l:
- if (c == 'f')
- state = GOT_lf;
- else {
- input_entry += ".l";
- input_entry += c;
- state = c == '\n' ? START : MIDDLE;
- }
- break;
- case GOT_lf:
- if (c == ' ' || c == '\n' || compatible_flag) {
- string args;
- input_entry += ".lf";
- while (c != EOF) {
- args += c;
- if (c == '\n')
- break;
- c = in.get();
- }
- args += '\0';
- interpret_lf_args(args.contents());
- // remove the '\0'
- args.set_length(args.length() - 1);
- input_entry += args;
- state = START;
- }
- else {
- input_entry += ".lf";
- input_entry += c;
- state = MIDDLE;
- }
- break;
- case GOT_RIGHT_BRACE:
- if (c == '\n' || c == tab_char)
- state = END;
- else {
- input_entry += 'T';
- input_entry += '}';
- input_entry += c;
- state = c == '\n' ? START : MIDDLE;
- }
- break;
- case MIDDLE:
- if (c == '\n')
- state = START;
- input_entry += c;
- break;
- case END:
- default:
- assert(0);
- }
- }
- if (c == EOF) {
- error("end of data in middle of text block");
- give_up = 1;
- break;
- }
- }
- if (col >= ncolumns) {
- if (!input_entry.empty()) {
- if (input_entry.length() >= 2
- && input_entry[0] == '\\'
- && input_entry[1] == '"')
- row_comment = 1;
- else if (!row_comment) {
- if (c == '\n')
- in.unget(c);
- input_entry += '\0';
- error("excess data entry `%1' discarded",
- input_entry.contents());
- if (c == '\n')
- (void)in.get();
- }
- }
- }
- else
- tbl->add_entry(current_row, col, input_entry,
- &line_format[col], current_filename, ln);
- col++;
- if (c == '\n')
- break;
- input_entry = "";
- }
- else
- input_entry += c;
- c = in.get();
- if (c == EOF)
- break;
- }
- if (give_up)
- break;
- input_entry = "";
- for (; col < ncolumns; col++)
- tbl->add_entry(current_row, col, input_entry, &line_format[col],
- current_filename, current_lineno - 1);
- tbl->add_vlines(current_row, f->vline[format_index]);
- current_row++;
- format_index++;
- }
- break;
- case TROFF_INPUT_LINE:
- {
- string line;
- int ln = current_lineno;
- for (;;) {
- line += c;
- if (c == '\n')
- break;
- c = in.get();
- if (c == EOF) {
- break;
- }
- }
- tbl->add_text_line(current_row, line, current_filename, ln);
- if (line.length() >= 4
- && line[0] == '.' && line[1] == 'T' && line[2] == '&') {
- format *newf = process_format(in, opt, f);
- if (newf == 0)
- give_up = 1;
- else
- f = newf;
- }
- if (line.length() >= 3
- && line[0] == '.' && line[1] == 'f' && line[2] == 'f') {
- line += '\0';
- interpret_lf_args(line.contents() + 3);
- }
- }
- break;
- case SINGLE_HLINE:
- tbl->add_single_hline(current_row);
- break;
- case DOUBLE_HLINE:
- tbl->add_double_hline(current_row);
- break;
- default:
- assert(0);
- }
- if (give_up)
- break;
- }
- if (!give_up && current_row == 0) {
- error("no real data");
- give_up = 1;
- }
- if (give_up) {
- delete tbl;
- return 0;
- }
- // Do this here rather than at the beginning in case continued formats
- // change it.
- int i;
- for (i = 0; i < ncolumns - 1; i++)
- if (f->separation[i] >= 0)
- tbl->set_column_separation(i, f->separation[i]);
- for (i = 0; i < ncolumns; i++)
- if (!f->width[i].empty())
- tbl->set_minimum_width(i, f->width[i]);
- for (i = 0; i < ncolumns; i++)
- if (f->equal[i])
- tbl->set_equal_column(i);
- return tbl;
-}
-
-void process_table(table_input &in)
-{
- int c;
- options *opt = 0;
- format *form = 0;
- table *tbl = 0;
- if ((opt = process_options(in)) != 0
- && (form = process_format(in, opt)) != 0
- && (tbl = process_data(in, form, opt)) != 0) {
- tbl->print();
- delete tbl;
- }
- else {
- error("giving up on this table");
- while ((c = in.get()) != EOF)
- ;
- }
- delete opt;
- delete form;
- if (!in.ended())
- error("premature end of file");
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [ -vC ] [ files... ]\n", program_name);
-}
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int opt;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv, "vCT:", long_options, NULL)) != EOF)
- switch (opt) {
- case 'C':
- compatible_flag = 1;
- break;
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU tbl (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'T':
- // I'm sick of getting bug reports from IRIX users
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
- printf(".if !\\n(.g .ab GNU tbl requires GNU troff.\n"
- ".if !dTS .ds TS\n"
- ".if !dTE .ds TE\n");
- if (argc > optind) {
- for (int i = optind; i < argc; i++)
- if (argv[i][0] == '-' && argv[i][1] == '\0') {
- current_filename = "-";
- current_lineno = 1;
- printf(".lf 1 -\n");
- process_input_file(stdin);
- }
- else {
- errno = 0;
- FILE *fp = fopen(argv[i], "r");
- if (fp == 0) {
- current_lineno = -1;
- error("can't open `%1': %2", argv[i], strerror(errno));
- }
- else {
- current_lineno = 1;
- current_filename = argv[i];
- printf(".lf 1 %s\n", current_filename);
- process_input_file(fp);
- }
- }
- }
- else {
- current_filename = "-";
- current_lineno = 1;
- printf(".lf 1 -\n");
- process_input_file(stdin);
- }
- if (ferror(stdout) || fflush(stdout) < 0)
- fatal("output error");
- return 0;
-}
-
diff --git a/contrib/groff/src/preproc/tbl/table.cc b/contrib/groff/src/preproc/tbl/table.cc
deleted file mode 100644
index c7f96cd31632..000000000000
--- a/contrib/groff/src/preproc/tbl/table.cc
+++ /dev/null
@@ -1,2778 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "table.h"
-
-#define BAR_HEIGHT ".25m"
-#define DOUBLE_LINE_SEP "2p"
-#define HALF_DOUBLE_LINE_SEP "1p"
-#define LINE_SEP "2p"
-#define BODY_DEPTH ".25m"
-
-const int DEFAULT_COLUMN_SEPARATION = 3;
-
-#define DELIMITER_CHAR "\\[tbl]"
-#define PREFIX "3"
-#define SEPARATION_FACTOR_REG PREFIX "sep"
-#define BOTTOM_REG PREFIX "bot"
-#define RESET_MACRO_NAME PREFIX "init"
-#define LINESIZE_REG PREFIX "lps"
-#define TOP_REG PREFIX "top"
-#define CURRENT_ROW_REG PREFIX "crow"
-#define LAST_PASSED_ROW_REG PREFIX "passed"
-#define TRANSPARENT_STRING_NAME PREFIX "trans"
-#define QUOTE_STRING_NAME PREFIX "quote"
-#define SECTION_DIVERSION_NAME PREFIX "section"
-#define SECTION_DIVERSION_FLAG_REG PREFIX "sflag"
-#define SAVED_VERTICAL_POS_REG PREFIX "vert"
-#define NEED_BOTTOM_RULE_REG PREFIX "brule"
-#define KEEP_MACRO_NAME PREFIX "keep"
-#define RELEASE_MACRO_NAME PREFIX "release"
-#define SAVED_FONT_REG PREFIX "fnt"
-#define SAVED_SIZE_REG PREFIX "sz"
-#define SAVED_FILL_REG PREFIX "fll"
-#define SAVED_INDENT_REG PREFIX "ind"
-#define SAVED_CENTER_REG PREFIX "cent"
-#define TABLE_DIVERSION_NAME PREFIX "table"
-#define TABLE_DIVERSION_FLAG_REG PREFIX "tflag"
-#define TABLE_KEEP_MACRO_NAME PREFIX "tkeep"
-#define TABLE_RELEASE_MACRO_NAME PREFIX "trelease"
-#define NEEDED_REG PREFIX "needed"
-#define REPEATED_MARK_MACRO PREFIX "rmk"
-#define REPEATED_VPT_MACRO PREFIX "rvpt"
-#define SUPPRESS_BOTTOM_REG PREFIX "supbot"
-#define SAVED_DN_REG PREFIX "dn"
-
-// this must be one character
-#define COMPATIBLE_REG PREFIX "c"
-
-#define BLOCK_WIDTH_PREFIX PREFIX "tbw"
-#define BLOCK_DIVERSION_PREFIX PREFIX "tbd"
-#define BLOCK_HEIGHT_PREFIX PREFIX "tbh"
-#define SPAN_WIDTH_PREFIX PREFIX "w"
-#define SPAN_LEFT_NUMERIC_WIDTH_PREFIX PREFIX "lnw"
-#define SPAN_RIGHT_NUMERIC_WIDTH_PREFIX PREFIX "rnw"
-#define SPAN_ALPHABETIC_WIDTH_PREFIX PREFIX "aw"
-#define COLUMN_SEPARATION_PREFIX PREFIX "cs"
-#define ROW_START_PREFIX PREFIX "rs"
-#define COLUMN_START_PREFIX PREFIX "cl"
-#define COLUMN_END_PREFIX PREFIX "ce"
-#define COLUMN_DIVIDE_PREFIX PREFIX "cd"
-#define ROW_TOP_PREFIX PREFIX "rt"
-
-string block_width_reg(int r, int c);
-string block_diversion_name(int r, int c);
-string block_height_reg(int r, int c);
-string span_width_reg(int start_col, int end_col);
-string span_left_numeric_width_reg(int start_col, int end_col);
-string span_right_numeric_width_reg(int start_col, int end_col);
-string span_alphabetic_width_reg(int start_col, int end_col);
-string column_separation_reg(int col);
-string row_start_reg(int r);
-string column_start_reg(int c);
-string column_end_reg(int c);
-string column_divide_reg(int c);
-string row_top_reg(int r);
-
-void set_inline_modifier(const entry_modifier *);
-void restore_inline_modifier(const entry_modifier *m);
-void set_modifier(const entry_modifier *);
-int find_decimal_point(const char *s, char decimal_point_char,
- const char *delim);
-
-string an_empty_string;
-int location_force_filename = 0;
-
-void printfs(const char *,
- const string &arg1 = an_empty_string,
- const string &arg2 = an_empty_string,
- const string &arg3 = an_empty_string,
- const string &arg4 = an_empty_string,
- const string &arg5 = an_empty_string);
-
-void prints(const string &);
-
-inline void prints(char c)
-{
- putchar(c);
-}
-
-inline void prints(const char *s)
-{
- fputs(s, stdout);
-}
-
-void prints(const string &s)
-{
- if (!s.empty())
- fwrite(s.contents(), 1, s.length(), stdout);
-}
-
-struct horizontal_span {
- horizontal_span *next;
- short start_col;
- short end_col;
- horizontal_span(int, int, horizontal_span *);
-};
-
-struct single_line_entry;
-struct double_line_entry;
-struct simple_entry;
-
-class table_entry {
-friend class table;
- table_entry *next;
- int input_lineno;
- const char *input_filename;
-protected:
- int start_row;
- int end_row;
- short start_col;
- short end_col;
- const entry_modifier *mod;
-public:
- void set_location();
- table_entry(const entry_modifier *);
- virtual ~table_entry();
- virtual int divert(int ncols, const string *mw, int *sep);
- virtual void do_width();
- virtual void do_depth();
- virtual void print() = 0;
- virtual void position_vertically() = 0;
- virtual single_line_entry *to_single_line_entry();
- virtual double_line_entry *to_double_line_entry();
- virtual simple_entry *to_simple_entry();
- virtual int line_type();
- virtual void note_double_vrule_on_right(int);
- virtual void note_double_vrule_on_left(int);
-};
-
-class simple_entry : public table_entry {
-public:
- simple_entry(const entry_modifier *);
- void print();
- void position_vertically();
- simple_entry *to_simple_entry();
- virtual void add_tab();
- virtual void simple_print(int);
-};
-
-class empty_entry : public simple_entry {
-public:
- empty_entry(const entry_modifier *);
- int line_type();
-};
-
-class text_entry : public simple_entry {
-protected:
- char *contents;
- void print_contents();
-public:
- text_entry(char *, const entry_modifier *);
- ~text_entry();
-};
-
-void text_entry::print_contents()
-{
- set_inline_modifier(mod);
- prints(contents);
- restore_inline_modifier(mod);
-}
-
-class repeated_char_entry : public text_entry {
-public:
- repeated_char_entry(char *s, const entry_modifier *m);
- void simple_print(int);
-};
-
-class simple_text_entry : public text_entry {
-public:
- simple_text_entry(char *s, const entry_modifier *m);
- void do_width();
-};
-
-class left_text_entry : public simple_text_entry {
-public:
- left_text_entry(char *s, const entry_modifier *m);
- void simple_print(int);
- void add_tab();
-};
-
-class right_text_entry : public simple_text_entry {
-public:
- right_text_entry(char *s, const entry_modifier *m);
- void simple_print(int);
- void add_tab();
-};
-
-class center_text_entry : public simple_text_entry {
-public:
- center_text_entry(char *s, const entry_modifier *m);
- void simple_print(int);
- void add_tab();
-};
-
-class numeric_text_entry : public text_entry {
- int dot_pos;
-public:
- numeric_text_entry(char *s, const entry_modifier *m, int pos);
- void do_width();
- void simple_print(int);
-};
-
-class alphabetic_text_entry : public text_entry {
-public:
- alphabetic_text_entry(char *s, const entry_modifier *m);
- void do_width();
- void simple_print(int);
- void add_tab();
-};
-
-class line_entry : public simple_entry {
-protected:
- char double_vrule_on_right;
- char double_vrule_on_left;
-public:
- line_entry(const entry_modifier *);
- void note_double_vrule_on_right(int);
- void note_double_vrule_on_left(int);
- void simple_print(int) = 0;
-};
-
-class single_line_entry : public line_entry {
-public:
- single_line_entry(const entry_modifier *m);
- void simple_print(int);
- single_line_entry *to_single_line_entry();
- int line_type();
-};
-
-class double_line_entry : public line_entry {
-public:
- double_line_entry(const entry_modifier *m);
- void simple_print(int);
- double_line_entry *to_double_line_entry();
- int line_type();
-};
-
-class short_line_entry : public simple_entry {
-public:
- short_line_entry(const entry_modifier *m);
- void simple_print(int);
- int line_type();
-};
-
-class short_double_line_entry : public simple_entry {
-public:
- short_double_line_entry(const entry_modifier *m);
- void simple_print(int);
- int line_type();
-};
-
-class block_entry : public table_entry {
- char *contents;
-protected:
- void do_divert(int alphabetic, int ncols, const string *mw, int *sep);
-public:
- block_entry(char *s, const entry_modifier *m);
- ~block_entry();
- int divert(int ncols, const string *mw, int *sep);
- void do_width();
- void do_depth();
- void position_vertically();
- void print() = 0;
-};
-
-class left_block_entry : public block_entry {
-public:
- left_block_entry(char *s, const entry_modifier *m);
- void print();
-};
-
-class right_block_entry : public block_entry {
-public:
- right_block_entry(char *s, const entry_modifier *m);
- void print();
-};
-
-class center_block_entry : public block_entry {
-public:
- center_block_entry(char *s, const entry_modifier *m);
- void print();
-};
-
-class alphabetic_block_entry : public block_entry {
-public:
- alphabetic_block_entry(char *s, const entry_modifier *m);
- void print();
- int divert(int ncols, const string *mw, int *sep);
-};
-
-table_entry::table_entry(const entry_modifier *m)
-: next(0), input_lineno(-1), input_filename(0),
- start_row(-1), end_row(-1), start_col(-1), end_col(-1), mod(m)
-{
-}
-
-table_entry::~table_entry()
-{
-}
-
-int table_entry::divert(int, const string *, int *)
-{
- return 0;
-}
-
-void table_entry::do_width()
-{
-}
-
-single_line_entry *table_entry::to_single_line_entry()
-{
- return 0;
-}
-
-double_line_entry *table_entry::to_double_line_entry()
-{
- return 0;
-}
-
-simple_entry *table_entry::to_simple_entry()
-{
- return 0;
-}
-
-void table_entry::do_depth()
-{
-}
-
-void table_entry::set_location()
-{
- set_troff_location(input_filename, input_lineno);
-}
-
-int table_entry::line_type()
-{
- return -1;
-}
-
-void table_entry::note_double_vrule_on_right(int)
-{
-}
-
-void table_entry::note_double_vrule_on_left(int)
-{
-}
-
-simple_entry::simple_entry(const entry_modifier *m) : table_entry(m)
-{
-}
-
-void simple_entry::add_tab()
-{
- // do nothing
-}
-
-void simple_entry::simple_print(int)
-{
- // do nothing
-}
-
-void simple_entry::position_vertically()
-{
- if (start_row != end_row)
- switch (mod->vertical_alignment) {
- case entry_modifier::TOP:
- printfs(".sp |\\n[%1]u\n", row_start_reg(start_row));
- break;
- case entry_modifier::CENTER:
- // Peform the motion in two stages so that the center is rounded
- // vertically upwards even if net vertical motion is upwards.
- printfs(".sp |\\n[%1]u\n", row_start_reg(start_row));
- printfs(".sp \\n[" BOTTOM_REG "]u-\\n[%1]u-1v/2u\n",
- row_start_reg(start_row));
- break;
- case entry_modifier::BOTTOM:
- printfs(".sp |\\n[%1]u+\\n[" BOTTOM_REG "]u-\\n[%1]u-1v\n",
- row_start_reg(start_row));
- break;
- default:
- assert(0);
- }
-}
-
-void simple_entry::print()
-{
- prints(".ta");
- add_tab();
- prints('\n');
- set_location();
- prints("\\&");
- simple_print(0);
- prints('\n');
-}
-
-simple_entry *simple_entry::to_simple_entry()
-{
- return this;
-}
-
-empty_entry::empty_entry(const entry_modifier *m)
-: simple_entry(m)
-{
-}
-
-int empty_entry::line_type()
-{
- return 0;
-}
-
-text_entry::text_entry(char *s, const entry_modifier *m)
-: simple_entry(m), contents(s)
-{
-}
-
-text_entry::~text_entry()
-{
- a_delete contents;
-}
-
-
-repeated_char_entry::repeated_char_entry(char *s, const entry_modifier *m)
-: text_entry(s, m)
-{
-}
-
-void repeated_char_entry::simple_print(int)
-{
- printfs("\\h'|\\n[%1]u'", column_start_reg(start_col));
- set_inline_modifier(mod);
- printfs("\\l" DELIMITER_CHAR "\\n[%1]u\\&",
- span_width_reg(start_col, end_col));
- prints(contents);
- prints(DELIMITER_CHAR);
- restore_inline_modifier(mod);
-}
-
-simple_text_entry::simple_text_entry(char *s, const entry_modifier *m)
-: text_entry(s, m)
-{
-}
-
-void simple_text_entry::do_width()
-{
- set_location();
- printfs(".nr %1 \\n[%1]>?\\w" DELIMITER_CHAR,
- span_width_reg(start_col, end_col));
- print_contents();
- prints(DELIMITER_CHAR "\n");
-}
-
-left_text_entry::left_text_entry(char *s, const entry_modifier *m)
-: simple_text_entry(s, m)
-{
-}
-
-void left_text_entry::simple_print(int)
-{
- printfs("\\h'|\\n[%1]u'", column_start_reg(start_col));
- print_contents();
-}
-
-// The only point of this is to make `\a' ``work'' as in Unix tbl. Grrr.
-
-void left_text_entry::add_tab()
-{
- printfs(" \\n[%1]u", column_end_reg(end_col));
-}
-
-right_text_entry::right_text_entry(char *s, const entry_modifier *m)
-: simple_text_entry(s, m)
-{
-}
-
-void right_text_entry::simple_print(int)
-{
- printfs("\\h'|\\n[%1]u'", column_start_reg(start_col));
- prints("\002\003");
- print_contents();
- prints("\002");
-}
-
-void right_text_entry::add_tab()
-{
- printfs(" \\n[%1]u", column_end_reg(end_col));
-}
-
-center_text_entry::center_text_entry(char *s, const entry_modifier *m)
-: simple_text_entry(s, m)
-{
-}
-
-void center_text_entry::simple_print(int)
-{
- printfs("\\h'|\\n[%1]u'", column_start_reg(start_col));
- prints("\002\003");
- print_contents();
- prints("\003\002");
-}
-
-void center_text_entry::add_tab()
-{
- printfs(" \\n[%1]u", column_end_reg(end_col));
-}
-
-numeric_text_entry::numeric_text_entry(char *s, const entry_modifier *m, int pos)
-: text_entry(s, m), dot_pos(pos)
-{
-}
-
-void numeric_text_entry::do_width()
-{
- if (dot_pos != 0) {
- set_location();
- printfs(".nr %1 0\\w" DELIMITER_CHAR,
- block_width_reg(start_row, start_col));
- set_inline_modifier(mod);
- for (int i = 0; i < dot_pos; i++)
- prints(contents[i]);
- restore_inline_modifier(mod);
- prints(DELIMITER_CHAR "\n");
- printfs(".nr %1 \\n[%1]>?\\n[%2]\n",
- span_left_numeric_width_reg(start_col, end_col),
- block_width_reg(start_row, start_col));
- }
- else
- printfs(".nr %1 0\n", block_width_reg(start_row, start_col));
- if (contents[dot_pos] != '\0') {
- set_location();
- printfs(".nr %1 \\n[%1]>?\\w" DELIMITER_CHAR,
- span_right_numeric_width_reg(start_col, end_col));
- set_inline_modifier(mod);
- prints(contents + dot_pos);
- restore_inline_modifier(mod);
- prints(DELIMITER_CHAR "\n");
- }
-}
-
-void numeric_text_entry::simple_print(int)
-{
- printfs("\\h'|(\\n[%1]u-\\n[%2]u-\\n[%3]u/2u+\\n[%2]u+\\n[%4]u-\\n[%5]u)'",
- span_width_reg(start_col, end_col),
- span_left_numeric_width_reg(start_col, end_col),
- span_right_numeric_width_reg(start_col, end_col),
- column_start_reg(start_col),
- block_width_reg(start_row, start_col));
- print_contents();
-}
-
-alphabetic_text_entry::alphabetic_text_entry(char *s, const entry_modifier *m)
-: text_entry(s, m)
-{
-}
-
-void alphabetic_text_entry::do_width()
-{
- set_location();
- printfs(".nr %1 \\n[%1]>?\\w" DELIMITER_CHAR,
- span_alphabetic_width_reg(start_col, end_col));
- print_contents();
- prints(DELIMITER_CHAR "\n");
-}
-
-void alphabetic_text_entry::simple_print(int)
-{
- printfs("\\h'|\\n[%1]u'", column_start_reg(start_col));
- printfs("\\h'\\n[%1]u-\\n[%2]u/2u'",
- span_width_reg(start_col, end_col),
- span_alphabetic_width_reg(start_col, end_col));
- print_contents();
-}
-
-// The only point of this is to make `\a' ``work'' as in Unix tbl. Grrr.
-
-void alphabetic_text_entry::add_tab()
-{
- printfs(" \\n[%1]u", column_end_reg(end_col));
-}
-
-block_entry::block_entry(char *s, const entry_modifier *m)
-: table_entry(m), contents(s)
-{
-}
-
-block_entry::~block_entry()
-{
- a_delete contents;
-}
-
-void block_entry::position_vertically()
-{
- if (start_row != end_row)
- switch(mod->vertical_alignment) {
- case entry_modifier::TOP:
- printfs(".sp |\\n[%1]u\n", row_start_reg(start_row));
- break;
- case entry_modifier::CENTER:
- // Peform the motion in two stages so that the center is rounded
- // vertically upwards even if net vertical motion is upwards.
- printfs(".sp |\\n[%1]u\n", row_start_reg(start_row));
- printfs(".sp \\n[" BOTTOM_REG "]u-\\n[%1]u-\\n[%2]u/2u\n",
- row_start_reg(start_row),
- block_height_reg(start_row, start_col));
- break;
- case entry_modifier::BOTTOM:
- printfs(".sp |\\n[%1]u+\\n[" BOTTOM_REG "]u-\\n[%1]u-\\n[%2]u\n",
- row_start_reg(start_row),
- block_height_reg(start_row, start_col));
- break;
- default:
- assert(0);
- }
- if (mod->stagger)
- prints(".sp -.5v\n");
-}
-
-int block_entry::divert(int ncols, const string *mw, int *sep)
-{
- do_divert(0, ncols, mw, sep);
- return 1;
-}
-
-void block_entry::do_divert(int alphabetic, int ncols, const string *mw,
- int *sep)
-{
- printfs(".di %1\n", block_diversion_name(start_row, start_col));
- prints(".if \\n[" SAVED_FILL_REG "] .fi\n"
- ".in 0\n");
- prints(".ll ");
- int i;
- for (i = start_col; i <= end_col; i++)
- if (mw[i].empty())
- break;
- if (i > end_col) {
- // Every column spanned by this entry has a minimum width.
- for (int j = start_col; j <= end_col; j++) {
- if (j > start_col) {
- if (sep)
- printfs("+%1n", as_string(sep[j - 1]));
- prints('+');
- }
- printfs("(n;%1)", mw[j]);
- }
- printfs(">?\\n[%1]u", span_width_reg(start_col, end_col));
- }
- else
- printfs("(u;\\n[%1]>?(\\n[.l]*%2/%3))",
- span_width_reg(start_col, end_col),
- as_string(end_col - start_col + 1),
- as_string(ncols + 1));
- if (alphabetic)
- prints("-2n");
- prints("\n");
- set_modifier(mod);
- prints(".cp \\n(" COMPATIBLE_REG "\n");
- set_location();
- prints(contents);
- prints(".br\n.di\n.cp 0\n");
- if (!mod->zero_width) {
- if (alphabetic) {
- printfs(".nr %1 \\n[%1]>?(\\n[dl]+2n)\n",
- span_width_reg(start_col, end_col));
- printfs(".nr %1 \\n[%1]>?\\n[dl]\n",
- span_alphabetic_width_reg(start_col, end_col));
- }
- else
- printfs(".nr %1 \\n[%1]>?\\n[dl]\n", span_width_reg(start_col, end_col));
- }
- printfs(".nr %1 \\n[dn]\n", block_height_reg(start_row, start_col));
- printfs(".nr %1 \\n[dl]\n", block_width_reg(start_row, start_col));
- prints("." RESET_MACRO_NAME "\n"
- ".in \\n[" SAVED_INDENT_REG "]u\n"
- ".nf\n");
- // the block might have contained .lf commands
- location_force_filename = 1;
-}
-
-void block_entry::do_width()
-{
- // do nothing; the action happens in divert
-}
-
-void block_entry::do_depth()
-{
- printfs(".nr " BOTTOM_REG " \\n[" BOTTOM_REG "]>?(\\n[%1]+\\n[%2])\n",
- row_start_reg(start_row),
- block_height_reg(start_row, start_col));
-}
-
-left_block_entry::left_block_entry(char *s, const entry_modifier *m)
-: block_entry(s, m)
-{
-}
-
-void left_block_entry::print()
-{
- printfs(".in +\\n[%1]u\n", column_start_reg(start_col));
- printfs(".%1\n", block_diversion_name(start_row, start_col));
- prints(".in\n");
-}
-
-
-
-right_block_entry::right_block_entry(char *s, const entry_modifier *m)
-: block_entry(s, m)
-{
-}
-
-void right_block_entry::print()
-{
- printfs(".in +\\n[%1]u+\\n[%2]u-\\n[%3]u\n",
- column_start_reg(start_col),
- span_width_reg(start_col, end_col),
- block_width_reg(start_row, start_col));
- printfs(".%1\n", block_diversion_name(start_row, start_col));
- prints(".in\n");
-}
-
-center_block_entry::center_block_entry(char *s, const entry_modifier *m)
-: block_entry(s, m)
-{
-}
-
-void center_block_entry::print()
-{
- printfs(".in +\\n[%1]u+(\\n[%2]u-\\n[%3]u/2u)\n",
- column_start_reg(start_col),
- span_width_reg(start_col, end_col),
- block_width_reg(start_row, start_col));
- printfs(".%1\n", block_diversion_name(start_row, start_col));
- prints(".in\n");
-}
-
-alphabetic_block_entry::alphabetic_block_entry(char *s,
- const entry_modifier *m)
-: block_entry(s, m)
-{
-}
-
-int alphabetic_block_entry::divert(int ncols, const string *mw, int *sep)
-{
- do_divert(1, ncols, mw, sep);
- return 1;
-}
-
-void alphabetic_block_entry::print()
-{
- printfs(".in +\\n[%1]u+(\\n[%2]u-\\n[%3]u/2u)\n",
- column_start_reg(start_col),
- span_width_reg(start_col, end_col),
- span_alphabetic_width_reg(start_col, end_col));
- printfs(".%1\n", block_diversion_name(start_row, start_col));
- prints(".in\n");
-}
-
-line_entry::line_entry(const entry_modifier *m)
-: simple_entry(m), double_vrule_on_right(0), double_vrule_on_left(0)
-{
-}
-
-void line_entry::note_double_vrule_on_right(int is_corner)
-{
- double_vrule_on_right = is_corner ? 1 : 2;
-}
-
-void line_entry::note_double_vrule_on_left(int is_corner)
-{
- double_vrule_on_left = is_corner ? 1 : 2;
-}
-
-
-single_line_entry::single_line_entry(const entry_modifier *m)
-: line_entry(m)
-{
-}
-
-int single_line_entry::line_type()
-{
- return 1;
-}
-
-void single_line_entry::simple_print(int dont_move)
-{
- printfs("\\h'|\\n[%1]u",
- column_divide_reg(start_col));
- if (double_vrule_on_left) {
- prints(double_vrule_on_left == 1 ? "-" : "+");
- prints(HALF_DOUBLE_LINE_SEP);
- }
- prints("'");
- if (!dont_move)
- prints("\\v'-" BAR_HEIGHT "'");
- printfs("\\s[\\n[" LINESIZE_REG "]]" "\\D'l |\\n[%1]u",
- column_divide_reg(end_col+1));
- if (double_vrule_on_right) {
- prints(double_vrule_on_left == 1 ? "+" : "-");
- prints(HALF_DOUBLE_LINE_SEP);
- }
- prints("0'\\s0");
- if (!dont_move)
- prints("\\v'" BAR_HEIGHT "'");
-}
-
-single_line_entry *single_line_entry::to_single_line_entry()
-{
- return this;
-}
-
-double_line_entry::double_line_entry(const entry_modifier *m)
-: line_entry(m)
-{
-}
-
-int double_line_entry::line_type()
-{
- return 2;
-}
-
-void double_line_entry::simple_print(int dont_move)
-{
- if (!dont_move)
- prints("\\v'-" BAR_HEIGHT "'");
- printfs("\\h'|\\n[%1]u",
- column_divide_reg(start_col));
- if (double_vrule_on_left) {
- prints(double_vrule_on_left == 1 ? "-" : "+");
- prints(HALF_DOUBLE_LINE_SEP);
- }
- prints("'");
- printfs("\\v'-" HALF_DOUBLE_LINE_SEP "'"
- "\\s[\\n[" LINESIZE_REG "]]"
- "\\D'l |\\n[%1]u",
- column_divide_reg(end_col+1));
- if (double_vrule_on_right)
- prints("-" HALF_DOUBLE_LINE_SEP);
- prints(" 0'");
- printfs("\\v'" DOUBLE_LINE_SEP "'"
- "\\D'l |\\n[%1]u",
- column_divide_reg(start_col));
- if (double_vrule_on_right) {
- prints(double_vrule_on_left == 1 ? "+" : "-");
- prints(HALF_DOUBLE_LINE_SEP);
- }
- prints(" 0'");
- prints("\\s0"
- "\\v'-" HALF_DOUBLE_LINE_SEP "'");
- if (!dont_move)
- prints("\\v'" BAR_HEIGHT "'");
-}
-
-double_line_entry *double_line_entry::to_double_line_entry()
-{
- return this;
-}
-
-short_line_entry::short_line_entry(const entry_modifier *m)
-: simple_entry(m)
-{
-}
-
-int short_line_entry::line_type()
-{
- return 1;
-}
-
-void short_line_entry::simple_print(int dont_move)
-{
- if (mod->stagger)
- prints("\\v'-.5v'");
- if (!dont_move)
- prints("\\v'-" BAR_HEIGHT "'");
- printfs("\\h'|\\n[%1]u'", column_start_reg(start_col));
- printfs("\\s[\\n[" LINESIZE_REG "]]"
- "\\D'l \\n[%1]u 0'"
- "\\s0",
- span_width_reg(start_col, end_col));
- if (!dont_move)
- prints("\\v'" BAR_HEIGHT "'");
- if (mod->stagger)
- prints("\\v'.5v'");
-}
-
-short_double_line_entry::short_double_line_entry(const entry_modifier *m)
-: simple_entry(m)
-{
-}
-
-int short_double_line_entry::line_type()
-{
- return 2;
-}
-
-void short_double_line_entry::simple_print(int dont_move)
-{
- if (mod->stagger)
- prints("\\v'-.5v'");
- if (!dont_move)
- prints("\\v'-" BAR_HEIGHT "'");
- printfs("\\h'|\\n[%2]u'"
- "\\v'-" HALF_DOUBLE_LINE_SEP "'"
- "\\s[\\n[" LINESIZE_REG "]]"
- "\\D'l \\n[%1]u 0'"
- "\\v'" DOUBLE_LINE_SEP "'"
- "\\D'l |\\n[%2]u 0'"
- "\\s0"
- "\\v'-" HALF_DOUBLE_LINE_SEP "'",
- span_width_reg(start_col, end_col),
- column_start_reg(start_col));
- if (!dont_move)
- prints("\\v'" BAR_HEIGHT "'");
- if (mod->stagger)
- prints("\\v'.5v'");
-}
-
-void set_modifier(const entry_modifier *m)
-{
- if (!m->font.empty())
- printfs(".ft %1\n", m->font);
- if (m->point_size.val != 0) {
- prints(".ps ");
- if (m->point_size.inc > 0)
- prints('+');
- else if (m->point_size.inc < 0)
- prints('-');
- printfs("%1\n", as_string(m->point_size.val));
- }
- if (m->vertical_spacing.val != 0) {
- prints(".vs ");
- if (m->vertical_spacing.inc > 0)
- prints('+');
- else if (m->vertical_spacing.inc < 0)
- prints('-');
- printfs("%1\n", as_string(m->vertical_spacing.val));
- }
-}
-
-void set_inline_modifier(const entry_modifier *m)
-{
- if (!m->font.empty())
- printfs("\\f[%1]", m->font);
- if (m->point_size.val != 0) {
- prints("\\s[");
- if (m->point_size.inc > 0)
- prints('+');
- else if (m->point_size.inc < 0)
- prints('-');
- printfs("%1]", as_string(m->point_size.val));
- }
- if (m->stagger)
- prints("\\v'-.5v'");
-}
-
-void restore_inline_modifier(const entry_modifier *m)
-{
- if (!m->font.empty())
- prints("\\f[\\n[" SAVED_FONT_REG "]]");
- if (m->point_size.val != 0)
- prints("\\s[\\n[" SAVED_SIZE_REG "]]");
- if (m->stagger)
- prints("\\v'.5v'");
-}
-
-
-struct stuff {
- stuff *next;
- int row; // occurs before row `row'
- char printed; // has it been printed?
-
- stuff(int);
- virtual void print(table *) = 0;
- virtual ~stuff();
- virtual int is_single_line() { return 0; };
- virtual int is_double_line() { return 0; };
-};
-
-stuff::stuff(int r) : next(0), row(r), printed(0)
-{
-}
-
-stuff::~stuff()
-{
-}
-
-struct text_stuff : public stuff {
- string contents;
- const char *filename;
- int lineno;
-
- text_stuff(const string &, int r, const char *fn, int ln);
- ~text_stuff();
- void print(table *);
-};
-
-
-text_stuff::text_stuff(const string &s, int r, const char *fn, int ln)
-: stuff(r), contents(s), filename(fn), lineno(ln)
-{
-}
-
-text_stuff::~text_stuff()
-{
-}
-
-void text_stuff::print(table *)
-{
- printed = 1;
- prints(".cp \\n(" COMPATIBLE_REG "\n");
- set_troff_location(filename, lineno);
- prints(contents);
- prints(".cp 0\n");
- location_force_filename = 1; // it might have been a .lf command
-}
-
-struct single_hline_stuff : public stuff {
- single_hline_stuff(int r);
- void print(table *);
- int is_single_line();
-};
-
-single_hline_stuff::single_hline_stuff(int r) : stuff(r)
-{
-}
-
-void single_hline_stuff::print(table *tbl)
-{
- printed = 1;
- tbl->print_single_hline(row);
-}
-
-int single_hline_stuff::is_single_line()
-{
- return 1;
-}
-
-struct double_hline_stuff : stuff {
- double_hline_stuff(int r);
- void print(table *);
- int is_double_line();
-};
-
-double_hline_stuff::double_hline_stuff(int r) : stuff(r)
-{
-}
-
-void double_hline_stuff::print(table *tbl)
-{
- printed = 1;
- tbl->print_double_hline(row);
-}
-
-int double_hline_stuff::is_double_line()
-{
- return 1;
-}
-
-struct vertical_rule {
- vertical_rule *next;
- int start_row;
- int end_row;
- short col;
- char is_double;
- string top_adjust;
- string bot_adjust;
-
- vertical_rule(int sr, int er, int c, int dbl, vertical_rule *);
- ~vertical_rule();
- void contribute_to_bottom_macro(table *);
- void print();
-};
-
-vertical_rule::vertical_rule(int sr, int er, int c, int dbl, vertical_rule *p)
-: next(p), start_row(sr), end_row(er), col(c), is_double(dbl)
-{
-}
-
-vertical_rule::~vertical_rule()
-{
-}
-
-void vertical_rule::contribute_to_bottom_macro(table *tbl)
-{
- printfs(".if \\n[" CURRENT_ROW_REG "]>=%1",
- as_string(start_row));
- if (end_row != tbl->get_nrows() - 1)
- printfs("&(\\n[" CURRENT_ROW_REG "]<%1)",
- as_string(end_row));
- prints(" \\{");
- printfs(".if %1<=\\n[" LAST_PASSED_ROW_REG "] .nr %2 \\n[#T]\n",
- as_string(start_row),
- row_top_reg(start_row));
- const char *offset_table[3];
- if (is_double) {
- offset_table[0] = "-" HALF_DOUBLE_LINE_SEP;
- offset_table[1] = "+" HALF_DOUBLE_LINE_SEP;
- offset_table[2] = 0;
- }
- else {
- offset_table[0] = "";
- offset_table[1] = 0;
- }
- for (const char **offsetp = offset_table; *offsetp; offsetp++) {
- prints(".sp -1\n"
- "\\v'" BODY_DEPTH);
- if (!bot_adjust.empty())
- printfs("+%1", bot_adjust);
- prints("'");
- printfs("\\h'\\n[%1]u%3'\\s[\\n[" LINESIZE_REG "]]\\D'l 0 |\\n[%2]u-1v",
- column_divide_reg(col),
- row_top_reg(start_row),
- *offsetp);
- if (!bot_adjust.empty())
- printfs("-(%1)", bot_adjust);
- // don't perform the top adjustment if the top is actually #T
- if (!top_adjust.empty())
- printfs("+((%1)*(%2>\\n[" LAST_PASSED_ROW_REG "]))",
- top_adjust,
- as_string(start_row));
- prints("'\\s0\n");
- }
- prints(".\\}\n");
-}
-
-void vertical_rule::print()
-{
- printfs("\\*[" TRANSPARENT_STRING_NAME "]"
- ".if %1<=\\*[" QUOTE_STRING_NAME "]\\n[" LAST_PASSED_ROW_REG "] "
- ".nr %2 \\*[" QUOTE_STRING_NAME "]\\n[#T]\n",
- as_string(start_row),
- row_top_reg(start_row));
- const char *offset_table[3];
- if (is_double) {
- offset_table[0] = "-" HALF_DOUBLE_LINE_SEP;
- offset_table[1] = "+" HALF_DOUBLE_LINE_SEP;
- offset_table[2] = 0;
- }
- else {
- offset_table[0] = "";
- offset_table[1] = 0;
- }
- for (const char **offsetp = offset_table; *offsetp; offsetp++) {
- prints("\\*[" TRANSPARENT_STRING_NAME "].sp -1\n"
- "\\*[" TRANSPARENT_STRING_NAME "]\\v'" BODY_DEPTH);
- if (!bot_adjust.empty())
- printfs("+%1", bot_adjust);
- prints("'");
- printfs("\\h'\\n[%1]u%3'"
- "\\s[\\n[" LINESIZE_REG "]]"
- "\\D'l 0 |\\*[" QUOTE_STRING_NAME "]\\n[%2]u-1v",
- column_divide_reg(col),
- row_top_reg(start_row),
- *offsetp);
- if (!bot_adjust.empty())
- printfs("-(%1)", bot_adjust);
- // don't perform the top adjustment if the top is actually #T
- if (!top_adjust.empty())
- printfs("+((%1)*(%2>\\*[" QUOTE_STRING_NAME "]\\n["
- LAST_PASSED_ROW_REG "]))",
- top_adjust,
- as_string(start_row));
- prints("'"
- "\\s0\n");
- }
-}
-
-table::table(int nc, unsigned f, int ls, char dpc)
-: flags(f), nrows(0), ncolumns(nc), linesize(ls), decimal_point_char(dpc),
- vrule_list(0), stuff_list(0), span_list(0),
- entry_list(0), entry_list_tailp(&entry_list), entry(0),
- vline(0), row_is_all_lines(0), left_separation(0), right_separation(0),
- allocated_rows(0)
-{
- minimum_width = new string[ncolumns];
- column_separation = ncolumns > 1 ? new int[ncolumns - 1] : 0;
- equal = new char[ncolumns];
- int i;
- for (i = 0; i < ncolumns; i++)
- equal[i] = 0;
- for (i = 0; i < ncolumns-1; i++)
- column_separation[i] = DEFAULT_COLUMN_SEPARATION;
- delim[0] = delim[1] = '\0';
-}
-
-table::~table()
-{
- for (int i = 0; i < nrows; i++) {
- a_delete entry[i];
- a_delete vline[i];
- }
- a_delete entry;
- a_delete vline;
- while (entry_list) {
- table_entry *tem = entry_list;
- entry_list = entry_list->next;
- delete tem;
- }
- ad_delete(ncolumns) minimum_width;
- a_delete column_separation;
- a_delete equal;
- while (stuff_list) {
- stuff *tem = stuff_list;
- stuff_list = stuff_list->next;
- delete tem;
- }
- while (vrule_list) {
- vertical_rule *tem = vrule_list;
- vrule_list = vrule_list->next;
- delete tem;
- }
- a_delete row_is_all_lines;
- while (span_list) {
- horizontal_span *tem = span_list;
- span_list = span_list->next;
- delete tem;
- }
-}
-
-void table::set_delim(char c1, char c2)
-{
- delim[0] = c1;
- delim[1] = c2;
-}
-
-void table::set_minimum_width(int c, const string &w)
-{
- assert(c >= 0 && c < ncolumns);
- minimum_width[c] = w;
-}
-
-void table::set_column_separation(int c, int n)
-{
- assert(c >= 0 && c < ncolumns - 1);
- column_separation[c] = n;
-}
-
-void table::set_equal_column(int c)
-{
- assert(c >= 0 && c < ncolumns);
- equal[c] = 1;
-}
-
-void table::add_stuff(stuff *p)
-{
- stuff **pp;
- for (pp = &stuff_list; *pp; pp = &(*pp)->next)
- ;
- *pp = p;
-}
-
-void table::add_text_line(int r, const string &s, const char *filename, int lineno)
-{
- add_stuff(new text_stuff(s, r, filename, lineno));
-}
-
-void table::add_single_hline(int r)
-{
- add_stuff(new single_hline_stuff(r));
-}
-
-void table::add_double_hline(int r)
-{
- add_stuff(new double_hline_stuff(r));
-}
-
-void table::allocate(int r)
-{
- if (r >= nrows) {
- typedef table_entry **PPtable_entry; // work around g++ 1.36.1 bug
- if (r >= allocated_rows) {
- if (allocated_rows == 0) {
- allocated_rows = 16;
- if (allocated_rows <= r)
- allocated_rows = r + 1;
- entry = new PPtable_entry[allocated_rows];
- vline = new char*[allocated_rows];
- }
- else {
- table_entry ***old_entry = entry;
- int old_allocated_rows = allocated_rows;
- allocated_rows *= 2;
- if (allocated_rows <= r)
- allocated_rows = r + 1;
- entry = new PPtable_entry[allocated_rows];
- memcpy(entry, old_entry, sizeof(table_entry**)*old_allocated_rows);
- a_delete old_entry;
- char **old_vline = vline;
- vline = new char*[allocated_rows];
- memcpy(vline, old_vline, sizeof(char*)*old_allocated_rows);
- a_delete old_vline;
- }
- }
- assert(allocated_rows > r);
- while (nrows <= r) {
- entry[nrows] = new table_entry*[ncolumns];
- int i;
- for (i = 0; i < ncolumns; i++)
- entry[nrows][i] = 0;
- vline[nrows] = new char[ncolumns+1];
- for (i = 0; i < ncolumns+1; i++)
- vline[nrows][i] = 0;
- nrows++;
- }
- }
-}
-
-void table::do_hspan(int r, int c)
-{
- assert(r >= 0 && c >= 0 && r < nrows && c < ncolumns);
- if (c == 0) {
- error("first column cannot be horizontally spanned");
- return;
- }
- table_entry *e = entry[r][c];
- if (e) {
- assert(e->start_row <= r && r <= e->end_row
- && e->start_col <= c && c <= e->end_col
- && e->end_row - e->start_row > 0
- && e->end_col - e->start_col > 0);
- return;
- }
- e = entry[r][c-1];
- // e can be 0 if we had an empty entry or an error
- if (e == 0)
- return;
- if (e->start_row != r) {
- /*
- l l
- ^ s */
- error("impossible horizontal span at row %1, column %2", r + 1, c + 1);
- }
- else {
- e->end_col = c;
- entry[r][c] = e;
- }
-}
-
-void table::do_vspan(int r, int c)
-{
- assert(r >= 0 && c >= 0 && r < nrows && c < ncolumns);
- if (r == 0) {
- error("first row cannot be vertically spanned");
- return;
- }
- table_entry *e = entry[r][c];
- if (e) {
- assert(e->start_row <= r && r <= e->end_row
- && e->start_col <= c && c <= e->end_col
- && e->end_row - e->start_row > 0
- && e->end_col - e->start_col > 0);
- return;
- }
- e = entry[r-1][c];
- // e can be 0 if we had an empty entry or an error
- if (e == 0)
- return;
- if (e->start_col != c) {
- /* l s
- l ^ */
- error("impossible vertical span at row %1, column %2", r + 1, c + 1);
- }
- else {
- for (int i = c; i <= e->end_col; i++) {
- assert(entry[r][i] == 0);
- entry[r][i] = e;
- }
- e->end_row = r;
- }
-}
-
-int find_decimal_point(const char *s, char decimal_point_char,
- const char *delim)
-{
- if (s == 0 || *s == '\0')
- return -1;
- const char *p;
- int in_delim = 0; // is p within eqn delimiters?
- // tbl recognises \& even within eqn delimiters; I don't
- for (p = s; *p; p++)
- if (in_delim) {
- if (*p == delim[1])
- in_delim = 0;
- }
- else if (*p == delim[0])
- in_delim = 1;
- else if (p[0] == '\\' && p[1] == '&')
- return p - s;
- int possible_pos = -1;
- in_delim = 0;
- for (p = s; *p; p++)
- if (in_delim) {
- if (*p == delim[1])
- in_delim = 0;
- }
- else if (*p == delim[0])
- in_delim = 1;
- else if (p[0] == decimal_point_char && csdigit(p[1]))
- possible_pos = p - s;
- if (possible_pos >= 0)
- return possible_pos;
- in_delim = 0;
- for (p = s; *p; p++)
- if (in_delim) {
- if (*p == delim[1])
- in_delim = 0;
- }
- else if (*p == delim[0])
- in_delim = 1;
- else if (csdigit(*p))
- possible_pos = p + 1 - s;
- return possible_pos;
-}
-
-void table::add_entry(int r, int c, const string &str, const entry_format *f,
- const char *fn, int ln)
-{
- allocate(r);
- table_entry *e = 0;
- if (str == "\\_") {
- e = new short_line_entry(f);
- }
- else if (str == "\\=") {
- e = new short_double_line_entry(f);
- }
- else if (str == "_") {
- single_line_entry *lefte;
- if (c > 0 && entry[r][c-1] != 0 &&
- (lefte = entry[r][c-1]->to_single_line_entry()) != 0
- && lefte->start_row == r
- && lefte->mod->stagger == f->stagger) {
- lefte->end_col = c;
- entry[r][c] = lefte;
- }
- else
- e = new single_line_entry(f);
- }
- else if (str == "=") {
- double_line_entry *lefte;
- if (c > 0 && entry[r][c-1] != 0 &&
- (lefte = entry[r][c-1]->to_double_line_entry()) != 0
- && lefte->start_row == r
- && lefte->mod->stagger == f->stagger) {
- lefte->end_col = c;
- entry[r][c] = lefte;
- }
- else
- e = new double_line_entry(f);
- }
- else if (str == "\\^") {
- do_vspan(r, c);
- }
- else if (str.length() > 2 && str[0] == '\\' && str[1] == 'R') {
- if (str.search('\n') >= 0)
- error_with_file_and_line(fn, ln, "bad repeated character");
- else {
- char *s = str.substring(2, str.length() - 2).extract();
- e = new repeated_char_entry(s, f);
- }
- }
- else {
- int is_block = str.search('\n') >= 0;
- char *s;
- switch (f->type) {
- case FORMAT_SPAN:
- assert(str.empty());
- do_hspan(r, c);
- break;
- case FORMAT_LEFT:
- if (!str.empty()) {
- s = str.extract();
- if (is_block)
- e = new left_block_entry(s, f);
- else
- e = new left_text_entry(s, f);
- }
- else
- e = new empty_entry(f);
- break;
- case FORMAT_CENTER:
- if (!str.empty()) {
- s = str.extract();
- if (is_block)
- e = new center_block_entry(s, f);
- else
- e = new center_text_entry(s, f);
- }
- else
- e = new empty_entry(f);
- break;
- case FORMAT_RIGHT:
- if (!str.empty()) {
- s = str.extract();
- if (is_block)
- e = new right_block_entry(s, f);
- else
- e = new right_text_entry(s, f);
- }
- else
- e = new empty_entry(f);
- break;
- case FORMAT_NUMERIC:
- if (!str.empty()) {
- s = str.extract();
- if (is_block) {
- error_with_file_and_line(fn, ln, "can't have numeric text block");
- e = new left_block_entry(s, f);
- }
- else {
- int pos = find_decimal_point(s, decimal_point_char, delim);
- if (pos < 0)
- e = new center_text_entry(s, f);
- else
- e = new numeric_text_entry(s, f, pos);
- }
- }
- else
- e = new empty_entry(f);
- break;
- case FORMAT_ALPHABETIC:
- if (!str.empty()) {
- s = str.extract();
- if (is_block)
- e = new alphabetic_block_entry(s, f);
- else
- e = new alphabetic_text_entry(s, f);
- }
- else
- e = new empty_entry(f);
- break;
- case FORMAT_VSPAN:
- do_vspan(r, c);
- break;
- case FORMAT_HLINE:
- if (str.length() != 0)
- error_with_file_and_line(fn, ln,
- "non-empty data entry for `_' format ignored");
- e = new single_line_entry(f);
- break;
- case FORMAT_DOUBLE_HLINE:
- if (str.length() != 0)
- error_with_file_and_line(fn, ln,
- "non-empty data entry for `=' format ignored");
- e = new double_line_entry(f);
- break;
- default:
- assert(0);
- }
- }
- if (e) {
- table_entry *preve = entry[r][c];
- if (preve) {
- /* c s
- ^ l */
- error_with_file_and_line(fn, ln, "row %1, column %2 already spanned",
- r + 1, c + 1);
- delete e;
- }
- else {
- e->input_lineno = ln;
- e->input_filename = fn;
- e->start_row = e->end_row = r;
- e->start_col = e->end_col = c;
- *entry_list_tailp = e;
- entry_list_tailp = &e->next;
- entry[r][c] = e;
- }
- }
-}
-
-// add vertical lines for row r
-
-void table::add_vlines(int r, const char *v)
-{
- allocate(r);
- for (int i = 0; i < ncolumns+1; i++)
- vline[r][i] = v[i];
-}
-
-void table::check()
-{
- table_entry *p = entry_list;
- int i, j;
- while (p) {
- for (i = p->start_row; i <= p->end_row; i++)
- for (j = p->start_col; j <= p->end_col; j++)
- assert(entry[i][j] == p);
- p = p->next;
- }
-}
-
-void table::print()
-{
- location_force_filename = 1;
- check();
- init_output();
- determine_row_type();
- compute_widths();
- if (!(flags & CENTER))
- prints(".if \\n[" SAVED_CENTER_REG "] \\{");
- prints(".in +(u;\\n[.l]-\\n[.i]-\\n[TW]/2>?-\\n[.i])\n"
- ".nr " SAVED_INDENT_REG " \\n[.i]\n");
- if (!(flags & CENTER))
- prints(".\\}\n");
- build_vrule_list();
- define_bottom_macro();
- do_top();
- for (int i = 0; i < nrows; i++)
- do_row(i);
- do_bottom();
-}
-
-void table::determine_row_type()
-{
- row_is_all_lines = new char[nrows];
- for (int i = 0; i < nrows; i++) {
- int had_single = 0;
- int had_double = 0;
- int had_non_line = 0;
- for (int c = 0; c < ncolumns; c++) {
- table_entry *e = entry[i][c];
- if (e != 0) {
- if (e->start_row == e->end_row) {
- int t = e->line_type();
- switch (t) {
- case -1:
- had_non_line = 1;
- break;
- case 0:
- // empty
- break;
- case 1:
- had_single = 1;
- break;
- case 2:
- had_double = 1;
- break;
- default:
- assert(0);
- }
- if (had_non_line)
- break;
- }
- c = e->end_col;
- }
- }
- if (had_non_line)
- row_is_all_lines[i] = 0;
- else if (had_double)
- row_is_all_lines[i] = 2;
- else if (had_single)
- row_is_all_lines[i] = 1;
- else
- row_is_all_lines[i] = 0;
- }
-}
-
-
-void table::init_output()
-{
- prints(".nr " COMPATIBLE_REG " \\n(.C\n"
- ".cp 0\n");
- if (linesize > 0)
- printfs(".nr " LINESIZE_REG " %1\n", as_string(linesize));
- else
- prints(".nr " LINESIZE_REG " \\n[.s]\n");
- if (!(flags & CENTER))
- prints(".nr " SAVED_CENTER_REG " \\n[.ce]\n");
- prints(".de " RESET_MACRO_NAME "\n"
- ".ft \\n[.f]\n"
- ".ps \\n[.s]\n"
- ".vs \\n[.v]u\n"
- ".in \\n[.i]u\n"
- ".ll \\n[.l]u\n"
- ".ls \\n[.L]\n"
- ".ad \\n[.j]\n"
- ".ie \\n[.u] .fi\n"
- ".el .nf\n"
- ".ce \\n[.ce]\n"
- "..\n"
- ".nr " SAVED_INDENT_REG " \\n[.i]\n"
- ".nr " SAVED_FONT_REG " \\n[.f]\n"
- ".nr " SAVED_SIZE_REG " \\n[.s]\n"
- ".nr " SAVED_FILL_REG " \\n[.u]\n"
- ".nr T. 0\n"
- ".nr " CURRENT_ROW_REG " 0-1\n"
- ".nr " LAST_PASSED_ROW_REG " 0-1\n"
- ".nr " SECTION_DIVERSION_FLAG_REG " 0\n"
- ".ds " TRANSPARENT_STRING_NAME "\n"
- ".ds " QUOTE_STRING_NAME "\n"
- ".nr " NEED_BOTTOM_RULE_REG " 1\n"
- ".nr " SUPPRESS_BOTTOM_REG " 0\n"
- ".eo\n"
- ".de " REPEATED_MARK_MACRO "\n"
- ".mk \\$1\n"
- ".if !'\\n(.z'' \\!." REPEATED_MARK_MACRO " \"\\$1\"\n"
- "..\n"
- ".de " REPEATED_VPT_MACRO "\n"
- ".vpt \\$1\n"
- ".if !'\\n(.z'' \\!." REPEATED_VPT_MACRO " \"\\$1\"\n"
- "..\n");
- if (!(flags & NOKEEP))
- prints(".de " KEEP_MACRO_NAME "\n"
- ".if '\\n[.z]'' \\{.ds " QUOTE_STRING_NAME " \\\\\n"
- ".ds " TRANSPARENT_STRING_NAME " \\!\n"
- ".di " SECTION_DIVERSION_NAME "\n"
- ".nr " SECTION_DIVERSION_FLAG_REG " 1\n"
- ".in 0\n"
- ".\\}\n"
- "..\n"
- ".de " RELEASE_MACRO_NAME "\n"
- ".if \\n[" SECTION_DIVERSION_FLAG_REG "] \\{"
- ".di\n"
- ".in \\n[" SAVED_INDENT_REG "]u\n"
- ".nr " SAVED_DN_REG " \\n[dn]\n"
- ".ds " QUOTE_STRING_NAME "\n"
- ".ds " TRANSPARENT_STRING_NAME "\n"
- ".nr " SECTION_DIVERSION_FLAG_REG " 0\n"
- ".if \\n[.t]<=\\n[dn] \\{"
- ".nr T. 1\n"
- ".T#\n"
- ".nr " SUPPRESS_BOTTOM_REG " 1\n"
- ".sp \\n[.t]u\n"
- ".nr " SUPPRESS_BOTTOM_REG " 0\n"
- ".mk #T\n"
- ".\\}\n"
- ".if \\n[.t]<=\\n[" SAVED_DN_REG "] "
- /* Since we turn off traps, it won't get into an infinite loop
- when we try and print it; it will just go off the bottom of the
- page. */
- ".tm warning: page \\n%: table text block will not fit on one page\n"
- ".nf\n"
- ".ls 1\n"
- "." SECTION_DIVERSION_NAME "\n"
- ".ls\n"
- ".rm " SECTION_DIVERSION_NAME "\n"
- ".\\}\n"
- "..\n"
- ".nr " TABLE_DIVERSION_FLAG_REG " 0\n"
- ".de " TABLE_KEEP_MACRO_NAME "\n"
- ".if '\\n[.z]'' \\{"
- ".di " TABLE_DIVERSION_NAME "\n"
- ".nr " TABLE_DIVERSION_FLAG_REG " 1\n"
- ".\\}\n"
- "..\n"
- ".de " TABLE_RELEASE_MACRO_NAME "\n"
- ".if \\n[" TABLE_DIVERSION_FLAG_REG "] \\{.br\n"
- ".di\n"
- ".nr " SAVED_DN_REG " \\n[dn]\n"
- ".ne \\n[dn]u+\\n[.V]u\n"
- ".ie \\n[.t]<=\\n[" SAVED_DN_REG "] "
- ".tm error: page \\n%: table will not fit on one page; use .TS H/.TH with a supporting macro package\n"
- ".el \\{"
- ".in 0\n"
- ".ls 1\n"
- ".nf\n"
- "." TABLE_DIVERSION_NAME "\n"
- ".\\}\n"
- ".rm " TABLE_DIVERSION_NAME "\n"
- ".\\}\n"
- "..\n");
- prints(".ec\n"
- ".ce 0\n"
- ".nf\n");
-}
-
-string block_width_reg(int r, int c)
-{
- static char name[sizeof(BLOCK_WIDTH_PREFIX)+INT_DIGITS+1+INT_DIGITS];
- sprintf(name, BLOCK_WIDTH_PREFIX "%d,%d", r, c);
- return string(name);
-}
-
-string block_diversion_name(int r, int c)
-{
- static char name[sizeof(BLOCK_DIVERSION_PREFIX)+INT_DIGITS+1+INT_DIGITS];
- sprintf(name, BLOCK_DIVERSION_PREFIX "%d,%d", r, c);
- return string(name);
-}
-
-string block_height_reg(int r, int c)
-{
- static char name[sizeof(BLOCK_HEIGHT_PREFIX)+INT_DIGITS+1+INT_DIGITS];
- sprintf(name, BLOCK_HEIGHT_PREFIX "%d,%d", r, c);
- return string(name);
-}
-
-string span_width_reg(int start_col, int end_col)
-{
- static char name[sizeof(SPAN_WIDTH_PREFIX)+INT_DIGITS+1+INT_DIGITS];
- sprintf(name, SPAN_WIDTH_PREFIX "%d", start_col);
- if (end_col != start_col)
- sprintf(strchr(name, '\0'), ",%d", end_col);
- return string(name);
-}
-
-string span_left_numeric_width_reg(int start_col, int end_col)
-{
- static char name[sizeof(SPAN_LEFT_NUMERIC_WIDTH_PREFIX)+INT_DIGITS+1+INT_DIGITS];
- sprintf(name, SPAN_LEFT_NUMERIC_WIDTH_PREFIX "%d", start_col);
- if (end_col != start_col)
- sprintf(strchr(name, '\0'), ",%d", end_col);
- return string(name);
-}
-
-string span_right_numeric_width_reg(int start_col, int end_col)
-{
- static char name[sizeof(SPAN_RIGHT_NUMERIC_WIDTH_PREFIX)+INT_DIGITS+1+INT_DIGITS];
- sprintf(name, SPAN_RIGHT_NUMERIC_WIDTH_PREFIX "%d", start_col);
- if (end_col != start_col)
- sprintf(strchr(name, '\0'), ",%d", end_col);
- return string(name);
-}
-
-string span_alphabetic_width_reg(int start_col, int end_col)
-{
- static char name[sizeof(SPAN_ALPHABETIC_WIDTH_PREFIX)+INT_DIGITS+1+INT_DIGITS];
- sprintf(name, SPAN_ALPHABETIC_WIDTH_PREFIX "%d", start_col);
- if (end_col != start_col)
- sprintf(strchr(name, '\0'), ",%d", end_col);
- return string(name);
-}
-
-
-string column_separation_reg(int col)
-{
- static char name[sizeof(COLUMN_SEPARATION_PREFIX)+INT_DIGITS];
- sprintf(name, COLUMN_SEPARATION_PREFIX "%d", col);
- return string(name);
-}
-
-string row_start_reg(int row)
-{
- static char name[sizeof(ROW_START_PREFIX)+INT_DIGITS];
- sprintf(name, ROW_START_PREFIX "%d", row);
- return string(name);
-}
-
-string column_start_reg(int col)
-{
- static char name[sizeof(COLUMN_START_PREFIX)+INT_DIGITS];
- sprintf(name, COLUMN_START_PREFIX "%d", col);
- return string(name);
-}
-
-string column_end_reg(int col)
-{
- static char name[sizeof(COLUMN_END_PREFIX)+INT_DIGITS];
- sprintf(name, COLUMN_END_PREFIX "%d", col);
- return string(name);
-}
-
-string column_divide_reg(int col)
-{
- static char name[sizeof(COLUMN_DIVIDE_PREFIX)+INT_DIGITS];
- sprintf(name, COLUMN_DIVIDE_PREFIX "%d", col);
- return string(name);
-}
-
-string row_top_reg(int row)
-{
- static char name[sizeof(ROW_TOP_PREFIX)+INT_DIGITS];
- sprintf(name, ROW_TOP_PREFIX "%d", row);
- return string(name);
-}
-
-void init_span_reg(int start_col, int end_col)
-{
- printfs(".nr %1 \\n(.H\n.nr %2 0\n.nr %3 0\n.nr %4 0\n",
- span_width_reg(start_col, end_col),
- span_alphabetic_width_reg(start_col, end_col),
- span_left_numeric_width_reg(start_col, end_col),
- span_right_numeric_width_reg(start_col, end_col));
-}
-
-void compute_span_width(int start_col, int end_col)
-{
- printfs(".nr %1 \\n[%1]>?(\\n[%2]+\\n[%3])\n"
- ".if \\n[%4] .nr %1 \\n[%1]>?(\\n[%4]+2n)\n",
- span_width_reg(start_col, end_col),
- span_left_numeric_width_reg(start_col, end_col),
- span_right_numeric_width_reg(start_col, end_col),
- span_alphabetic_width_reg(start_col, end_col));
-
-}
-
-// Increase the widths of columns so that the width of any spanning entry
-// is no greater than the sum of the widths of the columns that it spans.
-// Ensure that the widths of columns remain equal.
-
-void table::divide_span(int start_col, int end_col)
-{
- assert(end_col > start_col);
- printfs(".nr " NEEDED_REG " \\n[%1]-(\\n[%2]",
- span_width_reg(start_col, end_col),
- span_width_reg(start_col, start_col));
- int i;
- for (i = start_col + 1; i <= end_col; i++) {
- // The column separation may shrink with the expand option.
- if (!(flags & EXPAND))
- printfs("+%1n", as_string(column_separation[i - 1]));
- printfs("+\\n[%1]", span_width_reg(i, i));
- }
- prints(")\n");
- printfs(".nr " NEEDED_REG " \\n[" NEEDED_REG "]/%1\n",
- as_string(end_col - start_col + 1));
- prints(".if \\n[" NEEDED_REG "] \\{");
- for (i = start_col; i <= end_col; i++)
- printfs(".nr %1 +\\n[" NEEDED_REG "]\n",
- span_width_reg(i, i));
- int equal_flag = 0;
- for (i = start_col; i <= end_col && !equal_flag; i++)
- if (equal[i])
- equal_flag = 1;
- if (equal_flag) {
- for (i = 0; i < ncolumns; i++)
- if (i < start_col || i > end_col)
- printfs(".nr %1 +\\n[" NEEDED_REG "]\n",
- span_width_reg(i, i));
- }
- prints(".\\}\n");
-}
-
-
-void table::sum_columns(int start_col, int end_col)
-{
- assert(end_col > start_col);
- printfs(".nr %1 \\n[%2]",
- span_width_reg(start_col, end_col),
- span_width_reg(start_col, start_col));
- for (int i = start_col + 1; i <= end_col; i++)
- printfs("+(%1*\\n[" SEPARATION_FACTOR_REG "])+\\n[%2]",
- as_string(column_separation[i - 1]),
- span_width_reg(i, i));
- prints('\n');
-}
-
-horizontal_span::horizontal_span(int sc, int ec, horizontal_span *p)
-: next(p), start_col(sc), end_col(ec)
-{
-}
-
-void table::build_span_list()
-{
- span_list = 0;
- table_entry *p = entry_list;
- while (p) {
- if (p->end_col != p->start_col) {
- horizontal_span *q;
- for (q = span_list; q; q = q->next)
- if (q->start_col == p->start_col
- && q->end_col == p->end_col)
- break;
- if (!q)
- span_list = new horizontal_span(p->start_col, p->end_col, span_list);
- }
- p = p->next;
- }
- // Now sort span_list primarily by order of end_row, and secondarily
- // by reverse order of start_row. This ensures that if we divide
- // spans using the order in span_list, we will get reasonable results.
- horizontal_span *unsorted = span_list;
- span_list = 0;
- while (unsorted) {
- horizontal_span **pp;
- for (pp = &span_list; *pp; pp = &(*pp)->next)
- if (unsorted->end_col < (*pp)->end_col
- || (unsorted->end_col == (*pp)->end_col
- && (unsorted->start_col > (*pp)->start_col)))
- break;
- horizontal_span *tem = unsorted->next;
- unsorted->next = *pp;
- *pp = unsorted;
- unsorted = tem;
- }
-}
-
-
-void table::compute_separation_factor()
-{
- if (flags & (ALLBOX|BOX|DOUBLEBOX))
- left_separation = right_separation = 1;
- else {
- for (int i = 0; i < nrows; i++) {
- if (vline[i][0] > 0)
- left_separation = 1;
- if (vline[i][ncolumns] > 0)
- right_separation = 1;
- }
- }
- if (flags & EXPAND) {
- int total_sep = left_separation + right_separation;
- int i;
- for (i = 0; i < ncolumns - 1; i++)
- total_sep += column_separation[i];
- if (total_sep != 0) {
- // Don't let the separation factor be negative.
- prints(".nr " SEPARATION_FACTOR_REG " \\n[.l]-\\n[.i]");
- for (i = 0; i < ncolumns; i++)
- printfs("-\\n[%1]", span_width_reg(i, i));
- printfs("/%1>?0\n", as_string(total_sep));
- }
- }
-}
-
-void table::compute_column_positions()
-{
- printfs(".nr %1 0\n", column_divide_reg(0));
- printfs(".nr %1 %2*\\n[" SEPARATION_FACTOR_REG "]\n",
- column_start_reg(0),
- as_string(left_separation));
- int i;
- for (i = 1;; i++) {
- printfs(".nr %1 \\n[%2]+\\n[%3]\n",
- column_end_reg(i-1),
- column_start_reg(i-1),
- span_width_reg(i-1, i-1));
- if (i >= ncolumns)
- break;
- printfs(".nr %1 \\n[%2]+(%3*\\n[" SEPARATION_FACTOR_REG "])\n",
- column_start_reg(i),
- column_end_reg(i-1),
- as_string(column_separation[i-1]));
- printfs(".nr %1 \\n[%2]+\\n[%3]/2\n",
- column_divide_reg(i),
- column_end_reg(i-1),
- column_start_reg(i));
- }
- printfs(".nr %1 \\n[%2]+(%3*\\n[" SEPARATION_FACTOR_REG "])\n",
- column_divide_reg(ncolumns),
- column_end_reg(i-1),
- as_string(right_separation));
- printfs(".nr TW \\n[%1]\n",
- column_divide_reg(ncolumns));
- if (flags & DOUBLEBOX) {
- printfs(".nr %1 +" DOUBLE_LINE_SEP "\n", column_divide_reg(0));
- printfs(".nr %1 -" DOUBLE_LINE_SEP "\n", column_divide_reg(ncolumns));
- }
-}
-
-void table::make_columns_equal()
-{
- int first = -1; // index of first equal column
- int i;
- for (i = 0; i < ncolumns; i++)
- if (equal[i]) {
- if (first < 0) {
- printfs(".nr %1 \\n[%1]", span_width_reg(i, i));
- first = i;
- }
- else
- printfs(">?\\n[%1]", span_width_reg(i, i));
- }
- if (first >= 0) {
- prints('\n');
- for (i = first + 1; i < ncolumns; i++)
- if (equal[i])
- printfs(".nr %1 \\n[%2]\n",
- span_width_reg(i, i),
- span_width_reg(first, first));
- }
-}
-
-void table::compute_widths()
-{
- build_span_list();
- int i;
- horizontal_span *p;
- prints(".nr " SEPARATION_FACTOR_REG " 1n\n");
- for (i = 0; i < ncolumns; i++) {
- init_span_reg(i, i);
- if (!minimum_width[i].empty())
- printfs(".nr %1 %2\n", span_width_reg(i, i), minimum_width[i]);
- }
- for (p = span_list; p; p = p->next)
- init_span_reg(p->start_col, p->end_col);
- table_entry *q;
- for (q = entry_list; q; q = q->next)
- if (!q->mod->zero_width)
- q->do_width();
- for (i = 0; i < ncolumns; i++)
- compute_span_width(i, i);
- for (p = span_list; p; p = p->next)
- compute_span_width(p->start_col, p->end_col);
- make_columns_equal();
- // Note that divide_span keeps equal width columns equal.
- for (p = span_list; p; p = p->next)
- divide_span(p->start_col, p->end_col);
- for (p = span_list; p; p = p->next)
- sum_columns(p->start_col, p->end_col);
- int had_spanning_block = 0;
- int had_equal_block = 0;
- for (q = entry_list; q; q = q->next)
- if (q->divert(ncolumns, minimum_width,
- (flags & EXPAND) ? column_separation : 0)) {
- if (q->end_col > q->start_col)
- had_spanning_block = 1;
- for (i = q->start_col; i <= q->end_col && !had_equal_block; i++)
- if (equal[i])
- had_equal_block = 1;
- }
- if (had_equal_block)
- make_columns_equal();
- if (had_spanning_block)
- for (p = span_list; p; p = p->next)
- divide_span(p->start_col, p->end_col);
- compute_separation_factor();
- for (p = span_list; p; p = p->next)
- sum_columns(p->start_col, p->end_col);
- compute_column_positions();
-}
-
-void table::print_single_hline(int r)
-{
- prints(".vs " LINE_SEP ">?\\n[.V]u\n"
- ".ls 1\n"
- "\\v'" BODY_DEPTH "'"
- "\\s[\\n[" LINESIZE_REG "]]");
- if (r > nrows - 1)
- prints("\\D'l |\\n[TW]u 0'");
- else {
- int start_col = 0;
- for (;;) {
- while (start_col < ncolumns
- && entry[r][start_col] != 0
- && entry[r][start_col]->start_row != r)
- start_col++;
- int end_col;
- for (end_col = start_col;
- end_col < ncolumns
- && (entry[r][end_col] == 0
- || entry[r][end_col]->start_row == r);
- end_col++)
- ;
- if (end_col <= start_col)
- break;
- printfs("\\h'|\\n[%1]u",
- column_divide_reg(start_col));
- if ((r > 0 && vline[r-1][start_col] == 2)
- || (r < nrows && vline[r][start_col] == 2))
- prints("-" HALF_DOUBLE_LINE_SEP);
- prints("'");
- printfs("\\D'l |\\n[%1]u",
- column_divide_reg(end_col));
- if ((r > 0 && vline[r-1][end_col] == 2)
- || (r < nrows && vline[r][end_col] == 2))
- prints("+" HALF_DOUBLE_LINE_SEP);
- prints(" 0'");
- start_col = end_col;
- }
- }
- prints("\\s0\n");
- prints(".ls\n"
- ".vs\n");
-}
-
-void table::print_double_hline(int r)
-{
- prints(".vs " LINE_SEP "+" DOUBLE_LINE_SEP
- ">?\\n[.V]u\n"
- ".ls 1\n"
- "\\v'" BODY_DEPTH "'"
- "\\s[\\n[" LINESIZE_REG "]]");
- if (r > nrows - 1)
- prints("\\v'-" DOUBLE_LINE_SEP "'"
- "\\D'l |\\n[TW]u 0'"
- "\\v'" DOUBLE_LINE_SEP "'"
- "\\h'|0'"
- "\\D'l |\\n[TW]u 0'");
- else {
- int start_col = 0;
- for (;;) {
- while (start_col < ncolumns
- && entry[r][start_col] != 0
- && entry[r][start_col]->start_row != r)
- start_col++;
- int end_col;
- for (end_col = start_col;
- end_col < ncolumns
- && (entry[r][end_col] == 0
- || entry[r][end_col]->start_row == r);
- end_col++)
- ;
- if (end_col <= start_col)
- break;
- const char *left_adjust = 0;
- if ((r > 0 && vline[r-1][start_col] == 2)
- || (r < nrows && vline[r][start_col] == 2))
- left_adjust = "-" HALF_DOUBLE_LINE_SEP;
- const char *right_adjust = 0;
- if ((r > 0 && vline[r-1][end_col] == 2)
- || (r < nrows && vline[r][end_col] == 2))
- right_adjust = "+" HALF_DOUBLE_LINE_SEP;
- printfs("\\v'-" DOUBLE_LINE_SEP "'"
- "\\h'|\\n[%1]u",
- column_divide_reg(start_col));
- if (left_adjust)
- prints(left_adjust);
- prints("'");
- printfs("\\D'l |\\n[%1]u",
- column_divide_reg(end_col));
- if (right_adjust)
- prints(right_adjust);
- prints(" 0'");
- printfs("\\v'" DOUBLE_LINE_SEP "'"
- "\\h'|\\n[%1]u",
- column_divide_reg(start_col));
- if (left_adjust)
- prints(left_adjust);
- prints("'");
- printfs("\\D'l |\\n[%1]u",
- column_divide_reg(end_col));
- if (right_adjust)
- prints(right_adjust);
- prints(" 0'");
- start_col = end_col;
- }
- }
- prints("\\s0\n"
- ".ls\n"
- ".vs\n");
-}
-
-void table::compute_vrule_top_adjust(int start_row, int col, string &result)
-{
- if (row_is_all_lines[start_row] && start_row < nrows - 1) {
- if (row_is_all_lines[start_row] == 2)
- result = LINE_SEP ">?\\n[.V]u" "+" DOUBLE_LINE_SEP;
- else
- result = LINE_SEP ">?\\n[.V]u";
- start_row++;
- }
- else {
- result = "";
- if (start_row == 0)
- return;
- for (stuff *p = stuff_list; p && p->row <= start_row; p = p->next)
- if (p->row == start_row
- && (p->is_single_line() || p->is_double_line()))
- return;
- }
- int left = 0;
- if (col > 0) {
- table_entry *e = entry[start_row-1][col-1];
- if (e && e->start_row == e->end_row) {
- if (e->to_double_line_entry() != 0)
- left = 2;
- else if (e->to_single_line_entry() != 0)
- left = 1;
- }
- }
- int right = 0;
- if (col < ncolumns) {
- table_entry *e = entry[start_row-1][col];
- if (e && e->start_row == e->end_row) {
- if (e->to_double_line_entry() != 0)
- right = 2;
- else if (e->to_single_line_entry() != 0)
- right = 1;
- }
- }
- if (row_is_all_lines[start_row-1] == 0) {
- if (left > 0 || right > 0) {
- result += "-" BODY_DEPTH "-" BAR_HEIGHT;
- if ((left == 2 && right != 2) || (right == 2 && left != 2))
- result += "-" HALF_DOUBLE_LINE_SEP;
- else if (left == 2 && right == 2)
- result += "+" HALF_DOUBLE_LINE_SEP;
- }
- }
- else if (row_is_all_lines[start_row-1] == 2) {
- if ((left == 2 && right != 2) || (right == 2 && left != 2))
- result += "-" DOUBLE_LINE_SEP;
- else if (left == 1 || right == 1)
- result += "-" HALF_DOUBLE_LINE_SEP;
- }
-}
-
-void table::compute_vrule_bot_adjust(int end_row, int col, string &result)
-{
- if (row_is_all_lines[end_row] && end_row > 0) {
- end_row--;
- result = "";
- }
- else {
- stuff *p;
- for (p = stuff_list; p && p->row < end_row + 1; p = p->next)
- ;
- if (p && p->row == end_row + 1 && p->is_double_line()) {
- result = "-" DOUBLE_LINE_SEP;
- return;
- }
- if ((p != 0 && p->row == end_row + 1)
- || end_row == nrows - 1) {
- result = "";
- return;
- }
- if (row_is_all_lines[end_row+1] == 1)
- result = LINE_SEP;
- else if (row_is_all_lines[end_row+1] == 2)
- result = LINE_SEP "+" DOUBLE_LINE_SEP;
- else
- result = "";
- }
- int left = 0;
- if (col > 0) {
- table_entry *e = entry[end_row+1][col-1];
- if (e && e->start_row == e->end_row) {
- if (e->to_double_line_entry() != 0)
- left = 2;
- else if (e->to_single_line_entry() != 0)
- left = 1;
- }
- }
- int right = 0;
- if (col < ncolumns) {
- table_entry *e = entry[end_row+1][col];
- if (e && e->start_row == e->end_row) {
- if (e->to_double_line_entry() != 0)
- right = 2;
- else if (e->to_single_line_entry() != 0)
- right = 1;
- }
- }
- if (row_is_all_lines[end_row+1] == 0) {
- if (left > 0 || right > 0) {
- result = "1v-" BODY_DEPTH "-" BAR_HEIGHT;
- if ((left == 2 && right != 2) || (right == 2 && left != 2))
- result += "+" HALF_DOUBLE_LINE_SEP;
- else if (left == 2 && right == 2)
- result += "-" HALF_DOUBLE_LINE_SEP;
- }
- }
- else if (row_is_all_lines[end_row+1] == 2) {
- if (left == 2 && right == 2)
- result += "-" DOUBLE_LINE_SEP;
- else if (left != 2 && right != 2 && (left == 1 || right == 1))
- result += "-" HALF_DOUBLE_LINE_SEP;
- }
-}
-
-void table::add_vertical_rule(int start_row, int end_row, int col, int is_double)
-{
- vrule_list = new vertical_rule(start_row, end_row, col, is_double,
- vrule_list);
- compute_vrule_top_adjust(start_row, col, vrule_list->top_adjust);
- compute_vrule_bot_adjust(end_row, col, vrule_list->bot_adjust);
-}
-
-void table::build_vrule_list()
-{
- int col;
- if (flags & ALLBOX) {
- for (col = 1; col < ncolumns; col++) {
- int start_row = 0;
- for (;;) {
- while (start_row < nrows && vline_spanned(start_row, col))
- start_row++;
- if (start_row >= nrows)
- break;
- int end_row = start_row;
- while (end_row < nrows && !vline_spanned(end_row, col))
- end_row++;
- end_row--;
- add_vertical_rule(start_row, end_row, col, 0);
- start_row = end_row + 1;
- }
- }
- }
- if (flags & (BOX|ALLBOX|DOUBLEBOX)) {
- add_vertical_rule(0, nrows - 1, 0, 0);
- add_vertical_rule(0, nrows - 1, ncolumns, 0);
- }
- for (int end_row = 0; end_row < nrows; end_row++)
- for (col = 0; col < ncolumns+1; col++)
- if (vline[end_row][col] > 0
- && !vline_spanned(end_row, col)
- && (end_row == nrows - 1
- || vline[end_row+1][col] != vline[end_row][col]
- || vline_spanned(end_row+1, col))) {
- int start_row;
- for (start_row = end_row - 1;
- start_row >= 0
- && vline[start_row][col] == vline[end_row][col]
- && !vline_spanned(start_row, col);
- start_row--)
- ;
- start_row++;
- add_vertical_rule(start_row, end_row, col, vline[end_row][col] > 1);
- }
- for (vertical_rule *p = vrule_list; p; p = p->next)
- if (p->is_double)
- for (int r = p->start_row; r <= p->end_row; r++) {
- if (p->col > 0 && entry[r][p->col-1] != 0
- && entry[r][p->col-1]->end_col == p->col-1) {
- int is_corner = r == p->start_row || r == p->end_row;
- entry[r][p->col-1]->note_double_vrule_on_right(is_corner);
- }
- if (p->col < ncolumns && entry[r][p->col] != 0
- && entry[r][p->col]->start_col == p->col) {
- int is_corner = r == p->start_row || r == p->end_row;
- entry[r][p->col]->note_double_vrule_on_left(is_corner);
- }
- }
-}
-
-void table::define_bottom_macro()
-{
- prints(".eo\n"
- ".de T#\n"
- ".if !\\n[" SUPPRESS_BOTTOM_REG "] \\{"
- "." REPEATED_VPT_MACRO " 0\n"
- ".mk " SAVED_VERTICAL_POS_REG "\n");
- if (flags & (BOX|ALLBOX|DOUBLEBOX)) {
- prints(".if \\n[T.]&\\n[" NEED_BOTTOM_RULE_REG "] \\{");
- print_single_hline(0);
- prints(".\\}\n");
- }
- prints(".ls 1\n");
- for (vertical_rule *p = vrule_list; p; p = p->next)
- p->contribute_to_bottom_macro(this);
- if (flags & DOUBLEBOX)
- prints(".if \\n[T.] \\{.vs " DOUBLE_LINE_SEP ">?\\n[.V]u\n"
- "\\v'" BODY_DEPTH "'\\s[\\n[" LINESIZE_REG "]]"
- "\\D'l \\n[TW]u 0'\\s0\n"
- ".vs\n"
- ".\\}\n"
- ".if \\n[" LAST_PASSED_ROW_REG "]>=0 "
- ".nr " TOP_REG " \\n[#T]-" DOUBLE_LINE_SEP "\n"
- ".sp -1\n"
- "\\v'" BODY_DEPTH "'\\s[\\n[" LINESIZE_REG "]]"
- "\\D'l 0 |\\n[" TOP_REG "]u-1v'\\s0\n"
- ".sp -1\n"
- "\\v'" BODY_DEPTH "'\\h'|\\n[TW]u'\\s[\\n[" LINESIZE_REG "]]"
- "\\D'l 0 |\\n[" TOP_REG "]u-1v'\\s0\n");
- prints(".ls\n");
- prints(".nr " LAST_PASSED_ROW_REG " \\n[" CURRENT_ROW_REG "]\n"
- ".sp |\\n[" SAVED_VERTICAL_POS_REG "]u\n"
- "." REPEATED_VPT_MACRO " 1\n"
- ".\\}\n"
- "..\n"
- ".ec\n");
-}
-
-
-// is the vertical line before column c in row r horizontally spanned?
-
-int table::vline_spanned(int r, int c)
-{
- assert(r >= 0 && r < nrows && c >= 0 && c < ncolumns + 1);
- return (c != 0 && c != ncolumns && entry[r][c] != 0
- && entry[r][c]->start_col != c
- // horizontally spanning lines don't count
- && entry[r][c]->to_double_line_entry() == 0
- && entry[r][c]->to_single_line_entry() == 0);
-}
-
-int table::row_begins_section(int r)
-{
- assert(r >= 0 && r < nrows);
- for (int i = 0; i < ncolumns; i++)
- if (entry[r][i] && entry[r][i]->start_row != r)
- return 0;
- return 1;
-}
-
-int table::row_ends_section(int r)
-{
- assert(r >= 0 && r < nrows);
- for (int i = 0; i < ncolumns; i++)
- if (entry[r][i] && entry[r][i]->end_row != r)
- return 0;
- return 1;
-}
-
-void table::do_row(int r)
-{
- if (!(flags & NOKEEP) && row_begins_section(r))
- prints("." KEEP_MACRO_NAME "\n");
- int had_line = 0;
- stuff *p;
- for (p = stuff_list; p && p->row < r; p = p->next)
- ;
- for (stuff *p1 = p; p1 && p1->row == r; p1 = p1->next)
- if (!p1->printed && (p1->is_single_line() || p1->is_double_line())) {
- had_line = 1;
- break;
- }
- if (!had_line && !row_is_all_lines[r])
- printfs("." REPEATED_MARK_MACRO " %1\n", row_top_reg(r));
- had_line = 0;
- for (; p && p->row == r; p = p->next)
- if (!p->printed) {
- p->print(this);
- if (!had_line && (p->is_single_line() || p->is_double_line())) {
- printfs("." REPEATED_MARK_MACRO " %1\n", row_top_reg(r));
- had_line = 1;
- }
- }
- // Change the row *after* printing the stuff list (which might contain .TH).
- printfs("\\*[" TRANSPARENT_STRING_NAME "].nr " CURRENT_ROW_REG " %1\n",
- as_string(r));
- if (!had_line && row_is_all_lines[r])
- printfs("." REPEATED_MARK_MACRO " %1\n", row_top_reg(r));
- // we might have had a .TH, for example, since we last tried
- if (!(flags & NOKEEP) && row_begins_section(r))
- prints("." KEEP_MACRO_NAME "\n");
- printfs(".mk %1\n", row_start_reg(r));
- prints(".mk " BOTTOM_REG "\n"
- "." REPEATED_VPT_MACRO " 0\n");
- int c;
- int row_is_blank = 1;
- int first_start_row = r;
- for (c = 0; c < ncolumns; c++) {
- table_entry *e = entry[r][c];
- if (e) {
- if (e->end_row == r) {
- e->do_depth();
- if (e->start_row < first_start_row)
- first_start_row = e->start_row;
- row_is_blank = 0;
- }
- c = e->end_col;
- }
- }
- if (row_is_blank)
- prints(".nr " BOTTOM_REG " +1v\n");
- if (row_is_all_lines[r]) {
- prints(".vs " LINE_SEP);
- if (row_is_all_lines[r] == 2)
- prints("+" DOUBLE_LINE_SEP);
- prints(">?\\n[.V]u\n.ls 1\n");
- prints("\\&");
- prints("\\v'" BODY_DEPTH);
- if (row_is_all_lines[r] == 2)
- prints("-" HALF_DOUBLE_LINE_SEP);
- prints("'");
- for (c = 0; c < ncolumns; c++) {
- table_entry *e = entry[r][c];
- if (e) {
- if (e->end_row == e->start_row)
- e->to_simple_entry()->simple_print(1);
- c = e->end_col;
- }
- }
- prints("\n");
- prints(".ls\n"
- ".vs\n");
- prints(".nr " BOTTOM_REG " \\n[" BOTTOM_REG "]>?\\n[.d]\n");
- printfs(".sp |\\n[%1]u\n", row_start_reg(r));
- }
- for (int i = row_is_all_lines[r] ? r - 1 : r;
- i >= first_start_row;
- i--) {
- simple_entry *first = 0;
- for (c = 0; c < ncolumns; c++) {
- table_entry *e = entry[r][c];
- if (e) {
- if (e->end_row == r && e->start_row == i) {
- simple_entry *simple = e->to_simple_entry();
- if (simple) {
- if (!first) {
- prints(".ta");
- first = simple;
- }
- simple->add_tab();
- }
- }
- c = e->end_col;
- }
- }
- if (first) {
- prints('\n');
- first->position_vertically();
- first->set_location();
- prints("\\&");
- first->simple_print(0);
- for (c = first->end_col + 1; c < ncolumns; c++) {
- table_entry *e = entry[r][c];
- if (e) {
- if (e->end_row == r && e->start_row == i) {
- simple_entry *simple = e->to_simple_entry();
- if (simple)
- simple->simple_print(0);
- }
- c = e->end_col;
- }
- }
- prints('\n');
- prints(".nr " BOTTOM_REG " \\n[" BOTTOM_REG "]>?\\n[.d]\n");
- printfs(".sp |\\n[%1]u\n", row_start_reg(r));
- }
- }
- for (c = 0; c < ncolumns; c++) {
- table_entry *e = entry[r][c];
- if (e) {
- if (e->end_row == r && e->to_simple_entry() == 0) {
- e->position_vertically();
- e->print();
- prints(".nr " BOTTOM_REG " \\n[" BOTTOM_REG "]>?\\n[.d]\n");
- printfs(".sp |\\n[%1]u\n", row_start_reg(r));
- }
- c = e->end_col;
- }
- }
- prints("." REPEATED_VPT_MACRO " 1\n"
- ".sp |\\n[" BOTTOM_REG "]u\n"
- "\\*[" TRANSPARENT_STRING_NAME "].nr " NEED_BOTTOM_RULE_REG " 1\n");
- if (r != nrows - 1 && (flags & ALLBOX)) {
- print_single_hline(r + 1);
- prints("\\*[" TRANSPARENT_STRING_NAME "].nr " NEED_BOTTOM_RULE_REG " 0\n");
- }
- if (r != nrows - 1) {
- if (p && p->row == r + 1
- && (p->is_single_line() || p->is_double_line())) {
- p->print(this);
- prints("\\*[" TRANSPARENT_STRING_NAME "].nr " NEED_BOTTOM_RULE_REG
- " 0\n");
- }
- int printed_one = 0;
- for (vertical_rule *vr = vrule_list; vr; vr = vr->next)
- if (vr->end_row == r) {
- if (!printed_one) {
- prints("." REPEATED_VPT_MACRO " 0\n");
- printed_one = 1;
- }
- vr->print();
- }
- if (printed_one)
- prints("." REPEATED_VPT_MACRO " 1\n");
- if (!(flags & NOKEEP) && row_ends_section(r))
- prints("." RELEASE_MACRO_NAME "\n");
- }
-}
-
-void table::do_top()
-{
- prints(".fc \002\003\n");
- if (!(flags & NOKEEP) && (flags & (BOX|DOUBLEBOX|ALLBOX)))
- prints("." TABLE_KEEP_MACRO_NAME "\n");
- if (flags & DOUBLEBOX) {
- prints(".ls 1\n"
- ".vs " LINE_SEP ">?\\n[.V]u\n"
- "\\v'" BODY_DEPTH "'\\s[\\n[" LINESIZE_REG "]]\\D'l \\n[TW]u 0'\\s0\n"
- ".vs\n"
- "." REPEATED_MARK_MACRO " " TOP_REG "\n"
- ".vs " DOUBLE_LINE_SEP ">?\\n[.V]u\n");
- printfs("\\v'" BODY_DEPTH "'"
- "\\s[\\n[" LINESIZE_REG "]]"
- "\\h'\\n[%1]u'"
- "\\D'l |\\n[%2]u 0'"
- "\\s0"
- "\n",
- column_divide_reg(0),
- column_divide_reg(ncolumns));
- prints(".ls\n"
- ".vs\n");
- }
- else if (flags & (ALLBOX|BOX)) {
- print_single_hline(0);
- }
- //printfs(".mk %1\n", row_top_reg(0));
-}
-
-void table::do_bottom()
-{
- // print stuff after last row
- for (stuff *p = stuff_list; p; p = p->next)
- if (p->row > nrows - 1)
- p->print(this);
- if (!(flags & NOKEEP))
- prints("." RELEASE_MACRO_NAME "\n");
- printfs(".mk %1\n", row_top_reg(nrows));
- prints(".nr " NEED_BOTTOM_RULE_REG " 1\n"
- ".nr T. 1\n"
- ".T#\n");
- if (!(flags & NOKEEP) && (flags & (BOX|DOUBLEBOX|ALLBOX)))
- prints("." TABLE_RELEASE_MACRO_NAME "\n");
- if (flags & DOUBLEBOX)
- prints(".sp " DOUBLE_LINE_SEP "\n");
- prints("." RESET_MACRO_NAME "\n"
- ".fc\n"
- ".cp \\n(" COMPATIBLE_REG "\n");
-}
-
-int table::get_nrows()
-{
- return nrows;
-}
-
-const char *last_filename = 0;
-
-void set_troff_location(const char *fn, int ln)
-{
- if (!location_force_filename && last_filename != 0
- && strcmp(fn, last_filename) == 0)
- printfs(".lf %1\n", as_string(ln));
- else {
- printfs(".lf %1 %2\n", as_string(ln), fn);
- last_filename = fn;
- location_force_filename = 0;
- }
-}
-
-void printfs(const char *s, const string &arg1, const string &arg2,
- const string &arg3, const string &arg4, const string &arg5)
-{
- if (s) {
- char c;
- while ((c = *s++) != '\0') {
- if (c == '%') {
- switch (*s++) {
- case '1':
- prints(arg1);
- break;
- case '2':
- prints(arg2);
- break;
- case '3':
- prints(arg3);
- break;
- case '4':
- prints(arg4);
- break;
- case '5':
- prints(arg5);
- break;
- case '6':
- case '7':
- case '8':
- case '9':
- break;
- case '%':
- prints('%');
- break;
- default:
- assert(0);
- }
- }
- else
- prints(c);
- }
- }
-}
-
diff --git a/contrib/groff/src/preproc/tbl/table.h b/contrib/groff/src/preproc/tbl/table.h
deleted file mode 100644
index ca55b8026c22..000000000000
--- a/contrib/groff/src/preproc/tbl/table.h
+++ /dev/null
@@ -1,152 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include "cset.h"
-#include "cmap.h"
-#include "stringclass.h"
-#include "errarg.h"
-#include "error.h"
-#include "lib.h"
-
-struct inc_number {
- short inc;
- short val;
-};
-
-struct entry_modifier {
- inc_number point_size;
- inc_number vertical_spacing;
- string font;
- enum { CENTER, TOP, BOTTOM } vertical_alignment;
- char zero_width;
- char stagger;
-
- entry_modifier();
- ~entry_modifier();
-};
-
-enum format_type {
- FORMAT_LEFT,
- FORMAT_CENTER,
- FORMAT_RIGHT,
- FORMAT_NUMERIC,
- FORMAT_ALPHABETIC,
- FORMAT_SPAN,
- FORMAT_VSPAN,
- FORMAT_HLINE,
- FORMAT_DOUBLE_HLINE
-};
-
-struct entry_format : public entry_modifier {
- format_type type;
-
- entry_format(format_type);
- entry_format();
- void debug_print() const;
-};
-
-struct table_entry;
-struct horizontal_span;
-struct stuff;
-struct vertical_rule;
-
-class table {
- unsigned flags;
- int nrows;
- int ncolumns;
- int linesize;
- char delim[2];
- char decimal_point_char;
- vertical_rule *vrule_list;
- stuff *stuff_list;
- horizontal_span *span_list;
- table_entry *entry_list;
- table_entry **entry_list_tailp;
- table_entry ***entry;
- char **vline;
- char *row_is_all_lines;
- string *minimum_width;
- int *column_separation;
- char *equal;
- int left_separation;
- int right_separation;
- int allocated_rows;
- void build_span_list();
- void do_hspan(int r, int c);
- void do_vspan(int r, int c);
- void allocate(int r);
- void compute_widths();
- void divide_span(int, int);
- void sum_columns(int, int);
- void compute_separation_factor();
- void compute_column_positions();
- void do_row(int);
- void init_output();
- void add_stuff(stuff *);
- void do_top();
- void do_bottom();
- void do_vertical_rules();
- void build_vrule_list();
- void add_vertical_rule(int, int, int, int);
- void define_bottom_macro();
- int vline_spanned(int r, int c);
- int row_begins_section(int);
- int row_ends_section(int);
- void make_columns_equal();
- void compute_vrule_top_adjust(int, int, string &);
- void compute_vrule_bot_adjust(int, int, string &);
- void determine_row_type();
-public:
- /* used by flags */
- enum {
- CENTER = 01,
- EXPAND = 02,
- BOX = 04,
- ALLBOX = 010,
- DOUBLEBOX = 020,
- NOKEEP = 040
- };
- table(int nc, unsigned flags, int linesize, char decimal_point_char);
- ~table();
-
- void add_text_line(int r, const string &, const char *, int);
- void add_single_hline(int r);
- void add_double_hline(int r);
- void add_entry(int r, int c, const string &, const entry_format *,
- const char *, int lineno);
- void add_vlines(int r, const char *);
- void check();
- void print();
- void set_minimum_width(int c, const string &w);
- void set_column_separation(int c, int n);
- void set_equal_column(int c);
- void set_delim(char c1, char c2);
- void print_single_hline(int r);
- void print_double_hline(int r);
- int get_nrows();
-};
-
-void set_troff_location(const char *, int);
diff --git a/contrib/groff/src/preproc/tbl/tbl.man b/contrib/groff/src/preproc/tbl/tbl.man
deleted file mode 100644
index 6016ddf35f8f..000000000000
--- a/contrib/groff/src/preproc/tbl/tbl.man
+++ /dev/null
@@ -1,178 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-1995 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.TH @G@TBL @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-@g@tbl \- format tables for troff
-.SH SYNOPSIS
-.B @g@tbl
-[
-.B \-Cv
-]
-[
-.IR files \|.\|.\|.
-]
-.SH DESCRIPTION
-This manual page describes the GNU version of
-.BR tbl ,
-which is part of the groff document formatting system.
-.B tbl
-compiles descriptions of tables embedded within
-.B troff
-input files into commands that are understood by
-.BR troff .
-Normally, it should be invoked using the
-.B \-t
-option of
-.B groff.
-It is highly compatible with Unix
-.BR tbl .
-The output generated by GNU
-.B tbl
-cannot be processed with Unix
-.BR troff ;
-it must be processed with GNU
-.BR troff .
-If no files are given on the command line, the standard input
-will be read.
-A filename of
-.B \-
-will cause the standard input to be read.
-.SH OPTIONS
-.TP
-.B \-C
-Recognize
-.B .TS
-and
-.B .TE
-even when followed by a character other than space or newline.
-.TP
-.B \-v
-Print the version number.
-.SH USAGE
-Only the differences between GNU
-.B tbl
-and Unix
-.B tbl
-are described here.
-.LP
-Normally
-.B tbl
-attempts to prevent undesirable breaks in the table by using diversions.
-This can sometimes interact badly with macro packages' own use of diversions,
-when footnotes, for example, are used.
-The
-.B nokeep
-option tells
-.B tbl
-not to try and prevent breaks in this way.
-.LP
-The
-.B decimalpoint
-option specifies the character to be recognized as the decimal
-point character in place of the default period.
-It takes an argument in parentheses, which must be a single
-character, as for the
-.B tab
-option.
-.LP
-The
-.B f
-format modifier can be followed by an arbitrary length
-font name in parentheses.
-.LP
-There is a
-.B d
-format modifier which means that a vertically spanning entry
-should be aligned at the bottom of its range.
-.LP
-There is no limit on the number of columns in a table, nor any limit
-on the number of text blocks.
-All the lines of a table are considered in deciding column
-widths, not just the first 200.
-Table continuation
-.RB ( .T& )
-lines are not restricted to the first 200 lines.
-.LP
-Numeric and alphabetic items may appear in the same column.
-.LP
-Numeric and alphabetic items may span horizontally.
-.LP
-.B tbl
-uses register, string, macro and diversion names beginning with
-.BR 3 .
-When using
-.B tbl
-you should avoid using any names beginning with a
-.BR 3 .
-.SH BUGS
-You should use
-.BR .TS\ H / .TH
-in conjunction with a supporting macro package for
-.I all
-multi-page boxed tables.
-If there is no header that you wish to appear at the top of each page
-of the table, place the
-.B .TH
-line immediately after the format section.
-Do not enclose a multi-page table within keep/release macros,
-or divert it in any other way.
-.LP
-A text block within a table must be able to fit on one page.
-.LP
-The
-.B bp
-request cannot be used to force a page-break in a multi-page table.
-Instead, define
-.B BP
-as follows
-.IP
-.B .de BP
-.br
-.B .ie '\e\en(.z'' .bp \e\e$1
-.br
-.B .el \e!.BP \e\e$1
-.br
-.B ..
-.br
-.LP
-and use
-.B BP
-instead of
-.BR bp .
-.LP
-Using \ea directly in a table to get leaders will not work.
-This is correct behaviour: \ea is a
-.B uninterpreted
-leader.
-To get leaders use a real leader, either by using a control A or like
-this:
-.IP
-.nf
-.ft B
-\&.ds a \ea
-\&.TS
-tab(;);
-lw(1i) l.
-A\e*a;B
-\&.TE
-.ft
-.fi
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@)
diff --git a/contrib/groff/src/roff/groff/Makefile.sub b/contrib/groff/src/roff/groff/Makefile.sub
deleted file mode 100644
index 42ae221c47fa..000000000000
--- a/contrib/groff/src/roff/groff/Makefile.sub
+++ /dev/null
@@ -1,8 +0,0 @@
-PROG=groff
-MAN1=groff.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=groff.o pipeline.o
-CCSRCS=$(srcdir)/groff.cc
-CSRCS=$(srcdir)/pipeline.c
-HDRS=$(srcdir)/pipeline.h
diff --git a/contrib/groff/src/roff/groff/groff.cc b/contrib/groff/src/roff/groff/groff.cc
deleted file mode 100644
index aaca4e1fb93d..000000000000
--- a/contrib/groff/src/roff/groff/groff.cc
+++ /dev/null
@@ -1,731 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-// A front end for groff.
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <errno.h>
-
-#include "lib.h"
-#include "assert.h"
-#include "errarg.h"
-#include "error.h"
-#include "stringclass.h"
-#include "cset.h"
-#include "font.h"
-#include "device.h"
-#include "pipeline.h"
-#include "nonposix.h"
-#include "defs.h"
-
-#define GXDITVIEW "gxditview"
-
-// troff will be passed an argument of -rXREG=1 if the -X option is
-// specified
-#define XREG ".X"
-
-#ifdef NEED_DECLARATION_PUTENV
-extern "C" {
- int putenv(const char *);
-}
-#endif /* NEED_DECLARATION_PUTENV */
-
-const int SOELIM_INDEX = 0;
-const int REFER_INDEX = SOELIM_INDEX + 1;
-const int GRAP_INDEX = REFER_INDEX + 1;
-const int PIC_INDEX = GRAP_INDEX + 1;
-const int TBL_INDEX = PIC_INDEX + 1;
-const int GRN_INDEX = TBL_INDEX + 1;
-const int EQN_INDEX = GRN_INDEX + 1;
-const int TROFF_INDEX = EQN_INDEX + 1;
-const int POST_INDEX = TROFF_INDEX + 1;
-const int SPOOL_INDEX = POST_INDEX + 1;
-
-const int NCOMMANDS = SPOOL_INDEX + 1;
-
-class possible_command {
- char *name;
- string args;
- char **argv;
-
- void build_argv();
-public:
- possible_command();
- ~possible_command();
- void set_name(const char *);
- void set_name(const char *, const char *);
- const char *get_name();
- void append_arg(const char *, const char * = 0);
- void insert_arg(const char *);
- void clear_args();
- char **get_argv();
- void print(int is_last, FILE *fp);
-};
-
-int lflag = 0;
-char *spooler = 0;
-char *postdriver = 0;
-char *predriver = 0;
-
-possible_command commands[NCOMMANDS];
-
-int run_commands(int no_pipe);
-void print_commands();
-void append_arg_to_string(const char *arg, string &str);
-void handle_unknown_desc_command(const char *command, const char *arg,
- const char *filename, int lineno);
-const char *xbasename(const char *);
-
-void usage(FILE *stream);
-void help();
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- assert(NCOMMANDS <= MAX_COMMANDS);
- string Pargs, Largs, Fargs;
- int vflag = 0;
- int Vflag = 0;
- int zflag = 0;
- int iflag = 0;
- int Xflag = 0;
- int safer_flag = 1;
- int opt;
- const char *command_prefix = getenv("GROFF_COMMAND_PREFIX");
- if (!command_prefix)
- command_prefix = PROG_PREFIX;
- commands[TROFF_INDEX].set_name(command_prefix, "troff");
- static const struct option long_options[] = {
- { "help", no_argument, 0, 'h' },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv,
- "abCd:eEf:F:gGhiI:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ",
- long_options, NULL))
- != EOF) {
- char buf[3];
- buf[0] = '-';
- buf[1] = opt;
- buf[2] = '\0';
- switch (opt) {
- case 'i':
- iflag = 1;
- break;
- case 'I':
- commands[SOELIM_INDEX].set_name(command_prefix, "soelim");
- commands[SOELIM_INDEX].append_arg(buf, optarg);
- break;
- case 't':
- commands[TBL_INDEX].set_name(command_prefix, "tbl");
- break;
- case 'p':
- commands[PIC_INDEX].set_name(command_prefix, "pic");
- break;
- case 'g':
- commands[GRN_INDEX].set_name(command_prefix, "grn");
- break;
- case 'G':
- commands[GRAP_INDEX].set_name(command_prefix, "grap");
- break;
- case 'e':
- commands[EQN_INDEX].set_name(command_prefix, "eqn");
- break;
- case 's':
- commands[SOELIM_INDEX].set_name(command_prefix, "soelim");
- break;
- case 'R':
- commands[REFER_INDEX].set_name(command_prefix, "refer");
- break;
- case 'z':
- case 'a':
- commands[TROFF_INDEX].append_arg(buf);
- // fall through
- case 'Z':
- zflag++;
- break;
- case 'l':
- lflag++;
- break;
- case 'V':
- Vflag++;
- break;
- case 'v':
- vflag = 1;
- {
- extern const char *Version_string;
- printf("GNU groff version %s\n", Version_string);
- printf("Copyright (C) 1989-2001 Free Software Foundation, Inc.\n"
- "GNU groff comes with ABSOLUTELY NO WARRANTY.\n"
- "You may redistribute copies of groff and its subprograms\n"
- "under the terms of the GNU General Public License.\n"
- "For more information about these matters, see the file named COPYING.\n");
- printf("\ncalled subprograms:\n\n");
- fflush(stdout);
- }
- commands[POST_INDEX].append_arg(buf);
- // fall through
- case 'C':
- commands[SOELIM_INDEX].append_arg(buf);
- commands[REFER_INDEX].append_arg(buf);
- commands[PIC_INDEX].append_arg(buf);
- commands[GRAP_INDEX].append_arg(buf);
- commands[TBL_INDEX].append_arg(buf);
- commands[GRN_INDEX].append_arg(buf);
- commands[EQN_INDEX].append_arg(buf);
- commands[TROFF_INDEX].append_arg(buf);
- break;
- case 'N':
- commands[EQN_INDEX].append_arg(buf);
- break;
- case 'h':
- help();
- break;
- case 'E':
- case 'b':
- commands[TROFF_INDEX].append_arg(buf);
- break;
- case 'S':
- safer_flag = 1;
- break;
- case 'U':
- safer_flag = 0;
- break;
- case 'T':
- if (strcmp(optarg, "html") == 0) {
- // force soelim to aid the html preprocessor
- commands[SOELIM_INDEX].set_name(command_prefix, "soelim");
- }
- if (strcmp(optarg, "Xps") == 0) {
- warning("-TXps option is obsolete: use -X -Tps instead");
- device = "ps";
- Xflag++;
- }
- else
- device = optarg;
- break;
- case 'F':
- font::command_line_font_dir(optarg);
- if (Fargs.length() > 0) {
- Fargs += PATH_SEP[0];
- Fargs += optarg;
- }
- else
- Fargs = optarg;
- break;
- case 'f':
- case 'o':
- case 'm':
- case 'r':
- case 'd':
- case 'n':
- case 'w':
- case 'W':
- commands[TROFF_INDEX].append_arg(buf, optarg);
- break;
- case 'M':
- commands[EQN_INDEX].append_arg(buf, optarg);
- commands[GRAP_INDEX].append_arg(buf, optarg);
- commands[GRN_INDEX].append_arg(buf, optarg);
- commands[TROFF_INDEX].append_arg(buf, optarg);
- break;
- case 'P':
- Pargs += optarg;
- Pargs += '\0';
- break;
- case 'L':
- append_arg_to_string(optarg, Largs);
- break;
- case 'X':
- Xflag++;
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- break;
- }
- }
- if (safer_flag)
- commands[PIC_INDEX].append_arg("-S");
- else
- commands[TROFF_INDEX].insert_arg("-U");
- font::set_unknown_desc_command_handler(handle_unknown_desc_command);
- if (!font::load_desc())
- fatal("invalid device `%1'", device);
- if (!postdriver)
- fatal("no `postpro' command in DESC file for device `%1'", device);
-
- if (predriver) {
- commands[TROFF_INDEX].insert_arg(commands[TROFF_INDEX].get_name());
- const char *p = Pargs.contents();
- const char *end = p + Pargs.length();
- while (p < end) {
- // pass the device arguments to the predrivers as well
- commands[TROFF_INDEX].insert_arg(p);
- p = strchr(p, '\0') + 1;
- }
- commands[TROFF_INDEX].set_name(predriver);
- }
-
- const char *real_driver = 0;
- if (Xflag) {
- real_driver = postdriver;
- postdriver = GXDITVIEW;
- commands[TROFF_INDEX].append_arg("-r" XREG "=", "1");
- }
- if (postdriver)
- commands[POST_INDEX].set_name(postdriver);
- int gxditview_flag = postdriver && strcmp(xbasename(postdriver), GXDITVIEW) == 0;
- if (gxditview_flag && argc - optind == 1) {
- commands[POST_INDEX].append_arg("-title");
- commands[POST_INDEX].append_arg(argv[optind]);
- commands[POST_INDEX].append_arg("-xrm");
- commands[POST_INDEX].append_arg("*iconName:", argv[optind]);
- string filename_string("|");
- append_arg_to_string(argv[0], filename_string);
- append_arg_to_string("-Z", filename_string);
- for (int i = 1; i < argc; i++)
- append_arg_to_string(argv[i], filename_string);
- filename_string += '\0';
- commands[POST_INDEX].append_arg("-filename");
- commands[POST_INDEX].append_arg(filename_string.contents());
- }
- if (gxditview_flag && Xflag) {
- string print_string(real_driver);
- if (spooler) {
- print_string += " | ";
- print_string += spooler;
- print_string += Largs;
- }
- print_string += '\0';
- commands[POST_INDEX].append_arg("-printCommand");
- commands[POST_INDEX].append_arg(print_string.contents());
- }
- const char *p = Pargs.contents();
- const char *end = p + Pargs.length();
- while (p < end) {
- commands[POST_INDEX].append_arg(p);
- p = strchr(p, '\0') + 1;
- }
- if (gxditview_flag)
- commands[POST_INDEX].append_arg("-");
- if (lflag && !Xflag && spooler) {
- commands[SPOOL_INDEX].set_name(BSHELL);
- commands[SPOOL_INDEX].append_arg(BSHELL_DASH_C);
- Largs += '\0';
- Largs = spooler + Largs;
- commands[SPOOL_INDEX].append_arg(Largs.contents());
- }
- if (zflag) {
- commands[POST_INDEX].set_name(0);
- commands[SPOOL_INDEX].set_name(0);
- }
- commands[TROFF_INDEX].append_arg("-T", device);
- // html renders equations as images via ps
- if (strcmp(device, "html") == 0)
- commands[EQN_INDEX].append_arg("-Tps:html");
- else
- commands[EQN_INDEX].append_arg("-T", device);
-
- commands[GRN_INDEX].append_arg("-T", device);
-
- int first_index;
- for (first_index = 0; first_index < TROFF_INDEX; first_index++)
- if (commands[first_index].get_name() != 0)
- break;
- if (optind < argc) {
- if (argv[optind][0] == '-' && argv[optind][1] != '\0')
- commands[first_index].append_arg("--");
- for (int i = optind; i < argc; i++)
- commands[first_index].append_arg(argv[i]);
- if (iflag)
- commands[first_index].append_arg("-");
- }
- if (Fargs.length() > 0) {
- string e = "GROFF_FONT_PATH";
- e += '=';
- e += Fargs;
- char *fontpath = getenv("GROFF_FONT_PATH");
- if (fontpath && *fontpath) {
- e += PATH_SEP[0];
- e += fontpath;
- }
- e += '\0';
- if (putenv(strsave(e.contents())))
- fatal("putenv failed");
- }
- {
- // we save the original path in GROFF_PATH__ and put it into the
- // environment -- troff will pick it up later.
- char *path = getenv("PATH");
- string e = "GROFF_PATH__";
- e += '=';
- if (path && *path)
- e += path;
- e += '\0';
- if (putenv(strsave(e.contents())))
- fatal("putenv failed");
- char *binpath = getenv("GROFF_BIN_PATH");
- string f = "PATH";
- f += '=';
- if (binpath && *binpath)
- f += binpath;
- else
- f += BINPATH;
- if (path && *path) {
- f += PATH_SEP[0];
- f += path;
- }
- f += '\0';
- if (putenv(strsave(f.contents())))
- fatal("putenv failed");
- }
- if (Vflag) {
- print_commands();
- exit(0);
- }
- return run_commands(vflag);
-}
-
-const char *xbasename(const char *s)
-{
- if (!s)
- return 0;
- // DIR_SEPS[] are possible directory separator characters, see nonposix.h
- // We want the rightmost separator of all possible ones.
- // Example: d:/foo\\bar.
- const char *p = strrchr(s, DIR_SEPS[0]), *p1;
- const char *sep = &DIR_SEPS[1];
-
- while (*sep)
- {
- p1 = strrchr(s, *sep);
- if (p1 && (!p || p1 > p))
- p = p1;
- sep++;
- }
- return p ? p + 1 : s;
-}
-
-void handle_unknown_desc_command(const char *command, const char *arg,
- const char *filename, int lineno)
-{
- if (strcmp(command, "print") == 0) {
- if (arg == 0)
- error_with_file_and_line(filename, lineno,
- "`print' command requires an argument");
- else
- spooler = strsave(arg);
- }
- if (strcmp(command, "prepro") == 0) {
- if (arg == 0)
- error_with_file_and_line(filename, lineno,
- "`prepro' command requires an argument");
- else {
- for (const char *p = arg; *p; p++)
- if (csspace(*p)) {
- error_with_file_and_line(filename, lineno,
- "invalid `prepro' argument `%1'"
- ": program name required", arg);
- return;
- }
- predriver = strsave(arg);
- }
- }
- if (strcmp(command, "postpro") == 0) {
- if (arg == 0)
- error_with_file_and_line(filename, lineno,
- "`postpro' command requires an argument");
- else {
- for (const char *p = arg; *p; p++)
- if (csspace(*p)) {
- error_with_file_and_line(filename, lineno,
- "invalid `postpro' argument `%1'"
- ": program name required", arg);
- return;
- }
- postdriver = strsave(arg);
- }
- }
-}
-
-void print_commands()
-{
- int last;
- for (last = SPOOL_INDEX; last >= 0; last--)
- if (commands[last].get_name() != 0)
- break;
- for (int i = 0; i <= last; i++)
- if (commands[i].get_name() != 0)
- commands[i].print(i == last, stdout);
-}
-
-// Run the commands. Return the code with which to exit.
-
-int run_commands(int no_pipe)
-{
- char **v[NCOMMANDS];
- int j = 0;
- for (int i = 0; i < NCOMMANDS; i++)
- if (commands[i].get_name() != 0)
- v[j++] = commands[i].get_argv();
- return run_pipeline(j, v, no_pipe);
-}
-
-possible_command::possible_command()
-: name(0), argv(0)
-{
-}
-
-possible_command::~possible_command()
-{
- a_delete name;
- a_delete argv;
-}
-
-void possible_command::set_name(const char *s)
-{
- a_delete name;
- name = strsave(s);
-}
-
-void possible_command::set_name(const char *s1, const char *s2)
-{
- a_delete name;
- name = new char[strlen(s1) + strlen(s2) + 1];
- strcpy(name, s1);
- strcat(name, s2);
-}
-
-const char *possible_command::get_name()
-{
- return name;
-}
-
-void possible_command::clear_args()
-{
- args.clear();
-}
-
-void possible_command::append_arg(const char *s, const char *t)
-{
- args += s;
- if (t)
- args += t;
- args += '\0';
-}
-
-void possible_command::insert_arg(const char *s)
-{
- string str(s);
- str += '\0';
- str += args;
- args = str;
-}
-
-void possible_command::build_argv()
-{
- if (argv)
- return;
- // Count the number of arguments.
- int len = args.length();
- int argc = 1;
- char *p = 0;
- if (len > 0) {
- p = &args[0];
- for (int i = 0; i < len; i++)
- if (p[i] == '\0')
- argc++;
- }
- // Build an argument vector.
- argv = new char *[argc + 1];
- argv[0] = name;
- for (int i = 1; i < argc; i++) {
- argv[i] = p;
- p = strchr(p, '\0') + 1;
- }
- argv[argc] = 0;
-}
-
-void possible_command::print(int is_last, FILE *fp)
-{
- build_argv();
- if (IS_BSHELL(argv[0])
- && argv[1] != 0 && strcmp(argv[1], BSHELL_DASH_C) == 0
- && argv[2] != 0 && argv[3] == 0)
- fputs(argv[2], fp);
- else {
- fputs(argv[0], fp);
- string str;
- for (int i = 1; argv[i] != 0; i++) {
- str.clear();
- append_arg_to_string(argv[i], str);
- put_string(str, fp);
- }
- }
- if (is_last)
- putc('\n', fp);
- else
- fputs(" | ", fp);
-}
-
-void append_arg_to_string(const char *arg, string &str)
-{
- str += ' ';
- int needs_quoting = 0;
- int contains_single_quote = 0;
- const char*p;
- for (p = arg; *p != '\0'; p++)
- switch (*p) {
- case ';':
- case '&':
- case '(':
- case ')':
- case '|':
- case '^':
- case '<':
- case '>':
- case '\n':
- case ' ':
- case '\t':
- case '\\':
- case '"':
- case '$':
- case '?':
- case '*':
- needs_quoting = 1;
- break;
- case '\'':
- contains_single_quote = 1;
- break;
- }
- if (contains_single_quote || arg[0] == '\0') {
- str += '"';
- for (p = arg; *p != '\0'; p++)
- switch (*p) {
- case '"':
- case '\\':
- case '$':
- str += '\\';
- // fall through
- default:
- str += *p;
- break;
- }
- str += '"';
- }
- else if (needs_quoting) {
- str += '\'';
- str += arg;
- str += '\'';
- }
- else
- str += arg;
-}
-
-char **possible_command::get_argv()
-{
- build_argv();
- return argv;
-}
-
-void synopsis(FILE *stream)
-{
- fprintf(stream,
-"usage: %s [-abeghilpstvzCENRSUVXZ] [-Fdir] [-mname] [-Tdev] [-ffam]\n"
-" [-wname] [-Wname] [-Mdir] [-dcs] [-rcn] [-nnum] [-olist] [-Parg]\n"
-" [-Larg] [-Idir] [files...]\n",
- program_name);
-}
-
-void help()
-{
- synopsis(stdout);
- fputs("\n"
-"-h\tprint this message\n"
-"-t\tpreprocess with tbl\n"
-"-p\tpreprocess with pic\n"
-"-e\tpreprocess with eqn\n"
-"-g\tpreprocess with grn\n"
-"-G\tpreprocess with grap\n"
-"-s\tpreprocess with soelim\n"
-"-R\tpreprocess with refer\n"
-"-Tdev\tuse device dev\n"
-"-X\tuse X11 previewer rather than usual postprocessor\n"
-"-mname\tread macros tmac.name\n"
-"-dcs\tdefine a string c as s\n"
-"-rcn\tdefine a number register c as n\n"
-"-nnum\tnumber first page n\n"
-"-olist\toutput only pages in list\n"
-"-ffam\tuse fam as the default font family\n"
-"-Fdir\tsearch dir for device directories\n"
-"-Mdir\tsearch dir for macro files\n"
-"-v\tprint version number\n"
-"-z\tsuppress formatted output\n"
-"-Z\tdon't postprocess\n"
-"-a\tproduce ASCII description of output\n"
-"-i\tread standard input after named input files\n"
-"-wname\tenable warning name\n"
-"-Wname\tinhibit warning name\n"
-"-E\tinhibit all errors\n"
-"-b\tprint backtraces with errors or warnings\n"
-"-l\tspool the output\n"
-"-C\tenable compatibility mode\n"
-"-V\tprint commands on stdout instead of running them\n"
-"-Parg\tpass arg to the postprocessor\n"
-"-Larg\tpass arg to the spooler\n"
-"-N\tdon't allow newlines within eqn delimiters\n"
-"-S\tenable safer mode (the default)\n"
-"-U\tenable unsafe mode\n"
-"-Idir\tsearch dir for soelim. Implies -s\n"
-"\n",
- stdout);
- exit(0);
-}
-
-void usage(FILE *stream)
-{
- synopsis(stream);
- fprintf(stream, "%s -h gives more help\n", program_name);
-}
-
-extern "C" {
-
-void c_error(const char *format, const char *arg1, const char *arg2,
- const char *arg3)
-{
- error(format, arg1, arg2, arg3);
-}
-
-void c_fatal(const char *format, const char *arg1, const char *arg2,
- const char *arg3)
-{
- fatal(format, arg1, arg2, arg3);
-}
-
-}
diff --git a/contrib/groff/src/roff/groff/groff.man b/contrib/groff/src/roff/groff/groff.man
deleted file mode 100644
index 4bb321f74092..000000000000
--- a/contrib/groff/src/roff/groff/groff.man
+++ /dev/null
@@ -1,492 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-
- $FreeBSD$
-
-..
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH GROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-groff \- front end for the groff document formatting system
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fBgroff 'u
-.ti \niu
-.B groff
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-abeghilpstvzCEGNRSUVXZ
-.OP \-w name
-.OP \-W name
-.OP \-m name
-.OP \-F dir
-.OP \-I dir
-.OP \-T dev
-.OP \-f fam
-.OP \-M dir
-.OP \-d cs
-.OP \-r cn
-.OP \-n num
-.OP \-o list
-.OP \-P arg
-.OP \-L arg
-.RI "[\ " files\|.\|.\|. "\ ]"
-.br
-.ad \na
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-.B groff
-is a front-end to the groff document formatting system.
-Normally it runs the
-.B @g@troff
-program and a postprocessor appropriate for the selected
-device.
-Available devices are:
-.TP
-.B ps
-For PostScript printers and previewers
-.TP
-.B dvi
-For TeX dvi format.
-.TP
-.B X75
-For a 75dpi X11 previewer.
-.TP
-.B X100
-For a 100dpi X11 previewer.
-.TP
-.B ascii
-For typewriter-like devices.
-.TP
-.B latin1
-For typewriter-like devices using the ISO Latin-1 (ISO 8859-1) character set.
-.TP
-.B koi8-r
-For typewriter-like devices using the Russian KOI8-R character set.
-.TP
-.B utf8
-For typewriter-like devices using the Unicode (ISO 10646) character set with
-UTF-8 encoding.
-.TP
-.B cp1047
-For typewriter-like devices which use the EBCDIC code page IBM cp1047
-(e.g. OS/390 Unix).
-.TP
-.B lj4
-For an HP LaserJet4-compatible (or other PCL5-compatible) printer.
-.TP
-.B lbp
-For Canon CAPSL printers (LBP-4 and LBP-8 series laser printers).
-.TP
-.B html
-To produce HTML output.
-.LP
-The postprocessor to be used for a device is specified by the
-.B postpro
-command in the device description file.
-This can be overridden with the
-.B \-X
-option.
-.LP
-The default device is
-.BR @DEVICE@ .
-It can optionally preprocess with any of
-.BR @g@pic ,
-.BR @g@eqn ,
-.BR @g@grn ,
-.BR grap ,
-.BR @g@tbl ,
-.BR @g@refer ,
-or
-.B @g@soelim.
-.LP
-Options without an argument can be grouped behind a single
-.BR \- .
-A filename of
-.B \-
-denotes the standard input.
-.LP
-The
-.B grog
-command can be used to guess the correct groff command to use to
-format a file.
-.SH OPTIONS
-.TP
-.B \-h
-Print a help message.
-.TP
-.B \-e
-Preprocess with @g@eqn.
-.TP
-.B \-t
-Preprocess with @g@tbl.
-.TP
-.B \-g
-Preprocess with @g@grn.
-.TP
-.B \-G
-Preprocess with grap.
-.TP
-.B \-p
-Preprocess with @g@pic.
-.TP
-.B \-s
-Preprocess with @g@soelim.
-.TP
-.BI \-I dir
-This option is as described in
-.BR @g@soelim (@MAN1EXT@).
-This option implies the
-.B \-s
-option.
-.TP
-.B \-R
-Preprocess with @g@refer.
-No mechanism is provided for passing arguments to
-.B @g@refer
-because most @g@refer options have equivalent commands
-which can be included in the file.
-See
-.BR @g@refer (@MAN1EXT@)
-for more details.
-.TP
-.B \-v
-Make programs run by
-.B groff
-print out their version number.
-.TP
-.B \-V
-Print the pipeline on stdout instead of executing it.
-.TP
-.B \-z
-Suppress output from
-.BR @g@troff .
-Only error messages will be printed.
-.TP
-.B \-Z
-Do not postprocess the output of
-.BR @g@troff .
-Normally
-.B groff
-will automatically run the appropriate postprocessor.
-.TP
-.BI \-P arg
-Pass
-.I arg
-to the postprocessor.
-Each argument should be passed with a separate
-.B \-P
-option.
-Note that
-.B groff
-does not prepend
-.B \-
-to
-.I arg
-before passing it to the postprocessor.
-.TP
-.B \-l
-Send the output to a spooler for printing.
-The command used for this is specified by the
-.B print
-command in the device description file (if not present,
-.B \-l
-has no effect).
-.TP
-.BI \-L arg
-Pass
-.I arg
-to the spooler.
-Each argument should be passed with a separate
-.B \-L
-option.
-Note that
-.B groff
-does not prepend
-.B \-
-to
-.I arg
-before passing it to the postprocessor.
-If there is no
-.B print
-command in the device description file,
-.B \-L
-is ignored.
-.TP
-.BI \-T dev
-Prepare output for device
-.IR dev .
-The default device is
-.BR @DEVICE@ .
-.TP
-.B \-X
-Preview with
-.B gxditview
-instead of using the usual postprocessor.
-.B Groff
-passes
-.B gxditview
-a
-.B -printCommand
-option which will make the
-.B Print
-action do what
-.B groff
-would have done if the
-.B -l
-option had been given.
-This is unlikely to produce good results except with
-.BR \-Tps .
-.TP
-.B \-N
-Don't allow newlines with eqn delimiters.
-This is the same as the
-.B \-N
-option in
-.BR @g@eqn .
-.TP
-.B \-S
-Safer mode. Pass the
-.B \-S
-option to
-.B @g@pic
-and disable the following
-.B @g@troff
-requests:
-.BR .open ,
-.BR .opena ,
-.BR .pso ,
-.BR .sy ,
-and
-.BR .pi .
-For security reasons, safer mode is enabled by default.
-.TP
-.B \-U
-Unsafe mode. Reverts to the old unsafe behaviour.
-.TP
-.B \-a
-.TQ
-.B \-b
-.TQ
-.B \-i
-.TQ
-.B \-C
-.TQ
-.B \-E
-.TQ
-.BI \-w name
-.TQ
-.BI \-W name
-.TQ
-.BI \-m name
-.TQ
-.BI \-o list
-.TQ
-.BI \-d cs
-.TQ
-.BI \-r cn
-.TQ
-.BI \-F dir
-.TQ
-.BI \-M dir
-.TQ
-.BI \-f fam
-.TQ
-.BI \-n num
-These are as described in
-.BR @g@troff (@MAN1EXT@) .
-.SH ENVIRONMENT
-.TP
-.SM
-.B GROFF_COMMAND_PREFIX
-If this is set
-.IR X ,
-then
-.B groff
-will run
-.IB X troff
-instead of
-.BR @g@troff .
-This also applies to
-.BR tbl ,
-.BR pic ,
-.BR eqn ,
-.BR grn ,
-.BR refer ,
-and
-.BR soelim .
-It does not apply to
-.BR grap ,
-.BR grops ,
-.BR grodvi ,
-.BR grotty ,
-.BR grolj4 ,
-.BR grohtml ,
-and
-.BR gxditview .
-.TP
-.SM
-.B GROFF_TMAC_PATH
-A colon separated list of directories in which to search for
-macro files in addition to the default directories.
-See
-.BR troff (1)
-for more details.
-.TP
-.SM
-.B GROFF_TYPESETTER
-Default device.
-.TP
-.SM
-.B GROFF_FONT_PATH
-A colon separated list of directories in which to search for the
-.BI dev name
-directory in addition to the default one.
-See
-.BR troff (1)
-for more details.
-.TP
-.SM
-.B GROFF_BIN_PATH
-This search path, followed by
-.BR PATH ,
-will be used for commands executed by
-.BR groff .
-If not set, `@BINDIR@' is prepended to
-.BR PATH .
-.TP
-.SM
-.B GROFF_TMPDIR
-The directory in which temporary files will be created.
-If this is not set and
-.B
-.SM TMPDIR
-is set, temporary files will be created in that directory.
-Otherwise temporary files will be created in
-.BR /tmp .
-The
-.BR grops (@MAN1EXT@)
-and
-.BR @g@refer (@MAN1EXT@)
-commands can create temporary files.
-.SH FILES
-.Tp \w'\fB@FONTDIR@/dev\fIname\fB/DESC'u+3n
-.BI @FONTDIR@/dev name /DESC
-Device description file for device
-.IR name .
-.TP
-.BI @FONTDIR@/dev name / F
-Font file for font
-.I F
-of device
-.IR name .
-.LP
-Note that on EBCDIC hosts, output devices
-.BR ascii ,
-.BR latin1 ,
-and
-.B utf8
-aren't available.
-Similarly,
-.B cp1047
-is not available on ASCII based operating systems.
-.SH EXAMPLE
-To print the man page
-.B foo.1
-to the standard output using the latin-1 output device and
-.B less
-as the pager, the following command can be used:
-.IP
-.B groff -mandoc -Tlatin1 foo.1 | less
-.PP
-Alternatively, you can say
-.IP
-.B groff -m mandoc -Tlatin1 foo.1 | less
-.SH AUTHOR
-James Clark <jjc@jclark.com>
-.SH BUGS
-Report bugs to bug-groff@gnu.org.
-Include a complete, self-contained example
-that will allow the bug to be reproduced,
-and say which version of groff you are using.
-.SH COPYRIGHT
-Copyright \(co 1989-2000 Free Software Foundation, Inc.
-.LP
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-.LP
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-.LP
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-.SH AVAILABILITY
-The most recent released version of groff is always available for
-anonymous ftp from ftp.gnu.org in the directory gnu/groff.
-.LP
-.B groff
-only supports the freely available
-.B grap
-implementation written by Ted Faber <faber@lunabase.org>.
-The actual version can be found at
-.IP
-\%http://www.lunabase.org/~faber/Vault/software/grap/
-.SH "SEE ALSO"
-.BR grog (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR @g@tbl (@MAN1EXT@),
-.BR @g@pic (@MAN1EXT@),
-.BR @g@eqn (@MAN1EXT@),
-.BR @g@grn (@MAN1EXT@),
-.BR grap (1),
-.BR @g@soelim (@MAN1EXT@),
-.BR @g@refer (@MAN1EXT@),
-.BR grops (@MAN1EXT@),
-.BR grodvi (@MAN1EXT@),
-.BR grotty (@MAN1EXT@),
-.BR grolj4 (@MAN1EXT@),
-.BR grolbp (@MAN1EXT@),
-.BR grohtml (@MAN1EXT@),
-.BR gxditview (@MAN1EXT@),
-.BR groff_font (@MAN5EXT@),
-.BR groff_out (@MAN5EXT@),
-.BR groff_man (@MAN7EXT@),
-.BR groff_ms (@MAN7EXT@),
-.BR groff_me (@MAN7EXT@),
-.BR groff_char (@MAN7EXT@)
diff --git a/contrib/groff/src/roff/groff/pipeline.c b/contrib/groff/src/roff/groff/pipeline.c
deleted file mode 100644
index a4573ba72013..000000000000
--- a/contrib/groff/src/roff/groff/pipeline.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/*
-Compile options are:
-
--DWCOREFLAG=0200 (or whatever)
--DHAVE_SYS_SIGLIST
--DSYS_SIGLIST_DECLARED
--DHAVE_UNISTD_H
-*/
-
-#include <stdio.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-extern char *strerror();
-
-#ifdef _POSIX_VERSION
-
-#include <sys/wait.h>
-
-#define PID_T pid_t
-
-#else /* not _POSIX_VERSION */
-
-/* traditional Unix */
-
-#define WIFEXITED(s) (((s) & 0377) == 0)
-#define WIFSTOPPED(s) (((s) & 0377) == 0177)
-#define WIFSIGNALED(s) (((s) & 0377) != 0 && (((s) & 0377) != 0177))
-#define WEXITSTATUS(s) (((s) >> 8) & 0377)
-#define WTERMSIG(s) ((s) & 0177)
-#define WSTOPSIG(s) (((s) >> 8) & 0377)
-
-#ifndef WCOREFLAG
-#define WCOREFLAG 0200
-#endif
-
-#define PID_T int
-
-#endif /* not _POSIX_VERSION */
-
-/* SVR4 uses WCOREFLG; Net 2 uses WCOREFLAG. */
-#ifndef WCOREFLAG
-#ifdef WCOREFLG
-#define WCOREFLAG WCOREFLG
-#endif /* WCOREFLG */
-#endif /* not WCOREFLAG */
-
-#ifndef WCOREDUMP
-#ifdef WCOREFLAG
-#define WCOREDUMP(s) ((s) & WCOREFLAG)
-#else /* not WCOREFLAG */
-#define WCOREDUMP(s) (0)
-#endif /* WCOREFLAG */
-#endif /* not WCOREDUMP */
-
-#include "pipeline.h"
-
-#ifdef __STDC__
-#define P(parms) parms
-#else
-#define P(parms) ()
-#define const /* as nothing */
-#endif
-
-#define error c_error
-extern void error P((const char *, const char *, const char *, const char *));
-extern void c_fatal P((const char *, const char *, const char *, const char *));
-
-static void sys_fatal P((const char *));
-static const char *xstrsignal P((int));
-static char *i_to_a P((int));
-
-/* MSVC can support asynchronous processes, but it's unlikely to have
- fork(). So, until someone writes an emulation, let them at least
- have a workable groff by using the good-ole DOS pipe simulation
- via temporary files... */
-
-#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN32__))
-
-#include <process.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <string.h>
-
-#include "nonposix.h"
-
-/* A signal handler that just records that a signal has happened. */
-static int child_interrupted;
-
-static RETSIGTYPE signal_catcher (int signo)
-{
- child_interrupted++;
-}
-
-static const char *sh = "sh";
-static const char *command = "command";
-
-const char *
-system_shell_name (void)
-{
- static const char *shell_name;
-
- /* We want them to be able to use a Unixy shell if they have it
- installed. Let spawnlp try to find it, but if it fails, default
- to COMMAND.COM. */
- if (shell_name == NULL)
- {
- int sh_found = spawnlp (P_WAIT, sh, sh, "-c", ":", NULL) == 0;
-
- if (sh_found)
- shell_name = sh;
- else
- shell_name = command;
- }
- return shell_name;
-}
-
-const char *
-system_shell_dash_c (void)
-{
- if (strcmp (system_shell_name(), sh) == 0)
- return "-c";
- else
- return "/c";
-}
-
-int
-is_system_shell (const char *shell)
-{
- size_t shlen;
- size_t ibase = 0, idot, i;
-
- if (!shell) /* paranoia */
- return 0;
- idot = shlen = strlen(shell);
-
- for (i = 0; i < shlen; i++)
- {
- if (shell[i] == '.')
- idot = i;
- else if (shell[i] == '/' || shell[i] == '\\' || shell[i] == ':')
- {
- ibase = i + 1;
- idot = shlen;
- }
- }
-
- /* "sh" and "sh.exe" should compare equal. */
- return
- (strncasecmp (shell + ibase, system_shell_name (), idot - ibase) == 0
- && (idot == shlen
- || strcasecmp (shell + idot, ".exe") == 0
- || strcasecmp (shell + idot, ".com") == 0));
-}
-
-/* MSDOS doesn't have `fork', so we need to simulate the pipe by
- running the programs in sequence with redirected standard streams. */
-
-int run_pipeline (ncommands, commands, no_pipe)
- int ncommands;
- char ***commands;
- int no_pipe;
-{
- int save_stdin = dup(0);
- int save_stdout = dup(1);
- char *tmpfiles[2];
- char tem1[L_tmpnam], tem2[L_tmpnam];
- int infile = 0;
- int outfile = 1;
- int i, f, ret = 0;
-
- tmpfiles[0] = tmpnam(tem1);
- tmpfiles[1] = tmpnam(tem2);
-
- for (i = 0; i < ncommands; i++)
- {
- int exit_status;
- RETSIGTYPE (*prev_handler)(int);
-
- if (i)
- {
- /* redirect stdin from temp file */
- f = open(tmpfiles[infile], O_RDONLY|O_BINARY, 0666);
- if (f < 0)
- sys_fatal("open stdin");
- if (dup2(f, 0) < 0)
- sys_fatal("dup2 stdin");
- if (close(f) < 0)
- sys_fatal("close stdin");
- }
- if ((i < ncommands - 1) && !no_pipe)
- {
- /* redirect stdout to temp file */
- f = open(tmpfiles[outfile], O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0666);
- if (f < 0)
- sys_fatal("open stdout");
- if (dup2(f, 1) < 0)
- sys_fatal("dup2 stdout");
- if (close(f) < 0)
- sys_fatal("close stdout");
- }
- else if (dup2(save_stdout, 1) < 0)
- sys_fatal("restore stdout");
-
- /* run the program */
- child_interrupted = 0;
- prev_handler = signal(SIGINT, signal_catcher);
- exit_status = spawnvp(P_WAIT, commands[i][0], commands[i]);
- signal(SIGINT, prev_handler);
- if (child_interrupted)
- {
- error("%1: Interrupted", commands[i][0], (char *)0, (char *)0);
- ret |= 2;
- }
- else if (exit_status < 0)
- {
- error("couldn't exec %1: %2", commands[i][0],
- strerror(errno), (char *)0);
- fflush(stderr); /* just in case error() doesn't */
- ret |= 4;
- }
- if (exit_status != 0)
- ret |= 1;
-
- /* There's no sense to continue with the pipe if one of the
- programs has ended abnormally, is there? */
- if (ret != 0)
- break;
-
- /* swap temp files: make output of this program be input for the next */
- infile = 1 - infile;
- outfile = 1 - outfile;
- }
-
- if (dup2(save_stdin, 0) < 0)
- sys_fatal("restore stdin");
-
- unlink(tmpfiles[0]);
- unlink(tmpfiles[1]);
-
- return ret;
-}
-
-#else /* not __MSDOS__, not _WIN32 */
-
-int run_pipeline(ncommands, commands, no_pipe)
- int ncommands;
- char ***commands;
- int no_pipe;
-{
- int i;
- int last_input = 0;
- PID_T pids[MAX_COMMANDS];
- int ret = 0;
- int proc_count = ncommands;
-
- for (i = 0; i < ncommands; i++) {
- int pdes[2];
- PID_T pid;
- if ((i != ncommands - 1) && !no_pipe) {
- if (pipe(pdes) < 0)
- sys_fatal("pipe");
- }
- pid = fork();
- if (pid < 0)
- sys_fatal("fork");
- if (pid == 0) {
- /* child */
- if (last_input != 0) {
- if (close(0) < 0)
- sys_fatal("close");
- if (dup(last_input) < 0)
- sys_fatal("dup");
- if (close(last_input) < 0)
- sys_fatal("close");
- }
- if ((i != ncommands - 1) && !no_pipe) {
- if (close(1) < 0)
- sys_fatal("close");
- if (dup(pdes[1]) < 0)
- sys_fatal("dup");
- if (close(pdes[1]) < 0)
- sys_fatal("close");
- if (close(pdes[0]))
- sys_fatal("close");
- }
- execvp(commands[i][0], commands[i]);
- error("couldn't exec %1: %2", commands[i][0],
- strerror(errno), (char *)0);
- fflush(stderr); /* just in case error() doesn't */
- _exit(EXEC_FAILED_EXIT_STATUS);
- }
- /* in the parent */
- if (last_input != 0) {
- if (close(last_input) < 0)
- sys_fatal("close");
- }
- if ((i != ncommands - 1) && !no_pipe) {
- if (close(pdes[1]) < 0)
- sys_fatal("close");
- last_input = pdes[0];
- }
- pids[i] = pid;
- }
- while (proc_count > 0) {
- int status;
- PID_T pid = wait(&status);
- if (pid < 0)
- sys_fatal("wait");
- for (i = 0; i < ncommands; i++)
- if (pids[i] == pid) {
- pids[i] = -1;
- --proc_count;
- if (WIFSIGNALED(status)) {
- int sig = WTERMSIG(status);
-#ifdef SIGPIPE
- if (sig == SIGPIPE) {
- if (i == ncommands - 1) {
-
- /* This works around a problem that occurred when using the
- rerasterize action in gxditview. What seemed to be
- happening (on SunOS 4.1.1) was that pclose() closed the
- pipe and waited for groff, gtroff got a SIGPIPE, but
- gpic blocked writing to gtroff, and so groff blocked
- waiting for gpic and gxditview blocked waiting for
- groff. I don't understand why gpic wasn't getting a
- SIGPIPE. */
- int j;
- for (j = 0; j < ncommands; j++)
- if (pids[j] > 0)
- (void)kill(pids[j], SIGPIPE);
- }
- }
- else
-#endif /* SIGPIPE */
- {
- error("%1: %2%3",
- commands[i][0],
- xstrsignal(sig),
- WCOREDUMP(status) ? " (core dumped)" : "");
- ret |= 2;
- }
- }
- else if (WIFEXITED(status)) {
- int exit_status = WEXITSTATUS(status);
- if (exit_status == EXEC_FAILED_EXIT_STATUS)
- ret |= 4;
- else if (exit_status != 0)
- ret |= 1;
- }
- else
- error("unexpected status %1",
- i_to_a(status), (char *)0, (char *)0);
- break;
- }
- }
- return ret;
-}
-
-#endif /* not __MSDOS__, not _WIN32 */
-
-static void sys_fatal(s)
- const char *s;
-{
- c_fatal("%1: %2", s, strerror(errno), (char *)0);
-}
-
-static char *i_to_a(n)
- int n;
-{
- static char buf[12];
- sprintf(buf, "%d", n);
- return buf;
-}
-
-static const char *xstrsignal(n)
- int n;
-{
- static char buf[sizeof("Signal ") + 1 + sizeof(int)*3];
-#ifdef NSIG
-#ifdef SYS_SIGLIST_DECLARED
- if (n >= 0 && n < NSIG && sys_siglist[n] != 0)
- return sys_siglist[n];
-#endif /* SYS_SIGLIST_DECLARED */
-#endif /* NSIG */
- sprintf(buf, "Signal %d", n);
- return buf;
-}
diff --git a/contrib/groff/src/roff/groff/pipeline.h b/contrib/groff/src/roff/groff/pipeline.h
deleted file mode 100644
index abb4b0cad279..000000000000
--- a/contrib/groff/src/roff/groff/pipeline.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef __cplusplus
-extern "C" {
- int run_pipeline(int, char ***, int);
-}
-#endif
-
-/* run_pipeline can handle at most this many commands */
-#define MAX_COMMANDS 10
-
-/* Children exit with this status if execvp fails. */
-#define EXEC_FAILED_EXIT_STATUS 0xff
diff --git a/contrib/groff/src/roff/grog/Makefile.sub b/contrib/groff/src/roff/grog/Makefile.sub
deleted file mode 100644
index 054d06e1cec9..000000000000
--- a/contrib/groff/src/roff/grog/Makefile.sub
+++ /dev/null
@@ -1,26 +0,0 @@
-MAN1=grog.n
-CLEANADD=grog
-NAMEPREFIX=$(g)
-
-all: grog
-
-grog: grog.pl grog.sh
- if test -n "$(PERLPATH)" && test -f "$(PERLPATH)"; then \
- rm -f $@; \
- sed -e "s|/usr/bin/perl|$(PERLPATH)|" \
- -e "s|@VERSION@|$(version)$(revision)|" $(srcdir)/grog.pl >$@; \
- else \
- rm -f $@; \
- sed -e "s|@g@|$(g)|g" \
- -e "s|@VERSION@|$(version)$(revision)|" \
- -e $(SH_SCRIPT_SED_CMD) $(srcdir)/grog.sh >$@; \
- fi
- chmod +x $@
-
-install_data: grog
- -test -d $(bindir) || $(mkinstalldirs) $(bindir)
- -rm -f $(bindir)/grog
- $(INSTALL_SCRIPT) grog $(bindir)/grog
-
-uninstall_sub:
- -rm -f $(bindir)/grog
diff --git a/contrib/groff/src/roff/grog/grog.man b/contrib/groff/src/roff/grog/grog.man
deleted file mode 100644
index 4a2d31144be0..000000000000
--- a/contrib/groff/src/roff/grog/grog.man
+++ /dev/null
@@ -1,86 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.TH GROG @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-grog \- guess options for groff command
-.SH SYNOPSIS
-.B grog
-[
-.BI \- option
-\|.\|.\|.
-]
-[
-.IR files \|.\|.\|.
-]
-.SH DESCRIPTION
-.B grog
-reads
-.I files
-and guesses which of the
-.BR groff (@MAN1EXT@)
-options
-.BR \-e ,
-.BR \-man ,
-.BR \-me ,
-.BR \-mm ,
-.BR \-ms ,
-.BR \-mdoc,
-.BR \-mdoc-old,
-.BR \-p ,
-.BR \-R ,
-.BR \-g ,
-.BR \-G ,
-.BR \-s ,
-and
-.BR \-t
-are required for printing
-.IR files ,
-and prints the groff command including those options on the standard output.
-A filename of
-.B \-
-is taken to refer to the standard input.
-If no files are specified the standard input will be read.
-Any specified options will be included in the printed command.
-No space is allowed between options and their arguments.
-The only options recognized are
-.B \-C
-(which is also passed on) to enable compatibility mode, and
-.B \-v
-to print the version number.
-.LP
-For example,
-.IP
-.B `grog \-Tdvi paper.ms`
-.LP
-will guess the appropriate command to print
-.B paper.ms
-and then run it after adding the
-.B \-Tdvi
-option.
-.SH "SEE ALSO"
-.BR doctype (1),
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@),
-.BR @g@tbl (@MAN1EXT@),
-.BR @g@pic (@MAN1EXT@),
-.BR @g@eqn (@MAN1EXT@),
-.BR @g@refer (@MAN1EXT@),
-.BR @g@grn (@MAN1EXT@),
-.BR grap (1),
-.BR @g@soelim (@MAN1EXT@)
diff --git a/contrib/groff/src/roff/grog/grog.pl b/contrib/groff/src/roff/grog/grog.pl
deleted file mode 100644
index 57cd159461bb..000000000000
--- a/contrib/groff/src/roff/grog/grog.pl
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/usr/bin/perl
-# grog -- guess options for groff command
-# Inspired by doctype script in Kernighan & Pike, Unix Programming
-# Environment, pp 306-8.
-
-$prog = $0;
-$prog =~ s@.*/@@;
-
-$sp = "[\\s\\n]";
-
-push(@command, "groff");
-
-while ($ARGV[0] =~ /^-./) {
- $arg = shift(@ARGV);
- $sp = "" if $arg eq "-C";
- &usage(0) if $arg eq "-v" || $arg eq "--version";
- &help() if $arg eq "--help";
- last if $arg eq "--";
- push(@command, $arg);
-}
-
-if (@ARGV) {
- foreach $arg (@ARGV) {
- &process($arg, 0);
- }
-}
-else {
- &process("-", 0);
-}
-
-sub process {
- local($filename, $level) = @_;
- local(*FILE);
-
- if (!open(FILE, $filename eq "-" ? $filename : "< $filename")) {
- print STDERR "$prog: can't open \`$filename': $!\n";
- exit 1 unless $level;
- return;
- }
- while (<FILE>) {
- if (/^\.TS$sp/) {
- $_ = <FILE>;
- if (!/^\./) {
- $tbl++;
- $soelim++ if $level;
- }
- }
- elsif (/^\.EQ$sp/) {
- $_ = <FILE>;
- if (!/^\./ || /^\.[0-9]/) {
- $eqn++;
- $soelim++ if $level;
- }
- }
- elsif (/^\.GS$sp/) {
- $_ = <FILE>;
- if (!/^\./) {
- $grn++;
- $soelim++ if $level;
- }
- }
- elsif (/^\.G1$sp/) {
- $_ = <FILE>;
- if (!/^\./) {
- $grap++;
- $pic++;
- $soelim++ if $level;
- }
- }
- elsif (/^\.PS$sp([ 0-9.<].*)?$/) {
- if (/^\.PS\s*<\s*(\S+)/) {
- $pic++;
- $soelim++ if $level;
- &process($1, $level);
- }
- else {
- $_ = <FILE>;
- if (!/^\./ || /^\.ps/) {
- $pic++;
- $soelim++ if $level;
- }
- }
- }
- elsif (/^\.R1$sp/ || /^\.\[$sp/) {
- $refer++;
- $soelim++ if $level;
- }
- elsif (/^\.[PLI]P$sp/) {
- $PP++;
- }
- elsif (/^\.P$/) {
- $P++;
- }
- elsif (/^\.(PH|SA)$sp/) {
- $mm++;
- }
- elsif (/^\.TH$sp/) {
- $TH++;
- }
- elsif (/^\.SH$sp/) {
- $SH++;
- }
- elsif (/^\.([pnil]p|sh)$sp/) {
- $me++;
- }
- elsif (/^\.Dd$sp/) {
- $mdoc++;
- }
- elsif (/^\.(Tp|Dp|De|Cx|Cl)$sp/) {
- $mdoc_old = 1;
- }
- # In the old version of -mdoc `Oo' is a toggle, in the new it's
- # closed by `Oc'.
- elsif (/^\.Oo$sp/) {
- $Oo++;
- }
- elsif (/^\.Oc$sp/) {
- $Oo--;
- }
- if (/^\.so$sp/) {
- chop;
- s/^.so *//;
- s/\\\".*//;
- s/ .*$//;
- &process($_, $level + 1) unless /\\/ || $_ eq "";
- }
- }
- close(FILE);
-}
-
-sub usage {
- local($exit_status) = $_;
- print "GNU grog (groff) version @VERSION@\n";
- exit $exit_status;
-}
-
-sub help {
- print "usage: grog [ option ...] [files...]\n";
- exit 0;
-}
-
-if ($pic || $tbl || $eqn || $grn || $grap || $refer) {
- $s = "-";
- $s .= "s" if $soelim;
- $s .= "R" if $refer;
- # grap must be run before pic
- $s .= "G" if $grap;
- $s .= "p" if $pic;
- $s .= "g" if $grn;
- $s .= "t" if $tbl;
- $s .= "e" if $eqn;
- push(@command, $s);
-}
-
-if ($me > 0) {
- push(@command, "-me");
-}
-elsif ($SH > 0 && $TH > 0) {
- push(@command, "-man");
-}
-elsif ($PP > 0) {
- push(@command, "-ms");
-}
-elsif ($P > 0 || $mm > 0) {
- push(@command, "-mm");
-}
-elsif ($mdoc > 0) {
- push(@command, ($mdoc_old || $Oo > 0) ? "-mdoc-old" : "-mdoc");
-}
-
-push(@command, "--") if @ARGV && $ARGV[0] =~ /^-./;
-
-push(@command, @ARGV);
-
-# We could implement an option to execute the command here.
-
-foreach (@command) {
- next unless /[\$\\\"\';&()|<> \t\n]/;
- s/\'/\'\\\'\'/;
- $_ = "'" . $_ . "'";
-}
-
-print join(' ', @command), "\n";
diff --git a/contrib/groff/src/roff/grog/grog.sh b/contrib/groff/src/roff/grog/grog.sh
deleted file mode 100644
index 7919dbf5fe70..000000000000
--- a/contrib/groff/src/roff/grog/grog.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/sh
-# grog -- guess options for groff command
-# Like doctype in Kernighan & Pike, Unix Programming Environment, pp 306-8.
-
-soelim=@g@soelim
-
-opts=
-sp="([ ]|$)"
-
-for arg
-do
- case "$arg" in
- --)
- shift; break;;
- -)
- break;;
- -C)
- sp=; opts="$opts -C"; shift; break;;
- -v | --version)
- echo "GNU grog (groff) version @VERSION@"
- exit 0;;
- --help)
- echo "usage: grog [ option ...] [files...]"
- exit 0;;
- -*)
- opts="$opts $arg"; shift;;
- *)
- break;;
- esac
-done
-
-egrep -h "^\.(P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|so|\[|R1|GS|G1|PH|SA)$sp" $* \
-| sed -e '/^\.so/s/^.*$/.SO_START\
-&\
-.SO_END/' \
-| $soelim \
-| egrep '^\.(P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|Oc|TS|EQ|TH|SH|\[|R1|GS|G1|PH|SA|SO_START|SO_END)' \
-| awk '
-/^\.SO_START$/ { so = 1 }
-/^\.SO_END$/ { so = 0 }
-/^\.TS/ { tbl++; if (so > 0) soelim++ }
-/^\.PS([ 0-9.<].*)?$/ { pic++; if (so > 0) soelim++ }
-/^\.EQ/ { eqn++; if (so > 0) soelim++ }
-/^\.(R1|\[)/ { refer++; if (so > 0) soelim++ }
-/^\.GS/ { grn++; if (so > 0) soelim++ }
-/^\.G1/ { grap++; pic++; if (so > 0) soelim++ }
-/^\.TH/ { TH++ }
-/^\.[PLI]P/ { PP++ }
-/^\.P$/ { P++ }
-/^\.SH/ { SH++ }
-/^\.(PH|SA)/ { mm++ }
-/^\.([pnil]p|sh)/ { me++ }
-/^\.Dd/ { mdoc++ }
-/^\.(Tp|Dp|De|Cx|Cl)/ { mdoc_old++ }
-/^\.Oo/ { Oo++ }
-/^\.Oc/ { Oo-- }
-
-END {
- if (files ~ /^-/)
- files = "-- " files
- printf "groff"
- if (pic > 0 || tbl > 0 || grn > 0 || grap > 0 || eqn > 0 || refer > 0) {
- printf " -"
- if (soelim > 0) printf "s"
- if (refer > 0) printf "R"
- if (grn > 0) printf "g"
- if (grap > 0) printf "G"
- if (pic > 0) printf "p"
- if (tbl > 0) printf "t"
- if (eqn > 0) printf "e"
- }
- if (me > 0)
- printf " -me"
- else if (SH > 0 && TH > 0)
- printf " -man"
- else if (PP > 0)
- printf " -ms"
- else if (P > 0 || mm > 0)
- printf " -mm"
- else if (mdoc > 0) {
- if (mdoc_old > 0 || Oo > 0)
- printf " -mdoc-old"
- else
- printf " -mdoc"
- }
- if (opts != "")
- printf "%s", opts
- if (files != "")
- printf " %s", files
- print ""
-}' "opts=$opts" "files=$*" -
diff --git a/contrib/groff/src/roff/nroff/Makefile.sub b/contrib/groff/src/roff/nroff/Makefile.sub
deleted file mode 100644
index b9cb4823ba4b..000000000000
--- a/contrib/groff/src/roff/nroff/Makefile.sub
+++ /dev/null
@@ -1,20 +0,0 @@
-MAN1=nroff.n
-NAMEPREFIX=$(g)
-CLEANADD=nroff
-
-all: nroff
-
-nroff: nroff.sh
- rm -f $@
- sed -e "s|@BINDIR@|$(bindir)|g" \
- -e $(SH_SCRIPT_SED_CMD) \
- -e "s|@VERSION@|$(version)$(revision)|" $(srcdir)/nroff.sh >$@
- chmod +x $@
-
-install_data: nroff
- -test -d $(bindir) || $(mkinstalldirs) $(bindir)
- -rm -f $(bindir)/$(NAMEPREFIX)nroff
- $(INSTALL_SCRIPT) nroff $(bindir)/$(NAMEPREFIX)nroff
-
-uninstall_sub:
- -rm -f $(bindir)/$(NAMEPREFIX)nroff
diff --git a/contrib/groff/src/roff/troff/Makefile.sub b/contrib/groff/src/roff/troff/Makefile.sub
deleted file mode 100644
index e883959dc007..000000000000
--- a/contrib/groff/src/roff/troff/Makefile.sub
+++ /dev/null
@@ -1,48 +0,0 @@
-PROG=troff
-MAN1=troff.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
- env.o \
- node.o \
- input.o \
- div.o \
- symbol.o \
- dictionary.o \
- reg.o \
- number.o \
- majorminor.o
-CCSRCS=\
- $(srcdir)/env.cc \
- $(srcdir)/node.cc \
- $(srcdir)/input.cc \
- $(srcdir)/div.cc \
- $(srcdir)/symbol.cc \
- $(srcdir)/dictionary.cc \
- $(srcdir)/reg.cc \
- $(srcdir)/number.cc \
- majorminor.cc
-HDRS=\
- $(srcdir)/charinfo.h \
- $(srcdir)/dictionary.h \
- $(srcdir)/div.h \
- $(srcdir)/env.h \
- $(srcdir)/hvunits.h \
- $(srcdir)/input.h \
- $(srcdir)/node.h \
- $(srcdir)/reg.h \
- $(srcdir)/request.h \
- $(srcdir)/symbol.h \
- $(srcdir)/token.h \
- $(srcdir)/troff.h
-GENSRCS=majorminor.cc
-NAMEPREFIX=$(g)
-
-majorminor.cc: $(top_srcdir)/VERSION $(top_srcdir)/REVISION
- @echo Making $@
- @-rm -f $@
- @echo const char \*major_version = \
- \"`sed -e 's/^\([^.]*\)\..*$$/\1/' $(top_srcdir)/VERSION`\"\; >$@
- @echo const char \*minor_version = \
- \"`sed -e 's/^[^.]*\.\([0-9]*\).*$$/\1/' $(top_srcdir)/VERSION`\"\; >>$@
- @echo const char \*revision = \"`cat $(top_srcdir)/REVISION`\"\; >>$@
diff --git a/contrib/groff/src/roff/troff/TODO b/contrib/groff/src/roff/troff/TODO
deleted file mode 100644
index 66605973e569..000000000000
--- a/contrib/groff/src/roff/troff/TODO
+++ /dev/null
@@ -1,134 +0,0 @@
-A line prefix request to make e.g. French quotation possible:
-
- He said: >> blablablabla
- >> blablabla blabla bla
- >> blabla blabla bla bla
- >> bla bla bla blablabla
- >> blabla. <<
-
-Give a more helpful error message when the indent is set to a value
-greater than the line-length.
-
-Tracing. This is a pain to implement because requests are responsible
-for reading their own arguments.
-
-Possibly implement -s option (stop every N pages). This functionality
-would be more appropriate in a postprocessor.
-
-Line breaking should be smarter. In particular, it should be possible
-to shrink spaces. Also avoid having a line that's been shrunk a lot
-next to a line that's been stretched a lot. The difficulty is to
-design a mechanism that allows the user complete control over the
-decision of where to break the line.
-
-Provide a mechanism to control the shape of the rag in non-justified
-text.
-
-Add a discretionary break escape sequence. \='...'...'...' like TeX.
-
-Think about kerning between characters and spaces. (Need to implement
-get_breakpoints and split methods for kern_pair_node class.)
-
-In troff, if .L > 1 when a diversion is reread in no-fill mode, then
-extra line-spacing is added on. Groff at the moment treats line-spacing
-like vertical spacing and doesn't do this.
-
-Suppose \(ch comes from a special font S, and that the current font is
-R. Suppose that R contains a hyphen character and that S does not.
-Suppose that the current font is R. Suppose that \(ch is in a word
-and has a non-zero hyphen-type. Then we ought to be able to hyphenate,
-but we won't be able to because we will look for the hyphen only in
-font S and not in font R.
-
-Perhaps the current input level should be accessible in a number register.
-
-Should \w deal with a newline like \X?
-
-Have another look at uses of token::delimiter. Perhaps we need to
-distinguish the case where we want to see if a token could start a
-number, from the case where we want to see if it could occur somewhere
-in a number expression.
-
-Provide a facility like copy thru in pic.
-
-Fancier implementation of font families which doesn't group fonts into
-families purely on the basis of their names.
-
-In the DESC file make the number of fonts optional if they are all on
-one line.
-
-Number register to give the diversion level.
-
-Time various alternative implementations of scale (both in font.c and
-number.c). On a sparc it's faster to always do it in floating point.
-
-Devise a more compact representation for the hyphenation patterns trie.
-
-Have a per-environment parameter to increase letter-spacing.
-
-Number register to return character height.
-
-Number register to return character slant.
-
-Request to set character height.
-
-Request to set character slant.
-
-Provide some way to upcase or downcase strings.
-
-Support non-uniformly scalable fonts. Perhaps associate a suffix with
-a particular range of sizes. eg
- sizesuffix .display 14-512
-Then is you ask for R at pointsize 16, groff will first look for
-R.display and then R. Probably necessary to be able to specify a
-separate unitwidth for each sizesuffix (eg. for X).
-
-Variant of `.it' for which a line interrupted with \c counts as one
-input line.
-
-Make it possible to suppress hyphenation on a word-by-word basis.
-(Perhaps store hyphenation flags in tfont.)
-
-Possibly allow multiple simultaneous input line traps.
-
-Unpaddable, breakable space escape sequence.
-
-Support hanging punctuation.
-
-In justified text, if the last line of a paragraph is only a little
-bit short it might be desirable to justify the line. Allow the user
-control over this.
-
-The pm request could print where the macro was defined. Also could
-optionally print the contents of a macro.
-
-Provide some way to round numbers to multiples of the current
-horizontal or vertical resolution.
-
-Better string-processing support (search).
-
-Generalized ligatures.
-
-Provide some way for a macro to tell whether it was called with `'' or
-`.'. This would be useful for implementing a tracing macro package.
-
-Request to remove an environment. (Maintain a count of the references
-to the environment from the environment table, environment dictionary
-or environment stack.)
-
-Perhaps in the nr request a leading `-' should only be recognized as a
-decrement when it's at the same input level as the request.
-
-Don't ever change a charinfo. Create new variants instead and chain
-them together.
-
-Unix troff appears to read the first character of a request name in
-copy mode. Should we do the same?
-
-Number register giving name of end macro.
-
-More thorough range checking.
-
-Provide syntax for octal and hexadecimal numeric constants. Perhaps
-o#100 and x#7f as per Scheme. Or perhaps PostScript 16#7f. Ambiguity
-between whether `c' is treated as digit or scaling indicator.
diff --git a/contrib/groff/src/roff/troff/charinfo.h b/contrib/groff/src/roff/troff/charinfo.h
deleted file mode 100644
index a4ecd574828f..000000000000
--- a/contrib/groff/src/roff/troff/charinfo.h
+++ /dev/null
@@ -1,171 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-class macro;
-
-class charinfo {
- static int next_index;
- charinfo *translation;
- int index;
- int number;
- macro *mac;
- unsigned char special_translation;
- unsigned char hyphenation_code;
- unsigned char flags;
- unsigned char ascii_code;
- char not_found;
- char transparent_translate; // non-zero means translation applies to
- // to transparent throughput
-public:
- enum {
- ENDS_SENTENCE = 1,
- BREAK_BEFORE = 2,
- BREAK_AFTER = 4,
- OVERLAPS_HORIZONTALLY = 8,
- OVERLAPS_VERTICALLY = 16,
- TRANSPARENT = 32,
- NUMBERED = 64
- };
- enum {
- TRANSLATE_NONE,
- TRANSLATE_SPACE,
- TRANSLATE_DUMMY,
- TRANSLATE_STRETCHABLE_SPACE,
- TRANSLATE_HYPHEN_INDICATOR
- };
- symbol nm;
- charinfo(symbol s);
- int get_index();
- int ends_sentence();
- int overlaps_vertically();
- int overlaps_horizontally();
- int can_break_before();
- int can_break_after();
- int transparent();
- unsigned char get_hyphenation_code();
- unsigned char get_ascii_code();
- void set_hyphenation_code(unsigned char);
- void set_ascii_code(unsigned char);
- charinfo *get_translation(int = 0);
- void set_translation(charinfo *, int);
- void set_flags(unsigned char);
- void set_special_translation(int, int);
- int get_special_translation(int = 0);
- macro *set_macro(macro *);
- macro *get_macro();
- int first_time_not_found();
- void set_number(int);
- int get_number();
- int numbered();
- symbol *get_symbol();
-};
-
-charinfo *get_charinfo(symbol);
-extern charinfo *charset_table[];
-charinfo *get_charinfo_by_number(int);
-
-inline int charinfo::overlaps_horizontally()
-{
- return flags & OVERLAPS_HORIZONTALLY;
-}
-
-inline int charinfo::overlaps_vertically()
-{
- return flags & OVERLAPS_VERTICALLY;
-}
-
-inline int charinfo::can_break_before()
-{
- return flags & BREAK_BEFORE;
-}
-
-inline int charinfo::can_break_after()
-{
- return flags & BREAK_AFTER;
-}
-
-inline int charinfo::ends_sentence()
-{
- return flags & ENDS_SENTENCE;
-}
-
-inline int charinfo::transparent()
-{
- return flags & TRANSPARENT;
-}
-
-inline int charinfo::numbered()
-{
- return flags & NUMBERED;
-}
-
-inline charinfo *charinfo::get_translation(int transparent_throughput)
-{
- return (transparent_throughput && !transparent_translate
- ? 0
- : translation);
-}
-
-inline unsigned char charinfo::get_hyphenation_code()
-{
- return hyphenation_code;
-}
-
-inline unsigned char charinfo::get_ascii_code()
-{
- return ascii_code;
-}
-
-inline void charinfo::set_flags(unsigned char c)
-{
- flags = c;
-}
-
-inline int charinfo::get_index()
-{
- return index;
-}
-
-inline int charinfo::get_special_translation(int transparent_throughput)
-{
- return (transparent_throughput && !transparent_translate
- ? int(TRANSLATE_NONE)
- : special_translation);
-}
-
-inline macro *charinfo::get_macro()
-{
- return mac;
-}
-
-inline int charinfo::first_time_not_found()
-{
- if (not_found)
- return 0;
- else {
- not_found = 1;
- return 1;
- }
-}
-
-inline symbol *charinfo::get_symbol()
-{
- return( &nm );
-}
diff --git a/contrib/groff/src/roff/troff/column.cc b/contrib/groff/src/roff/troff/column.cc
deleted file mode 100644
index 8d6a6ebe5976..000000000000
--- a/contrib/groff/src/roff/troff/column.cc
+++ /dev/null
@@ -1,732 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef COLUMN
-
-#include "troff.h"
-#include "symbol.h"
-#include "dictionary.h"
-#include "hvunits.h"
-#include "env.h"
-#include "request.h"
-#include "node.h"
-#include "token.h"
-#include "div.h"
-#include "reg.h"
-#include "stringclass.h"
-
-void output_file::vjustify(vunits, symbol)
-{
- // do nothing
-}
-
-struct justification_spec;
-struct output_line;
-
-class column : public output_file {
-private:
- output_file *out;
- vunits bottom;
- output_line *col;
- output_line **tail;
- void add_output_line(output_line *);
- void begin_page(int pageno, vunits page_length);
- void flush();
- void print_line(hunits, vunits, node *, vunits, vunits);
- void vjustify(vunits, symbol);
- void transparent_char(unsigned char c);
- void copy_file(hunits, vunits, const char *);
- int is_printing();
- void check_bottom();
-public:
- column();
- ~column();
- void start();
- void output();
- void justify(const justification_spec &);
- void trim();
- void reset();
- vunits get_bottom();
- vunits get_last_extra_space();
- int is_active() { return out != 0; }
-};
-
-column *the_column = 0;
-
-struct transparent_output_line;
-struct vjustify_output_line;
-
-class output_line {
- output_line *next;
-public:
- output_line();
- virtual ~output_line();
- virtual void output(output_file *, vunits);
- virtual transparent_output_line *as_transparent_output_line();
- virtual vjustify_output_line *as_vjustify_output_line();
- virtual vunits distance();
- virtual vunits height();
- virtual void reset();
- virtual vunits extra_space(); // post line
- friend class column;
- friend class justification_spec;
-};
-
-class position_output_line : public output_line {
- vunits dist;
-public:
- position_output_line(vunits);
- vunits distance();
-};
-
-class node_output_line : public position_output_line {
- node *nd;
- hunits page_offset;
- vunits before;
- vunits after;
-public:
- node_output_line(vunits, node *, hunits, vunits, vunits);
- ~node_output_line();
- void output(output_file *, vunits);
- vunits height();
- vunits extra_space();
-};
-
-class vjustify_output_line : public position_output_line {
- vunits current;
- symbol typ;
-public:
- vjustify_output_line(vunits dist, symbol);
- vunits height();
- vjustify_output_line *as_vjustify_output_line();
- void vary(vunits amount);
- void reset();
- symbol type();
-};
-
-inline symbol vjustify_output_line::type()
-{
- return typ;
-}
-
-class copy_file_output_line : public position_output_line {
- symbol filename;
- hunits hpos;
-public:
- copy_file_output_line(vunits, const char *, hunits);
- void output(output_file *, vunits);
-};
-
-class transparent_output_line : public output_line {
- string buf;
-public:
- transparent_output_line();
- void output(output_file *, vunits);
- void append_char(unsigned char c);
- transparent_output_line *as_transparent_output_line();
-};
-
-output_line::output_line() : next(0)
-{
-}
-
-output_line::~output_line()
-{
-}
-
-void output_line::reset()
-{
-}
-
-transparent_output_line *output_line::as_transparent_output_line()
-{
- return 0;
-}
-
-vjustify_output_line *output_line::as_vjustify_output_line()
-{
- return 0;
-}
-
-void output_line::output(output_file *, vunits)
-{
-}
-
-vunits output_line::distance()
-{
- return V0;
-}
-
-vunits output_line::height()
-{
- return V0;
-}
-
-vunits output_line::extra_space()
-{
- return V0;
-}
-
-position_output_line::position_output_line(vunits d)
-: dist(d)
-{
-}
-
-vunits position_output_line::distance()
-{
- return dist;
-}
-
-node_output_line::node_output_line(vunits d, node *n, hunits po, vunits b, vunits a)
-: position_output_line(d), nd(n), page_offset(po), before(b), after(a)
-{
-}
-
-node_output_line::~node_output_line()
-{
- delete_node_list(nd);
-}
-
-void node_output_line::output(output_file *out, vunits pos)
-{
- out->print_line(page_offset, pos, nd, before, after);
- nd = 0;
-}
-
-vunits node_output_line::height()
-{
- return after;
-}
-
-vunits node_output_line::extra_space()
-{
- return after;
-}
-
-vjustify_output_line::vjustify_output_line(vunits d, symbol t)
-: position_output_line(d), typ(t)
-{
-}
-
-void vjustify_output_line::reset()
-{
- current = V0;
-}
-
-vunits vjustify_output_line::height()
-{
- return current;
-}
-
-vjustify_output_line *vjustify_output_line::as_vjustify_output_line()
-{
- return this;
-}
-
-inline void vjustify_output_line::vary(vunits amount)
-{
- current += amount;
-}
-
-transparent_output_line::transparent_output_line()
-{
-}
-
-transparent_output_line *transparent_output_line::as_transparent_output_line()
-{
- return this;
-}
-
-void transparent_output_line::append_char(unsigned char c)
-{
- assert(c != 0);
- buf += c;
-}
-
-void transparent_output_line::output(output_file *out, vunits)
-{
- int len = buf.length();
- for (int i = 0; i < len; i++)
- out->transparent_char(buf[i]);
-}
-
-copy_file_output_line::copy_file_output_line(vunits d, const char *f, hunits h)
-: position_output_line(d), hpos(h), filename(f)
-{
-}
-
-void copy_file_output_line::output(output_file *out, vunits pos)
-{
- out->copy_file(hpos, pos, filename.contents());
-}
-
-column::column()
-: bottom(V0), col(0), tail(&col), out(0)
-{
-}
-
-column::~column()
-{
- assert(out != 0);
- error("automatically outputting column before exiting");
- output();
- delete the_output;
-}
-
-void column::start()
-{
- assert(out == 0);
- if (!the_output)
- init_output();
- assert(the_output != 0);
- out = the_output;
- the_output = this;
-}
-
-void column::begin_page(int pageno, vunits page_length)
-{
- assert(out != 0);
- if (col) {
- error("automatically outputting column before beginning next page");
- output();
- the_output->begin_page(pageno, page_length);
- }
- else
- out->begin_page(pageno, page_length);
-
-}
-
-void column::flush()
-{
- assert(out != 0);
- out->flush();
-}
-
-int column::is_printing()
-{
- assert(out != 0);
- return out->is_printing();
-}
-
-vunits column::get_bottom()
-{
- return bottom;
-}
-
-void column::add_output_line(output_line *ln)
-{
- *tail = ln;
- bottom += ln->distance();
- bottom += ln->height();
- ln->next = 0;
- tail = &(*tail)->next;
-}
-
-void column::print_line(hunits page_offset, vunits pos, node *nd,
- vunits before, vunits after)
-{
- assert(out != 0);
- add_output_line(new node_output_line(pos - bottom, nd, page_offset, before, after));
-}
-
-void column::vjustify(vunits pos, symbol typ)
-{
- assert(out != 0);
- add_output_line(new vjustify_output_line(pos - bottom, typ));
-}
-
-void column::transparent_char(unsigned char c)
-{
- assert(out != 0);
- transparent_output_line *tl = 0;
- if (*tail)
- tl = (*tail)->as_transparent_output_line();
- if (!tl) {
- tl = new transparent_output_line;
- add_output_line(tl);
- }
- tl->append_char(c);
-}
-
-void column::copy_file(hunits page_offset, vunits pos, const char *filename)
-{
- assert(out != 0);
- add_output_line(new copy_file_output_line(pos - bottom, filename, page_offset));
-}
-
-void column::trim()
-{
- output_line **spp = 0;
- for (output_line **pp = &col; *pp; pp = &(*pp)->next)
- if ((*pp)->as_vjustify_output_line() == 0)
- spp = 0;
- else if (!spp)
- spp = pp;
- if (spp) {
- output_line *ln = *spp;
- *spp = 0;
- tail = spp;
- while (ln) {
- output_line *tem = ln->next;
- bottom -= ln->distance();
- bottom -= ln->height();
- delete ln;
- ln = tem;
- }
- }
-}
-
-void column::reset()
-{
- bottom = V0;
- for (output_line *ln = col; ln; ln = ln->next) {
- bottom += ln->distance();
- ln->reset();
- bottom += ln->height();
- }
-}
-
-void column::check_bottom()
-{
- vunits b;
- for (output_line *ln = col; ln; ln = ln->next) {
- b += ln->distance();
- b += ln->height();
- }
- assert(b == bottom);
-}
-
-void column::output()
-{
- assert(out != 0);
- vunits vpos(V0);
- output_line *ln = col;
- while (ln) {
- vpos += ln->distance();
- ln->output(out, vpos);
- vpos += ln->height();
- output_line *tem = ln->next;
- delete ln;
- ln = tem;
- }
- tail = &col;
- bottom = V0;
- col = 0;
- the_output = out;
- out = 0;
-}
-
-vunits column::get_last_extra_space()
-{
- if (!col)
- return V0;
- for (output_line *p = col; p->next; p = p->next)
- ;
- return p->extra_space();
-}
-
-class justification_spec {
- vunits height;
- symbol *type;
- vunits *amount;
- int n;
- int maxn;
-public:
- justification_spec(vunits);
- ~justification_spec();
- void append(symbol t, vunits v);
- void justify(output_line *, vunits *bottomp) const;
-};
-
-justification_spec::justification_spec(vunits h)
-: height(h), n(0), maxn(10)
-{
- type = new symbol[maxn];
- amount = new vunits[maxn];
-}
-
-justification_spec::~justification_spec()
-{
- a_delete type;
- a_delete amount;
-}
-
-void justification_spec::append(symbol t, vunits v)
-{
- if (v <= V0) {
- if (v < V0)
- warning(WARN_RANGE,
- "maximum space for vertical justification must not be negative");
- else
- warning(WARN_RANGE,
- "maximum space for vertical justification must not be zero");
- return;
- }
- if (n >= maxn) {
- maxn *= 2;
- symbol *old_type = type;
- type = new symbol[maxn];
- int i;
- for (i = 0; i < n; i++)
- type[i] = old_type[i];
- a_delete old_type;
- vunits *old_amount = amount;
- amount = new vunits[maxn];
- for (i = 0; i < n; i++)
- amount[i] = old_amount[i];
- a_delete old_amount;
- }
- assert(n < maxn);
- type[n] = t;
- amount[n] = v;
- n++;
-}
-
-void justification_spec::justify(output_line *col, vunits *bottomp) const
-{
- if (*bottomp >= height)
- return;
- vunits total;
- output_line *p;
- for (p = col; p; p = p->next) {
- vjustify_output_line *sp = p->as_vjustify_output_line();
- if (sp) {
- symbol t = sp->type();
- for (int i = 0; i < n; i++) {
- if (t == type[i])
- total += amount[i];
- }
- }
- }
- vunits gap = height - *bottomp;
- for (p = col; p; p = p->next) {
- vjustify_output_line *sp = p->as_vjustify_output_line();
- if (sp) {
- symbol t = sp->type();
- for (int i = 0; i < n; i++) {
- if (t == type[i]) {
- if (total <= gap) {
- sp->vary(amount[i]);
- gap -= amount[i];
- }
- else {
- // gap < total
- vunits v = scale(amount[i], gap, total);
- sp->vary(v);
- gap -= v;
- }
- total -= amount[i];
- }
- }
- }
- }
- assert(total == V0);
- *bottomp = height - gap;
-}
-
-void column::justify(const justification_spec &js)
-{
- check_bottom();
- js.justify(col, &bottom);
- check_bottom();
-}
-
-void column_justify()
-{
- vunits height;
- if (!the_column->is_active())
- error("can't justify column - column not active");
- else if (get_vunits(&height, 'v')) {
- justification_spec js(height);
- symbol nm = get_long_name(1);
- if (!nm.is_null()) {
- vunits v;
- if (get_vunits(&v, 'v')) {
- js.append(nm, v);
- int err = 0;
- while (has_arg()) {
- nm = get_long_name(1);
- if (nm.is_null()) {
- err = 1;
- break;
- }
- if (!get_vunits(&v, 'v')) {
- err = 1;
- break;
- }
- js.append(nm, v);
- }
- if (!err)
- the_column->justify(js);
- }
- }
- }
- skip_line();
-}
-
-void column_start()
-{
- if (the_column->is_active())
- error("can't start column - column already active");
- else
- the_column->start();
- skip_line();
-}
-
-void column_output()
-{
- if (!the_column->is_active())
- error("can't output column - column not active");
- else
- the_column->output();
- skip_line();
-}
-
-void column_trim()
-{
- if (!the_column->is_active())
- error("can't trim column - column not active");
- else
- the_column->trim();
- skip_line();
-}
-
-void column_reset()
-{
- if (!the_column->is_active())
- error("can't reset column - column not active");
- else
- the_column->reset();
- skip_line();
-}
-
-class column_bottom_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *column_bottom_reg::get_string()
-{
- return i_to_a(the_column->get_bottom().to_units());
-}
-
-class column_extra_space_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *column_extra_space_reg::get_string()
-{
- return i_to_a(the_column->get_last_extra_space().to_units());
-}
-
-class column_active_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *column_active_reg::get_string()
-{
- return the_column->is_active() ? "1" : "0";
-}
-
-static int no_vjustify_mode = 0;
-
-class vjustify_node : public node {
- symbol typ;
-public:
- vjustify_node(symbol);
- int reread(int *);
- const char *type();
- int same(node *);
- node *copy();
-};
-
-vjustify_node::vjustify_node(symbol t)
-: typ(t)
-{
-}
-
-node *vjustify_node::copy()
-{
- return new vjustify_node(typ);
-}
-
-const char *vjustify_node::type()
-{
- return "vjustify_node";
-}
-
-int vjustify_node::same(node *nd)
-{
- return typ == ((vjustify_node *)nd)->typ;
-}
-
-int vjustify_node::reread(int *bolp)
-{
- curdiv->vjustify(typ);
- *bolp = 1;
- return 1;
-}
-
-void macro_diversion::vjustify(symbol type)
-{
- if (!no_vjustify_mode)
- mac->append(new vjustify_node(type));
-}
-
-void top_level_diversion::vjustify(symbol type)
-{
- if (no_space_mode || no_vjustify_mode)
- return;
- assert(first_page_begun); // I'm not sure about this.
- the_output->vjustify(vertical_position, type);
-}
-
-void no_vjustify()
-{
- skip_line();
- no_vjustify_mode = 1;
-}
-
-void restore_vjustify()
-{
- skip_line();
- no_vjustify_mode = 0;
-}
-
-void init_column_requests()
-{
- the_column = new column;
- init_request("cols", column_start);
- init_request("colo", column_output);
- init_request("colj", column_justify);
- init_request("colr", column_reset);
- init_request("colt", column_trim);
- init_request("nvj", no_vjustify);
- init_request("rvj", restore_vjustify);
- number_reg_dictionary.define(".colb", new column_bottom_reg);
- number_reg_dictionary.define(".colx", new column_extra_space_reg);
- number_reg_dictionary.define(".cola", new column_active_reg);
- number_reg_dictionary.define(".nvj",
- new constant_int_reg(&no_vjustify_mode));
-}
-
-#endif /* COLUMN */
diff --git a/contrib/groff/src/roff/troff/dictionary.cc b/contrib/groff/src/roff/troff/dictionary.cc
deleted file mode 100644
index 169536c6761b..000000000000
--- a/contrib/groff/src/roff/troff/dictionary.cc
+++ /dev/null
@@ -1,212 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-#include "troff.h"
-#include "symbol.h"
-#include "dictionary.h"
-
-// is `p' a good size for a hash table
-
-static int is_good_size(int p)
-{
- const int SMALL = 10;
- unsigned i;
- for (i = 2; i <= p/2; i++)
- if (p % i == 0)
- return 0;
- for (i = 0x100; i != 0; i <<= 8)
- if (i % p <= SMALL || i % p > p - SMALL)
- return 0;
- return 1;
-}
-
-dictionary::dictionary(int n) : size(n), used(0), threshold(0.5), factor(1.5)
-{
- table = new association[n];
-}
-
-// see Knuth, Sorting and Searching, p518, Algorithm L
-// we can't use double-hashing because we want a remove function
-
-void *dictionary::lookup(symbol s, void *v)
-{
- int i;
- for (i = int(s.hash() % size);
- table[i].v != 0;
- i == 0 ? i = size - 1: --i)
- if (s == table[i].s) {
- if (v != 0) {
- void *temp = table[i].v;
- table[i].v = v;
- return temp;
- }
- else
- return table[i].v;
- }
- if (v == 0)
- return 0;
- ++used;
- table[i].v = v;
- table[i].s = s;
- if ((double)used/(double)size >= threshold || used + 1 >= size) {
- int old_size = size;
- size = int(size*factor);
- while (!is_good_size(size))
- ++size;
- association *old_table = table;
- table = new association[size];
- used = 0;
- for (i = 0; i < old_size; i++)
- if (old_table[i].v != 0)
- (void)lookup(old_table[i].s, old_table[i].v);
- a_delete old_table;
- }
- return 0;
-}
-
-void *dictionary::lookup(const char *p)
-{
- symbol s(p, MUST_ALREADY_EXIST);
- if (s.is_null())
- return 0;
- else
- return lookup(s);
-}
-
-// see Knuth, Sorting and Searching, p527, Algorithm R
-
-void *dictionary::remove(symbol s)
-{
- // this relies on the fact that we are using linear probing
- int i;
- for (i = int(s.hash() % size);
- table[i].v != 0 && s != table[i].s;
- i == 0 ? i = size - 1: --i)
- ;
- void *p = table[i].v;
- while (table[i].v != 0) {
- table[i].v = 0;
- int j = i;
- int r;
- do {
- --i;
- if (i < 0)
- i = size - 1;
- if (table[i].v == 0)
- break;
- r = int(table[i].s.hash() % size);
- } while ((i <= r && r < j) || (r < j && j < i) || (j < i && i <= r));
- table[j] = table[i];
- }
- if (p != 0)
- --used;
- return p;
-}
-
-dictionary_iterator::dictionary_iterator(dictionary &d) : dict(&d), i(0)
-{
-}
-
-int dictionary_iterator::get(symbol *sp, void **vp)
-{
- for (; i < dict->size; i++)
- if (dict->table[i].v) {
- *sp = dict->table[i].s;
- *vp = dict->table[i].v;
- i++;
- return 1;
- }
- return 0;
-}
-
-object_dictionary_iterator::object_dictionary_iterator(object_dictionary &od)
- : di(od.d)
-{
-}
-
-object::object() : rcount(0)
-{
-}
-
-object::~object()
-{
-}
-
-void object::add_reference()
-{
- rcount += 1;
-}
-
-void object::remove_reference()
-{
- if (--rcount == 0)
- delete this;
-}
-
-object_dictionary::object_dictionary(int n) : d(n)
-{
-}
-
-object *object_dictionary::lookup(symbol nm)
-{
- return (object *)d.lookup(nm);
-}
-
-void object_dictionary::define(symbol nm, object *obj)
-{
- obj->add_reference();
- obj = (object *)d.lookup(nm, obj);
- if (obj)
- obj->remove_reference();
-}
-
-void object_dictionary::rename(symbol oldnm, symbol newnm)
-{
- object *obj = (object *)d.remove(oldnm);
- if (obj) {
- obj = (object *)d.lookup(newnm, obj);
- if (obj)
- obj->remove_reference();
- }
-}
-
-void object_dictionary::remove(symbol nm)
-{
- object *obj = (object *)d.remove(nm);
- if (obj)
- obj->remove_reference();
-}
-
-// Return non-zero if oldnm was defined.
-
-int object_dictionary::alias(symbol newnm, symbol oldnm)
-{
- object *obj = (object *)d.lookup(oldnm);
- if (obj) {
- obj->add_reference();
- obj = (object *)d.lookup(newnm, obj);
- if (obj)
- obj->remove_reference();
- return 1;
- }
- return 0;
-}
-
diff --git a/contrib/groff/src/roff/troff/dictionary.h b/contrib/groff/src/roff/troff/dictionary.h
deleted file mode 100644
index 4f319be49504..000000000000
--- a/contrib/groff/src/roff/troff/dictionary.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-
-// there is no distinction between name with no value and name with NULL value
-// null names are not permitted (they will be ignored).
-
-struct association {
- symbol s;
- void *v;
- association() : v(0) {}
-};
-
-class dictionary;
-
-class dictionary_iterator {
- dictionary *dict;
- int i;
-public:
- dictionary_iterator(dictionary &);
- int get(symbol *, void **);
-};
-
-class dictionary {
- int size;
- int used;
- double threshold;
- double factor;
- association *table;
- void rehash(int);
-public:
- dictionary(int);
- void *lookup(symbol s, void *v=0); // returns value associated with key
- void *lookup(const char *);
- // if second parameter not NULL, value will be replaced
- void *remove(symbol);
- friend class dictionary_iterator;
-};
-
-class object {
- int rcount;
- public:
- object();
- virtual ~object();
- void add_reference();
- void remove_reference();
-};
-
-class object_dictionary;
-
-class object_dictionary_iterator {
- dictionary_iterator di;
-public:
- object_dictionary_iterator(object_dictionary &);
- int get(symbol *, object **);
-};
-
-class object_dictionary {
- dictionary d;
-public:
- object_dictionary(int);
- object *lookup(symbol nm);
- void define(symbol nm, object *obj);
- void rename(symbol oldnm, symbol newnm);
- void remove(symbol nm);
- int alias(symbol newnm, symbol oldnm);
- friend class object_dictionary_iterator;
-};
-
-
-inline int object_dictionary_iterator::get(symbol *sp, object **op)
-{
- return di.get(sp, (void **)op);
-}
diff --git a/contrib/groff/src/roff/troff/div.cc b/contrib/groff/src/roff/troff/div.cc
deleted file mode 100644
index 281c1af8b452..000000000000
--- a/contrib/groff/src/roff/troff/div.cc
+++ /dev/null
@@ -1,1161 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-// diversions
-
-#include "troff.h"
-#include "symbol.h"
-#include "dictionary.h"
-#include "hvunits.h"
-#include "env.h"
-#include "request.h"
-#include "node.h"
-#include "token.h"
-#include "div.h"
-#include "reg.h"
-
-int exit_started = 0; // the exit process has started
-int done_end_macro = 0; // the end macro (if any) has finished
-int seen_last_page_ejector = 0; // seen the LAST_PAGE_EJECTOR cookie
-int last_page_number = 0; // if > 0, the number of the last page
- // specified with -o
-static int began_page_in_end_macro = 0; // a new page was begun during the end macro
-
-static int last_post_line_extra_space = 0; // needed for \n(.a
-static int nl_reg_contents = -1;
-static int dl_reg_contents = 0;
-static int dn_reg_contents = 0;
-static int vertical_position_traps_flag = 1;
-static vunits truncated_space;
-static vunits needed_space;
-
-diversion::diversion(symbol s)
-: prev(0), nm(s), vertical_position(V0), high_water_mark(V0), marked_place(V0)
-{
-}
-
-struct vertical_size {
- vunits pre_extra, post_extra, pre, post;
- vertical_size(vunits vs, vunits post_vs);
-};
-
-vertical_size::vertical_size(vunits vs, vunits post_vs)
-: pre_extra(V0), post_extra(V0), pre(vs), post(post_vs)
-{
-}
-
-void node::set_vertical_size(vertical_size *)
-{
-}
-
-void extra_size_node::set_vertical_size(vertical_size *v)
-{
- if (n < V0) {
- if (-n > v->pre_extra)
- v->pre_extra = -n;
- }
- else if (n > v->post_extra)
- v->post_extra = n;
-}
-
-void vertical_size_node::set_vertical_size(vertical_size *v)
-{
- if (n < V0)
- v->pre = -n;
- else
- v->post = n;
-}
-
-top_level_diversion *topdiv;
-
-diversion *curdiv;
-
-void do_divert(int append, int boxing)
-{
- tok.skip();
- symbol nm = get_name();
- if (nm.is_null()) {
- if (curdiv->prev) {
- if (boxing) {
- curenv->line = curdiv->saved_line;
- curenv->width_total = curdiv->saved_width_total;
- curenv->space_total = curdiv->saved_space_total;
- curenv->saved_indent = curdiv->saved_saved_indent;
- curenv->target_text_length = curdiv->saved_target_text_length;
- curenv->prev_line_interrupted = curdiv->saved_prev_line_interrupted;
- }
- diversion *temp = curdiv;
- curdiv = curdiv->prev;
- delete temp;
- }
- else
- warning(WARN_DI, "diversion stack underflow");
- }
- else {
- macro_diversion *md = new macro_diversion(nm, append);
- md->prev = curdiv;
- curdiv = md;
- if (boxing) {
- curdiv->saved_line = curenv->line;
- curdiv->saved_width_total = curenv->width_total;
- curdiv->saved_space_total = curenv->space_total;
- curdiv->saved_saved_indent = curenv->saved_indent;
- curdiv->saved_target_text_length = curenv->target_text_length;
- curdiv->saved_prev_line_interrupted = curenv->prev_line_interrupted;
- curenv->line = 0;
- curenv->start_line();
- }
- }
- skip_line();
-}
-
-void divert()
-{
- do_divert(0, 0);
-}
-
-void divert_append()
-{
- do_divert(1, 0);
-}
-
-void box()
-{
- do_divert(0, 1);
-}
-
-void box_append()
-{
- do_divert(1, 1);
-}
-
-void diversion::need(vunits n)
-{
- vunits d = distance_to_next_trap();
- if (d < n) {
- space(d, 1);
- truncated_space = -d;
- needed_space = n;
- }
-}
-
-macro_diversion::macro_diversion(symbol s, int append)
-: diversion(s), max_width(H0)
-{
-#if 0
- if (append) {
- /* We don't allow recursive appends eg:
-
- .da a
- .a
- .di
-
- This causes an infinite loop in troff anyway.
- This is because the user could do
-
- .as a foo
-
- in the diversion, and this would mess things up royally,
- since there would be two things appending to the same
- macro_header.
- To make it work, we would have to copy the _contents_
- of the macro into which we were diverting; this doesn't
- strike me as worthwhile.
- However,
-
- .di a
- .a
- .a
- .di
-
- will work and will make `a' contain two copies of what it contained
- before; in troff, `a' would contain nothing. */
- request_or_macro *rm
- = (request_or_macro *)request_dictionary.remove(s);
- if (!rm || (mac = rm->to_macro()) == 0)
- mac = new macro;
- }
- else
- mac = new macro;
-#endif
- // We can now catch the situation described above by comparing
- // the length of the charlist in the macro_header with the length
- // stored in the macro. When we detect this, we copy the contents.
- mac = new macro;
- if (append) {
- request_or_macro *rm
- = (request_or_macro *)request_dictionary.lookup(s);
- if (rm) {
- macro *m = rm->to_macro();
- if (m)
- *mac = *m;
- }
- }
-}
-
-macro_diversion::~macro_diversion()
-{
- request_or_macro *rm = (request_or_macro *)request_dictionary.lookup(nm);
- macro *m = rm ? rm->to_macro() : 0;
- if (m) {
- *m = *mac;
- delete mac;
- }
- else
- request_dictionary.define(nm, mac);
- mac = 0;
- dl_reg_contents = max_width.to_units();
- dn_reg_contents = vertical_position.to_units();
-}
-
-vunits macro_diversion::distance_to_next_trap()
-{
- if (!diversion_trap.is_null() && diversion_trap_pos > vertical_position)
- return diversion_trap_pos - vertical_position;
- else
- // Substract vresolution so that vunits::vunits does not overflow.
- return vunits(INT_MAX - vresolution);
-}
-
-void macro_diversion::transparent_output(unsigned char c)
-{
- mac->append(c);
-}
-
-void macro_diversion::transparent_output(node *n)
-{
- mac->append(n);
-}
-
-void macro_diversion::output(node *nd, int retain_size,
- vunits vs, vunits post_vs, hunits width)
-{
- vertical_size v(vs, post_vs);
- while (nd != 0) {
- nd->set_vertical_size(&v);
- node *temp = nd;
- nd = nd->next;
- if (temp->interpret(mac)) {
- delete temp;
- }
- else {
-#if 1
- temp->freeze_space();
-#endif
- mac->append(temp);
- }
- }
- last_post_line_extra_space = v.post_extra.to_units();
- if (!retain_size) {
- v.pre = vs;
- v.post = post_vs;
- }
- if (width > max_width)
- max_width = width;
- vunits x = v.pre + v.pre_extra + v.post + v.post_extra;
- if (vertical_position_traps_flag
- && !diversion_trap.is_null() && diversion_trap_pos > vertical_position
- && diversion_trap_pos <= vertical_position + x) {
- vunits trunc = vertical_position + x - diversion_trap_pos;
- if (trunc > v.post)
- trunc = v.post;
- v.post -= trunc;
- x -= trunc;
- truncated_space = trunc;
- spring_trap(diversion_trap);
- }
- mac->append(new vertical_size_node(-v.pre));
- mac->append(new vertical_size_node(v.post));
- mac->append('\n');
- vertical_position += x;
- if (vertical_position - v.post > high_water_mark)
- high_water_mark = vertical_position - v.post;
-}
-
-void macro_diversion::space(vunits n, int)
-{
- if (vertical_position_traps_flag
- && !diversion_trap.is_null() && diversion_trap_pos > vertical_position
- && diversion_trap_pos <= vertical_position + n) {
- truncated_space = vertical_position + n - diversion_trap_pos;
- n = diversion_trap_pos - vertical_position;
- spring_trap(diversion_trap);
- }
- else if (n + vertical_position < V0)
- n = -vertical_position;
- mac->append(new diverted_space_node(n));
- vertical_position += n;
-}
-
-void macro_diversion::copy_file(const char *filename)
-{
- mac->append(new diverted_copy_file_node(filename));
-}
-
-top_level_diversion::top_level_diversion()
-: page_number(0), page_count(0), last_page_count(-1),
- page_length(units_per_inch*11),
- prev_page_offset(units_per_inch), page_offset(units_per_inch),
- page_trap_list(0), have_next_page_number(0),
- ejecting_page(0), before_first_page(1), no_space_mode(0)
-{
-}
-
-// find the next trap after pos
-
-trap *top_level_diversion::find_next_trap(vunits *next_trap_pos)
-{
- trap *next_trap = 0;
- for (trap *pt = page_trap_list; pt != 0; pt = pt->next)
- if (!pt->nm.is_null()) {
- if (pt->position >= V0) {
- if (pt->position > vertical_position
- && pt->position < page_length
- && (next_trap == 0 || pt->position < *next_trap_pos)) {
- next_trap = pt;
- *next_trap_pos = pt->position;
- }
- }
- else {
- vunits pos = pt->position;
- pos += page_length;
- if (pos > 0 && pos > vertical_position && (next_trap == 0 || pos < *next_trap_pos)) {
- next_trap = pt;
- *next_trap_pos = pos;
- }
- }
- }
- return next_trap;
-}
-
-vunits top_level_diversion::distance_to_next_trap()
-{
- vunits d;
- if (!find_next_trap(&d))
- return page_length - vertical_position;
- else
- return d - vertical_position;
-}
-
-void top_level_diversion::output(node *nd, int retain_size,
- vunits vs, vunits post_vs, hunits width)
-{
- no_space_mode = 0;
- vunits next_trap_pos;
- trap *next_trap = find_next_trap(&next_trap_pos);
- if (before_first_page && begin_page())
- fatal("sorry, I didn't manage to begin the first page in time: use an explicit .br request");
- vertical_size v(vs, post_vs);
- for (node *tem = nd; tem != 0; tem = tem->next)
- tem->set_vertical_size(&v);
- last_post_line_extra_space = v.post_extra.to_units();
- if (!retain_size) {
- v.pre = vs;
- v.post = post_vs;
- }
- vertical_position += v.pre;
- vertical_position += v.pre_extra;
- the_output->print_line(page_offset, vertical_position, nd,
- v.pre + v.pre_extra, v.post_extra, width);
- vertical_position += v.post_extra;
- if (vertical_position > high_water_mark)
- high_water_mark = vertical_position;
- if (vertical_position_traps_flag && vertical_position >= page_length)
- begin_page();
- else if (vertical_position_traps_flag
- && next_trap != 0 && vertical_position >= next_trap_pos) {
- nl_reg_contents = vertical_position.to_units();
- truncated_space = v.post;
- spring_trap(next_trap->nm);
- }
- else if (v.post > V0) {
- vertical_position += v.post;
- if (vertical_position_traps_flag
- && next_trap != 0 && vertical_position >= next_trap_pos) {
- truncated_space = vertical_position - next_trap_pos;
- vertical_position = next_trap_pos;
- nl_reg_contents = vertical_position.to_units();
- spring_trap(next_trap->nm);
- }
- else if (vertical_position_traps_flag && vertical_position >= page_length)
- begin_page();
- else
- nl_reg_contents = vertical_position.to_units();
- }
- else
- nl_reg_contents = vertical_position.to_units();
-}
-
-void top_level_diversion::transparent_output(unsigned char c)
-{
- if (before_first_page && begin_page())
- // This can only happen with the transparent() request.
- fatal("sorry, I didn't manage to begin the first page in time: use an explicit .br request");
- const char *s = asciify(c);
- while (*s)
- the_output->transparent_char(*s++);
-}
-
-void top_level_diversion::transparent_output(node * /*n*/)
-{
- error("can't transparently output node at top level");
-}
-
-void top_level_diversion::copy_file(const char *filename)
-{
- if (before_first_page && begin_page())
- fatal("sorry, I didn't manage to begin the first page in time: use an explicit .br request");
- the_output->copy_file(page_offset, vertical_position, filename);
-}
-
-void top_level_diversion::space(vunits n, int forced)
-{
- if (no_space_mode) {
- if (!forced)
- return;
- else
- no_space_mode = 0;
- }
- if (before_first_page) {
- if (begin_page()) {
- // This happens if there's a top of page trap, and the first-page
- // transition is caused by `'sp'.
- truncated_space = n > V0 ? n : V0;
- return;
- }
- }
- vunits next_trap_pos;
- trap *next_trap = find_next_trap(&next_trap_pos);
- vunits y = vertical_position + n;
- if (vertical_position_traps_flag && next_trap != 0 && y >= next_trap_pos) {
- vertical_position = next_trap_pos;
- nl_reg_contents = vertical_position.to_units();
- truncated_space = y - vertical_position;
- spring_trap(next_trap->nm);
- }
- else if (y < V0) {
- vertical_position = V0;
- nl_reg_contents = vertical_position.to_units();
- }
- else if (vertical_position_traps_flag && y >= page_length && n >= V0)
- begin_page();
- else {
- vertical_position = y;
- nl_reg_contents = vertical_position.to_units();
- }
-}
-
-trap::trap(symbol s, vunits n, trap *p)
- : next(p), position(n), nm(s)
-{
-}
-
-void top_level_diversion::add_trap(symbol nm, vunits pos)
-{
- trap *first_free_slot = 0;
- trap **p;
- for (p = &page_trap_list; *p; p = &(*p)->next) {
- if ((*p)->nm.is_null()) {
- if (first_free_slot == 0)
- first_free_slot = *p;
- }
- else if ((*p)->position == pos) {
- (*p)->nm = nm;
- return;
- }
- }
- if (first_free_slot) {
- first_free_slot->nm = nm;
- first_free_slot->position = pos;
- }
- else
- *p = new trap(nm, pos, 0);
-}
-
-void top_level_diversion::remove_trap(symbol nm)
-{
- for (trap *p = page_trap_list; p; p = p->next)
- if (p->nm == nm) {
- p->nm = NULL_SYMBOL;
- return;
- }
-}
-
-void top_level_diversion::remove_trap_at(vunits pos)
-{
- for (trap *p = page_trap_list; p; p = p->next)
- if (p->position == pos) {
- p->nm = NULL_SYMBOL;
- return;
- }
-}
-
-void top_level_diversion::change_trap(symbol nm, vunits pos)
-{
- for (trap *p = page_trap_list; p; p = p->next)
- if (p->nm == nm) {
- p->position = pos;
- return;
- }
-}
-
-void top_level_diversion::print_traps()
-{
- for (trap *p = page_trap_list; p; p = p->next)
- if (p->nm.is_null())
- fprintf(stderr, " empty\n");
- else
- fprintf(stderr, "%s\t%d\n", p->nm.contents(), p->position.to_units());
- fflush(stderr);
-}
-
-void end_diversions()
-{
- while (curdiv != topdiv) {
- error("automatically ending diversion `%1' on exit",
- curdiv->nm.contents());
- diversion *tem = curdiv;
- curdiv = curdiv->prev;
- delete tem;
- }
-}
-
-void cleanup_and_exit(int exit_code)
-{
- if (the_output) {
- the_output->trailer(topdiv->get_page_length());
- delete the_output;
- }
- exit(exit_code);
-}
-
-// returns non-zero if it sprung a top of page trap
-
-int top_level_diversion::begin_page()
-{
- if (exit_started) {
- if (page_count == last_page_count
- ? curenv->is_empty()
- : (done_end_macro && (seen_last_page_ejector || began_page_in_end_macro)))
- cleanup_and_exit(0);
- if (!done_end_macro)
- began_page_in_end_macro = 1;
- }
- if (last_page_number > 0 && page_number == last_page_number)
- cleanup_and_exit(0);
- if (!the_output)
- init_output();
- ++page_count;
- if (have_next_page_number) {
- page_number = next_page_number;
- have_next_page_number = 0;
- }
- else if (before_first_page == 1)
- page_number = 1;
- else
- page_number++;
- // spring the top of page trap if there is one
- vunits next_trap_pos;
- vertical_position = -vresolution;
- trap *next_trap = find_next_trap(&next_trap_pos);
- vertical_position = V0;
- high_water_mark = V0;
- ejecting_page = 0;
- // If before_first_page was 2, then the top of page transition was undone
- // using eg .nr nl 0-1. See nl_reg::set_value.
- if (before_first_page != 2)
- the_output->begin_page(page_number, page_length);
- before_first_page = 0;
- nl_reg_contents = vertical_position.to_units();
- if (vertical_position_traps_flag && next_trap != 0 && next_trap_pos == V0) {
- truncated_space = V0;
- spring_trap(next_trap->nm);
- return 1;
- }
- else
- return 0;
-}
-
-void continue_page_eject()
-{
- if (topdiv->get_ejecting()) {
- if (curdiv != topdiv)
- error("can't continue page ejection because of current diversion");
- else if (!vertical_position_traps_flag)
- error("can't continue page ejection because vertical position traps disabled");
- else {
- push_page_ejector();
- topdiv->space(topdiv->get_page_length(), 1);
- }
- }
-}
-
-void top_level_diversion::set_next_page_number(int n)
-{
- next_page_number= n;
- have_next_page_number = 1;
-}
-
-int top_level_diversion::get_next_page_number()
-{
- return have_next_page_number ? next_page_number : page_number + 1;
-}
-
-void top_level_diversion::set_page_length(vunits n)
-{
- page_length = n;
-}
-
-diversion::~diversion()
-{
-}
-
-void page_offset()
-{
- hunits n;
- // The troff manual says that the default scaling indicator is v,
- // but it is in fact m: v wouldn't make sense for a horizontally
- // oriented request.
- if (!has_arg() || !get_hunits(&n, 'm', topdiv->page_offset))
- n = topdiv->prev_page_offset;
- topdiv->prev_page_offset = topdiv->page_offset;
- topdiv->page_offset = n;
- curenv->add_html_tag(".po", n.to_units());
- skip_line();
-}
-
-void page_length()
-{
- vunits n;
- if (has_arg() && get_vunits(&n, 'v', topdiv->get_page_length()))
- topdiv->set_page_length(n);
- else
- topdiv->set_page_length(11*units_per_inch);
- skip_line();
-}
-
-void when_request()
-{
- vunits n;
- if (get_vunits(&n, 'v')) {
- symbol s = get_name();
- if (s.is_null())
- topdiv->remove_trap_at(n);
- else
- topdiv->add_trap(s, n);
- }
- skip_line();
-}
-
-void begin_page()
-{
- int got_arg = 0;
- int n;
- if (has_arg() && get_integer(&n, topdiv->get_page_number()))
- got_arg = 1;
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (curdiv == topdiv) {
- if (topdiv->before_first_page) {
- if (!break_flag) {
- if (got_arg)
- topdiv->set_next_page_number(n);
- if (got_arg || !topdiv->no_space_mode)
- topdiv->begin_page();
- }
- else if (topdiv->no_space_mode && !got_arg)
- topdiv->begin_page();
- else {
- /* Given this
-
- .wh 0 x
- .de x
- .tm \\n%
- ..
- .bp 3
-
- troff prints
-
- 1
- 3
-
- This code makes groff do the same. */
-
- push_page_ejector();
- topdiv->begin_page();
- if (got_arg)
- topdiv->set_next_page_number(n);
- topdiv->set_ejecting();
- }
- }
- else {
- push_page_ejector();
- if (break_flag)
- curenv->do_break();
- if (got_arg)
- topdiv->set_next_page_number(n);
- if (!(topdiv->no_space_mode && !got_arg))
- topdiv->set_ejecting();
- }
- }
- tok.next();
-}
-
-void no_space()
-{
- if (curdiv == topdiv)
- topdiv->no_space_mode = 1;
- skip_line();
-}
-
-void restore_spacing()
-{
- if (curdiv == topdiv)
- topdiv->no_space_mode = 0;
- skip_line();
-}
-
-/* It is necessary to generate a break before before reading the argument,
-because otherwise arguments using | will be wrong. But if we just
-generate a break as usual, then the line forced out may spring a trap
-and thus push a macro onto the input stack before we have had a chance
-to read the argument to the sp request. We resolve this dilemma by
-setting, before generating the break, a flag which will postpone the
-actual pushing of the macro associated with the trap sprung by the
-outputting of the line forced out by the break till after we have read
-the argument to the request. If the break did cause a trap to be
-sprung, then we don't actually do the space. */
-
-void space_request()
-{
- postpone_traps();
- if (break_flag)
- curenv->do_break();
- vunits n;
- if (!has_arg() || !get_vunits(&n, 'v'))
- n = curenv->get_vertical_spacing();
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (!unpostpone_traps())
- curdiv->space(n);
- else
- // The line might have had line spacing that was truncated.
- truncated_space += n;
- curenv->add_html_tag(".sp", n.to_units());
- tok.next();
-}
-
-void blank_line()
-{
- curenv->do_break();
- if (!trap_sprung_flag)
- curdiv->space(curenv->get_vertical_spacing());
- else
- truncated_space += curenv->get_vertical_spacing();
-}
-
-/* need_space might spring a trap and so we must be careful that the
-BEGIN_TRAP token is not skipped over. */
-
-void need_space()
-{
- vunits n;
- if (!has_arg() || !get_vunits(&n, 'v'))
- n = curenv->get_vertical_spacing();
- while (!tok.newline() && !tok.eof())
- tok.next();
- curdiv->need(n);
- tok.next();
-}
-
-void page_number()
-{
- int n;
- if (has_arg() && get_integer(&n, topdiv->get_page_number()))
- topdiv->set_next_page_number(n);
- skip_line();
-}
-
-vunits saved_space;
-
-void save_vertical_space()
-{
- vunits x;
- if (!has_arg() || !get_vunits(&x, 'v'))
- x = curenv->get_vertical_spacing();
- if (curdiv->distance_to_next_trap() > x)
- curdiv->space(x, 1);
- else
- saved_space = x;
- skip_line();
-}
-
-void output_saved_vertical_space()
-{
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (saved_space > V0)
- curdiv->space(saved_space, 1);
- saved_space = V0;
- tok.next();
-}
-
-void flush_output()
-{
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag)
- curenv->do_break();
- if (the_output)
- the_output->flush();
- curenv->add_html_tag(".fl");
- tok.next();
-}
-
-void macro_diversion::set_diversion_trap(symbol s, vunits n)
-{
- diversion_trap = s;
- diversion_trap_pos = n;
-}
-
-void macro_diversion::clear_diversion_trap()
-{
- diversion_trap = NULL_SYMBOL;
-}
-
-void top_level_diversion::set_diversion_trap(symbol, vunits)
-{
- error("can't set diversion trap when no current diversion");
-}
-
-void top_level_diversion::clear_diversion_trap()
-{
- error("can't set diversion trap when no current diversion");
-}
-
-void diversion_trap()
-{
- vunits n;
- if (has_arg() && get_vunits(&n, 'v')) {
- symbol s = get_name();
- if (!s.is_null())
- curdiv->set_diversion_trap(s, n);
- else
- curdiv->clear_diversion_trap();
- }
- else
- curdiv->clear_diversion_trap();
- skip_line();
-}
-
-void change_trap()
-{
- symbol s = get_name(1);
- if (!s.is_null()) {
- vunits x;
- if (has_arg() && get_vunits(&x, 'v'))
- topdiv->change_trap(s, x);
- else
- topdiv->remove_trap(s);
- }
- skip_line();
-}
-
-void print_traps()
-{
- topdiv->print_traps();
- skip_line();
-}
-
-void mark()
-{
- symbol s = get_name();
- if (s.is_null())
- curdiv->marked_place = curdiv->get_vertical_position();
- else if (curdiv == topdiv)
- set_number_reg(s, nl_reg_contents);
- else
- set_number_reg(s, curdiv->get_vertical_position().to_units());
- skip_line();
-}
-
-// This is truly bizarre. It is documented in the SQ manual.
-
-void return_request()
-{
- vunits dist = curdiv->marked_place - curdiv->get_vertical_position();
- if (has_arg()) {
- if (tok.ch() == '-') {
- tok.next();
- vunits x;
- if (get_vunits(&x, 'v'))
- dist = -x;
- }
- else {
- vunits x;
- if (get_vunits(&x, 'v'))
- dist = x >= V0 ? x - curdiv->get_vertical_position() : V0;
- }
- }
- if (dist < V0)
- curdiv->space(dist);
- skip_line();
-}
-
-void vertical_position_traps()
-{
- int n;
- if (has_arg() && get_integer(&n))
- vertical_position_traps_flag = (n != 0);
- else
- vertical_position_traps_flag = 1;
- skip_line();
-}
-
-class page_offset_reg : public reg {
-public:
- int get_value(units *);
- const char *get_string();
-};
-
-int page_offset_reg::get_value(units *res)
-{
- *res = topdiv->get_page_offset().to_units();
- return 1;
-}
-
-const char *page_offset_reg::get_string()
-{
- return i_to_a(topdiv->get_page_offset().to_units());
-}
-
-class page_length_reg : public reg {
-public:
- int get_value(units *);
- const char *get_string();
-};
-
-int page_length_reg::get_value(units *res)
-{
- *res = topdiv->get_page_length().to_units();
- return 1;
-}
-
-const char *page_length_reg::get_string()
-{
- return i_to_a(topdiv->get_page_length().to_units());
-}
-
-class vertical_position_reg : public reg {
-public:
- int get_value(units *);
- const char *get_string();
-};
-
-int vertical_position_reg::get_value(units *res)
-{
- if (curdiv == topdiv && topdiv->before_first_page)
- *res = -1;
- else
- *res = curdiv->get_vertical_position().to_units();
- return 1;
-}
-
-const char *vertical_position_reg::get_string()
-{
- if (curdiv == topdiv && topdiv->before_first_page)
- return "-1";
- else
- return i_to_a(curdiv->get_vertical_position().to_units());
-}
-
-class high_water_mark_reg : public reg {
-public:
- int get_value(units *);
- const char *get_string();
-};
-
-int high_water_mark_reg::get_value(units *res)
-{
- *res = curdiv->get_high_water_mark().to_units();
- return 1;
-}
-
-const char *high_water_mark_reg::get_string()
-{
- return i_to_a(curdiv->get_high_water_mark().to_units());
-}
-
-class distance_to_next_trap_reg : public reg {
-public:
- int get_value(units *);
- const char *get_string();
-};
-
-int distance_to_next_trap_reg::get_value(units *res)
-{
- *res = curdiv->distance_to_next_trap().to_units();
- return 1;
-}
-
-const char *distance_to_next_trap_reg::get_string()
-{
- return i_to_a(curdiv->distance_to_next_trap().to_units());
-}
-
-class diversion_name_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *diversion_name_reg::get_string()
-{
- return curdiv->get_diversion_name();
-}
-
-class page_number_reg : public general_reg {
-public:
- page_number_reg();
- int get_value(units *);
- void set_value(units);
-};
-
-page_number_reg::page_number_reg()
-{
-}
-
-void page_number_reg::set_value(units n)
-{
- topdiv->set_page_number(n);
-}
-
-int page_number_reg::get_value(units *res)
-{
- *res = topdiv->get_page_number();
- return 1;
-}
-
-class next_page_number_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *next_page_number_reg::get_string()
-{
- return i_to_a(topdiv->get_next_page_number());
-}
-
-class page_ejecting_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *page_ejecting_reg::get_string()
-{
- return i_to_a(topdiv->get_ejecting());
-}
-
-class constant_vunits_reg : public reg {
- vunits *p;
-public:
- constant_vunits_reg(vunits *);
- const char *get_string();
-};
-
-constant_vunits_reg::constant_vunits_reg(vunits *q) : p(q)
-{
-}
-
-const char *constant_vunits_reg::get_string()
-{
- return i_to_a(p->to_units());
-}
-
-class nl_reg : public variable_reg {
-public:
- nl_reg();
- void set_value(units);
-};
-
-nl_reg::nl_reg() : variable_reg(&nl_reg_contents)
-{
-}
-
-void nl_reg::set_value(units n)
-{
- variable_reg::set_value(n);
- // Setting nl to a negative value when the vertical position in
- // the top-level diversion is 0 undoes the top of page transition,
- // so that the header macro will be called as if the top of page
- // transition hasn't happened. This is used by Larry Wall's
- // wrapman program. Setting before_first_page to 2 rather than 1,
- // tells top_level_diversion::begin_page not to call
- // output_file::begin_page again.
- if (n < 0 && topdiv->get_vertical_position() == V0)
- topdiv->before_first_page = 2;
-}
-
-void init_div_requests()
-{
- init_request("wh", when_request);
- init_request("ch", change_trap);
- init_request("pl", page_length);
- init_request("po", page_offset);
- init_request("rs", restore_spacing);
- init_request("ns", no_space);
- init_request("sp", space_request);
- init_request("di", divert);
- init_request("da", divert_append);
- init_request("box", box);
- init_request("boxa", box_append);
- init_request("bp", begin_page);
- init_request("ne", need_space);
- init_request("pn", page_number);
- init_request("dt", diversion_trap);
- init_request("rt", return_request);
- init_request("mk", mark);
- init_request("sv", save_vertical_space);
- init_request("os", output_saved_vertical_space);
- init_request("fl", flush_output);
- init_request("vpt", vertical_position_traps);
- init_request("ptr", print_traps);
- number_reg_dictionary.define(".a",
- new constant_int_reg(&last_post_line_extra_space));
- number_reg_dictionary.define(".z", new diversion_name_reg);
- number_reg_dictionary.define(".o", new page_offset_reg);
- number_reg_dictionary.define(".p", new page_length_reg);
- number_reg_dictionary.define(".d", new vertical_position_reg);
- number_reg_dictionary.define(".h", new high_water_mark_reg);
- number_reg_dictionary.define(".t", new distance_to_next_trap_reg);
- number_reg_dictionary.define("dl", new variable_reg(&dl_reg_contents));
- number_reg_dictionary.define("dn", new variable_reg(&dn_reg_contents));
- number_reg_dictionary.define("nl", new nl_reg);
- number_reg_dictionary.define(".vpt",
- new constant_int_reg(&vertical_position_traps_flag));
- number_reg_dictionary.define("%", new page_number_reg);
- number_reg_dictionary.define(".pn", new next_page_number_reg);
- number_reg_dictionary.define(".trunc",
- new constant_vunits_reg(&truncated_space));
- number_reg_dictionary.define(".ne",
- new constant_vunits_reg(&needed_space));
- number_reg_dictionary.define(".pe", new page_ejecting_reg);
-}
diff --git a/contrib/groff/src/roff/troff/div.h b/contrib/groff/src/roff/troff/div.h
deleted file mode 100644
index 83f9e33c7748..000000000000
--- a/contrib/groff/src/roff/troff/div.h
+++ /dev/null
@@ -1,156 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-class diversion {
- friend void do_divert(int append, int boxing);
- friend void end_diversions();
- diversion *prev;
- node *saved_line;
- hunits saved_width_total;
- int saved_space_total;
- hunits saved_saved_indent;
- hunits saved_target_text_length;
- int saved_prev_line_interrupted;
-protected:
- symbol nm;
- vunits vertical_position;
- vunits high_water_mark;
-public:
- vunits marked_place;
- diversion(symbol s = NULL_SYMBOL);
- virtual ~diversion();
- virtual void output(node *nd, int retain_size, vunits vs, vunits post_vs,
- hunits width) = 0;
- virtual void transparent_output(unsigned char) = 0;
- virtual void transparent_output(node *) = 0;
- virtual void space(vunits distance, int forced = 0) = 0;
-#ifdef COLUMN
- virtual void vjustify(symbol) = 0;
-#endif /* COLUMN */
- vunits get_vertical_position() { return vertical_position; }
- vunits get_high_water_mark() { return high_water_mark; }
- virtual vunits distance_to_next_trap() = 0;
- void need(vunits);
- const char *get_diversion_name() { return nm.contents(); }
- virtual void set_diversion_trap(symbol, vunits) = 0;
- virtual void clear_diversion_trap() = 0;
- virtual void copy_file(const char *filename) = 0;
-};
-
-class macro;
-
-class macro_diversion : public diversion {
- macro *mac;
- hunits max_width;
- symbol diversion_trap;
- vunits diversion_trap_pos;
-public:
- macro_diversion(symbol, int);
- ~macro_diversion();
- void output(node *nd, int retain_size, vunits vs, vunits post_vs,
- hunits width);
- void transparent_output(unsigned char);
- void transparent_output(node *);
- void space(vunits distance, int forced = 0);
-#ifdef COLUMN
- void vjustify(symbol);
-#endif /* COLUMN */
- vunits distance_to_next_trap();
- void set_diversion_trap(symbol, vunits);
- void clear_diversion_trap();
- void copy_file(const char *filename);
-};
-
-struct trap {
- trap *next;
- vunits position;
- symbol nm;
- trap(symbol, vunits, trap *);
-};
-
-struct output_file;
-
-class top_level_diversion : public diversion {
- int page_number;
- int page_count;
- int last_page_count;
- vunits page_length;
- hunits prev_page_offset;
- hunits page_offset;
- trap *page_trap_list;
- trap *find_next_trap(vunits *);
- int have_next_page_number;
- int next_page_number;
- int ejecting_page; // Is the current page being ejected?
-public:
- int before_first_page;
- int no_space_mode;
- top_level_diversion();
- void output(node *nd, int retain_size, vunits vs, vunits post_vs,
- hunits width);
- void transparent_output(unsigned char);
- void transparent_output(node *);
- void space(vunits distance, int forced = 0);
-#ifdef COLUMN
- void vjustify(symbol);
-#endif /* COLUMN */
- hunits get_page_offset() { return page_offset; }
- vunits get_page_length() { return page_length; }
- vunits distance_to_next_trap();
- void add_trap(symbol nm, vunits pos);
- void change_trap(symbol nm, vunits pos);
- void remove_trap(symbol);
- void remove_trap_at(vunits pos);
- void print_traps();
- int get_page_count() { return page_count; }
- int get_page_number() { return page_number; }
- int get_next_page_number();
- void set_page_number(int n) { page_number = n; }
- int begin_page();
- void set_next_page_number(int);
- void set_page_length(vunits);
- void copy_file(const char *filename);
- int get_ejecting() { return ejecting_page; }
- void set_ejecting() { ejecting_page = 1; }
- friend void page_offset();
- void set_diversion_trap(symbol, vunits);
- void clear_diversion_trap();
- void set_last_page() { last_page_count = page_count; }
-};
-
-extern top_level_diversion *topdiv;
-extern diversion *curdiv;
-
-extern int exit_started;
-extern int done_end_macro;
-extern int last_page_number;
-extern int seen_last_page_ejector;
-
-void spring_trap(symbol); // implemented by input.c
-extern int trap_sprung_flag;
-void postpone_traps();
-int unpostpone_traps();
-
-void push_page_ejector();
-void continue_page_eject();
-void handle_first_page_transition();
-void blank_line();
-
-extern void cleanup_and_exit(int);
diff --git a/contrib/groff/src/roff/troff/env.cc b/contrib/groff/src/roff/troff/env.cc
deleted file mode 100644
index 56f357c95c8b..000000000000
--- a/contrib/groff/src/roff/troff/env.cc
+++ /dev/null
@@ -1,3439 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "troff.h"
-#include "symbol.h"
-#include "dictionary.h"
-#include "hvunits.h"
-#include "env.h"
-#include "request.h"
-#include "node.h"
-#include "token.h"
-#include "div.h"
-#include "reg.h"
-#include "charinfo.h"
-#include "macropath.h"
-#include <math.h>
-
-symbol default_family("T");
-
-enum { ADJUST_LEFT = 0, ADJUST_BOTH = 1, ADJUST_CENTER = 3, ADJUST_RIGHT = 5 };
-
-enum { HYPHEN_LAST_LINE = 2, HYPHEN_LAST_CHARS = 4, HYPHEN_FIRST_CHARS = 8 };
-
-struct env_list {
- environment *env;
- env_list *next;
- env_list(environment *e, env_list *p) : env(e), next(p) {}
-};
-
-env_list *env_stack;
-const int NENVIRONMENTS = 10;
-environment *env_table[NENVIRONMENTS];
-dictionary env_dictionary(10);
-environment *curenv;
-static int next_line_number = 0;
-
-charinfo *field_delimiter_char;
-charinfo *padding_indicator_char;
-
-int translate_space_to_dummy = 0;
-
-class pending_output_line {
- node *nd;
- int no_fill;
- vunits vs;
- vunits post_vs;
- hunits width;
-#ifdef WIDOW_CONTROL
- int last_line; // Is it the last line of the paragraph?
-#endif /* WIDOW_CONTROL */
-public:
- pending_output_line *next;
-
- pending_output_line(node *, int, vunits, vunits, hunits,
- pending_output_line * = 0);
- ~pending_output_line();
- int output();
-
-#ifdef WIDOW_CONTROL
- friend void environment::mark_last_line();
- friend void environment::output(node *, int, vunits, vunits, hunits);
-#endif /* WIDOW_CONTROL */
-};
-
-pending_output_line::pending_output_line(node *n, int nf, vunits v, vunits pv,
- hunits w, pending_output_line *p)
-: nd(n), no_fill(nf), vs(v), post_vs(pv), width(w),
-#ifdef WIDOW_CONTROL
- last_line(0),
-#endif /* WIDOW_CONTROL */
- next(p)
-{
-}
-
-pending_output_line::~pending_output_line()
-{
- delete_node_list(nd);
-}
-
-int pending_output_line::output()
-{
- if (trap_sprung_flag)
- return 0;
-#ifdef WIDOW_CONTROL
- if (next && next->last_line && !no_fill) {
- curdiv->need(vs + post_vs + vunits(vresolution));
- if (trap_sprung_flag) {
- next->last_line = 0; // Try to avoid infinite loops.
- return 0;
- }
- }
-#endif
- curdiv->output(nd, no_fill, vs, post_vs, width);
- nd = 0;
- return 1;
-}
-
-void environment::output(node *nd, int no_fill, vunits vs, vunits post_vs,
- hunits width)
-{
-#ifdef WIDOW_CONTROL
- while (pending_lines) {
- if (widow_control && !pending_lines->no_fill && !pending_lines->next)
- break;
- if (!pending_lines->output())
- break;
- pending_output_line *tem = pending_lines;
- pending_lines = pending_lines->next;
- delete tem;
- }
-#else /* WIDOW_CONTROL */
- output_pending_lines();
-#endif /* WIDOW_CONTROL */
- if (!trap_sprung_flag && !pending_lines
-#ifdef WIDOW_CONTROL
- && (!widow_control || no_fill)
-#endif /* WIDOW_CONTROL */
- ) {
- curdiv->output(nd, no_fill, vs, post_vs, width);
- emitted_node = 1;
- } else {
- pending_output_line **p;
- for (p = &pending_lines; *p; p = &(*p)->next)
- ;
- *p = new pending_output_line(nd, no_fill, vs, post_vs, width);
- }
-}
-
-// a line from .tl goes at the head of the queue
-
-void environment::output_title(node *nd, int no_fill, vunits vs,
- vunits post_vs, hunits width)
-{
- if (!trap_sprung_flag)
- curdiv->output(nd, no_fill, vs, post_vs, width);
- else
- pending_lines = new pending_output_line(nd, no_fill, vs, post_vs, width,
- pending_lines);
-}
-
-void environment::output_pending_lines()
-{
- while (pending_lines && pending_lines->output()) {
- pending_output_line *tem = pending_lines;
- pending_lines = pending_lines->next;
- delete tem;
- }
-}
-
-#ifdef WIDOW_CONTROL
-
-void environment::mark_last_line()
-{
- if (!widow_control || !pending_lines)
- return;
- for (pending_output_line *p = pending_lines; p->next; p = p->next)
- ;
- if (!p->no_fill)
- p->last_line = 1;
-}
-
-void widow_control_request()
-{
- int n;
- if (has_arg() && get_integer(&n))
- curenv->widow_control = n != 0;
- else
- curenv->widow_control = 1;
- skip_line();
-}
-
-#endif /* WIDOW_CONTROL */
-
-/* font_size functions */
-
-size_range *font_size::size_table = 0;
-int font_size::nranges = 0;
-
-extern "C" {
-
-int compare_ranges(const void *p1, const void *p2)
-{
- return ((size_range *)p1)->min - ((size_range *)p2)->min;
-}
-
-}
-
-void font_size::init_size_table(int *sizes)
-{
- nranges = 0;
- while (sizes[nranges*2] != 0)
- nranges++;
- assert(nranges > 0);
- size_table = new size_range[nranges];
- for (int i = 0; i < nranges; i++) {
- size_table[i].min = sizes[i*2];
- size_table[i].max = sizes[i*2 + 1];
- }
- qsort(size_table, nranges, sizeof(size_range), compare_ranges);
-}
-
-font_size::font_size(int sp)
-{
- for (int i = 0; i < nranges; i++) {
- if (sp < size_table[i].min) {
- if (i > 0 && size_table[i].min - sp >= sp - size_table[i - 1].max)
- p = size_table[i - 1].max;
- else
- p = size_table[i].min;
- return;
- }
- if (sp <= size_table[i].max) {
- p = sp;
- return;
- }
- }
- p = size_table[nranges - 1].max;
-}
-
-int font_size::to_units()
-{
- return scale(p, units_per_inch, sizescale*72);
-}
-
-// we can't do this in a static constructor because various dictionaries
-// have to get initialized first
-
-void init_environments()
-{
- curenv = env_table[0] = new environment("0");
-}
-
-void tab_character()
-{
- curenv->tab_char = get_optional_char();
- skip_line();
-}
-
-void leader_character()
-{
- curenv->leader_char = get_optional_char();
- skip_line();
-}
-
-void environment::add_char(charinfo *ci)
-{
- int s;
- if (interrupted)
- ;
- // don't allow fields in dummy environments
- else if (ci == field_delimiter_char && !dummy) {
- if (current_field)
- wrap_up_field();
- else
- start_field();
- }
- else if (current_field && ci == padding_indicator_char)
- add_padding();
- else if (current_tab) {
- if (tab_contents == 0)
- tab_contents = new line_start_node;
- if (ci != hyphen_indicator_char)
- tab_contents = tab_contents->add_char(ci, this, &tab_width, &s);
- else
- tab_contents = tab_contents->add_discretionary_hyphen();
- }
- else {
- if (line == 0)
- start_line();
- if (ci != hyphen_indicator_char)
- line = line->add_char(ci, this, &width_total, &space_total);
- else
- line = line->add_discretionary_hyphen();
- }
-}
-
-node *environment::make_char_node(charinfo *ci)
-{
- return make_node(ci, this);
-}
-
-void environment::add_node(node *n)
-{
- assert(n != 0);
- if (current_tab || current_field)
- n->freeze_space();
- if (interrupted) {
- delete n;
- }
- else if (current_tab) {
- n->next = tab_contents;
- tab_contents = n;
- tab_width += n->width();
- }
- else {
- if (line == 0) {
- if (discarding && n->discardable()) {
- // XXX possibly: input_line_start -= n->width();
- delete n;
- return;
- }
- start_line();
- }
- width_total += n->width();
- space_total += n->nspaces();
- n->next = line;
- line = n;
- }
-}
-
-
-void environment::add_hyphen_indicator()
-{
- if (current_tab || interrupted || current_field
- || hyphen_indicator_char != 0)
- return;
- if (line == 0)
- start_line();
- line = line->add_discretionary_hyphen();
-}
-
-int environment::get_hyphenation_flags()
-{
- return hyphenation_flags;
-}
-
-int environment::get_hyphen_line_max()
-{
- return hyphen_line_max;
-}
-
-int environment::get_hyphen_line_count()
-{
- return hyphen_line_count;
-}
-
-int environment::get_center_lines()
-{
- return center_lines;
-}
-
-int environment::get_right_justify_lines()
-{
- return right_justify_lines;
-}
-
-void environment::add_italic_correction()
-{
- if (current_tab) {
- if (tab_contents)
- tab_contents = tab_contents->add_italic_correction(&tab_width);
- }
- else if (line)
- line = line->add_italic_correction(&width_total);
-}
-
-void environment::space_newline()
-{
- assert(!current_tab && !current_field);
- if (interrupted)
- return;
- hunits x = H0;
- hunits sw = env_space_width(this);
- hunits ssw = env_sentence_space_width(this);
- if (!translate_space_to_dummy) {
- x = sw;
- if (node_list_ends_sentence(line) == 1)
- x += ssw;
- }
- width_list *w = new width_list(sw, ssw);
- if (node_list_ends_sentence(line) == 1)
- w->next = new width_list(sw, ssw);
- if (line != 0 && line->merge_space(x, sw, ssw)) {
- width_total += x;
- return;
- }
- add_node(new word_space_node(x, w));
- possibly_break_line(0, spread_flag);
- spread_flag = 0;
-}
-
-void environment::space()
-{
- space(env_space_width(this), env_sentence_space_width(this));
-}
-
-void environment::space(hunits space_width, hunits sentence_space_width)
-{
- if (interrupted)
- return;
- if (current_field && padding_indicator_char == 0) {
- add_padding();
- return;
- }
- hunits x = translate_space_to_dummy ? H0 : space_width;
- node *p = current_tab ? tab_contents : line;
- hunits *tp = current_tab ? &tab_width : &width_total;
- if (p && p->nspaces() == 1 && p->width() == x
- && node_list_ends_sentence(p->next) == 1) {
- hunits xx = translate_space_to_dummy ? H0 : sentence_space_width;
- if (p->merge_space(xx, space_width, sentence_space_width)) {
- *tp += xx;
- return;
- }
- }
- if (p && p->merge_space(x, space_width, sentence_space_width)) {
- *tp += x;
- return;
- }
- add_node(new word_space_node(x,
- new width_list(space_width,
- sentence_space_width)));
- possibly_break_line(0, spread_flag);
- spread_flag = 0;
-}
-
-node *do_underline_special(int);
-
-void environment::set_font(symbol nm)
-{
- if (interrupted)
- return;
- if (nm == symbol("P")) {
- if (family->make_definite(prev_fontno) < 0)
- return;
- int tem = fontno;
- fontno = prev_fontno;
- prev_fontno = tem;
- }
- else {
- prev_fontno = fontno;
- int n = symbol_fontno(nm);
- if (n < 0) {
- n = next_available_font_position();
- if (!mount_font(n, nm))
- return;
- }
- if (family->make_definite(n) < 0)
- return;
- fontno = n;
- }
- if (underline_spaces && fontno != prev_fontno) {
- if (fontno == get_underline_fontno())
- add_node(do_underline_special(1));
- if (prev_fontno == get_underline_fontno())
- add_node(do_underline_special(0));
- }
-}
-
-void environment::set_font(int n)
-{
- if (interrupted)
- return;
- if (is_good_fontno(n)) {
- prev_fontno = fontno;
- fontno = n;
- }
- else
- warning(WARN_FONT, "bad font number");
-}
-
-void environment::set_family(symbol fam)
-{
- if (fam.is_null()) {
- if (prev_family->make_definite(fontno) < 0)
- return;
- font_family *tem = family;
- family = prev_family;
- prev_family = tem;
- }
- else {
- font_family *f = lookup_family(fam);
- if (f->make_definite(fontno) < 0)
- return;
- prev_family = family;
- family = f;
- }
-}
-
-void environment::set_size(int n)
-{
- if (interrupted)
- return;
- if (n == 0) {
- font_size temp = prev_size;
- prev_size = size;
- size = temp;
- int temp2 = prev_requested_size;
- prev_requested_size = requested_size;
- requested_size = temp2;
- }
- else {
- prev_size = size;
- size = font_size(n);
- prev_requested_size = requested_size;
- requested_size = n;
- }
-}
-
-void environment::set_char_height(int n)
-{
- if (interrupted)
- return;
- if (n == requested_size || n <= 0)
- char_height = 0;
- else
- char_height = n;
-}
-
-void environment::set_char_slant(int n)
-{
- if (interrupted)
- return;
- char_slant = n;
-}
-
-environment::environment(symbol nm)
-: dummy(0),
- prev_line_length((units_per_inch*13)/2),
- line_length((units_per_inch*13)/2),
- prev_title_length((units_per_inch*13)/2),
- title_length((units_per_inch*13)/2),
- prev_size(sizescale*10),
- size(sizescale*10),
- requested_size(sizescale*10),
- prev_requested_size(sizescale*10),
- char_height(0),
- char_slant(0),
- space_size(12),
- sentence_space_size(12),
- adjust_mode(ADJUST_BOTH),
- fill(1),
- interrupted(0),
- prev_line_interrupted(0),
- center_lines(0),
- right_justify_lines(0),
- prev_vertical_spacing(points_to_units(12)),
- vertical_spacing(points_to_units(12)),
- prev_post_vertical_spacing(0),
- post_vertical_spacing(0),
- prev_line_spacing(1),
- line_spacing(1),
- prev_indent(0),
- indent(0),
- temporary_indent(0),
- have_temporary_indent(0),
- underline_lines(0),
- underline_spaces(0),
- input_trap_count(0),
- line(0),
- prev_text_length(0),
- width_total(0),
- space_total(0),
- input_line_start(0),
- tabs(units_per_inch/2, TAB_LEFT),
- line_tabs(0),
- current_tab(TAB_NONE),
- leader_node(0),
- tab_char(0),
- leader_char(charset_table['.']),
- current_field(0),
- discarding(0),
- spread_flag(0),
- margin_character_flags(0),
- margin_character_node(0),
- margin_character_distance(points_to_units(10)),
- numbering_nodes(0),
- number_text_separation(1),
- line_number_indent(0),
- line_number_multiple(1),
- no_number_count(0),
- hyphenation_flags(1),
- hyphen_line_count(0),
- hyphen_line_max(-1),
- hyphenation_space(H0),
- hyphenation_margin(H0),
- composite(0),
- pending_lines(0),
-#ifdef WIDOW_CONTROL
- widow_control(0),
-#endif /* WIDOW_CONTROL */
- need_eol(0),
- ignore_next_eol(0),
- emitted_node(0),
- name(nm),
- control_char('.'),
- no_break_control_char('\''),
- hyphen_indicator_char(0)
-{
- prev_family = family = lookup_family(default_family);
- prev_fontno = fontno = 1;
- if (!is_good_fontno(1))
- fatal("font number 1 not a valid font");
- if (family->make_definite(1) < 0)
- fatal("invalid default family `%1'", default_family.contents());
- prev_fontno = fontno;
-}
-
-environment::environment(const environment *e)
-: dummy(1),
- prev_line_length(e->prev_line_length),
- line_length(e->line_length),
- prev_title_length(e->prev_title_length),
- title_length(e->title_length),
- prev_size(e->prev_size),
- size(e->size),
- requested_size(e->requested_size),
- prev_requested_size(e->prev_requested_size),
- char_height(e->char_height),
- char_slant(e->char_slant),
- prev_fontno(e->prev_fontno),
- fontno(e->fontno),
- prev_family(e->prev_family),
- family(e->family),
- space_size(e->space_size),
- sentence_space_size(e->sentence_space_size),
- adjust_mode(e->adjust_mode),
- fill(e->fill),
- interrupted(0),
- prev_line_interrupted(0),
- center_lines(0),
- right_justify_lines(0),
- prev_vertical_spacing(e->prev_vertical_spacing),
- vertical_spacing(e->vertical_spacing),
- prev_post_vertical_spacing(e->prev_post_vertical_spacing),
- post_vertical_spacing(e->post_vertical_spacing),
- prev_line_spacing(e->prev_line_spacing),
- line_spacing(e->line_spacing),
- prev_indent(e->prev_indent),
- indent(e->indent),
- temporary_indent(0),
- have_temporary_indent(0),
- underline_lines(0),
- underline_spaces(0),
- input_trap_count(0),
- line(0),
- prev_text_length(e->prev_text_length),
- width_total(0),
- space_total(0),
- input_line_start(0),
- tabs(e->tabs),
- line_tabs(e->line_tabs),
- current_tab(TAB_NONE),
- leader_node(0),
- tab_char(e->tab_char),
- leader_char(e->leader_char),
- current_field(0),
- discarding(0),
- spread_flag(0),
- margin_character_flags(e->margin_character_flags),
- margin_character_node(e->margin_character_node),
- margin_character_distance(e->margin_character_distance),
- numbering_nodes(0),
- number_text_separation(e->number_text_separation),
- line_number_indent(e->line_number_indent),
- line_number_multiple(e->line_number_multiple),
- no_number_count(e->no_number_count),
- hyphenation_flags(e->hyphenation_flags),
- hyphen_line_count(0),
- hyphen_line_max(e->hyphen_line_max),
- hyphenation_space(e->hyphenation_space),
- hyphenation_margin(e->hyphenation_margin),
- composite(0),
- pending_lines(0),
-#ifdef WIDOW_CONTROL
- widow_control(e->widow_control),
-#endif /* WIDOW_CONTROL */
- need_eol(0),
- ignore_next_eol(0),
- name(e->name), // so that eg `.if "\n[.ev]"0"' works
- control_char(e->control_char),
- no_break_control_char(e->no_break_control_char),
- hyphen_indicator_char(e->hyphen_indicator_char)
-{
-}
-
-void environment::copy(const environment *e)
-{
- prev_line_length = e->prev_line_length;
- line_length = e->line_length;
- prev_title_length = e->prev_title_length;
- title_length = e->title_length;
- prev_size = e->prev_size;
- size = e->size;
- prev_requested_size = e->prev_requested_size;
- requested_size = e->requested_size;
- char_height = e->char_height;
- char_slant = e->char_slant;
- space_size = e->space_size;
- sentence_space_size = e->sentence_space_size;
- adjust_mode = e->adjust_mode;
- fill = e->fill;
- interrupted = 0;
- prev_line_interrupted = 0;
- center_lines = 0;
- right_justify_lines = 0;
- prev_vertical_spacing = e->prev_vertical_spacing;
- vertical_spacing = e->vertical_spacing;
- prev_post_vertical_spacing = e->prev_post_vertical_spacing,
- post_vertical_spacing = e->post_vertical_spacing,
- prev_line_spacing = e->prev_line_spacing;
- line_spacing = e->line_spacing;
- prev_indent = e->prev_indent;
- indent = e->indent;
- have_temporary_indent = 0;
- temporary_indent = 0;
- underline_lines = 0;
- underline_spaces = 0;
- input_trap_count = 0;
- prev_text_length = e->prev_text_length;
- width_total = 0;
- space_total = 0;
- input_line_start = 0;
- control_char = e->control_char;
- no_break_control_char = e->no_break_control_char;
- hyphen_indicator_char = e->hyphen_indicator_char;
- spread_flag = 0;
- line = 0;
- pending_lines = 0;
- discarding = 0;
- tabs = e->tabs;
- line_tabs = e->line_tabs;
- current_tab = TAB_NONE;
- current_field = 0;
- margin_character_flags = e->margin_character_flags;
- margin_character_node = e->margin_character_node;
- margin_character_distance = e->margin_character_distance;
- numbering_nodes = 0;
- number_text_separation = e->number_text_separation;
- line_number_multiple = e->line_number_multiple;
- line_number_indent = e->line_number_indent;
- no_number_count = e->no_number_count;
- tab_char = e->tab_char;
- leader_char = e->leader_char;
- hyphenation_flags = e->hyphenation_flags;
- fontno = e->fontno;
- prev_fontno = e->prev_fontno;
- dummy = e->dummy;
- family = e->family;
- prev_family = e->prev_family;
- leader_node = 0;
-#ifdef WIDOW_CONTROL
- widow_control = e->widow_control;
-#endif /* WIDOW_CONTROL */
- hyphen_line_max = e->hyphen_line_max;
- hyphen_line_count = 0;
- hyphenation_space = e->hyphenation_space;
- hyphenation_margin = e->hyphenation_margin;
- composite = 0;
-}
-
-environment::~environment()
-{
- delete leader_node;
- delete_node_list(line);
- delete_node_list(numbering_nodes);
-}
-
-hunits environment::get_input_line_position()
-{
- hunits n;
- if (line == 0)
- n = -input_line_start;
- else
- n = width_total - input_line_start;
- if (current_tab)
- n += tab_width;
- return n;
-}
-
-void environment::set_input_line_position(hunits n)
-{
- input_line_start = line == 0 ? -n : width_total - n;
- if (current_tab)
- input_line_start += tab_width;
-}
-
-hunits environment::get_line_length()
-{
- return line_length;
-}
-
-hunits environment::get_saved_line_length()
-{
- if (line)
- return target_text_length + saved_indent;
- else
- return line_length;
-}
-
-vunits environment::get_vertical_spacing()
-{
- return vertical_spacing;
-}
-
-vunits environment::get_post_vertical_spacing()
-{
- return post_vertical_spacing;
-}
-
-int environment::get_line_spacing()
-{
- return line_spacing;
-}
-
-vunits environment::total_post_vertical_spacing()
-{
- vunits tem(post_vertical_spacing);
- if (line_spacing > 1)
- tem += (line_spacing - 1)*vertical_spacing;
- return tem;
-}
-
-int environment::get_bold()
-{
- return get_bold_fontno(fontno);
-}
-
-hunits environment::get_digit_width()
-{
- return env_digit_width(this);
-}
-
-int environment::get_adjust_mode()
-{
- return adjust_mode;
-}
-
-int environment::get_fill()
-{
- return fill;
-}
-
-hunits environment::get_indent()
-{
- return indent;
-}
-
-hunits environment::get_saved_indent()
-{
- if (line)
- return saved_indent;
- else if (have_temporary_indent)
- return temporary_indent;
- else
- return indent;
-}
-
-hunits environment::get_temporary_indent()
-{
- return temporary_indent;
-}
-
-hunits environment::get_title_length()
-{
- return title_length;
-}
-
-node *environment::get_prev_char()
-{
- for (node *n = current_tab ? tab_contents : line; n; n = n->next) {
- node *last = n->last_char_node();
- if (last)
- return last;
- }
- return 0;
-}
-
-hunits environment::get_prev_char_width()
-{
- node *last = get_prev_char();
- if (!last)
- return H0;
- return last->width();
-}
-
-hunits environment::get_prev_char_skew()
-{
- node *last = get_prev_char();
- if (!last)
- return H0;
- return last->skew();
-}
-
-vunits environment::get_prev_char_height()
-{
- node *last = get_prev_char();
- if (!last)
- return V0;
- vunits min, max;
- last->vertical_extent(&min, &max);
- return -min;
-}
-
-vunits environment::get_prev_char_depth()
-{
- node *last = get_prev_char();
- if (!last)
- return V0;
- vunits min, max;
- last->vertical_extent(&min, &max);
- return max;
-}
-
-hunits environment::get_text_length()
-{
- hunits n = line == 0 ? H0 : width_total;
- if (current_tab)
- n += tab_width;
- return n;
-}
-
-hunits environment::get_prev_text_length()
-{
- return prev_text_length;
-}
-
-
-static int sb_reg_contents = 0;
-static int st_reg_contents = 0;
-static int ct_reg_contents = 0;
-static int rsb_reg_contents = 0;
-static int rst_reg_contents = 0;
-static int skw_reg_contents = 0;
-static int ssc_reg_contents = 0;
-
-void environment::width_registers()
-{
- // this is used to implement \w; it sets the st, sb, ct registers
- vunits min = 0, max = 0, cur = 0;
- int character_type = 0;
- ssc_reg_contents = line ? line->subscript_correction().to_units() : 0;
- skw_reg_contents = line ? line->skew().to_units() : 0;
- line = reverse_node_list(line);
- vunits real_min = V0;
- vunits real_max = V0;
- vunits v1, v2;
- for (node *tem = line; tem; tem = tem->next) {
- tem->vertical_extent(&v1, &v2);
- v1 += cur;
- if (v1 < real_min)
- real_min = v1;
- v2 += cur;
- if (v2 > real_max)
- real_max = v2;
- if ((cur += tem->vertical_width()) < min)
- min = cur;
- else if (cur > max)
- max = cur;
- character_type |= tem->character_type();
- }
- line = reverse_node_list(line);
- st_reg_contents = -min.to_units();
- sb_reg_contents = -max.to_units();
- rst_reg_contents = -real_min.to_units();
- rsb_reg_contents = -real_max.to_units();
- ct_reg_contents = character_type;
-}
-
-node *environment::extract_output_line()
-{
- if (current_tab)
- wrap_up_tab();
- node *n = line;
- line = 0;
- return n;
-}
-
-/* environment related requests */
-
-void environment_switch()
-{
- int pop = 0; // 1 means pop, 2 means pop but no error message on underflow
- if (curenv->is_dummy())
- error("can't switch environments when current environment is dummy");
- else if (!has_arg())
- pop = 1;
- else {
- symbol nm;
- if (!tok.delimiter()) {
- // It looks like a number.
- int n;
- if (get_integer(&n)) {
- if (n >= 0 && n < NENVIRONMENTS) {
- env_stack = new env_list(curenv, env_stack);
- if (env_table[n] == 0)
- env_table[n] = new environment(i_to_a(n));
- curenv = env_table[n];
- }
- else
- nm = i_to_a(n);
- }
- else
- pop = 2;
- }
- else {
- nm = get_long_name(1);
- if (nm.is_null())
- pop = 2;
- }
- if (!nm.is_null()) {
- environment *e = (environment *)env_dictionary.lookup(nm);
- if (!e) {
- e = new environment(nm);
- (void)env_dictionary.lookup(nm, e);
- }
- env_stack = new env_list(curenv, env_stack);
- curenv = e;
- }
- }
- if (pop) {
- if (env_stack == 0) {
- if (pop == 1)
- error("environment stack underflow");
- }
- else {
- curenv = env_stack->env;
- env_list *tem = env_stack;
- env_stack = env_stack->next;
- delete tem;
- }
- }
- skip_line();
-}
-
-void environment_copy()
-{
- symbol nm;
- environment *e=0;
- tok.skip();
- if (!tok.delimiter()) {
- // It looks like a number.
- int n;
- if (get_integer(&n)) {
- if (n >= 0 && n < NENVIRONMENTS)
- e = env_table[n];
- else
- nm = i_to_a(n);
- }
- }
- else
- nm = get_long_name(1);
- if (!e && !nm.is_null())
- e = (environment *)env_dictionary.lookup(nm);
- if (e == 0) {
- error("No environment to copy from");
- return;
- }
- else
- curenv->copy(e);
- skip_line();
-}
-
-static symbol P_symbol("P");
-
-void font_change()
-{
- symbol s = get_name();
- int is_number = 1;
- if (s.is_null() || s == P_symbol) {
- s = P_symbol;
- is_number = 0;
- }
- else {
- for (const char *p = s.contents(); p != 0 && *p != 0; p++)
- if (!csdigit(*p)) {
- is_number = 0;
- break;
- }
- }
- if (is_number)
- curenv->set_font(atoi(s.contents()));
- else
- curenv->set_font(s);
- skip_line();
-}
-
-void family_change()
-{
- symbol s = get_name();
- curenv->set_family(s);
- skip_line();
-}
-
-void point_size()
-{
- int n;
- if (has_arg() && get_number(&n, 'z', curenv->get_requested_point_size())) {
- if (n <= 0)
- n = 1;
- curenv->set_size(n);
- curenv->add_html_tag(".ps", n);
- }
- else
- curenv->set_size(0);
- skip_line();
-}
-
-void space_size()
-{
- int n;
- if (get_integer(&n) && !compatible_flag) {
- curenv->space_size = n;
- if (has_arg() && get_integer(&n))
- curenv->sentence_space_size = n;
- else
- curenv->sentence_space_size = curenv->space_size;
- }
- skip_line();
-}
-
-void fill()
-{
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag)
- curenv->do_break();
- curenv->fill = 1;
- curenv->add_html_tag(".fi");
- tok.next();
-}
-
-void no_fill()
-{
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag)
- curenv->do_break();
-
- curenv->fill = 0;
- curenv->add_html_tag(".nf");
- curenv->ignore_next_eol = 1;
- curenv->add_html_tag(".po", topdiv->get_page_offset().to_units());
- tok.next();
-}
-
-void center()
-{
- int n;
- if (!has_arg() || !get_integer(&n))
- n = 1;
- else if (n < 0)
- n = 0;
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag)
- curenv->do_break();
- curenv->right_justify_lines = 0;
- curenv->center_lines = n;
- curenv->add_html_tag(".ce", n);
- tok.next();
-}
-
-void right_justify()
-{
- int n;
- if (!has_arg() || !get_integer(&n))
- n = 1;
- else if (n < 0)
- n = 0;
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag)
- curenv->do_break();
- curenv->center_lines = 0;
- curenv->right_justify_lines = n;
- curenv->add_html_tag(".rj", n);
- tok.next();
-}
-
-void line_length()
-{
- hunits temp;
- if (has_arg() && get_hunits(&temp, 'm', curenv->line_length)) {
- if (temp < H0) {
- warning(WARN_RANGE, "bad line length %1u", temp.to_units());
- temp = H0;
- }
- }
- else
- temp = curenv->prev_line_length;
- curenv->prev_line_length = curenv->line_length;
- curenv->line_length = temp;
- curenv->add_html_tag(".ll", temp.to_units());
- skip_line();
-}
-
-void title_length()
-{
- hunits temp;
- if (has_arg() && get_hunits(&temp, 'm', curenv->title_length)) {
- if (temp < H0) {
- warning(WARN_RANGE, "bad title length %1u", temp.to_units());
- temp = H0;
- }
- }
- else
- temp = curenv->prev_title_length;
- curenv->prev_title_length = curenv->title_length;
- curenv->title_length = temp;
- skip_line();
-}
-
-void vertical_spacing()
-{
- vunits temp;
- if (has_arg() && get_vunits(&temp, 'p', curenv->vertical_spacing)) {
- if (temp <= V0) {
- warning(WARN_RANGE, "vertical spacing must be greater than 0");
- temp = vresolution;
- }
- }
- else
- temp = curenv->prev_vertical_spacing;
- curenv->prev_vertical_spacing = curenv->vertical_spacing;
- curenv->vertical_spacing = temp;
- skip_line();
-}
-
-void post_vertical_spacing()
-{
- vunits temp;
- if (has_arg() && get_vunits(&temp, 'p', curenv->post_vertical_spacing)) {
- if (temp < V0) {
- warning(WARN_RANGE,
- "post vertical spacing must be greater than or equal to 0");
- temp = V0;
- }
- }
- else
- temp = curenv->prev_post_vertical_spacing;
- curenv->prev_post_vertical_spacing = curenv->post_vertical_spacing;
- curenv->post_vertical_spacing = temp;
- skip_line();
-}
-
-void line_spacing()
-{
- int temp;
- if (has_arg() && get_integer(&temp)) {
- if (temp < 1) {
- warning(WARN_RANGE, "value %1 out of range: interpreted as 1", temp);
- temp = 1;
- }
- }
- else
- temp = curenv->prev_line_spacing;
- curenv->prev_line_spacing = curenv->line_spacing;
- curenv->line_spacing = temp;
- skip_line();
-}
-
-void indent()
-{
- hunits temp;
- if (has_arg() && get_hunits(&temp, 'm', curenv->indent)) {
- if (temp < H0) {
- warning(WARN_RANGE, "indent cannot be negative");
- temp = H0;
- }
- }
- else
- temp = curenv->prev_indent;
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag)
- curenv->do_break();
- curenv->have_temporary_indent = 0;
- curenv->prev_indent = curenv->indent;
- curenv->indent = temp;
- curenv->add_html_tag(".in", temp.to_units());
- tok.next();
-}
-
-void temporary_indent()
-{
- int err = 0;
- hunits temp;
- if (!get_hunits(&temp, 'm', curenv->get_indent()))
- err = 1;
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag)
- curenv->do_break();
- if (temp < H0) {
- warning(WARN_RANGE, "total indent cannot be negative");
- temp = H0;
- }
- if (!err) {
- curenv->temporary_indent = temp;
- curenv->have_temporary_indent = 1;
- curenv->add_html_tag(".ti", temp.to_units());
- }
- tok.next();
-}
-
-node *do_underline_special(int underline_spaces)
-{
- macro m;
- m.append_str("x u ");
- m.append(underline_spaces + '0');
- return new special_node(m, 1);
-}
-
-void do_underline(int underline_spaces)
-{
- int n;
- if (!has_arg() || !get_integer(&n))
- n = 1;
- if (n <= 0) {
- if (curenv->underline_lines > 0) {
- curenv->prev_fontno = curenv->fontno;
- curenv->fontno = curenv->pre_underline_fontno;
- if (underline_spaces) {
- curenv->underline_spaces = 0;
- curenv->add_node(do_underline_special(0));
- }
- }
- curenv->underline_lines = 0;
- }
- else {
- curenv->underline_lines = n;
- curenv->pre_underline_fontno = curenv->fontno;
- curenv->fontno = get_underline_fontno();
- if (underline_spaces) {
- curenv->underline_spaces = 1;
- curenv->add_node(do_underline_special(1));
- }
- }
- skip_line();
-}
-
-void continuous_underline()
-{
- do_underline(1);
-}
-
-void underline()
-{
- do_underline(0);
-}
-
-void control_char()
-{
- curenv->control_char = '.';
- if (has_arg()) {
- if (tok.ch() == 0)
- error("bad control character");
- else
- curenv->control_char = tok.ch();
- }
- skip_line();
-}
-
-void no_break_control_char()
-{
- curenv->no_break_control_char = '\'';
- if (has_arg()) {
- if (tok.ch() == 0)
- error("bad control character");
- else
- curenv->no_break_control_char = tok.ch();
- }
- skip_line();
-}
-
-void margin_character()
-{
- while (tok.space())
- tok.next();
- charinfo *ci = tok.get_char();
- if (ci) {
- // Call tok.next() only after making the node so that
- // .mc \s+9\(br\s0 works.
- node *nd = curenv->make_char_node(ci);
- tok.next();
- if (nd) {
- delete curenv->margin_character_node;
- curenv->margin_character_node = nd;
- curenv->margin_character_flags = (MARGIN_CHARACTER_ON
- |MARGIN_CHARACTER_NEXT);
- hunits d;
- if (has_arg() && get_hunits(&d, 'm'))
- curenv->margin_character_distance = d;
- }
- }
- else {
- check_missing_character();
- curenv->margin_character_flags &= ~MARGIN_CHARACTER_ON;
- if (curenv->margin_character_flags == 0) {
- delete curenv->margin_character_node;
- curenv->margin_character_node = 0;
- }
- }
- skip_line();
-}
-
-void number_lines()
-{
- delete_node_list(curenv->numbering_nodes);
- curenv->numbering_nodes = 0;
- if (has_arg()) {
- node *nd = 0;
- for (int i = '9'; i >= '0'; i--) {
- node *tem = make_node(charset_table[i], curenv);
- if (!tem) {
- skip_line();
- return;
- }
- tem->next = nd;
- nd = tem;
- }
- curenv->numbering_nodes = nd;
- curenv->line_number_digit_width = env_digit_width(curenv);
- int n;
- if (!tok.delimiter()) {
- if (get_integer(&n, next_line_number)) {
- next_line_number = n;
- if (next_line_number < 0) {
- warning(WARN_RANGE, "negative line number");
- next_line_number = 0;
- }
- }
- }
- else
- while (!tok.space() && !tok.newline() && !tok.eof())
- tok.next();
- if (has_arg()) {
- if (!tok.delimiter()) {
- if (get_integer(&n)) {
- if (n <= 0) {
- warning(WARN_RANGE, "negative or zero line number multiple");
- }
- else
- curenv->line_number_multiple = n;
- }
- }
- else
- while (!tok.space() && !tok.newline() && !tok.eof())
- tok.next();
- if (has_arg()) {
- if (!tok.delimiter()) {
- if (get_integer(&n))
- curenv->number_text_separation = n;
- }
- else
- while (!tok.space() && !tok.newline() && !tok.eof())
- tok.next();
- if (has_arg() && !tok.delimiter() && get_integer(&n))
- curenv->line_number_indent = n;
- }
- }
- }
- skip_line();
-}
-
-void no_number()
-{
- int n;
- if (has_arg() && get_integer(&n))
- curenv->no_number_count = n > 0 ? n : 0;
- else
- curenv->no_number_count = 1;
- skip_line();
-}
-
-void no_hyphenate()
-{
- curenv->hyphenation_flags = 0;
- skip_line();
-}
-
-void hyphenate_request()
-{
- int n;
- if (has_arg() && get_integer(&n))
- curenv->hyphenation_flags = n;
- else
- curenv->hyphenation_flags = 1;
- skip_line();
-}
-
-void hyphen_char()
-{
- curenv->hyphen_indicator_char = get_optional_char();
- skip_line();
-}
-
-void hyphen_line_max_request()
-{
- int n;
- if (has_arg() && get_integer(&n))
- curenv->hyphen_line_max = n;
- else
- curenv->hyphen_line_max = -1;
- skip_line();
-}
-
-void environment::interrupt()
-{
- if (!dummy) {
- add_node(new transparent_dummy_node);
- interrupted = 1;
- }
-}
-
-void environment::newline()
-{
- if (underline_lines > 0) {
- if (--underline_lines == 0) {
- prev_fontno = fontno;
- fontno = pre_underline_fontno;
- if (underline_spaces) {
- underline_spaces = 0;
- add_node(do_underline_special(0));
- }
- }
- }
- if (current_field)
- wrap_up_field();
- if (current_tab)
- wrap_up_tab();
- // strip trailing spaces
- while (line != 0 && line->discardable()) {
- width_total -= line->width();
- space_total -= line->nspaces();
- node *tem = line;
- line = line->next;
- delete tem;
- }
- node *to_be_output = 0;
- hunits to_be_output_width;
- prev_line_interrupted = 0;
- if (dummy)
- space_newline();
- else if (interrupted) {
- interrupted = 0;
- // see environment::final_break
- prev_line_interrupted = exit_started ? 2 : 1;
- }
- else if (center_lines > 0) {
- --center_lines;
- hunits x = target_text_length - width_total;
- if (x > H0)
- saved_indent += x/2;
- to_be_output = line;
- to_be_output_width = width_total;
- line = 0;
- }
- else if (right_justify_lines > 0) {
- --right_justify_lines;
- hunits x = target_text_length - width_total;
- if (x > H0)
- saved_indent += x;
- to_be_output = line;
- to_be_output_width = width_total;
- line = 0;
- }
- else if (fill)
- space_newline();
- else {
- to_be_output = line;
- to_be_output_width = width_total;
- line = 0;
- }
- input_line_start = line == 0 ? H0 : width_total;
- if (to_be_output) {
- output_line(to_be_output, to_be_output_width);
- hyphen_line_count = 0;
- }
- if (input_trap_count > 0) {
- if (--input_trap_count == 0)
- spring_trap(input_trap);
- }
-}
-
-void environment::output_line(node *n, hunits width)
-{
- prev_text_length = width;
- if (margin_character_flags) {
- hunits d = line_length + margin_character_distance - saved_indent - width;
- if (d > 0) {
- n = new hmotion_node(d, n);
- width += d;
- }
- margin_character_flags &= ~MARGIN_CHARACTER_NEXT;
- node *tem;
- if (!margin_character_flags) {
- tem = margin_character_node;
- margin_character_node = 0;
- }
- else
- tem = margin_character_node->copy();
- tem->next = n;
- n = tem;
- width += tem->width();
- }
- node *nn = 0;
- while (n != 0) {
- node *tem = n->next;
- n->next = nn;
- nn = n;
- n = tem;
- }
- if (!saved_indent.is_zero())
- nn = new hmotion_node(saved_indent, nn);
- width += saved_indent;
- if (no_number_count > 0)
- --no_number_count;
- else if (numbering_nodes) {
- hunits w = (line_number_digit_width
- *(3+line_number_indent+number_text_separation));
- if (next_line_number % line_number_multiple != 0)
- nn = new hmotion_node(w, nn);
- else {
- hunits x = w;
- nn = new hmotion_node(number_text_separation*line_number_digit_width,
- nn);
- x -= number_text_separation*line_number_digit_width;
- char buf[30];
- sprintf(buf, "%3d", next_line_number);
- for (char *p = strchr(buf, '\0') - 1; p >= buf && *p != ' '; --p) {
- node *gn = numbering_nodes;
- for (int count = *p - '0'; count > 0; count--)
- gn = gn->next;
- gn = gn->copy();
- x -= gn->width();
- gn->next = nn;
- nn = gn;
- }
- nn = new hmotion_node(x, nn);
- }
- width += w;
- ++next_line_number;
- }
- output(nn, !fill, vertical_spacing, total_post_vertical_spacing(), width);
-}
-
-void environment::start_line()
-{
- assert(line == 0);
- discarding = 0;
- line = new line_start_node;
- if (have_temporary_indent) {
- saved_indent = temporary_indent;
- have_temporary_indent = 0;
- }
- else
- saved_indent = indent;
- target_text_length = line_length - saved_indent;
- width_total = H0;
- space_total = 0;
-}
-
-hunits environment::get_hyphenation_space()
-{
- return hyphenation_space;
-}
-
-void hyphenation_space_request()
-{
- hunits n;
- if (get_hunits(&n, 'm')) {
- if (n < H0) {
- warning(WARN_RANGE, "hyphenation space cannot be negative");
- n = H0;
- }
- curenv->hyphenation_space = n;
- }
- skip_line();
-}
-
-hunits environment::get_hyphenation_margin()
-{
- return hyphenation_margin;
-}
-
-void hyphenation_margin_request()
-{
- hunits n;
- if (get_hunits(&n, 'm')) {
- if (n < H0) {
- warning(WARN_RANGE, "hyphenation margin cannot be negative");
- n = H0;
- }
- curenv->hyphenation_margin = n;
- }
- skip_line();
-}
-
-breakpoint *environment::choose_breakpoint()
-{
- hunits x = width_total;
- int s = space_total;
- node *n = line;
- breakpoint *best_bp = 0; // the best breakpoint so far
- int best_bp_fits = 0;
- while (n != 0) {
- x -= n->width();
- s -= n->nspaces();
- breakpoint *bp = n->get_breakpoints(x, s);
- while (bp != 0) {
- if (bp->width <= target_text_length) {
- if (!bp->hyphenated) {
- breakpoint *tem = bp->next;
- bp->next = 0;
- while (tem != 0) {
- breakpoint *tem1 = tem;
- tem = tem->next;
- delete tem1;
- }
- if (best_bp_fits
- // Decide whether to use the hyphenated breakpoint.
- && (hyphen_line_max < 0
- // Only choose the hyphenated breakpoint if it would not
- // exceed the maximum number of consecutive hyphenated
- // lines.
- || hyphen_line_count + 1 <= hyphen_line_max)
- && !(adjust_mode == ADJUST_BOTH
- // Don't choose the hyphenated breakpoint if the line
- // can be justified by adding no more than
- // hyphenation_space to any word space.
- ? (bp->nspaces > 0
- && (((target_text_length - bp->width
- + (bp->nspaces - 1)*hresolution)/bp->nspaces)
- <= hyphenation_space))
- // Don't choose the hyphenated breakpoint if the line
- // is no more than hyphenation_margin short.
- : target_text_length - bp->width <= hyphenation_margin)) {
- delete bp;
- return best_bp;
- }
- if (best_bp)
- delete best_bp;
- return bp;
- }
- else {
- if ((adjust_mode == ADJUST_BOTH
- ? hyphenation_space == H0
- : hyphenation_margin == H0)
- && (hyphen_line_max < 0
- || hyphen_line_count + 1 <= hyphen_line_max)) {
- // No need to consider a non-hyphenated breakpoint.
- if (best_bp)
- delete best_bp;
- return bp;
- }
- // It fits but it's hyphenated.
- if (!best_bp_fits) {
- if (best_bp)
- delete best_bp;
- best_bp = bp;
- bp = bp->next;
- best_bp_fits = 1;
- }
- else {
- breakpoint *tem = bp;
- bp = bp->next;
- delete tem;
- }
- }
- }
- else {
- if (best_bp)
- delete best_bp;
- best_bp = bp;
- bp = bp->next;
- }
- }
- n = n->next;
- }
- if (best_bp) {
- if (!best_bp_fits)
- warning(WARN_BREAK, "can't break line");
- return best_bp;
- }
- return 0;
-}
-
-void environment::hyphenate_line(int start_here)
-{
- if (line == 0)
- return;
- hyphenation_type prev_type = line->get_hyphenation_type();
- node **startp;
- if (start_here)
- startp = &line;
- else
- for (startp = &line->next; *startp != 0; startp = &(*startp)->next) {
- hyphenation_type this_type = (*startp)->get_hyphenation_type();
- if (prev_type == HYPHEN_BOUNDARY && this_type == HYPHEN_MIDDLE)
- break;
- prev_type = this_type;
- }
- if (*startp == 0)
- return;
- node *tem = *startp;
- int i = 0;
- do {
- ++i;
- tem = tem->next;
- } while (tem != 0 && tem->get_hyphenation_type() == HYPHEN_MIDDLE);
- int inhibit = (tem != 0 && tem->get_hyphenation_type() == HYPHEN_INHIBIT);
- node *end = tem;
- hyphen_list *sl = 0;
- tem = *startp;
- node *forward = 0;
- while (tem != end) {
- sl = tem->get_hyphen_list(sl);
- node *tem1 = tem;
- tem = tem->next;
- tem1->next = forward;
- forward = tem1;
- }
- if (!inhibit) {
- // this is for characters like hyphen and emdash
- int prev_code = 0;
- for (hyphen_list *h = sl; h; h = h->next) {
- h->breakable = (prev_code != 0
- && h->next != 0
- && h->next->hyphenation_code != 0);
- prev_code = h->hyphenation_code;
- }
- }
- if (hyphenation_flags != 0
- && !inhibit
- // this may not be right if we have extra space on this line
- && !((hyphenation_flags & HYPHEN_LAST_LINE)
- && (curdiv->distance_to_next_trap()
- <= vertical_spacing + total_post_vertical_spacing()))
- && i >= 4)
- hyphenate(sl, hyphenation_flags);
- while (forward != 0) {
- node *tem1 = forward;
- forward = forward->next;
- tem1->next = 0;
- tem = tem1->add_self(tem, &sl);
- }
- *startp = tem;
-}
-
-static node *node_list_reverse(node *n)
-{
- node *res = 0;
- while (n) {
- node *tem = n;
- n = n->next;
- tem->next = res;
- res = tem;
- }
- return res;
-}
-
-static void distribute_space(node *n, int nspaces, hunits desired_space,
- int force_reverse = 0)
-{
- static int reverse = 0;
- if (force_reverse || reverse)
- n = node_list_reverse(n);
- for (node *tem = n; tem; tem = tem->next)
- tem->spread_space(&nspaces, &desired_space);
- if (force_reverse || reverse)
- (void)node_list_reverse(n);
- if (!force_reverse)
- reverse = !reverse;
- assert(desired_space.is_zero() && nspaces == 0);
-}
-
-void environment::possibly_break_line(int start_here, int forced)
-{
- if (!fill || current_tab || current_field || dummy)
- return;
- while (line != 0
- && (forced
- // When a macro follows a paragraph in fill mode, the
- // current line should not be empty.
- || (width_total - line->width()) > target_text_length)) {
- hyphenate_line(start_here);
- breakpoint *bp = choose_breakpoint();
- if (bp == 0)
- // we'll find one eventually
- return;
- node *pre, *post;
- node **ndp = &line;
- while (*ndp != bp->nd)
- ndp = &(*ndp)->next;
- bp->nd->split(bp->index, &pre, &post);
- *ndp = post;
- hunits extra_space_width = H0;
- switch(adjust_mode) {
- case ADJUST_BOTH:
- if (bp->nspaces != 0)
- extra_space_width = target_text_length - bp->width;
- break;
- case ADJUST_CENTER:
- saved_indent += (target_text_length - bp->width)/2;
- break;
- case ADJUST_RIGHT:
- saved_indent += target_text_length - bp->width;
- break;
- }
- distribute_space(pre, bp->nspaces, extra_space_width);
- hunits output_width = bp->width + extra_space_width;
- input_line_start -= output_width;
- if (bp->hyphenated)
- hyphen_line_count++;
- else
- hyphen_line_count = 0;
- delete bp;
- space_total = 0;
- width_total = 0;
- node *first_non_discardable = 0;
- node *tem;
- for (tem = line; tem != 0; tem = tem->next)
- if (!tem->discardable())
- first_non_discardable = tem;
- node *to_be_discarded;
- if (first_non_discardable) {
- to_be_discarded = first_non_discardable->next;
- first_non_discardable->next = 0;
- for (tem = line; tem != 0; tem = tem->next) {
- width_total += tem->width();
- space_total += tem->nspaces();
- }
- discarding = 0;
- }
- else {
- discarding = 1;
- to_be_discarded = line;
- line = 0;
- }
- // Do output_line() here so that line will be 0 iff the
- // the environment will be empty.
- output_line(pre, output_width);
- while (to_be_discarded != 0) {
- tem = to_be_discarded;
- to_be_discarded = to_be_discarded->next;
- input_line_start -= tem->width();
- delete tem;
- }
- if (line != 0) {
- if (have_temporary_indent) {
- saved_indent = temporary_indent;
- have_temporary_indent = 0;
- }
- else
- saved_indent = indent;
- target_text_length = line_length - saved_indent;
- }
- }
-}
-
-/*
-Do the break at the end of input after the end macro (if any).
-
-Unix troff behaves as follows: if the last line is
-
-foo bar\c
-
-it will output foo on the current page, and bar on the next page;
-if the last line is
-
-foo\c
-
-or
-
-foo bar
-
-everything will be output on the current page. This behaviour must be
-considered a bug.
-
-The problem is that some macro packages rely on this. For example,
-the ATK macros have an end macro that emits \c if it needs to print a
-table of contents but doesn't do a 'bp in the end macro; instead the
-'bp is done in the bottom of page trap. This works with Unix troff,
-provided that the current environment is not empty at the end of the
-input file.
-
-The following will make macro packages that do that sort of thing work
-even if the current environment is empty at the end of the input file.
-If the last input line used \c and this line occurred in the end macro,
-then we'll force everything out on the current page, but we'll make
-sure that the environment isn't empty so that we won't exit at the
-bottom of this page.
-*/
-
-void environment::final_break()
-{
- if (prev_line_interrupted == 2) {
- do_break();
- add_node(new transparent_dummy_node);
- }
- else
- do_break();
-}
-
-/*
- * add_html_tag_eol - add an end of line tag if appropriate.
- */
-
-void environment::add_html_tag_eol()
-{
- if (is_html) {
- if (ignore_next_eol > 0)
- ignore_next_eol--;
- else if (need_eol > 0) {
- need_eol--;
- add_html_tag("eol");
- }
- else if (!fill && emitted_node) {
- add_html_tag("eol");
- emitted_node = 0;
- }
- }
-}
-
-/*
- * add_html_tag - emits a special html-tag: to help post-grohtml understand
- * the key troff commands
- */
-
-void environment::add_html_tag(const char *name)
-{
- if (is_html) {
- /*
- * need to emit tag for post-grohtml
- * but we check to see whether we can emit specials
- */
- if (curdiv == topdiv && topdiv->before_first_page)
- topdiv->begin_page();
- macro *m = new macro;
- m->append_str("html-tag:");
- for (const char *p = name; *p; p++)
- if (!illegal_input_char((unsigned char)*p))
- m->append(*p);
- add_node(new special_node(*m));
- }
-}
-
-/*
- * add_html_tag - emits a special html-tag: to help post-grohtml understand
- * the key troff commands, it appends a string representation
- * of i.
- */
-
-void environment::add_html_tag(const char *name, int i)
-{
- if (is_html) {
- if (strcmp(name, ".ce") == 0) {
- if (i == 0)
- need_eol = 0;
- else {
- need_eol = i;
- ignore_next_eol = 1; // since the .ce creates an eol
- }
- }
-
- /*
- * need to emit tag for post-grohtml
- * but we check to see whether we can emit specials
- */
- if (curdiv == topdiv && topdiv->before_first_page)
- topdiv->begin_page();
- macro *m = new macro;
- m->append_str("html-tag:");
- for (const char *p = name; *p; p++)
- if (!illegal_input_char((unsigned char)*p))
- m->append(*p);
- m->append(' ');
- m->append_int(i);
- // output_pending_lines();
- output(new special_node(*m), !fill, 0, 0, 0);
- // output_pending_lines();
- }
-}
-
-/*
- * add_html_tag_tabs - emits the tab settings for post-grohtml
- */
-
-void environment::add_html_tag_tabs()
-{
- if (is_html) {
- /*
- * need to emit tag for post-grohtml
- * but we check to see whether we can emit specials
- */
- if (curdiv == topdiv && topdiv->before_first_page)
- topdiv->begin_page();
- macro *m = new macro;
- hunits d, l;
- enum tab_type t;
- m->append_str("html-tag:.ta ");
- do {
- t = curenv->tabs.distance_to_next_tab(l, &d);
- l += d;
- switch (t) {
- case TAB_LEFT:
- m->append_str(" L ");
- m->append_int(d.to_units());
- break;
- case TAB_CENTER:
- m->append_str(" C ");
- m->append_int(d.to_units());
- break;
- case TAB_RIGHT:
- m->append_str(" R ");
- m->append_int(d.to_units());
- break;
- case TAB_NONE:
- break;
- }
- } while ((t != TAB_NONE) && (l < get_line_length()));
- output_pending_lines();
- output(new special_node(*m), !fill, 0, 0, 0);
- output_pending_lines();
- }
-}
-
-void environment::do_break()
-{
- if (curdiv == topdiv && topdiv->before_first_page) {
- topdiv->begin_page();
- return;
- }
- if (current_tab)
- wrap_up_tab();
- if (line) {
- line = new space_node(H0, line); // this is so that hyphenation works
- space_total++;
- possibly_break_line();
- }
- while (line != 0 && line->discardable()) {
- width_total -= line->width();
- space_total -= line->nspaces();
- node *tem = line;
- line = line->next;
- delete tem;
- }
- discarding = 0;
- input_line_start = H0;
- if (line != 0) {
- if (fill) {
- switch (adjust_mode) {
- case ADJUST_CENTER:
- saved_indent += (target_text_length - width_total)/2;
- break;
- case ADJUST_RIGHT:
- saved_indent += target_text_length - width_total;
- break;
- }
- }
- node *tem = line;
- line = 0;
- output_line(tem, width_total);
- hyphen_line_count = 0;
- }
- prev_line_interrupted = 0;
-#ifdef WIDOW_CONTROL
- mark_last_line();
- output_pending_lines();
-#endif /* WIDOW_CONTROL */
-}
-
-int environment::is_empty()
-{
- return !current_tab && line == 0 && pending_lines == 0;
-}
-
-void break_request()
-{
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag) {
- curenv->do_break();
- curenv->add_html_tag(".br");
- }
- tok.next();
-}
-
-void title()
-{
- if (curdiv == topdiv && topdiv->before_first_page) {
- handle_initial_title();
- return;
- }
- node *part[3];
- hunits part_width[3];
- part[0] = part[1] = part[2] = 0;
- environment env(curenv);
- environment *oldenv = curenv;
- curenv = &env;
- read_title_parts(part, part_width);
- curenv = oldenv;
- curenv->size = env.size;
- curenv->prev_size = env.prev_size;
- curenv->requested_size = env.requested_size;
- curenv->prev_requested_size = env.prev_requested_size;
- curenv->char_height = env.char_height;
- curenv->char_slant = env.char_slant;
- curenv->fontno = env.fontno;
- curenv->prev_fontno = env.prev_fontno;
- node *n = 0;
- node *p = part[2];
- while (p != 0) {
- node *tem = p;
- p = p->next;
- tem->next = n;
- n = tem;
- }
- hunits title_length(curenv->title_length);
- hunits f = title_length - part_width[1];
- hunits f2 = f/2;
- n = new hmotion_node(f2 - part_width[2], n);
- p = part[1];
- while (p != 0) {
- node *tem = p;
- p = p->next;
- tem->next = n;
- n = tem;
- }
- n = new hmotion_node(f - f2 - part_width[0], n);
- p = part[0];
- while (p != 0) {
- node *tem = p;
- p = p->next;
- tem->next = n;
- n = tem;
- }
- curenv->output_title(n, !curenv->fill, curenv->vertical_spacing,
- curenv->total_post_vertical_spacing(), title_length);
- curenv->hyphen_line_count = 0;
- tok.next();
-}
-
-void adjust()
-{
- curenv->adjust_mode |= 1;
- if (has_arg()) {
- switch (tok.ch()) {
- case 'l':
- curenv->adjust_mode = ADJUST_LEFT;
- break;
- case 'r':
- curenv->adjust_mode = ADJUST_RIGHT;
- break;
- case 'c':
- curenv->adjust_mode = ADJUST_CENTER;
- break;
- case 'b':
- case 'n':
- curenv->adjust_mode = ADJUST_BOTH;
- break;
- default:
- int n;
- if (get_integer(&n)) {
- if (n < 0)
- warning(WARN_RANGE, "negative adjustment mode");
- else if (n > 5) {
- curenv->adjust_mode = 5;
- warning(WARN_RANGE, "adjustment mode `%1' out of range", n);
- }
- else
- curenv->adjust_mode = n;
- }
- }
- }
- skip_line();
-}
-
-void no_adjust()
-{
- curenv->adjust_mode &= ~1;
- skip_line();
-}
-
-void input_trap()
-{
- curenv->input_trap_count = 0;
- int n;
- if (has_arg() && get_integer(&n)) {
- if (n <= 0)
- warning(WARN_RANGE,
- "number of lines for input trap must be greater than zero");
- else {
- symbol s = get_name(1);
- if (!s.is_null()) {
- curenv->input_trap_count = n;
- curenv->input_trap = s;
- }
- }
- }
- skip_line();
-}
-
-/* tabs */
-
-// must not be R or C or L or a legitimate part of a number expression
-const char TAB_REPEAT_CHAR = 'T';
-
-struct tab {
- tab *next;
- hunits pos;
- tab_type type;
- tab(hunits, tab_type);
- enum { BLOCK = 1024 };
- static tab *free_list;
- void *operator new(size_t);
- void operator delete(void *);
-};
-
-tab *tab::free_list = 0;
-
-void *tab::operator new(size_t n)
-{
- assert(n == sizeof(tab));
- if (!free_list) {
- free_list = (tab *)new char[sizeof(tab)*BLOCK];
- for (int i = 0; i < BLOCK - 1; i++)
- free_list[i].next = free_list + i + 1;
- free_list[BLOCK-1].next = 0;
- }
- tab *p = free_list;
- free_list = (tab *)(free_list->next);
- p->next = 0;
- return p;
-}
-
-#ifdef __GNUG__
-/* cfront can't cope with this. */
-inline
-#endif
-void tab::operator delete(void *p)
-{
- if (p) {
- ((tab *)p)->next = free_list;
- free_list = (tab *)p;
- }
-}
-
-tab::tab(hunits x, tab_type t) : next(0), pos(x), type(t)
-{
-}
-
-tab_stops::tab_stops(hunits distance, tab_type type)
- : initial_list(0)
-{
- repeated_list = new tab(distance, type);
-}
-
-tab_stops::~tab_stops()
-{
- clear();
-}
-
-tab_type tab_stops::distance_to_next_tab(hunits curpos, hunits *distance)
-{
- hunits lastpos = 0;
- tab *tem;
- for (tem = initial_list; tem && tem->pos <= curpos; tem = tem->next)
- lastpos = tem->pos;
- if (tem) {
- *distance = tem->pos - curpos;
- return tem->type;
- }
- if (repeated_list == 0)
- return TAB_NONE;
- hunits base = lastpos;
- for (;;) {
- for (tem = repeated_list; tem && tem->pos + base <= curpos; tem = tem->next)
- lastpos = tem->pos;
- if (tem) {
- *distance = tem->pos + base - curpos;
- return tem->type;
- }
- assert(lastpos > 0);
- base += lastpos;
- }
- return TAB_NONE;
-}
-
-const char *tab_stops::to_string()
-{
- static char *buf = 0;
- static int buf_size = 0;
- // figure out a maximum on the amount of space we can need
- int count = 0;
- tab *p;
- for (p = initial_list; p; p = p->next)
- ++count;
- for (p = repeated_list; p; p = p->next)
- ++count;
- // (10 for digits + 1 for u + 1 for 'C' or 'R') + 2 for ' &' + 1 for '\0'
- int need = count*12 + 3;
- if (buf == 0 || need > buf_size) {
- if (buf)
- a_delete buf;
- buf_size = need;
- buf = new char[buf_size];
- }
- char *ptr = buf;
- for (p = initial_list; p; p = p->next) {
- strcpy(ptr, i_to_a(p->pos.to_units()));
- ptr = strchr(ptr, '\0');
- *ptr++ = 'u';
- *ptr = '\0';
- switch (p->type) {
- case TAB_LEFT:
- break;
- case TAB_RIGHT:
- *ptr++ = 'R';
- break;
- case TAB_CENTER:
- *ptr++ = 'C';
- break;
- case TAB_NONE:
- default:
- assert(0);
- }
- }
- if (repeated_list)
- *ptr++ = TAB_REPEAT_CHAR;
- for (p = repeated_list; p; p = p->next) {
- strcpy(ptr, i_to_a(p->pos.to_units()));
- ptr = strchr(ptr, '\0');
- *ptr++ = 'u';
- *ptr = '\0';
- switch (p->type) {
- case TAB_LEFT:
- break;
- case TAB_RIGHT:
- *ptr++ = 'R';
- break;
- case TAB_CENTER:
- *ptr++ = 'C';
- break;
- case TAB_NONE:
- default:
- assert(0);
- }
- }
- *ptr++ = '\0';
- return buf;
-}
-
-tab_stops::tab_stops() : initial_list(0), repeated_list(0)
-{
-}
-
-tab_stops::tab_stops(const tab_stops &ts)
- : initial_list(0), repeated_list(0)
-{
- tab **p = &initial_list;
- tab *t = ts.initial_list;
- while (t) {
- *p = new tab(t->pos, t->type);
- t = t->next;
- p = &(*p)->next;
- }
- p = &repeated_list;
- t = ts.repeated_list;
- while (t) {
- *p = new tab(t->pos, t->type);
- t = t->next;
- p = &(*p)->next;
- }
-}
-
-void tab_stops::clear()
-{
- while (initial_list) {
- tab *tem = initial_list;
- initial_list = initial_list->next;
- delete tem;
- }
- while (repeated_list) {
- tab *tem = repeated_list;
- repeated_list = repeated_list->next;
- delete tem;
- }
-}
-
-void tab_stops::add_tab(hunits pos, tab_type type, int repeated)
-{
- tab **p;
- for (p = repeated ? &repeated_list : &initial_list; *p; p = &(*p)->next)
- ;
- *p = new tab(pos, type);
-}
-
-
-void tab_stops::operator=(const tab_stops &ts)
-{
- clear();
- tab **p = &initial_list;
- tab *t = ts.initial_list;
- while (t) {
- *p = new tab(t->pos, t->type);
- t = t->next;
- p = &(*p)->next;
- }
- p = &repeated_list;
- t = ts.repeated_list;
- while (t) {
- *p = new tab(t->pos, t->type);
- t = t->next;
- p = &(*p)->next;
- }
-}
-
-void set_tabs()
-{
- hunits pos;
- hunits prev_pos = 0;
- int first = 1;
- int repeated = 0;
- tab_stops tabs;
- while (has_arg()) {
- if (tok.ch() == TAB_REPEAT_CHAR) {
- tok.next();
- repeated = 1;
- prev_pos = 0;
- }
- if (!get_hunits(&pos, 'm', prev_pos))
- break;
- tab_type type = TAB_LEFT;
- if (tok.ch() == 'C') {
- tok.next();
- type = TAB_CENTER;
- }
- else if (tok.ch() == 'R') {
- tok.next();
- type = TAB_RIGHT;
- }
- else if (tok.ch() == 'L') {
- tok.next();
- }
- if (pos <= prev_pos && !first)
- warning(WARN_RANGE,
- "positions of tab stops must be strictly increasing");
- else {
- tabs.add_tab(pos, type, repeated);
- prev_pos = pos;
- first = 0;
- }
- }
- curenv->tabs = tabs;
- curenv->add_html_tag_tabs();
- skip_line();
-}
-
-const char *environment::get_tabs()
-{
- return tabs.to_string();
-}
-
-#if 0
-tab_stops saved_tabs;
-
-void tabs_save()
-{
- saved_tabs = curenv->tabs;
- skip_line();
-}
-
-void tabs_restore()
-{
- curenv->tabs = saved_tabs;
- skip_line();
-}
-#endif
-
-tab_type environment::distance_to_next_tab(hunits *distance)
-{
- return line_tabs
- ? curenv->tabs.distance_to_next_tab(get_text_length(), distance)
- : curenv->tabs.distance_to_next_tab(get_input_line_position(), distance);
-}
-
-void field_characters()
-{
- field_delimiter_char = get_optional_char();
- if (field_delimiter_char)
- padding_indicator_char = get_optional_char();
- else
- padding_indicator_char = 0;
- skip_line();
-}
-
-void line_tabs_request()
-{
- int n;
- if (has_arg() && get_integer(&n))
- curenv->line_tabs = n != 0;
- else
- curenv->line_tabs = 1;
- skip_line();
-}
-
-int environment::get_line_tabs()
-{
- return line_tabs;
-}
-
-void environment::wrap_up_tab()
-{
- if (!current_tab)
- return;
- if (line == 0)
- start_line();
- hunits tab_amount;
- switch (current_tab) {
- case TAB_RIGHT:
- tab_amount = tab_distance - tab_width;
- line = make_tab_node(tab_amount, line);
- break;
- case TAB_CENTER:
- tab_amount = tab_distance - tab_width/2;
- line = make_tab_node(tab_amount, line);
- break;
- case TAB_NONE:
- case TAB_LEFT:
- default:
- assert(0);
- }
- width_total += tab_amount;
- width_total += tab_width;
- if (current_field) {
- if (tab_precedes_field) {
- pre_field_width += tab_amount;
- tab_precedes_field = 0;
- }
- field_distance -= tab_amount;
- field_spaces += tab_field_spaces;
- }
- if (tab_contents != 0) {
- node *tem;
- for (tem = tab_contents; tem->next != 0; tem = tem->next)
- ;
- tem->next = line;
- line = tab_contents;
- }
- tab_field_spaces = 0;
- tab_contents = 0;
- tab_width = H0;
- tab_distance = H0;
- current_tab = TAB_NONE;
-}
-
-node *environment::make_tab_node(hunits d, node *next)
-{
- if (leader_node != 0 && d < 0) {
- error("motion generated by leader cannot be negative");
- delete leader_node;
- leader_node = 0;
- }
- if (!leader_node)
- return new hmotion_node(d, 1, 0, next);
- node *n = new hline_node(d, leader_node, next);
- leader_node = 0;
- return n;
-}
-
-void environment::handle_tab(int is_leader)
-{
- hunits d;
- if (current_tab)
- wrap_up_tab();
- charinfo *ci = is_leader ? leader_char : tab_char;
- delete leader_node;
- leader_node = ci ? make_char_node(ci) : 0;
- tab_type t = distance_to_next_tab(&d);
- switch (t) {
- case TAB_NONE:
- return;
- case TAB_LEFT:
- add_html_tag("tab left");
- add_node(make_tab_node(d));
- return;
- case TAB_RIGHT:
- case TAB_CENTER:
- add_html_tag("tab center");
- tab_width = 0;
- tab_distance = d;
- tab_contents = 0;
- current_tab = t;
- tab_field_spaces = 0;
- return;
- default:
- assert(0);
- }
-}
-
-void environment::start_field()
-{
- assert(!current_field);
- hunits d;
- if (distance_to_next_tab(&d) != TAB_NONE) {
- pre_field_width = get_text_length();
- field_distance = d;
- current_field = 1;
- field_spaces = 0;
- tab_field_spaces = 0;
- for (node *p = line; p; p = p->next)
- if (p->nspaces()) {
- p->freeze_space();
- space_total--;
- }
- tab_precedes_field = current_tab != TAB_NONE;
- }
- else
- error("zero field width");
-}
-
-void environment::wrap_up_field()
-{
- if (!current_tab && field_spaces == 0)
- add_padding();
- hunits padding = field_distance - (get_text_length() - pre_field_width);
- if (current_tab && tab_field_spaces != 0) {
- hunits tab_padding = scale(padding,
- tab_field_spaces,
- field_spaces + tab_field_spaces);
- padding -= tab_padding;
- distribute_space(tab_contents, tab_field_spaces, tab_padding, 1);
- tab_field_spaces = 0;
- tab_width += tab_padding;
- }
- if (field_spaces != 0) {
- distribute_space(line, field_spaces, padding, 1);
- width_total += padding;
- if (current_tab) {
- // the start of the tab has been moved to the right by padding, so
- tab_distance -= padding;
- if (tab_distance <= H0) {
- // use the next tab stop instead
- current_tab = tabs.distance_to_next_tab(get_input_line_position()
- - tab_width,
- &tab_distance);
- if (current_tab == TAB_NONE || current_tab == TAB_LEFT) {
- width_total += tab_width;
- if (current_tab == TAB_LEFT) {
- line = make_tab_node(tab_distance, line);
- width_total += tab_distance;
- current_tab = TAB_NONE;
- }
- if (tab_contents != 0) {
- node *tem;
- for (tem = tab_contents; tem->next != 0; tem = tem->next)
- ;
- tem->next = line;
- line = tab_contents;
- tab_contents = 0;
- }
- tab_width = H0;
- tab_distance = H0;
- }
- }
- }
- }
- current_field = 0;
-}
-
-void environment::add_padding()
-{
- if (current_tab) {
- tab_contents = new space_node(H0, tab_contents);
- tab_field_spaces++;
- }
- else {
- if (line == 0)
- start_line();
- line = new space_node(H0, line);
- field_spaces++;
- }
-}
-
-typedef int (environment::*INT_FUNCP)();
-typedef vunits (environment::*VUNITS_FUNCP)();
-typedef hunits (environment::*HUNITS_FUNCP)();
-typedef const char *(environment::*STRING_FUNCP)();
-
-class int_env_reg : public reg {
- INT_FUNCP func;
- public:
- int_env_reg(INT_FUNCP);
- const char *get_string();
- int get_value(units *val);
-};
-
-class vunits_env_reg : public reg {
- VUNITS_FUNCP func;
- public:
- vunits_env_reg(VUNITS_FUNCP f);
- const char *get_string();
- int get_value(units *val);
-};
-
-
-class hunits_env_reg : public reg {
- HUNITS_FUNCP func;
- public:
- hunits_env_reg(HUNITS_FUNCP f);
- const char *get_string();
- int get_value(units *val);
-};
-
-class string_env_reg : public reg {
- STRING_FUNCP func;
-public:
- string_env_reg(STRING_FUNCP);
- const char *get_string();
-};
-
-int_env_reg::int_env_reg(INT_FUNCP f) : func(f)
-{
-}
-
-int int_env_reg::get_value(units *val)
-{
- *val = (curenv->*func)();
- return 1;
-}
-
-const char *int_env_reg::get_string()
-{
- return i_to_a((curenv->*func)());
-}
-
-vunits_env_reg::vunits_env_reg(VUNITS_FUNCP f) : func(f)
-{
-}
-
-int vunits_env_reg::get_value(units *val)
-{
- *val = (curenv->*func)().to_units();
- return 1;
-}
-
-const char *vunits_env_reg::get_string()
-{
- return i_to_a((curenv->*func)().to_units());
-}
-
-hunits_env_reg::hunits_env_reg(HUNITS_FUNCP f) : func(f)
-{
-}
-
-int hunits_env_reg::get_value(units *val)
-{
- *val = (curenv->*func)().to_units();
- return 1;
-}
-
-const char *hunits_env_reg::get_string()
-{
- return i_to_a((curenv->*func)().to_units());
-}
-
-string_env_reg::string_env_reg(STRING_FUNCP f) : func(f)
-{
-}
-
-const char *string_env_reg::get_string()
-{
- return (curenv->*func)();
-}
-
-class horizontal_place_reg : public general_reg {
-public:
- horizontal_place_reg();
- int get_value(units *);
- void set_value(units);
-};
-
-horizontal_place_reg::horizontal_place_reg()
-{
-}
-
-int horizontal_place_reg::get_value(units *res)
-{
- *res = curenv->get_input_line_position().to_units();
- return 1;
-}
-
-void horizontal_place_reg::set_value(units n)
-{
- curenv->set_input_line_position(hunits(n));
-}
-
-const char *environment::get_font_family_string()
-{
- return family->nm.contents();
-}
-
-const char *environment::get_name_string()
-{
- return name.contents();
-}
-
-// Convert a quantity in scaled points to ascii decimal fraction.
-
-const char *sptoa(int sp)
-{
- assert(sp > 0);
- assert(sizescale > 0);
- if (sizescale == 1)
- return i_to_a(sp);
- if (sp % sizescale == 0)
- return i_to_a(sp/sizescale);
- // See if 1/sizescale is exactly representable as a decimal fraction,
- // ie its only prime factors are 2 and 5.
- int n = sizescale;
- int power2 = 0;
- while ((n & 1) == 0) {
- n >>= 1;
- power2++;
- }
- int power5 = 0;
- while ((n % 5) == 0) {
- n /= 5;
- power5++;
- }
- if (n == 1) {
- int decimal_point = power5 > power2 ? power5 : power2;
- if (decimal_point <= 10) {
- int factor = 1;
- int t;
- for (t = decimal_point - power2; --t >= 0;)
- factor *= 2;
- for (t = decimal_point - power5; --t >= 0;)
- factor *= 5;
- if (factor == 1 || sp <= INT_MAX/factor)
- return if_to_a(sp*factor, decimal_point);
- }
- }
- double s = double(sp)/double(sizescale);
- double factor = 10.0;
- double val = s;
- int decimal_point = 0;
- do {
- double v = ceil(s*factor);
- if (v > INT_MAX)
- break;
- val = v;
- factor *= 10.0;
- } while (++decimal_point < 10);
- return if_to_a(int(val), decimal_point);
-}
-
-const char *environment::get_point_size_string()
-{
- return sptoa(curenv->get_point_size());
-}
-
-const char *environment::get_requested_point_size_string()
-{
- return sptoa(curenv->get_requested_point_size());
-}
-
-#define init_int_env_reg(name, func) \
- number_reg_dictionary.define(name, new int_env_reg(&environment::func))
-
-#define init_vunits_env_reg(name, func) \
- number_reg_dictionary.define(name, new vunits_env_reg(&environment::func))
-
-#define init_hunits_env_reg(name, func) \
- number_reg_dictionary.define(name, new hunits_env_reg(&environment::func))
-
-#define init_string_env_reg(name, func) \
- number_reg_dictionary.define(name, new string_env_reg(&environment::func))
-
-void init_env_requests()
-{
- init_request("it", input_trap);
- init_request("ad", adjust);
- init_request("na", no_adjust);
- init_request("ev", environment_switch);
- init_request("evc", environment_copy);
- init_request("lt", title_length);
- init_request("ps", point_size);
- init_request("ft", font_change);
- init_request("fam", family_change);
- init_request("ss", space_size);
- init_request("fi", fill);
- init_request("nf", no_fill);
- init_request("ce", center);
- init_request("rj", right_justify);
- init_request("vs", vertical_spacing);
- init_request("ls", line_spacing);
- init_request("ll", line_length);
- init_request("in", indent);
- init_request("ti", temporary_indent);
- init_request("ul", underline);
- init_request("cu", continuous_underline);
- init_request("cc", control_char);
- init_request("c2", no_break_control_char);
- init_request("br", break_request);
- init_request("tl", title);
- init_request("ta", set_tabs);
- init_request("linetabs", line_tabs_request);
- init_request("fc", field_characters);
- init_request("mc", margin_character);
- init_request("nn", no_number);
- init_request("nm", number_lines);
- init_request("tc", tab_character);
- init_request("lc", leader_character);
- init_request("hy", hyphenate_request);
- init_request("hc", hyphen_char);
- init_request("nh", no_hyphenate);
- init_request("hlm", hyphen_line_max_request);
-#ifdef WIDOW_CONTROL
- init_request("wdc", widow_control_request);
-#endif /* WIDOW_CONTROL */
-#if 0
- init_request("tas", tabs_save);
- init_request("tar", tabs_restore);
-#endif
- init_request("hys", hyphenation_space_request);
- init_request("hym", hyphenation_margin_request);
- init_request("pvs", post_vertical_spacing);
- init_int_env_reg(".f", get_font);
- init_int_env_reg(".b", get_bold);
- init_hunits_env_reg(".i", get_indent);
- init_hunits_env_reg(".in", get_saved_indent);
- init_int_env_reg(".int", get_prev_line_interrupted);
- init_int_env_reg(".j", get_adjust_mode);
- init_hunits_env_reg(".k", get_text_length);
- init_hunits_env_reg(".l", get_line_length);
- init_hunits_env_reg(".ll", get_saved_line_length);
- init_int_env_reg(".L", get_line_spacing);
- init_hunits_env_reg(".n", get_prev_text_length);
- init_string_env_reg(".s", get_point_size_string);
- init_string_env_reg(".sr", get_requested_point_size_string);
- init_int_env_reg(".ps", get_point_size);
- init_int_env_reg(".psr", get_requested_point_size);
- init_int_env_reg(".u", get_fill);
- init_vunits_env_reg(".v", get_vertical_spacing);
- init_vunits_env_reg(".pvs", get_post_vertical_spacing);
- init_hunits_env_reg(".w", get_prev_char_width);
- init_int_env_reg(".ss", get_space_size);
- init_int_env_reg(".sss", get_sentence_space_size);
- init_string_env_reg(".fam", get_font_family_string);
- init_string_env_reg(".ev", get_name_string);
- init_int_env_reg(".hy", get_hyphenation_flags);
- init_int_env_reg(".hlm", get_hyphen_line_max);
- init_int_env_reg(".hlc", get_hyphen_line_count);
- init_hunits_env_reg(".lt", get_title_length);
- init_string_env_reg(".tabs", get_tabs);
- init_int_env_reg(".linetabs", get_line_tabs);
- init_hunits_env_reg(".csk", get_prev_char_skew);
- init_vunits_env_reg(".cht", get_prev_char_height);
- init_vunits_env_reg(".cdp", get_prev_char_depth);
- init_int_env_reg(".ce", get_center_lines);
- init_int_env_reg(".rj", get_right_justify_lines);
- init_hunits_env_reg(".hys", get_hyphenation_space);
- init_hunits_env_reg(".hym", get_hyphenation_margin);
- number_reg_dictionary.define("ln", new variable_reg(&next_line_number));
- number_reg_dictionary.define("ct", new variable_reg(&ct_reg_contents));
- number_reg_dictionary.define("sb", new variable_reg(&sb_reg_contents));
- number_reg_dictionary.define("st", new variable_reg(&st_reg_contents));
- number_reg_dictionary.define("rsb", new variable_reg(&rsb_reg_contents));
- number_reg_dictionary.define("rst", new variable_reg(&rst_reg_contents));
- number_reg_dictionary.define("ssc", new variable_reg(&ssc_reg_contents));
- number_reg_dictionary.define("skw", new variable_reg(&skw_reg_contents));
- number_reg_dictionary.define("hp", new horizontal_place_reg);
-}
-
-// Hyphenation - TeX's hyphenation algorithm with a less fancy implementation.
-
-struct trie_node;
-
-class trie {
- trie_node *tp;
- virtual void do_match(int len, void *val) = 0;
- virtual void do_delete(void *) = 0;
- void delete_trie_node(trie_node *);
-public:
- trie() : tp(0) {}
- virtual ~trie(); // virtual to shut up g++
- void insert(const char *, int, void *);
- // find calls do_match for each match it finds
- void find(const char *pat, int patlen);
- void clear();
-};
-
-class hyphen_trie : private trie {
- int *h;
- void do_match(int i, void *v);
- void do_delete(void *v);
- void insert_pattern(const char *pat, int patlen, int *num);
-public:
- hyphen_trie() {}
- ~hyphen_trie() {}
- void hyphenate(const char *word, int len, int *hyphens);
- void read_patterns_file(const char *name);
-};
-
-
-struct hyphenation_language {
- symbol name;
- dictionary exceptions;
- hyphen_trie patterns;
- hyphenation_language(symbol nm) : name(nm), exceptions(501) {}
- ~hyphenation_language() { }
-};
-
-dictionary language_dictionary(5);
-hyphenation_language *current_language = 0;
-
-static void set_hyphenation_language()
-{
- symbol nm = get_name(1);
- if (!nm.is_null()) {
- current_language = (hyphenation_language *)language_dictionary.lookup(nm);
- if (!current_language) {
- current_language = new hyphenation_language(nm);
- (void)language_dictionary.lookup(nm, (void *)current_language);
- }
- }
- skip_line();
-}
-
-const int WORD_MAX = 1024;
-
-static void hyphen_word()
-{
- if (!current_language) {
- error("no current hyphenation language");
- skip_line();
- return;
- }
- char buf[WORD_MAX + 1];
- unsigned char pos[WORD_MAX + 2];
- for (;;) {
- tok.skip();
- if (tok.newline() || tok.eof())
- break;
- int i = 0;
- int npos = 0;
- while (i < WORD_MAX && !tok.space() && !tok.newline() && !tok.eof()) {
- charinfo *ci = tok.get_char(1);
- if (ci == 0) {
- skip_line();
- return;
- }
- tok.next();
- if (ci->get_ascii_code() == '-') {
- if (i > 0 && (npos == 0 || pos[npos - 1] != i))
- pos[npos++] = i;
- }
- else {
- int c = ci->get_hyphenation_code();
- if (c == 0)
- break;
- buf[i++] = c;
- }
- }
- if (i > 0) {
- pos[npos] = 0;
- buf[i] = 0;
- unsigned char *tem = new unsigned char[npos + 1];
- memcpy(tem, pos, npos+1);
- tem = (unsigned char *)current_language->exceptions.lookup(symbol(buf),
- tem);
- if (tem)
- a_delete tem;
- }
- }
- skip_line();
-}
-
-struct trie_node {
- char c;
- trie_node *down;
- trie_node *right;
- void *val;
- trie_node(char, trie_node *);
-};
-
-trie_node::trie_node(char ch, trie_node *p)
-: c(ch), down(0), right(p), val(0)
-{
-}
-
-trie::~trie()
-{
- clear();
-}
-
-void trie::clear()
-{
- delete_trie_node(tp);
- tp = 0;
-}
-
-
-void trie::delete_trie_node(trie_node *p)
-{
- if (p) {
- delete_trie_node(p->down);
- delete_trie_node(p->right);
- if (p->val)
- do_delete(p->val);
- delete p;
- }
-}
-
-void trie::insert(const char *pat, int patlen, void *val)
-{
- trie_node **p = &tp;
- assert(patlen > 0 && pat != 0);
- for (;;) {
- while (*p != 0 && (*p)->c < pat[0])
- p = &((*p)->right);
- if (*p == 0 || (*p)->c != pat[0])
- *p = new trie_node(pat[0], *p);
- if (--patlen == 0) {
- (*p)->val = val;
- break;
- }
- ++pat;
- p = &((*p)->down);
- }
-}
-
-void trie::find(const char *pat, int patlen)
-{
- trie_node *p = tp;
- for (int i = 0; p != 0 && i < patlen; i++) {
- while (p != 0 && p->c < pat[i])
- p = p->right;
- if (p != 0 && p->c == pat[i]) {
- if (p->val != 0)
- do_match(i+1, p->val);
- p = p->down;
- }
- else
- break;
- }
-}
-
-struct operation {
- operation *next;
- short distance;
- short num;
- operation(int, int, operation *);
-};
-
-operation::operation(int i, int j, operation *op)
-: next(op), distance(j), num(i)
-{
-}
-
-void hyphen_trie::insert_pattern(const char *pat, int patlen, int *num)
-{
- operation *op = 0;
- for (int i = 0; i < patlen+1; i++)
- if (num[i] != 0)
- op = new operation(num[i], patlen - i, op);
- insert(pat, patlen, op);
-}
-
-void hyphen_trie::hyphenate(const char *word, int len, int *hyphens)
-{
- int j;
- for (j = 0; j < len + 1; j++)
- hyphens[j] = 0;
- for (j = 0; j < len - 1; j++) {
- h = hyphens + j;
- find(word + j, len - j);
- }
-}
-
-inline int max(int m, int n)
-{
- return m > n ? m : n;
-}
-
-void hyphen_trie::do_match(int i, void *v)
-{
- operation *op = (operation *)v;
- while (op != 0) {
- h[i - op->distance] = max(h[i - op->distance], op->num);
- op = op->next;
- }
-}
-
-void hyphen_trie::do_delete(void *v)
-{
- operation *op = (operation *)v;
- while (op) {
- operation *tem = op;
- op = tem->next;
- delete tem;
- }
-}
-
-void hyphen_trie::read_patterns_file(const char *name)
-{
- clear();
- char buf[WORD_MAX];
- int num[WORD_MAX+1];
- errno = 0;
- char *path = 0;
- FILE *fp = mac_path->open_file(name, &path);
- if (fp == 0) {
- error("can't find hyphenation patterns file `%1'", name);
- return;
- }
- int c = getc(fp);
- for (;;) {
- for (;;) {
- if (c == '%') {
- do {
- c = getc(fp);
- } while (c != EOF && c != '\n');
- }
- if (c == EOF || !csspace(c))
- break;
- c = getc(fp);
- }
- if (c == EOF)
- break;
- int i = 0;
- num[0] = 0;
- do {
- if (csdigit(c))
- num[i] = c - '0';
- else {
- buf[i++] = c;
- num[i] = 0;
- }
- c = getc(fp);
- } while (i < WORD_MAX && c != EOF && !csspace(c) && c != '%');
- insert_pattern(buf, i, num);
- }
- fclose(fp);
- a_delete path;
- return;
-}
-
-void hyphenate(hyphen_list *h, unsigned flags)
-{
- if (!current_language)
- return;
- while (h) {
- while (h && h->hyphenation_code == 0)
- h = h->next;
- int len = 0;
- char hbuf[WORD_MAX+2];
- char *buf = hbuf + 1;
- hyphen_list *tem;
- for (tem = h; tem && len < WORD_MAX; tem = tem->next) {
- if (tem->hyphenation_code != 0)
- buf[len++] = tem->hyphenation_code;
- else
- break;
- }
- hyphen_list *nexth = tem;
- if (len > 2) {
- buf[len] = 0;
- unsigned char *pos
- = (unsigned char *)current_language->exceptions.lookup(buf);
- if (pos != 0) {
- int j = 0;
- int i = 1;
- for (tem = h; tem != 0; tem = tem->next, i++)
- if (pos[j] == i) {
- tem->hyphen = 1;
- j++;
- }
- }
- else {
- hbuf[0] = hbuf[len+1] = '.';
- int num[WORD_MAX+3];
- current_language->patterns.hyphenate(hbuf, len+2, num);
- int i;
- num[2] = 0;
- if (flags & 8)
- num[3] = 0;
- if (flags & 4)
- --len;
- for (i = 2, tem = h; i < len && tem; tem = tem->next, i++)
- if (num[i] & 1)
- tem->hyphen = 1;
- }
- }
- h = nexth;
- }
-}
-
-static void hyphenation_patterns_file()
-{
- symbol name = get_long_name(1);
- if (!name.is_null()) {
- if (!current_language)
- error("no current hyphenation language");
- else
- current_language->patterns.read_patterns_file(name.contents());
- }
- skip_line();
-}
-
-class hyphenation_language_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *hyphenation_language_reg::get_string()
-{
- return current_language ? current_language->name.contents() : "";
-}
-
-void init_hyphen_requests()
-{
- init_request("hw", hyphen_word);
- init_request("hla", set_hyphenation_language);
- init_request("hpf", hyphenation_patterns_file);
- number_reg_dictionary.define(".hla", new hyphenation_language_reg);
-}
diff --git a/contrib/groff/src/roff/troff/env.h b/contrib/groff/src/roff/troff/env.h
deleted file mode 100644
index 256db512f802..000000000000
--- a/contrib/groff/src/roff/troff/env.h
+++ /dev/null
@@ -1,350 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct size_range {
- int min;
- int max;
-};
-
-class font_size {
- static size_range *size_table;
- static int nranges;
- int p;
-public:
- font_size();
- font_size(int points);
- int to_points();
- int to_scaled_points();
- int to_units();
- int operator==(font_size);
- int operator!=(font_size);
- static void init_size_table(int *sizes);
-};
-
-inline font_size::font_size() : p(0)
-{
-}
-
-inline int font_size::operator==(font_size fs)
-{
- return p == fs.p;
-}
-
-inline int font_size::operator!=(font_size fs)
-{
- return p != fs.p;
-}
-
-inline int font_size::to_scaled_points()
-{
- return p;
-}
-
-inline int font_size::to_points()
-{
- return p/sizescale;
-}
-
-struct environment;
-
-hunits env_digit_width(environment *);
-hunits env_space_width(environment *);
-hunits env_sentence_space_width(environment *);
-hunits env_narrow_space_width(environment *);
-hunits env_half_narrow_space_width(environment *);
-
-struct tab;
-
-enum tab_type { TAB_NONE, TAB_LEFT, TAB_CENTER, TAB_RIGHT };
-
-class tab_stops {
- tab *initial_list;
- tab *repeated_list;
-public:
- tab_stops();
- tab_stops(hunits distance, tab_type type);
- tab_stops(const tab_stops &);
- ~tab_stops();
- void operator=(const tab_stops &);
- tab_type distance_to_next_tab(hunits pos, hunits *distance);
- void clear();
- void add_tab(hunits pos, tab_type type, int repeated);
- const char *to_string();
-};
-
-const unsigned MARGIN_CHARACTER_ON = 1;
-const unsigned MARGIN_CHARACTER_NEXT = 2;
-
-struct charinfo;
-struct node;
-struct breakpoint;
-struct font_family;
-struct pending_output_line;
-
-class environment {
- int dummy; // dummy environment used for \w
- hunits prev_line_length;
- hunits line_length;
- hunits prev_title_length;
- hunits title_length;
- font_size prev_size;
- font_size size;
- int requested_size;
- int prev_requested_size;
- int char_height;
- int char_slant;
- int prev_fontno;
- int fontno;
- font_family *prev_family;
- font_family *family;
- int space_size; // in 36ths of an em
- int sentence_space_size; // same but for spaces at the end of sentences
- int adjust_mode;
- int fill;
- int interrupted;
- int prev_line_interrupted;
- int center_lines;
- int right_justify_lines;
- vunits prev_vertical_spacing;
- vunits vertical_spacing;
- vunits prev_post_vertical_spacing;
- vunits post_vertical_spacing;
- int prev_line_spacing;
- int line_spacing;
- hunits prev_indent;
- hunits indent;
- hunits temporary_indent;
- int have_temporary_indent;
- hunits saved_indent;
- hunits target_text_length;
- int pre_underline_fontno;
- int underline_lines;
- int underline_spaces;
- symbol input_trap;
- int input_trap_count;
- node *line; // in reverse order
- hunits prev_text_length;
- hunits width_total;
- int space_total;
- hunits input_line_start;
- tab_stops tabs;
- node *tab_contents;
- hunits tab_width;
- hunits tab_distance;
- int line_tabs;
- tab_type current_tab;
- node *leader_node;
- charinfo *tab_char;
- charinfo *leader_char;
- int current_field; // is there a current field?
- hunits field_distance;
- hunits pre_field_width;
- int field_spaces;
- int tab_field_spaces;
- int tab_precedes_field;
- int discarding;
- int spread_flag; // set by \p
- unsigned margin_character_flags;
- node *margin_character_node;
- hunits margin_character_distance;
- node *numbering_nodes;
- hunits line_number_digit_width;
- int number_text_separation; // in digit spaces
- int line_number_indent; // in digit spaces
- int line_number_multiple;
- int no_number_count;
- unsigned hyphenation_flags;
- int hyphen_line_count;
- int hyphen_line_max;
- hunits hyphenation_space;
- hunits hyphenation_margin;
- int composite; // used for construction of composite char?
- pending_output_line *pending_lines;
-#ifdef WIDOW_CONTROL
- int widow_control;
-#endif /* WIDOW_CONTROL */
- int need_eol;
- int ignore_next_eol;
- int emitted_node; // have we emitted a node since the last html eol tag?
-
- tab_type distance_to_next_tab(hunits *);
- void start_line();
- void output_line(node *, hunits);
- void output(node *nd, int retain_size, vunits vs, vunits post_vs,
- hunits width);
- void output_title(node *nd, int retain_size, vunits vs, vunits post_vs,
- hunits width);
-#ifdef WIDOW_CONTROL
- void mark_last_line();
-#endif /* WIDOW_CONTROL */
- breakpoint *choose_breakpoint();
- void hyphenate_line(int start_here = 0);
- void start_field();
- void wrap_up_field();
- void add_padding();
- node *make_tab_node(hunits d, node *next = 0);
- node *get_prev_char();
-public:
- const symbol name;
- unsigned char control_char;
- unsigned char no_break_control_char;
- charinfo *hyphen_indicator_char;
-
- environment(symbol);
- environment(const environment *); // for temporary environment
- ~environment();
- void copy(const environment *);
- int is_dummy() { return dummy; }
- int is_empty();
- int is_composite() { return composite; }
- void set_composite() { composite = 1; }
- vunits get_vertical_spacing(); // .v
- vunits get_post_vertical_spacing(); // .pvs
- int get_line_spacing(); // .L
- vunits total_post_vertical_spacing();
- int get_point_size() { return size.to_scaled_points(); }
- font_size get_font_size() { return size; }
- int get_size() { return size.to_units(); }
- int get_requested_point_size() { return requested_size; }
- int get_char_height() { return char_height; }
- int get_char_slant() { return char_slant; }
- hunits get_digit_width();
- int get_font() { return fontno; }; // .f
- font_family *get_family() { return family; }
- int get_bold(); // .b
- int get_adjust_mode(); // .j
- int get_fill(); // .u
- hunits get_indent(); // .i
- hunits get_temporary_indent();
- hunits get_line_length(); // .l
- hunits get_saved_line_length(); // .ll
- hunits get_saved_indent(); // .in
- hunits get_title_length();
- hunits get_prev_char_width(); // .w
- hunits get_prev_char_skew();
- vunits get_prev_char_height();
- vunits get_prev_char_depth();
- hunits get_text_length(); // .k
- hunits get_prev_text_length(); // .n
- hunits get_space_width() { return env_space_width(this); }
- int get_space_size() { return space_size; } // in ems/36
- int get_sentence_space_size() { return sentence_space_size; }
- hunits get_narrow_space_width() { return env_narrow_space_width(this); }
- hunits get_half_narrow_space_width()
- { return env_half_narrow_space_width(this); }
- hunits get_input_line_position();
- const char *get_tabs();
- int get_line_tabs();
- int get_hyphenation_flags();
- int get_hyphen_line_max();
- int get_hyphen_line_count();
- hunits get_hyphenation_space();
- hunits get_hyphenation_margin();
- int get_center_lines();
- int get_right_justify_lines();
- int get_prev_line_interrupted() { return prev_line_interrupted; }
- node *make_char_node(charinfo *);
- node *extract_output_line();
- void width_registers();
- void wrap_up_tab();
- void set_font(int);
- void set_font(symbol);
- void set_family(symbol);
- void set_size(int);
- void set_char_height(int);
- void set_char_slant(int);
- void set_input_line_position(hunits); // used by \n(hp
- void interrupt();
- void spread() { spread_flag = 1; }
- void possibly_break_line(int start_here = 0, int forced = 0);
- void do_break(); // .br
- void final_break();
- void add_html_tag_eol();
- void add_html_tag(const char *);
- void add_html_tag(const char *, int);
- void add_html_tag_tabs();
- void newline();
- void handle_tab(int is_leader = 0); // do a tab or leader
- void add_node(node *);
- void add_char(charinfo *);
- void add_hyphen_indicator();
- void add_italic_correction();
- void space();
- void space(hunits, hunits);
- void space_newline();
- const char *get_font_family_string();
- const char *get_name_string();
- const char *get_point_size_string();
- const char *get_requested_point_size_string();
- void output_pending_lines();
-
- friend void title_length();
- friend void space_size();
- friend void fill();
- friend void no_fill();
- friend void adjust();
- friend void no_adjust();
- friend void center();
- friend void right_justify();
- friend void vertical_spacing();
- friend void post_vertical_spacing();
- friend void line_spacing();
- friend void line_length();
- friend void indent();
- friend void temporary_indent();
- friend void do_underline(int);
- friend void input_trap();
- friend void set_tabs();
- friend void margin_character();
- friend void no_number();
- friend void number_lines();
- friend void leader_character();
- friend void tab_character();
- friend void hyphenate_request();
- friend void no_hyphenate();
- friend void hyphen_line_max_request();
- friend void hyphenation_space_request();
- friend void hyphenation_margin_request();
- friend void line_width();
-#if 0
- friend void tabs_save();
- friend void tabs_restore();
-#endif
- friend void line_tabs_request();
- friend void title();
-#ifdef WIDOW_CONTROL
- friend void widow_control_request();
-#endif /* WIDOW_CONTROL */
-
- friend void do_divert(int append, int boxing);
-};
-
-extern environment *curenv;
-extern void pop_env();
-extern void push_env(int);
-
-void init_environments();
-void read_hyphen_file(const char *name);
-
-extern int break_flag;
-extern int compatible_flag;
-extern symbol default_family;
-extern int translate_space_to_dummy;
diff --git a/contrib/groff/src/roff/troff/hvunits.h b/contrib/groff/src/roff/troff/hvunits.h
deleted file mode 100644
index 8efb5ab35972..000000000000
--- a/contrib/groff/src/roff/troff/hvunits.h
+++ /dev/null
@@ -1,340 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-class vunits {
- int n;
-public:
- vunits();
- vunits(units);
- units to_units();
- int is_zero();
- vunits& operator+=(const vunits&);
- vunits& operator-=(const vunits&);
- friend inline vunits scale(vunits n, units x, units y); // scale n by x/y
- friend inline vunits scale(vunits n, vunits x, vunits y);
- friend inline vunits operator +(const vunits&, const vunits&);
- friend inline vunits operator -(const vunits&, const vunits&);
- friend inline vunits operator -(const vunits&);
- friend inline int operator /(const vunits&, const vunits&);
- friend inline vunits operator /(const vunits&, int);
- friend inline vunits operator *(const vunits&, int);
- friend inline vunits operator *(int, const vunits&);
- friend inline int operator <(const vunits&, const vunits&);
- friend inline int operator >(const vunits&, const vunits&);
- friend inline int operator <=(const vunits&, const vunits&);
- friend inline int operator >=(const vunits&, const vunits&);
- friend inline int operator ==(const vunits&, const vunits&);
- friend inline int operator !=(const vunits&, const vunits&);
-};
-
-extern vunits V0;
-
-
-class hunits {
- int n;
-public:
- hunits();
- hunits(units);
- units to_units();
- int is_zero();
- hunits& operator+=(const hunits&);
- hunits& operator-=(const hunits&);
- friend inline hunits scale(hunits n, units x, units y); // scale n by x/y
- friend inline hunits scale(hunits n, double x);
- friend inline hunits operator +(const hunits&, const hunits&);
- friend inline hunits operator -(const hunits&, const hunits&);
- friend inline hunits operator -(const hunits&);
- friend inline int operator /(const hunits&, const hunits&);
- friend inline hunits operator /(const hunits&, int);
- friend inline hunits operator *(const hunits&, int);
- friend inline hunits operator *(int, const hunits&);
- friend inline int operator <(const hunits&, const hunits&);
- friend inline int operator >(const hunits&, const hunits&);
- friend inline int operator <=(const hunits&, const hunits&);
- friend inline int operator >=(const hunits&, const hunits&);
- friend inline int operator ==(const hunits&, const hunits&);
- friend inline int operator !=(const hunits&, const hunits&);
-};
-
-extern hunits H0;
-
-extern int get_vunits(vunits *, unsigned char si);
-extern int get_hunits(hunits *, unsigned char si);
-extern int get_vunits(vunits *, unsigned char si, vunits prev_value);
-extern int get_hunits(hunits *, unsigned char si, hunits prev_value);
-
-inline vunits:: vunits() : n(0)
-{
-}
-
-inline units vunits::to_units()
-{
- return n*vresolution;
-}
-
-inline int vunits::is_zero()
-{
- return n == 0;
-}
-
-inline vunits operator +(const vunits & x, const vunits & y)
-{
- vunits r;
- r = x;
- r.n += y.n;
- return r;
-}
-
-inline vunits operator -(const vunits & x, const vunits & y)
-{
- vunits r;
- r = x;
- r.n -= y.n;
- return r;
-}
-
-inline vunits operator -(const vunits & x)
-{
- vunits r;
- r.n = -x.n;
- return r;
-}
-
-inline int operator /(const vunits & x, const vunits & y)
-{
- return x.n/y.n;
-}
-
-inline vunits operator /(const vunits & x, int n)
-{
- vunits r;
- r = x;
- r.n /= n;
- return r;
-}
-
-inline vunits operator *(const vunits & x, int n)
-{
- vunits r;
- r = x;
- r.n *= n;
- return r;
-}
-
-inline vunits operator *(int n, const vunits & x)
-{
- vunits r;
- r = x;
- r.n *= n;
- return r;
-}
-
-inline int operator <(const vunits & x, const vunits & y)
-{
- return x.n < y.n;
-}
-
-inline int operator >(const vunits & x, const vunits & y)
-{
- return x.n > y.n;
-}
-
-inline int operator <=(const vunits & x, const vunits & y)
-{
- return x.n <= y.n;
-}
-
-inline int operator >=(const vunits & x, const vunits & y)
-{
- return x.n >= y.n;
-}
-
-inline int operator ==(const vunits & x, const vunits & y)
-{
- return x.n == y.n;
-}
-
-inline int operator !=(const vunits & x, const vunits & y)
-{
- return x.n != y.n;
-}
-
-
-inline vunits& vunits::operator+=(const vunits & x)
-{
- n += x.n;
- return *this;
-}
-
-inline vunits& vunits::operator-=(const vunits & x)
-{
- n -= x.n;
- return *this;
-}
-
-inline hunits:: hunits() : n(0)
-{
-}
-
-inline units hunits::to_units()
-{
- return n*hresolution;
-}
-
-inline int hunits::is_zero()
-{
- return n == 0;
-}
-
-inline hunits operator +(const hunits & x, const hunits & y)
-{
- hunits r;
- r = x;
- r.n += y.n;
- return r;
-}
-
-inline hunits operator -(const hunits & x, const hunits & y)
-{
- hunits r;
- r = x;
- r.n -= y.n;
- return r;
-}
-
-inline hunits operator -(const hunits & x)
-{
- hunits r;
- r = x;
- r.n = -x.n;
- return r;
-}
-
-inline int operator /(const hunits & x, const hunits & y)
-{
- return x.n/y.n;
-}
-
-inline hunits operator /(const hunits & x, int n)
-{
- hunits r;
- r = x;
- r.n /= n;
- return r;
-}
-
-inline hunits operator *(const hunits & x, int n)
-{
- hunits r;
- r = x;
- r.n *= n;
- return r;
-}
-
-inline hunits operator *(int n, const hunits & x)
-{
- hunits r;
- r = x;
- r.n *= n;
- return r;
-}
-
-inline int operator <(const hunits & x, const hunits & y)
-{
- return x.n < y.n;
-}
-
-inline int operator >(const hunits & x, const hunits & y)
-{
- return x.n > y.n;
-}
-
-inline int operator <=(const hunits & x, const hunits & y)
-{
- return x.n <= y.n;
-}
-
-inline int operator >=(const hunits & x, const hunits & y)
-{
- return x.n >= y.n;
-}
-
-inline int operator ==(const hunits & x, const hunits & y)
-{
- return x.n == y.n;
-}
-
-inline int operator !=(const hunits & x, const hunits & y)
-{
- return x.n != y.n;
-}
-
-
-inline hunits& hunits::operator+=(const hunits & x)
-{
- n += x.n;
- return *this;
-}
-
-inline hunits& hunits::operator-=(const hunits & x)
-{
- n -= x.n;
- return *this;
-}
-
-inline hunits scale(hunits n, units x, units y)
-{
- hunits r;
- r.n = scale(n.n, x, y);
- return r;
-}
-
-inline vunits scale(vunits n, units x, units y)
-{
- vunits r;
- r.n = scale(n.n, x, y);
- return r;
-}
-
-inline vunits scale(vunits n, vunits x, vunits y)
-{
- vunits r;
- r.n = scale(n.n, x.n, y.n);
- return r;
-}
-
-inline hunits scale(hunits n, double x)
-{
- hunits r;
- r.n = int(n.n*x);
- return r;
-}
-
-inline units scale(units n, double x)
-{
- return int(n*x);
-}
-
-inline units points_to_units(units n)
-{
- return scale(n, units_per_inch, 72);
-}
-
diff --git a/contrib/groff/src/roff/troff/input.cc b/contrib/groff/src/roff/troff/input.cc
deleted file mode 100644
index 982e5bd5520c..000000000000
--- a/contrib/groff/src/roff/troff/input.cc
+++ /dev/null
@@ -1,6891 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "troff.h"
-#include "symbol.h"
-#include "dictionary.h"
-#include "hvunits.h"
-#include "env.h"
-#include "request.h"
-#include "node.h"
-#include "reg.h"
-#include "token.h"
-#include "div.h"
-#include "charinfo.h"
-#include "stringclass.h"
-#include "font.h"
-#include "macropath.h"
-#include "defs.h"
-#include "input.h"
-
-// Needed for getpid().
-#include "posix.h"
-
-#include "nonposix.h"
-
-#ifdef NEED_DECLARATION_PUTENV
-extern "C" {
- int putenv(const char *);
-}
-#endif /* NEED_DECLARATION_PUTENV */
-
-#ifdef ISATTY_MISSING
-#undef isatty
-#define isatty(n) (1)
-#else /* not ISATTY_MISSING */
-#ifndef isatty
-extern "C" {
- int isatty(int);
-}
-#endif /* not isatty */
-#endif /* not ISATTY_MISSING */
-
-#define MACRO_PREFIX "tmac."
-#define MACRO_POSTFIX ".tmac"
-#define INITIAL_STARTUP_FILE "troffrc"
-#define FINAL_STARTUP_FILE "troffrc-end"
-#define DEFAULT_INPUT_STACK_LIMIT 1000
-
-#ifndef DEFAULT_WARNING_MASK
-// warnings that are enabled by default
-#define DEFAULT_WARNING_MASK \
- (WARN_CHAR|WARN_NUMBER|WARN_BREAK|WARN_SPACE|WARN_FONT)
-#endif
-
-// initial size of buffer for reading names; expanded as necessary
-#define ABUF_SIZE 16
-
-#ifdef COLUMN
-void init_column_requests();
-#endif /* COLUMN */
-
-static node *read_draw_node();
-void handle_first_page_transition();
-static void push_token(const token &);
-void copy_file();
-#ifdef COLUMN
-void vjustify();
-#endif /* COLUMN */
-void transparent();
-void transparent_file();
-
-const char *program_name = 0;
-token tok;
-int break_flag = 0;
-static int backtrace_flag = 0;
-#ifndef POPEN_MISSING
-char *pipe_command = 0;
-#endif
-charinfo *charset_table[256];
-
-static int warning_mask = DEFAULT_WARNING_MASK;
-static int inhibit_errors = 0;
-static int ignoring = 0;
-
-static void enable_warning(const char *);
-static void disable_warning(const char *);
-
-static int escape_char = '\\';
-static symbol end_macro_name;
-static symbol blank_line_macro_name;
-int compatible_flag = 0;
-int ascii_output_flag = 0;
-int suppress_output_flag = 0;
-int is_html = 0;
-int begin_level = 0; // number of nested .begin requests
-
-int tcommand_flag = 0;
-int safer_flag = 1; // safer by default
-
-search_path *mac_path = &safer_macro_path;
-
-static int get_copy(node**, int = 0);
-static void copy_mode_error(const char *,
- const errarg & = empty_errarg,
- const errarg & = empty_errarg,
- const errarg & = empty_errarg);
-
-static symbol read_escape_name();
-static void interpolate_string(symbol);
-static void interpolate_macro(symbol);
-static void interpolate_number_format(symbol);
-static void interpolate_environment_variable(symbol);
-
-static void interpolate_arg(symbol);
-static request_or_macro *lookup_request(symbol);
-static int get_delim_number(units *, int);
-static int get_delim_number(units *, int, units);
-static int get_line_arg(units *res, int si, charinfo **cp);
-static int read_size(int *);
-static symbol get_delim_name();
-static void init_registers();
-static void trapping_blank_line();
-
-struct input_iterator;
-input_iterator *make_temp_iterator(const char *);
-const char *input_char_description(int);
-
-
-void set_escape_char()
-{
- if (has_arg()) {
- if (tok.ch() == 0) {
- error("bad escape character");
- escape_char = '\\';
- }
- else
- escape_char = tok.ch();
- }
- else
- escape_char = '\\';
- skip_line();
-}
-
-void escape_off()
-{
- escape_char = 0;
- skip_line();
-}
-
-static int saved_escape_char = '\\';
-
-void save_escape_char()
-{
- saved_escape_char = escape_char;
- skip_line();
-}
-
-void restore_escape_char()
-{
- escape_char = saved_escape_char;
- skip_line();
-}
-
-class input_iterator {
-public:
- input_iterator();
- virtual ~input_iterator();
- int get(node **);
- friend class input_stack;
-protected:
- const unsigned char *ptr;
- const unsigned char *eptr;
- input_iterator *next;
-private:
- virtual int fill(node **);
- virtual int peek();
- virtual int has_args() { return 0; }
- virtual int nargs() { return 0; }
- virtual input_iterator *get_arg(int) { return NULL; }
- virtual int get_location(int, const char **, int *)
- { return 0; }
- virtual void backtrace() {}
- virtual int set_location(const char *, int)
- { return 0; }
- virtual int next_file(FILE *, const char *) { return 0; }
- virtual void shift(int) {}
- virtual int is_boundary() { return 0; }
- virtual int internal_level() { return 0; }
- virtual int is_file() { return 0; }
- virtual int is_macro() { return 0; }
-};
-
-input_iterator::input_iterator()
-: ptr(0), eptr(0)
-{
-}
-
-input_iterator::~input_iterator()
-{
-}
-
-int input_iterator::fill(node **)
-{
- return EOF;
-}
-
-int input_iterator::peek()
-{
- return EOF;
-}
-
-inline int input_iterator::get(node **p)
-{
- return ptr < eptr ? *ptr++ : fill(p);
-}
-
-class input_boundary : public input_iterator {
-public:
- int is_boundary() { return 1; }
-};
-
-class input_return_boundary : public input_iterator {
-public:
- int is_boundary() { return 2; }
-};
-
-class file_iterator : public input_iterator {
- FILE *fp;
- int lineno;
- const char *filename;
- int popened;
- int newline_flag;
- enum { BUF_SIZE = 512 };
- unsigned char buf[BUF_SIZE];
- void close();
-public:
- file_iterator(FILE *, const char *, int = 0);
- ~file_iterator();
- int fill(node **);
- int peek();
- int get_location(int, const char **, int *);
- void backtrace();
- int set_location(const char *, int);
- int next_file(FILE *, const char *);
- int is_file();
-};
-
-file_iterator::file_iterator(FILE *f, const char *fn, int po)
-: fp(f), lineno(1), filename(fn), popened(po), newline_flag(0)
-{
- if ((font::use_charnames_in_special) && (fn != 0)) {
- if (!the_output)
- init_output();
- the_output->put_filename(fn);
- }
-}
-
-file_iterator::~file_iterator()
-{
- close();
-}
-
-void file_iterator::close()
-{
- if (fp == stdin)
- clearerr(stdin);
-#ifndef POPEN_MISSING
- else if (popened)
- pclose(fp);
-#endif /* not POPEN_MISSING */
- else
- fclose(fp);
-}
-
-int file_iterator::is_file()
-{
- return 1;
-}
-
-int file_iterator::next_file(FILE *f, const char *s)
-{
- close();
- filename = s;
- fp = f;
- lineno = 1;
- newline_flag = 0;
- popened = 0;
- ptr = 0;
- eptr = 0;
- return 1;
-}
-
-int file_iterator::fill(node **)
-{
- if (newline_flag) {
- curenv->add_html_tag_eol();
- lineno++;
- }
- newline_flag = 0;
- unsigned char *p = buf;
- ptr = p;
- unsigned char *e = p + BUF_SIZE;
- while (p < e) {
- int c = getc(fp);
- if (c == EOF)
- break;
- if (illegal_input_char(c))
- warning(WARN_INPUT, "illegal input character code %1", int(c));
- else {
- *p++ = c;
- if (c == '\n') {
- newline_flag = 1;
- break;
- }
- }
- }
- if (p > buf) {
- eptr = p;
- return *ptr++;
- }
- else {
- eptr = p;
- return EOF;
- }
-}
-
-int file_iterator::peek()
-{
- int c = getc(fp);
- while (illegal_input_char(c)) {
- warning(WARN_INPUT, "illegal input character code %1", int(c));
- c = getc(fp);
- }
- if (c != EOF)
- ungetc(c, fp);
- return c;
-}
-
-int file_iterator::get_location(int /*allow_macro*/,
- const char **filenamep, int *linenop)
-{
- *linenop = lineno;
- if (filename != 0 && strcmp(filename, "-") == 0)
- *filenamep = "<standard input>";
- else
- *filenamep = filename;
- return 1;
-}
-
-void file_iterator::backtrace()
-{
- errprint("%1:%2: backtrace: %3 `%1'\n", filename, lineno,
- popened ? "process" : "file");
-}
-
-int file_iterator::set_location(const char *f, int ln)
-{
- if (f) {
- filename = f;
- if (!the_output)
- init_output();
- the_output->put_filename(f);
- }
- lineno = ln;
- return 1;
-}
-
-input_iterator nil_iterator;
-
-class input_stack {
-public:
- static int get(node **);
- static int peek();
- static void push(input_iterator *);
- static input_iterator *get_arg(int);
- static int nargs();
- static int get_location(int, const char **, int *);
- static int set_location(const char *, int);
- static void backtrace();
- static void backtrace_all();
- static void next_file(FILE *, const char *);
- static void end_file();
- static void shift(int n);
- static void add_boundary();
- static void add_return_boundary();
- static int is_return_boundary();
- static void remove_boundary();
- static int get_level();
- static void clear();
- static void pop_macro();
-
- static int limit;
-private:
- static input_iterator *top;
- static int level;
-
- static int finish_get(node **);
- static int finish_peek();
-};
-
-input_iterator *input_stack::top = &nil_iterator;
-int input_stack::level = 0;
-int input_stack::limit = DEFAULT_INPUT_STACK_LIMIT;
-
-inline int input_stack::get_level()
-{
- return level + top->internal_level();
-}
-
-inline int input_stack::get(node **np)
-{
- return (top->ptr < top->eptr) ? *top->ptr++ : finish_get(np);
-}
-
-int input_stack::finish_get(node **np)
-{
- for (;;) {
- int c = top->fill(np);
- if (c != EOF || top->is_boundary())
- return c;
- if (top == &nil_iterator)
- break;
- input_iterator *tem = top;
- top = top->next;
- level--;
- delete tem;
- if (top->ptr < top->eptr)
- return *top->ptr++;
- }
- assert(level == 0);
- return EOF;
-}
-
-inline int input_stack::peek()
-{
- return (top->ptr < top->eptr) ? *top->ptr : finish_peek();
-}
-
-int input_stack::finish_peek()
-{
- for (;;) {
- int c = top->peek();
- if (c != EOF || top->is_boundary())
- return c;
- if (top == &nil_iterator)
- break;
- input_iterator *tem = top;
- top = top->next;
- level--;
- delete tem;
- if (top->ptr < top->eptr)
- return *top->ptr;
- }
- assert(level == 0);
- return EOF;
-}
-
-void input_stack::add_boundary()
-{
- push(new input_boundary);
-}
-
-void input_stack::add_return_boundary()
-{
- push(new input_return_boundary);
-}
-
-int input_stack::is_return_boundary()
-{
- return top->is_boundary() == 2;
-}
-
-void input_stack::remove_boundary()
-{
- assert(top->is_boundary());
- input_iterator *temp = top->next;
- delete top;
- top = temp;
- level--;
-}
-
-void input_stack::push(input_iterator *in)
-{
- if (in == 0)
- return;
- if (++level > limit && limit > 0)
- fatal("input stack limit exceeded (probable infinite loop)");
- in->next = top;
- top = in;
-}
-
-input_iterator *input_stack::get_arg(int i)
-{
- input_iterator *p;
- for (p = top; p != NULL; p = p->next)
- if (p->has_args())
- return p->get_arg(i);
- return 0;
-}
-
-void input_stack::shift(int n)
-{
- for (input_iterator *p = top; p; p = p->next)
- if (p->has_args()) {
- p->shift(n);
- return;
- }
-}
-
-int input_stack::nargs()
-{
- for (input_iterator *p =top; p != 0; p = p->next)
- if (p->has_args())
- return p->nargs();
- return 0;
-}
-
-int input_stack::get_location(int allow_macro, const char **filenamep, int *linenop)
-{
- for (input_iterator *p = top; p; p = p->next)
- if (p->get_location(allow_macro, filenamep, linenop))
- return 1;
- return 0;
-}
-
-void input_stack::backtrace()
-{
- const char *f;
- int n;
- // only backtrace down to (not including) the topmost file
- for (input_iterator *p = top;
- p && !p->get_location(0, &f, &n);
- p = p->next)
- p->backtrace();
-}
-
-void input_stack::backtrace_all()
-{
- for (input_iterator *p = top; p; p = p->next)
- p->backtrace();
-}
-
-int input_stack::set_location(const char *filename, int lineno)
-{
- for (input_iterator *p = top; p; p = p->next)
- if (p->set_location(filename, lineno))
- return 1;
- return 0;
-}
-
-void input_stack::next_file(FILE *fp, const char *s)
-{
- input_iterator **pp;
- for (pp = &top; *pp != &nil_iterator; pp = &(*pp)->next)
- if ((*pp)->next_file(fp, s))
- return;
- if (++level > limit && limit > 0)
- fatal("input stack limit exceeded");
- *pp = new file_iterator(fp, s);
- (*pp)->next = &nil_iterator;
-}
-
-void input_stack::end_file()
-{
- for (input_iterator **pp = &top; *pp != &nil_iterator; pp = &(*pp)->next)
- if ((*pp)->is_file()) {
- input_iterator *tem = *pp;
- *pp = (*pp)->next;
- delete tem;
- level--;
- return;
- }
-}
-
-void input_stack::clear()
-{
- int nboundaries = 0;
- while (top != &nil_iterator) {
- if (top->is_boundary())
- nboundaries++;
- input_iterator *tem = top;
- top = top->next;
- level--;
- delete tem;
- }
- // Keep while_request happy.
- for (; nboundaries > 0; --nboundaries)
- add_return_boundary();
-}
-
-void input_stack::pop_macro()
-{
- int nboundaries = 0;
- int is_macro = 0;
- do {
- if (top->next == &nil_iterator)
- break;
- if (top->is_boundary())
- nboundaries++;
- is_macro = top->is_macro();
- input_iterator *tem = top;
- top = top->next;
- level--;
- delete tem;
- } while (!is_macro);
- // Keep while_request happy.
- for (; nboundaries > 0; --nboundaries)
- add_return_boundary();
-}
-
-void backtrace_request()
-{
- input_stack::backtrace_all();
- fflush(stderr);
- skip_line();
-}
-
-void next_file()
-{
- symbol nm = get_long_name(0);
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (nm.is_null())
- input_stack::end_file();
- else {
- errno = 0;
- FILE *fp = fopen(nm.contents(), "r");
- if (!fp)
- error("can't open `%1': %2", nm.contents(), strerror(errno));
- else
- input_stack::next_file(fp, nm.contents());
- }
- tok.next();
-}
-
-void shift()
-{
- int n;
- if (!has_arg() || !get_integer(&n))
- n = 1;
- input_stack::shift(n);
- skip_line();
-}
-
-static int get_char_for_escape_name()
-{
- int c = get_copy(NULL);
- switch (c) {
- case EOF:
- copy_mode_error("end of input in escape name");
- return '\0';
- default:
- if (!illegal_input_char(c))
- break;
- // fall through
- case '\n':
- if (c == '\n')
- input_stack::push(make_temp_iterator("\n"));
- case ' ':
- case '\t':
- case '\001':
- case '\b':
- copy_mode_error("%1 is not allowed in an escape name",
- input_char_description(c));
- return '\0';
- }
- return c;
-}
-
-static symbol read_two_char_escape_name()
-{
- char buf[3];
- buf[0] = get_char_for_escape_name();
- if (buf[0] != '\0') {
- buf[1] = get_char_for_escape_name();
- if (buf[1] == '\0')
- buf[0] = 0;
- else
- buf[2] = 0;
- }
- return symbol(buf);
-}
-
-static symbol read_long_escape_name()
-{
- int start_level = input_stack::get_level();
- char abuf[ABUF_SIZE];
- char *buf = abuf;
- int buf_size = ABUF_SIZE;
- int i = 0;
- for (;;) {
- int c = get_char_for_escape_name();
- if (c == 0) {
- if (buf != abuf)
- a_delete buf;
- return NULL_SYMBOL;
- }
- if (i + 2 > buf_size) {
- if (buf == abuf) {
- buf = new char[ABUF_SIZE*2];
- memcpy(buf, abuf, buf_size);
- buf_size = ABUF_SIZE*2;
- }
- else {
- char *old_buf = buf;
- buf = new char[buf_size*2];
- memcpy(buf, old_buf, buf_size);
- buf_size *= 2;
- a_delete old_buf;
- }
- }
- if (c == ']' && input_stack::get_level() == start_level)
- break;
- buf[i++] = c;
- }
- buf[i] = 0;
- if (buf == abuf) {
- if (i == 0) {
- copy_mode_error("empty escape name");
- return NULL_SYMBOL;
- }
- return symbol(abuf);
- }
- else {
- symbol s(buf);
- a_delete buf;
- return s;
- }
-}
-
-static symbol read_escape_name()
-{
- int c = get_char_for_escape_name();
- if (c == 0)
- return NULL_SYMBOL;
- if (c == '(')
- return read_two_char_escape_name();
- if (c == '[' && !compatible_flag)
- return read_long_escape_name();
- char buf[2];
- buf[0] = c;
- buf[1] = '\0';
- return symbol(buf);
-}
-
-static symbol read_increment_and_escape_name(int *incp)
-{
- int c = get_char_for_escape_name();
- switch (c) {
- case 0:
- *incp = 0;
- return NULL_SYMBOL;
- case '(':
- *incp = 0;
- return read_two_char_escape_name();
- case '+':
- *incp = 1;
- return read_escape_name();
- case '-':
- *incp = -1;
- return read_escape_name();
- case '[':
- if (!compatible_flag) {
- *incp = 0;
- return read_long_escape_name();
- }
- break;
- }
- *incp = 0;
- char buf[2];
- buf[0] = c;
- buf[1] = '\0';
- return symbol(buf);
-}
-
-static int get_copy(node **nd, int defining)
-{
- for (;;) {
- int c = input_stack::get(nd);
- if (c == ESCAPE_NEWLINE) {
- if (defining)
- return c;
- do {
- c = input_stack::get(nd);
- } while (c == ESCAPE_NEWLINE);
- }
- if (c != escape_char || escape_char <= 0)
- return c;
- c = input_stack::peek();
- switch(c) {
- case 0:
- return escape_char;
- case '"':
- (void)input_stack::get(NULL);
- while ((c = input_stack::get(NULL)) != '\n' && c != EOF)
- ;
- return c;
- case '#': // Like \" but newline is ignored.
- (void)input_stack::get(NULL);
- while ((c = input_stack::get(NULL)) != '\n')
- if (c == EOF)
- return EOF;
- break;
- case '$':
- {
- (void)input_stack::get(NULL);
- symbol s = read_escape_name();
- if (!s.is_null())
- interpolate_arg(s);
- break;
- }
- case '*':
- {
- (void)input_stack::get(NULL);
- symbol s = read_escape_name();
- if (!s.is_null())
- interpolate_string(s);
- break;
- }
- case 'a':
- (void)input_stack::get(NULL);
- return '\001';
- case 'e':
- (void)input_stack::get(NULL);
- return ESCAPE_e;
- case 'E':
- (void)input_stack::get(NULL);
- return ESCAPE_E;
- case 'n':
- {
- (void)input_stack::get(NULL);
- int inc;
- symbol s = read_increment_and_escape_name(&inc);
- if (!s.is_null())
- interpolate_number_reg(s, inc);
- break;
- }
- case 'g':
- {
- (void)input_stack::get(NULL);
- symbol s = read_escape_name();
- if (!s.is_null())
- interpolate_number_format(s);
- break;
- }
- case 't':
- (void)input_stack::get(NULL);
- return '\t';
- case 'V':
- {
- (void)input_stack::get(NULL);
- symbol s = read_escape_name();
- if (!s.is_null())
- interpolate_environment_variable(s);
- break;
- }
- case '\n':
- (void)input_stack::get(NULL);
- if (defining)
- return ESCAPE_NEWLINE;
- break;
- case ' ':
- (void)input_stack::get(NULL);
- return ESCAPE_SPACE;
- case '~':
- (void)input_stack::get(NULL);
- return ESCAPE_TILDE;
- case ':':
- (void)input_stack::get(NULL);
- return ESCAPE_COLON;
- case '|':
- (void)input_stack::get(NULL);
- return ESCAPE_BAR;
- case '^':
- (void)input_stack::get(NULL);
- return ESCAPE_CIRCUMFLEX;
- case '{':
- (void)input_stack::get(NULL);
- return ESCAPE_LEFT_BRACE;
- case '}':
- (void)input_stack::get(NULL);
- return ESCAPE_RIGHT_BRACE;
- case '`':
- (void)input_stack::get(NULL);
- return ESCAPE_LEFT_QUOTE;
- case '\'':
- (void)input_stack::get(NULL);
- return ESCAPE_RIGHT_QUOTE;
- case '-':
- (void)input_stack::get(NULL);
- return ESCAPE_HYPHEN;
- case '_':
- (void)input_stack::get(NULL);
- return ESCAPE_UNDERSCORE;
- case 'c':
- (void)input_stack::get(NULL);
- return ESCAPE_c;
- case '!':
- (void)input_stack::get(NULL);
- return ESCAPE_BANG;
- case '?':
- (void)input_stack::get(NULL);
- return ESCAPE_QUESTION;
- case '&':
- (void)input_stack::get(NULL);
- return ESCAPE_AMPERSAND;
- case ')':
- (void)input_stack::get(NULL);
- return ESCAPE_RIGHT_PARENTHESIS;
- case '.':
- (void)input_stack::get(NULL);
- return c;
- case '%':
- (void)input_stack::get(NULL);
- return ESCAPE_PERCENT;
- default:
- if (c == escape_char) {
- (void)input_stack::get(NULL);
- return c;
- }
- else
- return escape_char;
- }
- }
-}
-
-class non_interpreted_char_node : public node {
- unsigned char c;
-public:
- non_interpreted_char_node(unsigned char);
- node *copy();
- int interpret(macro *);
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-int non_interpreted_char_node::same(node *nd)
-{
- return c == ((non_interpreted_char_node *)nd)->c;
-}
-
-const char *non_interpreted_char_node::type()
-{
- return "non_interpreted_char_node";
-}
-
-int non_interpreted_char_node::force_tprint()
-{
- return 0;
-}
-
-non_interpreted_char_node::non_interpreted_char_node(unsigned char n) : c(n)
-{
- assert(n != 0);
-}
-
-node *non_interpreted_char_node::copy()
-{
- return new non_interpreted_char_node(c);
-}
-
-int non_interpreted_char_node::interpret(macro *mac)
-{
- mac->append(c);
- return 1;
-}
-
-static void do_width();
-static node *do_non_interpreted();
-static node *do_special();
-static node *do_suppress();
-static void do_register();
-
-static node *do_overstrike()
-{
- token start;
- overstrike_node *on = new overstrike_node;
- start.next();
- tok.next();
- while (tok != start) {
- if (tok.newline() || tok.eof()) {
- warning(WARN_DELIM, "missing closing delimiter");
- break;
- }
- charinfo *ci = tok.get_char(1);
- if (ci) {
- node *n = curenv->make_char_node(ci);
- if (n)
- on->overstrike(n);
- }
- tok.next();
- }
- return on;
-}
-
-static node *do_bracket()
-{
- token start;
- bracket_node *bn = new bracket_node;
- start.next();
- tok.next();
- while (tok != start) {
- if (tok.eof()) {
- warning(WARN_DELIM, "missing closing delimiter");
- break;
- }
- if (tok.newline()) {
- warning(WARN_DELIM, "missing closing delimiter");
- input_stack::push(make_temp_iterator("\n"));
- break;
- }
- charinfo *ci = tok.get_char(1);
- if (ci) {
- node *n = curenv->make_char_node(ci);
- if (n)
- bn->bracket(n);
- }
- tok.next();
- }
- return bn;
-}
-
-static int do_name_test()
-{
- token start;
- start.next();
- int start_level = input_stack::get_level();
- int bad_char = 0;
- int some_char = 0;
- for (;;) {
- tok.next();
- if (tok.newline() || tok.eof()) {
- warning(WARN_DELIM, "missing closing delimiter");
- break;
- }
- if (tok == start
- && (compatible_flag || input_stack::get_level() == start_level))
- break;
- if (!tok.ch())
- bad_char = 1;
- some_char = 1;
- }
- return some_char && !bad_char;
-}
-
-static int do_expr_test()
-{
- token start;
- start.next();
- int start_level = input_stack::get_level();
- if (!start.delimiter(1))
- return 0;
- tok.next();
- // disable all warning and error messages temporarily
- int saved_warning_mask = warning_mask;
- int saved_inhibit_errors = inhibit_errors;
- warning_mask = 0;
- inhibit_errors = 1;
- int dummy;
- int result = get_number_rigidly(&dummy, 'u');
- warning_mask = saved_warning_mask;
- inhibit_errors = saved_inhibit_errors;
- if (tok == start && input_stack::get_level() == start_level)
- return result;
- // ignore everything up to the delimiter in case we aren't right there
- for (;;) {
- tok.next();
- if (tok.newline() || tok.eof()) {
- warning(WARN_DELIM, "missing closing delimiter");
- break;
- }
- if (tok == start && input_stack::get_level() == start_level)
- break;
- }
- return 0;
-}
-
-#if 0
-static node *do_zero_width()
-{
- token start;
- start.next();
- int start_level = input_stack::get_level();
- environment env(curenv);
- environment *oldenv = curenv;
- curenv = &env;
- for (;;) {
- tok.next();
- if (tok.newline() || tok.eof()) {
- error("missing closing delimiter");
- break;
- }
- if (tok == start
- && (compatible_flag || input_stack::get_level() == start_level))
- break;
- tok.process();
- }
- curenv = oldenv;
- node *rev = env.extract_output_line();
- node *n = 0;
- while (rev) {
- node *tem = rev;
- rev = rev->next;
- tem->next = n;
- n = tem;
- }
- return new zero_width_node(n);
-}
-
-#else
-
-// It's undesirable for \Z to change environments, because then
-// \n(.w won't work as expected.
-
-static node *do_zero_width()
-{
- node *rev = new dummy_node;
- token start;
- start.next();
- int start_level = input_stack::get_level();
- for (;;) {
- tok.next();
- if (tok.newline() || tok.eof()) {
- warning(WARN_DELIM, "missing closing delimiter");
- break;
- }
- if (tok == start
- && (compatible_flag || input_stack::get_level() == start_level))
- break;
- if (!tok.add_to_node_list(&rev))
- error("illegal token in argument to \\Z");
- }
- node *n = 0;
- while (rev) {
- node *tem = rev;
- rev = rev->next;
- tem->next = n;
- n = tem;
- }
- return new zero_width_node(n);
-}
-
-#endif
-
-token_node *node::get_token_node()
-{
- return 0;
-}
-
-class token_node : public node {
-public:
- token tk;
- token_node(const token &t);
- node *copy();
- token_node *get_token_node();
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-token_node::token_node(const token &t) : tk(t)
-{
-}
-
-node *token_node::copy()
-{
- return new token_node(tk);
-}
-
-token_node *token_node::get_token_node()
-{
- return this;
-}
-
-int token_node::same(node *nd)
-{
- return tk == ((token_node *)nd)->tk;
-}
-
-const char *token_node::type()
-{
- return "token_node";
-}
-
-int token_node::force_tprint()
-{
- return 0;
-}
-
-token::token() : nd(0), type(TOKEN_EMPTY)
-{
-}
-
-token::~token()
-{
- delete nd;
-}
-
-token::token(const token &t)
-: nm(t.nm), c(t.c), val(t.val), dim(t.dim), type(t.type)
-{
- // Use two statements to work around bug in SGI C++.
- node *tem = t.nd;
- nd = tem ? tem->copy() : 0;
-}
-
-void token::operator=(const token &t)
-{
- delete nd;
- nm = t.nm;
- // Use two statements to work around bug in SGI C++.
- node *tem = t.nd;
- nd = tem ? tem->copy() : 0;
- c = t.c;
- val = t.val;
- dim = t.dim;
- type = t.type;
-}
-
-void token::skip()
-{
- while (space())
- next();
-}
-
-int has_arg()
-{
- while (tok.space())
- tok.next();
- return !tok.newline();
-}
-
-void token::make_space()
-{
- type = TOKEN_SPACE;
-}
-
-void token::make_newline()
-{
- type = TOKEN_NEWLINE;
-}
-
-void token::next()
-{
- if (nd) {
- delete nd;
- nd = 0;
- }
- units x;
- for (;;) {
- node *n;
- int cc = input_stack::get(&n);
- if (cc != escape_char || escape_char == 0) {
- handle_normal_char:
- switch(cc) {
- case EOF:
- type = TOKEN_EOF;
- return;
- case TRANSPARENT_FILE_REQUEST:
- case TITLE_REQUEST:
- case COPY_FILE_REQUEST:
-#ifdef COLUMN
- case VJUSTIFY_REQUEST:
-#endif /* COLUMN */
- type = TOKEN_REQUEST;
- c = cc;
- return;
- case BEGIN_TRAP:
- type = TOKEN_BEGIN_TRAP;
- return;
- case END_TRAP:
- type = TOKEN_END_TRAP;
- return;
- case LAST_PAGE_EJECTOR:
- seen_last_page_ejector = 1;
- // fall through
- case PAGE_EJECTOR:
- type = TOKEN_PAGE_EJECTOR;
- return;
- case ESCAPE_PERCENT:
- ESCAPE_PERCENT:
- type = TOKEN_HYPHEN_INDICATOR;
- return;
- case ESCAPE_SPACE:
- ESCAPE_SPACE:
- type = TOKEN_NODE;
- nd = new space_char_hmotion_node(curenv->get_space_width());
- return;
- case ESCAPE_TILDE:
- ESCAPE_TILDE:
- type = TOKEN_STRETCHABLE_SPACE;
- return;
- case ESCAPE_COLON:
- ESCAPE_COLON:
- type = TOKEN_NODE;
- nd = new space_node(H0);
- nd->freeze_space();
- nd->is_escape_colon();
- return;
- case ESCAPE_e:
- ESCAPE_e:
- type = TOKEN_ESCAPE;
- return;
- case ESCAPE_E:
- goto handle_escape_char;
- case ESCAPE_BAR:
- ESCAPE_BAR:
- type = TOKEN_NODE;
- nd = new hmotion_node(curenv->get_narrow_space_width());
- return;
- case ESCAPE_CIRCUMFLEX:
- ESCAPE_CIRCUMFLEX:
- type = TOKEN_NODE;
- nd = new hmotion_node(curenv->get_half_narrow_space_width());
- return;
- case ESCAPE_NEWLINE:
- break;
- case ESCAPE_LEFT_BRACE:
- ESCAPE_LEFT_BRACE:
- type = TOKEN_LEFT_BRACE;
- return;
- case ESCAPE_RIGHT_BRACE:
- ESCAPE_RIGHT_BRACE:
- type = TOKEN_RIGHT_BRACE;
- return;
- case ESCAPE_LEFT_QUOTE:
- ESCAPE_LEFT_QUOTE:
- type = TOKEN_SPECIAL;
- nm = symbol("ga");
- return;
- case ESCAPE_RIGHT_QUOTE:
- ESCAPE_RIGHT_QUOTE:
- type = TOKEN_SPECIAL;
- nm = symbol("aa");
- return;
- case ESCAPE_HYPHEN:
- ESCAPE_HYPHEN:
- type = TOKEN_SPECIAL;
- nm = symbol("-");
- return;
- case ESCAPE_UNDERSCORE:
- ESCAPE_UNDERSCORE:
- type = TOKEN_SPECIAL;
- nm = symbol("ul");
- return;
- case ESCAPE_c:
- ESCAPE_c:
- type = TOKEN_INTERRUPT;
- return;
- case ESCAPE_BANG:
- ESCAPE_BANG:
- type = TOKEN_TRANSPARENT;
- return;
- case ESCAPE_QUESTION:
- ESCAPE_QUESTION:
- nd = do_non_interpreted();
- if (nd) {
- type = TOKEN_NODE;
- return;
- }
- break;
- case ESCAPE_AMPERSAND:
- ESCAPE_AMPERSAND:
- type = TOKEN_DUMMY;
- return;
- case ESCAPE_RIGHT_PARENTHESIS:
- ESCAPE_RIGHT_PARENTHESIS:
- type = TOKEN_TRANSPARENT_DUMMY;
- return;
- case '\b':
- type = TOKEN_BACKSPACE;
- return;
- case ' ':
- type = TOKEN_SPACE;
- return;
- case '\t':
- type = TOKEN_TAB;
- return;
- case '\n':
- type = TOKEN_NEWLINE;
- return;
- case '\001':
- type = TOKEN_LEADER;
- return;
- case 0:
- {
- assert(n != 0);
- token_node *tn = n->get_token_node();
- if (tn) {
- *this = tn->tk;
- delete tn;
- }
- else {
- nd = n;
- type = TOKEN_NODE;
- }
- }
- return;
- default:
- type = TOKEN_CHAR;
- c = cc;
- return;
- }
- }
- else {
- handle_escape_char:
- cc = input_stack::get(NULL);
- switch(cc) {
- case '(':
- nm = read_two_char_escape_name();
- type = TOKEN_SPECIAL;
- return;
- case EOF:
- type = TOKEN_EOF;
- error("end of input after escape character");
- return;
- case '`':
- goto ESCAPE_LEFT_QUOTE;
- case '\'':
- goto ESCAPE_RIGHT_QUOTE;
- case '-':
- goto ESCAPE_HYPHEN;
- case '_':
- goto ESCAPE_UNDERSCORE;
- case '%':
- goto ESCAPE_PERCENT;
- case ' ':
- goto ESCAPE_SPACE;
- case '0':
- nd = new hmotion_node(curenv->get_digit_width());
- type = TOKEN_NODE;
- return;
- case '|':
- goto ESCAPE_BAR;
- case '^':
- goto ESCAPE_CIRCUMFLEX;
- case '/':
- type = TOKEN_ITALIC_CORRECTION;
- return;
- case ',':
- type = TOKEN_NODE;
- nd = new left_italic_corrected_node;
- return;
- case '&':
- goto ESCAPE_AMPERSAND;
- case ')':
- goto ESCAPE_RIGHT_PARENTHESIS;
- case '!':
- goto ESCAPE_BANG;
- case '?':
- goto ESCAPE_QUESTION;
- case '~':
- goto ESCAPE_TILDE;
- case ':':
- goto ESCAPE_COLON;
- case '"':
- while ((cc = input_stack::get(NULL)) != '\n' && cc != EOF)
- ;
- if (cc == '\n')
- type = TOKEN_NEWLINE;
- else
- type = TOKEN_EOF;
- return;
- case '#': // Like \" but newline is ignored.
- while ((cc = input_stack::get(NULL)) != '\n')
- if (cc == EOF) {
- type = TOKEN_EOF;
- return;
- }
- break;
- case '$':
- {
- symbol nm = read_escape_name();
- if (!nm.is_null())
- interpolate_arg(nm);
- break;
- }
- case '*':
- {
- symbol nm = read_escape_name();
- if (!nm.is_null())
- interpolate_string(nm);
- break;
- }
- case 'a':
- nd = new non_interpreted_char_node('\001');
- type = TOKEN_NODE;
- return;
- case 'A':
- c = '0' + do_name_test();
- type = TOKEN_CHAR;
- return;
- case 'b':
- nd = do_bracket();
- type = TOKEN_NODE;
- return;
- case 'B':
- c = '0' + do_expr_test();
- type = TOKEN_CHAR;
- return;
- case 'c':
- goto ESCAPE_c;
- case 'C':
- nm = get_delim_name();
- if (nm.is_null())
- break;
- type = TOKEN_SPECIAL;
- return;
- case 'd':
- type = TOKEN_NODE;
- nd = new vmotion_node(curenv->get_size()/2);
- return;
- case 'D':
- nd = read_draw_node();
- if (!nd)
- break;
- type = TOKEN_NODE;
- return;
- case 'e':
- goto ESCAPE_e;
- case 'E':
- goto handle_escape_char;
- case 'f':
- {
- symbol s = read_escape_name();
- if (s.is_null())
- break;
- const char *p;
- for (p = s.contents(); *p != '\0'; p++)
- if (!csdigit(*p))
- break;
- if (*p)
- curenv->set_font(s);
- else
- curenv->set_font(atoi(s.contents()));
- break;
- }
- case 'g':
- {
- symbol s = read_escape_name();
- if (!s.is_null())
- interpolate_number_format(s);
- break;
- }
- case 'h':
- if (!get_delim_number(&x, 'm'))
- break;
- type = TOKEN_NODE;
- nd = new hmotion_node(x);
- return;
- case 'H':
- if (get_delim_number(&x, 'z', curenv->get_requested_point_size()))
- curenv->set_char_height(x);
- break;
- case 'k':
- nm = read_escape_name();
- if (nm.is_null())
- break;
- type = TOKEN_MARK_INPUT;
- return;
- case 'l':
- case 'L':
- {
- charinfo *s = 0;
- if (!get_line_arg(&x, (cc == 'l' ? 'm': 'v'), &s))
- break;
- if (s == 0)
- s = get_charinfo(cc == 'l' ? "ru" : "br");
- type = TOKEN_NODE;
- node *n = curenv->make_char_node(s);
- if (cc == 'l')
- nd = new hline_node(x, n);
- else
- nd = new vline_node(x, n);
- return;
- }
- case 'n':
- {
- int inc;
- symbol nm = read_increment_and_escape_name(&inc);
- if (!nm.is_null())
- interpolate_number_reg(nm, inc);
- break;
- }
- case 'N':
- if (!get_delim_number(&val, 0))
- break;
- type = TOKEN_NUMBERED_CHAR;
- return;
- case 'o':
- nd = do_overstrike();
- type = TOKEN_NODE;
- return;
- case 'O':
- nd = do_suppress();
- if (!nd)
- break;
- type = TOKEN_NODE;
- return;
- case 'p':
- type = TOKEN_SPREAD;
- return;
- case 'r':
- type = TOKEN_NODE;
- nd = new vmotion_node(-curenv->get_size());
- return;
- case 'R':
- do_register();
- break;
- case 's':
- if (read_size(&x))
- curenv->set_size(x);
- break;
- case 'S':
- if (get_delim_number(&x, 0))
- curenv->set_char_slant(x);
- break;
- case 't':
- type = TOKEN_NODE;
- nd = new non_interpreted_char_node('\t');
- return;
- case 'u':
- type = TOKEN_NODE;
- nd = new vmotion_node(-curenv->get_size()/2);
- return;
- case 'v':
- if (!get_delim_number(&x, 'v'))
- break;
- type = TOKEN_NODE;
- nd = new vmotion_node(x);
- return;
- case 'V':
- {
- symbol nm = read_escape_name();
- if (!nm.is_null())
- interpolate_environment_variable(nm);
- break;
- }
- case 'w':
- do_width();
- break;
- case 'x':
- if (!get_delim_number(&x, 'v'))
- break;
- type = TOKEN_NODE;
- nd = new extra_size_node(x);
- return;
- case 'X':
- nd = do_special();
- if (!nd)
- break;
- type = TOKEN_NODE;
- return;
- case 'Y':
- {
- symbol s = read_escape_name();
- if (s.is_null())
- break;
- request_or_macro *p = lookup_request(s);
- macro *m = p->to_macro();
- if (!m) {
- error("can't transparently throughput a request");
- break;
- }
- nd = new special_node(*m);
- type = TOKEN_NODE;
- return;
- }
- case 'z':
- {
- next();
- if (type == TOKEN_NODE)
- nd = new zero_width_node(nd);
- else {
- charinfo *ci = get_char(1);
- if (ci == 0)
- break;
- node *gn = curenv->make_char_node(ci);
- if (gn == 0)
- break;
- nd = new zero_width_node(gn);
- type = TOKEN_NODE;
- }
- return;
- }
- case 'Z':
- nd = do_zero_width();
- if (nd == 0)
- break;
- type = TOKEN_NODE;
- return;
- case '{':
- goto ESCAPE_LEFT_BRACE;
- case '}':
- goto ESCAPE_RIGHT_BRACE;
- case '\n':
- break;
- case '[':
- if (!compatible_flag) {
- nm = read_long_escape_name();
- if (nm.is_null())
- break;
- type = TOKEN_SPECIAL;
- return;
- }
- goto handle_normal_char;
- default:
- if (cc != escape_char && cc != '.')
- warning(WARN_ESCAPE, "escape character ignored before %1",
- input_char_description(cc));
- goto handle_normal_char;
- }
- }
- }
-}
-
-int token::operator==(const token &t)
-{
- if (type != t.type)
- return 0;
- switch(type) {
- case TOKEN_CHAR:
- return c == t.c;
- case TOKEN_SPECIAL:
- return nm == t.nm;
- case TOKEN_NUMBERED_CHAR:
- return val == t.val;
- default:
- return 1;
- }
-}
-
-int token::operator!=(const token &t)
-{
- return !(*this == t);
-}
-
-// is token a suitable delimiter (like ')?
-
-int token::delimiter(int err)
-{
- switch(type) {
- case TOKEN_CHAR:
- switch(c) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case '+':
- case '-':
- case '/':
- case '*':
- case '%':
- case '<':
- case '>':
- case '=':
- case '&':
- case ':':
- case '(':
- case ')':
- case '.':
- if (err)
- error("cannot use character `%1' as a starting delimiter", char(c));
- return 0;
- default:
- return 1;
- }
- case TOKEN_NODE:
- case TOKEN_SPACE:
- case TOKEN_STRETCHABLE_SPACE:
- case TOKEN_TAB:
- case TOKEN_NEWLINE:
- if (err)
- error("cannot use %1 as a starting delimiter", description());
- return 0;
- default:
- return 1;
- }
-}
-
-const char *token::description()
-{
- static char buf[4];
- switch (type) {
- case TOKEN_BACKSPACE:
- return "a backspace character";
- case TOKEN_CHAR:
- buf[0] = '`';
- buf[1] = c;
- buf[2] = '\'';
- buf[3] = '\0';
- return buf;
- case TOKEN_DUMMY:
- return "`\\&'";
- case TOKEN_ESCAPE:
- return "`\\e'";
- case TOKEN_HYPHEN_INDICATOR:
- return "`\\%'";
- case TOKEN_INTERRUPT:
- return "`\\c'";
- case TOKEN_ITALIC_CORRECTION:
- return "`\\/'";
- case TOKEN_LEADER:
- return "a leader character";
- case TOKEN_LEFT_BRACE:
- return "`\\{'";
- case TOKEN_MARK_INPUT:
- return "`\\k'";
- case TOKEN_NEWLINE:
- return "newline";
- case TOKEN_NODE:
- return "a node";
- case TOKEN_NUMBERED_CHAR:
- return "`\\N'";
- case TOKEN_RIGHT_BRACE:
- return "`\\}'";
- case TOKEN_SPACE:
- return "a space";
- case TOKEN_SPECIAL:
- return "a special character";
- case TOKEN_SPREAD:
- return "`\\p'";
- case TOKEN_STRETCHABLE_SPACE:
- return "`\\~'";
- case TOKEN_TAB:
- return "a tab character";
- case TOKEN_TRANSPARENT:
- return "`\\!'";
- case TOKEN_TRANSPARENT_DUMMY:
- return "`\\)'";
- case TOKEN_EOF:
- return "end of input";
- default:
- break;
- }
- return "a magic token";
-}
-
-void skip_line()
-{
- while (!tok.newline())
- if (tok.eof())
- return;
- else
- tok.next();
- tok.next();
-}
-
-void compatible()
-{
- int n;
- if (has_arg() && get_integer(&n))
- compatible_flag = n != 0;
- else
- compatible_flag = 1;
- skip_line();
-}
-
-static void empty_name_warning(int required)
-{
- if (tok.newline() || tok.eof()) {
- if (required)
- warning(WARN_MISSING, "missing name");
- }
- else if (tok.right_brace() || tok.tab()) {
- const char *start = tok.description();
- do {
- tok.next();
- } while (tok.space() || tok.right_brace() || tok.tab());
- if (!tok.newline() && !tok.eof())
- error("%1 is not allowed before an argument", start);
- else if (required)
- warning(WARN_MISSING, "missing name");
- }
- else if (required)
- error("name expected (got %1)", tok.description());
- else
- error("name expected (got %1): treated as missing", tok.description());
-}
-
-static void non_empty_name_warning()
-{
- if (!tok.newline() && !tok.eof() && !tok.space() && !tok.tab()
- && !tok.right_brace()
- // We don't want to give a warning for .el\{
- && !tok.left_brace())
- error("%1 is not allowed in a name", tok.description());
-}
-
-symbol get_name(int required)
-{
- if (compatible_flag) {
- char buf[3];
- tok.skip();
- if ((buf[0] = tok.ch()) != 0) {
- tok.next();
- if ((buf[1] = tok.ch()) != 0) {
- buf[2] = 0;
- tok.make_space();
- }
- else
- non_empty_name_warning();
- return symbol(buf);
- }
- else {
- empty_name_warning(required);
- return NULL_SYMBOL;
- }
- }
- else
- return get_long_name(required);
-}
-
-symbol get_long_name(int required)
-{
- while (tok.space())
- tok.next();
- char abuf[ABUF_SIZE];
- char *buf = abuf;
- int buf_size = ABUF_SIZE;
- int i = 0;
- for (;;) {
- if (i + 1 > buf_size) {
- if (buf == abuf) {
- buf = new char[ABUF_SIZE*2];
- memcpy(buf, abuf, buf_size);
- buf_size = ABUF_SIZE*2;
- }
- else {
- char *old_buf = buf;
- buf = new char[buf_size*2];
- memcpy(buf, old_buf, buf_size);
- buf_size *= 2;
- a_delete old_buf;
- }
- }
- if ((buf[i] = tok.ch()) == 0)
- break;
- i++;
- tok.next();
- }
- if (i == 0) {
- empty_name_warning(required);
- return NULL_SYMBOL;
- }
- non_empty_name_warning();
- if (buf == abuf)
- return symbol(buf);
- else {
- symbol s(buf);
- a_delete buf;
- return s;
- }
-}
-
-void exit_troff()
-{
- exit_started = 1;
- topdiv->set_last_page();
- if (!end_macro_name.is_null()) {
- spring_trap(end_macro_name);
- tok.next();
- process_input_stack();
- }
- curenv->final_break();
- tok.next();
- process_input_stack();
- end_diversions();
- done_end_macro = 1;
- topdiv->set_ejecting();
- static unsigned char buf[2] = { LAST_PAGE_EJECTOR, '\0' };
- input_stack::push(make_temp_iterator((char *)buf));
- topdiv->space(topdiv->get_page_length(), 1);
- tok.next();
- process_input_stack();
- seen_last_page_ejector = 1; // should be set already
- topdiv->set_ejecting();
- push_page_ejector();
- topdiv->space(topdiv->get_page_length(), 1);
- tok.next();
- process_input_stack();
- // This will only happen if a trap-invoked macro starts a diversion,
- // or if vertical position traps have been disabled.
- cleanup_and_exit(0);
-}
-
-// This implements .ex. The input stack must be cleared before calling
-// exit_troff().
-
-void exit_request()
-{
- input_stack::clear();
- if (exit_started)
- tok.next();
- else
- exit_troff();
-}
-
-void return_macro_request()
-{
- input_stack::pop_macro();
- tok.next();
-}
-
-void end_macro()
-{
- end_macro_name = get_name();
- skip_line();
-}
-
-void blank_line_macro()
-{
- blank_line_macro_name = get_name();
- skip_line();
-}
-
-static void trapping_blank_line()
-{
- if (!blank_line_macro_name.is_null())
- spring_trap(blank_line_macro_name);
- else
- blank_line();
-}
-
-void do_request()
-{
- int saved_compatible_flag = compatible_flag;
- compatible_flag = 0;
- symbol nm = get_name();
- if (nm.is_null())
- skip_line();
- else
- interpolate_macro(nm);
- compatible_flag = saved_compatible_flag;
-}
-
-inline int possibly_handle_first_page_transition()
-{
- if (topdiv->before_first_page && curdiv == topdiv && !curenv->is_dummy()) {
- handle_first_page_transition();
- return 1;
- }
- else
- return 0;
-}
-
-static int transparent_translate(int cc)
-{
- if (!illegal_input_char(cc)) {
- charinfo *ci = charset_table[cc];
- switch (ci->get_special_translation(1)) {
- case charinfo::TRANSLATE_SPACE:
- return ' ';
- case charinfo::TRANSLATE_STRETCHABLE_SPACE:
- return ESCAPE_TILDE;
- case charinfo::TRANSLATE_DUMMY:
- return ESCAPE_AMPERSAND;
- case charinfo::TRANSLATE_HYPHEN_INDICATOR:
- return ESCAPE_PERCENT;
- }
- // This is really ugly.
- ci = ci->get_translation(1);
- if (ci) {
- int c = ci->get_ascii_code();
- if (c != '\0')
- return c;
- error("can't translate %1 to special character `%2'"
- " in transparent throughput",
- input_char_description(cc),
- ci->nm.contents());
- }
- }
- return cc;
-}
-
-class int_stack {
- struct int_stack_element {
- int n;
- int_stack_element *next;
- } *top;
-public:
- int_stack();
- ~int_stack();
- void push(int);
- int is_empty();
- int pop();
-};
-
-int_stack::int_stack()
-{
- top = 0;
-}
-
-int_stack::~int_stack()
-{
- while (top != 0) {
- int_stack_element *temp = top;
- top = top->next;
- delete temp;
- }
-}
-
-int int_stack::is_empty()
-{
- return top == 0;
-}
-
-void int_stack::push(int n)
-{
- int_stack_element *p = new int_stack_element;
- p->next = top;
- p->n = n;
- top = p;
-}
-
-int int_stack::pop()
-{
- assert(top != 0);
- int_stack_element *p = top;
- top = top->next;
- int n = p->n;
- delete p;
- return n;
-}
-
-int node::reread(int *)
-{
- return 0;
-}
-
-int diverted_space_node::reread(int *bolp)
-{
- if (curenv->get_fill())
- trapping_blank_line();
- else
- curdiv->space(n);
- *bolp = 1;
- return 1;
-}
-
-int diverted_copy_file_node::reread(int *bolp)
-{
- curdiv->copy_file(filename.contents());
- *bolp = 1;
- return 1;
-}
-
-int word_space_node::reread(int *bolp)
-{
- if (unformat) {
- for (width_list *w = orig_width; w; w = w->next)
- curenv->space(w->width, w->sentence_width);
- unformat = 0;
- return 1;
- }
- return 0;
-}
-
-int unbreakable_space_node::reread(int *)
-{
- return 0;
-}
-
-int hmotion_node::reread(int *bolp)
-{
- if (unformat && was_tab) {
- curenv->handle_tab(0);
- unformat = 0;
- return 1;
- }
- return 0;
-}
-
-void process_input_stack()
-{
- int_stack trap_bol_stack;
- int bol = 1;
- for (;;) {
- int suppress_next = 0;
- switch (tok.type) {
- case token::TOKEN_CHAR:
- {
- unsigned char ch = tok.c;
- if (bol &&
- (ch == curenv->control_char
- || ch == curenv->no_break_control_char)) {
- break_flag = ch == curenv->control_char;
- // skip tabs as well as spaces here
- do {
- tok.next();
- } while (tok.white_space());
- symbol nm = get_name();
- if (nm.is_null())
- skip_line();
- else
- interpolate_macro(nm);
- suppress_next = 1;
- }
- else {
- if (possibly_handle_first_page_transition())
- ;
- else {
- for (;;) {
- curenv->add_char(charset_table[ch]);
- tok.next();
- if (tok.type != token::TOKEN_CHAR)
- break;
- ch = tok.c;
- }
- suppress_next = 1;
- bol = 0;
- }
- }
- break;
- }
- case token::TOKEN_TRANSPARENT:
- {
- if (bol) {
- if (possibly_handle_first_page_transition())
- ;
- else {
- int cc;
- do {
- node *n;
- cc = get_copy(&n);
- if (cc != EOF)
- if (cc != '\0')
- curdiv->transparent_output(transparent_translate(cc));
- else
- curdiv->transparent_output(n);
- } while (cc != '\n' && cc != EOF);
- if (cc == EOF)
- curdiv->transparent_output('\n');
- }
- }
- break;
- }
- case token::TOKEN_NEWLINE:
- {
- if (bol && !curenv->get_prev_line_interrupted())
- trapping_blank_line();
- else {
- curenv->newline();
- bol = 1;
- }
- break;
- }
- case token::TOKEN_REQUEST:
- {
- int request_code = tok.c;
- tok.next();
- switch (request_code) {
- case TITLE_REQUEST:
- title();
- break;
- case COPY_FILE_REQUEST:
- copy_file();
- break;
- case TRANSPARENT_FILE_REQUEST:
- transparent_file();
- break;
-#ifdef COLUMN
- case VJUSTIFY_REQUEST:
- vjustify();
- break;
-#endif /* COLUMN */
- default:
- assert(0);
- break;
- }
- suppress_next = 1;
- break;
- }
- case token::TOKEN_SPACE:
- {
- if (possibly_handle_first_page_transition())
- ;
- else if (bol && !curenv->get_prev_line_interrupted()) {
- int nspaces = 0;
- do {
- nspaces += tok.nspaces();
- tok.next();
- } while (tok.space());
- if (tok.newline())
- trapping_blank_line();
- else {
- push_token(tok);
- curenv->do_break();
- curenv->add_node(new hmotion_node(curenv->get_space_width()
- * nspaces));
- bol = 0;
- }
- }
- else {
- curenv->space();
- bol = 0;
- }
- break;
- }
- case token::TOKEN_EOF:
- return;
- case token::TOKEN_NODE:
- {
- if (possibly_handle_first_page_transition())
- ;
- else if (tok.nd->reread(&bol)) {
- delete tok.nd;
- tok.nd = 0;
- }
- else {
- curenv->add_node(tok.nd);
- tok.nd = 0;
- bol = 0;
- curenv->possibly_break_line(1);
- }
- break;
- }
- case token::TOKEN_PAGE_EJECTOR:
- {
- continue_page_eject();
- // I think we just want to preserve bol.
- // bol = 1;
- break;
- }
- case token::TOKEN_BEGIN_TRAP:
- {
- trap_bol_stack.push(bol);
- bol = 1;
- break;
- }
- case token::TOKEN_END_TRAP:
- {
- if (trap_bol_stack.is_empty())
- error("spurious end trap token detected!");
- else
- bol = trap_bol_stack.pop();
-
- /* I'm not totally happy about this. But I can't think of any other
- way to do it. Doing an output_pending_lines() whenever a
- TOKEN_END_TRAP is detected doesn't work: for example,
-
- .wh -1i x
- .de x
- 'bp
- ..
- .wh -.5i y
- .de y
- .tl ''-%-''
- ..
- .br
- .ll .5i
- .sp |\n(.pu-1i-.5v
- a\%very\%very\%long\%word
-
- will print all but the first lines from the word immediately
- after the footer, rather than on the next page. */
-
- if (trap_bol_stack.is_empty())
- curenv->output_pending_lines();
- break;
- }
- default:
- {
- bol = 0;
- tok.process();
- break;
- }
- }
- if (!suppress_next)
- tok.next();
- trap_sprung_flag = 0;
- }
-}
-
-#ifdef WIDOW_CONTROL
-
-void flush_pending_lines()
-{
- while (!tok.newline() && !tok.eof())
- tok.next();
- curenv->output_pending_lines();
- tok.next();
-}
-
-#endif /* WIDOW_CONTROL */
-
-request_or_macro::request_or_macro()
-{
-}
-
-macro *request_or_macro::to_macro()
-{
- return 0;
-}
-
-request::request(REQUEST_FUNCP pp) : p(pp)
-{
-}
-
-void request::invoke(symbol)
-{
- (*p)();
-}
-
-struct char_block {
- enum { SIZE = 128 };
- unsigned char s[SIZE];
- char_block *next;
- char_block();
-};
-
-char_block::char_block()
-: next(0)
-{
-}
-
-class char_list {
-public:
- char_list();
- ~char_list();
- void append(unsigned char);
- int length();
-private:
- unsigned char *ptr;
- int len;
- char_block *head;
- char_block *tail;
- friend class macro_header;
- friend class string_iterator;
-};
-
-char_list::char_list()
-: ptr(0), len(0), head(0), tail(0)
-{
-}
-
-char_list::~char_list()
-{
- while (head != 0) {
- char_block *tem = head;
- head = head->next;
- delete tem;
- }
-}
-
-int char_list::length()
-{
- return len;
-}
-
-void char_list::append(unsigned char c)
-{
- if (tail == 0) {
- head = tail = new char_block;
- ptr = tail->s;
- }
- else {
- if (ptr >= tail->s + char_block::SIZE) {
- tail->next = new char_block;
- tail = tail->next;
- ptr = tail->s;
- }
- }
- *ptr++ = c;
- len++;
-}
-
-class node_list {
- node *head;
- node *tail;
-public:
- node_list();
- ~node_list();
- void append(node *);
- int length();
- node *extract();
-
- friend class macro_header;
- friend class string_iterator;
-};
-
-void node_list::append(node *n)
-{
- if (head == 0) {
- n->next = 0;
- head = tail = n;
- }
- else {
- n->next = 0;
- tail = tail->next = n;
- }
-}
-
-int node_list::length()
-{
- int total = 0;
- for (node *n = head; n != 0; n = n->next)
- ++total;
- return total;
-}
-
-node_list::node_list()
-{
- head = tail = 0;
-}
-
-node *node_list::extract()
-{
- node *temp = head;
- head = tail = 0;
- return temp;
-}
-
-node_list::~node_list()
-{
- delete_node_list(head);
-}
-
-struct macro_header {
-public:
- int count;
- char_list cl;
- node_list nl;
- macro_header() { count = 1; }
- macro_header *copy(int);
-};
-
-macro::~macro()
-{
- if (p != 0 && --(p->count) <= 0)
- delete p;
-}
-
-macro::macro()
-{
- if (!input_stack::get_location(1, &filename, &lineno)) {
- filename = 0;
- lineno = 0;
- }
- length = 0;
- p = 0;
-}
-
-macro::macro(const macro &m)
-: p(m.p), filename(m.filename), lineno(m.lineno), length(m.length)
-{
- if (p != 0)
- p->count++;
-}
-
-macro &macro::operator=(const macro &m)
-{
- // don't assign object
- if (m.p != 0)
- m.p->count++;
- if (p != 0 && --(p->count) <= 0)
- delete p;
- p = m.p;
- filename = m.filename;
- lineno = m.lineno;
- length = m.length;
- return *this;
-}
-
-void macro::append(unsigned char c)
-{
- assert(c != 0);
- if (p == 0)
- p = new macro_header;
- if (p->cl.length() != length) {
- macro_header *tem = p->copy(length);
- if (--(p->count) <= 0)
- delete p;
- p = tem;
- }
- p->cl.append(c);
- ++length;
-}
-
-void macro::append_str(const char *s)
-{
- int i = 0;
-
- if (s) {
- while (s[i] != (char)0) {
- append(s[i]);
- i++;
- }
- }
-}
-
-void macro::append(node *n)
-{
- assert(n != 0);
- if (p == 0)
- p = new macro_header;
- if (p->cl.length() != length) {
- macro_header *tem = p->copy(length);
- if (--(p->count) <= 0)
- delete p;
- p = tem;
- }
- p->cl.append(0);
- p->nl.append(n);
- ++length;
-}
-
-void macro::append_unsigned(unsigned int i)
-{
- unsigned int j = i / 10;
- if (j != 0)
- append_unsigned(j);
- append(((unsigned char)(((int)'0') + i % 10)));
-}
-
-void macro::append_int(int i)
-{
- if (i < 0) {
- append('-');
- i = -i;
- }
- append_unsigned((unsigned int)i);
-}
-
-void macro::print_size()
-{
- errprint("%1", length);
-}
-
-// make a copy of the first n bytes
-
-macro_header *macro_header::copy(int n)
-{
- macro_header *p = new macro_header;
- char_block *bp = cl.head;
- unsigned char *ptr = bp->s;
- node *nd = nl.head;
- while (--n >= 0) {
- if (ptr >= bp->s + char_block::SIZE) {
- bp = bp->next;
- ptr = bp->s;
- }
- int c = *ptr++;
- p->cl.append(c);
- if (c == 0) {
- p->nl.append(nd->copy());
- nd = nd->next;
- }
- }
- return p;
-}
-
-void print_macros()
-{
- object_dictionary_iterator iter(request_dictionary);
- request_or_macro *rm;
- symbol s;
- while (iter.get(&s, (object **)&rm)) {
- assert(!s.is_null());
- macro *m = rm->to_macro();
- if (m) {
- errprint("%1\t", s.contents());
- m->print_size();
- errprint("\n");
- }
- }
- fflush(stderr);
- skip_line();
-}
-
-class string_iterator : public input_iterator {
- macro mac;
- const char *how_invoked;
- int newline_flag;
- int lineno;
- char_block *bp;
- int count; // of characters remaining
- node *nd;
-protected:
- symbol nm;
- string_iterator();
-public:
- string_iterator(const macro &m, const char *p = 0, symbol s = NULL_SYMBOL);
- int fill(node **);
- int peek();
- int get_location(int, const char **, int *);
- void backtrace();
-};
-
-string_iterator::string_iterator(const macro &m, const char *p, symbol s)
-: mac(m), how_invoked(p), newline_flag(0), lineno(1), nm(s)
-{
- count = mac.length;
- if (count != 0) {
- bp = mac.p->cl.head;
- nd = mac.p->nl.head;
- ptr = eptr = bp->s;
- }
- else {
- bp = 0;
- nd = 0;
- ptr = eptr = 0;
- }
-}
-
-string_iterator::string_iterator()
-{
- bp = 0;
- nd = 0;
- ptr = eptr = 0;
- newline_flag = 0;
- how_invoked = 0;
- lineno = 1;
- count = 0;
-}
-
-int string_iterator::fill(node **np)
-{
- if (newline_flag)
- lineno++;
- newline_flag = 0;
- if (count <= 0)
- return EOF;
- const unsigned char *p = eptr;
- if (p >= bp->s + char_block::SIZE) {
- bp = bp->next;
- p = bp->s;
- }
- if (*p == '\0') {
- if (np)
- *np = nd->copy();
- nd = nd->next;
- eptr = ptr = p + 1;
- count--;
- return 0;
- }
- const unsigned char *e = bp->s + char_block::SIZE;
- if (e - p > count)
- e = p + count;
- ptr = p;
- while (p < e) {
- unsigned char c = *p;
- if (c == '\n' || c == ESCAPE_NEWLINE) {
- newline_flag = 1;
- p++;
- break;
- }
- if (c == '\0')
- break;
- p++;
- }
- eptr = p;
- count -= p - ptr;
- return *ptr++;
-}
-
-int string_iterator::peek()
-{
- if (count <= 0)
- return EOF;
- const unsigned char *p = eptr;
- if (count <= 0)
- return EOF;
- if (p >= bp->s + char_block::SIZE) {
- p = bp->next->s;
- }
- return *p;
-}
-
-int string_iterator::get_location(int allow_macro,
- const char **filep, int *linep)
-{
- if (!allow_macro)
- return 0;
- if (mac.filename == 0)
- return 0;
- *filep = mac.filename;
- *linep = mac.lineno + lineno - 1;
- return 1;
-}
-
-void string_iterator::backtrace()
-{
- if (mac.filename) {
- errprint("%1:%2: backtrace", mac.filename, mac.lineno + lineno - 1);
- if (how_invoked) {
- if (!nm.is_null())
- errprint(": %1 `%2'\n", how_invoked, nm.contents());
- else
- errprint(": %1\n", how_invoked);
- }
- else
- errprint("\n");
- }
-}
-
-class temp_iterator : public input_iterator {
- unsigned char *base;
- temp_iterator(const char *, int len);
-public:
- ~temp_iterator();
- friend input_iterator *make_temp_iterator(const char *);
-};
-
-#ifdef __GNUG__
-inline
-#endif
-temp_iterator::temp_iterator(const char *s, int len)
-{
- base = new unsigned char[len];
- memcpy(base, s, len);
- ptr = base;
- eptr = base + len;
-}
-
-temp_iterator::~temp_iterator()
-{
- a_delete base;
-}
-
-class small_temp_iterator : public input_iterator {
-private:
- small_temp_iterator(const char *, int);
- ~small_temp_iterator();
- enum { BLOCK = 16 };
- static small_temp_iterator *free_list;
- void *operator new(size_t);
- void operator delete(void *);
- enum { SIZE = 12 };
- unsigned char buf[SIZE];
- friend input_iterator *make_temp_iterator(const char *);
-};
-
-small_temp_iterator *small_temp_iterator::free_list = 0;
-
-void *small_temp_iterator::operator new(size_t n)
-{
- assert(n == sizeof(small_temp_iterator));
- if (!free_list) {
- free_list =
- (small_temp_iterator *)new char[sizeof(small_temp_iterator)*BLOCK];
- for (int i = 0; i < BLOCK - 1; i++)
- free_list[i].next = free_list + i + 1;
- free_list[BLOCK-1].next = 0;
- }
- small_temp_iterator *p = free_list;
- free_list = (small_temp_iterator *)(free_list->next);
- p->next = 0;
- return p;
-}
-
-#ifdef __GNUG__
-inline
-#endif
-void small_temp_iterator::operator delete(void *p)
-{
- if (p) {
- ((small_temp_iterator *)p)->next = free_list;
- free_list = (small_temp_iterator *)p;
- }
-}
-
-small_temp_iterator::~small_temp_iterator()
-{
-}
-
-#ifdef __GNUG__
-inline
-#endif
-small_temp_iterator::small_temp_iterator(const char *s, int len)
-{
- for (int i = 0; i < len; i++)
- buf[i] = s[i];
- ptr = buf;
- eptr = buf + len;
-}
-
-input_iterator *make_temp_iterator(const char *s)
-{
- if (s == 0)
- return new small_temp_iterator(s, 0);
- else {
- int n = strlen(s);
- if (n <= small_temp_iterator::SIZE)
- return new small_temp_iterator(s, n);
- else
- return new temp_iterator(s, n);
- }
-}
-
-// this is used when macros are interpolated using the .macro_name notation
-
-struct arg_list {
- macro mac;
- arg_list *next;
- arg_list(const macro &);
- ~arg_list();
-};
-
-arg_list::arg_list(const macro &m) : mac(m), next(0)
-{
-}
-
-arg_list::~arg_list()
-{
-}
-
-class macro_iterator : public string_iterator {
- arg_list *args;
- int argc;
-public:
- macro_iterator(symbol, macro &, const char *how_invoked = "macro");
- macro_iterator();
- ~macro_iterator();
- int has_args() { return 1; }
- input_iterator *get_arg(int i);
- int nargs() { return argc; }
- void add_arg(const macro &m);
- void shift(int n);
- int is_macro() { return 1; }
-};
-
-input_iterator *macro_iterator::get_arg(int i)
-{
- if (i == 0)
- return make_temp_iterator(nm.contents());
- if (i > 0 && i <= argc) {
- arg_list *p = args;
- for (int j = 1; j < i; j++) {
- assert(p != 0);
- p = p->next;
- }
- return new string_iterator(p->mac);
- }
- else
- return 0;
-}
-
-void macro_iterator::add_arg(const macro &m)
-{
- arg_list **p;
- for (p = &args; *p; p = &((*p)->next))
- ;
- *p = new arg_list(m);
- ++argc;
-}
-
-void macro_iterator::shift(int n)
-{
- while (n > 0 && argc > 0) {
- arg_list *tem = args;
- args = args->next;
- delete tem;
- --argc;
- --n;
- }
-}
-
-// This gets used by eg .if '\?xxx\?''.
-
-int operator==(const macro &m1, const macro &m2)
-{
- if (m1.length != m2.length)
- return 0;
- string_iterator iter1(m1);
- string_iterator iter2(m2);
- int n = m1.length;
- while (--n >= 0) {
- node *nd1 = 0;
- int c1 = iter1.get(&nd1);
- assert(c1 != EOF);
- node *nd2 = 0;
- int c2 = iter2.get(&nd2);
- assert(c2 != EOF);
- if (c1 != c2) {
- if (c1 == 0)
- delete nd1;
- else if (c2 == 0)
- delete nd2;
- return 0;
- }
- if (c1 == 0) {
- assert(nd1 != 0);
- assert(nd2 != 0);
- int are_same = nd1->type() == nd2->type() && nd1->same(nd2);
- delete nd1;
- delete nd2;
- if (!are_same)
- return 0;
- }
- }
- return 1;
-}
-
-static void interpolate_macro(symbol nm)
-{
- request_or_macro *p = (request_or_macro *)request_dictionary.lookup(nm);
- if (p == 0) {
- int warned = 0;
- const char *s = nm.contents();
- if (strlen(s) > 2) {
- request_or_macro *r;
- char buf[3];
- buf[0] = s[0];
- buf[1] = s[1];
- buf[2] = '\0';
- r = (request_or_macro *)request_dictionary.lookup(symbol(buf));
- if (r) {
- macro *m = r->to_macro();
- if (!m || !m->empty())
- warned = warning(WARN_SPACE,
- "`%1' not defined (probable missing space after `%2')",
- nm.contents(), buf);
- }
- }
- if (!warned) {
- warning(WARN_MAC, "`%1' not defined", nm.contents());
- p = new macro;
- request_dictionary.define(nm, p);
- }
- }
- if (p)
- p->invoke(nm);
- else {
- skip_line();
- return;
- }
-}
-
-static void decode_args(macro_iterator *mi)
-{
- if (!tok.newline() && !tok.eof()) {
- node *n;
- int c = get_copy(&n);
- for (;;) {
- while (c == ' ')
- c = get_copy(&n);
- if (c == '\n' || c == EOF)
- break;
- macro arg;
- int quote_input_level = 0;
- int done_tab_warning = 0;
- if (c == '\"') {
- quote_input_level = input_stack::get_level();
- c = get_copy(&n);
- }
- while (c != EOF && c != '\n' && !(c == ' ' && quote_input_level == 0)) {
- if (quote_input_level > 0 && c == '\"'
- && (compatible_flag
- || input_stack::get_level() == quote_input_level)) {
- c = get_copy(&n);
- if (c == '"') {
- arg.append(c);
- c = get_copy(&n);
- }
- else
- break;
- }
- else {
- if (c == 0)
- arg.append(n);
- else {
- if (c == '\t' && quote_input_level == 0 && !done_tab_warning) {
- warning(WARN_TAB, "tab character in unquoted macro argument");
- done_tab_warning = 1;
- }
- arg.append(c);
- }
- c = get_copy(&n);
- }
- }
- mi->add_arg(arg);
- }
- }
-}
-
-void macro::invoke(symbol nm)
-{
- macro_iterator *mi = new macro_iterator(nm, *this);
- decode_args(mi);
- input_stack::push(mi);
- tok.next();
-}
-
-macro *macro::to_macro()
-{
- return this;
-}
-
-int macro::empty()
-{
- return length == 0;
-}
-
-macro_iterator::macro_iterator(symbol s, macro &m, const char *how_invoked)
-: string_iterator(m, how_invoked, s), args(0), argc(0)
-{
-}
-
-macro_iterator::macro_iterator() : args(0), argc(0)
-{
-}
-
-macro_iterator::~macro_iterator()
-{
- while (args != 0) {
- arg_list *tem = args;
- args = args->next;
- delete tem;
- }
-}
-
-int trap_sprung_flag = 0;
-int postpone_traps_flag = 0;
-symbol postponed_trap;
-
-void spring_trap(symbol nm)
-{
- assert(!nm.is_null());
- trap_sprung_flag = 1;
- if (postpone_traps_flag) {
- postponed_trap = nm;
- return;
- }
- static char buf[2] = { BEGIN_TRAP, 0 };
- static char buf2[2] = { END_TRAP, '\0' };
- input_stack::push(make_temp_iterator(buf2));
- request_or_macro *p = lookup_request(nm);
- macro *m = p->to_macro();
- if (m)
- input_stack::push(new macro_iterator(nm, *m, "trap-invoked macro"));
- else
- error("you can't invoke a request with a trap");
- input_stack::push(make_temp_iterator(buf));
-}
-
-void postpone_traps()
-{
- postpone_traps_flag = 1;
-}
-
-int unpostpone_traps()
-{
- postpone_traps_flag = 0;
- if (!postponed_trap.is_null()) {
- spring_trap(postponed_trap);
- postponed_trap = NULL_SYMBOL;
- return 1;
- }
- else
- return 0;
-}
-
-void read_request()
-{
- macro_iterator *mi = new macro_iterator;
- int reading_from_terminal = isatty(fileno(stdin));
- int had_prompt = 0;
- if (!tok.newline() && !tok.eof()) {
- int c = get_copy(NULL);
- while (c == ' ')
- c = get_copy(NULL);
- while (c != EOF && c != '\n' && c != ' ') {
- if (!illegal_input_char(c)) {
- if (reading_from_terminal)
- fputc(c, stderr);
- had_prompt = 1;
- }
- c = get_copy(NULL);
- }
- if (c == ' ') {
- tok.make_space();
- decode_args(mi);
- }
- }
- if (reading_from_terminal) {
- fputc(had_prompt ? ':' : '\a', stderr);
- fflush(stderr);
- }
- input_stack::push(mi);
- macro mac;
- int nl = 0;
- int c;
- while ((c = getchar()) != EOF) {
- if (illegal_input_char(c))
- warning(WARN_INPUT, "illegal input character code %1", int(c));
- else {
- if (c == '\n') {
- if (nl)
- break;
- else
- nl = 1;
- }
- else
- nl = 0;
- mac.append(c);
- }
- }
- if (reading_from_terminal)
- clearerr(stdin);
- input_stack::push(new string_iterator(mac));
- tok.next();
-}
-
-void do_define_string(int append)
-{
- symbol nm;
- node *n;
- int c;
- nm = get_name(1);
- if (nm.is_null()) {
- skip_line();
- return;
- }
- if (tok.newline())
- c = '\n';
- else if (tok.tab())
- c = '\t';
- else if (!tok.space()) {
- error("bad string definition");
- skip_line();
- return;
- }
- else
- c = get_copy(&n);
- while (c == ' ')
- c = get_copy(&n);
- if (c == '"')
- c = get_copy(&n);
- macro mac;
- request_or_macro *rm = (request_or_macro *)request_dictionary.lookup(nm);
- macro *mm = rm ? rm->to_macro() : 0;
- if (append && mm)
- mac = *mm;
- while (c != '\n' && c != EOF) {
- if (c == 0)
- mac.append(n);
- else
- mac.append((unsigned char)c);
- c = get_copy(&n);
- }
- if (!mm) {
- mm = new macro;
- request_dictionary.define(nm, mm);
- }
- *mm = mac;
- tok.next();
-}
-
-void define_string()
-{
- do_define_string(0);
-}
-
-void append_string()
-{
- do_define_string(1);
-}
-
-void define_character()
-{
- node *n;
- int c;
- tok.skip();
- charinfo *ci = tok.get_char(1);
- if (ci == 0) {
- skip_line();
- return;
- }
- tok.next();
- if (tok.newline())
- c = '\n';
- else if (tok.tab())
- c = '\t';
- else if (!tok.space()) {
- error("bad character definition");
- skip_line();
- return;
- }
- else
- c = get_copy(&n);
- while (c == ' ' || c == '\t')
- c = get_copy(&n);
- if (c == '"')
- c = get_copy(&n);
- macro *m = new macro;
- while (c != '\n' && c != EOF) {
- if (c == 0)
- m->append(n);
- else
- m->append((unsigned char)c);
- c = get_copy(&n);
- }
- m = ci->set_macro(m);
- if (m)
- delete m;
- tok.next();
-}
-
-static void remove_character()
-{
- tok.skip();
- while (!tok.newline() && !tok.eof()) {
- if (!tok.space() && !tok.tab()) {
- charinfo *ci = tok.get_char(1);
- if (!ci)
- break;
- macro *m = ci->set_macro(0);
- if (m)
- delete m;
- }
- tok.next();
- }
- skip_line();
-}
-
-static void interpolate_string(symbol nm)
-{
- request_or_macro *p = lookup_request(nm);
- macro *m = p->to_macro();
- if (!m)
- error("you can only invoke a string using \\*");
- else {
- string_iterator *si = new string_iterator(*m, "string", nm);
- input_stack::push(si);
- }
-}
-
-/* This class is used for the implementation of \$@. It is used for
-each of the closing double quotes. It artificially increases the
-input level by 2, so that the closing double quote will appear to have
-the same input level as the opening quote. */
-
-class end_quote_iterator : public input_iterator {
- unsigned char buf[1];
-public:
- end_quote_iterator();
- ~end_quote_iterator() { }
- int internal_level() { return 2; }
-};
-
-end_quote_iterator::end_quote_iterator()
-{
- buf[0] = '"';
- ptr = buf;
- eptr = buf + 1;
-}
-
-static void interpolate_arg(symbol nm)
-{
- const char *s = nm.contents();
- if (!s || *s == '\0')
- copy_mode_error("missing argument name");
- else if (s[1] == 0 && csdigit(s[0]))
- input_stack::push(input_stack::get_arg(s[0] - '0'));
- else if (s[0] == '*' && s[1] == '\0') {
- for (int i = input_stack::nargs(); i > 0; i--) {
- input_stack::push(input_stack::get_arg(i));
- if (i != 1)
- input_stack::push(make_temp_iterator(" "));
- }
- }
- else if (s[0] == '@' && s[1] == '\0') {
- for (int i = input_stack::nargs(); i > 0; i--) {
- input_stack::push(new end_quote_iterator);
- input_stack::push(input_stack::get_arg(i));
- input_stack::push(make_temp_iterator(i == 1 ? "\"" : " \""));
- }
- }
- else {
- const char *p;
- for (p = s; *p && csdigit(*p); p++)
- ;
- if (*p)
- copy_mode_error("bad argument name `%1'", s);
- else
- input_stack::push(input_stack::get_arg(atoi(s)));
- }
-}
-
-void handle_first_page_transition()
-{
- push_token(tok);
- topdiv->begin_page();
-}
-
-// We push back a token by wrapping it up in a token_node, and
-// wrapping that up in a string_iterator.
-
-static void push_token(const token &t)
-{
- macro m;
- m.append(new token_node(t));
- input_stack::push(new string_iterator(m));
-}
-
-void push_page_ejector()
-{
- static char buf[2] = { PAGE_EJECTOR, '\0' };
- input_stack::push(make_temp_iterator(buf));
-}
-
-void handle_initial_request(unsigned char code)
-{
- char buf[2];
- buf[0] = code;
- buf[1] = '\0';
- macro mac;
- mac.append(new token_node(tok));
- input_stack::push(new string_iterator(mac));
- input_stack::push(make_temp_iterator(buf));
- topdiv->begin_page();
- tok.next();
-}
-
-void handle_initial_title()
-{
- handle_initial_request(TITLE_REQUEST);
-}
-
-// this should be local to define_macro, but cfront 1.2 doesn't support that
-static symbol dot_symbol(".");
-
-enum define_mode { DEFINE_NORMAL, DEFINE_APPEND, DEFINE_IGNORE };
-
-void do_define_macro(define_mode mode, int indirect)
-{
- symbol nm, term;
- if (indirect) {
- symbol temp1 = get_name(1);
- if (temp1.is_null()) {
- skip_line();
- return;
- }
- symbol temp2 = get_name();
- input_stack::push(make_temp_iterator("\n"));
- if (!temp2.is_null()) {
- interpolate_string(temp2);
- input_stack::push(make_temp_iterator(" "));
- }
- interpolate_string(temp1);
- input_stack::push(make_temp_iterator(" "));
- tok.next();
- }
- if (mode == DEFINE_NORMAL || mode == DEFINE_APPEND) {
- nm = get_name(1);
- if (nm.is_null()) {
- skip_line();
- return;
- }
- }
- term = get_name(); // the request that terminates the definition
- if (term.is_null())
- term = dot_symbol;
- while (!tok.newline() && !tok.eof())
- tok.next();
- const char *start_filename;
- int start_lineno;
- int have_start_location = input_stack::get_location(0, &start_filename,
- &start_lineno);
- node *n;
- // doing this here makes the line numbers come out right
- int c = get_copy(&n, 1);
- macro mac;
- macro *mm = 0;
- if (mode == DEFINE_NORMAL || mode == DEFINE_APPEND) {
- request_or_macro *rm =
- (request_or_macro *)request_dictionary.lookup(nm);
- if (rm)
- mm = rm->to_macro();
- if (mm && mode == DEFINE_APPEND)
- mac = *mm;
- }
- int bol = 1;
- for (;;) {
- while (c == ESCAPE_NEWLINE) {
- if (mode == DEFINE_NORMAL || mode == DEFINE_APPEND)
- mac.append(c);
- c = get_copy(&n, 1);
- }
- if (bol && c == '.') {
- const char *s = term.contents();
- int d;
- // see if it matches term
- int i;
- for (i = 0; s[i] != 0; i++) {
- d = get_copy(&n);
- if ((unsigned char)s[i] != d)
- break;
- }
- if (s[i] == 0
- && ((i == 2 && compatible_flag)
- || (d = get_copy(&n)) == ' '
- || d == '\n')) { // we found it
- if (d == '\n')
- tok.make_newline();
- else
- tok.make_space();
- if (mode == DEFINE_APPEND || mode == DEFINE_NORMAL) {
- if (!mm) {
- mm = new macro;
- request_dictionary.define(nm, mm);
- }
- *mm = mac;
- }
- if (term != dot_symbol) {
- ignoring = 0;
- interpolate_macro(term);
- }
- else
- skip_line();
- return;
- }
- if (mode == DEFINE_APPEND || mode == DEFINE_NORMAL) {
- mac.append(c);
- for (int j = 0; j < i; j++)
- mac.append(s[j]);
- }
- c = d;
- }
- if (c == EOF) {
- if (mode == DEFINE_NORMAL || mode == DEFINE_APPEND) {
- if (have_start_location)
- error_with_file_and_line(start_filename, start_lineno,
- "end of file while defining macro `%1'",
- nm.contents());
- else
- error("end of file while defining macro `%1'", nm.contents());
- }
- else {
- if (have_start_location)
- error_with_file_and_line(start_filename, start_lineno,
- "end of file while ignoring input lines");
- else
- error("end of file while ignoring input lines");
- }
- tok.next();
- return;
- }
- if (mode == DEFINE_NORMAL || mode == DEFINE_APPEND) {
- if (c == 0)
- mac.append(n);
- else
- mac.append(c);
- }
- bol = (c == '\n');
- c = get_copy(&n, 1);
- }
-}
-
-void define_macro()
-{
- do_define_macro(DEFINE_NORMAL, 0);
-}
-
-void define_indirect_macro()
-{
- do_define_macro(DEFINE_NORMAL, 1);
-}
-
-void append_macro()
-{
- do_define_macro(DEFINE_APPEND, 0);
-}
-
-void ignore()
-{
- ignoring = 1;
- do_define_macro(DEFINE_IGNORE, 0);
- ignoring = 0;
-}
-
-void remove_macro()
-{
- for (;;) {
- symbol s = get_name();
- if (s.is_null())
- break;
- request_dictionary.remove(s);
- }
- skip_line();
-}
-
-void rename_macro()
-{
- symbol s1 = get_name(1);
- if (!s1.is_null()) {
- symbol s2 = get_name(1);
- if (!s2.is_null())
- request_dictionary.rename(s1, s2);
- }
- skip_line();
-}
-
-void alias_macro()
-{
- symbol s1 = get_name(1);
- if (!s1.is_null()) {
- symbol s2 = get_name(1);
- if (!s2.is_null()) {
- if (!request_dictionary.alias(s1, s2))
- warning(WARN_MAC, "`%1' not defined", s2.contents());
- }
- }
- skip_line();
-}
-
-void chop_macro()
-{
- symbol s = get_name(1);
- if (!s.is_null()) {
- request_or_macro *p = lookup_request(s);
- macro *m = p->to_macro();
- if (!m)
- error("cannot chop request");
- else if (m->length == 0)
- error("cannot chop empty macro");
- else
- m->length -= 1;
- }
- skip_line();
-}
-
-void substring_macro()
-{
- int start;
- symbol s = get_name(1);
- if (!s.is_null() && get_integer(&start)) {
- request_or_macro *p = lookup_request(s);
- macro *m = p->to_macro();
- if (!m)
- error("cannot substring request");
- else {
- if (start <= 0)
- start += m->length;
- else
- start--;
- int end = 0;
- if (!has_arg() || get_integer(&end)) {
- if (end <= 0)
- end += m->length;
- else
- end--;
- if (start > end) {
- int tem = start;
- start = end;
- end = tem;
- }
- if (start >= m->length || start == end) {
- m->length = 0;
- if (m->p) {
- if (--(m->p->count) <= 0)
- delete m->p;
- m->p = 0;
- }
- }
- else if (start == 0)
- m->length = end;
- else {
- string_iterator iter(*m);
- int i;
- for (i = 0; i < start; i++)
- if (iter.get(0) == EOF)
- break;
- macro mac;
- for (; i < end; i++) {
- node *nd;
- int c = iter.get(&nd);
- if (c == EOF)
- break;
- if (c == 0)
- mac.append(nd);
- else
- mac.append((unsigned char)c);
- }
- *m = mac;
- }
- }
- }
- }
- skip_line();
-}
-
-void length_macro()
-{
- symbol ret;
- ret = get_name(1);
- if (ret.is_null()) {
- skip_line();
- return;
- }
- int c;
- node *n;
- if (tok.newline())
- c = '\n';
- else if (tok.tab())
- c = '\t';
- else if (!tok.space()) {
- error("bad string definition");
- skip_line();
- return;
- }
- else
- c = get_copy(&n);
- while (c == ' ')
- c = get_copy(&n);
- if (c == '"')
- c = get_copy(&n);
- int len = 0;
- while (c != '\n' && c != EOF) {
- ++len;
- c = get_copy(&n);
- }
- tok.next();
- reg *r = (reg*)number_reg_dictionary.lookup(ret);
- if (r)
- r->set_value(len);
- else
- set_number_reg(ret, len);
-}
-
-void asciify_macro()
-{
- symbol s = get_name(1);
- if (!s.is_null()) {
- request_or_macro *p = lookup_request(s);
- macro *m = p->to_macro();
- if (!m)
- error("cannot asciify request");
- else {
- macro am;
- string_iterator iter(*m);
- for (;;) {
- node *nd;
- int c = iter.get(&nd);
- if (c == EOF)
- break;
- if (c != 0)
- am.append(c);
- else
- nd->asciify(&am);
- }
- *m = am;
- }
- }
- skip_line();
-}
-
-void unformat_macro()
-{
- symbol s = get_name(1);
- if (!s.is_null()) {
- request_or_macro *p = lookup_request(s);
- macro *m = p->to_macro();
- if (!m)
- error("cannot unformat request");
- else {
- macro am;
- string_iterator iter(*m);
- for (;;) {
- node *nd;
- int c = iter.get(&nd);
- if (c == EOF)
- break;
- if (c != 0)
- am.append(c);
- else {
- if (nd->set_unformat_flag())
- am.append(nd);
- }
- }
- *m = am;
- }
- }
- skip_line();
-}
-
-static void interpolate_environment_variable(symbol nm)
-{
- const char *s = getenv(nm.contents());
- if (s && *s)
- input_stack::push(make_temp_iterator(s));
-}
-
-void interpolate_number_reg(symbol nm, int inc)
-{
- reg *r = lookup_number_reg(nm);
- if (inc < 0)
- r->decrement();
- else if (inc > 0)
- r->increment();
- input_stack::push(make_temp_iterator(r->get_string()));
-}
-
-static void interpolate_number_format(symbol nm)
-{
- reg *r = (reg *)number_reg_dictionary.lookup(nm);
- if (r)
- input_stack::push(make_temp_iterator(r->get_format()));
-}
-
-static int get_delim_number(units *n, int si, int prev_value)
-{
- token start;
- start.next();
- if (start.delimiter(1)) {
- tok.next();
- if (get_number(n, si, prev_value)) {
- if (start != tok)
- warning(WARN_DELIM, "closing delimiter does not match");
- return 1;
- }
- }
- return 0;
-}
-
-static int get_delim_number(units *n, int si)
-{
- token start;
- start.next();
- if (start.delimiter(1)) {
- tok.next();
- if (get_number(n, si)) {
- if (start != tok)
- warning(WARN_DELIM, "closing delimiter does not match");
- return 1;
- }
- }
- return 0;
-}
-
-static int get_line_arg(units *n, int si, charinfo **cp)
-{
- token start;
- start.next();
- if (start.delimiter(1)) {
- tok.next();
- if (get_number(n, si)) {
- if (tok.dummy() || tok.transparent_dummy())
- tok.next();
- if (start != tok) {
- *cp = tok.get_char(1);
- tok.next();
- }
- if (start != tok)
- warning(WARN_DELIM, "closing delimiter does not match");
- return 1;
- }
- }
- return 0;
-}
-
-static int read_size(int *x)
-{
- tok.next();
- int c = tok.ch();
- int inc = 0;
- if (c == '-') {
- inc = -1;
- tok.next();
- c = tok.ch();
- }
- else if (c == '+') {
- inc = 1;
- tok.next();
- c = tok.ch();
- }
- int val;
- int bad = 0;
- if (c == '(') {
- tok.next();
- c = tok.ch();
- if (!inc) {
- // allow an increment either before or after the left parenthesis
- if (c == '-') {
- inc = -1;
- tok.next();
- c = tok.ch();
- }
- else if (c == '+') {
- inc = 1;
- tok.next();
- c = tok.ch();
- }
- }
- if (!csdigit(c))
- bad = 1;
- else {
- val = c - '0';
- tok.next();
- c = tok.ch();
- if (!csdigit(c))
- bad = 1;
- else {
- val = val*10 + (c - '0');
- val *= sizescale;
- }
- }
- }
- else if (csdigit(c)) {
- val = c - '0';
- if (!inc && c != '0' && c < '4') {
- tok.next();
- c = tok.ch();
- if (!csdigit(c))
- bad = 1;
- else
- val = val*10 + (c - '0');
- }
- val *= sizescale;
- }
- else if (!tok.delimiter(1))
- return 0;
- else {
- token start(tok);
- tok.next();
- if (!(inc
- ? get_number(&val, 'z')
- : get_number(&val, 'z', curenv->get_requested_point_size())))
- return 0;
- if (!(start.ch() == '[' && tok.ch() == ']') && start != tok) {
- if (start.ch() == '[')
- error("missing `]'");
- else
- error("missing closing delimiter");
- return 0;
- }
- }
- if (!bad) {
- switch (inc) {
- case 0:
- *x = val;
- break;
- case 1:
- *x = curenv->get_requested_point_size() + val;
- break;
- case -1:
- *x = curenv->get_requested_point_size() - val;
- break;
- default:
- assert(0);
- }
- return 1;
- }
- else {
- error("bad digit in point size");
- return 0;
- }
-}
-
-static symbol get_delim_name()
-{
- token start;
- start.next();
- if (start.eof()) {
- error("end of input at start of delimited name");
- return NULL_SYMBOL;
- }
- if (start.newline()) {
- error("can't delimit name with a newline");
- return NULL_SYMBOL;
- }
- int start_level = input_stack::get_level();
- char abuf[ABUF_SIZE];
- char *buf = abuf;
- int buf_size = ABUF_SIZE;
- int i = 0;
- for (;;) {
- if (i + 1 > buf_size) {
- if (buf == abuf) {
- buf = new char[ABUF_SIZE*2];
- memcpy(buf, abuf, buf_size);
- buf_size = ABUF_SIZE*2;
- }
- else {
- char *old_buf = buf;
- buf = new char[buf_size*2];
- memcpy(buf, old_buf, buf_size);
- buf_size *= 2;
- a_delete old_buf;
- }
- }
- tok.next();
- if (tok == start
- && (compatible_flag || input_stack::get_level() == start_level))
- break;
- if ((buf[i] = tok.ch()) == 0) {
- error("missing delimiter (got %1)", tok.description());
- if (buf != abuf)
- a_delete buf;
- return NULL_SYMBOL;
- }
- i++;
- }
- buf[i] = '\0';
- if (buf == abuf) {
- if (i == 0) {
- error("empty delimited name");
- return NULL_SYMBOL;
- }
- else
- return symbol(buf);
- }
- else {
- symbol s(buf);
- a_delete buf;
- return s;
- }
-}
-
-// Implement \R
-
-static void do_register()
-{
- token start;
- start.next();
- if (!start.delimiter(1))
- return;
- tok.next();
- symbol nm = get_long_name(1);
- if (nm.is_null())
- return;
- while (tok.space())
- tok.next();
- reg *r = (reg *)number_reg_dictionary.lookup(nm);
- int prev_value;
- if (!r || !r->get_value(&prev_value))
- prev_value = 0;
- int val;
- if (!get_number(&val, 'u', prev_value))
- return;
- if (start != tok)
- warning(WARN_DELIM, "closing delimiter does not match");
- if (r)
- r->set_value(val);
- else
- set_number_reg(nm, val);
-}
-
-// this implements the \w escape sequence
-
-static void do_width()
-{
- token start;
- start.next();
- int start_level = input_stack::get_level();
- environment env(curenv);
- environment *oldenv = curenv;
- curenv = &env;
- for (;;) {
- tok.next();
- if (tok.eof()) {
- warning(WARN_DELIM, "missing closing delimiter");
- break;
- }
- if (tok.newline()) {
- warning(WARN_DELIM, "missing closing delimiter");
- input_stack::push(make_temp_iterator("\n"));
- break;
- }
- if (tok == start
- && (compatible_flag || input_stack::get_level() == start_level))
- break;
- tok.process();
- }
- env.wrap_up_tab();
- units x = env.get_input_line_position().to_units();
- input_stack::push(make_temp_iterator(i_to_a(x)));
- env.width_registers();
- curenv = oldenv;
-}
-
-charinfo *page_character;
-
-void set_page_character()
-{
- page_character = get_optional_char();
- skip_line();
-}
-
-static const symbol percent_symbol("%");
-
-void read_title_parts(node **part, hunits *part_width)
-{
- tok.skip();
- if (tok.newline() || tok.eof())
- return;
- token start(tok);
- int start_level = input_stack::get_level();
- tok.next();
- for (int i = 0; i < 3; i++) {
- while (!tok.newline() && !tok.eof()) {
- if (tok == start
- && (compatible_flag || input_stack::get_level() == start_level)) {
- tok.next();
- break;
- }
- if (page_character != 0 && tok.get_char() == page_character)
- interpolate_number_reg(percent_symbol, 0);
- else
- tok.process();
- tok.next();
- }
- curenv->wrap_up_tab();
- part_width[i] = curenv->get_input_line_position();
- part[i] = curenv->extract_output_line();
- }
- while (!tok.newline() && !tok.eof())
- tok.next();
-}
-
-class non_interpreted_node : public node {
- macro mac;
-public:
- non_interpreted_node(const macro &);
- int interpret(macro *);
- node *copy();
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-non_interpreted_node::non_interpreted_node(const macro &m) : mac(m)
-{
-}
-
-int non_interpreted_node::same(node *nd)
-{
- return mac == ((non_interpreted_node *)nd)->mac;
-}
-
-const char *non_interpreted_node::type()
-{
- return "non_interpreted_node";
-}
-
-int non_interpreted_node::force_tprint()
-{
- return 0;
-}
-
-node *non_interpreted_node::copy()
-{
- return new non_interpreted_node(mac);
-}
-
-int non_interpreted_node::interpret(macro *m)
-{
- string_iterator si(mac);
- node *n;
- for (;;) {
- int c = si.get(&n);
- if (c == EOF)
- break;
- if (c == 0)
- m->append(n);
- else
- m->append(c);
- }
- return 1;
-}
-
-static node *do_non_interpreted()
-{
- node *n;
- int c;
- macro mac;
- while ((c = get_copy(&n)) != ESCAPE_QUESTION && c != EOF && c != '\n')
- if (c == 0)
- mac.append(n);
- else
- mac.append(c);
- if (c == EOF || c == '\n') {
- error("missing \\?");
- return 0;
- }
- return new non_interpreted_node(mac);
-}
-
-static void encode_char(macro *mac, char c)
-{
- if (c == '\0') {
- if ((font::use_charnames_in_special) && tok.special()) {
- charinfo *ci = tok.get_char(1);
- const char *s = ci->get_symbol()->contents();
- if (s[0] != (char)0) {
- mac->append('\\');
- mac->append('(');
- int i = 0;
- while (s[i] != (char)0) {
- mac->append(s[i]);
- i++;
- }
- mac->append('\\');
- mac->append(')');
- }
- }
- else {
- error("%1 is illegal within \\X", tok.description());
- }
- }
- else {
- if ((font::use_charnames_in_special) && (c == '\\')) {
- /*
- * add escape escape sequence
- */
- mac->append(c);
- }
- mac->append(c);
- }
-}
-
-node *do_special()
-{
- token start;
- start.next();
- int start_level = input_stack::get_level();
- macro mac;
- for (tok.next();
- tok != start || input_stack::get_level() != start_level;
- tok.next()) {
- if (tok.eof()) {
- warning(WARN_DELIM, "missing closing delimiter");
- return 0;
- }
- if (tok.newline()) {
- input_stack::push(make_temp_iterator("\n"));
- warning(WARN_DELIM, "missing closing delimiter");
- break;
- }
- unsigned char c;
- if (tok.space())
- c = ' ';
- else if (tok.tab())
- c = '\t';
- else if (tok.leader())
- c = '\001';
- else if (tok.backspace())
- c = '\b';
- else
- c = tok.ch();
- encode_char(&mac, c);
- }
- return new special_node(mac);
-}
-
-node *do_suppress()
-{
- tok.next();
- int c = tok.ch();
- switch (c) {
- case '0':
- if (begin_level == 1)
- return new suppress_node(0, 0);
- break;
- case '1':
- if (begin_level == 1)
- return new suppress_node(1, 0);
- break;
- case '2':
- if (begin_level == 1)
- return new suppress_node(1, 1);
- break;
- case '3':
- begin_level++;
- break;
- case '4':
- begin_level--;
- break;
- case '5': {
- symbol filename = get_delim_name();
- if (begin_level == 1)
- return new suppress_node(filename, 'i');
- return 0;
- break;
- }
- default:
- error("`%1' is an invalid argument to \\O", char(c));
- }
- return 0;
-}
-
-void special_node::tprint(troff_output_file *out)
-{
- tprint_start(out);
- string_iterator iter(mac);
- for (;;) {
- int c = iter.get(NULL);
- if (c == EOF)
- break;
- for (const char *s = ::asciify(c); *s; s++)
- tprint_char(out, *s);
- }
- tprint_end(out);
-}
-
-int get_file_line(const char **filename, int *lineno)
-{
- return input_stack::get_location(0, filename, lineno);
-}
-
-void line_file()
-{
- int n;
- if (get_integer(&n)) {
- const char *filename = 0;
- if (has_arg()) {
- symbol s = get_long_name();
- filename = s.contents();
- }
- (void)input_stack::set_location(filename, n-1);
- }
- skip_line();
-}
-
-static int nroff_mode = 0;
-
-static void nroff_request()
-{
- nroff_mode = 1;
- skip_line();
-}
-
-static void troff_request()
-{
- nroff_mode = 0;
- skip_line();
-}
-
-static void skip_alternative()
-{
- int level = 0;
- // ensure that ``.if 0\{'' works as expected
- if (tok.left_brace())
- level++;
- int c;
- for (;;) {
- c = input_stack::get(NULL);
- if (c == EOF)
- break;
- if (c == ESCAPE_LEFT_BRACE)
- ++level;
- else if (c == ESCAPE_RIGHT_BRACE)
- --level;
- else if (c == escape_char && escape_char > 0)
- switch(input_stack::get(NULL)) {
- case '{':
- ++level;
- break;
- case '}':
- --level;
- break;
- case '"':
- while ((c = input_stack::get(NULL)) != '\n' && c != EOF)
- ;
- }
- /*
- Note that the level can properly be < 0, eg
-
- .if 1 \{\
- .if 0 \{\
- .\}\}
-
- So don't give an error message in this case.
- */
- if (level <= 0 && c == '\n')
- break;
- }
- tok.next();
-}
-
-static void begin_alternative()
-{
- while (tok.space() || tok.left_brace())
- tok.next();
-}
-
-void nop_request()
-{
- while (tok.space())
- tok.next();
-}
-
-static int_stack if_else_stack;
-
-int do_if_request()
-{
- int invert = 0;
- while (tok.space())
- tok.next();
- while (tok.ch() == '!') {
- tok.next();
- invert = !invert;
- }
- int result;
- unsigned char c = tok.ch();
- if (c == 't') {
- tok.next();
- result = !nroff_mode;
- }
- else if (c == 'n') {
- tok.next();
- result = nroff_mode;
- }
- else if (c == 'v') {
- tok.next();
- result = 0;
- }
- else if (c == 'o') {
- result = (topdiv->get_page_number() & 1);
- tok.next();
- }
- else if (c == 'e') {
- result = !(topdiv->get_page_number() & 1);
- tok.next();
- }
- else if (c == 'd' || c == 'r') {
- tok.next();
- symbol nm = get_name(1);
- if (nm.is_null()) {
- skip_alternative();
- return 0;
- }
- result = (c == 'd'
- ? request_dictionary.lookup(nm) != 0
- : number_reg_dictionary.lookup(nm) != 0);
- }
- else if (c == 'c') {
- tok.next();
- tok.skip();
- charinfo *ci = tok.get_char(1);
- if (ci == 0) {
- skip_alternative();
- return 0;
- }
- result = character_exists(ci, curenv);
- tok.next();
- }
- else if (tok.space())
- result = 0;
- else if (tok.delimiter()) {
- token delim = tok;
- int delim_level = input_stack::get_level();
- environment env1(curenv);
- environment env2(curenv);
- environment *oldenv = curenv;
- curenv = &env1;
- for (int i = 0; i < 2; i++) {
- for (;;) {
- tok.next();
- if (tok.newline() || tok.eof()) {
- warning(WARN_DELIM, "missing closing delimiter");
- tok.next();
- curenv = oldenv;
- return 0;
- }
- if (tok == delim
- && (compatible_flag || input_stack::get_level() == delim_level))
- break;
- tok.process();
- }
- curenv = &env2;
- }
- node *n1 = env1.extract_output_line();
- node *n2 = env2.extract_output_line();
- result = same_node_list(n1, n2);
- delete_node_list(n1);
- delete_node_list(n2);
- curenv = oldenv;
- tok.next();
- }
- else {
- units n;
- if (!get_number(&n, 'u')) {
- skip_alternative();
- return 0;
- }
- else
- result = n > 0;
- }
- if (invert)
- result = !result;
- if (result)
- begin_alternative();
- else
- skip_alternative();
- return result;
-}
-
-void if_else_request()
-{
- if_else_stack.push(do_if_request());
-}
-
-void if_request()
-{
- do_if_request();
-}
-
-void else_request()
-{
- if (if_else_stack.is_empty()) {
- warning(WARN_EL, "unbalanced .el request");
- skip_alternative();
- }
- else {
- if (if_else_stack.pop())
- skip_alternative();
- else
- begin_alternative();
- }
-}
-
-/*
- * begin - if this is the outermost html_begin request then execute the
- * rest of the line, else skip line
- */
-
-void begin()
-{
- begin_level++;
- if (begin_level == 1)
- begin_alternative();
- else
- skip_alternative();
-}
-
-/*
- * end - if this is the outermost html_end request then execute the
- * rest of the line, else skip line
- */
-
-void end()
-{
- begin_level--;
- if (begin_level == 0)
- begin_alternative();
- else
- skip_alternative();
- if (begin_level < 0)
- begin_level = 0;
-}
-
-/*
- * image - implements the directive `.image {l|r|c|i} filename'
- * which places the filename into a node which is later
- * written out
- *
- * . either as a special in the form of an image tag for -Thtml
- * . or as an image region definition for all other devices
- *
- */
-
-void image()
-{
- if (has_arg()) {
- char position = tok.ch();
- if (!(position == 'l'
- || position == 'r'
- || position == 'c'
- || position == 'i')) {
- error("l, r, c, or i expected (got %1)", tok.description());
- position = 'c';
- }
- tok.next();
- symbol filename = get_long_name(1);
- if (!filename.is_null())
- curenv->add_node(new suppress_node(filename, position));
- }
- skip_line();
-}
-
-static int while_depth = 0;
-static int while_break_flag = 0;
-
-void while_request()
-{
- macro mac;
- int escaped = 0;
- int level = 0;
- mac.append(new token_node(tok));
- for (;;) {
- node *n;
- int c = input_stack::get(&n);
- if (c == EOF)
- break;
- if (c == 0) {
- escaped = 0;
- mac.append(n);
- }
- else if (escaped) {
- if (c == '{')
- level += 1;
- else if (c == '}')
- level -= 1;
- escaped = 0;
- mac.append(c);
- }
- else {
- if (c == ESCAPE_LEFT_BRACE)
- level += 1;
- else if (c == ESCAPE_RIGHT_BRACE)
- level -= 1;
- else if (c == escape_char)
- escaped = 1;
- mac.append(c);
- if (c == '\n' && level <= 0)
- break;
- }
- }
- if (level != 0)
- error("unbalanced \\{ \\}");
- else {
- while_depth++;
- input_stack::add_boundary();
- for (;;) {
- input_stack::push(new string_iterator(mac, "while loop"));
- tok.next();
- if (!do_if_request()) {
- while (input_stack::get(NULL) != EOF)
- ;
- break;
- }
- process_input_stack();
- if (while_break_flag || input_stack::is_return_boundary()) {
- while_break_flag = 0;
- break;
- }
- }
- input_stack::remove_boundary();
- while_depth--;
- }
- tok.next();
-}
-
-void while_break_request()
-{
- if (!while_depth) {
- error("no while loop");
- skip_line();
- }
- else {
- while_break_flag = 1;
- while (input_stack::get(NULL) != EOF)
- ;
- tok.next();
- }
-}
-
-void while_continue_request()
-{
- if (!while_depth) {
- error("no while loop");
- skip_line();
- }
- else {
- while (input_stack::get(NULL) != EOF)
- ;
- tok.next();
- }
-}
-
-// .so
-
-void source()
-{
- symbol nm = get_long_name(1);
- if (nm.is_null())
- skip_line();
- else {
- while (!tok.newline() && !tok.eof())
- tok.next();
- errno = 0;
- FILE *fp = fopen(nm.contents(), "r");
- if (fp)
- input_stack::push(new file_iterator(fp, nm.contents()));
- else
- error("can't open `%1': %2", nm.contents(), strerror(errno));
- tok.next();
- }
-}
-
-// like .so but use popen()
-
-void pipe_source()
-{
- if (safer_flag) {
- error(".pso request not allowed in safer mode");
- skip_line();
- }
- else {
-#ifdef POPEN_MISSING
- error("pipes not available on this system");
- skip_line();
-#else /* not POPEN_MISSING */
- if (tok.newline() || tok.eof())
- error("missing command");
- else {
- int c;
- while ((c = get_copy(NULL)) == ' ' || c == '\t')
- ;
- int buf_size = 24;
- char *buf = new char[buf_size];
- int buf_used = 0;
- for (; c != '\n' && c != EOF; c = get_copy(NULL)) {
- const char *s = asciify(c);
- int slen = strlen(s);
- if (buf_used + slen + 1> buf_size) {
- char *old_buf = buf;
- int old_buf_size = buf_size;
- buf_size *= 2;
- buf = new char[buf_size];
- memcpy(buf, old_buf, old_buf_size);
- a_delete old_buf;
- }
- strcpy(buf + buf_used, s);
- buf_used += slen;
- }
- buf[buf_used] = '\0';
- errno = 0;
- FILE *fp = popen(buf, POPEN_RT);
- if (fp)
- input_stack::push(new file_iterator(fp, symbol(buf).contents(), 1));
- else
- error("can't open pipe to process `%1': %2", buf, strerror(errno));
- a_delete buf;
- }
- tok.next();
-#endif /* not POPEN_MISSING */
- }
-}
-
-// .psbb
-
-static int llx_reg_contents = 0;
-static int lly_reg_contents = 0;
-static int urx_reg_contents = 0;
-static int ury_reg_contents = 0;
-
-struct bounding_box {
- int llx, lly, urx, ury;
-};
-
-/* Parse the argument to a %%BoundingBox comment. Return 1 if it
-contains 4 numbers, 2 if it contains (atend), 0 otherwise. */
-
-int parse_bounding_box(char *p, bounding_box *bb)
-{
- if (sscanf(p, "%d %d %d %d",
- &bb->llx, &bb->lly, &bb->urx, &bb->ury) == 4)
- return 1;
- else {
- /* The Document Structuring Conventions say that the numbers
- should be integers. Unfortunately some broken applications
- get this wrong. */
- double x1, x2, x3, x4;
- if (sscanf(p, "%lf %lf %lf %lf", &x1, &x2, &x3, &x4) == 4) {
- bb->llx = (int)x1;
- bb->lly = (int)x2;
- bb->urx = (int)x3;
- bb->ury = (int)x4;
- return 1;
- }
- else {
- for (; *p == ' ' || *p == '\t'; p++)
- ;
- if (strncmp(p, "(atend)", 7) == 0) {
- return 2;
- }
- }
- }
- bb->llx = bb->lly = bb->urx = bb->ury = 0;
- return 0;
-}
-
-// This version is taken from psrm.cc
-
-#define PS_LINE_MAX 255
-cset white_space("\n\r \t");
-
-int ps_get_line(char *buf, FILE *fp, const char* filename)
-{
- int c = getc(fp);
- if (c == EOF) {
- buf[0] = '\0';
- return 0;
- }
- int i = 0;
- int err = 0;
- while (c != '\r' && c != '\n' && c != EOF) {
- if ((c < 0x1b && !white_space(c)) || c == 0x7f)
- error("illegal input character code %1 in `%2'", int(c), filename);
- else if (i < PS_LINE_MAX)
- buf[i++] = c;
- else if (!err) {
- err = 1;
- error("PostScript file `%1' is non-conforming "
- "because length of line exceeds 255", filename);
- }
- c = getc(fp);
- }
- buf[i++] = '\n';
- buf[i] = '\0';
- if (c == '\r') {
- c = getc(fp);
- if (c != EOF && c != '\n')
- ungetc(c, fp);
- }
- return 1;
-}
-
-inline void assign_registers(int llx, int lly, int urx, int ury)
-{
- llx_reg_contents = llx;
- lly_reg_contents = lly;
- urx_reg_contents = urx;
- ury_reg_contents = ury;
-}
-
-void do_ps_file(FILE *fp, const char* filename)
-{
- bounding_box bb;
- int bb_at_end = 0;
- char buf[PS_LINE_MAX];
- llx_reg_contents = lly_reg_contents =
- urx_reg_contents = ury_reg_contents = 0;
- if (!ps_get_line(buf, fp, filename)) {
- error("`%1' is empty", filename);
- return;
- }
- if (strncmp("%!PS-Adobe-", buf, 11) != 0) {
- error("`%1' is not conforming to the Document Structuring Conventions",
- filename);
- return;
- }
- while (ps_get_line(buf, fp, filename) != 0) {
- if (buf[0] != '%' || buf[1] != '%'
- || strncmp(buf + 2, "EndComments", 11) == 0)
- break;
- if (strncmp(buf + 2, "BoundingBox:", 12) == 0) {
- int res = parse_bounding_box(buf + 14, &bb);
- if (res == 1) {
- assign_registers(bb.llx, bb.lly, bb.urx, bb.ury);
- return;
- } else if (res == 2) {
- bb_at_end = 1;
- break;
- }
- else {
- error("the arguments to the %%%%BoundingBox comment in `%1' are bad",
- filename);
- return;
- }
- }
- }
- if (bb_at_end) {
- long offset;
- int last_try = 0;
- /* in the trailer, the last BoundingBox comment is significant */
- for (offset = 512; !last_try; offset *= 2) {
- int had_trailer = 0;
- int got_bb = 0;
- if (offset > 32768 || fseek(fp, -offset, 2) == -1) {
- last_try = 1;
- if (fseek(fp, 0L, 0) == -1)
- break;
- }
- while (ps_get_line(buf, fp, filename) != 0) {
- if (buf[0] == '%' && buf[1] == '%') {
- if (!had_trailer) {
- if (strncmp(buf + 2, "Trailer", 7) == 0)
- had_trailer = 1;
- }
- else {
- if (strncmp(buf + 2, "BoundingBox:", 12) == 0) {
- int res = parse_bounding_box(buf + 14, &bb);
- if (res == 1)
- got_bb = 1;
- else if (res == 2) {
- error("`(atend)' not allowed in trailer of `%1'", filename);
- return;
- }
- else {
- error("the arguments to the %%%%BoundingBox comment in `%1' are bad",
- filename);
- return;
- }
- }
- }
- }
- }
- if (got_bb) {
- assign_registers(bb.llx, bb.lly, bb.urx, bb.ury);
- return;
- }
- }
- }
- error("%%%%BoundingBox comment not found in `%1'", filename);
-}
-
-void ps_bbox_request()
-{
- symbol nm = get_long_name(1);
- if (nm.is_null())
- skip_line();
- else {
- while (!tok.newline() && !tok.eof())
- tok.next();
- errno = 0;
- // PS files might contain non-printable characters, such as ^Z
- // and CRs not followed by an LF, so open them in binary mode.
- FILE *fp = fopen(nm.contents(), FOPEN_RB);
- if (fp) {
- do_ps_file(fp, nm.contents());
- fclose(fp);
- }
- else
- error("can't open `%1': %2", nm.contents(), strerror(errno));
- tok.next();
- }
-}
-
-const char *asciify(int c)
-{
- static char buf[3];
- buf[0] = escape_char == '\0' ? '\\' : escape_char;
- buf[1] = buf[2] = '\0';
- switch (c) {
- case ESCAPE_QUESTION:
- buf[1] = '?';
- break;
- case ESCAPE_AMPERSAND:
- buf[1] = '&';
- break;
- case ESCAPE_RIGHT_PARENTHESIS:
- buf[1] = ')';
- break;
- case ESCAPE_UNDERSCORE:
- buf[1] = '_';
- break;
- case ESCAPE_BAR:
- buf[1] = '|';
- break;
- case ESCAPE_CIRCUMFLEX:
- buf[1] = '^';
- break;
- case ESCAPE_LEFT_BRACE:
- buf[1] = '{';
- break;
- case ESCAPE_RIGHT_BRACE:
- buf[1] = '}';
- break;
- case ESCAPE_LEFT_QUOTE:
- buf[1] = '`';
- break;
- case ESCAPE_RIGHT_QUOTE:
- buf[1] = '\'';
- break;
- case ESCAPE_HYPHEN:
- buf[1] = '-';
- break;
- case ESCAPE_BANG:
- buf[1] = '!';
- break;
- case ESCAPE_c:
- buf[1] = 'c';
- break;
- case ESCAPE_e:
- buf[1] = 'e';
- break;
- case ESCAPE_E:
- buf[1] = 'E';
- break;
- case ESCAPE_PERCENT:
- buf[1] = '%';
- break;
- case ESCAPE_SPACE:
- buf[1] = ' ';
- break;
- case ESCAPE_TILDE:
- buf[1] = '~';
- break;
- case ESCAPE_COLON:
- buf[1] = ':';
- break;
- default:
- if (illegal_input_char(c))
- buf[0] = '\0';
- else
- buf[0] = c;
- break;
- }
- return buf;
-}
-
-const char *input_char_description(int c)
-{
- switch (c) {
- case '\n':
- return "a newline character";
- case '\b':
- return "a backspace character";
- case '\001':
- return "a leader character";
- case '\t':
- return "a tab character";
- case ' ':
- return "a space character";
- case '\0':
- return "a node";
- }
- static char buf[sizeof("magic character code ") + 1 + INT_DIGITS];
- if (illegal_input_char(c)) {
- const char *s = asciify(c);
- if (*s) {
- buf[0] = '`';
- strcpy(buf + 1, s);
- strcat(buf, "'");
- return buf;
- }
- sprintf(buf, "magic character code %d", c);
- return buf;
- }
- if (csprint(c)) {
- buf[0] = '`';
- buf[1] = c;
- buf[2] = '\'';
- return buf;
- }
- sprintf(buf, "character code %d", c);
- return buf;
-}
-
-// .tm, .tm1, and .tmc
-
-void do_terminal(int newline, int string_like)
-{
- if (!tok.newline() && !tok.eof()) {
- int c;
- for (;;) {
- c = get_copy(NULL);
- if (string_like && c == '"') {
- c = get_copy(NULL);
- break;
- }
- if (c != ' ' && c != '\t')
- break;
- }
- for (; c != '\n' && c != EOF; c = get_copy(NULL))
- fputs(asciify(c), stderr);
- }
- if (newline)
- fputc('\n', stderr);
- fflush(stderr);
- tok.next();
-}
-
-void terminal()
-{
- do_terminal(1, 0);
-}
-
-void terminal1()
-{
- do_terminal(1, 1);
-}
-
-void terminal_continue()
-{
- do_terminal(0, 1);
-}
-
-dictionary stream_dictionary(20);
-
-void do_open(int append)
-{
- symbol stream = get_name(1);
- if (!stream.is_null()) {
- symbol filename = get_long_name(1);
- if (!filename.is_null()) {
- errno = 0;
- FILE *fp = fopen(filename.contents(), append ? "a" : "w");
- if (!fp) {
- error("can't open `%1' for %2: %3",
- filename.contents(),
- append ? "appending" : "writing",
- strerror(errno));
- fp = (FILE *)stream_dictionary.remove(stream);
- }
- else
- fp = (FILE *)stream_dictionary.lookup(stream, fp);
- if (fp)
- fclose(fp);
- }
- }
- skip_line();
-}
-
-void open_request()
-{
- if (safer_flag) {
- error(".open request not allowed in safer mode");
- skip_line();
- }
- else
- do_open(0);
-}
-
-void opena_request()
-{
- if (safer_flag) {
- error(".opena request not allowed in safer mode");
- skip_line();
- }
- else
- do_open(1);
-}
-
-void close_request()
-{
- symbol stream = get_name(1);
- if (!stream.is_null()) {
- FILE *fp = (FILE *)stream_dictionary.remove(stream);
- if (!fp)
- error("no stream named `%1'", stream.contents());
- else
- fclose(fp);
- }
- skip_line();
-}
-
-void write_request()
-{
- symbol stream = get_name(1);
- if (stream.is_null()) {
- skip_line();
- return;
- }
- FILE *fp = (FILE *)stream_dictionary.lookup(stream);
- if (!fp) {
- error("no stream named `%1'", stream.contents());
- skip_line();
- return;
- }
- int c;
- while ((c = get_copy(NULL)) == ' ')
- ;
- if (c == '"')
- c = get_copy(NULL);
- for (; c != '\n' && c != EOF; c = get_copy(NULL))
- fputs(asciify(c), fp);
- fputc('\n', fp);
- fflush(fp);
- tok.next();
-}
-
-void write_macro_request()
-{
- symbol stream = get_name(1);
- if (stream.is_null()) {
- skip_line();
- return;
- }
- FILE *fp = (FILE *)stream_dictionary.lookup(stream);
- if (!fp) {
- error("no stream named `%1'", stream.contents());
- skip_line();
- return;
- }
- symbol s = get_name(1);
- if (s.is_null()) {
- skip_line();
- return;
- }
- request_or_macro *p = lookup_request(s);
- macro *m = p->to_macro();
- if (!m)
- error("cannot write request");
- else {
- string_iterator iter(*m);
- for (;;) {
- int c = iter.get(0);
- if (c == EOF)
- break;
- fputs(asciify(c), fp);
- }
- fflush(fp);
- }
- skip_line();
-}
-
-static void init_charset_table()
-{
- char buf[16];
- strcpy(buf, "char");
- for (int i = 0; i < 256; i++) {
- strcpy(buf + 4, i_to_a(i));
- charset_table[i] = get_charinfo(symbol(buf));
- charset_table[i]->set_ascii_code(i);
- if (csalpha(i))
- charset_table[i]->set_hyphenation_code(cmlower(i));
- }
- charset_table['.']->set_flags(charinfo::ENDS_SENTENCE);
- charset_table['?']->set_flags(charinfo::ENDS_SENTENCE);
- charset_table['!']->set_flags(charinfo::ENDS_SENTENCE);
- charset_table['-']->set_flags(charinfo::BREAK_AFTER);
- charset_table['"']->set_flags(charinfo::TRANSPARENT);
- charset_table['\'']->set_flags(charinfo::TRANSPARENT);
- charset_table[')']->set_flags(charinfo::TRANSPARENT);
- charset_table[']']->set_flags(charinfo::TRANSPARENT);
- charset_table['*']->set_flags(charinfo::TRANSPARENT);
- get_charinfo(symbol("dg"))->set_flags(charinfo::TRANSPARENT);
- get_charinfo(symbol("rq"))->set_flags(charinfo::TRANSPARENT);
- get_charinfo(symbol("em"))->set_flags(charinfo::BREAK_AFTER);
- get_charinfo(symbol("ul"))->set_flags(charinfo::OVERLAPS_HORIZONTALLY);
- get_charinfo(symbol("rn"))->set_flags(charinfo::OVERLAPS_HORIZONTALLY);
- get_charinfo(symbol("radicalex"))->set_flags(charinfo::OVERLAPS_HORIZONTALLY);
- get_charinfo(symbol("ru"))->set_flags(charinfo::OVERLAPS_HORIZONTALLY);
- get_charinfo(symbol("br"))->set_flags(charinfo::OVERLAPS_VERTICALLY);
- page_character = charset_table['%'];
-}
-
-static void do_translate(int translate_transparent)
-{
- tok.skip();
- while (!tok.newline() && !tok.eof()) {
- if (tok.space()) {
- // This is a really bizarre troff feature.
- tok.next();
- translate_space_to_dummy = tok.dummy();
- if (tok.newline() || tok.eof())
- break;
- tok.next();
- continue;
- }
- charinfo *ci1 = tok.get_char(1);
- if (ci1 == 0)
- break;
- tok.next();
- if (tok.newline() || tok.eof()) {
- ci1->set_special_translation(charinfo::TRANSLATE_SPACE,
- translate_transparent);
- break;
- }
- if (tok.space())
- ci1->set_special_translation(charinfo::TRANSLATE_SPACE,
- translate_transparent);
- else if (tok.stretchable_space())
- ci1->set_special_translation(charinfo::TRANSLATE_STRETCHABLE_SPACE,
- translate_transparent);
- else if (tok.dummy())
- ci1->set_special_translation(charinfo::TRANSLATE_DUMMY,
- translate_transparent);
- else if (tok.hyphen_indicator())
- ci1->set_special_translation(charinfo::TRANSLATE_HYPHEN_INDICATOR,
- translate_transparent);
- else {
- charinfo *ci2 = tok.get_char(1);
- if (ci2 == 0)
- break;
- if (ci1 == ci2)
- ci1->set_translation(0, translate_transparent);
- else
- ci1->set_translation(ci2, translate_transparent);
- }
- tok.next();
- }
- skip_line();
-}
-
-void translate()
-{
- do_translate(1);
-}
-
-void translate_no_transparent()
-{
- do_translate(0);
-}
-
-void char_flags()
-{
- int flags;
- if (get_integer(&flags))
- while (has_arg()) {
- charinfo *ci = tok.get_char(1);
- if (ci) {
- charinfo *tem = ci->get_translation();
- if (tem)
- ci = tem;
- ci->set_flags(flags);
- }
- tok.next();
- }
- skip_line();
-}
-
-void hyphenation_code()
-{
- tok.skip();
- while (!tok.newline() && !tok.eof()) {
- charinfo *ci = tok.get_char(1);
- if (ci == 0)
- break;
- tok.next();
- tok.skip();
- unsigned char c = tok.ch();
- if (c == 0) {
- error("hyphenation code must be ordinary character");
- break;
- }
- if (csdigit(c)) {
- error("hyphenation code cannot be digit");
- break;
- }
- ci->set_hyphenation_code(c);
- tok.next();
- tok.skip();
- }
- skip_line();
-}
-
-charinfo *token::get_char(int required)
-{
- if (type == TOKEN_CHAR)
- return charset_table[c];
- if (type == TOKEN_SPECIAL)
- return get_charinfo(nm);
- if (type == TOKEN_NUMBERED_CHAR)
- return get_charinfo_by_number(val);
- if (type == TOKEN_ESCAPE) {
- if (escape_char != 0)
- return charset_table[escape_char];
- else {
- error("`\\e' used while no current escape character");
- return 0;
- }
- }
- if (required) {
- if (type == TOKEN_EOF || type == TOKEN_NEWLINE)
- warning(WARN_MISSING, "missing normal or special character");
- else
- error("normal or special character expected (got %1)", description());
- }
- return 0;
-}
-
-charinfo *get_optional_char()
-{
- while (tok.space())
- tok.next();
- charinfo *ci = tok.get_char();
- if (!ci)
- check_missing_character();
- else
- tok.next();
- return ci;
-}
-
-void check_missing_character()
-{
- if (!tok.newline() && !tok.eof() && !tok.right_brace() && !tok.tab())
- error("normal or special character expected (got %1): "
- "treated as missing",
- tok.description());
-}
-
-// this is for \Z
-
-int token::add_to_node_list(node **pp)
-{
- hunits w;
- int s;
- node *n = 0;
- switch (type) {
- case TOKEN_CHAR:
- *pp = (*pp)->add_char(charset_table[c], curenv, &w, &s);
- break;
- case TOKEN_DUMMY:
- n = new dummy_node;
- break;
- case TOKEN_ESCAPE:
- if (escape_char != 0)
- *pp = (*pp)->add_char(charset_table[escape_char], curenv, &w, &s);
- break;
- case TOKEN_HYPHEN_INDICATOR:
- *pp = (*pp)->add_discretionary_hyphen();
- break;
- case TOKEN_ITALIC_CORRECTION:
- *pp = (*pp)->add_italic_correction(&w);
- break;
- case TOKEN_LEFT_BRACE:
- break;
- case TOKEN_MARK_INPUT:
- set_number_reg(nm, curenv->get_input_line_position().to_units());
- break;
- case TOKEN_NODE:
- n = nd;
- nd = 0;
- break;
- case TOKEN_NUMBERED_CHAR:
- *pp = (*pp)->add_char(get_charinfo_by_number(val), curenv, &w, &s);
- break;
- case TOKEN_RIGHT_BRACE:
- break;
- case TOKEN_SPACE:
- n = new hmotion_node(curenv->get_space_width());
- break;
- case TOKEN_SPECIAL:
- *pp = (*pp)->add_char(get_charinfo(nm), curenv, &w, &s);
- break;
- case TOKEN_STRETCHABLE_SPACE:
- n = new unbreakable_space_node(curenv->get_space_width());
- break;
- case TOKEN_TRANSPARENT_DUMMY:
- n = new transparent_dummy_node;
- break;
- default:
- return 0;
- }
- if (n) {
- n->next = *pp;
- *pp = n;
- }
- return 1;
-}
-
-void token::process()
-{
- if (possibly_handle_first_page_transition())
- return;
- switch (type) {
- case TOKEN_BACKSPACE:
- curenv->add_node(new hmotion_node(-curenv->get_space_width()));
- break;
- case TOKEN_CHAR:
- curenv->add_char(charset_table[c]);
- break;
- case TOKEN_DUMMY:
- curenv->add_node(new dummy_node);
- break;
- case TOKEN_EMPTY:
- assert(0);
- break;
- case TOKEN_EOF:
- assert(0);
- break;
- case TOKEN_ESCAPE:
- if (escape_char != 0)
- curenv->add_char(charset_table[escape_char]);
- break;
- case TOKEN_BEGIN_TRAP:
- case TOKEN_END_TRAP:
- case TOKEN_PAGE_EJECTOR:
- // these are all handled in process_input_stack()
- break;
- case TOKEN_HYPHEN_INDICATOR:
- curenv->add_hyphen_indicator();
- break;
- case TOKEN_INTERRUPT:
- curenv->interrupt();
- break;
- case TOKEN_ITALIC_CORRECTION:
- curenv->add_italic_correction();
- break;
- case TOKEN_LEADER:
- curenv->handle_tab(1);
- break;
- case TOKEN_LEFT_BRACE:
- break;
- case TOKEN_MARK_INPUT:
- set_number_reg(nm, curenv->get_input_line_position().to_units());
- break;
- case TOKEN_NEWLINE:
- curenv->newline();
- break;
- case TOKEN_NODE:
- curenv->add_node(nd);
- nd = 0;
- break;
- case TOKEN_NUMBERED_CHAR:
- curenv->add_char(get_charinfo_by_number(val));
- break;
- case TOKEN_REQUEST:
- // handled in process_input_stack
- break;
- case TOKEN_RIGHT_BRACE:
- break;
- case TOKEN_SPACE:
- curenv->space();
- break;
- case TOKEN_SPECIAL:
- curenv->add_char(get_charinfo(nm));
- break;
- case TOKEN_SPREAD:
- curenv->spread();
- break;
- case TOKEN_STRETCHABLE_SPACE:
- curenv->add_node(new unbreakable_space_node(curenv->get_space_width()));
- break;
- case TOKEN_TAB:
- curenv->handle_tab(0);
- break;
- case TOKEN_TRANSPARENT:
- break;
- case TOKEN_TRANSPARENT_DUMMY:
- curenv->add_node(new transparent_dummy_node);
- break;
- default:
- assert(0);
- }
-}
-
-class nargs_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *nargs_reg::get_string()
-{
- return i_to_a(input_stack::nargs());
-}
-
-class lineno_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *lineno_reg::get_string()
-{
- int line;
- const char *file;
- if (!input_stack::get_location(0, &file, &line))
- line = 0;
- return i_to_a(line);
-}
-
-class writable_lineno_reg : public general_reg {
-public:
- writable_lineno_reg();
- void set_value(units);
- int get_value(units *);
-};
-
-writable_lineno_reg::writable_lineno_reg()
-{
-}
-
-int writable_lineno_reg::get_value(units *res)
-{
- int line;
- const char *file;
- if (!input_stack::get_location(0, &file, &line))
- return 0;
- *res = line;
- return 1;
-}
-
-void writable_lineno_reg::set_value(units n)
-{
- input_stack::set_location(0, n);
-}
-
-class filename_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *filename_reg::get_string()
-{
- int line;
- const char *file;
- if (input_stack::get_location(0, &file, &line))
- return file;
- else
- return 0;
-}
-
-class constant_reg : public reg {
- const char *s;
-public:
- constant_reg(const char *);
- const char *get_string();
-};
-
-constant_reg::constant_reg(const char *p) : s(p)
-{
-}
-
-const char *constant_reg::get_string()
-{
- return s;
-}
-
-constant_int_reg::constant_int_reg(int *q) : p(q)
-{
-}
-
-const char *constant_int_reg::get_string()
-{
- return i_to_a(*p);
-}
-
-void abort_request()
-{
- int c;
- if (tok.eof())
- c = EOF;
- else if (tok.newline())
- c = '\n';
- else {
- while ((c = get_copy(0)) == ' ')
- ;
- }
- if (c == EOF || c == '\n')
- fputs("User Abort.", stderr);
- else {
- for (; c != '\n' && c != EOF; c = get_copy(NULL))
- fputs(asciify(c), stderr);
- }
- fputc('\n', stderr);
- cleanup_and_exit(1);
-}
-
-char *read_string()
-{
- int len = 256;
- char *s = new char[len];
- int c;
- while ((c = get_copy(0)) == ' ')
- ;
- int i = 0;
- while (c != '\n' && c != EOF) {
- if (!illegal_input_char(c)) {
- if (i + 2 > len) {
- char *tem = s;
- s = new char[len*2];
- memcpy(s, tem, len);
- len *= 2;
- a_delete tem;
- }
- s[i++] = c;
- }
- c = get_copy(0);
- }
- s[i] = '\0';
- tok.next();
- if (i == 0) {
- a_delete s;
- return 0;
- }
- return s;
-}
-
-void pipe_output()
-{
- if (safer_flag) {
- error(".pi request not allowed in safer mode");
- skip_line();
- }
- else {
-#ifdef POPEN_MISSING
- error("pipes not available on this system");
- skip_line();
-#else /* not POPEN_MISSING */
- if (the_output) {
- error("can't pipe: output already started");
- skip_line();
- }
- else {
- if ((pipe_command = read_string()) == 0)
- error("can't pipe to empty command");
- }
-#endif /* not POPEN_MISSING */
- }
-}
-
-static int system_status;
-
-void system_request()
-{
- if (safer_flag) {
- error(".sy request not allowed in safer mode");
- skip_line();
- }
- else {
- char *command = read_string();
- if (!command)
- error("empty command");
- else {
- system_status = system(command);
- a_delete command;
- }
- }
-}
-
-void copy_file()
-{
- if (curdiv == topdiv && topdiv->before_first_page) {
- handle_initial_request(COPY_FILE_REQUEST);
- return;
- }
- symbol filename = get_long_name(1);
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag)
- curenv->do_break();
- if (!filename.is_null())
- curdiv->copy_file(filename.contents());
- tok.next();
-}
-
-#ifdef COLUMN
-
-void vjustify()
-{
- if (curdiv == topdiv && topdiv->before_first_page) {
- handle_initial_request(VJUSTIFY_REQUEST);
- return;
- }
- symbol type = get_long_name(1);
- if (!type.is_null())
- curdiv->vjustify(type);
- skip_line();
-}
-
-#endif /* COLUMN */
-
-void transparent_file()
-{
- if (curdiv == topdiv && topdiv->before_first_page) {
- handle_initial_request(TRANSPARENT_FILE_REQUEST);
- return;
- }
- symbol filename = get_long_name(1);
- while (!tok.newline() && !tok.eof())
- tok.next();
- if (break_flag)
- curenv->do_break();
- if (!filename.is_null()) {
- errno = 0;
- FILE *fp = fopen(filename.contents(), "r");
- if (!fp)
- error("can't open `%1': %2", filename.contents(), strerror(errno));
- else {
- int bol = 1;
- for (;;) {
- int c = getc(fp);
- if (c == EOF)
- break;
- if (illegal_input_char(c))
- warning(WARN_INPUT, "illegal input character code %1", int(c));
- else {
- curdiv->transparent_output(c);
- bol = c == '\n';
- }
- }
- if (!bol)
- curdiv->transparent_output('\n');
- fclose(fp);
- }
- }
- tok.next();
-}
-
-class page_range {
- int first;
- int last;
-public:
- page_range *next;
- page_range(int, int, page_range *);
- int contains(int n);
-};
-
-page_range::page_range(int i, int j, page_range *p)
-: first(i), last(j), next(p)
-{
-}
-
-int page_range::contains(int n)
-{
- return n >= first && (last <= 0 || n <= last);
-}
-
-page_range *output_page_list = 0;
-
-int in_output_page_list(int n)
-{
- if (!output_page_list)
- return 1;
- for (page_range *p = output_page_list; p; p = p->next)
- if (p->contains(n))
- return 1;
- return 0;
-}
-
-static void parse_output_page_list(char *p)
-{
- for (;;) {
- int i;
- if (*p == '-')
- i = 1;
- else if (csdigit(*p)) {
- i = 0;
- do
- i = i*10 + *p++ - '0';
- while (csdigit(*p));
- }
- else
- break;
- int j;
- if (*p == '-') {
- p++;
- j = 0;
- if (csdigit(*p)) {
- do
- j = j*10 + *p++ - '0';
- while (csdigit(*p));
- }
- }
- else
- j = i;
- if (j == 0)
- last_page_number = -1;
- else if (last_page_number >= 0 && j > last_page_number)
- last_page_number = j;
- output_page_list = new page_range(i, j, output_page_list);
- if (*p != ',')
- break;
- ++p;
- }
- if (*p != '\0') {
- error("bad output page list");
- output_page_list = 0;
- }
-}
-
-static FILE *open_mac_file(const char *mac, char **path)
-{
- // Try first FOOBAR.tmac, then tmac.FOOBAR
- char *s1 = new char[strlen(mac)+strlen(MACRO_POSTFIX)+1];
- strcpy(s1, mac);
- strcat(s1, MACRO_POSTFIX);
- FILE *fp = mac_path->open_file(s1, path);
- a_delete s1;
- if (!fp) {
- char *s2 = new char[strlen(mac)+strlen(MACRO_PREFIX)+1];
- strcpy(s2, MACRO_PREFIX);
- strcat(s2, mac);
- fp = mac_path->open_file(s2, path);
- a_delete s2;
- }
- return fp;
-}
-
-static void process_macro_file(const char *mac)
-{
- char *path;
- FILE *fp = open_mac_file(mac, &path);
- if (!fp)
- fatal("can't find macro file %1", mac);
- const char *s = symbol(path).contents();
- a_delete path;
- input_stack::push(new file_iterator(fp, s));
- tok.next();
- process_input_stack();
-}
-
-static void process_startup_file(char *filename)
-{
- char *path;
- search_path *orig_mac_path = mac_path;
- mac_path = &config_macro_path;
- FILE *fp = mac_path->open_file(filename, &path);
- if (fp) {
- input_stack::push(new file_iterator(fp, symbol(path).contents()));
- a_delete path;
- tok.next();
- process_input_stack();
- }
- mac_path = orig_mac_path;
-}
-
-void macro_source()
-{
- symbol nm = get_long_name(1);
- if (nm.is_null())
- skip_line();
- else {
- while (!tok.newline() && !tok.eof())
- tok.next();
- char *path;
- FILE *fp = mac_path->open_file(nm.contents(), &path);
- // .mso doesn't (and cannot) go through open_mac_file, so we
- // need to do it here manually: If we have tmac.FOOBAR, try
- // FOOBAR.tmac and vice versa
- if (!fp) {
- const char *fn = nm.contents();
- if (strncasecmp(fn, MACRO_PREFIX, sizeof(MACRO_PREFIX) - 1) == 0) {
- char *s = new char[strlen(fn) + sizeof(MACRO_POSTFIX)];
- strcpy(s, fn + sizeof(MACRO_PREFIX) - 1);
- strcat(s, MACRO_POSTFIX);
- fp = mac_path->open_file(s, &path);
- a_delete s;
- }
- if (!fp) {
- if (strncasecmp(fn + strlen(fn) - sizeof(MACRO_POSTFIX) + 1,
- MACRO_POSTFIX, sizeof(MACRO_POSTFIX) - 1) == 0) {
- char *s = new char[strlen(fn) + sizeof(MACRO_PREFIX)];
- strcpy(s, MACRO_PREFIX);
- strncat(s, fn, strlen(fn) - sizeof(MACRO_POSTFIX) + 1);
- fp = mac_path->open_file(s, &path);
- a_delete s;
- }
- }
- }
- if (fp) {
- input_stack::push(new file_iterator(fp, symbol(path).contents()));
- a_delete path;
- }
- else
- error("can't find macro file `%1'", nm.contents());
- tok.next();
- }
-}
-
-static void process_input_file(const char *name)
-{
- FILE *fp;
- if (strcmp(name, "-") == 0) {
- clearerr(stdin);
- fp = stdin;
- }
- else {
- errno = 0;
- fp = fopen(name, "r");
- if (!fp)
- fatal("can't open `%1': %2", name, strerror(errno));
- }
- input_stack::push(new file_iterator(fp, name));
- tok.next();
- process_input_stack();
-}
-
-// make sure the_input is empty before calling this
-
-static int evaluate_expression(const char *expr, units *res)
-{
- input_stack::push(make_temp_iterator(expr));
- tok.next();
- int success = get_number(res, 'u');
- while (input_stack::get(NULL) != EOF)
- ;
- return success;
-}
-
-static void do_register_assignment(const char *s)
-{
- const char *p = strchr(s, '=');
- if (!p) {
- char buf[2];
- buf[0] = s[0];
- buf[1] = 0;
- units n;
- if (evaluate_expression(s + 1, &n))
- set_number_reg(buf, n);
- }
- else {
- char *buf = new char[p - s + 1];
- memcpy(buf, s, p - s);
- buf[p - s] = 0;
- units n;
- if (evaluate_expression(p + 1, &n))
- set_number_reg(buf, n);
- a_delete buf;
- }
-}
-
-static void set_string(const char *name, const char *value)
-{
- macro *m = new macro;
- for (const char *p = value; *p; p++)
- if (!illegal_input_char((unsigned char)*p))
- m->append(*p);
- request_dictionary.define(name, m);
-}
-
-static void do_string_assignment(const char *s)
-{
- const char *p = strchr(s, '=');
- if (!p) {
- char buf[2];
- buf[0] = s[0];
- buf[1] = 0;
- set_string(buf, s + 1);
- }
- else {
- char *buf = new char[p - s + 1];
- memcpy(buf, s, p - s);
- buf[p - s] = 0;
- set_string(buf, p + 1);
- a_delete buf;
- }
-}
-
-struct string_list {
- const char *s;
- string_list *next;
- string_list(const char *ss) : s(ss), next(0) {}
-};
-
-static void prepend_string(const char *s, string_list **p)
-{
- string_list *l = new string_list(s);
- l->next = *p;
- *p = l;
-}
-
-static void add_string(const char *s, string_list **p)
-{
- while (*p)
- p = &((*p)->next);
- *p = new string_list(s);
-}
-
-void usage(FILE *stream, const char *prog)
-{
- fprintf(stream,
-"usage: %s -abivzCERU -wname -Wname -dcs -ffam -mname -nnum -olist\n"
-" -rcn -Tname -Fdir -Mdir [files...]\n",
- prog);
-}
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int c;
- string_list *macros = 0;
- string_list *register_assignments = 0;
- string_list *string_assignments = 0;
- int iflag = 0;
- int tflag = 0;
- int fflag = 0;
- int nflag = 0;
- int no_rc = 0; // don't process troffrc and troffrc-end
- int next_page_number;
- opterr = 0;
- hresolution = vresolution = 1;
- // restore $PATH if called from groff
- char* groff_path = getenv("GROFF_PATH__");
- if (groff_path) {
- string e = "PATH";
- e += '=';
- if (*groff_path)
- e += groff_path;
- e += '\0';
- if (putenv(strsave(e.contents())))
- fatal("putenv failed");
- }
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((c = getopt_long(argc, argv, "abivw:W:zCEf:m:n:o:r:d:F:M:T:tqs:RU",
- long_options, NULL))
- != EOF)
- switch(c) {
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU troff (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'T':
- device = optarg;
- tflag = 1;
- is_html = (strcmp(device, "html") == 0);
- break;
- case 'C':
- compatible_flag = 1;
- break;
- case 'M':
- macro_path.command_line_dir(optarg);
- safer_macro_path.command_line_dir(optarg);
- config_macro_path.command_line_dir(optarg);
- break;
- case 'F':
- font::command_line_font_dir(optarg);
- break;
- case 'm':
- add_string(optarg, &macros);
- break;
- case 'E':
- inhibit_errors = 1;
- break;
- case 'R':
- no_rc = 1;
- break;
- case 'w':
- enable_warning(optarg);
- break;
- case 'W':
- disable_warning(optarg);
- break;
- case 'i':
- iflag = 1;
- break;
- case 'b':
- backtrace_flag = 1;
- break;
- case 'a':
- ascii_output_flag = 1;
- break;
- case 'z':
- suppress_output_flag = 1;
- break;
- case 'n':
- if (sscanf(optarg, "%d", &next_page_number) == 1)
- nflag++;
- else
- error("bad page number");
- break;
- case 'o':
- parse_output_page_list(optarg);
- break;
- case 'd':
- if (*optarg == '\0')
- error("`-d' requires non-empty argument");
- else
- add_string(optarg, &string_assignments);
- break;
- case 'r':
- if (*optarg == '\0')
- error("`-r' requires non-empty argument");
- else
- add_string(optarg, &register_assignments);
- break;
- case 'f':
- default_family = symbol(optarg);
- fflag = 1;
- break;
- case 'q':
- case 's':
- case 't':
- // silently ignore these
- break;
- case 'U':
- safer_flag = 0; // unsafe behaviour
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout, argv[0]);
- exit(0);
- break;
- case '?':
- usage(stderr, argv[0]);
- exit(1);
- break; // never reached
- default:
- assert(0);
- }
- if (!safer_flag)
- mac_path = &macro_path;
- set_string(".T", device);
- init_charset_table();
- if (!font::load_desc())
- fatal("sorry, I can't continue");
- units_per_inch = font::res;
- hresolution = font::hor;
- vresolution = font::vert;
- sizescale = font::sizescale;
- tcommand_flag = font::tcommand;
- if (!fflag && font::family != 0 && *font::family != '\0')
- default_family = symbol(font::family);
- font_size::init_size_table(font::sizes);
- int i;
- int j = 1;
- if (font::style_table) {
- for (i = 0; font::style_table[i]; i++)
- mount_style(j++, symbol(font::style_table[i]));
- }
- for (i = 0; font::font_name_table[i]; i++, j++)
- // In the DESC file a font name of 0 (zero) means leave this
- // position empty.
- if (strcmp(font::font_name_table[i], "0") != 0)
- mount_font(j, symbol(font::font_name_table[i]));
- curdiv = topdiv = new top_level_diversion;
- if (nflag)
- topdiv->set_next_page_number(next_page_number);
- init_input_requests();
- init_env_requests();
- init_div_requests();
-#ifdef COLUMN
- init_column_requests();
-#endif /* COLUMN */
- init_node_requests();
- init_markup_requests();
- number_reg_dictionary.define(".T", new constant_reg(tflag ? "1" : "0"));
- init_registers();
- init_reg_requests();
- init_hyphen_requests();
- init_environments();
- while (string_assignments) {
- do_string_assignment(string_assignments->s);
- string_list *tem = string_assignments;
- string_assignments = string_assignments->next;
- delete tem;
- }
- while (register_assignments) {
- do_register_assignment(register_assignments->s);
- string_list *tem = register_assignments;
- register_assignments = register_assignments->next;
- delete tem;
- }
- if (!no_rc)
- process_startup_file(INITIAL_STARTUP_FILE);
- while (macros) {
- process_macro_file(macros->s);
- string_list *tem = macros;
- macros = macros->next;
- delete tem;
- }
- if (!no_rc)
- process_startup_file(FINAL_STARTUP_FILE);
- for (i = optind; i < argc; i++)
- process_input_file(argv[i]);
- if (optind >= argc || iflag)
- process_input_file("-");
- exit_troff();
- return 0; // not reached
-}
-
-void warn_request()
-{
- int n;
- if (has_arg() && get_integer(&n)) {
- if (n & ~WARN_TOTAL) {
- warning(WARN_RANGE, "warning mask must be between 0 and %1", WARN_TOTAL);
- n &= WARN_TOTAL;
- }
- warning_mask = n;
- }
- else
- warning_mask = WARN_TOTAL;
- skip_line();
-}
-
-static void init_registers()
-{
-#ifdef LONG_FOR_TIME_T
- long
-#else /* not LONG_FOR_TIME_T */
- time_t
-#endif /* not LONG_FOR_TIME_T */
- t = time(0);
- // Use struct here to work around misfeature in old versions of g++.
- struct tm *tt = localtime(&t);
- set_number_reg("dw", int(tt->tm_wday + 1));
- set_number_reg("dy", int(tt->tm_mday));
- set_number_reg("mo", int(tt->tm_mon + 1));
- set_number_reg("year", int(1900 + tt->tm_year));
- set_number_reg("yr", int(tt->tm_year));
- set_number_reg("$$", getpid());
- number_reg_dictionary.define(".A",
- new constant_reg(ascii_output_flag
- ? "1"
- : "0"));
-}
-
-/*
- * registers associated with \O
- */
-
-static int output_reg_minx_contents = -1;
-static int output_reg_miny_contents = -1;
-static int output_reg_maxx_contents = -1;
-static int output_reg_maxy_contents = -1;
-
-void check_output_limits(int x, int y)
-{
- if ((output_reg_minx_contents == -1) || (x < output_reg_minx_contents))
- output_reg_minx_contents = x;
- if (x > output_reg_maxx_contents)
- output_reg_maxx_contents = x;
- if ((output_reg_miny_contents == -1) || (y < output_reg_miny_contents))
- output_reg_miny_contents = y;
- if (y > output_reg_maxy_contents)
- output_reg_maxy_contents = y;
-}
-
-void reset_output_registers(int miny)
-{
- // fprintf(stderr, "reset_output_registers\n");
- output_reg_minx_contents = -1;
- output_reg_miny_contents = -1;
- output_reg_maxx_contents = -1;
- output_reg_maxy_contents = -1;
-}
-
-void get_output_registers(int *minx, int *miny, int *maxx, int *maxy)
-{
- *minx = output_reg_minx_contents;
- *miny = output_reg_miny_contents;
- *maxx = output_reg_maxx_contents;
- *maxy = output_reg_maxy_contents;
-}
-
-void init_markup_requests()
-{
- init_request("begin", begin);
- init_request("end", end);
- init_request("image", image);
-}
-
-void init_input_requests()
-{
- init_request("ds", define_string);
- init_request("as", append_string);
- init_request("de", define_macro);
- init_request("dei", define_indirect_macro);
- init_request("am", append_macro);
- init_request("ig", ignore);
- init_request("rm", remove_macro);
- init_request("rn", rename_macro);
- init_request("nop", nop_request);
- init_request("if", if_request);
- init_request("ie", if_else_request);
- init_request("el", else_request);
- init_request("so", source);
- init_request("nx", next_file);
- init_request("pm", print_macros);
- init_request("eo", escape_off);
- init_request("ec", set_escape_char);
- init_request("ecs", save_escape_char);
- init_request("ecr", restore_escape_char);
- init_request("pc", set_page_character);
- init_request("tm", terminal);
- init_request("tm1", terminal1);
- init_request("tmc", terminal_continue);
- init_request("ex", exit_request);
- init_request("return", return_macro_request);
- init_request("em", end_macro);
- init_request("blm", blank_line_macro);
- init_request("tr", translate);
- init_request("trnt", translate_no_transparent);
- init_request("ab", abort_request);
- init_request("pi", pipe_output);
- init_request("cf", copy_file);
- init_request("sy", system_request);
- init_request("lf", line_file);
- init_request("cflags", char_flags);
- init_request("shift", shift);
- init_request("rd", read_request);
- init_request("cp", compatible);
- init_request("char", define_character);
- init_request("rchar", remove_character);
- init_request("hcode", hyphenation_code);
- init_request("while", while_request);
- init_request("break", while_break_request);
- init_request("continue", while_continue_request);
- init_request("als", alias_macro);
- init_request("backtrace", backtrace_request);
- init_request("chop", chop_macro);
- init_request("substring", substring_macro);
- init_request("length", length_macro);
- init_request("asciify", asciify_macro);
- init_request("unformat", unformat_macro);
- init_request("warn", warn_request);
- init_request("open", open_request);
- init_request("opena", opena_request);
- init_request("close", close_request);
- init_request("write", write_request);
- init_request("writem", write_macro_request);
- init_request("trf", transparent_file);
-#ifdef WIDOW_CONTROL
- init_request("fpl", flush_pending_lines);
-#endif /* WIDOW_CONTROL */
- init_request("nroff", nroff_request);
- init_request("troff", troff_request);
-#ifdef COLUMN
- init_request("vj", vjustify);
-#endif /* COLUMN */
- init_request("mso", macro_source);
- init_request("do", do_request);
-#ifndef POPEN_MISSING
- init_request("pso", pipe_source);
-#endif /* not POPEN_MISSING */
- init_request("psbb", ps_bbox_request);
- number_reg_dictionary.define("systat", new variable_reg(&system_status));
- number_reg_dictionary.define("slimit",
- new variable_reg(&input_stack::limit));
- number_reg_dictionary.define(".$", new nargs_reg);
- number_reg_dictionary.define(".c", new lineno_reg);
- number_reg_dictionary.define("c.", new writable_lineno_reg);
- number_reg_dictionary.define(".F", new filename_reg);
- number_reg_dictionary.define(".C", new constant_int_reg(&compatible_flag));
- number_reg_dictionary.define(".H", new constant_int_reg(&hresolution));
- number_reg_dictionary.define(".V", new constant_int_reg(&vresolution));
- number_reg_dictionary.define(".R", new constant_reg("10000"));
- extern const char *major_version;
- number_reg_dictionary.define(".x", new constant_reg(major_version));
- extern const char *minor_version;
- number_reg_dictionary.define(".y", new constant_reg(minor_version));
- extern const char *revision;
- number_reg_dictionary.define(".Y", new constant_reg(revision));
- number_reg_dictionary.define(".g", new constant_reg("1"));
- number_reg_dictionary.define(".warn", new constant_int_reg(&warning_mask));
- number_reg_dictionary.define("llx", new variable_reg(&llx_reg_contents));
- number_reg_dictionary.define("lly", new variable_reg(&lly_reg_contents));
- number_reg_dictionary.define("urx", new variable_reg(&urx_reg_contents));
- number_reg_dictionary.define("ury", new variable_reg(&ury_reg_contents));
- number_reg_dictionary.define("opminx",
- new variable_reg(&output_reg_minx_contents));
- number_reg_dictionary.define("opminy",
- new variable_reg(&output_reg_miny_contents));
- number_reg_dictionary.define("opmaxx",
- new variable_reg(&output_reg_maxx_contents));
- number_reg_dictionary.define("opmaxy",
- new variable_reg(&output_reg_maxy_contents));
-}
-
-object_dictionary request_dictionary(501);
-
-void init_request(const char *s, REQUEST_FUNCP f)
-{
- request_dictionary.define(s, new request(f));
-}
-
-static request_or_macro *lookup_request(symbol nm)
-{
- assert(!nm.is_null());
- request_or_macro *p = (request_or_macro *)request_dictionary.lookup(nm);
- if (p == 0) {
- warning(WARN_MAC, "`%1' not defined", nm.contents());
- p = new macro;
- request_dictionary.define(nm, p);
- }
- return p;
-}
-
-node *charinfo_to_node_list(charinfo *ci, const environment *envp)
-{
- // Don't interpret character definitions in compatible mode.
- int old_compatible_flag = compatible_flag;
- compatible_flag = 0;
- int old_escape_char = escape_char;
- escape_char = '\\';
- macro *mac = ci->set_macro(0);
- assert(mac != 0);
- environment *oldenv = curenv;
- environment env(envp);
- curenv = &env;
- curenv->set_composite();
- token old_tok = tok;
- input_stack::add_boundary();
- string_iterator *si =
- new string_iterator(*mac, "composite character", ci->nm);
- input_stack::push(si);
- // we don't use process_input_stack, because we don't want to recognise
- // requests
- for (;;) {
- tok.next();
- if (tok.eof())
- break;
- if (tok.newline()) {
- error("composite character mustn't contain newline");
- while (!tok.eof())
- tok.next();
- break;
- }
- else
- tok.process();
- }
- node *n = curenv->extract_output_line();
- input_stack::remove_boundary();
- ci->set_macro(mac);
- tok = old_tok;
- curenv = oldenv;
- compatible_flag = old_compatible_flag;
- escape_char = old_escape_char;
- return n;
-}
-
-static node *read_draw_node()
-{
- token start;
- start.next();
- if (!start.delimiter(1)){
- do {
- tok.next();
- } while (tok != start && !tok.newline() && !tok.eof());
- }
- else {
- tok.next();
- if (tok == start)
- error("missing argument");
- else {
- unsigned char type = tok.ch();
- tok.next();
- int maxpoints = 10;
- hvpair *point = new hvpair[maxpoints];
- int npoints = 0;
- int no_last_v = 0;
- int err = 0;
- int i;
- for (i = 0; tok != start; i++) {
- if (i == maxpoints) {
- hvpair *oldpoint = point;
- point = new hvpair[maxpoints*2];
- for (int j = 0; j < maxpoints; j++)
- point[j] = oldpoint[j];
- maxpoints *= 2;
- a_delete oldpoint;
- }
- if (!get_hunits(&point[i].h,
- type == 'f' || type == 't' ? 'u' : 'm')) {
- err = 1;
- break;
- }
- ++npoints;
- tok.skip();
- point[i].v = V0;
- if (tok == start) {
- no_last_v = 1;
- break;
- }
- if (!get_vunits(&point[i].v, 'v')) {
- err = 1;
- break;
- }
- tok.skip();
- }
- while (tok != start && !tok.newline() && !tok.eof())
- tok.next();
- if (!err) {
- switch (type) {
- case 'l':
- if (npoints != 1 || no_last_v) {
- error("two arguments needed for line");
- npoints = 1;
- }
- break;
- case 'c':
- if (npoints != 1 || !no_last_v) {
- error("one argument needed for circle");
- npoints = 1;
- point[0].v = V0;
- }
- break;
- case 'e':
- if (npoints != 1 || no_last_v) {
- error("two arguments needed for ellipse");
- npoints = 1;
- }
- break;
- case 'a':
- if (npoints != 2 || no_last_v) {
- error("four arguments needed for arc");
- npoints = 2;
- }
- break;
- case '~':
- if (no_last_v)
- error("even number of arguments needed for spline");
- break;
- default:
- // silently pass it through
- break;
- }
- draw_node *dn = new draw_node(type, point, npoints,
- curenv->get_font_size());
- a_delete point;
- return dn;
- }
- else {
- a_delete point;
- }
- }
- }
- return 0;
-}
-
-static struct {
- const char *name;
- int mask;
-} warning_table[] = {
- { "char", WARN_CHAR },
- { "range", WARN_RANGE },
- { "break", WARN_BREAK },
- { "delim", WARN_DELIM },
- { "el", WARN_EL },
- { "scale", WARN_SCALE },
- { "number", WARN_NUMBER },
- { "syntax", WARN_SYNTAX },
- { "tab", WARN_TAB },
- { "right-brace", WARN_RIGHT_BRACE },
- { "missing", WARN_MISSING },
- { "input", WARN_INPUT },
- { "escape", WARN_ESCAPE },
- { "space", WARN_SPACE },
- { "font", WARN_FONT },
- { "di", WARN_DI },
- { "mac", WARN_MAC },
- { "reg", WARN_REG },
- { "ig", WARN_IG },
- { "all", WARN_TOTAL & ~(WARN_DI | WARN_MAC | WARN_REG) },
- { "w", WARN_TOTAL },
- { "default", DEFAULT_WARNING_MASK },
-};
-
-static int lookup_warning(const char *name)
-{
- for (int i = 0;
- i < sizeof(warning_table)/sizeof(warning_table[0]);
- i++)
- if (strcmp(name, warning_table[i].name) == 0)
- return warning_table[i].mask;
- return 0;
-}
-
-static void enable_warning(const char *name)
-{
- int mask = lookup_warning(name);
- if (mask)
- warning_mask |= mask;
- else
- error("unknown warning `%1'", name);
-}
-
-static void disable_warning(const char *name)
-{
- int mask = lookup_warning(name);
- if (mask)
- warning_mask &= ~mask;
- else
- error("unknown warning `%1'", name);
-}
-
-static void copy_mode_error(const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- if (ignoring) {
- static const char prefix[] = "(in ignored input) ";
- char *s = new char[sizeof(prefix) + strlen(format)];
- strcpy(s, prefix);
- strcat(s, format);
- warning(WARN_IG, s, arg1, arg2, arg3);
- a_delete s;
- }
- else
- error(format, arg1, arg2, arg3);
-}
-
-enum error_type { WARNING, ERROR, FATAL };
-
-static void do_error(error_type type,
- const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- const char *filename;
- int lineno;
- if (inhibit_errors && type < FATAL)
- return;
- if (backtrace_flag)
- input_stack::backtrace();
- if (!get_file_line(&filename, &lineno))
- filename = 0;
- if (filename)
- errprint("%1:%2: ", filename, lineno);
- else if (program_name)
- fprintf(stderr, "%s: ", program_name);
- switch (type) {
- case FATAL:
- fputs("fatal error: ", stderr);
- break;
- case ERROR:
- break;
- case WARNING:
- fputs("warning: ", stderr);
- break;
- }
- errprint(format, arg1, arg2, arg3);
- fputc('\n', stderr);
- fflush(stderr);
- if (type == FATAL)
- cleanup_and_exit(1);
-}
-
-int warning(warning_type t,
- const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- if ((t & warning_mask) != 0) {
- do_error(WARNING, format, arg1, arg2, arg3);
- return 1;
- }
- else
- return 0;
-}
-
-void error(const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- do_error(ERROR, format, arg1, arg2, arg3);
-}
-
-void fatal(const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- do_error(FATAL, format, arg1, arg2, arg3);
-}
-
-void fatal_with_file_and_line(const char *filename, int lineno,
- const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- fprintf(stderr, "%s:%d: fatal error: ", filename, lineno);
- errprint(format, arg1, arg2, arg3);
- fputc('\n', stderr);
- fflush(stderr);
- cleanup_and_exit(1);
-}
-
-void error_with_file_and_line(const char *filename, int lineno,
- const char *format,
- const errarg &arg1,
- const errarg &arg2,
- const errarg &arg3)
-{
- fprintf(stderr, "%s:%d: error: ", filename, lineno);
- errprint(format, arg1, arg2, arg3);
- fputc('\n', stderr);
- fflush(stderr);
-}
-
-dictionary charinfo_dictionary(501);
-
-charinfo *get_charinfo(symbol nm)
-{
- void *p = charinfo_dictionary.lookup(nm);
- if (p != 0)
- return (charinfo *)p;
- charinfo *cp = new charinfo(nm);
- (void)charinfo_dictionary.lookup(nm, cp);
- return cp;
-}
-
-int charinfo::next_index = 0;
-
-charinfo::charinfo(symbol s)
-: translation(0), mac(0), special_translation(TRANSLATE_NONE),
- hyphenation_code(0), flags(0), ascii_code(0), not_found(0),
- transparent_translate(1), nm(s)
-{
- index = next_index++;
-}
-
-void charinfo::set_hyphenation_code(unsigned char c)
-{
- hyphenation_code = c;
-}
-
-void charinfo::set_translation(charinfo *ci, int tt)
-{
- translation = ci;
- special_translation = TRANSLATE_NONE;
- transparent_translate = tt;
-}
-
-void charinfo::set_special_translation(int c, int tt)
-{
- special_translation = c;
- translation = 0;
- transparent_translate = tt;
-}
-
-void charinfo::set_ascii_code(unsigned char c)
-{
- ascii_code = c;
-}
-
-macro *charinfo::set_macro(macro *m)
-{
- macro *tem = mac;
- mac = m;
- return tem;
-}
-
-void charinfo::set_number(int n)
-{
- number = n;
- flags |= NUMBERED;
-}
-
-int charinfo::get_number()
-{
- assert(flags & NUMBERED);
- return number;
-}
-
-symbol UNNAMED_SYMBOL("---");
-
-// For numbered characters not between 0 and 255, we make a symbol out
-// of the number and store them in this dictionary.
-
-dictionary numbered_charinfo_dictionary(11);
-
-charinfo *get_charinfo_by_number(int n)
-{
- static charinfo *number_table[256];
-
- if (n >= 0 && n < 256) {
- charinfo *ci = number_table[n];
- if (!ci) {
- ci = new charinfo(UNNAMED_SYMBOL);
- ci->set_number(n);
- number_table[n] = ci;
- }
- return ci;
- }
- else {
- symbol ns(i_to_a(n));
- charinfo *ci = (charinfo *)numbered_charinfo_dictionary.lookup(ns);
- if (!ci) {
- ci = new charinfo(UNNAMED_SYMBOL);
- ci->set_number(n);
- numbered_charinfo_dictionary.lookup(ns, ci);
- }
- return ci;
- }
-}
-
-int font::name_to_index(const char *nm)
-{
- charinfo *ci;
- if (nm[1] == 0)
- ci = charset_table[nm[0] & 0xff];
- else if (nm[0] == '\\' && nm[2] == 0)
- ci = get_charinfo(symbol(nm + 1));
- else
- ci = get_charinfo(symbol(nm));
- if (ci == 0)
- return -1;
- else
- return ci->get_index();
-}
-
-int font::number_to_index(int n)
-{
- return get_charinfo_by_number(n)->get_index();
-}
diff --git a/contrib/groff/src/roff/troff/input.h b/contrib/groff/src/roff/troff/input.h
deleted file mode 100644
index 525e1ef686b1..000000000000
--- a/contrib/groff/src/roff/troff/input.h
+++ /dev/null
@@ -1,92 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-/* special character codes */
-
-#ifndef IS_EBCDIC_HOST
-
-const int ESCAPE_QUESTION = 015;
-const int BEGIN_TRAP = 016;
-const int END_TRAP = 017;
-const int PAGE_EJECTOR = 020;
-const int ESCAPE_NEWLINE = 021;
-const int ESCAPE_AMPERSAND = 022;
-const int ESCAPE_UNDERSCORE = 023;
-const int ESCAPE_BAR = 024;
-const int ESCAPE_CIRCUMFLEX = 025;
-const int ESCAPE_LEFT_BRACE = 026;
-const int ESCAPE_RIGHT_BRACE = 027;
-const int ESCAPE_LEFT_QUOTE = 030;
-const int ESCAPE_RIGHT_QUOTE = 031;
-const int ESCAPE_HYPHEN = 032;
-const int ESCAPE_BANG = 033;
-const int ESCAPE_c = 034;
-const int ESCAPE_e = 035;
-const int ESCAPE_PERCENT = 036;
-const int ESCAPE_SPACE = 037;
-
-const int TITLE_REQUEST = 0200;
-const int COPY_FILE_REQUEST = 0201;
-const int TRANSPARENT_FILE_REQUEST = 0202;
-#ifdef COLUMN
-const int VJUSTIFY_REQUEST = 0203;
-#endif /* COLUMN */
-const int ESCAPE_E = 0204;
-const int LAST_PAGE_EJECTOR = 0205;
-const int ESCAPE_RIGHT_PARENTHESIS = 0206;
-const int ESCAPE_TILDE = 0207;
-const int ESCAPE_COLON = 0210;
-
-#else /* IS_EBCDIC_HOST */
-
-const int ESCAPE_QUESTION = 010;
-const int BEGIN_TRAP = 011;
-const int END_TRAP = 013;
-const int PAGE_EJECTOR = 015;
-const int ESCAPE_NEWLINE = 016;
-const int ESCAPE_AMPERSAND = 017;
-const int ESCAPE_UNDERSCORE = 020;
-const int ESCAPE_BAR = 021;
-const int ESCAPE_CIRCUMFLEX = 022;
-const int ESCAPE_LEFT_BRACE = 023;
-const int ESCAPE_RIGHT_BRACE = 024;
-const int ESCAPE_LEFT_QUOTE = 027;
-const int ESCAPE_RIGHT_QUOTE = 030;
-const int ESCAPE_HYPHEN = 031;
-const int ESCAPE_BANG = 032;
-const int ESCAPE_c = 033;
-const int ESCAPE_e = 034;
-const int ESCAPE_PERCENT = 035;
-const int ESCAPE_SPACE = 036;
-
-const int TITLE_REQUEST = 060;
-const int COPY_FILE_REQUEST = 061;
-const int TRANSPARENT_FILE_REQUEST = 062;
-#ifdef COLUMN
-const int VJUSTIFY_REQUEST = 063;
-#endif /* COLUMN */
-const int ESCAPE_E = 064;
-const int LAST_PAGE_EJECTOR = 065;
-const int ESCAPE_RIGHT_PARENTHESIS = 066;
-const int ESCAPE_TILDE = 067;
-const int ESCAPE_COLON = 070;
-
-#endif /* IS_EBCDIC_HOST */
diff --git a/contrib/groff/src/roff/troff/node.cc b/contrib/groff/src/roff/troff/node.cc
deleted file mode 100644
index 2d2d799a0386..000000000000
--- a/contrib/groff/src/roff/troff/node.cc
+++ /dev/null
@@ -1,5621 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "troff.h"
-#include "symbol.h"
-#include "dictionary.h"
-#include "hvunits.h"
-#include "env.h"
-#include "request.h"
-#include "node.h"
-#include "token.h"
-#include "charinfo.h"
-#include "font.h"
-#include "reg.h"
-#include "input.h"
-
-#include "nonposix.h"
-
-#ifdef _POSIX_VERSION
-
-#include <sys/wait.h>
-
-#else /* not _POSIX_VERSION */
-
-/* traditional Unix */
-
-#define WIFEXITED(s) (((s) & 0377) == 0)
-#define WEXITSTATUS(s) (((s) >> 8) & 0377)
-#define WTERMSIG(s) ((s) & 0177)
-#define WIFSTOPPED(s) (((s) & 0377) == 0177)
-#define WSTOPSIG(s) (((s) >> 8) & 0377)
-#define WIFSIGNALED(s) (((s) & 0377) != 0 && (((s) & 0377) != 0177))
-
-#endif /* not _POSIX_VERSION */
-
-/*
- * how many boundaries of images have been written? Useful for
- * debugging grohtml
- */
-
-static int image_no=0;
-static int suppress_start_page=0;
-
-#define STORE_WIDTH 1
-
-symbol HYPHEN_SYMBOL("hy");
-
-// Character used when a hyphen is inserted at a line break.
-static charinfo *soft_hyphen_char;
-
-enum constant_space_type {
- CONSTANT_SPACE_NONE,
- CONSTANT_SPACE_RELATIVE,
- CONSTANT_SPACE_ABSOLUTE
- };
-
-struct special_font_list {
- int n;
- special_font_list *next;
-};
-
-special_font_list *global_special_fonts;
-static int global_ligature_mode = 1;
-static int global_kern_mode = 1;
-
-class track_kerning_function {
- int non_zero;
- units min_size;
- hunits min_amount;
- units max_size;
- hunits max_amount;
-public:
- track_kerning_function();
- track_kerning_function(units, hunits, units, hunits);
- int operator==(const track_kerning_function &);
- int operator!=(const track_kerning_function &);
- hunits compute(int point_size);
-};
-
-// embolden fontno when this is the current font
-
-struct conditional_bold {
- conditional_bold *next;
- int fontno;
- hunits offset;
- conditional_bold(int, hunits, conditional_bold * = 0);
-};
-
-struct tfont;
-
-class font_info {
- tfont *last_tfont;
- int number;
- font_size last_size;
- int last_height;
- int last_slant;
- symbol internal_name;
- symbol external_name;
- font *fm;
- char is_bold;
- hunits bold_offset;
- track_kerning_function track_kern;
- constant_space_type is_constant_spaced;
- units constant_space;
- int last_ligature_mode;
- int last_kern_mode;
- conditional_bold *cond_bold_list;
- void flush();
-public:
- special_font_list *sf;
- font_info(symbol nm, int n, symbol enm, font *f);
- int contains(charinfo *);
- void set_bold(hunits);
- void unbold();
- void set_conditional_bold(int, hunits);
- void conditional_unbold(int);
- void set_track_kern(track_kerning_function &);
- void set_constant_space(constant_space_type, units = 0);
- int is_named(symbol);
- symbol get_name();
- tfont *get_tfont(font_size, int, int, int);
- hunits get_space_width(font_size, int);
- hunits get_narrow_space_width(font_size);
- hunits get_half_narrow_space_width(font_size);
- int get_bold(hunits *);
- int is_special();
- int is_style();
-};
-
-class tfont_spec {
-protected:
- symbol name;
- int input_position;
- font *fm;
- font_size size;
- char is_bold;
- char is_constant_spaced;
- int ligature_mode;
- int kern_mode;
- hunits bold_offset;
- hunits track_kern; // add this to the width
- hunits constant_space_width;
- int height;
- int slant;
-public:
- tfont_spec(symbol nm, int pos, font *, font_size, int, int);
- tfont_spec(const tfont_spec &spec) { *this = spec; }
- tfont_spec plain();
- int operator==(const tfont_spec &);
- friend tfont *font_info::get_tfont(font_size fs, int, int, int);
-};
-
-class tfont : public tfont_spec {
- static tfont *tfont_list;
- tfont *next;
- tfont *plain_version;
-public:
- tfont(tfont_spec &);
- int contains(charinfo *);
- hunits get_width(charinfo *c);
- int get_bold(hunits *);
- int get_constant_space(hunits *);
- hunits get_track_kern();
- tfont *get_plain();
- font_size get_size();
- symbol get_name();
- charinfo *get_lig(charinfo *c1, charinfo *c2);
- int get_kern(charinfo *c1, charinfo *c2, hunits *res);
- int get_input_position();
- int get_character_type(charinfo *);
- int get_height();
- int get_slant();
- vunits get_char_height(charinfo *);
- vunits get_char_depth(charinfo *);
- hunits get_char_skew(charinfo *);
- hunits get_italic_correction(charinfo *);
- hunits get_left_italic_correction(charinfo *);
- hunits get_subscript_correction(charinfo *);
- friend tfont *make_tfont(tfont_spec &);
-};
-
-inline int env_definite_font(environment *env)
-{
- return env->get_family()->make_definite(env->get_font());
-}
-
-/* font_info functions */
-
-static font_info **font_table = 0;
-static int font_table_size = 0;
-
-font_info::font_info(symbol nm, int n, symbol enm, font *f)
-: last_tfont(0), number(n), last_size(0),
- internal_name(nm), external_name(enm), fm(f),
- is_bold(0), is_constant_spaced(CONSTANT_SPACE_NONE), last_ligature_mode(1),
- last_kern_mode(1), cond_bold_list(0), sf(0)
-{
-}
-
-inline int font_info::contains(charinfo *ci)
-{
- return fm != 0 && fm->contains(ci->get_index());
-}
-
-inline int font_info::is_special()
-{
- return fm != 0 && fm->is_special();
-}
-
-inline int font_info::is_style()
-{
- return fm == 0;
-}
-
-// this is the current_font, fontno is where we found the character,
-// presumably a special font
-
-tfont *font_info::get_tfont(font_size fs, int height, int slant, int fontno)
-{
- if (last_tfont == 0 || fs != last_size
- || height != last_height || slant != last_slant
- || global_ligature_mode != last_ligature_mode
- || global_kern_mode != last_kern_mode
- || fontno != number) {
- font_info *f = font_table[fontno];
- tfont_spec spec(f->external_name, f->number, f->fm, fs, height, slant);
- for (conditional_bold *p = cond_bold_list; p; p = p->next)
- if (p->fontno == fontno) {
- spec.is_bold = 1;
- spec.bold_offset = p->offset;
- break;
- }
- if (!spec.is_bold && is_bold) {
- spec.is_bold = 1;
- spec.bold_offset = bold_offset;
- }
- spec.track_kern = track_kern.compute(fs.to_scaled_points());
- spec.ligature_mode = global_ligature_mode;
- spec.kern_mode = global_kern_mode;
- switch (is_constant_spaced) {
- case CONSTANT_SPACE_NONE:
- break;
- case CONSTANT_SPACE_ABSOLUTE:
- spec.is_constant_spaced = 1;
- spec.constant_space_width = constant_space;
- break;
- case CONSTANT_SPACE_RELATIVE:
- spec.is_constant_spaced = 1;
- spec.constant_space_width
- = scale(constant_space*fs.to_scaled_points(),
- units_per_inch,
- 36*72*sizescale);
- break;
- default:
- assert(0);
- }
- if (fontno != number)
- return make_tfont(spec);
- last_tfont = make_tfont(spec);
- last_size = fs;
- last_height = height;
- last_slant = slant;
- last_ligature_mode = global_ligature_mode;
- last_kern_mode = global_kern_mode;
- }
- return last_tfont;
-}
-
-int font_info::get_bold(hunits *res)
-{
- if (is_bold) {
- *res = bold_offset;
- return 1;
- }
- else
- return 0;
-}
-
-void font_info::unbold()
-{
- if (is_bold) {
- is_bold = 0;
- flush();
- }
-}
-
-void font_info::set_bold(hunits offset)
-{
- if (!is_bold || offset != bold_offset) {
- is_bold = 1;
- bold_offset = offset;
- flush();
- }
-}
-
-void font_info::set_conditional_bold(int fontno, hunits offset)
-{
- for (conditional_bold *p = cond_bold_list; p; p = p->next)
- if (p->fontno == fontno) {
- if (offset != p->offset) {
- p->offset = offset;
- flush();
- }
- return;
- }
- cond_bold_list = new conditional_bold(fontno, offset, cond_bold_list);
-}
-
-conditional_bold::conditional_bold(int f, hunits h, conditional_bold *x)
-: next(x), fontno(f), offset(h)
-{
-}
-
-void font_info::conditional_unbold(int fontno)
-{
- for (conditional_bold **p = &cond_bold_list; *p; p = &(*p)->next)
- if ((*p)->fontno == fontno) {
- conditional_bold *tem = *p;
- *p = (*p)->next;
- delete tem;
- flush();
- return;
- }
-}
-
-void font_info::set_constant_space(constant_space_type type, units x)
-{
- if (type != is_constant_spaced
- || (type != CONSTANT_SPACE_NONE && x != constant_space)) {
- flush();
- is_constant_spaced = type;
- constant_space = x;
- }
-}
-
-void font_info::set_track_kern(track_kerning_function &tk)
-{
- if (track_kern != tk) {
- track_kern = tk;
- flush();
- }
-}
-
-void font_info::flush()
-{
- last_tfont = 0;
-}
-
-int font_info::is_named(symbol s)
-{
- return internal_name == s;
-}
-
-symbol font_info::get_name()
-{
- return internal_name;
-}
-
-hunits font_info::get_space_width(font_size fs, int space_size)
-{
- if (is_constant_spaced == CONSTANT_SPACE_NONE)
- return scale(hunits(fm->get_space_width(fs.to_scaled_points())),
- space_size, 12);
- else if (is_constant_spaced == CONSTANT_SPACE_ABSOLUTE)
- return constant_space;
- else
- return scale(constant_space*fs.to_scaled_points(),
- units_per_inch, 36*72*sizescale);
-}
-
-hunits font_info::get_narrow_space_width(font_size fs)
-{
- charinfo *ci = get_charinfo(symbol("|"));
- if (fm->contains(ci->get_index()))
- return hunits(fm->get_width(ci->get_index(), fs.to_scaled_points()));
- else
- return hunits(fs.to_units()/6);
-}
-
-hunits font_info::get_half_narrow_space_width(font_size fs)
-{
- charinfo *ci = get_charinfo(symbol("^"));
- if (fm->contains(ci->get_index()))
- return hunits(fm->get_width(ci->get_index(), fs.to_scaled_points()));
- else
- return hunits(fs.to_units()/12);
-}
-
-/* tfont */
-
-tfont_spec::tfont_spec(symbol nm, int n, font *f,
- font_size s, int h, int sl)
-: name(nm), input_position(n), fm(f), size(s),
- is_bold(0), is_constant_spaced(0), ligature_mode(1), kern_mode(1),
- height(h), slant(sl)
-{
- if (height == size.to_scaled_points())
- height = 0;
-}
-
-int tfont_spec::operator==(const tfont_spec &spec)
-{
- if (fm == spec.fm
- && size == spec.size
- && input_position == spec.input_position
- && name == spec.name
- && height == spec.height
- && slant == spec.slant
- && (is_bold
- ? (spec.is_bold && bold_offset == spec.bold_offset)
- : !spec.is_bold)
- && track_kern == spec.track_kern
- && (is_constant_spaced
- ? (spec.is_constant_spaced
- && constant_space_width == spec.constant_space_width)
- : !spec.is_constant_spaced)
- && ligature_mode == spec.ligature_mode
- && kern_mode == spec.kern_mode)
- return 1;
- else
- return 0;
-}
-
-tfont_spec tfont_spec::plain()
-{
- return tfont_spec(name, input_position, fm, size, height, slant);
-}
-
-hunits tfont::get_width(charinfo *c)
-{
- if (is_constant_spaced)
- return constant_space_width;
- else if (is_bold)
- return (hunits(fm->get_width(c->get_index(), size.to_scaled_points()))
- + track_kern + bold_offset);
- else
- return (hunits(fm->get_width(c->get_index(), size.to_scaled_points()))
- + track_kern);
-}
-
-vunits tfont::get_char_height(charinfo *c)
-{
- vunits v = fm->get_height(c->get_index(), size.to_scaled_points());
- if (height != 0 && height != size.to_scaled_points())
- return scale(v, height, size.to_scaled_points());
- else
- return v;
-}
-
-vunits tfont::get_char_depth(charinfo *c)
-{
- vunits v = fm->get_depth(c->get_index(), size.to_scaled_points());
- if (height != 0 && height != size.to_scaled_points())
- return scale(v, height, size.to_scaled_points());
- else
- return v;
-}
-
-hunits tfont::get_char_skew(charinfo *c)
-{
- return hunits(fm->get_skew(c->get_index(), size.to_scaled_points(), slant));
-}
-
-hunits tfont::get_italic_correction(charinfo *c)
-{
- return hunits(fm->get_italic_correction(c->get_index(), size.to_scaled_points()));
-}
-
-hunits tfont::get_left_italic_correction(charinfo *c)
-{
- return hunits(fm->get_left_italic_correction(c->get_index(),
- size.to_scaled_points()));
-}
-
-hunits tfont::get_subscript_correction(charinfo *c)
-{
- return hunits(fm->get_subscript_correction(c->get_index(),
- size.to_scaled_points()));
-}
-
-inline int tfont::get_input_position()
-{
- return input_position;
-}
-
-inline int tfont::contains(charinfo *ci)
-{
- return fm->contains(ci->get_index());
-}
-
-inline int tfont::get_character_type(charinfo *ci)
-{
- return fm->get_character_type(ci->get_index());
-}
-
-inline int tfont::get_bold(hunits *res)
-{
- if (is_bold) {
- *res = bold_offset;
- return 1;
- }
- else
- return 0;
-}
-
-inline int tfont::get_constant_space(hunits *res)
-{
- if (is_constant_spaced) {
- *res = constant_space_width;
- return 1;
- }
- else
- return 0;
-}
-
-inline hunits tfont::get_track_kern()
-{
- return track_kern;
-}
-
-inline tfont *tfont::get_plain()
-{
- return plain_version;
-}
-
-inline font_size tfont::get_size()
-{
- return size;
-}
-
-inline symbol tfont::get_name()
-{
- return name;
-}
-
-inline int tfont::get_height()
-{
- return height;
-}
-
-inline int tfont::get_slant()
-{
- return slant;
-}
-
-symbol SYMBOL_ff("ff");
-symbol SYMBOL_fi("fi");
-symbol SYMBOL_fl("fl");
-symbol SYMBOL_Fi("Fi");
-symbol SYMBOL_Fl("Fl");
-
-charinfo *tfont::get_lig(charinfo *c1, charinfo *c2)
-{
- if (ligature_mode == 0)
- return 0;
- charinfo *ci = 0;
- if (c1->get_ascii_code() == 'f') {
- switch (c2->get_ascii_code()) {
- case 'f':
- if (fm->has_ligature(font::LIG_ff))
- ci = get_charinfo(SYMBOL_ff);
- break;
- case 'i':
- if (fm->has_ligature(font::LIG_fi))
- ci = get_charinfo(SYMBOL_fi);
- break;
- case 'l':
- if (fm->has_ligature(font::LIG_fl))
- ci = get_charinfo(SYMBOL_fl);
- break;
- }
- }
- else if (ligature_mode != 2 && c1->nm == SYMBOL_ff) {
- switch (c2->get_ascii_code()) {
- case 'i':
- if (fm->has_ligature(font::LIG_ffi))
- ci = get_charinfo(SYMBOL_Fi);
- break;
- case 'l':
- if (fm->has_ligature(font::LIG_ffl))
- ci = get_charinfo(SYMBOL_Fl);
- break;
- }
- }
- if (ci != 0 && fm->contains(ci->get_index()))
- return ci;
- return 0;
-}
-
-inline int tfont::get_kern(charinfo *c1, charinfo *c2, hunits *res)
-{
- if (kern_mode == 0)
- return 0;
- else {
- int n = fm->get_kern(c1->get_index(),
- c2->get_index(),
- size.to_scaled_points());
- if (n) {
- *res = hunits(n);
- return 1;
- }
- else
- return 0;
- }
-}
-
-tfont *make_tfont(tfont_spec &spec)
-{
- for (tfont *p = tfont::tfont_list; p; p = p->next)
- if (*p == spec)
- return p;
- return new tfont(spec);
-}
-
-tfont *tfont::tfont_list = 0;
-
-tfont::tfont(tfont_spec &spec) : tfont_spec(spec)
-{
- next = tfont_list;
- tfont_list = this;
- tfont_spec plain_spec = plain();
- tfont *p;
- for (p = tfont_list; p; p = p->next)
- if (*p == plain_spec) {
- plain_version = p;
- break;
- }
- if (!p)
- plain_version = new tfont(plain_spec);
-}
-
-/* output_file */
-
-class real_output_file : public output_file {
-#ifndef POPEN_MISSING
- int piped;
-#endif
- int printing; // decision via optional page list
- int output_on; // .output 1 or .output 0 requests
- virtual void really_transparent_char(unsigned char) = 0;
- virtual void really_print_line(hunits x, vunits y, node *n,
- vunits before, vunits after, hunits width) = 0;
- virtual void really_begin_page(int pageno, vunits page_length) = 0;
- virtual void really_copy_file(hunits x, vunits y, const char *filename);
- virtual void really_put_filename(const char *filename);
- virtual void really_on();
- virtual void really_off();
-protected:
- FILE *fp;
-public:
- real_output_file();
- ~real_output_file();
- void flush();
- void transparent_char(unsigned char);
- void print_line(hunits x, vunits y, node *n, vunits before, vunits after, hunits width);
- void begin_page(int pageno, vunits page_length);
- void put_filename(const char *filename);
- void on();
- void off();
- int is_on();
- int is_printing();
- void copy_file(hunits x, vunits y, const char *filename);
-};
-
-class suppress_output_file : public real_output_file {
-public:
- suppress_output_file();
- void really_transparent_char(unsigned char);
- void really_print_line(hunits x, vunits y, node *n, vunits, vunits, hunits width);
- void really_begin_page(int pageno, vunits page_length);
-};
-
-class ascii_output_file : public real_output_file {
-public:
- ascii_output_file();
- void really_transparent_char(unsigned char);
- void really_print_line(hunits x, vunits y, node *n, vunits, vunits, hunits width);
- void really_begin_page(int pageno, vunits page_length);
- void outc(unsigned char c);
- void outs(const char *s);
-};
-
-void ascii_output_file::outc(unsigned char c)
-{
- fputc(c, fp);
-}
-
-void ascii_output_file::outs(const char *s)
-{
- fputc('<', fp);
- if (s)
- fputs(s, fp);
- fputc('>', fp);
-}
-
-struct hvpair;
-
-class troff_output_file : public real_output_file {
- units hpos;
- units vpos;
- units output_vpos;
- units output_hpos;
- int force_motion;
- int current_size;
- int current_slant;
- int current_height;
- tfont *current_tfont;
- int current_font_number;
- symbol *font_position;
- int nfont_positions;
- enum { TBUF_SIZE = 256 };
- char tbuf[TBUF_SIZE];
- int tbuf_len;
- int tbuf_kern;
- int begun_page;
- void do_motion();
- void put(char c);
- void put(unsigned char c);
- void put(int i);
- void put(const char *s);
- void set_font(tfont *tf);
- void flush_tbuf();
-public:
- troff_output_file();
- ~troff_output_file();
- void trailer(vunits page_length);
- void put_char(charinfo *ci, tfont *tf);
- void put_char_width(charinfo *ci, tfont *tf, hunits w, hunits k);
- void right(hunits);
- void down(vunits);
- void moveto(hunits, vunits);
- void start_special(tfont *tf, int no_init_string = 0);
- void start_special(int no_init_string = 0);
- void special_char(unsigned char c);
- void end_special();
- void word_marker();
- void really_transparent_char(unsigned char c);
- void really_print_line(hunits x, vunits y, node *n, vunits before, vunits after, hunits width);
- void really_begin_page(int pageno, vunits page_length);
- void really_copy_file(hunits x, vunits y, const char *filename);
- void really_put_filename(const char *filename);
- void really_on();
- void really_off();
- void draw(char, hvpair *, int, font_size);
- void determine_line_limits (char code, hvpair *point, int npoints);
- void check_charinfo(tfont *tf, charinfo *ci);
- int get_hpos() { return hpos; }
- int get_vpos() { return vpos; }
-};
-
-static void put_string(const char *s, FILE *fp)
-{
- for (; *s != '\0'; ++s)
- putc(*s, fp);
-}
-
-inline void troff_output_file::put(char c)
-{
- putc(c, fp);
-}
-
-inline void troff_output_file::put(unsigned char c)
-{
- putc(c, fp);
-}
-
-inline void troff_output_file::put(const char *s)
-{
- put_string(s, fp);
-}
-
-inline void troff_output_file::put(int i)
-{
- put_string(i_to_a(i), fp);
-}
-
-void troff_output_file::start_special(tfont *tf, int no_init_string)
-{
- flush_tbuf();
-
- /*
- * although this is extremely unlikely to have an effect on other devices
- * this way is safer. Currently this is only needed for html.
- */
- if (is_html && tf) {
- if (tf != current_tfont)
- set_font(tf);
- }
- do_motion();
- if (!no_init_string)
- put("x X ");
-}
-
-void troff_output_file::start_special(int no_init_string)
-{
- flush_tbuf();
- do_motion();
- if (!no_init_string)
- put("x X ");
-}
-
-void troff_output_file::special_char(unsigned char c)
-{
- put(c);
- if (c == '\n')
- put('+');
-}
-
-void troff_output_file::end_special()
-{
- put('\n');
-}
-
-inline void troff_output_file::moveto(hunits h, vunits v)
-{
- hpos = h.to_units();
- vpos = v.to_units();
-}
-
-void troff_output_file::really_print_line(hunits x, vunits y, node *n,
- vunits before, vunits after, hunits width)
-{
- moveto(x, y);
- while (n != 0) {
- if (is_on() || (n->force_tprint()))
- n->tprint(this);
- n = n->next;
- }
- flush_tbuf();
- // This ensures that transparent throughput will have a more predictable
- // position.
- do_motion();
- force_motion = 1;
- hpos = 0;
- put('n');
- put(before.to_units());
- put(' ');
- put(after.to_units());
- put('\n');
-}
-
-inline void troff_output_file::word_marker()
-{
- flush_tbuf();
- put('w');
-}
-
-inline void troff_output_file::right(hunits n)
-{
- hpos += n.to_units();
-}
-
-inline void troff_output_file::down(vunits n)
-{
- vpos += n.to_units();
-}
-
-void troff_output_file::do_motion()
-{
- if (force_motion) {
- put('V');
- put(vpos);
- put('\n');
- put('H');
- put(hpos);
- put('\n');
- }
- else {
- if (hpos != output_hpos) {
- units n = hpos - output_hpos;
- if (n > 0 && n < hpos) {
- put('h');
- put(n);
- }
- else {
- put('H');
- put(hpos);
- }
- put('\n');
- }
- if (vpos != output_vpos) {
- units n = vpos - output_vpos;
- if (n > 0 && n < vpos) {
- put('v');
- put(n);
- }
- else {
- put('V');
- put(vpos);
- }
- put('\n');
- }
- }
- output_vpos = vpos;
- output_hpos = hpos;
- force_motion = 0;
-}
-
-void troff_output_file::flush_tbuf()
-{
- if (tbuf_len == 0)
- return;
- if (tbuf_kern == 0)
- put('t');
- else {
- put('u');
- put(tbuf_kern);
- put(' ');
- }
- check_output_limits(hpos, vpos);
- check_output_limits(hpos, vpos + current_size + current_height);
-
- for (int i = 0; i < tbuf_len; i++)
- put(tbuf[i]);
- put('\n');
- tbuf_len = 0;
-}
-
-void troff_output_file::check_charinfo(tfont *tf, charinfo *ci)
-{
- int size = tf->get_size().to_scaled_points();
- int height = tf->get_char_height(ci).to_units();
- int width = tf->get_width(ci).to_units()
- + tf->get_italic_correction(ci).to_units();
- int depth = tf->get_char_depth(ci).to_units();
- check_output_limits(output_hpos,
- output_vpos - height);
- check_output_limits(output_hpos + width,
- output_vpos + size + depth);
-}
-
-void troff_output_file::put_char_width(charinfo *ci, tfont *tf, hunits w,
- hunits k)
-{
- if (tf != current_tfont) {
- flush_tbuf();
- set_font(tf);
- }
- char c = ci->get_ascii_code();
- int kk = k.to_units();
- if (c == '\0') {
- flush_tbuf();
- do_motion();
- check_charinfo(tf, ci);
- if (ci->numbered()) {
- put('N');
- put(ci->get_number());
- }
- else {
- put('C');
- const char *s = ci->nm.contents();
- if (s[1] == 0) {
- put('\\');
- put(s[0]);
- }
- else
- put(s);
- }
- put('\n');
- hpos += w.to_units() + kk;
- }
- else if (tcommand_flag) {
- if (tbuf_len > 0 && hpos == output_hpos && vpos == output_vpos
- && kk == tbuf_kern
- && tbuf_len < TBUF_SIZE) {
- check_charinfo(tf, ci);
- tbuf[tbuf_len++] = c;
- output_hpos += w.to_units() + kk;
- hpos = output_hpos;
- return;
- }
- flush_tbuf();
- do_motion();
- check_charinfo(tf, ci);
- tbuf[tbuf_len++] = c;
- output_hpos += w.to_units() + kk;
- tbuf_kern = kk;
- hpos = output_hpos;
- }
- else {
- // flush_tbuf();
- int n = hpos - output_hpos;
- check_charinfo(tf, ci);
- // check_output_limits(output_hpos, output_vpos);
- if (vpos == output_vpos && n > 0 && n < 100 && !force_motion) {
- put(char(n/10 + '0'));
- put(char(n%10 + '0'));
- put(c);
- output_hpos = hpos;
- }
- else {
- do_motion();
- put('c');
- put(c);
- }
- hpos += w.to_units() + kk;
- }
-}
-
-void troff_output_file::put_char(charinfo *ci, tfont *tf)
-{
- flush_tbuf();
- if (tf != current_tfont)
- set_font(tf);
- char c = ci->get_ascii_code();
- if (c == '\0') {
- do_motion();
- if (ci->numbered()) {
- put('N');
- put(ci->get_number());
- }
- else {
- put('C');
- const char *s = ci->nm.contents();
- if (s[1] == 0) {
- put('\\');
- put(s[0]);
- }
- else
- put(s);
- }
- put('\n');
- }
- else {
- int n = hpos - output_hpos;
- if (vpos == output_vpos && n > 0 && n < 100) {
- put(char(n/10 + '0'));
- put(char(n%10 + '0'));
- put(c);
- output_hpos = hpos;
- }
- else {
- do_motion();
- put('c');
- put(c);
- }
- }
-}
-
-void troff_output_file::set_font(tfont *tf)
-{
- if (current_tfont == tf)
- return;
- int n = tf->get_input_position();
- symbol nm = tf->get_name();
- if (n >= nfont_positions || font_position[n] != nm) {
- put("x font ");
- put(n);
- put(' ');
- put(nm.contents());
- put('\n');
- if (n >= nfont_positions) {
- int old_nfont_positions = nfont_positions;
- symbol *old_font_position = font_position;
- nfont_positions *= 3;
- nfont_positions /= 2;
- if (nfont_positions <= n)
- nfont_positions = n + 10;
- font_position = new symbol[nfont_positions];
- memcpy(font_position, old_font_position,
- old_nfont_positions*sizeof(symbol));
- a_delete old_font_position;
- }
- font_position[n] = nm;
- }
- if (current_font_number != n) {
- put('f');
- put(n);
- put('\n');
- current_font_number = n;
- }
- int size = tf->get_size().to_scaled_points();
- if (current_size != size) {
- put('s');
- put(size);
- put('\n');
- current_size = size;
- }
- int slant = tf->get_slant();
- if (current_slant != slant) {
- put("x Slant ");
- put(slant);
- put('\n');
- current_slant = slant;
- }
- int height = tf->get_height();
- if (current_height != height) {
- put("x Height ");
- put(height == 0 ? current_size : height);
- put('\n');
- current_height = height;
- }
- current_tfont = tf;
-}
-
-// determine_line_limits - works out the smallest box which will contain
-// the entity, code, built from the point array.
-void troff_output_file::determine_line_limits(char code, hvpair *point,
- int npoints)
-{
- int i, x, y;
- switch (code) {
- case 'c':
- case 'C':
- // only the h field is used when defining a circle
- check_output_limits(output_hpos,
- output_vpos - point[0].h.to_units()/2);
- check_output_limits(output_hpos + point[0].h.to_units(),
- output_vpos + point[0].h.to_units()/2);
- break;
- case 'E':
- case 'e':
- check_output_limits(output_hpos,
- output_vpos - point[0].v.to_units()/2);
- check_output_limits(output_hpos + point[0].h.to_units(),
- output_vpos + point[0].v.to_units()/2);
- break;
- case 'P':
- case 'p':
- x = output_hpos;
- y = output_vpos;
- check_output_limits(x, y);
- for (i = 0; i < npoints; i++) {
- x += point[i].h.to_units();
- y += point[i].v.to_units();
- check_output_limits(x, y);
- }
- break;
- case 't':
- x = output_hpos;
- y = output_vpos;
- for (i = 0; i < npoints; i++) {
- x += point[i].h.to_units();
- y += point[i].v.to_units();
- check_output_limits(x, y);
- }
- break;
- default:
- // remember this doesn't work for arc.. yet
- x = output_hpos;
- y = output_vpos;
- for (i = 0; i < npoints; i++) {
- x += point[i].h.to_units();
- y += point[i].v.to_units();
- check_output_limits(x, y);
- }
- }
-}
-
-void troff_output_file::draw(char code, hvpair *point, int npoints,
- font_size fsize)
-{
- flush_tbuf();
- do_motion();
- int size = fsize.to_scaled_points();
- if (current_size != size) {
- put('s');
- put(size);
- put('\n');
- current_size = size;
- current_tfont = 0;
- }
- put('D');
- put(code);
- int i;
- if (code == 'c') {
- put(' ');
- put(point[0].h.to_units());
- }
- else
- for (i = 0; i < npoints; i++) {
- put(' ');
- put(point[i].h.to_units());
- put(' ');
- put(point[i].v.to_units());
- }
-
- determine_line_limits(code, point, npoints);
-
- for (i = 0; i < npoints; i++)
- output_hpos += point[i].h.to_units();
- hpos = output_hpos;
- if (code != 'e') {
- for (i = 0; i < npoints; i++)
- output_vpos += point[i].v.to_units();
- vpos = output_vpos;
- }
- put('\n');
-}
-
-void troff_output_file::really_on ()
-{
- flush_tbuf();
-}
-
-void troff_output_file::really_off ()
-{
- flush_tbuf();
-}
-
-void troff_output_file::really_put_filename(const char *filename)
-{
- flush_tbuf();
- put("F ");
- put(filename);
- put('\n');
-}
-
-void troff_output_file::really_begin_page(int pageno, vunits page_length)
-{
- flush_tbuf();
- if (begun_page) {
- if (page_length > V0) {
- put('V');
- put(page_length.to_units());
- put('\n');
- }
- }
- else
- begun_page = 1;
- current_tfont = 0;
- current_font_number = -1;
- current_size = 0;
- // current_height = 0;
- // current_slant = 0;
- hpos = 0;
- vpos = 0;
- output_hpos = 0;
- output_vpos = 0;
- force_motion = 1;
- for (int i = 0; i < nfont_positions; i++)
- font_position[i] = NULL_SYMBOL;
- put('p');
- put(pageno);
- put('\n');
-}
-
-void troff_output_file::really_copy_file(hunits x, vunits y, const char *filename)
-{
- moveto(x, y);
- flush_tbuf();
- do_motion();
- errno = 0;
- FILE *ifp = fopen(filename, "r");
- if (ifp == 0)
- error("can't open `%1': %2", filename, strerror(errno));
- else {
- int c;
- while ((c = getc(ifp)) != EOF)
- put(char(c));
- fclose(ifp);
- }
- force_motion = 1;
- current_size = 0;
- current_tfont = 0;
- current_font_number = -1;
- for (int i = 0; i < nfont_positions; i++)
- font_position[i] = NULL_SYMBOL;
-}
-
-void troff_output_file::really_transparent_char(unsigned char c)
-{
- put(c);
-}
-
-troff_output_file::~troff_output_file()
-{
- a_delete font_position;
-}
-
-void troff_output_file::trailer(vunits page_length)
-{
- flush_tbuf();
- if (page_length > V0) {
- put("x trailer\n");
- put('V');
- put(page_length.to_units());
- put('\n');
- }
- put("x stop\n");
-}
-
-troff_output_file::troff_output_file()
-: current_slant(0), current_height(0), nfont_positions(10), tbuf_len(0),
- begun_page(0)
-{
- font_position = new symbol[nfont_positions];
- put("x T ");
- put(device);
- put('\n');
- put("x res ");
- put(units_per_inch);
- put(' ');
- put(hresolution);
- put(' ');
- put(vresolution);
- put('\n');
- put("x init\n");
-}
-
-/* output_file */
-
-output_file *the_output = 0;
-
-output_file::output_file()
-{
-}
-
-output_file::~output_file()
-{
-}
-
-void output_file::trailer(vunits)
-{
-}
-
-void output_file::put_filename(const char *filename)
-{
-}
-
-void output_file::on()
-{
-}
-
-void output_file::off()
-{
-}
-
-real_output_file::real_output_file()
-: printing(0), output_on(1)
-{
-#ifndef POPEN_MISSING
- if (pipe_command) {
- if ((fp = popen(pipe_command, POPEN_WT)) != 0) {
- piped = 1;
- return;
- }
- error("pipe open failed: %1", strerror(errno));
- }
- piped = 0;
-#endif /* not POPEN_MISSING */
- fp = stdout;
-}
-
-real_output_file::~real_output_file()
-{
- if (!fp)
- return;
- // To avoid looping, set fp to 0 before calling fatal().
- if (ferror(fp) || fflush(fp) < 0) {
- fp = 0;
- fatal("error writing output file");
- }
-#ifndef POPEN_MISSING
- if (piped) {
- int result = pclose(fp);
- fp = 0;
- if (result < 0)
- fatal("pclose failed");
- if (!WIFEXITED(result))
- error("output process `%1' got fatal signal %2",
- pipe_command,
- WIFSIGNALED(result) ? WTERMSIG(result) : WSTOPSIG(result));
- else {
- int exit_status = WEXITSTATUS(result);
- if (exit_status != 0)
- error("output process `%1' exited with status %2",
- pipe_command, exit_status);
- }
- }
- else
-#endif /* not POPEN MISSING */
- if (fclose(fp) < 0) {
- fp = 0;
- fatal("error closing output file");
- }
-}
-
-void real_output_file::flush()
-{
- if (fflush(fp) < 0)
- fatal("error writing output file");
-}
-
-int real_output_file::is_printing()
-{
- return printing;
-}
-
-void real_output_file::begin_page(int pageno, vunits page_length)
-{
- printing = in_output_page_list(pageno);
- if (printing && output_on)
- really_begin_page(pageno, page_length);
-}
-
-void real_output_file::copy_file(hunits x, vunits y, const char *filename)
-{
- if (printing && output_on)
- really_copy_file(x, y, filename);
- check_output_limits(x.to_units(), y.to_units());
-}
-
-void real_output_file::transparent_char(unsigned char c)
-{
- if (printing && output_on)
- really_transparent_char(c);
-}
-
-void real_output_file::print_line(hunits x, vunits y, node *n,
- vunits before, vunits after, hunits width)
-{
- if (printing)
- really_print_line(x, y, n, before, after, width);
- delete_node_list(n);
-}
-
-void real_output_file::really_copy_file(hunits, vunits, const char *)
-{
- // do nothing
-}
-
-void real_output_file::put_filename(const char *filename)
-{
- really_put_filename(filename);
-}
-
-void real_output_file::really_put_filename(const char *filename)
-{
-}
-
-void real_output_file::on()
-{
- really_on();
- if (output_on == 0) {
- output_on = 1;
- }
-}
-
-void real_output_file::off()
-{
- really_off();
- output_on = 0;
-}
-
-int real_output_file::is_on()
-{
- return( output_on );
-}
-
-void real_output_file::really_on()
-{
-}
-
-void real_output_file::really_off()
-{
-}
-
-/* ascii_output_file */
-
-void ascii_output_file::really_transparent_char(unsigned char c)
-{
- putc(c, fp);
-}
-
-void ascii_output_file::really_print_line(hunits, vunits, node *n, vunits, vunits, hunits width)
-{
- while (n != 0) {
- n->ascii_print(this);
- n = n->next;
- }
- fputc('\n', fp);
-}
-
-void ascii_output_file::really_begin_page(int /*pageno*/, vunits /*page_length*/)
-{
- fputs("<beginning of page>\n", fp);
-}
-
-ascii_output_file::ascii_output_file()
-{
-}
-
-/* suppress_output_file */
-
-suppress_output_file::suppress_output_file()
-{
-}
-
-void suppress_output_file::really_print_line(hunits, vunits, node *, vunits, vunits, hunits)
-{
-}
-
-void suppress_output_file::really_begin_page(int, vunits)
-{
-}
-
-void suppress_output_file::really_transparent_char(unsigned char)
-{
-}
-
-/* glyphs, ligatures, kerns, discretionary breaks */
-
-class charinfo_node : public node {
-protected:
- charinfo *ci;
-public:
- charinfo_node(charinfo *, node * = 0);
- int ends_sentence();
- int overlaps_vertically();
- int overlaps_horizontally();
-};
-
-charinfo_node::charinfo_node(charinfo *c, node *x)
-: node(x), ci(c)
-{
-}
-
-int charinfo_node::ends_sentence()
-{
- if (ci->ends_sentence())
- return 1;
- else if (ci->transparent())
- return 2;
- else
- return 0;
-}
-
-int charinfo_node::overlaps_horizontally()
-{
- return ci->overlaps_horizontally();
-}
-
-int charinfo_node::overlaps_vertically()
-{
- return ci->overlaps_vertically();
-}
-
-class glyph_node : public charinfo_node {
- static glyph_node *free_list;
-protected:
- tfont *tf;
-#ifdef STORE_WIDTH
- hunits wid;
- glyph_node(charinfo *, tfont *, hunits, node * = 0);
-#endif
-public:
- void *operator new(size_t);
- void operator delete(void *);
- glyph_node(charinfo *, tfont *, node * = 0);
- ~glyph_node() {}
- node *copy();
- node *merge_glyph_node(glyph_node *);
- node *merge_self(node *);
- hunits width();
- node *last_char_node();
- units size();
- void vertical_extent(vunits *, vunits *);
- hunits subscript_correction();
- hunits italic_correction();
- hunits left_italic_correction();
- hunits skew();
- hyphenation_type get_hyphenation_type();
- tfont *get_tfont();
- void tprint(troff_output_file *);
- void zero_width_tprint(troff_output_file *);
- hyphen_list *get_hyphen_list(hyphen_list *ss = 0);
- node *add_self(node *, hyphen_list **);
- void ascii_print(ascii_output_file *);
- void asciify(macro *);
- int character_type();
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-glyph_node *glyph_node::free_list = 0;
-
-class ligature_node : public glyph_node {
- node *n1;
- node *n2;
-#ifdef STORE_WIDTH
- ligature_node(charinfo *, tfont *, hunits, node *gn1, node *gn2, node *x = 0);
-#endif
-public:
- void *operator new(size_t);
- void operator delete(void *);
- ligature_node(charinfo *, tfont *, node *gn1, node *gn2, node *x = 0);
- ~ligature_node();
- node *copy();
- node *add_self(node *, hyphen_list **);
- hyphen_list *get_hyphen_list(hyphen_list *ss = 0);
- void ascii_print(ascii_output_file *);
- void asciify(macro *);
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-class kern_pair_node : public node {
- hunits amount;
- node *n1;
- node *n2;
-public:
- kern_pair_node(hunits n, node *first, node *second, node *x = 0);
- ~kern_pair_node();
- node *copy();
- node *merge_glyph_node(glyph_node *);
- node *add_self(node *, hyphen_list **);
- hyphen_list *get_hyphen_list(hyphen_list *ss = 0);
- node *add_discretionary_hyphen();
- hunits width();
- node *last_char_node();
- hunits italic_correction();
- hunits subscript_correction();
- void tprint(troff_output_file *);
- hyphenation_type get_hyphenation_type();
- int ends_sentence();
- void ascii_print(ascii_output_file *);
- void asciify(macro *);
- int same(node *);
- const char *type();
- int force_tprint();
- void vertical_extent(vunits *, vunits *);
-};
-
-class dbreak_node : public node {
- node *none;
- node *pre;
- node *post;
-public:
- dbreak_node(node *n, node *p, node *x = 0);
- ~dbreak_node();
- node *copy();
- node *merge_glyph_node(glyph_node *);
- node *add_discretionary_hyphen();
- hunits width();
- node *last_char_node();
- hunits italic_correction();
- hunits subscript_correction();
- void tprint(troff_output_file *);
- breakpoint *get_breakpoints(hunits width, int ns, breakpoint *rest = 0,
- int is_inner = 0);
- int nbreaks();
- int ends_sentence();
- void split(int, node **, node **);
- hyphenation_type get_hyphenation_type();
- void ascii_print(ascii_output_file *);
- void asciify(macro *);
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-void *glyph_node::operator new(size_t n)
-{
- assert(n == sizeof(glyph_node));
- if (!free_list) {
- const int BLOCK = 1024;
- free_list = (glyph_node *)new char[sizeof(glyph_node)*BLOCK];
- for (int i = 0; i < BLOCK - 1; i++)
- free_list[i].next = free_list + i + 1;
- free_list[BLOCK-1].next = 0;
- }
- glyph_node *p = free_list;
- free_list = (glyph_node *)(free_list->next);
- p->next = 0;
- return p;
-}
-
-void *ligature_node::operator new(size_t n)
-{
- return new char[n];
-}
-
-void glyph_node::operator delete(void *p)
-{
- if (p) {
- ((glyph_node *)p)->next = free_list;
- free_list = (glyph_node *)p;
- }
-}
-
-void ligature_node::operator delete(void *p)
-{
- delete[] (char *)p;
-}
-
-glyph_node::glyph_node(charinfo *c, tfont *t, node *x)
-: charinfo_node(c, x), tf(t)
-{
-#ifdef STORE_WIDTH
- wid = tf->get_width(ci);
-#endif
-}
-
-#ifdef STORE_WIDTH
-glyph_node::glyph_node(charinfo *c, tfont *t, hunits w, node *x)
-: charinfo_node(c, x), tf(t), wid(w)
-{
-}
-#endif
-
-node *glyph_node::copy()
-{
-#ifdef STORE_WIDTH
- return new glyph_node(ci, tf, wid);
-#else
- return new glyph_node(ci, tf);
-#endif
-}
-
-node *glyph_node::merge_self(node *nd)
-{
- return nd->merge_glyph_node(this);
-}
-
-int glyph_node::character_type()
-{
- return tf->get_character_type(ci);
-}
-
-node *glyph_node::add_self(node *n, hyphen_list **p)
-{
- assert(ci->get_hyphenation_code() == (*p)->hyphenation_code);
- next = 0;
- node *nn;
- if (n == 0 || (nn = n->merge_glyph_node(this)) == 0) {
- next = n;
- nn = this;
- }
- if ((*p)->hyphen)
- nn = nn->add_discretionary_hyphen();
- hyphen_list *pp = *p;
- *p = (*p)->next;
- delete pp;
- return nn;
-}
-
-units glyph_node::size()
-{
- return tf->get_size().to_units();
-}
-
-hyphen_list *glyph_node::get_hyphen_list(hyphen_list *tail)
-{
- return new hyphen_list(ci->get_hyphenation_code(), tail);
-}
-
-tfont *node::get_tfont()
-{
- return 0;
-}
-
-tfont *glyph_node::get_tfont()
-{
- return tf;
-}
-
-node *node::merge_glyph_node(glyph_node * /*gn*/)
-{
- return 0;
-}
-
-node *glyph_node::merge_glyph_node(glyph_node *gn)
-{
- if (tf == gn->tf) {
- charinfo *lig;
- if ((lig = tf->get_lig(ci, gn->ci)) != 0) {
- node *next1 = next;
- next = 0;
- return new ligature_node(lig, tf, this, gn, next1);
- }
- hunits kern;
- if (tf->get_kern(ci, gn->ci, &kern)) {
- node *next1 = next;
- next = 0;
- return new kern_pair_node(kern, this, gn, next1);
- }
- }
- return 0;
-}
-
-#ifdef STORE_WIDTH
-inline
-#endif
-hunits glyph_node::width()
-{
-#ifdef STORE_WIDTH
- return wid;
-#else
- return tf->get_width(ci);
-#endif
-}
-
-node *glyph_node::last_char_node()
-{
- return this;
-}
-
-void glyph_node::vertical_extent(vunits *min, vunits *max)
-{
- *min = -tf->get_char_height(ci);
- *max = tf->get_char_depth(ci);
-}
-
-hunits glyph_node::skew()
-{
- return tf->get_char_skew(ci);
-}
-
-hunits glyph_node::subscript_correction()
-{
- return tf->get_subscript_correction(ci);
-}
-
-hunits glyph_node::italic_correction()
-{
- return tf->get_italic_correction(ci);
-}
-
-hunits glyph_node::left_italic_correction()
-{
- return tf->get_left_italic_correction(ci);
-}
-
-hyphenation_type glyph_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-void glyph_node::ascii_print(ascii_output_file *ascii)
-{
- unsigned char c = ci->get_ascii_code();
- if (c != 0)
- ascii->outc(c);
- else
- ascii->outs(ci->nm.contents());
-}
-
-ligature_node::ligature_node(charinfo *c, tfont *t,
- node *gn1, node *gn2, node *x)
-: glyph_node(c, t, x), n1(gn1), n2(gn2)
-{
-}
-
-#ifdef STORE_WIDTH
-ligature_node::ligature_node(charinfo *c, tfont *t, hunits w,
- node *gn1, node *gn2, node *x)
-: glyph_node(c, t, w, x), n1(gn1), n2(gn2)
-{
-}
-#endif
-
-ligature_node::~ligature_node()
-{
- delete n1;
- delete n2;
-}
-
-node *ligature_node::copy()
-{
-#ifdef STORE_WIDTH
- return new ligature_node(ci, tf, wid, n1->copy(), n2->copy());
-#else
- return new ligature_node(ci, tf, n1->copy(), n2->copy());
-#endif
-}
-
-void ligature_node::ascii_print(ascii_output_file *ascii)
-{
- n1->ascii_print(ascii);
- n2->ascii_print(ascii);
-}
-
-hyphen_list *ligature_node::get_hyphen_list(hyphen_list *tail)
-{
- return n1->get_hyphen_list(n2->get_hyphen_list(tail));
-}
-
-node *ligature_node::add_self(node *n, hyphen_list **p)
-{
- n = n1->add_self(n, p);
- n = n2->add_self(n, p);
- n1 = n2 = 0;
- delete this;
- return n;
-}
-
-kern_pair_node::kern_pair_node(hunits n, node *first, node *second, node *x)
-: node(x), amount(n), n1(first), n2(second)
-{
-}
-
-dbreak_node::dbreak_node(node *n, node *p, node *x)
-: node(x), none(n), pre(p), post(0)
-{
-}
-
-node *dbreak_node::merge_glyph_node(glyph_node *gn)
-{
- glyph_node *gn2 = (glyph_node *)gn->copy();
- node *new_none = none ? none->merge_glyph_node(gn) : 0;
- node *new_post = post ? post->merge_glyph_node(gn2) : 0;
- if (new_none == 0 && new_post == 0) {
- delete gn2;
- return 0;
- }
- if (new_none != 0)
- none = new_none;
- else {
- gn->next = none;
- none = gn;
- }
- if (new_post != 0)
- post = new_post;
- else {
- gn2->next = post;
- post = gn2;
- }
- return this;
-}
-
-node *kern_pair_node::merge_glyph_node(glyph_node *gn)
-{
- node *nd = n2->merge_glyph_node(gn);
- if (nd == 0)
- return 0;
- n2 = nd;
- nd = n2->merge_self(n1);
- if (nd) {
- nd->next = next;
- n1 = 0;
- n2 = 0;
- delete this;
- return nd;
- }
- return this;
-}
-
-hunits kern_pair_node::italic_correction()
-{
- return n2->italic_correction();
-}
-
-hunits kern_pair_node::subscript_correction()
-{
- return n2->subscript_correction();
-}
-
-void kern_pair_node::vertical_extent(vunits *min, vunits *max)
-{
- n1->vertical_extent(min, max);
- vunits min2, max2;
- n2->vertical_extent(&min2, &max2);
- if (min2 < *min)
- *min = min2;
- if (max2 > *max)
- *max = max2;
-}
-
-node *kern_pair_node::add_discretionary_hyphen()
-{
- tfont *tf = n2->get_tfont();
- if (tf) {
- if (tf->contains(soft_hyphen_char)) {
- node *next1 = next;
- next = 0;
- node *n = copy();
- glyph_node *gn = new glyph_node(soft_hyphen_char, tf);
- node *nn = n->merge_glyph_node(gn);
- if (nn == 0) {
- gn->next = n;
- nn = gn;
- }
- return new dbreak_node(this, nn, next1);
- }
- }
- return this;
-}
-
-kern_pair_node::~kern_pair_node()
-{
- if (n1 != 0)
- delete n1;
- if (n2 != 0)
- delete n2;
-}
-
-dbreak_node::~dbreak_node()
-{
- delete_node_list(pre);
- delete_node_list(post);
- delete_node_list(none);
-}
-
-node *kern_pair_node::copy()
-{
- return new kern_pair_node(amount, n1->copy(), n2->copy());
-}
-
-node *copy_node_list(node *n)
-{
- node *p = 0;
- while (n != 0) {
- node *nn = n->copy();
- nn->next = p;
- p = nn;
- n = n->next;
- }
- while (p != 0) {
- node *pp = p->next;
- p->next = n;
- n = p;
- p = pp;
- }
- return n;
-}
-
-void delete_node_list(node *n)
-{
- while (n != 0) {
- node *tem = n;
- n = n->next;
- delete tem;
- }
-}
-
-node *dbreak_node::copy()
-{
- dbreak_node *p = new dbreak_node(copy_node_list(none), copy_node_list(pre));
- p->post = copy_node_list(post);
- return p;
-}
-
-hyphen_list *node::get_hyphen_list(hyphen_list *tail)
-{
- return tail;
-}
-
-hyphen_list *kern_pair_node::get_hyphen_list(hyphen_list *tail)
-{
- return n1->get_hyphen_list(n2->get_hyphen_list(tail));
-}
-
-class hyphen_inhibitor_node : public node {
-public:
- hyphen_inhibitor_node(node *nd = 0);
- node *copy();
- int same(node *);
- const char *type();
- int force_tprint();
- hyphenation_type get_hyphenation_type();
-};
-
-hyphen_inhibitor_node::hyphen_inhibitor_node(node *nd) : node(nd)
-{
-}
-
-node *hyphen_inhibitor_node::copy()
-{
- return new hyphen_inhibitor_node;
-}
-
-int hyphen_inhibitor_node::same(node *)
-{
- return 1;
-}
-
-const char *hyphen_inhibitor_node::type()
-{
- return "hyphen_inhibitor_node";
-}
-
-int hyphen_inhibitor_node::force_tprint()
-{
- return 0;
-}
-
-hyphenation_type hyphen_inhibitor_node::get_hyphenation_type()
-{
- return HYPHEN_INHIBIT;
-}
-
-/* add_discretionary_hyphen methods */
-
-node *dbreak_node::add_discretionary_hyphen()
-{
- if (post)
- post = post->add_discretionary_hyphen();
- if (none)
- none = none->add_discretionary_hyphen();
- return this;
-}
-
-node *node::add_discretionary_hyphen()
-{
- tfont *tf = get_tfont();
- if (!tf)
- return new hyphen_inhibitor_node(this);
- if (tf->contains(soft_hyphen_char)) {
- node *next1 = next;
- next = 0;
- node *n = copy();
- glyph_node *gn = new glyph_node(soft_hyphen_char, tf);
- node *n1 = n->merge_glyph_node(gn);
- if (n1 == 0) {
- gn->next = n;
- n1 = gn;
- }
- return new dbreak_node(this, n1, next1);
- }
- return this;
-}
-
-node *node::merge_self(node *)
-{
- return 0;
-}
-
-node *node::add_self(node *n, hyphen_list ** /*p*/)
-{
- next = n;
- return this;
-}
-
-node *kern_pair_node::add_self(node *n, hyphen_list **p)
-{
- n = n1->add_self(n, p);
- n = n2->add_self(n, p);
- n1 = n2 = 0;
- delete this;
- return n;
-}
-
-hunits node::width()
-{
- return H0;
-}
-
-node *node::last_char_node()
-{
- return 0;
-}
-
-int node::force_tprint()
-{
- return 0;
-}
-
-hunits hmotion_node::width()
-{
- return n;
-}
-
-units node::size()
-{
- return points_to_units(10);
-}
-
-hunits kern_pair_node::width()
-{
- return n1->width() + n2->width() + amount;
-}
-
-node *kern_pair_node::last_char_node()
-{
- node *nd = n2->last_char_node();
- if (nd)
- return nd;
- return n1->last_char_node();
-}
-
-hunits dbreak_node::width()
-{
- hunits x = H0;
- for (node *n = none; n != 0; n = n->next)
- x += n->width();
- return x;
-}
-
-node *dbreak_node::last_char_node()
-{
- for (node *n = none; n; n = n->next) {
- node *last = n->last_char_node();
- if (last)
- return last;
- }
- return 0;
-}
-
-hunits dbreak_node::italic_correction()
-{
- return none ? none->italic_correction() : H0;
-}
-
-hunits dbreak_node::subscript_correction()
-{
- return none ? none->subscript_correction() : H0;
-}
-
-class italic_corrected_node : public node {
- node *n;
- hunits x;
-public:
- italic_corrected_node(node *, hunits, node * = 0);
- ~italic_corrected_node();
- node *copy();
- void ascii_print(ascii_output_file *);
- void asciify(macro *);
- hunits width();
- node *last_char_node();
- void vertical_extent(vunits *, vunits *);
- int ends_sentence();
- int overlaps_horizontally();
- int overlaps_vertically();
- int same(node *);
- hyphenation_type get_hyphenation_type();
- tfont *get_tfont();
- hyphen_list *get_hyphen_list(hyphen_list *ss = 0);
- int character_type();
- void tprint(troff_output_file *);
- hunits subscript_correction();
- hunits skew();
- node *add_self(node *, hyphen_list **);
- const char *type();
- int force_tprint();
-};
-
-node *node::add_italic_correction(hunits *width)
-{
- hunits ic = italic_correction();
- if (ic.is_zero())
- return this;
- else {
- node *next1 = next;
- next = 0;
- *width += ic;
- return new italic_corrected_node(this, ic, next1);
- }
-}
-
-italic_corrected_node::italic_corrected_node(node *nn, hunits xx, node *p)
-: node(p), n(nn), x(xx)
-{
- assert(n != 0);
-}
-
-italic_corrected_node::~italic_corrected_node()
-{
- delete n;
-}
-
-node *italic_corrected_node::copy()
-{
- return new italic_corrected_node(n->copy(), x);
-}
-
-hunits italic_corrected_node::width()
-{
- return n->width() + x;
-}
-
-void italic_corrected_node::vertical_extent(vunits *min, vunits *max)
-{
- n->vertical_extent(min, max);
-}
-
-void italic_corrected_node::tprint(troff_output_file *out)
-{
- n->tprint(out);
- out->right(x);
-}
-
-hunits italic_corrected_node::skew()
-{
- return n->skew() - x/2;
-}
-
-hunits italic_corrected_node::subscript_correction()
-{
- return n->subscript_correction() - x;
-}
-
-void italic_corrected_node::ascii_print(ascii_output_file *out)
-{
- n->ascii_print(out);
-}
-
-int italic_corrected_node::ends_sentence()
-{
- return n->ends_sentence();
-}
-
-int italic_corrected_node::overlaps_horizontally()
-{
- return n->overlaps_horizontally();
-}
-
-int italic_corrected_node::overlaps_vertically()
-{
- return n->overlaps_vertically();
-}
-
-node *italic_corrected_node::last_char_node()
-{
- return n->last_char_node();
-}
-
-tfont *italic_corrected_node::get_tfont()
-{
- return n->get_tfont();
-}
-
-hyphenation_type italic_corrected_node::get_hyphenation_type()
-{
- return n->get_hyphenation_type();
-}
-
-node *italic_corrected_node::add_self(node *nd, hyphen_list **p)
-{
- nd = n->add_self(nd, p);
- hunits not_interested;
- nd = nd->add_italic_correction(&not_interested);
- n = 0;
- delete this;
- return nd;
-}
-
-hyphen_list *italic_corrected_node::get_hyphen_list(hyphen_list *tail)
-{
- return n->get_hyphen_list(tail);
-}
-
-int italic_corrected_node::character_type()
-{
- return n->character_type();
-}
-
-class break_char_node : public node {
- node *ch;
- char break_code;
-public:
- break_char_node(node *, int, node * = 0);
- ~break_char_node();
- node *copy();
- hunits width();
- vunits vertical_width();
- node *last_char_node();
- int character_type();
- int ends_sentence();
- node *add_self(node *, hyphen_list **);
- hyphen_list *get_hyphen_list(hyphen_list *s = 0);
- void tprint(troff_output_file *);
- void zero_width_tprint(troff_output_file *);
- void ascii_print(ascii_output_file *);
- void asciify(macro *);
- hyphenation_type get_hyphenation_type();
- int overlaps_vertically();
- int overlaps_horizontally();
- units size();
- tfont *get_tfont();
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-break_char_node::break_char_node(node *n, int c, node *x)
-: node(x), ch(n), break_code(c)
-{
-}
-
-break_char_node::~break_char_node()
-{
- delete ch;
-}
-
-node *break_char_node::copy()
-{
- return new break_char_node(ch->copy(), break_code);
-}
-
-hunits break_char_node::width()
-{
- return ch->width();
-}
-
-vunits break_char_node::vertical_width()
-{
- return ch->vertical_width();
-}
-
-node *break_char_node::last_char_node()
-{
- return ch->last_char_node();
-}
-
-int break_char_node::character_type()
-{
- return ch->character_type();
-}
-
-int break_char_node::ends_sentence()
-{
- return ch->ends_sentence();
-}
-
-node *break_char_node::add_self(node *n, hyphen_list **p)
-{
- assert((*p)->hyphenation_code == 0);
- if ((*p)->breakable && (break_code & 1)) {
- n = new space_node(H0, n);
- n->freeze_space();
- }
- next = n;
- n = this;
- if ((*p)->breakable && (break_code & 2)) {
- n = new space_node(H0, n);
- n->freeze_space();
- }
- hyphen_list *pp = *p;
- *p = (*p)->next;
- delete pp;
- return n;
-}
-
-hyphen_list *break_char_node::get_hyphen_list(hyphen_list *tail)
-{
- return new hyphen_list(0, tail);
-}
-
-hyphenation_type break_char_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-void break_char_node::ascii_print(ascii_output_file *ascii)
-{
- ch->ascii_print(ascii);
-}
-
-int break_char_node::overlaps_vertically()
-{
- return ch->overlaps_vertically();
-}
-
-int break_char_node::overlaps_horizontally()
-{
- return ch->overlaps_horizontally();
-}
-
-units break_char_node::size()
-{
- return ch->size();
-}
-
-tfont *break_char_node::get_tfont()
-{
- return ch->get_tfont();
-}
-
-node *extra_size_node::copy()
-{
- return new extra_size_node(n);
-}
-
-node *vertical_size_node::copy()
-{
- return new vertical_size_node(n);
-}
-
-node *hmotion_node::copy()
-{
- return new hmotion_node(n, was_tab, unformat);
-}
-
-node *space_char_hmotion_node::copy()
-{
- return new space_char_hmotion_node(n);
-}
-
-node *vmotion_node::copy()
-{
- return new vmotion_node(n);
-}
-
-node *dummy_node::copy()
-{
- return new dummy_node;
-}
-
-node *transparent_dummy_node::copy()
-{
- return new transparent_dummy_node;
-}
-
-hline_node::~hline_node()
-{
- if (n)
- delete n;
-}
-
-node *hline_node::copy()
-{
- return new hline_node(x, n ? n->copy() : 0);
-}
-
-hunits hline_node::width()
-{
- return x < H0 ? H0 : x;
-}
-
-vline_node::~vline_node()
-{
- if (n)
- delete n;
-}
-
-node *vline_node::copy()
-{
- return new vline_node(x, n ? n->copy() : 0);
-}
-
-hunits vline_node::width()
-{
- return n == 0 ? H0 : n->width();
-}
-
-zero_width_node::zero_width_node(node *nd) : n(nd)
-{
-}
-
-zero_width_node::~zero_width_node()
-{
- delete_node_list(n);
-}
-
-node *zero_width_node::copy()
-{
- return new zero_width_node(copy_node_list(n));
-}
-
-int node_list_character_type(node *p)
-{
- int t = 0;
- for (; p; p = p->next)
- t |= p->character_type();
- return t;
-}
-
-int zero_width_node::character_type()
-{
- return node_list_character_type(n);
-}
-
-void node_list_vertical_extent(node *p, vunits *min, vunits *max)
-{
- *min = V0;
- *max = V0;
- vunits cur_vpos = V0;
- vunits v1, v2;
- for (; p; p = p->next) {
- p->vertical_extent(&v1, &v2);
- v1 += cur_vpos;
- if (v1 < *min)
- *min = v1;
- v2 += cur_vpos;
- if (v2 > *max)
- *max = v2;
- cur_vpos += p->vertical_width();
- }
-}
-
-void zero_width_node::vertical_extent(vunits *min, vunits *max)
-{
- node_list_vertical_extent(n, min, max);
-}
-
-overstrike_node::overstrike_node() : list(0), max_width(H0)
-{
-}
-
-overstrike_node::~overstrike_node()
-{
- delete_node_list(list);
-}
-
-node *overstrike_node::copy()
-{
- overstrike_node *on = new overstrike_node;
- for (node *tem = list; tem; tem = tem->next)
- on->overstrike(tem->copy());
- return on;
-}
-
-void overstrike_node::overstrike(node *n)
-{
- if (n == 0)
- return;
- hunits w = n->width();
- if (w > max_width)
- max_width = w;
- node **p;
- for (p = &list; *p; p = &(*p)->next)
- ;
- n->next = 0;
- *p = n;
-}
-
-hunits overstrike_node::width()
-{
- return max_width;
-}
-
-bracket_node::bracket_node() : list(0), max_width(H0)
-{
-}
-
-bracket_node::~bracket_node()
-{
- delete_node_list(list);
-}
-
-node *bracket_node::copy()
-{
- bracket_node *on = new bracket_node;
- node *last = 0;
- node *tem;
- for (tem = list; tem; tem = tem->next) {
- if (tem->next)
- tem->next->last = tem;
- last = tem;
- }
- for (tem = last; tem; tem = tem->last)
- on->bracket(tem->copy());
- return on;
-}
-
-void bracket_node::bracket(node *n)
-{
- if (n == 0)
- return;
- hunits w = n->width();
- if (w > max_width)
- max_width = w;
- n->next = list;
- list = n;
-}
-
-hunits bracket_node::width()
-{
- return max_width;
-}
-
-int node::nspaces()
-{
- return 0;
-}
-
-int node::merge_space(hunits, hunits, hunits)
-{
- return 0;
-}
-
-#if 0
-space_node *space_node::free_list = 0;
-
-void *space_node::operator new(size_t n)
-{
- assert(n == sizeof(space_node));
- if (!free_list) {
- free_list = (space_node *)new char[sizeof(space_node)*BLOCK];
- for (int i = 0; i < BLOCK - 1; i++)
- free_list[i].next = free_list + i + 1;
- free_list[BLOCK-1].next = 0;
- }
- space_node *p = free_list;
- free_list = (space_node *)(free_list->next);
- p->next = 0;
- return p;
-}
-
-inline void space_node::operator delete(void *p)
-{
- if (p) {
- ((space_node *)p)->next = free_list;
- free_list = (space_node *)p;
- }
-}
-#endif
-
-space_node::space_node(hunits nn, node *p)
-: node(p), n(nn), set(0), was_escape_colon(0)
-{
-}
-
-space_node::space_node(hunits nn, int s, int flag, node *p)
-: node(p), n(nn), set(s), was_escape_colon(flag)
-{
-}
-
-#if 0
-space_node::~space_node()
-{
-}
-#endif
-
-node *space_node::copy()
-{
- return new space_node(n, set, was_escape_colon);
-}
-
-int space_node::force_tprint()
-{
- return 0;
-}
-
-int space_node::nspaces()
-{
- return set ? 0 : 1;
-}
-
-int space_node::merge_space(hunits h, hunits, hunits)
-{
- n += h;
- return 1;
-}
-
-hunits space_node::width()
-{
- return n;
-}
-
-void node::spread_space(int*, hunits*)
-{
-}
-
-void space_node::spread_space(int *nspaces, hunits *desired_space)
-{
- if (!set) {
- assert(*nspaces > 0);
- if (*nspaces == 1) {
- n += *desired_space;
- *desired_space = H0;
- }
- else {
- hunits extra = *desired_space / *nspaces;
- *desired_space -= extra;
- n += extra;
- }
- *nspaces -= 1;
- set = 1;
- }
-}
-
-void node::freeze_space()
-{
-}
-
-void space_node::freeze_space()
-{
- set = 1;
-}
-
-void node::is_escape_colon()
-{
-}
-
-void space_node::is_escape_colon()
-{
- was_escape_colon = 1;
-}
-
-diverted_space_node::diverted_space_node(vunits d, node *p)
-: node(p), n(d)
-{
-}
-
-node *diverted_space_node::copy()
-{
- return new diverted_space_node(n);
-}
-
-diverted_copy_file_node::diverted_copy_file_node(symbol s, node *p)
-: node(p), filename(s)
-{
-}
-
-node *diverted_copy_file_node::copy()
-{
- return new diverted_copy_file_node(filename);
-}
-
-int node::ends_sentence()
-{
- return 0;
-}
-
-int kern_pair_node::ends_sentence()
-{
- switch (n2->ends_sentence()) {
- case 0:
- return 0;
- case 1:
- return 1;
- case 2:
- break;
- default:
- assert(0);
- }
- return n1->ends_sentence();
-}
-
-int node_list_ends_sentence(node *n)
-{
- for (; n != 0; n = n->next)
- switch (n->ends_sentence()) {
- case 0:
- return 0;
- case 1:
- return 1;
- case 2:
- break;
- default:
- assert(0);
- }
- return 2;
-}
-
-int dbreak_node::ends_sentence()
-{
- return node_list_ends_sentence(none);
-}
-
-int node::overlaps_horizontally()
-{
- return 0;
-}
-
-int node::overlaps_vertically()
-{
- return 0;
-}
-
-int node::discardable()
-{
- return 0;
-}
-
-int space_node::discardable()
-{
- return set ? 0 : 1;
-}
-
-vunits node::vertical_width()
-{
- return V0;
-}
-
-vunits vline_node::vertical_width()
-{
- return x;
-}
-
-vunits vmotion_node::vertical_width()
-{
- return n;
-}
-
-int node::set_unformat_flag()
-{
- return 1;
-}
-
-int node::character_type()
-{
- return 0;
-}
-
-hunits node::subscript_correction()
-{
- return H0;
-}
-
-hunits node::italic_correction()
-{
- return H0;
-}
-
-hunits node::left_italic_correction()
-{
- return H0;
-}
-
-hunits node::skew()
-{
- return H0;
-}
-
-/* vertical_extent methods */
-
-void node::vertical_extent(vunits *min, vunits *max)
-{
- vunits v = vertical_width();
- if (v < V0) {
- *min = v;
- *max = V0;
- }
- else {
- *max = v;
- *min = V0;
- }
-}
-
-void vline_node::vertical_extent(vunits *min, vunits *max)
-{
- if (n == 0)
- node::vertical_extent(min, max);
- else {
- vunits cmin, cmax;
- n->vertical_extent(&cmin, &cmax);
- vunits h = n->size();
- if (x < V0) {
- if (-x < h) {
- *min = x;
- *max = V0;
- }
- else {
- // we print the first character and then move up, so
- *max = cmax;
- // we print the last character and then move up h
- *min = cmin + h;
- if (*min > V0)
- *min = V0;
- *min += x;
- }
- }
- else {
- if (x < h) {
- *max = x;
- *min = V0;
- }
- else {
- // we move down by h and then print the first character, so
- *min = cmin + h;
- if (*min > V0)
- *min = V0;
- *max = x + cmax;
- }
- }
- }
-}
-
-/* ascii_print methods */
-
-static void ascii_print_reverse_node_list(ascii_output_file *ascii, node *n)
-{
- if (n == 0)
- return;
- ascii_print_reverse_node_list(ascii, n->next);
- n->ascii_print(ascii);
-}
-
-void dbreak_node::ascii_print(ascii_output_file *ascii)
-{
- ascii_print_reverse_node_list(ascii, none);
-}
-
-void kern_pair_node::ascii_print(ascii_output_file *ascii)
-{
- n1->ascii_print(ascii);
- n2->ascii_print(ascii);
-}
-
-void node::ascii_print(ascii_output_file *)
-{
-}
-
-void space_node::ascii_print(ascii_output_file *ascii)
-{
- if (!n.is_zero())
- ascii->outc(' ');
-}
-
-void hmotion_node::ascii_print(ascii_output_file *ascii)
-{
- // this is pretty arbitrary
- if (n >= points_to_units(2))
- ascii->outc(' ');
-}
-
-void space_char_hmotion_node::ascii_print(ascii_output_file *ascii)
-{
- ascii->outc(' ');
-}
-
-/* asciify methods */
-
-void node::asciify(macro *m)
-{
- m->append(this);
-}
-
-void glyph_node::asciify(macro *m)
-{
- unsigned char c = ci->get_ascii_code();
- if (c != 0) {
- m->append(c);
- delete this;
- }
- else
- m->append(this);
-}
-
-void kern_pair_node::asciify(macro *m)
-{
- n1->asciify(m);
- n2->asciify(m);
- n1 = n2 = 0;
- delete this;
-}
-
-static void asciify_reverse_node_list(macro *m, node *n)
-{
- if (n == 0)
- return;
- asciify_reverse_node_list(m, n->next);
- n->asciify(m);
-}
-
-void dbreak_node::asciify(macro *m)
-{
- asciify_reverse_node_list(m, none);
- none = 0;
- delete this;
-}
-
-void ligature_node::asciify(macro *m)
-{
- n1->asciify(m);
- n2->asciify(m);
- n1 = n2 = 0;
- delete this;
-}
-
-void break_char_node::asciify(macro *m)
-{
- ch->asciify(m);
- ch = 0;
- delete this;
-}
-
-void italic_corrected_node::asciify(macro *m)
-{
- n->asciify(m);
- n = 0;
- delete this;
-}
-
-void left_italic_corrected_node::asciify(macro *m)
-{
- if (n) {
- n->asciify(m);
- n = 0;
- }
- delete this;
-}
-
-void hmotion_node::asciify(macro *m)
-{
- if (was_tab) {
- m->append('\t');
- delete this;
- }
- else
- m->append(this);
-}
-
-space_char_hmotion_node::space_char_hmotion_node(hunits i, node *next)
-: hmotion_node(i, next)
-{
-}
-
-void space_char_hmotion_node::asciify(macro *m)
-{
- m->append(ESCAPE_SPACE);
- delete this;
-}
-
-void space_node::asciify(macro *m)
-{
- if (was_escape_colon) {
- m->append(ESCAPE_COLON);
- delete this;
- }
- else
- m->append(this);
-}
-
-void word_space_node::asciify(macro *m)
-{
- for (width_list *w = orig_width; w; w = w->next)
- m->append(' ');
- delete this;
-}
-
-void unbreakable_space_node::asciify(macro *m)
-{
- m->append(ESCAPE_TILDE);
- delete this;
-}
-
-void line_start_node::asciify(macro *)
-{
- delete this;
-}
-
-void vertical_size_node::asciify(macro *)
-{
- delete this;
-}
-
-breakpoint *node::get_breakpoints(hunits /*width*/, int /*nspaces*/,
- breakpoint *rest, int /*is_inner*/)
-{
- return rest;
-}
-
-int node::nbreaks()
-{
- return 0;
-}
-
-breakpoint *space_node::get_breakpoints(hunits width, int ns, breakpoint *rest,
- int is_inner)
-{
- if (next->discardable())
- return rest;
- breakpoint *bp = new breakpoint;
- bp->next = rest;
- bp->width = width;
- bp->nspaces = ns;
- bp->hyphenated = 0;
- if (is_inner) {
- assert(rest != 0);
- bp->index = rest->index + 1;
- bp->nd = rest->nd;
- }
- else {
- bp->nd = this;
- bp->index = 0;
- }
- return bp;
-}
-
-int space_node::nbreaks()
-{
- if (next->discardable())
- return 0;
- else
- return 1;
-}
-
-static breakpoint *node_list_get_breakpoints(node *p, hunits *widthp,
- int ns, breakpoint *rest)
-{
- if (p != 0) {
- rest = p->get_breakpoints(*widthp,
- ns,
- node_list_get_breakpoints(p->next, widthp, ns,
- rest),
- 1);
- *widthp += p->width();
- }
- return rest;
-}
-
-breakpoint *dbreak_node::get_breakpoints(hunits width, int ns,
- breakpoint *rest, int is_inner)
-{
- breakpoint *bp = new breakpoint;
- bp->next = rest;
- bp->width = width;
- for (node *tem = pre; tem != 0; tem = tem->next)
- bp->width += tem->width();
- bp->nspaces = ns;
- bp->hyphenated = 1;
- if (is_inner) {
- assert(rest != 0);
- bp->index = rest->index + 1;
- bp->nd = rest->nd;
- }
- else {
- bp->nd = this;
- bp->index = 0;
- }
- return node_list_get_breakpoints(none, &width, ns, bp);
-}
-
-int dbreak_node::nbreaks()
-{
- int i = 1;
- for (node *tem = none; tem != 0; tem = tem->next)
- i += tem->nbreaks();
- return i;
-}
-
-void node::split(int /*where*/, node ** /*prep*/, node ** /*postp*/)
-{
- assert(0);
-}
-
-void space_node::split(int where, node **pre, node **post)
-{
- assert(where == 0);
- *pre = next;
- *post = 0;
- delete this;
-}
-
-static void node_list_split(node *p, int *wherep, node **prep, node **postp)
-{
- if (p == 0)
- return;
- int nb = p->nbreaks();
- node_list_split(p->next, wherep, prep, postp);
- if (*wherep < 0) {
- p->next = *postp;
- *postp = p;
- }
- else if (*wherep < nb) {
- p->next = *prep;
- p->split(*wherep, prep, postp);
- }
- else {
- p->next = *prep;
- *prep = p;
- }
- *wherep -= nb;
-}
-
-void dbreak_node::split(int where, node **prep, node **postp)
-{
- assert(where >= 0);
- if (where == 0) {
- *postp = post;
- post = 0;
- if (pre == 0)
- *prep = next;
- else {
- node *tem;
- for (tem = pre; tem->next != 0; tem = tem->next)
- ;
- tem->next = next;
- *prep = pre;
- }
- pre = 0;
- delete this;
- }
- else {
- *prep = next;
- where -= 1;
- node_list_split(none, &where, prep, postp);
- none = 0;
- delete this;
- }
-}
-
-hyphenation_type node::get_hyphenation_type()
-{
- return HYPHEN_BOUNDARY;
-}
-
-hyphenation_type dbreak_node::get_hyphenation_type()
-{
- return HYPHEN_INHIBIT;
-}
-
-hyphenation_type kern_pair_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-hyphenation_type dummy_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-hyphenation_type transparent_dummy_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-hyphenation_type hmotion_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-hyphenation_type space_char_hmotion_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-hyphenation_type overstrike_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-hyphenation_type space_node::get_hyphenation_type()
-{
- if (was_escape_colon)
- return HYPHEN_MIDDLE;
- return HYPHEN_BOUNDARY;
-}
-
-hyphenation_type unbreakable_space_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-int node::interpret(macro *)
-{
- return 0;
-}
-
-special_node::special_node(const macro &m, int n)
-: mac(m), no_init_string(n)
-{
- font_size fs = curenv->get_font_size();
- int char_height = curenv->get_char_height();
- int char_slant = curenv->get_char_slant();
- int fontno = curenv->get_font();
- tf = font_table[fontno]->get_tfont(fs, char_height, char_slant,
- fontno);
- if (curenv->is_composite())
- tf = tf->get_plain();
-}
-
-special_node::special_node(const macro &m, tfont *t, int n)
-: mac(m), tf(t), no_init_string(n)
-{
-}
-
-int special_node::same(node *n)
-{
- return ((mac == ((special_node *)n)->mac)
- && (tf == ((special_node *)n)->tf)
- && (no_init_string == ((special_node *)n)->no_init_string));
-}
-
-const char *special_node::type()
-{
- return "special_node";
-}
-
-int special_node::ends_sentence()
-{
- return 2;
-}
-
-int special_node::force_tprint()
-{
- return 0;
-}
-
-node *special_node::copy()
-{
- return new special_node(mac, tf, no_init_string);
-}
-
-void special_node::tprint_start(troff_output_file *out)
-{
- out->start_special(get_tfont(), no_init_string);
-}
-
-void special_node::tprint_char(troff_output_file *out, unsigned char c)
-{
- out->special_char(c);
-}
-
-void special_node::tprint_end(troff_output_file *out)
-{
- out->end_special();
-}
-
-tfont *special_node::get_tfont()
-{
- return tf;
-}
-
-/* suppress_node */
-
-suppress_node::suppress_node(int on_or_off, int issue_limits)
-: is_on(on_or_off), emit_limits(issue_limits), filename(0), position(0)
-{
-}
-
-suppress_node::suppress_node(symbol f, char p)
-: is_on(2), emit_limits(0), filename(f), position(p)
-{
-}
-
-suppress_node::suppress_node(int issue_limits, int on_or_off,
- symbol f, char p)
-: is_on(on_or_off), emit_limits(issue_limits), filename(f), position(p)
-{
-}
-
-int suppress_node::same(node *n)
-{
- return ((is_on == ((suppress_node *)n)->is_on)
- && (emit_limits == ((suppress_node *)n)->emit_limits)
- && (filename == ((suppress_node *)n)->filename)
- && (position == ((suppress_node *)n)->position));
-;
-}
-
-const char *suppress_node::type()
-{
- return "suppress_node";
-}
-
-node *suppress_node::copy()
-{
- return new suppress_node(emit_limits, is_on, filename, position);
-}
-
-int get_reg_int(const char *p)
-{
- reg *r = (reg *)number_reg_dictionary.lookup(p);
- units prev_value;
- if (r && (r->get_value(&prev_value)))
- return (int)prev_value;
- else
- warning(WARN_REG, "number register `%1' not defined", p);
- return 0;
-}
-
-const char *get_reg_str(const char *p)
-{
- reg *r = (reg *)number_reg_dictionary.lookup(p);
- if (r)
- return r->get_string();
- else
- warning(WARN_REG, "register `%1' not defined", p);
- return 0;
-}
-
-void suppress_node::put(troff_output_file *out, const char *s)
-{
- int i = 0;
- while (s[i] != (char)0) {
- out->special_char(s[i]);
- i++;
- }
-}
-
-/*
- * We need to remember the start of the image and its name.
- */
-
-static char last_position = 0;
-static const char *last_image_filename = 0;
-
-inline int min(int a, int b)
-{
- return a < b ? a : b;
-}
-
-/*
- * tprint - if (is_on == 2)
- * remember current position (l, r, c, i) and filename
- * else
- * if (emit_limits)
- * if (html)
- * emit image tag
- * else
- * emit postscript bounds for image
- * else
- * if (suppress boolean differs from current state)
- * alter state
- * reset registers
- * record current page
- * set low water mark.
- */
-
-void suppress_node::tprint(troff_output_file *out)
-{
- int current_page = get_reg_int("%");
- // firstly check to see whether this suppress node contains
- // an image filename & position.
- if (is_on == 2) {
- // remember position and filename
- last_position = position;
- last_image_filename = filename.contents();
- }
- else {
- // now check whether the suppress node requires us to issue limits.
- if (emit_limits) {
- char name[8192];
- image_no++;
- // remember that the filename will contain a %d in which the
- // image_no is placed
- sprintf(name, last_image_filename, image_no);
- if (is_html) {
- switch (last_position) {
- case 'c':
- out->start_special();
- put(out, "html-tag:.centered-image");
- break;
- case 'r':
- out->start_special();
- put(out, "html-tag:.right-image");
- break;
- case 'l':
- out->start_special();
- put(out, "html-tag:.left-image");
- break;
- case 'i':
- ;
- default:
- ;
- }
- out->end_special();
- out->start_special();
- put(out, "html-tag:.auto-image ");
- put(out, name);
- out->end_special();
- }
- else {
- // postscript (or other device)
- if (current_page != suppress_start_page)
- error("suppression limit registers span more than one page;\n"
- "image description %1 will be wrong", image_no);
- // remember that the filename will contain a %d in which the
- // image_no is placed
- fprintf(stderr,
- "grohtml-info:page %d %d %d %d %d %d %s %d %d %s\n",
- current_page,
- get_reg_int("opminx"), get_reg_int("opminy"),
- get_reg_int("opmaxx"), get_reg_int("opmaxy"),
- // page offset + line length
- get_reg_int(".o") + get_reg_int(".l"),
- name, hresolution, vresolution, get_reg_str(".F"));
- fflush(stderr);
- }
- }
- else {
- if (is_on)
- out->on();
- else
- out->off();
- // lastly we reset the output registers
- reset_output_registers(out->get_vpos());
- suppress_start_page = current_page;
- }
- }
-}
-
-int suppress_node::force_tprint()
-{
- return is_on;
-}
-
-hunits suppress_node::width()
-{
- return H0;
-}
-
-/* composite_node */
-
-class composite_node : public charinfo_node {
- node *n;
- tfont *tf;
-public:
- composite_node(node *, charinfo *, tfont *, node * = 0);
- ~composite_node();
- node *copy();
- hunits width();
- node *last_char_node();
- units size();
- void tprint(troff_output_file *);
- hyphenation_type get_hyphenation_type();
- void ascii_print(ascii_output_file *);
- void asciify(macro *);
- hyphen_list *get_hyphen_list(hyphen_list *tail);
- node *add_self(node *, hyphen_list **);
- tfont *get_tfont();
- int same(node *);
- const char *type();
- int force_tprint();
- void vertical_extent(vunits *, vunits *);
- vunits vertical_width();
-};
-
-composite_node::composite_node(node *p, charinfo *c, tfont *t, node *x)
-: charinfo_node(c, x), n(p), tf(t)
-{
-}
-
-composite_node::~composite_node()
-{
- delete_node_list(n);
-}
-
-node *composite_node::copy()
-{
- return new composite_node(copy_node_list(n), ci, tf);
-}
-
-hunits composite_node::width()
-{
- hunits x;
- if (tf->get_constant_space(&x))
- return x;
- x = H0;
- for (node *tem = n; tem; tem = tem->next)
- x += tem->width();
- hunits offset;
- if (tf->get_bold(&offset))
- x += offset;
- x += tf->get_track_kern();
- return x;
-}
-
-node *composite_node::last_char_node()
-{
- return this;
-}
-
-vunits composite_node::vertical_width()
-{
- vunits v = V0;
- for (node *tem = n; tem; tem = tem->next)
- v += tem->vertical_width();
- return v;
-}
-
-units composite_node::size()
-{
- return tf->get_size().to_units();
-}
-
-hyphenation_type composite_node::get_hyphenation_type()
-{
- return HYPHEN_MIDDLE;
-}
-
-void composite_node::asciify(macro *m)
-{
- unsigned char c = ci->get_ascii_code();
- if (c != 0) {
- m->append(c);
- delete this;
- }
- else
- m->append(this);
-}
-
-void composite_node::ascii_print(ascii_output_file *ascii)
-{
- unsigned char c = ci->get_ascii_code();
- if (c != 0)
- ascii->outc(c);
- else
- ascii->outs(ci->nm.contents());
-
-}
-
-hyphen_list *composite_node::get_hyphen_list(hyphen_list *tail)
-{
- return new hyphen_list(ci->get_hyphenation_code(), tail);
-}
-
-node *composite_node::add_self(node *nn, hyphen_list **p)
-{
- assert(ci->get_hyphenation_code() == (*p)->hyphenation_code);
- next = nn;
- nn = this;
- if ((*p)->hyphen)
- nn = nn->add_discretionary_hyphen();
- hyphen_list *pp = *p;
- *p = (*p)->next;
- delete pp;
- return nn;
-}
-
-tfont *composite_node::get_tfont()
-{
- return tf;
-}
-
-node *reverse_node_list(node *n)
-{
- node *r = 0;
- while (n) {
- node *tem = n;
- n = n->next;
- tem->next = r;
- r = tem;
- }
- return r;
-}
-
-void composite_node::vertical_extent(vunits *min, vunits *max)
-{
- n = reverse_node_list(n);
- node_list_vertical_extent(n, min, max);
- n = reverse_node_list(n);
-}
-
-width_list::width_list(hunits w, hunits s)
-: width(w), sentence_width(s), next(0)
-{
-}
-
-width_list::width_list(width_list *w)
-: width(w->width), sentence_width(w->sentence_width), next(0)
-{
-}
-
-word_space_node::word_space_node(hunits d, width_list *w, node *x)
-: space_node(d, x), orig_width(w), unformat(0)
-{
-}
-
-word_space_node::word_space_node(hunits d, int s, width_list *w,
- int flag, node *x)
-: space_node(d, s, 0, x), orig_width(w), unformat(flag)
-{
-}
-
-word_space_node::~word_space_node()
-{
- width_list *w = orig_width;
- while (w != 0) {
- width_list *tmp = w;
- w = w->next;
- delete tmp;
- }
-}
-
-node *word_space_node::copy()
-{
- assert(orig_width != 0);
- width_list *w_old_curr = orig_width;
- width_list *w_new_curr = new width_list(w_old_curr);
- width_list *w_new = w_new_curr;
- w_old_curr = w_old_curr->next;
- while (w_old_curr != 0) {
- w_new_curr->next = new width_list(w_old_curr);
- w_new_curr = w_new_curr->next;
- w_old_curr = w_old_curr->next;
- }
- return new word_space_node(n, set, w_new, unformat);
-}
-
-int word_space_node::set_unformat_flag()
-{
- unformat = 1;
- return 1;
-}
-
-void word_space_node::tprint(troff_output_file *out)
-{
- out->word_marker();
- space_node::tprint(out);
-}
-
-int word_space_node::merge_space(hunits h, hunits sw, hunits ssw)
-{
- n += h;
- assert(orig_width != 0);
- width_list *w = orig_width;
- for (; w->next; w = w->next)
- ;
- w->next = new width_list(sw, ssw);
- return 1;
-}
-
-unbreakable_space_node::unbreakable_space_node(hunits d, node *x)
-: word_space_node(d, 0, x)
-{
-}
-
-unbreakable_space_node::unbreakable_space_node(hunits d, int s, node *x)
-: word_space_node(d, s, 0, 0, x)
-{
-}
-
-node *unbreakable_space_node::copy()
-{
- return new unbreakable_space_node(n, set);
-}
-
-int unbreakable_space_node::force_tprint()
-{
- return 0;
-}
-
-breakpoint *unbreakable_space_node::get_breakpoints(hunits, int,
- breakpoint *rest, int)
-{
- return rest;
-}
-
-int unbreakable_space_node::nbreaks()
-{
- return 0;
-}
-
-void unbreakable_space_node::split(int, node **, node **)
-{
- assert(0);
-}
-
-int unbreakable_space_node::merge_space(hunits, hunits, hunits)
-{
- return 0;
-}
-
-hvpair::hvpair()
-{
-}
-
-draw_node::draw_node(char c, hvpair *p, int np, font_size s)
-: npoints(np), sz(s), code(c)
-{
- point = new hvpair[npoints];
- for (int i = 0; i < npoints; i++)
- point[i] = p[i];
-}
-
-int draw_node::same(node *n)
-{
- draw_node *nd = (draw_node *)n;
- if (code != nd->code || npoints != nd->npoints || sz != nd->sz)
- return 0;
- for (int i = 0; i < npoints; i++)
- if (point[i].h != nd->point[i].h || point[i].v != nd->point[i].v)
- return 0;
- return 1;
-}
-
-const char *draw_node::type()
-{
- return "draw_node";
-}
-
-int draw_node::force_tprint()
-{
- return 0;
-}
-
-draw_node::~draw_node()
-{
- if (point)
- a_delete point;
-}
-
-hunits draw_node::width()
-{
- hunits x = H0;
- for (int i = 0; i < npoints; i++)
- x += point[i].h;
- return x;
-}
-
-vunits draw_node::vertical_width()
-{
- if (code == 'e')
- return V0;
- vunits x = V0;
- for (int i = 0; i < npoints; i++)
- x += point[i].v;
- return x;
-}
-
-node *draw_node::copy()
-{
- return new draw_node(code, point, npoints, sz);
-}
-
-void draw_node::tprint(troff_output_file *out)
-{
- out->draw(code, point, npoints, sz);
-}
-
-/* tprint methods */
-
-void glyph_node::tprint(troff_output_file *out)
-{
- tfont *ptf = tf->get_plain();
- if (ptf == tf)
- out->put_char_width(ci, ptf, width(), H0);
- else {
- hunits offset;
- int bold = tf->get_bold(&offset);
- hunits w = ptf->get_width(ci);
- hunits k = H0;
- hunits x;
- int cs = tf->get_constant_space(&x);
- if (cs) {
- x -= w;
- if (bold)
- x -= offset;
- hunits x2 = x/2;
- out->right(x2);
- k = x - x2;
- }
- else
- k = tf->get_track_kern();
- if (bold) {
- out->put_char(ci, ptf);
- out->right(offset);
- }
- out->put_char_width(ci, ptf, w, k);
- }
-}
-
-void glyph_node::zero_width_tprint(troff_output_file *out)
-{
- tfont *ptf = tf->get_plain();
- hunits offset;
- int bold = tf->get_bold(&offset);
- hunits x;
- int cs = tf->get_constant_space(&x);
- if (cs) {
- x -= ptf->get_width(ci);
- if (bold)
- x -= offset;
- x = x/2;
- out->right(x);
- }
- out->put_char(ci, ptf);
- if (bold) {
- out->right(offset);
- out->put_char(ci, ptf);
- out->right(-offset);
- }
- if (cs)
- out->right(-x);
-}
-
-void break_char_node::tprint(troff_output_file *t)
-{
- ch->tprint(t);
-}
-
-void break_char_node::zero_width_tprint(troff_output_file *t)
-{
- ch->zero_width_tprint(t);
-}
-
-void hline_node::tprint(troff_output_file *out)
-{
- if (x < H0) {
- out->right(x);
- x = -x;
- }
- if (n == 0) {
- out->right(x);
- return;
- }
- hunits w = n->width();
- if (w <= H0) {
- error("horizontal line drawing character must have positive width");
- out->right(x);
- return;
- }
- int i = int(x/w);
- if (i == 0) {
- hunits xx = x - w;
- hunits xx2 = xx/2;
- out->right(xx2);
- n->tprint(out);
- out->right(xx - xx2);
- }
- else {
- hunits rem = x - w*i;
- if (rem > H0)
- if (n->overlaps_horizontally()) {
- n->tprint(out);
- out->right(rem - w);
- }
- else
- out->right(rem);
- while (--i >= 0)
- n->tprint(out);
- }
-}
-
-void vline_node::tprint(troff_output_file *out)
-{
- if (n == 0) {
- out->down(x);
- return;
- }
- vunits h = n->size();
- int overlaps = n->overlaps_vertically();
- vunits y = x;
- if (y < V0) {
- y = -y;
- int i = y / h;
- vunits rem = y - i*h;
- if (i == 0) {
- out->right(n->width());
- out->down(-rem);
- }
- else {
- while (--i > 0) {
- n->zero_width_tprint(out);
- out->down(-h);
- }
- if (overlaps) {
- n->zero_width_tprint(out);
- out->down(-rem);
- n->tprint(out);
- out->down(-h);
- }
- else {
- n->tprint(out);
- out->down(-h - rem);
- }
- }
- }
- else {
- int i = y / h;
- vunits rem = y - i*h;
- if (i == 0) {
- out->down(rem);
- out->right(n->width());
- }
- else {
- out->down(h);
- if (overlaps)
- n->zero_width_tprint(out);
- out->down(rem);
- while (--i > 0) {
- n->zero_width_tprint(out);
- out->down(h);
- }
- n->tprint(out);
- }
- }
-}
-
-void zero_width_node::tprint(troff_output_file *out)
-{
- if (!n)
- return;
- if (!n->next) {
- n->zero_width_tprint(out);
- return;
- }
- int hpos = out->get_hpos();
- int vpos = out->get_vpos();
- node *tem = n;
- while (tem) {
- tem->tprint(out);
- tem = tem->next;
- }
- out->moveto(hpos, vpos);
-}
-
-void overstrike_node::tprint(troff_output_file *out)
-{
- hunits pos = H0;
- for (node *tem = list; tem; tem = tem->next) {
- hunits x = (max_width - tem->width())/2;
- out->right(x - pos);
- pos = x;
- tem->zero_width_tprint(out);
- }
- out->right(max_width - pos);
-}
-
-void bracket_node::tprint(troff_output_file *out)
-{
- if (list == 0)
- return;
- int npieces = 0;
- node *tem;
- for (tem = list; tem; tem = tem->next)
- ++npieces;
- vunits h = list->size();
- vunits totalh = h*npieces;
- vunits y = (totalh - h)/2;
- out->down(y);
- for (tem = list; tem; tem = tem->next) {
- tem->zero_width_tprint(out);
- out->down(-h);
- }
- out->right(max_width);
- out->down(totalh - y);
-}
-
-void node::tprint(troff_output_file *)
-{
-}
-
-void node::zero_width_tprint(troff_output_file *out)
-{
- int hpos = out->get_hpos();
- int vpos = out->get_vpos();
- tprint(out);
- out->moveto(hpos, vpos);
-}
-
-void space_node::tprint(troff_output_file *out)
-{
- out->right(n);
-}
-
-void hmotion_node::tprint(troff_output_file *out)
-{
- out->right(n);
-}
-
-void vmotion_node::tprint(troff_output_file *out)
-{
- out->down(n);
-}
-
-void kern_pair_node::tprint(troff_output_file *out)
-{
- n1->tprint(out);
- out->right(amount);
- n2->tprint(out);
-}
-
-static void tprint_reverse_node_list(troff_output_file *out, node *n)
-{
- if (n == 0)
- return;
- tprint_reverse_node_list(out, n->next);
- n->tprint(out);
-}
-
-void dbreak_node::tprint(troff_output_file *out)
-{
- tprint_reverse_node_list(out, none);
-}
-
-void composite_node::tprint(troff_output_file *out)
-{
- hunits bold_offset;
- int is_bold = tf->get_bold(&bold_offset);
- hunits track_kern = tf->get_track_kern();
- hunits constant_space;
- int is_constant_spaced = tf->get_constant_space(&constant_space);
- hunits x = H0;
- if (is_constant_spaced) {
- x = constant_space;
- for (node *tem = n; tem; tem = tem->next)
- x -= tem->width();
- if (is_bold)
- x -= bold_offset;
- hunits x2 = x/2;
- out->right(x2);
- x -= x2;
- }
- if (is_bold) {
- int hpos = out->get_hpos();
- int vpos = out->get_vpos();
- tprint_reverse_node_list(out, n);
- out->moveto(hpos, vpos);
- out->right(bold_offset);
- }
- tprint_reverse_node_list(out, n);
- if (is_constant_spaced)
- out->right(x);
- else
- out->right(track_kern);
-}
-
-node *make_composite_node(charinfo *s, environment *env)
-{
- int fontno = env_definite_font(env);
- if (fontno < 0) {
- error("no current font");
- return 0;
- }
- assert(fontno < font_table_size && font_table[fontno] != 0);
- node *n = charinfo_to_node_list(s, env);
- font_size fs = env->get_font_size();
- int char_height = env->get_char_height();
- int char_slant = env->get_char_slant();
- tfont *tf = font_table[fontno]->get_tfont(fs, char_height, char_slant,
- fontno);
- if (env->is_composite())
- tf = tf->get_plain();
- return new composite_node(n, s, tf);
-}
-
-node *make_glyph_node(charinfo *s, environment *env, int no_error_message = 0)
-{
- int fontno = env_definite_font(env);
- if (fontno < 0) {
- error("no current font");
- return 0;
- }
- assert(fontno < font_table_size && font_table[fontno] != 0);
- int fn = fontno;
- int found = font_table[fontno]->contains(s);
- if (!found) {
- if (s->numbered()) {
- if (!no_error_message)
- warning(WARN_CHAR, "can't find numbered character %1",
- s->get_number());
- return 0;
- }
- special_font_list *sf = font_table[fontno]->sf;
- while (sf != 0 && !found) {
- fn = sf->n;
- if (font_table[fn])
- found = font_table[fn]->contains(s);
- sf = sf->next;
- }
- if (!found) {
- sf = global_special_fonts;
- while (sf != 0 && !found) {
- fn = sf->n;
- if (font_table[fn])
- found = font_table[fn]->contains(s);
- sf = sf->next;
- }
- }
- if (!found
-#if 0
- && global_special_fonts == 0 && font_table[fontno]->sf == 0
-#endif
- ) {
- for (fn = 0; fn < font_table_size; fn++)
- if (font_table[fn]
- && font_table[fn]->is_special()
- && font_table[fn]->contains(s)) {
- found = 1;
- break;
- }
- }
- if (!found) {
- if (!no_error_message && s->first_time_not_found()) {
- unsigned char input_code = s->get_ascii_code();
- if (input_code != 0) {
- if (csgraph(input_code))
- warning(WARN_CHAR, "can't find character `%1'", input_code);
- else
- warning(WARN_CHAR, "can't find character with input code %1",
- int(input_code));
- }
- else if (s->nm.contents())
- warning(WARN_CHAR, "can't find special character `%1'",
- s->nm.contents());
- }
- return 0;
- }
- }
- font_size fs = env->get_font_size();
- int char_height = env->get_char_height();
- int char_slant = env->get_char_slant();
- tfont *tf = font_table[fontno]->get_tfont(fs, char_height, char_slant, fn);
- if (env->is_composite())
- tf = tf->get_plain();
- return new glyph_node(s, tf);
-}
-
-node *make_node(charinfo *ci, environment *env)
-{
- switch (ci->get_special_translation()) {
- case charinfo::TRANSLATE_SPACE:
- return new space_char_hmotion_node(env->get_space_width());
- case charinfo::TRANSLATE_STRETCHABLE_SPACE:
- return new unbreakable_space_node(env->get_space_width());
- case charinfo::TRANSLATE_DUMMY:
- return new dummy_node;
- case charinfo::TRANSLATE_HYPHEN_INDICATOR:
- error("translation to \\% ignored in this context");
- break;
- }
- charinfo *tem = ci->get_translation();
- if (tem)
- ci = tem;
- macro *mac = ci->get_macro();
- if (mac)
- return make_composite_node(ci, env);
- else
- return make_glyph_node(ci, env);
-}
-
-int character_exists(charinfo *ci, environment *env)
-{
- if (ci->get_special_translation() != charinfo::TRANSLATE_NONE)
- return 1;
- charinfo *tem = ci->get_translation();
- if (tem)
- ci = tem;
- if (ci->get_macro())
- return 1;
- node *nd = make_glyph_node(ci, env, 1);
- if (nd) {
- delete nd;
- return 1;
- }
- return 0;
-}
-
-node *node::add_char(charinfo *ci, environment *env,
- hunits *widthp, int *spacep)
-{
- node *res;
- switch (ci->get_special_translation()) {
- case charinfo::TRANSLATE_SPACE:
- res = new space_char_hmotion_node(env->get_space_width(), this);
- *widthp += res->width();
- return res;
- case charinfo::TRANSLATE_STRETCHABLE_SPACE:
- res = new unbreakable_space_node(env->get_space_width(), this);
- *widthp += res->width();
- *spacep += res->nspaces();
- return res;
- case charinfo::TRANSLATE_DUMMY:
- return new dummy_node(this);
- case charinfo::TRANSLATE_HYPHEN_INDICATOR:
- return add_discretionary_hyphen();
- }
- charinfo *tem = ci->get_translation();
- if (tem)
- ci = tem;
- macro *mac = ci->get_macro();
- if (mac) {
- res = make_composite_node(ci, env);
- if (res) {
- res->next = this;
- *widthp += res->width();
- }
- else
- return this;
- }
- else {
- node *gn = make_glyph_node(ci, env);
- if (gn == 0)
- return this;
- else {
- hunits old_width = width();
- node *p = gn->merge_self(this);
- if (p == 0) {
- *widthp += gn->width();
- gn->next = this;
- res = gn;
- }
- else {
- *widthp += p->width() - old_width;
- res = p;
- }
- }
- }
- int break_code = 0;
- if (ci->can_break_before())
- break_code = 1;
- if (ci->can_break_after())
- break_code |= 2;
- if (break_code) {
- node *next1 = res->next;
- res->next = 0;
- res = new break_char_node(res, break_code, next1);
- }
- return res;
-}
-
-#ifdef __GNUG__
-inline
-#endif
-int same_node(node *n1, node *n2)
-{
- if (n1 != 0) {
- if (n2 != 0)
- return n1->type() == n2->type() && n1->same(n2);
- else
- return 0;
- }
- else
- return n2 == 0;
-}
-
-int same_node_list(node *n1, node *n2)
-{
- while (n1 && n2) {
- if (n1->type() != n2->type() || !n1->same(n2))
- return 0;
- n1 = n1->next;
- n2 = n2->next;
- }
- return !n1 && !n2;
-}
-
-int extra_size_node::same(node *nd)
-{
- return n == ((extra_size_node *)nd)->n;
-}
-
-const char *extra_size_node::type()
-{
- return "extra_size_node";
-}
-
-int extra_size_node::force_tprint()
-{
- return 0;
-}
-
-int vertical_size_node::same(node *nd)
-{
- return n == ((vertical_size_node *)nd)->n;
-}
-
-const char *vertical_size_node::type()
-{
- return "vertical_size_node";
-}
-
-int vertical_size_node::set_unformat_flag()
-{
- return 0;
-}
-
-int vertical_size_node::force_tprint()
-{
- return 0;
-}
-
-int hmotion_node::same(node *nd)
-{
- return n == ((hmotion_node *)nd)->n;
-}
-
-const char *hmotion_node::type()
-{
- return "hmotion_node";
-}
-
-int hmotion_node::set_unformat_flag()
-{
- unformat = 1;
- return 1;
-}
-
-int hmotion_node::force_tprint()
-{
- return 0;
-}
-
-node *hmotion_node::add_self(node *n, hyphen_list **p)
-{
- next = n;
- hyphen_list *pp = *p;
- *p = (*p)->next;
- delete pp;
- return this;
-}
-
-hyphen_list *hmotion_node::get_hyphen_list(hyphen_list *tail)
-{
- return new hyphen_list(0, tail);
-}
-
-int space_char_hmotion_node::same(node *nd)
-{
- return n == ((space_char_hmotion_node *)nd)->n;
-}
-
-const char *space_char_hmotion_node::type()
-{
- return "space_char_hmotion_node";
-}
-
-int space_char_hmotion_node::force_tprint()
-{
- return 0;
-}
-
-node *space_char_hmotion_node::add_self(node *n, hyphen_list **p)
-{
- next = n;
- hyphen_list *pp = *p;
- *p = (*p)->next;
- delete pp;
- return this;
-}
-
-hyphen_list *space_char_hmotion_node::get_hyphen_list(hyphen_list *tail)
-{
- return new hyphen_list(0, tail);
-}
-
-int vmotion_node::same(node *nd)
-{
- return n == ((vmotion_node *)nd)->n;
-}
-
-const char *vmotion_node::type()
-{
- return "vmotion_node";
-}
-
-int vmotion_node::force_tprint()
-{
- return 0;
-}
-
-int hline_node::same(node *nd)
-{
- return x == ((hline_node *)nd)->x && same_node(n, ((hline_node *)nd)->n);
-}
-
-const char *hline_node::type()
-{
- return "hline_node";
-}
-
-int hline_node::force_tprint()
-{
- return 0;
-}
-
-int vline_node::same(node *nd)
-{
- return x == ((vline_node *)nd)->x && same_node(n, ((vline_node *)nd)->n);
-}
-
-const char *vline_node::type()
-{
- return "vline_node";
-}
-
-int vline_node::force_tprint()
-{
- return 0;
-}
-
-int dummy_node::same(node * /*nd*/)
-{
- return 1;
-}
-
-const char *dummy_node::type()
-{
- return "dummy_node";
-}
-
-int dummy_node::force_tprint()
-{
- return 0;
-}
-
-int transparent_dummy_node::same(node * /*nd*/)
-{
- return 1;
-}
-
-const char *transparent_dummy_node::type()
-{
- return "transparent_dummy_node";
-}
-
-int transparent_dummy_node::force_tprint()
-{
- return 0;
-}
-
-int transparent_dummy_node::ends_sentence()
-{
- return 2;
-}
-
-int zero_width_node::same(node *nd)
-{
- return same_node_list(n, ((zero_width_node *)nd)->n);
-}
-
-const char *zero_width_node::type()
-{
- return "zero_width_node";
-}
-
-int zero_width_node::force_tprint()
-{
- return 0;
-}
-
-int italic_corrected_node::same(node *nd)
-{
- return (x == ((italic_corrected_node *)nd)->x
- && same_node(n, ((italic_corrected_node *)nd)->n));
-}
-
-const char *italic_corrected_node::type()
-{
- return "italic_corrected_node";
-}
-
-int italic_corrected_node::force_tprint()
-{
- return 0;
-}
-
-left_italic_corrected_node::left_italic_corrected_node(node *x)
-: node(x), n(0)
-{
-}
-
-left_italic_corrected_node::~left_italic_corrected_node()
-{
- delete n;
-}
-
-node *left_italic_corrected_node::merge_glyph_node(glyph_node *gn)
-{
- if (n == 0) {
- hunits lic = gn->left_italic_correction();
- if (!lic.is_zero()) {
- x = lic;
- n = gn;
- return this;
- }
- }
- else {
- node *nd = n->merge_glyph_node(gn);
- if (nd) {
- n = nd;
- x = n->left_italic_correction();
- return this;
- }
- }
- return 0;
-}
-
-node *left_italic_corrected_node::copy()
-{
- left_italic_corrected_node *nd = new left_italic_corrected_node;
- if (n) {
- nd->n = n->copy();
- nd->x = x;
- }
- return nd;
-}
-
-void left_italic_corrected_node::tprint(troff_output_file *out)
-{
- if (n) {
- out->right(x);
- n->tprint(out);
- }
-}
-
-const char *left_italic_corrected_node::type()
-{
- return "left_italic_corrected_node";
-}
-
-int left_italic_corrected_node::force_tprint()
-{
- return 0;
-}
-
-int left_italic_corrected_node::same(node *nd)
-{
- return (x == ((left_italic_corrected_node *)nd)->x
- && same_node(n, ((left_italic_corrected_node *)nd)->n));
-}
-
-void left_italic_corrected_node::ascii_print(ascii_output_file *out)
-{
- if (n)
- n->ascii_print(out);
-}
-
-hunits left_italic_corrected_node::width()
-{
- return n ? n->width() + x : H0;
-}
-
-void left_italic_corrected_node::vertical_extent(vunits *min, vunits *max)
-{
- if (n)
- n->vertical_extent(min, max);
- else
- node::vertical_extent(min, max);
-}
-
-hunits left_italic_corrected_node::skew()
-{
- return n ? n->skew() + x/2 : H0;
-}
-
-hunits left_italic_corrected_node::subscript_correction()
-{
- return n ? n->subscript_correction() : H0;
-}
-
-hunits left_italic_corrected_node::italic_correction()
-{
- return n ? n->italic_correction() : H0;
-}
-
-int left_italic_corrected_node::ends_sentence()
-{
- return n ? n->ends_sentence() : 0;
-}
-
-int left_italic_corrected_node::overlaps_horizontally()
-{
- return n ? n->overlaps_horizontally() : 0;
-}
-
-int left_italic_corrected_node::overlaps_vertically()
-{
- return n ? n->overlaps_vertically() : 0;
-}
-
-node *left_italic_corrected_node::last_char_node()
-{
- return n ? n->last_char_node() : 0;
-}
-
-tfont *left_italic_corrected_node::get_tfont()
-{
- return n ? n->get_tfont() : 0;
-}
-
-hyphenation_type left_italic_corrected_node::get_hyphenation_type()
-{
- if (n)
- return n->get_hyphenation_type();
- else
- return HYPHEN_MIDDLE;
-}
-
-hyphen_list *left_italic_corrected_node::get_hyphen_list(hyphen_list *tail)
-{
- return n ? n->get_hyphen_list(tail) : tail;
-}
-
-node *left_italic_corrected_node::add_self(node *nd, hyphen_list **p)
-{
- if (n) {
- nd = new left_italic_corrected_node(nd);
- nd = n->add_self(nd, p);
- n = 0;
- delete this;
- }
- return nd;
-}
-
-int left_italic_corrected_node::character_type()
-{
- return n ? n->character_type() : 0;
-}
-
-int overstrike_node::same(node *nd)
-{
- return same_node_list(list, ((overstrike_node *)nd)->list);
-}
-
-const char *overstrike_node::type()
-{
- return "overstrike_node";
-}
-
-int overstrike_node::force_tprint()
-{
- return 0;
-}
-
-node *overstrike_node::add_self(node *n, hyphen_list **p)
-{
- next = n;
- hyphen_list *pp = *p;
- *p = (*p)->next;
- delete pp;
- return this;
-}
-
-hyphen_list *overstrike_node::get_hyphen_list(hyphen_list *tail)
-{
- return new hyphen_list(0, tail);
-}
-
-int bracket_node::same(node *nd)
-{
- return same_node_list(list, ((bracket_node *)nd)->list);
-}
-
-const char *bracket_node::type()
-{
- return "bracket_node";
-}
-
-int bracket_node::force_tprint()
-{
- return 0;
-}
-
-int composite_node::same(node *nd)
-{
- return ci == ((composite_node *)nd)->ci
- && same_node_list(n, ((composite_node *)nd)->n);
-}
-
-const char *composite_node::type()
-{
- return "composite_node";
-}
-
-int composite_node::force_tprint()
-{
- return 0;
-}
-
-int glyph_node::same(node *nd)
-{
- return ci == ((glyph_node *)nd)->ci && tf == ((glyph_node *)nd)->tf;
-}
-
-const char *glyph_node::type()
-{
- return "glyph_node";
-}
-
-int glyph_node::force_tprint()
-{
- return 0;
-}
-
-int ligature_node::same(node *nd)
-{
- return (same_node(n1, ((ligature_node *)nd)->n1)
- && same_node(n2, ((ligature_node *)nd)->n2)
- && glyph_node::same(nd));
-}
-
-const char *ligature_node::type()
-{
- return "ligature_node";
-}
-
-int ligature_node::force_tprint()
-{
- return 0;
-}
-
-int kern_pair_node::same(node *nd)
-{
- return (amount == ((kern_pair_node *)nd)->amount
- && same_node(n1, ((kern_pair_node *)nd)->n1)
- && same_node(n2, ((kern_pair_node *)nd)->n2));
-}
-
-const char *kern_pair_node::type()
-{
- return "kern_pair_node";
-}
-
-int kern_pair_node::force_tprint()
-{
- return 0;
-}
-
-int dbreak_node::same(node *nd)
-{
- return (same_node_list(none, ((dbreak_node *)nd)->none)
- && same_node_list(pre, ((dbreak_node *)nd)->pre)
- && same_node_list(post, ((dbreak_node *)nd)->post));
-}
-
-const char *dbreak_node::type()
-{
- return "dbreak_node";
-}
-
-int dbreak_node::force_tprint()
-{
- return 0;
-}
-
-int break_char_node::same(node *nd)
-{
- return (break_code == ((break_char_node *)nd)->break_code
- && same_node(ch, ((break_char_node *)nd)->ch));
-}
-
-const char *break_char_node::type()
-{
- return "break_char_node";
-}
-
-int break_char_node::force_tprint()
-{
- return 0;
-}
-
-int line_start_node::same(node * /*nd*/)
-{
- return 1;
-}
-
-const char *line_start_node::type()
-{
- return "line_start_node";
-}
-
-int line_start_node::force_tprint()
-{
- return 0;
-}
-
-int space_node::same(node *nd)
-{
- return n == ((space_node *)nd)->n && set == ((space_node *)nd)->set;
-}
-
-const char *space_node::type()
-{
- return "space_node";
-}
-
-int word_space_node::same(node *nd)
-{
- return (n == ((word_space_node *)nd)->n
- && set == ((word_space_node *)nd)->set);
-}
-
-const char *word_space_node::type()
-{
- return "word_space_node";
-}
-
-int word_space_node::force_tprint()
-{
- return 0;
-}
-
-int unbreakable_space_node::same(node *nd)
-{
- return (n == ((unbreakable_space_node *)nd)->n
- && set == ((unbreakable_space_node *)nd)->set);
-}
-
-const char *unbreakable_space_node::type()
-{
- return "unbreakable_space_node";
-}
-
-node *unbreakable_space_node::add_self(node *n, hyphen_list **p)
-{
- next = n;
- hyphen_list *pp = *p;
- *p = (*p)->next;
- delete pp;
- return this;
-}
-
-hyphen_list *unbreakable_space_node::get_hyphen_list(hyphen_list *tail)
-{
- return new hyphen_list(0, tail);
-}
-
-int diverted_space_node::same(node *nd)
-{
- return n == ((diverted_space_node *)nd)->n;
-}
-
-const char *diverted_space_node::type()
-{
- return "diverted_space_node";
-}
-
-int diverted_space_node::force_tprint()
-{
- return 0;
-}
-
-int diverted_copy_file_node::same(node *nd)
-{
- return filename == ((diverted_copy_file_node *)nd)->filename;
-}
-
-const char *diverted_copy_file_node::type()
-{
- return "diverted_copy_file_node";
-}
-
-int diverted_copy_file_node::force_tprint()
-{
- return 0;
-}
-
-// Grow the font_table so that its size is > n.
-
-static void grow_font_table(int n)
-{
- assert(n >= font_table_size);
- font_info **old_font_table = font_table;
- int old_font_table_size = font_table_size;
- font_table_size = font_table_size ? (font_table_size*3)/2 : 10;
- if (font_table_size <= n)
- font_table_size = n + 10;
- font_table = new font_info *[font_table_size];
- if (old_font_table_size)
- memcpy(font_table, old_font_table,
- old_font_table_size*sizeof(font_info *));
- a_delete old_font_table;
- for (int i = old_font_table_size; i < font_table_size; i++)
- font_table[i] = 0;
-}
-
-dictionary font_translation_dictionary(17);
-
-static symbol get_font_translation(symbol nm)
-{
- void *p = font_translation_dictionary.lookup(nm);
- return p ? symbol((char *)p) : nm;
-}
-
-dictionary font_dictionary(50);
-
-static int mount_font_no_translate(int n, symbol name, symbol external_name)
-{
- assert(n >= 0);
- // We store the address of this char in font_dictionary to indicate
- // that we've previously tried to mount the font and failed.
- static char a_char;
- font *fm = 0;
- void *p = font_dictionary.lookup(external_name);
- if (p == 0) {
- int not_found;
- fm = font::load_font(external_name.contents(), &not_found);
- if (!fm) {
- if (not_found)
- warning(WARN_FONT, "can't find font `%1'", external_name.contents());
- font_dictionary.lookup(external_name, &a_char);
- return 0;
- }
- font_dictionary.lookup(name, fm);
- }
- else if (p == &a_char) {
-#if 0
- error("invalid font `%1'", external_name.contents());
-#endif
- return 0;
- }
- else
- fm = (font*)p;
- if (n >= font_table_size) {
- if (n - font_table_size > 1000) {
- error("font position too much larger than first unused position");
- return 0;
- }
- grow_font_table(n);
- }
- else if (font_table[n] != 0)
- delete font_table[n];
- font_table[n] = new font_info(name, n, external_name, fm);
- font_family::invalidate_fontno(n);
- return 1;
-}
-
-int mount_font(int n, symbol name, symbol external_name)
-{
- assert(n >= 0);
- name = get_font_translation(name);
- if (external_name.is_null())
- external_name = name;
- else
- external_name = get_font_translation(external_name);
- return mount_font_no_translate(n, name, external_name);
-}
-
-void mount_style(int n, symbol name)
-{
- assert(n >= 0);
- if (n >= font_table_size) {
- if (n - font_table_size > 1000) {
- error("font position too much larger than first unused position");
- return;
- }
- grow_font_table(n);
- }
- else if (font_table[n] != 0)
- delete font_table[n];
- font_table[n] = new font_info(get_font_translation(name), n, NULL_SYMBOL, 0);
- font_family::invalidate_fontno(n);
-}
-
-/* global functions */
-
-void font_translate()
-{
- symbol from = get_name(1);
- if (!from.is_null()) {
- symbol to = get_name();
- if (to.is_null() || from == to)
- font_translation_dictionary.remove(from);
- else
- font_translation_dictionary.lookup(from, (void *)to.contents());
- }
- skip_line();
-}
-
-void font_position()
-{
- int n;
- if (get_integer(&n)) {
- if (n < 0)
- error("negative font position");
- else {
- symbol internal_name = get_name(1);
- if (!internal_name.is_null()) {
- symbol external_name = get_long_name(0);
- mount_font(n, internal_name, external_name); // ignore error
- }
- }
- }
- skip_line();
-}
-
-font_family::font_family(symbol s)
-: map_size(10), nm(s)
-{
- map = new int[map_size];
- for (int i = 0; i < map_size; i++)
- map[i] = -1;
-}
-
-font_family::~font_family()
-{
- a_delete map;
-}
-
-int font_family::make_definite(int i)
-{
- if (i >= 0) {
- if (i < map_size && map[i] >= 0)
- return map[i];
- else {
- if (i < font_table_size && font_table[i] != 0) {
- if (i >= map_size) {
- int old_map_size = map_size;
- int *old_map = map;
- map_size *= 3;
- map_size /= 2;
- if (i >= map_size)
- map_size = i + 10;
- map = new int[map_size];
- memcpy(map, old_map, old_map_size*sizeof(int));
- a_delete old_map;
- for (int j = old_map_size; j < map_size; j++)
- map[j] = -1;
- }
- if (font_table[i]->is_style()) {
- symbol sty = font_table[i]->get_name();
- symbol f = concat(nm, sty);
- int n;
- // don't use symbol_fontno, because that might return a style
- // and because we don't want to translate the name
- for (n = 0; n < font_table_size; n++)
- if (font_table[n] != 0 && font_table[n]->is_named(f)
- && !font_table[n]->is_style())
- break;
- if (n >= font_table_size) {
- n = next_available_font_position();
- if (!mount_font_no_translate(n, f, f))
- return -1;
- }
- return map[i] = n;
- }
- else
- return map[i] = i;
- }
- else
- return -1;
- }
- }
- else
- return -1;
-}
-
-dictionary family_dictionary(5);
-
-font_family *lookup_family(symbol nm)
-{
- font_family *f = (font_family *)family_dictionary.lookup(nm);
- if (!f) {
- f = new font_family(nm);
- (void)family_dictionary.lookup(nm, f);
- }
- return f;
-}
-
-void font_family::invalidate_fontno(int n)
-{
- assert(n >= 0 && n < font_table_size);
- dictionary_iterator iter(family_dictionary);
- symbol nm;
- font_family *fam;
- while (iter.get(&nm, (void **)&fam)) {
- int map_size = fam->map_size;
- if (n < map_size)
- fam->map[n] = -1;
- for (int i = 0; i < map_size; i++)
- if (fam->map[i] == n)
- fam->map[i] = -1;
- }
-}
-
-void style()
-{
- int n;
- if (get_integer(&n)) {
- if (n < 0)
- error("negative font position");
- else {
- symbol internal_name = get_name(1);
- if (!internal_name.is_null())
- mount_style(n, internal_name);
- }
- }
- skip_line();
-}
-
-static int get_fontno()
-{
- int n;
- tok.skip();
- if (tok.delimiter()) {
- symbol s = get_name(1);
- if (!s.is_null()) {
- n = symbol_fontno(s);
- if (n < 0) {
- n = next_available_font_position();
- if (!mount_font(n, s))
- return -1;
- }
- return curenv->get_family()->make_definite(n);
- }
- }
- else if (get_integer(&n)) {
- if (n < 0 || n >= font_table_size || font_table[n] == 0)
- error("bad font number");
- else
- return curenv->get_family()->make_definite(n);
- }
- return -1;
-}
-
-static int underline_fontno = 2;
-
-void underline_font()
-{
- int n = get_fontno();
- if (n >= 0)
- underline_fontno = n;
- skip_line();
-}
-
-int get_underline_fontno()
-{
- return underline_fontno;
-}
-
-static void read_special_fonts(special_font_list **sp)
-{
- special_font_list *s = *sp;
- *sp = 0;
- while (s != 0) {
- special_font_list *tem = s;
- s = s->next;
- delete tem;
- }
- special_font_list **p = sp;
- while (has_arg()) {
- int i = get_fontno();
- if (i >= 0) {
- special_font_list *tem = new special_font_list;
- tem->n = i;
- tem->next = 0;
- *p = tem;
- p = &(tem->next);
- }
- }
-}
-
-void font_special_request()
-{
- int n = get_fontno();
- if (n >= 0)
- read_special_fonts(&font_table[n]->sf);
- skip_line();
-}
-
-void special_request()
-{
- read_special_fonts(&global_special_fonts);
- skip_line();
-}
-
-int next_available_font_position()
-{
- int i;
- for (i = 1; i < font_table_size && font_table[i] != 0; i++)
- ;
- return i;
-}
-
-int symbol_fontno(symbol s)
-{
- s = get_font_translation(s);
- for (int i = 0; i < font_table_size; i++)
- if (font_table[i] != 0 && font_table[i]->is_named(s))
- return i;
- return -1;
-}
-
-int is_good_fontno(int n)
-{
- return n >= 0 && n < font_table_size && font_table[n] != NULL;
-}
-
-int get_bold_fontno(int n)
-{
- if (n >= 0 && n < font_table_size && font_table[n] != 0) {
- hunits offset;
- if (font_table[n]->get_bold(&offset))
- return offset.to_units() + 1;
- else
- return 0;
- }
- else
- return 0;
-}
-
-hunits env_digit_width(environment *env)
-{
- node *n = make_glyph_node(charset_table['0'], env);
- if (n) {
- hunits x = n->width();
- delete n;
- return x;
- }
- else
- return H0;
-}
-
-hunits env_space_width(environment *env)
-{
- int fn = env_definite_font(env);
- font_size fs = env->get_font_size();
- if (fn < 0 || fn >= font_table_size || font_table[fn] == 0)
- return scale(fs.to_units()/3, env->get_space_size(), 12);
- else
- return font_table[fn]->get_space_width(fs, env->get_space_size());
-}
-
-hunits env_sentence_space_width(environment *env)
-{
- int fn = env_definite_font(env);
- font_size fs = env->get_font_size();
- if (fn < 0 || fn >= font_table_size || font_table[fn] == 0)
- return scale(fs.to_units()/3, env->get_sentence_space_size(), 12);
- else
- return font_table[fn]->get_space_width(fs, env->get_sentence_space_size());
-}
-
-hunits env_half_narrow_space_width(environment *env)
-{
- int fn = env_definite_font(env);
- font_size fs = env->get_font_size();
- if (fn < 0 || fn >= font_table_size || font_table[fn] == 0)
- return 0;
- else
- return font_table[fn]->get_half_narrow_space_width(fs);
-}
-
-hunits env_narrow_space_width(environment *env)
-{
- int fn = env_definite_font(env);
- font_size fs = env->get_font_size();
- if (fn < 0 || fn >= font_table_size || font_table[fn] == 0)
- return 0;
- else
- return font_table[fn]->get_narrow_space_width(fs);
-}
-
-void bold_font()
-{
- int n = get_fontno();
- if (n >= 0) {
- if (has_arg()) {
- if (tok.delimiter()) {
- int f = get_fontno();
- if (f >= 0) {
- units offset;
- if (has_arg() && get_number(&offset, 'u') && offset >= 1)
- font_table[f]->set_conditional_bold(n, hunits(offset - 1));
- else
- font_table[f]->conditional_unbold(n);
- }
- }
- else {
- units offset;
- if (get_number(&offset, 'u') && offset >= 1)
- font_table[n]->set_bold(hunits(offset - 1));
- else
- font_table[n]->unbold();
- }
- }
- else
- font_table[n]->unbold();
- }
- skip_line();
-}
-
-track_kerning_function::track_kerning_function() : non_zero(0)
-{
-}
-
-track_kerning_function::track_kerning_function(int min_s, hunits min_a,
- int max_s, hunits max_a)
-: non_zero(1), min_size(min_s), min_amount(min_a), max_size(max_s),
- max_amount(max_a)
-{
-}
-
-int track_kerning_function::operator==(const track_kerning_function &tk)
-{
- if (non_zero)
- return (tk.non_zero
- && min_size == tk.min_size
- && min_amount == tk.min_amount
- && max_size == tk.max_size
- && max_amount == tk.max_amount);
- else
- return !tk.non_zero;
-}
-
-int track_kerning_function::operator!=(const track_kerning_function &tk)
-{
- if (non_zero)
- return (!tk.non_zero
- || min_size != tk.min_size
- || min_amount != tk.min_amount
- || max_size != tk.max_size
- || max_amount != tk.max_amount);
- else
- return tk.non_zero;
-}
-
-hunits track_kerning_function::compute(int size)
-{
- if (non_zero) {
- if (max_size <= min_size)
- return min_amount;
- else if (size <= min_size)
- return min_amount;
- else if (size >= max_size)
- return max_amount;
- else
- return (scale(max_amount, size - min_size, max_size - min_size)
- + scale(min_amount, max_size - size, max_size - min_size));
- }
- else
- return H0;
-}
-
-void track_kern()
-{
- int n = get_fontno();
- if (n >= 0) {
- int min_s, max_s;
- hunits min_a, max_a;
- if (has_arg()
- && get_number(&min_s, 'z')
- && get_hunits(&min_a, 'p')
- && get_number(&max_s, 'z')
- && get_hunits(&max_a, 'p')) {
- track_kerning_function tk(min_s, min_a, max_s, max_a);
- font_table[n]->set_track_kern(tk);
- }
- else {
- track_kerning_function tk;
- font_table[n]->set_track_kern(tk);
- }
- }
- skip_line();
-}
-
-void constant_space()
-{
- int n = get_fontno();
- if (n >= 0) {
- int x, y;
- if (!has_arg() || !get_integer(&x))
- font_table[n]->set_constant_space(CONSTANT_SPACE_NONE);
- else {
- if (!has_arg() || !get_number(&y, 'z'))
- font_table[n]->set_constant_space(CONSTANT_SPACE_RELATIVE, x);
- else
- font_table[n]->set_constant_space(CONSTANT_SPACE_ABSOLUTE,
- scale(y*x,
- units_per_inch,
- 36*72*sizescale));
- }
- }
- skip_line();
-}
-
-void ligature()
-{
- int lig;
- if (has_arg() && get_integer(&lig) && lig >= 0 && lig <= 2)
- global_ligature_mode = lig;
- else
- global_ligature_mode = 1;
- skip_line();
-}
-
-void kern_request()
-{
- int k;
- if (has_arg() && get_integer(&k))
- global_kern_mode = k != 0;
- else
- global_kern_mode = 1;
- skip_line();
-}
-
-void set_soft_hyphen_char()
-{
- soft_hyphen_char = get_optional_char();
- if (!soft_hyphen_char)
- soft_hyphen_char = get_charinfo(HYPHEN_SYMBOL);
- skip_line();
-}
-
-void init_output()
-{
- if (suppress_output_flag)
- the_output = new suppress_output_file;
- else if (ascii_output_flag)
- the_output = new ascii_output_file;
- else
- the_output = new troff_output_file;
-}
-
-class next_available_font_position_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *next_available_font_position_reg::get_string()
-{
- return i_to_a(next_available_font_position());
-}
-
-class printing_reg : public reg {
-public:
- const char *get_string();
-};
-
-const char *printing_reg::get_string()
-{
- if (the_output)
- return the_output->is_printing() ? "1" : "0";
- else
- return "0";
-}
-
-void init_node_requests()
-{
- init_request("fp", font_position);
- init_request("sty", style);
- init_request("cs", constant_space);
- init_request("bd", bold_font);
- init_request("uf", underline_font);
- init_request("lg", ligature);
- init_request("kern", kern_request);
- init_request("tkf", track_kern);
- init_request("special", special_request);
- init_request("fspecial", font_special_request);
- init_request("ftr", font_translate);
- init_request("shc", set_soft_hyphen_char);
- number_reg_dictionary.define(".fp", new next_available_font_position_reg);
- number_reg_dictionary.define(".kern",
- new constant_int_reg(&global_kern_mode));
- number_reg_dictionary.define(".lg",
- new constant_int_reg(&global_ligature_mode));
- number_reg_dictionary.define(".P", new printing_reg);
- soft_hyphen_char = get_charinfo(HYPHEN_SYMBOL);
-}
diff --git a/contrib/groff/src/roff/troff/node.h b/contrib/groff/src/roff/troff/node.h
deleted file mode 100644
index 3e5f61595abd..000000000000
--- a/contrib/groff/src/roff/troff/node.h
+++ /dev/null
@@ -1,584 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-struct hyphen_list {
- unsigned char hyphen;
- unsigned char breakable;
- unsigned char hyphenation_code;
- hyphen_list *next;
- hyphen_list(unsigned char code, hyphen_list *p = 0);
-};
-
-void hyphenate(hyphen_list *, unsigned);
-
-enum hyphenation_type { HYPHEN_MIDDLE, HYPHEN_BOUNDARY, HYPHEN_INHIBIT };
-
-class ascii_output_file;
-
-struct breakpoint;
-struct vertical_size;
-struct charinfo;
-
-class macro;
-
-class troff_output_file;
-class tfont;
-class environment;
-
-class glyph_node;
-class diverted_space_node;
-class token_node;
-
-struct node {
- node *next;
- node *last;
- node();
- node(node *n);
- node *add_char(charinfo *c, environment *, hunits *widthp, int *spacep);
-
- virtual ~node();
- virtual node *copy() = 0;
- virtual int set_unformat_flag();
- virtual int force_tprint() = 0;
- virtual hunits width();
- virtual hunits subscript_correction();
- virtual hunits italic_correction();
- virtual hunits left_italic_correction();
- virtual hunits skew();
- virtual int nspaces();
- virtual int merge_space(hunits, hunits, hunits);
- virtual vunits vertical_width();
- virtual node *last_char_node();
- virtual void vertical_extent(vunits *min, vunits *max);
- virtual int character_type();
- virtual void set_vertical_size(vertical_size *);
- virtual int ends_sentence();
- virtual node *merge_self(node *);
- virtual node *add_discretionary_hyphen();
- virtual node *add_self(node *, hyphen_list **);
- virtual hyphen_list *get_hyphen_list(hyphen_list *s = 0);
- virtual void ascii_print(ascii_output_file *);
- virtual void asciify(macro *);
- virtual int discardable();
- virtual void spread_space(int *, hunits *);
- virtual void freeze_space();
- virtual void is_escape_colon();
- virtual breakpoint *get_breakpoints(hunits width, int nspaces,
- breakpoint *rest = 0,
- int is_inner = 0);
- virtual int nbreaks();
- virtual void split(int, node **, node **);
- virtual hyphenation_type get_hyphenation_type();
- virtual int reread(int *);
- virtual token_node *get_token_node();
- virtual int overlaps_vertically();
- virtual int overlaps_horizontally();
- virtual units size();
- virtual int interpret(macro *);
-
- virtual node *merge_glyph_node(glyph_node *);
- virtual tfont *get_tfont();
- virtual void tprint(troff_output_file *);
- virtual void zero_width_tprint(troff_output_file *);
-
- node *add_italic_correction(hunits *);
-
- virtual int same(node *) = 0;
- virtual const char *type() = 0;
-};
-
-inline node::node() : next(0)
-{
-}
-
-inline node::node(node *n) : next(n)
-{
-}
-
-inline node::~node()
-{
-}
-
-// 0 means it doesn't, 1 means it does, 2 means it's transparent
-
-int node_list_ends_sentence(node *);
-
-struct breakpoint {
- breakpoint *next;
- hunits width;
- int nspaces;
- node *nd;
- int index;
- char hyphenated;
-};
-
-class line_start_node : public node {
-public:
- line_start_node() {}
- node *copy() { return new line_start_node; }
- int same(node *);
- int force_tprint();
- const char *type();
- void asciify(macro *);
-};
-
-class space_node : public node {
-private:
-#if 0
- enum { BLOCK = 1024 };
- static space_node *free_list;
- void operator delete(void *);
-#endif
-protected:
- hunits n;
- char set;
- char was_escape_colon;
- space_node(hunits, int, int, node * = 0);
-public:
- space_node(hunits d, node *p = 0);
-#if 0
- ~space_node();
- void *operator new(size_t);
-#endif
- node *copy();
- int nspaces();
- hunits width();
- int discardable();
- int merge_space(hunits, hunits, hunits);
- void freeze_space();
- void is_escape_colon();
- void spread_space(int *, hunits *);
- void tprint(troff_output_file *);
- breakpoint *get_breakpoints(hunits width, int nspaces, breakpoint *rest = 0,
- int is_inner = 0);
- int nbreaks();
- void split(int, node **, node **);
- void ascii_print(ascii_output_file *);
- int same(node *);
- void asciify(macro *);
- const char *type();
- int force_tprint();
- hyphenation_type get_hyphenation_type();
-};
-
-struct width_list {
- width_list *next;
- hunits width;
- hunits sentence_width;
- width_list(hunits, hunits);
- width_list(width_list *);
-};
-
-class word_space_node : public space_node {
-protected:
- width_list *orig_width;
- unsigned char unformat;
- word_space_node(hunits, int, width_list *, int, node * = 0);
-public:
- word_space_node(hunits, width_list *, node * = 0);
- ~word_space_node();
- node *copy();
- int reread(int *);
- int set_unformat_flag();
- void tprint(troff_output_file *);
- int same(node *);
- void asciify(macro *);
- const char *type();
- int merge_space(hunits, hunits, hunits);
- int force_tprint();
-};
-
-class unbreakable_space_node : public word_space_node {
- unbreakable_space_node(hunits, int, node * = 0);
-public:
- unbreakable_space_node(hunits, node * = 0);
- node *copy();
- int reread(int *);
- int same(node *);
- void asciify(macro *);
- const char *type();
- int force_tprint();
- breakpoint *get_breakpoints(hunits width, int nspaces, breakpoint *rest = 0,
- int is_inner = 0);
- int nbreaks();
- void split(int, node **, node **);
- int merge_space(hunits, hunits, hunits);
- node *add_self(node *, hyphen_list **);
- hyphen_list *get_hyphen_list(hyphen_list *ss = 0);
- hyphenation_type get_hyphenation_type();
-};
-
-class diverted_space_node : public node {
-public:
- vunits n;
- diverted_space_node(vunits d, node *p = 0);
- node *copy();
- int reread(int *);
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-class diverted_copy_file_node : public node {
- symbol filename;
-public:
- vunits n;
- diverted_copy_file_node(symbol s, node *p = 0);
- node *copy();
- int reread(int *);
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-class extra_size_node : public node {
- vunits n;
-public:
- extra_size_node(vunits i) : n(i) {}
- void set_vertical_size(vertical_size *);
- node *copy();
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-class vertical_size_node : public node {
- vunits n;
-public:
- vertical_size_node(vunits i) : n(i) {}
- void set_vertical_size(vertical_size *);
- void asciify(macro *);
- node *copy();
- int set_unformat_flag();
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-class hmotion_node : public node {
-protected:
- hunits n;
- unsigned char was_tab;
- unsigned char unformat;
-public:
- hmotion_node(hunits i, node *next = 0)
- : node(next), n(i), was_tab(0), unformat(0) {}
- hmotion_node(hunits i, int flag1, int flag2, node *next = 0)
- : node(next), n(i), was_tab(flag1), unformat(flag2) {}
- node *copy();
- int reread(int *);
- int set_unformat_flag();
- void asciify(macro *);
- void tprint(troff_output_file *);
- hunits width();
- void ascii_print(ascii_output_file *);
- int same(node *);
- const char *type();
- int force_tprint();
- node *add_self(node *, hyphen_list **);
- hyphen_list *get_hyphen_list(hyphen_list *ss = 0);
- hyphenation_type get_hyphenation_type();
-};
-
-class space_char_hmotion_node : public hmotion_node {
-public:
- space_char_hmotion_node(hunits i, node *next = 0);
- node *copy();
- void ascii_print(ascii_output_file *);
- void asciify(macro *);
- int same(node *);
- const char *type();
- int force_tprint();
- node *add_self(node *, hyphen_list **);
- hyphen_list *get_hyphen_list(hyphen_list *ss = 0);
- hyphenation_type get_hyphenation_type();
-};
-
-class vmotion_node : public node {
- vunits n;
-public:
- vmotion_node(vunits i) : n(i) {}
- void tprint(troff_output_file *);
- node *copy();
- vunits vertical_width();
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-class hline_node : public node {
- hunits x;
- node *n;
-public:
- hline_node(hunits i, node *c, node *next = 0) : node(next), x(i), n(c) {}
- ~hline_node();
- node *copy();
- hunits width();
- void tprint(troff_output_file *);
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-class vline_node : public node {
- vunits x;
- node *n;
-public:
- vline_node(vunits i, node *c, node *next= 0) : node(next), x(i), n(c) {}
- ~vline_node();
- node *copy();
- void tprint(troff_output_file *);
- hunits width();
- vunits vertical_width();
- void vertical_extent(vunits *, vunits *);
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-
-class dummy_node : public node {
-public:
- dummy_node(node *nd = 0) : node(nd) {}
- node *copy();
- int same(node *);
- const char *type();
- int force_tprint();
- hyphenation_type get_hyphenation_type();
-};
-
-class transparent_dummy_node : public node {
-public:
- transparent_dummy_node(node *nd = 0) : node(nd) {}
- node *copy();
- int same(node *);
- const char *type();
- int force_tprint();
- int ends_sentence();
- hyphenation_type get_hyphenation_type();
-};
-
-class zero_width_node : public node {
- node *n;
-public:
- zero_width_node(node *gn);
- ~zero_width_node();
- node *copy();
- void tprint(troff_output_file *);
- int same(node *);
- const char *type();
- int force_tprint();
- void append(node *);
- int character_type();
- void vertical_extent(vunits *min, vunits *max);
-};
-
-class left_italic_corrected_node : public node {
- node *n;
- hunits x;
-public:
- left_italic_corrected_node(node * = 0);
- ~left_italic_corrected_node();
- void tprint(troff_output_file *);
- void ascii_print(ascii_output_file *);
- void asciify(macro *);
- node *copy();
- int same(node *);
- const char *type();
- int force_tprint();
- hunits width();
- node *last_char_node();
- void vertical_extent(vunits *, vunits *);
- int ends_sentence();
- int overlaps_horizontally();
- int overlaps_vertically();
- hyphenation_type get_hyphenation_type();
- tfont *get_tfont();
- int character_type();
- hunits skew();
- hunits italic_correction();
- hunits subscript_correction();
- hyphen_list *get_hyphen_list(hyphen_list *ss = 0);
- node *add_self(node *, hyphen_list **);
- node *merge_glyph_node(glyph_node *);
-};
-
-class overstrike_node : public node {
- node *list;
- hunits max_width;
-public:
- overstrike_node();
- ~overstrike_node();
- node *copy();
- void tprint(troff_output_file *);
- void overstrike(node *); // add another node to be overstruck
- hunits width();
- int same(node *);
- const char *type();
- int force_tprint();
- node *add_self(node *, hyphen_list **);
- hyphen_list *get_hyphen_list(hyphen_list *ss = 0);
- hyphenation_type get_hyphenation_type();
-};
-
-class bracket_node : public node {
- node *list;
- hunits max_width;
-public:
- bracket_node();
- ~bracket_node();
- node *copy();
- void tprint(troff_output_file *);
- void bracket(node *); // add another node to be overstruck
- hunits width();
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-class special_node : public node {
- macro mac;
- tfont *tf;
- int no_init_string;
- void tprint_start(troff_output_file *);
- void tprint_char(troff_output_file *, unsigned char);
- void tprint_end(troff_output_file *);
-public:
- special_node(const macro &, int = 0);
- special_node(const macro &, tfont *, int = 0);
- node *copy();
- void tprint(troff_output_file *);
- int same(node *);
- const char *type();
- int force_tprint();
- int ends_sentence();
- tfont *get_tfont();
-};
-
-class suppress_node : public node {
- int is_on;
- int emit_limits; // must we issue the extent of the area written out?
- symbol filename;
- char position;
-public:
- suppress_node(int, int);
- suppress_node(symbol f, char p);
- suppress_node(int, int, symbol f, char p);
- node *copy();
- void tprint(troff_output_file *);
- hunits width();
- int same(node *);
- const char *type();
- int force_tprint();
-private:
- void put(troff_output_file *out, const char *s);
-};
-
-struct hvpair {
- hunits h;
- vunits v;
- hvpair();
-};
-
-class draw_node : public node {
- int npoints;
- font_size sz;
- char code;
- hvpair *point;
-public:
- draw_node(char, hvpair *, int, font_size);
- ~draw_node();
- hunits width();
- vunits vertical_width();
- node *copy();
- void tprint(troff_output_file *);
- int same(node *);
- const char *type();
- int force_tprint();
-};
-
-class charinfo;
-node *make_node(charinfo *ci, environment *);
-int character_exists(charinfo *, environment *);
-
-int same_node_list(node *n1, node *n2);
-node *reverse_node_list(node *n);
-void delete_node_list(node *);
-node *copy_node_list(node *);
-
-int get_bold_fontno(int f);
-
-inline hyphen_list::hyphen_list(unsigned char code, hyphen_list *p)
-: hyphen(0), breakable(0), hyphenation_code(code), next(p)
-{
-}
-
-extern void read_desc();
-extern int mount_font(int n, symbol, symbol = NULL_SYMBOL);
-extern void mount_style(int n, symbol);
-extern int is_good_fontno(int n);
-extern int symbol_fontno(symbol);
-extern int next_available_font_position();
-extern void init_size_table(int *);
-extern int get_underline_fontno();
-
-class output_file {
- char make_g_plus_plus_shut_up;
-public:
- output_file();
- virtual ~output_file();
- virtual void trailer(vunits page_length);
- virtual void flush() = 0;
- virtual void transparent_char(unsigned char) = 0;
- virtual void print_line(hunits x, vunits y, node *n,
- vunits before, vunits after, hunits width) = 0;
- virtual void begin_page(int pageno, vunits page_length) = 0;
- virtual void copy_file(hunits x, vunits y, const char *filename) = 0;
- virtual int is_printing() = 0;
- virtual void put_filename(const char *filename);
- virtual void on();
- virtual void off();
-#ifdef COLUMN
- virtual void vjustify(vunits, symbol);
-#endif /* COLUMN */
-};
-
-#ifndef POPEN_MISSING
-extern char *pipe_command;
-#endif
-
-extern output_file *the_output;
-extern void init_output();
-int in_output_page_list(int n);
-
-class font_family {
- int *map;
- int map_size;
-public:
- const symbol nm;
- font_family(symbol);
- ~font_family();
- int make_definite(int);
- static void invalidate_fontno(int);
-};
-
-font_family *lookup_family(symbol);
diff --git a/contrib/groff/src/roff/troff/number.cc b/contrib/groff/src/roff/troff/number.cc
deleted file mode 100644
index 539384286da5..000000000000
--- a/contrib/groff/src/roff/troff/number.cc
+++ /dev/null
@@ -1,692 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-#include "troff.h"
-#include "symbol.h"
-#include "hvunits.h"
-#include "env.h"
-#include "token.h"
-#include "div.h"
-
-vunits V0;
-hunits H0;
-
-int hresolution = 1;
-int vresolution = 1;
-int units_per_inch;
-int sizescale;
-
-static int parse_expr(units *v, int scale_indicator,
- int parenthesised, int rigid = 0);
-static int start_number();
-
-int get_vunits(vunits *res, unsigned char si)
-{
- if (!start_number())
- return 0;
- units x;
- if (parse_expr(&x, si, 0)) {
- *res = vunits(x);
- return 1;
- }
- else
- return 0;
-}
-
-int get_hunits(hunits *res, unsigned char si)
-{
- if (!start_number())
- return 0;
- units x;
- if (parse_expr(&x, si, 0)) {
- *res = hunits(x);
- return 1;
- }
- else
- return 0;
-}
-
-// for \B
-
-int get_number_rigidly(units *res, unsigned char si)
-{
- if (!start_number())
- return 0;
- units x;
- if (parse_expr(&x, si, 0, 1)) {
- *res = x;
- return 1;
- }
- else
- return 0;
-}
-
-int get_number(units *res, unsigned char si)
-{
- if (!start_number())
- return 0;
- units x;
- if (parse_expr(&x, si, 0)) {
- *res = x;
- return 1;
- }
- else
- return 0;
-}
-
-int get_integer(int *res)
-{
- if (!start_number())
- return 0;
- units x;
- if (parse_expr(&x, 0, 0)) {
- *res = x;
- return 1;
- }
- else
- return 0;
-}
-
-enum incr_number_result { BAD, ABSOLUTE, INCREMENT, DECREMENT };
-
-static incr_number_result get_incr_number(units *res, unsigned char);
-
-int get_vunits(vunits *res, unsigned char si, vunits prev_value)
-{
- units v;
- switch (get_incr_number(&v, si)) {
- case BAD:
- return 0;
- case ABSOLUTE:
- *res = v;
- break;
- case INCREMENT:
- *res = prev_value + v;
- break;
- case DECREMENT:
- *res = prev_value - v;
- break;
- default:
- assert(0);
- }
- return 1;
-}
-
-int get_hunits(hunits *res, unsigned char si, hunits prev_value)
-{
- units v;
- switch (get_incr_number(&v, si)) {
- case BAD:
- return 0;
- case ABSOLUTE:
- *res = v;
- break;
- case INCREMENT:
- *res = prev_value + v;
- break;
- case DECREMENT:
- *res = prev_value - v;
- break;
- default:
- assert(0);
- }
- return 1;
-}
-
-int get_number(units *res, unsigned char si, units prev_value)
-{
- units v;
- switch (get_incr_number(&v, si)) {
- case BAD:
- return 0;
- case ABSOLUTE:
- *res = v;
- break;
- case INCREMENT:
- *res = prev_value + v;
- break;
- case DECREMENT:
- *res = prev_value - v;
- break;
- default:
- assert(0);
- }
- return 1;
-}
-
-int get_integer(int *res, int prev_value)
-{
- units v;
- switch (get_incr_number(&v, 0)) {
- case BAD:
- return 0;
- case ABSOLUTE:
- *res = v;
- break;
- case INCREMENT:
- *res = prev_value + int(v);
- break;
- case DECREMENT:
- *res = prev_value - int(v);
- break;
- default:
- assert(0);
- }
- return 1;
-}
-
-
-static incr_number_result get_incr_number(units *res, unsigned char si)
-{
- if (!start_number())
- return BAD;
- incr_number_result result = ABSOLUTE;
- if (tok.ch() == '+') {
- tok.next();
- result = INCREMENT;
- }
- else if (tok.ch() == '-') {
- tok.next();
- result = DECREMENT;
- }
- if (parse_expr(res, si, 0))
- return result;
- else
- return BAD;
-}
-
-static int start_number()
-{
- while (tok.space())
- tok.next();
- if (tok.newline()) {
- warning(WARN_MISSING, "missing number");
- return 0;
- }
- if (tok.tab()) {
- warning(WARN_TAB, "tab character where number expected");
- return 0;
- }
- if (tok.right_brace()) {
- warning(WARN_RIGHT_BRACE, "`\\}' where number expected");
- return 0;
- }
- return 1;
-}
-
-enum { OP_LEQ = 'L', OP_GEQ = 'G', OP_MAX = 'X', OP_MIN = 'N' };
-
-#define SCALE_INDICATOR_CHARS "icPmnpuvMsz"
-
-static int parse_term(units *v, int scale_indicator,
- int parenthesised, int rigid);
-
-static int parse_expr(units *v, int scale_indicator,
- int parenthesised, int rigid)
-{
- int result = parse_term(v, scale_indicator, parenthesised, rigid);
- while (result) {
- if (parenthesised)
- tok.skip();
- int op = tok.ch();
- switch (op) {
- case '+':
- case '-':
- case '/':
- case '*':
- case '%':
- case ':':
- case '&':
- tok.next();
- break;
- case '>':
- tok.next();
- if (tok.ch() == '=') {
- tok.next();
- op = OP_GEQ;
- }
- else if (tok.ch() == '?') {
- tok.next();
- op = OP_MAX;
- }
- break;
- case '<':
- tok.next();
- if (tok.ch() == '=') {
- tok.next();
- op = OP_LEQ;
- }
- else if (tok.ch() == '?') {
- tok.next();
- op = OP_MIN;
- }
- break;
- case '=':
- tok.next();
- if (tok.ch() == '=')
- tok.next();
- break;
- default:
- return result;
- }
- units v2;
- if (!parse_term(&v2, scale_indicator, parenthesised, rigid))
- return 0;
- int overflow = 0;
- switch (op) {
- case '<':
- *v = *v < v2;
- break;
- case '>':
- *v = *v > v2;
- break;
- case OP_LEQ:
- *v = *v <= v2;
- break;
- case OP_GEQ:
- *v = *v >= v2;
- break;
- case OP_MIN:
- if (*v > v2)
- *v = v2;
- break;
- case OP_MAX:
- if (*v < v2)
- *v = v2;
- break;
- case '=':
- *v = *v == v2;
- break;
- case '&':
- *v = *v > 0 && v2 > 0;
- break;
- case ':':
- *v = *v > 0 || v2 > 0;
- case '+':
- if (v2 < 0) {
- if (*v < INT_MIN - v2)
- overflow = 1;
- }
- else if (v2 > 0) {
- if (*v > INT_MAX - v2)
- overflow = 1;
- }
- if (overflow) {
- error("addition overflow");
- return 0;
- }
- *v += v2;
- break;
- case '-':
- if (v2 < 0) {
- if (*v > INT_MAX + v2)
- overflow = 1;
- }
- else if (v2 > 0) {
- if (*v < INT_MIN + v2)
- overflow = 1;
- }
- if (overflow) {
- error("subtraction overflow");
- return 0;
- }
- *v -= v2;
- break;
- case '*':
- if (v2 < 0) {
- if (*v > 0) {
- if (*v > -(unsigned)INT_MIN / -(unsigned)v2)
- overflow = 1;
- }
- else if (-(unsigned)*v > INT_MAX / -(unsigned)v2)
- overflow = 1;
- }
- else if (v2 > 0) {
- if (*v > 0) {
- if (*v > INT_MAX / v2)
- overflow = 1;
- }
- else if (-(unsigned)*v > -(unsigned)INT_MIN / v2)
- overflow = 1;
- }
- if (overflow) {
- error("multiplication overflow");
- return 0;
- }
- *v *= v2;
- break;
- case '/':
- if (v2 == 0) {
- error("division by zero");
- return 0;
- }
- *v /= v2;
- break;
- case '%':
- if (v2 == 0) {
- error("modulus by zero");
- return 0;
- }
- *v %= v2;
- break;
- default:
- assert(0);
- }
- }
- return result;
-}
-
-static int parse_term(units *v, int scale_indicator,
- int parenthesised, int rigid)
-{
- int negative = 0;
- for (;;)
- if (parenthesised && tok.space())
- tok.next();
- else if (tok.ch() == '+')
- tok.next();
- else if (tok.ch() == '-') {
- tok.next();
- negative = !negative;
- }
- else
- break;
- unsigned char c = tok.ch();
- switch (c) {
- case '|':
- // | is not restricted to the outermost level
- // tbl uses this
- tok.next();
- if (!parse_term(v, scale_indicator, parenthesised, rigid))
- return 0;
- int tem;
- tem = (scale_indicator == 'v'
- ? curdiv->get_vertical_position().to_units()
- : curenv->get_input_line_position().to_units());
- if (tem >= 0) {
- if (*v < INT_MIN + tem) {
- error("numeric overflow");
- return 0;
- }
- }
- else {
- if (*v > INT_MAX + tem) {
- error("numeric overflow");
- return 0;
- }
- }
- *v -= tem;
- if (negative) {
- if (*v == INT_MIN) {
- error("numeric overflow");
- return 0;
- }
- *v = -*v;
- }
- return 1;
- case '(':
- tok.next();
- c = tok.ch();
- if (c == ')') {
- if (rigid)
- return 0;
- warning(WARN_SYNTAX, "empty parentheses");
- tok.next();
- *v = 0;
- return 1;
- }
- else if (c != 0 && strchr(SCALE_INDICATOR_CHARS, c) != 0) {
- tok.next();
- if (tok.ch() == ';') {
- tok.next();
- scale_indicator = c;
- }
- else {
- error("expected `;' after scale-indicator (got %1)",
- tok.description());
- return 0;
- }
- }
- else if (c == ';') {
- scale_indicator = 0;
- tok.next();
- }
- if (!parse_expr(v, scale_indicator, 1, rigid))
- return 0;
- tok.skip();
- if (tok.ch() != ')') {
- if (rigid)
- return 0;
- warning(WARN_SYNTAX, "missing `)' (got %1)", tok.description());
- }
- else
- tok.next();
- if (negative) {
- if (*v == INT_MIN) {
- error("numeric overflow");
- return 0;
- }
- *v = -*v;
- }
- return 1;
- case '.':
- *v = 0;
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- *v = 0;
- do {
- if (*v > INT_MAX/10) {
- error("numeric overflow");
- return 0;
- }
- *v *= 10;
- if (*v > INT_MAX - (int(c) - '0')) {
- error("numeric overflow");
- return 0;
- }
- *v += c - '0';
- tok.next();
- c = tok.ch();
- } while (csdigit(c));
- break;
- case '/':
- case '*':
- case '%':
- case ':':
- case '&':
- case '>':
- case '<':
- case '=':
- warning(WARN_SYNTAX, "empty left operand");
- *v = 0;
- return rigid ? 0 : 1;
- default:
- warning(WARN_NUMBER, "numeric expression expected (got %1)",
- tok.description());
- return 0;
- }
- int divisor = 1;
- if (tok.ch() == '.') {
- tok.next();
- for (;;) {
- c = tok.ch();
- if (!csdigit(c))
- break;
- // we may multiply the divisor by 254 later on
- if (divisor <= INT_MAX/2540 && *v <= (INT_MAX - 9)/10) {
- *v *= 10;
- *v += c - '0';
- divisor *= 10;
- }
- tok.next();
- }
- }
- int si = scale_indicator;
- int do_next = 0;
- if ((c = tok.ch()) != 0 && strchr(SCALE_INDICATOR_CHARS, c) != 0) {
- switch (scale_indicator) {
- case 'z':
- if (c != 'u' && c != 'z') {
- warning(WARN_SCALE,
- "only `z' and `u' scale indicators valid in this context");
- break;
- }
- si = c;
- break;
- case 0:
- warning(WARN_SCALE, "scale indicator invalid in this context");
- break;
- case 'u':
- si = c;
- break;
- default:
- if (c == 'z') {
- warning(WARN_SCALE, "`z' scale indicator invalid in this context");
- break;
- }
- si = c;
- break;
- }
- // Don't do tok.next() here because the next token might be \s, which
- // would affect the interpretation of m.
- do_next = 1;
- }
- switch (si) {
- case 'i':
- *v = scale(*v, units_per_inch, divisor);
- break;
- case 'c':
- *v = scale(*v, units_per_inch*100, divisor*254);
- break;
- case 0:
- case 'u':
- if (divisor != 1)
- *v /= divisor;
- break;
- case 'p':
- *v = scale(*v, units_per_inch, divisor*72);
- break;
- case 'P':
- *v = scale(*v, units_per_inch, divisor*6);
- break;
- case 'm':
- {
- // Convert to hunits so that with -Tascii `m' behaves as in nroff.
- hunits em = curenv->get_size();
- *v = scale(*v, em.is_zero() ? hresolution : em.to_units(), divisor);
- }
- break;
- case 'M':
- {
- hunits em = curenv->get_size();
- *v = scale(*v, em.is_zero() ? hresolution : em.to_units(), divisor*100);
- }
- break;
- case 'n':
- {
- // Convert to hunits so that with -Tascii `n' behaves as in nroff.
- hunits en = curenv->get_size()/2;
- *v = scale(*v, en.is_zero() ? hresolution : en.to_units(), divisor);
- }
- break;
- case 'v':
- *v = scale(*v, curenv->get_vertical_spacing().to_units(), divisor);
- break;
- case 's':
- while (divisor > INT_MAX/(sizescale*72)) {
- divisor /= 10;
- *v /= 10;
- }
- *v = scale(*v, units_per_inch, divisor*sizescale*72);
- break;
- case 'z':
- *v = scale(*v, sizescale, divisor);
- break;
- default:
- assert(0);
- }
- if (do_next)
- tok.next();
- if (negative) {
- if (*v == INT_MIN) {
- error("numeric overflow");
- return 0;
- }
- *v = -*v;
- }
- return 1;
-}
-
-units scale(units n, units x, units y)
-{
- assert(x >= 0 && y > 0);
- if (x == 0)
- return 0;
- if (n >= 0) {
- if (n <= INT_MAX/x)
- return (n*x)/y;
- }
- else {
- if (-(unsigned)n <= -(unsigned)INT_MIN/x)
- return (n*x)/y;
- }
- double res = n*double(x)/double(y);
- if (res > INT_MAX) {
- error("numeric overflow");
- return INT_MAX;
- }
- else if (res < INT_MIN) {
- error("numeric overflow");
- return INT_MIN;
- }
- return int(res);
-}
-
-vunits::vunits(units x)
-{
- // don't depend on the rounding direction for division of negative integers
- if (vresolution == 1)
- n = x;
- else
- n = (x < 0
- ? -((-x + vresolution/2 - 1)/vresolution)
- : (x + vresolution/2 - 1)/vresolution);
-}
-
-hunits::hunits(units x)
-{
- // don't depend on the rounding direction for division of negative integers
- if (hresolution == 1)
- n = x;
- else
- n = (x < 0
- ? -((-x + hresolution/2 - 1)/hresolution)
- : (x + hresolution/2 - 1)/hresolution);
-}
diff --git a/contrib/groff/src/roff/troff/reg.cc b/contrib/groff/src/roff/troff/reg.cc
deleted file mode 100644
index 254b0ff4311a..000000000000
--- a/contrib/groff/src/roff/troff/reg.cc
+++ /dev/null
@@ -1,473 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "troff.h"
-#include "symbol.h"
-#include "dictionary.h"
-#include "token.h"
-#include "request.h"
-#include "reg.h"
-
-object_dictionary number_reg_dictionary(101);
-
-int reg::get_value(units * /*d*/)
-{
- return 0;
-}
-
-void reg::increment()
-{
- error("can't increment read-only register");
-}
-
-void reg::decrement()
-{
- error("can't decrement read-only register");
-}
-
-void reg::set_increment(units /*n*/)
-{
- error("can't auto increment read-only register");
-}
-
-void reg::alter_format(char /*f*/, int /*w*/)
-{
- error("can't alter format of read-only register");
-}
-
-const char *reg::get_format()
-{
- return "0";
-}
-
-void reg::set_value(units /*n*/)
-{
- error("can't write read-only register");
-}
-
-general_reg::general_reg() : format('1'), width(0), inc(0)
-{
-}
-
-static char uppercase_array[] = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
- 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
- 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
- 'Y', 'Z',
-};
-
-static char lowercase_array[] = {
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',
- 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
- 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
- 'y', 'z',
-};
-
-static const char *number_value_to_ascii(int value, char format, int width)
-{
- static char buf[128]; // must be at least 21
- switch(format) {
- case '1':
- if (width <= 0)
- return i_to_a(value);
- else if (width > sizeof(buf) - 2)
- sprintf(buf, "%.*d", int(sizeof(buf) - 2), int(value));
- else
- sprintf(buf, "%.*d", width, int(value));
- break;
- case 'i':
- case 'I':
- {
- char *p = buf;
- // troff uses z and w to represent 10000 and 5000 in Roman
- // numerals; I can find no historical basis for this usage
- const char *s = format == 'i' ? "zwmdclxvi" : "ZWMDCLXVI";
- int n = int(value);
- if (n >= 40000 || n <= -40000) {
- error("magnitude of `%1' too big for i or I format", n);
- return i_to_a(n);
- }
- if (n == 0) {
- *p++ = '0';
- *p = 0;
- break;
- }
- if (n < 0) {
- *p++ = '-';
- n = -n;
- }
- while (n >= 10000) {
- *p++ = s[0];
- n -= 10000;
- }
- for (int i = 1000; i > 0; i /= 10, s += 2) {
- int m = n/i;
- n -= m*i;
- switch (m) {
- case 3:
- *p++ = s[2];
- /* falls through */
- case 2:
- *p++ = s[2];
- /* falls through */
- case 1:
- *p++ = s[2];
- break;
- case 4:
- *p++ = s[2];
- *p++ = s[1];
- break;
- case 8:
- *p++ = s[1];
- *p++ = s[2];
- *p++ = s[2];
- *p++ = s[2];
- break;
- case 7:
- *p++ = s[1];
- *p++ = s[2];
- *p++ = s[2];
- break;
- case 6:
- *p++ = s[1];
- *p++ = s[2];
- break;
- case 5:
- *p++ = s[1];
- break;
- case 9:
- *p++ = s[2];
- *p++ = s[0];
- }
- }
- *p = 0;
- break;
- }
- case 'a':
- case 'A':
- {
- int n = value;
- char *p = buf;
- if (n == 0) {
- *p++ = '0';
- *p = 0;
- }
- else {
- if (n < 0) {
- n = -n;
- *p++ = '-';
- }
- // this is a bit tricky
- while (n > 0) {
- int d = n % 26;
- if (d == 0)
- d = 26;
- n -= d;
- n /= 26;
- *p++ = format == 'a' ? lowercase_array[d - 1] :
- uppercase_array[d - 1];
- }
- *p-- = 0;
- char *q = buf[0] == '-' ? buf + 1 : buf;
- while (q < p) {
- char temp = *q;
- *q = *p;
- *p = temp;
- --p;
- ++q;
- }
- }
- break;
- }
- default:
- assert(0);
- break;
- }
- return buf;
-}
-
-const char *general_reg::get_string()
-{
- units n;
- if (!get_value(&n))
- return "";
- return number_value_to_ascii(n, format, width);
-}
-
-
-void general_reg::increment()
-{
- int n;
- if (get_value(&n))
- set_value(n + inc);
-}
-
-void general_reg::decrement()
-{
- int n;
- if (get_value(&n))
- set_value(n - inc);
-}
-
-void general_reg::set_increment(units n)
-{
- inc = n;
-}
-
-void general_reg::alter_format(char f, int w)
-{
- format = f;
- width = w;
-}
-
-static const char *number_format_to_ascii(char format, int width)
-{
- static char buf[24];
- if (format == '1') {
- if (width > 0) {
- int n = width;
- if (n > int(sizeof(buf)) - 1)
- n = int(sizeof(buf)) - 1;
- sprintf(buf, "%.*d", n, 0);
- return buf;
- }
- else
- return "0";
- }
- else {
- buf[0] = format;
- buf[1] = '\0';
- return buf;
- }
-}
-
-const char *general_reg::get_format()
-{
- return number_format_to_ascii(format, width);
-}
-
-class number_reg : public general_reg {
- units value;
-public:
- number_reg();
- int get_value(units *);
- void set_value(units);
-};
-
-number_reg::number_reg() : value(0)
-{
-}
-
-int number_reg::get_value(units *res)
-{
- *res = value;
- return 1;
-}
-
-void number_reg::set_value(units n)
-{
- value = n;
-}
-
-variable_reg::variable_reg(units *p) : ptr(p)
-{
-}
-
-void variable_reg::set_value(units n)
-{
- *ptr = n;
-}
-
-int variable_reg::get_value(units *res)
-{
- *res = *ptr;
- return 1;
-}
-
-void define_number_reg()
-{
- symbol nm = get_name(1);
- if (nm.is_null()) {
- skip_line();
- return;
- }
- reg *r = (reg *)number_reg_dictionary.lookup(nm);
- units v;
- units prev_value;
- if (!r || !r->get_value(&prev_value))
- prev_value = 0;
- if (get_number(&v, 'u', prev_value)) {
- if (r == 0) {
- r = new number_reg;
- number_reg_dictionary.define(nm, r);
- }
- r->set_value(v);
- if (tok.space() && has_arg() && get_number(&v, 'u'))
- r->set_increment(v);
- }
- skip_line();
-}
-
-#if 0
-void inline_define_reg()
-{
- token start;
- start.next();
- if (!start.delimiter(1))
- return;
- tok.next();
- symbol nm = get_name(1);
- if (nm.is_null())
- return;
- reg *r = (reg *)number_reg_dictionary.lookup(nm);
- if (r == 0) {
- r = new number_reg;
- number_reg_dictionary.define(nm, r);
- }
- units v;
- units prev_value;
- if (!r->get_value(&prev_value))
- prev_value = 0;
- if (get_number(&v, 'u', prev_value)) {
- r->set_value(v);
- if (start != tok) {
- if (get_number(&v, 'u')) {
- r->set_increment(v);
- if (start != tok)
- warning(WARN_DELIM, "closing delimiter does not match");
- }
- }
- }
-}
-#endif
-
-void set_number_reg(symbol nm, units n)
-{
- reg *r = (reg *)number_reg_dictionary.lookup(nm);
- if (r == 0) {
- r = new number_reg;
- number_reg_dictionary.define(nm, r);
- }
- r->set_value(n);
-}
-
-reg *lookup_number_reg(symbol nm)
-{
- reg *r = (reg *)number_reg_dictionary.lookup(nm);
- if (r == 0) {
- warning(WARN_REG, "number register `%1' not defined", nm.contents());
- r = new number_reg;
- number_reg_dictionary.define(nm, r);
- }
- return r;
-}
-
-void alter_format()
-{
- symbol nm = get_name(1);
- if (nm.is_null()) {
- skip_line();
- return;
- }
- reg *r = (reg *)number_reg_dictionary.lookup(nm);
- if (r == 0) {
- r = new number_reg;
- number_reg_dictionary.define(nm, r);
- }
- tok.skip();
- char c = tok.ch();
- if (csdigit(c)) {
- int n = 0;
- do {
- ++n;
- tok.next();
- } while (csdigit(tok.ch()));
- r->alter_format('1', n);
- }
- else if (c == 'i' || c == 'I' || c == 'a' || c == 'A')
- r->alter_format(c);
- else if (tok.newline() || tok.eof())
- warning(WARN_MISSING, "missing number register format");
- else
- error("bad number register format (got %1)", tok.description());
- skip_line();
-}
-
-void remove_reg()
-{
- for (;;) {
- symbol s = get_name();
- if (s.is_null())
- break;
- number_reg_dictionary.remove(s);
- }
- skip_line();
-}
-
-void alias_reg()
-{
- symbol s1 = get_name(1);
- if (!s1.is_null()) {
- symbol s2 = get_name(1);
- if (!s2.is_null()) {
- if (!number_reg_dictionary.alias(s1, s2))
- warning(WARN_REG, "number register `%1' not defined", s2.contents());
- }
- }
- skip_line();
-}
-
-void rename_reg()
-{
- symbol s1 = get_name(1);
- if (!s1.is_null()) {
- symbol s2 = get_name(1);
- if (!s2.is_null())
- number_reg_dictionary.rename(s1, s2);
- }
- skip_line();
-}
-
-void print_number_regs()
-{
- object_dictionary_iterator iter(number_reg_dictionary);
- reg *r;
- symbol s;
- while (iter.get(&s, (object **)&r)) {
- assert(!s.is_null());
- errprint("%1\t", s.contents());
- const char *p = r->get_string();
- if (p)
- errprint(p);
- errprint("\n");
- }
- fflush(stderr);
- skip_line();
-}
-
-void init_reg_requests()
-{
- init_request("rr", remove_reg);
- init_request("nr", define_number_reg);
- init_request("af", alter_format);
- init_request("aln", alias_reg);
- init_request("rnn", rename_reg);
- init_request("pnr", print_number_regs);
-}
diff --git a/contrib/groff/src/roff/troff/reg.h b/contrib/groff/src/roff/troff/reg.h
deleted file mode 100644
index 8d403d442801..000000000000
--- a/contrib/groff/src/roff/troff/reg.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-class reg : public object {
-public:
- virtual const char *get_string() = 0;
- virtual int get_value(units *);
- virtual void increment();
- virtual void decrement();
- virtual void set_increment(units);
- virtual void alter_format(char f, int w = 0);
- virtual const char *get_format();
- virtual void set_value(units);
-};
-
-class constant_int_reg : public reg {
- int *p;
-public:
- constant_int_reg(int *);
- const char *get_string();
-};
-
-class general_reg : public reg {
- char format;
- int width;
- int inc;
-public:
- general_reg();
- const char *get_string();
- void increment();
- void decrement();
- void alter_format(char f, int w = 0);
- void set_increment(units);
- const char *get_format();
- void add_value(units);
-
- void set_value(units) = 0;
- int get_value(units *) = 0;
-};
-
-class variable_reg : public general_reg {
- units *ptr;
-public:
- variable_reg(int *);
- void set_value(units);
- int get_value(units *);
-};
-
-extern object_dictionary number_reg_dictionary;
-extern void set_number_reg(symbol nm, units n);
-extern void check_output_limits(int x, int y);
-extern void reset_output_registers (int miny);
-
-reg *lookup_number_reg(symbol);
-#if 0
-void inline_define_reg();
-#endif
diff --git a/contrib/groff/src/roff/troff/request.h b/contrib/groff/src/roff/troff/request.h
deleted file mode 100644
index 5654b8308572..000000000000
--- a/contrib/groff/src/roff/troff/request.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-typedef void (*REQUEST_FUNCP)();
-
-class macro;
-
-class request_or_macro : public object {
-public:
- request_or_macro();
- virtual void invoke(symbol s) = 0;
- virtual macro *to_macro();
-};
-
-class request : public request_or_macro {
- REQUEST_FUNCP p;
-public:
- void invoke(symbol);
- request(REQUEST_FUNCP);
-};
-
-void delete_request_or_macro(request_or_macro *);
-
-extern object_dictionary request_dictionary;
-
-struct macro_header;
-struct node;
-
-class macro : public request_or_macro {
- macro_header *p;
- const char *filename; // where was it defined?
- int lineno;
- int length;
-public:
- macro();
- ~macro();
- macro(const macro &);
- macro &operator=(const macro &);
- void append(unsigned char);
- void append(node *);
- void append_unsigned(unsigned int i);
- void append_int(int i);
- void append_str(const char *);
- void invoke(symbol);
- macro *to_macro();
- void print_size();
- int empty();
- friend class string_iterator;
- friend void chop_macro();
- friend void substring_macro();
- friend int operator==(const macro &, const macro &);
-};
-
-extern void init_input_requests();
-extern void init_markup_requests();
-extern void init_div_requests();
-extern void init_node_requests();
-extern void init_reg_requests();
-extern void init_env_requests();
-extern void init_hyphen_requests();
-extern void init_request(const char *s, REQUEST_FUNCP f);
-
-class charinfo;
-class environment;
-
-node *charinfo_to_node_list(charinfo *, const environment *);
diff --git a/contrib/groff/src/roff/troff/symbol.cc b/contrib/groff/src/roff/troff/symbol.cc
deleted file mode 100644
index ce09e393dfbe..000000000000
--- a/contrib/groff/src/roff/troff/symbol.cc
+++ /dev/null
@@ -1,150 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-#include "troff.h"
-#include "symbol.h"
-
-const char **symbol::table = 0;
-int symbol::table_used = 0;
-int symbol::table_size = 0;
-char *symbol::block = 0;
-int symbol::block_size = 0;
-
-const symbol NULL_SYMBOL;
-
-#ifdef BLOCK_SIZE
-#undef BLOCK_SIZE
-#endif
-
-const int BLOCK_SIZE = 1024;
-// the table will increase in size as necessary
-// the size will be chosen from the following array
-// add some more if you want
-// I think it unlikely that we'll need more than a million symbols
-static const unsigned int table_sizes[] = {
-101, 503, 1009, 2003, 3001, 4001, 5003, 10007, 20011, 40009, 80021, 160001, 500009, 1000003, 0
-};
-const double FULL_MAX = 0.3; // don't let the table get more than this full
-
-static unsigned int hash_string(const char *p)
-{
- // compute a hash code; this assumes 32-bit unsigned ints
- // see p436 of Compilers by Aho, Sethi & Ullman
- // give special treatment to two-character names
- unsigned int hc = 0, g;
- if (*p != 0) {
- hc = *p++;
- if (*p != 0) {
- hc <<= 7;
- hc += *p++;
- for (; *p != 0; p++) {
- hc <<= 4;
- hc += *p;
- if ((g = (hc & 0xf0000000)) == 0) {
- hc ^= g >> 24;
- hc ^= g;
- }
- }
- }
- }
- return hc;
-}
-
-// Tell compiler that a variable is intentionally unused.
-inline void unused(void *) { }
-
-symbol::symbol(const char *p, int how)
-{
- if (p == 0 || *p == 0) {
- s = 0;
- return;
- }
- if (table == 0) {
- table_size = table_sizes[0];
- table = (const char **)new char*[table_size];
- for (int i = 0; i < table_size; i++)
- table[i] = 0;
- table_used = 0;
- }
- unsigned int hc = hash_string(p);
- const char **pp;
- for (pp = table + hc % table_size;
- *pp != 0;
- (pp == table ? pp = table + table_size - 1 : --pp))
- if (strcmp(p, *pp) == 0) {
- s = *pp;
- return;
- }
- if (how == MUST_ALREADY_EXIST) {
- s = 0;
- return;
- }
- if (table_used >= table_size - 1 || table_used >= table_size*FULL_MAX) {
- const char **old_table = table;
- unsigned int old_table_size = table_size;
- int i;
- for (i = 1; table_sizes[i] <= old_table_size; i++)
- if (table_sizes[i] == 0)
- fatal("too many symbols");
- table_size = table_sizes[i];
- table_used = 0;
- table = (const char **)new char*[table_size];
- for (i = 0; i < table_size; i++)
- table[i] = 0;
- for (pp = old_table + old_table_size - 1;
- pp >= old_table;
- --pp) {
- symbol temp(*pp, 1); /* insert it into the new table */
- unused(&temp);
- }
- a_delete old_table;
- for (pp = table + hc % table_size;
- *pp != 0;
- (pp == table ? pp = table + table_size - 1 : --pp))
- ;
- }
- ++table_used;
- if (how == DONT_STORE) {
- s = *pp = p;
- }
- else {
- int len = strlen(p)+1;
- if (block == 0 || block_size < len) {
- block_size = len > BLOCK_SIZE ? len : BLOCK_SIZE;
- block = new char [block_size];
- }
- (void)strcpy(block, p);
- s = *pp = block;
- block += len;
- block_size -= len;
- }
-}
-
-symbol concat(symbol s1, symbol s2)
-{
- char *buf = new char [strlen(s1.contents()) + strlen(s2.contents()) + 1];
- strcpy(buf, s1.contents());
- strcat(buf, s2.contents());
- symbol res(buf);
- a_delete buf;
- return res;
-}
-
diff --git a/contrib/groff/src/roff/troff/symbol.h b/contrib/groff/src/roff/troff/symbol.h
deleted file mode 100644
index 88e0fff394c7..000000000000
--- a/contrib/groff/src/roff/troff/symbol.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#define DONT_STORE 1
-#define MUST_ALREADY_EXIST 2
-
-class symbol {
- static const char **table;
- static int table_used;
- static int table_size;
- static char *block;
- static int block_size;
- const char *s;
-public:
- symbol(const char *p, int how = 0);
- symbol();
- unsigned long hash() const;
- int operator ==(symbol) const;
- int operator !=(symbol) const;
- const char *contents() const;
- int is_null() const;
-};
-
-
-extern const symbol NULL_SYMBOL;
-
-inline symbol::symbol() : s(0)
-{
-}
-
-inline int symbol::operator==(symbol p) const
-{
- return s == p.s;
-}
-
-inline int symbol::operator!=(symbol p) const
-{
- return s != p.s;
-}
-
-inline unsigned long symbol::hash() const
-{
- return (unsigned long)s;
-}
-
-inline const char *symbol::contents() const
-{
- return s;
-}
-
-inline int symbol::is_null() const
-{
- return s == 0;
-}
-
-symbol concat(symbol, symbol);
diff --git a/contrib/groff/src/roff/troff/token.h b/contrib/groff/src/roff/troff/token.h
deleted file mode 100644
index 40283adb5861..000000000000
--- a/contrib/groff/src/roff/troff/token.h
+++ /dev/null
@@ -1,218 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-struct charinfo;
-struct node;
-struct vunits;
-
-class token {
- symbol nm;
- node *nd;
- unsigned char c;
- int val;
- units dim;
- enum token_type {
- TOKEN_BACKSPACE,
- TOKEN_BEGIN_TRAP,
- TOKEN_CHAR, // a normal printing character
- TOKEN_DUMMY, // \&
- TOKEN_EMPTY, // this is the initial value
- TOKEN_END_TRAP,
- TOKEN_ESCAPE, // \e
- TOKEN_HYPHEN_INDICATOR,
- TOKEN_INTERRUPT, // \c
- TOKEN_ITALIC_CORRECTION, // \/
- TOKEN_LEADER, // ^A
- TOKEN_LEFT_BRACE,
- TOKEN_MARK_INPUT, // \k -- `nm' is the name of the register
- TOKEN_NEWLINE, // newline
- TOKEN_NODE,
- TOKEN_NUMBERED_CHAR,
- TOKEN_PAGE_EJECTOR,
- TOKEN_REQUEST,
- TOKEN_RIGHT_BRACE,
- TOKEN_SPACE, // ` ' -- ordinary space
- TOKEN_SPECIAL, // a special character -- \' \` \- \(xx
- TOKEN_SPREAD, // \p -- break and spread output line
- TOKEN_STRETCHABLE_SPACE, // \~
- TOKEN_TAB, // tab
- TOKEN_TRANSPARENT, // \!
- TOKEN_TRANSPARENT_DUMMY, // \)
- TOKEN_EOF // end of file
- } type;
-public:
- token();
- ~token();
- token(const token &);
- void operator=(const token &);
- void next();
- void process();
- void skip();
- int eof();
- int nspaces(); // 1 if space, 2 if double space, 0 otherwise
- int space(); // is the current token a space?
- int stretchable_space(); // is the current token a stretchable space?
- int white_space(); // is the current token space or tab?
- int special(); // is the current token a special character?
- int newline(); // is the current token a newline?
- int tab(); // is the current token a tab?
- int leader();
- int backspace();
- int delimiter(int warn = 0); // is it suitable for use as a delimiter?
- int dummy();
- int transparent_dummy();
- int transparent();
- int left_brace();
- int right_brace();
- int page_ejector();
- int hyphen_indicator();
- int operator==(const token &); // need this for delimiters, and for conditions
- int operator!=(const token &); // ditto
- unsigned char ch();
- charinfo *get_char(int required = 0);
- int add_to_node_list(node **);
- int title();
- void make_space();
- void make_newline();
- const char *description();
-
- friend void process_input_stack();
-};
-
-extern token tok; // the current token
-
-extern symbol get_name(int required = 0);
-extern symbol get_long_name(int required = 0);
-extern charinfo *get_optional_char();
-extern void check_missing_character();
-extern void skip_line();
-extern void handle_initial_title();
-
-struct hunits;
-extern void read_title_parts(node **part, hunits *part_width);
-
-extern int get_number_rigidly(units *result, unsigned char si);
-
-extern int get_number(units *result, unsigned char si);
-extern int get_integer(int *result);
-
-extern int get_number(units *result, unsigned char si, units prev_value);
-extern int get_integer(int *result, int prev_value);
-
-void interpolate_number_reg(symbol, int);
-
-const char *asciify(int c);
-
-inline int token::newline()
-{
- return type == TOKEN_NEWLINE;
-}
-
-inline int token::space()
-{
- return type == TOKEN_SPACE;
-}
-
-inline int token::stretchable_space()
-{
- return type == TOKEN_STRETCHABLE_SPACE;
-}
-
-inline int token::special()
-{
- return type == TOKEN_SPECIAL;
-}
-
-inline int token::nspaces()
-{
- if (type == TOKEN_SPACE)
- return 1;
- else
- return 0;
-}
-
-inline int token::white_space()
-{
- return type == TOKEN_SPACE || type == TOKEN_TAB;
-}
-
-inline int token::transparent()
-{
- return type == TOKEN_TRANSPARENT;
-}
-
-inline int token::page_ejector()
-{
- return type == TOKEN_PAGE_EJECTOR;
-}
-
-inline unsigned char token::ch()
-{
- return type == TOKEN_CHAR ? c : 0;
-}
-
-inline int token::eof()
-{
- return type == TOKEN_EOF;
-}
-
-inline int token::dummy()
-{
- return type == TOKEN_DUMMY;
-}
-
-inline int token::transparent_dummy()
-{
- return type == TOKEN_TRANSPARENT_DUMMY;
-}
-
-inline int token::left_brace()
-{
- return type == TOKEN_LEFT_BRACE;
-}
-
-inline int token::right_brace()
-{
- return type == TOKEN_RIGHT_BRACE;
-}
-
-inline int token::tab()
-{
- return type == TOKEN_TAB;
-}
-
-inline int token::leader()
-{
- return type == TOKEN_LEADER;
-}
-
-inline int token::backspace()
-{
- return type == TOKEN_BACKSPACE;
-}
-
-inline int token::hyphen_indicator()
-{
- return type == TOKEN_HYPHEN_INDICATOR;
-}
-
-int has_arg();
diff --git a/contrib/groff/src/roff/troff/troff.h b/contrib/groff/src/roff/troff/troff.h
deleted file mode 100644
index 254c6264731b..000000000000
--- a/contrib/groff/src/roff/troff/troff.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001
- Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <time.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#include "lib.h"
-#include "assert.h"
-#include "device.h"
-#include "searchpath.h"
-
-void cleanup_and_exit(int n);
-
-typedef int units;
-
-extern units scale(units n, units x, units y); // scale n by x/y
-
-extern units units_per_inch;
-
-extern int ascii_output_flag;
-extern int suppress_output_flag;
-extern int is_html;
-
-extern int tcommand_flag;
-extern int vresolution;
-extern int hresolution;
-extern int sizescale;
-
-extern search_path *mac_path;
-
-#include "cset.h"
-#include "cmap.h"
-#include "errarg.h"
-#include "error.h"
-
-enum warning_type {
- WARN_CHAR = 01,
- WARN_NUMBER = 02,
- WARN_BREAK = 04,
- WARN_DELIM = 010,
- WARN_EL = 020,
- WARN_SCALE = 040,
- WARN_RANGE = 0100,
- WARN_SYNTAX = 0200,
- WARN_DI = 0400,
- WARN_MAC = 01000,
- WARN_REG = 02000,
- WARN_TAB = 04000,
- WARN_RIGHT_BRACE = 010000,
- WARN_MISSING = 020000,
- WARN_INPUT = 040000,
- WARN_ESCAPE = 0100000,
- WARN_SPACE = 0200000,
- WARN_FONT = 0400000,
- WARN_IG = 01000000
- // change WARN_TOTAL if you add more warning types
-};
-
-const int WARN_TOTAL = 01777777;
-
-int warning(warning_type, const char *,
- const errarg & = empty_errarg,
- const errarg & = empty_errarg,
- const errarg & = empty_errarg);
diff --git a/contrib/groff/src/roff/troff/troff.man b/contrib/groff/src/roff/troff/troff.man
deleted file mode 100644
index 7fe052b4e61a..000000000000
--- a/contrib/groff/src/roff/troff/troff.man
+++ /dev/null
@@ -1,2462 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.
-.\" define a string tx for the TeX logo
-.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
-.el .ds tx TeX
-.
-.de TQ
-.br
-.ns
-.TP \\$1
-..
-.
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.
-.\" The BSD man macros can't handle " in arguments to font change macros,
-.\" so use \(ts instead of ".
-.tr \(ts"
-.
-.
-.TH @G@TROFF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.
-.
-.SH NAME
-.
-.
-@g@troff \- format documents
-.
-.
-.SH SYNOPSIS
-.
-.
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fB@g@troff 'u
-.ti \niu
-.B @g@troff
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-abivzCERU
-.OP \-w name
-.OP \-W name
-.OP \-d cs
-.OP \-f fam
-.OP \-m name
-.OP \-n num
-.OP \-o list
-.OP \-r cn
-.OP \-T name
-.OP \-F dir
-.OP \-M dir
-.RI "[\ " files\|.\|.\|. "\ ]"
-.br
-.ad \na
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.
-.
-.SH DESCRIPTION
-.
-.
-This manual page describes the GNU version of
-.BR troff ,
-which is part of the groff document formatting system.
-It is highly compatible with UNIX troff.
-Usually it should be invoked using the groff command, which will
-also run preprocessors and postprocessors in the appropriate
-order and with the appropriate options.
-.
-.
-.SH OPTIONS
-.
-.
-.TP \w'\-dname=s'u+2n
-.B \-a
-Generate an
-.SM ASCII
-approximation of the typeset output.
-.TP
-.B \-b
-Print a backtrace with each warning or error message. This backtrace
-should help track down the cause of the error. The line numbers given
-in the backtrace may not always be correct:
-.BR troff 's
-idea of line numbers
-gets confused by
-.B as
-or
-.B am
-requests.
-.TP
-.B \-i
-Read the standard input after all the named input files have been
-processed.
-.TP
-.B \-v
-Print the version number.
-.TP
-.BI \-w name
-Enable warning
-.IR name .
-Available warnings are described in
-the Warnings subsection below.
-Multiple
-.B \-w
-options are allowed.
-.TP
-.BI \-W name
-Inhibit warning
-.IR name .
-Multiple
-.B \-W
-options are allowed.
-.TP
-.B \-E
-Inhibit all error messages.
-.TP
-.B \-z
-Suppress formatted output.
-.TP
-.B \-C
-Enable compatibility mode.
-.TP
-.BI \-d cs
-.TQ
-.BI \-d name = s
-Define
-.I c
-or
-.I name
-to be a string
-.IR s ;
-.I c
-must be a one letter name.
-.TP
-.BI \-f fam
-Use
-.I fam
-as the default font family.
-.TP
-.BI \-m name
-Read in the file
-.IB name .tmac\fR.
-If it isn't found, try
-.BI tmac. name
-instead.
-It will be first searched for in directories given with the
-.B \-M
-command line option, then in directories given
-in the
-.B GROFF_TMAC_PATH
-environment variable, then in the current directory (only if in unsafe
-mode), the home directory, @SYSTEMMACRODIR@, @LOCALMACRODIR@, and
-@MACRODIR@.
-.TP
-.B \-U
-Unsafe mode.
-This will enable the following requests:
-.BR .open ,
-.BR .opena ,
-.BR .pso ,
-.BR .sy ,
-and
-.BR .pi .
-For security reasons, these potentially dangerous requests are disabled
-otherwise. It will also add the current directory to the macro search path.
-.TP
-.B \-R
-Don't load
-.B troffrc
-and
-.BR troffrc-end .
-.TP
-.BI \-n num
-Number the first page
-.IR num .
-.TP
-.BI \-o list
-Output only pages in
-.IR list ,
-which is a comma-separated list of page ranges;
-.I n
-means print page
-.IR n ,
-.IB m \- n
-means print every page between
-.I m
-and
-.IR n ,
-.BI \- n
-means print every page up to
-.IR n ,
-.IB n \-
-means print every page from
-.IR n .
-.B Troff
-will exit after printing the last page in the list.
-.TP
-.BI \-r cn
-.TQ
-.BI \-r name = n
-Set number register
-.I c
-or
-.I name
-to
-.IR n ;
-.I c
-must be a one character name;
-.I n
-can be any troff numeric expression.
-.TP
-.BI \-T name
-Prepare output for device
-.IR name ,
-rather than the default
-.BR @DEVICE@ .
-.TP
-.BI \-F dir
-Search in directory (or directory path)
-.I dir
-for subdirectories
-.BI dev name
-.RI ( name
-is the name of the device) and there for the
-.B DESC
-file and font files.
-.I dir
-is scanned before all other font directories.
-.TP
-.BI \-M dir
-Search directory (or directory path)
-.I dir
-for macro files.
-This is scanned before all other macro directories.
-.
-.
-.SH USAGE
-.
-.
-Only the features not in UNIX troff are described here.
-.
-.SS Long names
-.
-The names of number registers, fonts, strings/macros/diversions,
-special characters can be of any length. In escape sequences, where
-you can use
-.BI ( xx
-for a two character name, you can use
-.BI [ xxx ]
-for a name of arbitrary length:
-.TP
-.BI \e[ xxx ]
-Print the special character called
-.IR xxx .
-.TP
-.BI \ef[ xxx ]
-Set font
-.IR xxx .
-.TP
-.BI \e*[ xxx ]
-Interpolate string
-.IR xxx .
-.TP
-.BI \en[ xxx ]
-Interpolate number register
-.IR xxx .
-.
-.SS Fractional pointsizes
-.
-A
-.I
-scaled point
-is equal to 1/sizescale
-points, where
-sizescale is specified in the
-.B DESC
-file (1 by default).
-There is a new scale indicator
-.B z
-which has the effect of multiplying by sizescale.
-Requests and escape sequences in troff
-interpret arguments that represent a pointsize as being in units
-of scaled points, but they evaluate each such argument
-using a default scale indicator of
-.BR z .
-Arguments treated in this way are
-the argument to the
-.B ps
-request,
-the third argument to the
-.B cs
-request,
-the second and fourth arguments to the
-.B tkf
-request,
-the argument to the
-.B \eH
-escape sequence,
-and those variants of the
-.B \es
-escape sequence that take a numeric expression as their argument.
-.LP
-For example, suppose sizescale is 1000;
-then a scaled point will be equivalent to a millipoint;
-the request
-.B .ps 10.25
-is equivalent to
-.B .ps 10.25z
-and so sets the pointsize to 10250 scaled points,
-which is equal to 10.25 points.
-.LP
-The number register
-.B \en[.s]
-returns the pointsize in points as decimal fraction.
-There is also a new number register
-.B \en[.ps]
-that returns the pointsize in scaled points.
-.LP
-It would make no sense to use the
-.B z
-scale indicator in a numeric expression
-whose default scale indicator was neither
-.B u
-nor
-.BR z ,
-and so
-.B troff
-disallows this.
-Similarly it would make no sense to use a scaling indicator
-other than
-.B z
-or
-.B u
-in a numeric expression whose default scale indicator was
-.BR z ,
-and so
-.B troff
-disallows this as well.
-.LP
-There is also new scale indicator
-.B s
-which multiplies by the number of units in a scaled point.
-So, for example,
-.B \en[.ps]s
-is equal to
-.BR 1m .
-Be sure not to confuse the
-.B s
-and
-.B z
-scale indicators.
-.
-.SS Numeric expressions
-.
-.LP
-Spaces are permitted in a number expression within parentheses.
-.LP
-.B M
-indicates a scale of 100ths of an em.
-.TP
-.IB e1 >? e2
-The maximum of
-.I e1
-and
-.IR e2 .
-.TP
-.IB e1 <? e2
-The minimum of
-.I e1
-and
-.IR e2 .
-.TP
-.BI ( c ; e )
-Evaluate
-.I e
-using
-.I c
-as the default scaling indicator.
-If
-.I c
-is missing, ignore scaling indicators in the evaluation of
-.IR e .
-.
-.SS New escape sequences
-.
-.TP
-.BI \eA' anything '
-This expands to
-.B 1
-or
-.B 0
-according as
-.I anything
-is or is not acceptable as the name of a string, macro, diversion,
-number register, environment or font.
-It will return
-.B 0
-if
-.I anything
-is empty.
-This is useful if you want to lookup user input in some sort of
-associative table.
-.TP
-.BI \eB' anything '
-This expands to
-.B 1
-or
-.B 0
-according as
-.I anything
-is or is not a valid numeric expression.
-It will return
-.B 0
-if
-.I anything
-is empty.
-.TP
-.BI \eC' xxx '
-Typeset character named
-.IR xxx .
-Normally it is more convenient to use
-.BI \e[ xxx ]\fR.
-But
-.B \eC
-has the advantage that it is compatible with recent versions of
-.SM UNIX
-and is available in compatibility mode.
-.TP
-.B \eE
-This is equivalent to an escape character,
-but it's not interpreted in copy-mode.
-For example, strings to start and end superscripting could be defined
-like this:
-.RS
-.IP
-\&.ds { \ev'\-.3m'\es'\eEn[.s]*6u/10u'
-.br
-\&.ds } \es0\ev'.3m'
-.LP
-The use of
-.B \eE
-ensures that these definitions will work even if
-.B \e*{
-gets interpreted in copy-mode
-(for example, by being used in a macro argument).
-.RE
-.TP
-.BI \eN' n '
-Typeset the character with code
-.I n
-in the current font.
-.I n
-can be any integer.
-Most devices only have characters with codes between 0 and 255.
-If the current font does not contain a character with that code,
-special fonts will
-.I not
-be searched.
-The
-.B \eN
-escape sequence can be conveniently used on conjunction with the
-.B char
-request:
-.RS
-.IP
-.B
-\&.char \e[phone] \ef(ZD\eN'37'
-.RE
-.IP
-The code of each character is given in the fourth column in the font
-description file after the
-.B charset
-command.
-It is possible to include unnamed characters in the font description
-file by using a name of
-.BR \-\-\- ;
-the
-.B \eN
-escape sequence is the only way to use these.
-.TP
-.BI \eR' name\ \(+-n '
-This has the same effect as
-.RS
-.IP
-.BI .nr\ name\ \(+-n
-.RE
-.TP
-.BI \es( nn
-.TQ
-.BI \es\(+-( nn
-Set the point size to
-.I nn
-points;
-.I nn
-must be exactly two digits.
-.TP
-.BI \es[\(+- n ]
-.TQ
-.BI \es\(+-[ n ]
-.TQ
-.BI \es'\(+- n '
-.TQ
-.BI \es\(+-' n '
-Set the point size to
-.I n
-scaled points;
-.I n
-is a numeric expression with a default scale indicator of
-.BR z .
-.TP
-.BI \eV x
-.TQ
-.BI \eV( xx
-.TQ
-.BI \eV[ xxx ]
-Interpolate the contents of the environment variable
-.IR xxx ,
-as returned by
-.BR getenv (3).
-.B \eV
-is interpreted in copy-mode.
-.TP
-.BI \eY x
-.TQ
-.BI \eY( xx
-.TQ
-.BI \eY[ xxx ]
-This is approximately equivalent to
-.BI \eX'\e*[ xxx ]'\fR.
-However the contents of the string or macro
-.I xxx
-are not interpreted;
-also it is permitted for
-.I xxx
-to have been defined as a macro and thus contain newlines
-(it is not permitted for the argument to
-.B \eX
-to contain newlines).
-The inclusion of newlines requires an extension to the UNIX troff output
-format, and will confuse drivers that do not know about this
-extension.
-.TP
-.BI \eZ' anything '
-Print anything and then restore the horizontal and vertical
-position;
-.I anything
-may not contain tabs or leaders.
-.TP
-.B \e$0
-The name by which the current macro was invoked.
-The
-.B als
-request can make a macro have more than one name.
-.TP
-.B \e$*
-In a macro, the concatenation of all the arguments separated by spaces.
-.TP
-.B \e$@
-In a macro, the concatenation of all the arguments with each surrounded by
-double quotes, and separated by spaces.
-.TP
-.BI \e$( nn
-.TQ
-.BI \e$[ nnn ]
-In a macro, this gives the
-.IR nn -th
-or
-.IR nnn -th
-argument.
-Macros can have an unlimited number of arguments.
-.TP
-.BI \e? anything \e?
-When used in a diversion, this will transparently embed
-.I anything
-in the diversion.
-.I anything
-is read in copy mode.
-When the diversion is reread,
-.I anything
-will be interpreted.
-.I anything
-may not contain newlines; use
-.B \e!\&
-if you want to embed newlines in a diversion.
-The escape sequence
-.B \e?\&
-is also recognised in copy mode and turned into a single internal
-code; it is this code that terminates
-.IR anything .
-Thus
-.RS
-.RS
-.ft B
-.nf
-.ne 15
-\&.nr x 1
-\&.nf
-\&.di d
-\e?\e\e?\e\e\e\e?\e\e\e\e\e\e\e\enx\e\e\e\e?\e\e?\e?
-\&.di
-\&.nr x 2
-\&.di e
-\&.d
-\&.di
-\&.nr x 3
-\&.di f
-\&.e
-\&.di
-\&.nr x 4
-\&.f
-.fi
-.ft
-.RE
-.RE
-.IP
-will print
-.BR 4 .
-.TP
-.B \e/
-This increases the width of the preceding character so that
-the spacing between that character and the following character
-will be correct if the following character is a roman character.
-For example, if an italic f is immediately followed by a roman
-right parenthesis, then in many fonts the top right portion of the f
-will overlap the top left of the right parenthesis producing \fIf\fR)\fR,
-which is ugly.
-Inserting
-.B \e/
-produces
-.ie \n(.g \fIf\/\fR)\fR
-.el \fIf\|\fR)\fR
-and avoids this problem.
-It is a good idea to use this escape sequence whenever an
-italic character is immediately followed by a roman character without any
-intervening space.
-.TP
-.B \e,
-This modifies the spacing of the following character so that the spacing
-between that character and the preceding character will correct if
-the preceding character is a roman character.
-For example, inserting
-.B \e,
-between the parenthesis and the f changes
-\fR(\fIf\fR to
-.ie \n(.g \fR(\,\fIf\fR.
-.el \fR(\^\fIf\fR.
-It is a good idea to use this escape sequence whenever a
-roman character is immediately followed by an italic character without any
-intervening space.
-.TP
-.B \e)
-Like
-.B \e&
-except that it behaves like a character declared with the
-.B cflags
-request to be transparent for the purposes of end of sentence recognition.
-.TP
-.B \e~
-This produces an unbreakable space that stretches like a normal inter-word
-space when a line is adjusted.
-.TP
-.B \e:
-This causes the insertion of a zero-width break point.
-It is equal to
-.B \e%
-but without insertion of a soft hyphen character.
-.TP
-.B \e#
-Everything up to and including the next newline is ignored.
-This is interpreted in copy mode.
-This is like
-.B \e"
-except that
-.B \e"
-does not ignore the terminating newline.
-.
-.SS New requests
-.
-.TP
-.BI .aln\ xx\ yy
-Create an alias
-.I xx
-for number register object named
-.IR yy .
-The new name and the old name will be exactly equivalent.
-If
-.I yy
-is undefined, a warning of type
-.B reg
-will be generated, and the request will be ignored.
-.TP
-.BI .als\ xx\ yy
-Create an alias
-.I xx
-for request, string, macro, or diversion object named
-.IR yy .
-The new name and the old name will be exactly equivalent (it is similar to a
-hard rather than a soft link).
-If
-.I yy
-is undefined, a warning of type
-.B mac
-will be generated, and the request will be ignored.
-The
-.BR de ,
-.BR am ,
-.BR di ,
-.BR da ,
-.BR ds ,
-and
-.B as
-requests only create a new object if the name of the macro, diversion
-or string diversion is currently undefined or if it is defined to be a
-request; normally they modify the value of an existing object.
-.TP
-.BI .asciify\ xx
-This request `unformats' the diversion
-.I xx
-in such a way that
-.SM ASCII
-and space characters (and some escape sequences) that were formatted and
-diverted into
-.I xx
-will be treated like ordinary input characters when
-.I xx
-is reread.
-Useful for diversions in conjunction with the
-.B .writem
-request.
-It can be also used for gross hacks; for example, this
-.RS
-.IP
-.ne 7v+\n(.Vu
-.ft B
-.nf
-\&.tr @.
-\&.di x
-\&@nr n 1
-\&.br
-\&.di
-\&.tr @@
-\&.asciify x
-\&.x
-.fi
-.RE
-.IP
-will set register
-.B n
-to 1.
-Note that glyph information (font, font size, etc.) is not preserved; use
-.B .unformat
-instead.
-.TP
-.B .backtrace
-Print a backtrace of the input stack on stderr.
-.TP
-.BI .blm\ xx
-Set the blank line macro to
-.IR xx .
-If there is a blank line macro,
-it will be invoked when a blank line is encountered instead of the usual
-troff behaviour.
-.TP
-.BI .box\ xx
-.TQ
-.BI .boxa\ xx
-These requests are similar to the
-.B di
-and
-.B da
-requests with the exception that a partially filled line will not become
-part of the diversion (i.e., the diversion always starts with a new line)
-but restored after ending the diversion, discarding the partially filled
-line which possibly comes from the diversion.
-.TP
-.B .break
-Break out of a while loop.
-See also the
-.B while
-and
-.B continue
-requests.
-Be sure not to confuse this with the
-.B br
-request.
-.TP
-.BI .cflags\ n\ c1\ c2\|.\|.\|.
-Characters
-.IR c1 ,
-.IR c2 ,\|.\|.\|.
-have properties determined by
-.IR n ,
-which is ORed from the following:
-.RS
-.TP
-1
-the character ends sentences
-(initially characters
-.B .?!\&
-have this property);
-.TP
-2
-lines can be broken before the character
-(initially no characters have this property);
-a line will not be broken at a character with this property
-unless the characters on each side both have non-zero
-hyphenation codes.
-.TP
-4
-lines can be broken after the character
-(initially characters
-.B \-\e(hy\e(em
-have this property);
-a line will not be broken at a character with this property
-unless the characters on each side both have non-zero
-hyphenation codes.
-.TP
-8
-the character overlaps horizontally
-(initially characters
-.B \e(ul\e(rn\e(ru
-have this property);
-.TP
-16
-the character overlaps vertically
-(initially character
-.B \e(br
-has this property);
-.TP
-32
-an end of sentence character followed by any number of characters
-with this property will be treated
-as the end of a sentence if followed by a newline or two spaces;
-in other words
-the character is transparent for the purposes of end of sentence
-recognition;
-this is the same as having a zero space factor in \*(tx
-(initially characters
-.B \(ts')]*\e(dg\e(rq
-have this property).
-.RE
-.TP
-.BI .char\ c\ string
-Define character
-.I c
-to be
-.IR string .
-Every time character
-.I c
-needs to be printed,
-.I string
-will be processed in a temporary environment and the result
-will be wrapped up into a single object.
-Compatibility mode will be turned off
-and the escape character will be set to
-.B \e
-while
-.I string
-is being processed.
-Any emboldening, constant spacing or track kerning will be applied
-to this object rather than to individual characters in
-.IR string .
-A character defined by this request can be used just like
-a normal character provided by the output device.
-In particular other characters can be translated to it
-with the
-.B tr
-request;
-it can be made the leader character by the
-.B lc
-request;
-repeated patterns can be drawn with the character using the
-.B \el
-and
-.B \eL
-escape sequences;
-words containing the character can be hyphenated
-correctly, if the
-.B hcode
-request is used to give the character a hyphenation code.
-There is a special anti-recursion feature:
-use of character within the character's definition
-will be handled like normal characters not defined with
-.BR char .
-A character definition can be removed with the
-.B rchar
-request.
-.TP
-.BI .chop\ xx
-Chop the last character off macro, string, or diversion
-.IR xx .
-This is useful for removing the newline from the end of diversions
-that are to be interpolated as strings.
-.TP
-.BI .close\ stream
-Close the stream named
-.IR stream ;
-.I stream
-will no longer be an acceptable argument to the
-.B write
-request.
-See the
-.B open
-request.
-.TP
-.B .continue
-Finish the current iteration of a while loop.
-See also the
-.B while
-and
-.B break
-requests.
-.TP
-.BI .cp\ n
-If
-.I n
-is non-zero or missing, enable compatibility mode, otherwise
-disable it.
-In compatibility mode, long names are not recognised, and the
-incompatibilities caused by long names do not arise.
-.TP
-.BI .dei\ xx\ yy
-Define macro indirectly.
-The following example
-.RS
-.IP
-.ne 2v+\n(.Vu
-.ft B
-.nf
-\&.ds xx aa
-\&.ds yy bb
-\&.dei xx yy
-.fi
-.RE
-.IP
-is equivalent to
-.RS
-.IP
-.B
-\&.de aa bb
-.RE
-.TP
-.BI .do\ xxx
-Interpret
-.I .xxx
-with compatibility mode disabled.
-For example,
-.RS
-.IP
-.B
-\&.do fam T
-.LP
-would have the same effect as
-.IP
-.B
-\&.fam T
-.LP
-except that it would work even if compatibility mode had been enabled.
-Note that the previous compatibility mode is restored before any files
-sourced by
-.I xxx
-are interpreted.
-.RE
-.TP
-.B .ecs
-Save current escape character.
-.TP
-.B .ecr
-Restore escape character saved with
-.BR ecs .
-Without a previous call to
-.BR ecs ,
-.RB ` \e '
-will be the new escape character.
-.TP
-.BI .evc\ xx
-Copy the contents of environment
-.I xx
-to the current environment.
-No pushing or popping of environents will be done.
-.TP
-.BI .fam\ xx
-Set the current font family to
-.IR xx .
-The current font family is part of the current environment.
-If
-.I xx
-is missing, switch back to previous font family.
-See the description of the
-.B sty
-request for more information on font families.
-.TP
-.BI .fspecial\ f\ s1\ s2\|.\|.\|.
-When the current font is
-.IR f ,
-fonts
-.IR s1 ,
-.IR s2 ,\|.\|.\|.
-will be special, that is, they will searched for characters not in
-the current font.
-Any fonts specified in the
-.B special
-request will be searched after fonts specified in the
-.B fspecial
-request.
-.TP
-.BI .ftr\ f\ g
-Translate font
-.I f
-to
-.IR g .
-Whenever a font named
-.I f
-is referred to in
-.B \ef
-escape sequence,
-or in the
-.BR ft ,
-.BR ul ,
-.BR bd ,
-.BR cs ,
-.BR tkf ,
-.BR special ,
-.BR fspecial ,
-.BR fp ,
-or
-.BR sty
-requests,
-font
-.I g
-will be used.
-If
-.I g
-is missing,
-or equal to
-.I f
-then font
-.I f
-will not be translated.
-.TP
-.BI .hcode \ c1\ code1\ c2\ code2\|.\|.\|.
-Set the hyphenation code of character
-.I c1
-to
-.I code1
-and that of
-.I c2
-to
-.IR code2 .
-A hyphenation code must be a single input
-character (not a special character) other than a digit or a space.
-Initially each lower-case letter has a hyphenation code, which
-is itself, and each upper-case letter has a hyphenation code
-which is the lower case version of itself.
-See also the
-.B hpf
-request.
-.TP
-.BI .hla\ lang
-Set the current hyphenation language to
-.IR lang .
-Hyphenation exceptions specified with the
-.B hw
-request and hyphenation patterns specified with the
-.B hpf
-request are both associated with the current hyphenation language.
-The
-.B hla
-request is usually invoked by the
-.B troffrc
-file.
-.TP
-.BI .hlm\ n
-Set the maximum number of consecutive hyphenated lines to
-.IR n .
-If
-.I n
-is negative, there is no maximum.
-The default value is \-1.
-This value is associated with the current environment.
-Only lines output from an environment count towards the maximum associated
-with that environment.
-Hyphens resulting from
-.B \e%
-are counted; explicit hyphens are not.
-.TP
-.BI .hpf\ file
-Read hyphenation patterns from
-.IR file ;
-this will be searched for in the same way that
-.IB name .tmac
-is searched for when the
-.BI \-m name
-option is specified.
-It should have the same format as the argument to
-the \epatterns primitive in \*(tx;
-the letters appearing in this file are interpreted as hyphenation
-codes.
-A
-.B %
-character in the patterns file introduces a comment that continues
-to the end of the line.
-The set of hyphenation patterns is associated with the current language
-set by the
-.B hla
-request.
-The
-.B hpf
-request
-is usually invoked by the
-.B troffrc
-file.
-.TP
-.BI .hym\ n
-Set the
-.I hyphenation margin
-to
-.IR n :
-when the current adjustment mode is not
-.BR b ,
-the line will not be hyphenated if the line is no more than
-.I n
-short.
-The default hyphenation margin is 0.
-The default scaling indicator for this request is
-.IR m .
-The hyphenation margin is associated with the current environment.
-The current hyphenation margin is available in the
-.B \en[.hym]
-register.
-.TP
-.BI .hys\ n
-Set the
-.I hyphenation space
-to
-.IR n :
-when the current adjustment mode is
-.B b
-don't hyphenate the line if the line can be justified by adding no more than
-.I n
-extra space to each word space.
-The default hyphenation space is 0.
-The default scaling indicator for this request is
-.BR m .
-The hyphenation space is associated with the current environment.
-The current hyphenation space is available in the
-.B \en[.hys]
-register.
-.TP
-.BI .kern\ n
-If
-.I n
-is non-zero or missing, enable pairwise kerning, otherwise disable it.
-.TP
-.BI .length\ xx\ string
-Compute the length of
-.I string
-and return it in the number register
-.I xx
-(which is not necessarily defined before).
-.TP
-.BI .linetabs\ n
-If
-.I n
-is non-zero or missing, enable line-tabs mode, otherwise disable it (which
-is the default).
-In line-tabs mode, tab distances are computed relative to the (current)
-output line.
-Otherwise they are taken relative to the input line.
-For example, the following
-.RS
-.IP
-.ne 6v+\n(.Vu
-.ft B
-.nf
-\&.ds x a\et\ec
-\&.ds y b\et\ec
-\&.ds z c
-\&.ta 1i 3i
-\e*x
-\e*y
-\e*z
-.fi
-.RE
-.IP
-yields
-.RS
-.IP
-a b c
-.RE
-.IP
-In line-tabs mode, the same code gives
-.RS
-.IP
-a b c
-.RE
-.IP
-Line-tabs mode is associated with the current environment; the read-only
-number register
-.B \\en[.linetabs]
-is set to\~1 if in line-tabs mode, and 0 otherwise.
-.TP
-.BI .mso\ file
-The same as the
-.B so
-request except that
-.I file
-is searched for in the same directories as macro files for the
-the
-.B \-m
-command line option.
-If the file name to be included
-has the form
-.IB name .tmac
-and it isn't found,
-.B mso
-tries to include
-.BI tmac. name
-instead and vice versa.
-.TP
-.BI .nop \ anything
-Execute
-.IR anything .
-This is similar to `.if\ 1'.
-.TP
-.B .nroff
-Make the
-.B n
-built-in condition true
-and the
-.B t
-built-in condition false.
-This can be reversed using the
-.B troff
-request.
-.TP
-.BI .open\ stream\ filename
-Open
-.I filename
-for writing and associate the stream named
-.I stream
-with it.
-See also the
-.B close
-and
-.B write
-requests.
-.TP
-.BI .opena\ stream\ filename
-Like
-.BR open ,
-but if
-.I filename
-exists, append to it instead of truncating it.
-.TP
-.B .pnr
-Print the names and contents of all currently defined number registers
-on stderr.
-.TP
-.BI .psbb \ filename
-Get the bounding box of a PostScript image
-.IR filename .
-This file must conform to Adobe's Document Structuring Conventions; the
-command looks for a
-.B %%BoundingBox
-comment to extract the bounding box values.
-After a successful call, the coordinates (in PostScript units) of the lower
-left and upper right corner can be found in the registers
-.BR \en[llx] ,
-.BR \en[lly] ,
-.BR \en[urx] ,
-and
-.BR \en[ury] ,
-respectively.
-If some error has occurred, the four registers are set to zero.
-.TP
-.BI .pso \ command
-This behaves like the
-.B so
-request except that input comes from the standard output of
-.IR command .
-.TP
-.B .ptr
-Print the names and positions of all traps (not including input line
-traps and diversion traps) on stderr. Empty slots in the page trap
-list are printed as well, because they can affect the priority of
-subsequently planted traps.
-.TP
-.BI .rchar\ c1\ c2\|.\|.\|.
-Remove the definitions of characters
-.IR c1 ,
-.IR c2 ,\|.\|.\|.
-This undoes the effect of a
-.B char
-request.
-.TP
-.B .return
-Within a macro, return immediately.
-No effect otherwise.
-.TP
-.B .rj
-.TQ
-.BI .rj\ n
-Right justify the next
-.I n
-input lines.
-Without an argument right justify the next input line.
-The number of lines to be right justified is available in the
-.B \en[.rj]
-register.
-This implicitly does
-.BR .ce\ 0 .
-The
-.B ce
-request implicitly does
-.BR .rj\ 0 .
-.TP
-.BI .rnn \ xx\ yy
-Rename number register
-.I xx
-to
-.IR yy .
-.TP
-.BI .shc\ c
-Set the soft hyphen character to
-.IR c .
-If
-.I c
-is omitted,
-the soft hyphen character will be set to the default
-.BR \e(hy .
-The soft hyphen character is the character which will be inserted
-when a word is hyphenated at a line break.
-If the soft hyphen character does not exist in the font of the character
-immediately preceding a potential break point,
-then the line will not be broken at that point.
-Neither definitions (specified with the
-.B char
-request)
-nor translations (specified with the
-.B tr
-request)
-are considered when finding the soft hyphen character.
-.TP
-.BI .shift\ n
-In a macro, shift the arguments by
-.I n
-positions:
-argument
-.I i
-becomes argument
-.IR i \- n ;
-arguments 1 to
-.I n
-will no longer be available.
-If
-.I n
-is missing,
-arguments will be shifted by 1.
-Shifting by negative amounts is currently undefined.
-.TP
-.BI .special\ s1\ s2\|.\|.\|.
-Fonts
-.IR s1 ,
-.IR s2 ,
-are special and will be searched for characters not in the
-current font.
-.TP
-.BI .sty\ n\ f
-Associate style
-.I f
-with font position
-.IR n .
-A font position can be associated either with a font or
-with a style.
-The current font is the index of a font position and so is also
-either a font or a style.
-When it is a style, the font that is actually used is the font the
-name of which is the concatenation of the name of the current family
-and the name of the current style.
-For example, if the current font is 1 and font position 1 is
-associated with style
-.B R
-and the current
-font family is
-.BR T ,
-then font
-.BR TR
-will be used.
-If the current font is not a style, then the current family is ignored.
-When the requests
-.BR cs ,
-.BR bd ,
-.BR tkf ,
-.BR uf ,
-or
-.B fspecial
-are applied to a style,
-then they will instead be applied to the member of the
-current family corresponding to that style.
-The default family can be set with the
-.B \-f
-option.
-The styles command in the
-.SM DESC
-file controls which font positions
-(if any) are initially associated with styles rather than fonts.
-.TP
-.BI .substring\ xx\ n1\ [ n2 ]
-Replace the string in register
-.I xx
-with the substring defined by the indices
-.I n1
-and
-.IR n2 .
-The first character in the string has index one.
-If
-.I n2
-is omitted, it is taken to be equal to the string's length. If the
-index value
-.I n1
-or
-.I n2
-is negative or zero, it will be counted from the end of the string,
-going backwards: The last character has index 0, the character before
-the last character has index -1, etc.
-.TP
-.BI .tkf\ f\ s1\ n1\ s2\ n2
-Enable track kerning for font
-.IR f .
-When the current font is
-.I f
-the width of every character will be increased by an amount
-between
-.I n1
-and
-.IR n2 ;
-when the current point size is less than or equal to
-.I s1
-the width will be increased by
-.IR n1 ;
-when it is greater than or equal to
-.I s2
-the width will be increased by
-.IR n2 ;
-when the point size is greater than or equal to
-.I s1
-and less than or equal to
-.I s2
-the increase in width is a linear function of the point size.
-.TP
-.BI .tm1\ string
-Similar to the
-.B tm
-request,
-.I string
-is read in copy mode and written on the standard error, but an initial
-double quote in
-.I string
-is stripped off to allow initial blanks.
-.TP
-.BI .tmc\ string
-Similar to
-.BR tm1
-but without writing a final newline.
-.TP
-.BI .trf\ filename
-Transparently output the contents of file
-.IR filename .
-Each line is output as it would be were it preceded by
-.BR \e! ;
-however, the lines are not subject to copy-mode interpretation.
-If the file does not end with a newline, then a newline will
-be added.
-For example, you can define a macro
-.I x
-containing the contents of file
-.IR f ,
-using
-.RS
-.IP
-.BI .di\ x
-.br
-.BI .trf\ f
-.br
-.B .di
-.LP
-Unlike with the
-.B cf
-request,
-the file cannot contain characters such as
-.SM NUL
-that are not legal troff input characters.
-.RE
-.TP
-.B .trnt abcd
-This is the same as the
-.B tr
-request except that the translations do not apply to text that is
-transparently throughput into a diversion with
-.BR \e! .
-For example,
-.RS
-.IP
-.nf
-.ft B
-\&.tr ab
-\&.di x
-\e!.tm a
-\&.di
-\&.x
-.fi
-.ft
-.LP
-will print
-.BR b ;
-if
-.B trnt
-is used instead of
-.B tr
-it will print
-.BR a .
-.RE
-.TP
-.B .troff
-Make the
-.B n
-built-in condition false,
-and the
-.B t
-built-in condition true.
-This undoes the effect of the
-.B nroff
-request.
-.TP
-.BI .unformat\ xx
-This request `unformats' the diversion
-.IR xx .
-Contrary to the
-.B .asciify
-request, which tries to convert formatted elements of the diversion back
-to input tokens as much as possible,
-.B .unformat
-will only handle tabs and spaces between words (usually caused by spaces
-or newlines in the input) specially.
-The former are treated as if they were input tokens, and the latter are
-stretchable again.
-Note that the vertical size of lines is not preserved.
-Glyph information (font, font size, space width, etc.) is retained.
-Useful in conjunction with the
-.B .box
-and
-.B .boxa
-requests.
-.TP
-.BI .vpt\ n
-Enable vertical position traps if
-.I n
-is non-zero, disable them otherwise.
-Vertical position traps are traps set by the
-.B wh
-or
-.B dt
-requests.
-Traps set by the
-.B it
-request are not vertical position traps.
-The parameter that controls whether vertical position traps are enabled
-is global.
-Initially vertical position traps are enabled.
-.TP
-.BI .warn\ n
-Control warnings.
-.I n
-is the sum of the numbers associated with each warning that is to be enabled;
-all other warnings will be disabled.
-The number associated with each warning is listed in the `Warnings' section.
-For example,
-.B .warn 0
-will disable all warnings, and
-.B .warn 1
-will disable all warnings except that about missing characters.
-If
-.I n
-is not given,
-all warnings will be enabled.
-.TP
-.BI .while \ c\ anything
-While condition
-.I c
-is true, accept
-.I anything
-as input;
-.I c
-can be any condition acceptable to an
-.B if
-request;
-.I anything
-can comprise multiple lines if the first line starts with
-.B \e{
-and the last line ends with
-.BR \e} .
-See also the
-.B break
-and
-.B continue
-requests.
-.TP
-.BI .write\ stream\ anything
-Write
-.I anything
-to the stream named
-.IR stream .
-.I stream
-must previously have been the subject of an
-.B open
-request.
-.I anything
-is read in copy mode;
-a leading
-.B \(ts
-will be stripped.
-.TP
-.BI .writem\ stream\ xx
-Write the contents of the macro or string
-.I xx
-to the stream named
-.IR stream .
-.I stream
-must previously have been the subject of an
-.B open
-request.
-.I xx
-is read in copy mode.
-.
-.SS Extended requests
-.
-.TP
-.BI .cf\ filename
-When used in a diversion, this will embed in the diversion an object which,
-when reread, will cause the contents of
-.I filename
-to be transparently copied through to the output.
-In UNIX troff, the
-contents of
-.I filename
-is immediately copied through to the output regardless of whether
-there is a current diversion; this behaviour is so anomalous that it
-must be considered a bug.
-.TP
-.BI .ev\ xx
-If
-.I xx
-is not a number, this will switch to a named environment called
-.IR xx .
-The environment should be popped with a matching
-.B ev
-request without any arguments, just as for numbered environments.
-There is no limit on the number of named environments; they will be
-created the first time that they are referenced.
-.TP
-.BI .fp\ n\ f1\ f2
-The
-.B fp
-request has an optional third argument.
-This argument gives the external name of the font,
-which is used for finding the font description file.
-The second argument gives the internal name of the font
-which is used to refer to the font in troff after it has been mounted.
-If there is no third argument then the internal name will be used
-as the external name.
-This feature allows you to use fonts with long names in compatibility mode.
-.TP
-.BI .ss\ m\ n
-When two arguments are given to the
-.B ss
-request, the second argument gives the
-.IR "sentence space size" .
-If the second argument is not given, the sentence space size
-will be the same as the word space size.
-Like the word space size, the sentence space is in units of
-one twelfth of the spacewidth parameter for the current font.
-Initially both the word space size and the sentence
-space size are 12.
-Contrary to UNIX troff, GNU troff handles this request in nroff mode
-also (if not in compatibility mode); a given value is then rounded down
-to the nearest multiple of\~12.
-The sentence space size is used in two circumstances:
-if the end of a sentence occurs at the end of a line in fill mode, then
-both an inter-word space and a sentence space will be added;
-if two spaces follow the end of a sentence in the middle of a line,
-then the second space will be a sentence space.
-Note that the behaviour of UNIX troff will be exactly
-that exhibited by GNU troff if a second argument is never given to the
-.B ss
-request.
-In GNU troff, as in UNIX troff, you should always
-follow a sentence with either a newline or two spaces.
-.TP
-.BI .ta\ n1\ n2\|.\|.\|.nn \ T\ r1\ r2\|.\|.\|.\|rn
-Set tabs at positions
-.IR n1 ,
-.IR n2 ,\|.\|.\|.\|,
-.I nn
-and then set tabs at
-.IR nn + r1 ,
-.IR nn + r2 ,\|.\|.\|.\|.\|,
-.IR nn + rn
-and then at
-.IR nn + rn + r1 ,
-.IR nn + rn + r2 ,\|.\|.\|.\|,
-.IR nn + rn + rn ,
-and so on.
-For example,
-.RS
-.IP
-.B
-\&.ta T .5i
-.LP
-will set tabs every half an inch.
-.RE
-.
-.SS New number registers
-.
-The following read-only registers are available:
-.TP
-.B \en[.C]
-1 if compatibility mode is in effect, 0 otherwise.
-.TP
-.B \en[.cdp]
-The depth of the last character added to the current environment.
-It is positive if the character extends below the baseline.
-.TP
-.B \en[.ce]
-The number of lines remaining to be centered, as set by the
-.B ce
-request.
-.TP
-.B \en[.cht]
-The height of the last character added to the current environment.
-It is positive if the character extends above the baseline.
-.TP
-.B \en[.csk]
-The skew of the last character added to the current environment.
-The
-.I skew
-of a character is how far to the right of the center of a character
-the center of an accent over that character should be placed.
-.TP
-.B \en[.ev]
-The name or number of the current environment.
-This is a string-valued register.
-.TP
-.B \en[.fam]
-The current font family.
-This is a string-valued register.
-.TP
-.B \en[.fp]
-The number of the next free font position.
-.TP
-.B \en[.g]
-Always 1.
-Macros should use this to determine whether they are running
-under GNU troff.
-.TP
-.B \en[.hla]
-The current hyphenation language as set by the
-.B hla
-request.
-.TP
-.B \en[.hlc]
-The number of immediately preceding consecutive hyphenated lines.
-.TP
-.B \en[.hlm]
-The maximum allowed number of consecutive hyphenated lines, as set by the
-.B hlm
-request.
-.TP
-.B \en[.hy]
-The current hyphenation flags (as set by the
-.B hy
-request).
-.TP
-.B \en[.hym]
-The current hyphenation margin (as set by the
-.B hym
-request).
-.TP
-.B \en[.hys]
-The current hyphenation space (as set by the
-.B hys
-request).
-.TP
-.B \en[.in]
-The indent that applies to the current output line.
-.TP
-.B \en[.int]
-Set to a positive value if last output line is interrupted (i.e., if it
-contains
-.IR \ec ).
-.TP
-.B \en[.kern]
-.B 1
-if pairwise kerning is enabled,
-.B 0
-otherwise.
-.TP
-.B \en[.lg]
-The current ligature mode (as set by the
-.B lg
-request).
-.TP
-.B \en[.linetabs]
-The current line-tabs mode (as set by the
-.B linetabs
-request).
-.TP
-.B \en[.ll]
-The line length that applies to the current output line.
-.TP
-.B \en[.lt]
-The title length as set by the
-.B lt
-request.
-.TP
-.B \en[.ne]
-The amount of space that was needed in the last
-.B ne
-request that caused a trap to be sprung.
-Useful in conjunction with the
-.B \en[.trunc]
-register.
-.TP
-.B \en[.pn]
-The number of the next page:
-either the value set by a
-.B pn
-request, or the number of the current page plus 1.
-.TP
-.B \en[.ps]
-The current pointsize in scaled points.
-.TP
-.B \en[.psr]
-The last-requested pointsize in scaled points.
-.TP
-.B \en[.rj]
-The number of lines to be right-justified as set by the
-.B rj
-request.
-.TP
-.B \en[.sr]
-The last requested pointsize in points as a decimal fraction.
-This is a string-valued register.
-.TP
-.B \en[.tabs]
-A string representation of the current tab settings suitable for use as
-an argument to the
-.B ta
-request.
-.TP
-.B \en[.trunc]
-The amount of vertical space truncated by the most recently sprung
-vertical position trap, or,
-if the trap was sprung by a
-.B ne
-request,
-minus the amount of vertical motion produced by the
-.B ne
-request.
-In other words, at the point a trap is sprung, it represents the difference
-of what the vertical position would have been but for the trap,
-and what the vertical position actually is.
-Useful in conjunction with the
-.B \en[.ne]
-register.
-.TP
-.B \en[.ss]
-.TQ
-.B \en[.sss]
-These give the values of the parameters set by the
-first and second arguments of the
-.B ss
-request.
-.TP
-.B \en[.vpt]
-1 if vertical position traps are enabled, 0 otherwise.
-.TP
-.B \en[.warn]
-The sum of the numbers associated with each of the currently enabled
-warnings.
-The number associated with each warning is listed in the `Warnings'
-subsection.
-.TP
-.B \en[.x]
-The major version number.
-For example, if the version number is
-.B 1.03
-then
-.B \en[.x]
-will contain
-.BR 1 .
-.TP
-.B \en[.y]
-The minor version number.
-For example, if the version number is
-.B 1.03
-then
-.B \en[.y]
-will contain
-.BR 03 .
-.TP
-.B \en[.Y]
-The revision number of groff.
-.TP
-.B \en[llx]
-.TQ
-.B \en[lly]
-.TQ
-.B \en[urx]
-.TQ
-.B \en[ury]
-These four registers are set by the
-.B \&.psbb
-request and contain the bounding box values (in PostScript units) of a given
-PostScript image.
-.LP
-The following read/write registers are set by the
-.B \ew
-escape sequence:
-.TP
-.B \en[rst]
-.TQ
-.B \en[rsb]
-Like the
-.B st
-and
-.B sb
-registers, but takes account of the heights and depths of characters.
-.TP
-.B \en[ssc]
-The amount of horizontal space (possibly negative) that should
-be added to the last character before a subscript.
-.TP
-.B \en[skw]
-How far to right of the center of the last character
-in the
-.B \ew
-argument,
-the center of an accent from a roman font should be placed over that character.
-.LP
-Other available read/write number registers are:
-.TP
-.B \en[c.]
-The current input line number.
-.B \en[.c]
-is a read-only alias to this register.
-.TP
-.B \en[hp]
-The current horizontal position at input line.
-.TP
-.B \en[systat]
-The return value of the system() function executed by the last
-.B sy
-request.
-.TP
-.B \en[slimit]
-If greater than 0, the maximum number of objects on the input stack.
-If less than or equal to 0, there is no limit on the number of objects
-on the input stack. With no limit, recursion can continue until
-virtual memory is exhausted.
-.TP
-.B \en[year]
-The current year.
-Note that the traditional
-.B troff
-number register
-.B \en[yr]
-is the current year minus 1900.
-.
-.SS Miscellaneous
-.
-.B @g@troff
-predefines a single (read/write) string-based register,
-.BR \e*(.T ,
-which contains the argument given to the
-.B -T
-command line option, namely the current output device (for example,
-.I latin1
-or
-.IR ascii ).
-Note that this is not the same as the (read-only) number register
-.B \en[.T]
-which is defined to be\ 1 if
-.B troff
-is called with the
-.B -T
-command line option, and zero otherwise. This behaviour is different to
-UNIX troff.
-.LP
-Fonts not listed in the
-.SM DESC
-file are automatically mounted on the next available font position
-when they are referenced.
-If a font is to be mounted explicitly with the
-.B fp
-request on an unused font position,
-it should be mounted on the first unused font position,
-which can be found in the
-.B \en[.fp]
-register;
-although
-.B troff
-does not enforce this strictly,
-it will not allow a font to be mounted at a position whose number is much
-greater than that of any currently used position.
-.LP
-Interpolating a string does not hide existing macro arguments.
-Thus in a macro, a more efficient way of doing
-.IP
-.BI . xx\ \e\e$@
-.LP
-is
-.IP
-.BI \e\e*[ xx ]\e\e
-.LP
-If the font description file contains pairwise kerning information,
-characters from that font will be kerned.
-Kerning between two characters can be inhibited by placing a
-.B \e&
-between them.
-.LP
-In a string comparison in a condition,
-characters that appear at different input levels
-to the first delimiter character will not be recognised
-as the second or third delimiters.
-This applies also to the
-.B tl
-request.
-In a
-.B \ew
-escape sequence,
-a character that appears at a different input level to
-the starting delimiter character will not be recognised
-as the closing delimiter character.
-When decoding a macro argument that is delimited
-by double quotes, a character that appears at a different
-input level to the starting delimiter character will not
-be recognised as the closing delimiter character.
-The implementation of
-.B \e$@
-ensures that the double quotes surrounding an argument
-will appear the same input level, which will be different
-to the input level of the argument itself.
-In a long escape name
-.B ]
-will not be recognized as a closing delimiter except
-when it occurs at the same input level as the opening
-.BR ] .
-In compatibility mode, no attention is paid to the input-level.
-.LP
-There are some new types of condition:
-.TP
-.BI .if\ r xxx
-True if there is a number register named
-.IR xxx .
-.TP
-.BI .if\ d xxx
-True if there is a string, macro, diversion, or request named
-.IR xxx .
-.TP
-.BI .if\ c ch
-True if there is a character
-.IR ch
-available;
-.I ch
-is either an
-.SM ASCII
-character
-or a special character
-.BI \e( xx
-or
-.BI \e[ xxx ]\fR;
-the condition will also be true if
-.I ch
-has been defined by the
-.B char
-request.
-.LP
-The
-.B tr
-request can now map characters onto
-.BR \e~ .
-.
-.SS Warnings
-.
-The warnings that can be given by
-.B troff
-are divided into the following categories.
-The name associated with each warning is used by the
-.B \-w
-and
-.B \-W
-options;
-the number is used by the
-.B warn
-request, and by the
-.B .warn
-register.
-.nr x \w'\fBright-brace'+1n+\w'0000'u
-.ta \nxuR
-.TP \nxu+3n
-.BR char \t1
-Non-existent characters.
-This is enabled by default.
-.TP
-.BR number \t2
-Invalid numeric expressions.
-This is enabled by default.
-.TP
-.BR break \t4
-In fill mode, lines which could not be broken so that their length was
-less than the line length.
-This is enabled by default.
-.TP
-.BR delim \t8
-Missing or mismatched closing delimiters.
-.TP
-.BR el \t16
-Use of the
-.B el
-request with no matching
-.B ie
-request.
-.TP
-.BR scale \t32
-Meaningless scaling indicators.
-.TP
-.BR range \t64
-Out of range arguments.
-.TP
-.BR syntax \t128
-Dubious syntax in numeric expressions.
-.TP
-.BR di \t256
-Use of
-.B di
-or
-.B da
-without an argument when there is no current diversion.
-.TP
-.BR mac \t512
-Use of undefined strings, macros and diversions.
-When an undefined string, macro or diversion is used,
-that string is automatically defined as empty.
-So, in most cases, at most one warning will be given for
-each name.
-.TP
-.BR reg \t1024
-Use of undefined number registers.
-When an undefined number register is used,
-that register is automatically defined to have a value of 0.
-a definition is automatically made with a value of 0.
-So, in most cases, at most one warning will be given for
-use of a particular name.
-.TP
-.BR tab \t2048
-Inappropriate use of a tab character.
-Either use of a tab character where a number was expected,
-or use of tab character in an unquoted macro argument.
-.TP
-.BR right-brace \t4096
-Use of
-.B \e}
-where a number was expected.
-.TP
-.BR missing \t8192
-Requests that are missing non-optional arguments.
-.TP
-.BR input \t16384
-Illegal input characters.
-.TP
-.BR escape \t32768
-Unrecognized escape sequences.
-When an unrecognized escape sequence is encountered,
-the escape character is ignored.
-.TP
-.BR space \t65536
-Missing space between a request or macro and its argument.
-This warning will be given
-when an undefined name longer than two characters is encountered,
-and the first two characters of the name make a defined name.
-The request or macro will not be invoked.
-When this warning is given, no macro is automatically defined.
-This is enabled by default.
-This warning will never occur in compatibility mode.
-.TP
-.BR font \t131072
-Non-existent fonts.
-This is enabled by default.
-.TP
-.BR ig \t262144
-Illegal escapes in text ignored with the
-.B ig
-request.
-These are conditions that are errors when they do not occur
-in ignored text.
-.LP
-There are also names that can be used to refer to groups of warnings:
-.TP
-.B all
-All warnings except
-.BR di ,
-.B mac
-and
-.BR reg .
-It is intended that this covers all warnings
-that are useful with traditional macro packages.
-.TP
-.B w
-All warnings.
-.
-.SS Incompatibilities
-.
-.LP
-Long names cause some incompatibilities.
-UNIX troff will interpret
-.IP
-.B
-\&.dsabcd
-.LP
-as defining a string
-.B ab
-with contents
-.BR cd .
-Normally, GNU troff will interpret this as a call of a macro named
-.BR dsabcd .
-Also UNIX troff will interpret
-.B \e*[
-or
-.B \en[
-as references to a string or number register called
-.BR [ .
-In GNU troff, however, this will normally be interpreted as the start
-of a long name.
-In
-.I compatibility mode
-GNU troff will interpret these things in the traditional way.
-In compatibility mode, however, long names are not recognised.
-Compatibility mode can be turned on with the
-.B \-C
-command line option, and turned on or off with the
-.B cp
-request.
-The number register
-.B \en[.C]
-is 1 if compatibility mode is on, 0 otherwise.
-.LP
-GNU troff
-does not allow the use of the escape sequences
-.BR \\e\e|\e^\e&\e}\e{\e (space) \e'\e`\e-\e_\e!\e%\ec
-in names of strings, macros, diversions, number registers,
-fonts or environments; UNIX troff does.
-The
-.B \eA
-escape sequence may be helpful in avoiding use of these
-escape sequences in names.
-.LP
-Fractional pointsizes cause one noteworthy incompatibility.
-In UNIX troff the
-.B ps
-request ignores scale indicators and so
-.IP
-.B .ps\ 10u
-.LP
-will set the pointsize to 10 points, whereas in
-GNU troff it will set the pointsize to 10 scaled points.
-.LP
-In GNU troff there is a fundamental difference between unformatted,
-input characters, and formatted, output characters.
-Everything that affects how an output character
-will be output is stored with the character; once an output
-character has been constructed it is unaffected by any subsequent
-requests that are executed, including
-.BR bd ,
-.BR cs ,
-.BR tkf ,
-.BR tr ,
-or
-.B fp
-requests.
-Normally output characters are constructed from input
-characters at the moment immediately before the character
-is added to the current output line.
-Macros, diversions and strings are all, in fact, the same type
-of object; they contain lists of input characters and output
-characters in any combination.
-An output character does not behave like an input character
-for the purposes of macro processing; it does not inherit any
-of the special properties that the input character from which it
-was constructed might have had.
-For example,
-.IP
-.nf
-.ft B
-\&.di x
-\e\e\e\e
-\&.br
-\&.di
-\&.x
-.ft
-.fi
-.LP
-will print
-.B \e\e
-in GNU troff;
-each pair of input
-.BR \e s
-is turned into one output
-.B \e
-and the resulting output
-.BR \e s
-are not interpreted as escape characters when they are reread.
-UNIX troff would interpret them as escape characters
-when they were reread and would end up printing one
-.BR \e .
-The correct way to obtain a printable
-.B \e
-is to use the
-.B \ee
-escape sequence: this will always print a single instance of the
-current escape character, regardless of whether or not it is used in a
-diversion; it will also work in both GNU troff and UNIX troff.
-If you wish for some reason to store in a diversion an escape
-sequence that will be interpreted when the diversion is reread,
-you can either use the traditional
-.B \e!\&
-transparent output facility, or, if this is unsuitable, the new
-.B \e?\&
-escape sequence.
-.
-.
-.SH ENVIRONMENT
-.
-.
-.TP
-.SM
-.B GROFF_TMAC_PATH
-A colon separated list of directories in which to search for
-macro files.
-.B troff
-will scan directories given in
-the
-.B \-M
-option before these, and in standard directories (current directory if in
-unsafe mode, home directory,
-.BR @LOCALMACRODIR@ ,
-.BR @SYSTEMMACRODIR@ ,
-.BR @MACRODIR@ )
-after these.
-.TP
-.SM
-.B GROFF_TYPESETTER
-Default device.
-.TP
-.SM
-.B GROFF_FONT_PATH
-A colon separated list of directories in which to search for the
-.BI dev name
-directory.
-.B troff
-will scan directories given in the
-.B \-F
-option before these, and in standard directories
-.RB ( @FONTPATH@ )
-after these.
-.
-.
-.SH FILES
-.
-.
-.Tp \w'@FONTDIR@/devname/DESC'u+3n
-.B @MACRODIR@/troffrc
-Initialization file (called before any other macro package).
-.TP
-.B @MACRODIR@/troffrc-end
-Initialization file (called after any other macro package).
-.TP
-.BI @MACRODIR@/ name .tmac
-.TQ
-.BI @MACRODIR@/tmac. name
-Macro files
-.TP
-.BI @FONTDIR@/dev name /DESC
-Device description file for device
-.IR name .
-.TP
-.BI @FONTDIR@/dev name / F
-Font file for font
-.I F
-of device
-.IR name .
-.LP
-Note that
-.B troffrc
-and
-.B troffrc-end
-are neither searched in the current nor in the home directory by default for
-security reasons (even if the
-.B \-U
-option is given).
-Use the
-.B \-M
-command line option or the
-.B GROFF_TMAC_PATH
-environment variable to add these directories to the search path if
-necessary.
-.
-.
-.SH "SEE ALSO"
-.
-.
-.BR groff (@MAN1EXT@),
-.BR @g@tbl (@MAN1EXT@),
-.BR @g@pic (@MAN1EXT@),
-.BR @g@eqn (@MAN1EXT@),
-.BR @g@refer (@MAN1EXT@),
-.BR @g@soelim (@MAN1EXT@),
-.BR @g@grn (@MAN1EXT@),
-.BR grops (@MAN1EXT@),
-.BR grodvi (@MAN1EXT@),
-.BR grotty (@MAN1EXT@),
-.BR grohtml (@MAN1EXT@),
-.BR grolj4 (@MAN1EXT@),
-.BR groff_font (@MAN5EXT@),
-.BR groff_out (@MAN5EXT@),
-.BR groff_char (@MAN7EXT@)
diff --git a/contrib/groff/src/utils/addftinfo/Makefile.sub b/contrib/groff/src/utils/addftinfo/Makefile.sub
deleted file mode 100644
index 23848d54fc72..000000000000
--- a/contrib/groff/src/utils/addftinfo/Makefile.sub
+++ /dev/null
@@ -1,11 +0,0 @@
-PROG=addftinfo
-MAN1=addftinfo.n
-XLIBS=$(LIBGROFF)
-OBJS=\
- addftinfo.o \
- guess.o
-CCSRCS=\
- $(srcdir)/addftinfo.cc \
- $(srcdir)/guess.cc
-HDRS=\
- $(srcdir)/guess.h
diff --git a/contrib/groff/src/utils/addftinfo/addftinfo.cc b/contrib/groff/src/utils/addftinfo/addftinfo.cc
deleted file mode 100644
index 43a81bcbcf7d..000000000000
--- a/contrib/groff/src/utils/addftinfo/addftinfo.cc
+++ /dev/null
@@ -1,218 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "stringclass.h"
-#include "cset.h"
-#include "guess.h"
-
-static void usage(FILE *stream);
-static void usage();
-static void version();
-static void convert_font(const font_params &, FILE *, FILE *);
-
-typedef int font_params::*param_t;
-
-static struct {
- const char *name;
- param_t par;
-} param_table[] = {
- { "x-height", &font_params::x_height },
- { "fig-height", &font_params::fig_height },
- { "asc-height", &font_params::asc_height },
- { "body-height", &font_params::body_height },
- { "cap-height", &font_params::cap_height },
- { "comma-depth", &font_params::comma_depth },
- { "desc-depth", &font_params::desc_depth },
- { "body-depth", &font_params::body_depth },
-};
-
-// These are all in thousandths of an em.
-// These values are correct for PostScript Times Roman.
-
-#define DEFAULT_X_HEIGHT 448
-#define DEFAULT_FIG_HEIGHT 676
-#define DEFAULT_ASC_HEIGHT 682
-#define DEFAULT_BODY_HEIGHT 676
-#define DEFAULT_CAP_HEIGHT 662
-#define DEFAULT_COMMA_DEPTH 143
-#define DEFAULT_DESC_DEPTH 217
-#define DEFAULT_BODY_DEPTH 177
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- for (int i = 1; i < argc; i++) {
- if (!strcmp(argv[i], "-v") || !strcmp(argv[i],"--version"))
- version();
- if (!strcmp(argv[i],"--help")) {
- usage(stdout);
- exit(0);
- }
- }
- if (argc < 4)
- usage();
- int resolution;
- if (sscanf(argv[argc-3], "%d", &resolution) != 1)
- usage();
- if (resolution <= 0)
- fatal("resolution must be > 0");
- int unitwidth;
- if (sscanf(argv[argc-2], "%d", &unitwidth) != 1)
- usage();
- if (unitwidth <= 0)
- fatal("unitwidth must be > 0");
- font_params param;
- const char *font = argv[argc-1];
- param.italic = (font[0] != '\0' && strchr(font, '\0')[-1] == 'I');
- param.em = (resolution*unitwidth)/72;
- param.x_height = DEFAULT_X_HEIGHT;
- param.fig_height = DEFAULT_FIG_HEIGHT;
- param.asc_height = DEFAULT_ASC_HEIGHT;
- param.body_height = DEFAULT_BODY_HEIGHT;
- param.cap_height = DEFAULT_CAP_HEIGHT;
- param.comma_depth = DEFAULT_COMMA_DEPTH;
- param.desc_depth = DEFAULT_DESC_DEPTH;
- param.body_depth = DEFAULT_BODY_DEPTH;
- int i;
- for (i = 1; i < argc && argv[i][0] == '-'; i++) {
- if (argv[i][1] == '-' && argv[i][2] == '\0') {
- i++;
- break;
- }
- if (i + 1 >= argc)
- usage();
- int j;
- for (j = 0;; j++) {
- if (j >= sizeof(param_table)/sizeof(param_table[0]))
- fatal("parameter `%1' not recognized", argv[i] + 1);
- if (strcmp(param_table[j].name, argv[i] + 1) == 0)
- break;
- }
- if (sscanf(argv[i+1], "%d", &(param.*(param_table[j].par))) != 1)
- fatal("invalid argument `%1'", argv[i+1]);
- i++;
- }
- if (argc - i != 3)
- usage();
- errno = 0;
- FILE *infp = fopen(font, "r");
- if (infp == 0)
- fatal("can't open `%1': %2", font, strerror(errno));
- convert_font(param, infp, stdout);
- return 0;
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [-v] [-param value] ... "
- "resolution unitwidth font\n",
- program_name);
-}
-static void usage()
-{
- usage(stderr);
- exit(1);
-}
-
-static void version()
-{
- extern const char *Version_string;
- printf("GNU addftinfo (groff) version %s\n", Version_string);
- exit(0);
-}
-
-static int get_line(FILE *fp, string *p)
-{
- int c;
- p->clear();
- while ((c = getc(fp)) != EOF) {
- *p += char(c);
- if (c == '\n')
- break;
- }
- return p->length() > 0;
-}
-
-static void convert_font(const font_params &param, FILE *infp, FILE *outfp)
-{
- string s;
- while (get_line(infp, &s)) {
- put_string(s, outfp);
- if (s.length() >= 8
- && strncmp(&s[0], "charset", 7))
- break;
- }
- while (get_line(infp, &s)) {
- s += '\0';
- string name;
- const char *p = s.contents();
- while (csspace(*p))
- p++;
- while (*p != '\0' && !csspace(*p))
- name += *p++;
- while (csspace(*p))
- p++;
- for (const char *q = s.contents(); q < p; q++)
- putc(*q, outfp);
- char *next;
- char_metric metric;
- metric.width = (int)strtol(p, &next, 10);
- if (next != p) {
- printf("%d", metric.width);
- p = next;
- metric.type = (int)strtol(p, &next, 10);
- if (next != p) {
- name += '\0';
- guess(name.contents(), param, &metric);
- if (metric.sk == 0) {
- if (metric.left_ic == 0) {
- if (metric.ic == 0) {
- if (metric.depth == 0) {
- if (metric.height != 0)
- printf(",%d", metric.height);
- }
- else
- printf(",%d,%d", metric.height, metric.depth);
- }
- else
- printf(",%d,%d,%d", metric.height, metric.depth, metric.ic);
- }
- else
- printf(",%d,%d,%d,%d", metric.height, metric.depth, metric.ic,
- metric.left_ic);
- }
- else
- printf(",%d,%d,%d,%d,%d", metric.height, metric.depth, metric.ic,
- metric.left_ic, metric.sk);
- }
- }
- fputs(p, outfp);
- }
-}
-
diff --git a/contrib/groff/src/utils/addftinfo/addftinfo.man b/contrib/groff/src/utils/addftinfo/addftinfo.man
deleted file mode 100644
index 921f633639d7..000000000000
--- a/contrib/groff/src/utils/addftinfo/addftinfo.man
+++ /dev/null
@@ -1,107 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.TH ADDFTINFO @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-addftinfo \- add information to troff font files for use with groff
-.SH SYNOPSIS
-.B addftinfo
-[
-.B \-v
-]
-[
-.BI \- param\ value\fR.\|.\|.
-]
-.I res
-.I unitwidth
-.I font
-.SH DESCRIPTION
-.B addftinfo
-reads a troff font file
-and adds some additional font-metric information
-that is used by the groff system.
-The font file with the information added is written on the
-standard output.
-The information added is guessed using
-some parametric information about the font
-and assumptions
-about the traditional troff names for characters.
-The main information added is the heights and depths of characters.
-The
-.I res
-and
-.I unitwidth
-arguments should be the same as the corresponding parameters
-in the DESC file;
-.I font
-is the name of the file describing the font;
-if
-.I font
-ends with
-.B I
-the font will be assumed to be italic.
-.SH OPTIONS
-.B \-v
-prints the version number.
-.LP
-All other options changes one of the parameters that is used
-to derive the heights and depths.
-Like the existing quantities in the font
-file, each
-.I value
-is in
-.RI inches/ res
-for a font whose point size is
-.IR unitwidth .
-.I param
-must be one of:
-.TP
-.B x-height
-The height of lowercase letters without ascenders such as x.
-.TP
-.B fig-height
-The height of figures (digits).
-.TP
-.B asc-height
-The height of characters with ascenders, such as b, d or l.
-.TP
-.B body-height
-The height of characters such as parentheses.
-.TP
-.B cap-height
-The height of uppercase letters such as A.
-.TP
-.B comma-depth
-The depth of a comma.
-.TP
-.B desc-depth
-The depth of characters with descenders, such as p,q, or y.
-.TP
-.B body-depth
-The depth of characters such as parentheses.
-.LP
-.B addftinfo
-makes no attempt to use the specified parameters to guess
-the unspecified parameters.
-If a parameter is not specified the default will be used.
-The defaults are chosen to have the reasonable values for
-a Times font.
-.SH "SEE ALSO"
-.BR groff_font (@MAN5EXT@),
-.BR groff (@MAN1EXT@),
-.BR groff_char (@MAN7EXT@)
diff --git a/contrib/groff/src/utils/addftinfo/guess.cc b/contrib/groff/src/utils/addftinfo/guess.cc
deleted file mode 100644
index dcfd4c92cb9b..000000000000
--- a/contrib/groff/src/utils/addftinfo/guess.cc
+++ /dev/null
@@ -1,490 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include "guess.h"
-
-void guess(const char *s, const font_params &param, char_metric *metric)
-{
- int &height = metric->height;
- int &depth = metric->depth;
-
- metric->ic = 0;
- metric->left_ic = 0;
- metric->sk = 0;
- height = 0;
- depth = 0;
- if (s[0] == '\0' || (s[1] != '\0' && s[2] != '\0'))
- goto do_default;
-#define HASH(c1, c2) (((unsigned char)(c1) << 8) | (unsigned char)(c2))
- switch (HASH(s[0], s[1])) {
- default:
- do_default:
- if (metric->type & 01)
- depth = param.desc_depth;
- if (metric->type & 02)
- height = param.asc_height;
- else
- height = param.x_height;
- break;
- case HASH('\\', '|'):
- case HASH('\\', '^'):
- case HASH('\\', '&'):
- // these have zero height and depth
- break;
- case HASH('f', 0):
- height = param.asc_height;
- if (param.italic)
- depth = param.desc_depth;
- break;
- case HASH('a', 0):
- case HASH('c', 0):
- case HASH('e', 0):
- case HASH('m', 0):
- case HASH('n', 0):
- case HASH('o', 0):
- case HASH('r', 0):
- case HASH('s', 0):
- case HASH('u', 0):
- case HASH('v', 0):
- case HASH('w', 0):
- case HASH('x', 0):
- case HASH('z', 0):
- height = param.x_height;
- break;
- case HASH('i', 0):
- height = param.x_height;
- break;
- case HASH('b', 0):
- case HASH('d', 0):
- case HASH('h', 0):
- case HASH('k', 0):
- case HASH('l', 0):
- case HASH('F', 'i'):
- case HASH('F', 'l'):
- case HASH('f', 'f'):
- case HASH('f', 'i'):
- case HASH('f', 'l'):
- height = param.asc_height;
- break;
- case HASH('t', 0):
- height = param.asc_height;
- break;
- case HASH('g', 0):
- case HASH('p', 0):
- case HASH('q', 0):
- case HASH('y', 0):
- height = param.x_height;
- depth = param.desc_depth;
- break;
- case HASH('j', 0):
- height = param.x_height;
- depth = param.desc_depth;
- break;
- case HASH('A', 0):
- case HASH('B', 0):
- case HASH('C', 0):
- case HASH('D', 0):
- case HASH('E', 0):
- case HASH('F', 0):
- case HASH('G', 0):
- case HASH('H', 0):
- case HASH('I', 0):
- case HASH('J', 0):
- case HASH('K', 0):
- case HASH('L', 0):
- case HASH('M', 0):
- case HASH('N', 0):
- case HASH('O', 0):
- case HASH('P', 0):
- case HASH('Q', 0):
- case HASH('R', 0):
- case HASH('S', 0):
- case HASH('T', 0):
- case HASH('U', 0):
- case HASH('V', 0):
- case HASH('W', 0):
- case HASH('X', 0):
- case HASH('Y', 0):
- case HASH('Z', 0):
- height = param.cap_height;
- break;
- case HASH('*', 'A'):
- case HASH('*', 'B'):
- case HASH('*', 'C'):
- case HASH('*', 'D'):
- case HASH('*', 'E'):
- case HASH('*', 'F'):
- case HASH('*', 'G'):
- case HASH('*', 'H'):
- case HASH('*', 'I'):
- case HASH('*', 'K'):
- case HASH('*', 'L'):
- case HASH('*', 'M'):
- case HASH('*', 'N'):
- case HASH('*', 'O'):
- case HASH('*', 'P'):
- case HASH('*', 'Q'):
- case HASH('*', 'R'):
- case HASH('*', 'S'):
- case HASH('*', 'T'):
- case HASH('*', 'U'):
- case HASH('*', 'W'):
- case HASH('*', 'X'):
- case HASH('*', 'Y'):
- case HASH('*', 'Z'):
- height = param.cap_height;
- break;
- case HASH('0', 0):
- case HASH('1', 0):
- case HASH('2', 0):
- case HASH('3', 0):
- case HASH('4', 0):
- case HASH('5', 0):
- case HASH('6', 0):
- case HASH('7', 0):
- case HASH('8', 0):
- case HASH('9', 0):
- case HASH('1', '2'):
- case HASH('1', '4'):
- case HASH('3', '4'):
- height = param.fig_height;
- break;
- case HASH('(', 0):
- case HASH(')', 0):
- case HASH('[', 0):
- case HASH(']', 0):
- case HASH('{', 0):
- case HASH('}', 0):
- height = param.body_height;
- depth = param.body_depth;
- break;
- case HASH('i', 's'):
- height = (param.em*3)/4;
- depth = param.em/4;
- break;
- case HASH('*', 'a'):
- case HASH('*', 'e'):
- case HASH('*', 'i'):
- case HASH('*', 'k'):
- case HASH('*', 'n'):
- case HASH('*', 'o'):
- case HASH('*', 'p'):
- case HASH('*', 's'):
- case HASH('*', 't'):
- case HASH('*', 'u'):
- case HASH('*', 'w'):
- height = param.x_height;
- break;
- case HASH('*', 'd'):
- case HASH('*', 'l'):
- height = param.asc_height;
- break;
- case HASH('*', 'g'):
- case HASH('*', 'h'):
- case HASH('*', 'm'):
- case HASH('*', 'r'):
- case HASH('*', 'x'):
- case HASH('*', 'y'):
- height = param.x_height;
- depth = param.desc_depth;
- break;
- case HASH('*', 'b'):
- case HASH('*', 'c'):
- case HASH('*', 'f'):
- case HASH('*', 'q'):
- case HASH('*', 'z'):
- height = param.asc_height;
- depth = param.desc_depth;
- break;
- case HASH('t', 's'):
- height = param.x_height;
- depth = param.desc_depth;
- break;
- case HASH('!', 0):
- case HASH('?', 0):
- case HASH('"', 0):
- case HASH('#', 0):
- case HASH('$', 0):
- case HASH('%', 0):
- case HASH('&', 0):
- case HASH('*', 0):
- case HASH('+', 0):
- height = param.asc_height;
- break;
- case HASH('`', 0):
- case HASH('\'', 0):
- height = param.asc_height;
- break;
- case HASH('~', 0):
- case HASH('^', 0):
- case HASH('a', 'a'):
- case HASH('g', 'a'):
- height = param.asc_height;
- break;
- case HASH('r', 'u'):
- case HASH('.', 0):
- break;
- case HASH(',', 0):
- depth = param.comma_depth;
- break;
- case HASH('m', 'i'):
- case HASH('-', 0):
- case HASH('h', 'y'):
- case HASH('e', 'm'):
- height = param.x_height;
- break;
- case HASH(':', 0):
- height = param.x_height;
- break;
- case HASH(';', 0):
- height = param.x_height;
- depth = param.comma_depth;
- break;
- case HASH('=', 0):
- case HASH('e', 'q'):
- height = param.x_height;
- break;
- case HASH('<', 0):
- case HASH('>', 0):
- case HASH('>', '='):
- case HASH('<', '='):
- case HASH('@', 0):
- case HASH('/', 0):
- case HASH('|', 0):
- case HASH('\\', 0):
- height = param.asc_height;
- break;
- case HASH('_', 0):
- case HASH('u', 'l'):
- case HASH('\\', '_'):
- depth = param.em/4;
- break;
- case HASH('r', 'n'):
- height = (param.em*3)/4;
- break;
- case HASH('s', 'r'):
- height = (param.em*3)/4;
- depth = param.em/4;
- break;
- case HASH('b', 'u'):
- case HASH('s', 'q'):
- case HASH('d', 'e'):
- case HASH('d', 'g'):
- case HASH('f', 'm'):
- case HASH('c', 't'):
- case HASH('r', 'g'):
- case HASH('c', 'o'):
- case HASH('p', 'l'):
- case HASH('*', '*'):
- case HASH('s', 'c'):
- case HASH('s', 'l'):
- case HASH('=', '='):
- case HASH('~', '='):
- case HASH('a', 'p'):
- case HASH('!', '='):
- case HASH('-', '>'):
- case HASH('<', '-'):
- case HASH('u', 'a'):
- case HASH('d', 'a'):
- case HASH('m', 'u'):
- case HASH('d', 'i'):
- case HASH('+', '-'):
- case HASH('c', 'u'):
- case HASH('c', 'a'):
- case HASH('s', 'b'):
- case HASH('s', 'p'):
- case HASH('i', 'b'):
- case HASH('i', 'p'):
- case HASH('i', 'f'):
- case HASH('p', 'd'):
- case HASH('g', 'r'):
- case HASH('n', 'o'):
- case HASH('p', 't'):
- case HASH('e', 's'):
- case HASH('m', 'o'):
- case HASH('b', 'r'):
- case HASH('d', 'd'):
- case HASH('r', 'h'):
- case HASH('l', 'h'):
- case HASH('o', 'r'):
- case HASH('c', 'i'):
- height = param.asc_height;
- break;
- case HASH('l', 't'):
- case HASH('l', 'b'):
- case HASH('r', 't'):
- case HASH('r', 'b'):
- case HASH('l', 'k'):
- case HASH('r', 'k'):
- case HASH('b', 'v'):
- case HASH('l', 'f'):
- case HASH('r', 'f'):
- case HASH('l', 'c'):
- case HASH('r', 'c'):
- height = (param.em*3)/4;
- depth = param.em/4;
- break;
-#if 0
- case HASH('%', '0'):
- case HASH('-', '+'):
- case HASH('-', 'D'):
- case HASH('-', 'd'):
- case HASH('-', 'd'):
- case HASH('-', 'h'):
- case HASH('.', 'i'):
- case HASH('.', 'j'):
- case HASH('/', 'L'):
- case HASH('/', 'O'):
- case HASH('/', 'l'):
- case HASH('/', 'o'):
- case HASH('=', '~'):
- case HASH('A', 'E'):
- case HASH('A', 'h'):
- case HASH('A', 'N'):
- case HASH('C', 's'):
- case HASH('D', 'o'):
- case HASH('F', 'c'):
- case HASH('F', 'o'):
- case HASH('I', 'J'):
- case HASH('I', 'm'):
- case HASH('O', 'E'):
- case HASH('O', 'f'):
- case HASH('O', 'K'):
- case HASH('O', 'm'):
- case HASH('O', 'R'):
- case HASH('P', 'o'):
- case HASH('R', 'e'):
- case HASH('S', '1'):
- case HASH('S', '2'):
- case HASH('S', '3'):
- case HASH('T', 'P'):
- case HASH('T', 'p'):
- case HASH('Y', 'e'):
- case HASH('\\', '-'):
- case HASH('a', '"'):
- case HASH('a', '-'):
- case HASH('a', '.'):
- case HASH('a', '^'):
- case HASH('a', 'b'):
- case HASH('a', 'c'):
- case HASH('a', 'd'):
- case HASH('a', 'e'):
- case HASH('a', 'h'):
- case HASH('a', 'o'):
- case HASH('a', 't'):
- case HASH('a', '~'):
- case HASH('b', 'a'):
- case HASH('b', 'b'):
- case HASH('b', 's'):
- case HASH('c', '*'):
- case HASH('c', '+'):
- case HASH('f', '/'):
- case HASH('f', 'a'):
- case HASH('f', 'c'):
- case HASH('f', 'o'):
- case HASH('h', 'a'):
- case HASH('h', 'o'):
- case HASH('i', 'j'):
- case HASH('l', 'A'):
- case HASH('l', 'B'):
- case HASH('l', 'C'):
- case HASH('m', 'd'):
- case HASH('n', 'c'):
- case HASH('n', 'e'):
- case HASH('n', 'm'):
- case HASH('o', 'A'):
- case HASH('o', 'a'):
- case HASH('o', 'e'):
- case HASH('o', 'q'):
- case HASH('p', 'l'):
- case HASH('p', 'p'):
- case HASH('p', 's'):
- case HASH('r', '!'):
- case HASH('r', '?'):
- case HASH('r', 'A'):
- case HASH('r', 'B'):
- case HASH('r', 'C'):
- case HASH('r', 's'):
- case HASH('s', 'h'):
- case HASH('s', 's'):
- case HASH('t', 'e'):
- case HASH('t', 'f'):
- case HASH('t', 'i'):
- case HASH('t', 'm'):
- case HASH('~', '~'):
- case HASH('v', 'S'):
- case HASH('v', 'Z'):
- case HASH('v', 's'):
- case HASH('v', 'z'):
- case HASH('^', 'A'):
- case HASH('^', 'E'):
- case HASH('^', 'I'):
- case HASH('^', 'O'):
- case HASH('^', 'U'):
- case HASH('^', 'a'):
- case HASH('^', 'e'):
- case HASH('^', 'i'):
- case HASH('^', 'o'):
- case HASH('^', 'u'):
- case HASH('`', 'A'):
- case HASH('`', 'E'):
- case HASH('`', 'I'):
- case HASH('`', 'O'):
- case HASH('`', 'U'):
- case HASH('`', 'a'):
- case HASH('`', 'e'):
- case HASH('`', 'i'):
- case HASH('`', 'o'):
- case HASH('`', 'u'):
- case HASH('~', 'A'):
- case HASH('~', 'N'):
- case HASH('~', 'O'):
- case HASH('~', 'a'):
- case HASH('~', 'n'):
- case HASH('~', 'o'):
- case HASH('\'', 'A'):
- case HASH('\'', 'C'):
- case HASH('\'', 'E'):
- case HASH('\'', 'I'):
- case HASH('\'', 'O'):
- case HASH('\'', 'U'):
- case HASH('\'', 'a'):
- case HASH('\'', 'c'):
- case HASH('\'', 'e'):
- case HASH('\'', 'i'):
- case HASH('\'', 'o'):
- case HASH('\'', 'u')
- case HASH(':', 'A'):
- case HASH(':', 'E'):
- case HASH(':', 'I'):
- case HASH(':', 'O'):
- case HASH(':', 'U'):
- case HASH(':', 'Y'):
- case HASH(':', 'a'):
- case HASH(':', 'e'):
- case HASH(':', 'i'):
- case HASH(':', 'o'):
- case HASH(':', 'u'):
- case HASH(':', 'y'):
- case HASH(',', 'C'):
- case HASH(',', 'c'):
-#endif
- }
-}
diff --git a/contrib/groff/src/utils/addftinfo/guess.h b/contrib/groff/src/utils/addftinfo/guess.h
deleted file mode 100644
index 4471dda8d9a6..000000000000
--- a/contrib/groff/src/utils/addftinfo/guess.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-struct font_params {
- int italic;
- int em;
- int x_height;
- int fig_height;
- int cap_height;
- int asc_height;
- int body_height;
- int comma_depth;
- int desc_depth;
- int body_depth;
-};
-
-struct char_metric {
- int width;
- int type;
- int height;
- int depth;
- int ic;
- int left_ic;
- int sk;
-};
-
-void guess(const char *s, const font_params &param, char_metric *metric);
diff --git a/contrib/groff/src/utils/afmtodit/Makefile.sub b/contrib/groff/src/utils/afmtodit/Makefile.sub
deleted file mode 100644
index 9176924f6301..000000000000
--- a/contrib/groff/src/utils/afmtodit/Makefile.sub
+++ /dev/null
@@ -1,23 +0,0 @@
-MAN1=afmtodit.n
-CLEANADD=afmtodit
-
-all: afmtodit
-
-afmtodit: afmtodit.pl
- if test -n "$(PERLPATH)"; then \
- sed -e "s|/usr/bin/perl|$(PERLPATH)|" \
- -e "s|@VERSION@|$(version)$(revision)|" \
- $(srcdir)/afmtodit.pl >afmtodit; \
- else \
- sed -e "s|@VERSION@|$(version)$(revision)|" \
- $(srcdir)/afmtodit.pl afmtodit; \
- fi
- chmod +x afmtodit
-
-install_data: afmtodit
- -test -d $(bindir) || $(mkinstalldirs) $(bindir)
- -rm -f $(bindir)/afmtodit
- $(INSTALL_SCRIPT) afmtodit $(bindir)/afmtodit
-
-uninstall_sub:
- -rm -f $(bindir)/afmtodit
diff --git a/contrib/groff/src/utils/afmtodit/afmtodit.man b/contrib/groff/src/utils/afmtodit/afmtodit.man
deleted file mode 100644
index 03a6e5cb8e5e..000000000000
--- a/contrib/groff/src/utils/afmtodit/afmtodit.man
+++ /dev/null
@@ -1,225 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH AFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-afmtodit \- create font files for use with groff \-Tps
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fBafmtodit 'u
-.ti \niu
-.B afmtodit
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-nsv
-.OP \-d desc_file
-.OP \-e enc_file
-.OP \-i n
-.OP \-a n
-.I afm_file
-.I map_file
-.I font
-.br
-.ad \na
-.SH DESCRIPTION
-.B afmtodit
-creates a font file for use with groff and
-.BR grops .
-.B afmtodit
-is written in perl;
-you must have perl version 3 installed in order to run
-.BR afmtodit .
-.I afm_file
-is the AFM (Adobe Font Metric) file for the font.
-.I map_file
-is a file that says which groff character names map onto
-each PostScript character name;
-this file should contain a sequence of lines of the form
-.IP
-.I
-ps_char groff_char
-.LP
-where
-.I ps_char
-is the PostScript name of the character
-and
-.I groff_char
-is the groff name of the character (as used in the groff font file.)
-The same
-.I ps_char
-can occur multiple times in the file;
-each
-.I groff_char
-must occur at most once.
-.I font
-is the groff name of the font.
-If a PostScript character is in the encoding to be used for the font
-but is not mentioned in
-.I map_file
-then
-.B afmtodit
-will put it in the groff font file as an unnamed character,
-which can be accessed by the
-.B \eN
-escape sequence in
-.BR troff .
-The groff font file will be output to a file called
-.IR font .
-.LP
-If there is a downloadable font file for the font, it may be listed in
-the file
-.BR @FONTDIR@/devps/download ;
-see
-.BR grops (@MAN1EXT@).
-.LP
-If the
-.B \-i
-option is used,
-.B afmtodit
-will automatically generate an italic correction,
-a left italic correction and a subscript correction
-for each character
-(the significance of these parameters is explained in
-.BR groff_font (@MAN5EXT@));
-these parameters may be specified for individual characters by
-adding to the
-.I afm_file
-lines of the form:
-.IP
-.BI italicCorrection\ ps_char\ n
-.br
-.BI leftItalicCorrection\ ps_char\ n
-.br
-.BI subscriptCorrection\ ps_char\ n
-.LP
-where
-.I ps_char
-is the PostScript name of the character,
-and
-.I n
-is the desired value of the corresponding parameter in thousandths of an em.
-These parameters are normally needed only for italic (or oblique) fonts.
-.SH OPTIONS
-.TP
-.B \-v
-Print version.
-.TP
-.B \-n
-Don't output a
-.B ligatures
-command for this font.
-Use this with constant-width fonts.
-.TP
-.B \-s
-The font is special.
-The effect of this option is to add the
-.B special
-command to the font file.
-.TP
-.BI \-d desc_file
-The device description file is
-.I desc_file
-rather than the default
-.BR DESC .
-.TP
-.BI \-e enc_file
-The PostScript font should be reencoded to use the encoding described
-in enc_file.
-The format of
-.I enc_file
-is described in
-.BR grops (@MAN1EXT@).
-.TP
-.BI \-a n
-Use
-.I n
-as the slant parameter in the font file;
-this is used by groff in the positioning of accents.
-By default
-.B afmtodit
-uses the negative of the ItalicAngle specified in the afm file;
-with true italic fonts it is sometimes desirable to use
-a slant that is less than this.
-If you find that characters from an italic font have accents
-placed too far to the right over them,
-then use the
-.B \-a
-option to give the font a smaller slant.
-.TP
-.BI \-i n
-Generate an italic correction for each character so that
-the character's width plus the character's italic correction
-is equal to
-.I n
-thousandths of an em
-plus the amount by which the right edge of the character's bounding
-is to the right of the character's origin.
-If this would result in a negative italic correction, use a zero
-italic correction instead.
-.IP
-Also generate a subscript correction equal to the
-product of the tangent of the slant of the font and
-four fifths of the x-height of the font.
-If this would result in a subscript correction greater than the italic
-correction, use a subscript correction equal to the italic correction
-instead.
-.IP
-Also generate a left italic correction for each character
-equal to
-.I n
-thousandths of an em
-plus the amount by which the left edge of the character's bounding box
-is to the left of the character's origin.
-The left italic correction may be negative.
-.IP
-This option is normally needed only with italic (or oblique) fonts.
-The font files distributed with groff were created using an option of
-.B \-i50
-for italic fonts.
-.SH FILES
-.Tp \w'\fB@FONTDIR@/devps/download'u+2n
-.B @FONTDIR@/devps/DESC
-Device description file.
-.TP
-.BI @FONTDIR@/devps/ F
-Font description file for font
-.IR F .
-.TP
-.B @FONTDIR@/devps/download
-List of downloadable fonts.
-.TP
-.B @FONTDIR@/devps/text.enc
-Encoding used for text fonts.
-.TP
-.B @FONTDIR@/devps/generate/textmap
-Standard mapping.
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@),
-.BR grops (@MAN1EXT@),
-.BR groff_font (@MAN5EXT@),
-.BR perl (1)
diff --git a/contrib/groff/src/utils/afmtodit/afmtodit.pl b/contrib/groff/src/utils/afmtodit/afmtodit.pl
deleted file mode 100644
index 661245aa6f93..000000000000
--- a/contrib/groff/src/utils/afmtodit/afmtodit.pl
+++ /dev/null
@@ -1,331 +0,0 @@
-#! /usr/bin/perl -P-
-# -*- Perl -*-
-# Copyright (C) 1989-2000 Free Software Foundation, Inc.
-# Written by James Clark (jjc@jclark.com)
-#
-# This file is part of groff.
-#
-# groff is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2, or (at your option) any later
-# version.
-#
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with groff; see the file COPYING. If not, write to the Free Software
-# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$prog = $0;
-$prog =~ s@.*/@@;
-
-do 'getopts.pl';
-do Getopts('ve:sd:i:a:n');
-
-if (opt_v) {
- print "GNU afmtodit (groff) version @VERSION@\n";
- exit 0;
-}
-
-if ($#ARGV != 2) {
- die "Usage: $prog [-nsv] [-d DESC] [-e encoding] [-i n] [-a angle] afmfile mapfile font\n";
-}
-
-$afm = $ARGV[0];
-$map = $ARGV[1];
-$font = $ARGV[2];
-$desc = $opt_d || "DESC";
-
-# read the afm file
-
-open(AFM, $afm) || die "$prog: can't open \`$ARGV[0]': $!\n";
-
-while (<AFM>) {
- chop;
- @field = split(' ');
- if ($field[0] eq "FontName") {
- $psname = $field[1];
- }
- elsif($field[0] eq "ItalicAngle") {
- $italic_angle = -$field[1];
- }
- elsif ($field[0] eq "KPX") {
- if ($#field == 3) {
- push(kern1, $field[1]);
- push(kern2, $field[2]);
- push(kernx, $field[3]);
- }
- }
- elsif ($field[0] eq "italicCorrection") {
- $italic_correction{$field[1]} = $field[2];
- }
- elsif ($field[0] eq "leftItalicCorrection") {
- $left_italic_correction{$field[1]} = $field[2];
- }
- elsif ($field[0] eq "subscriptCorrection") {
- $subscript_correction{$field[1]} = $field[2];
- }
- elsif ($field[0] eq "StartCharMetrics") {
- while (<AFM>) {
- @field = split(' ');
- last if ($field[0] eq "EndCharMetrics");
- if ($field[0] eq "C") {
- $c = -1;
- $wx = 0;
- $n = "";
- $lly = 0;
- $ury = 0;
- $llx = 0;
- $urx = 0;
- $c = $field[1];
- $i = 2;
- while ($i <= $#field) {
- if ($field[$i] eq "WX") {
- $w = $field[$i + 1];
- $i += 2;
- }
- elsif ($field[$i] eq "N") {
- $n = $field[$i + 1];
- $i += 2;
- }
- elsif ($field[$i] eq "B") {
- $llx = $field[$i + 1];
- $lly = $field[$i + 2];
- $urx = $field[$i + 3];
- $ury = $field[$i + 4];
- $i += 5;
- }
- elsif ($field[$i] eq "L") {
- push(ligatures, $field[$i + 2]);
- $i += 3;
- }
- else {
- while ($i <= $#field && $field[$i] ne ";") {
- $i++;
- }
- $i++;
- }
- }
- if (!$opt_e && $c != -1) {
- $encoding[$c] = $n;
- $in_encoding{$n} = 1;
- }
- $width{$n} = $w;
- $height{$n} = $ury;
- $depth{$n} = -$lly;
- $left_side_bearing{$n} = -$llx;
- $right_side_bearing{$n} = $urx - $w;
- }
- }
- }
-}
-close(AFM);
-
-# read the DESC file
-
-$sizescale = 1;
-
-open(DESC, $desc) || die "$prog: can't open \`$desc': $!\n";
-while (<DESC>) {
- next if /^#/;
- chop;
- @field = split(' ');
- last if $field[0] eq "charset";
- if ($field[0] eq "res") { $resolution = $field[1]; }
- if ($field[0] eq "unitwidth") { $unitwidth = $field[1]; }
- if ($field[0] eq "sizescale") { $sizescale = $field[1]; }
-}
-close(DESC);
-
-if ($opt_e) {
- # read the encoding file
-
- open(ENCODING, $opt_e) || die "$prog: can't open \`$opt_e': $!\n";
- while (<ENCODING>) {
- chop;
- @field = split(' ');
- if ($#field == 1) {
- if ($field[1] >= 0 && defined $width{$field[0]}) {
- $encoding[$field[1]] = $field[0];
- $in_encoding{$field[0]} = 1;
- }
- }
- }
- close(ENCODING);
-}
-
-# read the map file
-
-open(MAP, $map) || die "$prog: can't open \`$map': $!\n";
-while (<MAP>) {
- next if /^#/;
- chop;
- @field = split(' ');
- if ($#field == 1 && $in_encoding{$field[0]}) {
- if (defined $mapped{$field[1]}) {
- warn "Both $mapped{$field[1]} and $field[0] map to $field[1]";
- }
- elsif ($field[1] eq "space") {
- # the PostScript character "space" is automatically mapped
- # to the groff character "space"; this is for grops
- warn "you are not allowed to map to the groff character `space'";
- }
- elsif ($field[0] eq "space") {
- warn "you are not allowed to map the PostScript character `space'";
- }
- else {
- $nmap{$field[0]} += 0;
- $map{$field[0],$nmap{$field[0]}} = $field[1];
- $nmap{$field[0]} += 1;
- $mapped{$field[1]} = $field[0];
- }
- }
-}
-close(MAP);
-
-$italic_angle = $opt_a if $opt_a;
-
-# print it all out
-
-open(FONT, ">$font") || die "$prog: can't open \`$font' for output: $!\n";
-select(FONT);
-
-print("name $font\n");
-print("internalname $psname\n") if $psname;
-print("special\n") if $opt_s;
-printf("slant %g\n", $italic_angle) if $italic_angle != 0;
-printf("spacewidth %d\n", do conv($width{"space"})) if defined $width{"space"};
-
-if ($opt_e) {
- $e = $opt_e;
- $e =~ s@.*/@@;
- print("encoding $e\n");
-}
-
-if (!$opt_n && $#ligatures >= 0) {
- print("ligatures");
- foreach $lig (@ligatures) {
- print(" $lig");
- }
- print(" 0\n");
-}
-
-if ($#kern1 >= 0) {
- print("kernpairs\n");
-
- for ($i = 0; $i <= $#kern1; $i++) {
- $c1 = $kern1[$i];
- $c2 = $kern2[$i];
- if ($in_encoding{$c1} == 1 && $nmap{$c1} != 0
- && $in_encoding{$c2} == 1 && $nmap{$c2} != 0) {
- for ($j = 0; $j < $nmap{$c1}; $j++) {
- for ($k = 0; $k < $nmap{$c2}; $k++) {
- if ($kernx[$i] != 0) {
- printf("%s %s %d\n",
- $map{$c1,$j},
- $map{$c2,$k},
- do conv($kernx[$i]));
- }
- }
- }
- }
- }
-}
-
-# characters not shorter than asc_boundary are considered to have ascenders
-$asc_boundary = $height{"t"} - 1;
-
-# likewise for descenders
-$desc_boundary = $depth{"g"};
-$desc_boundary = $depth{"j"} if $depth{"j"} < $desc_boundary;
-$desc_boundary = $depth{"p"} if $depth{"p"} < $desc_boundary;
-$desc_boundary = $depth{"q"} if $depth{"q"} < $desc_boundary;
-$desc_boundary = $depth{"y"} if $depth{"y"} < $desc_boundary;
-$desc_boundary -= 1;
-
-if (defined $height{"x"}) {
- $xheight = $height{"x"};
-}
-elsif (defined $height{"alpha"}) {
- $xheight = $height{"alpha"};
-}
-else {
- $xheight = 450;
-}
-
-$italic_angle = $italic_angle*3.14159265358979323846/180.0;
-$slant = sin($italic_angle)/cos($italic_angle);
-$slant = 0 if $slant < 0;
-
-print("charset\n");
-for ($i = 0; $i < 256; $i++) {
- $ch = $encoding[$i];
- if ($ch ne "" && $ch ne "space") {
- $map{$ch,"0"} = "---" if $nmap{$ch} == 0;
- $type = 0;
- $h = $height{$ch};
- $h = 0 if $h < 0;
- $d = $depth{$ch};
- $d = 0 if $d < 0;
- $type = 1 if $d >= $desc_boundary;
- $type += 2 if $h >= $asc_boundary;
- printf("%s\t%d", $map{$ch,"0"}, do conv($width{$ch}));
- $italic_correction = 0;
- $left_math_fit = 0;
- $subscript_correction = 0;
- if (defined $opt_i) {
- $italic_correction = $right_side_bearing{$ch} + $opt_i;
- $italic_correction = 0 if $italic_correction < 0;
- $subscript_correction = $slant * $xheight * .8;
- $subscript_correction = $italic_correction if
- $subscript_correction > $italic_correction;
- $left_math_fit = $left_side_bearing{$ch} + $opt_i;
- }
- if (defined $italic_correction{$ch}) {
- $italic_correction = $italic_correction{$ch};
- }
- if (defined $left_italic_correction{$ch}) {
- $left_math_fit = $left_italic_correction{$ch};
- }
- if (defined $subscript_correction{$ch}) {
- $subscript_correction = $subscript_correction{$ch};
- }
- if ($subscript_correction != 0) {
- printf(",%d,%d", do conv($h), do conv($d));
- printf(",%d,%d,%d", do conv($italic_correction),
- do conv($left_math_fit),
- do conv($subscript_correction));
- }
- elsif ($left_math_fit != 0) {
- printf(",%d,%d", do conv($h), do conv($d));
- printf(",%d,%d", do conv($italic_correction),
- do conv($left_math_fit));
- }
- elsif ($italic_correction != 0) {
- printf(",%d,%d", do conv($h), do conv($d));
- printf(",%d", do conv($italic_correction));
- }
- elsif ($d != 0) {
- printf(",%d,%d", do conv($h), do conv($d));
- }
- else {
- # always put the height in to stop groff guessing
- printf(",%d", do conv($h));
- }
- printf("\t%d", $type);
- printf("\t0%03o\t-- %s\n", $i, $ch);
- for ($j = 1; $j < $nmap{$ch}; $j++) {
- printf("%s\t\"\n", $map{$ch,$j});
- }
- }
- if ($ch eq "space" && defined $width{"space"}) {
- printf("space\t%d\t0\t0%03o\n", do conv($width{"space"}), $i);
- }
-}
-
-sub conv {
- $_[0]*$unitwidth*$resolution/(72*1000*$sizescale) + ($_[0] < 0 ? -.5 : .5);
-}
diff --git a/contrib/groff/src/utils/hpftodit/Makefile.sub b/contrib/groff/src/utils/hpftodit/Makefile.sub
deleted file mode 100644
index f5ff13e48654..000000000000
--- a/contrib/groff/src/utils/hpftodit/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=hpftodit
-MAN1=hpftodit.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=hpftodit.o
-CCSRCS=$(srcdir)/hpftodit.cc
diff --git a/contrib/groff/src/utils/hpftodit/hpftodit.cc b/contrib/groff/src/utils/hpftodit/hpftodit.cc
deleted file mode 100644
index f81f5ad80952..000000000000
--- a/contrib/groff/src/utils/hpftodit/hpftodit.cc
+++ /dev/null
@@ -1,827 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1994, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/*
-TODO
-put human readable font name in device file
-devise new names for useful characters
-use --- for unnamed characters
-option to specify symbol sets to look in
-make it work with TrueType fonts
-put filename in error messages (or fix lib)
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#include <errno.h>
-#include "assert.h"
-#include "lib.h"
-#include "posix.h"
-#include "errarg.h"
-#include "error.h"
-#include "cset.h"
-#include "nonposix.h"
-
-#define SIZEOF(v) (sizeof(v)/sizeof(v[0]))
-
-const int MULTIPLIER = 3;
-
-inline
-int scale(int n)
-{
- return n * MULTIPLIER;
-}
-
-// tags in TFM file
-
-enum tag_type {
- min_tag = 400,
- type_tag = 400,
- symbol_set_tag = 404,
- msl_tag = 403,
- inches_per_point_tag = 406,
- design_units_per_em_tag = 408,
- posture_tag = 409,
- stroke_weight_tag = 411,
- spacing_tag = 412,
- slant_tag = 413,
- appearance_width_tag = 414,
- word_spacing_tag = 421,
- x_height_tag = 424,
- lower_ascent_tag = 427,
- lower_descent_tag = 428,
- width_tag = 433,
- left_extent_tag = 435,
- right_extent_tag = 436,
- ascent_tag = 437,
- descent_tag = 438,
- pair_kern_tag = 439,
- typeface_tag = 442,
- max_tag = 443
- };
-
-// types in TFM file
-
-enum {
- ENUM_TYPE = 1,
- BYTE_TYPE = 2,
- USHORT_TYPE = 3,
- FLOAT_TYPE = 5,
- SIGNED_SHORT_TYPE = 17
- };
-
-
-typedef unsigned char byte;
-typedef unsigned short uint16;
-typedef short int16;
-typedef unsigned int uint32;
-
-class File {
-public:
- File(const char *);
- void skip(int n);
- byte get_byte();
- uint16 get_uint16();
- uint32 get_uint32();
- void seek(uint32 n);
-private:
- unsigned char *buf_;
- const unsigned char *ptr_;
- const unsigned char *end_;
-};
-
-struct entry {
- char present;
- uint16 type;
- uint32 count;
- uint32 value;
- entry() : present(0) { }
-};
-
-struct char_info {
- uint16 msl;
- uint16 width;
- uint16 ascent;
- int16 descent;
- int16 left_extent;
- uint16 right_extent;
- uint16 symbol_set;
- unsigned char code;
-};
-
-const uint16 NO_SYMBOL_SET = 0;
-
-struct name_list {
- char *name;
- name_list *next;
- name_list(const char *s, name_list *p) : name(strsave(s)), next(p) { }
- ~name_list() { a_delete name; }
-};
-
-struct symbol_set {
- uint16 select;
- uint16 index[256];
-};
-
-#define SYMBOL_SET(n, c) ((n) * 32 + ((c) - 64))
-
-uint16 text_symbol_sets[] = {
- SYMBOL_SET(0, 'N'), // Latin 1
- SYMBOL_SET(6, 'J'), // Microsoft Publishing
- SYMBOL_SET(2, 'N'), // Latin 2
- 0
- };
-
-uint16 special_symbol_sets[] = {
- SYMBOL_SET(8, 'M'),
- SYMBOL_SET(5, 'M'),
- SYMBOL_SET(15, 'U'),
- 0
- };
-
-entry tags[max_tag + 1 - min_tag];
-
-char_info *char_table;
-uint32 nchars;
-
-int msl_name_table_size = 0;
-name_list **msl_name_table = 0;
-
-int n_symbol_sets;
-symbol_set *symbol_set_table;
-
-static int special_flag = 0;
-static int italic_flag = 0;
-static int italic_sep;
-
-static void usage(FILE *stream);
-static void usage();
-static const char *xbasename(const char *);
-static void read_tags(File &);
-static void check_type();
-static void check_units(File &);
-static int read_map(const char *);
-static void require_tag(tag_type);
-static void dump_tags(File &f);
-static void output_spacewidth();
-static void output_pclweight();
-static void output_pclproportional();
-static void read_and_output_pcltypeface(File &);
-static void output_pclstyle();
-static void output_slant();
-static void output_ligatures();
-static void read_symbol_sets(File &);
-static void read_and_output_kernpairs(File &);
-static void output_charset();
-static void read_char_table(File &f);
-
-inline
-entry &tag_info(tag_type t)
-{
- return tags[t - min_tag];
-}
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
-
- int opt;
- int debug_flag = 0;
-
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv, "dsvi:", long_options, NULL)) != EOF) {
- switch (opt) {
- case 'd':
- debug_flag = 1;
- break;
- case 's':
- special_flag = 1;
- break;
- case 'i':
- italic_flag = 1;
- italic_sep = atoi(optarg);
- break;
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU hpftodit (groff) version %s\n", Version_string);
- exit(0);
- }
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage();
- break;
- default:
- assert(0);
- }
- }
- if (argc - optind != 3)
- usage();
- File f(argv[optind]);
- if (!read_map(argv[optind + 1]))
- exit(1);
- current_filename = 0;
- current_lineno = -1; // no line numbers
- if (freopen(argv[optind + 2], "w", stdout) == 0)
- fatal("cannot open `%1': %2", argv[optind + 2], strerror(errno));
- current_filename = argv[optind];
- printf("name %s\n", xbasename(argv[optind + 2]));
- if (special_flag)
- printf("special\n");
- read_tags(f);
- check_type();
- check_units(f);
- if (debug_flag)
- dump_tags(f);
- read_char_table(f);
- output_spacewidth();
- output_slant();
- read_and_output_pcltypeface(f);
- output_pclproportional();
- output_pclweight();
- output_pclstyle();
- read_symbol_sets(f);
- output_ligatures();
- read_and_output_kernpairs(f);
- output_charset();
- return 0;
-}
-
-static
-void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [-s] [-i n] tfm_file map_file output_font\n",
- program_name);
-}
-static
-void usage()
-{
- usage(stderr);
- exit(1);
-}
-
-File::File(const char *s)
-{
- // We need to read the file in binary mode because hpftodit relies
- // on byte counts.
- int fd = open(s, O_RDONLY | O_BINARY);
- if (fd < 0)
- fatal("cannot open `%1': %2", s, strerror(errno));
- current_filename = s;
- struct stat sb;
- if (fstat(fd, &sb) < 0)
- fatal("cannot stat: %1", strerror(errno));
- if (!S_ISREG(sb.st_mode))
- fatal("not a regular file");
- buf_ = new unsigned char[sb.st_size];
- long nread = read(fd, buf_, sb.st_size);
- if (nread < 0)
- fatal("read error: %1", strerror(errno));
- if (nread != sb.st_size)
- fatal("read unexpected number of bytes");
- ptr_ = buf_;
- end_ = buf_ + sb.st_size;
- // These are actually text files, so we must get rid of the `\r'
- // characters. This is also enabled for Posix systems, in case the
- // input came from Windows...
- unsigned char *p = buf_, *q = buf_;
- while (q < end_)
- {
- if (*q == '\r')
- {
- if (*++q != '\n')
- *p++ = '\r';
- }
-#if defined(__MSDOS__) || defined(_MSC_VER)
- if (*q == '\032') // ^Z means ``software EOF''
- break;
-#endif
- *p++ = *q++;
- }
- end_ = p;
-}
-
-void File::skip(int n)
-{
- if (end_ - ptr_ < n)
- fatal("unexpected end of file");
- ptr_ += n;
-}
-
-void File::seek(uint32 n)
-{
- if (end_ - buf_ < n)
- fatal("unexpected end of file");
- ptr_ = buf_ + n;
-}
-
-byte File::get_byte()
-{
- if (ptr_ >= end_)
- fatal("unexpected end of file");
- return *ptr_++;
-}
-
-uint16 File::get_uint16()
-{
- if (end_ - ptr_ < 2)
- fatal("unexpected end of file");
- uint16 n = *ptr_++;
- return n + (*ptr_++ << 8);
-}
-
-uint32 File::get_uint32()
-{
- if (end_ - ptr_ < 4)
- fatal("unexpected end of file");
- uint32 n = *ptr_++;
- for (int i = 0; i < 3; i++)
- n += *ptr_++ << (i + 1)*8;
- return n;
-}
-
-static
-void read_tags(File &f)
-{
- if (f.get_byte() != 'I' || f.get_byte() != 'I')
- fatal("not an Intel format TFM file");
- f.skip(6);
- uint16 ntags = f.get_uint16();
- entry dummy;
- for (uint16 i = 0; i < ntags; i++) {
- uint16 tag = f.get_uint16();
- entry *p;
- if (min_tag <= tag && tag <= max_tag)
- p = tags + (tag - min_tag);
- else
- p = &dummy;
- p->present = 1;
- p->type = f.get_uint16();
- p->count = f.get_uint32();
- p->value = f.get_uint32();
- }
-}
-
-static
-void check_type()
-{
- require_tag(type_tag);
- if (tag_info(type_tag).value != 0) {
- if (tag_info(type_tag).value == 2)
- fatal("cannot handle TrueType tfm files");
- fatal("unknown type tag %1", int(tag_info(type_tag).value));
- }
-}
-
-static
-void check_units(File &f)
-{
- require_tag(design_units_per_em_tag);
- f.seek(tag_info(design_units_per_em_tag).value);
- uint32 num = f.get_uint32();
- uint32 den = f.get_uint32();
- if (num != 8782 || den != 1)
- fatal("design units per em != 8782/1");
- require_tag(inches_per_point_tag);
- f.seek(tag_info(inches_per_point_tag).value);
- num = f.get_uint32();
- den = f.get_uint32();
- if (num != 100 || den != 7231)
- fatal("inches per point not 100/7231");
-}
-
-static
-void require_tag(tag_type t)
-{
- if (!tag_info(t).present)
- fatal("tag %1 missing", int(t));
-}
-
-static
-void output_spacewidth()
-{
- require_tag(word_spacing_tag);
- printf("spacewidth %d\n", scale(tag_info(word_spacing_tag).value));
-}
-
-static
-void read_symbol_sets(File &f)
-{
- uint32 symbol_set_dir_length = tag_info(symbol_set_tag).count;
- n_symbol_sets = symbol_set_dir_length/14;
- symbol_set_table = new symbol_set[n_symbol_sets];
- int i;
- for (i = 0; i < n_symbol_sets; i++) {
- f.seek(tag_info(symbol_set_tag).value + i*14);
- (void)f.get_uint32();
- uint32 off1 = f.get_uint32();
- uint32 off2 = f.get_uint32();
- (void)f.get_uint16(); // what's this for?
- f.seek(off1);
- int j;
- uint16 kind = 0;
- for (j = 0; j < off2 - off1; j++) {
- unsigned char c = f.get_byte();
- if ('0' <= c && c <= '9')
- kind = kind*10 + (c - '0');
- else if ('A' <= c && c <= 'Z')
- kind = kind*32 + (c - 64);
- }
- symbol_set_table[i].select = kind;
- for (j = 0; j < 256; j++)
- symbol_set_table[i].index[j] = f.get_uint16();
- }
- for (i = 0; i < nchars; i++)
- char_table[i].symbol_set = NO_SYMBOL_SET;
-
- uint16 *symbol_set_selectors = (special_flag
- ? special_symbol_sets
- : text_symbol_sets);
- for (i = 0; symbol_set_selectors[i] != 0; i++) {
- int j;
- for (j = 0; j < n_symbol_sets; j++)
- if (symbol_set_table[j].select == symbol_set_selectors[i])
- break;
- if (j < n_symbol_sets) {
- for (int k = 0; k < 256; k++) {
- uint16 index = symbol_set_table[j].index[k];
- if (index != 0xffff
- && char_table[index].symbol_set == NO_SYMBOL_SET) {
- char_table[index].symbol_set = symbol_set_table[j].select;
- char_table[index].code = k;
- }
- }
- }
- }
-}
-
-static
-void read_char_table(File &f)
-{
- require_tag(msl_tag);
- nchars = tag_info(msl_tag).count;
- char_table = new char_info[nchars];
-
- f.seek(tag_info(msl_tag).value);
- uint32 i;
- for (i = 0; i < nchars; i++)
- char_table[i].msl = f.get_uint16();
-
- require_tag(width_tag);
- f.seek(tag_info(width_tag).value);
- for (i = 0; i < nchars; i++)
- char_table[i].width = f.get_uint16();
-
- require_tag(ascent_tag);
- f.seek(tag_info(ascent_tag).value);
- for (i = 0; i < nchars; i++) {
- char_table[i].ascent = f.get_uint16();
- }
-
- require_tag(descent_tag);
- f.seek(tag_info(descent_tag).value);
- for (i = 0; i < nchars; i++) {
- char_table[i].descent = f.get_uint16();
- if (char_table[i].descent > 0)
- char_table[i].descent = 0;
- }
-
- require_tag(left_extent_tag);
- f.seek(tag_info(left_extent_tag).value);
- for (i = 0; i < nchars; i++)
- char_table[i].left_extent = int16(f.get_uint16());
-
- require_tag(right_extent_tag);
- f.seek(tag_info(right_extent_tag).value);
- for (i = 0; i < nchars; i++)
- char_table[i].right_extent = f.get_uint16();
-}
-
-static
-void output_pclweight()
-{
- require_tag(stroke_weight_tag);
- int stroke_weight = tag_info(stroke_weight_tag).value;
- int pcl_stroke_weight;
- if (stroke_weight < 128)
- pcl_stroke_weight = -3;
- else if (stroke_weight == 128)
- pcl_stroke_weight = 0;
- else if (stroke_weight <= 145)
- pcl_stroke_weight = 1;
- else if (stroke_weight <= 179)
- pcl_stroke_weight = 3;
- else
- pcl_stroke_weight = 4;
- printf("pclweight %d\n", pcl_stroke_weight);
-}
-
-static
-void output_pclproportional()
-{
- require_tag(spacing_tag);
- printf("pclproportional %d\n", tag_info(spacing_tag).value == 0);
-}
-
-static
-void read_and_output_pcltypeface(File &f)
-{
- printf("pcltypeface ");
- require_tag(typeface_tag);
- f.seek(tag_info(typeface_tag).value);
- for (uint32 i = 0; i < tag_info(typeface_tag).count; i++) {
- unsigned char c = f.get_byte();
- if (c == '\0')
- break;
- putchar(c);
- }
- printf("\n");
-}
-
-static
-void output_pclstyle()
-{
- unsigned pcl_style = 0;
- // older tfms don't have the posture tag
- if (tag_info(posture_tag).present) {
- if (tag_info(posture_tag).value)
- pcl_style |= 1;
- }
- else {
- require_tag(slant_tag);
- if (tag_info(slant_tag).value != 0)
- pcl_style |= 1;
- }
- require_tag(appearance_width_tag);
- if (tag_info(appearance_width_tag).value < 100) // guess
- pcl_style |= 4;
- printf("pclstyle %d\n", pcl_style);
-}
-
-static
-void output_slant()
-{
- require_tag(slant_tag);
- int slant = int16(tag_info(slant_tag).value);
- if (slant != 0)
- printf("slant %f\n", slant/100.0);
-}
-
-static
-void output_ligatures()
-{
- // don't use ligatures for fixed space font
- require_tag(spacing_tag);
- if (tag_info(spacing_tag).value != 0)
- return;
- static const char *ligature_names[] = {
- "fi", "fl", "ff", "ffi", "ffl"
- };
-
- static const char *ligature_chars[] = {
- "fi", "fl", "ff", "Fi", "Fl"
- };
-
- unsigned ligature_mask = 0;
- int i;
- for (i = 0; i < nchars; i++) {
- uint16 msl = char_table[i].msl;
- if (msl < msl_name_table_size
- && char_table[i].symbol_set != NO_SYMBOL_SET) {
- for (name_list *p = msl_name_table[msl]; p; p = p->next)
- for (int j = 0; j < SIZEOF(ligature_chars); j++)
- if (strcmp(p->name, ligature_chars[j]) == 0) {
- ligature_mask |= 1 << j;
- break;
- }
- }
- }
- if (ligature_mask) {
- printf("ligatures");
- for (i = 0; i < SIZEOF(ligature_names); i++)
- if (ligature_mask & (1 << i))
- printf(" %s", ligature_names[i]);
- printf(" 0\n");
- }
-}
-
-static
-void read_and_output_kernpairs(File &f)
-{
- if (tag_info(pair_kern_tag).present) {
- printf("kernpairs\n");
- f.seek(tag_info(pair_kern_tag).value);
- uint16 n_pairs = f.get_uint16();
- for (int i = 0; i < n_pairs; i++) {
- uint16 i1 = f.get_uint16();
- uint16 i2 = f.get_uint16();
- int16 val = int16(f.get_uint16());
- if (char_table[i1].symbol_set != NO_SYMBOL_SET
- && char_table[i2].symbol_set != NO_SYMBOL_SET
- && char_table[i1].msl < msl_name_table_size
- && char_table[i2].msl < msl_name_table_size) {
- for (name_list *p = msl_name_table[char_table[i1].msl];
- p;
- p = p->next)
- for (name_list *q = msl_name_table[char_table[i2].msl];
- q;
- q = q->next)
- printf("%s %s %d\n", p->name, q->name, scale(val));
- }
- }
- }
-}
-
-static
-void output_charset()
-{
- require_tag(slant_tag);
- double slant_angle = int16(tag_info(slant_tag).value)*PI/18000.0;
- double slant = sin(slant_angle)/cos(slant_angle);
-
- require_tag(x_height_tag);
- require_tag(lower_ascent_tag);
- require_tag(lower_descent_tag);
-
- printf("charset\n");
- int i;
- for (i = 0; i < nchars; i++) {
- uint16 msl = char_table[i].msl;
- if (msl < msl_name_table_size
- && msl_name_table[msl]) {
- if (char_table[i].symbol_set != NO_SYMBOL_SET) {
- printf("%s\t%d,%d",
- msl_name_table[msl]->name,
- scale(char_table[i].width),
- scale(char_table[i].ascent));
- int depth = scale(- char_table[i].descent);
- if (depth < 0)
- depth = 0;
- int italic_correction = 0;
- int left_italic_correction = 0;
- int subscript_correction = 0;
- if (italic_flag) {
- italic_correction = scale(char_table[i].right_extent
- - char_table[i].width
- + italic_sep);
- if (italic_correction < 0)
- italic_correction = 0;
- subscript_correction = int((tag_info(x_height_tag).value
- * slant * .8) + .5);
- if (subscript_correction > italic_correction)
- subscript_correction = italic_correction;
- left_italic_correction = scale(italic_sep
- - char_table[i].left_extent);
- }
- if (subscript_correction != 0)
- printf(",%d,%d,%d,%d",
- depth, italic_correction, left_italic_correction,
- subscript_correction);
- else if (left_italic_correction != 0)
- printf(",%d,%d,%d", depth, italic_correction, left_italic_correction);
- else if (italic_correction != 0)
- printf(",%d,%d", depth, italic_correction);
- else if (depth != 0)
- printf(",%d", depth);
- // This is fairly arbitrary. Fortunately it doesn't much matter.
- unsigned type = 0;
- if (char_table[i].ascent > (tag_info(lower_ascent_tag).value*9)/10)
- type |= 2;
- if (char_table[i].descent < (int16(tag_info(lower_descent_tag).value)*9)/10)
- type |= 1;
- printf("\t%d\t%d\n",
- type,
- char_table[i].symbol_set*256 + char_table[i].code);
- for (name_list *p = msl_name_table[msl]->next; p; p = p->next)
- printf("%s\t\"\n", p->name);
- }
- else
- warning("MSL %1 not in any of the searched symbol sets", msl);
- }
- }
-}
-
-static
-void dump_tags(File &f)
-{
- int i;
- for (i = min_tag; i <= max_tag; i++) {
- enum tag_type t = tag_type(i);
- if (tag_info(t).present) {
- fprintf(stderr,
- "%d %d %d %d\n", i, tag_info(t).type, tag_info(t).count,
- tag_info(t).value);
- if (tag_info(t).type == FLOAT_TYPE
- && tag_info(t).count == 1) {
- f.seek(tag_info(t).value);
- uint32 num = f.get_uint32();
- uint32 den = f.get_uint32();
- fprintf(stderr, "(%u/%u = %g)\n", num, den, (double)num/den);
- }
- }
- }
-}
-
-static
-int read_map(const char *file)
-{
- errno = 0;
- FILE *fp = fopen(file, "r");
- if (!fp) {
- error("can't open `%1': %2", file, strerror(errno));
- return 0;
- }
- current_filename = file;
- char buf[512];
- current_lineno = 0;
- while (fgets(buf, int(sizeof(buf)), fp)) {
- current_lineno++;
- char *ptr = buf;
- while (csspace(*ptr))
- ptr++;
- if (*ptr == '\0' || *ptr == '#')
- continue;
- ptr = strtok(ptr, " \n\t");
- if (!ptr)
- continue;
- int n;
- if (sscanf(ptr, "%d", &n) != 1) {
- error("bad map file");
- fclose(fp);
- return 0;
- }
- if (n < 0) {
- error("negative code");
- fclose(fp);
- return 0;
- }
- if (n >= msl_name_table_size) {
- size_t old_size = msl_name_table_size;
- name_list **old_table = msl_name_table;
- msl_name_table_size = n + 256;
- msl_name_table = new name_list *[msl_name_table_size];
- if (old_table) {
- memcpy(msl_name_table, old_table, old_size*sizeof(name_list *));
- a_delete old_table;
- }
- for (size_t i = old_size; i < msl_name_table_size; i++)
- msl_name_table[i] = 0;
- }
- ptr = strtok(0, " \n\t");
- if (!ptr) {
- error("missing names");
- fclose(fp);
- return 0;
- }
- for (; ptr; ptr = strtok(0, " \n\t"))
- msl_name_table[n] = new name_list(ptr, msl_name_table[n]);
- }
- fclose(fp);
- return 1;
-}
-
-static
-const char *xbasename(const char *s)
-{
- // DIR_SEPS[] are possible directory separator characters, see
- // nonposix.h. We want the rightmost separator of all possible
- // ones. Example: d:/foo\\bar.
- const char *b = strrchr(s, DIR_SEPS[0]), *b1;
- const char *sep = &DIR_SEPS[1];
-
- while (*sep)
- {
- b1 = strrchr(s, *sep);
- if (b1 && (!b || b1 > b))
- b = b1;
- sep++;
- }
- return b ? b + 1 : s;
-}
diff --git a/contrib/groff/src/utils/hpftodit/hpftodit.man b/contrib/groff/src/utils/hpftodit/hpftodit.man
deleted file mode 100644
index d107e8c8d549..000000000000
--- a/contrib/groff/src/utils/hpftodit/hpftodit.man
+++ /dev/null
@@ -1,155 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1994-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH HPFTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-hpftodit \- create font description files for use with groff \-Tlj4
-.SH SYNOPSIS
-.B hpftodit
-[
-.B \-sv
-]
-[
-.BI \-i n
-]
-.I tfm_file
-.I map_file
-.I font
-.PP
-It is possible to have whitespace between the
-.B \-i
-command line option and its parameter.
-.SH DESCRIPTION
-.B hpftodit
-creates a font file for use with
-.B
-groff \-Tlj4\fR
-from an HP tagged font metric file.
-.I tfm_file
-is the name of the tagged font metric file for the font.
-.I map_file
-is a file giving the groff names for characters in the font;
-this file should consist of a sequence of lines of the form:
-.IP
-.I
-n c1 c2 \fR.\|.\|.
-.LP
-where
-.I n
-is a decimal integer giving the MSL number of the character,
-and
-.IR c1 ,
-.IR c2 ,.\|.\|.
-are the groff names of the character.
-.I font
-is the name of the groff font file.
-The groff font file is written to
-.IR font .
-.LP
-The
-.B \-s
-option should be given if the font is special
-(a font is
-.I special
-if
-.B troff
-should search it whenever
-a character is not found in the current font.)
-If the font is special,
-it should be listed in the
-.B fonts
-command in the DESC file;
-if it is not special, there is no need to list it, since
-.B troff
-can automatically mount it when it's first used.
-.LP
-If the
-.B \-i
-option is used,
-.B hpftodit
-will automatically generate an italic correction,
-a left italic correction and a subscript correction
-for each character
-(the significance of these parameters is explained in
-.BR groff_font (@MAN5EXT@)).
-.SH OPTIONS
-.TP
-.B \-v
-Print the version number.
-.TP
-.B \-s
-The font is special.
-The effect of this option is to add the
-.B special
-command to the font file.
-.TP
-.BI \-i n
-Generate an italic correction for each character so that
-the character's width plus the character's italic correction
-is equal to
-.I n
-design units
-plus the amount by which the right edge of the character's bounding
-is to the right of the character's origin.
-If this would result in a negative italic correction, use a zero
-italic correction instead.
-There are 8782 design units per em for Intellifont fonts.
-.IP
-Also generate a subscript correction equal to the
-product of the tangent of the slant of the font and
-four fifths of the x-height of the font.
-If this would result in a subscript correction greater than the italic
-correction, use a subscript correction equal to the italic correction
-instead.
-.IP
-Also generate a left italic correction for each character
-equal to
-.I n
-design units
-plus the amount by which the left edge of the character's bounding box
-is to the left of the character's origin.
-The left italic correction may be negative.
-.IP
-This option is normally needed only with italic (or oblique) fonts.
-.SH FILES
-.Tp \w'\fB@FONTDIR@/devlj4/DESC'u+2n
-.B @FONTDIR@/devlj4/DESC
-Device description file.
-.TP
-.BI @FONTDIR@/devlj4/ F
-Font description file for font
-.IR F .
-.SH BUGS
-.LP
-This program was written without the benefit of complete, official
-documentation on the tagged font metric format.
-It is therefore likely that it will fail to work on tfm files that are
-dissimilar to those for the internal fonts on the Laserjet 4,
-with which it was tested:
-.LP
-TrueType tfm files are not supported.
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@),
-.BR grolj4 (@MAN1EXT@),
-.BR groff_font (@MAN5EXT@)
diff --git a/contrib/groff/src/utils/indxbib/Makefile.sub b/contrib/groff/src/utils/indxbib/Makefile.sub
deleted file mode 100644
index add99eba531c..000000000000
--- a/contrib/groff/src/utils/indxbib/Makefile.sub
+++ /dev/null
@@ -1,31 +0,0 @@
-PROG=indxbib
-MAN1=indxbib.n
-XLIBS=$(LIBBIB) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=\
- indxbib.o \
- dirnamemax.o \
- signal.o
-CCSRCS=\
- $(srcdir)/indxbib.cc
-CSRCS=\
- $(srcdir)/dirnamemax.c \
- $(srcdir)/signal.c
-NAMEPREFIX=$(g)
-
-install_data: eign
- -test -d $(datadir) || $(mkinstalldirs) $(datadir)
- -test -d $(dataprogramdir) || $(mkinstalldirs) $(dataprogramdir)
- -test -d $(datasubdir) || $(mkinstalldirs) $(datasubdir)
- if test -f /usr/lib/eign; then \
- rm -f $(common_words_file); \
- ln -s /usr/lib/eign $(common_words_file) 2>/dev/null \
- || ln /usr/lib/eign $(common_words_file) 2>/dev/null \
- || cp /usr/lib/eign $(common_words_file); \
- else \
- rm -f $(common_words_file); \
- $(INSTALL_DATA) $(srcdir)/eign $(common_words_file); \
- fi
-
-uninstall_sub:
- -rm -f $(common_words_file)
diff --git a/contrib/groff/src/utils/indxbib/dirnamemax.c b/contrib/groff/src/utils/indxbib/dirnamemax.c
deleted file mode 100644
index a8cd9923c469..000000000000
--- a/contrib/groff/src/utils/indxbib/dirnamemax.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* dir_name_max(dir) does the same as pathconf(dir, _PC_NAME_MAX) */
-
-#include <sys/types.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#ifdef _POSIX_VERSION
-
-long dir_name_max(dir)
- char *dir;
-{
- return pathconf(dir, _PC_NAME_MAX);
-}
-
-#else /* not _POSIX_VERSION */
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif /* HAVE_LIMITS_H */
-
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#else /* not HAVE_DIRENT_H */
-#ifdef HAVE_SYS_DIR_H
-#include <sys/dir.h>
-#endif /* HAVE_SYS_DIR_H */
-#endif /* not HAVE_DIRENT_H */
-
-#ifndef NAME_MAX
-#ifdef MAXNAMLEN
-#define NAME_MAX MAXNAMLEN
-#else /* !MAXNAMLEN */
-#ifdef MAXNAMELEN
-#define NAME_MAX MAXNAMELEN
-#else /* !MAXNAMELEN */
-#define NAME_MAX 14
-#endif /* !MAXNAMELEN */
-#endif /* !MAXNAMLEN */
-#endif /* !NAME_MAX */
-
-long dir_name_max(dir)
- char *dir;
-{
- return NAME_MAX;
-}
-
-#endif /* not _POSIX_VERSION */
diff --git a/contrib/groff/src/utils/indxbib/eign b/contrib/groff/src/utils/indxbib/eign
deleted file mode 100644
index 7718c8b1124c..000000000000
--- a/contrib/groff/src/utils/indxbib/eign
+++ /dev/null
@@ -1,133 +0,0 @@
-a
-i
-the
-to
-of
-and
-in
-is
-it
-for
-that
-if
-you
-this
-be
-on
-with
-not
-have
-are
-or
-as
-from
-can
-but
-by
-at
-an
-will
-no
-all
-was
-do
-there
-my
-one
-so
-we
-they
-what
-would
-any
-which
-about
-get
-your
-use
-some
-me
-then
-name
-like
-out
-when
-up
-time
-other
-more
-only
-just
-end
-also
-know
-how
-new
-should
-been
-than
-them
-he
-who
-make
-may
-people
-these
-now
-their
-here
-into
-first
-could
-way
-had
-see
-work
-well
-were
-two
-very
-where
-while
-us
-because
-good
-same
-even
-much
-most
-many
-such
-long
-his
-over
-last
-since
-right
-before
-our
-without
-too
-those
-why
-must
-part
-being
-current
-back
-still
-go
-point
-value
-each
-did
-both
-true
-off
-say
-another
-state
-might
-under
-start
-try
diff --git a/contrib/groff/src/utils/indxbib/indxbib.cc b/contrib/groff/src/utils/indxbib/indxbib.cc
deleted file mode 100644
index 99a6baf4233b..000000000000
--- a/contrib/groff/src/utils/indxbib/indxbib.cc
+++ /dev/null
@@ -1,805 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#include "posix.h"
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "stringclass.h"
-#include "cset.h"
-#include "cmap.h"
-
-#include "defs.h"
-#include "index.h"
-
-#include "nonposix.h"
-
-extern "C" {
- // Solaris 2.5.1 has these functions,
- // but its stdlib.h fails to declare them.
- char *mktemp(char *);
- int mkstemp(char *);
-}
-
-#define DEFAULT_HASH_TABLE_SIZE 997
-#define TEMP_INDEX_TEMPLATE "indxbibXXXXXX"
-
-// (2^n - MALLOC_OVERHEAD) should be a good argument for malloc().
-
-#define MALLOC_OVERHEAD 16
-
-#ifdef BLOCK_SIZE
-#undef BLOCK_SIZE
-#endif
-
-const int BLOCK_SIZE = ((1024 - MALLOC_OVERHEAD - sizeof(struct block *)
- - sizeof(int)) / sizeof(int));
-struct block {
- block *next;
- int used;
- int v[BLOCK_SIZE];
-
- block(block *p = 0) : next(p), used(0) { }
-};
-
-struct block;
-
-union table_entry {
- block *ptr;
- int count;
-};
-
-struct word_list {
- word_list *next;
- char *str;
- int len;
- word_list(const char *, int, word_list *);
-};
-
-table_entry *hash_table;
-int hash_table_size = DEFAULT_HASH_TABLE_SIZE;
-// We make this the same size as hash_table so we only have to do one
-// mod per key.
-static word_list **common_words_table = 0;
-char *key_buffer;
-
-FILE *indxfp;
-int ntags = 0;
-string filenames;
-char *temp_index_file = 0;
-
-const char *ignore_fields = "XYZ";
-const char *common_words_file = COMMON_WORDS_FILE;
-int n_ignore_words = 100;
-int truncate_len = 6;
-int shortest_len = 3;
-int max_keys_per_item = 100;
-
-static void usage(FILE *stream);
-static void write_hash_table();
-static void init_hash_table();
-static void read_common_words_file();
-static int store_key(char *s, int len);
-static void possibly_store_key(char *s, int len);
-static int do_whole_file(const char *filename);
-static int do_file(const char *filename);
-static void store_reference(int filename_index, int pos, int len);
-static void check_integer_arg(char opt, const char *arg, int min, int *res);
-static void store_filename(const char *);
-static void fwrite_or_die(const void *ptr, int size, int nitems, FILE *fp);
-static char *get_cwd();
-
-extern "C" {
- void cleanup();
- long dir_name_max(const char *);
- void catch_fatal_signals();
- void ignore_fatal_signals();
-}
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
-
- const char *basename = 0;
- typedef int (*parser_t)(const char *);
- parser_t parser = do_file;
- const char *directory = 0;
- const char *foption = 0;
- int opt;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv, "c:o:h:i:k:l:t:n:c:d:f:vw",
- long_options, NULL))
- != EOF)
- switch (opt) {
- case 'c':
- common_words_file = optarg;
- break;
- case 'd':
- directory = optarg;
- break;
- case 'f':
- foption = optarg;
- break;
- case 'h':
- check_integer_arg('h', optarg, 1, &hash_table_size);
- if (!is_prime(hash_table_size)) {
- while (!is_prime(++hash_table_size))
- ;
- warning("%1 not prime: using %2 instead", optarg, hash_table_size);
- }
- break;
- case 'i':
- ignore_fields = optarg;
- break;
- case 'k':
- check_integer_arg('k', optarg, 1, &max_keys_per_item);
- break;
- case 'l':
- check_integer_arg('l', optarg, 0, &shortest_len);
- break;
- case 'n':
- check_integer_arg('n', optarg, 0, &n_ignore_words);
- break;
- case 'o':
- basename = optarg;
- break;
- case 't':
- check_integer_arg('t', optarg, 1, &truncate_len);
- break;
- case 'w':
- parser = do_whole_file;
- break;
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU indxbib (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- break;
- }
- if (optind >= argc && foption == 0)
- fatal("no files and no -f option");
- if (!directory) {
- char *path = get_cwd();
- store_filename(path);
- a_delete path;
- }
- else
- store_filename(directory);
- init_hash_table();
- store_filename(common_words_file);
- store_filename(ignore_fields);
- key_buffer = new char[truncate_len];
- read_common_words_file();
- if (!basename)
- basename = optind < argc ? argv[optind] : DEFAULT_INDEX_NAME;
- const char *p = strrchr(basename, DIR_SEPS[0]), *p1;
- const char *sep = &DIR_SEPS[1];
- while (*sep)
- {
- p1 = strrchr(basename, *sep);
- if (p1 && (!p || p1 > p))
- p = p1;
- sep++;
- }
- long name_max;
- if (p) {
- char *dir = strsave(basename);
- dir[p - basename] = '\0';
- name_max = dir_name_max(dir);
- a_delete dir;
- }
- else
- name_max = dir_name_max(".");
- const char *filename = p ? p + 1 : basename;
- if (name_max >= 0 && strlen(filename) + sizeof(INDEX_SUFFIX) - 1 > name_max)
- fatal("`%1.%2' is too long for a filename", filename, INDEX_SUFFIX);
- if (p) {
- p++;
- temp_index_file = new char[p - basename + sizeof(TEMP_INDEX_TEMPLATE)];
- memcpy(temp_index_file, basename, p - basename);
- strcpy(temp_index_file + (p - basename), TEMP_INDEX_TEMPLATE);
- }
- else {
- temp_index_file = strsave(TEMP_INDEX_TEMPLATE);
- }
-#ifndef HAVE_MKSTEMP
- if (!mktemp(temp_index_file) || !temp_index_file[0])
- fatal("cannot create file name for temporary file");
-#endif
- catch_fatal_signals();
-#ifdef HAVE_MKSTEMP
- int fd = mkstemp(temp_index_file);
-#else
- int fd = creat(temp_index_file, S_IRUSR|S_IRGRP|S_IROTH);
-#endif
- if (fd < 0)
- fatal("can't create temporary index file: %1", strerror(errno));
- indxfp = fdopen(fd, FOPEN_WB);
- if (indxfp == 0)
- fatal("fdopen failed");
- if (fseek(indxfp, sizeof(index_header), 0) < 0)
- fatal("can't seek past index header: %1", strerror(errno));
- int failed = 0;
- if (foption) {
- FILE *fp = stdin;
- if (strcmp(foption, "-") != 0) {
- errno = 0;
- fp = fopen(foption, "r");
- if (!fp)
- fatal("can't open `%1': %2", foption, strerror(errno));
- }
- string path;
- int lineno = 1;
- for (;;) {
- int c;
- for (c = getc(fp); c != '\n' && c != EOF; c = getc(fp)) {
- if (c == '\0')
- error_with_file_and_line(foption, lineno,
- "nul character in pathname ignored");
- else
- path += c;
- }
- if (path.length() > 0) {
- path += '\0';
- if (!(*parser)(path.contents()))
- failed = 1;
- path.clear();
- }
- if (c == EOF)
- break;
- lineno++;
- }
- if (fp != stdin)
- fclose(fp);
- }
- for (int i = optind; i < argc; i++)
- if (!(*parser)(argv[i]))
- failed = 1;
- write_hash_table();
- if (fclose(indxfp) < 0)
- fatal("error closing temporary index file: %1", strerror(errno));
- char *index_file = new char[strlen(basename) + sizeof(INDEX_SUFFIX)];
- strcpy(index_file, basename);
- strcat(index_file, INDEX_SUFFIX);
-#ifdef HAVE_RENAME
- if (rename(temp_index_file, index_file) < 0)
- {
-#ifdef __MSDOS__
- // RENAME could fail on plain MSDOS filesystems because
- // INDEX_FILE is an invalid filename, e.g. it has multiple dots.
- char *fname = p ? index_file + (p - basename) : 0;
- char *dot = 0;
-
- // Replace the dot with an underscore and try again.
- if (fname
- && (dot = strchr(fname, '.')) != 0
- && strcmp(dot, INDEX_SUFFIX) != 0)
- *dot = '_';
- if (rename(temp_index_file, index_file) < 0)
-#endif
- fatal("can't rename temporary index file: %1", strerror(errno));
- }
-#else /* not HAVE_RENAME */
- ignore_fatal_signals();
- if (unlink(index_file) < 0) {
- if (errno != ENOENT)
- fatal("can't unlink `%1': %2", index_file, strerror(errno));
- }
- if (link(temp_index_file, index_file) < 0)
- fatal("can't link temporary index file: %1", strerror(errno));
- if (unlink(temp_index_file) < 0)
- fatal("can't unlink temporary index file: %1", strerror(errno));
-#endif /* not HAVE_RENAME */
- temp_index_file = 0;
- return failed;
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream,
-"usage: %s [-vw] [-c file] [-d dir] [-f file] [-h n] [-i XYZ] [-k n]\n"
-" [-l n] [-n n] [-o base] [-t n] [files...]\n",
- program_name);
-}
-
-static void check_integer_arg(char opt, const char *arg, int min, int *res)
-{
- char *ptr;
- long n = strtol(arg, &ptr, 10);
- if (n == 0 && ptr == arg)
- error("argument to -%1 not an integer", opt);
- else if (n < min)
- error("argument to -%1 must not be less than %2", opt, min);
- else {
- if (n > INT_MAX)
- error("argument to -%1 greater than maximum integer", opt);
- else if (*ptr != '\0')
- error("junk after integer argument to -%1", opt);
- *res = int(n);
- }
-}
-
-static char *get_cwd()
-{
- char *buf;
- int size = 12;
-
- for (;;) {
- buf = new char[size];
- if (getcwd(buf, size))
- break;
- if (errno != ERANGE)
- fatal("cannot get current working directory: %1", strerror(errno));
- a_delete buf;
- if (size == INT_MAX)
- fatal("current working directory longer than INT_MAX");
- if (size > INT_MAX/2)
- size = INT_MAX;
- else
- size *= 2;
- }
- return buf;
-}
-
-word_list::word_list(const char *s, int n, word_list *p)
-: next(p), len(n)
-{
- str = new char[n];
- memcpy(str, s, n);
-}
-
-static void read_common_words_file()
-{
- if (n_ignore_words <= 0)
- return;
- errno = 0;
- FILE *fp = fopen(common_words_file, "r");
- if (!fp)
- fatal("can't open `%1': %2", common_words_file, strerror(errno));
- common_words_table = new word_list * [hash_table_size];
- for (int i = 0; i < hash_table_size; i++)
- common_words_table[i] = 0;
- int count = 0;
- int key_len = 0;
- for (;;) {
- int c = getc(fp);
- while (c != EOF && !csalnum(c))
- c = getc(fp);
- if (c == EOF)
- break;
- do {
- if (key_len < truncate_len)
- key_buffer[key_len++] = cmlower(c);
- c = getc(fp);
- } while (c != EOF && csalnum(c));
- if (key_len >= shortest_len) {
- int h = hash(key_buffer, key_len) % hash_table_size;
- common_words_table[h] = new word_list(key_buffer, key_len,
- common_words_table[h]);
- }
- if (++count >= n_ignore_words)
- break;
- key_len = 0;
- if (c == EOF)
- break;
- }
- n_ignore_words = count;
- fclose(fp);
-}
-
-static int do_whole_file(const char *filename)
-{
- errno = 0;
- FILE *fp = fopen(filename, "r");
- if (!fp) {
- error("can't open `%1': %2", filename, strerror(errno));
- return 0;
- }
- int count = 0;
- int key_len = 0;
- int c;
- while ((c = getc(fp)) != EOF) {
- if (csalnum(c)) {
- key_len = 1;
- key_buffer[0] = c;
- while ((c = getc(fp)) != EOF) {
- if (!csalnum(c))
- break;
- if (key_len < truncate_len)
- key_buffer[key_len++] = c;
- }
- if (store_key(key_buffer, key_len)) {
- if (++count >= max_keys_per_item)
- break;
- }
- if (c == EOF)
- break;
- }
- }
- store_reference(filenames.length(), 0, 0);
- store_filename(filename);
- fclose(fp);
- return 1;
-}
-
-static int do_file(const char *filename)
-{
- errno = 0;
- // Need binary I/O for MS-DOS/MS-Windows, because indxbib relies on
- // byte counts to be consistent with fseek.
- FILE *fp = fopen(filename, FOPEN_RB);
- if (fp == 0) {
- error("can't open `%1': %2", filename, strerror(errno));
- return 0;
- }
- int filename_index = filenames.length();
- store_filename(filename);
-
- enum {
- START, // at the start of the file; also in between references
- BOL, // in the middle of a reference, at the beginning of the line
- PERCENT, // seen a percent at the beginning of the line
- IGNORE, // ignoring a field
- IGNORE_BOL, // at the beginning of a line ignoring a field
- KEY, // in the middle of a key
- DISCARD, // after truncate_len bytes of a key
- MIDDLE // in between keys
- } state = START;
-
- // In states START, BOL, IGNORE_BOL, space_count how many spaces at
- // the beginning have been seen. In states PERCENT, IGNORE, KEY,
- // MIDDLE space_count must be 0.
- int space_count = 0;
- int byte_count = 0; // bytes read
- int key_len = 0;
- int ref_start = -1; // position of start of current reference
- for (;;) {
- int c = getc(fp);
- if (c == EOF)
- break;
- // We opened the file in binary mode, so we need to skip
- // every CR character before a Newline.
- if (c == '\r') {
- int peek = getc(fp);
- if (peek = '\n') {
- byte_count++;
- c = peek;
- }
- else
- ungetc(peek, fp);
- }
-#if defined(__MSDOS__) || defined(_MSC_VER)
- else if (c == 0x1a) // ^Z means EOF in text files
- break;
-#endif
- byte_count++;
- switch (state) {
- case START:
- if (c == ' ' || c == '\t') {
- space_count++;
- break;
- }
- if (c == '\n') {
- space_count = 0;
- break;
- }
- ref_start = byte_count - space_count - 1;
- space_count = 0;
- if (c == '%')
- state = PERCENT;
- else if (csalnum(c)) {
- state = KEY;
- key_buffer[0] = c;
- key_len = 1;
- }
- else
- state = MIDDLE;
- break;
- case BOL:
- switch (c) {
- case '%':
- if (space_count > 0) {
- space_count = 0;
- state = MIDDLE;
- }
- else
- state = PERCENT;
- break;
- case ' ':
- case '\t':
- space_count++;
- break;
- case '\n':
- store_reference(filename_index, ref_start,
- byte_count - 1 - space_count - ref_start);
- state = START;
- space_count = 0;
- break;
- default:
- space_count = 0;
- if (csalnum(c)) {
- state = KEY;
- key_buffer[0] = c;
- key_len = 1;
- }
- else
- state = MIDDLE;
- }
- break;
- case PERCENT:
- if (strchr(ignore_fields, c) != 0)
- state = IGNORE;
- else if (c == '\n')
- state = BOL;
- else
- state = MIDDLE;
- break;
- case IGNORE:
- if (c == '\n')
- state = IGNORE_BOL;
- break;
- case IGNORE_BOL:
- switch (c) {
- case '%':
- if (space_count > 0) {
- state = IGNORE;
- space_count = 0;
- }
- else
- state = PERCENT;
- break;
- case ' ':
- case '\t':
- space_count++;
- break;
- case '\n':
- store_reference(filename_index, ref_start,
- byte_count - 1 - space_count - ref_start);
- state = START;
- space_count = 0;
- break;
- default:
- space_count = 0;
- state = IGNORE;
- }
- break;
- case KEY:
- if (csalnum(c)) {
- if (key_len < truncate_len)
- key_buffer[key_len++] = c;
- else
- state = DISCARD;
- }
- else {
- possibly_store_key(key_buffer, key_len);
- key_len = 0;
- if (c == '\n')
- state = BOL;
- else
- state = MIDDLE;
- }
- break;
- case DISCARD:
- if (!csalnum(c)) {
- possibly_store_key(key_buffer, key_len);
- key_len = 0;
- if (c == '\n')
- state = BOL;
- else
- state = MIDDLE;
- }
- break;
- case MIDDLE:
- if (csalnum(c)) {
- state = KEY;
- key_buffer[0] = c;
- key_len = 1;
- }
- else if (c == '\n')
- state = BOL;
- break;
- default:
- assert(0);
- }
- }
- switch (state) {
- case START:
- break;
- case DISCARD:
- case KEY:
- possibly_store_key(key_buffer, key_len);
- // fall through
- case BOL:
- case PERCENT:
- case IGNORE_BOL:
- case IGNORE:
- case MIDDLE:
- store_reference(filename_index, ref_start,
- byte_count - ref_start - space_count);
- break;
- default:
- assert(0);
- }
- fclose(fp);
- return 1;
-}
-
-static void store_reference(int filename_index, int pos, int len)
-{
- tag t;
- t.filename_index = filename_index;
- t.start = pos;
- t.length = len;
- fwrite_or_die(&t, sizeof(t), 1, indxfp);
- ntags++;
-}
-
-static void store_filename(const char *fn)
-{
- filenames += fn;
- filenames += '\0';
-}
-
-static void init_hash_table()
-{
- hash_table = new table_entry[hash_table_size];
- for (int i = 0; i < hash_table_size; i++)
- hash_table[i].ptr = 0;
-}
-
-static void possibly_store_key(char *s, int len)
-{
- static int last_tagno = -1;
- static int key_count;
- if (last_tagno != ntags) {
- last_tagno = ntags;
- key_count = 0;
- }
- if (key_count < max_keys_per_item) {
- if (store_key(s, len))
- key_count++;
- }
-}
-
-static int store_key(char *s, int len)
-{
- if (len < shortest_len)
- return 0;
- int is_number = 1;
- for (int i = 0; i < len; i++)
- if (!csdigit(s[i])) {
- is_number = 0;
- s[i] = cmlower(s[i]);
- }
- if (is_number && !(len == 4 && s[0] == '1' && s[1] == '9'))
- return 0;
- int h = hash(s, len) % hash_table_size;
- if (common_words_table) {
- for (word_list *ptr = common_words_table[h]; ptr; ptr = ptr->next)
- if (len == ptr->len && memcmp(s, ptr->str, len) == 0)
- return 0;
- }
- table_entry *pp = hash_table + h;
- if (!pp->ptr)
- pp->ptr = new block;
- else if (pp->ptr->v[pp->ptr->used - 1] == ntags)
- return 1;
- else if (pp->ptr->used >= BLOCK_SIZE)
- pp->ptr = new block(pp->ptr);
- pp->ptr->v[(pp->ptr->used)++] = ntags;
- return 1;
-}
-
-static void write_hash_table()
-{
- const int minus_one = -1;
- int li = 0;
- for (int i = 0; i < hash_table_size; i++) {
- block *ptr = hash_table[i].ptr;
- if (!ptr)
- hash_table[i].count = -1;
- else {
- hash_table[i].count = li;
- block *rev = 0;
- while (ptr) {
- block *tem = ptr;
- ptr = ptr->next;
- tem->next = rev;
- rev = tem;
- }
- while (rev) {
- fwrite_or_die(rev->v, sizeof(int), rev->used, indxfp);
- li += rev->used;
- block *tem = rev;
- rev = rev->next;
- delete tem;
- }
- fwrite_or_die(&minus_one, sizeof(int), 1, indxfp);
- li += 1;
- }
- }
- if (sizeof(table_entry) == sizeof(int))
- fwrite_or_die(hash_table, sizeof(int), hash_table_size, indxfp);
- else {
- // write it out word by word
- for (int i = 0; i < hash_table_size; i++)
- fwrite_or_die(&hash_table[i].count, sizeof(int), 1, indxfp);
- }
- fwrite_or_die(filenames.contents(), 1, filenames.length(), indxfp);
- if (fseek(indxfp, 0, 0) < 0)
- fatal("error seeking on index file: %1", strerror(errno));
- index_header h;
- h.magic = INDEX_MAGIC;
- h.version = INDEX_VERSION;
- h.tags_size = ntags;
- h.lists_size = li;
- h.table_size = hash_table_size;
- h.strings_size = filenames.length();
- h.truncate = truncate_len;
- h.shortest = shortest_len;
- h.common = n_ignore_words;
- fwrite_or_die(&h, sizeof(h), 1, indxfp);
-}
-
-static void fwrite_or_die(const void *ptr, int size, int nitems, FILE *fp)
-{
- if (fwrite(ptr, size, nitems, fp) != nitems)
- fatal("fwrite failed: %1", strerror(errno));
-}
-
-void fatal_error_exit()
-{
- cleanup();
- exit(3);
-}
-
-extern "C" {
-
-void cleanup()
-{
- if (temp_index_file)
- unlink(temp_index_file);
-}
-
-}
diff --git a/contrib/groff/src/utils/indxbib/indxbib.man b/contrib/groff/src/utils/indxbib/indxbib.man
deleted file mode 100644
index ed84ccaec2c8..000000000000
--- a/contrib/groff/src/utils/indxbib/indxbib.man
+++ /dev/null
@@ -1,207 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.TH @G@INDXBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-@g@indxbib \- make inverted index for bibliographic databases
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fB@g@indxbib 'u
-.ti \niu
-.B @g@indxbib
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-vw
-.OP \-c file
-.OP \-d dir
-.OP \-f file
-.OP \-h n
-.OP \-i string
-.OP \-k n
-.OP \-l n
-.OP \-n n
-.OP \-o file
-.OP \-t n
-.RI [\ filename \|.\|.\|.\ ]
-.ad \na
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-.B @g@indxbib
-makes an inverted index for the bibliographic databases in
-.IR filename \|.\|.\|.
-for use with
-.BR @g@refer (@MAN1EXT@),
-.BR @g@lookbib (@MAN1EXT@),
-and
-.BR lkbib (@MAN1EXT@).
-The index will be named
-.IB filename @INDEX_SUFFIX@\fR;
-the index is written to a temporary file which is then renamed to this.
-If no filenames are given on the command line because the
-.B \-f
-option has been used, and no
-.B \-o
-option is given, the index will be named
-.BR @DEFAULT_INDEX_NAME@@INDEX_SUFFIX@ .
-.LP
-Bibliographic databases are divided into records by blank lines.
-Within a record, each fields starts with a
-.B %
-character at the beginning of a line.
-Fields have a one letter name which follows the
-.B %
-character.
-.LP
-The values set by the
-.BR \-c ,
-.BR \-n ,
-.BR \-l
-and
-.B \-t
-options are stored in the index;
-when the index is searched, keys will be discarded and truncated in a
-manner appropriate to these options;
-the original keys will be used for verifying that any record
-found using the index actually contains the keys.
-This means that a user of an index need not know whether these
-options were used in the creation of the index,
-provided that not all the keys to be searched for
-would have been discarded during indexing
-and that the user supplies at least the part of each key
-that would have remained after being truncated during indexing.
-The value set by the
-.B \-i
-option is also stored in the index
-and will be used in verifying records found using the index.
-.SH OPTIONS
-.TP
-.B \-v
-Print the version number.
-.TP
-.B \-w
-Index whole files.
-Each file is a separate record.
-.TP
-.BI \-c file
-Read the list of common words from
-.I file
-instead of
-.BR @COMMON_WORDS_FILE@ .
-.TP
-.BI \-d dir
-Use
-.I dir
-as the pathname of the current working directory to store in the index,
-instead of the path printed by
-.BR pwd (1).
-Usually
-.I dir
-will be a symbolic link that points to the directory printed by
-.BR pwd (1).
-.TP
-.BI \-f file
-Read the files to be indexed from
-.IR file .
-If
-.I file
-is
-.BR \- ,
-files will be read from the standard input.
-The
-.B \-f
-option can be given at most once.
-.TP
-.BI \-i string
-Don't index the contents of fields whose names are in
-.IR string .
-Initially
-.I string
-is
-.BR XYZ .
-.TP
-.BI \-h n
-Use the first prime greater than or equal to
-.I n
-for the size of the hash table.
-Larger values of
-.I n
-will usually make searching faster,
-but will make the index larger
-and
-.B @g@indxbib
-use more memory.
-Initially
-.I n
-is 997.
-.TP
-.BI \-k n
-Use at most
-.I n
-keys per input record.
-Initially
-.I n
-is 100.
-.TP
-.BI \-l n
-Discard keys that are shorter than
-.IR n .
-Initially
-.I n
-is 3.
-.TP
-.BI \-n n
-Discard the
-.I n
-most common words.
-Initially
-.I n
-is 100.
-.TP
-.BI \-o basename
-The index should be named
-.IB basename @INDEX_SUFFIX@\fR.
-.TP
-.BI \-t n
-Truncate keys to
-.IR n .
-Initially
-.I n
-is 6.
-.SH FILES
-.TP \w'\fBindxbib\fIXXXXXX'u+2n
-.IB filename @INDEX_SUFFIX@
-Index.
-.TP
-.B @DEFAULT_INDEX_NAME@@INDEX_SUFFIX@
-Default index name.
-.TP
-.B @COMMON_WORDS_FILE@
-List of common words.
-.TP
-.BI indxbib XXXXXX
-Temporary file.
-.SH "SEE ALSO"
-.BR @g@refer (@MAN1EXT@),
-.BR lkbib (@MAN1EXT@),
-.BR @g@lookbib (@MAN1EXT@)
diff --git a/contrib/groff/src/utils/indxbib/signal.c b/contrib/groff/src/utils/indxbib/signal.c
deleted file mode 100644
index 8078472f95db..000000000000
--- a/contrib/groff/src/utils/indxbib/signal.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Unfortunately vendors seem to have problems writing a <signal.h>
-that is correct for C++, so we implement all signal handling in C. */
-
-#include <sys/types.h>
-#include <signal.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifndef RETSIGTYPE
-#define RETSIGTYPE void
-#endif
-
-extern void cleanup();
-
-static RETSIGTYPE handle_fatal_signal(signum)
- int signum;
-{
- signal(signum, SIG_DFL);
- cleanup();
- kill(getpid(), signum);
-}
-
-void catch_fatal_signals()
-{
-#ifdef SIGHUP
- signal(SIGHUP, handle_fatal_signal);
-#endif
- signal(SIGINT, handle_fatal_signal);
- signal(SIGTERM, handle_fatal_signal);
-}
-
-#ifndef HAVE_RENAME
-
-void ignore_fatal_signals()
-{
-#ifdef SIGHUP
- signal(SIGHUP, SIG_IGN);
-#endif
- signal(SIGINT, SIG_IGN);
- signal(SIGTERM, SIG_IGN);
-}
-
-#endif /* not HAVE_RENAME */
diff --git a/contrib/groff/src/utils/lkbib/Makefile.sub b/contrib/groff/src/utils/lkbib/Makefile.sub
deleted file mode 100644
index 8f31e10f5fad..000000000000
--- a/contrib/groff/src/utils/lkbib/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=lkbib
-MAN1=lkbib.n
-XLIBS=$(LIBBIB) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=lkbib.o
-CCSRCS=$(srcdir)/lkbib.cc
diff --git a/contrib/groff/src/utils/lkbib/lkbib.cc b/contrib/groff/src/utils/lkbib/lkbib.cc
deleted file mode 100644
index 4d3cadcb0166..000000000000
--- a/contrib/groff/src/utils/lkbib/lkbib.cc
+++ /dev/null
@@ -1,137 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <assert.h>
-
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-
-#include "defs.h"
-#include "refid.h"
-#include "search.h"
-
-static void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [-nv] [-p database] [-i XYZ] [-t N] keys ...\n",
- program_name);
-}
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int search_default = 1;
- search_list list;
- int opt;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv, "nvVi:t:p:", long_options, NULL))
- != EOF)
- switch (opt) {
- case 'V':
- verify_flag = 1;
- break;
- case 'n':
- search_default = 0;
- break;
- case 'i':
- linear_ignore_fields = optarg;
- break;
- case 't':
- {
- char *ptr;
- long n = strtol(optarg, &ptr, 10);
- if (n == 0 && ptr == optarg) {
- error("bad integer `%1' in `t' option", optarg);
- break;
- }
- if (n < 1)
- n = 1;
- linear_truncate_len = int(n);
- break;
- }
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU lkbib (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case 'p':
- list.add_file(optarg);
- break;
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
- if (optind >= argc) {
- usage(stderr);
- exit(1);
- }
- char *filename = getenv("REFER");
- if (filename)
- list.add_file(filename);
- else if (search_default)
- list.add_file(DEFAULT_INDEX, 1);
- if (list.nfiles() == 0)
- fatal("no databases");
- int total_len = 0;
- int i;
- for (i = optind; i < argc; i++)
- total_len += strlen(argv[i]);
- total_len += argc - optind - 1 + 1; // for spaces and '\0'
- char *buffer = new char[total_len];
- char *ptr = buffer;
- for (i = optind; i < argc; i++) {
- if (i > optind)
- *ptr++ = ' ';
- strcpy(ptr, argv[i]);
- ptr = strchr(ptr, '\0');
- }
- search_list_iterator iter(&list, buffer);
- const char *start;
- int len;
- int count;
- for (count = 0; iter.next(&start, &len); count++) {
- if (fwrite(start, 1, len, stdout) != len)
- fatal("write error on stdout: %1", strerror(errno));
- // Can happen for last reference in file.
- if (start[len - 1] != '\n')
- putchar('\n');
- putchar('\n');
- }
- return !count;
-}
diff --git a/contrib/groff/src/utils/lkbib/lkbib.man b/contrib/groff/src/utils/lkbib/lkbib.man
deleted file mode 100644
index 872313de0155..000000000000
--- a/contrib/groff/src/utils/lkbib/lkbib.man
+++ /dev/null
@@ -1,110 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.ds g \" empty
-.ds G \" empty
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH LKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-lkbib \- search bibliographic databases
-.SH SYNOPSIS
-.B lkbib
-[
-.B \-v
-]
-[
-.BI \-i fields
-]
-[
-.BI \-p filename
-]
-[
-.BI \-t n
-]
-.IR key \|.\|.\|.
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-.B lkbib
-searches bibliographic databases for references that contain the keys
-.IR key \|.\|.\|.
-and prints any references found on the standard output.
-.B lkbib
-will search any databases given by
-.B \-p
-options, and then a default database.
-The default database is taken from the
-.SB REFER
-environment variable if it is set,
-otherwise it is
-.BR @DEFAULT_INDEX@ .
-For each database
-.I filename
-to be searched,
-if an index
-.IB filename @INDEX_SUFFIX@
-created by
-.BR @g@indxbib (@MAN1EXT@)
-exists, then it will be searched instead;
-each index can cover multiple databases.
-.SH OPTIONS
-.TP
-.B \-v
-Print the version number.
-.TP
-.BI \-p filename
-Search
-.IR filename .
-Multiple
-.B \-p
-options can be used.
-.TP
-.BI \-i string
-When searching files for which no index exists,
-ignore the contents of fields whose names are in
-.IR string .
-.TP
-.BI \-t n
-Only require the first
-.I n
-characters of keys to be given.
-Initially
-.I n
-is 6.
-.SH ENVIRONMENT
-.TP \w'\fBREFER'u+2n
-.SB REFER
-Default database.
-.SH FILES
-.Tp \w'\fB@DEFAULT_INDEX@'u+2n
-.B @DEFAULT_INDEX@
-Default database to be used if the
-.SB REFER
-environment variable is not set.
-.IB filename @INDEX_SUFFIX@
-Index files.
-.SH "SEE ALSO"
-.BR @g@refer (@MAN1EXT@),
-.BR @g@lookbib (@MAN1EXT@),
-.BR @g@indxbib (@MAN1EXT@)
diff --git a/contrib/groff/src/utils/lookbib/Makefile.sub b/contrib/groff/src/utils/lookbib/Makefile.sub
deleted file mode 100644
index 91b140453153..000000000000
--- a/contrib/groff/src/utils/lookbib/Makefile.sub
+++ /dev/null
@@ -1,7 +0,0 @@
-PROG=lookbib
-MAN1=lookbib.n
-XLIBS=$(LIBBIB) $(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=lookbib.o
-CCSRCS=$(srcdir)/lookbib.cc
-NAMEPREFIX=$(g)
diff --git a/contrib/groff/src/utils/lookbib/lookbib.cc b/contrib/groff/src/utils/lookbib/lookbib.cc
deleted file mode 100644
index dc55ed93bc95..000000000000
--- a/contrib/groff/src/utils/lookbib/lookbib.cc
+++ /dev/null
@@ -1,140 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <errno.h>
-
-#include "errarg.h"
-#include "error.h"
-#include "lib.h"
-#include "cset.h"
-
-#include "refid.h"
-#include "search.h"
-
-extern "C" {
- int isatty(int);
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [-v] [-i XYZ] [-t N] database ...\n",
- program_name);
-}
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- static char stderr_buf[BUFSIZ];
- setbuf(stderr, stderr_buf);
- int opt;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv, "vVi:t:", long_options, NULL)) != EOF)
- switch (opt) {
- case 'V':
- verify_flag = 1;
- break;
- case 'i':
- linear_ignore_fields = optarg;
- break;
- case 't':
- {
- char *ptr;
- long n = strtol(optarg, &ptr, 10);
- if (n == 0 && ptr == optarg) {
- error("bad integer `%1' in `t' option", optarg);
- break;
- }
- if (n < 1)
- n = 1;
- linear_truncate_len = int(n);
- break;
- }
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU lookbib (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- default:
- assert(0);
- }
- if (optind >= argc) {
- usage(stderr);
- exit(1);
- }
- search_list list;
- for (int i = optind; i < argc; i++)
- list.add_file(argv[i]);
- if (list.nfiles() == 0)
- fatal("no databases");
- char line[1024];
- int interactive = isatty(fileno(stdin));
- for (;;) {
- if (interactive) {
- fputs("> ", stderr);
- fflush(stderr);
- }
- if (!fgets(line, sizeof(line), stdin))
- break;
- char *ptr = line;
- while (csspace(*ptr))
- ptr++;
- if (*ptr == '\0')
- continue;
- search_list_iterator iter(&list, line);
- const char *start;
- int len;
- int count;
- for (count = 0; iter.next(&start, &len); count++) {
- if (fwrite(start, 1, len, stdout) != len)
- fatal("write error on stdout: %1", strerror(errno));
- // Can happen for last reference in file.
- if (start[len - 1] != '\n')
- putchar('\n');
- putchar('\n');
- }
- fflush(stdout);
- if (interactive) {
- fprintf(stderr, "%d found\n", count);
- fflush(stderr);
- }
- }
- if (interactive)
- putc('\n', stderr);
- return 0;
-}
-
diff --git a/contrib/groff/src/utils/lookbib/lookbib.man b/contrib/groff/src/utils/lookbib/lookbib.man
deleted file mode 100644
index 846798dce02d..000000000000
--- a/contrib/groff/src/utils/lookbib/lookbib.man
+++ /dev/null
@@ -1,78 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.TH @G@LOOKBIB @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-@g@lookbib \- search bibliographic databases
-.SH SYNOPSIS
-.B @g@lookbib
-[
-.B \-v
-]
-[
-.BI \-i string
-]
-[
-.BI \-t n
-]
-.IR filename \|.\|.\|.
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-@g@lookbib prints a prompt on the standard error (unless the standard input is not a terminal),
-reads from the standard input a line containing a set of keywords,
-searches the bibliographic databases
-.IR filename \|.\|.\|.
-for references containing those keywords,
-prints any references found on the standard output,
-and repeats this process until the end of input.
-For each database
-.I filename
-to be searched,
-if an index
-.IB filename @INDEX_SUFFIX@
-created by
-.BR @g@indxbib (@MAN1EXT@)
-exists, then it will be searched instead;
-each index can cover multiple databases.
-.SH OPTIONS
-.TP
-.B \-v
-Print the version number.
-.TP
-.BI \-i string
-When searching files for which no index exists,
-ignore the contents of fields whose names are in
-.IR string .
-.TP
-.BI \-t n
-Only require the first
-.I n
-characters of keys to be given.
-Initially
-.I n
-is 6.
-.SH FILES
-.TP \w'\fIfilename\fB@INDEX_SUFFIX@'u+2n
-.IB filename @INDEX_SUFFIX@
-Index files.
-.SH "SEE ALSO"
-.BR @g@refer (@MAN1EXT@),
-.BR lkbib (@MAN1EXT@),
-.BR @g@indxbib (@MAN1EXT@)
diff --git a/contrib/groff/src/utils/pfbtops/Makefile.sub b/contrib/groff/src/utils/pfbtops/Makefile.sub
deleted file mode 100644
index f731ff578ba2..000000000000
--- a/contrib/groff/src/utils/pfbtops/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=pfbtops
-MAN1=pfbtops.n
-OBJS=pfbtops.o
-CSRCS=$(srcdir)/pfbtops.c
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
diff --git a/contrib/groff/src/utils/pfbtops/pfbtops.c b/contrib/groff/src/utils/pfbtops/pfbtops.c
deleted file mode 100644
index 2159dbd8bf78..000000000000
--- a/contrib/groff/src/utils/pfbtops/pfbtops.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* This translates ps fonts in .pfb format to ASCII ps files. */
-
-#include <stdio.h>
-#include <getopt.h>
-#include <limits.h>
-
-#include "nonposix.h"
-
-/* Binary bytes per output line. */
-#define BYTES_PER_LINE (64/2)
-#define HEX_DIGITS "0123456789abcdef"
-
-static char *program_name;
-
-static void error(s)
- char *s;
-{
- fprintf(stderr, "%s: %s\n", program_name, s);
- exit(2);
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [-v] [pfb_file]\n", program_name);
-}
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
- int opt;
- extern int optind;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
-
- program_name = argv[0];
-
- while ((opt = getopt_long(argc, argv, "v", long_options, NULL)) != EOF) {
- switch (opt) {
- case 'v':
- {
- extern char *Version_string;
- printf("GNU pfbtops (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- }
- }
-
- if (argc - optind > 1) {
- usage(stderr);
- exit(1);
- }
- if (argc > optind && !freopen(argv[optind], "r", stdin))
- {
- perror(argv[optind]);
- exit(1);
- }
-#ifdef SET_BINARY
- SET_BINARY(fileno(stdin));
-#endif
- for (;;)
- {
- int type, c, i;
- long n;
-
- c = getchar();
- if (c != 0x80)
- error("first byte of packet not 0x80");
- type = getchar();
- if (type == 3)
- break;
- if (type != 1 && type != 2)
- error("bad packet type");
- n = 0;
- for (i = 0; i < 4; i++)
- {
- c = getchar();
- if (c == EOF)
- error("end of file in packet header");
- n |= (long)c << (i << 3);
- }
- if (n < 0)
- error("negative packet length");
- if (type == 1)
- {
- while (--n >= 0)
- {
- c = getchar();
- if (c == EOF)
- error("end of file in text packet");
- if (c == '\r')
- c = '\n';
- putchar(c);
- }
- if (c != '\n')
- putchar('\n');
- }
- else
- {
- int count = 0;
- while (--n >= 0)
- {
- c = getchar();
- if (c == EOF)
- error("end of file in binary packet");
- if (count >= BYTES_PER_LINE)
- {
- putchar('\n');
- count = 0;
- }
- count++;
- putchar(HEX_DIGITS[(c >> 4) & 0xf]);
- putchar(HEX_DIGITS[c & 0xf]);
- }
- putchar('\n');
- }
- }
- exit(0);
-}
diff --git a/contrib/groff/src/utils/pfbtops/pfbtops.man b/contrib/groff/src/utils/pfbtops/pfbtops.man
deleted file mode 100644
index cfef3e0a1033..000000000000
--- a/contrib/groff/src/utils/pfbtops/pfbtops.man
+++ /dev/null
@@ -1,44 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-1995 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.TH PFBTOPS @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-pfbtops \- translate a PostScript font in .pfb format to ASCII
-.SH SYNOPSIS
-.B pfbtops
-[
-.I pfb_file
-]
-.SH DESCRIPTION
-.B pfbtops
-translates a PostScript font in
-.B .pfb
-format to ASCII.
-If
-.I pfb_file
-is omitted the pfb file will be read from the standard input.
-The ASCII format PostScript font will be written on the standard output.
-PostScript fonts for MS-DOS are normally supplied in
-.B .pfb
-format.
-.LP
-The resulting ASCII format PostScript font can be used with groff.
-It must first be listed in
-.BR @FONTDIR@/devps/download .
-.SH "SEE ALSO"
-.BR grops (@MAN1EXT@)
diff --git a/contrib/groff/src/utils/tfmtodit/Makefile.sub b/contrib/groff/src/utils/tfmtodit/Makefile.sub
deleted file mode 100644
index 057bb3e66131..000000000000
--- a/contrib/groff/src/utils/tfmtodit/Makefile.sub
+++ /dev/null
@@ -1,6 +0,0 @@
-PROG=tfmtodit
-MAN1=tfmtodit.n
-XLIBS=$(LIBGROFF)
-MLIB=$(LIBM)
-OBJS=tfmtodit.o
-CCSRCS=$(srcdir)/tfmtodit.cc
diff --git a/contrib/groff/src/utils/tfmtodit/tfmtodit.cc b/contrib/groff/src/utils/tfmtodit/tfmtodit.cc
deleted file mode 100644
index 96768d2beba7..000000000000
--- a/contrib/groff/src/utils/tfmtodit/tfmtodit.cc
+++ /dev/null
@@ -1,874 +0,0 @@
-// -*- C++ -*-
-/* Copyright (C) 1989-1992, 2000, 2001 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* I have tried to incorporate the changes needed for TeX 3.0 tfm files,
-but I haven't tested them. */
-
-/* Groff requires more font metric information than TeX. The reason
-for this is that TeX has separate Math Italic fonts, whereas groff
-uses normal italic fonts for math. The two additional pieces of
-information required by groff correspond to the two arguments to the
-math_fit() macro in the Metafont programs for the CM fonts. In the
-case of a font for which math_fitting is false, these two arguments
-are normally ignored by Metafont. We need to get hold of these two
-parameters and put them in the groff font file.
-
-We do this by loading this definition after cmbase when creating cm.base.
-
-def ignore_math_fit(expr left_adjustment,right_adjustment) =
- special "adjustment";
- numspecial left_adjustment*16/designsize;
- numspecial right_adjustment*16/designsize;
- enddef;
-
-This puts the two arguments to the math_fit macro into the gf file.
-(They will appear in the gf file immediately before the character to
-which they apply.) We then create a gf file using this cm.base. Then
-we run tfmtodit and specify this gf file with the -g option.
-
-This need only be done for a font for which math_fitting is false;
-When it's true, the left_correction and subscript_correction should
-both be zero. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#include <errno.h>
-#include "lib.h"
-#include "errarg.h"
-#include "error.h"
-#include "assert.h"
-#include "cset.h"
-#include "nonposix.h"
-
-/* Values in the tfm file should be multiplied by this. */
-
-#define MULTIPLIER 1
-
-struct char_info_word {
- unsigned char width_index;
- char height_index;
- char depth_index;
- char italic_index;
- char tag;
- unsigned char remainder;
-};
-
-struct lig_kern_command {
- unsigned char skip_byte;
- unsigned char next_char;
- unsigned char op_byte;
- unsigned char remainder;
-};
-
-class tfm {
- int bc;
- int ec;
- int nw;
- int nh;
- int nd;
- int ni;
- int nl;
- int nk;
- int np;
- int cs;
- int ds;
- char_info_word *char_info;
- int *width;
- int *height;
- int *depth;
- int *italic;
- lig_kern_command *lig_kern;
- int *kern;
- int *param;
-public:
- tfm();
- ~tfm();
- int load(const char *);
- int contains(int);
- int get_width(int);
- int get_height(int);
- int get_depth(int);
- int get_italic(int);
- int get_param(int, int *);
- int get_checksum();
- int get_design_size();
- int get_lig(unsigned char, unsigned char, unsigned char *);
- friend class kern_iterator;
-};
-
-class kern_iterator {
- tfm *t;
- int c;
- int i;
-public:
- kern_iterator(tfm *);
- int next(unsigned char *c1, unsigned char *c2, int *k);
-};
-
-
-kern_iterator::kern_iterator(tfm *p)
-: t(p), c(t->bc), i(-1)
-{
-}
-
-int kern_iterator::next(unsigned char *c1, unsigned char *c2, int *k)
-{
- for (; c <= t->ec; c++)
- if (t->char_info[c - t->bc].tag == 1) {
- if (i < 0) {
- i = t->char_info[c - t->bc].remainder;
- if (t->lig_kern[i].skip_byte > 128)
- i = (256*t->lig_kern[i].op_byte
- + t->lig_kern[i].remainder);
- }
- for (;;) {
- int skip = t->lig_kern[i].skip_byte;
- if (skip <= 128 && t->lig_kern[i].op_byte >= 128) {
- *c1 = c;
- *c2 = t->lig_kern[i].next_char;
- *k = t->kern[256*(t->lig_kern[i].op_byte - 128)
- + t->lig_kern[i].remainder];
- if (skip == 128) {
- c++;
- i = -1;
- }
- else
- i += skip + 1;
- return 1;
- }
- if (skip >= 128)
- break;
- i += skip + 1;
- }
- i = -1;
- }
- return 0;
-}
-
-tfm::tfm()
-: char_info(0), width(0), height(0), depth(0), italic(0), lig_kern(0),
- kern(0), param(0)
-{
-}
-
-int tfm::get_lig(unsigned char c1, unsigned char c2, unsigned char *cp)
-{
- if (contains(c1) && char_info[c1 - bc].tag == 1) {
- int i = char_info[c1 - bc].remainder;
- if (lig_kern[i].skip_byte > 128)
- i = 256*lig_kern[i].op_byte + lig_kern[i].remainder;
- for (;;) {
- int skip = lig_kern[i].skip_byte;
- if (skip > 128)
- break;
- // We are only interested in normal ligatures, for which
- // op_byte == 0.
- if (lig_kern[i].op_byte == 0
- && lig_kern[i].next_char == c2) {
- *cp = lig_kern[i].remainder;
- return 1;
- }
- if (skip == 128)
- break;
- i += skip + 1;
- }
- }
- return 0;
-}
-
-int tfm::contains(int i)
-{
- return i >= bc && i <= ec && char_info[i - bc].width_index != 0;
-}
-
-int tfm::get_width(int i)
-{
- return width[char_info[i - bc].width_index];
-}
-
-int tfm::get_height(int i)
-{
- return height[char_info[i - bc].height_index];
-}
-
-int tfm::get_depth(int i)
-{
- return depth[char_info[i - bc].depth_index];
-}
-
-int tfm::get_italic(int i)
-{
- return italic[char_info[i - bc].italic_index];
-}
-
-int tfm::get_param(int i, int *p)
-{
- if (i <= 0 || i > np)
- return 0;
- else {
- *p = param[i - 1];
- return 1;
- }
-}
-
-int tfm::get_checksum()
-{
- return cs;
-}
-
-int tfm::get_design_size()
-{
- return ds;
-}
-
-tfm::~tfm()
-{
- a_delete char_info;
- a_delete width;
- a_delete height;
- a_delete depth;
- a_delete italic;
- a_delete lig_kern;
- a_delete kern;
- a_delete param;
-}
-
-int read2(unsigned char *&s)
-{
- int n;
- n = *s++ << 8;
- n |= *s++;
- return n;
-}
-
-int read4(unsigned char *&s)
-{
- int n;
- n = *s++ << 24;
- n |= *s++ << 16;
- n |= *s++ << 8;
- n |= *s++;
- return n;
-}
-
-
-int tfm::load(const char *file)
-{
- errno = 0;
- FILE *fp = fopen(file, FOPEN_RB);
- if (!fp) {
- error("can't open `%1': %2", file, strerror(errno));
- return 0;
- }
- int c1 = getc(fp);
- int c2 = getc(fp);
- if (c1 == EOF || c2 == EOF) {
- fclose(fp);
- error("unexpected end of file on `%1'", file);
- return 0;
- }
- int lf = (c1 << 8) + c2;
- int toread = lf*4 - 2;
- unsigned char *buf = new unsigned char[toread];
- if (fread(buf, 1, toread, fp) != toread) {
- if (feof(fp))
- error("unexpected end of file on `%1'", file);
- else
- error("error on file `%1'", file);
- a_delete buf;
- fclose(fp);
- return 0;
- }
- fclose(fp);
- if (lf < 6) {
- error("bad tfm file `%1': impossibly short", file);
- a_delete buf;
- return 0;
- }
- unsigned char *ptr = buf;
- int lh = read2(ptr);
- bc = read2(ptr);
- ec = read2(ptr);
- nw = read2(ptr);
- nh = read2(ptr);
- nd = read2(ptr);
- ni = read2(ptr);
- nl = read2(ptr);
- nk = read2(ptr);
- int ne = read2(ptr);
- np = read2(ptr);
- if (6 + lh + (ec - bc + 1) + nw + nh + nd + ni + nl + nk + ne + np != lf) {
- error("bad tfm file `%1': lengths do not sum", file);
- a_delete buf;
- return 0;
- }
- if (lh < 2) {
- error("bad tfm file `%1': header too short", file);
- a_delete buf;
- return 0;
- }
- char_info = new char_info_word[ec - bc + 1];
- width = new int[nw];
- height = new int[nh];
- depth = new int[nd];
- italic = new int[ni];
- lig_kern = new lig_kern_command[nl];
- kern = new int[nk];
- param = new int[np];
- int i;
- cs = read4(ptr);
- ds = read4(ptr);
- ptr += (lh-2)*4;
- for (i = 0; i < ec - bc + 1; i++) {
- char_info[i].width_index = *ptr++;
- unsigned char tem = *ptr++;
- char_info[i].depth_index = tem & 0xf;
- char_info[i].height_index = tem >> 4;
- tem = *ptr++;
- char_info[i].italic_index = tem >> 2;
- char_info[i].tag = tem & 3;
- char_info[i].remainder = *ptr++;
- }
- for (i = 0; i < nw; i++)
- width[i] = read4(ptr);
- for (i = 0; i < nh; i++)
- height[i] = read4(ptr);
- for (i = 0; i < nd; i++)
- depth[i] = read4(ptr);
- for (i = 0; i < ni; i++)
- italic[i] = read4(ptr);
- for (i = 0; i < nl; i++) {
- lig_kern[i].skip_byte = *ptr++;
- lig_kern[i].next_char = *ptr++;
- lig_kern[i].op_byte = *ptr++;
- lig_kern[i].remainder = *ptr++;
- }
- for (i = 0; i < nk; i++)
- kern[i] = read4(ptr);
- ptr += ne*4;
- for (i = 0; i < np; i++)
- param[i] = read4(ptr);
- assert(ptr == buf + lf*4 - 2);
- a_delete buf;
- return 1;
-}
-
-class gf {
- int left[256];
- int right[256];
- static int sread4(int *p, FILE *fp);
- static int uread3(int *p, FILE *fp);
- static int uread2(int *p, FILE *fp);
- static int skip(int n, FILE *fp);
-public:
- gf();
- int load(const char *file);
- int get_left_adjustment(int i) { return left[i]; }
- int get_right_adjustment(int i) { return right[i]; }
-};
-
-gf::gf()
-{
- for (int i = 0; i < 256; i++)
- left[i] = right[i] = 0;
-}
-
-int gf::load(const char *file)
-{
- enum {
- paint_0 = 0,
- paint1 = 64,
- boc = 67,
- boc1 = 68,
- eoc = 69,
- skip0 = 70,
- skip1 = 71,
- new_row_0 = 74,
- xxx1 = 239,
- yyy = 243,
- no_op = 244,
- pre = 247,
- post = 248
- };
- int got_an_adjustment = 0;
- int pending_adjustment = 0;
- int left_adj, right_adj;
- const int gf_id_byte = 131;
- errno = 0;
- FILE *fp = fopen(file, FOPEN_RB);
- if (!fp) {
- error("can't open `%1': %2", file, strerror(errno));
- return 0;
- }
- if (getc(fp) != pre || getc(fp) != gf_id_byte) {
- error("bad gf file");
- return 0;
- }
- int n = getc(fp);
- if (n == EOF)
- goto eof;
- if (!skip(n, fp))
- goto eof;
- for (;;) {
- int op = getc(fp);
- if (op == EOF)
- goto eof;
- if (op == post)
- break;
- if ((op >= paint_0 && op <= paint_0 + 63)
- || (op >= new_row_0 && op <= new_row_0 + 164))
- continue;
- switch (op) {
- case no_op:
- case eoc:
- case skip0:
- break;
- case paint1:
- case skip1:
- if (!skip(1, fp))
- goto eof;
- break;
- case paint1 + 1:
- case skip1 + 1:
- if (!skip(2, fp))
- goto eof;
- break;
- case paint1 + 2:
- case skip1 + 2:
- if (!skip(3, fp))
- goto eof;
- break;
- case boc:
- {
- int code;
- if (!sread4(&code, fp))
- goto eof;
- if (pending_adjustment) {
- pending_adjustment = 0;
- left[code & 0377] = left_adj;
- right[code & 0377] = right_adj;
- }
- if (!skip(20, fp))
- goto eof;
- break;
- }
- case boc1:
- {
- int code = getc(fp);
- if (code == EOF)
- goto eof;
- if (pending_adjustment) {
- pending_adjustment = 0;
- left[code] = left_adj;
- right[code] = right_adj;
- }
- if (!skip(4, fp))
- goto eof;
- break;
- }
- case xxx1:
- {
- int len = getc(fp);
- if (len == EOF)
- goto eof;
- char buf[256];
- if (fread(buf, 1, len, fp) != len)
- goto eof;
- if (len == 10 /* strlen("adjustment") */
- && memcmp(buf, "adjustment", len) == 0) {
- int c = getc(fp);
- if (c != yyy) {
- if (c != EOF)
- ungetc(c, fp);
- break;
- }
- if (!sread4(&left_adj, fp))
- goto eof;
- c = getc(fp);
- if (c != yyy) {
- if (c != EOF)
- ungetc(c, fp);
- break;
- }
- if (!sread4(&right_adj, fp))
- goto eof;
- got_an_adjustment = 1;
- pending_adjustment = 1;
- }
- break;
- }
- case xxx1 + 1:
- if (!uread2(&n, fp) || !skip(n, fp))
- goto eof;
- break;
- case xxx1 + 2:
- if (!uread3(&n, fp) || !skip(n, fp))
- goto eof;
- break;
- case xxx1 + 3:
- if (!sread4(&n, fp) || !skip(n, fp))
- goto eof;
- break;
- case yyy:
- if (!skip(4, fp))
- goto eof;
- break;
- default:
- fatal("unrecognized opcode `%1'", op);
- break;
- }
- }
- if (!got_an_adjustment)
- warning("no adjustment specials found in gf file");
- return 1;
- eof:
- error("unexpected end of file");
- return 0;
-}
-
-int gf::sread4(int *p, FILE *fp)
-{
- *p = getc(fp);
- if (*p >= 128)
- *p -= 256;
- *p <<= 8;
- *p |= getc(fp);
- *p <<= 8;
- *p |= getc(fp);
- *p <<= 8;
- *p |= getc(fp);
- return !ferror(fp) && !feof(fp);
-}
-
-int gf::uread3(int *p, FILE *fp)
-{
- *p = getc(fp);
- *p <<= 8;
- *p |= getc(fp);
- *p <<= 8;
- *p |= getc(fp);
- return !ferror(fp) && !feof(fp);
-}
-
-int gf::uread2(int *p, FILE *fp)
-{
- *p = getc(fp);
- *p <<= 8;
- *p |= getc(fp);
- return !ferror(fp) && !feof(fp);
-}
-
-int gf::skip(int n, FILE *fp)
-{
- while (--n >= 0)
- if (getc(fp) == EOF)
- return 0;
- return 1;
-}
-
-
-struct char_list {
- char *ch;
- char_list *next;
- char_list(const char *, char_list * = 0);
-};
-
-char_list::char_list(const char *s, char_list *p) : ch(strsave(s)), next(p)
-{
-}
-
-
-int read_map(const char *file, char_list **table)
-{
- errno = 0;
- FILE *fp = fopen(file, "r");
- if (!fp) {
- error("can't open `%1': %2", file, strerror(errno));
- return 0;
- }
- for (int i = 0; i < 256; i++)
- table[i] = 0;
- char buf[512];
- int lineno = 0;
- while (fgets(buf, int(sizeof(buf)), fp)) {
- lineno++;
- char *ptr = buf;
- while (csspace(*ptr))
- ptr++;
- if (*ptr == '\0' || *ptr == '#')
- continue;
- ptr = strtok(ptr, " \n\t");
- if (!ptr)
- continue;
- int n;
- if (sscanf(ptr, "%d", &n) != 1) {
- error("%1:%2: bad map file", file, lineno);
- fclose(fp);
- return 0;
- }
- if (n < 0 || n > 255) {
- error("%1:%2: code out of range", file, lineno);
- fclose(fp);
- return 0;
- }
- ptr = strtok(0, " \n\t");
- if (!ptr) {
- error("%1:%2: missing names", file, lineno);
- fclose(fp);
- return 0;
- }
- for (; ptr; ptr = strtok(0, " \n\t"))
- table[n] = new char_list(ptr, table[n]);
- }
- fclose(fp);
- return 1;
-}
-
-
-/* Every character that can participate in a ligature appears in the
-lig_chars table. `ch' gives the full-name of the character, `name'
-gives the groff name of the character, `i' gives its index in
-the encoding, which is filled in later (-1 if it does not appear). */
-
-struct {
- const char *ch;
- int i;
-} lig_chars[] = {
- { "f", -1 },
- { "i", -1 },
- { "l", -1 },
- { "ff", -1 },
- { "fi", -1 },
- { "fl", -1 },
- { "Fi", -1 },
- { "Fl", -1 },
-};
-
-// Indices into lig_chars[].
-
-enum { CH_f, CH_i, CH_l, CH_ff, CH_fi, CH_fl, CH_ffi, CH_ffl };
-
-// Each possible ligature appears in this table.
-
-struct {
- unsigned char c1, c2, res;
- const char *ch;
-} lig_table[] = {
- { CH_f, CH_f, CH_ff, "ff" },
- { CH_f, CH_i, CH_fi, "fi" },
- { CH_f, CH_l, CH_fl, "fl" },
- { CH_ff, CH_i, CH_ffi, "ffi" },
- { CH_ff, CH_l, CH_ffl, "ffl" },
- };
-
-static void usage(FILE *stream);
-
-int main(int argc, char **argv)
-{
- program_name = argv[0];
- int special_flag = 0;
- int skewchar = -1;
- int opt;
- const char *gf_file = 0;
- static const struct option long_options[] = {
- { "help", no_argument, 0, CHAR_MAX + 1 },
- { "version", no_argument, 0, 'v' },
- { NULL, 0, 0, 0 }
- };
- while ((opt = getopt_long(argc, argv, "svg:k:", long_options, NULL)) != EOF)
- switch (opt) {
- case 'g':
- gf_file = optarg;
- break;
- case 's':
- special_flag = 1;
- break;
- case 'k':
- {
- char *ptr;
- long n = strtol(optarg, &ptr, 0);
- if ((n == 0 && ptr == optarg)
- || *ptr != '\0'
- || n < 0
- || n > UCHAR_MAX)
- error("invalid skewchar");
- else
- skewchar = (int)n;
- break;
- }
- case 'v':
- {
- extern const char *Version_string;
- printf("GNU tfmtodit (groff) version %s\n", Version_string);
- exit(0);
- break;
- }
- case CHAR_MAX + 1: // --help
- usage(stdout);
- exit(0);
- break;
- case '?':
- usage(stderr);
- exit(1);
- break;
- case EOF:
- assert(0);
- }
- if (argc - optind != 3) {
- usage(stderr);
- exit(1);
- }
- gf g;
- if (gf_file) {
- if (!g.load(gf_file))
- return 1;
- }
- const char *tfm_file = argv[optind];
- const char *map_file = argv[optind + 1];
- const char *font_file = argv[optind + 2];
- tfm t;
- if (!t.load(tfm_file))
- return 1;
- char_list *table[256];
- if (!read_map(map_file, table))
- return 1;
- errno = 0;
- if (!freopen(font_file, "w", stdout)) {
- error("can't open `%1' for writing: %2", font_file, strerror(errno));
- return 1;
- }
- printf("name %s\n", font_file);
- if (special_flag)
- fputs("special\n", stdout);
- char *internal_name = strsave(argv[optind]);
- int len = strlen(internal_name);
- if (len > 4 && strcmp(internal_name + len - 4, ".tfm") == 0)
- internal_name[len - 4] = '\0';
- // DIR_SEPS[] are possible directory separator characters, see nonposix.h.
- // We want the rightmost separator of all possible ones.
- // Example: d:/foo\\bar.
- const char *s = strrchr(internal_name, DIR_SEPS[0]), *s1;
- const char *sep = &DIR_SEPS[1];
- while (*sep)
- {
- s1 = strrchr(internal_name, *sep);
- if (s1 && (!s || s1 > s))
- s = s1;
- sep++;
- }
- printf("internalname %s\n", s ? s + 1 : internal_name);
- int n;
- if (t.get_param(2, &n)) {
- if (n > 0)
- printf("spacewidth %d\n", n*MULTIPLIER);
- }
- if (t.get_param(1, &n) && n != 0)
- printf("slant %f\n", atan2(n/double(1<<20), 1.0)*180.0/PI);
- int xheight;
- if (!t.get_param(5, &xheight))
- xheight = 0;
- int i;
- // Print the list of ligatures.
- // First find the indices of each character that can participate in
- // a ligature.
- for (i = 0; i < 256; i++)
- for (int j = 0; j < sizeof(lig_chars)/sizeof(lig_chars[0]); j++)
- for (char_list *p = table[i]; p; p = p->next)
- if (strcmp(lig_chars[j].ch, p->ch) == 0)
- lig_chars[j].i = i;
- // For each possible ligature, if its participants all exist,
- // and it appears as a ligature in the tfm file, include in
- // the list of ligatures.
- int started = 0;
- for (i = 0; i < sizeof(lig_table)/sizeof(lig_table[0]); i++) {
- int i1 = lig_chars[lig_table[i].c1].i;
- int i2 = lig_chars[lig_table[i].c2].i;
- int r = lig_chars[lig_table[i].res].i;
- if (i1 >= 0 && i2 >= 0 && r >= 0) {
- unsigned char c;
- if (t.get_lig(i1, i2, &c) && c == r) {
- if (!started) {
- started = 1;
- fputs("ligatures", stdout);
- }
- printf(" %s", lig_table[i].ch);
- }
- }
- }
- if (started)
- fputs(" 0\n", stdout);
- printf("checksum %d\n", t.get_checksum());
- printf("designsize %d\n", t.get_design_size());
- // Now print out the kerning information.
- int had_kern = 0;
- kern_iterator iter(&t);
- unsigned char c1, c2;
- int k;
- while (iter.next(&c1, &c2, &k))
- if (c2 != skewchar) {
- k *= MULTIPLIER;
- char_list *q = table[c2];
- for (char_list *p1 = table[c1]; p1; p1 = p1->next)
- for (char_list *p2 = q; p2; p2 = p2->next) {
- if (!had_kern) {
- printf("kernpairs\n");
- had_kern = 1;
- }
- printf("%s %s %d\n", p1->ch, p2->ch, k);
- }
- }
- printf("charset\n");
- char_list unnamed("---");
- for (i = 0; i < 256; i++)
- if (t.contains(i)) {
- char_list *p = table[i] ? table[i] : &unnamed;
- int m[6];
- m[0] = t.get_width(i);
- m[1] = t.get_height(i);
- m[2] = t.get_depth(i);
- m[3] = t.get_italic(i);
- m[4] = g.get_left_adjustment(i);
- m[5] = g.get_right_adjustment(i);
- printf("%s\t%d", p->ch, m[0]*MULTIPLIER);
- int j;
- for (j = int(sizeof(m)/sizeof(m[0])) - 1; j > 0; j--)
- if (m[j] != 0)
- break;
- for (k = 1; k <= j; k++)
- printf(",%d", m[k]*MULTIPLIER);
- int type = 0;
- if (m[2] > 0)
- type = 1;
- if (m[1] > xheight)
- type += 2;
- printf("\t%d\t%04o\n", type, i);
- for (p = p->next; p; p = p->next)
- printf("%s\t\"\n", p->ch);
- }
- return 0;
-}
-
-static void usage(FILE *stream)
-{
- fprintf(stream, "usage: %s [-sv] [-g gf_file] [-k skewchar] tfm_file map_file font\n",
- program_name);
-}
diff --git a/contrib/groff/src/utils/tfmtodit/tfmtodit.man b/contrib/groff/src/utils/tfmtodit/tfmtodit.man
deleted file mode 100644
index 6e50aa28d6c9..000000000000
--- a/contrib/groff/src/utils/tfmtodit/tfmtodit.man
+++ /dev/null
@@ -1,175 +0,0 @@
-.ig \"-*- nroff -*-
-Copyright (C) 1989-2000 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the
-entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
-Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be included in
-translations approved by the Free Software Foundation instead of in
-the original English.
-..
-.ie t .ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X
-.el .ds tx TeX
-.\" Like TP, but if specified indent is more than half
-.\" the current line-length - indent, use the default indent.
-.de Tp
-.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
-.el .TP "\\$1"
-..
-.TH TFMTODIT @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-tfmtodit \- create font files for use with groff \-Tdvi
-.SH SYNOPSIS
-.nr a \n(.j
-.ad l
-.nr i \n(.i
-.in +\w'\fBtfmtodit 'u
-.ti \niu
-.B tfmtodit
-.de OP
-.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
-.el .RB "[\ " "\\$1" "\ ]"
-..
-.OP \-sv
-.OP \-g gf_file
-.OP \-k skewchar
-.I tfm_file
-.I map_file
-.I font
-.br
-.ad \na
-.PP
-It is possible to have whitespace between a command line option and its
-parameter.
-.SH DESCRIPTION
-.B tfmtodit
-creates a font file for use with
-.B
-groff \-Tdvi\fR.
-.I tfm_file
-is the name of the \*(tx font metric file for the font.
-.I map_file
-is a file giving the groff names for characters in the font;
-this file should consist of a sequence of lines of the form:
-.IP
-.I
-n c1 c2 \fR.\|.\|.
-.LP
-where
-.I n
-is a decimal integer giving the position of the character in the font,
-and
-.IR c1 ,
-.IR c2 ,.\|.\|.
-are the groff names of the character.
-If a character has no groff names but exists in the tfm file,
-then it will be put in the groff font file as an unnamed character.
-.I font
-is the name of the groff font file.
-The groff font file is written to
-.IR font .
-.LP
-The
-.B \-s
-option should be given if the font is special
-(a font is
-.I special
-if
-.B troff
-should search it whenever
-a character is not found in the current font.)
-If the font is special,
-it should be listed in the
-.B fonts
-command in the DESC file;
-if it is not special, there is no need to list it, since
-.B troff
-can automatically mount it when it's first used.
-.LP
-To do a good job of math typesetting, groff requires
-font metric information not present in the tfm file.
-The reason for this is that \*(tx has separate math italic fonts
-whereas groff uses normal italic fonts for math.
-The additional information required by groff is given by the
-two arguments to the
-.B math_fit
-macro in the Metafont programs for the Computer Modern fonts.
-In a text font (a font for which
-.B math_fitting
-is false), Metafont normally ignores these two arguments.
-Metafont can be made to put this information in the gf file
-by loading the following definition after
-.B cmbase
-when creating
-.BR cm.base :
-.IP
-.nf
-.ft B
-def ignore_math_fit(expr left_adjustment,right_adjustment) =
- special "adjustment";
- numspecial left_adjustment*16/designsize;
- numspecial right_adjustment*16/designsize;
- enddef;
-.fi
-.ft R
-.LP
-The gf file created using this modified
-.B cm.base
-should be specified with the
-.B \-g
-option.
-The
-.B \-g
-option should not be given for a font for which
-.B math_fitting
-is true.
-.SH OPTIONS
-.TP
-.B \-v
-Print the version number.
-.TP
-.B \-s
-The font is special.
-The effect of this option is to add the
-.B special
-command to the font file.
-.TP
-.BI \-k n
-The skewchar of this font is at position
-.IR n .
-.I n
-should be an integer;
-it may be given in decimal,
-or with a leading
-.B 0
-in octal,
-or with a leading
-.B 0x
-in hexadecimal.
-The effect of this option is to ignore any kerns whose second component
-is the specified character.
-.TP
-.BI \-g gf_file
-.I gf_file
-is a gf file produced by Metafont containing special and numspecial
-commands giving additional font metric information.
-.SH FILES
-.Tp \w'\fB@FONTDIR@/devdvi/DESC'u+2n
-.B @FONTDIR@/devdvi/DESC
-Device description file.
-.TP
-.BI @FONTDIR@/devdvi/ F
-Font description file for font
-.IR F .
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@),
-.BR grodvi (@MAN1EXT@),
-.BR groff_font (@MAN5EXT@)
diff --git a/contrib/groff/src/xditview/ChangeLog b/contrib/groff/src/xditview/ChangeLog
deleted file mode 100644
index ef0a856eba22..000000000000
--- a/contrib/groff/src/xditview/ChangeLog
+++ /dev/null
@@ -1,413 +0,0 @@
-2001-01-04 Rob Daasch <daasch@ece.pdx.edu>
-
- * parse.c (ParseInput): Added 'F' to command switch to swallow
- filename strings as ignored comments.
-
-2000-12-02 Werner LEMBERG <wl@gnu.org>
-
- * device.c (find_file): Remove home directory in search path.
-
-2000-11-14 Werner LEMBERG <wl@gnu.org>
-
- * device.c (open_device_file): Remove `path' parameter.
- (find_file): Construct font path similar to groff: First the contents
- of GROFF_FONT_PATH, then the home directory, and finally the default
- font path.
- * Imakefile.in: Fix GROFF_DATAPROGRAMDIR and GROFF_FONTPATH.
-
-2000-10-23 Werner LEMBERG <wl@gnu.org>
-
- Change installation structure for data files from .../groff/... to
- .../groff/<version><revision>/... to be conform with other GNU
- programs.
-
- * Imakefile.in: Implement it.
-
-Version 1.16.1 released
-=======================
-
-Version 1.16 released
-=====================
-
-2000-05-18 Werner LEMBERG <wl@gnu.org>
-
- * DviChar.c: Adding `cq' as an alias for "'" in latin-1 map.
-
-2000-05-03 Werner LEMBERG <wl@gnu.org>
-
- * DviChar.c: Adding `dq' as an alias for `"' in latin-1 map.
-
-2000-04-28 Werner LEMBERG <wl@gnu.org>
-
- * DviChar.c: Replacing `md' glyph name with `pc' in latin-1 map to
- make it distinct from the `md' glyph in the symbol font.
-
-2000-03-03 Werner LEMBERG <wl@gnu.org>
-
- * Imakefile replaced with Imakefile.in which will be configured by
- the main configure script of groff. This will set the correct font
- path, and it will make it possible to build xditview in a directory
- different from $srcdir.
-
-2000-03-01 Colin Phipps <crp22@cam.ac.uk>
-
- * Dvi.c (OpenFile): Use tmpdir() for security reasons.
- * xtotroff.c (MapFont): Avoid race while opening file.
-
-2000-02-06 Werner LEMBERG <wl@gnu.org>
-
- * Imakefile: Adapted to new directory structure.
-
- * README: Updated.
-
-Version 1.15 released
-=====================
-
-1999-12-21 Werner LEMBERG <wl@gnu.org>
-
- * README: Fixed ftp GNU address.
-
-1999-12-13 Werner LEMBERG <wl@gnu.org>
-
- * device.c: Use extern declarations of strtok(), strchr(), and
- getenv() only if not defined as macros.
-
-1999-11-18 Larry Jones <larry.jones@sdrc.com>
-
- * xditview.c: Add fallback_resources to allow running without
- access to the app-defaults file.
-
- * Imakefile: Added rule to create app-defaults to a C header file.
-
- * GXditview-ad.h: New file containing fallback default resources.
-
- * ad2c: New file to do the app-defaults -> C header file
- conversion.
-
-1999-10-27 Larry Jones <larry.jones@sdrc.com>
-
- * font.c (DisposeFontSizes): If there's a problem loading a font,
- xditview will fall-back and use the default font, but it hasn't
- checked before unloading fonts which could result in unloading the
- default font (possibly multiple times) and then X errors.
-
-1999-09-13 Werner LEMBERG <wl@gnu.org>
-
- * Imakefile (extraclean): Added Makefile.
-
- * xditview.c (main, MakePrompt): Fixing compilation warnings.
-
- * TODO: Imakefile should be replaced with a configure script.
-
-1999-09-13 Werner LEMBERG <wl@gnu.org>
-
- * Makefile: Removed.
-
-1999-09-12 Werner LEMBERG <wl@gnu.org>
-
- * Imakefile (GROFF_FONTPATH): Another addition.
-
- * device.c (FONTPATH): Update to match current groff version.
-
-1999-09-11 Larry Jones <larry.jones@sdrc.com>
-
- * Imakefile (GROFF_LIBDIR, GROFF_FONTPATH): Update to match
- current groff version.
-
- * Dvi.c (Realize, Destroy), DviP.h, draw.c (setFillGC), gray*.bm:
- Allow 8 levels of gray rather than just 1.
-
- * draw.c (DrawFilledCircle, DrawFilledEllipse, DrawFilledPolygon):
- Draw outlines to prevent gaps between abutting figures.
-
-1999-05-27 Werner LEMBERG <wl@gnu.org>
-
- * xtotroff.c (usage): Fixed typo.
-
-Mon Sep 11 10:40:33 1995 James Clark <jjc@jclark.com>
-
- * device.c (INT_MIN, INT_MAX): Don't define if already defined.
-
-Mon Aug 8 11:14:11 1994 James Clark (jjc@jclark.com)
-
- * DviChar.c (Adobe_Symbol_map): Use \(nb for notsubset.
-
-Tue Apr 19 04:41:16 1994 James Clark (jjc@jclark.com)
-
- * Dvi.c (resources): Change default for background and foreground
- to "XtDefaultBackground" and "XtDefaultForeground".
-
-Sat Feb 12 10:38:47 1994 James Clark (jjc@jclark.com)
-
- * DviChar.c (Adobe_Symbol_map): Rename radicalex to rn.
-
-Thu May 27 20:30:12 1993 James Clark (jjc@jclark.com)
-
- * device.c (isascii): Define if necessary.
- (canonicalize_name): Cast argument to isdigit() to unsigned char.
-
-Thu Apr 29 18:36:57 1993 James Clark (jjc at jclark.com)
-
- * xditview.c: Include <X11/Xos.h>.
- (NewFile): Don't declare rindex(). Use strrchr() rather than
- rindex().
-
-Tue Mar 30 15:12:09 1993 James Clark (jjc at jclark)
-
- * draw.c (charExists): Check that fi->per_char is not NULL.
-
-Sat Dec 12 17:42:40 1992 James Clark (jjc at jclark)
-
- * Dvi.c (SetGeometry): Cast XtMakeGeometryRequest arguments.
-
- * draw.c (DrawPolygon, DrawFilledPolygon): Cast Xtfree argument.
-
- * font.c (DisposeFontSizes): Add declaration.
-
- * draw.c (FakeCharacter): Add declaration.
-
-Wed Oct 28 13:24:00 1992 James Clark (jjc at jclark)
-
- * Imakefile (install.dev): Deleted.
- (fonts): New target.
-
-Mon Oct 12 10:50:44 1992 James Clark (jjc at jclark)
-
- * Imakefile (install.dev): Say when we're installing devX*-12.
-
- * Imakefile (install.dev): Depends on DESC and FontMap.
-
-Thu Oct 1 20:03:45 1992 James Clark (jjc at jclark)
-
- * xditview.c (Syntax): Mention -filename option.
-
-Sat Aug 15 12:56:39 1992 James Clark (jjc at jclark)
-
- * GXditview.ad: Bind space and return to NextPage. Bind backspace
- and delete to previous page.
-
- * DviChar.c (Adobe_Symbol_map): Add `an'.
-
- * DviChar.c (Adobe_Symbol_map): Add arrowvertex, arrowverttp, and
- arrowvertbt.
-
-Mon Aug 10 11:54:27 1992 James Clark (jjc at jclark)
-
- * FontMap: Add m/p fields to the fonts names.
-
-Sat Aug 8 12:00:28 1992 James Clark (jjc at jclark)
-
- * DESC: Leave font positions 5-9 blank.
-
-Tue Jul 28 11:37:05 1992 James Clark (jjc at jclark)
-
- * Imakefile: Don't use gendef. Pass definition of FONTPATH using
- DEFINES.
- (path.h): Deleted.
- (device.c): Don't include path.h. Provide default definition of
- FONTPATH.
-
-Mon Jul 6 14:06:53 1992 James Clark (jjc at jclark)
-
- * Imakefile: Don't install tmac.X and tmac.Xps.
- * tmac.X, tmac.Xps: Moved to ../macros.
-
- * Imakefile: Don't install eqnchar.
- * eqnchar: Deleted.
-
-Sun Jun 14 12:55:02 1992 James Clark (jjc@jclark)
-
- * tmac.Xps: Handle OE, oe, lq, rq.
- * draw.c (FakeCharacter): Don't handle these.
-
- * draw.c (FakeCharacter): Don't handle f/.
-
-Mon Jun 8 11:46:37 1992 James Clark (jjc@jclark)
-
- * tmac.X: Translate char160 to space.
-
-Sun Jun 7 14:39:53 1992 James Clark (jjc@jclark)
-
- * tmac.X: Do `mso tmac.psic' before restoring compatibility mode.
-
- * tmac.X: Add \(OE, \(oe, \(ah, \(ao, \(ho.
-
- * tmac.Xps: Make it work in compatibility mode.
- Redo existing character definitions with .Xps-char.
- Add more character definitions.
- (Xps-char): New macro.
-
-Sat Jun 6 21:46:03 1992 James Clark (jjc@jclark)
-
- * DviChar.c (Adobe_Symbol_map): Add +h, +f, +p, Fn, lz.
- * tmac.X: Add \(bq, \(Bq, \(aq.
- * tmac.Xps: Handle \(aq, \(bq, \(Bq, \(Fn.
-
-Wed Jun 3 11:11:15 1992 James Clark (jjc@jclark)
-
- * DviChar.c (Adobe_Symbol_map): Add wp.
-
-Tue Apr 21 09:21:59 1992 James Clark (jjc at jclark)
-
- * GXditview.ad: Bind n, p, q keys to NextPage, PreviousPage and
- Quit actions.
-
- * xditview.c (RerasterizeAction): New function.
- (xditview_actions): Add RerasterizeAction.
- * GXditview.ad: Bind r key to Rerasterize action.
-
-Fri Apr 17 08:25:36 1992 James Clark (jjc at jclark)
-
- * xditview.c: Add -filename option.
- (main): Copy any -filename argument into current_file_name.
-
-Mon Mar 16 10:21:58 1992 James Clark (jjc at jclark)
-
- * tmac.X: Load tmac.pspic.
-
-Sun Mar 8 11:27:19 1992 James Clark (jjc at jclark)
-
- * Lex.c (GetLine, GetWord, GetNumber): Rewrite.
-
-Sat Oct 12 22:58:52 1991 James Clark (jjc at jclark)
-
- * Dvi.c (SetDevice): If the size change request is refused but a
- larger geometry is offered, request that.
-
-Wed Oct 9 12:27:48 1991 James Clark (jjc at jclark)
-
- * font.c (InstallFontSizes): Ignore FontNameAverageWidth component.
-
- * Dvi.c (default_font_map): Add `adobe' to font names to avoid
- ambiguity.
-
- * FontMap: New file.
- * FontMap.X100, FontMap.X75: Deleted.
- * xtotroff.c (main, usage): Add -s and -r options.
- (MapFont): Change the font pattern to have the selected resolution and
- size.
- * Imakefile (install.dev): Use FontMap and supply appropriate -s
- and -r options.
-
- * xtotroff.c (MapFont): Check for ambiguity by comparing canonicalized
- font names.
-
- * DviP.h (DviFontList): Add initialized and scalable members.
- (font.c): Add support for scalable fonts based on R5 xditview.
-
- * DviChar.c: Use xmalloc rather than malloc.
- * xditview.c (xmalloc): New function.
- * xtotroff.c (xmalloc): New function.
- * other files: Use XtMalloc and XtFree instead of malloc and free.
-
-Thu Aug 29 20:15:31 1991 James Clark (jjc at jclark)
-
- * draw.c (setGC): Do multiplication in floating point to avoid
- overflow.
-
-Tue Aug 13 12:04:41 1991 James Clark (jjc at jclark)
-
- * draw.c (FakeCharacter): Remove casts in defintion of pack2.
-
-Tue Jul 30 11:42:39 1991 James Clark (jjc at jclark)
-
- * tmac.Xps: New file.
- * Imakefile (install): Install tmac.Xps.
-
-Tue Jul 2 09:31:37 1991 James Clark (jjc at jclark)
-
- * xtotroff.c (main): Pass argv[0] to usage().
-
-Sun Jun 30 12:34:06 1991 James Clark (jjc at jclark)
-
- * xtotroff.c (MapFont): Handle the case where XLoadQueryFont
- returns NULL.
-
-Sat Jun 29 12:32:52 1991 James Clark (jjc at jclark)
-
- * Imakefile: Use ../gendef to generate path.h.
-
-Sun Jun 16 13:26:34 1991 James Clark (jjc at jclark)
-
- * Imakefile (depend.o): Change to device.o.
-
-Sun Jun 2 12:17:56 1991 James Clark (jjc at jclark)
-
- * Imakefile: Remove spaces from the beginning of variable
- assignment lines.
-
-Sun May 26 14:14:01 1991 James Clark (jjc at jclark)
-
- * xditview.c (Syntax): Update.
-
- * Dvi.c (DviSaveToFile, SaveToFile): New functions.
- (FindPage): Check that we're not readingTmp before checking for
- end of file of normal input file.
- (ClassPartInitialize): New function.
- * Dvi.h: Add declaration of DviSaveToFile.
- * DviP.h: Add save method to DviClassPart. Declare
- InheritSaveToFile.
- * xditview.c (DoPrint, Print, PrintAction): New functions.
- * xditview.c: Add print menu entry.
- * xditview.c: Provide printCommand application resource.
- * lex.c: Don't output EOF to temporary file.
-
- * Dvi.c (QueryGeometry): Check request->request_mode.
-
- * Dvi.c (SetDevice): New function.
- (SetDeviceResolution): Deleted.
-
- * Dvi.c: Add resolution resource.
- * DviP.h: Add definitions of XtNResolution and XtCResolution.
- * xditview.c: Add -resolution argument.
- * GXditview.ad: Add default for GXditview.height.
- * Dvi.c (Initialize, SetDevice): Use default_resolution.
-
- * Dvi.c: Make MY_HEIGHT and MY_WIDTH use the paperlength and
- paperwidth commands in the DESC file.
-
- * Dvi.c: Add SS font to default font map.
-
- * draw.c: Rewritten so as not to assume device and display
- resolution is the same.
- * DviP.h: Include device.h. Add device_font member to DviFontList.
- Add adjustable arrary to DviCharCache. Add text_x_width,
- text_device_width, word_flag, device_font, device_font_number,
- device, native, device_resolution, display_resolution,
- paperlength, paperwidth, scale_factor, sizescale members.
- * Dvi.c (Initialize): Initialize new variable used by draw.c
- (Destroy): Call device_destroy.
- * font.c (MaxFontPosition): New function.
- (LookupFontSizeBySize): Handle sizescale.
- (InstallFont): Load the device font.
- (ForgetFonts): New function.
- (QueryDeviceFont): New function.
- * parse.c (ParseInput): Handle t and u commands. Split off
- character output into draw.c.
- (ParseDeviceControl): Ignore res command. Use the device argument
- to the T command.
-
- * font.c (MapXNameToDviName): Ifdefed out.
-
- * path.h: New file.
- * device.c, device.h: New files.
-
- * DviChar.c: Add entries for lB, rB, oq, lC, rC, md.
-
- * INSTALL: New file.
-
- * libxdvi: Merged into main directory.
- * xtotroff.c, xditview.c: Change includes accordingly.
-
- * devX75, devX100: Merged into main directory.
- * xditview.man: Renamed to gxditview.man.
-
- * Xditview.ad: Renamed to GXditview.ad.
- * xditview.c (main): Use class of GXditview rather than xditview.
-
- * Imakefile: New file.
- * Makefile: Deleted.
-
- * xtotroff.c (MapFont): Unlink output file before opening it.
-
- * Started separate ChangeLog.
diff --git a/contrib/groff/src/xditview/DESC b/contrib/groff/src/xditview/DESC
deleted file mode 100644
index 172170c9c0b5..000000000000
--- a/contrib/groff/src/xditview/DESC
+++ /dev/null
@@ -1,9 +0,0 @@
-styles R I B BI
-fonts 6 0 0 0 0 0 S
-sizes 8 10 12 14 18 24 0
-res 75
-X11
-hor 1
-vert 1
-unitwidth 10
-postpro gxditview
diff --git a/contrib/groff/src/xditview/Dvi.c b/contrib/groff/src/xditview/Dvi.c
deleted file mode 100644
index 08eb810a7bc8..000000000000
--- a/contrib/groff/src/xditview/Dvi.c
+++ /dev/null
@@ -1,573 +0,0 @@
-#ifndef SABER
-#ifndef lint
-static char Xrcsid[] = "$XConsortium: Dvi.c,v 1.9 89/12/10 16:12:25 rws Exp $";
-#endif /* lint */
-#endif /* SABER */
-
-/*
- * Dvi.c - Dvi display widget
- *
- */
-
-#define XtStrlen(s) ((s) ? strlen(s) : 0)
-
- /* The following are defined for the reader's convenience. Any
- Xt..Field macro in this code just refers to some field in
- one of the substructures of the WidgetRec. */
-
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <X11/Xmu/Converters.h>
-#include <stdio.h>
-#include <ctype.h>
-#include "DviP.h"
-
-/****************************************************************
- *
- * Full class record constant
- *
- ****************************************************************/
-
-/* Private Data */
-
-static char default_font_map[] = "\
-TR -adobe-times-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
-TI -adobe-times-medium-i-normal--*-100-*-*-*-*-iso8859-1\n\
-TB -adobe-times-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
-TBI -adobe-times-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\
-CR -adobe-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
-CI -adobe-courier-medium-o-normal--*-100-*-*-*-*-iso8859-1\n\
-CB -adobe-courier-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
-CBI -adobe-courier-bold-o-normal--*-100-*-*-*-*-iso8859-1\n\
-HR -adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
-HI -adobe-helvetica-medium-o-normal--*-100-*-*-*-*-iso8859-1\n\
-HB -adobe-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
-HBI -adobe-helvetica-bold-o-normal--*-100-*-*-*-*-iso8859-1\n\
-NR -adobe-new century schoolbook-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
-NI -adobe-new century schoolbook-medium-i-normal--*-100-*-*-*-*-iso8859-1\n\
-NB -adobe-new century schoolbook-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
-NBI -adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\
-S -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
-SS -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
-";
-
-#define offset(field) XtOffset(DviWidget, field)
-
-#define MY_WIDTH(dw) ((int)(dw->dvi.paperwidth * dw->dvi.scale_factor + .5))
-#define MY_HEIGHT(dw) ((int)(dw->dvi.paperlength * dw->dvi.scale_factor + .5))
-
-static XtResource resources[] = {
- {XtNfontMap, XtCFontMap, XtRString, sizeof (char *),
- offset(dvi.font_map_string), XtRString, default_font_map},
- {XtNforeground, XtCForeground, XtRPixel, sizeof (unsigned long),
- offset(dvi.foreground), XtRString, "XtDefaultForeground"},
- {XtNbackground, XtCBackground, XtRPixel, sizeof (unsigned long),
- offset(dvi.background), XtRString, "XtDefaultBackground"},
- {XtNpageNumber, XtCPageNumber, XtRInt, sizeof (int),
- offset(dvi.requested_page), XtRString, "1"},
- {XtNlastPageNumber, XtCLastPageNumber, XtRInt, sizeof (int),
- offset (dvi.last_page), XtRString, "0"},
- {XtNfile, XtCFile, XtRFile, sizeof (FILE *),
- offset (dvi.file), XtRFile, (char *) 0},
- {XtNseek, XtCSeek, XtRBoolean, sizeof (Boolean),
- offset(dvi.seek), XtRString, "false"},
- {XtNfont, XtCFont, XtRFontStruct, sizeof (XFontStruct *),
- offset(dvi.default_font), XtRString, "xtdefaultfont"},
- {XtNbackingStore, XtCBackingStore, XtRBackingStore, sizeof (int),
- offset(dvi.backing_store), XtRString, "default"},
- {XtNnoPolyText, XtCNoPolyText, XtRBoolean, sizeof (Boolean),
- offset(dvi.noPolyText), XtRString, "false"},
- {XtNresolution, XtCResolution, XtRInt, sizeof(int),
- offset(dvi.default_resolution), XtRString, "75"},
-};
-
-#undef offset
-
-static void ClassInitialize ();
-static void ClassPartInitialize();
-static void Initialize(), Realize (), Destroy (), Redisplay ();
-static Boolean SetValues (), SetValuesHook ();
-static XtGeometryResult QueryGeometry ();
-static void ShowDvi ();
-static void CloseFile (), OpenFile ();
-static void FindPage ();
-
-static void SaveToFile ();
-
-DviClassRec dviClassRec = {
-{
- &widgetClassRec, /* superclass */
- "Dvi", /* class_name */
- sizeof(DviRec), /* size */
- ClassInitialize, /* class_initialize */
- ClassPartInitialize, /* class_part_initialize */
- FALSE, /* class_inited */
- Initialize, /* initialize */
- NULL, /* initialize_hook */
- Realize, /* realize */
- NULL, /* actions */
- 0, /* num_actions */
- resources, /* resources */
- XtNumber(resources), /* resource_count */
- NULLQUARK, /* xrm_class */
- FALSE, /* compress_motion */
- TRUE, /* compress_exposure */
- TRUE, /* compress_enterleave */
- FALSE, /* visible_interest */
- Destroy, /* destroy */
- NULL, /* resize */
- Redisplay, /* expose */
- SetValues, /* set_values */
- SetValuesHook, /* set_values_hook */
- NULL, /* set_values_almost */
- NULL, /* get_values_hook */
- NULL, /* accept_focus */
- XtVersion, /* version */
- NULL, /* callback_private */
- 0, /* tm_table */
- QueryGeometry, /* query_geometry */
- NULL, /* display_accelerator */
- NULL /* extension */
-},{
- SaveToFile, /* save */
-},
-};
-
-WidgetClass dviWidgetClass = (WidgetClass) &dviClassRec;
-
-static void ClassInitialize ()
-{
- XtAddConverter( XtRString, XtRBackingStore, XmuCvtStringToBackingStore,
- NULL, 0 );
-}
-
-/****************************************************************
- *
- * Private Procedures
- *
- ****************************************************************/
-
-/* ARGSUSED */
-static void Initialize(request, new)
- Widget request, new;
-{
- DviWidget dw = (DviWidget) new;
-
- dw->dvi.current_page = 0;
- dw->dvi.font_map = 0;
- dw->dvi.cache.index = 0;
- dw->dvi.text_x_width = 0;
- dw->dvi.text_device_width = 0;
- dw->dvi.word_flag = 0;
- dw->dvi.file = 0;
- dw->dvi.tmpFile = 0;
- dw->dvi.state = 0;
- dw->dvi.readingTmp = 0;
- dw->dvi.cache.char_index = 0;
- dw->dvi.cache.font_size = -1;
- dw->dvi.cache.font_number = -1;
- dw->dvi.cache.adjustable[0] = 0;
- dw->dvi.file_map = 0;
- dw->dvi.fonts = 0;
- dw->dvi.seek = False;
- dw->dvi.device_resolution = dw->dvi.default_resolution;
- dw->dvi.display_resolution = dw->dvi.default_resolution;
- dw->dvi.paperlength = dw->dvi.default_resolution*11;
- dw->dvi.paperwidth = (dw->dvi.default_resolution*8
- + dw->dvi.default_resolution/2);
- dw->dvi.scale_factor = 1.0;
- dw->dvi.sizescale = 1;
- dw->dvi.line_thickness = -1;
- dw->dvi.line_width = 1;
- dw->dvi.fill = DVI_FILL_MAX;
- dw->dvi.device_font = 0;
- dw->dvi.device_font_number = -1;
- dw->dvi.device = 0;
- dw->dvi.native = 0;
-}
-
-#include "gray1.bm"
-#include "gray2.bm"
-#include "gray3.bm"
-#include "gray4.bm"
-#include "gray5.bm"
-#include "gray6.bm"
-#include "gray7.bm"
-#include "gray8.bm"
-
-static void
-Realize (w, valueMask, attrs)
- Widget w;
- XtValueMask *valueMask;
- XSetWindowAttributes *attrs;
-{
- DviWidget dw = (DviWidget) w;
- XGCValues values;
-
- if (dw->dvi.backing_store != Always + WhenMapped + NotUseful) {
- attrs->backing_store = dw->dvi.backing_store;
- *valueMask |= CWBackingStore;
- }
- XtCreateWindow (w, (unsigned)InputOutput, (Visual *) CopyFromParent,
- *valueMask, attrs);
- values.foreground = dw->dvi.foreground;
- values.cap_style = CapRound;
- values.join_style = JoinRound;
- values.line_width = dw->dvi.line_width;
- dw->dvi.normal_GC = XCreateGC (XtDisplay (w), XtWindow (w),
- GCForeground|GCCapStyle|GCJoinStyle
- |GCLineWidth,
- &values);
- dw->dvi.gray[0] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w),
- gray1_bits,
- gray1_width, gray1_height);
- dw->dvi.gray[1] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w),
- gray2_bits,
- gray2_width, gray2_height);
- dw->dvi.gray[2] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w),
- gray3_bits,
- gray3_width, gray3_height);
- dw->dvi.gray[3] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w),
- gray4_bits,
- gray4_width, gray4_height);
- dw->dvi.gray[4] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w),
- gray5_bits,
- gray5_width, gray5_height);
- dw->dvi.gray[5] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w),
- gray6_bits,
- gray6_width, gray6_height);
- dw->dvi.gray[6] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w),
- gray7_bits,
- gray7_width, gray7_height);
- dw->dvi.gray[7] = XCreateBitmapFromData(XtDisplay (w), XtWindow (w),
- gray8_bits,
- gray8_width, gray8_height);
- values.background = dw->dvi.background;
- values.stipple = dw->dvi.gray[5];
- dw->dvi.fill_GC = XCreateGC (XtDisplay (w), XtWindow (w),
- GCForeground|GCBackground|GCStipple,
- &values);
-
- dw->dvi.fill_type = 9;
-
- if (dw->dvi.file)
- OpenFile (dw);
- ParseFontMap (dw);
-}
-
-static void
-Destroy(w)
- Widget w;
-{
- DviWidget dw = (DviWidget) w;
-
- XFreeGC (XtDisplay (w), dw->dvi.normal_GC);
- XFreeGC (XtDisplay (w), dw->dvi.fill_GC);
- XFreePixmap (XtDisplay (w), dw->dvi.gray[0]);
- XFreePixmap (XtDisplay (w), dw->dvi.gray[1]);
- XFreePixmap (XtDisplay (w), dw->dvi.gray[2]);
- XFreePixmap (XtDisplay (w), dw->dvi.gray[3]);
- XFreePixmap (XtDisplay (w), dw->dvi.gray[4]);
- XFreePixmap (XtDisplay (w), dw->dvi.gray[5]);
- XFreePixmap (XtDisplay (w), dw->dvi.gray[6]);
- XFreePixmap (XtDisplay (w), dw->dvi.gray[7]);
- DestroyFontMap (dw->dvi.font_map);
- DestroyFileMap (dw->dvi.file_map);
- device_destroy (dw->dvi.device);
-}
-
-/*
- * Repaint the widget window
- */
-
-/* ARGSUSED */
-static void
-Redisplay(w, event, region)
- Widget w;
- XEvent *event;
- Region region;
-{
- DviWidget dw = (DviWidget) w;
- XRectangle extents;
-
- XClipBox (region, &extents);
- dw->dvi.extents.x1 = extents.x;
- dw->dvi.extents.y1 = extents.y;
- dw->dvi.extents.x2 = extents.x + extents.width;
- dw->dvi.extents.y2 = extents.y + extents.height;
- ShowDvi (dw);
-}
-
-/*
- * Set specified arguments into widget
- */
-/* ARGSUSED */
-static Boolean
-SetValues (current, request, new)
- DviWidget current, request, new;
-{
- Boolean redisplay = FALSE;
- char *new_map;
- int cur, req;
-
- if (current->dvi.font_map_string != request->dvi.font_map_string) {
- new_map = XtMalloc (strlen (request->dvi.font_map_string) + 1);
- if (new_map) {
- redisplay = TRUE;
- strcpy (new_map, request->dvi.font_map_string);
- new->dvi.font_map_string = new_map;
- if (current->dvi.font_map_string)
- XtFree (current->dvi.font_map_string);
- current->dvi.font_map_string = 0;
- ParseFontMap (new);
- }
- }
-
- req = request->dvi.requested_page;
- cur = current->dvi.requested_page;
- if (cur != req) {
- if (!request->dvi.file)
- req = 0;
- else {
- if (req < 1)
- req = 1;
- if (current->dvi.last_page != 0 &&
- req > current->dvi.last_page)
- req = current->dvi.last_page;
- }
- if (cur != req)
- redisplay = TRUE;
- new->dvi.requested_page = req;
- if (current->dvi.last_page == 0 && req > cur)
- FindPage (new);
- }
-
- return redisplay;
-}
-
-/*
- * use the set_values_hook entry to check when
- * the file is set
- */
-
-static Boolean
-SetValuesHook (dw, args, num_argsp)
- DviWidget dw;
- ArgList args;
- Cardinal *num_argsp;
-{
- Cardinal i;
-
- for (i = 0; i < *num_argsp; i++) {
- if (!strcmp (args[i].name, XtNfile)) {
- CloseFile (dw);
- OpenFile (dw);
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static void CloseFile (dw)
- DviWidget dw;
-{
- if (dw->dvi.tmpFile)
- fclose (dw->dvi.tmpFile);
- ForgetPagePositions (dw);
-}
-
-static void OpenFile (dw)
- DviWidget dw;
-{
- dw->dvi.tmpFile = 0;
- if (!dw->dvi.seek)
- dw->dvi.tmpFile = tmpfile();
- dw->dvi.requested_page = 1;
- dw->dvi.last_page = 0;
-}
-
-static XtGeometryResult
-QueryGeometry (w, request, geometry_return)
- Widget w;
- XtWidgetGeometry *request, *geometry_return;
-{
- XtGeometryResult ret;
- DviWidget dw = (DviWidget) w;
-
- ret = XtGeometryYes;
- if (((request->request_mode & CWWidth)
- && request->width < MY_WIDTH(dw))
- || ((request->request_mode & CWHeight)
- && request->height < MY_HEIGHT(dw)))
- ret = XtGeometryAlmost;
- geometry_return->width = MY_WIDTH(dw);
- geometry_return->height = MY_HEIGHT(dw);
- geometry_return->request_mode = CWWidth|CWHeight;
- return ret;
-}
-
-SetDevice (dw, name)
- DviWidget dw;
- char *name;
-{
- XtWidgetGeometry request, reply;
- XtGeometryResult ret;
-
- ForgetFonts (dw);
- dw->dvi.device = device_load (name);
- if (!dw->dvi.device)
- return;
- dw->dvi.sizescale = dw->dvi.device->sizescale;
- dw->dvi.device_resolution = dw->dvi.device->res;
- dw->dvi.native = dw->dvi.device->X11;
- dw->dvi.paperlength = dw->dvi.device->paperlength;
- dw->dvi.paperwidth = dw->dvi.device->paperwidth;
- if (dw->dvi.native) {
- dw->dvi.display_resolution = dw->dvi.device_resolution;
- dw->dvi.scale_factor = 1.0;
- }
- else {
- dw->dvi.display_resolution = dw->dvi.default_resolution;
- dw->dvi.scale_factor = ((double)dw->dvi.display_resolution
- / dw->dvi.device_resolution);
- }
- request.request_mode = CWWidth|CWHeight;
- request.width = MY_WIDTH(dw);
- request.height = MY_HEIGHT(dw);
- ret = XtMakeGeometryRequest ((Widget)dw, &request, &reply);
- if (ret == XtGeometryAlmost
- && reply.height >= request.height
- && reply.width >= request.width) {
- request.width = reply.width;
- request.height = reply.height;
- XtMakeGeometryRequest ((Widget)dw, &request, &reply);
- }
-}
-
-static void
-ShowDvi (dw)
- DviWidget dw;
-{
- if (!dw->dvi.file) {
- static char Error[] = "No file selected";
-
- XSetFont (XtDisplay(dw), dw->dvi.normal_GC,
- dw->dvi.default_font->fid);
- XDrawString (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
- 20, 20, Error, strlen (Error));
- return;
- }
-
- FindPage (dw);
-
- dw->dvi.display_enable = 1;
- ParseInput (dw);
- if (dw->dvi.last_page && dw->dvi.requested_page > dw->dvi.last_page)
- dw->dvi.requested_page = dw->dvi.last_page;
-}
-
-static void
-FindPage (dw)
- DviWidget dw;
-{
- int i;
- long file_position;
-
- if (dw->dvi.requested_page < 1)
- dw->dvi.requested_page = 1;
-
- if (dw->dvi.last_page != 0 && dw->dvi.requested_page > dw->dvi.last_page)
- dw->dvi.requested_page = dw->dvi.last_page;
-
- file_position = SearchPagePosition (dw, dw->dvi.requested_page);
- if (file_position != -1) {
- FileSeek(dw, file_position);
- dw->dvi.current_page = dw->dvi.requested_page;
- } else {
- for (i=dw->dvi.requested_page; i > 0; i--) {
- file_position = SearchPagePosition (dw, i);
- if (file_position != -1)
- break;
- }
- if (file_position == -1)
- file_position = 0;
- FileSeek (dw, file_position);
-
- dw->dvi.current_page = i;
-
- dw->dvi.display_enable = 0;
- while (dw->dvi.current_page != dw->dvi.requested_page) {
- dw->dvi.current_page = ParseInput (dw);
- /*
- * at EOF, seek back to the beginning of this page.
- */
- if (!dw->dvi.readingTmp && feof (dw->dvi.file)) {
- file_position = SearchPagePosition (dw,
- dw->dvi.current_page);
- if (file_position != -1)
- FileSeek (dw, file_position);
- dw->dvi.requested_page = dw->dvi.current_page;
- break;
- }
- }
- }
-}
-
-void DviSaveToFile(w, fp)
- Widget w;
- FILE *fp;
-{
- XtCheckSubclass(w, dviWidgetClass, NULL);
- (*((DviWidgetClass) XtClass(w))->command_class.save)(w, fp);
-}
-
-static
-void SaveToFile(w, fp)
- Widget w;
- FILE *fp;
-{
- DviWidget dw = (DviWidget)w;
- long pos;
- int c;
-
- if (dw->dvi.tmpFile) {
- pos = ftell(dw->dvi.tmpFile);
- if (dw->dvi.ungot) {
- pos--;
- dw->dvi.ungot = 0;
- /* The ungot character is in the tmpFile, so we don't
- want to read it from file. */
- (void)getc(dw->dvi.file);
- }
- }
- else
- pos = ftell(dw->dvi.file);
- FileSeek(dw, 0L);
- while (DviGetC(dw, &c) != EOF)
- if (putc(c, fp) == EOF) {
- /* XXX print error message */
- break;
- }
- FileSeek(dw, pos);
-}
-
-static
-void ClassPartInitialize(widget_class)
- WidgetClass widget_class;
-{
- DviWidgetClass wc = (DviWidgetClass)widget_class;
- DviWidgetClass super = (DviWidgetClass) wc->core_class.superclass;
- if (wc->command_class.save == InheritSaveToFile)
- wc->command_class.save = super->command_class.save;
-}
-
-/*
-Local Variables:
-c-indent-level: 8
-c-continued-statement-offset: 8
-c-brace-offset: -8
-c-argdecl-indent: 8
-c-label-offset: -8
-c-tab-always-indent: nil
-End:
-*/
diff --git a/contrib/groff/src/xditview/Dvi.h b/contrib/groff/src/xditview/Dvi.h
deleted file mode 100644
index 5aab7d8c7558..000000000000
--- a/contrib/groff/src/xditview/Dvi.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-* $XConsortium: Dvi.h,v 1.4 89/07/21 14:22:06 jim Exp $
-*/
-
-#ifndef _XtDvi_h
-#define _XtDvi_h
-
-/***********************************************************************
- *
- * Dvi Widget
- *
- ***********************************************************************/
-
-/* Parameters:
-
- Name Class RepType Default Value
- ---- ----- ------- -------------
- background Background pixel White
- foreground Foreground Pixel Black
- fontMap FontMap char * ...
- pageNumber PageNumber int 1
-*/
-
-#define XtNfontMap "fontMap"
-#define XtNpageNumber "pageNumber"
-#define XtNlastPageNumber "lastPageNumber"
-#define XtNnoPolyText "noPolyText"
-#define XtNseek "seek"
-#define XtNresolution "resolution"
-
-#define XtCFontMap "FontMap"
-#define XtCPageNumber "PageNumber"
-#define XtCLastPageNumber "LastPageNumber"
-#define XtCNoPolyText "NoPolyText"
-#define XtCSeek "Seek"
-#define XtCResolution "Resolution"
-
-typedef struct _DviRec *DviWidget; /* completely defined in DviPrivate.h */
-typedef struct _DviClassRec *DviWidgetClass; /* completely defined in DviPrivate.h */
-
-extern WidgetClass dviWidgetClass;
-
-extern void DviSaveToFile();
-
-#endif /* _XtDvi_h */
-/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/contrib/groff/src/xditview/DviChar.c b/contrib/groff/src/xditview/DviChar.c
deleted file mode 100644
index 2aaba459a28d..000000000000
--- a/contrib/groff/src/xditview/DviChar.c
+++ /dev/null
@@ -1,664 +0,0 @@
-/*
- * DviChar.c
- *
- * Map DVI (ditroff output) character names to
- * font indexes and back
- */
-
-#include "DviChar.h"
-
-extern char *xmalloc();
-
-#define allocHash() ((DviCharNameHash *) xmalloc (sizeof (DviCharNameHash)))
-
-struct map_list {
- struct map_list *next;
- DviCharNameMap *map;
-};
-
-static struct map_list *world;
-
-static int standard_maps_loaded = 0;
-static void load_standard_maps ();
-static int hash_name ();
-static dispose_hash(), compute_hash();
-
-DviCharNameMap *
-DviFindMap (encoding)
- char *encoding;
-{
- struct map_list *m;
-
- if (!standard_maps_loaded)
- load_standard_maps ();
- for (m = world; m; m=m->next)
- if (!strcmp (m->map->encoding, encoding))
- return m->map;
- return 0;
-}
-
-void
-DviRegisterMap (map)
- DviCharNameMap *map;
-{
- struct map_list *m;
-
- if (!standard_maps_loaded)
- load_standard_maps ();
- for (m = world; m; m = m->next)
- if (!strcmp (m->map->encoding, map->encoding))
- break;
- if (!m) {
- m = (struct map_list *) xmalloc (sizeof *m);
- m->next = world;
- world = m;
- }
- dispose_hash (map);
- m->map = map;
- compute_hash (map);
-}
-
-static
-dispose_hash (map)
- DviCharNameMap *map;
-{
- DviCharNameHash **buckets;
- DviCharNameHash *h, *next;
- int i;
-
- buckets = map->buckets;
- for (i = 0; i < DVI_HASH_SIZE; i++) {
- for (h = buckets[i]; h; h=next) {
- next = h->next;
- free (h);
- }
- }
-}
-
-static int
-hash_name (name)
- char *name;
-{
- int i = 0;
-
- while (*name)
- i = (i << 1) ^ *name++;
- if (i < 0)
- i = -i;
- return i;
-}
-
-static
-compute_hash (map)
- DviCharNameMap *map;
-{
- DviCharNameHash **buckets;
- int c, s, i;
- DviCharNameHash *h;
-
- buckets = map->buckets;
- for (i = 0; i < DVI_HASH_SIZE; i++)
- buckets[i] = 0;
- for (c = 0; c < DVI_MAP_SIZE; c++)
- for (s = 0; s < DVI_MAX_SYNONYMS; s++) {
- if (!map->dvi_names[c][s])
- break;
- i = hash_name (map->dvi_names[c][s]) % DVI_HASH_SIZE;
- h = allocHash ();
- h->next = buckets[i];
- buckets[i] = h;
- h->name = map->dvi_names[c][s];
- h->position = c;
- }
-
-}
-
-int
-DviCharIndex (map, name)
- DviCharNameMap *map;
- char *name;
-{
- int i;
- DviCharNameHash *h;
-
- i = hash_name (name) % DVI_HASH_SIZE;
- for (h = map->buckets[i]; h; h=h->next)
- if (!strcmp (h->name, name))
- return h->position;
- return -1;
-}
-
-static DviCharNameMap ISO8859_1_map = {
- "iso8859-1",
- 0,
-{
-{ 0, /* 0 */},
-{ 0, /* 1 */},
-{ 0, /* 2 */},
-{ 0, /* 3 */},
-{ 0, /* 4 */},
-{ 0, /* 5 */},
-{ 0, /* 6 */},
-{ 0, /* 7 */},
-{ 0, /* 8 */},
-{ 0, /* 9 */},
-{ 0, /* 10 */},
-{ 0, /* 11 */},
-{ 0, /* 12 */},
-{ 0, /* 13 */},
-{ 0, /* 14 */},
-{ 0, /* 15 */},
-{ 0, /* 16 */},
-{ 0, /* 17 */},
-{ 0, /* 18 */},
-{ 0, /* 19 */},
-{ 0, /* 20 */},
-{ 0, /* 21 */},
-{ 0, /* 22 */},
-{ 0, /* 23 */},
-{ 0, /* 24 */},
-{ 0, /* 25 */},
-{ 0, /* 26 */},
-{ 0, /* 27 */},
-{ 0, /* 28 */},
-{ 0, /* 29 */},
-{ 0, /* 30 */},
-{ 0, /* 31 */},
-{ 0, /* 32 */},
-{ "!", /* 33 */},
-{ "\"","dq", /* 34 */},
-{ "#","sh", /* 35 */},
-{ "$","Do", /* 36 */},
-{ "%", /* 37 */},
-{ "&", /* 38 */},
-{ "'","cq", /* 39 */},
-{ "(", /* 40 */},
-{ ")", /* 41 */},
-{ "*", /* 42 */},
-{ "+", /* 43 */},
-{ ",", /* 44 */},
-{ "\\-", /* 45 */},
-{ ".", /* 46 */},
-{ "/","sl", /* 47 */},
-{ "0", /* 48 */},
-{ "1", /* 49 */},
-{ "2", /* 50 */},
-{ "3", /* 51 */},
-{ "4", /* 52 */},
-{ "5", /* 53 */},
-{ "6", /* 54 */},
-{ "7", /* 55 */},
-{ "8", /* 56 */},
-{ "9", /* 57 */},
-{ ":", /* 58 */},
-{ ";", /* 59 */},
-{ "<", /* 60 */},
-{ "=","eq", /* 61 */},
-{ ">", /* 62 */},
-{ "?", /* 63 */},
-{ "@","at", /* 64 */},
-{ "A", /* 65 */},
-{ "B", /* 66 */},
-{ "C", /* 67 */},
-{ "D", /* 68 */},
-{ "E", /* 69 */},
-{ "F", /* 70 */},
-{ "G", /* 71 */},
-{ "H", /* 72 */},
-{ "I", /* 73 */},
-{ "J", /* 74 */},
-{ "K", /* 75 */},
-{ "L", /* 76 */},
-{ "M", /* 77 */},
-{ "N", /* 78 */},
-{ "O", /* 79 */},
-{ "P", /* 80 */},
-{ "Q", /* 81 */},
-{ "R", /* 82 */},
-{ "S", /* 83 */},
-{ "T", /* 84 */},
-{ "U", /* 85 */},
-{ "V", /* 86 */},
-{ "W", /* 87 */},
-{ "X", /* 88 */},
-{ "Y", /* 89 */},
-{ "Z", /* 90 */},
-{ "[","lB", /* 91 */},
-{ "\\","rs", /* 92 */},
-{ "]","rB", /* 93 */},
-{ "^","a^","ha" /* 94 */},
-{ "_", /* 95 */},
-{ "`","oq", /* 96 */},
-{ "a", /* 97 */},
-{ "b", /* 98 */},
-{ "c", /* 99 */},
-{ "d", /* 100 */},
-{ "e", /* 101 */},
-{ "f", /* 102 */},
-{ "g", /* 103 */},
-{ "h", /* 104 */},
-{ "i", /* 105 */},
-{ "j", /* 106 */},
-{ "k", /* 107 */},
-{ "l", /* 108 */},
-{ "m", /* 109 */},
-{ "n", /* 110 */},
-{ "o", /* 111 */},
-{ "p", /* 112 */},
-{ "q", /* 113 */},
-{ "r", /* 114 */},
-{ "s", /* 115 */},
-{ "t", /* 116 */},
-{ "u", /* 117 */},
-{ "v", /* 118 */},
-{ "w", /* 119 */},
-{ "x", /* 120 */},
-{ "y", /* 121 */},
-{ "z", /* 122 */},
-{ "{","lC", /* 123 */},
-{ "|","or","ba" /* 124 */},
-{ "}","rC", /* 125 */},
-{ "~","a~","ap","ti" /* 126 */},
-{ 0, /* 127 */},
-{ 0, /* 128 */},
-{ 0, /* 129 */},
-{ 0, /* 130 */},
-{ 0, /* 131 */},
-{ 0, /* 132 */},
-{ 0, /* 133 */},
-{ 0, /* 134 */},
-{ 0, /* 135 */},
-{ 0, /* 136 */},
-{ 0, /* 137 */},
-{ 0, /* 138 */},
-{ 0, /* 139 */},
-{ 0, /* 140 */},
-{ 0, /* 141 */},
-{ 0, /* 142 */},
-{ 0, /* 143 */},
-{ 0, /* 144 */},
-{ 0, /* 145 */},
-{ 0, /* 146 */},
-{ 0, /* 147 */},
-{ 0, /* 148 */},
-{ 0, /* 149 */},
-{ 0, /* 150 */},
-{ 0, /* 151 */},
-{ 0, /* 152 */},
-{ 0, /* 153 */},
-{ 0, /* 154 */},
-{ 0, /* 155 */},
-{ 0, /* 156 */},
-{ 0, /* 157 */},
-{ 0, /* 158 */},
-{ 0, /* 159 */},
-{ 0, /* 160 */},
-{ "r!", "\241", /* 161 */},
-{ "ct", "\242", /* 162 */},
-{ "Po", "\243", /* 163 */},
-{ "Cs", "\244", /* 164 */},
-{ "Ye", "\245", /* 165 */},
-{ "bb", "\246", /* 166 */},
-{ "sc", "\247", /* 167 */},
-{ "ad", "\250", /* 168 */},
-{ "co", "\251", /* 169 */},
-{ "Of", "\252", /* 170 */},
-{ "Fo", "\253", /* 171 */},
-{ "no", "\254", /* 172 */},
-{ "-", "hy", "\255" /* 173 */},
-{ "rg", "\256", /* 174 */},
-{ "a-", "\257", /* 175 */},
-{ "de", "\260", /* 176 */},
-{ "+-", "\261", /* 177 */},
-{ "S2", "\262", /* 178 */},
-{ "S3", "\263", /* 179 */},
-{ "aa", "\264", /* 180 */},
-/* Omit *m here; we want *m to match the other greek letters in the
- symbol font. */
-{ "\265", /* 181 */},
-{ "ps", "\266", /* 182 */},
-{ "pc", "\267", /* 183 */},
-{ "ac", "\270", /* 184 */},
-{ "S1", "\271", /* 185 */},
-{ "Om", "\272", /* 186 */},
-{ "Fc", "\273", /* 187 */},
-{ "14", "\274", /* 188 */},
-{ "12", "\275", /* 189 */},
-{ "34", "\276", /* 190 */},
-{ "r?", "\277", /* 191 */},
-{ "`A", "\300", /* 192 */},
-{ "'A", "\301", /* 193 */},
-{ "^A", "\302", /* 194 */},
-{ "~A", "\303", /* 195 */},
-{ ":A", "\304", /* 196 */},
-{ "oA", "\305", /* 197 */},
-{ "AE", "\306", /* 198 */},
-{ ",C", "\307", /* 199 */},
-{ "`E", "\310", /* 200 */},
-{ "'E", "\311", /* 201 */},
-{ "^E", "\312", /* 202 */},
-{ ":E", "\313", /* 203 */},
-{ "`I", "\314", /* 204 */},
-{ "'I", "\315", /* 205 */},
-{ "^I", "\316", /* 206 */},
-{ ":I", "\317", /* 207 */},
-{ "-D", "\320", /* 208 */},
-{ "~N", "\321", /* 209 */},
-{ "`O", "\322", /* 210 */},
-{ "'O", "\323", /* 211 */},
-{ "^O", "\324", /* 212 */},
-{ "~O", "\325", /* 213 */},
-{ ":O", "\326", /* 214 */},
-{ "mu", "\327", /* 215 */},
-{ "/O", "\330", /* 216 */},
-{ "`U", "\331", /* 217 */},
-{ "'U", "\332", /* 218 */},
-{ "^U", "\333", /* 219 */},
-{ ":U", "\334", /* 220 */},
-{ "'Y", "\335", /* 221 */},
-{ "TP", "\336", /* 222 */},
-{ "ss", "\337", /* 223 */},
-{ "`a", "\340", /* 224 */},
-{ "'a", "\341", /* 225 */},
-{ "^a", "\342", /* 226 */},
-{ "~a", "\343", /* 227 */},
-{ ":a", "\344", /* 228 */},
-{ "oa", "\345", /* 229 */},
-{ "ae", "\346", /* 230 */},
-{ ",c", "\347", /* 231 */},
-{ "`e", "\350", /* 232 */},
-{ "'e", "\351", /* 233 */},
-{ "^e", "\352", /* 234 */},
-{ ":e", "\353", /* 235 */},
-{ "`i", "\354", /* 236 */},
-{ "'i", "\355", /* 237 */},
-{ "^i", "\356", /* 238 */},
-{ ":i", "\357", /* 239 */},
-{ "Sd", "\360", /* 240 */},
-{ "~n", "\361", /* 241 */},
-{ "`o", "\362", /* 242 */},
-{ "'o", "\363", /* 243 */},
-{ "^o", "\364", /* 244 */},
-{ "~o", "\365", /* 245 */},
-{ ":o", "\366", /* 246 */},
-{ "di", "\367", /* 247 */},
-{ "/o", "\370", /* 248 */},
-{ "`u", "\371", /* 249 */},
-{ "'u", "\372", /* 250 */},
-{ "^u", "\373", /* 251 */},
-{ ":u", "\374", /* 252 */},
-{ "'y", "\375", /* 253 */},
-{ "Tp", "\376", /* 254 */},
-{ ":y", "\377", /* 255 */},
-}};
-
-static DviCharNameMap Adobe_Symbol_map = {
- "adobe-fontspecific",
- 1,
-{
-{ 0, /* 0 */},
-{ 0, /* 1 */},
-{ 0, /* 2 */},
-{ 0, /* 3 */},
-{ 0, /* 4 */},
-{ 0, /* 5 */},
-{ 0, /* 6 */},
-{ 0, /* 7 */},
-{ 0, /* 8 */},
-{ 0, /* 9 */},
-{ 0, /* 10 */},
-{ 0, /* 11 */},
-{ 0, /* 12 */},
-{ 0, /* 13 */},
-{ 0, /* 14 */},
-{ 0, /* 15 */},
-{ 0, /* 16 */},
-{ 0, /* 17 */},
-{ 0, /* 18 */},
-{ 0, /* 19 */},
-{ 0, /* 20 */},
-{ 0, /* 21 */},
-{ 0, /* 22 */},
-{ 0, /* 23 */},
-{ 0, /* 24 */},
-{ 0, /* 25 */},
-{ 0, /* 26 */},
-{ 0, /* 27 */},
-{ 0, /* 28 */},
-{ 0, /* 29 */},
-{ 0, /* 30 */},
-{ 0, /* 31 */},
-{ 0, /* 32 */},
-{ "!", /* 33 */},
-{ "fa", /* 34 */},
-{ "#", "sh", /* 35 */},
-{ "te", /* 36 */},
-{ "%", /* 37 */},
-{ "&", /* 38 */},
-{ "st", /* 39 */},
-{ "(", /* 40 */},
-{ ")", /* 41 */},
-{ "**", /* 42 */},
-{ "+", "pl", /* 43 */},
-{ ",", /* 44 */},
-{ "\\-", "mi", /* 45 */},
-{ ".", /* 46 */},
-{ "/", "sl", /* 47 */},
-{ "0", /* 48 */},
-{ "1", /* 49 */},
-{ "2", /* 50 */},
-{ "3", /* 51 */},
-{ "4", /* 52 */},
-{ "5", /* 53 */},
-{ "6", /* 54 */},
-{ "7", /* 55 */},
-{ "8", /* 56 */},
-{ "9", /* 57 */},
-{ ":", /* 58 */},
-{ ";", /* 59 */},
-{ "<", /* 60 */},
-{ "=", "eq", /* 61 */},
-{ ">", /* 62 */},
-{ "?", /* 63 */},
-{ "=~", /* 64 */},
-{ "*A", /* 65 */},
-{ "*B", /* 66 */},
-{ "*X", /* 67 */},
-{ "*D", /* 68 */},
-{ "*E", /* 69 */},
-{ "*F", /* 70 */},
-{ "*G", /* 71 */},
-{ "*Y", /* 72 */},
-{ "*I", /* 73 */},
-{ "+h", /* 74 */},
-{ "*K", /* 75 */},
-{ "*L", /* 76 */},
-{ "*M", /* 77 */},
-{ "*N", /* 78 */},
-{ "*O", /* 79 */},
-{ "*P", /* 80 */},
-{ "*H", /* 81 */},
-{ "*R", /* 82 */},
-{ "*S", /* 83 */},
-{ "*T", /* 84 */},
-{ 0, /* 85 */},
-{ "ts", /* 86 */},
-{ "*W", /* 87 */},
-{ "*C", /* 88 */},
-{ "*Q", /* 89 */},
-{ "*Z", /* 90 */},
-{ "[", "lB", /* 91 */},
-{ "tf", "3d", /* 92 */},
-{ "]", "rB", /* 93 */},
-{ "pp", /* 94 */},
-{ "_", /* 95 */},
-{ "radicalex", /* 96 */},
-{ "*a", /* 97 */},
-{ "*b", /* 98 */},
-{ "*x", /* 99 */},
-{ "*d", /* 100 */},
-{ "*e", /* 101 */},
-{ "*f", /* 102 */},
-{ "*g", /* 103 */},
-{ "*y", /* 104 */},
-{ "*i", /* 105 */},
-{ "+f", /* 106 */},
-{ "*k", /* 107 */},
-{ "*l", /* 108 */},
-{ "*m", "\265", /* 109 */},
-{ "*n", /* 110 */},
-{ "*o", /* 111 */},
-{ "*p", /* 112 */},
-{ "*h", /* 113 */},
-{ "*r", /* 114 */},
-{ "*s", /* 115 */},
-{ "*t", /* 116 */},
-{ "*u", /* 117 */},
-{ "+p", /* 118 */},
-{ "*w", /* 119 */},
-{ "*c", /* 120 */},
-{ "*q", /* 121 */},
-{ "*z", /* 122 */},
-{ "lC", "{", /* 123 */},
-{ "ba", "or", "|", /* 124 */},
-{ "rC", "}", /* 125 */},
-{ "ap", /* 126 */},
-{ 0, /* 127 */},
-{ 0, /* 128 */},
-{ 0, /* 129 */},
-{ 0, /* 130 */},
-{ 0, /* 131 */},
-{ 0, /* 132 */},
-{ 0, /* 133 */},
-{ 0, /* 134 */},
-{ 0, /* 135 */},
-{ 0, /* 136 */},
-{ 0, /* 137 */},
-{ 0, /* 138 */},
-{ 0, /* 139 */},
-{ 0, /* 140 */},
-{ 0, /* 141 */},
-{ 0, /* 142 */},
-{ 0, /* 143 */},
-{ 0, /* 144 */},
-{ 0, /* 145 */},
-{ 0, /* 146 */},
-{ 0, /* 147 */},
-{ 0, /* 148 */},
-{ 0, /* 149 */},
-{ 0, /* 150 */},
-{ 0, /* 151 */},
-{ 0, /* 152 */},
-{ 0, /* 153 */},
-{ 0, /* 154 */},
-{ 0, /* 155 */},
-{ 0, /* 156 */},
-{ 0, /* 157 */},
-{ 0, /* 158 */},
-{ 0, /* 159 */},
-{ 0, /* 160 */},
-{ "*U", /* 161 */},
-{ "fm", /* 162 */},
-{ "<=", /* 163 */},
-{ "f/", /* 164 */},
-{ "if", /* 165 */},
-{ "Fn", /* 166 */},
-{ "CL", /* 167 */},
-{ "DI", /* 168 */},
-{ "HE", /* 169 */},
-{ "SP", /* 170 */},
-{ "<>", /* 171 */},
-{ "<-", /* 172 */},
-{ "ua", "arrowverttp" /* 173 */},
-{ "->", /* 174 */},
-{ "da", "arrowvertbt" /* 175 */},
-{ "de", "\260", /* 176 */},
-{ "+-", "\261", /* 177 */},
-{ "sd", /* 178 */},
-{ ">=", /* 179 */},
-{ "mu", "\327", /* 180 */},
-{ "pt", /* 181 */},
-{ "pd", /* 182 */},
-{ "bu", /* 183 */},
-{ "di", "\367", /* 184 */},
-{ "!=", /* 185 */},
-{ "==", /* 186 */},
-{ "~=", "~~", /* 187 */},
-{ 0, /* 188 */},
-{ "arrowvertex", /* 189 */},
-{ "an", /* 190 */},
-{ "CR", /* 191 */},
-{ "Ah", /* 192 */},
-{ "Im", /* 193 */},
-{ "Re", /* 194 */},
-{ "wp", /* 195 */},
-{ "c*", /* 196 */},
-{ "c+", /* 197 */},
-{ "es", /* 198 */},
-{ "ca", /* 199 */},
-{ "cu", /* 200 */},
-{ "sp", /* 201 */},
-{ "ip", /* 202 */},
-{ "nb", /* 203 */},
-{ "sb", /* 204 */},
-{ "ib", /* 205 */},
-{ "mo", /* 206 */},
-{ "nm", /* 207 */},
-{ "/_", /* 208 */},
-{ "gr", /* 209 */},
-{ "rg", /* 210 */},
-{ "co", /* 211 */},
-{ "tm", /* 212 */},
-{ 0, /* 213 */},
-{ "sr", /* 214 */},
-{ "md", /* 215 */},
-{ "no", "\254", /* 216 */},
-{ "AN", /* 217 */},
-{ "OR", /* 218 */},
-{ "hA", /* 219 */},
-{ "lA", /* 220 */},
-{ "uA", /* 221 */},
-{ "rA", /* 222 */},
-{ "dA", /* 223 */},
-{ "lz", /* 224 */},
-{ "la", /* 225 */},
-{ 0, /* 226 */},
-{ 0, /* 227 */},
-{ 0, /* 228 */},
-{ 0, /* 229 */},
-{ "parenlefttp", /* 230 */},
-{ "parenleftex", /* 231 */},
-{ "parenleftbt", /* 232 */},
-{ "bracketlefttp", "lc", /* 233 */},
-{ "bracketleftex", /* 234 */},
-{ "bracketleftbt", "lf", /* 235 */},
-{ "bracelefttp", "lt", /* 236 */},
-{ "braceleftmid", "lk", /* 237 */},
-{ "braceleftbt", "lb", /* 238 */},
-{ "bracerightex", "braceleftex", "bv", /* 239 */},
-{ 0, /* 240 */},
-{ "ra", /* 241 */},
-{ "is", /* 242 */},
-{ 0, /* 243 */},
-{ 0, /* 244 */},
-{ 0, /* 245 */},
-{ "parenrighttp", /* 246 */},
-{ "parenrightex", /* 247 */},
-{ "parenrightbt", /* 248 */},
-{ "bracketrighttp", "rc", /* 249 */},
-{ "bracketrightex", /* 250 */},
-{ "bracketrightbt", "rf", /* 251 */},
-{ "bracerighttp", "rt" /* 252 */},
-{ "bracerightmid", "rk" /* 253 */},
-{ "bracerightbt", "rb" /* 254 */},
-{ 0, /* 255 */},
-}};
-
-
-static void
-load_standard_maps ()
-{
- standard_maps_loaded = 1;
- DviRegisterMap (&ISO8859_1_map);
- DviRegisterMap (&Adobe_Symbol_map);
-}
diff --git a/contrib/groff/src/xditview/DviChar.h b/contrib/groff/src/xditview/DviChar.h
deleted file mode 100644
index b075240d3954..000000000000
--- a/contrib/groff/src/xditview/DviChar.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * DviChar.h
- *
- * descriptions for mapping dvi names to
- * font indexes and back. Dvi fonts are all
- * 256 elements (actually only 256-32 are usable).
- *
- * The encoding names are taken from X -
- * case insensitive, a dash separating the
- * CharSetRegistry from the CharSetEncoding
- */
-
-# define DVI_MAX_SYNONYMS 10
-# define DVI_MAP_SIZE 256
-# define DVI_HASH_SIZE 256
-
-typedef struct _dviCharNameHash {
- struct _dviCharNameHash *next;
- char *name;
- int position;
-} DviCharNameHash;
-
-typedef struct _dviCharNameMap {
- char *encoding;
- int special;
- char *dvi_names[DVI_MAP_SIZE][DVI_MAX_SYNONYMS];
- DviCharNameHash *buckets[DVI_HASH_SIZE];
-} DviCharNameMap;
-
-extern DviCharNameMap *DviFindMap ( /* char *encoding */ );
-extern void DviRegisterMap ( /* DviCharNameMap *map */ );
-#ifdef NOTDEF
-extern char *DviCharName ( /* DviCharNameMap *map, int index, int synonym */ );
-#else
-#define DviCharName(map,index,synonym) ((map)->dvi_names[index][synonym])
-#endif
-extern int DviCharIndex ( /* DviCharNameMap *map, char *name */ );
diff --git a/contrib/groff/src/xditview/DviP.h b/contrib/groff/src/xditview/DviP.h
deleted file mode 100644
index 851fdfeed7f8..000000000000
--- a/contrib/groff/src/xditview/DviP.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * $XConsortium: DviP.h,v 1.5 89/07/22 19:44:08 keith Exp $
- */
-
-/*
- * DviP.h - Private definitions for Dvi widget
- */
-
-#ifndef _XtDviP_h
-#define _XtDviP_h
-
-#include "Dvi.h"
-#include "DviChar.h"
-#include "device.h"
-
-/***********************************************************************
- *
- * Dvi Widget Private Data
- *
- ***********************************************************************/
-
-/************************************
- *
- * Class structure
- *
- ***********************************/
-
-/* Type for save method. */
-
-typedef void (*DviSaveProc)();
-
-/*
- * New fields for the Dvi widget class record
- */
-
-
-typedef struct _DviClass {
- DviSaveProc save;
-} DviClassPart;
-
-/*
- * Full class record declaration
- */
-
-typedef struct _DviClassRec {
- CoreClassPart core_class;
- DviClassPart command_class;
-} DviClassRec;
-
-extern DviClassRec dviClassRec;
-
-/***************************************
- *
- * Instance (widget) structure
- *
- **************************************/
-
-/*
- * a list of fonts we've used for this widget
- */
-
-typedef struct _dviFontSizeList {
- struct _dviFontSizeList *next;
- int size;
- char *x_name;
- XFontStruct *font;
- int doesnt_exist;
-} DviFontSizeList;
-
-typedef struct _dviFontList {
- struct _dviFontList *next;
- char *dvi_name;
- char *x_name;
- int dvi_number;
- Boolean initialized;
- Boolean scalable;
- DviFontSizeList *sizes;
- DviCharNameMap *char_map;
- DeviceFont *device_font;
-} DviFontList;
-
-typedef struct _dviFontMap {
- struct _dviFontMap *next;
- char *dvi_name;
- char *x_name;
-} DviFontMap;
-
-#define DVI_TEXT_CACHE_SIZE 256
-#define DVI_CHAR_CACHE_SIZE 1024
-
-typedef struct _dviCharCache {
- XTextItem cache[DVI_TEXT_CACHE_SIZE];
- char adjustable[DVI_TEXT_CACHE_SIZE];
- char char_cache[DVI_CHAR_CACHE_SIZE];
- int index;
- int max;
- int char_index;
- int font_size;
- int font_number;
- XFontStruct *font;
- int start_x, start_y;
- int x, y;
-} DviCharCache;
-
-typedef struct _dviState {
- struct _dviState *next;
- int font_size;
- int font_number;
- int x;
- int y;
-} DviState;
-
-typedef struct _dviFileMap {
- struct _dviFileMap *next;
- long position;
- int page_number;
-} DviFileMap;
-
-/*
- * New fields for the Dvi widget record
- */
-
-typedef struct {
- /*
- * resource specifiable items
- */
- char *font_map_string;
- unsigned long foreground;
- unsigned long background;
- int requested_page;
- int last_page;
- XFontStruct *default_font;
- FILE *file;
- Boolean noPolyText;
- Boolean seek; /* file is "seekable" */
- int default_resolution;
- /*
- * private state
- */
- FILE *tmpFile; /* used when reading stdin */
- char readingTmp; /* reading now from tmp */
- char ungot; /* have ungetc'd a char */
- GC normal_GC;
- GC fill_GC;
- DviFileMap *file_map;
- DviFontList *fonts;
- DviFontMap *font_map;
- int current_page;
- int font_size;
- int font_number;
- DeviceFont *device_font;
- int device_font_number;
- Device *device;
- int native;
- int device_resolution;
- int display_resolution;
- int paperlength;
- int paperwidth;
- double scale_factor; /* display res / device res */
- int sizescale;
- int line_thickness;
- int line_width;
-
-#define DVI_FILL_MAX 1000
-
- int fill;
-#define DVI_FILL_WHITE 0
-#define DVI_FILL_GRAY 1
-#define DVI_FILL_BLACK 2
- int fill_type;
- Pixmap gray[8];
- int backing_store;
- XFontStruct *font;
- int display_enable;
- struct ExposedExtents {
- int x1, y1, x2, y2;
- } extents;
- DviState *state;
- DviCharCache cache;
- int text_x_width;
- int text_device_width;
- int word_flag;
-} DviPart;
-
-#define DviGetIn(dw,cp)\
- (dw->dvi.tmpFile ? (\
- DviGetAndPut (dw, cp) \
- ) :\
- (*cp = getc (dw->dvi.file))\
-)
-
-#define DviGetC(dw, cp)\
- (dw->dvi.readingTmp ? (\
- ((*cp = getc (dw->dvi.tmpFile)) == EOF) ? (\
- fseek (dw->dvi.tmpFile, 0l, 2),\
- (dw->dvi.readingTmp = 0),\
- DviGetIn (dw,cp)\
- ) : (\
- *cp\
- )\
- ) : (\
- DviGetIn(dw,cp)\
- )\
-)
-
-#define DviUngetC(dw, c)\
- (dw->dvi.readingTmp ? (\
- ungetc (c, dw->dvi.tmpFile)\
- ) : ( \
- (dw->dvi.ungot = 1),\
- ungetc (c, dw->dvi.file)))
-
-/*
- * Full widget declaration
- */
-
-typedef struct _DviRec {
- CorePart core;
- DviPart dvi;
-} DviRec;
-
-#define InheritSaveToFile ((DviSaveProc)_XtInherit)
-
-extern XFontStruct *QueryFont ();
-
-extern DviCharNameMap *QueryFontMap ();
-
-extern DeviceFont *QueryDeviceFont ();
-
-extern char *GetWord(), *GetLine();
-#endif /* _XtDviP_h */
-
-
diff --git a/contrib/groff/src/xditview/FontMap b/contrib/groff/src/xditview/FontMap
deleted file mode 100644
index 90911f048ded..000000000000
--- a/contrib/groff/src/xditview/FontMap
+++ /dev/null
@@ -1,17 +0,0 @@
-TR -adobe-times-medium-r-normal--*-*-*-*-p-*-iso8859-1
-TI -adobe-times-medium-i-normal--*-*-*-*-p-*-iso8859-1
-TB -adobe-times-bold-r-normal--*-*-*-*-p-*-iso8859-1
-TBI -adobe-times-bold-i-normal--*-*-*-*-p-*-iso8859-1
-CR -adobe-courier-medium-r-normal--*-*-*-*-m-*-iso8859-1
-CI -adobe-courier-medium-o-normal--*-*-*-*-m-*-iso8859-1
-CB -adobe-courier-bold-r-normal--*-*-*-*-m-*-iso8859-1
-CBI -adobe-courier-bold-o-normal--*-*-*-*-m-*-iso8859-1
-HR -adobe-helvetica-medium-r-normal--*-*-*-*-p-*-iso8859-1
-HI -adobe-helvetica-medium-o-normal--*-*-*-*-p-*-iso8859-1
-HB -adobe-helvetica-bold-r-normal--*-*-*-*-p-*-iso8859-1
-HBI -adobe-helvetica-bold-o-normal--*-*-*-*-p-*-iso8859-1
-NR -adobe-new century schoolbook-medium-r-normal--*-*-*-*-p-*-iso8859-1
-NI -adobe-new century schoolbook-medium-i-normal--*-*-*-*-p-*-iso8859-1
-NB -adobe-new century schoolbook-bold-r-normal--*-*-*-*-p-*-iso8859-1
-NBI -adobe-new century schoolbook-bold-i-normal--*-*-*-*-p-*-iso8859-1
-S -adobe-symbol-medium-r-normal--*-*-*-*-p-*-adobe-fontspecific
diff --git a/contrib/groff/src/xditview/GXditview-ad.h b/contrib/groff/src/xditview/GXditview-ad.h
deleted file mode 100644
index d9be3da256bc..000000000000
--- a/contrib/groff/src/xditview/GXditview-ad.h
+++ /dev/null
@@ -1,52 +0,0 @@
-"GXditview.height: 840",
-"GXditview.paned.allowResize: true",
-"GXditview.paned.viewport.allowVert: true",
-"GXditview.paned.viewport.allowHoriz: true",
-"GXditview.paned.viewport.skipAdjust: false",
-"GXditview.paned.viewport.width: 600",
-"GXditview.paned.viewport.height: 800",
-"GXditview.paned.viewport.showGrip: false",
-"GXditview.paned.label.skipAdjust: true",
-"GXditview.paned.viewport.dvi.translations: #augment \
- <Btn1Down>: XawPositionSimpleMenu(menu) MenuPopup(menu)\\n\
- <Key>Next: NextPage()\\n\
- <Key>n: NextPage()\\n\
- <Key>space: NextPage()\\n\
- <Key>Return: NextPage()\\n\
- <Key>Prior: PreviousPage()\\n\
- <Key>p: PreviousPage()\\n\
- <Key>BackSpace: PreviousPage()\\n\
- <Key>Delete: PreviousPage()\\n\
- <Key>Select: SelectPage()\\n\
- <Key>Find: OpenFile()\\n\
- <Key>r: Rerasterize()\\n\
- <Key>q: Quit()",
-"GXditview.paned.label.translations: #augment \
- <Btn1Down>: XawPositionSimpleMenu(menu) MenuPopup(menu)\\n\
- <Key>Next: NextPage()\\n\
- <Key>n: NextPage()\\n\
- <Key>space: NextPage()\\n\
- <Key>Return: NextPage()\\n\
- <Key>Prior: PreviousPage()\\n\
- <Key>p: PreviousPage()\\n\
- <Key>BackSpace: PreviousPage()\\n\
- <Key>Delete: PreviousPage()\\n\
- <Key>Select: SelectPage()\\n\
- <Key>Find: OpenFile()\\n\
- <Key>r: Rerasterize()\\n\
- <Key>q: Quit()",
-"GXditview.menu.nextPage.label: Next Page",
-"GXditview.menu.previousPage.label: Previous Page",
-"GXditview.menu.selectPage.label: Select Page",
-"GXditview.menu.print.label: Print",
-"GXditview.menu.openFile.label: Open",
-"GXditview.menu.quit.label: Quit",
-"GXditview.promptShell.allowShellResize: true",
-"GXditview.promptShell.promptDialog.value.translations: #override \
- <Key>Return: Accept()",
-"GXditview.promptShell.promptDialog.accept.label: Accept",
-"GXditview.promptShell.promptDialog.accept.translations: #override \
- <BtnUp>: Accept() unset()",
-"GXditview.promptShell.promptDialog.cancel.label: Cancel",
-"GXditview.promptShell.promptDialog.cancel.translations: #override \
- <BtnUp>: Cancel() unset()",
diff --git a/contrib/groff/src/xditview/GXditview.ad b/contrib/groff/src/xditview/GXditview.ad
deleted file mode 100644
index e99ff5e16f38..000000000000
--- a/contrib/groff/src/xditview/GXditview.ad
+++ /dev/null
@@ -1,57 +0,0 @@
-GXditview.height: 840
-
-GXditview.paned.allowResize: true
-GXditview.paned.viewport.allowVert: true
-GXditview.paned.viewport.allowHoriz: true
-GXditview.paned.viewport.skipAdjust: false
-GXditview.paned.viewport.width: 600
-GXditview.paned.viewport.height: 800
-GXditview.paned.viewport.showGrip: false
-GXditview.paned.label.skipAdjust: true
-
-GXditview.paned.viewport.dvi.translations: #augment \
- <Btn1Down>: XawPositionSimpleMenu(menu) MenuPopup(menu)\n\
- <Key>Next: NextPage()\n\
- <Key>n: NextPage()\n\
- <Key>space: NextPage()\n\
- <Key>Return: NextPage()\n\
- <Key>Prior: PreviousPage()\n\
- <Key>p: PreviousPage()\n\
- <Key>BackSpace: PreviousPage()\n\
- <Key>Delete: PreviousPage()\n\
- <Key>Select: SelectPage()\n\
- <Key>Find: OpenFile()\n\
- <Key>r: Rerasterize()\n\
- <Key>q: Quit()
-GXditview.paned.label.translations: #augment \
- <Btn1Down>: XawPositionSimpleMenu(menu) MenuPopup(menu)\n\
- <Key>Next: NextPage()\n\
- <Key>n: NextPage()\n\
- <Key>space: NextPage()\n\
- <Key>Return: NextPage()\n\
- <Key>Prior: PreviousPage()\n\
- <Key>p: PreviousPage()\n\
- <Key>BackSpace: PreviousPage()\n\
- <Key>Delete: PreviousPage()\n\
- <Key>Select: SelectPage()\n\
- <Key>Find: OpenFile()\n\
- <Key>r: Rerasterize()\n\
- <Key>q: Quit()
-GXditview.menu.nextPage.label: Next Page
-GXditview.menu.previousPage.label: Previous Page
-GXditview.menu.selectPage.label: Select Page
-GXditview.menu.print.label: Print
-GXditview.menu.openFile.label: Open
-GXditview.menu.quit.label: Quit
-
-GXditview.promptShell.allowShellResize: true
-GXditview.promptShell.promptDialog.value.translations: #override \
- <Key>Return: Accept()
-
-GXditview.promptShell.promptDialog.accept.label: Accept
-GXditview.promptShell.promptDialog.accept.translations: #override \
- <BtnUp>: Accept() unset()
-
-GXditview.promptShell.promptDialog.cancel.label: Cancel
-GXditview.promptShell.promptDialog.cancel.translations: #override \
- <BtnUp>: Cancel() unset()
diff --git a/contrib/groff/src/xditview/INSTALL b/contrib/groff/src/xditview/INSTALL
deleted file mode 100644
index 144118fd7d42..000000000000
--- a/contrib/groff/src/xditview/INSTALL
+++ /dev/null
@@ -1,20 +0,0 @@
-This version of gxditview uses imake.
-
-Here are the steps needed to install gxditview:
-
-- edit the Imakefile if necessary
-
-- xmkmf
-
-- make depend
-
-- make
-
-- make install
-
-- make install.man (installs the man page)
-
-The gxditview binary will be installed in the usual place for X
-binaries (eg /usr/bin/X11). Previous versions of gxditview were
-installed along with the other groff binaries (eg in /usr/local/bin);
-you will need to remove these by hand.
diff --git a/contrib/groff/src/xditview/Imakefile.in b/contrib/groff/src/xditview/Imakefile.in
deleted file mode 100644
index 3ad244d6e68f..000000000000
--- a/contrib/groff/src/xditview/Imakefile.in
+++ /dev/null
@@ -1,104 +0,0 @@
-srcdir=@srcdir@
-top_srcdir=@top_srcdir@
-VPATH=@srcdir@
-top_builddir=@top_builddir@
-
-version=`cat $(top_srcdir)/VERSION`
-# No additional number if revision is zero
-revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
-
-GROFF_PREFIX = @prefix@
-GROFF_DATADIR = $(GROFF_PREFIX)/share
-GROFF_DATAPROGRAMDIR = $(GROFF_DATADIR)/groff
-GROFF_DATASUBDIR = $(GROFF_DATAPROGRAMDIR)/$(version)$(revision)
-GROFF_FONTDIR = $(GROFF_DATASUBDIR)/font
-GROFF_FONTPATH = $(GROFF_FONTDIR):/usr/local/lib/font:/usr/lib/font
-DPIS = 75 100
-
-PROGRAMS = \
- gxditview \
- xtotroff
-DEPLIBS = XawClientDepLibs
-LOCAL_LIBRARIES = XawClientLibs
-SRCS1 = \
- $(srcdir)/xditview.c \
- $(srcdir)/Dvi.c \
- $(srcdir)/draw.c \
- $(srcdir)/font.c \
- $(srcdir)/lex.c \
- $(srcdir)/page.c \
- $(srcdir)/parse.c \
- $(srcdir)/XFontName.c \
- $(srcdir)/DviChar.c \
- $(srcdir)/device.c
-OBJS1 = \
- xditview.o \
- Dvi.o \
- draw.o \
- font.o \
- lex.o \
- page.o \
- parse.o \
- XFontName.o \
- DviChar.o \
- device.o
-SRCS2 = \
- $(srcdir)/xtotroff.c \
- $(srcdir)/XFontName.c \
- $(srcdir)/DviChar.c
-OBJS2 = \
- xtotroff.o \
- XFontName.o \
- DviChar.o
-INCLUDES = \
- -I$(TOOLKITSRC) \
- -I$(TOP)
-MATHLIB = -lm
-DEFINES = \
- $(SIGNAL_DEFINES) \
- -DFONTPATH=\"$(GROFF_FONTPATH)\" # -DX_NOT_STDC_ENV
-
-DEVDIR = $(top_builddir)/font
-MKINSTALLDIRS = $(top_srcdir)/mkinstalldirs
-
-ComplexProgramTarget_1(gxditview,$(LOCAL_LIBRARIES),$(MATHLIB))
-NormalProgramTarget(xtotroff,$(OBJS2),$(DEPXLIB),$(XLIB), /**/)
-
-InstallAppDefaults(GXditview)
-
-fonts: xtotroff $(srcdir)/DESC $(srcdir)/FontMap
- @dir=`pwd`; \
- fonts=`sed -e 's/[ ].*//' $(srcdir)/FontMap`; \
- for dpi in $(DPIS); do \
- echo Making devX$$dpi; \
- test -d $(DEVDIR)/devX$$dpi || \
- $(MKINSTALLDIRS) $(DEVDIR)/devX$$dpi; \
- rm -f $(DEVDIR)/devX$$dpi/DESC; \
- sed -e "s/res 75/res $$dpi/" $(srcdir)/DESC \
- >$(DEVDIR)/devX$$dpi/DESC; \
- (cd $(DEVDIR)/devX$$dpi; \
- rm -f Makefile.sub; \
- echo DEV=X$$dpi >Makefile.sub; \
- echo DEVFILES=DESC $$fonts >>Makefile.sub; \
- $$dir/xtotroff -g -r $$dpi -s 10 $(srcdir)/FontMap); \
- echo Making devX$$dpi-12; \
- test -d $(DEVDIR)/devX$$dpi-12 || \
- $(MKINSTALLDIRS) $(DEVDIR)/devX$$dpi-12; \
- rm -f $(DEVDIR)/devX$$dpi-12/DESC; \
- sed -e "s/res 75/res $$dpi/" \
- -e 's/unitwidth 10/unitwidth 12/' $(srcdir)/DESC \
- >$(DEVDIR)/devX$$dpi-12/DESC; \
- (cd $(DEVDIR)/devX$$dpi-12; \
- rm -f Makefile.sub; \
- echo DEV=X$$dpi-12 >Makefile.sub; \
- echo DEVFILES=DESC $$fonts >>Makefile.sub; \
- $$dir/xtotroff -g -r $$dpi -s 12 $(srcdir)/FontMap); \
- done
-
-GXditview-ad.h: $(srcdir)/GXditview.ad
- /bin/sh $(srcdir)/ad2c $(srcdir)/GXditview.ad >GXditview-ad.h
-
-extraclean: clean
- -rm -f junk tmp grot old Makefile Imakefile
-
-FORCE:
diff --git a/contrib/groff/src/xditview/Menu.h b/contrib/groff/src/xditview/Menu.h
deleted file mode 100644
index c306b2740a61..000000000000
--- a/contrib/groff/src/xditview/Menu.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * $XConsortium: Menu.h,v 1.2 89/07/21 14:22:10 jim Exp $
- */
-
-#ifndef _XtMenu_h
-#define _XtMenu_h
-
-/***********************************************************************
- *
- * Menu Widget
- *
- ***********************************************************************/
-
-/* Parameters:
-
- Name Class RepType Default Value
- ---- ----- ------- -------------
- background Background pixel White
- border BorderColor pixel Black
- borderWidth BorderWidth int 1
- height Height int 120
- mappedWhenManaged MappedWhenManaged Boolean True
- reverseVideo ReverseVideo Boolean False
- width Width int 120
- x Position int 0
- y Position int 0
-
-*/
-
-#define XtNmenuEntries "menuEntries"
-#define XtNhorizontalPadding "horizontalPadding"
-#define XtNverticalPadding "verticalPadding"
-#define XtNselection "Selection"
-
-#define XtCMenuEntries "MenuEntries"
-#define XtCPadding "Padding"
-#define XtCSelection "Selection"
-
-typedef struct _MenuRec *MenuWidget; /* completely defined in MenuPrivate.h */
-typedef struct _MenuClassRec *MenuWidgetClass; /* completely defined in MenuPrivate.h */
-
-extern WidgetClass menuWidgetClass;
-
-extern Widget XawMenuCreate ();
-#endif /* _XtMenu_h */
-/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/contrib/groff/src/xditview/README b/contrib/groff/src/xditview/README
deleted file mode 100644
index b18f64a7be64..000000000000
--- a/contrib/groff/src/xditview/README
+++ /dev/null
@@ -1,14 +0,0 @@
-This is gxditview, a X11 previewer for groff based on MIT's xditview.
-This version can be used with the output of gtroff -Tps as well as
-with -TX75 and -TX100. You will need X11R5 or newer to install it (it
-might work on X11R4, but I haven't tested it.)
-
-See the file INSTALL in this directory for installation instructions.
-
-xditview is copyrighted by MIT under the usual X terms (see
-gxditview.man); my changes to it are in the public domain.
-
-Please report bugs to bug-groff@gnu.org.
-
-James Clark
-jjc@jclark.com
diff --git a/contrib/groff/src/xditview/TODO b/contrib/groff/src/xditview/TODO
deleted file mode 100644
index 161a7cf115ce..000000000000
--- a/contrib/groff/src/xditview/TODO
+++ /dev/null
@@ -1,17 +0,0 @@
-Replace Imakefile with a configure script.
-
-Better error handling.
-
-Resource and command-line option to specify font path.
-
-Resource to specify name of environment variable from which to get the
-font path.
-
-Have character substitutions (currently done in draw.c:FakeCharacter)
-specified in a resource (similar format to FontMap).
-
-The initial width of the dialog box should expand to accommodate the
-default value.
-
-Option in Print dialog to specify that only the current page should be
-printed.
diff --git a/contrib/groff/src/xditview/XFontName.c b/contrib/groff/src/xditview/XFontName.c
deleted file mode 100644
index 5ca9bb81e996..000000000000
--- a/contrib/groff/src/xditview/XFontName.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * XFontName.c
- *
- * build/parse X Font name strings
- */
-
-#include <X11/Xlib.h>
-#include <X11/Xos.h>
-#include "XFontName.h"
-#include <ctype.h>
-
-static char *
-extractStringField (name, buffer, size, attrp, bit)
- char *name;
- char *buffer;
- int size;
- unsigned int *attrp;
- unsigned int bit;
-{
- char *buf = buffer;
-
- if (!*name)
- return 0;
- while (*name && *name != '-' && size > 0) {
- *buf++ = *name++;
- --size;
- }
- if (size <= 0)
- return 0;
- *buf = '\0';
- if (buffer[0] != '*' || buffer[1] != '\0')
- *attrp |= bit;
- if (*name == '-')
- return name+1;
- return name;
-}
-
-static char *
-extractUnsignedField (name, result, attrp, bit)
- char *name;
- unsigned int *result;
- unsigned int *attrp;
- unsigned int bit;
-{
- char buf[256];
- char *c;
- unsigned int i;
-
- name = extractStringField (name, buf, sizeof (buf), attrp, bit);
- if (!name)
- return 0;
- if (!(*attrp & bit))
- return name;
- i = 0;
- for (c = buf; *c; c++) {
- if (!isdigit (*c))
- return 0;
- i = i * 10 + (*c - '0');
- }
- *result = i;
- return name;
-}
-
-Bool
-XParseFontName (fontNameString, fontName, fontNameAttributes)
- XFontNameString fontNameString;
- XFontName *fontName;
- unsigned int *fontNameAttributes;
-{
- char *name = fontNameString;
- XFontName temp;
- unsigned int attributes = 0;
-
-#define GetString(field,bit)\
- if (!(name = extractStringField \
- (name, temp.field, sizeof (temp.field),\
- &attributes, bit))) \
- return False;
-
-#define GetUnsigned(field,bit)\
- if (!(name = extractUnsignedField \
- (name, &temp.field, \
- &attributes, bit))) \
- return False;
-
- GetString (Registry, FontNameRegistry)
- GetString (Foundry, FontNameFoundry)
- GetString (FamilyName, FontNameFamilyName)
- GetString (WeightName, FontNameWeightName)
- GetString (Slant, FontNameSlant)
- GetString (SetwidthName, FontNameSetwidthName)
- GetString (AddStyleName, FontNameAddStyleName)
- GetUnsigned (PixelSize, FontNamePixelSize)
- GetUnsigned (PointSize, FontNamePointSize)
- GetUnsigned (ResolutionX, FontNameResolutionX)
- GetUnsigned (ResolutionY, FontNameResolutionY)
- GetString (Spacing, FontNameSpacing)
- GetUnsigned (AverageWidth, FontNameAverageWidth)
- GetString (CharSetRegistry, FontNameCharSetRegistry)
- if (!*name) {
- temp.CharSetEncoding[0] = '\0';
- attributes |= FontNameCharSetEncoding;
- } else {
- GetString (CharSetEncoding, FontNameCharSetEncoding)
- }
- *fontName = temp;
- *fontNameAttributes = attributes;
- return True;
-}
-
-static char *
-utoa (u, s, size)
- unsigned int u;
- char *s;
- int size;
-{
- char *t;
-
- t = s + size;
- *--t = '\0';
- do
- *--t = (u % 10) + '0';
- while (u /= 10);
- return t;
-}
-
-Bool
-XFormatFontName (fontName, fontNameAttributes, fontNameString)
- XFontName *fontName;
- unsigned int fontNameAttributes;
- XFontNameString fontNameString;
-{
- XFontNameString tmp;
- char *name = tmp, *f;
- int left = sizeof (tmp) - 1;
- char number[32];
-
-#define PutString(field, bit)\
- f = (fontNameAttributes & bit) ? \
- fontName->field \
- : "*"; \
- if ((left -= strlen (f)) < 0) \
- return False; \
- while (*f) \
- if ((*name++ = *f++) == '-') \
- return False;
-#define PutHyphen()\
- if (--left < 0) \
- return False; \
- *name++ = '-';
-
-#define PutUnsigned(field, bit) \
- f = (fontNameAttributes & bit) ? \
- utoa (fontName->field, number, sizeof (number)) \
- : "*"; \
- if ((left -= strlen (f)) < 0) \
- return False; \
- while (*f) \
- *name++ = *f++;
-
- PutString (Registry, FontNameRegistry)
- PutHyphen ();
- PutString (Foundry, FontNameFoundry)
- PutHyphen ();
- PutString (FamilyName, FontNameFamilyName)
- PutHyphen ();
- PutString (WeightName, FontNameWeightName)
- PutHyphen ();
- PutString (Slant, FontNameSlant)
- PutHyphen ();
- PutString (SetwidthName, FontNameSetwidthName)
- PutHyphen ();
- PutString (AddStyleName, FontNameAddStyleName)
- PutHyphen ();
- PutUnsigned (PixelSize, FontNamePixelSize)
- PutHyphen ();
- PutUnsigned (PointSize, FontNamePointSize)
- PutHyphen ();
- PutUnsigned (ResolutionX, FontNameResolutionX)
- PutHyphen ();
- PutUnsigned (ResolutionY, FontNameResolutionY)
- PutHyphen ();
- PutString (Spacing, FontNameSpacing)
- PutHyphen ();
- PutUnsigned (AverageWidth, FontNameAverageWidth)
- PutHyphen ();
- PutString (CharSetRegistry, FontNameCharSetRegistry)
- PutHyphen ();
- PutString (CharSetEncoding, FontNameCharSetEncoding)
- *name = '\0';
- strcpy (fontNameString, tmp);
- return True;
-}
-
-Bool
-XCompareFontName (name1, name2, fontNameAttributes)
- XFontName *name1, *name2;
- unsigned int fontNameAttributes;
-{
-#define CompareString(field,bit) \
- if (fontNameAttributes & bit) \
- if (strcmp (name1->field, name2->field)) \
- return False;
-
-#define CompareUnsigned(field,bit) \
- if (fontNameAttributes & bit) \
- if (name1->field != name2->field) \
- return False;
-
- CompareString (Registry, FontNameRegistry)
- CompareString (Foundry, FontNameFoundry)
- CompareString (FamilyName, FontNameFamilyName)
- CompareString (WeightName, FontNameWeightName)
- CompareString (Slant, FontNameSlant)
- CompareString (SetwidthName, FontNameSetwidthName)
- CompareString (AddStyleName, FontNameAddStyleName)
- CompareUnsigned (PixelSize, FontNamePixelSize)
- CompareUnsigned (PointSize, FontNamePointSize)
- CompareUnsigned (ResolutionX, FontNameResolutionX)
- CompareUnsigned (ResolutionY, FontNameResolutionY)
- CompareString (Spacing, FontNameSpacing)
- CompareUnsigned (AverageWidth, FontNameAverageWidth)
- CompareString (CharSetRegistry, FontNameCharSetRegistry)
- CompareString (CharSetEncoding, FontNameCharSetEncoding)
- return True;
-}
-
-XCopyFontName (name1, name2, fontNameAttributes)
- XFontName *name1, *name2;
- unsigned int fontNameAttributes;
-{
-#define CopyString(field,bit) \
- if (fontNameAttributes & bit) \
- strcpy (name2->field, name1->field);
-
-#define CopyUnsigned(field,bit) \
- if (fontNameAttributes & bit) \
- name2->field = name1->field;
-
- CopyString (Registry, FontNameRegistry)
- CopyString (Foundry, FontNameFoundry)
- CopyString (FamilyName, FontNameFamilyName)
- CopyString (WeightName, FontNameWeightName)
- CopyString (Slant, FontNameSlant)
- CopyString (SetwidthName, FontNameSetwidthName)
- CopyString (AddStyleName, FontNameAddStyleName)
- CopyUnsigned (PixelSize, FontNamePixelSize)
- CopyUnsigned (PointSize, FontNamePointSize)
- CopyUnsigned (ResolutionX, FontNameResolutionX)
- CopyUnsigned (ResolutionY, FontNameResolutionY)
- CopyString (Spacing, FontNameSpacing)
- CopyUnsigned (AverageWidth, FontNameAverageWidth)
- CopyString (CharSetRegistry, FontNameCharSetRegistry)
- CopyString (CharSetEncoding, FontNameCharSetEncoding)
- return True;
-}
diff --git a/contrib/groff/src/xditview/XFontName.h b/contrib/groff/src/xditview/XFontName.h
deleted file mode 100644
index efe9eb16d1d4..000000000000
--- a/contrib/groff/src/xditview/XFontName.h
+++ /dev/null
@@ -1,45 +0,0 @@
-typedef struct _xFontName {
- char Registry[256];
- char Foundry[256];
- char FamilyName[256];
- char WeightName[256];
- char Slant[3];
- char SetwidthName[256];
- char AddStyleName[256];
- unsigned int PixelSize;
- unsigned int PointSize;
- unsigned int ResolutionX;
- unsigned int ResolutionY;
- char Spacing[2];
- unsigned int AverageWidth;
- char CharSetRegistry[256];
- char CharSetEncoding[256];
-} XFontName;
-
-#define FontNameRegistry (1<<0)
-#define FontNameFoundry (1<<1)
-#define FontNameFamilyName (1<<2)
-#define FontNameWeightName (1<<3)
-#define FontNameSlant (1<<4)
-#define FontNameSetwidthName (1<<5)
-#define FontNameAddStyleName (1<<6)
-#define FontNamePixelSize (1<<7)
-#define FontNamePointSize (1<<8)
-#define FontNameResolutionX (1<<9)
-#define FontNameResolutionY (1<<10)
-#define FontNameSpacing (1<<11)
-#define FontNameAverageWidth (1<<12)
-#define FontNameCharSetRegistry (1<<13)
-#define FontNameCharSetEncoding (1<<14)
-
-#define SlantRoman "R"
-#define SlantItalic "I"
-#define SlantOblique "O"
-#define SlantReverseItalic "RI"
-#define SlantReverseOblique "RO"
-
-#define SpacingMonoSpaced "M"
-#define SpacingProportional "P"
-#define SpacingCharacterCell "C"
-
-typedef char XFontNameString[256];
diff --git a/contrib/groff/src/xditview/ad2c b/contrib/groff/src/xditview/ad2c
deleted file mode 100644
index 651ab8c40c5f..000000000000
--- a/contrib/groff/src/xditview/ad2c
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-#
-# ad2c : Convert app-defaults file to C strings decls.
-#
-# George Ferguson, ferguson@cs.rcohester.edu, 12 Nov 1990.
-# 19 Mar 1991: gf
-# Made it self-contained.
-# 6 Jan 1992: mycroft@gnu.ai.mit.edu (Charles Hannum)
-# Removed use of "-n" and ":read" label since Gnu and
-# IBM sed print pattern space on "n" command. Still works
-# with Sun sed, of course.
-# 7 Jan 1992: matthew@sunpix.East.Sun.COM (Matthew Stier)
-# Escape quotes after escaping backslashes.
-# 8 Jul 1992: Version 1.6
-# Manpage fixes.
-# 19 Apr 1993: Version 1.7
-# Remove comments that were inside the sed command since
-# some versions of sed don't like them. The comments are
-# now given here in the header.
-#
-# Comments on the script by line:
-# /^!/d Remove comments
-# /^$/d Remove blanks
-# s/\\/\\\\/g Escape backslashes...
-# s/\\$//g ...except the line continuation ones
-# s/"/\\"/g Escape quotes
-# s/^/"/ Add leading quote
-# : test Establish label for later branch
-# /\\$/b slash Branch to label "slash" if line ends in backslash
-# s/$/",/ Otherwise add closing quote and comma...
-# p ...output the line...
-# d ...and clear the pattern space so it's not printed again
-# : slash Branch comes here if line ends in backslash
-# n Read next line, append to pattern space
-# [...] The "d" and "s" commands that follow just delete
-# comments and blank lines and escape control sequences
-# b test Branch up to see if the line ends in backslash or not
-#
-
-sed '
-/^!/d
-/^$/d
-s/\\/\\\\/g
-s/\\$//g
-s/"/\\"/g
-s/^/"/
-: test
-/\\$/b slash
-s/$/",/
-p
-d
-: slash
-n
-/^!/d
-/^$/d
-s/"/\\"/g
-s/\\\\/\\/g
-s/\\n/\\\\n/g
-s/\\t/\\\\t/g
-s/\\f/\\\\f/g
-s/\\b/\\\\b/g
-b test' "$@"
diff --git a/contrib/groff/src/xditview/device.c b/contrib/groff/src/xditview/device.c
deleted file mode 100644
index 264f681ea679..000000000000
--- a/contrib/groff/src/xditview/device.c
+++ /dev/null
@@ -1,600 +0,0 @@
-/* device.c */
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include <X11/Xos.h>
-#include <X11/Intrinsic.h>
-
-#include "device.h"
-
-#ifndef FONTPATH
-#define FONTPATH "/usr/local/share/groff/font:/usr/local/lib/font:/usr/lib/font"
-#endif
-
-#ifndef isascii
-#define isascii(c) (1)
-#endif
-
-extern void exit();
-#ifndef strtok
-extern char *strtok();
-#endif
-#ifndef strchr
-extern char *strchr();
-#endif
-#ifndef getenv
-extern char *getenv();
-#endif
-
-/* Name of environment variable containing path to be used for
-searching for device and font description files. */
-#define FONTPATH_ENV_VAR "GROFF_FONT_PATH"
-
-#define WS " \t\r\n"
-
-#ifndef INT_MIN
-/* Minimum and maximum values a `signed int' can hold. */
-#define INT_MIN (-INT_MAX-1)
-#define INT_MAX 2147483647
-#endif
-
-#define CHAR_TABLE_SIZE 307
-
-struct _DeviceFont {
- char *name;
- int special;
- DeviceFont *next;
- Device *dev;
- struct charinfo *char_table[CHAR_TABLE_SIZE];
- struct charinfo *code_table[256];
-};
-
-struct charinfo {
- int width;
- int code;
- struct charinfo *next;
- struct charinfo *code_next;
- char name[1];
-};
-
-static char *current_filename = 0;
-static int current_lineno = -1;
-
-static void error();
-static FILE *open_device_file();
-static DeviceFont *load_font();
-static Device *new_device();
-static DeviceFont *new_font();
-static void delete_font();
-static unsigned hash_name();
-static struct charinfo *add_char();
-static int read_charset_section();
-static char *canonicalize_name();
-
-static
-Device *new_device(name)
- char *name;
-{
- Device *dev;
-
- dev = XtNew(Device);
- dev->sizescale = 1;
- dev->res = 0;
- dev->unitwidth = 0;
- dev->fonts = 0;
- dev->X11 = 0;
- dev->paperlength = 0;
- dev->paperwidth = 0;
- dev->name = XtNewString(name);
- return dev;
-}
-
-void device_destroy(dev)
- Device *dev;
-{
- DeviceFont *f;
-
- if (!dev)
- return;
- f = dev->fonts;
- while (f) {
- DeviceFont *tem = f;
- f = f->next;
- delete_font(tem);
- }
-
- XtFree(dev->name);
- XtFree((char *)dev);
-}
-
-Device *device_load(name)
- char *name;
-{
- Device *dev;
- FILE *fp;
- int err = 0;
- char buf[256];
-
- fp = open_device_file(name, "DESC", &current_filename);
- if (!fp)
- return 0;
- dev = new_device(name);
- current_lineno = 0;
- while (fgets(buf, sizeof(buf), fp)) {
- char *p;
- current_lineno++;
- p = strtok(buf, WS);
- if (p) {
- int *np = 0;
- char *q;
-
- if (strcmp(p, "charset") == 0)
- break;
- if (strcmp(p, "X11") == 0)
- dev->X11 = 1;
- else if (strcmp(p, "sizescale") == 0)
- np = &dev->sizescale;
- else if (strcmp(p, "res") == 0)
- np = &dev->res;
- else if (strcmp(p, "unitwidth") == 0)
- np = &dev->unitwidth;
- else if (strcmp(p, "paperwidth") == 0)
- np = &dev->paperwidth;
- else if (strcmp(p, "paperlength") == 0)
- np = &dev->paperlength;
-
- if (np) {
- q = strtok((char *)0, WS);
- if (!q || sscanf(q, "%d", np) != 1 || *np <= 0) {
- error("bad argument");
- err = 1;
- break;
- }
- }
- }
- }
- fclose(fp);
- current_lineno = -1;
- if (!err) {
- if (dev->res == 0) {
- error("missing res line");
- err = 1;
- }
- else if (dev->unitwidth == 0) {
- error("missing unitwidth line");
- err = 1;
- }
- }
- if (dev->paperlength == 0)
- dev->paperlength = dev->res*11;
- if (dev->paperwidth == 0)
- dev->paperwidth = dev->res*8 + dev->res/2;
- if (err) {
- device_destroy(dev);
- dev = 0;
- }
- XtFree(current_filename);
- current_filename = 0;
- return dev;
-}
-
-
-DeviceFont *device_find_font(dev, name)
- Device *dev;
- char *name;
-{
- DeviceFont *f;
-
- if (!dev)
- return 0;
- for (f = dev->fonts; f; f = f->next)
- if (strcmp(f->name, name) == 0)
- return f;
- return load_font(dev, name);
-}
-
-static
-DeviceFont *load_font(dev, name)
- Device *dev;
- char *name;
-{
- FILE *fp;
- char buf[256];
- DeviceFont *f;
- int special = 0;
-
- fp = open_device_file(dev->name, name, &current_filename);
- if (!fp)
- return 0;
- current_lineno = 0;
- for (;;) {
- char *p;
-
- if (!fgets(buf, sizeof(buf), fp)) {
- error("no charset line");
- return 0;
- }
- current_lineno++;
- p = strtok(buf, WS);
- /* charset must be on a line by itself */
- if (p && strcmp(p, "charset") == 0 && strtok((char *)0, WS) == 0)
- break;
- if (p && strcmp(p, "special") == 0)
- special = 1;
- }
- f = new_font(name, dev);
- f->special = special;
- if (!read_charset_section(f, fp)) {
- delete_font(f);
- f = 0;
- }
- else {
- f->next = dev->fonts;
- dev->fonts = f;
- }
- fclose(fp);
- XtFree(current_filename);
- current_filename = 0;
- return f;
-}
-
-static
-DeviceFont *new_font(name, dev)
- char *name;
- Device *dev;
-{
- int i;
- DeviceFont *f;
-
- f = XtNew(DeviceFont);
- f->name = XtNewString(name);
- f->dev = dev;
- f->special = 0;
- f->next = 0;
- for (i = 0; i < CHAR_TABLE_SIZE; i++)
- f->char_table[i] = 0;
- for (i = 0; i < 256; i++)
- f->code_table[i] = 0;
- return f;
-}
-
-static
-void delete_font(f)
- DeviceFont *f;
-{
- int i;
-
- if (!f)
- return;
- XtFree(f->name);
- for (i = 0; i < CHAR_TABLE_SIZE; i++) {
- struct charinfo *ptr = f->char_table[i];
- while (ptr) {
- struct charinfo *tem = ptr;
- ptr = ptr->next;
- XtFree((char *)tem);
- }
- }
- XtFree((char *)f);
-}
-
-
-static
-unsigned hash_name(name)
- char *name;
-{
- unsigned n = 0;
- /* XXX do better than this */
- while (*name)
- n = (n << 1) ^ *name++;
-
- return n;
-}
-
-static
-int scale_round(n, x, y)
- int n, x, y;
-{
- int y2;
-
- if (x == 0)
- return 0;
- y2 = y/2;
- if (n >= 0) {
- if (n <= (INT_MAX - y2)/x)
- return (n*x + y2)/y;
- }
- else if (-(unsigned)n <= (-(unsigned)INT_MIN - y2)/x)
- return (n*x - y2)/y;
- return (int)(n*(double)x/(double)y + .5);
-}
-
-static
-char *canonicalize_name(s)
- char *s;
-{
- static char ch[2];
- if (s[0] == 'c' && s[1] == 'h' && s[2] == 'a' && s[3] == 'r') {
- char *p;
- int n;
-
- for (p = s + 4; *p; p++)
- if (!isascii(*p) || !isdigit((unsigned char)*p))
- return s;
- n = atoi(s + 4);
- if (n >= 0 && n <= 0xff) {
- ch[0] = (char)n;
- return ch;
- }
- }
- return s;
-}
-
-/* Return 1 if the character is present in the font; widthp gets the
-width if non-null. */
-
-int device_char_width(f, ps, name, widthp)
- DeviceFont *f;
- int ps;
- char *name;
- int *widthp;
-{
- struct charinfo *p;
-
- name = canonicalize_name(name);
- for (p = f->char_table[hash_name(name) % CHAR_TABLE_SIZE];; p = p->next) {
- if (!p)
- return 0;
- if (strcmp(p->name, name) == 0)
- break;
- }
- *widthp = scale_round(p->width, ps, f->dev->unitwidth);
- return 1;
-}
-
-int device_code_width(f, ps, code, widthp)
- DeviceFont *f;
- int ps;
- int code;
- int *widthp;
-{
- struct charinfo *p;
-
- for (p = f->code_table[code & 0xff];; p = p->code_next) {
- if (!p)
- return 0;
- if (p->code == code)
- break;
- }
- *widthp = scale_round(p->width, ps, f->dev->unitwidth);
- return 1;
-}
-
-char *device_name_for_code(f, code)
- DeviceFont *f;
- int code;
-{
- static struct charinfo *state = 0;
- if (f)
- state = f->code_table[code & 0xff];
- for (; state; state = state->code_next)
- if (state->code == code && state->name[0] != '\0') {
- char *name = state->name;
- state = state->code_next;
- return name;
- }
- return 0;
-}
-
-int device_font_special(f)
- DeviceFont *f;
-{
- return f->special;
-}
-
-static
-struct charinfo *add_char(f, name, width, code)
- DeviceFont *f;
- char *name;
- int width, code;
-{
- struct charinfo **pp;
- struct charinfo *ci;
-
- name = canonicalize_name(name);
- if (strcmp(name, "---") == 0)
- name = "";
-
- ci = (struct charinfo *)XtMalloc(XtOffsetOf(struct charinfo, name[0])
- + strlen(name) + 1);
-
- strcpy(ci->name, name);
- ci->width = width;
- ci->code = code;
-
- if (*name != '\0') {
- pp = &f->char_table[hash_name(name) % CHAR_TABLE_SIZE];
- ci->next = *pp;
- *pp = ci;
- }
- pp = &f->code_table[code & 0xff];
- ci->code_next = *pp;
- *pp = ci;
- return ci;
-}
-
-/* Return non-zero for success. */
-
-static
-int read_charset_section(f, fp)
- DeviceFont *f;
- FILE *fp;
-{
- struct charinfo *last_charinfo = 0;
- char buf[256];
-
- while (fgets(buf, sizeof(buf), fp)) {
- char *name;
- int width;
- int code;
- char *p;
-
- current_lineno++;
- name = strtok(buf, WS);
- if (!name)
- continue; /* ignore blank lines */
- p = strtok((char *)0, WS);
- if (!p) /* end of charset section */
- break;
- if (strcmp(p, "\"") == 0) {
- if (!last_charinfo) {
- error("first line of charset section cannot use `\"'");
- return 0;
- }
- else
- (void)add_char(f, name,
- last_charinfo->width, last_charinfo->code);
- }
- else {
- char *q;
- if (sscanf(p, "%d", &width) != 1) {
- error("bad width field");
- return 0;
- }
- p = strtok((char *)0, WS);
- if (!p) {
- error("missing type field");
- return 0;
- }
- p = strtok((char *)0, WS);
- if (!p) {
- error("missing code field");
- return 0;
- }
- code = (int)strtol(p, &q, 0);
- if (q == p) {
- error("bad code field");
- return 0;
- }
- last_charinfo = add_char(f, name, width, code);
- }
- }
- return 1;
-}
-
-static
-FILE *find_file(file, result)
- char *file, **result;
-{
- char *buf = NULL;
- int bufsiz = 0;
- int flen;
- FILE *fp;
- char *path;
- char *env;
-
- env = getenv(FONTPATH_ENV_VAR);
- path = XtMalloc(((env && *env) ? strlen(env) + 1 : 0)
- + strlen(FONTPATH) + 1);
- *path = '\0';
- if (env && *env) {
- strcat(path, env);
- strcat(path, ":");
- }
- strcat(path, FONTPATH);
-
- *result = NULL;
-
- if (file == NULL)
- return NULL;
- if (*file == '\0')
- return NULL;
-
- if (*file == '/') {
- fp = fopen(file, "r");
- if (fp)
- *result = XtNewString(file);
- return fp;
- }
-
- flen = strlen(file);
-
- while (*path) {
- int len;
- char *start, *end;
-
- start = path;
- end = strchr(path, ':');
- if (end)
- path = end + 1;
- else
- path = end = strchr(path, '\0');
- if (start >= end)
- continue;
- if (end[-1] == '/')
- --end;
- len = (end - start) + 1 + flen + 1;
- if (len > bufsiz) {
- if (buf)
- buf = XtRealloc(buf, len);
- else
- buf = XtMalloc(len);
- bufsiz = len;
- }
- memcpy(buf, start, end - start);
- buf[end - start] = '/';
- strcpy(buf + (end - start) + 1, file);
- fp = fopen(buf, "r");
- if (fp) {
- *result = buf;
- return fp;
- }
- }
- XtFree(buf);
- return NULL;
-}
-
-static
-FILE *open_device_file(device_name, file_name, result)
- char *device_name, *file_name, **result;
-{
- char *buf, *path;
- FILE *fp;
-
- buf = XtMalloc(3 + strlen(device_name) + 1 + strlen(file_name) + 1);
- sprintf(buf, "dev%s/%s", device_name, file_name);
- fp = find_file(buf, result);
- if (!fp) {
- fprintf(stderr, "can't find device file `%s'\n", file_name);
- fflush(stderr);
- }
- XtFree(buf);
- return fp;
-}
-
-static
-void error(s)
- char *s;
-{
- if (current_filename) {
- fprintf(stderr, "%s:", current_filename);
- if (current_lineno > 0)
- fprintf(stderr, "%d:", current_lineno);
- putc(' ', stderr);
- }
- fputs(s, stderr);
- putc('\n', stderr);
- fflush(stderr);
-}
-
-/*
-Local Variables:
-c-indent-level: 4
-c-continued-statement-offset: 4
-c-brace-offset: -4
-c-argdecl-indent: 4
-c-label-offset: -4
-c-tab-always-indent: nil
-End:
-*/
diff --git a/contrib/groff/src/xditview/device.h b/contrib/groff/src/xditview/device.h
deleted file mode 100644
index 2b9a64bac90b..000000000000
--- a/contrib/groff/src/xditview/device.h
+++ /dev/null
@@ -1,21 +0,0 @@
-
-typedef struct _DeviceFont DeviceFont;
-
-typedef struct _Device {
- char *name;
- int sizescale;
- int res;
- int unitwidth;
- int paperlength;
- int paperwidth;
- int X11;
- DeviceFont *fonts;
-} Device;
-
-extern void device_destroy();
-extern Device *device_load();
-extern DeviceFont *device_find_font();
-extern int device_char_width();
-extern char *device_name_for_code();
-extern int device_code_width();
-extern int device_font_special();
diff --git a/contrib/groff/src/xditview/draw.c b/contrib/groff/src/xditview/draw.c
deleted file mode 100644
index 69e86cd6a6e1..000000000000
--- a/contrib/groff/src/xditview/draw.c
+++ /dev/null
@@ -1,721 +0,0 @@
-/*
- * draw.c
- *
- * accept dvi function calls and translate to X
- */
-
-#include <X11/Xos.h>
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <math.h>
-
-/* math.h on a Sequent doesn't define M_PI, apparently */
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-#include "DviP.h"
-
-#define DeviceToX(dw, n) ((int)((n) * (dw)->dvi.scale_factor + .5))
-#define XPos(dw) (DeviceToX((dw), (dw)->dvi.state->x - \
- (dw)->dvi.text_device_width) + (dw)->dvi.text_x_width)
-#define YPos(dw) (DeviceToX((dw), (dw)->dvi.state->y))
-
-static int FakeCharacter();
-
-HorizontalMove(dw, delta)
- DviWidget dw;
- int delta;
-{
- dw->dvi.state->x += delta;
-}
-
-HorizontalGoto(dw, NewPosition)
- DviWidget dw;
- int NewPosition;
-{
- dw->dvi.state->x = NewPosition;
-}
-
-VerticalMove(dw, delta)
- DviWidget dw;
- int delta;
-{
- dw->dvi.state->y += delta;
-}
-
-VerticalGoto(dw, NewPosition)
- DviWidget dw;
- int NewPosition;
-{
- dw->dvi.state->y = NewPosition;
-}
-
-AdjustCacheDeltas (dw)
- DviWidget dw;
-{
- int extra;
- int nadj;
- int i;
-
- nadj = 0;
- extra = DeviceToX(dw, dw->dvi.text_device_width)
- - dw->dvi.text_x_width;
- if (extra == 0)
- return;
- for (i = 0; i <= dw->dvi.cache.index; i++)
- if (dw->dvi.cache.adjustable[i])
- ++nadj;
- if (nadj == 0)
- return;
- dw->dvi.text_x_width += extra;
- for (i = 0; i <= dw->dvi.cache.index; i++)
- if (dw->dvi.cache.adjustable[i]) {
- int x;
- int *deltap;
-
- x = extra/nadj;
- deltap = &dw->dvi.cache.cache[i].delta;
-#define MIN_DELTA 2
- if (*deltap > 0 && x + *deltap < MIN_DELTA) {
- x = MIN_DELTA - *deltap;
- if (x <= 0)
- *deltap = MIN_DELTA;
- else
- x = 0;
- }
- else
- *deltap += x;
- extra -= x;
- --nadj;
- dw->dvi.cache.adjustable[i] = 0;
- }
-}
-
-FlushCharCache (dw)
- DviWidget dw;
-{
- if (dw->dvi.cache.char_index != 0) {
- AdjustCacheDeltas (dw);
- XDrawText (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
- dw->dvi.cache.start_x, dw->dvi.cache.start_y,
- dw->dvi.cache.cache, dw->dvi.cache.index + 1);
- }
- dw->dvi.cache.index = 0;
- dw->dvi.cache.max = DVI_TEXT_CACHE_SIZE;
-#if 0
- if (dw->dvi.noPolyText)
- dw->dvi.cache.max = 1;
-#endif
- dw->dvi.cache.char_index = 0;
- dw->dvi.cache.cache[0].nchars = 0;
- dw->dvi.cache.start_x = dw->dvi.cache.x = XPos (dw);
- dw->dvi.cache.start_y = dw->dvi.cache.y = YPos (dw);
-}
-
-Newline (dw)
- DviWidget dw;
-{
- FlushCharCache (dw);
- dw->dvi.text_x_width = dw->dvi.text_device_width = 0;
- dw->dvi.word_flag = 0;
-}
-
-Word (dw)
- DviWidget dw;
-{
- dw->dvi.word_flag = 1;
-}
-
-#define charWidth(fi,c) (\
- (fi)->per_char ?\
- (fi)->per_char[(c) - (fi)->min_char_or_byte2].width\
- :\
- (fi)->max_bounds.width\
-)
-
-
-static
-int charExists (fi, c)
- XFontStruct *fi;
- int c;
-{
- XCharStruct *p;
-
- if (fi->per_char == NULL ||
- c < fi->min_char_or_byte2 || c > fi->max_char_or_byte2)
- return 0;
- p = fi->per_char + (c - fi->min_char_or_byte2);
- return (p->lbearing != 0 || p->rbearing != 0 || p->width != 0
- || p->ascent != 0 || p->descent != 0 || p->attributes != 0);
-}
-
-static
-DoCharacter (dw, c, wid)
- DviWidget dw;
- int c;
- int wid; /* width in device units */
-{
- register XFontStruct *font;
- register XTextItem *text;
- int x, y;
-
- x = XPos(dw);
- y = YPos(dw);
-
- /*
- * quick and dirty extents calculation:
- */
- if (!(y + 24 >= dw->dvi.extents.y1
- && y - 24 <= dw->dvi.extents.y2
-#if 0
- && x + 24 >= dw->dvi.extents.x1
- && x - 24 <= dw->dvi.extents.x2
-#endif
- ))
- return;
-
- if (y != dw->dvi.cache.y
- || dw->dvi.cache.char_index >= DVI_CHAR_CACHE_SIZE) {
- FlushCharCache (dw);
- x = dw->dvi.cache.x;
- }
- /*
- * load a new font, if the current block is not empty,
- * step to the next.
- */
- if (dw->dvi.cache.font_size != dw->dvi.state->font_size ||
- dw->dvi.cache.font_number != dw->dvi.state->font_number)
- {
- dw->dvi.cache.font_size = dw->dvi.state->font_size;
- dw->dvi.cache.font_number = dw->dvi.state->font_number;
- dw->dvi.cache.font = QueryFont (dw,
- dw->dvi.cache.font_number,
- dw->dvi.cache.font_size);
- if (dw->dvi.cache.cache[dw->dvi.cache.index].nchars != 0) {
- ++dw->dvi.cache.index;
- if (dw->dvi.cache.index >= dw->dvi.cache.max)
- FlushCharCache (dw);
- dw->dvi.cache.cache[dw->dvi.cache.index].nchars = 0;
- dw->dvi.cache.adjustable[dw->dvi.cache.index] = 0;
- }
- }
- if (x != dw->dvi.cache.x || dw->dvi.word_flag) {
- if (dw->dvi.cache.cache[dw->dvi.cache.index].nchars != 0) {
- ++dw->dvi.cache.index;
- if (dw->dvi.cache.index >= dw->dvi.cache.max)
- FlushCharCache (dw);
- dw->dvi.cache.cache[dw->dvi.cache.index].nchars = 0;
- }
- dw->dvi.cache.adjustable[dw->dvi.cache.index]
- = dw->dvi.word_flag;
- dw->dvi.word_flag = 0;
- }
- font = dw->dvi.cache.font;
- text = &dw->dvi.cache.cache[dw->dvi.cache.index];
- if (text->nchars == 0) {
- text->chars = &dw->dvi.cache.char_cache[dw->dvi.cache.char_index];
- text->delta = x - dw->dvi.cache.x;
- if (font != dw->dvi.font) {
- text->font = font->fid;
- dw->dvi.font = font;
- } else
- text->font = None;
- dw->dvi.cache.x += text->delta;
- }
- if (charExists(font, c)) {
- int w;
- dw->dvi.cache.char_cache[dw->dvi.cache.char_index++] = (char) c;
- ++text->nchars;
- w = charWidth(font, c);
- dw->dvi.cache.x += w;
- if (wid != 0) {
- dw->dvi.text_x_width += w;
- dw->dvi.text_device_width += wid;
- }
- }
-}
-
-static
-int FindCharWidth (dw, buf, widp)
- DviWidget dw;
- char *buf;
- int *widp;
-{
- int maxpos;
- int i;
-
- if (dw->dvi.device_font == 0
- || dw->dvi.state->font_number != dw->dvi.device_font_number) {
- dw->dvi.device_font_number = dw->dvi.state->font_number;
- dw->dvi.device_font
- = QueryDeviceFont (dw, dw->dvi.device_font_number);
- }
- if (dw->dvi.device_font
- && device_char_width (dw->dvi.device_font,
- dw->dvi.state->font_size, buf, widp))
- return 1;
-
- maxpos = MaxFontPosition (dw);
- for (i = 1; i <= maxpos; i++) {
- DeviceFont *f = QueryDeviceFont (dw, i);
- if (f && device_font_special (f)
- && device_char_width (f, dw->dvi.state->font_size,
- buf, widp)) {
- dw->dvi.state->font_number = i;
- return 1;
- }
- }
- return 0;
-}
-
-/* Return the width of the character in device units. */
-
-int PutCharacter (dw, buf)
- DviWidget dw;
- char *buf;
-{
- int prevFont;
- int c = -1;
- int wid = 0;
- DviCharNameMap *map;
-
- if (!dw->dvi.display_enable)
- return 0; /* The width doesn't matter in this case. */
- prevFont = dw->dvi.state->font_number;
- if (!FindCharWidth (dw, buf, &wid))
- return 0;
- map = QueryFontMap (dw, dw->dvi.state->font_number);
- if (map)
- c = DviCharIndex (map, buf);
- if (c >= 0)
- DoCharacter (dw, c, wid);
- else
- (void) FakeCharacter (dw, buf, wid);
- dw->dvi.state->font_number = prevFont;
- return wid;
-}
-
-/* Return 1 if we can fake it; 0 otherwise. */
-
-static
-int FakeCharacter (dw, buf, wid)
- DviWidget dw;
- char *buf;
- int wid;
-{
- int oldx, oldw;
- char ch[2];
- char *chars = 0;
-
- if (buf[0] == '\0' || buf[1] == '\0' || buf[2] != '\0')
- return 0;
-#define pack2(c1, c2) (((c1) << 8) | (c2))
-
- switch (pack2(buf[0], buf[1])) {
- case pack2('f', 'i'):
- chars = "fi";
- break;
- case pack2('f', 'l'):
- chars = "fl";
- break;
- case pack2('f', 'f'):
- chars = "ff";
- break;
- case pack2('F', 'i'):
- chars = "ffi";
- break;
- case pack2('F', 'l'):
- chars = "ffl";
- break;
- }
- if (!chars)
- return 0;
- oldx = dw->dvi.state->x;
- oldw = dw->dvi.text_device_width;
- ch[1] = '\0';
- for (; *chars; chars++) {
- ch[0] = *chars;
- dw->dvi.state->x += PutCharacter (dw, ch);
- }
- dw->dvi.state->x = oldx;
- dw->dvi.text_device_width = oldw + wid;
- return 1;
-}
-
-PutNumberedCharacter (dw, c)
- DviWidget dw;
- int c;
-{
- char *name;
- int wid;
- DviCharNameMap *map;
-
- if (!dw->dvi.display_enable)
- return;
-
- if (dw->dvi.device_font == 0
- || dw->dvi.state->font_number != dw->dvi.device_font_number) {
- dw->dvi.device_font_number = dw->dvi.state->font_number;
- dw->dvi.device_font
- = QueryDeviceFont (dw, dw->dvi.device_font_number);
- }
-
- if (dw->dvi.device_font == 0
- || !device_code_width (dw->dvi.device_font,
- dw->dvi.state->font_size, c, &wid))
- return;
- if (dw->dvi.native) {
- DoCharacter (dw, c, wid);
- return;
- }
- map = QueryFontMap (dw, dw->dvi.state->font_number);
- if (!map)
- return;
- for (name = device_name_for_code (dw->dvi.device_font, c);
- name;
- name = device_name_for_code ((DeviceFont *)0, c)) {
- int code = DviCharIndex (map, name);
- if (code >= 0) {
- DoCharacter (dw, code, wid);
- break;
- }
- if (FakeCharacter (dw, name, wid))
- break;
- }
-}
-
-ClearPage (dw)
- DviWidget dw;
-{
- XClearWindow (XtDisplay (dw), XtWindow (dw));
-}
-
-static
-setGC (dw)
- DviWidget dw;
-{
- int desired_line_width;
-
- if (dw->dvi.line_thickness < 0)
- desired_line_width = (int)(((double)dw->dvi.device_resolution
- * dw->dvi.state->font_size)
- / (10.0*72.0*dw->dvi.sizescale));
- else
- desired_line_width = dw->dvi.line_thickness;
-
- if (desired_line_width != dw->dvi.line_width) {
- XGCValues values;
- values.line_width = DeviceToX(dw, desired_line_width);
- if (values.line_width == 0)
- values.line_width = 1;
- XChangeGC(XtDisplay (dw), dw->dvi.normal_GC,
- GCLineWidth, &values);
- dw->dvi.line_width = desired_line_width;
- }
-}
-
-static
-setFillGC (dw)
- DviWidget dw;
-{
- int fill_type;
- unsigned long mask = GCFillStyle | GCForeground;
-
- fill_type = (dw->dvi.fill * 10) / (DVI_FILL_MAX + 1);
- if (dw->dvi.fill_type != fill_type) {
- XGCValues values;
- if (fill_type <= 0) {
- values.foreground = dw->dvi.background;
- values.fill_style = FillSolid;
- } else if (fill_type >= 9) {
- values.foreground = dw->dvi.foreground;
- values.fill_style = FillSolid;
- } else {
- values.foreground = dw->dvi.foreground;
- values.fill_style = FillOpaqueStippled;
- values.stipple = dw->dvi.gray[fill_type - 1];
- mask |= GCStipple;
- }
- XChangeGC(XtDisplay (dw), dw->dvi.fill_GC, mask, &values);
- dw->dvi.fill_type = fill_type;
- }
-}
-
-DrawLine (dw, x, y)
- DviWidget dw;
- int x, y;
-{
- int xp, yp;
-
- AdjustCacheDeltas (dw);
- setGC (dw);
- xp = XPos (dw);
- yp = YPos (dw);
- XDrawLine (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
- xp, yp,
- xp + DeviceToX (dw, x), yp + DeviceToX (dw, y));
-}
-
-DrawCircle (dw, diam)
- DviWidget dw;
- int diam;
-{
- int d;
-
- AdjustCacheDeltas (dw);
- setGC (dw);
- d = DeviceToX (dw, diam);
- XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
- XPos (dw), YPos (dw) - d/2,
- d, d, 0, 64*360);
-}
-
-DrawFilledCircle (dw, diam)
- DviWidget dw;
- int diam;
-{
- int d;
-
- AdjustCacheDeltas (dw);
- setFillGC (dw);
- d = DeviceToX (dw, diam);
- XFillArc (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC,
- XPos (dw), YPos (dw) - d/2,
- d, d, 0, 64*360);
- XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC,
- XPos (dw), YPos (dw) - d/2,
- d, d, 0, 64*360);
-}
-
-DrawEllipse (dw, a, b)
- DviWidget dw;
- int a, b;
-{
- AdjustCacheDeltas (dw);
- setGC (dw);
- XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
- XPos (dw), YPos (dw) - DeviceToX (dw, b/2),
- DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360);
-}
-
-DrawFilledEllipse (dw, a, b)
- DviWidget dw;
- int a, b;
-{
- AdjustCacheDeltas (dw);
- setFillGC (dw);
- XFillArc (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC,
- XPos (dw), YPos (dw) - DeviceToX (dw, b/2),
- DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360);
- XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC,
- XPos (dw), YPos (dw) - DeviceToX (dw, b/2),
- DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360);
-}
-
-DrawArc (dw, x0, y0, x1, y1)
- DviWidget dw;
- int x0, y0, x1, y1;
-{
- int angle1, angle2;
- int rad = (int)((sqrt ((double)x0*x0 + (double)y0*y0)
- + sqrt ((double)x1*x1 + (double)y1*y1) + 1.0)/2.0);
- if ((x0 == 0 && y0 == 0) || (x1 == 0 && y1 == 0))
- return;
- angle1 = (int)(atan2 ((double)y0, (double)-x0)*180.0*64.0/M_PI);
- angle2 = (int)(atan2 ((double)-y1, (double)x1)*180.0*64.0/M_PI);
-
- angle2 -= angle1;
- if (angle2 < 0)
- angle2 += 64*360;
-
- AdjustCacheDeltas (dw);
- setGC (dw);
-
- rad = DeviceToX (dw, rad);
- XDrawArc (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
- XPos (dw) + DeviceToX (dw, x0) - rad,
- YPos (dw) + DeviceToX (dw, y0) - rad,
- rad*2, rad*2, angle1, angle2);
-}
-
-DrawPolygon (dw, v, n)
- DviWidget dw;
- int *v;
- int n;
-{
- XPoint *p;
- int i;
- int dx, dy;
-
- n /= 2;
-
- AdjustCacheDeltas (dw);
- setGC (dw);
- p = (XPoint *)XtMalloc((n + 2)*sizeof(XPoint));
- p[0].x = XPos (dw);
- p[0].y = YPos (dw);
- dx = 0;
- dy = 0;
- for (i = 0; i < n; i++) {
- dx += v[2*i];
- p[i + 1].x = DeviceToX (dw, dx) + p[0].x;
- dy += v[2*i + 1];
- p[i + 1].y = DeviceToX (dw, dy) + p[0].y;
- }
- p[n+1].x = p[0].x;
- p[n+1].y = p[0].y;
- XDrawLines (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
- p, n + 2, CoordModeOrigin);
- XtFree((char *)p);
-}
-
-
-DrawFilledPolygon (dw, v, n)
- DviWidget dw;
- int *v;
- int n;
-{
- XPoint *p;
- int i;
- int dx, dy;
-
- n /= 2;
- if (n < 2)
- return;
-
- AdjustCacheDeltas (dw);
- setFillGC (dw);
- p = (XPoint *)XtMalloc((n + 2)*sizeof(XPoint));
- p[0].x = p[n+1].x = XPos (dw);
- p[0].y = p[n+1].y = YPos (dw);
- dx = 0;
- dy = 0;
- for (i = 0; i < n; i++) {
- dx += v[2*i];
- p[i + 1].x = DeviceToX (dw, dx) + p[0].x;
- dy += v[2*i + 1];
- p[i + 1].y = DeviceToX (dw, dy) + p[0].y;
- }
- XFillPolygon (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC,
- p, n + 1, Complex, CoordModeOrigin);
- XDrawLines (XtDisplay (dw), XtWindow (dw), dw->dvi.fill_GC,
- p, n + 2, CoordModeOrigin);
- XtFree((char *)p);
-}
-
-#define POINTS_MAX 10000
-
-static
-appendPoint(points, pointi, x, y)
- XPoint *points;
- int *pointi;
- int x, y;
-{
- if (*pointi < POINTS_MAX) {
- points[*pointi].x = x;
- points[*pointi].y = y;
- *pointi += 1;
- }
-}
-
-#define FLATNESS 1
-
-static
-flattenCurve(points, pointi, x2, y2, x3, y3, x4, y4)
- XPoint *points;
- int *pointi;
- int x2, y2, x3, y3, x4, y4;
-{
- int x1, y1, dx, dy, n1, n2, n;
-
- x1 = points[*pointi - 1].x;
- y1 = points[*pointi - 1].y;
-
- dx = x4 - x1;
- dy = y4 - y1;
-
- n1 = dy*(x2 - x1) - dx*(y2 - y1);
- n2 = dy*(x3 - x1) - dx*(y3 - y1);
- if (n1 < 0)
- n1 = -n1;
- if (n2 < 0)
- n2 = -n2;
- n = n1 > n2 ? n1 : n2;
-
- if (n*n / (dy*dy + dx*dx) <= FLATNESS*FLATNESS)
- appendPoint (points, pointi, x4, y4);
- else {
- flattenCurve (points, pointi,
- (x1 + x2)/2, (y1 + y2)/2,
- (x1 + x2*2 + x3)/4, (y1 + y2*2 + y3)/4,
- (x1 +3*x2 + 3*x3 + x4)/8, (y1 +3*y2 + 3*y3 + y4)/8);
- flattenCurve (points, pointi,
- (x2 + x3*2 + x4)/4, (y2 + y3*2 + y4)/4,
- (x3 + x4)/2, (y3 + y4)/2,
- x4, y4);
- }
-}
-
-
-DrawSpline (dw, v, n)
- DviWidget dw;
- int *v;
- int n;
-{
- int sx, sy, tx, ty;
- int ox, oy, dx, dy;
- int i;
- int pointi;
- XPoint points[POINTS_MAX];
-
- if (n == 0 || (n & 1) != 0)
- return;
- AdjustCacheDeltas (dw);
- setGC (dw);
- ox = XPos (dw);
- oy = YPos (dw);
- dx = v[0];
- dy = v[1];
- sx = ox;
- sy = oy;
- tx = sx + DeviceToX (dw, dx);
- ty = sy + DeviceToX (dw, dy);
-
- pointi = 0;
-
- appendPoint (points, &pointi, sx, sy);
- appendPoint (points, &pointi, (sx + tx)/2, (sy + ty)/2);
-
- for (i = 2; i < n; i += 2) {
- int ux = ox + DeviceToX (dw, dx += v[i]);
- int uy = oy + DeviceToX (dw, dy += v[i+1]);
- flattenCurve (points, &pointi,
- (sx + tx*5)/6, (sy + ty*5)/6,
- (tx*5 + ux)/6, (ty*5 + uy)/6,
- (tx + ux)/2, (ty + uy)/2);
- sx = tx;
- sy = ty;
- tx = ux;
- ty = uy;
- }
-
- appendPoint (points, &pointi, tx, ty);
-
- XDrawLines (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
- points, pointi, CoordModeOrigin);
-}
-
-
-/*
-Local Variables:
-c-indent-level: 8
-c-continued-statement-offset: 8
-c-brace-offset: -8
-c-argdecl-indent: 8
-c-label-offset: -8
-c-tab-always-indent: nil
-End:
-*/
diff --git a/contrib/groff/src/xditview/font.c b/contrib/groff/src/xditview/font.c
deleted file mode 100644
index 2e028aa60b0e..000000000000
--- a/contrib/groff/src/xditview/font.c
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
- * font.c
- *
- * map dvi fonts to X fonts
- */
-
-#include <X11/Xos.h>
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <stdio.h>
-#include <ctype.h>
-#include "DviP.h"
-#include "XFontName.h"
-
-static DisposeFontSizes();
-
-static char *
-savestr (s)
- char *s;
-{
- char *n;
-
- if (!s)
- return 0;
- n = XtMalloc (strlen (s) + 1);
- if (n)
- strcpy (n, s);
- return n;
-}
-
-static DviFontList *
-LookupFontByPosition (dw, position)
- DviWidget dw;
- int position;
-{
- DviFontList *f;
-
- for (f = dw->dvi.fonts; f; f = f->next)
- if (f->dvi_number == position)
- break;
- return f;
-}
-
-int
-MaxFontPosition (dw)
- DviWidget dw;
-{
- DviFontList *f;
- int n = -1;
-
- for (f = dw->dvi.fonts; f; f = f->next)
- if (f->dvi_number > n)
- n = f->dvi_number;
- return n;
-}
-
-static DviFontSizeList *
-LookupFontSizeBySize (dw, f, size)
- DviWidget dw;
- DviFontList *f;
- int size;
-{
- DviFontSizeList *fs, *best = 0, *smallest = 0;
- int bestsize = 0;
- XFontName fontName;
- unsigned int fontNameAttributes;
- char fontNameString[2048];
- int decipointsize;
-
- if (f->scalable) {
- decipointsize = (10*size)/dw->dvi.sizescale;
- for (best = f->sizes; best; best = best->next)
- if (best->size == decipointsize)
- return best;
- best = (DviFontSizeList *) XtMalloc(sizeof *best);
- best->next = f->sizes;
- best->size = decipointsize;
- f->sizes = best;
- XParseFontName (f->x_name, &fontName, &fontNameAttributes);
- fontNameAttributes &= ~(FontNamePixelSize|FontNameAverageWidth);
- fontNameAttributes |= FontNameResolutionX;
- fontNameAttributes |= FontNameResolutionY;
- fontNameAttributes |= FontNamePointSize;
- fontName.ResolutionX = dw->dvi.display_resolution;
- fontName.ResolutionY = dw->dvi.display_resolution;
- fontName.PointSize = decipointsize;
- XFormatFontName (&fontName, fontNameAttributes, fontNameString);
- best->x_name = savestr (fontNameString);
- best->doesnt_exist = 0;
- best->font = 0;
- return best;
- }
- for (fs = f->sizes; fs; fs=fs->next) {
- if (dw->dvi.sizescale*fs->size <= 10*size
- && fs->size >= bestsize) {
- best = fs;
- bestsize = fs->size;
- }
- if (smallest == 0 || fs->size < smallest->size)
- smallest = fs;
- }
- return best ? best : smallest;
-}
-
-static char *
-SkipFontNameElement (n)
- char *n;
-{
- while (*n != '-')
- if (!*++n)
- return 0;
- return n+1;
-}
-
-# define SizePosition 8
-# define EncodingPosition 13
-
-static
-ConvertFontNameToSize (n)
- char *n;
-{
- int i, size;
-
- for (i = 0; i < SizePosition; i++) {
- n = SkipFontNameElement (n);
- if (!n)
- return -1;
- }
- size = atoi (n);
- return size;
-}
-
-static char *
-ConvertFontNameToEncoding (n)
- char *n;
-{
- int i;
- for (i = 0; i < EncodingPosition; i++) {
- n = SkipFontNameElement (n);
- if (!n)
- return 0;
- }
- return n;
-}
-
-DviFontSizeList *
-InstallFontSizes (dw, x_name, scalablep)
- DviWidget dw;
- char *x_name;
- Boolean *scalablep;
-{
- char fontNameString[2048];
- char **fonts;
- int i, count;
- int size;
- DviFontSizeList *sizes, *new;
- XFontName fontName;
- unsigned int fontNameAttributes;
-
- *scalablep = FALSE;
- if (!XParseFontName (x_name, &fontName, &fontNameAttributes))
- return 0;
- fontNameAttributes &= ~(FontNamePixelSize|FontNamePointSize
- |FontNameAverageWidth);
- fontNameAttributes |= FontNameResolutionX;
- fontNameAttributes |= FontNameResolutionY;
- fontName.ResolutionX = dw->dvi.display_resolution;
- fontName.ResolutionY = dw->dvi.display_resolution;
- XFormatFontName (&fontName, fontNameAttributes, fontNameString);
- fonts = XListFonts (XtDisplay (dw), fontNameString, 10000000, &count);
- sizes = 0;
- for (i = 0; i < count; i++) {
- size = ConvertFontNameToSize (fonts[i]);
- if (size == 0) {
- DisposeFontSizes (dw, sizes);
- sizes = 0;
- *scalablep = TRUE;
- break;
- }
- if (size != -1) {
- new = (DviFontSizeList *) XtMalloc (sizeof *new);
- new->next = sizes;
- new->size = size;
- new->x_name = savestr (fonts[i]);
- new->doesnt_exist = 0;
- new->font = 0;
- sizes = new;
- }
- }
- XFreeFontNames (fonts);
- return sizes;
-}
-
-static
-DisposeFontSizes (dw, fs)
- DviWidget dw;
- DviFontSizeList *fs;
-{
- DviFontSizeList *next;
-
- for (; fs; fs=next) {
- next = fs->next;
- if (fs->x_name)
- XtFree (fs->x_name);
- if (fs->font && fs->font != dw->dvi.default_font) {
- XUnloadFont (XtDisplay (dw), fs->font->fid);
- XFree ((char *)fs->font);
- }
- XtFree ((char *) fs);
- }
-}
-
-static DviFontList *
-InstallFont (dw, position, dvi_name, x_name)
- DviWidget dw;
- int position;
- char *dvi_name;
- char *x_name;
-{
- DviFontList *f;
- char *encoding;
-
- if ((f = LookupFontByPosition (dw, position)) != NULL) {
- /*
- * ignore gratuitous font loading
- */
- if (!strcmp (f->dvi_name, dvi_name) &&
- !strcmp (f->x_name, x_name))
- return f;
-
- DisposeFontSizes (dw, f->sizes);
- if (f->dvi_name)
- XtFree (f->dvi_name);
- if (f->x_name)
- XtFree (f->x_name);
- f->device_font = 0;
- } else {
- f = (DviFontList *) XtMalloc (sizeof (*f));
- f->next = dw->dvi.fonts;
- dw->dvi.fonts = f;
- }
- f->initialized = FALSE;
- f->dvi_name = savestr (dvi_name);
- f->device_font = device_find_font (dw->dvi.device, dvi_name);
- f->x_name = savestr (x_name);
- f->dvi_number = position;
- f->sizes = 0;
- f->scalable = FALSE;
- if (f->x_name) {
- encoding = ConvertFontNameToEncoding (f->x_name);
- f->char_map = DviFindMap (encoding);
- } else
- f->char_map = 0;
- /*
- * force requery of fonts
- */
- dw->dvi.font = 0;
- dw->dvi.font_number = -1;
- dw->dvi.cache.font = 0;
- dw->dvi.cache.font_number = -1;
- dw->dvi.device_font = 0;
- dw->dvi.device_font_number = -1;
- return f;
-}
-
-ForgetFonts (dw)
- DviWidget dw;
-{
- DviFontList *f = dw->dvi.fonts;
-
- while (f) {
- DviFontList *tem = f;
-
- if (f->sizes)
- DisposeFontSizes (dw, f->sizes);
- if (f->dvi_name)
- XtFree (f->dvi_name);
- if (f->x_name)
- XtFree (f->x_name);
- f = f->next;
- XtFree ((char *) tem);
- }
-
- /*
- * force requery of fonts
- */
- dw->dvi.font = 0;
- dw->dvi.font_number = -1;
- dw->dvi.cache.font = 0;
- dw->dvi.cache.font_number = -1;
- dw->dvi.device_font = 0;
- dw->dvi.device_font_number = -1;
- dw->dvi.fonts = 0;
-}
-
-
-static char *
-MapDviNameToXName (dw, dvi_name)
- DviWidget dw;
- char *dvi_name;
-{
- DviFontMap *fm;
-
- for (fm = dw->dvi.font_map; fm; fm=fm->next)
- if (!strcmp (fm->dvi_name, dvi_name))
- return fm->x_name;
- return 0;
-}
-
-#if 0
-static char *
-MapXNameToDviName (dw, x_name)
- DviWidget dw;
- char *x_name;
-{
- DviFontMap *fm;
-
- for (fm = dw->dvi.font_map; fm; fm=fm->next)
- if (!strcmp (fm->x_name, x_name))
- return fm->dvi_name;
- return 0;
-}
-#endif
-
-ParseFontMap (dw)
- DviWidget dw;
-{
- char dvi_name[1024];
- char x_name[2048];
- char *m, *s;
- DviFontMap *fm, *new;
-
- if (dw->dvi.font_map)
- DestroyFontMap (dw->dvi.font_map);
- fm = 0;
- m = dw->dvi.font_map_string;
- while (*m) {
- s = m;
- while (*m && !isspace (*m))
- ++m;
- strncpy (dvi_name, s, m-s);
- dvi_name[m-s] = '\0';
- while (isspace (*m))
- ++m;
- s = m;
- while (*m && *m != '\n')
- ++m;
- strncpy (x_name, s, m-s);
- x_name[m-s] = '\0';
- new = (DviFontMap *) XtMalloc (sizeof *new);
- new->x_name = savestr (x_name);
- new->dvi_name = savestr (dvi_name);
- new->next = fm;
- fm = new;
- ++m;
- }
- dw->dvi.font_map = fm;
-}
-
-DestroyFontMap (font_map)
- DviFontMap *font_map;
-{
- DviFontMap *next;
-
- for (; font_map; font_map = next) {
- next = font_map->next;
- if (font_map->x_name)
- XtFree (font_map->x_name);
- if (font_map->dvi_name)
- XtFree (font_map->dvi_name);
- XtFree ((char *) font_map);
- }
-}
-
-/* ARGSUSED */
-
-SetFontPosition (dw, position, dvi_name, extra)
- DviWidget dw;
- int position;
- char *dvi_name;
- char *extra; /* unused */
-{
- char *x_name;
-
- x_name = MapDviNameToXName (dw, dvi_name);
- if (x_name)
- (void) InstallFont (dw, position, dvi_name, x_name);
-}
-
-XFontStruct *
-QueryFont (dw, position, size)
- DviWidget dw;
- int position;
- int size;
-{
- DviFontList *f;
- DviFontSizeList *fs;
-
- f = LookupFontByPosition (dw, position);
- if (!f)
- return dw->dvi.default_font;
- if (!f->initialized) {
- f->sizes = InstallFontSizes (dw, f->x_name, &f->scalable);
- f->initialized = TRUE;
- }
- fs = LookupFontSizeBySize (dw, f, size);
- if (!fs)
- return dw->dvi.default_font;
- if (!fs->font) {
- if (fs->x_name)
- fs->font = XLoadQueryFont (XtDisplay (dw), fs->x_name);
- if (!fs->font)
- fs->font = dw->dvi.default_font;
- }
- return fs->font;
-}
-
-DeviceFont *
-QueryDeviceFont (dw, position)
- DviWidget dw;
- int position;
-{
- DviFontList *f;
-
- f = LookupFontByPosition (dw, position);
- if (!f)
- return 0;
- return f->device_font;
-}
-
-DviCharNameMap *
-QueryFontMap (dw, position)
- DviWidget dw;
- int position;
-{
- DviFontList *f;
-
- f = LookupFontByPosition (dw, position);
- if (f)
- return f->char_map;
- else
- return 0;
-}
-
-#if 0
-LoadFont (dw, position, size)
- DviWidget dw;
- int position;
- int size;
-{
- XFontStruct *font;
-
- font = QueryFont (dw, position, size);
- dw->dvi.font_number = position;
- dw->dvi.font_size = size;
- dw->dvi.font = font;
- XSetFont (XtDisplay (dw), dw->dvi.normal_GC, font->fid);
- return;
-}
-#endif
-
-/*
-Local Variables:
-c-indent-level: 8
-c-continued-statement-offset: 8
-c-brace-offset: -8
-c-argdecl-indent: 8
-c-label-offset: -8
-c-tab-always-indent: nil
-End:
-*/
diff --git a/contrib/groff/src/xditview/gray1.bm b/contrib/groff/src/xditview/gray1.bm
deleted file mode 100644
index c40a95e6eab6..000000000000
--- a/contrib/groff/src/xditview/gray1.bm
+++ /dev/null
@@ -1,4 +0,0 @@
-#define gray1_width 3
-#define gray1_height 3
-static char gray1_bits[] = {
- 0x00, 0x02, 0x00};
diff --git a/contrib/groff/src/xditview/gray2.bm b/contrib/groff/src/xditview/gray2.bm
deleted file mode 100644
index e87a1bcc073c..000000000000
--- a/contrib/groff/src/xditview/gray2.bm
+++ /dev/null
@@ -1,4 +0,0 @@
-#define gray2_width 3
-#define gray2_height 3
-static char gray2_bits[] = {
- 0x00, 0x03, 0x00};
diff --git a/contrib/groff/src/xditview/gray3.bm b/contrib/groff/src/xditview/gray3.bm
deleted file mode 100644
index d9313ebd5e8f..000000000000
--- a/contrib/groff/src/xditview/gray3.bm
+++ /dev/null
@@ -1,4 +0,0 @@
-#define gray3_width 3
-#define gray3_height 3
-static char gray3_bits[] = {
- 0x00, 0x03, 0x02};
diff --git a/contrib/groff/src/xditview/gray4.bm b/contrib/groff/src/xditview/gray4.bm
deleted file mode 100644
index dad142a9b0f0..000000000000
--- a/contrib/groff/src/xditview/gray4.bm
+++ /dev/null
@@ -1,4 +0,0 @@
-#define gray4_width 3
-#define gray4_height 3
-static char gray4_bits[] = {
- 0x00, 0x07, 0x02};
diff --git a/contrib/groff/src/xditview/gray5.bm b/contrib/groff/src/xditview/gray5.bm
deleted file mode 100644
index 5f576184172d..000000000000
--- a/contrib/groff/src/xditview/gray5.bm
+++ /dev/null
@@ -1,4 +0,0 @@
-#define gray5_width 3
-#define gray5_height 3
-static char gray5_bits[] = {
- 0x04, 0x07, 0x02};
diff --git a/contrib/groff/src/xditview/gray6.bm b/contrib/groff/src/xditview/gray6.bm
deleted file mode 100644
index b76701db16d3..000000000000
--- a/contrib/groff/src/xditview/gray6.bm
+++ /dev/null
@@ -1,4 +0,0 @@
-#define gray6_width 3
-#define gray6_height 3
-static char gray6_bits[] = {
- 0x04, 0x07, 0x03};
diff --git a/contrib/groff/src/xditview/gray7.bm b/contrib/groff/src/xditview/gray7.bm
deleted file mode 100644
index ef47bc692e99..000000000000
--- a/contrib/groff/src/xditview/gray7.bm
+++ /dev/null
@@ -1,4 +0,0 @@
-#define gray7_width 3
-#define gray7_height 3
-static char gray7_bits[] = {
- 0x05, 0x07, 0x03};
diff --git a/contrib/groff/src/xditview/gray8.bm b/contrib/groff/src/xditview/gray8.bm
deleted file mode 100644
index 12de7cb6f577..000000000000
--- a/contrib/groff/src/xditview/gray8.bm
+++ /dev/null
@@ -1,4 +0,0 @@
-#define gray8_width 3
-#define gray8_height 3
-static char gray8_bits[] = {
- 0x05, 0x07, 0x07};
diff --git a/contrib/groff/src/xditview/gxditview.man b/contrib/groff/src/xditview/gxditview.man
deleted file mode 100644
index 04cd446dfab6..000000000000
--- a/contrib/groff/src/xditview/gxditview.man
+++ /dev/null
@@ -1,246 +0,0 @@
-.\" -*- nroff -*-
-.TH GXDITVIEW 1 "Release 5" "X Version 11"
-.SH NAME
-gxditview \- display gtroff output files
-.SH SYNOPSIS
-.B gxditview
-.RI [\fB\- toolkitoption\ .\|.\|.\|]
-.RI [\fB\- option\ .\|.\|.\|]
-.RI [ filename ]
-.SH DESCRIPTION
-The
-.I gxditview
-program displays gtroff output on an X display.
-It uses the standard X11 fonts,
-so it does not require access to the server machine for font loading.
-.PP
-If
-.I filename
-is
-.BR \- ,
-.I gxditview
-will read the standard input.
-.PP
-The left mouse button brings up a menu with the following entries:
-.TP 8
-.B "Next Page"
-Display the next page.
-.TP
-.B "Previous Page"
-Display the previous page.
-.TP
-.B "Select Page"
-Select a particular numbered page specified by a dialog box.
-.TP
-.B Print
-Print the gtroff output using a command specified by a dialog box.
-The default command initially displayed is controlled by the
-.B printCommand
-application resource, and by the
-.B \-printCommand
-option.
-.TP
-.B Open
-Open for display a new file specified by a dialog box.
-The file should contain gtroff output.
-If the filename starts with
-.B |
-it will be taken to be a command to read from.
-.TP
-.B Quit
-Exit from
-.IR gxditview .
-.PP
-The
-.BR n ,
-Space
-and Return keys are bound to the
-.B Next\ Page
-action.
-The
-.BR p ,
-BackSpace
-and
-Delete
-keys are bound to the
-.B Previous\ Page
-action.
-The
-.B q
-key is bound to the
-.B Quit
-action.
-The
-.B r
-key is bound to the
-.B Rerasterize
-action which rereads the current file, and redisplays the current page;
-if the current file is a command, the command will be reexecuted.
-.PP
-The
-.B paperlength
-and
-.B paperwidth
-commands in the DESC file specify the length and width in machine units
-of the virtual page displayed by
-.IR gxditview .
-.SH OPTIONS
-.I Gxditview
-accepts all of the standard X Toolkit command line options along with the
-additional options listed below:
-.TP 8
-.B \-help
-This option indicates that a brief summary of the allowed options should be
-printed.
-.TP
-.B \-page
-This option specifies the page number of the document to be displayed.
-.TP
-.BI \-backingStore\ backing-store-type
-Redisplay of the gtroff output window can take upto a second or so,
-this option causes the server to save the window contents so that when
-it is scrolled around the viewport, the window is painted from
-contents saved in backing store.
-.I backing-store-type
-can be one of
-.BR Always ,
-.B WhenMapped
-or
-.BR NotUseful .
-.TP
-.BI \-printCommand\ command
-The default command displayed in the dialog box for the
-.B Print
-menu entry will be
-.IR command .
-.TP
-.BI \-resolution\ res
-The gtroff output file will be displayed at a resolution of
-.I res
-dpi,
-unless the DESC file contains the
-.B X11
-command, in which case the device resolution will be used.
-This corresponds the
-.I Dvi
-widget's
-.B resolution
-resource.
-The default is 75.
-.TP
-.BI \-filename\ string
-The default filename displayed in the dialog box for the
-.B Open
-menu entry will be
-.IR string .
-This can be either a filename, or a command starting with
-.BR | .
-.PP
-The following standard X Toolkit command line arguments are commonly used with
-.IR gxditview :
-.TP 8
-.BI \-bg\ color
-This option specifies the color to use for the background of the window.
-The default is \fIwhite\fP.
-.TP
-.BI \-bd\ color
-This option specifies the color to use for the border of the window.
-The default is \fIblack\fP.
-.TP
-.BI \-bw\ number
-This option specifies the width in pixels of the border surrounding the window.
-.TP
-.BI \-fg\ color
-This option specifies the color to use for displaying text. The default is
-\fIblack\fP.
-.TP
-.BI \-fn\ font
-This option specifies the font to be used for displaying widget text. The
-default is \fIfixed\fP.
-.TP
-.B \-rv
-This option indicates that reverse video should be simulated by swapping
-the foreground and background colors.
-.TP
-.BI \-geometry\ geometry
-This option specifies the preferred size and position of the window.
-.TP
-.BI \-display\ host : display
-This option specifies the X server to contact.
-.TP
-.BI \-xrm\ resourcestring
-This option specifies a resource string to be used.
-.SH X DEFAULTS
-This program uses the
-.I Dvi
-widget in the X Toolkit. It understands all of the core resource names and
-classes as well as:
-.PP
-.TP 8
-.BR width\ (class\ Width )
-Specifies the width of the window.
-.TP
-.BR height\ (class\ Height )
-Specifies the height of the window.
-.TP
-.BR foreground\ (class\ Foreground )
-Specifies the default foreground color.
-.TP
-.BR font\ (class\ Font )
-Specifies the font to be used for error messages.
-.TP
-.BR fontMap\ (class\ FontMap )
-Specifies the mapping from groff font names to X font names. This
-must be a string containing a sequence of lines. Each line contains
-two whitespace separated fields: first the groff font name, and
-secondly the X font name. The default is
-.nf
-"\e
-TR -adobe-times-medium-r-normal--*-100-*-*-*-*-iso8859-1\en\e
-TI -adobe-times-medium-i-normal--*-100-*-*-*-*-iso8859-1\en\e
-TB -adobe-times-bold-r-normal--*-100-*-*-*-*-iso8859-1\en\e
-TBI -adobe-times-bold-i-normal--*-100-*-*-*-*-iso8859-1\en\e
-CR -adobe-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1\en\e
-CI -adobe-courier-medium-o-normal--*-100-*-*-*-*-iso8859-1\en\e
-CB -adobe-courier-bold-r-normal--*-100-*-*-*-*-iso8859-1\en\e
-CBI -adobe-courier-bold-o-normal--*-100-*-*-*-*-iso8859-1\en\e
-HR -adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1\en\e
-HI -adobe-helvetica-medium-o-normal--*-100-*-*-*-*-iso8859-1\en\e
-HB -adobe-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1\en\e
-HBI -adobe-helvetica-bold-o-normal--*-100-*-*-*-*-iso8859-1\en\e
-NR -adobe-new century schoolbook-medium-r-normal--*-100-*-*-*-*-iso8859-1\en\e
-NI -adobe-new century schoolbook-medium-i-normal--*-100-*-*-*-*-iso8859-1\en\e
-NB -adobe-new century schoolbook-bold-r-normal--*-100-*-*-*-*-iso8859-1\en\e
-NBI -adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\en\e
-S -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\en\e
-SS -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\en\e
-"
-.fi
-
-.SH "SEE ALSO"
-.IR X (1),
-.IR xrdb (1),
-.IR gtroff (1),
-.IR groff (1)
-.SH ORIGIN
-This program is derived from xditview;
-portions of xditview originated in xtroff which was derived
-from suntroff.
-.SH COPYRIGHT
-Copyright 1989, Massachusetts Institute of Technology.
-.br
-See
-.IR X (1)
-for a full statement of rights and permissions.
-.SH AUTHORS
-Keith Packard (MIT X Consortium)
-.br
-Richard L. Hyde (Purdue)
-.br
-David Slattengren (Berkeley)
-.br
-Malcolm Slaney (Schlumberger Palo Alto Research)
-.br
-Mark Moraes (University of Toronto)
-.br
-James Clark
diff --git a/contrib/groff/src/xditview/lex.c b/contrib/groff/src/xditview/lex.c
deleted file mode 100644
index 32831bdacd43..000000000000
--- a/contrib/groff/src/xditview/lex.c
+++ /dev/null
@@ -1,103 +0,0 @@
-#include <X11/Xos.h>
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <stdio.h>
-#include "DviP.h"
-
-DviGetAndPut(dw, cp)
- DviWidget dw;
- int *cp;
-{
- if (dw->dvi.ungot) {
- dw->dvi.ungot = 0;
- *cp = getc (dw->dvi.file);
- }
- else {
- *cp = getc (dw->dvi.file);
- if (*cp != EOF)
- putc (*cp, dw->dvi.tmpFile);
- }
- return *cp;
-}
-
-char *
-GetLine(dw, Buffer, Length)
- DviWidget dw;
- char *Buffer;
- int Length;
-{
- int i = 0, c;
-
- Length--; /* Save room for final '\0' */
-
- while (DviGetC (dw, &c) != EOF) {
- if (Buffer && i < Length)
- Buffer[i++] = c;
- if (c == '\n') {
- DviUngetC(dw, c);
- break;
- }
- }
- if (Buffer)
- Buffer[i] = '\0';
- return Buffer;
-}
-
-char *
-GetWord(dw, Buffer, Length)
- DviWidget dw;
- char *Buffer;
- int Length;
-{
- int i = 0, c;
-
- Length--; /* Save room for final '\0' */
- while (DviGetC(dw, &c) == ' ' || c == '\n')
- ;
- while (c != EOF) {
- if (Buffer && i < Length)
- Buffer[i++] = c;
- if (DviGetC(dw, &c) == ' ' || c == '\n') {
- DviUngetC(dw, c);
- break;
- }
- }
- if (Buffer)
- Buffer[i] = '\0';
- return Buffer;
-}
-
-GetNumber(dw)
- DviWidget dw;
-{
- int i = 0, c;
- int negative = 0;
-
- while (DviGetC(dw, &c) == ' ' || c == '\n')
- ;
- if (c == '-') {
- negative = 1;
- DviGetC(dw, &c);
- }
-
- for (; c >= '0' && c <= '9'; DviGetC(dw, &c)) {
- if (negative)
- i = i*10 - (c - '0');
- else
- i = i*10 + c - '0';
- }
- if (c != EOF)
- DviUngetC(dw, c);
- return i;
-}
-
-/*
-Local Variables:
-c-indent-level: 8
-c-continued-statement-offset: 8
-c-brace-offset: -8
-c-argdecl-indent: 8
-c-label-offset: -8
-c-tab-always-indent: nil
-End:
-*/
diff --git a/contrib/groff/src/xditview/page.c b/contrib/groff/src/xditview/page.c
deleted file mode 100644
index 9284199cde8d..000000000000
--- a/contrib/groff/src/xditview/page.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * page.c
- *
- * map page numbers to file position
- */
-
-#include <X11/Xos.h>
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <stdio.h>
-#include <ctype.h>
-#include "DviP.h"
-
-#ifdef X_NOT_STDC_ENV
-extern long ftell();
-#endif
-
-static DviFileMap *
-MapPageNumberToFileMap (dw, number)
- DviWidget dw;
- int number;
-{
- DviFileMap *m;
-
- for (m = dw->dvi.file_map; m; m=m->next)
- if (m->page_number == number)
- break;
- return m;
-}
-
-DestroyFileMap (m)
- DviFileMap *m;
-{
- DviFileMap *next;
-
- for (; m; m = next) {
- next = m->next;
- XtFree ((char *) m);
- }
-}
-
-ForgetPagePositions (dw)
- DviWidget dw;
-{
- DestroyFileMap (dw->dvi.file_map);
- dw->dvi.file_map = 0;
-}
-
-RememberPagePosition(dw, number)
- DviWidget dw;
- int number;
-{
- DviFileMap *m;
-
- if (!(m = MapPageNumberToFileMap (dw, number))) {
- m = (DviFileMap *) XtMalloc (sizeof *m);
- m->page_number = number;
- m->next = dw->dvi.file_map;
- dw->dvi.file_map = m;
- }
- if (dw->dvi.tmpFile)
- m->position = ftell (dw->dvi.tmpFile);
- else
- m->position = ftell (dw->dvi.file);
-}
-
-SearchPagePosition (dw, number)
- DviWidget dw;
- int number;
-{
- DviFileMap *m;
-
- if (!(m = MapPageNumberToFileMap (dw, number)))
- return -1;
- return m->position;
-}
-
-FileSeek(dw, position)
-DviWidget dw;
-long position;
-{
- if (dw->dvi.tmpFile) {
- dw->dvi.readingTmp = 1;
- fseek (dw->dvi.tmpFile, position, 0);
- } else
- fseek (dw->dvi.file, position, 0);
-}
-
diff --git a/contrib/groff/src/xditview/parse.c b/contrib/groff/src/xditview/parse.c
deleted file mode 100644
index e1df8c9dcbb2..000000000000
--- a/contrib/groff/src/xditview/parse.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * parse.c
- *
- * parse dvi input
- */
-
-#include <X11/Xos.h>
-#include <X11/IntrinsicP.h>
-#include <X11/StringDefs.h>
-#include <stdio.h>
-#include <ctype.h>
-#include "DviP.h"
-
-static int StopSeen = 0;
-static ParseDrawFunction(), ParseDeviceControl();
-static push_env(), pop_env();
-
-#define HorizontalMove(dw, delta) ((dw)->dvi.state->x += (delta))
-
-
-ParseInput(dw)
- register DviWidget dw;
-{
- int n, k;
- int c;
- char Buffer[BUFSIZ];
- int NextPage;
- int otherc;
-
- StopSeen = 0;
-
- /*
- * make sure some state exists
- */
-
- if (!dw->dvi.state)
- push_env (dw);
- for (;;) {
- switch (DviGetC(dw, &c)) {
- case '\n':
- break;
- case ' ': /* when input is text */
- case 0: /* occasional noise creeps in */
- break;
- case '{': /* push down current environment */
- push_env(dw);
- break;
- case '}':
- pop_env(dw);
- break;
- /*
- * two motion digits plus a character
- */
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- HorizontalMove(dw, (c-'0')*10 +
- DviGetC(dw,&otherc)-'0');
- /* fall through */
- case 'c': /* single ascii character */
- DviGetC(dw,&c);
- if (c == ' ')
- break;
- Buffer[0] = c;
- Buffer[1] = '\0';
- (void) PutCharacter (dw, Buffer);
- break;
- case 'C':
- GetWord (dw, Buffer, BUFSIZ);
- (void) PutCharacter (dw, Buffer);
- break;
- case 't':
- Buffer[1] = '\0';
- while (DviGetC (dw, &c) != EOF
- && c != ' ' && c != '\n') {
- Buffer[0] = c;
- HorizontalMove (dw, PutCharacter (dw, Buffer));
- }
- break;
- case 'u':
- n = GetNumber(dw);
- Buffer[1] = '\0';
- while (DviGetC (dw, &c) == ' ')
- ;
- while (c != EOF && c != ' ' && c != '\n') {
- Buffer[0] = c;
- HorizontalMove (dw,
- PutCharacter (dw, Buffer) + n);
- DviGetC (dw, &c);
- }
- break;
-
- case 'D': /* draw function */
- (void) GetLine(dw, Buffer, BUFSIZ);
- if (dw->dvi.display_enable)
- ParseDrawFunction(dw, Buffer);
- break;
- case 's': /* ignore fractional sizes */
- n = GetNumber(dw);
- dw->dvi.state->font_size = n;
- break;
- case 'f':
- n = GetNumber(dw);
- dw->dvi.state->font_number = n;
- break;
- case 'H': /* absolute horizontal motion */
- k = GetNumber(dw);
- HorizontalGoto(dw, k);
- break;
- case 'h': /* relative horizontal motion */
- k = GetNumber(dw);
- HorizontalMove(dw, k);
- break;
- case 'w': /* word space */
- Word (dw);
- break;
- case 'V':
- n = GetNumber(dw);
- VerticalGoto(dw, n);
- break;
- case 'v':
- n = GetNumber(dw);
- VerticalMove(dw, n);
- break;
- case 'P': /* new spread */
- break;
- case 'p': /* new page */
- (void) GetNumber(dw);
- NextPage = dw->dvi.current_page + 1;
- RememberPagePosition(dw, NextPage);
- FlushCharCache (dw);
- return(NextPage);
- case 'N':
- n = GetNumber(dw);
- PutNumberedCharacter (dw, n);
- break;
- case 'n': /* end of line */
- GetNumber(dw);
- GetNumber(dw);
- Newline (dw);
- HorizontalGoto(dw, 0);
- break;
- case 'F': /* input files */
- case '+': /* continuation of X device control */
- case '#': /* comment */
- GetLine(dw, NULL, 0);
- break;
- case 'x': /* device control */
- ParseDeviceControl(dw);
- break;
- case EOF:
- dw->dvi.last_page = dw->dvi.current_page;
- FlushCharCache (dw);
- return dw->dvi.current_page;
- default:
- break;
- }
- }
-}
-
-static
-push_env(dw)
- DviWidget dw;
-{
- DviState *new;
-
- new = (DviState *) XtMalloc (sizeof (*new));
- if (dw->dvi.state)
- *new = *(dw->dvi.state);
- else {
- new->font_size = 10;
- new->font_number = 1;
- new->x = 0;
- new->y = 0;
- }
- new->next = dw->dvi.state;
- dw->dvi.state = new;
-}
-
-static
-pop_env(dw)
- DviWidget dw;
-{
- DviState *old;
-
- old = dw->dvi.state;
- dw->dvi.state = old->next;
- XtFree ((char *) old);
-}
-
-static
-InitTypesetter (dw)
- DviWidget dw;
-{
- while (dw->dvi.state)
- pop_env (dw);
- push_env (dw);
- FlushCharCache (dw);
-}
-
-#define DRAW_ARGS_MAX 128
-
-static
-ParseDrawFunction(dw, buf)
-DviWidget dw;
-char *buf;
-{
- int v[DRAW_ARGS_MAX];
- int i;
- char *ptr;
-
- v[0] = v[1] = v[2] = v[3] = 0;
-
- if (buf[0] == '\0')
- return;
- ptr = buf+1;
-
- for (i = 0; i < DRAW_ARGS_MAX; i++) {
- if (sscanf(ptr, "%d", v + i) != 1)
- break;
- while (*ptr == ' ')
- ptr++;
- while (*ptr != '\0' && *ptr != ' ')
- ptr++;
- }
-
- switch (buf[0]) {
- case 'l': /* draw a line */
- DrawLine(dw, v[0], v[1]);
- break;
- case 'c': /* circle */
- DrawCircle(dw, v[0]);
- break;
- case 'C':
- DrawFilledCircle(dw, v[0]);
- break;
- case 'e': /* ellipse */
- DrawEllipse(dw, v[0], v[1]);
- break;
- case 'E':
- DrawFilledEllipse(dw, v[0], v[1]);
- break;
- case 'a': /* arc */
- DrawArc(dw, v[0], v[1], v[2], v[3]);
- break;
- case 'p':
- DrawPolygon(dw, v, i);
- break;
- case 'P':
- DrawFilledPolygon(dw, v, i);
- break;
- case '~': /* wiggly line */
- DrawSpline(dw, v, i);
- break;
- case 't':
- dw->dvi.line_thickness = v[0];
- break;
- case 'f':
- if (i > 0 && v[0] >= 0 && v[0] <= DVI_FILL_MAX)
- dw->dvi.fill = v[0];
- break;
- default:
-#if 0
- warning("unknown drawing function %s", buf);
-#endif
- break;
- }
-
- if (buf[0] == 'e') {
- if (i > 0)
- dw->dvi.state->x += v[0];
- }
- else {
- while (--i >= 0) {
- if (i & 1)
- dw->dvi.state->y += v[i];
- else
- dw->dvi.state->x += v[i];
- }
- }
-}
-
-static
-ParseDeviceControl(dw) /* Parse the x commands */
- DviWidget dw;
-{
- char str[20], str1[50];
- int c, n;
- extern int LastPage, CurrentPage;
-
- GetWord (dw, str, 20);
- switch (str[0]) { /* crude for now */
- case 'T': /* output device */
- GetWord (dw, str, 20);
- SetDevice (dw, str);
- break;
- case 'i': /* initialize */
- InitTypesetter (dw);
- break;
- case 't': /* trailer */
- break;
- case 'p': /* pause -- can restart */
- break;
- case 's': /* stop */
- StopSeen = 1;
- return;
- case 'r': /* resolution when prepared */
- break;
- case 'f': /* font used */
- n = GetNumber (dw);
- GetWord (dw, str, 20);
- GetLine (dw, str1, 50);
- SetFontPosition (dw, n, str, str1);
- break;
- case 'H': /* char height */
- break;
- case 'S': /* slant */
- break;
- }
- while (DviGetC (dw, &c) != '\n') /* skip rest of input line */
- if (c == EOF)
- return;
- return;
-}
-
-
-/*
-Local Variables:
-c-indent-level: 8
-c-continued-statement-offset: 8
-c-brace-offset: -8
-c-argdecl-indent: 8
-c-label-offset: -8
-c-tab-always-indent: nil
-End:
-*/
diff --git a/contrib/groff/src/xditview/xdit.bm b/contrib/groff/src/xditview/xdit.bm
deleted file mode 100644
index 67b9c8ab56bc..000000000000
--- a/contrib/groff/src/xditview/xdit.bm
+++ /dev/null
@@ -1,14 +0,0 @@
-#define xdit_width 32
-#define xdit_height 32
-static char xdit_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x02, 0x00, 0x00, 0x02,
- 0x8a, 0xa2, 0xfc, 0x03, 0x52, 0x14, 0x03, 0x04, 0x02, 0x80, 0x00, 0x08,
- 0x52, 0x54, 0x00, 0x10, 0x8a, 0x22, 0x8f, 0x23, 0x02, 0x20, 0x06, 0x21,
- 0x8a, 0x12, 0x8c, 0x40, 0x52, 0x14, 0x8c, 0x40, 0x02, 0x10, 0x58, 0x40,
- 0x52, 0x14, 0x30, 0x40, 0x8a, 0x12, 0x30, 0x40, 0x02, 0x10, 0x70, 0x40,
- 0x8a, 0x12, 0xc8, 0x40, 0x52, 0x24, 0xc4, 0xe0, 0x02, 0x20, 0x84, 0xe1,
- 0x52, 0x54, 0xce, 0xf3, 0x8a, 0xa2, 0x00, 0xf8, 0x02, 0x00, 0x03, 0xfc,
- 0x8a, 0x22, 0xfc, 0xf3, 0x52, 0x14, 0x00, 0xc2, 0x02, 0x00, 0x00, 0x02,
- 0x52, 0x14, 0x45, 0x02, 0x8a, 0xa2, 0x28, 0x02, 0x02, 0x00, 0x00, 0x02,
- 0x02, 0x00, 0x00, 0x02, 0xfe, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/contrib/groff/src/xditview/xdit_mask.bm b/contrib/groff/src/xditview/xdit_mask.bm
deleted file mode 100644
index f34a4f863f02..000000000000
--- a/contrib/groff/src/xditview/xdit_mask.bm
+++ /dev/null
@@ -1,14 +0,0 @@
-#define xdit_mask_width 32
-#define xdit_mask_height 32
-static char xdit_mask_bits[] = {
- 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07,
- 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x1f,
- 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xc7,
- 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07,
- 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff --git a/contrib/groff/src/xditview/xditview.c b/contrib/groff/src/xditview/xditview.c
deleted file mode 100644
index e836cf507e5a..000000000000
--- a/contrib/groff/src/xditview/xditview.c
+++ /dev/null
@@ -1,594 +0,0 @@
-/*
- * Copyright 1991 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of M.I.T. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission. M.I.T. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- */
-/*
- * xditview --
- *
- * Display ditroff output in an X window
- */
-
-#ifndef SABER
-#ifndef lint
-static char rcsid[] = "$XConsortium: xditview.c,v 1.17 89/12/10 17:05:08 rws Exp $";
-#endif /* lint */
-#endif /* SABER */
-
-#include <X11/Xatom.h>
-#include <X11/Xlib.h>
-#include <X11/Xos.h>
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Paned.h>
-#include <X11/Xaw/Viewport.h>
-#include <X11/Xaw/Box.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Xaw/Label.h>
-#include <X11/Xaw/SimpleMenu.h>
-#include <X11/Xaw/SmeBSB.h>
-
-#include <signal.h>
-
-#include "Dvi.h"
-
-#include "xdit.bm"
-#include "xdit_mask.bm"
-#include "stdio.h"
-
-extern FILE *popen();
-extern void exit();
-
-static String fallback_resources[] = {
-#include "GXditview-ad.h"
- NULL
-};
-
-static struct app_resources {
- char *print_command;
- char *filename;
-} app_resources;
-
-#define offset(field) XtOffset(struct app_resources *, field)
-
-/* Application resources. */
-
-static XtResource resources[] = {
- {"printCommand", "PrintCommand", XtRString, sizeof(char*),
- offset(print_command), XtRString, NULL},
- {"filename", "Filename", XtRString, sizeof(char*),
- offset(filename), XtRString, NULL},
-};
-
-#undef offset
-
-/* Command line options table. Only resources are entered here...there is a
- pass over the remaining options after XtParseCommand is let loose. */
-
-static XrmOptionDescRec options[] = {
-{"-page", "*dvi.pageNumber", XrmoptionSepArg, NULL},
-{"-backingStore", "*dvi.backingStore", XrmoptionSepArg, NULL},
-{"-resolution", "*dvi.resolution", XrmoptionSepArg, NULL},
-{"-printCommand", ".printCommand", XrmoptionSepArg, NULL},
-{"-filename", ".filename", XrmoptionSepArg, NULL},
-{"-noPolyText", "*dvi.noPolyText", XrmoptionNoArg, "TRUE"},
-};
-
-static char current_print_command[1024];
-
-static char current_file_name[1024];
-static FILE *current_file;
-
-/*
- * Report the syntax for calling xditview.
- */
-
-static
-Syntax(call)
- char *call;
-{
- (void) printf ("Usage: %s [-fg <color>] [-bg <color>]\n", call);
- (void) printf (" [-bd <color>] [-bw <pixels>] [-help]\n");
- (void) printf (" [-display displayname] [-geometry geom]\n");
- (void) printf (" [-page <page-number>] [-backing <backing-store>]\n");
- (void) printf (" [-resolution <res>] [-print <command>]\n");
- (void) printf (" [-filename <file>] [filename]\n\n");
- exit(1);
-}
-
-static void NewFile (), SetPageNumber ();
-static Widget toplevel, paned, viewport, dvi;
-static Widget page;
-static Widget simpleMenu;
-
-static void NextPage(), PreviousPage(), SelectPage(), OpenFile(), Quit();
-static void Print();
-
-static struct menuEntry {
- char *name;
- void (*function)();
-} menuEntries[] = {
- "nextPage", NextPage,
- "previousPage", PreviousPage,
- "selectPage", SelectPage,
- "print", Print,
- "openFile", OpenFile,
- "quit", Quit,
-};
-
-static void NextPageAction(), PreviousPageAction(), SelectPageAction();
-static void OpenFileAction(), QuitAction();
-static void AcceptAction(), CancelAction();
-static void PrintAction();
-static void RerasterizeAction();
-
-XtActionsRec xditview_actions[] = {
- "NextPage", NextPageAction,
- "PreviousPage", PreviousPageAction,
- "SelectPage", SelectPageAction,
- "Print", PrintAction,
- "OpenFile", OpenFileAction,
- "Rerasterize", RerasterizeAction,
- "Quit", QuitAction,
- "Accept", AcceptAction,
- "Cancel", CancelAction,
-};
-
-#define MenuNextPage 0
-#define MenuPreviousPage 1
-#define MenuSelectPage 2
-#define MenuPrint 3
-#define MenuOpenFile 4
-#define MenuQuit 5
-
-static char pageLabel[256] = "Page <none>";
-
-int main(argc, argv)
- int argc;
- char **argv;
-{
- char *file_name = 0;
- int i;
- static Arg labelArgs[] = {
- {XtNlabel, (XtArgVal) pageLabel},
- };
- XtAppContext xtcontext;
- Arg topLevelArgs[2];
- Widget entry;
- Arg pageNumberArgs[1];
- int page_number;
-
- toplevel = XtAppInitialize(&xtcontext, "GXditview",
- options, XtNumber (options),
- &argc, argv, fallback_resources, NULL, 0);
- if (argc > 2)
- Syntax(argv[0]);
-
- XtGetApplicationResources(toplevel, (XtPointer)&app_resources,
- resources, XtNumber(resources),
- NULL, (Cardinal) 0);
- if (app_resources.print_command)
- strcpy(current_print_command, app_resources.print_command);
-
- XtAppAddActions(xtcontext, xditview_actions, XtNumber (xditview_actions));
-
- XtSetArg (topLevelArgs[0], XtNiconPixmap,
- XCreateBitmapFromData (XtDisplay (toplevel),
- XtScreen(toplevel)->root,
- xdit_bits, xdit_width, xdit_height));
-
- XtSetArg (topLevelArgs[1], XtNiconMask,
- XCreateBitmapFromData (XtDisplay (toplevel),
- XtScreen(toplevel)->root,
- xdit_mask_bits,
- xdit_mask_width, xdit_mask_height));
- XtSetValues (toplevel, topLevelArgs, 2);
- if (argc > 1)
- file_name = argv[1];
-
- /*
- * create the menu and insert the entries
- */
- simpleMenu = XtCreatePopupShell ("menu", simpleMenuWidgetClass, toplevel,
- NULL, 0);
- for (i = 0; i < XtNumber (menuEntries); i++) {
- entry = XtCreateManagedWidget(menuEntries[i].name,
- smeBSBObjectClass, simpleMenu,
- NULL, (Cardinal) 0);
- XtAddCallback(entry, XtNcallback, menuEntries[i].function, NULL);
- }
-
- paned = XtCreateManagedWidget("paned", panedWidgetClass, toplevel,
- NULL, (Cardinal) 0);
- viewport = XtCreateManagedWidget("viewport", viewportWidgetClass, paned,
- NULL, (Cardinal) 0);
- dvi = XtCreateManagedWidget ("dvi", dviWidgetClass, viewport, NULL, 0);
- page = XtCreateManagedWidget ("label", labelWidgetClass, paned,
- labelArgs, XtNumber (labelArgs));
- XtSetArg (pageNumberArgs[0], XtNpageNumber, &page_number);
- XtGetValues (dvi, pageNumberArgs, 1);
- if (file_name)
- NewFile (file_name);
- /* NewFile modifies current_file_name, so do this here. */
- if (app_resources.filename)
- strcpy(current_file_name, app_resources.filename);
- XtRealizeWidget (toplevel);
- if (file_name)
- SetPageNumber (page_number);
- XtAppMainLoop(xtcontext);
- return 0;
-}
-
-static void
-SetPageNumber (number)
-{
- Arg arg[2];
- int actual_number, last_page;
-
- XtSetArg (arg[0], XtNpageNumber, number);
- XtSetValues (dvi, arg, 1);
- XtSetArg (arg[0], XtNpageNumber, &actual_number);
- XtSetArg (arg[1], XtNlastPageNumber, &last_page);
- XtGetValues (dvi, arg, 2);
- if (actual_number == 0)
- sprintf (pageLabel, "Page <none>");
- else if (last_page > 0)
- sprintf (pageLabel, "Page %d of %d", actual_number, last_page);
- else
- sprintf (pageLabel, "Page %d", actual_number);
- XtSetArg (arg[0], XtNlabel, pageLabel);
- XtSetValues (page, arg, 1);
-}
-
-static void
-SelectPageNumber (number_string)
-char *number_string;
-{
- SetPageNumber (atoi(number_string));
-}
-
-static int hadFile = 0;
-
-static void
-NewFile (name)
-char *name;
-{
- Arg arg[2];
- char *n;
- FILE *new_file;
- Boolean seek = 0;
-
- if (current_file) {
- if (!strcmp (current_file_name, "-"))
- ;
- else if (current_file_name[0] == '|')
- pclose (current_file);
- else
- fclose (current_file);
- }
- if (!strcmp (name, "-"))
- new_file = stdin;
- else if (name[0] == '|')
- new_file = popen (name+1, "r");
- else {
- new_file = fopen (name, "r");
- seek = 1;
- }
- if (!new_file) {
- /* XXX display error message */
- return;
- }
- XtSetArg (arg[0], XtNfile, new_file);
- XtSetArg (arg[1], XtNseek, seek);
- XtSetValues (dvi, arg, 2);
- if (hadFile || name[0] != '-' || name[1] != '\0') {
- XtSetArg (arg[0], XtNtitle, name);
- if (name[0] != '/' && (n = strrchr (name, '/')))
- n = n + 1;
- else
- n = name;
- XtSetArg (arg[1], XtNiconName, n);
- XtSetValues (toplevel, arg, 2);
- }
- hadFile = 1;
- SelectPageNumber ("1");
- strcpy (current_file_name, name);
- current_file = new_file;
-}
-
-static char fileBuf[1024];
-
-ResetMenuEntry (entry)
- Widget entry;
-{
- Arg arg[1];
-
- XtSetArg (arg[0], XtNpopupOnEntry, entry);
- XtSetValues (XtParent(entry) , arg, (Cardinal) 1);
-}
-
-/*ARGSUSED*/
-
-static void
-NextPage (entry, name, data)
- Widget entry;
- caddr_t name, data;
-{
- NextPageAction();
- ResetMenuEntry (entry);
-}
-
-static void
-NextPageAction ()
-{
- Arg args[1];
- int number;
-
- XtSetArg (args[0], XtNpageNumber, &number);
- XtGetValues (dvi, args, 1);
- SetPageNumber (number+1);
-}
-
-/*ARGSUSED*/
-
-static void
-PreviousPage (entry, name, data)
- Widget entry;
- caddr_t name, data;
-{
- PreviousPageAction ();
- ResetMenuEntry (entry);
-}
-
-static void
-PreviousPageAction ()
-{
- Arg args[1];
- int number;
-
- XtSetArg (args[0], XtNpageNumber, &number);
- XtGetValues (dvi, args, 1);
- SetPageNumber (number-1);
-}
-
-/* ARGSUSED */
-
-static void
-SelectPage (entry, name, data)
- Widget entry;
- caddr_t name, data;
-{
- SelectPageAction ();
- ResetMenuEntry (entry);
-}
-
-static void
-SelectPageAction ()
-{
- MakePrompt (toplevel, "Page number", SelectPageNumber, "");
-}
-
-
-static void
-DoPrint (name)
- char *name;
-{
- FILE *print_file;
-#ifdef SIGNALRETURNSINT
- int (*handler)();
-#else
- void (*handler)();
-#endif
- /* Avoid dieing because of an invalid command. */
- handler = signal(SIGPIPE, SIG_IGN);
-
- print_file = popen(name, "w");
- if (!print_file)
- /* XXX print error message */
- return;
- DviSaveToFile(dvi, print_file);
- pclose(print_file);
- signal(SIGPIPE, handler);
- strcpy(current_print_command, name);
-}
-
-static void
-RerasterizeAction()
-{
- Arg args[1];
- int number;
-
- if (current_file_name[0] == 0) {
- /* XXX display an error message */
- return;
- }
- XtSetArg (args[0], XtNpageNumber, &number);
- XtGetValues (dvi, args, 1);
- NewFile(current_file_name);
- SetPageNumber (number);
-}
-
-/* ARGSUSED */
-
-static void
-Print (entry, name, data)
- Widget entry;
- caddr_t name, data;
-{
- PrintAction ();
- ResetMenuEntry (entry);
-}
-
-static void
-PrintAction ()
-{
- if (current_print_command[0])
- strcpy (fileBuf, current_print_command);
- else
- fileBuf[0] = '\0';
- MakePrompt (toplevel, "Print command:", DoPrint, fileBuf);
-}
-
-
-/* ARGSUSED */
-
-static void
-OpenFile (entry, name, data)
- Widget entry;
- caddr_t name, data;
-{
- OpenFileAction ();
- ResetMenuEntry (entry);
-}
-
-static void
-OpenFileAction ()
-{
- if (current_file_name[0])
- strcpy (fileBuf, current_file_name);
- else
- fileBuf[0] = '\0';
- MakePrompt (toplevel, "File to open:", NewFile, fileBuf);
-}
-
-/* ARGSUSED */
-
-static void
-Quit (entry, closure, data)
- Widget entry;
- caddr_t closure, data;
-{
- QuitAction ();
-}
-
-static void
-QuitAction ()
-{
- exit (0);
-}
-
-Widget promptShell, promptDialog;
-void (*promptfunction)();
-
-/* ARGSUSED */
-static
-void CancelAction (widget, event, params, num_params)
- Widget widget;
- XEvent *event;
- String *params;
- Cardinal *num_params;
-{
- if (promptShell) {
- XtSetKeyboardFocus(toplevel, (Widget) None);
- XtDestroyWidget(promptShell);
- promptShell = (Widget) 0;
- }
-}
-
-static
-void AcceptAction (widget, event, params, num_params)
- Widget widget;
- XEvent *event;
- String *params;
- Cardinal *num_params;
-{
- (*promptfunction)(XawDialogGetValueString(promptDialog));
- CancelAction (widget, event, params, num_params);
-}
-
-MakePrompt(centerw, prompt, func, def)
-Widget centerw;
-char *prompt;
-void (*func)();
-char *def;
-{
- static Arg dialogArgs[] = {
- {XtNlabel, 0},
- {XtNvalue, 0},
- };
- Arg valueArgs[1];
- Arg centerArgs[2];
- Position source_x, source_y;
- Position dest_x, dest_y;
- Dimension center_width, center_height;
- Dimension prompt_width, prompt_height;
- Widget valueWidget;
-
- CancelAction ((Widget)NULL, (XEvent *) 0, (String *) 0, (Cardinal *) 0);
- promptShell = XtCreatePopupShell ("promptShell", transientShellWidgetClass,
- toplevel, NULL, (Cardinal) 0);
- dialogArgs[0].value = (XtArgVal)prompt;
- dialogArgs[1].value = (XtArgVal)def;
- promptDialog = XtCreateManagedWidget( "promptDialog", dialogWidgetClass,
- promptShell, dialogArgs, XtNumber (dialogArgs));
- XawDialogAddButton(promptDialog, "accept", NULL, (caddr_t) 0);
- XawDialogAddButton(promptDialog, "cancel", NULL, (caddr_t) 0);
- valueWidget = XtNameToWidget (promptDialog, "value");
- if (valueWidget) {
- XtSetArg (valueArgs[0], XtNresizable, TRUE);
- XtSetValues (valueWidget, valueArgs, 1);
- /*
- * as resizable isn't set until just above, the
- * default value will be displayed incorrectly.
- * rectify the situation by resetting the values
- */
- XtSetValues (promptDialog, dialogArgs, XtNumber (dialogArgs));
- }
- XtSetKeyboardFocus (promptDialog, valueWidget);
- XtSetKeyboardFocus (toplevel, valueWidget);
- XtRealizeWidget (promptShell);
- /*
- * place the widget in the center of the "parent"
- */
- XtSetArg (centerArgs[0], XtNwidth, &center_width);
- XtSetArg (centerArgs[1], XtNheight, &center_height);
- XtGetValues (centerw, centerArgs, 2);
- XtSetArg (centerArgs[0], XtNwidth, &prompt_width);
- XtSetArg (centerArgs[1], XtNheight, &prompt_height);
- XtGetValues (promptShell, centerArgs, 2);
- source_x = (center_width - prompt_width) / 2;
- source_y = (center_height - prompt_height) / 3;
- XtTranslateCoords (centerw, source_x, source_y, &dest_x, &dest_y);
- XtSetArg (centerArgs[0], XtNx, dest_x);
- XtSetArg (centerArgs[1], XtNy, dest_y);
- XtSetValues (promptShell, centerArgs, 2);
- XtMapWidget(promptShell);
- promptfunction = func;
-}
-
-/* For DviChar.c */
-
-char *xmalloc(n)
- int n;
-{
- return XtMalloc(n);
-}
-
-/*
-Local Variables:
-c-indent-level: 4
-c-continued-statement-offset: 4
-c-brace-offset: -4
-c-argdecl-indent: 4
-c-label-offset: -4
-c-tab-always-indent: nil
-End:
-*/
diff --git a/contrib/groff/src/xditview/xtotroff.c b/contrib/groff/src/xditview/xtotroff.c
deleted file mode 100644
index 97cac0a5893f..000000000000
--- a/contrib/groff/src/xditview/xtotroff.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * xtotroff
- *
- * convert X font metrics into troff font metrics
- */
-
-#include <X11/Xlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include "XFontName.h"
-#include "DviChar.h"
-
-#ifdef X_NOT_STDC_ENV
-char *malloc();
-#else
-#include <stdlib.h>
-#endif
-
-#define charWidth(fi,c) ((fi)->per_char[(c) - (fi)->min_char_or_byte2].width)
-#define charHeight(fi,c) ((fi)->per_char[(c) - (fi)->min_char_or_byte2].ascent)
-#define charDepth(fi,c) ((fi)->per_char[(c) - (fi)->min_char_or_byte2].descent)
-#define charLBearing(fi,c) ((fi)->per_char[(c) - (fi)->min_char_or_byte2].lbearing)
-#define charRBearing(fi,c) ((fi)->per_char[(c) - (fi)->min_char_or_byte2].rbearing)
-
-Display *dpy;
-int groff_flag = 0;
-unsigned resolution = 75;
-unsigned point_size = 10;
-
-int charExists (fi, c)
- XFontStruct *fi;
- int c;
-{
- XCharStruct *p;
-
- if (c < fi->min_char_or_byte2 || c > fi->max_char_or_byte2)
- return 0;
- p = fi->per_char + (c - fi->min_char_or_byte2);
- return (p->lbearing != 0 || p->rbearing != 0 || p->width != 0
- || p->ascent != 0 || p->descent != 0 || p->attributes != 0);
-}
-
-/* Canonicalize the font name by replacing scalable parts by *s. */
-
-CanonicalizeFontName (font_name, canon_font_name)
- char *font_name, *canon_font_name;
-{
- unsigned int attributes;
- XFontName parsed;
-
- if (!XParseFontName(font_name, &parsed, &attributes)) {
- fprintf (stderr, "not a standard name: %s\n", font_name);
- return 0;
- }
-
- attributes &= ~(FontNamePixelSize|FontNameAverageWidth
- |FontNamePointSize
- |FontNameResolutionX|FontNameResolutionY);
- XFormatFontName(&parsed, attributes, canon_font_name);
- return 1;
-}
-
-int FontNamesAmbiguous(font_name, names, count)
-char *font_name;
-char **names;
-int count;
-{
- char name1[2048], name2[2048];
- int i;
-
- if (count == 1)
- return 0;
-
- for (i = 0; i < count; i++) {
- if (!CanonicalizeFontName(names[i], i == 0 ? name1 : name2)) {
- fprintf(stderr, "bad font name: %s\n", names[i]);
- return 1;
- }
- if (i > 0 && strcmp(name1, name2) != 0) {
- fprintf(stderr, "ambiguous font name: %s\n", font_name);
- fprintf(stderr, " matches %s\n", names[0]);
- fprintf(stderr, " and %s\n", names[i]);
- return 1;
- }
-
- }
- return 0;
-}
-
-MapFont (font_name, troff_name)
- char *font_name;
- char *troff_name;
-{
- XFontStruct *fi;
- int count;
- char **names;
- FILE *out;
- int c;
- unsigned int attributes;
- XFontName parsed;
- int j, k;
- DviCharNameMap *char_map;
- char encoding[256];
- char *s;
- int wid;
- char name_string[2048];
-
- if (!XParseFontName(font_name, &parsed, &attributes)) {
- fprintf (stderr, "not a standard name: %s\n", font_name);
- return 0;
- }
-
- attributes &= ~(FontNamePixelSize|FontNameAverageWidth);
- attributes |= FontNameResolutionX;
- attributes |= FontNameResolutionY;
- attributes |= FontNamePointSize;
- parsed.ResolutionX = resolution;
- parsed.ResolutionY = resolution;
- parsed.PointSize = point_size*10;
- XFormatFontName(&parsed, attributes, name_string);
-
- names = XListFonts (dpy, name_string, 100000, &count);
- if (count < 1) {
- fprintf (stderr, "bad font name: %s\n", font_name);
- return 0;
- }
-
- if (FontNamesAmbiguous(font_name, names, count))
- return 0;
-
- XParseFontName(names[0], &parsed, &attributes);
- sprintf (encoding, "%s-%s", parsed.CharSetRegistry,
- parsed.CharSetEncoding);
- for (s = encoding; *s; s++)
- if (isupper (*s))
- *s = tolower (*s);
- char_map = DviFindMap (encoding);
- if (!char_map) {
- fprintf (stderr, "not a standard encoding: %s\n", encoding);
- return 0;
- }
-
- fi = XLoadQueryFont (dpy, names[0]);
- if (!fi) {
- fprintf (stderr, "font does not exist: %s\n", names[0]);
- return 0;
- }
-
- printf ("%s -> %s\n", names[0], troff_name);
-
- { /* Avoid race while opening file */
- int fd;
- (void) unlink (troff_name);
- fd = open (troff_name, O_WRONLY | O_CREAT | O_EXCL, 0600);
- out = fdopen (fd, "w");
- }
-
- if (!out) {
- perror (troff_name);
- return 0;
- }
- fprintf (out, "name %s\n", troff_name);
- if (!strcmp (char_map->encoding, "adobe-fontspecific"))
- fprintf (out, "special\n");
- if (charExists (fi, ' ')) {
- int w = charWidth (fi, ' ');
- if (w > 0)
- fprintf (out, "spacewidth %d\n", w);
- }
- fprintf (out, "charset\n");
- for (c = fi->min_char_or_byte2; c <= fi->max_char_or_byte2; c++) {
- char *name = DviCharName (char_map,c,0);
- if (charExists (fi, c) && (groff_flag || name)) {
-
- wid = charWidth (fi, c);
-
- fprintf (out, "%s\t%d",
- name ? name : "---",
- wid);
- if (groff_flag) {
- int param[5];
- param[0] = charHeight (fi, c);
- param[1] = charDepth (fi, c);
- param[2] = 0 /* charRBearing (fi, c) - wid */;
- param[3] = 0 /* charLBearing (fi, c) */;
- param[4] = 0; /* XXX */
- for (j = 0; j < 5; j++)
- if (param[j] < 0)
- param[j] = 0;
- for (j = 4; j >= 0; j--)
- if (param[j] != 0)
- break;
- for (k = 0; k <= j; k++)
- fprintf (out, ",%d", param[k]);
- }
- fprintf (out, "\t0\t0%o\n", c);
-
- if (name) {
- for (k = 1; DviCharName(char_map,c,k); k++) {
- fprintf (out, "%s\t\"\n",
- DviCharName (char_map,c,k));
- }
- }
- }
- }
- XUnloadFont (dpy, fi->fid);
- fclose (out);
- return 1;
-}
-
-static usage(prog)
- char *prog;
-{
- fprintf (stderr,
- "usage: %s [-g] [-r resolution] [-s pointsize] FontMap\n",
- prog);
- exit (1);
-}
-
-
-/* For use by DviChar.c */
-
-char *xmalloc(n)
-int n;
-{
- char *p = malloc(n);
- if (!p) {
- fprintf(stderr, "Out of memory\n");
- exit(1);
- }
- return p;
-}
-
-main (argc, argv)
- char **argv;
-{
- char troff_name[1024];
- char font_name[1024];
- char line[1024];
- char *a, *b, c;
- int position;
- FILE *map;
- int opt;
- extern int optind;
- extern char *optarg;
-
- while ((opt = getopt(argc, argv, "gr:s:")) != EOF) {
- switch (opt) {
- case 'g':
- groff_flag = 1;
- break;
- case 'r':
- sscanf(optarg, "%u", &resolution);
- break;
- case 's':
- sscanf(optarg, "%u", &point_size);
- break;
- default:
- usage(argv[0]);
- }
- }
- if (argc - optind != 1)
- usage(argv[0]);
-
- dpy = XOpenDisplay (0);
- if (!dpy) {
- fprintf (stderr, "Can't connect to the X server.\n");
- fprintf (stderr, "Make sure the DISPLAY environment variable is set correctly.\n");
- exit (1);
- }
- position = 1;
-
- map = fopen (argv[optind], "r");
- if (map == NULL) {
- perror (argv[optind]);
- exit (1);
- }
-
- while (fgets (line, sizeof (line), map)) {
- for (a=line,b=troff_name; *a; a++,b++) {
- c = (*b = *a);
- if (c == ' ' || c == '\t')
- break;
- }
- *b = '\0';
- while (*a && (*a == ' ' || *a == '\t'))
- ++a;
- for (b=font_name; *a; a++,b++)
- if ((*b = *a) == '\n')
- break;
- *b = '\0';
- if (!MapFont (font_name, troff_name))
- exit (1);
- ++position;
- }
- exit (0);
-}
-
-/*
-Local Variables:
-c-indent-level: 8
-c-continued-statement-offset: 8
-c-brace-offset: -8
-c-argdecl-indent: 8
-c-label-offset: -8
-c-tab-always-indent: nil
-End:
-*/
diff --git a/contrib/groff/tmac/X.tmac b/contrib/groff/tmac/X.tmac
deleted file mode 100644
index 464770c618f7..000000000000
--- a/contrib/groff/tmac/X.tmac
+++ /dev/null
@@ -1,48 +0,0 @@
-.\" X.tmac
-.\"
-.nr _C \n(.C
-.cp 0
-.ftr CW CR
-.ftr C CR
-.ftr CO CI
-.ftr CX CBI
-.ftr H HR
-.ftr HO HI
-.ftr HX HBI
-.ftr NX NBI
-.char \(ru \D'l .5m 0'
-.char \(ul \v'.25m'\D'l .5m 0'\v'-.25m'
-.char \(br \v'.25m'\D'l 0 -1m'\v'.75m'
-.char \(rn \v'-.75m'\D'l .5m 0'\v'.75m'
-.char ~ \v'-.55m'\\s[\\n(.s/2u]\v'.2m'\(ti\v'-.2m'\s0\v'.55m'
-.char ^ \v'-.55m'\\s[\\n(.s/2u]\v'.3m'\(ha\v'-.3m'\s0\v'.55m'
-.if !c\(va .char \(va \o'\(ua\(da'
-.if !c\(em .char \(em --
-.if !c\(en .char \(en \-
-.if !c\(fi .char \(fi fi
-.if !c\(fl .char \(fl fl
-.if !c\(ff .char \(ff ff
-.if !c\(Fi .char \(Fi ffi
-.if !c\(Fl .char \(Fl ffl
-.if !c\(ci .char \(ci \v'-.25m'\h'.05m'\D'c .5m'\h'.05m'\v'.25m'
-.if !c\(sq .char \(sq \h'.05m'\D'l .5m 0'\D'l 0 -.5m'\D'l -.5m 0'\D'l 0 .5m'\h'.55m'
-.if !c\(ga .char \(ga \Z'\v'-.7m'\D'l .22m .18m''\h'.33m'
-.if !c\(dg .char \(dg \Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\
-\D'l .39m 0''\h'.5m'
-.if !c\(dd .char \(dd \Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\
-\D'l .39m 0'\v'.4m'\D'l -.39m 0''\h'.5m'
-.if !c\(lq .char \(lq ``
-.if !c\(rq .char \(rq ''
-.if !c\(Bq .char \(Bq ,,
-.if !c\(OE .char \(OE O\h'-.25m'E
-.if !c\(oe .char \(oe o\h'-.14m'e
-.if !c\(ah .char \(ah \v'-.55m'\s[\En[.s]/2u]v\s0\v'.55m'
-.if !c\(ao .char \(ao \v'-.55m'\s[\En[.s]*6u/10u]\D'c .25m'\s0\v'.55m'
-.if !c\(ho .char \(ho \s[\En[.s]/2u]\v'.4m'c\v'-.4m'\s0
-.if !c\(lh .tr \(lh\(lA
-.if !c\(rh .tr \(rh\(rA
-.if !c\(bq .tr \(bq,
-.if !c\(aq .tr \(aq'
-.if '\*(.T'X100' .char \[radicalex] \h'-\w'\(sr'u'\[radicalex]\h'\w'\(sr'u'
-.if !\n(_C .mso pspic.tmac
-.cp \n(_C
diff --git a/contrib/groff/tmac/Xps.tmac b/contrib/groff/tmac/Xps.tmac
deleted file mode 100644
index ddb037a0def9..000000000000
--- a/contrib/groff/tmac/Xps.tmac
+++ /dev/null
@@ -1,46 +0,0 @@
-.\" Xps.tmac
-.\"
-.do mso ps.tmac
-.nr _C \n(.C
-.cp 0
-.de Xps-char
-.char \\$1 \Z"\X'ps: invis'\\$2\X'ps: endinvis'"\\$1
-..
-.Xps-char \(bu \fS\(bu\fP
-.Xps-char \(em "\v'-.25m'\h'.05m'\D'l .9m 0'\h'.05m'"
-.Xps-char \(aq '
-.Xps-char \(bq ,
-.Xps-char \(Bq ,,
-.Xps-char \(lq ``
-.Xps-char \(rq ''
-.Xps-char \(OE OE
-.Xps-char \(oe oe
-.Xps-char \(Fn \fS\(Fn\fP
-.Xps-char \(vS \o'\(ahS'
-.Xps-char \(vs \o'\(ahs'
-.Xps-char \(vZ \o'\(ahZ'
-.Xps-char \(vz \o'\(ahz'
-.Xps-char \(/L \o'/L'
-.Xps-char \(/l \o'/l'
-.Xps-char \(:Y \o'\(adY'
-.Xps-char \(a" \(sd
-.Xps-char \(a. \v'-.6m'.
-.Xps-char \(ga "\Z'\v'-.7m'\D'l .22m .18m''\h'.33m'"
-.Xps-char \(ab \v'-.55m'\s'\\\\n(.s*6u/10u'u\s0
-.Xps-char \(ah \v'-.55m'\s[\En[.s]/2u]v\s0\v'.55m'
-.Xps-char \(ao "\v'-.55m'\s[\En[.s]*6u/10u]\D'c .25m'\s0\v'.55m'"
-.Xps-char \(ho \s[\En[.s]/2u]\v'.4m'c\v'-.4m'\s0
-.Xps-char \(.i i
-.Xps-char \(fo <
-.Xps-char \(fc >
-.Xps-char \(OK \s'\\\\n(.s*6u/10u'\e\s0/
-.Xps-char \(tm \v'-.3m'\s'\\\\n(.s*6u/10u'TM\s0\v'.3m'
-.Xps-char \(dd "\Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\
-\D'l .39m 0'\v'.4m'\D'l -.39m 0''\h'.5m'"
-.Xps-char \(dg "\Z'\h'.25m'\v'.15m'\D'l 0 -.8m'\v'.2m'\h'-.195m'\
-\D'l .39m 0''\h'.5m'"
-.Xps-char \(en \-
-.Xps-char \(%0 %\s'\\\\n(.s*6u/10u'\fI0\fP\s0
-.Xps-char \(lh \(->
-.Xps-char \(rh \(<-
-.cp \n(_C
diff --git a/contrib/groff/tmac/a4.tmac b/contrib/groff/tmac/a4.tmac
deleted file mode 100644
index 5001939dd5cb..000000000000
--- a/contrib/groff/tmac/a4.tmac
+++ /dev/null
@@ -1,12 +0,0 @@
-.\" a4.tmac
-.\"
-.\" Set up groff for A4 paper. Must be called before any other macro
-.\" package. For correct PS output, you must also set the
-.\" `paperlength' keyword in devps/DESC to 841890 in case groff hasn't
-.\" guessed it correctly during configuration.
-.
-.pl 29.7c
-.ll 21c-2i
-.
-.\" for ms
-.if !rLL .nr LL \n[.l]u
diff --git a/contrib/groff/tmac/an-old.tmac b/contrib/groff/tmac/an-old.tmac
deleted file mode 100644
index 9ef041f93ecc..000000000000
--- a/contrib/groff/tmac/an-old.tmac
+++ /dev/null
@@ -1,478 +0,0 @@
-.\" an-old.tmac
-.\"
-.\" Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc.
-.\" Written by James Clark (jjc@jclark.com)
-.\"
-.\" This file is part of groff.
-.\"
-.\" groff is free software; you can redistribute it and/or modify it under
-.\" the terms of the GNU General Public License as published by the Free
-.\" Software Foundation; either version 2, or (at your option) any later
-.\" version.
-.\"
-.\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
-.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-.\" for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License along
-.\" with groff; see the file COPYING. If not, write to the Free Software
-.\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-.\"
-.\" -rcR=1 => Create a single, very long page instead of multiple pages.
-.\" Useful for online display. Default in nroff mode.
-.\" Desactivate with -rcR=0.
-.\" -rC1 => Number pages continuously, rather than start each at 1.
-.\" -rD1 => Double-sided printing, ie different odd and even page footers.
-.\" -rPnnn => Number first page nnn.
-.\" -rSxx => Use size `xx'pt (either 10, 11, or 12) for document rather
-.\" than the default size of 10pt.
-.\" -rXnnn => Number pages after nnn as nnna, nnnb, nnnc, ...
-.\"
-.\" The file man.local is loaded at the end. Put local additions there.
-.\" If you need to add things to TH, use `.am TH'.
-.\"
-.
-.if !\n(.g .ab These man macros work only with groff.
-.
-.nr _C \n[.C]
-.cp 0
-.
-.if !r D .nr D 0
-.if !r C .nr C 0
-.if !r S .nr S 10
-.\" we must use consecutive page numbers when using postscript to generate
-.\" html images, and we must not reset the page number at the beginning
-.\" (the `ps4html' register is automatically added to the command line by
-.\" the pre-html preprocessor)
-.if !r ps4html \
-. if r P .pn 0\n[P]
-.if !r cR \{\
-. ie n .nr cR 1
-. el .nr cR 0
-.\}
-.
-.nr an-html 0
-.if '\*(.T'html' .nr an-html 1
-.if \n[an-html] .nr C 1
-.if r ps4html .nr C 1
-.
-.de set-an-margin
-. nr an-margin \\n[IN]
-..
-.
-.\" .TH title section extra1 extra2 extra3
-.de TH
-. if \\n[an-html] \{\
-. HTML-TAG ".tl"
-\\$1
-. \}
-. cp 0
-.
-. de an-init \" We have to do it like this to get multiple man pages right.
-. ds an-title "\\$1
-. ds an-section "\\$2
-. ds an-extra1 "\\$3
-. ie (\\n[.$] > 3) .ds an-extra2 "\\$4
-. el .ds an-extra2 \"Sun Release 4.0
-. ie (\\n[.$] > 4) .ds an-extra3 "\\$5
-. el .ds an-extra3 \"System Programmer's Manual
-. ds an-init
-\\..
-.
-. DT
-.
-. nr PS 10z \" default point size
-. nr PS-SS 10z
-. nr PS-SH 10.95z
-. nr VS 12p
-.
-. \" use sizes similar to LaTeX
-. if t \{\
-. ie (\\n[S] == 11) \{\
-. nr PS 10.95z
-. nr PS-SS 10.95z
-. nr PS-SH 12z
-. nr VS 13.6p
-. \}
-. el \{\
-. if (\\n[S] == 12) \{\
-. nr PS 12z
-. nr PS-SS 12z
-. nr PS-SH 14.4z
-. nr VS 14.5p
-. \}
-. \}
-. \}
-.
-. ps \\n[PS]u
-. vs \\n[VS]u
-.
-. nr IN 7.2n
-. PD
-. nr SN 3n \" the indentation of sub-sub-headings relative to sub-headings
-. nr an-level 1
-. set-an-margin
-. nr an-prevailing-indent \\n[IN]
-. nr an-tag-sep 1n
-.
-. nr an-no-space-flag 0
-. nr an-break-flag 0
-. nr an-div? 0
-.
-. ie \\n[cR] \
-. an-header
-. el \{\
-. wh 0 an-header
-. wh -1i an-footer
-. wh -.5i an-p-footer
-.
-. if (\\n[nl] > 0) \{\
-. ie \\n[C] .bp (\\n[%] + 1)
-. el .bp 1
-. \}
-. \}
-..
-.
-.de DT
-. ta T .5i \" This sets tabs every .5 inches
-..
-.
-.de PD
-. ie \\n[.$] .nr PD (v;\\$1)
-. el .nr PD (.4v >? \n[.V])
-..
-.
-.de an-header
-. an-init
-. ev 1
-. ps \\n[PS]u
-. vs \\n[VS]u
-. ie \\n[an-html] \
-. tl ''''
-. el \{\
-. if !\\n[cR] \
-. sp .5i
-. tl '\\*[an-title](\\*[an-section])'\\*[an-extra3]'\\*[an-title](\\*[an-section])'
-. ie !\\n[cR] \
-. sp |1i
-. el \
-. sp .5i
-. \}
-. ev
-. ns
-..
-.
-.de an-footer
-' bp
-..
-.
-.af an-page-letter a
-.
-.de an-p-footer
-. ev 1
-. ps \\n[PS]u
-. vs \\n[VS]u
-. ie \\n[an-html] \{\
-. ds an-page-string
-. ds an-extra1
-. ds an-extra2
-. \}
-. el \{\
-. ie r X \{\
-. if (\\n[%] > \\n[X]) \{\
-. nr an-page-letter (\\n[%] - \\n[X])
-. ds an-page-string \\n[X]\\n[an-page-letter]
-. \}
-. \}
-. el \{\
-. ie \\n[cR] \
-. ds an-page-string "\\*[an-title](\\*[an-section])
-. el \
-. ds an-page-string \\n[%]
-. \}
-. \}
-. ie \\n[D] \{\
-. if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
-. if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]'
-. \}
-. el \
-. tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]'
-. ev
-..
-.
-.de an-end
-. nr % 1
-. pl +3v
-. fl
-. sp 3
-. an-p-footer
-. pl \\n[nl]u
-..
-.
-.if \n[cR] .em an-end
-.
-.de SH
-. sp \\n[PD]u
-. nr an-level 1
-. set-an-margin
-. nr an-prevailing-indent \\n[IN]
-. fi
-. in \\n[an-margin]u
-. ti 0
-. HTML-TAG ".NH \\n[an-level]"
-. it 1 an-trap
-. nr an-no-space-flag 1
-. nr an-break-flag 1
-. ps \\n[PS-SH]u
-. ft B
-. if !\\n[cR] .ne (2v + 1u)
-. if \\n[.$] \&\\$*
-..
-.
-.de SS
-. sp \\n[PD]u
-. nr an-level 1
-. set-an-margin
-. nr an-prevailing-indent \\n[IN]
-. fi
-. in \\n[IN]u
-. ti \\n[SN]u
-. it 1 an-trap
-. nr an-no-space-flag 1
-. nr an-break-flag 1
-. ps \\n[PS-SS]u
-. ft B
-. if !\\n[cR] .ne (2v + 1u)
-. if \\n[.$] \&\\$*
-..
-.
-.de B
-. it 1 an-trap
-. ft B
-. if \\n[.$] \&\\$*
-..
-.
-.de I
-. it 1 an-trap
-. ft I
-. if \\n[.$] \&\\$*
-..
-.
-.de SM
-. it 1 an-trap
-. ps -1
-. if \\n[.$] \&\\$*
-..
-.
-.de SB
-. it 1 an-trap
-. ps -1
-. ft B
-. if \\n[.$] \&\\$*
-..
-.
-.de TP
-. sp \\n[PD]u
-. if \\n[.$] .nr an-prevailing-indent (n;\\$1)
-. it 1 an-trap
-. if !\\n[an-div?] .di an-div
-. ie \\n[an-html] .in \\n[an-margin]u
-. el \{\
-. in 0
-. ll -\\n[an-margin]u
-. \}
-. nr an-div? 1
-..
-.
-.de an-trap
-. ft R
-. ps \\n[PS]u
-. vs \\n[VS]u
-. if \\n[an-break-flag] \{\
-. br
-. nr an-break-flag 0
-. \}
-. if \\n[an-no-space-flag] \{\
-. ns
-. nr an-no-space-flag 0
-. \}
-. if \\n[an-div?] .an-do-tag
-..
-.
-.de an-do-tag
-. nr an-div? 0
-. br
-. ll
-. di
-. ie (\\n[dl] + \\n[an-tag-sep] > \\n[an-prevailing-indent]) \{\
-. in \\n[an-margin]u
-. if !\\n[cR] .ne (2v + 1u)
-. an-div
-. br
-. in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
-. \}
-. el \{\
-. in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
-. ti -\\n[an-prevailing-indent]u
-. chop an-div
-. if !\\n[cR] .ne (1v + 1u)
-\\*[an-div]\\h'|\\n[an-prevailing-indent]u'\c
-. \}
-..
-.
-.de LP
-. br
-. sp \\n[PD]u
-. ps \\n[PS]u
-. vs \\n[VS]u
-. ft R
-. in \\n[an-margin]u
-. nr an-prevailing-indent \\n[IN]
-..
-.
-.als PP LP
-.als P LP
-.
-.de IP
-. ie !\\n[.$] \{\
-. ps \\n[PS]u
-. vs \\n[VS]u
-. ft R
-. sp \\n[PD]u
-. if !\\n[cR] .ne (1v + 1u)
-. in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
-. \}
-. el \{\
-. ie (\\n[.$] - 1) .TP "\\$2"
-. el .TP
-\&\\$1
-. \}
-..
-.
-.de HP
-. ps \\n[PS]u
-. vs \\n[VS]u
-. ft R
-. sp \\n[PD]u
-. if !\\n[cR] .ne (1v + 1u)
-. if \\n[.$] .nr an-prevailing-indent (n;\\$1)
-. in (\\n[an-margin]u + \\n[an-prevailing-indent]u)
-. ti \\n[an-margin]u
-..
-.
-.ds an-empty \" this is referenced to avoid looping on eg .RB ( \\ )
-.
-.de RI
-. if \\n[.$] \{\
-. ds an-result \&\\$1
-. shift
-. while (\\n[.$] >= 2) \{\
-. as an-result \,\f[I]\\$1\f[R]\/\\$2\\*[an-empty]
-. shift 2
-. \}
-. if \\n[.$] .as an-result \,\f[I]\\$1\f[R]
-\\*[an-result]
-. \}
-..
-.
-.de IR
-. if \\n[.$] \{\
-. ds an-result \&\f[I]\\$1\f[R]
-. shift
-. while (\\n[.$] >= 2) \{\
-. as an-result \/\\$1\f[I]\,\\$2\f[R]
-. shift 2
-. \}
-. if \\n[.$] .as an-result \/\\$1
-\\*[an-result]
-. \}
-..
-.
-.de IB
-. if \\n[.$] \{\
-. ds an-result \&\f[I]\\$1
-. shift
-. while (\\n[.$] >= 2) \{\
-. as an-result \/\f[B]\\$1\f[I]\,\\$2\\*[an-empty]
-. shift 2
-. \}
-. if \\n[.$] .as an-result \/\f[B]\\$1
-\\*[an-result]
-. ft R
-. \}
-..
-.
-.de BI
-. if \\n[.$] \{\
-. ds an-result \&\f[B]\\$1
-. shift
-. while (\\n[.$] >= 2) \{\
-. as an-result \,\f[I]\\$1\f[B]\/\\$2\\*[an-empty]
-. shift 2
-. \}
-. if \\n[.$] .as an-result \,\f[I]\\$1
-\\*[an-result]
-. ft R
-. \}
-..
-.
-.de RB
-. ds an-result \&
-. while (\\n[.$] >= 2) \{\
-. as an-result \f[R]\\$1\f[B]\\$2\\*[an-empty]
-. shift 2
-. \}
-. if \\n[.$] .as an-result \f[R]\\$1
-\\*[an-result]
-. ft R
-..
-.
-.de BR
-. ds an-result \&
-. while (\\n[.$] >= 2) \{\
-. as an-result \f[B]\\$1\f[R]\\$2\\*[an-empty]
-. shift 2
-. \}
-. if \\n[.$] .as an-result \f[B]\\$1
-\\*[an-result]
-. ft R
-..
-.
-.de RS
-. br
-. nr an-saved-margin\\n[an-level] \\n[an-margin]
-. nr an-saved-prevailing-indent\\n[an-level] \\n[an-prevailing-indent]
-. ie \\n[.$] .nr an-margin +(n;\\$1)
-. el .nr an-margin +\\n[an-prevailing-indent]
-. in \\n[an-margin]u
-. nr an-prevailing-indent \\n[IN]
-. nr an-level +1
-..
-.
-.de RE
-. br
-. ie \\n[.$] .nr an-level ((;\\$1) <? \\n[an-level])
-. el .nr an-level -1
-. nr an-level (1 >? \\n[an-level])
-. nr an-margin \\n[an-saved-margin\\n[an-level]]
-. nr an-prevailing-indent \\n[an-saved-prevailing-indent\\n[an-level]]
-. in \\n[an-margin]u
-..
-.
-.ds S \s[\\n[PS]]
-.ie c\[rg] .ds R \[rg]
-.el .ds R (Reg.)
-.ie c\[tm] .ds Tm \[tm]
-.el .ds Tm (TM)
-.ds lq \(lq
-.ds rq \(rq
-.
-.if !\n[an-html] .hy 14
-.
-.\" Load local modifications.
-.mso man.local
-.
-.cp \n[_C]
-.
-.\" end of an-old.tmac
diff --git a/contrib/groff/tmac/an.tmac b/contrib/groff/tmac/an.tmac
deleted file mode 100644
index 2e3c243f513c..000000000000
--- a/contrib/groff/tmac/an.tmac
+++ /dev/null
@@ -1,3 +0,0 @@
-.\" an.tmac
-.\"
-.do mso andoc.tmac
diff --git a/contrib/groff/tmac/andoc.tmac b/contrib/groff/tmac/andoc.tmac
deleted file mode 100644
index f6a16db69c9f..000000000000
--- a/contrib/groff/tmac/andoc.tmac
+++ /dev/null
@@ -1,14 +0,0 @@
-.\" andoc.tmac
-.\"
-.\" Load either an-old.tmac or doc.tmac.
-.if !\n(.g .ab These macros require groff.
-.de Dd
-.rm Dd
-.do mso doc.tmac
-\\*(Dd\\
-..
-.de TH
-.rm TH
-.do mso an-old.tmac
-\\*(TH\\
-..
diff --git a/contrib/groff/tmac/doc-old.tmac b/contrib/groff/tmac/doc-old.tmac
deleted file mode 100644
index 5e5db5928c7f..000000000000
--- a/contrib/groff/tmac/doc-old.tmac
+++ /dev/null
@@ -1,1858 +0,0 @@
-.\"
-.\" Copyright (c) 1990 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)doc-old.tmac 5.2 (Berkeley) 3/13/91
-.\" Slightly modified by jjc@jclark.com to work with groff as well.
-.\"
-.\" Assume nroff on crt's only if cR==1
-.if n .nr cR 1
-.\" STRING CONSTANTS
-.\" DITROFF
-.if t \{\
-.\" Address Style
-.ds aD \fI
-.\" Argument Reference Style
-.ds aR \f(CO
-.\" Interactive Comand Modifier (flag)
-.ds cM \f(CB
-.\" Emphasis (in the English sense - usually italics)
-.ds eM \fI
-.\" Errno Style
-.ds eR \fC
-.\" Environment Variable Style
-.ds eV \fC
-.\" Command Line Flag Style
-.ds fL \f(CB
-.\" Header String Style
-.ds Hs \fR
-.\" Interactive Command Style
-.ds iC \f(CB
-.\" Literal Style
-.ds lI \fC
-.\" Left Parenthesis Style
-.ds lP \fR\|(\|\fP
-.\" Right Parenthesis Style
-.ds rP \fR\|)\|\fP
-.\" Options Open Bracket Style
-.ds lB \fR\^[\^\fP
-.\" Options Open Bracket Style
-.ds rB \fR\^]\fP
-.\" Name (subject of manpage) Style
-.ds nM \f(CB
-.\" Pathname Style
-.ds pA \fC
-.\" Accepted punctuation string for -mdoc syntax
-.ds Pu \fR[.,:;(\^)[\^]\fR]
-.\" Section Header Style
-.ds Sp \s12\fB
-.\" .ds sT \s-2\fR
-.\" Symbolic Emphasis (boldface)
-.ds sY \f(CB
-.\" Generic Variable Style
-.ds vA \fI
-.\" Volume Title Style
-.ds Vs \fR
-.\" Cross Reference STyle (man page only)
-.ds xR \fC
-.\" Math *
-.tr *\(**
-.\}
-.\" NROFF
-.if n \{\
-.\" Address Style
-.ds aD \fI
-.\" Argument Reference Style
-.ds aR \fI
-.\" Interactive Command Modifier (flag)
-.ds cM \fB
-.\" Emphasis (in the English sense - usually italics)
-.ds eM \fI
-.\" Errno Style
-.ds eR \fR
-.\" Environment Variable Style
-.ds eV \fR
-.\" Command Line Flag Style
-.ds fL \fB
-.\" Header String Style
-.ds Hs \fR
-.\" Interactive Command Style
-.ds iC \fB
-.\" Literal Style
-.ds lI \fR
-.\" Left Parenthesis Style
-.ds lP \fR\|(\fP
-.\" Right Parenthesis Style
-.ds rP \fR\|)\fP
-.\" Options Open Bracket Style
-.ds lB \fR\|[\|\fP
-.\" Options Open Bracket Style
-.ds rB \fR\|]\fP
-.\" Name (subject of manpage) Style
-.ds nM \fB
-.\" Pathname Style
-.ds pA \fI
-.\" Accepted punctuation string for -mdoc syntax
-.ds Pu [.,;:()[]]
-.\" Section Header Style
-.ds Sp \s12\fB
-.\" .ds sT \s-2\fR
-.\" .ds sT \s-2\fR
-.\" Symbol, Mode or Mask Style
-.ds sY \fB
-.\" Generic Variable Style
-.ds vA \fI
-.\" Volume Title Style
-.ds Vs \fR
-.\" Cross Reference Style (man page only)
-.ds xR \fR
-.\}
-.\" INDENTS - Subheaders(sI), Text(Ti) between Section Headers and Subsects
-.if t \{\
-. nr sI \w'\fC,'u*5
-. nr Ti \n(sIu
-.\}
-.if n \{\
-. nr sI .5i
-. nr Ti .5i
-.\}
-.\" Flags for macros names which are used only for .Ds
-.nr dI 6n
-.nr dC 1
-.nr dL 1
-.nr dR 1
-.\" INDENT WIDTHS (for Lists)
-.\" Width Needed for Address Tag (indented amount)
-.nr Ad 12n
-.\" Angle Quote Width
-.nr Aq 12n
-.\" Width Needed for Argument
-.nr Ar 12n
-.\" Width Needed for Column offset
-.nr Cl 15n
-.\" Width neeeded for Interactive Command Modifier
-.nr Cm 10n
-.\" Width Needed for Complex Expressions
-.nr Cx 20n
-.\" Indent Width Needed for Display (right and left margins)
-.nr Ds 6n
-.\" Double Quote Width
-.nr Dq 12n
-.\" tI is dependent on Ds and used by .Dp
-.nr tI \n(Dsu
-.\" Width Needed for Display
-.nr Em 10n
-.\" Width Needed for Errno Types
-.nr Er 15n
-.\" Width Needed for Environment Variables
-.nr Ev 15n
-.\" Width Needed for Example Indent
-.nr Ex 10n
-.\" Width Needed for Flag
-.nr Fl 10n
-.\" Width Needed for Function
-.nr Fn 16n
-.\" Width neeeded for Interactive Command Name
-.nr Ic 10n
-.\" Width Needed for Constant
-.nr Li 16n
-.\" Width Needed for Math Symbol ? not sure if needed
-.nr Ms 6n
-.\" Width Needed for Name
-.nr Nm 10n
-.\" Width Needed for Option Begin
-.nr Ob 14n
-.\" Width Needed for Option End
-.nr Oe 14n
-.\" Width Needed for Option (one line)
-.nr Op 14n
-.\" Width Needed for Pathname
-.nr Pa 32n
-.\" Parenthesis Quote Width
-.nr Pq 12n
-.\" Single Quote Width
-.nr Sq 12n
-.\" Width Needed for Symbols, Modes or Masks
-.nr Sy 6n
-.\" Width needed for default or unknown text width
-.nr Tx 22n
-.\" Width Needed for Generic Variable
-.nr Va 12n
-.\" Width Needed for Cross Reference, should the cross ref be annotated.
-.nr Xr 10n
-.\" PARAGRAPH SPACE
-.if t \{\
-. nr Pp .5v
-.\}
-.if n \{\
-. nr Pp 1v
-.\}
-.\" PAGE LAYOUT
-.\" .Li Tagged Paragraph Style - zero if break on oversized tag
-.\" one if add em space and continue filling line.
-.nr tP 0
-.\" Page Layout Macro
-.de pL
-.\" DITROFF
-.ie t \{\
-.\" Header Margin
-. nr Hm .5i
-.\" Footer Margin
-. nr Fm .5i
-.\" Line length
-. nr ll 5.5i
-.\" Line length
-. ll 5.5i
-.\" Title length
-. nr lt 5.5i
-.\" Title length
-. lt 5.5i
-.\" Page offset
-. nr po 1.56i
-.\" Page offset
-. po 1.56i
-.\" Vertical space distance (from Section headers/Lists/Subsections)
-. nr vV .5v
-.\" em space
-. ds tP \|\|\|\|\|\|
-.\}
-.el \{\
-.\" Line length
-. nr ll 78n
-. ll 78n
-.\" Title length
-. nr lt 78n
-.\" Title length
-. lt 78n
-.\" Page offset
-. nr po 0i
-.\" Page offset
-. po 0i
-.\" Vertical space distance (from Section headers/Lists/Subsections)
-. nr vV 1v
-.\" em space
-. ds tP \0\0
-.\" Test for crt
-. ie \\n(cR .nr Hm 0
-. el .nr Hm .5i
-.\" Footer Margin
-. nr Fm .5i
-.\}
-..
-.\" Adjustment mode
-.if n \{\
-.ad l
-.na
-..
-.\}
-.\" PREDEFINED STRINGS
-.if t \{\
-. ds <= \(<=
-. ds >= \(>=
-. ds Lq \&``
-. ds Rq \&''
-. ds ua \(ua
-. ds aa \(aa
-. ds ga \(ga
-. ds sR \(aa
-. ds sL \(ga
-.\}
-.if n \{\
-. ds <= \&<\&=
-. ds >= \&>\&=
-. ds Rq ''
-. ds Lq ``
-. ds ua ^
-. ds aa '
-. ds ga `
-. ds sL `
-. ds sR '
-.\}
-.\" Note: The distances from the bottom or top of the page are set
-.\" in headers (macro .hK): to -1.25 for troff, and -1.167 for nroff
-.\" bottoms, and top is 0.
-.\"
-.\" .Dt Document/manpage_title section/chapter volume
-.\" The \{ and \} is necessary as roff doesn't nest if-elses
-.\" properly, especially with .ds.
-.\" TODO: separate Dt into Dt, Ch and Vt for supp docs.
-.de Dt
-.ds dT UNTITLED
-.ds vT Local
-.ds cH Null
-.\" Volume and Section Number or Chapter Number
-.if !"\\$1"" .ds dT \\$1
-.if !"\\$2"" \{\
-. ds cH \\$2
-. if "\\$3"" \{\
-. \" Volume Title if none given
-. if \\$2>=1 .if \\$2<=8 \{\
-. ds vT UNIX Reference Manual
-. if \\$2>1 .if \\$2<6 .ds vT UNIX Programmer's Manual
-. if "\\$2"8" .ds vT UNIX System Manager's Manual
-. \}
-. if "\\$2"unass" .ds vT DRAFT
-. if "\\$2"draft" .ds vT DRAFT
-. if "\\$2"paper" .ds vT Null
-. \}
-.\}
-.if !"\\$3"" \{\
-. \" Volume Title if given
-. if "\\$3"USD" .ds vT UNIX User's Supplementary Documents
-. if "\\$3"PS1" .ds vT UNIX Programmers's Supplementary Documents
-. if "\\$3"AMD" .ds vT UNIX Ancestral Manual Documents
-. if "\\$3"SMM" .ds vT UNIX System Manager's Manual
-. if "\\$3"URM" .ds vT UNIX Reference Manual
-. if "\\$3"PRM" .ds vT UNIX Programmers's Manual
-. if "\\$3"IND" .ds vT UNIX Manual Master Index
-. if "\\$3"CON" .ds vT UNIX Contributed Software Manual
-. if "\\$3"IMP" .ds vT UNIX Implementation Notes
-. if "\\$3"HOW" .ds vT UNIX How Pocket Manual
-. if "\\$3"LOCAL" .ds vT UNIX Local Manual
-. if "\\*(vT"Local" .ds vT \\$3
-.\}
-..
-.\"
-.\" .Os Operating System/Standard and Release or Version Number
-.\"
-.de Os
-.ds oS Null
-.if "\\$1"" \{\
-. ds oS \fIBSD Experimental\fP
-.\" . ds oS (\fIBag o' Bits\fP)
-.\}
-.if "\\$2"" \{\
-. ds o1 Non-Null
-.\}
-.if "\\$1"ATT" \{\
-. ds oS AT&T
-. if "\\$2"" .as oS \0UNIX
-. if "\\$2"7th" .as oS \07th Edition
-. if "\\$2"7" .as oS \07th Edition
-. if "\\$2"III" .as oS \0System III
-. if "\\$2"3" .as oS \0System III
-. if "\\$2"V" .as oS \0System V
-. if "\\$2"V.2" .as oS \0System V Release 2
-. if "\\$2"V.3" .as oS \0System V Release 3
-. if "\\$2"V.4" .as oS \0System V Release 4
-.\}
-.if "\\$1"BSD" \{\
-. if "\\$2"3" .ds oS 3rd Berkeley Distribution
-. if "\\$2"4" .ds oS 4th Berkeley Distribution
-. if "\\$2"4.1" .ds oS 4.1 Berkeley Distribution
-. if "\\$2"4.2" .ds oS 4.2 Berkeley Distribution
-. if "\\$2"4.3" .ds oS 4.3 Berkeley Distribution
-. if "\\$2"4.3+" .ds oS 4.3+tahoe Berkeley Distribution
-.\}
-.if "\\*(oS"Null" .ds oS \\$1
-.if "\\*(o1"Non-Null" .as oS \0\\$2
-.rm o1
-..
-.\"
-.\" Standards
-.\"
-.\" .de St
-.\" .ds sT Null
-.\" .if "\\$1"POSIX" \{\
-.\" . ds sT IEEE Standard POSIX
-.\" . if \\$2 .as sT \0\\$2
-.\" .\}
-.\" .if "\\$1"ANSI" \{\
-.\" . ds sT ANSI Standard
-.\" . if \\$2 .as sT \0\\$2
-.\" .\}
-.\" .if "\\$1"ISO" \{\
-.\" . ds sT ISO Standard
-.\" . if \\$2 .as sT \0\\$2
-.\" .\}
-.\" .if "\\*(sT"Null" .ds sR \\$3
-.\" ..
-.\"
-.\" .de Gp
-.\" .ie !"\\$1"" .ds gP \&\\$1 \\$2 \\$3 \\$4 \\$5
-.\" .el .ds gP Null
-.\" ..
-.\"
-.\"
-.de Dd
-.nr aa 0
-.ie \\n(.$>0 \{\
-. ie \\n(.$<4 \{\
-. ds dD \\$1 \\$2 \\$3
-. \}
-. el .tm Usage: .Dd Month Day, Year (e.g July 4, 1977).
-.\}
-.el \{\
-. ds dD Epoch
-.\}
-..
-.\"
-.\" House Keeping Macro - Make sense of dT, cH, vT, sT, gP and dS
-.\" TODO: Try to get else's for efficiency
-.\" TODO: GET RID OF .wh -1.167i (its in v7)
-.\"
-.\"
-.de hK
-.nr % 1
-.ds hT \\*(dT
-.if !"\\*(cH"Null" \{\
-. ie !"\\*(gP"Null" .as hT \|(\|\\*(cH\\*(gP\|)
-. el .as hT \\|(\\|\\*(cH\\|)
-.\}
-.if "\\*(cH"Null" .if !"\\*(gP"Null" .as hT \&\|(\|\\*(gP\|)
-.if t \{\
-. wh 0 hM
-. wh -1.25i fM
-.\}
-.if n \{\
-. ie \\n(cR \{\
-. hM
-. wh -0v fM
-. \}
-. el \{\
-. wh 0 hM
-. wh -1.167i fM
-. \}
-.\}
-.if n \{\
-. if \\n(nl==0:\\n(nl==-1 'bp
-.\}
-.if t 'bp
-.em lM
-..
-.\" Header Macro
-.\"
-.de hM
-.ev 1
-.pL
-.if !\\n(cR 'sp \\n(Hmu
-.tl @\\*(Hs\\*(hT\fP@\\*(Vs\\*(vT\fP@\\*(Hs\\*(hT\fP@
-'sp \\n(Hmu
-.ev
-..
-.\"
-.de fM
-.ev 1
-.pL
-.if !\\n(cR \{\
-' sp \\n(Fmu
-. tl @\\*(Hs\\*(oS\fP@\\*(Vs\\*(dD\fP@%@
-' bp
-.\}
-.if \\n(cR \{\
-.\" . tl @\\*(Hs\\*(oS\fP@\\*(Vs\\*(dD\fP@%@
-.\" ' bp
-.\}
-.ev
-..
-.de lM
-.fl
-.if \\n(cR \{\
-. fM
-. pl \\n(nlu
-.\}
-..
-.de Pp
-.sp \\n(Ppu
-.ne 2
-.ns
-..
-.de Lp
-.Pp
-..
-.de LP
-.tm Not a \-mdoc command: .LP
-..
-.de PP
-.tm Not a \-mdoc command: .PP
-..
-.de pp
-.tm Not a \-mdoc command: .pp
-..
-.de Co
-.tm Not a \-mdoc command: .Co
-..
-.nr z. 1
-.nr z, 1
-.nr z: 1
-.nr z; 1
-.nr z) 1
-.nr z( 1
-.nr z[ 1
-.nr z] 1
-.\" This is disgusting, troff not parse if stmt properly
-.nr z1 0
-.nr z2 0
-.nr z3 0
-.nr z4 0
-.nr z5 0
-.nr z6 0
-.nr z7 0
-.nr z8 0
-.nr z9 0
-.nr z0 0
-.nr z# 0
-.\"
-.de Ad
-.ie \\n(.$==0 \{\
-. tm Usage: .Ad address [...] \\*(Pu
-.\}
-.el \{\
-. ds sV \\*(aD
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.\" Command Line Argument Macro
-.\"
-.de Ar
-.ie \\n(.$==0 \{\
-. ie !"\\*(iM"" .as f1 \&[\|\\*(aRfile\ ...\fP\|]
-. el \&[\|\\*(aRfile\ ...\fP\|]
-.\}
-.el \{\
-. ds sV \\*(aR
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.de Em
-.ie \\n(.$==0 \{\
-. tm Usage: .Em text ... \\*(Pu
-.\}
-.el \{\
-. ds sV \\*(eM
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.de Er
-.ie \\n(.$==0 \{\
-. tm Usage: .Er ERRNOTYPE ... \\*(Pu
-. \}
-.el \{\
-. ds sV \\*(eR
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.de Ev
-.ie \\n(.$==0 \{\
-. tm Usage: .Ev ENVIRONMENT_VARIABLE(s) ... \\*(Pu
-. \}
-.el \{\
-. ds sV \\*(eV
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.\" Flag Name Macro
-.\"
-.de Fl
-.ie \\n(.$==0 \{\
-. ie !"\\*(iM"" .as f1 \&\\*(fL\-\fP
-. el \&\\*(fL\-\fP
-.\}
-.el \{\
-. nr rZ 0
-. sW \\$1
-. if (\\n(sW==1&\\n(.$==1) .rZ \\$1
-. ds sV \\*(fL
-. nr cF \\n(.f
-. ie \\n(rZ \{\
-. ie "\\*(iM"" .ds f1 \&\\*(sV\-\f\\n(cF\\$1
-. el \&\\*(sV\-\f\\n(cF\\$1
-. \}
-. el \{\
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. fB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-. \}
-.\}
-..
-.\" Interactive Commands Macro
-.\"
-.de Ic
-.ie \\n(.$==0 \{\
-. tm Usage: .Ic Interactive Commands(s) ... \\*(Pu
-.\}
-.el \{\
-. ds sV \\*(iC
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.\" Interactive Command Modifiers (flags)
-.\"
-.de Cm
-.ie \\n(.$==0 \{\
-. tm Usage: .Cm Interactive Command Modifier(s) ... \\*(Pu
-.\}
-.el \{\
-. ds sV \\*(cM
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.de Li
-.ie \\n(.$==0 \{\
-. tm Usage: .Li literal ... \\*(Pu
-. \}
-.el \{\
-. ds sV \\*(lI
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\" If in nroff or any other case where the default font
-.\" is constant width, and literal means zilch, single quote instead.
-.ie n \{\
-.de Ql
-. ie \\n(.$==0 \{\
-. tm Usage: .Ql literal ... \\*(Pu
-. \}
-. el \{\
-. Sq \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-..
-.\}
-.el \{\
-.de Ql
-. ie \\n(.$==0 \{\
-. tm Usage: .Ql literal ... \\*(Pu
-. \}
-. el \{\
-. Li \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-..
-.\}
-.\"
-.de Nm
-.ie \\n(.$==0 \{\
-. if "\\*(n1"" .tm Usage: .Nm Name(s) ... \\*(Pu
-. ie !"\\*(iM"" .as f1 \&\\*(nM\\*(n1\\$1\fP
-. el \&\\*(nM\\*(n1\\$1\fP
-.\}
-.el \{\
-. ds sV \\*(nM
-. nr cF \\n(.f
-. if \\n(nS \{\
-. rs
-. in -\\n(iSu
-. ie \\n(nS>1 .br
-. el \{\
-. sW \\$1
-. nr iS ((\\n(sW+1)*\\n(fW)u
-. \}
-. in +\\n(iSu
-. ti -\\n(iSu
-. nr nS \\n(nS+1
-. \}
-. if "\\*(n1"" .ds n1 \\$1
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.de Pa
-.ie \\n(.$==0 \{\
-\&\\*(pA~\fP
-.\}
-.el \{\
-. ds sV \\*(pA
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.de Sy
-.ie \\n(.$==0 \{\
-. tm Usage: .Sy Symbolic Text ... \\*(Pu
-. \}
-.el \{\
-. ds sV \\*(sY
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.de Ms
-.ie \\n(.$==0 \{\
-. tm Usage: .Ms Math Symbol ... \\*(Pu
-. \}
-.el \{\
-. ds sV \\*(sY
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.de Va
-.ie \\n(.$==0 \{\
-. tm Usage: .Va variable_name(s) ... \\*(Pu
-.\}
-.el \{\
-. ds sV \\*(vA
-. nr cF \\n(.f
-. ie "\\*(iM"" .ds f1 \&\\*(sV
-. el .as f1 \&\\*(sV
-. nB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-.\}
-..
-.\"
-.de nB
-.hy 0
-.if \\n(.$==0 .tm Usage error: called with empty arguments (empty quotes)?
-.ie \\n(.$>1 \{\
-. rZ \\$1
-. ie \\n(rZ .as f1 \&\f\\n(cF\\$1\fP
-. el .as f1 \&\\$1
-. rZ \\$2
-. if !\\n(rZ \{\
-. ie !"\\*(iM""\{\
-.\" I surrender
-. if "\\*(iM"Tp" .as f1 \&\ \&
-. if "\\*(iM"Dp" .as f1 \&\ \&
-. if "\\*(iM"Op" .as f1 \&\ \&
-. if "\\*(iM"Cx" .as f1 \&\ \&
-. if "\\*(iM"Dq" .as f1 \& \&
-. if "\\*(iM"Sq" .as f1 \& \&
-. if "\\*(iM"Pq" .as f1 \& \&
-. if "\\*(iM"Aq" .as f1 \& \&
-. \}
-. el .as f1 \& \&
-. \}
-. nB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.\}
-.el \{\
-. rZ \\$1
-. ie \\n(rZ .as f1 \&\f\\n(cF\\$1
-. el .as f1 \&\\$1\f\\n(cF
-. if "\\*(iM"" \{\&\\*(f1
-. ds f1
-. \}
-. hy
-.\}
-..
-.de fB
-.hy 0
-.if \\n(.$==0 .tm Usage error: called with empty arguments (empty quotes)?
-.ie \\n(.$>1 \{\
-. rZ \\$1
-. ie \\n(rZ .as f1 \&\f\\n(cF\\$1\fP
-. el \{\
-. ie "\\$1"-" .as f1 \&\-\-
-. el .as f1 \&\-\\$1
-. \}
-. rZ \\$2
-. if !\\n(rZ \{\
-. ie !"\\*(iM""\{\
-.\" I surrender
-. if "\\*(iM"Tp" .as f1 \&\ \&
-. if "\\*(iM"Dp" .as f1 \&\ \&
-. if "\\*(iM"Op" .as f1 \&\ \&
-. if "\\*(iM"Cx" .as f1 \&\ \&
-. if "\\*(iM"Dq" .as f1 \& \&
-. if "\\*(iM"Sq" .as f1 \& \&
-. if "\\*(iM"Pq" .as f1 \& \&
-. if "\\*(iM"Aq" .as f1 \& \&
-. \}
-. el .as f1 \& \&
-. \}
-. fB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.\}
-.el \{\
-. rZ \\$1
-. ie \\n(rZ .as f1 \&\f\\n(cF\\$1
-. el \{\
-. ie "\\$1"-" .as f1 \&\-\-\f\\n(cF
-. el .as f1 \&\-\\$1\f\\n(cF
-. \}
-. if "\\*(iM"" \{\&\\*(f1
-. ds f1
-. \}
-. hy
-.\}
-..
-.\"
-.\" Single quoted Items
-.\" eF, sB g[0-9] and f2
-.de Sq
-.nr eF 0
-.ie \\n(.$==0 \{\
-. ie "\\*(iM"" \&\\*(sL\&\\*sR
-. el .as f1 \&\\*(sL\&\\*(sR
-.\}
-.el \{\
-. ie "\\*(iM"" \{\
-. ds f1 \&\\*(sL
-. ds iM Sq
-. \}
-. el .as f1 \&\\*(sL
-. sB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ie \\n(eF>0 .\\*(g1 \\*(g2 \\*(g3 \\*(g4 \\*(g5 \\*(g6 \\*(g7 \\*(g8
-. el .as f1 \\*(g0
-. as f1 \\*(sR
-. if !"\\*(f2"" .as f1 \\*(f2
-. if "\\*(iM"Sq" \{\
-\&\\*(f1
-. ds f1
-. ds iM
-. \}
-. ds f2
-. rm g0 g1 g2 g3 g4 g5 g6 g7 g8 g9
-. nr eF 0
-.\}
-..
-.\"
-.\" Double quoted Items
-.de Dq
-.nr Ef 0
-.ie \\n(.$==0 \{\
-. ie "\\*(iM"" \&\\*(Lq\&\\*(Rq
-. el .as f1 \&\\*(Lq\&\\*(Rq
-.\}
-.el \{\
-. ie "\\*(iM"" \{\
-. ds f1 \&\\*(Lq
-. ds iM Dq
-. \}
-. el .as f1 \&\\*(Lq
-. Sb \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ie \\n(Ef>0 .\\*(k1 \\*(k2 \\*(k3 \\*(k4 \\*(k5 \\*(k6 \\*(k7 \\*(k8
-. el .as f1 \\*(k0
-. as f1 \\*(Rq
-. if !"\\*(f4"" .as f1 \\*(f4
-. if "\\*(iM"Dq" \{\
-\&\\*(f1
-. ds f1
-. ds iM
-. \}
-. ds f4
-. rm k0 k1 k2 k3 k4 k5 k6 k7 k8 k9
-. nr Ef 0
-.\}
-..
-.\"
-.\" Parenthesis quoted Items
-.de Pq
-.nr pQ 0
-.ie \\n(.$==0 \{\
-. ie "\\*(iM"" \&(\&)
-. el .as f1 \&(\&)
-.\}
-.el \{\
-. ie "\\*(iM"" \{\
-. ds f1 \&(
-. ds iM Pq
-. \}
-. el .as f1 \&(
-. pB \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ie \\n(pQ>0 .\\*(y1 \\*(y2 \\*(y3 \\*(y4 \\*(y5 \\*(y6 \\*(y7 \\*(y8
-. el .as f1 \\*(y0
-. as f1 \&)
-. if !"\\*(f3"" .as f1 \\*(f3
-. if "\\*(iM"Pq" \{\
-\&\\*(f1
-. ds f1
-. ds iM
-. \}
-. ds f3
-. rm y0 y1 y2 y3 y4 y5 y6 y7 y8 y9
-. nr pQ 0
-.\}
-..
-.\" eF, sB g[0-9] and f2
-.de sB
-.hy 0
-.ie \\n(.$==0 .tm Sick Logic: macro sB
-.el \{\
-. ie \\n(eF>=1 .nr eF \\n(eF+1
-. el \{\
-. mN \\$1
-. if \\n(mN .nr eF \\n(eF+1
-. \}
-. rZ \\$1
-. ie \\n(rZ .as f2 \\$1
-. el \{\
-. ie \\n(eF<1 .as g\\n(eF \\$1
-. el .as g\\n(eF \\$1
-. \}
-. if \\n(.$>1 \{\
-. rZ \\$2
-. if \\n(rZ==0 \{\
-. if \\n(eF<1 \{\
-. as g\\n(eF \& \&
-. \}
-. \}
-. sB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-..
-.de Sb
-.hy 0
-.ie \\n(.$==0 .tm Sick Logic: macro Sb
-.el \{\
-. ie \\n(Ef>=1 .nr Ef \\n(Ef+1
-. el \{\
-. mN \\$1
-. if \\n(mN .nr Ef \\n(Ef+1
-. \}
-. rZ \\$1
-. ie \\n(rZ .as f4 \\$1
-. el \{\
-. ie \\n(Ef<1 .as k\\n(Ef \\$1
-. el .as k\\n(Ef \\$1
-. \}
-. if \\n(.$>1 \{\
-. rZ \\$2
-. if \\n(rZ==0 \{\
-. if \\n(Ef<1 \{\
-. as k\\n(Ef \& \&
-. \}
-. \}
-. Sb \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-..
-.de pB
-.hy 0
-.ie \\n(.$==0 .tm Sick Logic: macro pB
-.el \{\
-. ie \\n(pQ>=1 .nr pQ \\n(pQ+1
-. el \{\
-. mN \\$1
-. if \\n(mN .nr pQ \\n(pQ+1
-. \}
-. rZ \\$1
-. ie \\n(rZ .as f3 \\$1
-. el \{\
-. ie \\n(pQ<1 .as y\\n(pQ \\$1
-. el .as y\\n(pQ \\$1
-. \}
-. if \\n(.$>1 \{\
-. rZ \\$2
-. if \\n(rZ==0 \{\
-. if \\n(pQ<1 \{\
-. as y\\n(pQ \& \&
-. \}
-. \}
-. pB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-..
-.de aQ
-.hy 0
-.ie \\n(.$==0 .tm Bad Syntax: .Aq
-.el \{\
-. ie \\n(aQ>=1 .nr aQ \\n(aQ+1
-. el \{\
-. mN \\$1
-. if \\n(mN .nr aQ \\n(aQ+1
-. \}
-. rZ \\$1
-. ie \\n(rZ .as aZ \\$1
-. el \{\
-. ie \\n(aQ<1 .as a\\n(aQ \\$1
-. el .as a\\n(aQ \\$1
-. \}
-. if \\n(.$>1 \{\
-. rZ \\$2
-. if \\n(rZ==0 \{\
-. if \\n(aQ<1 \{\
-. as a\\n(aQ \& \&
-. \}
-. \}
-. aQ \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-..
-.\" Angle Bracket Quoted Items
-.de Aq
-.nr aQ 0
-.ie \\n(.$==0 \{\
-. ie "\\*(iM"" \&<\&>
-. el .as f1 \&<\&>
-.\}
-.el \{\
-. ie "\\*(iM"" \{\
-. ds f1 \&<
-. ds iM Aq
-. \}
-. el .as f1 \&<
-. aQ \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
-. ie \\n(aQ>0 .\\*(a1 \\*(a2 \\*(a3 \\*(a4 \\*(a5 \\*(a6 \\*(a7 \\*(a8
-. el .as f1 \\*(a0
-. as f1 \&>
-. if !"\\*(aZ"" .as f1 \\*(aZ
-. if "\\*(iM"Aq" \{\
-\&\\*(f1
-. ds f1
-. ds iM
-. \}
-. ds aZ
-. rm a0 a1 a2 a3 a4 a5 a6 a7 a8
-. nr aQ 0
-.\}
-..
-.\" macro Name test, return macro register value if true
-.if \n(.g .ig
-.de mN
-.nr mN 0
-.sW \\$1
-.if \\n(sW==2 \{\
-. if \\n(\\$1 .nr mN \\n(\\$1
-.\}
-..
-.if !\n(.g .ig
-.de mN
-.nr mN 0
-.if \A'\\$1' \{\
-. sW \\$1
-. if \\n(sW==2 \{\
-. if \\n(\\$1 .nr mN \\n(\\$1
-. \}
-.\}
-..
-.\" Punctuation test (using z registers), return 1 if true
-.if \n(.g .ig
-.de rZ
-.nr rZ 0
-.sW \\$1
-.if \\n(sW==1 \{\
-. if \\n(z\\$1==1 \{\
-. nr rZ 1
-. \}
-.\}
-..
-.if !\n(.g .ig
-.de rZ
-.nr rZ 0
-.if \A'\\$1' \{\
-. sW \\$1
-. if \\n(sW==1 \{\
-. if \\n(z\\$1==1 \{\
-. nr rZ 1
-. \}
-. \}
-.\}
-..
-.\"
-.\" sW returns number of characters in a string
-.if t \{\
-.nr fW \w'\fC,'
-.de sW
-.nr sW \w'\fC\\$1'
-.\}
-.if n \{\
-.nr fW \w'0'
-.de sW
-.nr sW \w'\\$1'
-.\}
-.ie \\n(sW>=\\n(fW \{\
-. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
-. el .nr sW \\n(sW/\\n(fW
-.\}
-.el .nr sW 0
-..
-.\" Option Expression -
-.\" TODO - add line overflow check (right!)
-.nr eP 0
-.ds e1
-.nr oE 0
-.nr hP 0
-.ds hP
-.nr Ep 0
-.de Op
-.hy 0
-.if "\\*(iM"" \{\
-. ds iM Op
-. ds f1 \&
-.\}
-.as f1 \&\\*(lB
-.\" .tm Op: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.dO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.ie !"\\$1"Cx" .oE
-.el .nr oE \\n(oE+1
-..
-.\"
-.\" just for mike, with every bite of garlic in mind (oops, i mean burp).
-.\" dO: go dOwn an argument vector and test each argument to see if
-.\" a macro name or punctuation. stash in respective place along
-.\" with its arguments.
-.nr oO 0
-.nr oP 0
-.nr aO 0
-.de dO
-.mN \\$1
-.ie \\n(mN \{\
-. if \\n(oP \{\
-. if \\n(hP \{\
-. nr oZ 1
-. oZ
-. Oz
-. \}
-. if \\n(e1==1 \{\
-.\\*(e1 \\*(e2 \\*(e3 \\*(e4 \\*(e5 \\*(e6 \\*(e7 \\*(e8 \\*(e9
-. \}
-. uO
-. if !(\\n(oO:\\n(aO) .as f1 \& \&
-. \}
-. ie "\\$1"Op" \{\
-. as f1 \&\\*(lB
-. nr aO \\n(aO+1
-. \}
-. el \{\
-. nr eP \\n(eP+1
-. ds e\\n(eP \\$1
-. nr e\\n(eP 1
-. \}
-.\}
-.el \{\
-.\" .tm dO: $1: \\$1: eP \\n(eP e[\\n(eP]: \\*(e\\n(ePEE
-. rZ \\$1
-. ie \\n(rZ \{\
-.\" .tm dO:rZ: $1: \\$1: eP \\n(eP e[\\n(eP]: \\*(e\\n(eP
-. nr hP \\n(hP+1
-. ds h\\n(hP \\$1
-. \}
-. el \{\
-.\" .tm dO:word $1: \\$1: eP \\n(eP e[\\n(eP]: \\*(e\\n(ePEE
-. if \\n(eP==0:\\n(e\\n(eP==1 .nr eP \\n(eP+1
-. if \\n(eZ .as e\\n(eP \& \&
-. as e\\n(eP " \&\\$1
-.\" . ds e\\n(eP \&\\$1
-. nr eZ \\n(eZ+1
-. \}
-.\}
-.nr oP 1
-.ie \\n(.$>1 \{\
-. dO \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.\}
-.el \{\
-. ie \\n(e1 \{\
-.\\*(e1 \\*(e2 \\*(e3 \\*(e4 \\*(e5 \\*(e6 \\*(e7 \\*(e8 \\*(e9
-. \}
-. el \{\
-. as f1 \\*(e1
-. \}
-.\}
-..
-.\" handle old style arguments such as the arg -Idir
-.\" in adb, .Oo is a toggle.
-.de Oo
-.ie \\n(oO .nr oO 0
-.el .nr oO 1
-..
-.\" stash punctuation
-.de oZ
-.if \\n(hP>=\\n(oZ \{\
-. nr eP \\n(eP+1
-. ds e\\n(eP \\*(h\\n(oZ
-. nr oZ \\n(oZ+1
-. oZ
-.\}
-..
-.\" clean up punctuation vector
-.de Oz
-.if \\n(hP>0 \{\
-. rm h\\n(hP
-. nr hP \\n(hP-1
-. Oz
-.\}
-..
-.\" uO: go back up created vector cleaning it up along the way
-.de uO
-.if \\n(eP>0 \{\
-. rm e\\n(eP
-. rr e\\n(eP
-. nr eP \\n(eP-1
-. nr oP 0
-. nr eZ 0
-. uO
-.\}
-..
-.\" option end
-.de oE
-.uO
-.ie \\n(hP \{\
-. as f1 \\*(rB\\*(h1\\*(h2\\*(h3
-. Oz
-. nr oZ 0
-.\}
-.el \{\
-. as f1 \\*(rB
-.\}
-.ie "\\*(iM"Op" \{\
-. if \\n(aO .aO
-.if t \{\
-. if (\\n(.lu-\\n(.ku-\\n(.ou-(2*\\n(fWu))<\w'\fC\\*(f1'u .br
-.\}
-.if n \{\
-. nr aa \w'\\*(f1'u
-.\" . nr qq \\n(.lu-\\n(.ku-\\n(.ou
-.\" \&aa == \\n(aa, f1==\\*(f1, qq==\\n(qq
-. if (\\n(.lu-\\n(.ku-\\n(.ou-\\n(aau)<=(8*\\n(fWu) .br
-.\}
-\&\\*(f1
-. ds iM
-. ds f1
-. hy
-.\}
-.el .nr oE \\n(oE-1
-..
-.de aO
-.as f1 \\*(rB
-.nr aO \\n(aO-1
-.if \\n(aO >0 .aO
-..
-.\"
-.de Xr
-.if \\n(.$<=1 \{\
-. ie \\n(.$==1 \{\
-. if !"\\*(iM"" .as f1 \&\\*(xR\\$1\fP
-. if "\\*(iM"" \&\\*(xR\\$1\fP
-. \}
-. el .tm Xr Usage: .Xr manpage_name [section#] \\*(Pu
-.\}
-.if \\n(.$==2 \{\
-. rZ \\$2
-. ie "\\*(iM"" \{\
-. ie \\n(rZ \&\\*(xR\\$1\fP\\$2
-. el \&\\*(xR\\$1\fP(\\$2)
-. \}
-. el \{\
-. ie \\n(rZ .as f1 \&\\*(xR\\$1\fP\\$2
-. el .as f1 \&\\*(xR\\$1\fP(\\$2)
-. \}
-.\}
-.if \\n(.$>=3 \{\
-. rZ \\$2
-. ie \\n(rZ \{\
-. ie !"\\*(iM"" .as f1 \&\\*(xR\\$1\fP\\$2\\$3\\$4\\$5\\$6\\$7\\$8
-. el \&\\*(xR\\$1\fP\\$2\\$3\\$4\\$5\\$6\\$7\\$8
-. \}
-. el \{\
-. rZ \\$3
-. ie \\n(rZ \{\
-. if !"\\*(iM"" \{\
-. as f1 \&\\*(xR\\$1\fP(\\$2)\\$3\\$4\\$5\\$6\\$7\\$8
-. \}
-. if "\\*(iM"" \{\
-\&\\*(xR\\$1\fP(\\$2)\\$3\\$4\\$5\\$6\\$7\\$8
-. \}
-. \}
-. el \{\
-. tm rZ = \\n(rZ the arg is \\$3
-. tm Xr-XX Usage: .Xr manpage_name [section#] \\*(Pu
-. \}
-. \}
-.\}
-..
-.\"
-.\"
-.de Ex
-.tm Ex defunct, Use .Dl: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.\" Display (one) Line of text.
-.de Dl
-.ie "\\*(iM"" \{\
-' ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-. in \\n(.iu+\\n(Dsu
-. mN \\$1
-. ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. el \{\
-. nr cF \\n(.f
-.\" Literal font is none specified
-\&\\*(lI\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. ft \\n(cF
-. \}
-. in \\n(.iu-\\n(Dsu
-.\}
-.el \{\
-. mN \\$1
-. ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
-. el \{\
-. nr cF \\n(.f
-. ds f1 \&\\*(lI\\&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
-. as f1 \&\f\\n(cF
-. \}
-.\}
-..
-.\"
-.\"
-.\" user set Tagged Paragraph Width (used in both Dp and Tp)
-.de Tw
-.ie \\n(.$==0 \{\
-. nr aa 0
-.\}
-.el \{\
-. mN \\$1
-. ie \\n(sW>2 \{\
-. nr tW (\\n(sW+3)*\\n(fWu)
-. \}
-. el \{\
-. ie \\n(mN .nr tW \\n(mN
-. el .nr tW \\$1
-. \}
-. nr tF 1
-.\}
-..
-.\"
-.de Dw
-.Tw \\$1
-..
-.\"
-.de Di
-.ie \\n(.$==0 \{\
-. nr tI \\n(Dsu
-.\}
-.el \{\
-. sW \\$1
-. if \\n(sW>=2 \{\
-. nr tI \\$1u
-. \}
-. if \\n(sW<2 \{\
-. if "\\$1"L" \{\
-. nr tI 0
-. \}
-. \}
-.\}
-..
-.\" tagged paragraph
-.\" initialize baby stack variables
-.nr np 0
-.nr p1 0
-.ds s\n(np
-.\"
-.de Tp
-.ie "\\$1"" .pE p s np
-.el \{\
-. ds iM Tp
-. mN \\$1
-. ie \\n(tF \{\
-. ds tC Tw
-. nr tC 1
-. nr tF 0
-. \}
-. el \{\
-. if !"Tw"\\*(s\\n(np" \{\
-. ie \\n(mN \{\
-. ds tC \\$1
-. nr tW \\n(mN
-. \}
-. el \{\
-. ds tC Tx
-. nr tW \\n(Tx
-. \}
-. if !"\\*(tC"\\*(s\\n(np" .nr tC 1
-. \}
-. \}
-. sp \\n(vVu
-. if !\\n(cR .ne 2
-. if \\n(tC \{\
-. nr np \\n(np+1
-. nr p\\n(np \\n(tW
-. ds s\\n(np \\*(tC
-. nr tC 0
-. ds tC
-. in \\n(.iu+\\n(p\\n(npu
-. \}
-. ie \\n(mN \{\
-. ds f1
-. \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. if !"\\$1"Cx" .pT st p np
-. \}
-. el \{\
-. br
-. ev 1
-. fi
-. di Td
-\&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. br
-. di
-. ev
-. na
-. ds tD \\*(Td\\
-. pT di p np
-. \}
-.\}
-..
-.\"
-.\"
-.\" Complex Expression Macro
-.\"
-.\" TODO: add length across line boundary check (like Li)
-.de Cx
-.hy 0
-.ie \\n(.$==0 \{\
-. if "\\*(iM"Cx" \{\
-. ds iM
-. if \\n(oE .oE
-\&\\*(f1
-. ds f1
-. \}
-. if "\\*(iM"Tp" .pT st p np
-. if "\\*(iM"Dp" .pT st q mp
-.\}
-.el \{\
-. if "\\*(iM"" \{\
-. ds iM Cx
-. ds f1 \&
-. \}
-. mN \\$1
-.\" Here are the args: `\\$1' `\\$2' `\\$3' `\\$4'
-. ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. el \{\
-. as f1 \&\\$1
-. if \\n(.$>1 .Cx \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-..
-.\" Prefix string in default font to content specified string
-.de Pf
-.Cx \\$1
-.\\$2 \\$3 \\$4 \\$5
-.Cx
-..
-.\" Suffix string in default font to content specified string
-.de Sf
-.Cx \\$1 \\$2
-.Cx \\$3
-.Cx
-..
-.\" Simple Option Begin
-.de Ob
-.hy 0
-.ie "\\*(iM"" \{\
-. ev 2
-. fi
-. di oB
-.\}
-.el \{\
-.tm shouldn't be here
-. as f1 \&[
-. mN \\$1
-. ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. el \{\
-. as f1 \&\\$1
-. if \\n(.$>1 .Oc \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-.\}
-..
-.de Oc
-.as f1 \&\\$1
-.if \\n(.$>1 .Oc \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.de Oe
-.hy 0
-.ie "\\*(iM"" \{\
-. br
-. di
-. ev
-. ds bO \\*(oB\\
-\&[\\*(bO\&]
-.\}
-.el \{\
-. as f1 \&]
-.\}
-..
-.\" White space for Cx
-.de Ws
-.Cx \&\ \&
-..
-.\" tagged paragraph
-.\" initialize baby stack variables
-.nr mp 0
-.nr q1 0
-.ds r\n(np
-.\"
-.\" Complex Dp tag
-.de Dc
-.Dp Cx \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
-..
-.\" Complex Tp tag
-.de Tc
-.Tp Cx \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
-..
-.\" Tag with a flag and an argument with a space
-.de Ta
-.if "\\$2"" \{\
-. Tp Fl \\$1
-.\}
-.el \{\
-. Tp Fl \\$1
-. Cx \&\ \&
-. Ar \\$2 \\$3
-. Cx
-.\}
-..
-.de Da
-.Dp Cx Fl \\$1
-.Ws
-.Ar \\$2 \\$3
-.Cx
-..
-.de To
-.Tp Cx Fl \\$1
-.Ar \\$2 \\$3
-.Cx
-..
-.de Do
-.Dp Cx Fl \\$1
-.Ar \\$2 \\$3
-.Cx
-..
-.\" Blended tag toggle
-.de Bt
-.ie \\n(tP==0 .nr tP 1
-.el .nr tP 0
-..
-.\" Bullet paragraph
-.de Bu
-.Tp Sy \&\(bu
-..
-.\" Display tagged paragraph
-.de Dp
-.ie "\\$1"" \{\
-. pE q r mp
-. sp \\n(vVu
-.\}
-.el \{\
-. ds iM Dp
-. mN \\$1
-. ie \\n(tF \{\
-. ds tC Tw
-. nr tC 1
-. nr tF 0
-. \}
-. el \{\
-. if !"Tw"\\*(r\\n(mp" \{\
-. ie \\n(mN \{\
-. ds tC \\$1
-. nr tW \\n(mN
-. \}
-. el \{\
-. ds tC Tx
-. nr tW \\n(Tx
-. \}
-. if !"\\*(tC"\\*(r\\n(mp" .nr tC 1
-. \}
-. \}
-. if !\\n(cR .ne 2
-. if \\n(tC \{\
-. nr mp \\n(mp+1
-. nr q\\n(mp \\n(tW
-. ds r\\n(mp \\*(tC
-. nr tC 0
-. ds tC
-. ie \\n(tIu==\\n(Dsu .nr i\\n(mp \\n(Dsu
-. el \{\
-. nr i\\n(mp \\n(tIu
-. nr tI \\n(Dsu
-. \}
-. in \\n(.iu+\\n(i\\n(mpu
-. sp \\n(vVu
-. in \\n(.iu+\\n(\\q\\n(mpu
-. \}
-. ie \\n(mN \{\
-. \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. if !"\\$1"Cx" .pT st q mp
-. \}
-. el \{\
-. br
-. ev 1
-. fi
-. di Td
-\&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. br
-. di
-. ev
-. na
-. ds tD \\*(Td\\
-. pT di q mp
-. \}
-.\}
-..
-.\"
-.\" .pE number_stack string_stack counter
-.de pE
-.ie "\\$3"mp" \{\
-. in \\n(.iu-(\\n(\\$1\\n(\\$3u)-(\\n(i\\n(mpu)
-. rr i\\n(mp
-.\}
-.el .in \\n(.iu-\\n(\\$1\\n(\\$3u
-.\" .in \\n(.iu-\\n(\\$1\\n(\\$3u
-.if \\n(\\$3<=0 .tm Extraneous call .Tp or .Dp
-.rr \\$1\\n(\\$3
-.rm \\$2\\n(\\$3
-.nr \\$3 \\n(\\$3-1
-.ds iM
-..
-.\"
-.\" .pT [st or di] number_stack counter
-.de pT
-.ie "\\$1"st" \{\
-. nr bb \\n(\\$2\\n(\\$3u
-. ti -\\n(bbu
-. ie (\\n(\\$2\\n(\\$3u-2n)<=\w'\\*(f1'u \{\&\\*(f1\\*(tP
-. if \\n(tP==0 .br
-. \}
-. el \\*(f1\h'|\\n(\\$2\\n(\\$3u'\c
-.\}
-.el \{\
-. ti -\\n(\\$2\\n(\\$3u
-. ie (\\n(\\$2\\n(\\$3u-2n)<=\\n(dlu \{\&\\*(tD\\*(tP
-. if !\\n(tP .br
-. \}
-. el \\*(tD\h'|\\n(\\$2\\n(\\$3u'\c
-. if t 'ad
-.\}
-. ds iM
-. ds f1
-'fi
-..
-.\"
-.\" The new SH
-.\"
-.de Sh
-.\" set Sh state off, check for list state before calling indent (.In)
-.nr nS 0
-.nr sE 0
-.ie "\\$1"NAME" \{\
-.\" name state on, housekeep (headers & footers)
-. hK
-' in 0
-.\}
-.el \{\
-. if "\\$1"SYNOPSIS" .nr nS 1
-. in 0
-.\}
-.pL
-'sp
-.ns
-.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.if !\\n(cR .ne 3
-'fi
-\&\fB\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
-\&\fP\&
-.in \\n(.iu+\\n(Tiu
-.if "\\$1"SEE" .nr sE 1
-.ns
-..
-.\"
-.\" Nd minus sign for an en dash used in .Sh Name
-.de Nd
-\&\-\& \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.de Ss
-.sp
-.ti -.25i
-\&\fB\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
-\&\fP\&
-.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.if !\\n(cR .ne 2
-.br
-..
-.\" .if "\\$1"Ss" .in \\n(.iu+\\n(sIu
-.\"..
-.\"
-.\"
-.\" Column Macro
-.\"
-.hy 0
-.de Cw
-.ie \\n(.$==0 \{\
-. br
-. in \\n(.iu-\\n(eWu
-. ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
-.\}
-.el \{\
-. Pp
-. if \\n(.$==1 \{\
-. ta \w'\\$1 'u
-. nr eW \w'\\$1 'u
-' in \\n(.iu+\\n(eWu
-. \}
-. if \\n(.$==2 \{\
-. ta \w'\\$1 'u +\w'\\$2 'u
-. nr eW \w'\\$1 'u+\w'\\$2 'u
-' in \\n(.iu+\\n(eWu
-. \}
-. if \\n(.$==3 \{\
-. ta \w'\\$1 'u +\w'\\$2 'u +\w'\\$3 'u
-. nr eW \w'\\$1 'u+\w'\\$2 'u+\w'\\$3 'u
-' in \\n(.iu+\\n(eWu
-. \}
-. if \\n(.$==4 \{\
-. ta \w'\\$1 'u +\w'\\$2 'u +\w'\\$3 'u +\w'\\$4 'u
-. nr eW \w'\\$1 'u+\w'\\$2 'u+\w'\\$3 'u +\w'\\$4 'u
-' in \\n(.iu+\\n(eWu
-. \}
-. if \\n(.$==5 \{\
-.ta \w'\\$1 'u +\w'\\$2 'u +\w'\\$3 'u +\w'\\$4 'u +\w'\\$5 'u
-.nr eW \w'\\$1 'u +\w'\\$2 'u +\w'\\$3 'u +\w'\\$4 'u +\w'\\$5 'u
-' in \\n(.iu+\\n(eWu
-. \}
-.\}
-..
-.de Cl
-.ti -\\n(eWu
-.mN \\$1
-.ie \\n(mN .\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.el \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-..
-.nr dQ 0
-.de Ds
-.ie !"\\$1"" \{\
-. mN d\\$1
-. if \\n(mN \{\
-. nr dQ \\n(dQ+1
-. d\\$1
-. \}
-.\}
-.el .br
-.nf
-..
-.de Df
-.ie !"\\$1"" \{\
-. mN d\\$1
-. if \\n(mN \{\
-. nr dQ \\n(dQ+1
-. d\\$1
-. \}
-.\}
-.el .br
-..
-.de Dn
-\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-.nf
-..
-.de dI
-.nr d\\n(dQ \\n(dIu
-.in \\n(.iu+\\n(dIu
-..
-.de dC
-.nr d\\n(dQ (\\n(.l-\\n(.i)/4u
-.in \\n(.iu+\\n(d\\n(dQu
-..
-.de dR
-.nr d\\n(dQ (\\n(.l/3)u
-.in \\n(.iu+\\n(d\\n(dQu
-..
-.de dL
-.nr aa 0
-..
-.de De
-.br
-.if \\n(d\\n(dQ \{\
-. in \\n(.iu-\\n(d\\n(dQu
-. rr d\\n(dQ
-. nr dQ \\n(dQ-1
-.\}
-.fi
-..
-.\"
-.de Fn
-.ie \\n(.$==0 \{\
-. tm Usage: .Fn function_name function_arg(s) ... \\*(Pu
-.\}
-.el \{\
-. nr cF \\n(.f
-. ie \\n(.$==1 .ds f1 \&\\*(nM\\$1\fP\\*(lP\fP\\*(rP\fP
-. el \{\
-. ds f1 \\*(nM\\$1\fP\\*(lP
-. nr aa 0
-. rC \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
-. \}
-. if "\\*(iM"" \{\\&\\*(f1
-. ds f1
-. \}
-.\}
-..
-.\"
-.de rC
-.rZ \\$1
-.ie \\n(rZ \{\
-. as f1 \f\\n(cF\\*(rP\f\\n(cF\\$1\\$2\\$3\\$4\\$5\\$6\\$7
-.\}
-.el \{\
-. ie \\n(aa .as f1 \fP, \\*(aR\\$1
-. el .as f1 \\*(aR\\$1
-. nr aa 1
-. ie \\n(.$>1 .rC \\$2 \\$3 \\$4 \\$5 \\$6 \\$7
-. el .as f1 \fP\\*(rP\fP
-.\}
-..
diff --git a/contrib/groff/tmac/doc.tmac b/contrib/groff/tmac/doc.tmac
deleted file mode 100644
index 815e3d465b40..000000000000
--- a/contrib/groff/tmac/doc.tmac
+++ /dev/null
@@ -1,6189 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)doc 8.1 (Berkeley) 06/08/93
-.\"
-.\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
-.\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
-.\" `tmac.doc-common' would be too long); when using groff, the doc-* files
-.\" are loaded using the `mso' request.
-.\"
-.\" Modified by
-.\"
-.\" Werner LEMBERG <wl@gnu.org> and
-.\" Ruslan Ermilov <ru@freebsd.org>
-.\"
-.\" to make it more readable: using long names and many groff features,
-.\" updating and extending documentation, etc.
-.\"
-.\" %beginstrip%
-.
-.
-.if !\n(.g \
-. ab This version of mdoc can be run with GNU troff only!
-.
-.
-.cp 0
-.
-.
-.if ((\n[.x] == 0) : ((\n[.x] == 1) & (\n[.y] < 17))) \
-. ab You need GNU troff version 1.17 or higher to run this version of mdoc!
-.
-.
-.\" Load start-up files
-.ie t \
-. mso mdoc/doc-ditroff
-.el \
-. mso mdoc/doc-nroff
-.
-.mso mdoc/doc-common
-.mso mdoc/doc-syms
-.
-.
-.eo
-.
-.
-.\" NS doc-macro-name global string
-.\" NS name of calling request (set in each user-requestable macro)
-.
-.ds doc-macro-name
-.als doc-arg0 doc-macro-name
-.
-.
-.\" NS doc-arg-limit global register
-.\" NS total number of arguments
-.
-.nr doc-arg-limit 0
-.
-.
-.\" NS doc-num-args global register
-.\" NS number of arguments to handle (must be set to \n[.$] prior to
-.\" NS `doc-parse-arg-vector' request)
-.
-.nr doc-num-args 0
-.
-.
-.\" NS doc-arg-ptr global register
-.\" NS argument pointer
-.
-.nr doc-arg-ptr 0
-.
-.
-.\" NS doc-argXXX global string
-.\" NS argument vector
-.\" NS
-.\" NS limit:
-.\" NS doc-arg-limit
-.
-.ds doc-arg1
-.
-.
-.\" NS doc-typeXXX global register
-.\" NS argument type vector (macro=1, string=2, punctuation suffix=3,
-.\" NS punctuation prefix=4)
-.\" NS
-.\" NS limit:
-.\" NS doc-arg-limit
-.
-.nr doc-type1 0
-.
-.
-.\" NS doc-spaceXXX global string
-.\" NS space vector
-.\" NS
-.\" NS limit:
-.\" NS doc-arg-limit
-.
-.ds doc-space1
-.
-.
-.\" NS doc-parse-args macro
-.\" NS parse arguments (recursively) (`.doc-parse-args arg ...')
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-spaceXXX
-.\" NS doc-typeXXX
-.\" NS doc-arg-ptr
-.\" NS doc-have-space
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dpa
-.\" NS doc-reg-dpa1
-.\" NS doc-str-dpa
-.
-.de doc-parse-args
-. if !\n[doc-arg-limit] \
-. doc-set-spacing-1
-.
-. nr doc-have-space 0
-.
-. if !\n[.$] \
-. return
-.
-. nr doc-arg-limit +1
-.
-. \" handle `|' and `...' specially
-. ie "\$1"|" \
-. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
-. el \{ .ie "\$1"..." \
-. ds doc-arg\n[doc-arg-limit] \|.\|.\|.
-. el \
-. ds doc-arg\n[doc-arg-limit] "\$1
-. \}
-.
-. \" get argument type and set spacing
-. doc-get-arg-type* \n[doc-arg-limit]
-. nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
-. doc-set-spacing-\n[doc-arg-type]
-.
-. \" check whether we have processed the last parameter
-. ie (\n[.$] == 1) \
-. nr doc-arg-ptr 0
-. el \{\
-. shift
-. doc-parse-args \$@
-. \}
-.
-. nh
-..
-.
-.
-.\" NS doc-parse-arg-vector macro
-.\" NS parse argument vector (recursive)
-.\" NS
-.\" NS cf. comments in doc-parse-args
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-num-args
-.\" NS doc-spaceXXX
-.\" NS doc-typeXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dpav
-.\" NS doc-reg-dpav1
-.\" NS doc-str-dpav
-.
-.de doc-parse-arg-vector
-. if !\n[doc-arg-limit] \
-. doc-set-spacing-1
-.
-. nr doc-arg-limit +1
-.
-. ie "\*[doc-arg\n[doc-arg-limit]]"|" \
-. ds doc-arg\n[doc-arg-limit] \f[R]|\f[P]
-. el \{ .if "\*[doc-arg\n[doc-arg-limit]]"..." \
-. ds doc-arg\n[doc-arg-limit] \|.\|.\|.
-. \}
-.
-. doc-get-arg-type* \n[doc-arg-limit]
-. nr doc-type\n[doc-arg-limit] \n[doc-arg-type]
-. doc-set-spacing-\n[doc-arg-type]
-.
-. ie (\n[doc-num-args] == 1) \{\
-. nr doc-arg-ptr 0
-. nr doc-num-args 0
-. \}
-. el \{\
-. nr doc-num-args -1
-. doc-parse-arg-vector
-. \}
-.
-. nh
-..
-.
-.
-.\" NS doc-parse-space-vector macro
-.\" NS parse space vector (recursive)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-num-args
-.\" NS doc-spaceXXX
-.
-.de doc-parse-space-vector
-. nr doc-arg-limit +1
-.
-. doc-set-spacing-\n[doc-type\n[doc-arg-limit]]
-.
-. ie (\n[doc-num-args] == 1) \
-. nr doc-num-args 0
-. el \{\
-. nr doc-num-args -1
-. doc-parse-space-vector
-. \}
-..
-.
-.
-.\" NS doc-remaining-args macro
-.\" NS output remaining arguments as-is, separated by spaces (until
-.\" NS `doc-num-args' is exhausted)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-num-args
-.
-.de doc-remaining-args
-. nr doc-arg-ptr +1
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
-.
-. ie (\n[doc-num-args] == 1) \{\
-. nr doc-arg-ptr 0
-. nr doc-num-args 0
-. \}
-. el \{\
-. nop \)\*[doc-space]\c
-. nr doc-num-args -1
-. doc-remaining-args
-. \}
-..
-.
-.
-.\" NS doc-append-arg macro
-.\" NS append one argument to argument vector:
-.\" NS `.doc-append-arg [arg] [type]'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-argXXX
-.\" NS doc-typeXXX
-.
-.de doc-append-arg
-. nr doc-arg-limit +1
-. ds doc-arg\n[doc-arg-limit] "\$1
-. nr doc-type\n[doc-arg-limit] \$2
-. doc-set-spacing-\$2
-..
-.
-.
-.\" NS doc-print-and-reset macro
-.\" NS finish input line and clean up argument vectors
-.
-.de doc-print-and-reset
-. if \n[doc-space-mode] \
-. nop \)
-. doc-reset-args
-..
-.
-.
-.\" NS doc-reset-args macro
-.\" NS reset argument counters
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-arg-ptr
-.\" NS doc-have-slot
-.
-.de doc-reset-args
-. nr doc-arg-limit 0
-. nr doc-arg-ptr 0
-. nr doc-have-slot 0
-.
-. hy \n[doc-hyphen-flags]
-..
-.
-.
-.ec
-.
-.\" NS doc-curr-font global register
-.\" NS saved current font
-.
-.nr doc-curr-font \n[.f]
-.
-.
-.\" NS doc-curr-size global register
-.\" NS saved current font size
-.
-.nr doc-curr-size \n[.ps]
-.
-.eo
-.
-.
-.\" NS Fl user macro
-.\" NS handle flags (appends `-' and prints flags): `.Fl [arg ...]'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Fl (for communication with doc-flag-recursion)
-.\" NS
-.\" NS width register `Fl' set in doc-common
-.
-.de Fl
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Fl-font]\c
-.
-. if !\n[doc-arg-limit] \{\
-. ds doc-macro-name Fl
-. doc-parse-args \$@
-.
-. if !\n[.$] \{\
-. \" no arguments
-. nop \|\-\|\f[P]\s[0]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. \" last argument
-. nop \|\-\f[P]\s[0]\c
-. doc-print-and-reset
-. \}
-. el \{\
-. ie (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
-. nop \|\-\f[P]\s[0]\c
-. \*[doc-arg\n[doc-arg-ptr]]
-. \}
-. el \{\
-. if (\n[doc-type\n[doc-arg-ptr]] == 3) \
-. nop \|\-\|\c
-.
-. nr doc-reg-Fl 1
-. doc-flag-recursion
-. \}\}
-..
-.
-.
-.\" NS doc-flag-recursion macro
-.\" NS `Fl' flag recursion routine (special handling)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dfr
-.\" NS doc-reg-dfr1
-.\" NS doc-str-dfr
-.
-.de doc-flag-recursion
-. nr doc-reg-dfr1 \n[doc-type\n[doc-arg-ptr]]
-. ds doc-str-dfr "\*[doc-arg\n[doc-arg-ptr]]
-.
-. ie (\n[doc-reg-dfr1] == 1) \{\
-. nop \f[P]\s[0]\c
-. \*[doc-str-dfr]
-. \}
-. el \{\
-. nr doc-reg-dfr \n[doc-arg-ptr]
-.
-. ie (\n[doc-reg-dfr1] == 2) \{\
-. \" handle vertical bar -- doc-reg-Fl is set for the first call of
-. \" doc-flag-recursion only; we need this to make `.Fl | ...' work
-. \" correctly
-. ie "\*[doc-str-dfr]"\*[Ba]" \{\
-. if \n[doc-reg-Fl] \
-. nop \|\-\*[doc-space]\c
-. nop \)\*[Ba]\c
-. \}
-. el \{\
-. ie "\*[doc-str-dfr]"\f[R]|\f[P]" \{\
-. if \n[doc-reg-Fl] \
-. nop \|\-\*[doc-space]\c
-. nop \f[R]|\f[P]\c
-. \}
-. el \{\
-. \" two consecutive hyphen characters?
-. ie "\*[doc-str-dfr]"-" \
-. nop \|\-\^\-\|\c
-. el \
-. nop \|\%\-\*[doc-str-dfr]\c
-. \}\}\}
-. el \{\
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. nop \)\*[doc-str-dfr]\f[P]\s[0]\c
-. \}
-.
-. ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
-. \" last argument
-. if (\n[doc-reg-dfr1] == 4) \
-. nop \|\-\c
-. nop \f[P]\s[0]\c
-. doc-print-and-reset
-. \}
-. el \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-type\n[doc-arg-ptr]] == 3) \{\
-. ie (\n[doc-type\n[doc-reg-dfr]] == 4) \
-. nop \|\-\c
-. el \
-. nop \)\*[doc-space\n[doc-reg-dfr]]\c
-. \}
-. el \
-. nop \)\*[doc-space\n[doc-reg-dfr]]\c
-.
-. shift
-. nr doc-reg-Fl 0
-. doc-flag-recursion \$@
-. \}\}
-..
-.
-.
-.\" NS doc-print-recursive macro
-.\" NS general name recursion routine (print remaining arguments)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dpr
-.\" NS doc-reg-dpr1
-.\" NS doc-str-dpr
-.
-.de doc-print-recursive
-. nr doc-reg-dpr1 \n[doc-type\n[doc-arg-ptr]]
-. ds doc-str-dpr "\*[doc-arg\n[doc-arg-ptr]]
-.
-. ie (\n[doc-reg-dpr1] == 1) \{\
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. \*[doc-str-dpr]
-. \}
-. el \{\
-. nr doc-reg-dpr \n[doc-arg-ptr]
-.
-. ie (\n[doc-reg-dpr1] == 2) \
-. \" the `\%' prevents hyphenation on a dash (`-')
-. nop \%\*[doc-str-dpr]\&\c
-. el \{\
-. \" punctuation character
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. nop \)\*[doc-str-dpr]\f[P]\s[0]\c
-. \}
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. \" last argument
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. doc-print-and-reset
-. \}
-. el \{\
-. nop \)\*[doc-space\n[doc-reg-dpr]]\c
-. doc-print-recursive
-. \}\}
-..
-.
-.
-.\" NS doc-print-prefixes macro
-.\" NS print leading prefixes
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.
-.de doc-print-prefixes
-. while (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. if !(\n[doc-type\n[doc-arg-ptr]] == 4) \
-. break
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
-. nr doc-arg-ptr +1
-. \}
-..
-.
-.
-.\" NS doc-generic-macro macro
-.\" NS this is the skeleton for most simple macros
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.
-.de doc-generic-macro
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name \$0
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. if (\n[doc-type\n[doc-arg-ptr]] == 1) \{\
-. tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
-.
-. \" the right action here would be to reset the argument counters
-. \" and bail out -- unfortunately, a small number of manual pages
-. \" (less than 2% for FreeBSD which has been used for testing)
-. \" relied on the old behaviour (silently ignore this error),
-. \" so it is commented out
-.
-.\" doc-reset-args
-. \}
-.\" el \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-\$0-font]\c
-. doc-print-recursive
-.\" \}
-. \}
-. el \{\
-. tm Usage: .\$0 \*[doc-\$0-usage] ... (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Ar user macro
-.\" NS command line `argument' macro: `.Ar [args ...]'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variable:
-.\" NS doc-str-Ar-default
-.\" NS
-.\" NS width register `Ar' set in doc-common
-.
-.ds doc-str-Ar-default "file\ .\|.\|.
-.
-.de Ar
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Ar-font]\c
-.
-. if !\n[doc-arg-limit] \{\
-. ds doc-macro-name Ar
-. doc-parse-args \$@
-.
-. if !\n[.$] \{\
-. \" no argument
-. nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. nop \)\*[doc-str-Ar-default]\&\f[P]\s[0]\c
-. doc-print-and-reset
-. \}
-. el \{\
-. if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. \" replace previous argument (Ar) with default value
-. nr doc-arg-ptr -1
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-str-Ar-default]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. doc-parse-space-vector
-. \}
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS Ad user macro
-.\" NS Addresses
-.\" NS
-.\" NS width register `Ad' set in doc-common
-.
-.als Ad doc-generic-macro
-.ds doc-Ad-usage address
-.
-.
-.\" NS doc-indent-synopsis global register
-.\" NS indentation in synopsis
-.
-.nr doc-indent-synopsis 0
-.
-.
-.\" NS doc-indent-synopsis-active global register (bool)
-.\" NS indentation in synopsis active
-.
-.nr doc-indent-synopsis-active 0
-.
-.
-.\" NS Cd user macro
-.\" NS config declaration (for section 4 SYNOPSIS)
-.\" NS
-.\" NS this function causes a break; it uses the `Nm' font
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-indent-synopsis
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Cd' set in doc-common
-.
-.de Cd
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Cd
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. ie \n[doc-in-synopsis-section] \{\
-. if "\*[doc-macro-name]"Cd" \{\
-. br
-. if !\n[doc-indent-synopsis] \
-. nr doc-indent-synopsis \n[doc-display-indent]u
-. if !\n[doc-indent-synopsis-active] \
-. in +\n[doc-indent-synopsis]u
-. ti -\n[doc-indent-synopsis]u
-. nop \*[doc-Nm-font]\c
-. doc-print-recursive
-. if !\n[doc-indent-synopsis-active] \
-. in -\n[doc-indent-synopsis]u
-. \}\}
-. el \{\
-. nop \*[doc-Nm-font]\c
-. doc-print-recursive
-. \}\}
-. el \{\
-. tm Usage: .Cd configuration_file_declaration ... (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Cm user macro
-.\" NS interactive command modifier (flag)
-.\" NS
-.\" NS width register `Cm' set in doc-common
-.
-.als Cm doc-generic-macro
-.ds doc-Cm-usage interactive_command_modifier
-.
-.
-.\" NS Dv user macro
-.\" NS defined variable
-.\" NS
-.\" NS this function uses the `Er' font
-.\" NS
-.\" NS width register `Dv' set in doc-common
-.
-.als Dv doc-generic-macro
-.ds doc-Dv-usage defined_variable
-.als doc-Dv-font doc-Er-font
-.
-.
-.\" NS Em user macro
-.\" NS emphasis
-.\" NS
-.\" NS width register `Em' set in doc-common
-.
-.als Em doc-generic-macro
-.ds doc-Em-usage text
-.
-.
-.\" NS Er user macro
-.\" NS errno type
-.\" NS
-.\" NS width register `Er' set in doc-common
-.
-.als Er doc-generic-macro
-.ds doc-Er-usage text
-.
-.
-.\" NS Ev user macro
-.\" NS environment variable
-.\" NS
-.\" NS width register `Ev' set in doc-common
-.
-.als Ev doc-generic-macro
-.ds doc-Ev-usage text
-.
-.
-.\" NS doc-have-decl global register (bool)
-.\" NS subroutine test (in synopsis only)
-.
-.nr doc-have-decl 0
-.
-.
-.\" NS doc-have-var global register (bool)
-.\" NS whether last type is a variable type
-.
-.nr doc-have-var 0
-.
-.
-.\" NS doc-do-func-decl macro
-.\" NS do someting special while in SYNOPSIS
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-decl
-.\" NS doc-have-var
-.
-.de doc-do-func-decl
-. if \n[doc-in-synopsis-section] \{\
-. \" if a variable type was the last thing given, want vertical space
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-. \" if a subroutine was the last thing given, want vertical space
-. if \n[doc-have-func] \{\
-. ie \n[doc-have-decl] \
-. br
-. el \
-. doc-paragraph
-. \}
-. nr doc-have-decl 1
-. \}
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-..
-.
-.
-.\" NS Fd user macro
-.\" NS function declaration -- not callable
-.\" NS
-.\" NS this function causes a break
-.\" NS
-.\" NS width register `Fd' set in doc-common
-.
-.de Fd
-. ie ((\n[.$] >= 1) & (\n[doc-arg-limit] == 0)) \{\
-. doc-do-func-decl
-. nop \*[doc-Fd-font]\$*
-. br
-. ft \n[doc-curr-font]
-. ps \n[doc-curr-size]u
-. \}
-. el \{\
-. tm Usage: .Fd function_declaration -- Fd is not callable (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS In user macro
-.\" NS #include statement - not callable
-.\" NS
-.\" NS this function causes a break; it uses the `Fd' font
-.\" NS
-.\" NS width register `In' set in doc-common
-.
-.de In
-. ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
-. doc-do-func-decl
-. nop \*[doc-Fd-font]#include <\$1>
-. br
-. ft \n[doc-curr-font]
-. ps \n[doc-curr-size]u
-. \}
-. el \{\
-. tm Usage: .In include_file -- In is not callable (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Fr user macro
-.\" NS function return value
-.\" NS
-.\" NS this function uses the `Ar' font
-.\" NS
-.\" NS width register `Fr' set in doc-common
-.
-.als Fr doc-generic-macro
-.ds doc-Fr-usage function_return_value
-.als doc-Fr-font doc-Ar-font
-.
-.
-.\" NS Ic user macro
-.\" NS interactive command
-.\" NS
-.\" NS width register `Ic' set in doc-common
-.
-.als Ic doc-generic-macro
-.ds doc-Ic-usage interactive_command
-.
-.
-.\" NS Li user macro
-.\" NS literals
-.\" NS
-.\" NS width register `Li' set in doc-common
-.
-.als Li doc-generic-macro
-.ds doc-Li-usage argument
-.
-.
-.\" NS Ms user macro
-.\" NS math symbol
-.\" NS
-.\" NS this function uses the `Sy' font
-.\" NS
-.\" NS width register `Ms' set in doc-common
-.
-.als Ms doc-generic-macro
-.ds doc-Ms-usage math_symbol
-.als doc-Ms-font doc-Sy-font
-.
-.
-.\" NS doc-command-name global string
-.\" NS save first invocation of .Nm
-.
-.ds doc-command-name
-.
-.
-.\" NS Nm user macro
-.\" NS name of command or page topic
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-command-name
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-indent-synopsis
-.\" NS doc-indent-synopsis-active
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Nm' set in doc-common
-.
-.de Nm
-. if !\n[doc-arg-limit] \{\
-. ds doc-macro-name Nm
-. ie \n[.$] \
-. doc-parse-args \$@
-. el \{\
-. ie "\*[doc-command-name]"" \
-. tm Usage: .Nm name ... (#\n[.c])
-. el \
-. doc-parse-args \*[doc-command-name]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. \" last argument
-. ie "\*[doc-command-name]"" \{\
-. tm Usage: .Nm name ... (#\n[.c])
-. doc-reset-args
-. \}
-. el \{\
-. nop \*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]\c
-. doc-print-and-reset
-. \}\}
-. el \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. ie !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. ie "\*[doc-command-name]"" \
-. tm Usage: .Nm name ... (#\n[.c])
-. el \{\
-. \" replace previous argument (Nm) with default value
-. nr doc-arg-ptr -1
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-Nm-font]\*[doc-command-name]\f[P]\s[0]
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. doc-parse-space-vector
-. \}\}
-. el \{\
-. \" handle `.Nm ...' in SYNOPSIS
-. if \n[doc-in-synopsis-section] \{\
-. if "\*[doc-macro-name]"Nm" \{\
-. br
-. if !\n[doc-indent-synopsis] \{\
-. doc-get-width "\*[doc-arg\n[doc-arg-ptr]]"
-. nr doc-indent-synopsis ((\n[doc-width]u + 1u) * \n[doc-fixed-width]u)
-. \}
-. if !\n[doc-indent-synopsis-active] \{\
-. in +\n[doc-indent-synopsis]u
-. nr doc-indent-synopsis-active 1
-. \}
-. ti -\n[doc-indent-synopsis]u
-. \}\}
-. if "\*[doc-command-name]"" \
-. ds doc-command-name "\*[doc-arg\n[doc-arg-ptr]]
-.
-. nop \*[doc-Nm-font]\c
-. \}
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS Pa user macro
-.\" NS pathname: `.Pa [arg ...]'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Pa' set in doc-common
-.
-.de Pa
-. if !\n[doc-arg-limit] \{\
-. ds doc-macro-name Pa
-. doc-parse-args \$@
-.
-. if !\n[.$] \{\
-. \" default value
-. nop \*[doc-Pa-font]~\f[P]\s[0]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Pa-font]\c
-. if !(\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. \" replace previous argument (Pa) with default value
-. nr doc-arg-ptr -1
-. ds doc-arg\n[doc-arg-ptr] ~
-. nr doc-type\n[doc-arg-ptr] 2
-. ds doc-space\n[doc-arg-ptr] "\*[doc-space]
-.
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. doc-parse-space-vector
-. \}
-. doc-print-recursive
-. \}
-. el \{\
-. nop \*[doc-Pa-font]~\f[P]\s[0]\c
-. doc-print-and-reset
-. \}
-..
-.
-.
-.\" NS Sy user macro
-.\" NS symbolics
-.\" NS
-.\" NS width register `Sy' set in doc-common
-.
-.als Sy doc-generic-macro
-.ds doc-Sy-usage symbolic_text
-.
-.
-.\" NS Me user macro
-.\" NS menu entries
-.\" NS
-.\" NS width register `Me' set in doc-common
-.
-.als Me doc-generic-macro
-.ds doc-Me-usage menu_entry
-.
-.
-.\" NS Tn user macro
-.\" NS trade name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Tn' set in doc-common
-.
-.de Tn
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Tn
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Tn trade_name ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \)\*[doc-Tn-font-size]\c
-. ie !\n[doc-is-reference] \{\
-. nop \)\*[doc-Tn-font-shape]\c
-. doc-print-recursive
-. \}
-. el \
-. doc-do-references
-. \}
-. el \{\
-. tm Usage: .Tn trade_name ... (#\n[.c])
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Va user macro
-.\" NS variable name
-.\" NS
-.\" NS width register `Va' set in doc-common
-.
-.als Va doc-generic-macro
-.ds doc-Va-usage variable_name
-.
-.
-.\" NS No user macro
-.\" NS normal text macro (default text style if mess up)
-.\" NS
-.\" NS width register `No' set in doc-common
-.
-.als No doc-generic-macro
-.ds doc-No-usage normal_text
-.
-.
-.\" NS doc-quote-left global string
-.\" NS left quotation character for `doc-enclose-string' and
-.\" NS `doc-enclose-open'
-.
-.ds doc-quote-left
-.
-.
-.\" NS doc-quote-right global string
-.\" NS right quotation character for `doc-enclose-string' and
-.\" NS `doc-enclose-close'
-.
-.ds doc-quote-right
-.
-.
-.\" NS Op user macro
-.\" NS option expression (i.e., enclose string in square brackets)
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Op' set in doc-common
-.
-.de Op
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Op
-.
-. ds doc-quote-left "\*[doc-left-bracket]
-. ds doc-quote-right "\*[doc-right-bracket]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Aq user macro
-.\" NS enclose string in angle brackets
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Aq' set in doc-common
-.
-.de Aq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Aq
-.
-. ds doc-quote-left \[la]
-. ds doc-quote-right \[ra]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Bq user macro
-.\" NS enclose string in square brackets
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Bq' set in doc-common
-.
-.de Bq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bq
-.
-. ds doc-quote-left "\*[doc-left-bracket]
-. ds doc-quote-right "\*[doc-right-bracket]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Brq user macro
-.\" NS enclose string in braces
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Brq' set in doc-common
-.
-.de Brq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Brq
-.
-. ds doc-quote-left {
-. ds doc-quote-right }
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Dq user macro
-.\" NS enclose string in double quotes
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Dq' set in doc-common
-.
-.de Dq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Dq
-.
-. ds doc-quote-left "\*[Lq]
-. ds doc-quote-right "\*[Rq]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Eq user macro
-.\" NS enclose string in user-defined quotes (args 1 and 2)
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Eq' set in doc-common
-.
-.de Eq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Eq
-.
-. ds doc-quote-left "\$1
-. ds doc-quote-right "\$2
-.
-. shift 2
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Pq user macro
-.\" NS enclose string in parentheses
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Pq' set in doc-common
-.
-.de Pq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Pq
-.
-. ds doc-quote-left "\*[doc-left-parenthesis]
-. ds doc-quote-right "\*[doc-right-parenthesis]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Ql user macro
-.\" NS quoted literal
-.\"
-.\" is in file doc-[dit|n]roff
-.
-.
-.\" NS Qq user macro
-.\" NS enclose string in straight double quotes
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Qq' set in doc-common
-.
-.de Qq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Qq
-.
-. ds doc-quote-left "\*[q]
-. ds doc-quote-right "\*[q]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Sq user macro
-.\" NS enclose string in single quotes
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Sq' set in doc-common
-.
-.de Sq
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Sq
-.
-. ds doc-quote-left "\*[doc-left-singlequote]
-. ds doc-quote-right "\*[doc-right-singlequote]
-.
-. doc-enclose-string \$@
-..
-.
-.
-.\" NS Es user macro
-.\" NS set up arguments (i.e., the left and right quotation character as
-.\" NS first and second argument) for .En call
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.
-.de Es
-. if !\n[doc-arg-limit] \{\
-. ie (\n[.$] > 2) \{\
-. ds doc-macro-name Es
-. doc-parse-args \$@
-. \}
-. el \{\
-. ds doc-quote-left "\$1
-. ds doc-quote-right "\$2
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. ds doc-quote-left "\*[doc-arg\n[doc-arg-ptr]]
-. nr doc-arg-ptr +1
-. ds doc-quote-right "\*[doc-arg\n[doc-arg-ptr]]
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-. el \
-. doc-print-and-reset
-..
-.
-.
-.\" NS doc-have-slot global register (bool)
-.\" NS set if `doc-enclose-string' has created a slot for closing
-.\" NS delimiter
-.
-.nr doc-have-slot 0
-.
-.
-.\" NS doc-enclose-string macro
-.\" NS enclose string with given args (e.g. [ and ])
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-have-slot
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-des
-.\" NS doc-reg-des1
-.\" NS doc-reg-des2
-.\" NS
-.\" NS requires:
-.\" NS doc-quote-left
-.\" NS doc-quote-right
-.
-.de doc-enclose-string
-. if \n[doc-in-synopsis-section] \
-. doc-set-hard-space
-.
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \
-. doc-parse-args \$@
-. el \{\
-. nop \)\*[doc-quote-left]\*[doc-quote-right]
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. \" the final `\)' prevents hyphenation in case the next character is `\%'
-. nop \)\*[doc-quote-left]\)\c
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. \" last argument
-. nop \)\*[doc-quote-right]\)\c
-. doc-print-and-reset
-. \}
-. el \{\
-. \" test whether last arguments are of type closing punctuation
-. \" resp. suffix
-. ie (\n[doc-type\n[doc-arg-limit]] == 3) \{\
-. nr doc-reg-des (\n[doc-arg-limit] - 1)
-. while (\n[doc-type\n[doc-reg-des]] == 3) \
-. nr doc-reg-des -1
-.
-. \" prepend closing delimiter
-. nr doc-reg-des +1
-. ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
-. \}
-. el \{\
-. \" test whether last arguments are macros which continue the line
-. \" logically
-. nr doc-reg-des \n[doc-arg-limit]
-. while (\n[doc-reg-des] >= \n[doc-arg-ptr]) \{\
-. if !\A\*[doc-arg\n[doc-reg-des]] \
-. break
-. if !d doc-after-\*[doc-arg\n[doc-reg-des]] \
-. break
-. nr doc-reg-des -1
-. \}
-.
-. \" if there are no trailing macros to be skipped, append argument
-. ie (\n[doc-reg-des] == \n[doc-arg-limit]) \
-. doc-append-arg "\)\*[doc-quote-right]\)" 3
-. el \{\
-. \" if a previous call to `doc-enclose-string' has already created
-. \" a slot, prepend argument
-. ie \n[doc-have-slot] \
-. ds doc-arg\n[doc-reg-des] "\*[doc-quote-right]\)\*[doc-arg\n[doc-reg-des]]
-. el \{\
-. \" we have to shift all arguments to the right
-. nr doc-reg-des +1
-. nr doc-reg-des1 \n[doc-arg-limit]
-. nr doc-reg-des2 (\n[doc-arg-limit] + 1)
-. while (\n[doc-reg-des1] >= \n[doc-reg-des]) \{\
-. rn doc-arg\n[doc-reg-des1] doc-arg\n[doc-reg-des2]
-. rnn doc-type\n[doc-reg-des1] doc-type\n[doc-reg-des2]
-. rn doc-space\n[doc-reg-des1] doc-space\n[doc-reg-des2]
-. nr doc-reg-des1 -1
-. nr doc-reg-des2 -1
-. \}
-. nr doc-arg-limit +1
-.
-. \" finally, insert closing delimiter into the freed slot and
-. \" recompute spacing vector
-. ds doc-arg\n[doc-reg-des] "\)\*[doc-quote-right]\)
-. nr doc-type\n[doc-reg-des] 3
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-reg-des] + 1)
-. nr doc-arg-limit (\n[doc-reg-des] - 1)
-. doc-parse-space-vector
-. nr doc-have-slot 1
-. \}\}\}
-.
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-. \}
-.
-. if \n[doc-in-synopsis-section] \
-. doc-set-soft-space
-..
-.
-.
-.\" NS En user macro
-.\" NS enclose arguments with quotation characters set up with `.Es'
-.
-.als En doc-enclose-string
-.
-.
-.\" NS Ao user macro
-.\" NS angle open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Ao' set in doc-common
-.
-.de Ao
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Ao
-.
-. ds doc-quote-left \[la]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Ac user macro
-.\" NS angle close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Ac' set in doc-common
-.
-.de Ac
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Ac
-.
-. ds doc-quote-right \[ra]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Bo user macro
-.\" NS bracket open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Bo' set in doc-common
-.
-.de Bo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bo
-.
-. ds doc-quote-left "\*[doc-left-bracket]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Bc user macro
-.\" NS bracket close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Bc' set in doc-common
-.
-.de Bc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bc
-.
-. ds doc-quote-right "\*[doc-right-bracket]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Bro user macro
-.\" NS brace open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Bro' set in doc-common
-.
-.de Bro
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bo
-.
-. ds doc-quote-left {
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Brc user macro
-.\" NS brace close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Brc' set in doc-common
-.
-.de Brc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Bc
-.
-. ds doc-quote-right }
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Do user macro
-.\" NS double quote open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Do' set in doc-common
-.
-.de Do
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Do
-.
-. ds doc-quote-left "\*[Lq]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Dc user macro
-.\" NS double quote close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Dc' set in doc-common
-.
-.de Dc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Dc
-.
-. ds doc-quote-right "\*[Rq]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Eo user macro
-.\" NS enclose open (using first argument as beginning of enclosure)
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Eo' set in doc-common
-.
-.de Eo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Eo
-.
-. ds doc-quote-left "\$1
-.
-. shift
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Ec user macro
-.\" NS enclose close (using first argument as end of enclosure)
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Ec' set in doc-common
-.
-.de Ec
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Ec
-.
-. ds doc-quote-right "\$1
-.
-. shift
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Oo user macro
-.\" NS option open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Oo' set in doc-common
-.
-.de Oo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Oo
-.
-. ds doc-quote-left [
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Oc user macro
-.\" NS option close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Oc' set in doc-common
-.
-.de Oc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Oc
-.
-. ds doc-quote-right ]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Po user macro
-.\" NS parenthesis open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Po' set in doc-common
-.
-.de Po
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Po
-.
-. ds doc-quote-left "\*[doc-left-parenthesis]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Pc user macro
-.\" NS parenthesis close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Pc' set in doc-common
-.
-.de Pc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Pc
-.
-. ds doc-quote-right "\*[doc-right-parenthesis]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Qo user macro
-.\" NS straight double quote open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Qo' set in doc-common
-.
-.de Qo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Qo
-.
-. ds doc-quote-left "\*[q]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Qc user macro
-.\" NS straight double quote close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Qc' set in doc-common
-.
-.de Qc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Qc
-.
-. ds doc-quote-right "\*[q]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS So user macro
-.\" NS single quote open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `So' set in doc-common
-.
-.de So
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name So
-.
-. ds doc-quote-left "\*[doc-left-singlequote]
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Sc user macro
-.\" NS single quote close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Sc' set in doc-common
-.
-.de Sc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Sc
-.
-. ds doc-quote-right "\*[doc-right-singlequote]
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS Xo user macro
-.\" NS extend open
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Xo' set in doc-common
-.
-.de Xo
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Xo
-.
-. ds doc-quote-left
-.
-. doc-enclose-open \$@
-..
-.
-.
-.\" NS Xc user macro
-.\" NS extend close
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS doc-quote-right
-.\" NS
-.\" NS width register `Xc' set in doc-common
-.
-.de Xc
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Xc
-.
-. ds doc-quote-right
-.
-. doc-enclose-close \$@
-..
-.
-.
-.\" NS doc-nesting-level global register
-.\" NS used by `doc-enclose-open' and `doc-enclose-close'
-.
-.nr doc-nesting-level 0
-.
-.
-.\" NS doc-in-list global register (bool)
-.\" NS whether we are in (logical) .It
-.
-.nr doc-in-list 0
-.
-.
-.\" NS doc-enclose-open macro
-.\" NS enclose string open
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-nesting-level
-.
-.de doc-enclose-open
-. if !\n[doc-arg-limit] \
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. nr doc-arg-ptr -1
-.
-. nop \)\*[doc-quote-left]\)\c
-.
-. \" start enclosure box
-. box doc-enclosure-box\n[doc-nesting-level]
-. ev doc-enclosure-env\n[doc-nesting-level]
-. evc 0
-. in 0
-. nf
-. \" we insert something to make .chop always work
-. nop \&\c
-.
-. \" increase nesting level *after* parsing of arguments
-. nr doc-nesting-level +1
-.
-. if \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-print-recursive
-. el \
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS doc-enclose-close macro
-.\" NS enclose string close
-.\" NS
-.\" NS modifies:
-.\" NS doc-nesting-level
-.
-.de doc-enclose-close
-. nr doc-nesting-level -1
-.
-. \" finish enclosure box
-. br
-. ev
-. box
-. chop doc-enclosure-box\n[doc-nesting-level]
-. unformat doc-enclosure-box\n[doc-nesting-level]
-.
-. nh
-. nop \*[doc-enclosure-box\n[doc-nesting-level]]\c
-. nop \)\*[doc-quote-right]\)\c
-.
-. if !\n[doc-arg-limit] \{\
-. doc-parse-args \$@
-.
-. if !\n[.$] \
-. doc-print-and-reset
-. \}
-.
-. if \n[doc-arg-limit] \{\
-. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nop \)\*[doc-space\n[doc-arg-ptr]]\c
-. nr doc-arg-ptr +1
-. doc-print-recursive
-. \}
-. el \
-. doc-print-and-reset
-. \}
-.
-. \" shall we finish .It request?
-. if !"\*[doc-macro-name]"It" \
-. if \n[doc-in-list] \
-. if !\n[doc-nesting-level] \
-. doc-\*[doc-list-type-stack\n[doc-list-depth]]
-..
-.
-.
-.\" NS Pf user macro
-.\" NS prefix: `.Pf prefix arg ...'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS doc-quote-left
-.\" NS
-.\" NS width register `Pf' set in doc-common
-.
-.de Pf
-. if !\n[doc-arg-limit] \
-. ds doc-macro-name Pf
-.
-. ie \n[doc-arg-limit] \{\
-. ie ((\n[doc-arg-limit] - \n[doc-arg-ptr]) > 1) \{\
-. nr doc-arg-ptr +1
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
-. \}
-. el \
-. tm mdoc warning: .Pf: trailing prefix (#\n[.c])
-. \}
-. el \{\
-. nop \)\$1\)\c
-. shift
-. ie \n[.$] \
-. doc-parse-args \$@
-. el \{\
-. tm mdoc warning: .Pf: missing arguments (#\n[.c])
-. nop \)
-. \}\}
-.
-. if \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
-. doc-print-and-reset
-. el \
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-. \}
-..
-.
-.
-.\" NS Ns user macro
-.\" NS remove space (space removal done by `doc-parse-args')
-.\" NS
-.\" NS modifies:
-.\" NS doc-argXXX
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ns' set in doc-common
-.
-.de Ns
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Ns
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Ns must be called with arguments (#\n[.c])
-. \}
-.
-. if \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-print-recursive
-. el \
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Ap user macro
-.\" NS append an apostrophe
-.\" NS
-.\" NS width register `Ap' set in doc-common
-.
-.de Ap
-. ie !\n[doc-arg-limit] \
-. tm Usage: `Ap' cannot be first request on a line (no `.Ap') (#\n[.c])
-. el \{\
-. nop \)'\)\c
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-print-recursive
-. el \
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS doc-space global string
-.\" NS current inter-argument space
-.
-.ds doc-space "\*[doc-soft-space]
-.
-.
-.\" NS doc-soft-space constant string
-.\" NS soft (stretchable) space (defined in doc-common)
-.
-.
-.\" NS doc-hard-space constant string
-.\" NS hard (unpaddable) space (defined in doc-common)
-.
-.
-.\" NS doc-set-hard-space macro
-.\" NS set current space string to hard (unpaddable) space.
-.\" NS
-.\" NS modifies:
-.\" NS doc-saved-space
-.\" NS doc-space
-.
-.de doc-set-hard-space
-. ie "\*[doc-space]"" \
-. ds doc-saved-space "\*[doc-hard-space]
-. el \
-. ds doc-space "\*[doc-hard-space]
-..
-.
-.
-.\" NS doc-set-soft-space macro
-.\" NS set current space string to soft space
-.\" NS
-.\" NS modifies:
-.\" NS doc-saved-space
-.\" NS doc-space
-.
-.de doc-set-soft-space
-. ie "\*[doc-space]"" \
-. ds doc-saved-space "\*[doc-soft-space]
-. el \
-. ds doc-space "\*[doc-soft-space]
-..
-.
-.
-.\" NS doc-space-mode global register (bool)
-.\" NS default is one (space mode on)
-.
-.nr doc-space-mode 1
-.
-.
-.\" NS doc-saved-space global string
-.\" NS saved value of `doc-space'
-.
-.ds doc-saved-space "\*[doc-space]
-.
-.
-.\" NS doc-have-space global register (bool)
-.\" NS set if last command was horizontal space
-.
-.nr doc-have-space 0
-.
-.
-.\" NS Sm user macro
-.\" NS space mode (`.Sm'/`.Sm on'/`.Sm off')
-.\" NS
-.\" NS without argument, toggle space mode
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-limit
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-macro-name
-.\" NS doc-num-args
-.\" NS doc-saved-space
-.\" NS doc-space
-.\" NS doc-space-mode
-.\" NS doc-spaceXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Sm
-.\" NS
-.\" NS width register `Sm' set in doc-common
-.
-.de Sm
-. ie \n[doc-have-space] \
-. nr doc-reg-Sm 0
-. el \
-. nr doc-reg-Sm 1
-.
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Sm
-. doc-parse-args \$@
-. \}
-. el \{\
-. ie \n[doc-space-mode] \
-. nr doc-space-mode 0
-. el \
-. nr doc-space-mode 1
-. \}\}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-.
-. \" avoid a warning message in case `Sm' is the last parameter
-. if !d doc-arg\n[doc-arg-ptr] \
-. ds doc-arg\n[doc-arg-ptr]
-.
-. ie "\*[doc-arg\n[doc-arg-ptr]]"on" \{\
-. ds doc-space "\*[doc-saved-space]
-. nr doc-space-mode 1
-. \}
-. el \{\
-. ie "\*[doc-arg\n[doc-arg-ptr]]"off" \{\
-. ds doc-saved-space "\*[doc-space]
-. ds doc-space
-. nr doc-space-mode 0
-. \}
-. el \{\
-. \" no argument for Sm
-. nr doc-arg-ptr -1
-. ie \n[doc-space-mode] \
-. nr doc-space-mode 0
-. el \
-. nr doc-space-mode 1
-. \}\}
-.
-. ie \n[doc-space-mode] \{\
-. \" recompute space vector for remaining arguments
-. nr doc-num-args (\n[doc-arg-limit] - \n[doc-arg-ptr])
-. nr doc-arg-limit \n[doc-arg-ptr]
-. if \n[doc-num-args] \
-. doc-parse-space-vector
-.
-. \" finish line only if it is interrupted and `doc-have-space'
-. \" isn't set
-. if \n[doc-reg-Sm] \
-. if \n[.int] \
-. nop \)
-. \}
-. el \{\
-. \" reset remaining space vector elements
-. nr doc-reg-Sm (\n[doc-arg-ptr] + 1)
-. while (\n[doc-reg-Sm] <= \n[doc-arg-limit]) \{\
-. ds doc-space\n[doc-reg-Sm]
-. nr doc-reg-Sm +1
-. \" the body of a `while' request must end with the fitting `\}'!
-. \}
-. \}
-.
-. \" do we have parameters to print?
-. ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
-. \" ignore `.Sm on' and `.Sm off' without additional parameters
-. ie (\n[doc-arg-ptr] > 1) \
-. doc-print-and-reset
-. el \
-. doc-reset-args
-. \}
-. el \{\
-. \" skip `Sm' argument
-. nr doc-arg-ptr +1
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS doc-arg-type immediate register
-.\" NS argument type (macro=1, string=2, punctuation suffix=3,
-.\" NS punctuation prefix=4)
-.
-.nr doc-arg-type 0
-.
-.
-.\" NS doc-get-arg-type macro
-.\" NS get argument type
-.\" NS
-.\" NS this macro expects the width of the argument in `doc-width'
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-type
-.
-.de doc-get-arg-type
-. nr doc-arg-type 2
-.
-. if ((\n[doc-width] < 4) & \A\$1) \{\
-. ie (\n[doc-width] == 1) \{\
-. if r doc-punct\$1 \
-. nr doc-arg-type \n[doc-punct\$1]
-. \}
-. el \
-. if r \$1 \
-. if d \$1 \
-. nr doc-arg-type 1
-. \}
-..
-.
-.
-.\" NS doc-get-arg-type* macro
-.\" NS similar to as `doc-get-arg-type' but uses doc-argXXX strings
-.\" NS
-.\" NS this macro sets the `doc-width' register using the `length' request
-.\" NS to get the number of characters in a string literally
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-type
-.\" NS doc-width
-.
-.de doc-get-arg-type*
-. nr doc-arg-type 2
-. length doc-width "\*[doc-arg\$1]
-.
-. if ((\n[doc-width] < 4) & \A\*[doc-arg\$1]) \{\
-. ie (\n[doc-width] == 1) \{\
-. if r doc-punct\*[doc-arg\$1] \
-. nr doc-arg-type \n[doc-punct\*[doc-arg\$1]]
-. \}
-. el \
-. if r \*[doc-arg\$1] \
-. if d \*[doc-arg\$1] \
-. nr doc-arg-type 1
-. \}
-..
-.
-.
-.\" NS doc-set-spacing-1 macro
-.\" NS set spacing for macros
-.\" NS
-.\" NS modifies:
-.\" NS doc-spaceXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dssfm
-.\" NS doc-reg-dssfm1
-.
-.de doc-set-spacing-1
-. nr doc-reg-dssfm1 \n[\*[doc-arg\n[doc-arg-limit]]]
-.
-. \" closing macros like .Ac, Bc., etc. have value 3 (remove space before
-. \" argument)
-. ie (\n[doc-reg-dssfm1] == 3) \{\
-. if \n[doc-arg-limit] \{\
-. nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
-. ds doc-space\n[doc-reg-dssfm]
-. \}
-. ds doc-space\n[doc-arg-limit] "\*[doc-space]
-. \}
-. el \{\
-. \" macros like .Ap and .Ns have value 2 (remove space before and after
-. \" argument)
-. ie (\n[doc-reg-dssfm1] == 2) \{\
-. if \n[doc-arg-limit] \{\
-. nr doc-reg-dssfm (\n[doc-arg-limit] - 1)
-. ds doc-space\n[doc-reg-dssfm]
-. \}
-. ds doc-space\n[doc-arg-limit]
-. \}
-. el \
-. ds doc-space\n[doc-arg-limit]
-. \}
-..
-.
-.
-.\" NS doc-set-spacing-2 macro
-.\" NS set spacing for strings
-.\" NS
-.\" NS modifies:
-.\" NS doc-spaceXXX
-.
-.de doc-set-spacing-2
-. ds doc-space\n[doc-arg-limit] "\*[doc-space]
-..
-.
-.
-.\" NS doc-set-spacing-3 macro
-.\" NS set spacing for punctuation suffixes
-.\" NS
-.\" NS modifies:
-.\" NS doc-spaceXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dssfps
-.
-.de doc-set-spacing-3
-. if \n[doc-arg-limit] \{\
-. nr doc-reg-dssfps (\n[doc-arg-limit] - 1)
-. ds doc-space\n[doc-reg-dssfps]
-. \}
-.
-. ds doc-space\n[doc-arg-limit] "\*[doc-space]
-..
-.
-.
-.\" NS doc-set-spacing-4 macro
-.\" NS set spacing for punctuation prefixes
-.\" NS
-.\" NS modifies:
-.\" NS doc-spaceXXX
-.
-.de doc-set-spacing-4
-. ds doc-space\n[doc-arg-limit]
-..
-.
-.
-.\" type switches (on current argument doc-arg-ptr)
-.
-.
-.\" NS doc-do-1 macro
-.\" NS call request if macro
-.
-.de doc-do-1
-. \*[doc-arg\n[doc-arg-ptr]]
-..
-.
-.
-.\" NS doc-do-2 macro
-.\" NS call .doc-print-recursive if string
-.
-.als doc-do-2 doc-print-recursive
-.
-.
-.\" NS doc-do-3 macro
-.\" NS call .doc-print-recursive if punctuation suffix
-.
-.als doc-do-3 doc-print-recursive
-.
-.
-.\" NS doc-do-4 macro
-.\" NS call .doc-print-recursive if punctuation prefix
-.
-.als doc-do-4 doc-print-recursive
-.
-.
-.\" NS doc-fontmode-depth global register
-.\" NS font mode level
-.
-.nr doc-fontmode-depth 0
-.
-.
-.\" NS doc-fontmode-font-stackXXX global register
-.\" NS stack of saved current font values from `Bf' request
-.\" NS
-.\" NS limit:
-.\" NS doc-fontmode-depth
-.
-.nr doc-fontmode-font-stack0 0
-.
-.
-.\" NS doc-fontmode-size-stackXXX global register
-.\" NS stack of saved current size values from `Bf' request
-.\" NS
-.\" NS limit:
-.\" NS doc-fontmode-depth
-.
-.nr doc-fontmode-size-stack0 0
-.
-.
-.\" NS Bf user macro
-.\" NS begin font mode (will be begin-mode/end-mode in groff & TeX)
-.\" NS
-.\" NS modifies:
-.\" NS doc-fontmode-depth
-.\" NS doc-fontmode-font-stackXXX
-.\" NS doc-fontmode-size-stackXXX
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Bf' set in doc-common
-.
-.de Bf
-. ds doc-macro-name Bf
-.
-. ie \n[.$] \{\
-. nr doc-fontmode-depth +1
-.
-. \" save current font and size
-. nr doc-fontmode-font-stack\n[doc-fontmode-depth] \n[.f]
-. nr doc-fontmode-size-stack\n[doc-fontmode-depth] \n[.ps]
-.
-. ie "\$1"Em" \
-. nop \*[doc-Em-font]\c
-. el \{ .ie "\$1"Li" \
-. nop \*[doc-Li-font]\c
-. el \{ .ie "\$1"Sy" \
-. nop \*[doc-Sy-font]\c
-. el \{ .ie "\$1"-emphasis" \
-. nop \*[doc-Em-font]\c
-. el \{ .ie "\$1"-literal" \
-. nop \*[doc-Li-font]\c
-. el \{ .ie "\$1"-symbolic" \
-. nop \*[doc-Sy-font]\c
-. el \{\
-. tmc mdoc warning: Unknown keyword `\$1' in .Bf request
-. tm1 " (#\n[.c])
-. \}\}\}\}\}\}\}
-. el \
-. tm Usage: .Bf [Em | -emphasis | Li | -literal | Sy | -symbolic] (#\n[.c])
-..
-.
-.
-.\" NS Ef user macro
-.\" NS end font mode
-.\" NS
-.\" NS modifies:
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ef' set in doc-common
-.
-.de Ef
-. ds doc-macro-name Ef
-.
-. ie \n[doc-fontmode-depth] \{\
-. \" restore saved font and size
-. nop \)\f[\n[doc-fontmode-font-stack\n[doc-fontmode-depth]]]\c
-. nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
-.
-. nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
-. nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
-. nr doc-fontmode-depth -1
-. \}
-. el \
-. tm mdoc warning: Extraneous .Ef (#\n[.c])
-..
-.
-.
-.\" NS doc-keep-type global register
-.\" NS current keep type; 1 is `-words', 2 is `-lines', 3 is unknown
-.
-.nr doc-keep-type 0
-.
-.
-.\" NS Bk user macro
-.\" NS begin keep
-.\" NS
-.\" NS modifies:
-.\" NS doc-keep-type
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Bk' set in doc-common
-.
-.de Bk
-. ds doc-macro-name Bk
-.
-. if \n[doc-keep-type] \
-. tm .Bk: nesting keeps not implemented yet. (#\n[.c])
-.
-. ie "\$1"-lines" \{\
-. nr doc-keep-type 2
-. tm .Bk -lines: Not implemented yet. (#\n[.c])
-. \}
-. el \{ .ie "\$1"-words" \{\
-. nr doc-keep-type 1
-. doc-set-hard-space
-. \}
-. el \{ .ie "\$1"" \{\
-. \" default
-. nr doc-keep-type 1
-. doc-set-hard-space
-. \}
-. el \{\
-. tm mdoc warning: Unknown keyword `\$1' in .Bk request (#\n[.c])
-. nr doc-keep-type 3
-. \}\}\}
-.
-\#. nr doc-nesting-level +1
-..
-.
-.
-.\" NS Ek user macro
-.\" NS end keep
-.\" NS
-.\" NS modifies:
-.\" NS doc-keep-type
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ek' set in doc-common
-.
-.de Ek
-. ds doc-macro-name Ek
-.
-\#. nr doc-nesting-level -1
-.
-. ie \n[.$] \
-. tm Usage: .Ek (does not take arguments) (#\n[.c])
-. el \{\
-. if !\n[doc-keep-type] \
-. tm mdoc warning: .Ek found without .Bk before (#\n[.c])
-.
-. ie (\n[doc-keep-type] == 1) \
-. doc-set-soft-space
-. el \{ .if (\n[doc-keep-type] == 2) \
-. tm .Bk -lines: Not implemented yet. (#\n[.c])
-. \}\}
-.
-. nr doc-keep-type 0
-.
-\#. if !"\*[doc-out-string]"" \
-\#. doc-print-out-string
-..
-.
-.
-.\" NS doc-display-depth global register
-.\" NS display level
-.
-.nr doc-display-depth 0
-.
-.
-.\" NS doc-is-compact global register (bool)
-.\" NS set if the `compact' keyword is given
-.
-.nr doc-is-compact 0
-.
-.
-.\" NS doc-display-type-stackXXX global string
-.\" NS the display type stack
-.\" NS
-.\" NS limit:
-.\" NS doc-display-depth
-.
-.ds doc-display-type-stack0
-.
-.
-.\" NS doc-display-indent-stackXXX global register
-.\" NS stack of display indentation values
-.\" NS
-.\" NS limit:
-.\" NS doc-display-depth
-.
-.nr doc-display-indent-stack0 0
-.
-.
-.\" NS doc-display-ad-stackXXX global register
-.\" NS stack of saved adjustment modes
-.\" NS
-.\" NS limit:
-.\" NS doc-display-depth
-.
-.nr doc-display-ad-stack0 0
-.
-.
-.\" NS doc-display-fi-stackXXX global register
-.\" NS stack of saved fill modes
-.\" NS
-.\" NS limit:
-.\" NS doc-display-depth
-.
-.nr doc-display-fi-stack0 0
-.
-.
-.\" NS Bd user macro
-.\" NS begin display
-.\" NS
-.\" NS width register `Bd' set in doc-common
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-display-depth
-.\" NS doc-display-ad-stackXXX
-.\" NS doc-display-fi-stackXXX
-.\" NS doc-display-file
-.\" NS doc-display-indent-stackXXX
-.\" NS doc-display-type-stackXXX
-.\" NS doc-is-compact
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Bd
-.
-.de Bd
-. ds doc-macro-name Bd
-.
-. if !\n[.$] \{\
-. tm1 "Usage: .Bd {-literal | -filled | -ragged | -centered | -unfilled}
-. tm1 " [-offset [string]] [-compact] [-file name] (#\n[.c])
-. return
-. \}
-.
-. nr doc-is-compact 0
-. ds doc-display-file
-. nr doc-reg-Bd 1
-. nr doc-display-depth +1
-.
-. \" save current adjustment and fill modes
-. nr doc-display-ad-stack\n[doc-display-depth] \n[.j]
-. nr doc-display-fi-stack\n[doc-display-depth] \n[.u]
-.
-. ie "\$1"-literal" \{\
-. ds doc-display-type-stack\n[doc-display-depth] literal
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. ie t \{\
-. nop \*[doc-Li-font]\c
-' ta T 9n
-. \}
-. el \
-' ta T 8n
-. nf
-. \}
-. el \{ .ie "\$1"-filled" \{\
-. ds doc-display-type-stack\n[doc-display-depth] filled
-. ad b
-. fi
-. \}
-. el \{ .ie "\$1"-ragged" \{\
-. ds doc-display-type-stack\n[doc-display-depth] ragged
-. na
-. fi
-. \}
-. el \{ .ie "\$1"-centered" \{\
-. ds doc-display-type-stack\n[doc-display-depth] centered
-. ad c
-. fi
-. \}
-. el \{ .ie "\$1"-unfilled" \{\
-. ds doc-display-type-stack\n[doc-display-depth] unfilled
-. nf
-. \}
-. el \{\
-. tm1 "mdoc warning: Unknown keyword `\$1' (or missing display type)
-. tm1 " in .Bd request (#\n[.c])
-. nr doc-reg-Bd 0
-. \}\}\}\}\}
-.
-. \" have we seen an argument?
-. if \n[doc-reg-Bd] \{\
-. shift
-. \" check other arguments
-. if \n[.$] \
-. doc-do-Bd-args \$@
-. \}
-.
-. \" avoid warning about non-existent register
-. if !r doc-display-indent-stack\n[doc-display-depth] \
-. nr doc-display-indent-stack\n[doc-display-depth] 0
-.
-. if \n[doc-display-indent-stack\n[doc-display-depth]] \
-' in +\n[doc-display-indent-stack\n[doc-display-depth]]u
-.
-. if !\n[doc-is-compact] \{\
-. if !\n[doc-in-synopsis-section] \{\
-. ie "\*[doc-display-type-stack\n[doc-display-depth]]"ragged" \
-. sp \n[doc-display-vertical]u
-. el \
-' sp \n[doc-display-vertical]u
-. \}\}
-.
-. if !\n[cR] \
-. ne 2v
-.
-. if !"\*[doc-display-file]"" \
-. so \*[doc-display-file]
-.
-. nr doc-is-compact 0
-. ds doc-display-file
-..
-.
-.
-.\" NS doc-do-Bd-args macro
-.\" NS resolve remaining .Bd arguments
-.\" NS
-.\" NS modifies:
-.\" NS doc-display-file
-.\" NS doc-display-indent-stackXXX
-.\" NS doc-is-compact
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-ddBa
-.\" NS doc-reg-ddBa1
-.\" NS doc-reg-ddBa2
-.\" NS doc-reg-ddBa3
-.\" NS doc-reg-ddBa4
-.\" NS doc-str-ddBa
-.
-.de doc-do-Bd-args
-. nr doc-reg-ddBa 1
-.
-. ie "\$1"-offset" \{\
-. nr doc-reg-ddBa 2
-.
-. ie "\$2"left" \
-. nr doc-display-indent-stack\n[doc-display-depth] 0
-. el \{ .ie "\$2"right" \
-. nr doc-display-indent-stack\n[doc-display-depth] (\n[.l]u / 3u)
-. el \{ .ie "\$2"center" \
-. nr doc-display-indent-stack\n[doc-display-depth] ((\n[.l]u - \n[.i]u) / 4u)
-. el \{ .ie "\$2"indent" \
-. nr doc-display-indent-stack\n[doc-display-depth] \n[doc-display-indent]u
-. el \{ .ie "\$2"indent-two" \
-. nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-display-indent]u + \n[doc-display-indent]u)
-. el \
-. nr doc-reg-ddBa 1
-. \}\}\}\}
-.
-. \" not a known keyword
-. if (\n[doc-reg-ddBa] == 1) \{\
-. nr doc-reg-ddBa 2
-.
-. nr doc-reg-ddBa1 0
-. if \B(\$2) \{\
-. \" disable warnings related to scaling indicators (32)
-. nr doc-reg-ddBa2 \n[.warn]
-. warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
-.
-. \" values without a scaling indicator are taken as strings;
-. \" we test whether the parameter string with and without the last
-. \" character yields identical numerical results (ignoring the
-. \" scaling indicator)
-. ds doc-str-ddBa "\$2
-. substring doc-str-ddBa 1 -1
-. if \B(\*[doc-str-ddBa]) \{\
-. nr doc-reg-ddBa3 (;(\$2))
-. nr doc-reg-ddBa4 (\*[doc-str-ddBa])
-. if (\n[doc-reg-ddBa3] == \n[doc-reg-ddBa4]) \
-. nr doc-reg-ddBa1 1
-. \}
-.
-. \" enable all warnings again
-. warn \n[doc-reg-ddBa2]
-. \}
-.
-. ie \n[doc-reg-ddBa1] \
-. nr doc-display-indent-stack\n[doc-display-depth] \$2
-. el \{\
-. doc-get-width "\$2"
-. ie (\n[doc-width] <= 3) \{\
-. \" if the offset parameter is a macro, use the macro's
-. \" width as specified in doc-common
-. doc-get-arg-type "\$2"
-. ie (\n[doc-arg-type] == 1) \
-. nr doc-display-indent-stack\n[doc-display-depth] \n[\$2]
-. el \
-. nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}
-. el \
-. nr doc-display-indent-stack\n[doc-display-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}\}
-. \}
-. el \{ .ie "\$1"-compact" \
-. nr doc-is-compact 1
-. el \{ .ie "\$1"-file" \{\
-. ie !"\$2"" \{\
-. ds doc-display-file "\$2
-. nr doc-reg-ddBa 2
-. \}
-. el \
-. tm mdoc warning: .Bd `-file' keyword requires argument (#\n[.c])
-. \}
-. el \
-. tm mdoc warning: Unknown keyword `\$1' in .Bd request (#\n[.c])
-. \}\}
-.
-. if (\n[doc-reg-ddBa] < \n[.$]) \{\
-. shift \n[doc-reg-ddBa]
-. doc-do-Bd-args \$@
-. \}
-..
-.
-.
-.\" NS Ed user macro
-.\" NS end display
-.\" NS
-.\" NS modifies:
-.\" NS doc-display-depth
-.\" NS doc-display-indent-stackXXX
-.\" NS doc-display-type-stackXXX
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ed' set in doc-common
-.
-.de Ed
-. ds doc-macro-name Ed
-.
-. br
-.
-. if !\n[doc-display-depth] \{\
-. tm mdoc warning: Extraneous .Ed (#\n[.c])
-. nr doc-display-depth 1
-. \}
-.
-. if "\*[doc-display-type-stack\n[doc-display-depth]]"literal" \{\
-. ft \n[doc-curr-font]
-. ps \n[doc-curr-size]u
-. \}
-.
-. in -\n[doc-display-indent-stack\n[doc-display-depth]]u
-.
-. \" restore saved adjustment and fill modes
-. ie \n[doc-display-fi-stack\n[doc-display-depth]] \
-. fi
-. el \
-. nf
-. ad \n[doc-display-ad-stack\n[doc-display-depth]]
-.
-. nr doc-display-indent-stack\n[doc-display-depth] 0
-. ds doc-display-type-stack\n[doc-display-depth]
-. nr doc-display-depth -1
-..
-.
-.
-.\" NS doc-list-type-stackXXX global string
-.\" NS stack of list types
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.ds doc-list-type-stack1
-.
-.
-.\" NS doc-list-indent-stackXXX global register
-.\" NS stack of list indentation values
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.nr doc-list-indent-stack1 0
-.
-.
-.\" NS doc-list-have-indent-stackXXX global register (bool)
-.\" NS an indentation value is active
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.nr doc-list-have-indent-stack1 0
-.
-.
-.\" NS Bl user macro
-.\" NS begin list
-.\" NS
-.\" NS width register `Bl' set in doc-common
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-list-depth
-.\" NS doc-list-have-indent-stackXXX
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-list-type-stackXXX
-.\" NS doc-macro-name
-.\" NS doc-num-args
-.\" NS doc-num-columns
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Bl
-.
-.de Bl
-. if !\n[.$] \{\
-. doc-Bl-usage
-. return
-. \}
-.
-. ds doc-macro-name Bl
-. nr doc-list-depth +1
-. nr doc-arg-ptr 1
-.
-. ie "\$1"-hang" \{\
-. ds doc-list-type-stack\n[doc-list-depth] hang-list
-. nr doc-list-indent-stack\n[doc-list-depth] 6n
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. el \{ .ie "\$1"-tag" \{\
-. ds doc-list-type-stack\n[doc-list-depth] tag-list
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. el \{ .ie "\$1"-item" \{\
-. ds doc-list-type-stack\n[doc-list-depth] item-list
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. el \{ .ie "\$1"-enum" \{\
-. ds doc-list-type-stack\n[doc-list-depth] enum-list
-. nr doc-list-indent-stack\n[doc-list-depth] 3n
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. el \{ .ie "\$1"-bullet" \{\
-. ds doc-list-type-stack\n[doc-list-depth] bullet-list
-. nr doc-list-indent-stack\n[doc-list-depth] 2n
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. el \{ .ie "\$1"-dash" \{\
-. ds doc-list-type-stack\n[doc-list-depth] dash-list
-. nr doc-list-indent-stack\n[doc-list-depth] 2n
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. el \{ .ie "\$1"-hyphen" \{\
-. ds doc-list-type-stack\n[doc-list-depth] dash-list
-. nr doc-list-indent-stack\n[doc-list-depth] 2n
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. el \{ .ie "\$1"-inset" \{\
-. ds doc-list-type-stack\n[doc-list-depth] inset-list
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. el \{ .ie "\$1"-diag" \{\
-. ds doc-list-type-stack\n[doc-list-depth] diag-list
-. \}
-. el \{ .ie "\$1"-ohang" \{\
-. ds doc-list-type-stack\n[doc-list-depth] ohang-list
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. el \{ .ie "\$1"-column" \{\
-. ds doc-list-type-stack\n[doc-list-depth] column-list
-. linetabs 1
-. \}
-. el \{\
-. tm1 "mdoc warning: Unknown list type `\$1' (or missing list type)
-. tm1 " in .Bl request
-. tm
-. nr doc-arg-ptr 0
-. \}\}\}\}\}\}\}\}\}\}\}
-.
-. \" we have seen a list type
-. if !\n[doc-arg-ptr] \{\
-. doc-Bl-usage
-. doc-reset-args
-. nr doc-list-depth -1
-. return
-. \}
-.
-. shift
-.
-. \" fill argument vector
-. nr doc-reg-Bl 1
-. while (\n[doc-reg-Bl] <= \n[.$]) \{\
-. ds doc-arg\n[doc-reg-Bl] "\$[\n[doc-reg-Bl]]
-. nr doc-reg-Bl +1
-. \}
-.
-. doc-increment-list-stack
-.
-. if \n[.$] \{\
-. nr doc-arg-limit \n[.$]
-. nr doc-arg-ptr 0
-. doc-do-Bl-args
-.
-. in +\n[doc-list-offset-stack\n[doc-list-depth]]u
-.
-. \" initialize column list
-. if "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
-. doc-set-column-tab \n[doc-num-columns]
-' in -\n[doc-column-indent-width]u
-. if !\n[doc-compact-list-stack\n[doc-list-depth]] \
-. sp \n[doc-display-vertical]u
-.
-. nf
-. nr doc-num-columns 0
-. \}\}
-.
-. doc-reset-args
-..
-.
-.
-.\" NS doc-Bl-usage macro
-.
-.de doc-Bl-usage
-. tm1 "Usage: .Bl {-hang | -ohang | -tag | -diag | -inset}
-. tm1 " [-width <string>] [-xwidth <command>]
-. tm1 " [-offset <string>] [-compact]
-. tm1 " .Bl -column [-offset <string>] <string1> <string2> ...
-. tm1 " .Bl {-item | -enum [-nested] | -bullet | -hyphen | -dash}
-. tm1 " [-offset <string>] [-compact] (#\n[.c])
-..
-.
-.
-.\" NS doc-do-Bl-args macro
-.\" NS resolve remaining .Bl arguments
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-compact-list-stackXXX
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-list-offset-stackXXX
-.\" NS doc-num-columns
-.\" NS doc-tag-prefix-stackXXX
-.\" NS doc-tag-width-stackXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-box-dBla
-.\" NS doc-env-dBla
-.\" NS doc-reg-dBla
-.\" NS doc-reg-dBla1
-.\" NS doc-reg-dBla2
-.\" NS doc-reg-dBla3
-.\" NS doc-reg-dBla4
-.\" NS doc-str-dBla
-.\" NS doc-str-dBla1
-.
-.de doc-do-Bl-args
-. nr doc-arg-ptr +1
-.
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \
-. return
-.
-. \" avoid a warning message in case e.g. `-offset' has no parameter
-. nr doc-reg-dBla (\n[doc-arg-ptr] + 1)
-. if !d doc-arg\n[doc-reg-dBla] \
-. ds doc-arg\n[doc-reg-dBla]
-.
-. nr doc-reg-dBla 1
-.
-. ie "\*[doc-arg\n[doc-arg-ptr]]"-compact" \
-. nr doc-compact-list-stack\n[doc-list-depth] 1
-.
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-nested" \{\
-. ie (\n[doc-list-depth] > 1) \{\
-. nr doc-reg-dBla1 (\n[doc-list-depth] - 1)
-. ds doc-tag-prefix-stack\n[doc-list-depth] "\*[doc-tag-prefix-stack\n[doc-reg-dBla1]]
-. as doc-tag-prefix-stack\n[doc-list-depth] \n[doc-enum-list-count-stack\n[doc-reg-dBla1]].
-. length doc-reg-dBla1 "\*[doc-tag-prefix-stack\n[doc-list-depth]]
-. nr doc-list-indent-stack\n[doc-list-depth] +\n[doc-reg-dBla1]n
-. \}
-. el \
-. tm mdoc warning: `-nested' allowed with nested .Bl requests only (#\n[.c])
-. \}
-.
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-width" \{\
-. nr doc-arg-ptr +1
-. ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
-. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
-.
-. \" test whether argument is a valid numeric expression
-. nr doc-reg-dBla1 0
-. if \B(\*[doc-str-dBla]) \{\
-. \" disable warnings related to scaling indicators (32)
-. nr doc-reg-dBla2 \n[.warn]
-. warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
-.
-. \" values without a scaling indicator are taken as strings;
-. \" we test whether the parameter string with and without the last
-. \" character yields identical numerical results (ignoring the
-. \" scaling indicator)
-. ds doc-str-dBla1 "\*[doc-str-dBla]
-. substring doc-str-dBla1 1 -1
-. if \B(\*[doc-str-dBla1]) \{\
-. nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
-. nr doc-reg-dBla4 (\*[doc-str-dBla1])
-. if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
-. nr doc-reg-dBla1 1
-. \}
-.
-. \" enable all warnings again
-. warn \n[doc-reg-dBla2]
-. \}
-.
-. ie \n[doc-reg-dBla1] \
-. nr doc-list-indent-stack\n[doc-list-depth] (\*[doc-str-dBla])
-. el \{\
-. doc-get-arg-width \n[doc-arg-ptr]
-. ie (\n[doc-width] == 2) \{\
-. \" if the width parameter is a macro, use the macro's
-. \" width as specified in doc-common
-. doc-get-arg-type \*[doc-str-dBla]
-. ie (\n[doc-arg-type] == 1) \
-. nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
-. el \
-. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}
-. el \
-. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}\}
-.
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-xwidth" \{\
-. nr doc-arg-ptr +1
-. ds doc-tag-width-stack\n[doc-list-depth] TagwidtH
-.
-. ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
-. substring doc-str-dBla 1 2
-. if .\*[doc-str-dBla] \{\
-. \" execute string in a box to get the width of the diversion
-. ds doc-str-dBla \*[doc-arg\n[doc-arg-ptr]]
-. doc-save-global-vars
-. doc-reset-args
-. box doc-box-dBla
-. ev doc-env-dBla
-. evc 0
-. in 0
-. nf
-. nop \*[doc-str-dBla]
-. br
-. ev
-. box
-. doc-restore-global-vars
-. doc-get-width \h'\n[dl]u'
-. \}
-. nr doc-list-indent-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}
-.
-. el \{ .ie "\*[doc-arg\n[doc-arg-ptr]]"-offset" \{\
-. nr doc-arg-ptr +1
-.
-. ie "\*[doc-arg\n[doc-arg-ptr]]"indent" \
-. nr doc-list-offset-stack\n[doc-list-depth] \n[doc-display-indent]u
-. el \{\
-. ds doc-str-dBla "\*[doc-arg\n[doc-arg-ptr]]
-. nr doc-reg-dBla1 0
-. if \B(\*[doc-str-dBla]) \{\
-. nr doc-reg-dBla2 \n[.warn]
-. warn (\n[.warn] - (\n[.warn] / 32 % 2 * 32))
-.
-. ds doc-str-dBla1 "\*[doc-str-dBla]
-. substring doc-str-dBla1 1 -1
-. if \B(\*[doc-str-dBla1]) \{\
-. nr doc-reg-dBla3 (;(\*[doc-str-dBla]))
-. nr doc-reg-dBla4 (\*[doc-str-dBla1])
-. if (\n[doc-reg-dBla3] == \n[doc-reg-dBla4]) \
-. nr doc-reg-dBla1 1
-. \}
-.
-. warn \n[doc-reg-dBla2]
-. \}
-.
-. ie \n[doc-reg-dBla1] \
-. nr doc-list-offset-stack\n[doc-list-depth] \*[doc-str-dBla]
-. el \{\
-. doc-get-arg-width \n[doc-arg-ptr]
-. ie (\n[doc-width] <= 3) \{\
-. \" if the offset parameter is a macro, use the macro's
-. \" width as specified in doc-common
-. doc-get-arg-type \*[doc-str-dBla]
-. ie (\n[doc-arg-type] == 1) \
-. nr doc-list-offset-stack\n[doc-list-depth] \n[\*[doc-str-dBla]]
-. el \
-. nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}
-. el \
-. nr doc-list-offset-stack\n[doc-list-depth] (\n[doc-width]u * \n[doc-fixed-width]u)
-. \}\}\}
-. el \
-. nr doc-reg-dBla 0
-. \}\}\}\}
-.
-. \" not a known keyword, so it specifies the width of the next column
-. \" (if it is a column list)
-. if !\n[doc-reg-dBla] \{\
-. ie "\*[doc-list-type-stack\n[doc-list-depth]]"column-list" \{\
-. nr doc-num-columns +1
-. ds doc-arg\n[doc-num-columns] "\*[doc-arg\n[doc-arg-ptr]]
-. \}
-. el \{\
-. tmc mdoc warning: Unknown keyword `\*[doc-arg\n[doc-arg-ptr]]'
-. tm1 " in .Bl request (#\n[.c])
-. \}\}
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \
-. doc-do-Bl-args
-..
-.
-.
-.\" NS doc-save-global-vars macro
-.\" NS save all global variables
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dsgv
-.
-.de doc-save-global-vars
-. ds doc-macro-name-saved "\*[doc-macro-name]
-. nr doc-arg-limit-saved \n[doc-arg-limit]
-. nr doc-num-args-saved \n[doc-num-args]
-. nr doc-arg-ptr-saved \n[doc-arg-ptr]
-.
-. nr doc-reg-dsgv 1
-. while (\n[doc-reg-dsgv] <= \n[doc-arg-limit]) \{\
-. ds doc-arg\n[doc-reg-dsgv]-saved "\*[doc-arg\n[doc-reg-dsgv]]
-. nr doc-type\n[doc-reg-dsgv]-saved \n[doc-type\n[doc-reg-dsgv]]
-. ds doc-space\n[doc-reg-dsgv]-saved "\*[doc-space\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. nr doc-curr-font-saved \n[doc-curr-font]
-. nr doc-curr-size-saved \n[doc-curr-size]
-. nr doc-in-synopsis-section-saved \n[doc-in-synopsis-section]
-. nr doc-indent-synopsis-saved \n[doc-indent-synopsis]
-. nr doc-indent-synopsis-active-saved \n[doc-indent-synopsis-active]
-. nr doc-have-decl-saved \n[doc-have-decl]
-. nr doc-have-var-saved \n[doc-have-var]
-. ds doc-command-name-saved "\*[doc-command-name]
-. ds doc-quote-left-saved "\*[doc-quote-left]
-. ds doc-quote-right-saved "\*[doc-quote-right]
-. nr doc-nesting-level-saved \n[doc-nesting-level]
-. nr doc-in-list-saved \n[doc-in-list]
-. ds doc-space-saved "\*[doc-space]
-. ds doc-saved-space-saved "\*[doc-saved-space]
-. nr doc-space-mode-saved \n[doc-space-mode]
-. nr doc-have-space-saved \n[doc-have-space]
-. nr doc-have-slot-saved \n[doc-have-slot]
-. nr doc-keep-type-saved \n[doc-keep-type]
-. nr doc-display-depth-saved \n[doc-display-depth]
-. nr doc-is-compact-saved \n[doc-is-compact]
-.
-. nr doc-reg-dsgv 0
-. while (\n[doc-reg-dsgv] <= \n[doc-display-depth]) \{\
-. ds doc-display-type-stack\n[doc-reg-dsgv]-saved "\*[doc-display-type-stack\n[doc-reg-dsgv]]
-. nr doc-display-indent-stack\n[doc-reg-dsgv]-saved \n[doc-display-indent-stack\n[doc-reg-dsgv]]
-. nr doc-display-ad-stack\n[doc-reg-dsgv]-saved \n[doc-display-ad-stack\n[doc-reg-dsgv]]
-. nr doc-display-fi-stack\n[doc-reg-dsgv]-saved \n[doc-display-fi-stack\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. nr doc-fontmode-depth-saved \n[doc-fontmode-depth]
-.
-. nr doc-reg-dsgv 1
-. while (\n[doc-reg-dsgv] <= \n[doc-fontmode-depth]) \{\
-. nr doc-fontmode-font-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-font-stack\n[doc-reg-dsgv]]
-. nr doc-fontmode-size-stack\n[doc-reg-dsgv]-saved \n[doc-fontmode-size-stack\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. nr doc-list-depth-saved \n[doc-list-depth]
-.
-. nr doc-reg-dsgv 1
-. while (\n[doc-reg-dsgv] <= \n[doc-list-depth]) \{\
-. ds doc-list-type-stack\n[doc-reg-dsgv]-saved "\*[doc-list-type-stack\n[doc-reg-dsgv]]
-. nr doc-list-have-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-have-indent-stack\n[doc-reg-dsgv]]
-. nr doc-list-indent-stack\n[doc-reg-dsgv]-saved \n[doc-list-indent-stack\n[doc-reg-dsgv]]
-. nr doc-compact-list-stack\n[doc-reg-dsgv]-saved \n[doc-compact-list-stack\n[doc-reg-dsgv]]
-. ds doc-tag-prefix-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-prefix-stack\n[doc-reg-dsgv]]
-. ds doc-tag-width-stack\n[doc-reg-dsgv]-saved "\*[doc-tag-width-stack\n[doc-reg-dsgv]]
-. nr doc-list-offset-stack\n[doc-reg-dsgv]-saved \n[doc-list-offset-stack\n[doc-reg-dsgv]]
-. nr doc-enum-list-count-stack\n[doc-reg-dsgv]-saved \n[doc-enum-list-count-stack\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. ds doc-saved-Pa-font-saved "\*[doc-saved-Pa-font]
-. nr doc-curr-type-saved \n[doc-curr-type]
-. ds doc-curr-arg-saved "\*[doc-curr-arg]
-. nr doc-diag-list-input-line-count-saved \n[doc-diag-list-input-line-count]
-. nr doc-num-columns-saved \n[doc-num-columns]
-. nr doc-column-indent-width-saved \n[doc-column-indent-width]
-. nr doc-is-func-saved \n[doc-is-func]
-. nr doc-have-old-func-saved \n[doc-have-old-func]
-. nr doc-func-arg-count-saved \n[doc-func-arg-count]
-. ds doc-func-arg-saved "\*[doc-func-arg]
-. nr doc-num-func-args-saved \n[doc-num-func-args]
-. nr doc-func-args-processed-saved \n[doc-func-args-processed]
-. nr doc-have-func-saved \n[doc-have-func]
-. nr doc-is-reference-saved \n[doc-is-reference]
-. nr doc-reference-count-saved \n[doc-reference-count]
-. nr doc-author-count-saved \n[doc-author-count]
-.
-. nr doc-reg-dsgv 0
-. while (\n[doc-reg-dsgv] <= \n[doc-author-count]) \{\
-. ds doc-author-name\n[doc-reg-dsgv]-saved "\*[doc-author-name\n[doc-reg-dsgv]]
-. nr doc-reg-dsgv +1
-. \}
-.
-. nr doc-book-count-saved \n[doc-book-count]
-. ds doc-book-name-saved "\*[doc-book-name]
-. nr doc-date-count-saved \n[doc-date-count]
-. ds doc-date-saved "\*[doc-date]
-. nr doc-publisher-count-saved \n[doc-publisher-count]
-. ds doc-publisher-name-saved "\*[doc-publisher-name]
-. nr doc-journal-count-saved \n[doc-journal-count]
-. ds doc-journal-name-saved "\*[doc-journal-name]
-. nr doc-issue-count-saved \n[doc-issue-count]
-. ds doc-issue-name-saved "\*[doc-issue-name]
-. nr doc-optional-count-saved \n[doc-optional-count]
-. ds doc-optional-string-saved "\*[doc-optional-string]
-. nr doc-page-number-count-saved \n[doc-page-number-count]
-. ds doc-page-number-string-saved "\*[doc-page-number-string]
-. nr doc-corporate-count-saved \n[doc-corporate-count]
-. ds doc-corporate-name-saved "\*[doc-corporate-name]
-. nr doc-report-count-saved \n[doc-report-count]
-. ds doc-report-name-saved "\*[doc-report-name]
-. nr doc-reference-title-count-saved \n[doc-reference-title-count]
-. ds doc-reference-title-name-saved "\*[doc-reference-title-name]
-. ds doc-reference-title-name-for-book-saved "\*[doc-reference-title-name-for-book]
-. nr doc-volume-count-saved \n[doc-volume-count]
-. ds doc-volume-name-saved "\*[doc-volume-name]
-. nr doc-have-author-saved \n[doc-have-author]
-.
-. ds doc-document-title-saved "\*[doc-document-title]
-. ds doc-volume-saved "\*[doc-volume]
-. ds doc-section-saved "\*[doc-section]
-. ds doc-operating-system-saved "\*[doc-operating-system]
-. ds doc-date-string-saved "\*[doc-date-string]
-. nr doc-header-space-saved \n[doc-header-space]
-. nr doc-footer-space-saved \n[doc-footer-space]
-. nr doc-display-vertical-saved \n[doc-display-vertical]
-. ds doc-header-string-saved "\*[doc-header-string]
-. nr doc-in-see-also-section-saved \n[doc-in-see-also-section]
-. nr doc-in-files-section-saved \n[doc-in-files-section]
-. nr doc-in-authors-section-saved \n[doc-in-authors-section]
-..
-.
-.
-.\" NS doc-restore-global-vars macro
-.\" NS restore all global variables
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-drgv
-.
-.de doc-restore-global-vars
-. ds doc-macro-name "\*[doc-macro-name-saved]
-. nr doc-arg-limit \n[doc-arg-limit-saved]
-. nr doc-num-args \n[doc-num-args-saved]
-. nr doc-arg-ptr \n[doc-arg-ptr-saved]
-.
-. nr doc-reg-drgv 1
-. while (\n[doc-reg-drgv] <= \n[doc-arg-limit]) \{\
-. ds doc-arg\n[doc-reg-drgv] "\*[doc-arg\n[doc-reg-drgv]-saved]
-. nr doc-type\n[doc-reg-drgv] \n[doc-type\n[doc-reg-drgv]-saved]
-. ds doc-space\n[doc-reg-drgv] "\*[doc-space\n[doc-reg-drgv]-saved]
-. nr doc-reg-drgv +1
-. \}
-.
-. nr doc-curr-font \n[doc-curr-font-saved]
-. nr doc-curr-size \n[doc-curr-size-saved]
-. nr doc-in-synopsis-section \n[doc-in-synopsis-section-saved]
-. nr doc-indent-synopsis \n[doc-indent-synopsis-saved]
-. nr doc-indent-synopsis-active \n[doc-indent-synopsis-active-saved]
-. nr doc-have-decl \n[doc-have-decl-saved]
-. nr doc-have-var \n[doc-have-var-saved]
-. ds doc-command-name "\*[doc-command-name-saved]
-. ds doc-quote-left "\*[doc-quote-left-saved]
-. ds doc-quote-right "\*[doc-quote-right-saved]
-. nr doc-nesting-level \n[doc-nesting-level-saved]
-. nr doc-in-list \n[doc-in-list-saved]
-. ds doc-space "\*[doc-space-saved]
-. ds doc-saved-space "\*[doc-saved-space-saved]
-. nr doc-space-mode \n[doc-space-mode-saved]
-. nr doc-have-space \n[doc-have-space-saved]
-. nr doc-have-slot \n[doc-have-slot-saved]
-. nr doc-keep-type \n[doc-keep-type-saved]
-. nr doc-display-depth \n[doc-display-depth-saved]
-. nr doc-is-compact \n[doc-is-compact-saved]
-.
-. nr doc-reg-drgv 0
-. while (\n[doc-reg-drgv] <= \n[doc-display-depth]) \{\
-. ds doc-display-type-stack\n[doc-reg-drgv] "\*[doc-display-type-stack\n[doc-reg-drgv]-saved]
-. nr doc-display-indent-stack\n[doc-reg-drgv] \n[doc-display-indent-stack\n[doc-reg-drgv]-saved]
-. nr doc-display-ad-stack\n[doc-reg-drgv] \n[doc-display-ad-stack\n[doc-reg-drgv]-saved]
-. nr doc-display-fi-stack\n[doc-reg-drgv] \n[doc-display-fi-stack\n[doc-reg-drgv]-saved]
-. nr doc-reg-drgv +1
-. \}
-.
-. nr doc-fontmode-depth \n[doc-fontmode-depth-saved]
-.
-. nr doc-reg-drgv 1
-. while (\n[doc-reg-drgv] <= \n[doc-fontmode-depth]) \{\
-. nr doc-fontmode-font-stack\n[doc-reg-drgv] \n[doc-fontmode-font-stack\n[doc-reg-drgv]]-saved
-. nr doc-fontmode-size-stack\n[doc-reg-drgv] \n[doc-fontmode-size-stack\n[doc-reg-drgv]]-saved
-. nr doc-reg-drgv +1
-. \}
-.
-. nr doc-list-depth \n[doc-list-depth-saved]
-.
-. nr doc-reg-drgv 1
-. while (\n[doc-reg-drgv] <= \n[doc-list-depth]) \{\
-. ds doc-list-type-stack\n[doc-reg-drgv] "\*[doc-list-type-stack\n[doc-reg-drgv]-saved]
-. nr doc-list-have-indent-stack\n[doc-reg-drgv] \n[doc-list-have-indent-stack\n[doc-reg-drgv]-saved]
-. nr doc-list-indent-stack\n[doc-reg-drgv] \n[doc-list-indent-stack\n[doc-reg-drgv]-saved]
-. nr doc-compact-list-stack\n[doc-reg-drgv] \n[doc-compact-list-stack\n[doc-reg-drgv]-saved]
-. ds doc-tag-prefix-stack\n[doc-reg-drgv] "\*[doc-tag-prefix-stack\n[doc-reg-drgv]-saved]
-. ds doc-tag-width-stack\n[doc-reg-drgv] "\*[doc-tag-width-stack\n[doc-reg-drgv]-saved]
-. nr doc-list-offset-stack\n[doc-reg-drgv] \n[doc-list-offset-stack\n[doc-reg-drgv]-saved]
-. nr doc-enum-list-count-stack\n[doc-reg-drgv] \n[doc-enum-list-count-stack\n[doc-reg-drgv]-saved]
-. nr doc-reg-drgv +1
-. \}
-.
-. ds doc-saved-Pa-font "\*[doc-saved-Pa-font-saved]
-. nr doc-curr-type \n[doc-curr-type-saved]
-. ds doc-curr-arg "\*[doc-curr-arg-saved]
-. nr doc-diag-list-input-line-count \n[doc-diag-list-input-line-count-saved]
-. nr doc-num-columns \n[doc-num-columns-saved]
-. nr doc-column-indent-width \n[doc-column-indent-width-saved]
-. nr doc-is-func \n[doc-is-func-saved]
-. nr doc-have-old-func \n[doc-have-old-func-saved]
-. nr doc-func-arg-count \n[doc-func-arg-count-saved]
-. ds doc-func-arg "\*[doc-func-arg-saved]
-. nr doc-num-func-args \n[doc-num-func-args-saved]
-. nr doc-func-args-processed \n[doc-func-args-processed-saved]
-. nr doc-have-func \n[doc-have-func-saved]
-. nr doc-is-reference \n[doc-is-reference-saved]
-. nr doc-reference-count \n[doc-reference-count-saved]
-. nr doc-author-count \n[doc-author-count-saved]
-.
-. nr doc-reg-drgv 0
-. while (\n[doc-reg-drgv] <= \n[doc-author-count]) \{\
-. ds doc-author-name\n[doc-reg-drgv] "\*[doc-author-name\n[doc-reg-drgv]-saved]
-. nr doc-reg-drgv +1
-. \}
-.
-. nr doc-book-count \n[doc-book-count-saved]
-. ds doc-book-name "\*[doc-book-name-saved]
-. nr doc-date-count \n[doc-date-count-saved]
-. ds doc-date "\*[doc-date-saved]
-. nr doc-publisher-count \n[doc-publisher-count-saved]
-. ds doc-publisher-name "\*[doc-publisher-name-saved]
-. nr doc-journal-count \n[doc-journal-count-saved]
-. ds doc-journal-name "\*[doc-journal-name-saved]
-. nr doc-issue-count \n[doc-issue-count-saved]
-. ds doc-issue-name "\*[doc-issue-name-saved]
-. nr doc-optional-count \n[doc-optional-count-saved]
-. ds doc-optional-string "\*[doc-optional-string-saved]
-. nr doc-page-number-count \n[doc-page-number-count-saved]
-. ds doc-page-number-string "\*[doc-page-number-string-saved]
-. nr doc-corporate-count \n[doc-corporate-count-saved]
-. ds doc-corporate-name "\*[doc-corporate-name-saved]
-. nr doc-report-count \n[doc-report-count-saved]
-. ds doc-report-name "\*[doc-report-name-saved]
-. nr doc-reference-title-count \n[doc-reference-title-count-saved]
-. ds doc-reference-title-name "\*[doc-reference-title-name-saved]
-. ds doc-reference-title-name-for-book "\*[doc-reference-title-name-for-book-saved]
-. nr doc-volume-count \n[doc-volume-count-saved]
-. ds doc-volume-name "\*[doc-volume-name-saved]
-. nr doc-have-author \n[doc-have-author-saved]
-.
-. ds doc-document-title "\*[doc-document-title-saved]
-. ds doc-volume "\*[doc-volume-saved]
-. ds doc-section "\*[doc-section-saved]
-. ds doc-operating-system "\*[doc-operating-system-saved]
-. ds doc-date-string "\*[doc-date-string-saved]
-. nr doc-header-space \n[doc-header-space-saved]
-. nr doc-footer-space \n[doc-footer-space-saved]
-. nr doc-display-vertical \n[doc-display-vertical-saved]
-. ds doc-header-string "\*[doc-header-string-saved]
-. nr doc-in-see-also-section \n[doc-in-see-also-section-saved]
-. nr doc-in-files-section \n[doc-in-files-section-saved]
-. nr doc-in-authors-section \n[doc-in-authors-section-saved]
-..
-.
-.
-.\" NS El user macro
-.\" NS end list
-.\" NS
-.\" NS modifies:
-.\" NS doc-list-depth
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variables:
-.\" NS doc-str-El
-.\" NS
-.\" NS width register `El' set in doc-common
-.
-.de El
-. if \n[.$] \{\
-. tm Usage: .El (does not take arguments) (#\n[.c])
-. return
-. \}
-.
-. ds doc-macro-name El
-. ds doc-str-El \*[doc-list-type-stack\n[doc-list-depth]]
-.
-. ie "\*[doc-str-El]"diag-list" \
-. doc-end-list 0
-. el \{ .ie "\*[doc-str-El]"column-list" \
-. doc-end-column-list
-. el \{ .ie "\*[doc-str-El]"item-list" \
-. doc-end-list 0
-. el \{ .ie "\*[doc-str-El]"ohang-list" \
-. doc-end-list 0
-. el \{ .ie "\*[doc-str-El]"inset-list" \
-. doc-end-list 0
-. el \
-. doc-end-list 1
-. \}\}\}\}
-.
-. br
-..
-.
-.
-.\" NS doc-saved-Pa-font global string
-.\" NS saved doc-Pa-font string for section FILES (no underline if
-.\" NS nroff)
-.
-.ds doc-saved-Pa-font
-.
-.
-.\" NS doc-curr-type global register
-.\" NS current argument type
-.
-.nr doc-curr-type 0
-.
-.
-.\" NS doc-curr-arg global string
-.\" NS current argument
-.
-.ds doc-curr-arg
-.
-.
-.\" NS doc-item-boxXXX global box
-.\" NS item boxes associated list depth
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.
-.\" NS It user macro
-.\" NS list item
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-curr-arg
-.\" NS doc-curr-type
-.\" NS doc-in-list
-.\" NS doc-macro-name
-.\" NS doc-num-args
-.\" NS doc-saved-Pa-font
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-It
-.\" NS doc-str-It
-.\" NS doc-XXX-list-type
-.\" NS
-.\" NS width register `It' set in doc-common
-.
-.nr doc-bullet-list-type 1
-.nr doc-column-list-type 0
-.nr doc-dash-list-type 1
-.nr doc-diag-list-type 0
-.nr doc-enum-list-type 1
-.nr doc-hang-list-type 2
-.nr doc-inset-list-type 2
-.nr doc-item-list-type 1
-.nr doc-ohang-list-type 2
-.nr doc-tag-list-type 2
-.
-.de It
-. ds doc-str-It \*[doc-list-type-stack\n[doc-list-depth]]
-.
-. if "\*[doc-str-It]"" \
-. tm mdoc error: .It without preceding .Bl (#\n[.c])
-.
-. if \n[doc-nesting-level] \{\
-. tmc "mdoc error: .It found in enclosing (e.g. .Ac ... .It ... .Ao)
-. tm1 " (#\n[.c])
-. \}
-.
-. br
-. if !\n[cR] \
-. ne 3v
-.
-. if \n[.$] \{\
-. ds doc-macro-name It
-.
-. \" fill argument vector
-. nr doc-reg-It 1
-. while (\n[doc-reg-It] <= \n[.$]) \{\
-. ds doc-arg\n[doc-reg-It] "\$[\n[doc-reg-It]]
-. nr doc-reg-It +1
-. \}
-.
-. nr doc-num-args \n[.$]
-. nr doc-arg-ptr 0
-. \}
-.
-. nr doc-reg-It \n[doc-\*[doc-str-It]-type]
-.
-. if \n[doc-reg-It] \{\
-. \" start item box
-. box doc-item-box\n[doc-list-depth]
-. ev doc-item-env\n[doc-list-depth]
-. evc 0
-. in 0
-. nf
-. \}
-.
-. ie (\n[doc-reg-It] == 1) \{\
-. if \n[.$] \{\
-. tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
-. tm1 " don't take arguments (#\n[.c])
-. \}\}
-. el \{\
-. ie \n[.$] \{\
-. if (\n[doc-reg-It] == 2) \{\
-. \" handle list types with arguments
-. doc-parse-arg-vector
-.
-. nr doc-in-list 1
-. nr doc-arg-ptr 1
-. nr doc-curr-type \n[doc-type1]
-. ds doc-curr-arg "\*[doc-arg1]
-.
-. if \n[doc-in-files-section] \{\
-. ds doc-saved-Pa-font "\*[doc-Pa-font]
-. if n \
-. ds doc-Pa-font "\*[doc-No-font]
-. \}
-.
-. ie (\n[doc-type1] == 1) \
-. \*[doc-arg1]
-. el \{\
-. nr doc-arg-ptr 1
-. doc-print-recursive
-. \}\}\}
-. el \{\
-. tm1 "mdoc warning: .It requests in lists of type `\*[doc-str-It]'
-. tm1 " require arguments (#\n[.c])
-. \}
-. \}
-.
-. \" the previous call of `.doc-print-recursive' can contain calls to
-. \" opening requests like `.Ao'; we then defer the call of `doc-xxx-list'
-. if !\n[doc-nesting-level] \
-. doc-\*[doc-str-It]
-..
-.
-.
-.\" NS doc-inset-list macro
-.\" NS .It item of list-type inset
-.\" NS
-.\" NS modifies:
-.\" NS doc-in-list
-.
-.de doc-inset-list
-. \" finish item box
-. br
-. ev
-. box
-. unformat doc-item-box\n[doc-list-depth]
-.
-. doc-set-vertical-and-indent 0
-. br
-.
-. nh
-. doc-item-box\n[doc-list-depth]
-.
-. nr doc-in-list 0
-. doc-reset-args
-..
-.
-.
-.\" NS doc-hang-list macro
-.\" NS .It item of list-type hanging tag (as opposed to tagged)
-.\" NS
-.\" NS modifies:
-.\" NS doc-have-space
-.\" NS doc-in-list
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dhl
-.\" NS doc-reg-dhl1
-.
-.de doc-hang-list
-. \" finish item box
-. br
-. ev
-. box
-. unformat doc-item-box\n[doc-list-depth]
-.
-. doc-set-vertical-and-indent 1
-. nr doc-reg-dhl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
-. ti -\n[doc-reg-dhl]u
-.
-. nh
-. ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \
-. doc-item-box\n[doc-list-depth]
-. el \{\
-. chop doc-item-box\n[doc-list-depth]
-. nr doc-reg-dhl1 \n[.k]u
-. nop \*[doc-item-box\n[doc-list-depth]]\c
-. nop \h'|(\n[doc-reg-dhl1]u - \n[.k]u + \n[doc-reg-dhl]u)'\c
-. nr doc-have-space 1
-. \}
-.
-. nr doc-in-list 0
-. doc-reset-args
-..
-.
-.
-.\" NS doc-ohang-list macro
-.\" NS .It item of list-type overhanging tag
-.\" NS
-.\" NS modifies:
-.\" NS doc-in-list
-.
-.de doc-ohang-list
-. \" finish item box
-. br
-. ev
-. box
-. unformat doc-item-box\n[doc-list-depth]
-.
-. doc-set-vertical-and-indent 0
-. nh
-. doc-item-box\n[doc-list-depth]
-. br
-.
-. nr doc-in-list 0
-. doc-reset-args
-..
-.
-.
-.\" NS doc-item-list macro
-.\" NS .It item of list-type [empty tag]
-.
-.de doc-item-list
-. \" finish (dummy) item box
-. br
-. ev
-. box
-.
-. doc-set-vertical-and-indent 0
-. br
-.
-. doc-reset-args
-..
-.
-.
-.\" NS doc-enum-list-count-stackXXX global register
-.\" NS stack of current enum count values
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.nr doc-enum-list-count-stack1 0
-.
-.
-.\" NS doc-enum-list macro
-.\" NS enumerated list
-.\" NS
-.\" NS modifies:
-.\" NS doc-enum-list-count-stackXXX
-.\" NS doc-in-list
-.
-.de doc-enum-list
-. nr doc-in-list 1
-. nr doc-enum-list-count-stack\n[doc-list-depth] +1
-\# XXX
-\#.ll \n[doc-list-indent-stack\n[doc-list-depth]]u
-\#.rj
-. nop \*[doc-tag-prefix-stack\n[doc-list-depth]]\c
-. nop \n[doc-enum-list-count-stack\n[doc-list-depth]].\&
-. doc-do-list
-..
-.
-.
-.\" NS doc-bullet-list macro
-.\" NS bullet paragraph list
-.\" NS
-.\" NS modifies:
-.\" NS doc-in-list
-.
-.de doc-bullet-list
-. nr doc-in-list 1
-. nop \)\*[doc-Sy-font]\[bu]\f[P]
-. doc-do-list
-..
-.
-.
-.\" NS doc-dash-list macro
-.\" NS hyphen paragraph list (sub bullet list)
-.\" NS
-.\" NS modifies:
-.\" NS doc-in-list
-.
-.de doc-dash-list
-. nr doc-in-list 1
-. nop \)\*[doc-Sy-font]\-\f[P]
-. doc-do-list
-..
-.
-.
-.\" NS doc-do-list macro
-.\" NS .It item of list-type enum/bullet/hyphen
-.
-.als doc-do-list doc-hang-list
-.
-.
-.\" NS doc-diag-list-input-line-count global register
-.\" NS saved line number to be checked in next diag-list item
-.
-.nr doc-diag-list-input-line-count 0
-.
-.
-.\" NS doc-diag-list macro
-.\" NS .It item of list-type diagnostic-message
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-diag-list-input-line-count
-.
-.de doc-diag-list
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. ie ((\n[.c] - \n[doc-diag-list-input-line-count]) > 1) \{\
-. ie !\n[doc-compact-list-stack\n[doc-list-depth]] \
-. doc-paragraph
-. el \
-. br
-. \}
-. el \
-. br
-. nr doc-diag-list-input-line-count \n[.c]
-.
-. nh
-. nop \*[doc-Sy-font]\c
-. if \n[doc-num-args] \
-. doc-remaining-args
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\*[doc-hard-space]\c
-.
-. doc-print-and-reset
-..
-.
-.
-.\" NS doc-tag-list macro
-.\" NS .It item of list-type `tag'
-.\" NS
-.\" NS modifies:
-.\" NS doc-have-space
-.\" NS doc-in-list
-.\" NS
-.\" NS local variables:
-.\" NS doc-box-dtl
-.\" NS doc-reg-dtl
-.\" NS doc-reg-dtl1
-.
-.de doc-tag-list
-. \" finish item box
-. br
-. ev
-. box
-. unformat doc-item-box\n[doc-list-depth]
-.
-. \" we use a box without `.nf' to compute the tag width (via `dl' register)
-. box doc-box-dtl
-. ev doc-env-dtl
-. evc 0
-. fi
-. ad 0
-. in 0
-. doc-item-box\n[doc-list-depth]
-. br
-. ev
-. box
-.
-. if !"TagwidtH"\*[doc-tag-width-stack\n[doc-list-depth]]" \{\
-. if !\n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
-. in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
-. nr doc-list-have-indent-stack\n[doc-list-depth] 1
-. \}
-. doc-get-tag-width
-. \}
-. doc-set-vertical-and-indent 1
-. nr doc-reg-dtl (\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
-. ti -\n[doc-reg-dtl]u
-.
-. nh
-. ie (\n[dl]u > \n[doc-list-indent-stack\n[doc-list-depth]]u) \{\
-. doc-item-box\n[doc-list-depth]
-. br
-. \}
-. el \{\
-. chop doc-item-box\n[doc-list-depth]
-. nr doc-reg-dtl1 \n[.k]u
-. nop \*[doc-item-box\n[doc-list-depth]]\c
-. nop \h'|(\n[doc-reg-dtl1]u - \n[.k]u + \n[doc-reg-dtl]u)'\c
-. nr doc-have-space 1
-. \}
-.
-. if \n[doc-in-files-section] \
-. if n \
-. ds doc-Pa-font "\*[doc-saved-Pa-font]
-.
-. nr doc-in-list 0
-. doc-reset-args
-..
-.
-.
-.\" NS doc-get-tag-width macro
-.\" NS resolve unknown tag width (`tag' list-type only)
-.\" NS
-.\" NS modifies:
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-tag-width-stackXXX
-.\" NS
-.\" NS requires:
-.\" NS doc-curr-arg
-.\" NS doc-curr-type
-.
-.de doc-get-tag-width
-. ie (\n[doc-curr-type] == 1) \{\
-. ds doc-tag-width-stack\n[doc-list-depth] \*[doc-curr-arg]
-. nr doc-list-indent-stack\n[doc-list-depth] \n[\*[doc-curr-arg]]
-. \}
-. el \{\
-. ds doc-tag-width-stack\n[doc-list-depth] No
-. nr doc-list-indent-stack\n[doc-list-depth] \n[No]
-. \}
-..
-.
-.
-.\" NS doc-set-vertical-and-indent macro
-.\" NS set up vertical spacing (if not compact) and indentation (with
-.\" NS offset if argument is non-zero)
-.\" NS
-.\" NS modifies:
-.\" NS doc-list-have-indent-stackXXX
-.
-.de doc-set-vertical-and-indent
-. if !\n[doc-compact-list-stack\n[doc-list-depth]] \
-. sp \n[doc-display-vertical]u
-.
-. if \n[doc-list-have-indent-stack\n[doc-list-depth]] \{\
-. nr doc-list-have-indent-stack\n[doc-list-depth] 0
-. if \$1 \
-. in +(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
-. \}
-.
-. if !\n[cR] \
-. ne 2v
-..
-.
-.
-.\" NS doc-list-depth global register
-.\" NS list type stack counter
-.
-.nr doc-list-depth 0
-.
-.
-.\" NS doc-num-columns global register
-.\" NS number of columns
-.
-.nr doc-num-columns 0
-.
-.
-.\" NS doc-compact-list-stackXXX global register (bool)
-.\" NS stack of flags to indicate whether a particular list is compact
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.nr doc-compact-list-stack1 0
-.
-.
-.\" NS doc-tag-prefix-stackXXX global string
-.\" NS stack of tag prefixes (currently used for -nested -enum lists)
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.ds doc-tag-prefix-stack1
-.
-.
-.\" NS doc-tag-width-stackXXX global string
-.\" NS stack of strings indicating how to set up current element of
-.\" NS doc-list-indent-stackXXX -- if set to TagwidtH, user has set it
-.\" NS directly; if it is a macro name, use the macro's width value;
-.\" NS otherwise, `doc-get-tag-width' uses width value of `No'.
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.ds doc-tag-width-stack0
-.ds doc-tag-width-stack1
-.
-.
-.\" NS doc-list-offset-stackXXX global register
-.\" NS stack of list offsets
-.\" NS
-.\" NS limit:
-.\" NS doc-list-depth
-.
-.nr doc-list-offset-stack1 0
-.
-.
-.\" NS doc-end-list macro
-.\" NS list end function; resets indentation (and offset if argument is
-.\" NS non-zero)
-.\" NS
-.\" NS modifies:
-.\" NS doc-list-depth
-.\" NS doc-list-offset-stackXXX
-.
-.de doc-end-list
-. if \$1 \
-' in -(\n[doc-list-indent-stack\n[doc-list-depth]]u + \n[doc-digit-width]u)
-.
-' in -\n[doc-list-offset-stack\n[doc-list-depth]]u
-.
-. if (\n[doc-list-depth] <= 0) \
-. tm mdoc warning: extraneous .El call (#\n[.c])
-.
-. doc-decrement-list-stack
-. nr doc-list-depth -1
-..
-.
-.
-.\" NS doc-increment-list-stack macro
-.\" NS set up next block for list
-.\" NS
-.\" NS modifies:
-.\" NS doc-compact-list-stackXXX
-.\" NS doc-list-have-indent-stackXXX
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-list-offset-stackXXX
-.\" NS doc-list-type-stackXXX
-.\" NS doc-tag-prefix-stackXXX
-.\" NS doc-tag-width-stackXXX
-.\" NS doc-enum-list-count-stackXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dils
-.
-.de doc-increment-list-stack
-. nr doc-reg-dils (\n[doc-list-depth] + 1)
-. nr doc-list-have-indent-stack\n[doc-reg-dils] 0
-. nr doc-list-indent-stack\n[doc-reg-dils] 0
-. nr doc-list-offset-stack\n[doc-reg-dils] 0
-. ds doc-tag-prefix-stack\n[doc-reg-dils]
-. ds doc-tag-width-stack\n[doc-reg-dils] \*[doc-tag-width-stack\n[doc-list-depth]]
-. ds doc-list-type-stack\n[doc-reg-dils]
-. nr doc-compact-list-stack\n[doc-reg-dils] 0
-. nr doc-enum-list-count-stack\n[doc-reg-dils] 0
-..
-.
-.
-.\" NS doc-decrement-list-stack macro
-.\" NS decrement stack
-.\" NS
-.\" NS modifies:
-.\" NS doc-compact-list-stackXXX
-.\" NS doc-list-have-indent-stackXXX
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-list-offset-stackXXX
-.\" NS doc-list-type-stackXXX
-.\" NS doc-tag-prefix-stackXXX
-.\" NS doc-tag-width-stackXXX
-.\" NS doc-enum-list-count-stackXXX
-.
-.de doc-decrement-list-stack
-. ds doc-list-type-stack\n[doc-list-depth]
-. nr doc-list-have-indent-stack\n[doc-list-depth] 0
-. nr doc-list-indent-stack\n[doc-list-depth] 0
-. nr doc-list-offset-stack\n[doc-list-depth] 0
-. ds doc-tag-prefix-stack\n[doc-list-depth]
-. ds doc-tag-width-stack\n[doc-list-depth]
-. nr doc-compact-list-stack\n[doc-list-depth] 0
-. nr doc-enum-list-count-stack\n[doc-list-depth] 0
-..
-.
-.
-.\" NS Xr user macro
-.\" NS cross reference (for man pages only)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Xr
-.\" NS
-.\" NS width register `Xr' set in doc-common
-.
-.de Xr
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Xr
-. doc-parse-args \$@
-. \}
-. el \
-. doc-Xr-usage
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. \" first argument must be a string
-. ie (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ds doc-arg\n[doc-arg-ptr] \*[doc-Xr-font]\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]
-.
-. if (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
-. nr doc-reg-Xr (\n[doc-arg-ptr] + 1)
-. \" modify second argument if it is a string and
-. \" remove space inbetween
-. if (\n[doc-type\n[doc-reg-Xr]] == 2) \{\
-. ds doc-arg\n[doc-reg-Xr] \*[lp]\*[doc-arg\n[doc-reg-Xr]]\*[rp]
-. ds doc-space\n[doc-arg-ptr]
-. \}
-. \}
-. doc-print-recursive
-. \}
-. el \
-. doc-Xr-usage
-. \}
-. el \
-. doc-Xr-usage
-..
-.
-.
-.\" NS doc-Xr-usage macro
-.
-.de doc-Xr-usage
-. tm Usage: .Xr manpage_name [section#] ... (#\n[.c])
-. doc-reset-args
-..
-.
-.
-.\" NS Sx user macro
-.\" NS cross section reference
-.\" NS
-.\" NS width register `Sx' set in doc-common
-.
-.als Sx doc-generic-macro
-.ds doc-Sx-usage section_header
-.
-.
-.\" NS doc-end-column-list macro
-.\" NS column-list end-list
-.\" NS
-.\" NS modifies:
-.\" NS doc-list-depth
-.
-.de doc-end-column-list
-. linetabs 0
-' in -(\n[doc-list-offset-stack\n[doc-list-depth]]u + \n[doc-list-indent-stack\n[doc-list-depth]]u)
-. ta T .5i
-. fi
-. doc-decrement-list-stack
-. nr doc-list-depth -1
-..
-.
-.
-.\" NS doc-column-indent-width global register
-.\" NS holds the indent width for a column list
-.
-.nr doc-column-indent-width 0
-.
-.
-.\" NS doc-set-column-tab macro
-.\" NS establish tabs for list-type column: `.doc-set-column-tab num_cols'
-.\" NS
-.\" NS modifies:
-.\" NS doc-column-indent-width
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dsct
-.\" NS doc-str-dsct
-.\" NS doc-str-dsct1
-.
-.de doc-set-column-tab
-. ds doc-str-dsct
-. nr doc-reg-dsct 1
-. nr doc-column-indent-width 0
-.
-. ie (\$1 < 5) \
-. ds doc-str-dsct1 " \"
-. el \{\
-. ie (\$1 == 5) \
-. ds doc-str-dsct1 " \"
-. el \{\
-. \" XXX: this is packed abnormally close -- intercolumn width
-. \" should be configurable
-. ds doc-str-dsct1 " \"
-. \}\}
-.
-. while (\n[doc-reg-dsct] <= \$1) \{\
-. as doc-str-dsct " +\w\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]u
-. nr doc-column-indent-width +\w\*[doc-arg\n[doc-reg-dsct]]\*[doc-str-dsct1]u
-. nr doc-reg-dsct +1
-. \}
-.
-. ta \*[doc-str-dsct]
-' in +\n[doc-column-indent-width]u
-..
-.
-.
-.\" NS doc-column-list macro
-.\" NS column items
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-list-indent-stackXXX
-.\" NS doc-spaceXXX
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dcl
-.
-.de doc-column-list
-. if \n[doc-num-args] \
-. doc-parse-arg-vector
-. nr doc-arg-ptr +1
-.
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. tm Usage: .It column_string [Ta [column_string ...] ] (#\n[.c])
-. return
-. \}
-.
-. if "\*[doc-arg\n[doc-arg-ptr]]"Ta" \{\
-. nr doc-reg-dcl (\n[doc-arg-ptr] - 1)
-. ds doc-space\n[doc-reg-dcl]
-. \}
-.
-. if !\n[doc-list-indent-stack\n[doc-list-depth]] \
-. nr doc-list-indent-stack\n[doc-list-depth] \n[doc-column-indent-width]u
-. if !\n[.u] \{\
-. fi
-' in +\n[doc-column-indent-width]u
-. \}
-. ti -\n[doc-column-indent-width]u
-.
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-..
-.
-.
-.\" NS Ta user macro
-.\" NS append tab (\t)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS
-.\" NS width register `Ta' set in doc-common
-.
-.de Ta
-. ie \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. nop \*[doc-tab]\c
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \
-. doc-do-\n[doc-type\n[doc-arg-ptr]]
-. el \
-. doc-reset-args
-. \}
-. el \{\
-. tm1 "Usage: Ta must follow column entry: e.g.
-. tm1 " .It column_string [Ta [column_string ...]] (#\n[.c])
-. \}
-..
-.
-.
-.\" NS Dl user macro
-.\" NS display (one line) literal
-.\" NS
-.\" NS this function uses the `Li' font
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Dl' set in doc-common
-.
-.de Dl
-' ta T .5i
-. in +\n[doc-display-indent]u
-.
-. ie \n[doc-arg-limit] \{\
-. tm Usage: .Dl not callable by other macros (#\n[.c])
-. doc-reset-args
-. \}
-. el \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Dl
-. doc-parse-args \$@
-. nr doc-arg-ptr 1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Li-font]\c
-. doc-print-recursive
-. \}
-. el \
-. tm Usage: .Dl argument ... (#\n[.c])
-. \}
-.
-. in -\n[doc-display-indent]u
-..
-.
-.
-.\" NS D1 user macro
-.\" NS display (one line)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `D1' set in doc-common
-.
-.de D1
-' ta T .5i
-. in +\n[doc-display-indent]u
-.
-. ie \n[doc-arg-limit] \{\
-. tm Usage: .D1 not callable by other macros (#\n[.c])
-. doc-reset-args
-. \}
-. el \{\
-. ie \n[.$] \{\
-. ds doc-macro-name D1
-. doc-parse-args \$@
-. nr doc-arg-ptr 1
-. doc-print-recursive
-. \}
-. el \
-. tm Usage: .D1 argument ... (#\n[.c])
-. \}
-.
-. in -\n[doc-display-indent]u
-..
-.
-.
-.\" NS Vt user macro
-.\" NS variable type (for forcing old style variable declarations);
-.\" NS this is not done in the same manner as .Ot for fortrash --
-.\" NS clean up later
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-decl
-.\" NS doc-have-var
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Vt' set in doc-common
-.
-.de Vt
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Vt
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Vt variable_type ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. tm Usage: .Vt variable_type ... (#\n[.c])
-. doc-reset-args
-. return
-. \}
-.
-. if \n[doc-in-synopsis-section] \{\
-. \" if a function declaration was the last thing given,
-. \" want vertical space
-. if \n[doc-have-decl] \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. \}
-.
-. \" if a subroutine was the last thing given, want vertical space
-. if \n[doc-have-func] \{\
-. ie \n[doc-have-var] \
-. br
-. el \
-. doc-paragraph
-. \}
-.
-. nr doc-have-var 1
-. \}
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Ft-font]\c
-. doc-print-recursive
-.
-. if \n[doc-in-synopsis-section] \{\
-. ie \n[doc-have-old-func] \
-. nop \*[doc-soft-space]\c
-. el \
-. br
-. \}
-..
-.
-.
-.\" NS doc-is-func global register (bool)
-.\" NS set if subroutine (in synopsis only) (fortran only)
-.
-.nr doc-is-func 0
-.
-.
-.\" NS Ft user macro
-.\" NS function type
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-decl
-.\" NS doc-have-var
-.\" NS doc-is-func
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Ft' set in doc-common
-.
-.de Ft
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Ft
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Ft function_type ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. nr doc-arg-ptr +1
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. tm Usage: .Ft function_type ... (#\n[.c])
-. doc-reset-args
-. return
-. \}
-.
-. if \n[doc-in-synopsis-section] \{\
-. if (\n[doc-have-func] : \n[doc-have-decl]) \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. nr doc-have-var 0
-. \}
-.
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-.
-. nr doc-is-func 1
-. \}
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Ft-font]\c
-. doc-print-recursive
-..
-.
-.
-.\" NS doc-have-old-func global register (bool)
-.\" NS set if `Ot' has been called
-.
-.nr doc-have-old-func 0
-.
-.
-.\" NS Ot user macro
-.\" NS old function type (fortran -- no newline)
-.\" NS
-.\" NS modifies:
-.\" NS doc-have-decl
-.\" NS doc-have-old-func
-.\" NS doc-have-var
-.\" NS doc-is-func
-.\" NS
-.\" NS width register `Ot' set in doc-common
-.
-.de Ot
-. nr doc-have-old-func 1
-.
-. if \n[doc-in-synopsis-section] \{\
-. if (\n[doc-have-func] : \n[doc-have-decl]) \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. nr doc-have-var 0
-. \}
-.
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-.
-. nr doc-is-func 1
-. \}
-.
-. if \n[.$] \
-. nop \*[doc-Ft-font]\$*\c
-. nop \ \f[P]\c
-..
-.
-.
-.\" NS Fa user macro
-.\" NS function arguments
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Fa' set in doc-common
-.
-.de Fa
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Fa
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Fa function_arguments ... (#\n[.c])
-. \}
-.
-. ie \n[doc-func-arg-count] \
-. doc-do-func
-. el \{\
-. nr doc-arg-ptr +1
-. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Fa-font]\c
-. doc-print-recursive
-.
-. if \n[doc-in-synopsis-section] \
-. if \n[doc-have-func] \
-. br
-. \}\}
-..
-.
-.
-.\" NS doc-func-arg-count global register
-.\" NS how many function arguments have been processed so far
-.
-.nr doc-func-arg-count 0
-.
-.
-.\" NS doc-func-arg global string
-.\" NS work buffer for function name strings
-.
-.ds doc-func-arg
-.
-.
-.\" NS doc-num-func-args global register
-.\" NS number of function arguments
-.
-.nr doc-num-func-args 0
-.
-.
-.\" NS doc-func-args-processed global register
-.\" NS function arguments processed so far
-.
-.nr doc-func-args-processed 0
-.
-.
-.\" NS doc-do-func macro
-.\" NS internal .Fa for .Fc
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-func-arg
-.\" NS doc-func-arg-count
-.\" NS doc-func-args-processed
-.\" NS doc-num-func-args
-.
-.de doc-do-func
-. if (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
-. doc-reset-args
-. return
-. \}
-.
-. nr doc-arg-ptr +1
-.
-. ds doc-func-arg
-. nr doc-num-func-args 0
-. nr doc-func-args-processed 0
-.
-. doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
-. if (\n[doc-num-func-args] > 1) \
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
-.
-. if (\n[doc-func-arg-count] > 1) \{\
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\|,\)\c
-. nop \)\*[doc-space\n[doc-arg-ptr]]\*[doc-Fa-font]\c
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\f[P]\s[0]\c
-. \}
-.
-. if (\n[doc-func-arg-count] == 1) \{\
-. nop \|\*[doc-Fa-font]\*[doc-arg\n[doc-arg-ptr]]\c
-. nop \f[P]\s[0]\c
-. \}
-. nr doc-func-arg-count +1
-. doc-do-func
-..
-.
-.
-.\" NS doc-have-func global register (bool)
-.\" NS whether we have more than one function in synopsis
-.
-.nr doc-have-func 0
-.
-.
-.\" NS Fn user macro
-.\" NS functions
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-decl
-.\" NS doc-have-func
-.\" NS doc-have-var
-.\" NS doc-indent-synopsis
-.\" NS doc-is-func
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Fn' set in doc-common
-.
-.de Fn
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Fn
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
-. \}
-.
-. if !\n[doc-arg-limit] \
-. return
-.
-. if \n[doc-in-synopsis-section] \{\
-. \" if there is/has been more than one subroutine declaration
-. ie \n[doc-is-func] \{\
-. br
-. nr doc-have-var 0
-. nr doc-have-decl 0
-. nr doc-is-func 0
-. \}
-. el \{\
-. if \n[doc-have-func] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. nr doc-have-decl 0
-. \}\}
-.
-. if \n[doc-have-decl] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-.
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. \}
-.
-. nr doc-have-func 1
-. nr doc-is-func 0
-.
-. br
-. if !\n[doc-indent-synopsis] \
-. nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
-. if !\n[doc-indent-synopsis-active] \
-. in +\n[doc-indent-synopsis]u
-. ti -\n[doc-indent-synopsis]u
-. \}
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. if (\n[doc-arg-limit] < \n[doc-arg-ptr]) \{\
-. tm Usage: .Fn function_name [function_arg] ... (#\n[.c])
-. doc-reset-args
-. return
-. \}
-.
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
-. nop \f[P]\s[0]\*[lp]\)\c
-.
-. nr doc-arg-ptr +1
-. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. nop \*[doc-Fa-font]\c
-. doc-do-func-args
-. nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. \}\}
-.
-. nop \)\*[rp]\)\c
-. if \n[doc-in-synopsis-section] \
-. nop \);\)\c
-.
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. \" output the space (if needed)
-. nr doc-arg-ptr -1
-. nop \)\*[doc-space\n[doc-arg-ptr]]\c
-. nr doc-arg-ptr +1
-.
-. doc-print-recursive
-. \}
-. el \
-. doc-print-and-reset
-.
-. if \n[doc-in-synopsis-section] \
-. if !\n[doc-indent-synopsis-active] \
-. in -\n[doc-indent-synopsis]u
-..
-.
-.
-.\" NS doc-do-func-args macro
-.\" NS handle function arguments
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-argXXX
-.\" NS doc-func-arg
-.\" NS doc-func-args-processed
-.\" NS doc-num-func-args
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-ddfa
-.
-.de doc-do-func-args
-. if \n[doc-in-synopsis-section] \{\
-. ds doc-func-arg
-. nr doc-num-func-args 0
-. nr doc-func-args-processed 0
-.
-. doc-build-func-string \*[doc-arg\n[doc-arg-ptr]]
-. if (\n[doc-num-func-args] > 1) \
-. ds doc-arg\n[doc-arg-ptr] "\*[doc-func-arg]
-. \}
-.
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
-. nr doc-arg-ptr +1
-.
-. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. if (\n[doc-type\n[doc-arg-ptr]] == 2) \{\
-. nr doc-reg-ddfa (\n[doc-arg-ptr] - 1)
-. nop \|\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u],\)\c
-. nop \)\*[doc-space\n[doc-reg-ddfa]]\f[P]\s[0]\|\c
-. doc-do-func-args
-. \}\}
-..
-.
-.
-.\" NS doc-saved-nesting-level global register
-.
-.nr doc-saved-nesting-level 0
-.
-.
-.\" NS doc-in-func-enclosure global register (bool)
-.
-.nr doc-in-func-enclosure 0
-.
-.
-.\" NS Fo user macro
-.\" NS function open
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-func-arg-count
-.\" NS doc-have-decl
-.\" NS doc-have-func
-.\" NS doc-have-var
-.\" NS doc-in-func-enclosure
-.\" NS doc-indent-synopsis
-.\" NS doc-is-func
-.\" NS doc-macro-name
-.\" NS doc-saved-nesting-level
-.\" NS
-.\" NS width register `Fo' set in doc-common
-.
-.de Fo
-. if (\n[doc-in-func-enclosure]) \{\
-. tm mdoc error: .Fo/.Fc can't be nested (#\n[.c])
-. return
-. \}
-.
-. nr doc-saved-nesting-level \n[doc-nesting-level]
-. nr doc-in-func-enclosure 1
-.
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ds doc-macro-name Fo
-. doc-parse-args \$@
-. \}
-. el \
-. tm Usage: .Fo function_name (#\n[.c])
-. \}
-.
-. if \n[doc-in-synopsis-section] \{\
-. \" if there is/has been more than one subroutine declaration
-. ie \n[doc-is-func] \{\
-. br
-. nr doc-have-var 0
-. nr doc-have-decl 0
-. nr doc-is-func 0
-. \}
-. el \{\
-. if \n[doc-have-func] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. nr doc-have-decl 0
-. \}\}
-.
-. if \n[doc-have-decl] \{\
-. doc-paragraph
-. nr doc-have-var 0
-. \}
-.
-. if \n[doc-have-var] \{\
-. doc-paragraph
-. nr doc-have-decl 0
-. \}
-.
-. nr doc-have-func 1
-. nr doc-is-func 0
-.
-. br
-. if !\n[doc-indent-synopsis] \
-. nr doc-indent-synopsis (8u * \n[doc-fixed-width]u)
-. \}
-.
-. \" start function box
-. box doc-func-box
-. ev doc-func-env
-. evc 0
-. in 0
-. nf
-.
-. nr doc-arg-ptr +1
-. doc-print-prefixes
-. if (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-func-arg-count 1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. nop \*[doc-Fn-font]\*[doc-arg\n[doc-arg-ptr]]\c
-. nop \f[P]\s[0]\*[lp]\)\c
-. doc-reset-args
-. \}
-..
-.
-.
-.\" NS Fc user macro
-.\" NS function close
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-func-arg-count
-.\" NS doc-in-func-enclosure
-.\" NS doc-saved-nesting-level
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `Fc' set in doc-common
-.
-.de Fc
-. if !\n[doc-in-func-enclosure] \{\
-. tm mdoc warning: Extraneous .Fc (#\n[.c])
-. return
-. \}
-.
-. if \n[.$] \{\
-. ds doc-macro-name Fc
-. \" the first (dummy) argument is used to get the correct spacing
-. doc-parse-args \) \$@
-. \}
-.
-. if !(\n[doc-saved-nesting-level] == \n[doc-nesting-level]) \
-. tm mdoc warning: Unbalanced enclosure commands within .Fo/.Fc
-.
-. nr doc-func-arg-count 0
-. nr doc-in-func-enclosure 0
-.
-. ie \n[doc-in-synopsis-section] \
-. nop \|\*[rp];\)
-. el \
-. nop \|\*[rp]\)
-.
-. \" finish function box
-. br
-. ev
-. box
-. chop doc-func-box
-. unformat doc-func-box
-.
-. if \n[doc-in-synopsis-section] \{\
-. if !\n[doc-indent-synopsis-active] \
-. in +\n[doc-indent-synopsis]u
-. ti -\n[doc-indent-synopsis]u
-. \}
-.
-. nh
-. nop \*[doc-func-box]\c
-.
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. doc-print-recursive
-. \}
-. el \
-. doc-print-and-reset
-.
-. if \n[doc-in-synopsis-section] \
-. if !\n[doc-indent-synopsis-active] \
-. in -\n[doc-indent-synopsis]u
-..
-.
-.
-.\" NS doc-build-func-string macro
-.\" NS collect function arguments and set hard spaces inbetween
-.\" NS
-.\" NS modifies:
-.\" NS doc-func-arg
-.\" NS doc-func-args-processed
-.\" NS doc-num-func-args
-.
-.de doc-build-func-string
-. if !\n[doc-num-func-args] \{\
-. nr doc-num-func-args \n[.$]
-. nr doc-func-args-processed 0
-. ds doc-func-arg
-. \}
-.
-. nr doc-func-args-processed +1
-. as doc-func-arg "\$1
-.
-. if (\n[doc-func-args-processed] < \n[doc-num-func-args]) \{\
-. as doc-func-arg "\*[doc-hard-space]
-.
-. shift
-. doc-build-func-string \$@
-. \}
-..
-.
-.
-.\" Very crude references: Stash all reference info into boxes, print out
-.\" reference on .Re request and clean up. Ordering very limited, no fancy
-.\" citations, but can do articles, journals, and books -- need to add
-.\" several missing options (like city etc). Should be able to grab a refer
-.\" entry, massage it a wee bit (prefix a `.' to the %[A-Z]) and not worry
-.\" (ha!).
-.
-.
-.\" NS doc-is-reference global register (bool)
-.\" NS set if in reference
-.
-.nr doc-is-reference 0
-.
-.
-.\" NS doc-reference-count global register
-.\" NS reference element counter
-.
-.nr doc-reference-count 0
-.
-.
-.\" NS Rs user macro
-.\" NS reference start
-.\" NS
-.\" NS modifies:
-.\" NS doc-is-reference
-.\" NS doc-reference-count
-.\" NS
-.\" NS width register `Rs' set in doc-common
-.
-.de Rs
-. ie \n[.$] \
-. tm Usage: .Rs (does not take arguments) (#\n[.c])
-. el \{\
-. nr doc-is-reference 1
-. doc-reset-reference
-. if \n[doc-in-see-also-section] \
-. doc-paragraph
-. nr doc-reference-count 0
-. \}
-..
-.
-.
-.\" NS Re user macro
-.\" NS reference end
-.\" NS
-.\" NS modifies:
-.\" NS doc-is-reference
-.\" NS
-.\" NS width register `Re' set in doc-common
-.
-.de Re
-. ie \n[.$] \
-. tm Usage: .Re (does not take arguments) (#\n[.c])
-. el \{\
-. doc-print-reference
-. doc-reset-reference
-. nr doc-is-reference 0
-. \}
-..
-.
-.
-.\" NS doc-reset-reference macro
-.\" NS reference cleanup
-.\" NS
-.\" NS modifies:
-.\" NS doc-author-count
-.\" NS doc-author-nameXXX
-.\" NS doc-book-count
-.\" NS doc-book-name
-.\" NS doc-corporate-count
-.\" NS doc-corporate-name
-.\" NS doc-date
-.\" NS doc-date-count
-.\" NS doc-issue-count
-.\" NS doc-issue-name
-.\" NS doc-journal-count
-.\" NS doc-journam-name
-.\" NS doc-optional-count
-.\" NS doc-optional-string
-.\" NS doc-page-number-count
-.\" NS doc-page-number-string
-.\" NS doc-reference-title-count
-.\" NS doc-reference-title-name
-.\" NS doc-reference-title-name-for-book
-.\" NS doc-report-count
-.\" NS doc-report-name
-.\" NS doc-volume-count
-.\" NS doc-volume-name
-.
-.de doc-reset-reference
-. while (\n[doc-author-count]) \{\
-. ds doc-author-name\n[doc-author-count]
-. nr doc-author-count -1
-. \}
-. nr doc-journal-count 0
-. nr doc-issue-count 0
-. nr doc-optional-count 0
-. nr doc-corporate-count 0
-. nr doc-report-count 0
-. nr doc-reference-title-count 0
-. nr doc-volume-count 0
-. nr doc-date-count 0
-. nr doc-page-number-count 0
-. nr doc-book-count 0
-.
-. ds doc-journal-name
-. ds doc-issue-name
-. ds doc-optional-string
-. ds doc-corporate-name
-. ds doc-report-name
-. ds doc-reference-title-name
-. ds doc-reference-title-name-for-book
-. ds doc-volume-name
-. ds doc-date
-. ds doc-page-number-string
-. ds doc-book-name
-..
-.
-.
-.\" NS doc-finish-reference macro
-.\" NS auxiliary macro for doc-print-reference
-.\" NS
-.\" NS modifies:
-.\" NS doc-reference-count
-.
-.de doc-finish-reference
-. nr doc-reference-count -1
-. ie \n[doc-reference-count] \
-. nop \),
-. el \
-. nop \).
-..
-.
-.
-.\" NS doc-print-reference macro
-.\" NS reference print
-.\" NS
-.\" NS modifies:
-.\" NS doc-reference-count
-.
-.de doc-print-reference
-.
-. nh
-.
-. if \n[doc-author-count] \{\
-. doc-print-reference-authors
-. nr doc-reference-count -\n[doc-author-count]
-. \}
-.
-. if \n[doc-reference-title-count] \{\
-. unformat doc-reference-title-name
-. chop doc-reference-title-name
-. unformat doc-reference-title-name-for-book
-. chop doc-reference-title-name-for-book
-. ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
-. nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
-. doc-finish-reference
-. \}
-. el \{\
-. nop \*[doc-reference-title-name]\c
-. doc-finish-reference
-. \}\}
-.
-. if \n[doc-book-count] \{\
-. unformat doc-book-name
-. chop doc-book-name
-. nop \*[doc-book-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-publisher-count] \{\
-. unformat doc-publisher-name
-. chop doc-publisher-name
-. nop \*[doc-publisher-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-journal-count] \{\
-. unformat doc-journal-name
-. chop doc-journal-name
-. nop \*[doc-journal-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-report-count] \{\
-. unformat doc-report-name
-. chop doc-report-name
-. nop \*[doc-report-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-issue-count] \{\
-. unformat doc-issue-name
-. chop doc-issue-name
-. nop \*[doc-issue-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-volume-count] \{\
-. unformat doc-volume-name
-. chop doc-volume-name
-. nop \*[doc-volume-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-page-number-count] \{\
-. unformat doc-page-number-string
-. chop doc-page-number-string
-. nop \*[doc-page-number-string]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-corporate-count] \{\
-. unformat doc-corporate-name
-. chop doc-corporate-name
-. nop \*[doc-corporate-name]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-date-count] \{\
-. unformat doc-date
-. chop doc-date
-. nop \*[doc-date]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-optional-count] \{\
-. unformat doc-optional-string
-. chop doc-optional-string
-. nop \*[doc-optional-string]\c
-. doc-finish-reference
-. \}
-.
-. if \n[doc-reference-count] \
-. tm mdoc warning: unresolved reference problem
-.
-. hy \n[doc-hyphen-flags]
-..
-.
-.
-.\" NS doc-print-reference-authors macro
-.\" NS print out reference authors
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-dpra
-.\" NS doc-str-dpra
-.
-.ds doc-str-dpra "and
-.
-.de doc-print-reference-authors
-. nr doc-reg-dpra 1
-.
-. while (\n[doc-reg-dpra] < \n[doc-author-count]) \{\
-. unformat doc-author-name\n[doc-reg-dpra]
-. chop doc-author-name\n[doc-reg-dpra]
-. ie (\n[doc-author-count] > 2) \
-. nop \)\*[doc-author-name\n[doc-reg-dpra]],
-. el \
-. nop \)\*[doc-author-name\n[doc-reg-dpra]]
-. nr doc-reg-dpra +1
-. \}
-.
-. unformat doc-author-name\n[doc-reg-dpra]
-. chop doc-author-name\n[doc-reg-dpra]
-. if (\n[doc-author-count] > 1) \
-. nop \)\*[doc-str-dpra]
-. nop \)\*[doc-author-name\n[doc-reg-dpra]],
-..
-.
-.
-.\" NS doc-author-count global register
-.\" NS counter of author references
-.
-.nr doc-author-count 0
-.
-.
-.\" NS doc-author-nameXXX global box
-.\" NS array of author names
-.\" NS
-.\" NS limit:
-.\" NS doc-author-count
-.
-.ds doc-author-name0
-.
-.
-.\" NS %A user macro
-.\" NS reference author(s)
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-author-count
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%A
-.\" NS
-.\" NS width register `%A' set in doc-common
-.
-.de %A
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%A author_name ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-author-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %A
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" save to reference box
-. box doc-author-name\n[doc-author-count]
-. ev doc-env-%A
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-book-count global register
-.\" NS counter of book references
-.
-.nr doc-book-count 0
-.
-.
-.\" NS doc-book-name global box
-.\" NS string of collected book references
-.
-.ds doc-book-name
-.
-.
-.\" NS %B user macro
-.\" NS [reference] book name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-book-count
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%B
-.\" NS
-.\" NS width register `%B' set in doc-common
-.
-.de %B
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%B book_name ... (#\n[.c])
-. return
-. \}
-.
-. if \n[doc-is-reference] \{\
-. nr doc-book-count +1
-. nr doc-reference-count +1
-. \}
-.
-. ds doc-macro-name %B
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. ie \n[doc-is-reference] \{\
-. \" append to reference box
-. boxa doc-book-name
-. ev doc-env-%B
-. evc 0
-. in 0
-. nf
-. nop \*[doc-Em-font]\c
-. doc-do-references
-. \}
-. el \{\
-. nop \*[doc-Em-font]\c
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS doc-date-count global register
-.\" NS counter of date references
-.
-.nr doc-date-count 0
-.
-.
-.\" NS doc-date global box
-.\" NS string of collected date references
-.
-.ds doc-date
-.
-.
-.\" NS %D user macro
-.\" NS [reference] date
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-date-count
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%D
-.\" NS
-.\" NS width register `%D' set in doc-common
-.
-.de %D
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%D date ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-date-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %D
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-date
-. ev doc-env-%D
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-publisher-count global register
-.\" NS counter of publisher references
-.
-.nr doc-publisher-count 0
-.
-.
-.\" NS doc-publisher-name global box
-.\" NS string of collected publisher references
-.
-.ds doc-publisher-name
-.
-.
-.\" NS %I user macro
-.\" NS [reference] issuer/publisher name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-publisher-count
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%I
-.\" NS
-.\" NS width register `%I' set in doc-common
-.
-.de %I
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%I issuer/publisher_name ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-publisher-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %I
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-publisher-name
-. ev doc-env-%I
-. evc 0
-. in 0
-. nf
-. nop \*[doc-Em-font]\c
-. doc-do-references
-..
-.
-.
-.\" NS doc-journal-count global register
-.\" NS counter of journal references
-.
-.nr doc-journal-count 0
-.
-.
-.\" NS doc-journal-name global box
-.\" NS string of collected journal references
-.
-.ds doc-journal-name
-.
-.
-.\" NS %J user macro
-.\" NS [reference] Journal Name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-journal-count
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%J
-.\" NS
-.\" NS width register `%J' set in doc-common
-.
-.de %J
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%J journal_name ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-journal-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %J
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-journal-name
-. ev doc-env-%J
-. evc 0
-. in 0
-. nf
-. nop \*[doc-Em-font]\c
-. doc-do-references
-..
-.
-.
-.\" NS doc-issue-count global register
-.\" NS counter of issue number references
-.
-.nr doc-issue-count 0
-.
-.
-.\" NS doc-issue-name global box
-.\" NS string of collected issue number references
-.
-.ds doc-issue-name
-.
-.
-.\" NS %N user macro
-.\" NS [reference] issue number
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-issue-count
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%N
-.\" NS
-.\" NS width register `%N' set in doc-common
-.
-.de %N
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%N issue_number ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-issue-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %N
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-issue-name
-. ev doc-env-%N
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-optional-count global register
-.\" NS counter of optional information references
-.
-.nr doc-optional-count 0
-.
-.
-.\" NS doc-optional-string global box
-.\" NS string of collected optional information references
-.
-.ds doc-optional-string
-.
-.
-.\" NS %O user macro
-.\" NS [reference] optional information
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-optional-count
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%O
-.\" NS
-.\" NS width register `%O' set in doc-common
-.
-.de %O
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%O optional_information ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-optional-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %O
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-optional-string
-. ev doc-env-%O
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-page-number-count global register
-.\" NS counter of page number references
-.
-.nr doc-page-number-count 0
-.
-.
-.\" NS doc-page-number-string global box
-.\" NS string of collected page number references
-.
-.ds doc-page-number-string
-.
-.
-.\" NS %P user macro
-.\" NS [reference] page numbers
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-page-number-count
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%P
-.\" NS
-.\" NS width register `%P' set in doc-common
-.
-.de %P
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%P page_number ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-page-number-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %P
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-page-number-string
-. ev doc-env-%P
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-corporate-count global register
-.\" NS counter of corporate references
-.
-.nr doc-corporate-count 0
-.
-.
-.\" NS doc-corporate-name global box
-.\" NS string of collected corporate references
-.
-.ds doc-corporate-name
-.
-.
-.\" NS %Q user macro
-.\" NS corporate or foreign author
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-corporate-count
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%Q
-.\" NS
-.\" NS width register `%Q' set in doc-common
-.
-.de %Q
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%Q corporate_or_foreign_author ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-corporate-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %Q
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-corporate-name
-. ev doc-env-%Q
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-report-count global register
-.\" NS counter of report references
-.
-.nr doc-report-count 0
-.
-.
-.\" NS doc-report-name global box
-.\" NS string of collected report references
-.
-.ds doc-report-name
-.
-.
-.\" NS %R user macro
-.\" NS [reference] report name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-count
-.\" NS doc-report-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%R
-.\" NS
-.\" NS width register `%R' set in doc-common
-.
-.de %R
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%R reference_report ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-report-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %R
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-report-name
-. ev doc-env-%R
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-reference-title-count global register
-.\" NS counter of reference title references
-.
-.nr doc-reference-title-count 0
-.
-.
-.\" NS doc-reference-title-name global box
-.\" NS string of collected reference title references
-.
-.ds doc-reference-title-name
-.
-.
-.\" NS doc-reference-title-name-for-book global box
-.\" NS string of collected reference title references
-.\" NS (saved with another font; this is a shortcoming of groff)
-.
-.ds doc-reference-title-name-for-book
-.
-.
-.\" NS %T user macro
-.\" NS reference title
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-title-count
-.\" NS doc-report-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%T
-.\" NS
-.\" NS width register `%T' set in doc-common
-.
-.de %T
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%T reference_title ... (#\n[.c])
-. return
-. \}
-.
-. if \n[doc-is-reference] \{\
-. nr doc-reference-title-count +1
-. nr doc-reference-count +1
-. \}
-.
-. ds doc-macro-name %T
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. ie \n[doc-is-reference] \{\
-. \" append to reference box
-. boxa doc-reference-title-name-for-book
-. ev doc-env-%T
-. evc 0
-. in 0
-. nf
-. nop \*[doc-No-font]\c
-. doc-do-references
-.
-. \" do it a second time with another font
-. ds doc-macro-name %T
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. boxa doc-reference-title-name
-. ev doc-env-%T
-. evc 0
-. in 0
-. nf
-. nop \*[doc-Em-font]\c
-. doc-do-references
-. \}
-. el \{\
-. nop \*[doc-Em-font]\c
-. doc-print-recursive
-. \}
-..
-.
-.
-.\" NS doc-volume-count global register
-.\" NS counter of reference title references
-.
-.nr doc-volume-count 0
-.
-.
-.\" NS doc-volume-name global box
-.\" NS string of collected volume references
-.
-.ds doc-volume-name
-.
-.
-.\" NS %V user macro
-.\" NS reference volume
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-macro-name
-.\" NS doc-reference-title-count
-.\" NS doc-volume-count
-.\" NS
-.\" NS local variables:
-.\" NS doc-env-%V
-.\" NS
-.\" NS width register `%V' set in doc-common
-.
-.de %V
-. if (\n[doc-arg-limit] : (\n[.$] == 0)) \{\
-. tm Usage: .%V volume ... (#\n[.c])
-. return
-. \}
-.
-. nr doc-volume-count +1
-. nr doc-reference-count +1
-.
-. ds doc-macro-name %V
-. doc-parse-args \$@
-.
-. nr doc-arg-ptr +1
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-.
-. \" append to reference box
-. boxa doc-volume-name
-. ev doc-env-%V
-. evc 0
-. in 0
-. nf
-. doc-do-references
-..
-.
-.
-.\" NS doc-do-references macro
-.\" NS reference recursion routine
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-ddr
-.\" NS doc-reg-ddr1
-.
-.de doc-do-references
-. if !\n[doc-is-reference] \
-. tm mdoc error: .\*[doc-macro-name] found outside of .Rs ... .Re (#\n[.c])
-.
-. nr doc-reg-ddr1 \n[doc-type\n[doc-arg-ptr]]
-.
-. ie (\n[doc-reg-ddr1] == 1) \{\
-. \" .nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]\c
-. doc-append-arg \c 3
-. \*[doc-arg\n[doc-arg-ptr]]
-. \}
-. el \{\
-. nop \)\*[doc-arg\n[doc-arg-ptr]]\c
-.
-. ie (\n[doc-arg-limit] == \n[doc-arg-ptr]) \{\
-. \" finish reference box
-. br
-. ev
-. boxa
-.
-. doc-reset-args
-. \}
-. el \{\
-. nr doc-reg-ddr \n[doc-arg-ptr]
-. nr doc-arg-ptr +1
-. nop \)\*[doc-space\n[doc-reg-ddr]]\c
-. doc-do-references
-. \}\}
-..
-.
-.
-.\" NS Hf user macro
-.\" NS source include header files.
-.\" NS
-.\" NS modifies:
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS
-.\" NS width register `Hf' set in doc-common
-.
-.de Hf
-. ie ((\n[.$] == 1) & (\n[doc-arg-limit] == 0)) \{\
-. doc-paragraph
-. nop File:
-. Pa \$1
-.
-. Bd -literal
-. so \$1
-. Ed
-.
-. doc-paragraph
-. \}
-. el \
-. Usage: .Hf file (#\n[.c])
-..
-.
-.
-.\" NS doc-have-author global register (bool)
-.\" NS set in `An'
-.
-.nr doc-have-author 0
-.
-.
-.\" NS An user macro
-.\" NS author name
-.\" NS
-.\" NS modifies:
-.\" NS doc-arg-ptr
-.\" NS doc-curr-font
-.\" NS doc-curr-size
-.\" NS doc-have-author
-.\" NS doc-macro-name
-.\" NS
-.\" NS width register `An' set in doc-common
-.
-.de An
-. if !\n[doc-arg-limit] \{\
-. ie \n[.$] \{\
-. ie "\$1"-nosplit" \
-. nr doc-in-authors-section 0
-. el \{ .ie "\$1"-split" \
-. nr doc-in-authors-section 1
-. el \{\
-. ds doc-macro-name An
-. doc-parse-args \$@
-. \}\}\}
-. el \{\
-. tm1 "Usage: .An {-nosplit | -split}
-. tm1 .An author_name ... (#\n[.c])
-. \}\}
-.
-. if \n[doc-in-authors-section] \{\
-. ie \n[doc-have-author] \
-. br
-. el \
-. nr doc-have-author 1
-. \}
-.
-. if \n[doc-arg-limit] \{\
-. nr doc-arg-ptr +1
-. ie (\n[doc-arg-limit] >= \n[doc-arg-ptr]) \{\
-. nr doc-curr-font \n[.f]
-. nr doc-curr-size \n[.ps]
-. doc-print-recursive
-. \}
-. el \{\
-. tm Usage: .An author_name ... (#\n[.c])
-. doc-reset-args
-. \}\}
-..
-.
-.
-.\" NS Rv user macro
-.\" NS return values
-.\" NS
-.\" NS width register `Rv' set in doc-common
-.\" NS
-.\" NS local variables:
-.\" NS doc-str-Rv-prefix
-.\" NS doc-str-Rv-suffix
-.
-.ds doc-str-Rv-prefix "The
-.ds doc-str-Rv-suffix "function returns the value\~0 if successful;
-.as doc-str-Rv-suffix " otherwise the value\~-1 is returned and
-.as doc-str-Rv-suffix " the global variable \*[doc-Va-font]errno\f[P]
-.as doc-str-Rv-suffix " is set to indicate the error.
-.
-.de Rv
-.
-.\" XXX: what does this function without `-std'?
-.
-. if !\n[.$] \{\
-. tm Usage: .Rv [-std] (#\n[.c])
-. return
-. \}
-.
-. \" .ds doc-macro-name Rv
-. \" .nr doc-arg-ptr 0
-. \" .nr lR +1
-. \" .ds doc-arg1 \$2
-. \" .ds doc-arg2 \$3
-. \" .ds doc-arg3 \$4
-. \" .ds doc-arg4 \$5
-. \" .ds doc-arg5 \$6
-. \" .ds doc-arg6 \$7
-. \" .ds doc-arg7 \$8
-. \" .ds doc-arg8 \$9
-. \" .
-. \" .nr doc-num-args (\n[.$] - 1)
-.
-. if "\$1"-std" \{\
-. nr doc-reg-Rv \*[doc-section]
-. if ((\n[doc-reg-Rv] < 2) : (\n[doc-reg-Rv] > 3)) \
-. tm Usage: .Rv -std in sections 2 and 3 only (#\n[.c])
-. br
-. nop \)\*[doc-str-Rv-prefix]
-. Fn \$2
-. nop \)\*[doc-str-Rv-suffix]
-. \}
-..
-.
-.
-.\" NS Mt user macro
-.\" NS mailto (for conversion to HTML)
-.
-.de Mt
-. \" XXX: error handling missing
-. Pa \$@
-..
-.
-.
-.\" NS Lk user macro
-.\" NS link (for conversion to HTML)
-.\" NS
-.\" NS local variables:
-.\" NS doc-reg-Lk
-.\" NS doc-str-Lk
-.
-.de Lk
-. ds doc-str-Lk Sy \$@
-.
-. ie (\n[.$] > 1) \{\
-. doc-get-arg-type \$2
-. ie (\n[doc-arg-type] < 3) \{\
-. Em \)\$2:
-. ds doc-str-Lk Sy "\$1"
-. doc-get-width "\$1"
-. shift 2
-. if \n[.$] \
-. as doc-str-Lk " \$@
-. \}
-. el \
-. doc-get-width "\$1"
-. \}
-. el \
-. doc-get-width "\$1"
-.
-. ie n \
-. nr doc-reg-Lk 26
-. el \
-. nr doc-reg-Lk 38
-. ie (\n[doc-width] >= \n[doc-reg-Lk]) \
-. D1 \*[doc-str-Lk]
-. el \
-. \*[doc-str-Lk]
-..
-.
-.
-.\" NS doc-defunct-macro macro
-.\" NS this is the skeleton for defunct macros
-.\" NS
-.
-.de doc-defunct-macro
-. tmc mdoc error: .\$0 defunct
-. if d doc-\$0-usage \
-. tmc , \*[doc-\$0-usage]
-. tm1 " (#\n[.c])
-..
-.
-.
-.\" obsolete macros
-.
-.als Db doc-defunct-macro
-.
-.als Ds doc-defunct-macro
-.
-.als Ex doc-defunct-macro
-.ds doc-Ex-usage use .D1
-.
-.als Or doc-defunct-macro
-.ds doc-Or-usage use `|'
-.
-.als Sf doc-defunct-macro
-.ds doc-Sf-usage use .Pf or .Ns
-.
-.
-.rn em e@
-.
-.de em
-. tm1 "mdoc error: end-macro (.em) respecification is not allowed. (#\n[.c])
-. tm1 " Should this have been `.Em ...'?
-. ab
-..
-.
-.
-.\" NS doc-empty-line macro
-.\" NS emit warning and print empty line
-.
-.de doc-empty-line
-. if !\n[doc-display-depth] \
-. tm mdoc warning: Empty input line #\n[.c]
-. sp
-..
-.
-.blm doc-empty-line
-.
-.
-.ec
-.
-.
-.\" load local modifications
-.mso mdoc.local
-.
-.\" EOF
diff --git a/contrib/groff/tmac/dvi.tmac b/contrib/groff/tmac/dvi.tmac
deleted file mode 100644
index 5fec42705f2c..000000000000
--- a/contrib/groff/tmac/dvi.tmac
+++ /dev/null
@@ -1,147 +0,0 @@
-.\" dvi.tmac
-.\"
-.nr _C \n(.C
-.cp 0
-.ftr CR CW
-.ftr C CW
-.ftr CO CWI
-.ftr CI CWI
-.ftr TT CW
-.ftr HR H
-.\" This uses the dvi-char_1 string in font CW, dvi-char_0 otherwise.
-.char _ \R'dvi-char_ \\n(.f=\f(CW\\n(.f\fP'\\*[dvi-char_\\n[dvi-char_]]
-.char \[ul] \R'dvi-char_ \w'M'=\w'i''\\*[dvi-char_\\n[dvi-char_]]
-.\" Normally use a rule.
-.\" This is designed so that \(ul, \(rn and \(br form corners.
-.ds dvi-char_0 \Z'\v'.23m'\D'R .54m .04m''\h'.5m'
-.\" In font CW use a real _ character.
-.ds dvi-char_1 _
-.if !c\[radicalex] .char \[radicalex] \D'R .5m -.04m'\v'.04m'
-.if !c\[br] .char \[br] \Z'\v'.25m'\D'R .04m -1m''
-.if !c\[ru] .char \[ru] \Z'\v'-.02m'\D'R .54m .04m''\h'.5m'
-.if !c\[rn] .char \[rn] \Z'\v'-.77m'\D'R .54m .04m''\h'.5m'
-.if !c\[co] .char \[co] \
-\z\s-2\(ci\s0\
-\h'\w'\s-2\(ci\s0'u-\w'\s-4C\s0'u/2u'\
-\s-4C\s0\
-\h'\w'\s-2\(ci\s0'u-\w'\s-4C\s0'u/2u'
-.if !c\[rg] .char \[rg] \
-\z\s-2\(ci\s0\
-\h'\w'\s-2\(ci\s0'u-\w'\s-4R\s0'u/2u'\
-\s-4R\s0\
-\h'\w'\s-2\(ci\s0'u-\w'\s-4R\s0'u/2u'
-.if !c\[fm] .char \[fm] \v'-.35m'\s[\\n(.s*7u/10u]\[prime]\s0\v'.35m'
-.if !c\[de] .char \[de] \h'.05m'\v'-.54m'\D'c .3m'\v'.54m'\h'.05m'
-.if !c\[ct] .char \[ct] \o'c/'
-.if !c\[sq] .char \[sq] \Z'\h'.05m'\D'R .4m -.04m'\v'.04m'\h'-.04m'\
-\D'R .04m -.4m'\v'.04m'\D'R -.4m -.04m'\D'R .04m .4m''\h'.5m'
-.\"char \[sq] \h'.05m'\D'l .4m 0'\D'l 0 -.4m'\D'l -.4m 0'\D'l 0 .4m'\h'.45m'
-.if !c\[!=] .char \[!=] \[slashnot]\(eq
-.if !c\[tm] .char \[tm] \v'-.3m'\s[\\n(.s/2u]TM\s0\v'.3m'
-.if !c\[aq] .char \[aq] '
-.if !c\[bq] .char \[bq] ,
-.if !c\[Bq] .char \[Bq] ,\h'\w'\(rq'u-(2u*\w"'"u)',
-.if !c\[ho] .char \[ho] \s[\En[.s]/2u]\v'.4m'c\v'-.4m'\s0
-.if !c\[-D] .char \[-D] \Z'\v'-.1m'\h'.05m'-'D
-.if !c\[Sd] .char \[Sd] \Z'\v'-.3m'\h'.35m'-'\(pd
-.if !c\[TP] .char \[TP] I\h'-.25m'\v'-.33m'\s[\En[.s]*6u/10u]\v'.33m'D\
-\v'-.33m'\s0\v'.33m'
-.if !c\[Tp] .char \[Tp] \zlp
-.if !c\[nb] .char \[nb] \[slashnot]\(sb
-.cflags 8 \(an
-.if !c\[an] .char \[an] \h'-.167m'\(mi\h'-.167m'
-.\" Define some fractions.
-.de dvi-frac
-.if !c\[\\$1\\$2] .char \[\\$1\\$2] \
-\v'-.25m'\s[\\\\n(.s*7u/10u]\\$1\s0\v'.25m'\h'-.2m'\
-/\h'-.2m'\v'.25m'\s[\\\\n(.s*7u/10u]\\$2\s0\v'-.25m'
-..
-.dvi-frac 1 2
-.dvi-frac 3 4
-.dvi-frac 1 4
-.dvi-frac 1 8
-.dvi-frac 3 8
-.dvi-frac 5 8
-.dvi-frac 7 8
-.\" support for ISO Latin-1
-.if !c\[S1] .char \[S1] \v'-.2m'\s-31\s+3\v'+.2m'
-.if !c\[S2] .char \[S2] \v'-.2m'\s-32\s+3\v'+.2m'
-.if !c\[S3] .char \[S3] \v'-.2m'\s-33\s+3\v'+.2m'
-.if !c\[Of] .char \[Of] \v'-.2m'\s'\En(.s*6u/10u'\o'_a'\s0\v'.2m'
-.if !c\[Om] .char \[Om] \v'-.2m'\s'\En(.s*6u/10u'\o'_o'\s0\v'.2m'
-.if !c\[Fo] .char \[Fo] <<
-.if !c\[Fc] .char \[Fc] >>
-.if !c\[bb] .char \[bb] |
-.if !c\[Ye] .char \[Ye] \o'-Y'
-.if !c\[Cs] .char \[Cs] \o'\[mu]o'
-.de dvi-achar
-.\" Note that character definitions are always interpreted with
-.\" compatibility mode off.
-.if !c\\$1 \{\
-.char \\$1 \\$3\
-\k[acc]\
-\h'(u;-\w'\\$2'-\w'\\$3'/2+\\\\n[skw]+(\w'x'*0)-\\\\n[skw])'\
-\v'(u;\w'x'*0+\\\\n[rst]+(\w'\\$3'*0)-\\\\n[rst])'\
-\\$2\
-\v'(u;\w'x'*0-\\\\n[rst]+(\w'\\$3'*0)+\\\\n[rst])'\
-\h'|\\\\n[acc]u'
-.\}
-.hcode \\$1\\$4
-..
-.dvi-achar \(`A \` A a
-.dvi-achar \('A \' A a
-.dvi-achar \(^A ^ A a
-.dvi-achar \(~A ~ A a
-.dvi-achar \(:A \(ad A a
-.dvi-achar \(oA \(ao A a
-.dvi-achar \(`E \` E e
-.dvi-achar \('E \' E e
-.dvi-achar \(^E ^ E e
-.dvi-achar \(:E \(ad E e
-.dvi-achar \(`I \` I i
-.dvi-achar \('I \' I i
-.dvi-achar \(^I ^ I i
-.dvi-achar \(:I \(ad I i
-.dvi-achar \(~N ~ N n
-.dvi-achar \(`O \` O o
-.dvi-achar \('O \' O o
-.dvi-achar \(^O ^ O o
-.dvi-achar \(~O ~ O o
-.dvi-achar \(:O \(ad O o
-.dvi-achar \(`U \` U u
-.dvi-achar \('U \' U u
-.dvi-achar \(^U ^ U u
-.dvi-achar \(:U \(ad U u
-.dvi-achar \('Y \' Y y
-.dvi-achar \(`a \` a a
-.dvi-achar \('a \' a a
-.dvi-achar \(^a ^ a a
-.dvi-achar \(~a ~ a a
-.dvi-achar \(:a \(ad a a
-.dvi-achar \(oa \(ao a a
-.dvi-achar \(`e \` e e
-.dvi-achar \('e \' e e
-.dvi-achar \(^e ^ e e
-.dvi-achar \(:e \(ad e e
-.dvi-achar \(`i \` \(.i i
-.dvi-achar \('i \' \(.i i
-.dvi-achar \(^i ^ \(.i i
-.dvi-achar \(:i \(ad \(.i i
-.dvi-achar \(~n ~ n n
-.dvi-achar \(`o \` o o
-.dvi-achar \('o \' o o
-.dvi-achar \(^o ^ o o
-.dvi-achar \(~o ~ o o
-.dvi-achar \(:o \(ad o o
-.dvi-achar \(`u \` u u
-.dvi-achar \('u \' u u
-.dvi-achar \(^u ^ u u
-.dvi-achar \(:u \(ad u u
-.dvi-achar \('y \' y y
-.dvi-achar \(:y \(ad y y
-.if !c\(,C .char \(,C \o'\(acC'
-.hcode \(,Cc
-.if !c\(,c .char \(,c \o'\(acc'
-.hcode \(,cc
-.cp \n(_C
-.do mso latin1.tmac
diff --git a/contrib/groff/tmac/e.tmac b/contrib/groff/tmac/e.tmac
deleted file mode 100644
index 8ea4074c89d1..000000000000
--- a/contrib/groff/tmac/e.tmac
+++ /dev/null
@@ -1,1663 +0,0 @@
-.\" @(#)e.tmac 2.31 (Berkeley) 5/21/88
-.\" Modified by James Clark for use with groff.
-.\"
-.\" Copyright (c) 1988 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms are permitted
-.\" provided that this notice is preserved and that due credit is given
-.\" to the University of California at Berkeley. The name of the University
-.\" may not be used to endorse or promote products derived from this
-.\" software without specific prior written permission. This software
-.\" is provided ``as is'' without express or implied warranty.
-.\" %beginstrip%
-.\"
-.\"**********************************************************************
-.\"* *
-.\"* ****** - M E N R O F F / T R O F F M A C R O S ****** *
-.\"* *
-.\"* Produced for your edification and enjoyment by: *
-.\"* Eric Allman *
-.\"* Electronics Research Laboratory *
-.\"* U.C. Berkeley. *
-.\"* current address: *
-.\"* Britton-Lee, Inc. *
-.\"* 1919 Addison Street Suite 105 *
-.\"* Berkeley, California 94704 *
-.\"* *
-.\"* VERSION 2.31 First Release: 11 Sept 1978 *
-.\"* *
-.\"* Documentation is available. *
-.\"* *
-.\"**********************************************************************
-.\"
-.\" Code on .de commands:
-.\" *** a user interface macro.
-.\" &&& a user interface macro which is redefined
-.\" when used to be the real thing.
-.\" $$$ a macro which may be redefined by the user
-.\" to provide variant functions.
-.\" --- an internal macro.
-.\"
-.if !\n(.g .ig
-.de @R \" --- initialize number register to 0, if undefined
-.if !r\\$1 .nr \\$1 0
-..
-.@R pf
-.if \n(pf .nx
-.if !\n(.g .ig
-.de @S \" --- initialize string/macro to empty, if undefined
-.if !d\\$1 .ds \\$1 \" empty
-..
-.@R @\" \" debugging level
-.\" *** INTERNAL GP MACROS ***
-.de @C \" --- change ev's, taking info with us
-.nr _S \\n(.s
-.nr _V \\n(.v
-.nr _F \\n(.f
-.do ds _A \\n[.fam]
-.nr _I \\n(.i
-.ev \\$1
-.ps \\n(_S
-.vs \\n(_Vu
-.ft \\n(_F
-.do @fam \\*(_A
-'in \\n(_Iu
-.xl \\n($lu
-.lt \\n($lu
-.rr _S
-.rr _V
-.rr _F
-.rr _I
-.ls 1
-'ce 0
-..
-.de @D \" --- determine display type (Indent, Left, Center)
-.ds |p "\\$3
-.nr _d 0
-.if "\\$2"C" \
-. nr _d 1
-.if "\\$2"L" \
-. nr _d 2
-.if "\\$2"I" \
-. nr _d 3
-.if "\\$2"M" \
-. nr _d 4
-.if !\\n(_d \{\
-. nr _d \\$1
-. ds |p "\\$2
-.\}
-..
-.de @z \" --- end macro
-.if \n@>1 .tm >> @z, .z=\\n(.z ?a=\\n(?a
-.if !"\\n(.z"" \
-\{\
-. tm Line \\n(c. -- Unclosed block, footnote, or other diversion (\\n(.z)
-. di
-. ex
-.\}
-.if \\n(?a \
-. bp \" force out final table
-.ds bp
-.ds @b\" \" don't start another page
-.br
-.if \n@>1 .tm << @z
-..
-.\" *** STANDARD HEADERS AND FOOTERS ***
-.ie \n(.g .ds $* \\\\$*
-.el .ds $* \\\\$1 \\\\$2 \\\\$3 \\\\$4 \\\\$5 \\\\$6 \\\\$7 \\\\$8 \\\\$9
-.de he \" *** define header
-.ie !\\n(.$ \
-\{\
-. rm |4
-. rm |5
-.\}
-.el \
-\{\
-. ds |4 "\*($*
-. ds |5 "\*($*
-.\}
-..
-.de eh \" *** define even header
-.ie !\\n(.$ \
-. rm |4
-.el \
-. ds |4 "\*($*
-..
-.de oh \" *** define odd header
-.ie !\\n(.$ \
-. rm |5
-.el \
-. ds |5 "\*($*
-..
-.de fo \" *** define footer
-.ie !\\n(.$ \
-\{\
-. rm |6
-. rm |7
-.\}
-.el \
-\{\
-. ds |6 "\*($*
-. ds |7 "\*($*
-.\}
-..
-.de ef \" *** define even foot
-.ie !\\n(.$ \
-. rm |6
-.el \
-. ds |6 "\*($*
-..
-.de of \" *** define odd footer
-.ie !\\n(.$ \
-. rm |7
-.el \
-. ds |7 "\*($*
-..
-.de ep \" *** end page (must always be followed by a .bp)
-.if \\n(nl>0 \
-\{\
-. wh 0
-. rs
-. @b
-.\}
-..
-.\" *** INTERNAL HEADER AND FOOTER MACROS ***
-.de @h \" --- header
-.if \n@>1 .tm >> @h %=\\n% ?a=\\n(?a ?b=\\n(?b ?w=\\n(?w
-.if (\\n(.i+\\n(.o)>=\\n(.l \
-. tm Line \\n(c. -- Offset + indent exceeds line length
-.\" initialize a pile of junk
-.nr ?h \\n(?H \" transfer "next page" to "this page"
-.nr ?H 0
-.nr ?c \\n(?C
-.nr ?C 0
-.rn |4 |0
-.rn |5 |1
-.rn |6 |2
-.rn |7 |3
-.nr _w 0 \" reset max footnote width
-.nr ?W 0 \" no wide floats this page (yet)
-.nr ?I 1
-.\" begin actual header stuff
-.ev 2
-.rs
-.if \\n(hm>0 \
-. sp |\\n(hmu \" move to header position
-.@t $h \" output header title
-.if \\n(tm<=0 \
-. nr tm \n(.Vu
-.sp |\\n(tmu \" move to top of text
-.ev
-.mk _k \" for columned output
-.if \\n(?n .nm 1 \" restore line numbering if n1 mode
-.nr $c 1 \" set first column
-.if \n@>4 .tm -- @h >> .ns nl=\\n(nl %=\\n% _k=\\n(_k tm=\\n(tm
-.ie \\n(?s \
-\{\
-. nr ?s 0
-. rs
-' @b
-.\}
-.el \
-. @n \" begin the column
-.if \n@>2 .tm << @h
-..
-.de @n \" --- new column or page
-.if \n@>3 .tm >> @n nl=\\n(nl %=\\n% ?f=\\n(?f ?o=\\n(?o
-.if \\n(bm<=0 \
-. nr bm \\n(.Vu
-.if (\\n(_w<=\\n($l)&(\\n(?W=0) \
-\{\
-. nr _b (\\n(ppp*\\n($vu)/200u \" compute fudge factor (must be < 1P)
-. if \\n(_bu>((\\n(bmu-\\n(fmu-((\\n(tpp*\\n($vu)/100u))/2u) \
-. nr _b (\\n(ppp*\\n($vu)/100u-\n(.Vu
-. nr _b +\\n(bmu
-.\}
-.nr _B \\n(_bu
-.ch @f
-.wh -\\n(_bu @f
-.nr _b +(\\n(ppp*\\n($vu)/100u \" add 1 paragraph v in case of sweep past
-.if \n@>2 .tm @n .p=\\n(.p bm=\\n(bm _b=\\n(_b _B=\\n(_B
-.nr ?f 0 \" reset footnote flag
-.if \\n(?o \
-\{\
-. (f _ \" reprocess footnotes which run off page
-. nf
-. |o
-. fi
-. )f
-. rm |o
-.\}
-.nr ?o 0
-.if \\n(?T \
-\{\
-. nr _i \\n(.i
-. in 0
-. |h \" output the table header
-. in \\n(_iu
-. rr _i
-. mk #T \" for tbl commands
-. ns
-.\}
-.if (\\n(?a)&((\\n($c<2):(\\n(?w=0)) \
-\{\
-. nr ?a 0 \" output floating keep
-. @k |t
-. if \\n(?w \
-. mk _k \" don't overstrike wide keeps
-. nr ?w 0
-.\}
-.os
-.$H \" special column header macro
-.ns
-..
-.de @f \" --- footer
-.if \n@>1 .tm >> @f %=\\n% nl=\\n(nl ?a=\\n(?a ?b=\\n(?b ?f=\\n(?f
-.if \n@>2 .nr VL \\n(.pu-\\n(nlu
-.if \n@>2 .tm @f bm=\\n(bm _B=\\n(_B _b=\\n(_b .p-nl=\\n(VL
-.ec
-.if \\n(?T \
-\{\
-. nr T. 1 \" for tbl commands (to output bottom line)
-. T# 1 \" output the sides and bottom lines
-. br
-.\}
-.ev 2
-.ce 0
-.if \\n(?b \
-\{\
-. nr ?b 0
-. @k |b\" \" output bottom of page tables
-.\}
-.if \\n(?f \
-. @o \" output footnote if present
-.ie \\n($c<\\n($m \
-. @c \" handle new column
-.el \
-. @e \" new page
-.ev
-.if \n@>2 .tm << @f
-..
-.de @o \" --- output footnote
-.nf
-.ls 1
-.in 0
-.if \n@>2 .tm @o last printed text = \\n(nl placing @r trap at -\\n(_B
-.wh -\\n(_Bu @r
-.|f
-.fi
-.if \n@>2 .tm @o triggered @r (?o) = \\n(?o
-.if \\n(?o \
-\{\
-. di \" just in case triggered @r
-. if \\n(dn=0 \
-\{\
-. rm |o
-. nr ?o 0
-. \}
-. nr dn \\n(_D
-. rr _D
-.\}
-.rm |f
-.ch @r
-..
-.de @c \" --- new column
-.if \n@>2 .tm >> @c %=\\n%
-.rs
-.sp |\\n(_ku
-.@O +\\n($lu+\\n($su
-.nr $c +1
-.@n
-..
-.de @e \" --- end page
-.if \n@>2 .tm >> @e
-.@O \\n(_ou
-.rs
-.sp |\\n(.pu-\\n(fmu-((\\n(tpp*\\n($vu)/100u) \" move to footer position
-.@t $f \" output footer title
-.nr ?h 0
-.bp
-..
-.de @t \" --- output header or footer title
-.if !\\n(?h \
-\{\
-. sz \\n(tp \" set header/footer type fonts, etc.
-. @F \\n(tf
-. lt \\n(_Lu \" make title span entire page
-. nf
-. \\$1
-. br
-.\}
-..
-.de $h \" $$$ print header
-.ds |z
-.if !\\n(?c \
-\{\
-. if e .ds |z "\\*(|0
-. if o .ds |z "\\*(|1
-.\}
-.if !\(ts\\*(|z\(ts\(ts \
-' tl \\*(|z
-.rm |z
-..
-.de $f \" $$$ print footer
-.ds |z
-.if \\n(?c \
-\{\
-. if e .ds |z "\\*(|0
-. if o .ds |z "\\*(|1
-.\}
-.if \(ts\\*(|z\(ts\(ts \
-\{\
-. if e .ds |z "\\*(|2
-. if o .ds |z "\\*(|3
-.\}
-.if !\(ts\\*(|z\(ts\(ts \
-' tl \\*(|z
-.rm |z
-..
-.de @r \" --- reprocess overflow footnotes
-.if \n@>3 .tm >> @r .z=\\n(.z ?f=\\n(?f ?a=\\n(?a ?b=\\n(?b _b=\\n(_b
-.di |o \" save overflow footnote
-.nr ?o 1
-.nr _D \\n(dn
-.ns
-..
-.\" *** COMMANDS WITH VARIANT DEFINITIONS ***
-.rn bp @b \" --- begin page
-.de bp \" *** begin new page (overrides columns)
-.nr $c \\n($m \" force new page, not new column
-.ie \\n(nl>0 \
-. @b \\$1
-.el \
-\{\
-. if \\n(.$>0 \
-. pn \\$1
-. if \\n(?I \
-. @h \" 'spring' the header trap
-.\}
-.br
-.wh 0 @h \" reset header
-..
-.rn ll xl \" *** special line length (local)
-.de ll \" *** line length (global to environments)
-.xl \\$1
-.lt \\$1
-.nr $l \\n(.l
-.if (\\n($m<=1):(\\n($l>\\n(_L) \
-. nr _L \\n(.l
-..
-.rn po @O \" --- local page offset
-.de po \" *** page offset
-.@O \\$1
-.nr _o \\n(.o
-..
-.\" Redefine the fam request to set the family in
-.\" environment 2 as well as the current environment.
-.if !\n(.g .ig
-.do rn fam @fam \" --- set family in current environment
-.do de fam \" *** set font family in ev 2 and current ev
-.do @fam \\$1
-.ev 2
-.do @fam \\$1
-.ev
-..
-.\" *** MISCELLANEOUS ROFF COMMANDS ***
-.de hx \" *** suppress headers and footers next page
-.nr ?H 1
-..
-.de ix \" *** indent, no break
-'in \\$1
-..
-.de bl \" *** contiguous blank lines
-.br
-.ne \\$1
-.rs
-.sp \\$1
-..
-.de n1 \" *** line numbering 1
-.nm 1
-.xl -\w'0000'u
-.nr ?n 1
-..
-.de n2 \" *** line numbering 2
-.nm \\$1
-.ie \\n(.$ \
-. xl -\w'0000'u
-.el \
-. xl \\n($lu
-..
-.de pa \" *** new page
-.bp \\$1
-..
-.de ro \" *** roman page numbers
-.af % i
-..
-.de ar \" *** arabic page numbers
-.af % 1
-..
-.de m1 \" *** position one space
-.nr _0 \\n(hmu
-.nr hm \\$1v
-.nr tm +\\n(hmu-\\n(_0u
-.rr _0
-..
-.de m2 \" *** position two space
-.nr tm \\n(hmu+\\n(tpp+\\$1v
-..
-.de m3 \" *** position three space
-.nr bm \\n(fmu+\\n(tpp+\\$1v
-..
-.de m4 \" *** position four space
-.nr _0 \\n(fmu
-.nr fm \\$1v
-.nr bm +\\n(fmu-\\n(_0u
-..
-.de sk \" *** leave a blank page (next page)
-.if \\n(.$>0 \
-. tm Line \\n(c. -- I cannot skip multiple pages
-.nr ?s 1
-..
-.\" *** MISCELLANEOUS USER SUPPORT COMMANDS ***
-.if !\n(.g .ig
-.de re \" *** reset tabs (TROFF defines 15 stops default)
-.ta T 0.5i
-..
-.if \n(.g .ig
-.de re
-.ta 0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i +0.5i
-..
-.de ba \" *** set base indent
-.ie \\n(.$ \
-. nr $i \\$1n
-.el \
-. nr $i \\n(siu*\\n($0u
-..
-.de hl \" *** draw horizontal line
-.br
-.ie \n(.g .do nr _I \\n[.in]
-.el .nr _I \\n(.i
-\l'\\n(.lu-\\n(_Iu'
-.sp
-..
-.\" *** PARAGRAPHING ***
-.de pp \" *** paragraph
-.lp \\n(piu
-..
-.de lp \" *** left aligned paragraph
-.@p
-.if \\n(.$ \
-. ti +\\$1
-.nr $p 0 1
-..
-.de ip \" *** indented paragraph w/ optional tag
-.if (\\n(ii>0)&(\\n(ii<1n) \
-. nr ii \\n(iin
-.nr _0 \\n(ii
-.if \\n(.$>1 \
-. nr _0 \\$2n
-.@p \\n(_0u
-.nr _I \\n(.iu
-.in 0
-.di |i
-\&\\$1
-.br
-.di
-.in \\n(_Iu
-.ds |j \\*(|i\\
-.if \\w"\\*(|j" \
-\{\
-. ti -\\n(_0u
-. ie \\w"\\*(|j">=\\n(_0 \
-\{\
-\\*(|j
-. br
-. \}
-. el \\*(|j\h'|\\n(_0u'\c
-.\}
-.rr _0
-.rm |i |j
-..
-.de np \" *** numbered paragraph
-.\" use string comparison in case user has changed format of $p
-.if '\\n($p'-1' \
-. nr $p 0 \" reset number after .bu
-.nr $p +1 \" increment paragraph number
-.@p \w'\0(000)\0'u
-.ti -\w'\0(000)\0'u
-\0(\\n($p)\h'|\w'\0(000)\0'u'\c
-..
-.de bu \" *** bulleted paragraph
-.br
-.\" use string comparison in case user has changed format of $p
-.if '\\n($p'-1' \
-. ns \" don't space between .bu paragraphs
-.nr $p 0-1 \" mark "bulleted paragraph" mode
-.@p \w'\0\(bu\0'u
-.ti -\w'\0\(bu\0'u
-\0\(bu\0\c
-..
-.de @p \" --- initialize for paragraph
-.if "\\n(.z"|e" .tm Line \\n(c. -- Unmatched continued equation
-.in \\n($iu+\\n(pou
-.if \\n(.$ \
-. in +\\$1n
-.ce 0
-.fi
-.@F \\n(pf
-.sz \\n(pp
-.sp \\n(psu
-.ne \\n(.Lv+\\n(.Vu
-.ns
-..
-.\" *** SECTION HEADINGS ***
-.de sh \" *** section heading
-.fi
-.if (\\n(si>0)&(\\n(si<1n) \
-. nr si \\n(sin
-.ce 0
-.@d "\\$1" +1 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
-.if !"\\$2"_" \
-\{\
-. ds |n \&\\$2
-. $p "\\*(|n" "\\*($n" \\n($0
-. $0 "\\*(|n" "\\*($n" \\n($0
-. rm |n
-.\}
-.nr $p 0 1 \" reset .np count
-..
-.de @d \" --- change section depth
-.if !""\\$1" \
-. nr $0 \\$1
-.if \\n($0&(\\n(.$>1) \
-. nr $\\n($0 \\$2
-.ds $n \&\"
-.ie \\n($0>=1 \
-\{\
-. if '\\n($1'0' \
-. nr $1 1
-. if (\\n(.$>=3) .if !"\\$3"-" \
-. nr $1 \\$3
-. as $n \\n($1
-.\}
-.el \
-. nr $1 0
-.ie \\n($0>=2 \
-\{\
-. if '\\n($2'0' \
-. nr $2 1
-. if (\\n(.$>=4) .if !"\\$4"-" \
-. nr $2 \\$4
-. as $n .\\n($2
-.\}
-.el \
-. nr $2 0
-.ie \\n($0>=3 \
-\{\
-. if '\\n($3'0' \
-. nr $3 1
-. if (\\n(.$>=5) .if !"\\$5"-" \
-. nr $3 \\$5
-. as $n .\\n($3
-.\}
-.el \
-. nr $3 0
-.ie \\n($0>=4 \
-\{\
-. if '\\n($4'0' \
-. nr $4 1
-. if (\\n(.$>=6) .if !"\\$6"-" \
-. nr $4 \\$6
-. as $n .\\n($4
-.\}
-.el \
-. nr $4 0
-.ie \\n($0>=5 \
-\{\
-. if '\\n($5'0' \
-. nr $5 1
-. if (\\n(.$>=7) .if !"\\$7"-" \
-. nr $5 \\$7
-. as $n .\\n($5
-.\}
-.el \
-. nr $5 0
-.ie \\n($0>=6 \
-\{\
-. if '\\n($6'0' \
-. nr $6 1
-. if (\\n(.$>=8) .if !"\\$8"-" \
-. nr $6 \\$8
-. as $n .\\n($6
-.\}
-.el \
-. nr $6 0
-..
-.de sx \" *** heading up, no increment (2.1.1 -> 2.1)
-.ce 0
-.ul 0
-.nr _0 \\n($0-1
-.if \\n(.$ .nr _0 +1
-.if \\n(.$ .nr _0 \\$1
-.@d \\n(_0
-.rr _0
-.$p "" "" \\n($0
-.nr $p 0 1 \" reset .np count
-..
-.de uh \" *** unnumbered section heading
-.$p "\\$1"
-.$0 "\\$1"
-..
-.de $p \" $$$ print section heading
-.if (\\n(si>0)&(\\n(.$>2) \
-. nr $i \\$3*\\n(si
-.in \\n($iu
-.ie !"\\$1\\$2"" \
-\{\
-. sp \\n(ssu \" one of them is non-null
-. ne \\n(.Lv+\\n(.Vu+\\n(psu+((\\n(spp*\\n($vu*\\n(.Lu)/100u)
-. \" exdent if \\$3 > 0
-. ie 0\\$3 \
-. ti -(\\n(siu-\\n(sou)
-. el \
-. ti +\\n(sou
-. @F \\n(sf
-. sz \\n(sp
-. if 0\\$3 \
-. $\\$3
-. if \w"\\$2">0 \\$2.
-. if \w"\\$1">0 \\$1\f1\ \ \&
-.\}
-.el \
-. sp \\n(psu
-.@F \\n(pf
-.sz \\n(pp
-..
-.\" *** COLUMNNED OUTPUT ***
-.de 2c \" *** double columned output
-.br
-.if \\n($m>1 \
-. 1c \" revert to 1c if already 2c
-.nr $c 1
-.nr $m 2
-.if \\n(.$>1 \
-. nr $m \\$2
-.if \\n(.$>0 \
-. nr $s \\$1n \" param 1: column seperation
-.nr $l (\\n(.l-((\\n($m-1)*\\n($s))/\\n($m
-.xl \\n($lu
-.mk _k
-.ns
-..
-.de 1c \" *** single columned output
-.br
-.nr $c 1
-.nr $m 1
-.ll \\n(_Lu \" return to normal output
-.sp |\\n(.hu
-.@O \\n(_ou
-..
-.de bc \" *** begin column
-.sp 24i
-..
-.\" *** FLOATING TABLES AND NONFLOATING BLOCKS ***
-.de (z \" *** begin floating keep
-.if \n@>4 .tm >> (z, .z=\n(.z
-.@D 4 \\$1 \\$2
-.@(
-..
-.de )z \" *** end floating keep
-.if \n@>4 .tm >> )z, .z=\n(.z
-.sp \\n(zsu
-.@)
-.if \n@>4 .tm -- )z << @), .z=\n(.z
-.rr _0
-.if !\\n(?b \
-. nr dn +(\\n(ppp*\\n($vu)/200u+\\n(zsu
-.nr dl -\n(.H \" fudge factor necessary to make it work
-.ie ((\\n(dn+\n(.V)>=\\n(.t):(\\n(?a):((\\n(dl>\\n($l)&(\\n($c>1)) \
-\{\
-. nr ?a 1
-. if (\\n(dl>\\n($l)&(\\n($m>1) \
-. nr ?w 1 \" mark wider than one column (top)
-. ds |x |t
-.\}
-.el \
-\{\
-. nr ?b 1
-. if (\\n(dl>\\n($l)&(\\n($m>1) \
-. nr ?W 1 \" mark wider than one column (bottom)
-. nr _b +\\n(dnu
-. \" avoid moving @f back past the current position
-. if \\n(.p-\\n(nl-\n(.V<\\n(_b \
-. nr _b \\n(.p-\\n(nl-\n(.V
-. ch @f -\\n(_bu
-. ds |x |b
-.\}
-.da \\*(|x \" copy to save macro
-.nf
-.ls 1
-.nr ?k 1
-.if \n@>4 .tm -- )z >> \\*(|x
-\!.if \\\\n(nl>(\\\\n(tm+2v) .ne \\n(dnu-\\n(zsu
-.|k\" \" and the body
-.ec
-.if \n@>4 .tm -- )z << \\*(|x, .z=\\n(.z
-.nr ?k 0
-.rm |k\" \" remove the temp macro
-.da
-.in 0
-.ls 1
-.xl \\n($lu
-.ev
-.if \n@>4 .tm << )z, .z=\\n(.z
-..
-.de @k \" --- output floating keep
-.if \n@>4 .tm >> @k, $1=\\$1, .z=\\n(.z
-.ev 1
-.nf
-.ls 1
-.in 0
-.sp \\n(zsu
-.\\$1
-.ec
-.br
-.rm \\$1
-.ev
-..
-.de (t \" XXX temp ref to (z
-.(z \\$1 \\$2
-..
-.de )t \" XXX temp ref to )t
-.)z \\$1 \\$2
-..
-.de (b \" *** begin block
-.br
-.@D 3 \\$1 \\$2
-.sp \\n(bsu
-.@(
-..
-.de )b \" *** end block
-.br
-.@)
-.if (\\n(bt=0):(\\n(.t<\\n(bt) \
-. ne \\n(dnu \" make it all on one page
-.ls 1
-.nf
-.|k
-.ec
-.fi
-.in 0
-.xl \\n($lu
-.ev
-.rm |k
-.sp \\n(bsu+\\n(.Lv-1v
-..
-.de @( \" --- begin keep
-.if !"\\n(.z"" .tm Line \\n(c. -- Illegal nested keep \\n(.z
-.@M
-.di |k
-\!'rs
-..
-.de @M \" --- set modes for display
-.nr ?k 1
-.@C 1
-.@F \\n(df
-.if \\n($R .@V
-.vs \\n(.sp*\\n($Vu/100u
-.nf
-.if "\\*(|p"F" \
-. fi \" set fill mode if "F" parameter
-.if \\n(_d=4 \
-. in 0
-.if \\n(_d=3 \
-\{\
-. in +\\n(biu
-. xl -\\n(biu
-.\}
-.if \\n(_d=1 \
-. ce 10000
-..
-.de @) \" --- end keep
-.br
-.if !"\\n(.z"|k" .tm Line \\n(c. -- Close of a keep which has never been opened
-.nr ?k 0
-.di
-.in 0
-.ce 0
-..
-.de (c \" *** begin block centered text
-.if "\\n(.z"|c" .tm Line \\n(c. -- Nested .(c requests
-.di |c
-..
-.de )c \" *** end block centered text
-.if !"\\n(.z"|c" .tm Line \\n(c. -- Unmatched .)c
-.br \" force out final line
-.di
-.if \n@>4 .tm >> .)c .l=\\n(.l .i=\\n(.i $i=\\n($i dl=\\n(dl
-.ev 1
-.ls 1
-.in (\\n(.lu-\\n(.iu-\\n(dlu)/2u
-.if \n@>4 .tm -- .)c << .in .l=\\n(.l .i=\\n(.i dl=\\n(dl
-.nf
-.|c
-.ec
-.in
-.ls
-.ev
-.rm |c
-..
-.\" *** BLOCK QUOTES (OR WHATEVER) AND LISTS ***
-.de (q \" *** begin block quote
-.br
-.@C 1
-.fi
-.sp \\n(qsu
-.in +\\n(qiu
-.xl -\\n(qiu
-.sz \\n(qp
-..
-.de )q \" *** end block quote
-.br
-.ev
-.sp \\n(qsu+\\n(.Lv-1v
-.nr ?k 0
-..
-.de (l \" *** begin list
-.br
-.sp \\n(bsu
-.@D 3 \\$1 \\$2
-.@M
-..
-.de )l \" *** end list
-.br
-.ev
-.sp \\n(bsu+\\n(.Lv-1v
-.nr ?k 0
-..
-.\" *** PREPROCESSOR SUPPORT ***
-.\"
-.\" EQN
-.\"
-.de EQ \" *** equation start
-.ec
-.if !\\n(?e \
-\{\
-. if "\\n(.z"|e" .tm Line \\n(c. -- Nested .EQ request
-. @D 1 "\\$1" "\\$2"
-. @C 2
-. di |e
-.\}
-.ls 1
-.in 0
-.nf
-..
-.de EN \" *** equation end
-.br
-.ie "\\$1"C" \
-\{\
-. nr ?e 1
-. sp \\n(esu
-.\}
-.el \
-\{\
-. nr ?e 0
-. di
-. if \\n(dn \
-. @q \" actual equation output
-. rm |e
-. ev
-.\}
-..
-.de @q \" --- equation output
-.nr _Q \\n(dnu
-.ev
-.sp \\n(esu \" output rest of preceeding text
-.if !"\\n(.z"" \!.ne \\n(_Qu
-.ne \\n(_Qu+\n(.Vu \" keep it on one page
-.@C 2 \" .ev 2 may be jumbled from header
-.if \\n(_d=1 \
-. in (\\n(.lu+\\n($iu-\\n(dlu)/2u
-.if \\n(_d=2 \
-. in \\n($iu
-.if \\n(_d=3 \
-. in \\n(biu+\\n($iu
-.if \\n(_d=4 \
-. in 0
-.mk _q
-.if \n@>1 .tm --@e: _Q=\\n(_Q _q=\\n(_q nl=\\n(nl |p=\\*(|p
-.if !"\\*(|p"" \
-\{\
-. rs
-. sp (\\n(_Qu-\\n(.vu)/2u
-. tl """\\*(|p"
-. rt \\n(_qu
-.\}
-.|e
-.sp |\\n(_qu+\\n(_Qu
-.sp \\n(esu+\\n(.Lv-1v
-.rr _q
-.rr _Q
-..
-.\"
-.\" TBL
-.\"
-.de TS \" *** table start
-.sp \\n(bsu
-.@C 1
-.fi \" drop into fill mode for text boxes
-.if "\\$1"H" \
-\{\
-. di |h \" save header part
-. nr ?T 1
-.\}
-.ls 1
-.ch @f -(\\n(_bu+1v) \" set pseudo-trap for bottom line
-.if \\n(.p-\\n(_b-1v<=\\n(nl \
-. ch @f \\n(nlu+\n(.Vu
-..
-.de TH \" *** end header part of table
-.nr T. 0
-.T# 0
-.di
-.nr _T \\n(?T
-.nr ?T 0
-.ne \\n(dnu+1v
-.nr ?T \\n(_T
-.nr _i \\n(.i
-.in 0
-.|h \" put in the initial header
-.in \\n(_iu
-.rr _i
-.mk #T
-..
-.de TE \" *** table end
-.nr ?T 0
-.ch @f -\\n(_bu \" reset pseudo-trap
-.if \\n(.p-\\n(_b<=\\n(nl \
-. ch @f \\n(nlu+\n(.Vu
-.ev
-.sp \\n(bsu+\\n(.Lv-1v
-.re
-..
-.de T&
-..
-.\"
-.\" REFER
-.\"
-.de ][ \" *** refer output
-.if \\$1>5 .tm Bad arg to []
-.[\\$1
-..
-.de [0 \" --- other
-.(f
-.ip "\\*([F.\0"
-.if !"\\*([A"" \\*([A,
-.if !"\\*([T"" \\f2\\*([T\\f1\c
-.if !"\\*([T"" .if !"\\*([O"" ,\ \"
-.ie !"\\*([O"" \\*([O
-.el .if !"\\*([T"" \&.
-.if !"\\*([D"" \\*([D.
-.@p
-.)f
-..
-.de [1 \" --- journal article
-.(f
-.ip "\\*([F.\0"
-\\*([A,
-.if !"\\*([T"" \\*(lq\\*([T,\\*(rq
-.if "\\*([V"" \\f2\\*([J\\f1,
-.if !"\\*([V"" \\f2\\*([J\\f1
-.if !"\\*([V"" \\f3\\*([V\\f1\c
-.if !"\\*([N"" (\\*([N)\c
-.if !"\\*([P"" \
-\{\
-. ie \\n([P>0 \ pp.\&
-. el \ p.\&
-\\*([P
-.\}
-.if !"\\*([I"" .if "\\*([R"" \\*([I,
-(\\*([D).
-.if !"\\*([O"" \\*([O
-.)f
-..
-.de [2 \" --- book
-.(f
-.ip "\\*([F.\0"
-\\*([A, \\f2\\*([T,\\f1
-\\*([I\c
-.if !"\\*([C"" , \\*([C\c
- (\\*([D).
-.if !"\\*([G"" Gov't. ordering no. \\*([G
-.if !"\\*([O"" \\*([O
-.)f
-..
-.de [3 \" --- article in book
-.(f
-.ip "\\*([F.\0"
-\\*([A, \\*(lq\\*([T,\\*(rq
-.if !"\\*([P"" pp. \\*([P
-in \\f2\\*([B\\f1, \c
-.if !"\\*([E"" ed. \\*([E, \c
-.if !"\\*([I"" \\*([I\c
-.if !"\\*([C"" , \\*([C\c
- (\\*([D).
-.if !"\\*([O"" \\*([O
-.)f
-..
-.de [4 \" --- report
-.(f
-.ip "\\*([F.\0"
-\\*([A, \\*(lq\\*([T,\\*(rq
-\\*([R\c
-.if !"\\*([G"" \& (\\*([G)\c
-.if !"\\*([I"" , \\*([I\c
-.if !"\\*([C"" , \\*([C\c
- (\\*([D).
-.if !"\\*([O"" \\*([O
-.)f
-..
-.de [5 \" --- tm style
-.(f
-.ip "\\*([F.\0"
-\\*([A, \\f2\\*([T\\f1,
-.ie \\n(TN \\*([M.
-.el Bell Laboratories internal memorandum (\\*([D).
-.)f
-..
-.de ]<
-.$p References
-.lp
-.rm (f )f
-..
-.de ]>
-.sp
-..
-.de ]-
-.rm [V [P [A [T [N [C [B [O [R [I [E [D
-..
-.ie \n(.V<1v \
-\{\
-. ds [. \s-2\v'-.4m'\f1
-. ds .] \v'.4m'\s+2\fP
-.\}
-.el \
-\{\
-. ds [. " [
-. ds .] ]
-.\}
-.\"
-.\" IDEAL
-.\"
-.de IS \" *** start ideal picture
-.nr g7 \\n(.u
-.ls 1
-..
-.de IF
-.if \\n(g7 .fi
-.ls
-..
-.de IE \" *** end ideal picture
-.if \\n(g7 .fi
-.ls
-..
-.\"
-.\" PIC
-.\"
-.de PS \" *** start picture: $1=height, $2=width in units or inches
-.sp 0.3
-.nr g7 \\$2
-.in (u;\\n(.l-\\n(g7>?0/2)
-.ne \\$1u
-.nr g7 \\n(.u
-.ls 1
-..
-.de PE \" *** end picture
-.ls
-.in
-.if \\n(g7 .fi
-.sp .6
-..
-.\"
-.\" GREMLIN
-.\"
-.de GS \" *** start gremlin picture
-.nr g7 (\\n(.lu-\\n(g1u)/2u
-.if "\\$1"L" .nr g7 \\n(.iu
-.if "\\$1"R" .nr g7 \\n(.lu-\\n(g1u
-.in \\n(g7u
-.nr g7 \\n(.u
-.ls 1
-.nf
-.ne \\n(g2u
-..
-.de GE \" *** end gremlin picture
-.GF
-.sp .6
-..
-.de GF \" *** finish gremlin picture; stay at top
-.ls
-.in
-.if \\n(g7 .fi
-..
-.\" *** FONT AIDS ***
-.de sz \" *** set point size and vertical spacing
-.ps \\$1
-.if \\n($r .@v
-.vs \\n(.sp*\\n($vu/100u \" default vs at pointsize + 20%
-..
-.de @v \" --- possibly set $v from $r
-.if (1i>=240u)&(1p<=\\n($r)&(\\n($r<=4p) .nr $v \\n($r00/1p
-..
-.de @V \" --- possibly set $V from $R
-.if (1i>=240u)&(1p<=\\n($R)&(\\n($R<=4p) .nr $V \\n($R00/1p
-..
-.de @E \" --- store in _F argument to \f for restoring font
-.ie \\n(.f<10 \
-. ds _F \\n(.f
-.el \
-\{\
-. ie \\n(.f<100&\n(.g \
-. ds _F (\\n(.f
-. el \
-. ds _F P
-.\}
-..
-.de r \" *** enter roman font
-.@E
-.ft 1
-.if \\n(.$ \&\\$1\f\\*(_F\\$2
-..
-.de i \" *** enter italic
-.@E
-.ft 2
-.if \\n(.$ \&\\$1\f\\*(_F\\$2
-..
-.de b \" *** enter boldface
-.@E
-.ft 3
-.if \\n(.$ \&\\$1\f\\*(_F\\$2
-..
-.de rb \" *** enter real boldface
-.@E
-.ft 3
-.if \\n(.$ \&\\$1\f\\*(_F\\$2
-..
-.de bi \" *** enter bold italic
-.@E
-.ft 4
-.if \\n(.$ \&\\$1\f\\*(_F\\$2
-..
-.de u \" *** enter underlined word
-\&\\$1\l'|0\(ul'\\$2
-..
-.\" a better version of u
-.if !\n(.g .ig
-.de u
-\Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m'\\$2
-..
-.de q \" *** enter quoted word
-\&\\*(lq\\$1\\*(rq\\$2
-..
-.de bx \" *** enter boxed word
-\k~\(br\|\\$1\|\(br\l'|\\n~u\(rn'\l'|\\n~u\(ul'\^\\$2
-..
-.de sm \" *** print in smaller font
-\s-1\\$1\\s0\\$2
-..
-.de @F \" --- change font (0 -> no change)
-.nr ~ \\$1
-.if \\n~>0 \
-. ft \\n~
-.rr ~
-..
-.\" *** FOOTNOTING ***
-.de (f \" *** begin footnote
-.ec
-.if "\\n(.z"|f" .tm Line \\n(c. -- Illegal footnote nesting
-.ie "\\n(.z"" \
-\{\
-. nr _D \\n(dn
-. nr _0 1v+\\n(nlu
-. ev 2
-. da |f
-. in 0
-. xl \\n($lu-\\n(fuu
-. @F \\n(ff
-. sz \\n(fp
-. vs \\n(.sp*\\n($Vu/100u
-. if !\\n(?f \
-\{\
-. nr _b +1v \" allow space for $s
-. $s
-. \}
-. br
-. if \\n(.p-\\n(_b-\\n(_0-\\n(.h-1v-\\n(fs<0 \
-\{\
-. da\" \" won't fit on page at all
-. bc
-. if !\\n(?f \
-. rm |f
-. da |f
-.\" next five lines could be dropped if headers had their own environment
-. in 0 \" reset everything from .bc
-. xl \\n($lu-\\n(fuu
-. @F \\n(ff
-. sz \\n(fp
-. vs \\n(.sp*\\n($Vu/100u
-. if !\\n(?f \
-. $s
-. br
-. \}
-. rr _0
-. sp \\n(fsu
-. nr ?f 1
-. fi
-. if !"\\$1"_" \
-. ti \\n(fiu
-. if \n@>2 .tm << (f $f=\\n($f
-.\}
-.el \
-\{\
-. ev 2
-. in 0
-. xl \\n($lu-\\n(fuu
-. @F \\n(ff
-. sz \\n(fp
-. vs \\n(.sp*\\n($Vu/100u
-. fi
-\!.(f \\$1
-\!.@N
-.\}
-..
-.de @N \" --- set no fill mode in the top-level diversion
-.ie "\\n(.z"" .nf
-.el \!.@N
-..
-.de )f \" *** end footnote
-.ie "\\n(.z"|f" \
-\{\
-. if \\n* \
-. nr $f +1
-. ds * \\*{\\n($f\\*}\k*
-. nr * 0
-. in 0
-. da
-. ev
-. if \\n(_w<\\n(dl \
-. nr _w \\n(dl \" compute maximum fn width
-. nr _b +\\n(dn
-. ch @f -\\n(_bu
-. if \\n(.p-\\n(_b<=\\n(nl \
-. ch @f \\n(nlu+\n(.Vu
-. nr dn \\n(_D
-. rr _D
-.\}
-.el \
-\{\
-. br
-\!.)f
-. ev
-.\}
-..
-.@R ff
-.if \n(ff<=0 \
-. nr ff 1 \" footnote font: Times Roman
-.@R fp
-.if \n(fp<=0 \
-. nr fp 8 \" footnote pointsize
-.de $s \" $$$ footnote separator
-\l'2i'
-..
-.\" *** DELAYED TEXT ***
-.de (d \" *** begin delayed text
-.am |d )d
-.sp \\n(bsu
-..
-.de )d \" *** end delayed text
-.if \\n# \
-. nr $d +1
-.ds # [\\n($d]\k#
-.rr #
-..
-.de pd \" *** print delayed text
-.|d
-.rm |d
-.nr $d 1 1
-.ds # [1]\k#
-..
-.\" *** INDEXES (TABLE OF CONTENTS) ***
-.nr _x 0 1
-.af _x a
-.de (x \" *** begin index entry
-.if \n@>4 .tm >> (x, .z=\\n(.z
-.ds |X x
-.if \\n(.$>0 \
-. ds |X \\$1
-.ie "\\n(.z"" \
-. nr _z 0
-.el \
-. nr _z 1
-.@\\n(_z
-..
-.de @0 \" --- finish (x if no current diversion
-.am %\\*(|X )x
-.sp \\n(xsu
-.ti -\\n(piu
-..
-.de @1 \" --- finish (x if current diversion
-.if "\\n(_x"z" .nr _x 0
-.de =\\n+(_x )x
-..
-.de )x \" *** end index entry
-.if \n@>4 .tm >> )x, .z=\\n(.z
-.ie "\\n(.z"" \
-\{\
-. ds |x \\n%
-. if \\n(.$>0 \
-. ds |x \\$1
-. if "\\*(|x"_" \
-. ig ..
-. am %\\*(|X ..
-. if \w"\\$2">(\\n(.l-\\n(.i-\\n(.k) \
-. ti +\\n(xuu
-\\\\a\\\\t\\$2\\*(|x
-...
-. rm |x
-. rm |X
-.\}
-.el \
-\{\
-\!.(x \\*(|X
-\!\\\\*(=\\n(_x\\\\
-\!.)x \\$1 \\$2
-\!.rm =\\n(_x
-.\}
-..
-.de xp \" *** print the index
-.br
-.@C 2
-.ls 1
-.vs \\n(.sp*\\n($Vu/100u
-.fi
-.in +\\n(piu
-.ds |X x
-.if \\n(.$>0 \
-. ds |X \\$1
-.xl -(\\n(xuu+\w'...'u)
-.di |x
-.%\\*(|X
-.br
-.di
-.rm %\\*(|X
-.xl \\n($lu
-.rm |X
-.ev
-.nf
-.in 0
-.ta \\n(.lu-\\n(xuuR \\n(.luR
-.|x
-.fi
-.in
-.rm |x
-..
-.de +c \" *** begin chapter
-.ep \" force out footnotes
-.if \\n(?o:\\n(?a \
-\{\
-. bp \" force out a table or more footnote
-. rs
-. ep
-.\}
-.nr ?C 1
-.nr $f 1 1
-.ds * \\*{1\\*}\k*
-.if \\n(?R \
-. pn 1
-.bp
-.in \\n($iu \" reset the indent
-.rs
-.ie \\n(.$ \
-. $c "\\$1"
-.el \
-. sp 3
-..
-.de ++ \" *** declare chapter type
-.nr _0 0
-.if "\\$1"C" \
-. nr _0 1 \" chapter
-.if "\\$1"RC" \
-. nr _0 11 \" renumbered chapter
-.if "\\$1"A" \
-. nr _0 2 \" appendix
-.if "\\$1"RA" \
-. nr _0 12 \" renumbered appendix
-.if "\\$1"P" \
-. nr _0 3 \" preliminary material
-.if "\\$1"B" \
-. nr _0 4 \" bibliographic material
-.if "\\$1"AB" \
-. nr _0 5 \" abstract
-.if \\n(_0=0 \
-. tm Line \\n(c. -- Bad mode to .++
-.nr ?R 0
-.if \\n(_0>10 \
-.\{
-. nr ?R 1
-. nr _0 -10
-.\}
-.nr ch 0 1
-.if (\\n(_0=3):(\\n(_0=5) \
-. pn 1 \" must do before .ep
-.if !\\n(_0=\\n(_M .if \\n(_M=3 \
-. pn 1 \" must do before .ep
-.ep \" end page for correct page number types
-.if \\n(_0=1 \
-\{\
-. af ch 1
-. af % 1
-.\}
-.if \\n(_0=2 \
-\{\
-. af ch A
-. af % 1
-.\}
-.if \\n(_0=3 \
-. af % i
-.if \\n(_0=4 \
-. af % 1
-.if \\n(_0=5 \
-. af % 1
-.if \\n(.$>1 \
-. he \\$2
-.nr _M \\n(_0
-.rr _0
-..
-.de $c \" $$$ print chapter title
-.sz 12
-.ft 3
-.ce 1000
-.if \\n(_M<3 \
-. nr ch +1
-.ie \\n(_M=1 CHAPTER\ \ \\n(ch
-.el .if \\n(_M=2 APPENDIX\ \ \\n(ch
-.if \w"\\$1" .sp 3-\\n(.L
-.if \w"\\$1" \\$1
-.if (\\n(_M<3):(\w"\\$1") \
-. sp 4-\\n(.L
-.ce 0
-.ft
-.sz
-.ie \\n(_M=1 \
-. $C Chapter \\n(ch "\\$1"
-.el .if \\n(_M=2 \
-. $C Appendix \\n(ch "\\$1"
-..
-.de tp \" *** title page
-.hx
-.bp
-.br
-.rs
-.pn \\n%
-..
-.\" *** DATES ***
-.if \n(mo=1 .ds mo January
-.if \n(mo=2 .ds mo February
-.if \n(mo=3 .ds mo March
-.if \n(mo=4 .ds mo April
-.if \n(mo=5 .ds mo May
-.if \n(mo=6 .ds mo June
-.if \n(mo=7 .ds mo July
-.if \n(mo=8 .ds mo August
-.if \n(mo=9 .ds mo September
-.if \n(mo=10 .ds mo October
-.if \n(mo=11 .ds mo November
-.if \n(mo=12 .ds mo December
-.if \n(dw=1 .ds dw Sunday
-.if \n(dw=2 .ds dw Monday
-.if \n(dw=3 .ds dw Tuesday
-.if \n(dw=4 .ds dw Wednesday
-.if \n(dw=5 .ds dw Thursday
-.if \n(dw=6 .ds dw Friday
-.if \n(dw=7 .ds dw Saturday
-.nr y2 \n(yr%100
-.af y2 00
-.nr y4 \n(yr+1900
-.ds td \*(mo \n(dy, \n(y4
-.\" *** PARAMETRIC INITIALIZATIONS ***
-.rr x
-.nr $v \n(.v00+\n(.sp-1/\n(.sp \" vs as percentage of ps for .sz request
-.nr $V \n($v \" same for displays & footnotes
-.nr hm 4v \" header margin
-.nr tm 7v \" top margin
-.nr bm 6v \" bottom margin
-.nr fm 3v \" footer margin
-.nr tf 3 \" title font: (real) Times Bold
-.nr tp 10 \" title point size
-.hy 14
-.nr bi 4m \" indent for blocks
-.nr pi 5n \" indent for paragraphs
-.nr pf 1 \" normal text font
-.nr pp 10 \" normal text point size
-.nr qi 4n \" indent for quotes
-.nr qp -1 \" down one point
-.nr ii 5n \" indent for .ip's and .np's
-.nr $m 1 \" max number of columns
-.nr $s 4n \" column separation
-.nr sf 3 \" section font -- Times Bold
-.nr sp 10 \" section title pointsize
-.nr ss 12p \" section prespacing
-.nr si 0 \" section indent
-.\" *** OTHER INITIALIZATION ***
-.\" GNU pic sets this register to 1, to indicate that \x should not be used.
-.@R 0x
-.ds { \v'-0.4m'\x'\\n(0x=0*-0.2m'\s-3
-.ds } \s0\v'0.4m'
-.\" for compatibility with traditional -me
-.\" (the first will work only in compatibility mode)
-.ds [ \*{
-.ds ] \*}
-.ds < \v'0.4m'\x'\\n(0x=0*0.2m'\s-3
-.ds > \s0\v'-0.4m'
-.ds - \(em
-.\" Avoid warnings from groff -ww.
-.@S |0
-.@S |1
-.@S |2
-.@S |3
-.@S $H
-.@S $0
-.@S $1
-.@S $2
-.@S $3
-.@S $4
-.@S $5
-.@S $6
-.@S $7
-.@S $8
-.@S $9
-.@S ..
-.@R po\" \" simulated page offset
-.@R $0\" \" section depth
-.@R $i\" \" paragraph base indent
-.@R $p\" \" numbered paragraph number
-.@R $r\" \" ratio of vs to ps (may override $v)
-.@R $R\" \" same for displays (may override $V)
-.@R df\" \" display font: same as surrounding text
-.@R so\" \" additional section title offset
-.@R fu\" \" footnote undent
-.@R bt\" \" block keep threshold
-.@R *\" \" has \** been referenced?
-.@R ?a\" \" pending floating keep at page top?
-.@R ?b\" \" pending floating keep at page bottom?
-.@R ?C\" \" at chapter header?
-.@R ?e\" \" in equation?
-.@R ?H\" \" suppress headers and footers next page?
-.@R ?I\" \" has the header trap been sprung?
-.@R ?n\" \" n1 mode?
-.@R ?o\" \" footnote overflow?
-.@R ?R\" \" renumbered chapter?
-.@R ?s\" \" skip next page?
-.@R ?T\" \" inside .TS H?
-.@R ?W\" \" wide floating keep at page bottom?
-.@R ?w\" \" wide floating keep at page top?
-.nr fi 0.3i
-.nr _o \n(.o
-.nr $b 3 \" bold
-.nr ps 0.35v
-.if \n(ps<\n(.V .nr ps \n(.V
-.nr bs \n(ps \" block pre/post spacing
-.nr qs \n(ps \" quote pre/post spacing
-.nr zs 1v \" float-block pre/postspacing
-.nr xs 0.2v \" index prespacing
-.nr xu 0.5i \" index undent
-.nr fs 0.2v \" footnote prespacing
-.nr es 0.5v \" equation pre/postspacing
-.if \n(es<\n(.V .nr es \n(.V
-.wh 0 @h \" set header
-.nr $l \n(.lu \" line length
-.nr _L \n(.lu \" line length of page
-.nr $c 1 \" current column number
-.nr $f 1 1 \" footnote number
-.ds * \*{1\*}\k*\" \" footnote "name"
-.nr $d 1 1 \" delayed text number
-.ds # [1]\k#\" \" delayed text "name"
-.nr _M 1 \" chapter mode is chapter
-.ds lq \(lq\" \" left quote
-.ds rq \(rq\" \" right quote
-.em @z
-.\" *** FOREIGN LETTERS AND SPECIAL CHARACTERS ***
-.ds #h ((1u-(\\\\n(.fu%2u))*0.13m)
-.ds #v 0.6m
-.\" \" accents
-.ds ' \k_\h'-(\\n(.wu*8/10-\*(#h)'\(aa\h'|\\n_u'
-.ds ` \k_\h'-(\\n(.wu*7/10-\*(#h)'\(ga\h'|\\n_u'
-.\" \" umlaut
-.ds : \k_\h'-(\\n(.wu*8/10-\*(#h+0.1m)'\v'-\*(#v'\z.\h'0.2m'.\h'|\\n_u'\v'\*(#v'
-.\" \" circumflex and tilde
-.ds ^ \k_\h'-(\\n(.wu-\*(#h-0.05m)'^\h'|\\n_u'
-.ds ~ \k_\h'-(\\n(.wu-\*(#h-0.05m)'~\h'|\\n_u'
-.\" \" cedilla and czech
-.ds , \k_\h'-(\\n(.wu)',\h'|\\n_u'
-.ds v \k_\h'-(\\n(.wu*9/10-\*(#h)'\v'-\*(#v'\s-4v\s0\v'\*(#v'\h'|\\n_u'
-.\" \" Norwegian A or angstrom
-.ds o \k_\h'-(\\n(.wu+\w'\(de'u-\*(#h)/2u'\v'-0.4n'\z\(de\v'0.4n'\h'|\\n_u'
-.\" \" there exists, for all
-.ds qe \s-2\v'0.45m'\z\(em\v'-0.625m'\z\(em\v'-0.625m'\(em\v'0.8m'\s0\h'-0.1m'\v'-0.05m'\(br\v'0.05m'\h'0.1m'
-.ds qa \z\e\h'0.35m'\z\(sl\h'-0.33m'\v'-0.3m'\s-4\(em\s0\v'0.3m'\h'0.15m'
-.rm #h #v
-.ll 6.0i
-.lt 6.0i
-.de @U
-.tm The \\$1 macro has been removed from this version of the -me macros.
-..
-.de lo
-.@U lo
-..
-.de th
-.@U th
-..
-.de ac
-.@U ac
-..
diff --git a/contrib/groff/tmac/groff_mwww.man b/contrib/groff/tmac/groff_mwww.man
deleted file mode 100644
index bec719c30d10..000000000000
--- a/contrib/groff/tmac/groff_mwww.man
+++ /dev/null
@@ -1,275 +0,0 @@
-.TH GROFF_MWWW @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
-.\" Copyright (C) 2000 Free Software Foundation, Inc.
-.\" Written by Gaius Mulley (gaius@glam.ac.uk)
-.\"
-.\" This file is part of groff.
-.\"
-.\" groff is free software; you can redistribute it and/or modify it under
-.\" the terms of the GNU General Public License as published by the Free
-.\" Software Foundation; either version 2, or (at your option) any later
-.\" version.
-.\"
-.\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
-.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
-.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-.\" for more details.
-.\"
-.\" You should have received a copy of the GNU General Public License along
-.\" with groff; see the file COPYING. If not, write to the Free Software
-.\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-.\"
-.\" user level guide to using the -mwww macroset
-.\"
-.do mso www.tmac
-.\" we need the .LINKS here as we use it in the middle as an example
-.\" once the user requests .LINKS then the automatic generation of links
-.\" at the top of the document is suppresed.
-.LINKS
-.SH NAME
-groff_mwww \- groff macros for authoring web pages
-.LINE
-.SH SYNOPSIS
-.B "groff \-mwww"
-[ options ]
-file ...
-.SH DESCRIPTION
-This manual page describes the GNU \-mwww macros, which is part of the
-groff document formatting system.
-The manual page is very a basic guide, and the html device driver
-.RB ( grohtml )
-has been completely rewritten but still remains as in an alpha state.
-It has been included into the distribution so that a lot of people have a
-chance to test it.
-Note that this macro file will be automatically called (via the
-\fCtroffrc\fP file) if you use \fC-Thtml\fP.
-.PP
-To see the hyperlinks in action, please format this man page with the
-.B grohtml
-device.
-.PP
-Here is a summary of the functions found in this macro set.
-.SH SYNPOSIS
-.ta 2iL
-\&.HTMLINDEX determine automatic link cut off
-.br
- point for sections/headers
-.br
-\&.BODYCOLOR specify colours on a web page
-.br
-\&.BACKGROUND specify background image
-.br
-\&.URL create a url using two parameters
-.br
-\&.MAILTO create a html email address
-.br
-\&.FTP create an ftp reference
-.br
-\&.IMAGE include an image file
-.br
-\&.HTML pass an html raw request to the
-.br
- device driver
-.br
-\&.TAG generate an html name tag from $1
-.br
-.\"\&.CDFTP optionally create two different links
-.\".br
-.\" depending on hostname
-.\".br
-\&.LINE create a full width horizontal rule
-.br
-.PP
-Output of the
-.IR pic ,
-.IR eqn ,
-.IR refer ,
-and
-.I tbl
-preprocessors is acceptable as input.
-.SH REQUESTS
-.TP
-.B HTMLINDEX
-determines the cut off point for automatic link generation to headings.
-By default all headings found in a troff document have links created to them
-at the top of the html web page.
-It maybe that many of the lower heading levels do not require links.
-Alternatively some web pages may not need any heading links at all, in which
-case:
-.sp
-.nf
-\fC\&.HTMLINDEX 0\fP
-.fi
-.sp
-will tell
-.B grohtml
-not to generate links.
-An \fCHTMLINDEX\fP of 2 will mean that a heading
-.sp
-.B "1.1.1 Some Title"
-.sp
-will not be included in the links either as it is said to have a heading
-level of three.
-Another method for switching automatic headings is via the command line
-switch \fC-P-l\fP.
-.TP
-.B BODYCOLOR
-takes five parameters: foreground, background, active hypertext link,
-hypertext link not yet visited, and visited hypertext link colour.
-.TP
-.B BACKGROUND
-the only parameter to this macro is the background image file.
-.TP
-.B URL
-generates
-.TAG URL
-a URL using either two or three arguments.
-$1 is the name of the link, $2 is the actual URL, and $3 is optional stuff
-to be printed immediately after $2.
-Here is how to encode
-.URL "homepage for groff" http://groff.ffii.org/ :
-.sp
-.nf
-\s-2\fC\&.URL "homepage for groff" http://groff.ffii.org/ :\fP\s+2
-.fi
-.sp
-If this is processed by a device other than \fC-Thtml\fP
-it appears as:
-homepage for groff \(lahttp://groff.ffii.org\(ra.
-The URL macro can be of any type; for example we can reference
-.URL "Eric Raymond's pic guide" pic.html
-by:
-.sp
-.nf
-\s-2\fC\&.URL "Eric Raymond's pic guide" pic.html\fP\s+2
-.fi
-.sp
-.TP
-.B MAILTO
-generates an email html reference.
-The first argument is mandatory as the email address.
-The optional second argument is the text you see in your browser, and
-an optional third argument is stuff printed immediately after the
-second argument.
-For example, the groff maintainers are
-.MAILTO wl@gnu.org "Werner Lemberg"
-and
-.MAILTO Ted.Harding@nessie.mcc.ac.uk "Ted Harding" .
-This is achieved by the following macros:
-.sp
-.nf
-\s-2\fC\&.MAILTO wl@gnu.org "Werner Lemberg"
-\&.MAILTO Ted.Harding@nessie.mcc.ac.uk "Ted Harding" .\s+2\fP
-.fi
-.sp
-Note that all the urls actually are treated as consuming no textual space
-in groff.
-This could be considered as a bug since it causes some problems.
-To circumvent this, \fCwww.tmac\fP inserts a zero-width character which
-expands to a harmless space (only if run with -Thtml).
-.TP
-.B FTP
-indicates that data can be obtained via ftp.
-The first argument is the browser text and the second is the url.
-A third argument, similar to the macros above, is intended for stuff printed
-immediately after the second argument.
-The second and the third parameter are optional.
-As an example, here the location of the
-.FTP "current groff development distribution" \
-ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz .
-The macro example above was specified by:
-.sp
-.nf
-\s-2\fC\&.FTP "current groff development distribution" \\
-ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz .\fP\s+2
-.fi
-.sp
-.TP
-.B IMAGE
-allows the document to include pictures.
-The first argument is the image file.
-The next two arguments are optional:
-Argument two is the width in pixels (default is 400 pixels if absent).
-The third argument is the height in pixels (default is the width value if
-absent).
-.sp
-.TP
-.B HTML
-all text after this macro is treated as raw html.
-If the document is processed \fIwithout\fP \fC-Thtml\fP then
-the macro is ignored.
-This macro is a building block for other higher level macros.
-.sp
-For example, the \fCBACKGROUND\fP macro is defined as:
-.nf
-\fC\&.de BACKGROUND
-\&. HTML <body background=\\$1>
-\&..
-\fP
-.fi
-.TP
-.B TAG
-generates an html name tag from its argument.
-This can then be referenced using the
-.URL URL #URL
-macro.
-As you can see, you must precede the tag name with `\fC#\fP' since it is
-a local reference.
-This link was achieved via placing a TAG in the URL description above;
-the source looks like this:
-.sp
-.nf
-\s-2\fC\&.TP
-\&.B URL
-generates
-\&.TAG URL
-a URL using either two or three
-arguments.
-$1 is the name of the link, $2 is the actual URL.\fP\s+2
-.fi
-.sp
-.TP
-.B LINE
-generates a full width horizontal rule.
-Example:
-.sp
-.nf
-\fC\s-2\&.LINE\fP\s+2
-.fi
-.sp
-.TP
-.B LINKS
-.TAG LINK
-requests that grohtml place the automatically generated links at this position.
-For example:
-.LINKS
-.SH
-SECTION HEADING LINKS
-.LP
-By default
-.B grohtml
-generates links to all section headings and places these at the top of the
-html document. (See
-.URL LINKS #LINK
-for details of how to switch this off or alter the position.
-.SH
-LIMITATIONS OF GROHTML
-.LP
-Tbl information is currently rendered as a png image.
-.SH FILES
-@MACRODIR@/mwww.tmac (a wrapper for www.tmac)
-.br
-@MACRODIR@/www.tmac
-.SH "SEE ALSO"
-.BR groff (@MAN1EXT@),
-.BR @g@troff (@MAN1EXT@)
-.BR grohtml (@MAN1EXT@),
-.LP
-.SH AUTHOR
-.B Grohtml
-was written by
-.MAILTO gaius@glam.ac.uk "Gaius Mulley"
-.SH BUGS
-Report bugs to the
-.MAILTO bug-groff@gnu.org "Groff Bug Mailing List" .
-Include a complete, self-contained example that will allow the bug to be
-reproduced, and say which version of groff you are using.
diff --git a/contrib/groff/tmac/html.tmac b/contrib/groff/tmac/html.tmac
deleted file mode 100644
index c5591c8de5ad..000000000000
--- a/contrib/groff/tmac/html.tmac
+++ /dev/null
@@ -1,47 +0,0 @@
-.\" html.tmac
-.\"
-.nr _C \n(.C
-.cp 0
-.ftr CW CR
-.ftr C CR
-.ftr CO CI
-.ftr CX CBI
-.ftr H HR
-.ftr HO HI
-.ftr HX HBI
-.ftr NX NBI
-.if !c\(em .char \(em --
-.if !c\(en .char \(en \-
-.if !c\(fi .char \(fi fi
-.if !c\(fl .char \(fl fl
-.if !c\(ff .char \(ff ff
-.if !c\(Fi .char \(Fi ffi
-.if !c\(Fl .char \(Fl ffl
-.if !c\(lq .char \(lq ``
-.if !c\(rq .char \(rq ''
-.if !c\(Bq .char \(bq ,,
-.if !c\(OE .char \(OE OE
-.if !c\(oe .char \(oe oe
-.if !c\(lh .char \(lh <-
-.if !c\(rh .char \(rh ->
-.if !c\(bq .tr \(bq,
-.if !c\(aq .tr \(aq'
-.if !\n(_C .mso pspic.tmac
-.cp \n(_C
-.\" now turn off all headers and footers for ms, me and mm macro sets
-.if d EF .EF ''''
-.if d EH .EH ''''
-.if d OF .OF ''''
-.if d OH .OH ''''
-.if d ef .ef ''''
-.if d of .of ''''
-.if d oh .oh ''''
-.if d eh .eh ''''
-.tl ''''
-.\" it doesn't make sense to use hyphenation with html, so we turn it off.
-.hy 0
-.nr HY 0
-.\" avoid line breaks after hyphen-like characters.
-.cflags 0 -\(hy\(em\(en\[shc]
-.pl 99999
-.\" eof of file, make sure this is the last time
diff --git a/contrib/groff/tmac/hyphen.us b/contrib/groff/tmac/hyphen.us
deleted file mode 100644
index d86c3d58a7c2..000000000000
--- a/contrib/groff/tmac/hyphen.us
+++ /dev/null
@@ -1,4449 +0,0 @@
-% Hyphenation patterns for US English.
-% These are the standard Plain TeX hyphenation patterns (in hyphen.tex).
-.ach4
-.ad4der
-.af1t
-.al3t
-.am5at
-.an5c
-.ang4
-.ani5m
-.ant4
-.an3te
-.anti5s
-.ar5s
-.ar4tie
-.ar4ty
-.as3c
-.as1p
-.as1s
-.aster5
-.atom5
-.au1d
-.av4i
-.awn4
-.ba4g
-.ba5na
-.bas4e
-.ber4
-.be5ra
-.be3sm
-.be5sto
-.bri2
-.but4ti
-.cam4pe
-.can5c
-.capa5b
-.car5ol
-.ca4t
-.ce4la
-.ch4
-.chill5i
-.ci2
-.cit5r
-.co3e
-.co4r
-.cor5ner
-.de4moi
-.de3o
-.de3ra
-.de3ri
-.des4c
-.dictio5
-.do4t
-.du4c
-.dumb5
-.earth5
-.eas3i
-.eb4
-.eer4
-.eg2
-.el5d
-.el3em
-.enam3
-.en3g
-.en3s
-.eq5ui5t
-.er4ri
-.es3
-.eu3
-.eye5
-.fes3
-.for5mer
-.ga2
-.ge2
-.gen3t4
-.ge5og
-.gi5a
-.gi4b
-.go4r
-.hand5i
-.han5k
-.he2
-.hero5i
-.hes3
-.het3
-.hi3b
-.hi3er
-.hon5ey
-.hon3o
-.hov5
-.id4l
-.idol3
-.im3m
-.im5pin
-.in1
-.in3ci
-.ine2
-.in2k
-.in3s
-.ir5r
-.is4i
-.ju3r
-.la4cy
-.la4m
-.lat5er
-.lath5
-.le2
-.leg5e
-.len4
-.lep5
-.lev1
-.li4g
-.lig5a
-.li2n
-.li3o
-.li4t
-.mag5a5
-.mal5o
-.man5a
-.mar5ti
-.me2
-.mer3c
-.me5ter
-.mis1
-.mist5i
-.mon3e
-.mo3ro
-.mu5ta
-.muta5b
-.ni4c
-.od2
-.odd5
-.of5te
-.or5ato
-.or3c
-.or1d
-.or3t
-.os3
-.os4tl
-.oth3
-.out3
-.ped5al
-.pe5te
-.pe5tit
-.pi4e
-.pio5n
-.pi2t
-.pre3m
-.ra4c
-.ran4t
-.ratio5na
-.ree2
-.re5mit
-.res2
-.re5stat
-.ri4g
-.rit5u
-.ro4q
-.ros5t
-.row5d
-.ru4d
-.sci3e
-.self5
-.sell5
-.se2n
-.se5rie
-.sh2
-.si2
-.sing4
-.st4
-.sta5bl
-.sy2
-.ta4
-.te4
-.ten5an
-.th2
-.ti2
-.til4
-.tim5o5
-.ting4
-.tin5k
-.ton4a
-.to4p
-.top5i
-.tou5s
-.trib5ut
-.un1a
-.un3ce
-.under5
-.un1e
-.un5k
-.un5o
-.un3u
-.up3
-.ure3
-.us5a
-.ven4de
-.ve5ra
-.wil5i
-.ye4
-4ab.
-a5bal
-a5ban
-abe2
-ab5erd
-abi5a
-ab5it5ab
-ab5lat
-ab5o5liz
-4abr
-ab5rog
-ab3ul
-a4car
-ac5ard
-ac5aro
-a5ceou
-ac1er
-a5chet
-4a2ci
-a3cie
-ac1in
-a3cio
-ac5rob
-act5if
-ac3ul
-ac4um
-a2d
-ad4din
-ad5er.
-2adi
-a3dia
-ad3ica
-adi4er
-a3dio
-a3dit
-a5diu
-ad4le
-ad3ow
-ad5ran
-ad4su
-4adu
-a3duc
-ad5um
-ae4r
-aeri4e
-a2f
-aff4
-a4gab
-aga4n
-ag5ell
-age4o
-4ageu
-ag1i
-4ag4l
-ag1n
-a2go
-3agog
-ag3oni
-a5guer
-ag5ul
-a4gy
-a3ha
-a3he
-ah4l
-a3ho
-ai2
-a5ia
-a3ic.
-ai5ly
-a4i4n
-ain5in
-ain5o
-ait5en
-a1j
-ak1en
-al5ab
-al3ad
-a4lar
-4aldi
-2ale
-al3end
-a4lenti
-a5le5o
-al1i
-al4ia.
-ali4e
-al5lev
-4allic
-4alm
-a5log.
-a4ly.
-4alys
-5a5lyst
-5alyt
-3alyz
-4ama
-am5ab
-am3ag
-ama5ra
-am5asc
-a4matis
-a4m5ato
-am5era
-am3ic
-am5if
-am5ily
-am1in
-ami4no
-a2mo
-a5mon
-amor5i
-amp5en
-a2n
-an3age
-3analy
-a3nar
-an3arc
-anar4i
-a3nati
-4and
-ande4s
-an3dis
-an1dl
-an4dow
-a5nee
-a3nen
-an5est.
-a3neu
-2ang
-ang5ie
-an1gl
-a4n1ic
-a3nies
-an3i3f
-an4ime
-a5nimi
-a5nine
-an3io
-a3nip
-an3ish
-an3it
-a3niu
-an4kli
-5anniz
-ano4
-an5ot
-anoth5
-an2sa
-an4sco
-an4sn
-an2sp
-ans3po
-an4st
-an4sur
-antal4
-an4tie
-4anto
-an2tr
-an4tw
-an3ua
-an3ul
-a5nur
-4ao
-apar4
-ap5at
-ap5ero
-a3pher
-4aphi
-a4pilla
-ap5illar
-ap3in
-ap3ita
-a3pitu
-a2pl
-apoc5
-ap5ola
-apor5i
-apos3t
-aps5es
-a3pu
-aque5
-2a2r
-ar3act
-a5rade
-ar5adis
-ar3al
-a5ramete
-aran4g
-ara3p
-ar4at
-a5ratio
-ar5ativ
-a5rau
-ar5av4
-araw4
-arbal4
-ar4chan
-ar5dine
-ar4dr
-ar5eas
-a3ree
-ar3ent
-a5ress
-ar4fi
-ar4fl
-ar1i
-ar5ial
-ar3ian
-a3riet
-ar4im
-ar5inat
-ar3io
-ar2iz
-ar2mi
-ar5o5d
-a5roni
-a3roo
-ar2p
-ar3q
-arre4
-ar4sa
-ar2sh
-4as.
-as4ab
-as3ant
-ashi4
-a5sia.
-a3sib
-a3sic
-5a5si4t
-ask3i
-as4l
-a4soc
-as5ph
-as4sh
-as3ten
-as1tr
-asur5a
-a2ta
-at3abl
-at5ac
-at3alo
-at5ap
-ate5c
-at5ech
-at3ego
-at3en.
-at3era
-ater5n
-a5terna
-at3est
-at5ev
-4ath
-ath5em
-a5then
-at4ho
-ath5om
-4ati.
-a5tia
-at5i5b
-at1ic
-at3if
-ation5ar
-at3itu
-a4tog
-a2tom
-at5omiz
-a4top
-a4tos
-a1tr
-at5rop
-at4sk
-at4tag
-at5te
-at4th
-a2tu
-at5ua
-at5ue
-at3ul
-at3ura
-a2ty
-au4b
-augh3
-au3gu
-au4l2
-aun5d
-au3r
-au5sib
-aut5en
-au1th
-a2va
-av3ag
-a5van
-ave4no
-av3era
-av5ern
-av5ery
-av1i
-avi4er
-av3ig
-av5oc
-a1vor
-3away
-aw3i
-aw4ly
-aws4
-ax4ic
-ax4id
-ay5al
-aye4
-ays4
-azi4er
-azz5i
-5ba.
-bad5ger
-ba4ge
-bal1a
-ban5dag
-ban4e
-ban3i
-barbi5
-bari4a
-bas4si
-1bat
-ba4z
-2b1b
-b2be
-b3ber
-bbi4na
-4b1d
-4be.
-beak4
-beat3
-4be2d
-be3da
-be3de
-be3di
-be3gi
-be5gu
-1bel
-be1li
-be3lo
-4be5m
-be5nig
-be5nu
-4bes4
-be3sp
-be5str
-3bet
-bet5iz
-be5tr
-be3tw
-be3w
-be5yo
-2bf
-4b3h
-bi2b
-bi4d
-3bie
-bi5en
-bi4er
-2b3if
-1bil
-bi3liz
-bina5r4
-bin4d
-bi5net
-bi3ogr
-bi5ou
-bi2t
-3bi3tio
-bi3tr
-3bit5ua
-b5itz
-b1j
-bk4
-b2l2
-blath5
-b4le.
-blen4
-5blesp
-b3lis
-b4lo
-blun4t
-4b1m
-4b3n
-bne5g
-3bod
-bod3i
-bo4e
-bol3ic
-bom4bi
-bon4a
-bon5at
-3boo
-5bor.
-4b1ora
-bor5d
-5bore
-5bori
-5bos4
-b5ota
-both5
-bo4to
-bound3
-4bp
-4brit
-broth3
-2b5s2
-bsor4
-2bt
-bt4l
-b4to
-b3tr
-buf4fer
-bu4ga
-bu3li
-bumi4
-bu4n
-bunt4i
-bu3re
-bus5ie
-buss4e
-5bust
-4buta
-3butio
-b5uto
-b1v
-4b5w
-5by.
-bys4
-1ca
-cab3in
-ca1bl
-cach4
-ca5den
-4cag4
-2c5ah
-ca3lat
-cal4la
-call5in
-4calo
-can5d
-can4e
-can4ic
-can5is
-can3iz
-can4ty
-cany4
-ca5per
-car5om
-cast5er
-cas5tig
-4casy
-ca4th
-4cativ
-cav5al
-c3c
-ccha5
-cci4a
-ccompa5
-ccon4
-ccou3t
-2ce.
-4ced.
-4ceden
-3cei
-5cel.
-3cell
-1cen
-3cenc
-2cen4e
-4ceni
-3cent
-3cep
-ce5ram
-4cesa
-3cessi
-ces5si5b
-ces5t
-cet4
-c5e4ta
-cew4
-2ch
-4ch.
-4ch3ab
-5chanic
-ch5a5nis
-che2
-cheap3
-4ched
-che5lo
-3chemi
-ch5ene
-ch3er.
-ch3ers
-4ch1in
-5chine.
-ch5iness
-5chini
-5chio
-3chit
-chi2z
-3cho2
-ch4ti
-1ci
-3cia
-ci2a5b
-cia5r
-ci5c
-4cier
-5cific.
-4cii
-ci4la
-3cili
-2cim
-2cin
-c4ina
-3cinat
-cin3em
-c1ing
-c5ing.
-5cino
-cion4
-4cipe
-ci3ph
-4cipic
-4cista
-4cisti
-2c1it
-cit3iz
-5ciz
-ck1
-ck3i
-1c4l4
-4clar
-c5laratio
-5clare
-cle4m
-4clic
-clim4
-cly4
-c5n
-1co
-co5ag
-coe2
-2cog
-co4gr
-coi4
-co3inc
-col5i
-5colo
-col3or
-com5er
-con4a
-c4one
-con3g
-con5t
-co3pa
-cop3ic
-co4pl
-4corb
-coro3n
-cos4e
-cov1
-cove4
-cow5a
-coz5e
-co5zi
-c1q
-cras5t
-5crat.
-5cratic
-cre3at
-5cred
-4c3reta
-cre4v
-cri2
-cri5f
-c4rin
-cris4
-5criti
-cro4pl
-crop5o
-cros4e
-cru4d
-4c3s2
-2c1t
-cta4b
-ct5ang
-c5tant
-c2te
-c3ter
-c4ticu
-ctim3i
-ctu4r
-c4tw
-cud5
-c4uf
-c4ui
-cu5ity
-5culi
-cul4tis
-3cultu
-cu2ma
-c3ume
-cu4mi
-3cun
-cu3pi
-cu5py
-cur5a4b
-cu5ria
-1cus
-cuss4i
-3c4ut
-cu4tie
-4c5utiv
-4cutr
-1cy
-cze4
-1d2a
-5da.
-2d3a4b
-dach4
-4daf
-2dag
-da2m2
-dan3g
-dard5
-dark5
-4dary
-3dat
-4dativ
-4dato
-5dav4
-dav5e
-5day
-d1b
-d5c
-d1d4
-2de.
-deaf5
-deb5it
-de4bon
-decan4
-de4cil
-de5com
-2d1ed
-4dee.
-de5if
-deli4e
-del5i5q
-de5lo
-d4em
-5dem.
-3demic
-dem5ic.
-de5mil
-de4mons
-demor5
-1den
-de4nar
-de3no
-denti5f
-de3nu
-de1p
-de3pa
-depi4
-de2pu
-d3eq
-d4erh
-5derm
-dern5iz
-der5s
-des2
-d2es.
-de1sc
-de2s5o
-des3ti
-de3str
-de4su
-de1t
-de2to
-de1v
-dev3il
-4dey
-4d1f
-d4ga
-d3ge4t
-dg1i
-d2gy
-d1h2
-5di.
-1d4i3a
-dia5b
-di4cam
-d4ice
-3dict
-3did
-5di3en
-d1if
-di3ge
-di4lato
-d1in
-1dina
-3dine.
-5dini
-di5niz
-1dio
-dio5g
-di4pl
-dir2
-di1re
-dirt5i
-dis1
-5disi
-d4is3t
-d2iti
-1di1v
-d1j
-d5k2
-4d5la
-3dle.
-3dled
-3dles.
-4dless
-2d3lo
-4d5lu
-2dly
-d1m
-4d1n4
-1do
-3do.
-do5de
-5doe
-2d5of
-d4og
-do4la
-doli4
-do5lor
-dom5iz
-do3nat
-doni4
-doo3d
-dop4p
-d4or
-3dos
-4d5out
-do4v
-3dox
-d1p
-1dr
-drag5on
-4drai
-dre4
-drea5r
-5dren
-dri4b
-dril4
-dro4p
-4drow
-5drupli
-4dry
-2d1s2
-ds4p
-d4sw
-d4sy
-d2th
-1du
-d1u1a
-du2c
-d1uca
-duc5er
-4duct.
-4ducts
-du5el
-du4g
-d3ule
-dum4be
-du4n
-4dup
-du4pe
-d1v
-d1w
-d2y
-5dyn
-dy4se
-dys5p
-e1a4b
-e3act
-ead1
-ead5ie
-ea4ge
-ea5ger
-ea4l
-eal5er
-eal3ou
-eam3er
-e5and
-ear3a
-ear4c
-ear5es
-ear4ic
-ear4il
-ear5k
-ear2t
-eart3e
-ea5sp
-e3ass
-east3
-ea2t
-eat5en
-eath3i
-e5atif
-e4a3tu
-ea2v
-eav3en
-eav5i
-eav5o
-2e1b
-e4bel.
-e4bels
-e4ben
-e4bit
-e3br
-e4cad
-ecan5c
-ecca5
-e1ce
-ec5essa
-ec2i
-e4cib
-ec5ificat
-ec5ifie
-ec5ify
-ec3im
-eci4t
-e5cite
-e4clam
-e4clus
-e2col
-e4comm
-e4compe
-e4conc
-e2cor
-ec3ora
-eco5ro
-e1cr
-e4crem
-ec4tan
-ec4te
-e1cu
-e4cul
-ec3ula
-2e2da
-4ed3d
-e4d1er
-ede4s
-4edi
-e3dia
-ed3ib
-ed3ica
-ed3im
-ed1it
-edi5z
-4edo
-e4dol
-edon2
-e4dri
-e4dul
-ed5ulo
-ee2c
-eed3i
-ee2f
-eel3i
-ee4ly
-ee2m
-ee4na
-ee4p1
-ee2s4
-eest4
-ee4ty
-e5ex
-e1f
-e4f3ere
-1eff
-e4fic
-5efici
-efil4
-e3fine
-ef5i5nite
-3efit
-efor5es
-e4fuse.
-4egal
-eger4
-eg5ib
-eg4ic
-eg5ing
-e5git5
-eg5n
-e4go.
-e4gos
-eg1ul
-e5gur
-5egy
-e1h4
-eher4
-ei2
-e5ic
-ei5d
-eig2
-ei5gl
-e3imb
-e3inf
-e1ing
-e5inst
-eir4d
-eit3e
-ei3th
-e5ity
-e1j
-e4jud
-ej5udi
-eki4n
-ek4la
-e1la
-e4la.
-e4lac
-elan4d
-el5ativ
-e4law
-elaxa4
-e3lea
-el5ebra
-5elec
-e4led
-el3ega
-e5len
-e4l1er
-e1les
-el2f
-el2i
-e3libe
-e4l5ic.
-el3ica
-e3lier
-el5igib
-e5lim
-e4l3ing
-e3lio
-e2lis
-el5ish
-e3liv3
-4ella
-el4lab
-ello4
-e5loc
-el5og
-el3op.
-el2sh
-el4ta
-e5lud
-el5ug
-e4mac
-e4mag
-e5man
-em5ana
-em5b
-e1me
-e2mel
-e4met
-em3ica
-emi4e
-em5igra
-em1in2
-em5ine
-em3i3ni
-e4mis
-em5ish
-e5miss
-em3iz
-5emniz
-emo4g
-emoni5o
-em3pi
-e4mul
-em5ula
-emu3n
-e3my
-en5amo
-e4nant
-ench4er
-en3dic
-e5nea
-e5nee
-en3em
-en5ero
-en5esi
-en5est
-en3etr
-e3new
-en5ics
-e5nie
-e5nil
-e3nio
-en3ish
-en3it
-e5niu
-5eniz
-4enn
-4eno
-eno4g
-e4nos
-en3ov
-en4sw
-ent5age
-4enthes
-en3ua
-en5uf
-e3ny.
-4en3z
-e5of
-eo2g
-e4oi4
-e3ol
-eop3ar
-e1or
-eo3re
-eo5rol
-eos4
-e4ot
-eo4to
-e5out
-e5ow
-e2pa
-e3pai
-ep5anc
-e5pel
-e3pent
-ep5etitio
-ephe4
-e4pli
-e1po
-e4prec
-ep5reca
-e4pred
-ep3reh
-e3pro
-e4prob
-ep4sh
-ep5ti5b
-e4put
-ep5uta
-e1q
-equi3l
-e4q3ui3s
-er1a
-era4b
-4erand
-er3ar
-4erati.
-2erb
-er4bl
-er3ch
-er4che
-2ere.
-e3real
-ere5co
-ere3in
-er5el.
-er3emo
-er5ena
-er5ence
-4erene
-er3ent
-ere4q
-er5ess
-er3est
-eret4
-er1h
-er1i
-e1ria4
-5erick
-e3rien
-eri4er
-er3ine
-e1rio
-4erit
-er4iu
-eri4v
-e4riva
-er3m4
-er4nis
-4ernit
-5erniz
-er3no
-2ero
-er5ob
-e5roc
-ero4r
-er1ou
-er1s
-er3set
-ert3er
-4ertl
-er3tw
-4eru
-eru4t
-5erwau
-e1s4a
-e4sage.
-e4sages
-es2c
-e2sca
-es5can
-e3scr
-es5cu
-e1s2e
-e2sec
-es5ecr
-es5enc
-e4sert.
-e4serts
-e4serva
-4esh
-e3sha
-esh5en
-e1si
-e2sic
-e2sid
-es5iden
-es5igna
-e2s5im
-es4i4n
-esis4te
-esi4u
-e5skin
-es4mi
-e2sol
-es3olu
-e2son
-es5ona
-e1sp
-es3per
-es5pira
-es4pre
-2ess
-es4si4b
-estan4
-es3tig
-es5tim
-4es2to
-e3ston
-2estr
-e5stro
-estruc5
-e2sur
-es5urr
-es4w
-eta4b
-eten4d
-e3teo
-ethod3
-et1ic
-e5tide
-etin4
-eti4no
-e5tir
-e5titio
-et5itiv
-4etn
-et5ona
-e3tra
-e3tre
-et3ric
-et5rif
-et3rog
-et5ros
-et3ua
-et5ym
-et5z
-4eu
-e5un
-e3up
-eu3ro
-eus4
-eute4
-euti5l
-eu5tr
-eva2p5
-e2vas
-ev5ast
-e5vea
-ev3ell
-evel3o
-e5veng
-even4i
-ev1er
-e5verb
-e1vi
-ev3id
-evi4l
-e4vin
-evi4v
-e5voc
-e5vu
-e1wa
-e4wag
-e5wee
-e3wh
-ewil5
-ew3ing
-e3wit
-1exp
-5eyc
-5eye.
-eys4
-1fa
-fa3bl
-fab3r
-fa4ce
-4fag
-fain4
-fall5e
-4fa4ma
-fam5is
-5far
-far5th
-fa3ta
-fa3the
-4fato
-fault5
-4f5b
-4fd
-4fe.
-feas4
-feath3
-fe4b
-4feca
-5fect
-2fed
-fe3li
-fe4mo
-fen2d
-fend5e
-fer1
-5ferr
-fev4
-4f1f
-f4fes
-f4fie
-f5fin.
-f2f5is
-f4fly
-f2fy
-4fh
-1fi
-fi3a
-2f3ic.
-4f3ical
-f3ican
-4ficate
-f3icen
-fi3cer
-fic4i
-5ficia
-5ficie
-4fics
-fi3cu
-fi5del
-fight5
-fil5i
-fill5in
-4fily
-2fin
-5fina
-fin2d5
-fi2ne
-f1in3g
-fin4n
-fis4ti
-f4l2
-f5less
-flin4
-flo3re
-f2ly5
-4fm
-4fn
-1fo
-5fon
-fon4de
-fon4t
-fo2r
-fo5rat
-for5ay
-fore5t
-for4i
-fort5a
-fos5
-4f5p
-fra4t
-f5rea
-fres5c
-fri2
-fril4
-frol5
-2f3s
-2ft
-f4to
-f2ty
-3fu
-fu5el
-4fug
-fu4min
-fu5ne
-fu3ri
-fusi4
-fus4s
-4futa
-1fy
-1ga
-gaf4
-5gal.
-3gali
-ga3lo
-2gam
-ga5met
-g5amo
-gan5is
-ga3niz
-gani5za
-4gano
-gar5n4
-gass4
-gath3
-4gativ
-4gaz
-g3b
-gd4
-2ge.
-2ged
-geez4
-gel4in
-ge5lis
-ge5liz
-4gely
-1gen
-ge4nat
-ge5niz
-4geno
-4geny
-1geo
-ge3om
-g4ery
-5gesi
-geth5
-4geto
-ge4ty
-ge4v
-4g1g2
-g2ge
-g3ger
-gglu5
-ggo4
-gh3in
-gh5out
-gh4to
-5gi.
-1gi4a
-gia5r
-g1ic
-5gicia
-g4ico
-gien5
-5gies.
-gil4
-g3imen
-3g4in.
-gin5ge
-5g4ins
-5gio
-3gir
-gir4l
-g3isl
-gi4u
-5giv
-3giz
-gl2
-gla4
-glad5i
-5glas
-1gle
-gli4b
-g3lig
-3glo
-glo3r
-g1m
-g4my
-gn4a
-g4na.
-gnet4t
-g1ni
-g2nin
-g4nio
-g1no
-g4non
-1go
-3go.
-gob5
-5goe
-3g4o4g
-go3is
-gon2
-4g3o3na
-gondo5
-go3ni
-5goo
-go5riz
-gor5ou
-5gos.
-gov1
-g3p
-1gr
-4grada
-g4rai
-gran2
-5graph.
-g5rapher
-5graphic
-4graphy
-4gray
-gre4n
-4gress.
-4grit
-g4ro
-gruf4
-gs2
-g5ste
-gth3
-gu4a
-3guard
-2gue
-5gui5t
-3gun
-3gus
-4gu4t
-g3w
-1gy
-2g5y3n
-gy5ra
-h3ab4l
-hach4
-hae4m
-hae4t
-h5agu
-ha3la
-hala3m
-ha4m
-han4ci
-han4cy
-5hand.
-han4g
-hang5er
-hang5o
-h5a5niz
-han4k
-han4te
-hap3l
-hap5t
-ha3ran
-ha5ras
-har2d
-hard3e
-har4le
-harp5en
-har5ter
-has5s
-haun4
-5haz
-haz3a
-h1b
-1head
-3hear
-he4can
-h5ecat
-h4ed
-he5do5
-he3l4i
-hel4lis
-hel4ly
-h5elo
-hem4p
-he2n
-hena4
-hen5at
-heo5r
-hep5
-h4era
-hera3p
-her4ba
-here5a
-h3ern
-h5erou
-h3ery
-h1es
-he2s5p
-he4t
-het4ed
-heu4
-h1f
-h1h
-hi5an
-hi4co
-high5
-h4il2
-himer4
-h4ina
-hion4e
-hi4p
-hir4l
-hi3ro
-hir4p
-hir4r
-his3el
-his4s
-hith5er
-hi2v
-4hk
-4h1l4
-hlan4
-h2lo
-hlo3ri
-4h1m
-hmet4
-2h1n
-h5odiz
-h5ods
-ho4g
-hoge4
-hol5ar
-3hol4e
-ho4ma
-home3
-hon4a
-ho5ny
-3hood
-hoon4
-hor5at
-ho5ris
-hort3e
-ho5ru
-hos4e
-ho5sen
-hos1p
-1hous
-house3
-hov5el
-4h5p
-4hr4
-hree5
-hro5niz
-hro3po
-4h1s2
-h4sh
-h4tar
-ht1en
-ht5es
-h4ty
-hu4g
-hu4min
-hun5ke
-hun4t
-hus3t4
-hu4t
-h1w
-h4wart
-hy3pe
-hy3ph
-hy2s
-2i1a
-i2al
-iam4
-iam5ete
-i2an
-4ianc
-ian3i
-4ian4t
-ia5pe
-iass4
-i4ativ
-ia4tric
-i4atu
-ibe4
-ib3era
-ib5ert
-ib5ia
-ib3in
-ib5it.
-ib5ite
-i1bl
-ib3li
-i5bo
-i1br
-i2b5ri
-i5bun
-4icam
-5icap
-4icar
-i4car.
-i4cara
-icas5
-i4cay
-iccu4
-4iceo
-4ich
-2ici
-i5cid
-ic5ina
-i2cip
-ic3ipa
-i4cly
-i2c5oc
-4i1cr
-5icra
-i4cry
-ic4te
-ictu2
-ic4t3ua
-ic3ula
-ic4um
-ic5uo
-i3cur
-2id
-i4dai
-id5anc
-id5d
-ide3al
-ide4s
-i2di
-id5ian
-idi4ar
-i5die
-id3io
-idi5ou
-id1it
-id5iu
-i3dle
-i4dom
-id3ow
-i4dr
-i2du
-id5uo
-2ie4
-ied4e
-5ie5ga
-ield3
-ien5a4
-ien4e
-i5enn
-i3enti
-i1er.
-i3esc
-i1est
-i3et
-4if.
-if5ero
-iff5en
-if4fr
-4ific.
-i3fie
-i3fl
-4ift
-2ig
-iga5b
-ig3era
-ight3i
-4igi
-i3gib
-ig3il
-ig3in
-ig3it
-i4g4l
-i2go
-ig3or
-ig5ot
-i5gre
-igu5i
-ig1ur
-i3h
-4i5i4
-i3j
-4ik
-i1la
-il3a4b
-i4lade
-i2l5am
-ila5ra
-i3leg
-il1er
-ilev4
-il5f
-il1i
-il3ia
-il2ib
-il3io
-il4ist
-2ilit
-il2iz
-ill5ab
-4iln
-il3oq
-il4ty
-il5ur
-il3v
-i4mag
-im3age
-ima5ry
-imenta5r
-4imet
-im1i
-im5ida
-imi5le
-i5mini
-4imit
-im4ni
-i3mon
-i2mu
-im3ula
-2in.
-i4n3au
-4inav
-incel4
-in3cer
-4ind
-in5dling
-2ine
-i3nee
-iner4ar
-i5ness
-4inga
-4inge
-in5gen
-4ingi
-in5gling
-4ingo
-4ingu
-2ini
-i5ni.
-i4nia
-in3io
-in1is
-i5nite.
-5initio
-in3ity
-4ink
-4inl
-2inn
-2i1no
-i4no4c
-ino4s
-i4not
-2ins
-in3se
-insur5a
-2int.
-2in4th
-in1u
-i5nus
-4iny
-2io
-4io.
-ioge4
-io2gr
-i1ol
-io4m
-ion3at
-ion4ery
-ion3i
-io5ph
-ior3i
-i4os
-io5th
-i5oti
-io4to
-i4our
-2ip
-ipe4
-iphras4
-ip3i
-ip4ic
-ip4re4
-ip3ul
-i3qua
-iq5uef
-iq3uid
-iq3ui3t
-4ir
-i1ra
-ira4b
-i4rac
-ird5e
-ire4de
-i4ref
-i4rel4
-i4res
-ir5gi
-ir1i
-iri5de
-ir4is
-iri3tu
-5i5r2iz
-ir4min
-iro4g
-5iron.
-ir5ul
-2is.
-is5ag
-is3ar
-isas5
-2is1c
-is3ch
-4ise
-is3er
-3isf
-is5han
-is3hon
-ish5op
-is3ib
-isi4d
-i5sis
-is5itiv
-4is4k
-islan4
-4isms
-i2so
-iso5mer
-is1p
-is2pi
-is4py
-4is1s
-is4sal
-issen4
-is4ses
-is4ta.
-is1te
-is1ti
-ist4ly
-4istral
-i2su
-is5us
-4ita.
-ita4bi
-i4tag
-4ita5m
-i3tan
-i3tat
-2ite
-it3era
-i5teri
-it4es
-2ith
-i1ti
-4itia
-4i2tic
-it3ica
-5i5tick
-it3ig
-it5ill
-i2tim
-2itio
-4itis
-i4tism
-i2t5o5m
-4iton
-i4tram
-it5ry
-4itt
-it3uat
-i5tud
-it3ul
-4itz.
-i1u
-2iv
-iv3ell
-iv3en.
-i4v3er.
-i4vers.
-iv5il.
-iv5io
-iv1it
-i5vore
-iv3o3ro
-i4v3ot
-4i5w
-ix4o
-4iy
-4izar
-izi4
-5izont
-5ja
-jac4q
-ja4p
-1je
-jer5s
-4jestie
-4jesty
-jew3
-jo4p
-5judg
-3ka.
-k3ab
-k5ag
-kais4
-kal4
-k1b
-k2ed
-1kee
-ke4g
-ke5li
-k3en4d
-k1er
-kes4
-k3est.
-ke4ty
-k3f
-kh4
-k1i
-5ki.
-5k2ic
-k4ill
-kilo5
-k4im
-k4in.
-kin4de
-k5iness
-kin4g
-ki4p
-kis4
-k5ish
-kk4
-k1l
-4kley
-4kly
-k1m
-k5nes
-1k2no
-ko5r
-kosh4
-k3ou
-kro5n
-4k1s2
-k4sc
-ks4l
-k4sy
-k5t
-k1w
-lab3ic
-l4abo
-laci4
-l4ade
-la3dy
-lag4n
-lam3o
-3land
-lan4dl
-lan5et
-lan4te
-lar4g
-lar3i
-las4e
-la5tan
-4lateli
-4lativ
-4lav
-la4v4a
-2l1b
-lbin4
-4l1c2
-lce4
-l3ci
-2ld
-l2de
-ld4ere
-ld4eri
-ldi4
-ld5is
-l3dr
-l4dri
-le2a
-le4bi
-left5
-5leg.
-5legg
-le4mat
-lem5atic
-4len.
-3lenc
-5lene.
-1lent
-le3ph
-le4pr
-lera5b
-ler4e
-3lerg
-3l4eri
-l4ero
-les2
-le5sco
-5lesq
-3less
-5less.
-l3eva
-lev4er.
-lev4era
-lev4ers
-3ley
-4leye
-2lf
-l5fr
-4l1g4
-l5ga
-lgar3
-l4ges
-lgo3
-2l3h
-li4ag
-li2am
-liar5iz
-li4as
-li4ato
-li5bi
-5licio
-li4cor
-4lics
-4lict.
-l4icu
-l3icy
-l3ida
-lid5er
-3lidi
-lif3er
-l4iff
-li4fl
-5ligate
-3ligh
-li4gra
-3lik
-4l4i4l
-lim4bl
-lim3i
-li4mo
-l4im4p
-l4ina
-1l4ine
-lin3ea
-lin3i
-link5er
-li5og
-4l4iq
-lis4p
-l1it
-l2it.
-5litica
-l5i5tics
-liv3er
-l1iz
-4lj
-lka3
-l3kal
-lka4t
-l1l
-l4law
-l2le
-l5lea
-l3lec
-l3leg
-l3lel
-l3le4n
-l3le4t
-ll2i
-l2lin4
-l5lina
-ll4o
-lloqui5
-ll5out
-l5low
-2lm
-l5met
-lm3ing
-l4mod
-lmon4
-2l1n2
-3lo.
-lob5al
-lo4ci
-4lof
-3logic
-l5ogo
-3logu
-lom3er
-5long
-lon4i
-l3o3niz
-lood5
-5lope.
-lop3i
-l3opm
-lora4
-lo4rato
-lo5rie
-lor5ou
-5los.
-los5et
-5losophiz
-5losophy
-los4t
-lo4ta
-loun5d
-2lout
-4lov
-2lp
-lpa5b
-l3pha
-l5phi
-lp5ing
-l3pit
-l4pl
-l5pr
-4l1r
-2l1s2
-l4sc
-l2se
-l4sie
-4lt
-lt5ag
-ltane5
-l1te
-lten4
-ltera4
-lth3i
-l5ties.
-ltis4
-l1tr
-ltu2
-ltur3a
-lu5a
-lu3br
-luch4
-lu3ci
-lu3en
-luf4
-lu5id
-lu4ma
-5lumi
-l5umn.
-5lumnia
-lu3o
-luo3r
-4lup
-luss4
-lus3te
-1lut
-l5ven
-l5vet4
-2l1w
-1ly
-4lya
-4lyb
-ly5me
-ly3no
-2lys4
-l5yse
-1ma
-2mab
-ma2ca
-ma5chine
-ma4cl
-mag5in
-5magn
-2mah
-maid5
-4mald
-ma3lig
-ma5lin
-mal4li
-mal4ty
-5mania
-man5is
-man3iz
-4map
-ma5rine.
-ma5riz
-mar4ly
-mar3v
-ma5sce
-mas4e
-mas1t
-5mate
-math3
-ma3tis
-4matiza
-4m1b
-mba4t5
-m5bil
-m4b3ing
-mbi4v
-4m5c
-4me.
-2med
-4med.
-5media
-me3die
-m5e5dy
-me2g
-mel5on
-mel4t
-me2m
-mem1o3
-1men
-men4a
-men5ac
-men4de
-4mene
-men4i
-mens4
-mensu5
-3ment
-men4te
-me5on
-m5ersa
-2mes
-3mesti
-me4ta
-met3al
-me1te
-me5thi
-m4etr
-5metric
-me5trie
-me3try
-me4v
-4m1f
-2mh
-5mi.
-mi3a
-mid4a
-mid4g
-mig4
-3milia
-m5i5lie
-m4ill
-min4a
-3mind
-m5inee
-m4ingl
-min5gli
-m5ingly
-min4t
-m4inu
-miot4
-m2is
-mis4er.
-mis5l
-mis4ti
-m5istry
-4mith
-m2iz
-4mk
-4m1l
-m1m
-mma5ry
-4m1n
-mn4a
-m4nin
-mn4o
-1mo
-4mocr
-5mocratiz
-mo2d1
-mo4go
-mois2
-moi5se
-4mok
-mo5lest
-mo3me
-mon5et
-mon5ge
-moni3a
-mon4ism
-mon4ist
-mo3niz
-monol4
-mo3ny.
-mo2r
-4mora.
-mos2
-mo5sey
-mo3sp
-moth3
-m5ouf
-3mous
-mo2v
-4m1p
-mpara5
-mpa5rab
-mpar5i
-m3pet
-mphas4
-m2pi
-mpi4a
-mp5ies
-m4p1in
-m5pir
-mp5is
-mpo3ri
-mpos5ite
-m4pous
-mpov5
-mp4tr
-m2py
-4m3r
-4m1s2
-m4sh
-m5si
-4mt
-1mu
-mula5r4
-5mult
-multi3
-3mum
-mun2
-4mup
-mu4u
-4mw
-1na
-2n1a2b
-n4abu
-4nac.
-na4ca
-n5act
-nag5er.
-nak4
-na4li
-na5lia
-4nalt
-na5mit
-n2an
-nanci4
-nan4it
-nank4
-nar3c
-4nare
-nar3i
-nar4l
-n5arm
-n4as
-nas4c
-nas5ti
-n2at
-na3tal
-nato5miz
-n2au
-nau3se
-3naut
-nav4e
-4n1b4
-ncar5
-n4ces.
-n3cha
-n5cheo
-n5chil
-n3chis
-nc1in
-nc4it
-ncour5a
-n1cr
-n1cu
-n4dai
-n5dan
-n1de
-nd5est.
-ndi4b
-n5d2if
-n1dit
-n3diz
-n5duc
-ndu4r
-nd2we
-2ne.
-n3ear
-ne2b
-neb3u
-ne2c
-5neck
-2ned
-ne4gat
-neg5ativ
-5nege
-ne4la
-nel5iz
-ne5mi
-ne4mo
-1nen
-4nene
-3neo
-ne4po
-ne2q
-n1er
-nera5b
-n4erar
-n2ere
-n4er5i
-ner4r
-1nes
-2nes.
-4nesp
-2nest
-4nesw
-3netic
-ne4v
-n5eve
-ne4w
-n3f
-n4gab
-n3gel
-nge4n4e
-n5gere
-n3geri
-ng5ha
-n3gib
-ng1in
-n5git
-n4gla
-ngov4
-ng5sh
-n1gu
-n4gum
-n2gy
-4n1h4
-nha4
-nhab3
-nhe4
-3n4ia
-ni3an
-ni4ap
-ni3ba
-ni4bl
-ni4d
-ni5di
-ni4er
-ni2fi
-ni5ficat
-n5igr
-nik4
-n1im
-ni3miz
-n1in
-5nine.
-nin4g
-ni4o
-5nis.
-nis4ta
-n2it
-n4ith
-3nitio
-n3itor
-ni3tr
-n1j
-4nk2
-n5kero
-n3ket
-nk3in
-n1kl
-4n1l
-n5m
-nme4
-nmet4
-4n1n2
-nne4
-nni3al
-nni4v
-nob4l
-no3ble
-n5ocl
-4n3o2d
-3noe
-4nog
-noge4
-nois5i
-no5l4i
-5nologis
-3nomic
-n5o5miz
-no4mo
-no3my
-no4n
-non4ag
-non5i
-n5oniz
-4nop
-5nop5o5li
-nor5ab
-no4rary
-4nosc
-nos4e
-nos5t
-no5ta
-1nou
-3noun
-nov3el3
-nowl3
-n1p4
-npi4
-npre4c
-n1q
-n1r
-nru4
-2n1s2
-ns5ab
-nsati4
-ns4c
-n2se
-n4s3es
-nsid1
-nsig4
-n2sl
-ns3m
-n4soc
-ns4pe
-n5spi
-nsta5bl
-n1t
-nta4b
-nter3s
-nt2i
-n5tib
-nti4er
-nti2f
-n3tine
-n4t3ing
-nti4p
-ntrol5li
-nt4s
-ntu3me
-nu1a
-nu4d
-nu5en
-nuf4fe
-n3uin
-3nu3it
-n4um
-nu1me
-n5umi
-3nu4n
-n3uo
-nu3tr
-n1v2
-n1w4
-nym4
-nyp4
-4nz
-n3za
-4oa
-oad3
-o5a5les
-oard3
-oas4e
-oast5e
-oat5i
-ob3a3b
-o5bar
-obe4l
-o1bi
-o2bin
-ob5ing
-o3br
-ob3ul
-o1ce
-och4
-o3chet
-ocif3
-o4cil
-o4clam
-o4cod
-oc3rac
-oc5ratiz
-ocre3
-5ocrit
-octor5a
-oc3ula
-o5cure
-od5ded
-od3ic
-odi3o
-o2do4
-odor3
-od5uct.
-od5ucts
-o4el
-o5eng
-o3er
-oe4ta
-o3ev
-o2fi
-of5ite
-ofit4t
-o2g5a5r
-og5ativ
-o4gato
-o1ge
-o5gene
-o5geo
-o4ger
-o3gie
-1o1gis
-og3it
-o4gl
-o5g2ly
-3ogniz
-o4gro
-ogu5i
-1ogy
-2ogyn
-o1h2
-ohab5
-oi2
-oic3es
-oi3der
-oiff4
-oig4
-oi5let
-o3ing
-oint5er
-o5ism
-oi5son
-oist5en
-oi3ter
-o5j
-2ok
-o3ken
-ok5ie
-o1la
-o4lan
-olass4
-ol2d
-old1e
-ol3er
-o3lesc
-o3let
-ol4fi
-ol2i
-o3lia
-o3lice
-ol5id.
-o3li4f
-o5lil
-ol3ing
-o5lio
-o5lis.
-ol3ish
-o5lite
-o5litio
-o5liv
-olli4e
-ol5ogiz
-olo4r
-ol5pl
-ol2t
-ol3ub
-ol3ume
-ol3un
-o5lus
-ol2v
-o2ly
-om5ah
-oma5l
-om5atiz
-om2be
-om4bl
-o2me
-om3ena
-om5erse
-o4met
-om5etry
-o3mia
-om3ic.
-om3ica
-o5mid
-om1in
-o5mini
-5ommend
-omo4ge
-o4mon
-om3pi
-ompro5
-o2n
-on1a
-on4ac
-o3nan
-on1c
-3oncil
-2ond
-on5do
-o3nen
-on5est
-on4gu
-on1ic
-o3nio
-on1is
-o5niu
-on3key
-on4odi
-on3omy
-on3s
-onspi4
-onspir5a
-onsu4
-onten4
-on3t4i
-ontif5
-on5um
-onva5
-oo2
-ood5e
-ood5i
-oo4k
-oop3i
-o3ord
-oost5
-o2pa
-ope5d
-op1er
-3opera
-4operag
-2oph
-o5phan
-o5pher
-op3ing
-o3pit
-o5pon
-o4posi
-o1pr
-op1u
-opy5
-o1q
-o1ra
-o5ra.
-o4r3ag
-or5aliz
-or5ange
-ore5a
-o5real
-or3ei
-ore5sh
-or5est.
-orew4
-or4gu
-4o5ria
-or3ica
-o5ril
-or1in
-o1rio
-or3ity
-o3riu
-or2mi
-orn2e
-o5rof
-or3oug
-or5pe
-3orrh
-or4se
-ors5en
-orst4
-or3thi
-or3thy
-or4ty
-o5rum
-o1ry
-os3al
-os2c
-os4ce
-o3scop
-4oscopi
-o5scr
-os4i4e
-os5itiv
-os3ito
-os3ity
-osi4u
-os4l
-o2so
-os4pa
-os4po
-os2ta
-o5stati
-os5til
-os5tit
-o4tan
-otele4g
-ot3er.
-ot5ers
-o4tes
-4oth
-oth5esi
-oth3i4
-ot3ic.
-ot5ica
-o3tice
-o3tif
-o3tis
-oto5s
-ou2
-ou3bl
-ouch5i
-ou5et
-ou4l
-ounc5er
-oun2d
-ou5v
-ov4en
-over4ne
-over3s
-ov4ert
-o3vis
-oviti4
-o5v4ol
-ow3der
-ow3el
-ow5est
-ow1i
-own5i
-o4wo
-oy1a
-1pa
-pa4ca
-pa4ce
-pac4t
-p4ad
-5pagan
-p3agat
-p4ai
-pain4
-p4al
-pan4a
-pan3el
-pan4ty
-pa3ny
-pa1p
-pa4pu
-para5bl
-par5age
-par5di
-3pare
-par5el
-p4a4ri
-par4is
-pa2te
-pa5ter
-5pathic
-pa5thy
-pa4tric
-pav4
-3pay
-4p1b
-pd4
-4pe.
-3pe4a
-pear4l
-pe2c
-2p2ed
-3pede
-3pedi
-pedia4
-ped4ic
-p4ee
-pee4d
-pek4
-pe4la
-peli4e
-pe4nan
-p4enc
-pen4th
-pe5on
-p4era.
-pera5bl
-p4erag
-p4eri
-peri5st
-per4mal
-perme5
-p4ern
-per3o
-per3ti
-pe5ru
-per1v
-pe2t
-pe5ten
-pe5tiz
-4pf
-4pg
-4ph.
-phar5i
-phe3no
-ph4er
-ph4es.
-ph1ic
-5phie
-ph5ing
-5phisti
-3phiz
-ph2l
-3phob
-3phone
-5phoni
-pho4r
-4phs
-ph3t
-5phu
-1phy
-pi3a
-pian4
-pi4cie
-pi4cy
-p4id
-p5ida
-pi3de
-5pidi
-3piec
-pi3en
-pi4grap
-pi3lo
-pi2n
-p4in.
-pind4
-p4ino
-3pi1o
-pion4
-p3ith
-pi5tha
-pi2tu
-2p3k2
-1p2l2
-3plan
-plas5t
-pli3a
-pli5er
-4plig
-pli4n
-ploi4
-plu4m
-plum4b
-4p1m
-2p3n
-po4c
-5pod.
-po5em
-po3et5
-5po4g
-poin2
-5point
-poly5t
-po4ni
-po4p
-1p4or
-po4ry
-1pos
-pos1s
-p4ot
-po4ta
-5poun
-4p1p
-ppa5ra
-p2pe
-p4ped
-p5pel
-p3pen
-p3per
-p3pet
-ppo5site
-pr2
-pray4e
-5preci
-pre5co
-pre3em
-pref5ac
-pre4la
-pre3r
-p3rese
-3press
-pre5ten
-pre3v
-5pri4e
-prin4t3
-pri4s
-pris3o
-p3roca
-prof5it
-pro3l
-pros3e
-pro1t
-2p1s2
-p2se
-ps4h
-p4sib
-2p1t
-pt5a4b
-p2te
-p2th
-pti3m
-ptu4r
-p4tw
-pub3
-pue4
-puf4
-pul3c
-pu4m
-pu2n
-pur4r
-5pus
-pu2t
-5pute
-put3er
-pu3tr
-put4ted
-put4tin
-p3w
-qu2
-qua5v
-2que.
-3quer
-3quet
-2rab
-ra3bi
-rach4e
-r5acl
-raf5fi
-raf4t
-r2ai
-ra4lo
-ram3et
-r2ami
-rane5o
-ran4ge
-r4ani
-ra5no
-rap3er
-3raphy
-rar5c
-rare4
-rar5ef
-4raril
-r2as
-ration4
-rau4t
-ra5vai
-rav3el
-ra5zie
-r1b
-r4bab
-r4bag
-rbi2
-rbi4f
-r2bin
-r5bine
-rb5ing.
-rb4o
-r1c
-r2ce
-rcen4
-r3cha
-rch4er
-r4ci4b
-rc4it
-rcum3
-r4dal
-rd2i
-rdi4a
-rdi4er
-rdin4
-rd3ing
-2re.
-re1al
-re3an
-re5arr
-5reav
-re4aw
-r5ebrat
-rec5oll
-rec5ompe
-re4cre
-2r2ed
-re1de
-re3dis
-red5it
-re4fac
-re2fe
-re5fer.
-re3fi
-re4fy
-reg3is
-re5it
-re1li
-re5lu
-r4en4ta
-ren4te
-re1o
-re5pin
-re4posi
-re1pu
-r1er4
-r4eri
-rero4
-re5ru
-r4es.
-re4spi
-ress5ib
-res2t
-re5stal
-re3str
-re4ter
-re4ti4z
-re3tri
-reu2
-re5uti
-rev2
-re4val
-rev3el
-r5ev5er.
-re5vers
-re5vert
-re5vil
-rev5olu
-re4wh
-r1f
-rfu4
-r4fy
-rg2
-rg3er
-r3get
-r3gic
-rgi4n
-rg3ing
-r5gis
-r5git
-r1gl
-rgo4n
-r3gu
-rh4
-4rh.
-4rhal
-ri3a
-ria4b
-ri4ag
-r4ib
-rib3a
-ric5as
-r4ice
-4rici
-5ricid
-ri4cie
-r4ico
-rid5er
-ri3enc
-ri3ent
-ri1er
-ri5et
-rig5an
-5rigi
-ril3iz
-5riman
-rim5i
-3rimo
-rim4pe
-r2ina
-5rina.
-rin4d
-rin4e
-rin4g
-ri1o
-5riph
-riph5e
-ri2pl
-rip5lic
-r4iq
-r2is
-r4is.
-ris4c
-r3ish
-ris4p
-ri3ta3b
-r5ited.
-rit5er.
-rit5ers
-rit3ic
-ri2tu
-rit5ur
-riv5el
-riv3et
-riv3i
-r3j
-r3ket
-rk4le
-rk4lin
-r1l
-rle4
-r2led
-r4lig
-r4lis
-rl5ish
-r3lo4
-r1m
-rma5c
-r2me
-r3men
-rm5ers
-rm3ing
-r4ming.
-r4mio
-r3mit
-r4my
-r4nar
-r3nel
-r4ner
-r5net
-r3ney
-r5nic
-r1nis4
-r3nit
-r3niv
-rno4
-r4nou
-r3nu
-rob3l
-r2oc
-ro3cr
-ro4e
-ro1fe
-ro5fil
-rok2
-ro5ker
-5role.
-rom5ete
-rom4i
-rom4p
-ron4al
-ron4e
-ro5n4is
-ron4ta
-1room
-5root
-ro3pel
-rop3ic
-ror3i
-ro5ro
-ros5per
-ros4s
-ro4the
-ro4ty
-ro4va
-rov5el
-rox5
-r1p
-r4pea
-r5pent
-rp5er.
-r3pet
-rp4h4
-rp3ing
-r3po
-r1r4
-rre4c
-rre4f
-r4reo
-rre4st
-rri4o
-rri4v
-rron4
-rros4
-rrys4
-4rs2
-r1sa
-rsa5ti
-rs4c
-r2se
-r3sec
-rse4cr
-rs5er.
-rs3es
-rse5v2
-r1sh
-r5sha
-r1si
-r4si4b
-rson3
-r1sp
-r5sw
-rtach4
-r4tag
-r3teb
-rten4d
-rte5o
-r1ti
-rt5ib
-rti4d
-r4tier
-r3tig
-rtil3i
-rtil4l
-r4tily
-r4tist
-r4tiv
-r3tri
-rtroph4
-rt4sh
-ru3a
-ru3e4l
-ru3en
-ru4gl
-ru3in
-rum3pl
-ru2n
-runk5
-run4ty
-r5usc
-ruti5n
-rv4e
-rvel4i
-r3ven
-rv5er.
-r5vest
-r3vey
-r3vic
-rvi4v
-r3vo
-r1w
-ry4c
-5rynge
-ry3t
-sa2
-2s1ab
-5sack
-sac3ri
-s3act
-5sai
-salar4
-sal4m
-sa5lo
-sal4t
-3sanc
-san4de
-s1ap
-sa5ta
-5sa3tio
-sat3u
-sau4
-sa5vor
-5saw
-4s5b
-scan4t5
-sca4p
-scav5
-s4ced
-4scei
-s4ces
-sch2
-s4cho
-3s4cie
-5scin4d
-scle5
-s4cli
-scof4
-4scopy
-scour5a
-s1cu
-4s5d
-4se.
-se4a
-seas4
-sea5w
-se2c3o
-3sect
-4s4ed
-se4d4e
-s5edl
-se2g
-seg3r
-5sei
-se1le
-5self
-5selv
-4seme
-se4mol
-sen5at
-4senc
-sen4d
-s5ened
-sen5g
-s5enin
-4sentd
-4sentl
-sep3a3
-4s1er.
-s4erl
-ser4o
-4servo
-s1e4s
-se5sh
-ses5t
-5se5um
-5sev
-sev3en
-sew4i
-5sex
-4s3f
-2s3g
-s2h
-2sh.
-sh1er
-5shev
-sh1in
-sh3io
-3ship
-shiv5
-sho4
-sh5old
-shon3
-shor4
-short5
-4shw
-si1b
-s5icc
-3side.
-5sides
-5sidi
-si5diz
-4signa
-sil4e
-4sily
-2s1in
-s2ina
-5sine.
-s3ing
-1sio
-5sion
-sion5a
-si2r
-sir5a
-1sis
-3sitio
-5siu
-1siv
-5siz
-sk2
-4ske
-s3ket
-sk5ine
-sk5ing
-s1l2
-s3lat
-s2le
-slith5
-2s1m
-s3ma
-small3
-sman3
-smel4
-s5men
-5smith
-smol5d4
-s1n4
-1so
-so4ce
-soft3
-so4lab
-sol3d2
-so3lic
-5solv
-3som
-3s4on.
-sona4
-son4g
-s4op
-5sophic
-s5ophiz
-s5ophy
-sor5c
-sor5d
-4sov
-so5vi
-2spa
-5spai
-spa4n
-spen4d
-2s5peo
-2sper
-s2phe
-3spher
-spho5
-spil4
-sp5ing
-4spio
-s4ply
-s4pon
-spor4
-4spot
-squal4l
-s1r
-2ss
-s1sa
-ssas3
-s2s5c
-s3sel
-s5seng
-s4ses.
-s5set
-s1si
-s4sie
-ssi4er
-ss5ily
-s4sl
-ss4li
-s4sn
-sspend4
-ss2t
-ssur5a
-ss5w
-2st.
-s2tag
-s2tal
-stam4i
-5stand
-s4ta4p
-5stat.
-s4ted
-stern5i
-s5tero
-ste2w
-stew5a
-s3the
-st2i
-s4ti.
-s5tia
-s1tic
-5stick
-s4tie
-s3tif
-st3ing
-5stir
-s1tle
-5stock
-stom3a
-5stone
-s4top
-3store
-st4r
-s4trad
-5stratu
-s4tray
-s4trid
-4stry
-4st3w
-s2ty
-1su
-su1al
-su4b3
-su2g3
-su5is
-suit3
-s4ul
-su2m
-sum3i
-su2n
-su2r
-4sv
-sw2
-4swo
-s4y
-4syc
-3syl
-syn5o
-sy5rin
-1ta
-3ta.
-2tab
-ta5bles
-5taboliz
-4taci
-ta5do
-4taf4
-tai5lo
-ta2l
-ta5la
-tal5en
-tal3i
-4talk
-tal4lis
-ta5log
-ta5mo
-tan4de
-tanta3
-ta5per
-ta5pl
-tar4a
-4tarc
-4tare
-ta3riz
-tas4e
-ta5sy
-4tatic
-ta4tur
-taun4
-tav4
-2taw
-tax4is
-2t1b
-4tc
-t4ch
-tch5et
-4t1d
-4te.
-tead4i
-4teat
-tece4
-5tect
-2t1ed
-te5di
-1tee
-teg4
-te5ger
-te5gi
-3tel.
-teli4
-5tels
-te2ma2
-tem3at
-3tenan
-3tenc
-3tend
-4tenes
-1tent
-ten4tag
-1teo
-te4p
-te5pe
-ter3c
-5ter3d
-1teri
-ter5ies
-ter3is
-teri5za
-5ternit
-ter5v
-4tes.
-4tess
-t3ess.
-teth5e
-3teu
-3tex
-4tey
-2t1f
-4t1g
-2th.
-than4
-th2e
-4thea
-th3eas
-the5at
-the3is
-3thet
-th5ic.
-th5ica
-4thil
-5think
-4thl
-th5ode
-5thodic
-4thoo
-thor5it
-tho5riz
-2ths
-1tia
-ti4ab
-ti4ato
-2ti2b
-4tick
-t4ico
-t4ic1u
-5tidi
-3tien
-tif2
-ti5fy
-2tig
-5tigu
-till5in
-1tim
-4timp
-tim5ul
-2t1in
-t2ina
-3tine.
-3tini
-1tio
-ti5oc
-tion5ee
-5tiq
-ti3sa
-3tise
-tis4m
-ti5so
-tis4p
-5tistica
-ti3tl
-ti4u
-1tiv
-tiv4a
-1tiz
-ti3za
-ti3zen
-2tl
-t5la
-tlan4
-3tle.
-3tled
-3tles.
-t5let.
-t5lo
-4t1m
-tme4
-2t1n2
-1to
-to3b
-to5crat
-4todo
-2tof
-to2gr
-to5ic
-to2ma
-tom4b
-to3my
-ton4ali
-to3nat
-4tono
-4tony
-to2ra
-to3rie
-tor5iz
-tos2
-5tour
-4tout
-to3war
-4t1p
-1tra
-tra3b
-tra5ch
-traci4
-trac4it
-trac4te
-tras4
-tra5ven
-trav5es5
-tre5f
-tre4m
-trem5i
-5tria
-tri5ces
-5tricia
-4trics
-2trim
-tri4v
-tro5mi
-tron5i
-4trony
-tro5phe
-tro3sp
-tro3v
-tru5i
-trus4
-4t1s2
-t4sc
-tsh4
-t4sw
-4t3t2
-t4tes
-t5to
-ttu4
-1tu
-tu1a
-tu3ar
-tu4bi
-tud2
-4tue
-4tuf4
-5tu3i
-3tum
-tu4nis
-2t3up.
-3ture
-5turi
-tur3is
-tur5o
-tu5ry
-3tus
-4tv
-tw4
-4t1wa
-twis4
-4two
-1ty
-4tya
-2tyl
-type3
-ty5ph
-4tz
-tz4e
-4uab
-uac4
-ua5na
-uan4i
-uar5ant
-uar2d
-uar3i
-uar3t
-u1at
-uav4
-ub4e
-u4bel
-u3ber
-u4bero
-u1b4i
-u4b5ing
-u3ble.
-u3ca
-uci4b
-uc4it
-ucle3
-u3cr
-u3cu
-u4cy
-ud5d
-ud3er
-ud5est
-udev4
-u1dic
-ud3ied
-ud3ies
-ud5is
-u5dit
-u4don
-ud4si
-u4du
-u4ene
-uens4
-uen4te
-uer4il
-3ufa
-u3fl
-ugh3en
-ug5in
-2ui2
-uil5iz
-ui4n
-u1ing
-uir4m
-uita4
-uiv3
-uiv4er.
-u5j
-4uk
-u1la
-ula5b
-u5lati
-ulch4
-5ulche
-ul3der
-ul4e
-u1len
-ul4gi
-ul2i
-u5lia
-ul3ing
-ul5ish
-ul4lar
-ul4li4b
-ul4lis
-4ul3m
-u1l4o
-4uls
-uls5es
-ul1ti
-ultra3
-4ultu
-u3lu
-ul5ul
-ul5v
-um5ab
-um4bi
-um4bly
-u1mi
-u4m3ing
-umor5o
-um2p
-unat4
-u2ne
-un4er
-u1ni
-un4im
-u2nin
-un5ish
-uni3v
-un3s4
-un4sw
-unt3ab
-un4ter.
-un4tes
-unu4
-un5y
-un5z
-u4ors
-u5os
-u1ou
-u1pe
-uper5s
-u5pia
-up3ing
-u3pl
-up3p
-upport5
-upt5ib
-uptu4
-u1ra
-4ura.
-u4rag
-u4ras
-ur4be
-urc4
-ur1d
-ure5at
-ur4fer
-ur4fr
-u3rif
-uri4fic
-ur1in
-u3rio
-u1rit
-ur3iz
-ur2l
-url5ing.
-ur4no
-uros4
-ur4pe
-ur4pi
-urs5er
-ur5tes
-ur3the
-urti4
-ur4tie
-u3ru
-2us
-u5sad
-u5san
-us4ap
-usc2
-us3ci
-use5a
-u5sia
-u3sic
-us4lin
-us1p
-us5sl
-us5tere
-us1tr
-u2su
-usur4
-uta4b
-u3tat
-4ute.
-4utel
-4uten
-uten4i
-4u1t2i
-uti5liz
-u3tine
-ut3ing
-ution5a
-u4tis
-5u5tiz
-u4t1l
-ut5of
-uto5g
-uto5matic
-u5ton
-u4tou
-uts4
-u3u
-uu4m
-u1v2
-uxu3
-uz4e
-1va
-5va.
-2v1a4b
-vac5il
-vac3u
-vag4
-va4ge
-va5lie
-val5o
-val1u
-va5mo
-va5niz
-va5pi
-var5ied
-3vat
-4ve.
-4ved
-veg3
-v3el.
-vel3li
-ve4lo
-v4ely
-ven3om
-v5enue
-v4erd
-5vere.
-v4erel
-v3eren
-ver5enc
-v4eres
-ver3ie
-vermi4n
-3verse
-ver3th
-v4e2s
-4ves.
-ves4te
-ve4te
-vet3er
-ve4ty
-vi5ali
-5vian
-5vide.
-5vided
-4v3iden
-5vides
-5vidi
-v3if
-vi5gn
-vik4
-2vil
-5vilit
-v3i3liz
-v1in
-4vi4na
-v2inc
-vin5d
-4ving
-vio3l
-v3io4r
-vi1ou
-vi4p
-vi5ro
-vis3it
-vi3so
-vi3su
-4viti
-vit3r
-4vity
-3viv
-5vo.
-voi4
-3vok
-vo4la
-v5ole
-5volt
-3volv
-vom5i
-vor5ab
-vori4
-vo4ry
-vo4ta
-4votee
-4vv4
-v4y
-w5abl
-2wac
-wa5ger
-wag5o
-wait5
-w5al.
-wam4
-war4t
-was4t
-wa1te
-wa5ver
-w1b
-wea5rie
-weath3
-wed4n
-weet3
-wee5v
-wel4l
-w1er
-west3
-w3ev
-whi4
-wi2
-wil2
-will5in
-win4de
-win4g
-wir4
-3wise
-with3
-wiz5
-w4k
-wl4es
-wl3in
-w4no
-1wo2
-wom1
-wo5ven
-w5p
-wra4
-wri4
-writa4
-w3sh
-ws4l
-ws4pe
-w5s4t
-4wt
-wy4
-x1a
-xac5e
-x4ago
-xam3
-x4ap
-xas5
-x3c2
-x1e
-xe4cuto
-x2ed
-xer4i
-xe5ro
-x1h
-xhi2
-xhil5
-xhu4
-x3i
-xi5a
-xi5c
-xi5di
-x4ime
-xi5miz
-x3o
-x4ob
-x3p
-xpan4d
-xpecto5
-xpe3d
-x1t2
-x3ti
-x1u
-xu3a
-xx4
-y5ac
-3yar4
-y5at
-y1b
-y1c
-y2ce
-yc5er
-y3ch
-ych4e
-ycom4
-ycot4
-y1d
-y5ee
-y1er
-y4erf
-yes4
-ye4t
-y5gi
-4y3h
-y1i
-y3la
-ylla5bl
-y3lo
-y5lu
-ymbol5
-yme4
-ympa3
-yn3chr
-yn5d
-yn5g
-yn5ic
-5ynx
-y1o4
-yo5d
-y4o5g
-yom4
-yo5net
-y4ons
-y4os
-y4ped
-yper5
-yp3i
-y3po
-y4poc
-yp2ta
-y5pu
-yra5m
-yr5ia
-y3ro
-yr4r
-ys4c
-y3s2e
-ys3ica
-ys3io
-3ysis
-y4so
-yss4
-ys1t
-ys3ta
-ysur4
-y3thin
-yt3ic
-y1w
-za1
-z5a2b
-zar2
-4zb
-2ze
-ze4n
-ze4p
-z1er
-ze3ro
-zet4
-2z1i
-z4il
-z4is
-5zl
-4zm
-1zo
-zo4m
-zo5ol
-zte4
-4z1z2
-z4zy
diff --git a/contrib/groff/tmac/latin1.tmac b/contrib/groff/tmac/latin1.tmac
deleted file mode 100644
index 9cc15cce7936..000000000000
--- a/contrib/groff/tmac/latin1.tmac
+++ /dev/null
@@ -1,103 +0,0 @@
-.\" latin1.tmac
-.\"
-.nr _C \n(.C
-.cp 0
-.de latin1-tr
-.if c\\$2 .if !c\\$1 .tr \\$1\\$2
-..
-.latin1-tr \[char161] \(r!
-.latin1-tr \[char162] \(ct
-.latin1-tr \[char163] \(Po
-.latin1-tr \[char164] \(Cs
-.latin1-tr \[char165] \(Ye
-.latin1-tr \[char166] \(bb
-.latin1-tr \[char167] \(sc
-.latin1-tr \[char168] \(ad
-.latin1-tr \[char169] \(co
-.latin1-tr \[char170] \(Of
-.latin1-tr \[char171] \(Fo
-.latin1-tr \[char172] \(no
-.latin1-tr \[char173] \[shc]
-.latin1-tr \[char174] \(rg
-.latin1-tr \[char175] \(a-
-.latin1-tr \[char176] \(de
-.latin1-tr \[char177] \(+-
-.latin1-tr \[char178] \(S2
-.latin1-tr \[char179] \(S3
-.latin1-tr \[char180] \(aa
-.latin1-tr \[char181] \(*m
-.latin1-tr \[char182] \(ps
-.latin1-tr \[char183] \(pc
-.latin1-tr \[char184] \(ac
-.latin1-tr \[char185] \(S1
-.latin1-tr \[char186] \(Om
-.latin1-tr \[char187] \(Fc
-.latin1-tr \[char188] \(14
-.latin1-tr \[char189] \(12
-.latin1-tr \[char190] \(34
-.latin1-tr \[char191] \(r?
-.latin1-tr \[char192] \(`A
-.latin1-tr \[char193] \('A
-.latin1-tr \[char194] \(^A
-.latin1-tr \[char195] \(~A
-.latin1-tr \[char196] \(:A
-.latin1-tr \[char197] \(oA
-.latin1-tr \[char198] \(AE
-.latin1-tr \[char199] \(,C
-.latin1-tr \[char200] \(`E
-.latin1-tr \[char201] \('E
-.latin1-tr \[char202] \(^E
-.latin1-tr \[char203] \(:E
-.latin1-tr \[char204] \(`I
-.latin1-tr \[char205] \('I
-.latin1-tr \[char206] \(^I
-.latin1-tr \[char207] \(:I
-.latin1-tr \[char208] \(-D
-.latin1-tr \[char209] \(~N
-.latin1-tr \[char210] \(`O
-.latin1-tr \[char211] \('O
-.latin1-tr \[char212] \(^O
-.latin1-tr \[char213] \(~O
-.latin1-tr \[char214] \(:O
-.latin1-tr \[char215] \(mu
-.latin1-tr \[char216] \(/O
-.latin1-tr \[char217] \(`U
-.latin1-tr \[char218] \('U
-.latin1-tr \[char219] \(^U
-.latin1-tr \[char220] \(:U
-.latin1-tr \[char221] \('Y
-.latin1-tr \[char222] \(TP
-.latin1-tr \[char223] \(ss
-.latin1-tr \[char224] \(`a
-.latin1-tr \[char225] \('a
-.latin1-tr \[char226] \(^a
-.latin1-tr \[char227] \(~a
-.latin1-tr \[char228] \(:a
-.latin1-tr \[char229] \(oa
-.latin1-tr \[char230] \(ae
-.latin1-tr \[char231] \(,c
-.latin1-tr \[char232] \(`e
-.latin1-tr \[char233] \('e
-.latin1-tr \[char234] \(^e
-.latin1-tr \[char235] \(:e
-.latin1-tr \[char236] \(`i
-.latin1-tr \[char237] \('i
-.latin1-tr \[char238] \(^i
-.latin1-tr \[char239] \(:i
-.latin1-tr \[char240] \(Sd
-.latin1-tr \[char241] \(~n
-.latin1-tr \[char242] \(`o
-.latin1-tr \[char243] \('o
-.latin1-tr \[char244] \(^o
-.latin1-tr \[char245] \(~o
-.latin1-tr \[char246] \(:o
-.latin1-tr \[char247] \(di
-.latin1-tr \[char248] \(/o
-.latin1-tr \[char249] \(`u
-.latin1-tr \[char250] \('u
-.latin1-tr \[char251] \(^u
-.latin1-tr \[char252] \(:u
-.latin1-tr \[char253] \('y
-.latin1-tr \[char254] \(Tp
-.latin1-tr \[char255] \(:y
-.cp \n(_C
diff --git a/contrib/groff/tmac/lbp.tmac b/contrib/groff/tmac/lbp.tmac
deleted file mode 100644
index 0d17b63110a1..000000000000
--- a/contrib/groff/tmac/lbp.tmac
+++ /dev/null
@@ -1,15 +0,0 @@
-.\" lbp.tmac
-.\"
-.nr _C \n(.C
-.cp 0
-.ftr CW CR
-.ftr C CR
-.ftr CO CI
-.ftr H HR
-.ftr HO HI
-.ftr HX HBI
-.ftr Hr HNR
-.ftr Hi HNI
-.ftr Hb HNB
-.ftr Hx HNBI
-.cp \n(_C
diff --git a/contrib/groff/tmac/lj4.tmac b/contrib/groff/tmac/lj4.tmac
deleted file mode 100644
index b5644e46517b..000000000000
--- a/contrib/groff/tmac/lj4.tmac
+++ /dev/null
@@ -1,20 +0,0 @@
-.\" lj4.tmac
-.\"
-.nr _C \n(.C
-.cp 0
-.ftr CW CR
-.ftr C CR
-.ftr CX CBI
-.ftr H UR
-.ftr HR UR
-.ftr HB UB
-.ftr HBI UBI
-.ftr HI UI
-.ftr HO UI
-.ftr HX UBI
-.\" This is designed so that \(ul, \(rn and \(br form corners.
-.if !c\[br] .char \[br] \Z'\v'.25m'\D'R .04m -1m''
-.if !c\[ru] .char \[ru] \Z'\v'-.02m'\D'R .54m .04m''\h'.5m'
-.if !c\[rn] .char \[rn] \Z'\v'-.77m'\D'R .54m .04m''\h'.5m'
-.if !c\[ul] .char \[ul] \Z'\v'.23m'\D'R .54m .04m''\h'.5m'
-.cp \n(_C
diff --git a/contrib/groff/tmac/man.tmac b/contrib/groff/tmac/man.tmac
deleted file mode 100644
index ca7d14dade67..000000000000
--- a/contrib/groff/tmac/man.tmac
+++ /dev/null
@@ -1,3 +0,0 @@
-.\" man.tmac
-.\"
-.do mso andoc.tmac
diff --git a/contrib/groff/tmac/mandoc.tmac b/contrib/groff/tmac/mandoc.tmac
deleted file mode 100644
index ee21497196d1..000000000000
--- a/contrib/groff/tmac/mandoc.tmac
+++ /dev/null
@@ -1,3 +0,0 @@
-.\" mandoc.tmac
-.\"
-.do mso andoc.tmac
diff --git a/contrib/groff/tmac/mdoc.tmac b/contrib/groff/tmac/mdoc.tmac
deleted file mode 100644
index 250d615d2308..000000000000
--- a/contrib/groff/tmac/mdoc.tmac
+++ /dev/null
@@ -1,3 +0,0 @@
-.\" mdoc.tmac
-.\"
-.do mso doc.tmac
diff --git a/contrib/groff/tmac/me.tmac b/contrib/groff/tmac/me.tmac
deleted file mode 100644
index 0c90a9b55b65..000000000000
--- a/contrib/groff/tmac/me.tmac
+++ /dev/null
@@ -1,3 +0,0 @@
-.\" me.tmac
-.\"
-.do mso e.tmac
diff --git a/contrib/groff/tmac/ms.tmac b/contrib/groff/tmac/ms.tmac
deleted file mode 100644
index 50e0370416a9..000000000000
--- a/contrib/groff/tmac/ms.tmac
+++ /dev/null
@@ -1,3 +0,0 @@
-.\" ms.tmac
-.\"
-.do mso s.tmac
diff --git a/contrib/groff/tmac/mwww.tmac b/contrib/groff/tmac/mwww.tmac
deleted file mode 100644
index b258688a0b59..000000000000
--- a/contrib/groff/tmac/mwww.tmac
+++ /dev/null
@@ -1,3 +0,0 @@
-.\" mwww.tmac
-.\"
-.do mso www.tmac
diff --git a/contrib/groff/tmac/pic.tmac b/contrib/groff/tmac/pic.tmac
deleted file mode 100644
index ac3b02498514..000000000000
--- a/contrib/groff/tmac/pic.tmac
+++ /dev/null
@@ -1,12 +0,0 @@
-.\" pic.tmac
-.\"
-.de PS
-.br
-.sp .3v
-.ne 0\\$1+1v+\n(.Vu
-.in \\n(.lu-\\n(.iu-0\\$2/2u>?0
-..
-.de PE
-.in
-.sp .3v+.5m
-..
diff --git a/contrib/groff/tmac/ps.tmac b/contrib/groff/tmac/ps.tmac
deleted file mode 100644
index 1aeacfd1c7df..000000000000
--- a/contrib/groff/tmac/ps.tmac
+++ /dev/null
@@ -1,54 +0,0 @@
-.\" ps.tmac
-.\"
-.nr _C \n(.C
-.cp 0
-.ftr AX ABI
-.ftr KR BMR
-.ftr KI BMI
-.ftr KB BMB
-.ftr KX BMBI
-.ftr CW CR
-.ftr CO CI
-.ftr CX CBI
-.ftr H HR
-.ftr HO HI
-.ftr HX HBI
-.ftr Hr HNR
-.ftr Hi HNI
-.ftr Hb HNB
-.ftr Hx HNBI
-.ftr NX NBI
-.ftr PA PR
-.ftr PX PBI
-.ftr ZI ZCMI
-.ftr C CR
-.cflags 8 \(an
-.char \[radicalex] \h'-\w'\(sr'u'\[radicalex]\h'\w'\(sr'u'
-.char \(mo \h'.08m'\(mo\h'-.08m'
-.char \(nm \h'.08m'\(nm\h'-.08m'
-.char \[parenlefttp] \[parenlefttp]\h'.016m'
-.char \[parenleftbt] \[parenleftbt]\h'.016m'
-.char \[parenleftex] \[parenleftex]\h'.016m'
-.char \[parenrighttp] \[parenrighttp]\h'.016m'
-.char \[parenrightbt] \[parenrightbt]\h'.016m'
-.char \[parenrightex] \[parenrightex]\h'.016m'
-.if !c\[va] .char \[va] \o'\[ua]\[da]'
-.if !c\[ci] \
-.char \[ci] \v'-.25m'\h'.05m'\D'c .5m'\h'.05m'\v'.25m'
-.if !c\[sq] \
-.char \[sq] \h'.05m'\D'l .5m 0'\D'l 0 -.5m'\D'l -.5m 0'\D'l 0 .5m'\h'.55m'
-.if !c\[ru] .char \[ru] \D'l .5m 0'
-.if !c\[ul] .char \[ul] \v'.25m'\D'l .5m 0'\v'-.25m'
-.if !c\[br] .char \[br] \Z'\v'.25m'\D'l 0 -1m''
-.if !c\[rn] .char \[rn] \v'-.75m'\D'l .5m 0'\v'.75m'
-.if !c\[or] .char \[or] \h'.1m'\Z'\D'l 0 -.675m''\h'.1m'
-.if !c\[Fi] .char \[Fi] ffi
-.if !c\[Fl] .char \[Fl] ffl
-.if !c\[ff] .char \[ff] ff
-.if !c\[ij] .char \[ij] ij
-.if !c\[IJ] .char \[IJ] IJ
-.if !c\[tm] .char \[tm] \s-3\v'-.3m'TM\v'+.3m'\s+3
-.\" pic tests this register to see whether it should use \X'ps:...'
-.nr 0p 1
-.cp \n(_C
-.if !\n(.C .mso pspic.tmac
diff --git a/contrib/groff/tmac/psatk.tmac b/contrib/groff/tmac/psatk.tmac
deleted file mode 100644
index dc6d2f38c25f..000000000000
--- a/contrib/groff/tmac/psatk.tmac
+++ /dev/null
@@ -1,63 +0,0 @@
-.\" psatk.tmac
-.\"
-.\" Implementation of the ATK PB and PE macros for use with groff and grops.
-.\" Load this after atk.tmac.
-.nr zT 0
-.if '\*(.T'ps' .nr zT 1
-.nr psatk-unit 1p
-.de psatk-defs
-ps: mdef 5
-/PB {
- /saved save def
- currentpoint translate
- \n[psatk-unit] u -\n[psatk-unit] u scale
- userdict begin
- /showpage {} def
-} bind def
-/PE {
- end
- saved restore
-} bind def
-/troffadjust {
- pop 0
-} bind def
-..
-.de PB
-.ne \\$1p
-.nr zT \\n(zT>0
-\\*[PB\\n(zT]\\
-..
-.de PE
-\\*[PE\\n(zT]\\
-..
-.ds PB0
-.\" The last line before the "'PE" is "\}" rather than ".\}". This
-.\" would cause a spurious space to be introduced before any picture
-.\" that was the first thing on a line. So we have to catch that and
-.\" remove it.
-.de PB1
-.ev psatk
-.fi
-.di psatk-mac
-\!ps: exec PB
-..
-.de PE0
-\v'-.75m'\
-\D'l \\$1p 0'\D'l 0 \\$2p'\D'l -\\$1p 0'\D'l 0 -\\$2p'\
-\h'\\$1p'\v'.75m'\x'\\$2p-1m>?0'\c
-..
-.ds psatk-init \Y[psatk-defs]
-.de PE1
-\!PE
-.di
-.di null
-.br
-.di
-.rm null
-.ev
-\v'-.75m'\
-\\*[psatk-init]\Y[psatk-mac]\
-\h'\\$1p'\v'.75m'\x'\\$2p-1m>?0'\c
-.rm psatk-mac
-.if \\n(.P .ds psatk-init
-..
diff --git a/contrib/groff/tmac/psfig.tmac b/contrib/groff/tmac/psfig.tmac
deleted file mode 100644
index f9668227d3b3..000000000000
--- a/contrib/groff/tmac/psfig.tmac
+++ /dev/null
@@ -1,89 +0,0 @@
-.\" psfig.tmac
-.\"
-.\" These are macros to make psfig work with groff.
-.\" They require that psfig be patched as described in ../grops/psfig.diff.
-.de psfig-defs
-ps: mdef 100
-
-% wid ht llx lly urx ury psfigstart -
-
-/psfigstart {
- /level1 save def
- /ury exch def
- /urx exch def
- /lly exch def
- /llx exch def
- /ht exch u def
- /wid exch u def
- currentpoint ht add translate
- wid urx llx sub div ht ury lly sub div neg scale
- llx neg lly neg translate
-
- % set the graphics state to default values
- 0 setgray
- 0 setlinecap
- 1 setlinewidth
- 0 setlinejoin
- 10 setmiterlimit
- [] 0 setdash
- newpath
- /showpage {} def
-} bind def
-
-% psfigclip -
-
-/psfigclip {
- currentpoint newpath
- llx lly moveto
- urx lly lineto
- urx ury lineto
- llx ury lineto
- closepath clip
- newpath moveto
-} bind def
-
-% psfigend -
-
-/psfigend {
- level1 restore
-} bind def
-
-% globalstart -
-
-/globalstart {
- % save the current space code on the stack
- SC
- level0 restore
-} bind def
-
-% globalend -
-
-/globalend {
- end
- BP
- /SC exch def
- DEFS begin
-} bind def
-..
-.de psfig-init
-.if \\n[.P] \{\
-\Y[psfig-defs]
-. br
-. sp -1
-. ds psfig-init\" empty
-. rm psfig-defs
-.\}
-..
-.de F+
-.br
-.psfig-init
-.nr psfig-fill \\n[.u]
-.nf
-.sp -.5
-.if !\\n[.$] .ce 9999
-..
-.de F-
-.br
-.ce 0
-.if \\n[psfig-fill] .fi
-..
diff --git a/contrib/groff/tmac/psold.tmac b/contrib/groff/tmac/psold.tmac
deleted file mode 100644
index 28a446b4a20e..000000000000
--- a/contrib/groff/tmac/psold.tmac
+++ /dev/null
@@ -1,61 +0,0 @@
-.\" psold.tmac
-.\"
-.\" In newer PostScript printers, text fonts contain all ISO Latin-1
-.\" characters. The font description files that comes with groff match
-.\" these fonts. The text fonts in older PostScript printers are missing
-.\" some of these characters. This file prevents those characters from
-.\" being used. This will allow the PostScript output to be printed on
-.\" such old printers.
-.nr _C \n(.C
-.cp 0
-.\" Define an accented character.
-.de ps-achar
-.\" Note that character definitions are always interpreted with
-.\" compatibility mode off.
-.char \\$1 \\$3\
-\k[acc]\
-\h'(u;-\w'\\$2'-\w'\\$3'/2+\\\\n[skw]+(\w'x'*0)-\\\\n[skw])'\
-\v'(u;\w'x'*0+\\\\n[rst]+(\w'\\$3'*0)-\\\\n[rst])'\
-\\$2\
-\v'(u;\w'x'*0-\\\\n[rst]+(\w'\\$3'*0)+\\\\n[rst])'\
-\h'|\\\\n[acc]u'
-.ie '\\$3'\(.i' .hcode \\$1i
-.el .hcode \\$1\\$3
-..
-.ps-achar \['y] \(aa y
-.ps-achar \['Y] \(aa Y
-.char \[12] \v'-.7m\s[\\n(.s*6u/10u]+.7m'1\v'-.7m\s0+.7m'\
-\(f/\s[\\n(.s*6u/10u]2\s0
-.char \[14] \v'-.7m\s[\\n(.s*6u/10u]+.7m'1\v'-.7m\s0+.7m'\
-\(f/\s[\\n(.s*6u/10u]4\s0
-.char \[34] \v'-.7m\s[\\n(.s*6u/10u]+.7m'3\v'-.7m\s0+.7m'\
-\(f/\s[\\n(.s*6u/10u]4\s0
-.char \[S1] \v'-.2m'\s-31\s+3\v'+.2m'
-.char \[S2] \v'-.2m'\s-32\s+3\v'+.2m'
-.char \[S3] \v'-.2m'\s-33\s+3\v'+.2m'
-.char \[bb] |
-.char \[de] \fS\(de
-.char \[-D] \Z'\v'-.1m'-'D
-.char \[TP] \
-I\h'-.25m'\v'-.33m'\s'\En(.s*6u/10u'\v'.33m'D\v'-.33m'\s0\v'.33m'
-.char \[Sd] \Z'\v'-.3m'\h'.2m'-'\(pd
-.char \[Tp] \zlp
-.tr \[char166]\[bb]
-.tr \[char176]\[de]
-.tr \[char177]\[+-]
-.tr \[char178]\[S2]
-.tr \[char179]\[S3]
-.tr \[char181]\[*m]
-.tr \[char185]\[S1]
-.tr \[char188]\[14]
-.tr \[char189]\[12]
-.tr \[char190]\[34]
-.tr \[char208]\[-D]
-.tr \[char215]\[mu]
-.tr \[char221]\['Y]
-.tr \[char222]\[TP]
-.tr \[char240]\[Sd]
-.tr \[char247]\[di]
-.tr \[char253]\['y]
-.tr \[char254]\[Tp]
-.cp \n(_C
diff --git a/contrib/groff/tmac/pspic.tmac b/contrib/groff/tmac/pspic.tmac
deleted file mode 100644
index ab0666860c37..000000000000
--- a/contrib/groff/tmac/pspic.tmac
+++ /dev/null
@@ -1,60 +0,0 @@
-.\" pspic.tmac
-.\"
-.\" Define the PSPIC macro.
-.\" When used other than with -Tps, it will draw a box around where
-.\" the picture would go.
-.de PSPIC
-.nr ps-offset-mode 0
-.ie '\\$1'-L' \{\
-. nr ps-offset-mode 1
-. shift
-. HTML-DO-IMAGE \\$1 l
-.\}
-.el \{\
-. ie '\\$1'-R' \{\
-. nr ps-offset-mode 2
-. shift
-. HTML-DO-IMAGE \\$1 r
-. \}
-. el \{\
-. if '\\$1'-I' \{\
-. nr ps-offset-mode 3
-. nr ps-offset (m;\\$2)
-. shift 2
-. \}
-. HTML-DO-IMAGE \\$1 i
-. \}
-.\}
-.br
-.psbb \\$1
-.if (\\n[llx] : \\n[lly] : \\n[urx] : \\n[ury]) \{\
-. nr ps-wid (\\n[urx]-\\n[llx])
-. nr ps-ht (\\n[ury]-\\n[lly])
-. if \\n[ps-wid]<0 .nr ps-wid 0-\\n[ps-wid]
-. if \\n[ps-ht]<0 .nr ps-ht 0-\\n[ps-ht]
-. ie \\n[.$]>=2 .nr ps-deswid (i;\\$2)
-. el .nr ps-deswid \\n[.l]-\\n[.i]<?\\n[ps-wid]p
-. nr ps-desht \\n[ps-deswid]*1000+(\\n[ps-wid]/2)/\\n[ps-wid]\
-*\\n[ps-ht]+500/1000
-. if \\n[.$]>=3&(\\n[ps-desht]>(i;0\\$3)) \{\
-. nr ps-desht (i;\\$3)
-. nr ps-deswid \\n[ps-desht]*1000+(\\n[ps-ht]/2)/\\n[ps-ht]\
-*\\n[ps-wid]+500/1000
-. \}
-. ne \\n[ps-desht]u+1v
-. if \\n[ps-offset-mode]=0 .nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]/2
-. if \\n[ps-offset-mode]=1 .nr ps-offset 0
-. if \\n[ps-offset-mode]=2 .nr ps-offset \\n[.l]-\\n[.i]-\\n[ps-deswid]
-. ie \\n[.$]>=3 .ds ps-desht \\n[ps-desht]
-. el .ds ps-desht \" empty
-\h'\\n[ps-offset]u'\
-\X'ps: invis'\
-\Z'\D'p 0 \\n[ps-desht]u \\n[ps-deswid]u 0 0 -\\n[ps-desht]u''\
-\X'ps: endinvis'\
-\v'\\n[ps-desht]u'\X'ps: import \\$1 \
-\\n[llx] \\n[lly] \\n[urx] \\n[ury] \\n[ps-deswid] \\*[ps-desht]'
-. br
-. sp \\n[ps-desht]u
-.\}
-.HTML-IMAGE-END
-..
diff --git a/contrib/groff/tmac/s.tmac b/contrib/groff/tmac/s.tmac
deleted file mode 100644
index 7d1ad49c95ee..000000000000
--- a/contrib/groff/tmac/s.tmac
+++ /dev/null
@@ -1,1934 +0,0 @@
-.\" -*- nroff -*-
-.ig
-
-s.tmac
-
-Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
- Written by James Clark (jjc@jclark.com)
-
-This file is part of groff.
-
-groff is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-groff is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License along
-with groff; see the file COPYING. If not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-..
-.if !\n(.g .ab These ms macros require groff.
-.if \n(.C \
-. ab The groff ms macros do not work in compatibility mode.
-.\" Enable warnings. You can delete this if you want.
-.warn
-.\" See if already loaded.
-.if r GS .nx
-.nr GS 1
-.de @error
-.tm \\n(.F:\\n(.c: macro error: \\$*
-..
-.de @warning
-.tm \\n(.F:\\n(.c: macro warning: \\$*
-..
-.de @fatal
-.ab \\n(.F:\\n(.c: fatal macro error: \\$*
-..
-.de @not-implemented
-.@error sorry, \\$0 not implemented
-.als \\$0 @nop
-..
-.als TM @not-implemented
-.als CT @not-implemented
-.de @nop
-..
-.de @init
-.nr PO \\n(.o
-.\" a non-empty environment
-.ev ne
-\c
-.ev
-.ev nf
-'nf
-.ev
-..
-.ds REFERENCES References
-.ds ABSTRACT ABSTRACT
-.ds TOC Table of Contents
-.ds MONTH1 January
-.ds MONTH2 February
-.ds MONTH3 March
-.ds MONTH4 April
-.ds MONTH5 May
-.ds MONTH6 June
-.ds MONTH7 July
-.ds MONTH8 August
-.ds MONTH9 September
-.ds MONTH10 October
-.ds MONTH11 November
-.ds MONTH12 December
-.ds MO \\*[MONTH\n[mo]]
-.ds DY \n[dy] \*[MO] \n[year]
-.de ND
-.if \\n[.$] .ds DY "\\$*
-..
-.de DA
-.if \\n[.$] .ds DY "\\$*
-.ds CF \\*[DY]
-..
-.\" indexing
-.de IX
-.tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[PN]
-..
-.\" print an error message and then try to recover
-.de @error-recover
-.@error \\$@ (recovering)
-.nr *pop-count 0
-.while !'\\n(.z'' \{\
-. \"@warning automatically terminating diversion \\n(.z
-. ie d @div-end!\\n(.z .@div-end!\\n(.z
-. el .*div-end-default
-. nr *pop-count +1
-. \" ensure that we don't loop forever
-. if \\n[*pop-count]>20 .@fatal recovery failed
-.\}
-.while !'\\n[.ev]'0' .ev
-.par@reset-env
-.par@reset
-..
-.de *div-end-default
-.ds *last-div \\n(.z
-.br
-.di
-.ev nf
-.\\*[*last-div]
-.ev
-..
-.\" ****************************
-.\" ******** module cov ********
-.\" ****************************
-.\" Cover sheet and first page.
-.de cov*err-not-after-first-page
-.@error \\$0 is not allowed after the first page has started
-..
-.de cov*err-not-before-tl
-.@error \\$0 is not allowed before TL
-..
-.de cov*err-not-again
-.@error \\$0 is not allowed more than once
-..
-.de cov*err-not-after-ab
-.@error \\$0 is not allowed after first AB, LP, PP, IP, SH or NH
-..
-.als AU cov*err-not-before-tl
-.als AI cov*err-not-before-tl
-.als AB cov*err-not-before-tl
-.de cov*first-page-init
-.rm cov*first-page-init
-.par@init
-.als RP cov*err-not-after-first-page
-.@init
-.ie \\n[cov*rp-format] \{\
-. pg@cs-top
-. als FS cov*FS
-. als FE cov*FE
-.\}
-.el \{\
-. pg@top
-. als FS @FS
-. als FE @FE
-.\}
-.wh 0 pg@top
-.CHECK-FOOTER-AND-KEEP
-..
-.wh 0 cov*first-page-init
-.\" This handles the case where FS occurs before TL or LP.
-.de FS
-.br
-\\*[FS]\\
-..
-.nr cov*rp-format 0
-.nr cov*rp-no 0
-.\" released paper format
-.de RP
-.nr cov*rp-format 1
-.if \\n[.$] .if '\\$1'no' .nr cov*rp-no 1
-.pn 0
-..
-.de TL
-.br
-.als TL cov*err-not-again
-.rn @AB AB
-.rn @AU AU
-.rn @AI AI
-.if !'\*(.T'html' .di cov*tl-div
-.par@reset
-.ft B
-.ps +2
-.vs +3p
-.ll (u;\\n[LL]*5/6)
-.nr cov*n-au 0
-.HTML-TAG ".tl"
-..
-.de @AU
-.par@reset
-.if !'\\n(.z'' \{\
-. br
-. di
-.\}
-.nr cov*n-au +1
-.di cov*au-div!\\n[cov*n-au]
-.nf
-.ft I
-.ps \\n[PS]
-..
-.de @AI
-.if !'\*(.T'html' .par@reset
-.if !'\\n(.z'' \{\
-. br
-. di
-.\}
-.ie !\\n[cov*n-au] .@error AI before AU
-.el \{\
-. di cov*ai-div!\\n[cov*n-au]
-. nf
-. ft R
-. ps \\n[PS]
-.\}
-..
-.de LP
-.if !'\\n[.z]'' \{\
-. br
-. di
-.\}
-.br
-.cov*ab-init
-.cov*print
-\\*[\\$0]\\
-..
-.als IP LP
-.als PP LP
-.als XP LP
-.als QP LP
-.als RS LP
-.als NH LP
-.als SH LP
-.als MC LP
-.als RT LP
-.als XS LP
-.de cov*ab-init
-.als cov*ab-init @nop
-.als LP @LP
-.als IP @IP
-.als PP @PP
-.als XP @XP
-.als RT @RT
-.als XS @XS
-.als SH @SH
-.als NH @NH
-.als QP @QP
-.als RS @RS
-.als RE @RE
-.als QS @QS
-.als QE @QE
-.als MC @MC
-.als EQ @EQ
-.als EN @EN
-.als TS @TS
-.als AB cov*err-not-after-ab
-.als AU par@AU
-.als AI par@AI
-.als TL par@TL
-..
-.de @AB
-.if !'\\n(.z'' \{\
-. br
-. di
-.\}
-.cov*ab-init
-.if !'\*(.T'html' .di cov*ab-div
-.par@ab-indent
-.par@reset
-.if !'\\$1'no' \{\
-. ft I
-. ce 1
-\\*[ABSTRACT]
-. sp
-. ft R
-.\}
-.ns
-.@PP
-.if '\*(.T'html' \{\
-. cov*tl-au-print
-. als cov*tl-au-print @nop
-. par@reset-env
-. par@reset
-. cov*print
-.\}
-..
-.de AE
-.ie '\*(.T'html' \{\
-. als AE cov*err-not-again
-.\}
-.el \{\
-. ie '\\n(.z'cov*ab-div' \{\
-. als AE cov*err-not-again
-. br
-. di
-.\" nr cov*ab-height \\n[dn]
-. par@reset-env
-. par@reset
-. cov*print
-. \}
-. el .@error AE without AB
-.\}
-..
-.de @div-end!cov*ab-div
-.AE
-..
-.de cov*print
-.als cov*print @nop
-.ie d cov*tl-div \{\
-. ie \\n[cov*rp-format] .cov*rp-print
-. el .cov*draft-print
-.\}
-.el \{\
-. if \\n[cov*rp-format] \{\
-. @warning RP format but no TL
-. bp 1
-. als FS @FS
-. als FE @FE
-. CHECK-FOOTER-AND-KEEP
-. \}
-. br
-.\}
-..
-.de cov*rp-print
-.nr cov*page-length \\n[.p]
-.pl 1000i
-.cov*tl-au-print
-.sp 3
-.if d cov*ab-div \{\
-. if !'\*(.T'html' . nf
-. cov*ab-div
-.\}
-.sp 3
-.par@reset
-\\*[DY]
-.br
-.if \\n[cov*fn-height] \{\
-. sp |(u;\\n[cov*page-length]-\\n[FM]\
--\\n[cov*fn-height]-\\n[fn@sep-dist]>?\\n[nl])
-. fn@print-sep
-. ev nf
-. cov*fn-div
-. ev
-. ie \\n[cov*rp-no] .rm cov*fn-div
-. el \{\
-. rn cov*fn-div fn@overflow-div
-. nr fn@have-overflow 1
-. \}
-.\}
-.als FS @FS
-.als FE @FE
-.CHECK-FOOTER-AND-KEEP
-.\" If anything was printed below where the footer line is normally printed,
-.\" then that's an overflow.
-.if -\\n[FM]/2+1v+\\n[cov*page-length]<\\n[nl] .@error cover sheet overflow
-.pl \\n[cov*page-length]u
-.bp 1
-.if !\\n[cov*rp-no] .cov*tl-au-print
-.rs
-.sp 1
-..
-.de cov*draft-print
-.cov*tl-au-print
-.if d cov*ab-div \{\
-. nf
-. sp 2
-. cov*ab-div
-.\}
-.sp 1
-..
-.de cov*tl-au-print
-.par@reset
-.nf
-.rs
-.sp 3
-.ce 9999
-.if d cov*tl-div .cov*tl-div
-.nr cov*i 1
-.nr cov*sp 1v
-.while \\n[cov*i]<=\\n[cov*n-au] \{\
-. sp \\n[cov*sp]u
-. cov*au-div!\\n[cov*i]
-. ie d cov*ai-div!\\n[cov*i] \{\
-. sp .5v
-. cov*ai-div!\\n[cov*i]
-. nr cov*sp 1v
-. \}
-. el .nr cov*sp .5v
-. nr cov*i +1
-.\}
-.ce 0
-..
-.nr cov*fn-height 0
-.nr cov*in-fn 0
-.\" start of footnote on cover
-.de cov*FS
-.if \\n[cov*in-fn] \{\
-. @error nested FS
-. FE
-.\}
-.nr cov*in-fn 1
-.ev fn
-.par@reset-env
-.da cov*fn-div
-.if !\\n[cov*fn-height] .ns
-.ie \\n[.$] .FP "\\$1" no
-.el .@LP
-..
-.de @div-end!cov*fn-div
-.cov*FE
-..
-.\" end of footnote on cover
-.de cov*FE
-.ie '\\n(.z'cov*fn-div' \{\
-. br
-. ev
-. di
-. nr cov*in-fn 0
-. nr cov*fn-height +\\n[dn]
-.\}
-.el .@error FE without matching FS
-..
-.\" ***************************
-.\" ******** module pg ********
-.\" ***************************
-.\" Page-level formatting.
-.\" > 0 if we have a footnote on the current page
-.nr pg@fn-flag 0
-.nr pg@colw 0
-.nr pg@fn-colw 0
-.nr HM 1i
-.nr FM 1i
-.ds LF
-.ds CF
-.ds RF
-.ds LH
-.ds CH -\\n[PN]-
-.ds RH
-.ds pg*OH '\\*[LH]'\\*[CH]'\\*[RH]'
-.ds pg*EH '\\*[LH]'\\*[CH]'\\*[RH]'
-.ds pg*OF '\\*[LF]'\\*[CF]'\\*[RF]'
-.ds pg*EF '\\*[LF]'\\*[CF]'\\*[RF]'
-.de OH
-.ds pg*\\$0 "\\$*
-..
-.als EH OH
-.als OF OH
-.als EF OH
-.de PT
-.ie \\n%=1 .if \\n[pg*P1] .tl \\*[pg*OH]
-.el \{\
-. ie o .tl \\*[pg*OH]
-. el .tl \\*[pg*EH]
-.\}
-..
-.de BT
-.ie o .tl \\*[pg*OF]
-.el .tl \\*[pg*EF]
-..
-.nr pg*P1 0
-.de P1
-.nr pg*P1 1
-..
-.wh -\n[FM]u pg@bottom
-.wh -\n[FM]u/2u pg*footer
-.nr MINGW 2n
-.nr pg@ncols 1
-.de @MC
-.if !'\\n(.z'' .error-recover MC while diversion open
-.br
-.ie \\n[pg@ncols]>1 .pg@super-eject
-.el \{\
-. \" flush out any floating keeps
-. while \\n[kp@tail]>\\n[kp@head] \{\
-. rs
-. bp
-. \}
-.\}
-.ie !\\n(.$ \{\
-. nr pg@colw \\n[LL]*7/15
-. nr pg*gutw \\n[LL]-(2*\\n[pg@colw])
-. nr pg@ncols 2
-.\}
-.el \{\
-. nr pg@colw (n;\\$1)<?\\n[LL]
-. ie \\n[.$]<2 .nr pg*gutw \\n[MINGW]
-. el .nr pg*gutw (n;\\$2)
-. nr pg@ncols \\n[LL]-\\n[pg@colw]/(\\n[pg@colw]+\\n[pg*gutw])+1
-. ie \\n[pg@ncols]>1 \
-. nr pg*gutw \\n[LL]-(\\n[pg@ncols]*\\n[pg@colw])/(\\n[pg@ncols]-1)
-. el .nr pg*gutw 0
-.\}
-.HTML-TAG ".mc \\n[pg@ncols] \\n[pg@colw] \\n[pg*gutw]"
-.mk pg*col-top
-.ns
-.nr pg*col-num 0
-.nr pg@fn-colw \\n[pg@colw]*5/6
-.par@reset
-..
-.de 2C
-.MC
-..
-.de 1C
-.MC \\n[LL]u
-..
-.\" top of page macro
-.de pg@top
-.ch pg*footer -\\n[FM]u/2u
-.nr PN \\n%
-.nr pg*col-num 0
-.nr pg@fn-bottom-margin 0
-.nr pg*saved-po \\n[PO]
-.po \\n[PO]u
-.ev h
-.par@reset
-.sp (u;\\n[HM]/2)
-.PT
-.sp |\\n[HM]u
-.if d HD .HD
-.mk pg@header-bottom
-.ev
-.mk pg*col-top
-.pg*start-col
-..
-.de pg*start-col
-.\" Handle footnote overflow before floating keeps, because the keep
-.\" might contain an embedded footnote.
-.fn@top-hook
-.kp@top-hook
-.tbl@top-hook
-.ns
-..
-.de pg@cs-top
-.sp \\n[HM]u
-.\" move pg@bottom and pg*footer out of the way
-.ch pg@bottom \\n[.p]u*2u
-.ch pg*footer \\n[.p]u*2u
-.ns
-..
-.de pg@bottom
-.tbl@bottom-hook
-.if \\n[pg@fn-flag] .fn@bottom-hook
-.nr pg*col-num +1
-.ie \\n[pg*col-num]<\\n[pg@ncols] .pg*end-col
-.el .pg*end-page
-..
-.de pg*end-col
-'sp |\\n[pg*col-top]u
-.po (u;\\n[pg*saved-po]+(\\n[pg@colw]+\\n[pg*gutw]*\\n[pg*col-num]))
-.\"po +(u;\\n[pg@colw]+\\n[pg*gutw])
-.pg*start-col
-..
-.de pg*end-page
-.po \\n[pg*saved-po]u
-.\" Make sure we don't exit if there are still floats or footnotes left-over.
-.ie \\n[kp@head]<\\n[kp@tail]:\\n[fn@have-overflow] \{\
-. \" Switching environments ensures that we don't get an unnecessary
-. \" blank line at the top of the page.
-. ev ne
-' bp
-. ev
-.\}
-.el \{\
-. \" If the text has ended and there are no more footnotes or keeps, exit.
-. if \\n[pg@text-ended] .ex
-. if r pg*next-number \{\
-. pn \\n[pg*next-number]
-. rr pg*next-number
-. if d pg*next-format \{\
-. af PN \\*[pg*next-format]
-. rm pg*next-format
-. \}
-. \}
-' bp
-.\}
-..
-.\" pg@begin number format
-.de pg@begin
-.ie \\n[.$]>0 \{\
-. nr pg*next-number (;\\$1)
-. ie \\n[.$]>1 .ds pg*next-format \\$2
-. el .rm pg*next-format
-.\}
-.el .rr pg*next-number
-.pg@super-eject
-..
-.\" print the footer line
-.de pg*footer
-.ev h
-.par@reset
-.BT
-.ev
-..
-.\" flush out any keeps or footnotes
-.de pg@super-eject
-.br
-.if !'\\n(.z'' .@error-recover diversion open while ejecting page
-.\" Make sure we stay in the end macro while there is still footnote overflow
-.\" left, or floating keeps.
-.while \\n[kp@tail]>\\n[kp@head]:\\n[pg@fn-flag] \{\
-. rs
-. bp
-.\}
-.bp
-..
-.nr pg@text-ended 0
-.de pg@end-text
-.br
-.nr pg@text-ended 1
-.pg@super-eject
-..
-.em pg@end-text
-.\" ***************************
-.\" ******** module fn ********
-.\" ***************************
-.\" Footnotes.
-.nr fn@sep-dist 8p
-.ev fn
-.\" Round it vertically
-.vs \n[fn@sep-dist]u
-.nr fn@sep-dist \n[.v]
-.ev
-.nr fn*text-num 0 1
-.nr fn*note-num 0 1
-.ds * \\*[par@sup-start]\En+[fn*text-num]\\*[par@sup-end]
-.nr fn*open 0
-.\" normal FS
-.de @FS
-.ie \\n[.$] .fn*do-FS "\\$1" no
-.el \{\
-. ie \\n[fn*text-num]>\\n[fn*note-num] .fn*do-FS \\n+[fn*note-num]
-. el .fn*do-FS
-.\}
-..
-.\" Second argument of `no' means don't embellish the first argument.
-.de fn*do-FS
-.if \\n[fn*open] .@error-recover nested FS
-.nr fn*open 1
-.if \\n[.u] \{\
-. \" Ensure that the first line of the footnote is on the same page
-. \" as the reference. I think this is minimal.
-. ev fn
-. nr fn*need 1v
-. ev
-. ie \\n[pg@fn-flag] .nr fn*need +\\n[fn:PD]
-. el .nr fn*need +\\n[fn@sep-dist]
-. ne \\n[fn*need]u+\\n[.V]u>?0
-.\}
-.ev fn
-.par@reset-env
-.fn*start-div
-.par@reset
-.ie \\n[.$] .FP \\$@
-.el .@LP
-..
-.de @FE
-.ie !\\n[fn*open] .@error FE without FS
-.el \{\
-. nr fn*open 0
-. br
-. ev
-. fn*end-div
-.\}
-..
-.nr fn@have-overflow 0
-.\" called at the top of each column
-.de fn@top-hook
-.nr fn*max-width 0
-.nr fn*page-bottom-pos 0-\\n[FM]-\\n[pg@fn-bottom-margin]
-.ch pg@bottom \\n[fn*page-bottom-pos]u
-.if \\n[fn@have-overflow] \{\
-. nr fn@have-overflow 0
-. fn*start-div
-. ev nf
-. fn@overflow-div
-. ev
-. fn*end-div
-.\}
-..
-.\" This is called at the bottom of the column if pg@fn-flag is set.
-.de fn@bottom-hook
-.nr pg@fn-flag 0
-.nr fn@have-overflow 0
-.nr fn@bottom-pos \\n[.p]-\\n[FM]-\\n[pg@fn-bottom-margin]+\\n[.v]
-.ev fn
-.nr fn@bottom-pos -\\n[.v]
-.ev
-.ie \\n[nl]+\\n[fn@sep-dist]+\n[.V]>\\n[fn@bottom-pos] \{\
-. rn fn@div fn@overflow-div
-. nr fn@have-overflow 1
-.\}
-.el \{\
-. if \\n[pg@ncols]>1 \
-. if \\n[fn*max-width]>\\n[pg@fn-colw] \
-. nr pg@fn-bottom-margin \\n[.p]-\\n[FM]-\\n[nl]+1v
-. wh \\n[fn@bottom-pos]u fn*catch-overflow
-. fn@print-sep
-. ev nf
-. fn@div
-. rm fn@div
-. ev
-. if '\\n(.z'fn@overflow-div' \{\
-. di
-. nr fn@have-overflow \\n[dn]>0
-. \}
-. ch fn*catch-overflow
-.\}
-..
-.de fn*catch-overflow
-.di fn@overflow-div
-..
-.nr fn*embed-count 0
-.de @div-end!fn@div
-.br
-.if '\\n[.ev]'fn' .ev
-.fn*end-div
-.nr fn*open 0
-..
-.als @div-end!fn*embed-div @div-end!fn@div
-.de fn*start-div
-.ie '\\n(.z'' \{\
-. da fn@div
-. if !\\n[pg@fn-flag] .ns
-.\}
-.el .di fn*embed-div
-..
-.de fn*end-div
-.ie '\\n(.z'fn@div' \{\
-. di
-. nr fn*page-bottom-pos -\\n[dn]
-. nr fn*max-width \\n[fn*max-width]>?\\n[dl]
-. if !\\n[pg@fn-flag] .nr fn*page-bottom-pos -\\n[fn@sep-dist]
-. nr pg@fn-flag 1
-. nr fn*page-bottom-pos \\n[nl]-\\n[.p]+\n[.V]>?\\n[fn*page-bottom-pos]
-. ch pg@bottom \\n[fn*page-bottom-pos]u
-.\}
-.el \{\
-. ie '\\n(.z'fn*embed-div' \{\
-. di
-. rn fn*embed-div fn*embed-div!\\n[fn*embed-count]
-\!. fn*embed-start \\n[fn*embed-count]
-. rs
-' sp (u;\\n[dn]+\\n[fn@sep-dist]+\\n[.V])
-\!. fn*embed-end
-. nr fn*embed-count +1
-. \}
-. el \{\
-. ev fn
-. @error-recover unclosed diversion within footnote
-. \}
-.\}
-..
-.de fn*embed-start
-.ie '\\n(.z'' \{\
-. fn*start-div
-. ev nf
-. fn*embed-div!\\$1
-. rm fn*embed-div!\\$1
-. ev
-. fn*end-div
-. di fn*null
-.\}
-.el \{\
-\!. fn*embed-start \\$1
-. rs
-.\}
-..
-.de fn*embed-end
-.ie '\\n(.z'fn*null' \{\
-. di
-. rm fn*null
-.\}
-.el \!.fn*embed-end
-..
-.\" It's important that fn@print-sep use up exactly fn@sep-dist vertical space.
-.de fn@print-sep
-.ev fn
-.in 0
-.vs \\n[fn@sep-dist]u
-\D'l 1i 0'
-.br
-.ev
-..
-.\" ***************************
-.\" ******** module kp ********
-.\" ***************************
-.\" Keeps.
-.de KS
-.br
-.di kp*div
-..
-.de KF
-.if !'\\n(.z'' .@error-recover KF while open diversion
-.di kp*fdiv
-.ev k
-.par@reset-env
-.par@reset
-..
-.de KE
-.ie '\\n(.z'kp*div' .kp*end
-.el \{\
-. ie '\\n(.z'kp*fdiv' .kp*fend
-. el .@error KE without KS or KF
-.\}
-..
-.de @div-end!kp*div
-.kp*end
-..
-.de @div-end!kp*fdiv
-.kp*fend
-..
-.de kp*need
-.ie '\\n(.z'' .ds@need \\$1
-.el \!.kp*need \\$1
-..
-.\" end non-floating keep
-.de kp*end
-.br
-.di
-.kp*need \\n[dn]
-.ev nf
-.kp*div
-.ev
-.rm kp*div
-..
-.\" Floating keeps.
-.nr kp@head 0
-.nr kp@tail 0
-.\" end floating keep
-.de kp*fend
-.br
-.ev
-.di
-.ie \\n[.t]-(\\n[.k]>0*1v)>\\n[dn] \{\
-. br
-. ev nf
-. kp*fdiv
-. rm kp*fdiv
-. ev
-.\}
-.el \{\
-. rn kp*fdiv kp*div!\\n[kp@tail]
-. nr kp*ht!\\n[kp@tail] 0\\n[dn]
-. nr kp@tail +1
-.\}
-..
-.\" top of page processing for KF
-.nr kp*doing-top 0
-.de kp@top-hook
-.if !\\n[kp*doing-top] \{\
-. nr kp*doing-top 1
-. kp*do-top
-. nr kp*doing-top 0
-.\}
-..
-.de kp*do-top
-.\" If the first keep won't fit, only force it out if we haven't had a footnote
-.\" and we're at the top of the page.
-.nr kp*force \\n[pg@fn-flag]=0&(\\n[nl]<=\\n[pg@header-bottom])
-.nr kp*fits 1
-.while \\n[kp@tail]>\\n[kp@head]&\\n[kp*fits] \{\
-. ie \\n[.t]>\\n[kp*ht!\\n[kp@head]]:\\n[kp*force] \{\
-. nr kp*force 0
-. \" It's important to advance kp@head before bringing
-. \" back the keep, so that if the last line of the
-. \" last keep springs the bottom of page trap, a new
-. \" page will not be started unnecessarily.
-. rn kp*div!\\n[kp@head] kp*temp
-. nr kp@head +1
-. ev nf
-. kp*temp
-. ev
-. rm kp*temp
-. \}
-. el .nr kp*fits 0
-.\}
-..
-.\" ***************************
-.\" ******** module ds ********
-.\" ***************************
-.\" Displays and non-floating keeps.
-.de DE
-.ds*end!\\n[\\n[.ev]:ds-type]
-.nr \\n[.ev]:ds-type 0
-..
-.de ds@auto-end
-.if \\n[\\n[.ev]:ds-type] \{\
-. @error automatically terminating display
-. DE
-.\}
-..
-.de @div-end!ds*div
-.ie \\n[\\n[.ev]:ds-type] .DE
-.el .ds*end!2
-..
-.de ds*end!0
-.@error DE without DS, ID, CD, LD or BD
-..
-.de LD
-.br
-.nr \\n[.ev]:ds-type 1
-.par@reset
-.nf
-.sp \\n[DD]u
-..
-.de ID
-.LD
-.ie \\n[.$] .in +(n;\\$1)
-.el .in +\\n[DI]u
-..
-.de CD
-.LD
-.ce 9999
-..
-.de RD
-.LD
-.rj 9999
-..
-.de ds*common-end
-.par@reset
-.sp \\n[DD]u
-..
-.als ds*end!1 ds*common-end
-.de BD
-.LD
-.nr \\n[.ev]:ds-type 2
-.di ds*div
-..
-.de ds*end!2
-.br
-.ie '\\n(.z'ds*div' \{\
-. di
-. nf
-. in (u;\\n[.l]-\\n[dl]/2>?0)
-. ds*div
-. rm ds*div
-. ds*common-end
-.\}
-.el .@error-recover mismatched DE
-..
-.de DS
-.br
-.di ds*div
-.ie '\\$1'B' \{\
-. LD
-. nr \\n[.ev]:ds-type 4
-.\}
-.el \{\
-. ie '\\$1'L' .LD
-. el \{\
-. ie '\\$1'C' .CD
-. el \{\
-. ie '\\$1'R' .RD
-. el \{\
-. ie '\\$1'I' .ID \\$2
-. el .ID \\$1
-. \}
-. \}
-. \}
-. nr \\n[.ev]:ds-type 3
-.\}
-..
-.de ds@need
-.if '\\n(.z'' \{\
-. while \\n[.t]<=(\\$1)&(\\n[nl]>\\n[pg@header-bottom]) \{\
-. rs
-' sp \\n[.t]u
-. \}
-.\}
-..
-.de ds*end!3
-.br
-.ie '\\n(.z'ds*div' \{\
-. di
-. ds@need \\n[dn]
-. ev nf
-. ds*div
-. ev
-. rm ds*div
-. ds*common-end
-.\}
-.el .@error-recover mismatched DE
-..
-.de ds*end!4
-.ie '\\n(.z'ds*div' \{\
-. br
-. di
-. nf
-. in (u;\\n[.l]-\\n[dl]/2>?0)
-. ds@need \\n[dn]
-. ds*div
-. rm ds*div
-. ds*common-end
-.\}
-.el .@error-recover mismatched DE
-..
-.\" ****************************
-.\" ******** module par ********
-.\" ****************************
-.\" Paragraph-level formatting.
-.\" Load time initialization.
-.de par@load-init
-.\" PS and VS might have been set on the command-line
-.if !rPS .nr PS 10
-.if !rLL .nr LL 6i
-.ll \\n[LL]u
-.\" don't set LT so that it can be defaulted from LL
-.ie rLT .lt \\n[LT]u
-.el .lt \\n[LL]u
-.ps \\n[PS]
-.\" don't set VS so that it can be defaulted from PS
-.ie rVS .par*vs \\n[VS]
-.el .par*vs \\n[PS]+2
-.if dFAM .fam \\*[FAM]
-.if !rHY .nr HY 14
-.hy \\n[HY]
-.TA
-.CHECK-FOOTER-AND-KEEP
-..
-.de par*vs
-.\" If it's too big to be in points, treat it as units.
-.ie (p;\\$1)>=40p .vs (u;\\$1)
-.el .vs (p;\\$1)
-..
-.de par@ab-indent
-.nr 0:li (u;\\n[LL]/12)
-.nr 0:ri \\n[0:li]
-..
-.de par*env-init
-.aln \\n[.ev]:PS PS
-.aln \\n[.ev]:VS VS
-.aln \\n[.ev]:LL LL
-.aln \\n[.ev]:MCLL LL
-.aln \\n[.ev]:LT LT
-.aln \\n[.ev]:MCLT LT
-.aln \\n[.ev]:PI PI
-.aln \\n[.ev]:PD PD
-.ad \\n[par*adj]
-.par@reset-env
-..
-.\" happens when the first page begins
-.de par@init
-.if !rLT .nr LT \\n[LL]
-.if !rFL .nr FL \\n[LL]*5/6
-.if !rVS .nr VS \\n[PS]+2
-.if !rDI .nr DI .5i
-.if !rFPS .nr FPS \\n[PS]-2
-.if !rFVS .nr FVS \\n[FPS]+2
-.\" don't change environment 0
-.ev h
-.ps \\n[PS]
-.if !rQI .nr QI 5n
-.if !rPI .nr PI 5n
-.par*vs \\n[VS]
-.if !rPD .nr PD .3v>?\n(.V
-.if !rDD .nr DD .5v>?\n(.V
-.if !rFI .nr FI 2n
-.if !rFPD .nr FPD \\n[PD]/2
-.ev
-.if !dFAM .ds FAM \\n[.fam]
-.nr par*adj \\n[.j]
-.par*env-init
-.ev h
-.par*env-init
-.ev
-.ev fn
-.par*env-init
-.ev
-.ev k
-.par*env-init
-.ev
-.aln 0:MCLL pg@colw
-.aln 0:MCLT pg@colw
-.aln k:MCLL pg@colw
-.aln k:MCLT pg@colw
-.aln fn:PS FPS
-.aln fn:VS FVS
-.aln fn:LL FL
-.aln fn:LT FL
-.aln fn:PI FI
-.aln fn:PD FPD
-.aln fn:MCLL pg@fn-colw
-.aln fn:MCLT pg@fn-colw
-..
-.de par@reset-env
-.nr \\n[.ev]:il 0
-.nr \\n[.ev]:li 0
-.nr \\n[.ev]:ri 0
-.nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
-.nr \\n[.ev]:pli 0
-.nr \\n[.ev]:pri 0
-.nr \\n[.ev]:ds-type 0
-..
-.\" par@reset
-.de par@reset
-.br
-.ce 0
-.rj 0
-.ul 0
-.fi
-.ie \\n[pg@ncols]>1 \{\
-. ll (u;\\n[\\n[.ev]:MCLL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri])
-. lt \\n[\\n[.ev]:MCLT]u
-.\}
-.el \{\
-. ll (u;\\n[\\n[.ev]:LL]-\\n[\\n[.ev]:ri]-\\n[\\n[.ev]:pri])
-. lt \\n[\\n[.ev]:LT]u
-.\}
-.in (u;\\n[\\n[.ev]:li]+\\n[\\n[.ev]:pli])
-.ft 1
-.fam \\*[FAM]
-.ps \\n[\\n[.ev]:PS]
-.par*vs \\n[\\n[.ev]:VS]
-.ls 1
-.TA
-.hy \\n[HY]
-..
-.de @RT
-.nr \\n[.ev]:pli 0
-.nr \\n[.ev]:pri 0
-.par@reset
-..
-.\" This can be redefined by the user.
-.de TA
-.ta T 5n
-..
-.de par*start
-.ds@auto-end
-.nr \\n[.ev]:pli \\$1
-.nr \\n[.ev]:pri \\$2
-.par@reset
-.sp \\n[\\n[.ev]:PD]u
-.ne 1v+\\n(.Vu
-..
-.de par@finish
-.nr \\n[.ev]:pli 0
-.nr \\n[.ev]:pri 0
-.par@reset
-..
-.\" normal LP
-.de @LP
-.par*start 0 0
-.nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
-..
-.de @PP
-.par*start 0 0
-.nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
-.if !'\*(.T'html' .ti +\\n[\\n[.ev]:ai]u
-..
-.de @QP
-.nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
-.par*start \\n[QI] \\n[QI]
-..
-.de @XP
-.par*start \\n[\\n[.ev]:PI] 0
-.ti -\\n[\\n[.ev]:PI]u
-..
-.de @IP
-.if \\n[.$]>1 .nr \\n[.ev]:ai (n;\\$2)
-.par*start \\n[\\n[.ev]:ai] 0
-.if !'\\$1'' \{\
-. \" Divert the label so as to freeze any spaces.
-. di par*label
-. par*push-tag-env
-\&\\$1
-. par*pop-tag-env
-. di
-. chop par*label
-. ie '\*(.T'html' \{\
-. if \\n[dl]+1n<=\\n[\\n[.ev]:ai] .HTML-TAG ".ip"
-. ti 0
-\&\\$1
-. br
-. \}
-. el \{\
-. ti -\\n[\\n[.ev]:ai]u
-. ie \\n[dl]+1n<=\\n[\\n[.ev]:ai] \\*[par*label]\h'|\\n[\\n[.ev]:ai]u'\c
-. el \{\
-\\*[par*label]
-. br
-. \}
-. \}
-. rm par*label
-.\}
-..
-.\" We don't want margin characters to be attached when we divert
-.\" the tag. Since there's no way to save and restore the current
-.\" margin character, we have to switch to a new environment, taking
-.\" what we need of the old environment with us.
-.de par*push-tag-env
-.nr par*saved-font \\n[.f]
-.nr par*saved-size \\n[.s]z
-.nr par*saved-ss \\n[.ss]
-.ds par*saved-fam \\n[.fam]
-.ev par
-.nf
-.TA
-.ft \\n[par*saved-font]
-.ps \\n[par*saved-size]u
-.ss \\n[par*saved-ss]
-.fam \\*[par*saved-fam]
-..
-.de par*pop-tag-env
-.ev
-..
-.de @RS
-.br
-.nr \\n[.ev]:li!\\n[\\n[.ev]:il] \\n[\\n[.ev]:li]
-.nr \\n[.ev]:ri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ri]
-.nr \\n[.ev]:ai!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ai]
-.nr \\n[.ev]:pli!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pli]
-.nr \\n[.ev]:pri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pri]
-.nr \\n[.ev]:il +1
-.nr \\n[.ev]:li +\\n[\\n[.ev]:ai]
-.nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
-.par@reset
-..
-.de @RE
-.br
-.ie \\n[\\n[.ev]:il] \{\
-. nr \\n[.ev]:il -1
-. nr \\n[.ev]:ai \\n[\\n[.ev]:ai!\\n[\\n[.ev]:il]]
-. nr \\n[.ev]:li \\n[\\n[.ev]:li!\\n[\\n[.ev]:il]]
-. nr \\n[.ev]:ri \\n[\\n[.ev]:ri!\\n[\\n[.ev]:il]]
-. nr \\n[.ev]:pli \\n[\\n[.ev]:pli!\\n[\\n[.ev]:il]]
-. nr \\n[.ev]:pri \\n[\\n[.ev]:pri!\\n[\\n[.ev]:il]]
-.\}
-.el .@error unbalanced \\$0
-.par@reset
-..
-.de @QS
-.br
-.nr \\n[.ev]:li!\\n[\\n[.ev]:il] \\n[\\n[.ev]:li]
-.nr \\n[.ev]:ri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ri]
-.nr \\n[.ev]:ai!\\n[\\n[.ev]:il] \\n[\\n[.ev]:ai]
-.nr \\n[.ev]:pli!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pli]
-.nr \\n[.ev]:pri!\\n[\\n[.ev]:il] \\n[\\n[.ev]:pri]
-.nr \\n[.ev]:il +1
-.nr \\n[.ev]:li +\\n[QI]
-.nr \\n[.ev]:ri +\\n[QI]
-.nr \\n[.ev]:ai \\n[\\n[.ev]:PI]
-.par@reset
-..
-.als @QE @RE
-.\" start boxed text
-.de B1
-.br
-.HTML-IMAGE
-.di par*box-div
-.nr \\n[.ev]:li +1n
-.nr \\n[.ev]:ri +1n
-.nr par*box-in \\n[.in]
-.\" remember what 1n is, just in case the point size changes
-.nr par*box-n 1n
-.in +1n
-.ll -1n
-.lt -1n
-.ti \\n[par*box-in]u+1n
-..
-.de @div-end!par*box-div
-.B2
-..
-.\" end boxed text
-.\" Postpone the drawing of the box until we're in the top-level diversion,
-.\" in case there's a footnote inside the box.
-.de B2
-.ie '\\n(.z'par*box-div' \{\
-. br
-. if \n[.V]>.25m .sp
-. di
-. if \n[.V]>.25m .sp
-. ds@need \\n[dn]
-. par*box-mark-top
-. ev nf
-. par*box-div
-. ev
-. nr \\n[.ev]:ri -\\n[par*box-n]
-. nr \\n[.ev]:li -\\n[par*box-n]
-. in -\\n[par*box-n]u
-. ll +\\n[par*box-n]u
-. lt +\\n[par*box-n]u
-. par*box-draw \\n[.i]u \\n[.l]u-(\\n[.H]u==1n*1n)
-.\}
-.el .@error B2 without B1
-.HTML-IMAGE-END
-..
-.de par*box-mark-top
-.ie '\\n[.z]'' \{\
-. rs
-. mk par*box-top
-.\}
-.el \!.par*box-mark-top
-..
-.de par*box-draw
-.ie '\\n[.z]'' \{\
-. nr par*box-in \\n[.i]
-. nr par*box-ll \\n[.l]
-. nr par*box-vpt \\n[.vpt]
-. nr par*box-ad \\n[.j]
-. ad l
-. vpt 0
-. in \\$1
-. ll \\$2
-\v'-1v+.25m'\
-\D'l (u;\\n[.l]-\\n[.i]) 0'\
-\D'l 0 |\\n[par*box-top]u'\
-\D'l -(u;\\n[.l]-\\n[.i]) 0'\
-\D'l 0 -|\\n[par*box-top]u'
-. br
-. sp -1
-. in \\n[par*box-in]u
-. ll \\n[par*box-ll]u
-. vpt \\n[par*box-vpt]
-. ad \\n[par*box-ad]
-.\}
-.el \!.par*box-draw \\$1 \\$2
-..
-.de @SH
-.par@finish
-.\" Keep together the heading and the first two lines of the next paragraph.
-.ne 3v+\\n[\\n[.ev]:PD]u+\\n(.Vu
-.sp 1
-.ft B
-.HTML-TAG ".SH 1"
-..
-.\" TL, AU, and AI are aliased to these in cov*ab-init.
-.de par@TL
-.par@finish
-.sp 1
-.ft B
-.ps +2
-.vs +3p
-.ce 9999
-.HTML-TAG ".tl"
-..
-.de par@AU
-.par@finish
-.sp 1
-.ft I
-.ce 9999
-..
-.de par@AI
-.par@finish
-.sp .5
-.ce 9999
-..
-.\" In paragraph macros.
-.de NL
-.ps \\n[\\n[.ev]:PS]
-..
-.de SM
-.ps -2
-..
-.de LG
-.ps +2
-..
-.de R
-.ft R
-..
-.\" par*define-font-macro macro font
-.de par*define-font-macro
-.de \\$1
-.ie \\\\n[.$] \{\
-. nr par*prev-font \\\\n[.f]
-\&\\\\$3\f[\\$2]\\\\$1\f[\\\\n[par*prev-font]]\\\\$2
-.\}
-.el .ft \\$2
-\\..
-..
-.par*define-font-macro B B
-.par*define-font-macro I I
-.par*define-font-macro BI BI
-.par*define-font-macro CW CR
-.\" underline a word
-.de UL
-\Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m'\\$2
-..
-.\" box a word
-.de BX
-.nr par*bxw \w'\\$1'+.4m
-\Z'\v'.25m'\D'l 0 -1m'\D'l \\n[par*bxw]u 0'\D'l 0 1m'\D'l -\\n[par*bxw]u 0''\
-\Z'\h'.2m'\\$1'\
-\h'\\n[par*bxw]u'
-..
-.\" The first time UX is used, put a registered mark after it.
-.ds par*ux-rg \(rg
-.de UX
-\s[\\n[.s]*8u/10u]UNIX\s0\\$1\\*[par*ux-rg]
-.ds par*ux-rg
-..
-.ds par@sup-start \v'-.9m\s'\En[.s]*7u/10u'+.7m'
-.als { par@sup-start
-.ds par@sup-end \v'-.7m\s0+.9m'
-.als } par@sup-end
-.\" footnote paragraphs
-.\" FF is the footnote format
-.nr FF 0
-.\" This can be redefined. It gets a second argument of `no' if the first
-.\" argument was supplied by the user, rather than automatically.
-.de FP
-.br
-.if !d par*fp!\\n[FF] \{\
-. @error unknown footnote format `\\n[FF]'
-. nr FF 0
-.\}
-.ie '\\$2'no' .par*fp!\\n[FF]-no "\\$1"
-.el .par*fp!\\n[FF] "\\$1"
-..
-.de par*fp!0
-.@PP
-\&\\*[par@sup-start]\\$1\\*[par@sup-end]\ \c
-..
-.de par*fp!0-no
-.@PP
-\&\\$1\ \c
-..
-.de par*fp!1
-.@PP
-\&\\$1.\ \c
-..
-.de par*fp!1-no
-.@PP
-\&\\$1\ \c
-..
-.de par*fp!2
-.@LP
-\&\\$1.\ \c
-..
-.de par*fp!2-no
-.@LP
-\&\\$1\ \c
-..
-.de par*fp!3
-.@IP "\\$1." (u;\\n[\\n[.ev]:PI]*2)
-..
-.de par*fp!3-no
-.@IP "\\$1" (u;\\n[\\n[.ev]:PI]*2)
-..
-.\" ***************************
-.\" ******** module nh ********
-.\" ***************************
-.\" Numbered headings.
-.\" nh*hl is the level of the last heading
-.nr nh*hl 0
-.\" numbered heading
-.de @NH
-.HTML-TAG ".NH \\$1"
-.ie '\\$1'S' \{\
-. shift
-. nr nh*hl 0
-. while \\n[.$] \{\
-. nr nh*hl +1
-. nr H\\n[nh*hl] 0\\$1
-. shift
-. \}
-. if !\\n[nh*hl] \{\
-. nr H1 1
-. nr nh*hl 1
-. @error missing arguments to .NH S
-. \}
-.\}
-.el \{\
-. nr nh*ohl \\n[nh*hl]
-. ie \\n[.$] \{\
-. nr nh*hl 0\\$1
-. ie \\n[nh*hl]<=0 \{\
-. nr nh*ohl 0
-. nr nh*hl 1
-. \}
-. el \{\
-. if \\n[nh*hl]-\\n[nh*ohl]>1 \
-. @warning .NH \\n[nh*ohl] followed by .NH \\n[nh*hl]
-. \}
-. \}
-. el .nr nh*hl 1
-. while \\n[nh*hl]>\\n[nh*ohl] \{\
-. nr nh*ohl +1
-. nr H\\n[nh*ohl] 0
-. \}
-. nr H\\n[nh*hl] +1
-.\}
-.ds SN
-.nr nh*i 0
-.while \\n[nh*i]<\\n[nh*hl] \{\
-. nr nh*i +1
-. as SN \\n[H\\n[nh*i]].
-.\}
-.SH
-\\*[SN]
-..
-.\" ****************************
-.\" ******** module toc ********
-.\" ****************************
-.\" Table of contents generation.
-.de @XS
-.da toc*div
-.ev h
-.ie \\n[.$] .XA "\\$1"
-.el .XA
-..
-.de @div-end!toc*div
-.XE
-..
-.de XA
-.ie '\\n(.z'toc*div' \{\
-. if d toc*num .toc*end-entry
-. ie \\n[.$] \{\
-. ie '\\$1'no' .ds toc*num
-. el .ds toc*num "\\$1
-. \}
-. el .ds toc*num \\n[PN]
-. br
-. par@reset
-. na
-. ll -8n
-. in (n;0\\$2)
-.\}
-.el .@error XA without XS
-..
-.de XE
-.ie '\\n(.z'toc*div' \{\
-. if d toc*num .toc*end-entry
-. ev
-. di
-.\}
-.el .@error XS without XE
-..
-.de toc*end-entry
-\\a\\t\\*[toc*num]
-.br
-.rm toc*num
-..
-.de PX
-.1C
-.if !'\\$1'no' \{\
-. ce 1
-. ps \\n[PS]+2
-. ft B
-\\*[TOC]
-. ft
-. ps
-.\}
-.nf
-.char \[toc*leader-char] .\h'1m'
-.lc \[toc*leader-char]
-.ta (u;\\n[.l]-\\n[.i]-\w'000') (u;\\n[.l]-\\n[.i])R
-.sp 2
-.toc*div
-.par@reset
-..
-.\" print the table of contents on page i
-.de TC
-.P1
-.pg@begin 1 i
-.PX \\$1
-..
-.\" ****************************
-.\" ******** module eqn ********
-.\" ****************************
-.\" Eqn support.
-.de EQ
-..
-.de EN
-..
-.de @EQ
-.br
-.ds eqn*num "\\$2
-.ie '\\$1'L' .nr eqn*type 0
-.el \{\
-. ie '\\$1'I' .nr eqn*type 1
-. el \{\
-. nr eqn*type 2
-. if !'\\$1'C' .ds eqn*num "\\$1
-. \}
-.\}
-.di eqn*div
-.in 0
-.nf
-..
-.de @div-end!eqn*div
-.@EN
-..
-.\" Note that geqn mark and lineup work correctly in centered equations.
-.de @EN
-.ie !'\\n(.z'eqn*div' .@error-recover mismatched EN
-.el \{\
-. br
-. di
-. nr eqn*have-num 0
-. if !'\\*[eqn*num]'' .nr eqn*have-num 1
-. if \\n[dl]:\\n[eqn*have-num] \{\
-. sp \\n[DD]u
-. par@reset
-. ds eqn*tabs \\n[.tabs]
-. nf
-. ie \\n[dl] \{\
-. ds@need \\n[dn]u-1v+\n[.V]u
-. chop eqn*div
-. ie \\n[eqn*type]=0 \{\
-. ta (u;\\n[.l]-\\n[.i])R
-\\*[eqn*div]\t\\*[eqn*num]
-. \}
-. el \{\
-. ie \\n[eqn*type]=1 .ta \\n[DI]u \
-(u;\\n[.l]-\\n[.i])R
-. el .ta (u;\\n[.l]-\\n[.i]/2)C \
-(u;\\n[.l]-\\n[.i])R
-\t\\*[eqn*div]\t\\*[eqn*num]
-. \}
-. \}
-. el \{\
-. ta (u;\\n[.l]-\\n[.i])R
-\t\\*[eqn*num]
-. \}
-. sp \\n[DD]u
-. ta \\*[eqn*tabs]
-. \}
-. fi
-.\}
-..
-.\" ****************************
-.\" ******** module tbl ********
-.\" ****************************
-.\" Tbl support.
-.nr tbl*have-header 0
-.\" This gets called if TS occurs before the first paragraph.
-.de TS
-.LP
-.\" cov*ab-init aliases TS to @TS
-\\*[TS]\\
-..
-.de @TS
-.sp \\n[DD]u
-.if '\\$1'H' .di tbl*header-div
-..
-.de tbl@top-hook
-.if \\n[tbl*have-header] \{\
-. ie \\n[.t]-\\n[tbl*header-ht]-1v .tbl*print-header
-. el .sp \\n[.t]u
-.\}
-..
-.de tbl*print-header
-.ev nf
-.tbl*header-div
-.ev
-.mk #T
-..
-.de TH
-.ie '\\n[.z]'tbl*header-div' \{\
-. nr T. 0
-. T#
-. br
-. di
-. ie \\n[dn]+\\n[FM]+\\n[HM]+2v>=\\n[.p] \{\
-. @error ridiculously long table header
-. ds@need \\n[dn]
-. tbl*print-header
-. \}
-. el \{\
-. nr tbl*header-ht \\n[dn]
-. ds@need \\n[dn]u+1v
-. tbl*print-header
-. nr tbl*have-header 1
-. \}
-.\}
-.el .@error-recover .TH without .TS H
-..
-.de @div-end!tbl*header-div
-.TH
-.TE
-..
-.de TE
-.ie '\\n(.z'tbl*header-div' .@error-recover .TS H but no .TH before .TE
-.el \{\
-. nr tbl*have-header 0
-. sp \\n[DD]u
-.\}
-.\" reset tabs
-.TA
-..
-.de tbl@bottom-hook
-.if \\n[tbl*have-header] \{\
-. nr T. 1
-. T#
-.\}
-..
-.de T&
-..
-.\" ****************************
-.\" ******** module pic ********
-.\" ****************************
-.\" Pic support.
-.\" PS height width
-.de PS
-.br
-.sp \\n[DD]u
-.ie \\n[.$]<2 .@error bad arguments to PS (not preprocessed with pic?)
-.el \{\
-. ds@need (u;\\$1)+1v
-. in +(u;\\n[.l]-\\n[.i]-\\$2/2>?0)
-.\}
-..
-.de PE
-.par@reset
-.sp \\n[DD]u+.5m
-..
-.\" ****************************
-.\" ******** module ref ********
-.\" ****************************
-.\" Refer support.
-.de ]-
-.rm [A [B [C [D [E [G [I [J [N [O [P [Q [R [S [T [V
-.rm ref*string
-..
-.\" Other
-.ds ref*spec!0 Q A T1 S V N P I C D O
-.\" Journal article
-.ds ref*spec!1 Q A T2 J S V N P I C D O
-.\" Book
-.ds ref*spec!2 Q A T1 S V P I C D O
-.\" Article within book
-.ds ref*spec!3 Q A T2 B E S V P I C D O
-.\" Tech report
-.ds ref*spec!4 Q A T2 R G P I C D O
-.\" ][ type
-.de ][
-.if r [T \{\
-. als [T1 [T
-. als [T2 [T
-.\}
-.ie d ref*spec!\\$1 .ref*build \\*[ref*spec!\\$1]
-.el \{\
-. @error unknown reference type `\\$1'
-. ref*build \\*[ref*spec!0]
-.\}
-.ref*print
-.rm ref*string
-.rm [F [T1 [T2
-..
-.\" start of reference number
-.ds [. \\*[par@sup-start]
-.\" end of reference number
-.ds .] \\*[par@sup-end]
-.\" period before reference
-.ds <. .
-.\" period after reference
-.ds >. \" empty
-.\" comma before reference
-.ds <, ,
-.\" comma after reference
-.ds >, \" empty
-.\" start collected references
-.de ]<
-.als ref*print ref*end-print
-.SH
-\&\\*[REFERENCES]
-.par@reset
-..
-.\" end collected references
-.de ]>
-.par@finish
-.als ref*print ref*normal-print
-..
-.de ref*normal-print
-.ie d [F .FS "\\*([.\\*([F\\*(.]"
-.el .FS \&
-\\*[ref*string]
-.FE
-..
-.de ref*end-print
-.ie d [F .IP "\\*([F."
-.el .XP
-\\*[ref*string]
-..
-.als ref*print ref*normal-print
-.de ref*build
-.rm ref*string ref*post-punct
-.nr ref*suppress-period 1
-.while \\n[.$] \{\
-. if d [\\$1 \{\
-. ie d ref*add-\\$1 .ref*add-\\$1
-. el .ref*add-dflt \\$1
-. \}
-. shift
-.\}
-.\" now add a final period
-.ie d ref*string \{\
-. if !\\n[ref*suppress-period] .as ref*string .
-. if d ref*post-punct \{\
-. as ref*string "\\*[ref*post-punct]
-. rm ref*post-punct
-. \}
-.\}
-.el .ds ref*string
-..
-.de ref*add-T1
-.ref*field T , "\fI" "" "\fP"
-.if r [T .nr ref*suppress-period \\n([T
-..
-.de ref*add-T2
-.ref*field T , "\\*Q" "" "\\*U"
-.if r [T .nr ref*suppress-period \\n([T
-..
-.de ref*add-P
-.ie \\n([P>0 .ref*field P , "pp. "
-.el .ref*field P , "p. "
-..
-.de ref*add-J
-.ref*field J , \fI "" \fP
-..
-.de ref*add-D
-.ref*field D "" ( )
-..
-.de ref*add-E
-.ref*field E , "ed. "
-..
-.de ref*add-G
-.ref*field G "" ( )
-..
-.de ref*add-B
-.ref*field B "" "in \fI" "" \fP
-..
-.de ref*add-O
-.ref*field O .
-.ie r [O .nr ref*suppress-period \\n([O
-.el .nr ref*suppress-period 1
-..
-.de ref*add-A
-.ref*field A ,
-.if r [A .nr ref*suppress-period \\n([A
-..
-.de ref*add-dflt
-.ref*field \\$1 ,
-..
-.\" First argument is the field letter.
-.\" Second argument is the punctuation character to use to separate this field
-.\" from the previous field.
-.\" Third argument is a string with which to prefix this field.
-.\" Fourth argument is a string with which to postfix this field.
-.\" Fifth argument is a string to add after the punctuation character supplied
-.\" by the next field.
-.de ref*field
-.if d ref*string \{\
-. ie d ref*post-punct \{\
-. as ref*string "\\$2\\*[ref*post-punct] \"
-. rm ref*post-punct
-. \}
-. el .as ref*string "\\$2 \"
-.\}
-.as ref*string "\\$3\\*([\\$1\\$4
-.if \\n[.$]>4 .ds ref*post-punct "\\$5
-.nr ref*suppress-period 0
-..
-.\" ****************************
-.\" ******** module acc ********
-.\" ****************************
-.\" Accents and special characters.
-.ds Q \(lq
-.ds U \(rq
-.ds - \(em
-.\" Characters
-.\" The idea of this definition is for the top of the 3 to be at the x-height.
-.if !c\[yogh] .char \[yogh] \Z'\v'\w'x'*0-\En[rst]u'\s[\En[.s]*8u/10u]\
-\v'\w'3'*0+\En[rst]u'3\s0'\h'\w'\s[\En[.s]*8u/10u]3'u'
-.\" Accents
-.de acc*over-def
-.ds \\$1 \Z'\v'(u;\w'x'*0+\En[rst]-\En[.cht])'\
-\h'(u;-\En[skw]+(-\En[.w]-\w'\\$2'/2)+\En[.csk])'\\$2'
-..
-.de acc*under-def
-.ds \\$1 \Z'\v'\En[.cdp]u'\h'(u;-\En[.w]-\w'\\$2'/2)'\\$2'
-..
-.de acc*slash-def
-.ds \\$1 \Z'\h'(u;-\En[.w]-\w'\\$2'/2)'\
-\v'(u;\En[.cdp]-\En[.cht]+\En[rst]+\En[rsb]/2)'\\$2'
-..
-.de acc*prefix-def
-.ds \\$1 \Z'\h'(u;\w'x'-\w'\\$2'/2)'\\$2'
-..
-.acc*prefix-def ' \'
-.acc*prefix-def ` \`
-.acc*prefix-def ^ ^
-.acc*prefix-def , \(ac
-.acc*prefix-def : \(ad
-.acc*prefix-def ~ ~
-.\" improved accent marks
-.de AM
-.acc*over-def ' \'
-.acc*over-def ` \`
-.acc*over-def ^ ^
-.acc*over-def ~ ~
-.acc*over-def : \(ad
-.acc*over-def v \(ah
-.acc*over-def _ \(a-
-.acc*over-def o \(ao
-.acc*under-def , \(ac
-.acc*under-def . \s[\En[.s]*8u/10u]\v'.2m'.\v'-.2m'\s0
-.acc*under-def hook \(ho
-.acc*slash-def / /
-.char \[hooko] o\\\\*[hook]
-.ds q \[hooko]
-.ds 3 \[yogh]
-.ds D- \(-D\" Icelandic uppercase eth
-.ds d- \(Sd\" Icelandic lowercase eth
-.ds Th \(TP\" Icelandic uppercase thorn
-.ds th \(Tp\" Icelandic lowercase thorn
-.ds 8 \(ss\" German double s
-.ds Ae \(AE\" AE ligature
-.ds ae \(ae\" ae ligature
-.ds Oe \(OE\" OE ligature
-.ds oe \(oe\" oe ligature
-.ds ? \(r?\" upside down ?
-.ds ! \(r!\" upside down !
-..
-.de CHECK-FOOTER-AND-KEEP
-.\" it might be better to als FS -> B1 and FE -> B2
-.\" however this produced wierd results, so I've moved back to a more reliable
-.\" but less interesting solution --fixme--
-. if '\*(.T'html' \{\
-. rm KF
-. als KF KS
-. rm FS
-. de FS
-. br
-. HTML-IMAGE
-\\..
-. rm FE
-. de FE
-. br
-. HTML-IMAGE-END
-\\..
-. \}
-. if r ps4html \{\
-. rm FS
-. de FS
-. br
-. HTML-IMAGE
-\\..
-. rm FE
-. de FE
-. br
-. HTML-IMAGE-END
-\\..
-. \}
-..
-.par@load-init
-.\" Make sure that no blank lines creep in at the end of this file.
diff --git a/contrib/groff/tmac/safer.tmac b/contrib/groff/tmac/safer.tmac
deleted file mode 100644
index 1e7d03d68469..000000000000
--- a/contrib/groff/tmac/safer.tmac
+++ /dev/null
@@ -1,5 +0,0 @@
-.\" This file is no longer needed; it has been replaced with a built-in
-.\" solution.
-.\"
-.\" It just exists for compatibility reasons with older man programs
-.\" which explicitly load this file.
diff --git a/contrib/groff/tmac/trace.tmac b/contrib/groff/tmac/trace.tmac
deleted file mode 100644
index 143f95400d1d..000000000000
--- a/contrib/groff/tmac/trace.tmac
+++ /dev/null
@@ -1,29 +0,0 @@
-.\" trace.tmac
-.\"
-.\" Load this before a macro package that you want to trace.
-.
-.eo
-.
-.rn de !!de
-.
-.!!de de
-. ecs
-. ec
-. !!de \$1
-. ie "\$1"\\$0" .tm *** trace enter: \\$0 \\$@
-. el .tm *** trace enter \$1: \\$0 \\$@
-. nop \\*[!!\$1]\\
-. ie "\$1"\\$0" .tm *** trace exit: \\$0 \\$@
-. el .tm *** trace exit \$1: \\$0 \\$@
-\..
-.
-. ds !!d1 !!\$1
-. ds !!d2 \$2
-.
-. ecr
-. dei !!d1 !!d2
-..
-.
-.ec
-.
-.\" EOF
diff --git a/contrib/groff/tmac/tty-char.tmac b/contrib/groff/tmac/tty-char.tmac
deleted file mode 100644
index 02a107162087..000000000000
--- a/contrib/groff/tmac/tty-char.tmac
+++ /dev/null
@@ -1,204 +0,0 @@
-.\" tty-char.tmac
-.\"
-.\" This file defines standard troff characters and some groff characters for
-.\" use with -Tascii, -Tlatin1, -Tutf8, and -Tcp1047.
-.\"
-.\" These definitions are chosen so that, as far as possible, they:
-.\" - work with all of -Tascii, -Tlatin1, -Tutf8, and -Tcp1047.
-.\" - work on devices that display only the last overstruck character
-.\" as well as on devices that support overstriking
-.\" - represent the character's graphical shape (not its meaning)
-.\"
-.nr _C \n(.C
-.cp 0
-.de tty-char
-.if !c\\$1 .char \\$1 "\\$2
-..
-.ie c\(a- .ds tty-rn \(a-
-.el .ds tty-rn \v'-1m'_\v'+1m'
-.tty-char \(tm tm
-.tty-char \(rn \*[tty-rn]
-.tty-char \(ua \z|^
-.tty-char \(da \z|v
-.tty-char \(sc S
-.tty-char \(ct \z/c
-.tty-char \(dg \z|-
-.tty-char \(dd \z|=
-.tty-char \(ib (\z=_
-.tty-char \(ip \z=_)
-.tty-char \(sb (=
-.tty-char \(sp =)
-.tty-char \(if oo
-.tty-char \(pt oc
-.tty-char \(es {}
-.tty-char \(ca (^)
-.tty-char \(cu U
-.tty-char \(de o
-.tty-char \(di -:-
-.tty-char \(no ~
-.tty-char \(gr \Z'\*[tty-rn]'V
-.tty-char \(is \z'\z,I
-.tty-char \(mo E
-.tty-char \(pd a
-.tty-char \(sr \e/
-.tty-char \(*C \z_H
-.tty-char \(*D \z_/\z_\e
-.tty-char \(*F \zIO
-.tty-char \(*G |\*[tty-rn]
-.tty-char \(*H \z-O
-.tty-char \(*L /\e
-.tty-char \(*P TT
-.tty-char \(*Q \zIY
-.tty-char \(*S \z_\Z'\*[tty-rn]'>
-.tty-char \(*W \z_O
-.if c\(ss .tty-char \(*b \(ss
-.tty-char \(*b B
-.tty-char \(*a a
-.tty-char \(*c \z,E
-.tty-char \(*d d
-.tty-char \(*e e
-.tty-char \(*f \z|o
-.tty-char \(+f \z|o
-.tty-char \(*g y
-.tty-char \(*h \z-0
-.tty-char \(+h \z-0
-.tty-char \(*i i
-.tty-char \(*k k
-.tty-char \(*l \z>\e
-.tty-char \(*m \z,u
-.tty-char \(*n v
-.tty-char \(*p \z-n
-.tty-char \(+p \z-w
-.tty-char \(*q \z|u
-.tty-char \(*r p
-.tty-char \(*s \z-o
-.tty-char \(*t \z~t
-.tty-char \(*u u
-.tty-char \(*w w
-.tty-char \(*x x
-.tty-char \(*y n
-.tty-char \(*z \z,C
-.tty-char \(ts s
-.\" Definition of \(ss should follow that of \(*b.
-.tty-char \(ss B
-.tty-char \(c* \zO\(mu
-.tty-char \(c+ \zO+
-.tty-char \(AN ^
-.tty-char \(OR v
-.tty-char \(uA \z=^
-.tty-char \(dA \z=v
-.if c\(md .tty-char \(pc \(md
-.if c\(pc .tty-char \(md \(pc
-.if c\(pc .tty-char \(a. \(pc
-.tty-char \(Im I
-.tty-char \(Re R
-.tty-char \(/L \z/L
-.tty-char \(/l \z/l
-.tty-char \(%0 %o
-.tty-char \(ao o
-.tty-char \(a" """"
-.tty-char \(ab \z'`
-.tty-char \(ah v
-.tty-char \(ho \(ac
-.tty-char \(/_ \z_/
-.tty-char \(=~ =~
-.tty-char \(Ah N
-.tty-char \(CR _|
-.tty-char \(fa \z-V
-.tty-char \(nm \z/E
-.tty-char \(pp \z_|
-.tty-char \(sd ''
-.tty-char \(st -)
-.tty-char \(te 3
-.if c\(md .tty-char \(tf .\(md.
-.tty-char \(tf .:.
-.tty-char \(wp p
-.tty-char \(~~ ~~
-.tty-char \(Fn \z,f
-.tty-char \(Bq ,,
-.tty-char \(bq ,
-.tty-char \(lz <>
-.\" Latin-1 characters
-.tty-char \(r! \z,i
-.tty-char \(Po \z-L
-.tty-char \(Cs \zox
-.tty-char \(Ye \z=Y
-.tty-char \(bb |
-.tty-char \(ad """"
-.tty-char \(Of \z_a
-.tty-char \(Fo <<
-.tty-char \(a- \*[tty-rn]
-.tty-char \(S2 2
-.tty-char \(S3 3
-.tty-char \(ps 9|
-.tty-char \(md .
-.tty-char \(pc .
-.tty-char \(ac ,
-.tty-char \(S1 1
-.tty-char \(Om \z_o
-.tty-char \(Fc >>
-.tty-char \(r? \z'c
-.tty-char \(`A \z`A
-.tty-char \('A \z'A
-.tty-char \(^A \z^A
-.tty-char \(~A \z~A
-.tty-char \(:A \z"A
-.tty-char \(oA \zoA
-.tty-char \(,C \z,C
-.tty-char \(`E \z`E
-.tty-char \('E \z'E
-.tty-char \(^E \z^E
-.tty-char \(:E \z"E
-.tty-char \(`I \z`I
-.tty-char \('I \z'I
-.tty-char \(^I \z^I
-.tty-char \(:I \z"I
-.tty-char \(-D \z-D
-.tty-char \(~N \z~N
-.tty-char \(`O \z`O
-.tty-char \('O \z'O
-.tty-char \(^O \z^O
-.tty-char \(~O \z~O
-.tty-char \(:O \z"O
-.tty-char \(/O \z/O
-.tty-char \(`U \z`U
-.tty-char \('U \z'U
-.tty-char \(^U \z^U
-.tty-char \(:U \z"U
-.tty-char \('Y \z'Y
-.tty-char \(TP \zIb
-.tty-char \(`a \z`a
-.tty-char \('a \z'a
-.tty-char \(^a \z^a
-.tty-char \(~a \z~a
-.tty-char \(:a \z"a
-.tty-char \(oa \zoa
-.tty-char \(,c \z,c
-.tty-char \(`e \z`e
-.tty-char \('e \z'e
-.tty-char \(^e \z^e
-.tty-char \(:e \z"e
-.tty-char \(`i \z`i
-.tty-char \('i \z'i
-.tty-char \(^i \z^i
-.tty-char \(:i \z"i
-.tty-char \(Sd \z`\z'o
-.tty-char \(~n \z~n
-.tty-char \(`o \z`o
-.tty-char \('o \z'o
-.tty-char \(^o \z^o
-.tty-char \(~o \z~o
-.tty-char \(:o \z"o
-.tty-char \(/o \z/o
-.tty-char \(`u \z`u
-.tty-char \('u \z'u
-.tty-char \(^u \z^u
-.tty-char \(:u \z"u
-.tty-char \('y \z'y
-.tty-char \(Tp \zpb
-.tty-char \(:y \z"y
-.\"tty-char \(:y \ij
-.tty-char \[arrowvertex] |
-.cp \n(_C
-.if !'\*(.T'cp1047' \
-. do mso latin1.tmac
diff --git a/contrib/groff/tmac/tty.tmac b/contrib/groff/tmac/tty.tmac
deleted file mode 100644
index e6804357dfc4..000000000000
--- a/contrib/groff/tmac/tty.tmac
+++ /dev/null
@@ -1,50 +0,0 @@
-.\" tty.tmac
-.\"
-.nr _C \n(.C
-.cp 0
-.nroff
-.\" Don't warn about non-existent fonts.
-.warn \n[.warn]-(\n[.warn]/131072%2*131072)
-.po 0
-.if c\[shc] .shc \[shc]
-.de tty-char
-.if !c\\$1 .char \\$1 "\\$2
-..
-.ie c\(pc .tr \(bu\(pc
-.el .if c\(md .tr \(bu\(md
-.tty-char \(bu \z+o
-.tty-char \(14 1/4
-.tty-char \(12 1/2
-.tty-char \(34 3/4
-.tty-char \(ff ff
-.tty-char \(fi fi
-.tty-char \(fl fl
-.tty-char \(Fi ffi
-.tty-char \(Fl ffl
-.tty-char \(<- <-
-.tty-char \(-> ->
-.tty-char \(<> <->
-.tty-char \(em --
-.tty-char \(+- +-
-.tty-char \(co (C)
-.tty-char \(<= <=
-.tty-char \(>= >=
-.tty-char \(!= !=
-.tty-char \(== ==
-.tty-char \(~= ~=
-.tty-char \(sq []
-.tty-char \(lh <=
-.tty-char \(rh =>
-.tty-char \(lA <=
-.tty-char \(rA =>
-.tty-char \(hA <=>
-.tty-char \(rg (R)
-.tty-char \(OE OE
-.tty-char \(oe oe
-.tty-char \(AE AE
-.tty-char \(ae ae
-.tty-char \(an -
-.cp \n(_C
-.\" If you want the character definitions in tty-char.tmac to be loaded
-.\" automatically, remove the `\"' from the next line.
-.\"do mso tty-char.tmac
diff --git a/contrib/groff/tmac/www.tmac b/contrib/groff/tmac/www.tmac
deleted file mode 100644
index 8358c868f788..000000000000
--- a/contrib/groff/tmac/www.tmac
+++ /dev/null
@@ -1,211 +0,0 @@
-.\" www.tmac
-.\"
-.\" A simple set of macros to provide HTML documents with basic
-.\" www functionality. It will work with any macro set.
-.\"
-.nr _C \n(.C
-.cp 0
-.nr www-html 0
-.if '\*(.T'html' .nr www-html 1
-.\"
-.\"
-.\"
-.de HTML
-. if \\n[www-html] \{\
-.\" the following line makes the vertical mode leave, so to say
-\&
-\X^html:\\$*^
-. \}
-..
-.de HTMLINDEX
-. if \\n[www-html] \X^index:\\$*^
-..
-.\"
-.\" BODYCOLOR - $1 is foreground color
-.\" $2 is background color
-.\" $3 is the color of an active hypertext link
-.\" $4 is the color of a hypertext link not yet visited
-.\" $5 is the color of a visited hypertext link
-.\"
-.de BODYCOLOR
-. HTML <body text=\\$1 bgcolor=\\$2 link=\\$3 alink=\\$4 vlink=\\$5>
-..
-.\"
-.\" BACKGROUND - $1 is the background image file
-.\"
-.de BACKGROUND
-. HTML <body background=\\$1>
-..
-.\"
-.\" URL - $1 is the classical underlined blue text
-.\" $2 is the url
-.\" $3 is optional stuff printed immediately after $3
-.\"
-.de URL
-. ie \\n[www-html] \{\
-. HTML <a href="\\$2">\\$1</a>\\$3
-. \}
-. el \{\
-\\$1 \(la\fC\\$2\fP\(ra\\$3
-. \}
-..
-.\"
-.\" FTP - $1 is the classical underlined blue text
-.\" $2 is the ftp url
-.\" $3 is optional stuff printed immediately after $2
-.de FTP
-. ie \\n[www-html] \{\
-. HTML <a href=\\$2>\\$1</a>\\$3
-. \}
-. el \{\
-\\$1 \(la\fC\\$2\fP\(ra\\$3
-. \}
-..
-.\"
-.\" MAILTO - generate html email reference
-.\" $1 is the email address (without the `mailto:' prefix)
-.\" $2 is the optional name
-.\" $3 is optional stuff printed immediately after $2 (resp. $1)
-.\"
-.\" example:
-.\"
-.\" Foobar has been written by
-.\" .MAILTO fred@foo.bar "Fredrick Bloggs" .
-.\"
-.de MAILTO
-.\"
-.\" force reset after a potential heading by performing some motion..
-.\" how do we do this --fixme--
-.\" \h'\w' ''\h'-\w' '' doesn't work..
-. ie \\n[www-html] \{\
-. ie '\\$2'' \{\
-. HTML "<a href=mailto:\\$1>\\$1</a>\\$3"
-. \}
-. el \{\
-. HTML "<a href=mailto:\\$1>\\$2</a>\\$3"
-. \}
-. \}
-. el \{\
-. ie '\\$2'' \{\
-\fC\\$1\fP\\$3
-. \}
-. el \{\
-\\$2 \(la\fC\\$1\fP\(ra\\$3
-. \}
-. \}
-..
-.\"
-.\" TAG - generate an html name $1
-.\"
-.de TAG
-. HTML <a name="\\$1"></a>
-..
-.\"
-.\" IMAGE - reference an image
-.\" $1 is the image file
-.\" $2 is the x width (default if absent 400 pixels)
-.\" $3 is the y width (default if absent is the x value)
-.\"
-.de IMAGE
-. ie \\n[www-html] \{\
-. nr HTMLWIDTH 400
-. if !'\\$2'' \{\
-. nr HTMLWIDTH \\$2
-. \}
-. nr HTMLHEIGHT \\n[HTMLWIDTH]
-. if !'\\$3'' \{\
-. nr HTMLHEIGHT \\$3
-. \}
-. HTML-TAG ".centered-image"
-. HTML <img src="\\$1" width=\\n[HTMLWIDTH] height=\\n[HTMLHEIGHT]>
-. \}
-. el \{\
-. B1
-\(la\fC\\$1\fP\(ra
-. B2
-. \}
-..
-.\" HTML-TAG - emit a tag for the new grohtml
-.de HTML-TAG
-. if \\n[www-html] \{\
-.\" the following line makes the vertical mode leave, so to say
-\&
-\X^html-tag:\\$*^
-. \}
-..
-.\" LINKS - emit the automatically collected links derived from section/numbered
-.\" headings at this position.
-.de LINKS
-. HTML-TAG ".links"
-..
-.\"
-.\" LINE - produce a horizontal line
-.\"
-.de LINE
-. ti 0
-. HTML <hr>
-..
-.\"
-.\" supplimentary macros used by other macro sets
-.\"
-.\" here are some tags specially for -Tps or -Thtml when invoked by pre-html
-.\" to generate png images from postscript.
-.\"
-.\" HTML-DO-IMAGE - tells troff to issue an image marker which can be
-.\" read back by pre-html
-.\"
-.de HTML-DO-IMAGE
-. if r ps4html .begin \{\
-. image \\$2 \\$1.png
-. bp
-. tl ''''
-\O0\O1
-. \}
-. if \\n[www-html] .begin \{
-. image \\$2 \\$1.png
-\O0
-. \}
-..
-.\"
-.\" HTML-IMAGE-END - terminates an image for html
-.\"
-.de HTML-IMAGE-END
-. if r ps4html \O2\O1\O4
-. if \\n[www-html] \O2\O1\O4
-..
-.nr png-no 0
-.\"
-.\" MAKE-UNIQUE-NAME - generates another unique name
-.\"
-.de MAKE-UNIQUE-NAME
-. nr png-no \\n[png-no]+1
-. ds HTML-UNIQUE-NAME \\n(.F-auto-\\n[png-no]
-..
-.\"
-.\" HTML-IMAGE - is the same name as a tag generated from eqn/tbl/pic.
-.\" Although the tags generated via the preprocessor
-.\" are given image names by pre-html and troff.
-.\" The macros below can only be invoked by *other macro sets*
-.\" not user troff input since the contents of macro sets are
-.\" not seen by pre-html.
-.\"
-.de HTML-IMAGE
-.\" generates a centered image
-. MAKE-UNIQUE-NAME
-. HTML-DO-IMAGE \\*[HTML-UNIQUE-NAME] c
-..
-.de HTML-IMAGE-RIGHT
-. MAKE-UNIQUE-NAME
-. HTML-DO-IMAGE \\*[HTML-UNIQUE-NAME] r
-..
-.de HTML-IMAGE-LEFT
-. MAKE-UNIQUE-NAME
-. HTML-DO-IMAGE \\*[HTML-UNIQUE-NAME] l
-..
-.de HTML-IMAGE-INLINE
-. MAKE-UNIQUE-NAME
-. HTML-DO-IMAGE \\*[HTML-UNIQUE-NAME] i
-..
-.nr HY 0
-.nh
-.cp \n(_C
diff --git a/contrib/libpcap/.cvsignore b/contrib/libpcap/.cvsignore
deleted file mode 100644
index 12a60dd038c1..000000000000
--- a/contrib/libpcap/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-config.log
-config.cache
-config.status
-config.h
-.devel
-Makefile
-scanner.c
-grammar.c
-tokdefs.h
-version.c
diff --git a/contrib/libpcap/LICENSE b/contrib/libpcap/LICENSE
deleted file mode 100644
index dea5f7d54d6b..000000000000
--- a/contrib/libpcap/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-License: BSD
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
- 3. The names of the authors may not be used to endorse or promote
- products derived from this software without specific prior
- written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/contrib/libpcap/README.aix b/contrib/libpcap/README.aix
deleted file mode 100644
index c78a40b0bb40..000000000000
--- a/contrib/libpcap/README.aix
+++ /dev/null
@@ -1,46 +0,0 @@
-(1) To configure libpcap under AIX 4.x, you should use DLPI instead
- of BPF, since IBM's version of BPF includes some undocumented
- and unsupported changes to the original BPF.
-
- This can be done by specifying the flag:
-
- --with-pcap=dlpi
-
- to the "configure" script for libpcap.
-
-(2) Also, it is a good idea to have the latest version of the DLPI
- driver on your system, since certain versions may be buggy and
- cause your AIX system to crash. DLPI is included in the
- fileset bos.rte.tty. I found that the DLPI driver that came with
- AIX 4.3.2 was buggy, and had to upgrade to bos.rte.tty 4.3.2.4:
-
- lslpp -l bos.rte.tty
-
- bos.rte.tty 4.3.2.4 COMMITTED Base TTY Support and Commands
-
- Updates for AIX filesets can be obtained from:
- ftp://service.software.ibm.com/aix/fixes/
-
- These updates can be installed with the smit program.
-
-(3) After compiling libpcap, you need to make sure that the DLPI driver
- is loaded. Type:
-
- strload -q -d dlpi
-
- If the result is:
- dlpi: yes
-
- then the DLPI driver is loaded correctly.
-
- If it is:
- dlpi: no
-
- Then you need to type:
- strload -f /etc/dlpi.conf
-
- Check again with strload -q -d dlpi that the dlpi driver is loaded.
-
- Alternatively, you can uncomment the lines for DLPI in
- /etc/pse.conf and reboot the machine; this way DLPI will always
- be loaded when you boot your system.
diff --git a/contrib/libpcap/README.linux b/contrib/libpcap/README.linux
deleted file mode 100644
index ecd00e8fe893..000000000000
--- a/contrib/libpcap/README.linux
+++ /dev/null
@@ -1,70 +0,0 @@
-In order for libpcap to be able to capture packets on a Linux system,
-the "packet" protocol must be supported by your kernel. If it is not,
-you may get error messages such as
-
- modprobe: can't locate module net-pf-17
-
-in "/var/adm/messages", or may get messages such as
-
- socket: Address family not supported by protocol
-
-from applications using libpcap.
-
-You must configure the kernel with the CONFIG_PACKET option for this
-protocol; the following note is from the Linux "Configure.help" file for
-the 2.0[.x] kernel:
-
- Packet socket
- CONFIG_PACKET
- The Packet protocol is used by applications which communicate
- directly with network devices without an intermediate network
- protocol implemented in the kernel, e.g. tcpdump. If you want them
- to work, choose Y.
-
- This driver is also available as a module called af_packet.o ( =
- code which can be inserted in and removed from the running kernel
- whenever you want). If you want to compile it as a module, say M
- here and read Documentation/modules.txt; if you use modprobe or
- kmod, you may also want to add "alias net-pf-17 af_packet" to
- /etc/modules.conf.
-
-and the note for the 2.2[.x] kernel says:
-
- Packet socket
- CONFIG_PACKET
- The Packet protocol is used by applications which communicate
- directly with network devices without an intermediate network
- protocol implemented in the kernel, e.g. tcpdump. If you want them
- to work, choose Y. This driver is also available as a module called
- af_packet.o ( = code which can be inserted in and removed from the
- running kernel whenever you want). If you want to compile it as a
- module, say M here and read Documentation/modules.txt. You will
- need to add 'alias net-pf-17 af_packet' to your /etc/conf.modules
- file for the module version to function automatically. If unsure,
- say Y.
-
-In addition, there is an option that, in 2.2 and later kernels, will
-allow packet capture filters specified to programs such as tcpdump to be
-executed in the kernel, so that packets that don't pass the filter won't
-be copied from the kernel to the program, rather than having all packets
-copied to the program and libpcap doing the filtering in user mode.
-
-Copying packets from the kernel to the program consumes a significant
-amount of CPU, so filtering in the kernel can reduce the overhead of
-capturing packets if a filter has been specified that discards a
-significant number of packets. (If no filter is specified, it makes no
-difference whether the filtering isn't performed in the kernel or isn't
-performed in user mode. :-))
-
-The option for this is the CONFIG_FILTER option; the "Configure.help"
-file says:
-
- Socket filtering
- CONFIG_FILTER
- The Linux Socket Filter is derived from the Berkeley Packet Filter.
- If you say Y here, user-space programs can attach a filter to any
- socket and thereby tell the kernel that it should allow or disallow
- certain types of data to get through the socket. Linux Socket
- Filtering works on all socket types except TCP for now. See the text
- file linux/Documentation/networking/filter.txt for more information.
- If unsure, say N.
diff --git a/contrib/libpcap/TODO b/contrib/libpcap/TODO
deleted file mode 100644
index e90b9d83dcf5..000000000000
--- a/contrib/libpcap/TODO
+++ /dev/null
@@ -1,38 +0,0 @@
- TODO list for libpcap
-=======================
-
-Important stuff (to be done before the next release)
----------------
-
-General
-
-- configure should not be in the CVS. Most open source projects have an
- autogen.sh script to run autoconf etc. after checkout. I think we
- should stick to the standard.
-
-- The source files should be better documented. There is no official
- design guideline what is done where. There should be a common coding
- style (okay, you can guess that bye looking at the code) and a guideline
- what needs to be documented.
-
-Linux kernel interface
-
-- Currently there is a race condition in that a socket is activated at the
- same time when it is opened - before applying a filter. This has to
- be corrected so that capture starts when pcap_read is called for the
- first time.
-
-Less urgent items
------------------
-
-- Better documentation and cleanup of the interface. I am seeing a few
- problems at the first glance which needs fixing:
- + pcap_lookupnet makes little to no sense with protocols != IPv4
- + not very suited for interactive programs (think ethereal). There should
- be a way for the application to get a file descriptor which it has to
- monitor and a callback in pcap which has to be called on activity
- + too many functions. There are a lot of functions for everything which
- violates the KISS principle. Why do we need pcap_strerror, pcap_perror
- and pcap_geterr?
- + the manpage has a brief description of each function but where is the
- big picture? Seems like you need to buy UNP for that...
diff --git a/contrib/libpcap/bpf_dump.c b/contrib/libpcap/bpf_dump.c
deleted file mode 100644
index 85e1c9749527..000000000000
--- a/contrib/libpcap/bpf_dump.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1992, 1993, 1994, 1995, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/bpf_dump.c,v 1.12 2000/06/26 04:17:05 assar Exp $ (LBL)";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-#include <pcap.h>
-#include <stdio.h>
-
-void
-bpf_dump(struct bpf_program *p, int option)
-{
- struct bpf_insn *insn;
- int i;
- int n = p->bf_len;
-
- insn = p->bf_insns;
- if (option > 2) {
- printf("%d\n", n);
- for (i = 0; i < n; ++insn, ++i) {
- printf("%u %u %u %u\n", insn->code,
- insn->jt, insn->jf, insn->k);
- }
- return ;
- }
- if (option > 1) {
- for (i = 0; i < n; ++insn, ++i)
- printf("{ 0x%x, %d, %d, 0x%08x },\n",
- insn->code, insn->jt, insn->jf, insn->k);
- return;
- }
- for (i = 0; i < n; ++insn, ++i) {
-#ifdef BDEBUG
- extern int bids[];
- printf(bids[i] > 0 ? "[%02d]" : " -- ", bids[i] - 1);
-#endif
- puts(bpf_image(insn, i));
- }
-}
diff --git a/contrib/libpcap/config.h.in b/contrib/libpcap/config.h.in
deleted file mode 100644
index f012a9d500d9..000000000000
--- a/contrib/libpcap/config.h.in
+++ /dev/null
@@ -1,95 +0,0 @@
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define to empty if the keyword does not work. */
-#undef const
-
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
-/* Define if you have the ether_hostton function. */
-#undef HAVE_ETHER_HOSTTON
-
-/* Define if you have the freeifaddrs function. */
-#undef HAVE_FREEIFADDRS
-
-/* Define if you have the strerror function. */
-#undef HAVE_STRERROR
-
-/* Define if you have the strlcpy function. */
-#undef HAVE_STRLCPY
-
-/* Define if you have the <ifaddrs.h> header file. */
-#undef HAVE_IFADDRS_H
-
-/* Define if you have the <netinet/if_ether.h> header file. */
-#undef HAVE_NETINET_IF_ETHER_H
-
-/* Define if you have the <netpacket/packet.h> header file. */
-#undef HAVE_NETPACKET_PACKET_H
-
-/* Define if you have the <sys/bufmod.h> header file. */
-#undef HAVE_SYS_BUFMOD_H
-
-/* Define if you have the <sys/dlpi_ext.h> header file. */
-#undef HAVE_SYS_DLPI_EXT_H
-
-/* Define if you have the <sys/ioccom.h> header file. */
-#undef HAVE_SYS_IOCCOM_H
-
-/* Define if you have the <sys/sockio.h> header file. */
-#undef HAVE_SYS_SOCKIO_H
-
-/* needed on HP-UX */
-#undef _HPUX_SOURCE
-
-/* define if your compiler has __attribute__ */
-#undef HAVE___ATTRIBUTE__
-
-/* if we have u_int8_t */
-#undef u_int8_t
-
-/* if we have u_int16_t */
-#undef u_int16_t
-
-/* if we have u_int32_t */
-#undef u_int32_t
-
-/* do not use protochain */
-#undef NO_PROTOCHAIN
-
-/* IPv6 */
-#undef INET6
-
-/* define if you have a /dev/dlpi */
-#undef HAVE_DEV_DLPI
-
-/* /dev/dlpi directory */
-#undef PCAP_DEV_PREFIX
-
-/* define on AIX to get certain functions */
-#undef _SUN
-
-/* on HP-UX 9.x */
-#undef HAVE_HPUX9
-
-/* on HP-UX 10.20 */
-#undef HAVE_HPUX10_20
-
-/* on sinix */
-#undef sinix
-
-/* On solaris */
-#undef HAVE_SOLARIS
-
-/* if there's an os_proto.h */
-#undef HAVE_OS_PROTO_H
-
-/* if struct sockaddr has sa_len */
-#undef HAVE_SOCKADDR_SA_LEN
-
-/* if ppa_info_t_dl_module_id exists */
-#undef HAVE_HP_PPA_INFO_T_DL_MODULE_ID_1
-
-/* if unaligned access fails */
-#undef LBL_ALIGN
-
diff --git a/contrib/libpcap/lbl/os-osf4.h b/contrib/libpcap/lbl/os-osf4.h
deleted file mode 100644
index abb207e4c124..000000000000
--- a/contrib/libpcap/lbl/os-osf4.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/libpcap/lbl/os-osf4.h,v 1.2 2000/12/22 11:51:33 guy Exp $ (LBL)
- */
-
-/* Prototypes missing in Digital UNIX 4.x */
-int snprintf(char *, size_t, const char *, ...);
-int vsnprintf(char *, size_t, const char *, va_list);
-int pfopen(char *, int);
-
diff --git a/contrib/libpcap/llc.h b/contrib/libpcap/llc.h
deleted file mode 100644
index 28003153cd54..000000000000
--- a/contrib/libpcap/llc.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1993, 1994, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/libpcap/llc.h,v 1.1 2001/01/14 21:26:53 guy Exp $ (LBL)
- */
-
-/*
- * 802.2 LLC SAP values.
- */
-
-#ifndef LLCSAP_NULL
-#define LLCSAP_NULL 0x00
-#endif
-#ifndef LLCSAP_GLOBAL
-#define LLCSAP_GLOBAL 0xff
-#endif
-#ifndef LLCSAP_8021B
-#define LLCSAP_8021B_I 0x02
-#endif
-#ifndef LLCSAP_8021B
-#define LLCSAP_8021B_G 0x03
-#endif
-#ifndef LLCSAP_IP
-#define LLCSAP_IP 0x06
-#endif
-#ifndef LLCSAP_PROWAYNM
-#define LLCSAP_PROWAYNM 0x0e
-#endif
-#ifndef LLCSAP_8021D
-#define LLCSAP_8021D 0x42
-#endif
-#ifndef LLCSAP_RS511
-#define LLCSAP_RS511 0x4e
-#endif
-#ifndef LLCSAP_ISO8208
-#define LLCSAP_ISO8208 0x7e
-#endif
-#ifndef LLCSAP_PROWAY
-#define LLCSAP_PROWAY 0x8e
-#endif
-#ifndef LLCSAP_SNAP
-#define LLCSAP_SNAP 0xaa
-#endif
-#ifndef LLCSAP_ISONS
-#define LLCSAP_ISONS 0xfe
-#endif
-#ifndef LLCSAP_IPX
-#define LLCSAP_IPX 0xe0
-#endif
diff --git a/contrib/libpcap/sll.h b/contrib/libpcap/sll.h
deleted file mode 100644
index 4f2330c30019..000000000000
--- a/contrib/libpcap/sll.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*-
- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from the Stanford/CMU enet packet filter,
- * (net/enet.c) distributed as part of 4.3BSD, and code contributed
- * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
- * Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#) $Header: /tcpdump/master/libpcap/sll.h,v 1.6 2000/12/23 07:50:19 guy Exp $ (LBL)
- */
-
-/*
- * For captures on Linux cooked sockets, we construct a fake header
- * that includes:
- *
- * a 2-byte "packet type" which is one of:
- *
- * LINUX_SLL_HOST packet was sent to us
- * LINUX_SLL_BROADCAST packet was broadcast
- * LINUX_SLL_MULTICAST packet was multicast
- * LINUX_SLL_OTHERHOST packet was sent to somebody else
- * LINUX_SLL_OUTGOING packet was sent *by* us;
- *
- * a 2-byte Ethernet protocol field;
- *
- * a 2-byte link-layer type;
- *
- * a 2-byte link-layer address length;
- *
- * an 8-byte source link-layer address, whose actual length is
- * specified by the previous value.
- *
- * All fields except for the link-layer address are in network byte order.
- *
- * DO NOT change the layout of this structure, or change any of the
- * LINUX_SLL_ values below. If you must change the link-layer header
- * for a "cooked" Linux capture, introduce a new DLT_ type (ask
- * "tcpdump-workers@tcpdump.org" for one, so that you don't give it a
- * value that collides with a value already being used), and use the
- * new header in captures of that type, so that programs that can
- * handle DLT_LINUX_SLL captures will continue to handle them correctly
- * without any change, and so that capture files with different headers
- * can be told apart and programs that read them can dissect the
- * packets in them.
- */
-
-/*
- * A DLT_LINUX_SLL fake link-layer header.
- */
-#define SLL_HDR_LEN 16 /* total header length */
-#define SLL_ADDRLEN 8 /* length of address field */
-
-struct sll_header {
- u_int16_t sll_pkttype; /* packet type */
- u_int16_t sll_hatype; /* link-layer address type */
- u_int16_t sll_halen; /* link-layer address length */
- u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
- u_int16_t sll_protocol; /* protocol */
-};
-
-/*
- * The LINUX_SLL_ values for "sll_pkttype"; these correspond to the
- * PACKET_ values on Linux, but are defined here so that they're
- * available even on systems other than Linux, and so that they
- * don't change even if the PACKET_ values change.
- */
-#define LINUX_SLL_HOST 0
-#define LINUX_SLL_BROADCAST 1
-#define LINUX_SLL_MULTICAST 2
-#define LINUX_SLL_OTHERHOST 3
-#define LINUX_SLL_OUTGOING 4
-
-/*
- * The LINUX_SLL_ values for "sll_protocol"; these correspond to the
- * ETH_P_ values on Linux, but are defined here so that they're
- * available even on systems other than Linux. We assume, for now,
- * that the ETH_P_ values won't change in Linux; if they do, then:
- *
- * if we don't translate them in "pcap-linux.c", capture files
- * won't necessarily be readable if captured on a system that
- * defines ETH_P_ values that don't match these values;
- *
- * if we do translate them in "pcap-linux.c", that makes life
- * unpleasant for the BPF code generator, as the values you test
- * for in the kernel aren't the values that you test for when
- * reading a capture file, so the fixup code run on BPF programs
- * handed to the kernel ends up having to do more work.
- *
- * Add other values here as necessary, for handling packet types that
- * might show up on non-Ethernet, non-802.x networks. (Not all the ones
- * in the Linux "if_ether.h" will, I suspect, actually show up in
- * captures.)
- */
-#define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */
-#define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */
diff --git a/contrib/tcpdump/.cvsignore b/contrib/tcpdump/.cvsignore
deleted file mode 100644
index f07c8e4d037b..000000000000
--- a/contrib/tcpdump/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-version.c
-Makefile
-Makefile-devel.in
-config.status
-config.log
-config.cache
-config.h
-.devel
-stamp-h
-stamp-h.in
-tcpdump
diff --git a/contrib/tcpdump/LICENSE b/contrib/tcpdump/LICENSE
deleted file mode 100644
index dea5f7d54d6b..000000000000
--- a/contrib/tcpdump/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-License: BSD
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
- 3. The names of the authors may not be used to endorse or promote
- products derived from this software without specific prior
- written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/contrib/tcpdump/Makefile-devel-adds b/contrib/tcpdump/Makefile-devel-adds
deleted file mode 100644
index 512a1199795c..000000000000
--- a/contrib/tcpdump/Makefile-devel-adds
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Auto-regenerate configure script or Makefile when things change.
-# From autoconf.info . Works best with GNU Make.
-#
-${srcdir}/configure: configure.in
- cd ${srcdir} && autoconf
-
-# autoheader might not change config.h.in, so touch a stamp file.
-${srcdir}/config.h.in: ${srcdir}/stamp-h.in
-${srcdir}/stamp-h.in: configure.in acconfig.h
- cd ${srcdir} && autoheader
- echo timestamp > ${srcdir}/stamp-h.in
-
-config.h: stamp-h
-stamp-h: ${srcdir}/config.h.in config.status
- ./config.status
-
-Makefile: Makefile.in config.status
- ./config.status
-
-config.status: ${srcdir}/configure
- ./config.status --recheck
diff --git a/contrib/tcpdump/PLATFORMS b/contrib/tcpdump/PLATFORMS
deleted file mode 100644
index 492911765f7e..000000000000
--- a/contrib/tcpdump/PLATFORMS
+++ /dev/null
@@ -1,8 +0,0 @@
-== Tested platforms ==
-NetBSD 1.5/i386 (mcr - 2000/12/8)
-
----
-RedHat Linux 6.1/i386 (assar)
-FreeBSD 2.2.8/i386 (itojun)
-
-
diff --git a/contrib/tcpdump/TODO b/contrib/tcpdump/TODO
deleted file mode 100644
index 12c8b3f51946..000000000000
--- a/contrib/tcpdump/TODO
+++ /dev/null
@@ -1,6 +0,0 @@
-1. update credits
-2. review "FILES"
-3. search for version info
-4. get PLATFORMS filled in
-5. update CHANGES file
-6. do same for libpcap
diff --git a/contrib/tcpdump/ah.h b/contrib/tcpdump/ah.h
deleted file mode 100644
index c22806afe850..000000000000
--- a/contrib/tcpdump/ah.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* $NetBSD: ah.h,v 1.12 2000/07/23 05:23:04 itojun Exp $ */
-/* $KAME: ah.h,v 1.12 2000/07/20 17:41:01 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * RFC1826/2402 authentication header.
- */
-
-#ifndef _NETINET6_AH_H_
-#define _NETINET6_AH_H_
-
-struct ah {
- u_int8_t ah_nxt; /* Next Header */
- u_int8_t ah_len; /* Length of data, in 32bit */
- u_int16_t ah_reserve; /* Reserved for future use */
- u_int32_t ah_spi; /* Security parameter index */
- /* variable size, 32bit bound*/ /* Authentication data */
-};
-
-struct newah {
- u_int8_t ah_nxt; /* Next Header */
- u_int8_t ah_len; /* Length of data + 1, in 32bit */
- u_int16_t ah_reserve; /* Reserved for future use */
- u_int32_t ah_spi; /* Security parameter index */
- u_int32_t ah_seq; /* Sequence number field */
- /* variable size, 32bit bound*/ /* Authentication data */
-};
-
-#endif /*_NETINET6_AH_H_*/
diff --git a/contrib/tcpdump/chdlc.h b/contrib/tcpdump/chdlc.h
deleted file mode 100644
index 4fb6e1d4e41d..000000000000
--- a/contrib/tcpdump/chdlc.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/chdlc.h,v 1.1 2000/09/18 05:11:43 guy Exp $ (LBL) */
-/*
- * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#define CHDLC_HDRLEN 4
-#define CHDLC_UNICAST 0x0f
-#define CHDLC_BCAST 0x8f
-#define CHDLC_TYPE_SLARP 0x8035
-#define CHDLC_TYPE_CDP 0x2000
diff --git a/contrib/tcpdump/esp.h b/contrib/tcpdump/esp.h
deleted file mode 100644
index 56cdada01e2d..000000000000
--- a/contrib/tcpdump/esp.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* $NetBSD: esp.h,v 1.13 2000/09/26 08:37:38 itojun Exp $ */
-/* $KAME: esp.h,v 1.15 2000/09/20 18:15:22 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * RFC1827/2406 Encapsulated Security Payload.
- */
-
-#ifndef _NETINET6_ESP_H_
-#define _NETINET6_ESP_H_
-
-struct esp {
- u_int32_t esp_spi; /* ESP */
- /*variable size, 32bit bound*/ /* Initialization Vector */
- /*variable size*/ /* Payload data */
- /*variable size*/ /* padding */
- /*8bit*/ /* pad size */
- /*8bit*/ /* next header */
- /*8bit*/ /* next header */
- /*variable size, 32bit bound*/ /* Authentication data (new IPsec) */
-};
-
-struct newesp {
- u_int32_t esp_spi; /* ESP */
- u_int32_t esp_seq; /* Sequence number */
- /*variable size*/ /* (IV and) Payload data */
- /*variable size*/ /* padding */
- /*8bit*/ /* pad size */
- /*8bit*/ /* next header */
- /*8bit*/ /* next header */
- /*variable size, 32bit bound*/ /* Authentication data */
-};
-
-struct esptail {
- u_int8_t esp_padlen; /* pad length */
- u_int8_t esp_nxt; /* Next header */
- /*variable size, 32bit bound*/ /* Authentication data (new IPsec)*/
-};
-
-#endif /*_NETINET6_ESP_H_*/
diff --git a/contrib/tcpdump/ether.h b/contrib/tcpdump/ether.h
deleted file mode 100644
index 5c3dff0553f0..000000000000
--- a/contrib/tcpdump/ether.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.6 2000/10/09 03:24:24 guy Exp $ (LBL) */
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_ether.h 8.3 (Berkeley) 5/2/95
- */
-
-#define ETHERMTU 1500
-
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#define ETHER_ADDR_LEN 6
-
-/*
- * Structure of a DEC/Intel/Xerox or 802.3 Ethernet header.
- */
-struct ether_header {
- u_int8_t ether_dhost[ETHER_ADDR_LEN];
- u_int8_t ether_shost[ETHER_ADDR_LEN];
- u_int16_t ether_type;
-};
-
-/*
- * Length of a DEC/Intel/Xerox or 802.3 Ethernet header; note that some
- * compilers may pad "struct ether_header" to a multiple of 4 bytes,
- * for example, so "sizeof (struct ether_header)" may not give the right
- * answer.
- */
-#define ETHER_HDRLEN 14
diff --git a/contrib/tcpdump/icmp6.h b/contrib/tcpdump/icmp6.h
deleted file mode 100644
index 7f66c2e59976..000000000000
--- a/contrib/tcpdump/icmp6.h
+++ /dev/null
@@ -1,412 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/icmp6.h,v 1.4 2000/12/17 23:13:32 guy Exp $ (LBL) */
-/* $NetBSD: icmp6.h,v 1.13 2000/08/03 16:30:37 itojun Exp $ */
-/* $KAME: icmp6.h,v 1.22 2000/08/03 15:25:16 jinmei Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET_ICMP6_H_
-#define _NETINET_ICMP6_H_
-
-struct icmp6_hdr {
- u_int8_t icmp6_type; /* type field */
- u_int8_t icmp6_code; /* code field */
- u_int16_t icmp6_cksum; /* checksum field */
- union {
- u_int32_t icmp6_un_data32[1]; /* type-specific field */
- u_int16_t icmp6_un_data16[2]; /* type-specific field */
- u_int8_t icmp6_un_data8[4]; /* type-specific field */
- } icmp6_dataun;
-};
-
-#define icmp6_data32 icmp6_dataun.icmp6_un_data32
-#define icmp6_data16 icmp6_dataun.icmp6_un_data16
-#define icmp6_data8 icmp6_dataun.icmp6_un_data8
-#define icmp6_pptr icmp6_data32[0] /* parameter prob */
-#define icmp6_mtu icmp6_data32[0] /* packet too big */
-#define icmp6_id icmp6_data16[0] /* echo request/reply */
-#define icmp6_seq icmp6_data16[1] /* echo request/reply */
-#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */
-
-#define ICMP6_DST_UNREACH 1 /* dest unreachable, codes: */
-#define ICMP6_PACKET_TOO_BIG 2 /* packet too big */
-#define ICMP6_TIME_EXCEEDED 3 /* time exceeded, code: */
-#define ICMP6_PARAM_PROB 4 /* ip6 header bad */
-
-#define ICMP6_ECHO_REQUEST 128 /* echo service */
-#define ICMP6_ECHO_REPLY 129 /* echo reply */
-#define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */
-#define MLD6_LISTENER_QUERY 130 /* multicast listener query */
-#define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */
-#define MLD6_LISTENER_REPORT 131 /* multicast listener report */
-#define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */
-#define MLD6_LISTENER_DONE 132 /* multicast listener done */
-
-#define ND_ROUTER_SOLICIT 133 /* router solicitation */
-#define ND_ROUTER_ADVERT 134 /* router advertisment */
-#define ND_NEIGHBOR_SOLICIT 135 /* neighbor solicitation */
-#define ND_NEIGHBOR_ADVERT 136 /* neighbor advertisment */
-#define ND_REDIRECT 137 /* redirect */
-
-#define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */
-
-#define ICMP6_WRUREQUEST 139 /* who are you request */
-#define ICMP6_WRUREPLY 140 /* who are you reply */
-#define ICMP6_FQDN_QUERY 139 /* FQDN query */
-#define ICMP6_FQDN_REPLY 140 /* FQDN reply */
-#define ICMP6_NI_QUERY 139 /* node information request */
-#define ICMP6_NI_REPLY 140 /* node information reply */
-
-/* The definitions below are experimental. TBA */
-#define MLD6_MTRACE_RESP 141 /* mtrace response(to sender) */
-#define MLD6_MTRACE 142 /* mtrace messages */
-
-#define ICMP6_MAXTYPE 142
-
-#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
-#define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */
-#define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */
-#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
-#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */
-#define ICMP6_DST_UNREACH_NOPORT 4 /* port unreachable */
-
-#define ICMP6_TIME_EXCEED_TRANSIT 0 /* ttl==0 in transit */
-#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* ttl==0 in reass */
-
-#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */
-#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized next header */
-#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized option */
-
-#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */
-
-#define ICMP6_NI_SUBJ_IPV6 0 /* Query Subject is an IPv6 address */
-#define ICMP6_NI_SUBJ_FQDN 1 /* Query Subject is a Domain name */
-#define ICMP6_NI_SUBJ_IPV4 2 /* Query Subject is an IPv4 address */
-
-#define ICMP6_NI_SUCCESS 0 /* node information successful reply */
-#define ICMP6_NI_REFUSED 1 /* node information request is refused */
-#define ICMP6_NI_UNKNOWN 2 /* unknown Qtype */
-
-#define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */
-#define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */
-#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET 255 /* rr seq num reset */
-
-/* Used in kernel only */
-#define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */
-#define ND_REDIRECT_ROUTER 1 /* redirect to a better router */
-
-/*
- * Multicast Listener Discovery
- */
-struct mld6_hdr {
- struct icmp6_hdr mld6_hdr;
- struct in6_addr mld6_addr; /* multicast address */
-};
-
-#define mld6_type mld6_hdr.icmp6_type
-#define mld6_code mld6_hdr.icmp6_code
-#define mld6_cksum mld6_hdr.icmp6_cksum
-#define mld6_maxdelay mld6_hdr.icmp6_data16[0]
-#define mld6_reserved mld6_hdr.icmp6_data16[1]
-
-/*
- * Neighbor Discovery
- */
-
-struct nd_router_solicit { /* router solicitation */
- struct icmp6_hdr nd_rs_hdr;
- /* could be followed by options */
-};
-
-#define nd_rs_type nd_rs_hdr.icmp6_type
-#define nd_rs_code nd_rs_hdr.icmp6_code
-#define nd_rs_cksum nd_rs_hdr.icmp6_cksum
-#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0]
-
-struct nd_router_advert { /* router advertisement */
- struct icmp6_hdr nd_ra_hdr;
- u_int32_t nd_ra_reachable; /* reachable time */
- u_int32_t nd_ra_retransmit; /* retransmit timer */
- /* could be followed by options */
-};
-
-#define nd_ra_type nd_ra_hdr.icmp6_type
-#define nd_ra_code nd_ra_hdr.icmp6_code
-#define nd_ra_cksum nd_ra_hdr.icmp6_cksum
-#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
-#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
-#define ND_RA_FLAG_MANAGED 0x80
-#define ND_RA_FLAG_OTHER 0x40
-#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
-
-struct nd_neighbor_solicit { /* neighbor solicitation */
- struct icmp6_hdr nd_ns_hdr;
- struct in6_addr nd_ns_target; /*target address */
- /* could be followed by options */
-};
-
-#define nd_ns_type nd_ns_hdr.icmp6_type
-#define nd_ns_code nd_ns_hdr.icmp6_code
-#define nd_ns_cksum nd_ns_hdr.icmp6_cksum
-#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
-
-struct nd_neighbor_advert { /* neighbor advertisement */
- struct icmp6_hdr nd_na_hdr;
- struct in6_addr nd_na_target; /* target address */
- /* could be followed by options */
-};
-
-#define nd_na_type nd_na_hdr.icmp6_type
-#define nd_na_code nd_na_hdr.icmp6_code
-#define nd_na_cksum nd_na_hdr.icmp6_cksum
-#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
-/* netowkr endian */
-#define ND_NA_FLAG_ROUTER ((u_int32_t)htonl(0x80000000))
-#define ND_NA_FLAG_SOLICITED ((u_int32_t)htonl(0x40000000))
-#define ND_NA_FLAG_OVERRIDE ((u_int32_t)htonl(0x20000000))
-
-struct nd_redirect { /* redirect */
- struct icmp6_hdr nd_rd_hdr;
- struct in6_addr nd_rd_target; /* target address */
- struct in6_addr nd_rd_dst; /* destination address */
- /* could be followed by options */
-};
-
-#define nd_rd_type nd_rd_hdr.icmp6_type
-#define nd_rd_code nd_rd_hdr.icmp6_code
-#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
-#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
-
-struct nd_opt_hdr { /* Neighbor discovery option header */
- u_int8_t nd_opt_type;
- u_int8_t nd_opt_len;
- /* followed by option specific data*/
-};
-
-#define ND_OPT_SOURCE_LINKADDR 1
-#define ND_OPT_TARGET_LINKADDR 2
-#define ND_OPT_PREFIX_INFORMATION 3
-#define ND_OPT_REDIRECTED_HEADER 4
-#define ND_OPT_MTU 5
-#define ND_OPT_ADVINT 7
-
-struct nd_opt_prefix_info { /* prefix information */
- u_int8_t nd_opt_pi_type;
- u_int8_t nd_opt_pi_len;
- u_int8_t nd_opt_pi_prefix_len;
- u_int8_t nd_opt_pi_flags_reserved;
- u_int32_t nd_opt_pi_valid_time;
- u_int32_t nd_opt_pi_preferred_time;
- u_int32_t nd_opt_pi_reserved2;
- struct in6_addr nd_opt_pi_prefix;
-};
-
-#define ND_OPT_PI_FLAG_ONLINK 0x80
-#define ND_OPT_PI_FLAG_AUTO 0x40
-#define ND_OPT_PI_FLAG_ROUTER 0x20 /*2292bis*/
-
-struct nd_opt_rd_hdr { /* redirected header */
- u_int8_t nd_opt_rh_type;
- u_int8_t nd_opt_rh_len;
- u_int16_t nd_opt_rh_reserved1;
- u_int32_t nd_opt_rh_reserved2;
- /* followed by IP header and data */
-};
-
-struct nd_opt_mtu { /* MTU option */
- u_int8_t nd_opt_mtu_type;
- u_int8_t nd_opt_mtu_len;
- u_int16_t nd_opt_mtu_reserved;
- u_int32_t nd_opt_mtu_mtu;
-};
-
-struct nd_opt_advint { /* Advertisement interval option */
- u_int8_t nd_opt_advint_type;
- u_int8_t nd_opt_advint_len;
- u_int16_t nd_opt_advint_reserved;
- u_int32_t nd_opt_advint_advint;
-};
-
-/*
- * icmp6 namelookup
- */
-
-struct icmp6_namelookup {
- struct icmp6_hdr icmp6_nl_hdr;
- u_int8_t icmp6_nl_nonce[8];
- int32_t icmp6_nl_ttl;
-#if 0
- u_int8_t icmp6_nl_len;
- u_int8_t icmp6_nl_name[3];
-#endif
- /* could be followed by options */
-};
-
-/*
- * icmp6 node information
- */
-struct icmp6_nodeinfo {
- struct icmp6_hdr icmp6_ni_hdr;
- u_int8_t icmp6_ni_nonce[8];
- /* could be followed by reply data */
-};
-
-#define ni_type icmp6_ni_hdr.icmp6_type
-#define ni_code icmp6_ni_hdr.icmp6_code
-#define ni_cksum icmp6_ni_hdr.icmp6_cksum
-#define ni_qtype icmp6_ni_hdr.icmp6_data16[0]
-#define ni_flags icmp6_ni_hdr.icmp6_data16[1]
-
-#define NI_QTYPE_NOOP 0 /* NOOP */
-#define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes */
-#define NI_QTYPE_FQDN 2 /* FQDN (draft 04) */
-#define NI_QTYPE_DNSNAME 2 /* DNS Name */
-#define NI_QTYPE_NODEADDR 3 /* Node Addresses */
-#define NI_QTYPE_IPV4ADDR 4 /* IPv4 Addresses */
-
-/* network endian */
-#define NI_SUPTYPE_FLAG_COMPRESS ((u_int16_t)htons(0x1))
-#define NI_FQDN_FLAG_VALIDTTL ((u_int16_t)htons(0x1))
-
-/* network endian */
-#define NI_NODEADDR_FLAG_TRUNCATE ((u_int16_t)htons(0x1))
-#define NI_NODEADDR_FLAG_ALL ((u_int16_t)htons(0x2))
-#define NI_NODEADDR_FLAG_COMPAT ((u_int16_t)htons(0x4))
-#define NI_NODEADDR_FLAG_LINKLOCAL ((u_int16_t)htons(0x8))
-#define NI_NODEADDR_FLAG_SITELOCAL ((u_int16_t)htons(0x10))
-#define NI_NODEADDR_FLAG_GLOBAL ((u_int16_t)htons(0x20))
-#define NI_NODEADDR_FLAG_ANYCAST ((u_int16_t)htons(0x40)) /* just experimental. not in spec */
-
-struct ni_reply_fqdn {
- u_int32_t ni_fqdn_ttl; /* TTL */
- u_int8_t ni_fqdn_namelen; /* length in octets of the FQDN */
- u_int8_t ni_fqdn_name[3]; /* XXX: alignment */
-};
-
-/*
- * Router Renumbering. as router-renum-08.txt
- */
-struct icmp6_router_renum { /* router renumbering header */
- struct icmp6_hdr rr_hdr;
- u_int8_t rr_segnum;
- u_int8_t rr_flags;
- u_int16_t rr_maxdelay;
- u_int32_t rr_reserved;
-};
-#define ICMP6_RR_FLAGS_TEST 0x80
-#define ICMP6_RR_FLAGS_REQRESULT 0x40
-#define ICMP6_RR_FLAGS_ALLIF 0x20
-#define ICMP6_RR_FLAGS_SPECSITE 0x10
-#define ICMP6_RR_FLAGS_PREVDONE 0x08
-
-#define rr_type rr_hdr.icmp6_type
-#define rr_code rr_hdr.icmp6_code
-#define rr_cksum rr_hdr.icmp6_cksum
-#define rr_seqnum rr_hdr.icmp6_data32[0]
-
-struct rr_pco_match { /* match prefix part */
- u_int8_t rpm_code;
- u_int8_t rpm_len;
- u_int8_t rpm_ordinal;
- u_int8_t rpm_matchlen;
- u_int8_t rpm_minlen;
- u_int8_t rpm_maxlen;
- u_int16_t rpm_reserved;
- struct in6_addr rpm_prefix;
-};
-
-#define RPM_PCO_ADD 1
-#define RPM_PCO_CHANGE 2
-#define RPM_PCO_SETGLOBAL 3
-#define RPM_PCO_MAX 4
-
-struct rr_pco_use { /* use prefix part */
- u_int8_t rpu_uselen;
- u_int8_t rpu_keeplen;
- u_int8_t rpu_ramask;
- u_int8_t rpu_raflags;
- u_int32_t rpu_vltime;
- u_int32_t rpu_pltime;
- u_int32_t rpu_flags;
- struct in6_addr rpu_prefix;
-};
-#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80
-#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40
-
-/* network endian */
-#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME ((u_int32_t)htonl(0x80000000))
-#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME ((u_int32_t)htonl(0x40000000))
-
-struct rr_result { /* router renumbering result message */
- u_int16_t rrr_flags;
- u_int8_t rrr_ordinal;
- u_int8_t rrr_matchedlen;
- u_int32_t rrr_ifid;
- struct in6_addr rrr_prefix;
-};
-/* network endian */
-#define ICMP6_RR_RESULT_FLAGS_OOB ((u_int16_t)htons(0x0002))
-#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN ((u_int16_t)htons(0x0001))
-
-#endif /* not _NETINET_ICMP6_H_ */
diff --git a/contrib/tcpdump/ip.h b/contrib/tcpdump/ip.h
deleted file mode 100644
index 77cf2f65bc50..000000000000
--- a/contrib/tcpdump/ip.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.7 2000/10/03 09:17:40 guy Exp $ (LBL) */
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.2 (Berkeley) 6/1/94
- */
-
-/*
- * Definitions for internet protocol version 4.
- * Per RFC 791, September 1981.
- */
-#define IPVERSION 4
-
-/*
- * Structure of an internet header, naked of options.
- *
- * We declare ip_len and ip_off to be short, rather than u_short
- * pragmatically since otherwise unsigned comparisons can result
- * against negative integers quite easily, and fail in subtle ways.
- */
-struct ip {
- u_int8_t ip_vhl; /* header length, version */
-#define IP_V(ip) (((ip)->ip_vhl & 0xf0) >> 4)
-#define IP_HL(ip) ((ip)->ip_vhl & 0x0f)
- u_int8_t ip_tos; /* type of service */
- u_int16_t ip_len; /* total length */
- u_int16_t ip_id; /* identification */
- u_int16_t ip_off; /* fragment offset field */
-#define IP_DF 0x4000 /* dont fragment flag */
-#define IP_MF 0x2000 /* more fragments flag */
-#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_int8_t ip_ttl; /* time to live */
- u_int8_t ip_p; /* protocol */
- u_int16_t ip_sum; /* checksum */
- struct in_addr ip_src,ip_dst; /* source and dest address */
-};
-
-#define IP_MAXPACKET 65535 /* maximum packet size */
-
-/*
- * Definitions for IP type of service (ip_tos)
- */
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-
-/*
- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
- */
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-
-/*
- * Definitions for options.
- */
-#define IPOPT_COPIED(o) ((o)&0x80)
-#define IPOPT_CLASS(o) ((o)&0x60)
-#define IPOPT_NUMBER(o) ((o)&0x1f)
-
-#define IPOPT_CONTROL 0x00
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_DEBMEAS 0x40
-#define IPOPT_RESERVED2 0x60
-
-#define IPOPT_EOL 0 /* end of option list */
-#define IPOPT_NOP 1 /* no operation */
-
-#define IPOPT_RR 7 /* record packet route */
-#define IPOPT_TS 68 /* timestamp */
-#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
-#define IPOPT_LSRR 131 /* loose source route */
-#define IPOPT_SATID 136 /* satnet id */
-#define IPOPT_SSRR 137 /* strict source route */
-
-/*
- * Offsets to fields in options other than EOL and NOP.
- */
-#define IPOPT_OPTVAL 0 /* option ID */
-#define IPOPT_OLEN 1 /* option length */
-#define IPOPT_OFFSET 2 /* offset within option */
-#define IPOPT_MINOFF 4 /* min value of above */
-
-/*
- * Time stamp option structure.
- */
-struct ip_timestamp {
- u_int8_t ipt_code; /* IPOPT_TS */
- u_int8_t ipt_len; /* size of structure (variable) */
- u_int8_t ipt_ptr; /* index of current entry */
- u_int8_t ipt_oflwflg; /* flags, overflow counter */
-#define IPTS_OFLW(ip) (((ipt)->ipt_oflwflg & 0xf0) >> 4)
-#define IPTS_FLG(ip) ((ipt)->ipt_oflwflg & 0x0f)
- union ipt_timestamp {
- u_int32_t ipt_time[1];
- struct ipt_ta {
- struct in_addr ipt_addr;
- u_int32_t ipt_time;
- } ipt_ta[1];
- } ipt_timestamp;
-};
-
-/* flag bits for ipt_flg */
-#define IPOPT_TS_TSONLY 0 /* timestamps only */
-#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
-#define IPOPT_TS_PRESPEC 3 /* specified modules only */
-
-/* bits for security (not byte swapped) */
-#define IPOPT_SECUR_UNCLASS 0x0000
-#define IPOPT_SECUR_CONFID 0xf135
-#define IPOPT_SECUR_EFTO 0x789a
-#define IPOPT_SECUR_MMMM 0xbc4d
-#define IPOPT_SECUR_RESTR 0xaf13
-#define IPOPT_SECUR_SECRET 0xd788
-#define IPOPT_SECUR_TOPSECRET 0x6bc5
-
-/*
- * Internet implementation parameters.
- */
-#define MAXTTL 255 /* maximum time to live (seconds) */
-#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
-#define IPFRAGTTL 60 /* time to live for frags, slowhz */
-#define IPTTLDEC 1 /* subtracted when forwarding */
-
-#define IP_MSS 576 /* default maximum segment size */
diff --git a/contrib/tcpdump/ip6.h b/contrib/tcpdump/ip6.h
deleted file mode 100644
index 6e383dd84210..000000000000
--- a/contrib/tcpdump/ip6.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ip6.h,v 1.3 2000/12/17 23:07:48 guy Exp $ (LBL) */
-/* $NetBSD: ip6.h,v 1.9 2000/07/13 05:34:21 itojun Exp $ */
-/* $KAME: ip6.h,v 1.9 2000/07/02 21:01:32 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET_IP6_H_
-#define _NETINET_IP6_H_
-
-/*
- * Definition for internet protocol version 6.
- * RFC 2460
- */
-
-struct ip6_hdr {
- union {
- struct ip6_hdrctl {
- u_int32_t ip6_un1_flow; /* 20 bits of flow-ID */
- u_int16_t ip6_un1_plen; /* payload length */
- u_int8_t ip6_un1_nxt; /* next header */
- u_int8_t ip6_un1_hlim; /* hop limit */
- } ip6_un1;
- u_int8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */
- } ip6_ctlun;
- struct in6_addr ip6_src; /* source address */
- struct in6_addr ip6_dst; /* destination address */
-};
-
-#define ip6_vfc ip6_ctlun.ip6_un2_vfc
-#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
-#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
-#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
-#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
-#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
-
-#define IPV6_VERSION 0x60
-#define IPV6_VERSION_MASK 0xf0
-
-/* in network endian */
-#define IPV6_FLOWINFO_MASK ((u_int32_t)htonl(0x0fffffff)) /* flow info (28 bits) */
-#define IPV6_FLOWLABEL_MASK ((u_int32_t)htonl(0x000fffff)) /* flow label (20 bits) */
-#if 1
-/* ECN bits proposed by Sally Floyd */
-#define IP6TOS_CE 0x01 /* congestion experienced */
-#define IP6TOS_ECT 0x02 /* ECN-capable transport */
-#endif
-
-/*
- * Extension Headers
- */
-
-struct ip6_ext {
- u_char ip6e_nxt;
- u_char ip6e_len;
-};
-
-/* Hop-by-Hop options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
-struct ip6_hbh {
- u_int8_t ip6h_nxt; /* next header */
- u_int8_t ip6h_len; /* length in units of 8 octets */
- /* followed by options */
-};
-
-/* Destination options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
-struct ip6_dest {
- u_int8_t ip6d_nxt; /* next header */
- u_int8_t ip6d_len; /* length in units of 8 octets */
- /* followed by options */
-};
-
-/* Option types and related macros */
-#define IP6OPT_PAD1 0x00 /* 00 0 00000 */
-#define IP6OPT_PADN 0x01 /* 00 0 00001 */
-#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */
-#define IP6OPT_JUMBO_LEN 6
-#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 */
-
-#define IP6OPT_RTALERT_LEN 4
-#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */
-#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */
-#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */
-#define IP6OPT_MINLEN 2
-
-#define IP6OPT_BINDING_UPDATE 0xc6 /* 11 0 00110 */
-#define IP6OPT_BINDING_ACK 0x07 /* 00 0 00111 */
-#define IP6OPT_BINDING_REQ 0x08 /* 00 0 01000 */
-#define IP6OPT_HOME_ADDRESS 0xc9 /* 11 0 01001 */
-#define IP6OPT_EID 0x8a /* 10 0 01010 */
-
-#define IP6OPT_TYPE(o) ((o) & 0xC0)
-#define IP6OPT_TYPE_SKIP 0x00
-#define IP6OPT_TYPE_DISCARD 0x40
-#define IP6OPT_TYPE_FORCEICMP 0x80
-#define IP6OPT_TYPE_ICMP 0xC0
-
-#define IP6OPT_MUTABLE 0x20
-
-/* Routing header */
-struct ip6_rthdr {
- u_int8_t ip6r_nxt; /* next header */
- u_int8_t ip6r_len; /* length in units of 8 octets */
- u_int8_t ip6r_type; /* routing type */
- u_int8_t ip6r_segleft; /* segments left */
- /* followed by routing type specific data */
-};
-
-/* Type 0 Routing header */
-struct ip6_rthdr0 {
- u_int8_t ip6r0_nxt; /* next header */
- u_int8_t ip6r0_len; /* length in units of 8 octets */
- u_int8_t ip6r0_type; /* always zero */
- u_int8_t ip6r0_segleft; /* segments left */
- u_int8_t ip6r0_reserved; /* reserved field */
- u_int8_t ip6r0_slmap[3]; /* strict/loose bit map */
- struct in6_addr ip6r0_addr[1]; /* up to 23 addresses */
-};
-
-/* Fragment header */
-struct ip6_frag {
- u_int8_t ip6f_nxt; /* next header */
- u_int8_t ip6f_reserved; /* reserved field */
- u_int16_t ip6f_offlg; /* offset, reserved, and flag */
- u_int32_t ip6f_ident; /* identification */
-};
-
-/* network endian */
-#define IP6F_OFF_MASK ((u_int16_t)htons(0xfff8)) /* mask out offset from _offlg */
-#define IP6F_RESERVED_MASK ((u_int16_t)htons(0x0006)) /* reserved bits in ip6f_offlg */
-#define IP6F_MORE_FRAG ((u_int16_t)htons(0x0001)) /* more-fragments flag */
-
-#endif /* not _NETINET_IP6_H_ */
diff --git a/contrib/tcpdump/missing/snprintf.c b/contrib/tcpdump/missing/snprintf.c
deleted file mode 100644
index 176636fa9ac7..000000000000
--- a/contrib/tcpdump/missing/snprintf.c
+++ /dev/null
@@ -1,628 +0,0 @@
-/*
- * Copyright (c) 1995-1999 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the Institute nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* $Id: snprintf.c,v 1.4 2001/01/02 22:33:04 guy Exp $ */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/snprintf.c,v 1.4 2001/01/02 22:33:04 guy Exp $";
-#endif
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-
-#include <interface.h>
-
-enum format_flags {
- minus_flag = 1,
- plus_flag = 2,
- space_flag = 4,
- alternate_flag = 8,
- zero_flag = 16
-};
-
-/*
- * Common state
- */
-
-struct state {
- unsigned char *str;
- unsigned char *s;
- unsigned char *theend;
- size_t sz;
- size_t max_sz;
- int (*append_char)(struct state *, unsigned char);
- int (*reserve)(struct state *, size_t);
- /* XXX - methods */
-};
-
-#ifndef HAVE_VSNPRINTF
-static int
-sn_reserve (struct state *state, size_t n)
-{
- return state->s + n > state->theend;
-}
-
-static int
-sn_append_char (struct state *state, unsigned char c)
-{
- if (sn_reserve (state, 1)) {
- return 1;
- } else {
- *state->s++ = c;
- return 0;
- }
-}
-#endif
-
-static int
-as_reserve (struct state *state, size_t n)
-{
- if (state->s + n > state->theend) {
- int off = state->s - state->str;
- unsigned char *tmp;
-
- if (state->max_sz && state->sz >= state->max_sz)
- return 1;
-
- state->sz = max(state->sz * 2, state->sz + n);
- if (state->max_sz)
- state->sz = min(state->sz, state->max_sz);
- tmp = realloc (state->str, state->sz);
- if (tmp == NULL)
- return 1;
- state->str = tmp;
- state->s = state->str + off;
- state->theend = state->str + state->sz - 1;
- }
- return 0;
-}
-
-static int
-as_append_char (struct state *state, unsigned char c)
-{
- if(as_reserve (state, 1))
- return 1;
- else {
- *state->s++ = c;
- return 0;
- }
-}
-
-static int
-append_number(struct state *state,
- unsigned long num, unsigned base, char *rep,
- int width, int prec, int flags, int minusp)
-{
- int len = 0;
- int i;
-
- /* given precision, ignore zero flag */
- if(prec != -1)
- flags &= ~zero_flag;
- else
- prec = 1;
- /* zero value with zero precision -> "" */
- if(prec == 0 && num == 0)
- return 0;
- do{
- if((*state->append_char)(state, rep[num % base]))
- return 1;
- len++;
- num /= base;
- }while(num);
- prec -= len;
- /* pad with prec zeros */
- while(prec-- > 0){
- if((*state->append_char)(state, '0'))
- return 1;
- len++;
- }
- /* add length of alternate prefix (added later) to len */
- if(flags & alternate_flag && (base == 16 || base == 8))
- len += base / 8;
- /* pad with zeros */
- if(flags & zero_flag){
- width -= len;
- if(minusp || (flags & space_flag) || (flags & plus_flag))
- width--;
- while(width-- > 0){
- if((*state->append_char)(state, '0'))
- return 1;
- len++;
- }
- }
- /* add alternate prefix */
- if(flags & alternate_flag && (base == 16 || base == 8)){
- if(base == 16)
- if((*state->append_char)(state, rep[10] + 23)) /* XXX */
- return 1;
- if((*state->append_char)(state, '0'))
- return 1;
- }
- /* add sign */
- if(minusp){
- if((*state->append_char)(state, '-'))
- return 1;
- len++;
- } else if(flags & plus_flag) {
- if((*state->append_char)(state, '+'))
- return 1;
- len++;
- } else if(flags & space_flag) {
- if((*state->append_char)(state, ' '))
- return 1;
- len++;
- }
- if(flags & minus_flag)
- /* swap before padding with spaces */
- for(i = 0; i < len / 2; i++){
- char c = state->s[-i-1];
- state->s[-i-1] = state->s[-len+i];
- state->s[-len+i] = c;
- }
- width -= len;
- while(width-- > 0){
- if((*state->append_char)(state, ' '))
- return 1;
- len++;
- }
- if(!(flags & minus_flag))
- /* swap after padding with spaces */
- for(i = 0; i < len / 2; i++){
- char c = state->s[-i-1];
- state->s[-i-1] = state->s[-len+i];
- state->s[-len+i] = c;
- }
-
- return 0;
-}
-
-static int
-append_string (struct state *state,
- unsigned char *arg,
- int width,
- int prec,
- int flags)
-{
- if(prec != -1)
- width -= prec;
- else
- width -= strlen((char *)arg);
- if(!(flags & minus_flag))
- while(width-- > 0)
- if((*state->append_char) (state, ' '))
- return 1;
- if (prec != -1) {
- while (*arg && prec--)
- if ((*state->append_char) (state, *arg++))
- return 1;
- } else {
- while (*arg)
- if ((*state->append_char) (state, *arg++))
- return 1;
- }
- if(flags & minus_flag)
- while(width-- > 0)
- if((*state->append_char) (state, ' '))
- return 1;
- return 0;
-}
-
-static int
-append_char(struct state *state,
- unsigned char arg,
- int width,
- int flags)
-{
- while(!(flags & minus_flag) && --width > 0)
- if((*state->append_char) (state, ' '))
- return 1;
-
- if((*state->append_char) (state, arg))
- return 1;
- while((flags & minus_flag) && --width > 0)
- if((*state->append_char) (state, ' '))
- return 1;
-
- return 0;
-}
-
-/*
- * This can't be made into a function...
- */
-
-#define PARSE_INT_FORMAT(res, arg, unsig) \
-if (long_flag) \
- res = (unsig long)va_arg(arg, unsig long); \
-else if (short_flag) \
- res = (unsig short)va_arg(arg, unsig int); \
-else \
- res = (unsig int)va_arg(arg, unsig int)
-
-/*
- * zyxprintf - return 0 or -1
- */
-
-static int
-xyzprintf (struct state *state, const char *char_format, va_list ap)
-{
- const unsigned char *format = (const unsigned char *)char_format;
- unsigned char c;
-
- while((c = *format++)) {
- if (c == '%') {
- int flags = 0;
- int width = 0;
- int prec = -1;
- int long_flag = 0;
- int short_flag = 0;
-
- /* flags */
- while((c = *format++)){
- if(c == '-')
- flags |= minus_flag;
- else if(c == '+')
- flags |= plus_flag;
- else if(c == ' ')
- flags |= space_flag;
- else if(c == '#')
- flags |= alternate_flag;
- else if(c == '0')
- flags |= zero_flag;
- else
- break;
- }
-
- if((flags & space_flag) && (flags & plus_flag))
- flags ^= space_flag;
-
- if((flags & minus_flag) && (flags & zero_flag))
- flags ^= zero_flag;
-
- /* width */
- if (isdigit(c))
- do {
- width = width * 10 + c - '0';
- c = *format++;
- } while(isdigit(c));
- else if(c == '*') {
- width = va_arg(ap, int);
- c = *format++;
- }
-
- /* precision */
- if (c == '.') {
- prec = 0;
- c = *format++;
- if (isdigit(c))
- do {
- prec = prec * 10 + c - '0';
- c = *format++;
- } while(isdigit(c));
- else if (c == '*') {
- prec = va_arg(ap, int);
- c = *format++;
- }
- }
-
- /* size */
-
- if (c == 'h') {
- short_flag = 1;
- c = *format++;
- } else if (c == 'l') {
- long_flag = 1;
- c = *format++;
- }
-
- switch (c) {
- case 'c' :
- if(append_char(state, va_arg(ap, int), width, flags))
- return -1;
- break;
- case 's' :
- if (append_string(state,
- va_arg(ap, unsigned char*),
- width,
- prec,
- flags))
- return -1;
- break;
- case 'd' :
- case 'i' : {
- long arg;
- unsigned long num;
- int minusp = 0;
-
- PARSE_INT_FORMAT(arg, ap, signed);
-
- if (arg < 0) {
- minusp = 1;
- num = -arg;
- } else
- num = arg;
-
- if (append_number (state, num, 10, "0123456789",
- width, prec, flags, minusp))
- return -1;
- break;
- }
- case 'u' : {
- unsigned long arg;
-
- PARSE_INT_FORMAT(arg, ap, unsigned);
-
- if (append_number (state, arg, 10, "0123456789",
- width, prec, flags, 0))
- return -1;
- break;
- }
- case 'o' : {
- unsigned long arg;
-
- PARSE_INT_FORMAT(arg, ap, unsigned);
-
- if (append_number (state, arg, 010, "01234567",
- width, prec, flags, 0))
- return -1;
- break;
- }
- case 'x' : {
- unsigned long arg;
-
- PARSE_INT_FORMAT(arg, ap, unsigned);
-
- if (append_number (state, arg, 0x10, "0123456789abcdef",
- width, prec, flags, 0))
- return -1;
- break;
- }
- case 'X' :{
- unsigned long arg;
-
- PARSE_INT_FORMAT(arg, ap, unsigned);
-
- if (append_number (state, arg, 0x10, "0123456789ABCDEF",
- width, prec, flags, 0))
- return -1;
- break;
- }
- case 'p' : {
- unsigned long arg = (unsigned long)va_arg(ap, void*);
-
- if (append_number (state, arg, 0x10, "0123456789ABCDEF",
- width, prec, flags, 0))
- return -1;
- break;
- }
- case 'n' : {
- int *arg = va_arg(ap, int*);
- *arg = state->s - state->str;
- break;
- }
- case '\0' :
- --format;
- /* FALLTHROUGH */
- case '%' :
- if ((*state->append_char)(state, c))
- return -1;
- break;
- default :
- if ( (*state->append_char)(state, '%')
- || (*state->append_char)(state, c))
- return -1;
- break;
- }
- } else
- if ((*state->append_char) (state, c))
- return -1;
- }
- return 0;
-}
-
-#ifndef HAVE_SNPRINTF
-int
-snprintf (char *str, size_t sz, const char *format, ...)
-{
- va_list args;
- int ret;
-
- va_start(args, format);
- ret = vsnprintf (str, sz, format, args);
-
-#ifdef PARANOIA
- {
- int ret2;
- char *tmp;
-
- tmp = malloc (sz);
- if (tmp == NULL)
- abort ();
-
- ret2 = vsprintf (tmp, format, args);
- if (ret != ret2 || strcmp(str, tmp))
- abort ();
- free (tmp);
- }
-#endif
-
- va_end(args);
- return ret;
-}
-#endif
-
-#ifndef HAVE_ASPRINTF
-int
-asprintf (char **ret, const char *format, ...)
-{
- va_list args;
- int val;
-
- va_start(args, format);
- val = vasprintf (ret, format, args);
-
-#ifdef PARANOIA
- {
- int ret2;
- char *tmp;
- tmp = malloc (val + 1);
- if (tmp == NULL)
- abort ();
-
- ret2 = vsprintf (tmp, format, args);
- if (val != ret2 || strcmp(*ret, tmp))
- abort ();
- free (tmp);
- }
-#endif
-
- va_end(args);
- return val;
-}
-#endif
-
-#ifndef HAVE_ASNPRINTF
-int
-asnprintf (char **ret, size_t max_sz, const char *format, ...)
-{
- va_list args;
- int val;
-
- va_start(args, format);
- val = vasnprintf (ret, max_sz, format, args);
-
-#ifdef PARANOIA
- {
- int ret2;
- char *tmp;
- tmp = malloc (val + 1);
- if (tmp == NULL)
- abort ();
-
- ret2 = vsprintf (tmp, format, args);
- if (val != ret2 || strcmp(*ret, tmp))
- abort ();
- free (tmp);
- }
-#endif
-
- va_end(args);
- return val;
-}
-#endif
-
-#ifndef HAVE_VASPRINTF
-int
-vasprintf (char **ret, const char *format, va_list args)
-{
- return vasnprintf (ret, 0, format, args);
-}
-#endif
-
-
-#ifndef HAVE_VASNPRINTF
-int
-vasnprintf (char **ret, size_t max_sz, const char *format, va_list args)
-{
- int st;
- size_t len;
- struct state state;
-
- state.max_sz = max_sz;
- state.sz = 1;
- state.str = malloc(state.sz);
- if (state.str == NULL) {
- *ret = NULL;
- return -1;
- }
- state.s = state.str;
- state.theend = state.s + state.sz - 1;
- state.append_char = as_append_char;
- state.reserve = as_reserve;
-
- st = xyzprintf (&state, format, args);
- if (st) {
- free (state.str);
- *ret = NULL;
- return -1;
- } else {
- char *tmp;
-
- *state.s = '\0';
- len = state.s - state.str;
- tmp = realloc (state.str, len+1);
- if (tmp == NULL) {
- free (state.str);
- *ret = NULL;
- return -1;
- }
- *ret = tmp;
- return len;
- }
-}
-#endif
-
-#ifndef HAVE_VSNPRINTF
-int
-vsnprintf (char *str, size_t sz, const char *format, va_list args)
-{
- struct state state;
- int ret;
- unsigned char *ustr = (unsigned char *)str;
-
- state.max_sz = 0;
- state.sz = sz;
- state.str = ustr;
- state.s = ustr;
- state.theend = ustr + sz - 1;
- state.append_char = sn_append_char;
- state.reserve = sn_reserve;
-
- ret = xyzprintf (&state, format, args);
- *state.s = '\0';
- if (ret)
- return sz;
- else
- return state.s - state.str;
-}
-#endif
-
diff --git a/contrib/tcpdump/missing/strlcat.c b/contrib/tcpdump/missing/strlcat.c
deleted file mode 100644
index 92f46a9fd70e..000000000000
--- a/contrib/tcpdump/missing/strlcat.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* $NetBSD: strlcat.c,v 1.5 1999/09/20 04:39:47 lukem Exp $ */
-/* from OpenBSD: strlcat.c,v 1.2 1999/06/17 16:28:58 millert Exp */
-
-/*
- * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcat.c,v 1.1 2000/01/19 05:34:19 itojun Exp $ (LBL)";
-#endif
-
-#include <config.h>
-
-#include <sys/types.h>
-#include <string.h>
-
-#include "interface.h"
-
-/*
- * Appends src to string dst of size siz (unlike strncat, siz is the
- * full size of dst, not space left). At most siz-1 characters
- * will be copied. Always NUL terminates (unless siz == 0).
- * Returns strlen(src); if retval >= siz, truncation occurred.
- */
-size_t
-strlcat(dst, src, siz)
- char *dst;
- const char *src;
- size_t siz;
-{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
- size_t dlen;
-
- /* Find the end of dst and adjust bytes left but don't go past end */
- while (*d != '\0' && n-- != 0)
- d++;
- dlen = d - dst;
- n = siz - dlen;
-
- if (n == 0)
- return(dlen + strlen(s));
- while (*s != '\0') {
- if (n != 1) {
- *d++ = *s;
- n--;
- }
- s++;
- }
- *d = '\0';
-
- return(dlen + (s - src)); /* count does not include NUL */
-}
diff --git a/contrib/tcpdump/missing/strlcpy.c b/contrib/tcpdump/missing/strlcpy.c
deleted file mode 100644
index f55121d3a867..000000000000
--- a/contrib/tcpdump/missing/strlcpy.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* $NetBSD: strlcpy.c,v 1.5 1999/09/20 04:39:47 lukem Exp $ */
-/* from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp */
-
-/*
- * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcpy.c,v 1.1 2000/01/19 05:34:19 itojun Exp $ (LBL)";
-#endif
-
-#include <config.h>
-
-#include <sys/types.h>
-#include <string.h>
-
-#include "interface.h"
-
-/*
- * Copy src to string dst of size siz. At most siz-1 characters
- * will be copied. Always NUL terminates (unless siz == 0).
- * Returns strlen(src); if retval >= siz, truncation occurred.
- */
-size_t
-strlcpy(dst, src, siz)
- char *dst;
- const char *src;
- size_t siz;
-{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
-
- /* Copy as many bytes as will fit */
- if (n != 0 && --n != 0) {
- do {
- if ((*d++ = *s++) == 0)
- break;
- } while (--n != 0);
- }
-
- /* Not enough room in dst, add NUL and traverse rest of src */
- if (n == 0) {
- if (siz != 0)
- *d = '\0'; /* NUL-terminate dst */
- while (*s++)
- ;
- }
-
- return(s - src - 1); /* count does not include NUL */
-}
diff --git a/contrib/tcpdump/nameser.h b/contrib/tcpdump/nameser.h
deleted file mode 100644
index 9963dd03c1b6..000000000000
--- a/contrib/tcpdump/nameser.h
+++ /dev/null
@@ -1,254 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.5 2000/12/28 20:30:41 itojun Exp $ (LBL) */
-/*
- * Copyright (c) 1983, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)nameser.h 8.2 (Berkeley) 2/16/94
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#ifndef _NAMESER_H_
-#define _NAMESER_H_
-
-#include <sys/types.h>
-
-/*
- * Define constants based on rfc883
- */
-#define PACKETSZ 512 /* maximum packet size */
-#define MAXDNAME 256 /* maximum domain name */
-#define MAXCDNAME 255 /* maximum compressed domain name */
-#define MAXLABEL 63 /* maximum length of domain label */
- /* Number of bytes of fixed size data in query structure */
-#define QFIXEDSZ 4
- /* number of bytes of fixed size data in resource record */
-#define RRFIXEDSZ 10
-
-/*
- * Internet nameserver port number
- */
-#define NAMESERVER_PORT 53
-
-/*
- * Currently defined opcodes
- */
-#define QUERY 0x0 /* standard query */
-#define IQUERY 0x1 /* inverse query */
-#define STATUS 0x2 /* nameserver status query */
-#if 0
-#define xxx 0x3 /* 0x3 reserved */
-#endif
- /* non standard - supports ALLOW_UPDATES stuff from Mike Schwartz */
-#define UPDATEA 0x9 /* add resource record */
-#define UPDATED 0xa /* delete a specific resource record */
-#define UPDATEDA 0xb /* delete all named resource record */
-#define UPDATEM 0xc /* modify a specific resource record */
-#define UPDATEMA 0xd /* modify all named resource record */
-
-#define ZONEINIT 0xe /* initial zone transfer */
-#define ZONEREF 0xf /* incremental zone referesh */
-
-/*
- * Currently defined response codes
- */
-#define NOERROR 0 /* no error */
-#define FORMERR 1 /* format error */
-#define SERVFAIL 2 /* server failure */
-#define NXDOMAIN 3 /* non existent domain */
-#define NOTIMP 4 /* not implemented */
-#define REFUSED 5 /* query refused */
- /* non standard */
-#define NOCHANGE 0xf /* update failed to change db */
-
-/*
- * Type values for resources and queries
- */
-#define T_A 1 /* host address */
-#define T_NS 2 /* authoritative server */
-#define T_MD 3 /* mail destination */
-#define T_MF 4 /* mail forwarder */
-#define T_CNAME 5 /* connonical name */
-#define T_SOA 6 /* start of authority zone */
-#define T_MB 7 /* mailbox domain name */
-#define T_MG 8 /* mail group member */
-#define T_MR 9 /* mail rename name */
-#define T_NULL 10 /* null resource record */
-#define T_WKS 11 /* well known service */
-#define T_PTR 12 /* domain name pointer */
-#define T_HINFO 13 /* host information */
-#define T_MINFO 14 /* mailbox information */
-#define T_MX 15 /* mail routing information */
-#define T_TXT 16 /* text strings */
-#define T_RP 17 /* responsible person */
-#define T_AFSDB 18 /* AFS cell database */
-#define T_NSAP 22 /* NSAP address */
-#define T_NSAP_PTR 23 /* reverse lookup for NSAP */
- /* non standard */
-#define T_UINFO 100 /* user (finger) information */
-#define T_UID 101 /* user ID */
-#define T_GID 102 /* group ID */
-#define T_UNSPEC 103 /* Unspecified format (binary data) */
- /* Query type values which do not appear in resource records */
-#define T_AXFR 252 /* transfer zone of authority */
-#define T_MAILB 253 /* transfer mailbox records */
-#define T_MAILA 254 /* transfer mail agent records */
-#define T_ANY 255 /* wildcard match */
-
-/*
- * Values for class field
- */
-
-#define C_IN 1 /* the arpa internet */
-#define C_CHAOS 3 /* for chaos net (MIT) */
-#define C_HS 4 /* for Hesiod name server (MIT) (XXX) */
- /* Query class values which do not appear in resource records */
-#define C_ANY 255 /* wildcard match */
-
-/*
- * Status return codes for T_UNSPEC conversion routines
- */
-#define CONV_SUCCESS 0
-#define CONV_OVERFLOW -1
-#define CONV_BADFMT -2
-#define CONV_BADCKSUM -3
-#define CONV_BADBUFLEN -4
-
-/*
- * Structure for query header.
- */
-typedef struct {
- u_int16_t id; /* query identification number */
- u_int8_t flags1; /* first byte of flags */
- u_int8_t flags2; /* second byte of flags */
- u_int16_t qdcount; /* number of question entries */
- u_int16_t ancount; /* number of answer entries */
- u_int16_t nscount; /* number of authority entries */
- u_int16_t arcount; /* number of resource entries */
-} HEADER;
-
-/*
- * Macros for subfields of flag fields.
- */
-#define DNS_QR(np) ((np)->flags1 & 0x80) /* response flag */
-#define DNS_OPCODE(np) ((((np)->flags1) >> 3) & 0xF) /* purpose of message */
-#define DNS_AA(np) ((np)->flags1 & 0x04) /* authoritative answer */
-#define DNS_TC(np) ((np)->flags1 & 0x02) /* truncated message */
-#define DNS_RD(np) ((np)->flags1 & 0x01) /* recursion desired */
-
-#define DNS_RA(np) ((np)->flags2 & 0x80) /* recursion available */
-#define DNS_AD(np) ((np)->flags2 & 0x20) /* authentic data from named */
-#define DNS_CD(np) ((np)->flags2 & 0x10) /* checking disabled by resolver */
-#define DNS_RCODE(np) ((np)->flags2 & 0xF) /* response code */
-
-/*
- * Defines for handling compressed domain names, EDNS0 labels, etc.
- */
-#define INDIR_MASK 0xc0 /* 11.... */
-#define EDNS0_MASK 0x40 /* 01.... */
-# define EDNS0_ELT_BITLABEL 0x01
-
-/*
- * Structure for passing resource records around.
- */
-struct rrec {
- int16_t r_zone; /* zone number */
- int16_t r_class; /* class number */
- int16_t r_type; /* type number */
- u_int32_t r_ttl; /* time to live */
- int r_size; /* size of data area */
- char *r_data; /* pointer to data */
-};
-
-/*
- * Inline versions of get/put short/long. Pointer is advanced.
- * We also assume that a "u_int16_t" holds 2 "chars"
- * and that a "u_int32_t" holds 4 "chars".
- *
- * These macros demonstrate the property of C whereby it can be
- * portable or it can be elegant but never both.
- */
-#define GETSHORT(s, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) | (u_int16_t)t_cp[1]; \
- (cp) += 2; \
-}
-
-#define GETLONG(l, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (l) = (((u_int32_t)t_cp[0]) << 24) \
- | (((u_int32_t)t_cp[1]) << 16) \
- | (((u_int32_t)t_cp[2]) << 8) \
- | (((u_int32_t)t_cp[3])); \
- (cp) += 4; \
-}
-
-#define PUTSHORT(s, cp) { \
- register u_int16_t t_s = (u_int16_t)(s); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
- (cp) += 2; \
-}
-
-/*
- * Warning: PUTLONG --no-longer-- destroys its first argument. if you
- * were depending on this "feature", you will lose.
- */
-#define PUTLONG(l, cp) { \
- register u_int32_t t_l = (u_int32_t)(l); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
- (cp) += 4; \
-}
-
-#endif /* !_NAMESER_H_ */
diff --git a/contrib/tcpdump/print-bxxp.c b/contrib/tcpdump/print-bxxp.c
deleted file mode 100644
index 56be54fc17f9..000000000000
--- a/contrib/tcpdump/print-bxxp.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2000, Richard Sharpe
- *
- * This software may be distributed either under the terms of the
- * BSD-style licence that accompanies tcpdump or under the GNU GPL
- * version 2 or later.
- *
- * print-bxxp.c
- *
- */
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-bxxp.c,v 1.3 2000/10/05 04:10:01 itojun Exp $";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/time.h>
-
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "interface.h"
-#include "extract.h"
-
-/* Check for a string but not go beyond length
- * Return TRUE on match, FALSE otherwise
- *
- * Looks at the first few chars up to tl1 ...
- */
-
-int l_strnstart(const u_char *, u_int, const u_char *, u_int);
-
-int
-l_strnstart(register const u_char *tstr1, register u_int tl1,
- register const u_char *str2, register u_int l2)
-{
-
- if (tl1 > l2)
- return 0;
-
- return (strncmp(tstr1, str2, tl1) == 0 ? 1 : 0);
-
-}
-
-void
-bxxp_print(register const u_char *bp, register u_int length)
-{
-
- if (l_strnstart("REQ ", 4, bp, length)) { /* A REQuest */
-
- printf(" BXXP REQ");
-
- }
- else if (l_strnstart("RSP ", 4, bp, length)) {
-
- printf(" BXXP RSP");
-
- }
- else if (l_strnstart("SEQ ", 4, bp, length)) {
-
- printf(" BXXP SEQ");
-
- }
- else if (l_strnstart("END", 4, bp, length)) {
-
- printf(" BXXP END");
-
- }
- else
- printf(" BXXP (payload or undecoded)");
-
-}
diff --git a/contrib/tcpdump/print-cdp.c b/contrib/tcpdump/print-cdp.c
deleted file mode 100644
index 53eff989930e..000000000000
--- a/contrib/tcpdump/print-cdp.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Code by Gert Doering, SpaceNet GmbH, gert@space.net
- *
- * Reference documentation:
- * http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm
- */
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.4 2000/07/29 07:27:54 assar Exp $";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/time.h>
-
-#include <netinet/in.h>
-
-#include <ctype.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "extract.h" /* must come after interface.h */
-
-static void cdp_print_addr( const u_char * p, int l );
-static void cdp_print_prefixes( const u_char * p, int l );
-
-/*
- * Returns non-zero IFF it succeeds in printing the header
- */
-void
-cdp_print(const u_char *p, u_int length, u_int caplen,
- const u_char *esrc, const u_char *edst)
-{
- int i;
- int type, len;
-
- /* Cisco Discovery Protocol */
-
-
- if ( caplen < 12 ) {
- (void)printf("[|cdp]");
- return;
- }
-
- i=8; /* CDP data starts at offset 8 */
- printf ("CDP v%d, ttl=%ds", p[i], p[i+1] );
- i+=4; /* skip version, TTL and chksum */
-
- while (i < length) {
- if ( i+4 > caplen ) {
- printf("[!cdp]");
- return;
- }
- type = (p[i]<<8) + p[i+1];
- len = (p[i+2]<<8) + p[i+3];
-
- if ( vflag )
- printf( "\n\t%02x/%02x", type, len );
- else
- printf( "\n\t" );
-
- if ( i+len > caplen ) {
- printf("[!cdp]");
- return;
- }
-
- switch( type )
- {
- case 0x01:
- printf( " DevID '%.*s'", len-4, p+i+4 );
- break;
- case 0x02:
- printf( " Addr" );
- cdp_print_addr( p+i+4, len-4 );
- break;
- case 0x03:
- printf( " PortID '%.*s'", len-4, p+i+4 );
- break;
- case 0x04:
- printf( " CAP 0x%02x", (unsigned) p[i+7] );
- break;
- case 0x05:
- if ( vflag )
- printf( " Version:\n%.*s", len-4, p+i+4 );
- else
- printf( " Version: (suppressed)" );
- break;
- case 0x06:
- printf( " Platform: '%.*s'", len-4, p+i+4 );
- break;
- case 0x07:
- cdp_print_prefixes( p+i+4, len-4 );
- break;
- case 0x09: /* guess - not documented */
- printf( " VTP Management Domain: '%.*s'", len-4, p+i+4 );
- break;
- case 0x0a: /* guess - not documented */
- printf( " Native VLAN ID: %d", (p[i+4]<<8) + p[i+4+1] - 1 );
- break;
- case 0x0b: /* guess - not documented */
- printf( " Duplex: %s", p[i+4] ? "full": "half" );
- break;
- default:
- printf( " unknown field type %02x, len %d", type, len );
- }
-
- /* avoid infinite loop */
- if (len == 0)
- break;
- i+=len;
- }
-}
-
-static void
-cdp_print_addr( const u_char * p, int l )
-{
- int pl, al, num;
- const u_char * endp = p+l;
-
- num = (p[0] << 24) + (p[1]<<16) + (p[2]<<8)+ p[3];
- p+=4;
-
- printf(" (%d): ", num );
-
- while( p < endp && num >= 0) {
- pl=*(p+1);
- p+=2;
-
- /* special case: IPv4, protocol type=0xcc, addr. length=4 */
- if ( pl == 1 && *p == 0xcc &&
- p[1] == 0 && p[2] == 4 ) {
- p+=3;
-
- printf( "IPv4 %d.%d.%d.%d ", p[0], p[1], p[2], p[3] );
- p+=4;
- } else { /* generic case: just print raw data */
- printf("pt=0x%02x, pl=%d, pb=", *(p-2), pl);
- while( pl-- > 0 )
- printf( " %02x", *p++);
- al=(*p << 8) + *(p+1);
- printf( ", al=%d, a=", al );
- p+=2;
- while( al-- > 0 )
- printf( " %02x", *p++);
- }
- printf(" ");
- num--;
- }
-}
-
-
-static void
-cdp_print_prefixes( const u_char * p, int l )
-{
- printf( " IPv4 Prefixes (%d):", l/5 );
-
- while(l > 0) {
- printf( " %d.%d.%d.%d/%d", p[0], p[1], p[2], p[3], p[4] );
- l-=5; p+=5;
- }
-}
diff --git a/contrib/tcpdump/print-cnfp.c b/contrib/tcpdump/print-cnfp.c
deleted file mode 100644
index 265599ce9d39..000000000000
--- a/contrib/tcpdump/print-cnfp.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* $OpenBSD: print-cnfp.c,v 1.2 1998/06/25 20:26:59 mickey Exp $ */
-
-/*
- * Copyright (c) 1998 Michael Shalayeff
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Michael Shalayeff.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* Cisco NetFlow protocol */
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.6 2000/09/23 08:26:32 guy Exp $";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <netdb.h>
-
-#include <netinet/in.h>
-
-#include <arpa/inet.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include "interface.h"
-
-#include "tcp.h"
-
-struct nfhdr {
- u_int32_t ver_cnt; /* version [15], and # of records */
- u_int32_t msys_uptime;
- u_int32_t utc_sec;
- u_int32_t utc_nsec;
- u_int32_t sequence; /* v5 flow sequence number */
- u_int32_t reserved; /* v5 only */
-};
-
-struct nfrec {
- struct in_addr src_ina;
- struct in_addr dst_ina;
- struct in_addr nhop_ina;
- u_int32_t ifaces; /* src,dst ifaces */
- u_int32_t packets;
- u_int32_t octets;
- u_int32_t start_time; /* sys_uptime value */
- u_int32_t last_time; /* sys_uptime value */
- u_int32_t ports; /* src,dst ports */
- u_int32_t proto_tos; /* proto, tos, pad, flags(v5) */
- u_int32_t asses; /* v1: flags; v5: src,dst AS */
- u_int32_t masks; /* src,dst addr prefix */
-
-};
-
-void
-cnfp_print(const u_char *cp, u_int len, const u_char *bp)
-{
- register const struct nfhdr *nh;
- register const struct nfrec *nr;
- register const struct ip *ip;
- struct protoent *pent;
- int nrecs, ver;
- time_t t;
-
- ip = (struct ip *)bp;
- nh = (struct nfhdr *)cp;
-
- if ((u_char *)(nh + 1) > snapend)
- return;
-
- nrecs = ntohl(nh->ver_cnt) & 0xffff;
- ver = (ntohl(nh->ver_cnt) & 0xffff0000) >> 16;
- t = ntohl(nh->utc_sec);
-/* (p = ctime(&t))[24] = '\0'; */
-
- printf("NetFlow v%x, %u.%03u uptime, %u.%09u, ", ver,
- (unsigned)ntohl(nh->msys_uptime)/1000,
- (unsigned)ntohl(nh->msys_uptime)%1000,
- (unsigned)ntohl(nh->utc_sec), (unsigned)ntohl(nh->utc_nsec));
-
- if (ver == 5) {
- printf("#%u, ", (unsigned)htonl(nh->sequence));
- nr = (struct nfrec *)&nh[1];
- snaplen -= 24;
- } else {
- nr = (struct nfrec *)&nh->sequence;
- snaplen -= 16;
- }
-
- printf("%2u recs", nrecs);
-
- for (; nrecs-- && (u_char *)(nr + 1) <= snapend; nr++) {
- char buf[20];
- char asbuf[20];
-
- printf("\n started %u.%03u, last %u.%03u",
- (unsigned)ntohl(nr->start_time)/1000,
- (unsigned)ntohl(nr->start_time)%1000,
- (unsigned)ntohl(nr->last_time)/1000,
- (unsigned)ntohl(nr->last_time)%1000);
-
- asbuf[0] = buf[0] = '\0';
- if (ver == 5) {
- snprintf(buf, sizeof(buf), "/%u",
- (unsigned)(ntohl(nr->masks) >> 24) & 0xff);
- snprintf(asbuf, sizeof(asbuf), "%u:",
- (unsigned)(ntohl(nr->asses) >> 16) & 0xffff);
- }
- printf("\n %s%s%s:%u ", inet_ntoa(nr->src_ina), buf, asbuf,
- (unsigned)ntohl(nr->ports) >> 16);
-
- if (ver == 5) {
- snprintf(buf, sizeof(buf), "/%d",
- (unsigned)(ntohl(nr->masks) >> 16) & 0xff);
- snprintf(asbuf, sizeof(asbuf), "%u:",
- (unsigned)ntohl(nr->asses) & 0xffff);
- }
- printf("> %s%s%s:%u ", inet_ntoa(nr->dst_ina), buf, asbuf,
- (unsigned)ntohl(nr->ports) & 0xffff);
-
- printf(">> %s\n ", inet_ntoa(nr->nhop_ina));
-
- pent = getprotobynumber((ntohl(nr->proto_tos) >> 8) & 0xff);
- if (!pent || nflag)
- printf("%u ",
- (unsigned)(ntohl(nr->proto_tos) >> 8) & 0xff);
- else
- printf("%s ", pent->p_name);
-
- /* tcp flags for tcp only */
- if (pent && pent->p_proto == IPPROTO_TCP) {
- int flags;
- if (ver == 1)
- flags = (ntohl(nr->asses) >> 24) & 0xff;
- else
- flags = (ntohl(nr->proto_tos) >> 16) & 0xff;
- if (flags & TH_FIN) putchar('F');
- if (flags & TH_SYN) putchar('S');
- if (flags & TH_RST) putchar('R');
- if (flags & TH_PUSH) putchar('P');
- if (flags & TH_ACK) putchar('A');
- if (flags & TH_URG) putchar('U');
- if (flags)
- putchar(' ');
- }
- printf("tos %u, %u (%u octets)",
- (unsigned)ntohl(nr->proto_tos) & 0xff,
- (unsigned)ntohl(nr->packets),
- (unsigned)ntohl(nr->octets));
- }
-}
diff --git a/contrib/tcpdump/print-igmp.c b/contrib/tcpdump/print-igmp.c
deleted file mode 100644
index c79244e2fecb..000000000000
--- a/contrib/tcpdump/print-igmp.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.3 2001/01/09 08:01:18 fenner Exp $ (LBL)";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "extract.h" /* must come after interface.h */
-
-#ifndef IN_CLASSD
-#define IN_CLASSD(i) (((int32_t)(i) & 0xf0000000) == 0xe0000000)
-#endif
-
-/* (following from ipmulti/mrouted/prune.h) */
-
-/*
- * The packet format for a traceroute request.
- */
-struct tr_query {
- u_int tr_src; /* traceroute source */
- u_int tr_dst; /* traceroute destination */
- u_int tr_raddr; /* traceroute response address */
- u_int tr_rttlqid; /* response ttl and qid */
-};
-
-#define TR_GETTTL(x) (int)(((x) >> 24) & 0xff)
-#define TR_GETQID(x) ((x) & 0x00ffffff)
-
-/*
- * Traceroute response format. A traceroute response has a tr_query at the
- * beginning, followed by one tr_resp for each hop taken.
- */
-struct tr_resp {
- u_int tr_qarr; /* query arrival time */
- u_int tr_inaddr; /* incoming interface address */
- u_int tr_outaddr; /* outgoing interface address */
- u_int tr_rmtaddr; /* parent address in source tree */
- u_int tr_vifin; /* input packet count on interface */
- u_int tr_vifout; /* output packet count on interface */
- u_int tr_pktcnt; /* total incoming packets for src-grp */
- u_char tr_rproto; /* routing proto deployed on router */
- u_char tr_fttl; /* ttl required to forward on outvif */
- u_char tr_smask; /* subnet mask for src addr */
- u_char tr_rflags; /* forwarding error codes */
-};
-
-/* defs within mtrace */
-#define TR_QUERY 1
-#define TR_RESP 2
-
-/* fields for tr_rflags (forwarding error codes) */
-#define TR_NO_ERR 0
-#define TR_WRONG_IF 1
-#define TR_PRUNED 2
-#define TR_OPRUNED 3
-#define TR_SCOPED 4
-#define TR_NO_RTE 5
-#define TR_NO_FWD 7
-#define TR_NO_SPACE 0x81
-#define TR_OLD_ROUTER 0x82
-
-/* fields for tr_rproto (routing protocol) */
-#define TR_PROTO_DVMRP 1
-#define TR_PROTO_MOSPF 2
-#define TR_PROTO_PIM 3
-#define TR_PROTO_CBT 4
-
-/* igmpv3 report types */
-static struct tok igmpv3report2str[] = {
- { 1, "is_in" },
- { 2, "is_ex" },
- { 3, "to_in" },
- { 4, "to_ex" },
- { 5, "allow" },
- { 6, "block" },
- { 0, NULL }
-};
-
-static void
-print_mtrace(register const u_char *bp, register u_int len)
-{
- register struct tr_query *tr = (struct tr_query *)(bp + 8);
-
- printf("mtrace %lu: %s to %s reply-to %s",
- (u_long)TR_GETQID(ntohl(tr->tr_rttlqid)),
- ipaddr_string(&tr->tr_src), ipaddr_string(&tr->tr_dst),
- ipaddr_string(&tr->tr_raddr));
- if (IN_CLASSD(ntohl(tr->tr_raddr)))
- printf(" with-ttl %d", TR_GETTTL(ntohl(tr->tr_rttlqid)));
-}
-
-static void
-print_mresp(register const u_char *bp, register u_int len)
-{
- register struct tr_query *tr = (struct tr_query *)(bp + 8);
-
- printf("mresp %lu: %s to %s reply-to %s",
- (u_long)TR_GETQID(ntohl(tr->tr_rttlqid)),
- ipaddr_string(&tr->tr_src), ipaddr_string(&tr->tr_dst),
- ipaddr_string(&tr->tr_raddr));
- if (IN_CLASSD(ntohl(tr->tr_raddr)))
- printf(" with-ttl %d", TR_GETTTL(ntohl(tr->tr_rttlqid)));
-}
-
-static void
-print_igmpv3_report(register const u_char *bp, register u_int len,
- register const u_char *bp2)
-{
- int group, nsrcs, ngroups;
- register int i, j;
-
- /* Minimum len is 16, and should be a multiple of 4 */
- if (len < 16 || len & 0x03) {
- (void)printf(" [invalid len %d]", len);
- return;
- }
- TCHECK2(bp[6], 2);
- ngroups = EXTRACT_16BITS(&bp[6]);
- (void)printf(", %d group record(s)", ngroups);
- if (vflag > 0) {
- /* Print the group records */
- group = 8;
- for (i=0; i<ngroups; i++) {
- if (len < group+8) {
- (void)printf(" [invalid number of groups]");
- return;
- }
- TCHECK2(bp[group+4], 4);
- (void)printf(" [gaddr %s", ipaddr_string(&bp[group+4]));
- (void)printf(" %s", tok2str(igmpv3report2str, " [v3-report-#%d]",
- bp[group]));
- nsrcs = EXTRACT_16BITS(&bp[group+2]);
- /* Check the number of sources and print them */
- if (len < group+8+(nsrcs<<2)) {
- (void)printf(" [invalid number of sources %d]", nsrcs);
- return;
- }
- if (vflag == 1)
- (void)printf(", %d source(s)", nsrcs);
- else {
- /* Print the sources */
- (void)printf(" {");
- for (j=0; j<nsrcs; j++) {
- TCHECK2(bp[group+8+(j<<2)], 4);
- (void)printf(" %s", ipaddr_string(&bp[group+8+(j<<2)]));
- }
- (void)printf(" }");
- }
- /* Next group record */
- group += 8 + (nsrcs << 2);
- (void)printf("]");
- }
- }
- return;
-trunc:
- (void)printf("[|igmp]");
- return;
-}
-
-static void
-print_igmpv3_query(register const u_char *bp, register u_int len,
- register const u_char *bp2)
-{
- int nsrcs;
- register int i;
-
- (void)printf(" v3");
- /* Minimum len is 12, and should be a multiple of 4 */
- if (len < 12 || len & 0x03) {
- (void)printf(" [invalid len %d]", len);
- return;
- }
- TCHECK2(bp[4], 4);
- if (EXTRACT_32BITS(&bp[4]) == 0)
- return;
- (void)printf(" [gaddr %s", ipaddr_string(&bp[4]));
- TCHECK2(bp[10], 2);
- nsrcs = EXTRACT_16BITS(&bp[10]);
- if (nsrcs > 0) {
- if (len < 12 + (nsrcs << 2))
- (void)printf(" [invalid number of sources]");
- else if (vflag > 1) {
- (void)printf(" {");
- for (i=0; i<nsrcs; i++) {
- TCHECK2(bp[12+(i<<2)], 4);
- (void)printf(" %s", ipaddr_string(&bp[12+(i<<2)]));
- }
- (void)printf(" }");
- } else
- (void)printf(", %d source(s)", nsrcs);
- }
- (void)printf("]");
- return;
-trunc:
- (void)printf("[|igmp]");
- return;
-}
-
-void
-igmp_print(register const u_char *bp, register u_int len,
- register const u_char *bp2)
-{
- if (qflag) {
- (void)printf("igmp");
- return;
- }
-
- TCHECK2(bp[0], 8);
- switch (bp[0]) {
- case 0x11:
- (void)printf("igmp query");
- if (len >= 12)
- print_igmpv3_query(bp, len, bp2);
- else {
- if (bp[1]) {
- (void)printf(" v2");
- if (bp[1] != 100)
- (void)printf(" [max resp time %d]", bp[1]);
- } else
- (void)printf(" v1");
- if (EXTRACT_32BITS(&bp[4]))
- (void)printf(" [gaddr %s]", ipaddr_string(&bp[4]));
- if (len != 8)
- (void)printf(" [len %d]", len);
- }
- break;
- case 0x12:
- (void)printf("igmp v1 report %s", ipaddr_string(&bp[4]));
- if (len != 8)
- (void)printf(" [len %d]", len);
- break;
- case 0x16:
- (void)printf("igmp v2 report %s", ipaddr_string(&bp[4]));
- break;
- case 0x22:
- (void)printf("igmp v3 report");
- print_igmpv3_report(bp, len, bp2);
- break;
- case 0x17:
- (void)printf("igmp leave %s", ipaddr_string(&bp[4]));
- break;
- case 0x13:
- (void)printf("igmp dvmrp");
- if (len < 8)
- (void)printf(" [len %d]", len);
- else
- dvmrp_print(bp, len);
- break;
- case 0x14:
- (void)printf("igmp pimv1");
- pimv1_print(bp, len);
- break;
- case 0x1e:
- print_mresp(bp, len);
- break;
- case 0x1f:
- print_mtrace(bp, len);
- break;
- default:
- (void)printf("igmp-%d", bp[0]);
- break;
- }
-
- if (vflag && TTEST2(bp[0], len)) {
- /* Check the IGMP checksum */
- if (in_cksum((const u_short*)bp, len, 0))
- printf(" bad igmp cksum %x!", EXTRACT_16BITS(&bp[2]));
- }
- return;
-trunc:
- fputs("[|igmp]", stdout);
-}
diff --git a/contrib/tcpdump/print-radius.c b/contrib/tcpdump/print-radius.c
deleted file mode 100644
index 32c8575817a6..000000000000
--- a/contrib/tcpdump/print-radius.c
+++ /dev/null
@@ -1,838 +0,0 @@
-/*
- * Radius printer routines as specified on:
- *
- * RFC 2865:
- * "Remote Authentication Dial In User Service (RADIUS)"
- *
- * RFC 2866:
- * "RADIUS Accounting"
- *
- * RFC 2867:
- * "RADIUS Accounting Modifications for Tunnel Protocol Support"
- *
- * RFC 2868:
- * "RADIUS Attributes for Tunnel Protocol Support"
- *
- * RFC 2869:
- * "RADIUS Extensions"
- *
- * Alfredo Andres Omella (aandres@s21sec.com) v0.1 2000/09/15
- *
- * TODO: Among other things to print ok MacIntosh and Vendor values
- */
-
-#ifndef lint
-static const char rcsid[] =
- "$Id: print-radius.c,v 1.5 2000/12/18 08:16:58 guy Exp $";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/param.h>
-
-#include <netinet/in.h>
-
-#include <stdio.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "extract.h"
-
-#define TAM_SIZE(x) (sizeof(x)/sizeof(x[0]) )
-
-#define PRINT_HEX(bytes_len, ptr_data) \
- while(bytes_len) \
- { \
- printf("%02X", *ptr_data ); \
- ptr_data++; \
- bytes_len--; \
- }
-
-
-/* Radius packet codes */
-#define RADCMD_ACCESS_REQ 1 /* Access-Request */
-#define RADCMD_ACCESS_ACC 2 /* Access-Accept */
-#define RADCMD_ACCESS_REJ 3 /* Access-Reject */
-#define RADCMD_ACCOUN_REQ 4 /* Accounting-Request */
-#define RADCMD_ACCOUN_RES 5 /* Accounting-Response */
-#define RADCMD_ACCESS_CHA 11 /* Access-Challenge */
-#define RADCMD_STATUS_SER 12 /* Status-Server */
-#define RADCMD_STATUS_CLI 13 /* Status-Client */
-#define RADCMD_RESERVED 255 /* Reserved */
-
-
-/********************************/
-/* Begin Radius Attribute types */
-/********************************/
-#define SERV_TYPE 6
-#define FRM_IPADDR 8
-#define LOG_IPHOST 14
-#define LOG_SERVICE 15
-#define FRM_IPX 23
-#define SESSION_TIMEOUT 27
-#define IDLE_TIMEOUT 28
-#define FRM_ATALK_LINK 37
-#define FRM_ATALK_NETWORK 38
-
-#define ACCT_DELAY 41
-#define ACCT_SESSION_TIME 46
-
-#define TUNNEL_TYPE 64
-#define TUNNEL_MEDIUM 65
-#define TUNNEL_CLIENT_END 66
-#define TUNNEL_SERVER_END 67
-#define TUNNEL_PASS 69
-
-#define ARAP_PASS 70
-#define ARAP_FEATURES 71
-
-#define TUNNEL_PRIV_GROUP 81
-#define TUNNEL_ASSIGN_ID 82
-#define TUNNEL_PREFERENCE 83
-
-#define ARAP_CHALLENGE_RESP 84
-#define ACCT_INT_INTERVAL 85
-
-#define TUNNEL_CLIENT_AUTH 90
-#define TUNNEL_SERVER_AUTH 91
-/********************************/
-/* End Radius Attribute types */
-/********************************/
-
-
-static void print_attr_string(register u_char *, u_int, u_short );
-static void print_attr_num(register u_char *, u_int, u_short );
-static void print_attr_address(register u_char *, u_int, u_short);
-static void print_attr_time(register u_char *, u_int, u_short);
-static void print_attr_strange(register u_char *, u_int, u_short);
-
-
-struct radius_hdr { u_int8_t code; /* Radius packet code */
- u_int8_t id; /* Radius packet id */
- u_int16_t len; /* Radius total length */
- u_int8_t auth[16]; /* Authenticator */
- };
-
-
-struct radius_attr { u_int8_t type; /* Attribute type */
- u_int8_t len; /* Attribute length */
- };
-
-
-/* Service-Type Attribute standard values */
-static const char *serv_type[]={ NULL,
- "Login",
- "Framed",
- "Callback Login",
- "Callback Framed",
- "Outbound",
- "Administrative",
- "NAS Prompt",
- "Authenticate Only",
- "Callback NAS Prompt",
- "Call Check",
- "Callback Administrative",
- };
-
-/* Framed-Protocol Attribute standard values */
-static const char *frm_proto[]={ NULL,
- "PPP",
- "SLIP",
- "ARAP",
- "Gandalf proprietary",
- "Xylogics IPX/SLIP",
- "X.75 Synchronous",
- };
-
-/* Framed-Routing Attribute standard values */
-static const char *frm_routing[]={ "None",
- "Send",
- "Listen",
- "Send&Listen",
- };
-
-/* Framed-Compression Attribute standard values */
-static const char *frm_comp[]={ "None",
- "VJ TCP/IP",
- "IPX",
- "Stac-LZS",
- };
-
-/* Login-Service Attribute standard values */
-static const char *login_serv[]={ "Telnet",
- "Rlogin",
- "TCP Clear",
- "PortMaster(proprietary)",
- "LAT",
- "X.25-PAD",
- "X.25-T3POS",
- "Unassigned",
- "TCP Clear Quiet",
- };
-
-
-/* Termination-Action Attribute standard values */
-static const char *term_action[]={ "Default",
- "RADIUS-Request",
- };
-
-/* NAS-Port-Type Attribute standard values */
-static const char *nas_port_type[]={ "Async",
- "Sync",
- "ISDN Sync",
- "ISDN Async V.120",
- "ISDN Async V.110",
- "Virtual",
- "PIAFS",
- "HDLC Clear Channel",
- "X.25",
- "X.75",
- "G.3 Fax",
- "SDSL",
- "ADSL-CAP",
- "ADSL-DMT",
- "ISDN-DSL",
- "Ethernet",
- "xDSL",
- "Cable",
- "Wireless - Other",
- "Wireless - IEEE 802.11",
- };
-
-/* Acct-Status-Type Accounting Attribute standard values */
-static const char *acct_status[]={ NULL,
- "Start",
- "Stop",
- "Interim-Update",
- "Unassigned",
- "Unassigned",
- "Unassigned",
- "Accounting-On",
- "Accounting-Off",
- "Tunnel-Start",
- "Tunnel-Stop",
- "Tunnel-Reject",
- "Tunnel-Link-Start",
- "Tunnel-Link-Stop",
- "Tunnel-Link-Reject",
- "Failed",
- };
-
-/* Acct-Authentic Accounting Attribute standard values */
-static const char *acct_auth[]={ NULL,
- "RADIUS",
- "Local",
- "Remote",
- };
-
-/* Acct-Terminate-Cause Accounting Attribute standard values */
-static const char *acct_term[]={ NULL,
- "User Request",
- "Lost Carrier",
- "Lost Service",
- "Idle Timeout",
- "Session Timeout",
- "Admin Reset",
- "Admin Reboot",
- "Port Error",
- "NAS Error",
- "NAS Request",
- "NAS Reboot",
- "Port Unneeded",
- "Port Preempted",
- "Port Suspended",
- "Service Unavailable",
- "Callback",
- "User Error",
- "Host Request",
- };
-
-/* Tunnel-Type Attribute standard values */
-static const char *tunnel_type[]={ NULL,
- "PPTP",
- "L2F",
- "L2TP",
- "ATMP",
- "VTP",
- "AH",
- "IP-IP",
- "MIN-IP-IP",
- "ESP",
- "GRE",
- "DVS",
- "IP-in-IP Tunneling",
- };
-
-/* Tunnel-Medium-Type Attribute standard values */
-static const char *tunnel_medium[]={ NULL,
- "IPv4",
- "IPv6",
- "NSAP",
- "HDLC",
- "BBN 1822",
- "802",
- "E.163",
- "E.164",
- "F.69",
- "X.121",
- "IPX",
- "Appletalk",
- "Decnet IV",
- "Banyan Vines",
- "E.164 with NSAP subaddress",
- };
-
-/* ARAP-Zone-Access Attribute standard values */
-static const char *arap_zone[]={ NULL,
- "Only access to dfl zone",
- "Use zone filter inc.",
- "Not used",
- "Use zone filter exc.",
- };
-
-static const char *prompt[]={ "No Echo",
- "Echo",
- };
-
-
-struct attrtype { char *name; /* Attribute name */
- const char **subtypes; /* Standard Values (if any) */
- u_char siz_subtypes; /* Size of total standard values */
- u_char first_subtype; /* First standard value is 0 or 1 */
- void (*print_func)(register u_char *, u_int, u_short );
- } attr_type[]=
- {
- { NULL, NULL, 0, 0, NULL },
- { "User", NULL, 0, 0, print_attr_string },
- { "Pass", NULL, 0, 0, NULL },
- { "CHAP-Pass", NULL, 0, 0, NULL },
- { "NAS_ipaddr", NULL, 0, 0, print_attr_address },
- { "NAS_port", NULL, 0, 0, print_attr_num },
- { "Service_type", serv_type, TAM_SIZE(serv_type)-1, 1, print_attr_num },
- { "Framed_proto", frm_proto, TAM_SIZE(frm_proto)-1, 1, print_attr_num },
- { "Framed_ipaddr", NULL, 0, 0, print_attr_address },
- { "Framed_ipnet", NULL, 0, 0, print_attr_address },
- { "Framed_routing", frm_routing, TAM_SIZE(frm_routing), 0,
- print_attr_num },
- { "Filter_id", NULL, 0, 0, print_attr_string },
- { "Framed_mtu", NULL, 0, 0, print_attr_num },
- { "Framed_compress", frm_comp, TAM_SIZE(frm_comp), 0, print_attr_num },
- { "Login_iphost", NULL, 0, 0, print_attr_address },
- { "Login_service", login_serv, TAM_SIZE(login_serv), 0, print_attr_num },
- { "Login_TCP_port", NULL, 0, 0, print_attr_num },
-/*17*/ { "Unassigned", NULL, 0, 0, NULL },
- { "Reply", NULL, 0, 0, print_attr_string },
- { "Callback-number", NULL, 0, 0, print_attr_string },
- { "Callback-id", NULL, 0, 0, print_attr_string },
-/*21*/ { "Unassigned", NULL, 0, 0, NULL },
- { "Framed_route", NULL, 0, 0, print_attr_string },
- { "Framed_ipx_net", NULL, 0, 0, print_attr_num },
- { "State", NULL, 0, 0, print_attr_string },
- { "Class", NULL, 0, 0, print_attr_string },
- { "Vendor_specific", NULL, 0, 0, print_attr_string },
- { "Session_timeout", NULL, 0, 0, print_attr_num },
- { "Idle_timeout", NULL, 0, 0, print_attr_num },
- { "Term_action", term_action, TAM_SIZE(term_action), 0, print_attr_num },
- { "Called_station", NULL, 0, 0, print_attr_string },
- { "Calling_station", NULL, 0, 0, print_attr_string },
- { "NAS_id", NULL, 0, 0, print_attr_string },
- { "Proxy_state", NULL, 0, 0, print_attr_string },
- { "Login_LAT_service", NULL, 0, 0, print_attr_string },
- { "Login_LAT_node", NULL, 0, 0, print_attr_string },
- { "Login_LAT_group", NULL, 0, 0, print_attr_string },
- { "Framed_atalk_link", NULL, 0, 0, print_attr_num },
- { "Framed_atalk_net", NULL, 0, 0, print_attr_num },
- { "Framed_atalk_zone", NULL, 0, 0, print_attr_string },
- { "Acct_status", acct_status, TAM_SIZE(acct_status)-1, 1, print_attr_num },
- { "Acct_delay", NULL, 0, 0, print_attr_num },
- { "Acct_in_octets", NULL, 0, 0, print_attr_num },
- { "Acct_out_octets", NULL, 0, 0, print_attr_num },
- { "Acct_session_id", NULL, 0, 0, print_attr_string },
- { "Acct_authentic", acct_auth, TAM_SIZE(acct_auth)-1, 1, print_attr_num },
- { "Acct_session_time", NULL, 0, 0, print_attr_num },
- { "Acct_in_packets", NULL, 0, 0, print_attr_num },
- { "Acct_out_packets", NULL, 0, 0, print_attr_num },
- { "Acct_term_cause", acct_term, TAM_SIZE(acct_term)-1, 1, print_attr_num },
- { "Acct_multi_session_id", NULL, 0, 0, print_attr_string },
- { "Acct_link_count", NULL, 0, 0, print_attr_num },
- { "Acct_in_giga", NULL, 0, 0, print_attr_num },
- { "Acct_out_giga", NULL, 0, 0, print_attr_num },
-/*54*/ { "Unassigned", NULL, 0, 0, NULL },
- { "Event_timestamp", NULL, 0, 0, print_attr_time },
-/*56*/ { "Unassigned", NULL, 0, 0, NULL },
-/*57*/ { "Unassigned", NULL, 0, 0, NULL },
-/*58*/ { "Unassigned", NULL, 0, 0, NULL },
-/*59*/ { "Unassigned", NULL, 0, 0, NULL },
- { "CHAP_challenge", NULL, 0, 0, print_attr_string },
- { "NAS_port_type", nas_port_type, TAM_SIZE(nas_port_type), 0,
- print_attr_num },
- { "Port_limit", NULL, 0, 0, print_attr_num },
-/*63*/ { "Login_LAT_port", NULL, 0, 0, print_attr_string },
- { "Tunnel_type", tunnel_type, TAM_SIZE(tunnel_type)-1, 1, print_attr_num },
- { "Tunnel_medium", tunnel_medium, TAM_SIZE(tunnel_medium)-1, 1,
- print_attr_num },
- { "Tunnel_client_end", NULL, 0, 0, print_attr_string },
- { "Tunnel_server_end", NULL, 0, 0, print_attr_string },
- { "Acct_tunnel_connect", NULL, 0, 0, print_attr_string },
- { "Tunnel_pass", NULL, 0, 0, print_attr_string },
- { "ARAP_pass", NULL, 0, 0, print_attr_strange },
- { "ARAP_feature", NULL, 0, 0, print_attr_strange },
-/*72*/ { "ARAP_zone_acces", arap_zone, TAM_SIZE(arap_zone)-1, 1,
- print_attr_num },
- { "ARAP_security", NULL, 0, 0, print_attr_string },
- { "ARAP_security_data", NULL, 0, 0, print_attr_string },
- { "Password_retry", NULL, 0, 0, print_attr_num },
- { "Prompt", prompt, TAM_SIZE(prompt), 0, print_attr_num },
- { "Connect_info", NULL, 0, 0, print_attr_string },
- { "Config_token", NULL, 0, 0, print_attr_string },
- { "EAP_msg", NULL, 0, 0, print_attr_string },
-/*80*/ { "Message_auth", NULL, 0, 0, print_attr_string },
- { "Tunnel_priv_group", NULL, 0, 0, print_attr_string },
- { "Tunnel_assign_id", NULL, 0, 0, print_attr_string },
- { "Tunnel_pref", NULL, 0, 0, print_attr_num },
- { "ARAP_challenge_resp", NULL, 0, 0, print_attr_strange },
- { "Acct_interim_interval", NULL, 0, 0, print_attr_num },
-/*86*/ { "Acct_tunnel_pack_lost", NULL, 0, 0, print_attr_num },
- { "NAS_port_id", NULL, 0, 0, print_attr_string },
- { "Framed_pool", NULL, 0, 0, print_attr_string },
- { "Unassigned", NULL, 0, 0, NULL },
- { "Tunnel_client_auth_id", NULL, 0, 0, print_attr_string },
- { "Tunnel_server_auth_id", NULL, 0, 0, print_attr_string },
-/*92*/ { "Unassigned", NULL, 0, 0, NULL },
-/*93*/ { "Unassigned", NULL, 0, 0, NULL }
- };
-
-
-/*****************************/
-/* Print an attribute string */
-/* value pointed by 'data' */
-/* and 'length' size. */
-/*****************************/
-/* Returns nothing. */
-/*****************************/
-static void
-print_attr_string(register u_char *data, u_int length, u_short attr_code )
-{
- register u_int i;
-
- TCHECK2(data[0],length);
-
- printf("{");
- switch(attr_code)
- {
- case TUNNEL_PASS:
- if (*data && (*data <=0x1F) )
- printf("Tag[%d] ",*data);
- data++;
- printf("Salt[%d] ",EXTRACT_16BITS(data) );
- data+=2;
- length-=2;
- break;
- case TUNNEL_CLIENT_END:
- case TUNNEL_SERVER_END:
- case TUNNEL_PRIV_GROUP:
- case TUNNEL_ASSIGN_ID:
- case TUNNEL_CLIENT_AUTH:
- case TUNNEL_SERVER_AUTH:
- if (*data <= 0x1F)
- {
- printf("Tag[%d] ",*data);
- data++;
- length--;
- }
- break;
- }
-
- for (i=0; i < length ; i++, data++)
- printf("%c",(*data < 32 || *data > 128) ? '.' : *data );
-
- printf("}");
-
- return;
-
- trunc:
- printf("|radius");
-}
-
-
-/******************************/
-/* Print an attribute numeric */
-/* value pointed by 'data' */
-/* and 'length' size. */
-/******************************/
-/* Returns nothing. */
-/******************************/
-static void
-print_attr_num(register u_char *data, u_int length, u_short attr_code )
-{
- u_int8_t tag;
- u_int32_t timeout;
-
- if (length != 4)
- {
- printf("{length %u != 4}", length);
- return;
- }
-
- TCHECK2(data[0],4);
- /* This attribute has standard values */
- if (attr_type[attr_code].siz_subtypes)
- {
- static const char **table;
- u_int32_t data_value;
- table = attr_type[attr_code].subtypes;
-
- if ( (attr_code == TUNNEL_TYPE) || (attr_code == TUNNEL_MEDIUM) )
- {
- if (!*data)
- printf("{Tag[Unused]");
- else
- printf("{Tag[%d]", *data);
- data++;
- data_value = EXTRACT_24BITS(data);
- }
- else
- {
- data++;
- data_value = EXTRACT_32BITS(data);
- }
- if ( data_value <= (attr_type[attr_code].siz_subtypes - 1 +
- attr_type[attr_code].first_subtype) )
- printf("{%s}",table[data_value]);
- else
- printf("{#%d}",data_value);
- }
- else
- {
- switch(attr_code) /* Be aware of special cases... */
- {
- case FRM_IPX:
- if (EXTRACT_32BITS( data) == 0xFFFFFFFE )
- printf("{NAS_select}");
- else
- printf("{%d}",EXTRACT_32BITS( data) );
- break;
-
- case SESSION_TIMEOUT:
- case IDLE_TIMEOUT:
- case ACCT_DELAY:
- case ACCT_SESSION_TIME:
- case ACCT_INT_INTERVAL:
- timeout = EXTRACT_32BITS( data);
- if ( timeout < 60 )
- printf( "{%02d secs}", timeout);
- else
- {
- if ( timeout < 3600 )
- printf( "{%02d:%02d min}",
- timeout / 60, timeout % 60);
- else
- printf( "{%02d:%02d:%02d hours}",
- timeout / 3600, (timeout % 3600) / 60,
- timeout % 60);
- }
- break;
-
- case FRM_ATALK_LINK:
- if (EXTRACT_32BITS(data) )
- printf("{%d}",EXTRACT_32BITS(data) );
- else
- printf("{Unnumbered}" );
- break;
-
- case FRM_ATALK_NETWORK:
- if (EXTRACT_32BITS(data) )
- printf("{%d}",EXTRACT_32BITS(data) );
- else
- printf("{NAS_assign}" );
- break;
-
- case TUNNEL_PREFERENCE:
- tag = *data;
- data++;
- if (tag == 0)
- printf("{Tag[Unused] %d}",EXTRACT_24BITS(data) );
- else
- printf("{Tag[%d] %d}", tag, EXTRACT_24BITS(data) );
- break;
-
- default:
- printf("{%d}",EXTRACT_32BITS( data) );
- break;
-
- } /* switch */
-
- } /* if-else */
-
- return;
-
- trunc:
- printf("|radius}");
-}
-
-
-/*****************************/
-/* Print an attribute IPv4 */
-/* address value pointed by */
-/* 'data' and 'length' size. */
-/*****************************/
-/* Returns nothing. */
-/*****************************/
-static void
-print_attr_address(register u_char *data, u_int length, u_short attr_code )
-{
- if (length != 4)
- {
- printf("{length %u != 4}", length);
- return;
- }
-
- TCHECK2(data[0],4);
-
- switch(attr_code)
- {
- case FRM_IPADDR:
- case LOG_IPHOST:
- if (EXTRACT_32BITS(data) == 0xFFFFFFFF )
- printf("{User_select}");
- else
- if (EXTRACT_32BITS(data) == 0xFFFFFFFE )
- printf("{NAS_select}");
- else
- printf("{%s}",ipaddr_string(data));
- break;
-
- default:
- printf("{%s}",ipaddr_string(data) );
- break;
- }
-
- return;
-
- trunc:
- printf("{|radius}");
-}
-
-
-/*************************************/
-/* Print an attribute of 'secs since */
-/* January 1, 1970 00:00 UTC' value */
-/* pointed by 'data' and 'length' */
-/* size. */
-/*************************************/
-/* Returns nothing. */
-/*************************************/
-static void print_attr_time(register u_char *data, u_int length, u_short attr_code)
-{
- time_t attr_time;
- char string[26];
-
- if (length != 4)
- {
- printf("{length %u != 4}", length);
- return;
- }
-
- TCHECK2(data[0],4);
-
- attr_time = EXTRACT_32BITS(data);
- strcpy(string, ctime(&attr_time));
- /* Get rid of the newline */
- string[24] = '\0';
- printf("{%.24s}", string);
- return;
-
- trunc:
- printf("{|radius}");
-}
-
-
-/***********************************/
-/* Print an attribute of 'strange' */
-/* data format pointed by 'data' */
-/* and 'length' size. */
-/***********************************/
-/* Returns nothing. */
-/***********************************/
-static void print_attr_strange(register u_char *data, u_int length, u_short attr_code)
-{
- u_short len_data;
-
- switch(attr_code)
- {
- case ARAP_PASS:
- if (length != 16)
- {
- printf("{length %u != 16}", length);
- return;
- }
- printf("{User_challenge[");
- TCHECK2(data[0],8);
- len_data = 8;
- PRINT_HEX(len_data, data);
- printf("] User_resp[");
- TCHECK2(data[0],8);
- len_data = 8;
- PRINT_HEX(len_data, data);
- printf("]}");
- break;
-
- case ARAP_FEATURES:
- if (length != 14)
- {
- printf("{length %u != 14}", length);
- return;
- }
- TCHECK2(data[0],1);
- if (*data)
- printf("{User_can_change_pass");
- else
- printf("{User_cant_change_pass");
- data++;
- TCHECK2(data[0],1);
- printf(" Min_pass_len[%d]",*data);
- data++;
- printf(" Pass_created_at[");
- TCHECK2(data[0],4);
- len_data = 4;
- PRINT_HEX(len_data, data);
- printf("] Pass_expired_in[");
- TCHECK2(data[0],4);
- len_data = 4;
- PRINT_HEX(len_data, data);
- printf("] Current_time[");
- len_data = 4;
- TCHECK2(data[0],4);
- PRINT_HEX(len_data, data);
- printf("]}");
- break;
-
- case ARAP_CHALLENGE_RESP:
- if (length < 8)
- {
- printf("{length %u != 8}", length);
- return;
- }
- printf("{");
- TCHECK2(data[0],8);
- len_data = 8;
- PRINT_HEX(len_data, data);
- printf("}");
- break;
- }
-
- trunc:
- printf("|radius}");
-}
-
-
-
-static void
-radius_attr_print(register u_char *attr, u_int length)
-{
- register const struct radius_attr *rad_attr = (struct radius_attr *)attr;
-
- if (length < 3)
- {
- printf(" [|radius]");
- return;
- }
-
- printf(" Attr[ ");
- while (length > 0)
- {
- if ( rad_attr->len <= length )
- {
- if ( !rad_attr->type || (rad_attr->type > (TAM_SIZE(attr_type)-1)) )
- printf("#%d",rad_attr->type);
- else
- {
- printf(" %s",attr_type[rad_attr->type].name);
-
- if (rad_attr->len > 2)
- {
- if ( attr_type[rad_attr->type].print_func )
- (*attr_type[rad_attr->type].print_func)(
- ((u_char *)(rad_attr+1)),
- rad_attr->len - 2, rad_attr->type);
- }
- }
- }
- else
- {
- printf(" [|radius]");
- return;
- }
- length-=(rad_attr->len);
- rad_attr = (struct radius_attr *)( ((char *)(rad_attr))+rad_attr->len);
- }
-
- printf(" ]");
-}
-
-
-void
-radius_print(const u_char *dat, u_int length)
-{
- register const struct radius_hdr *rad;
- register int i;
-
- i = min(length, snapend - dat) - sizeof(*rad);
-
- if (i < 0)
- {
- printf(" [|radius]");
- return;
- }
-
- rad = (struct radius_hdr *)dat;
-
- switch (rad->code)
- {
- case RADCMD_ACCESS_REQ:
- printf(" rad-access-req %d", length);
- break;
-
- case RADCMD_ACCESS_ACC:
- printf(" rad-access-accept %d", length);
- break;
-
- case RADCMD_ACCESS_REJ:
- printf(" rad-access-reject %d", length);
- break;
-
- case RADCMD_ACCOUN_REQ:
- printf(" rad-account-req %d", length);
- break;
-
- case RADCMD_ACCOUN_RES:
- printf(" rad-account-resp %d", length);
- break;
-
- case RADCMD_ACCESS_CHA:
- printf(" rad-access-cha %d", length);
- break;
-
- case RADCMD_STATUS_SER:
- printf(" rad-status-serv %d", length);
- break;
-
- case RADCMD_STATUS_CLI:
- printf(" rad-status-cli %d", length);
- break;
-
- case RADCMD_RESERVED:
- printf(" rad-reserved %d", length);
- break;
-
- default:
- printf(" rad-#%d %d", rad->code, length);
- break;
- }
- printf(" [id %d]", rad->id);
-
- if (i)
- radius_attr_print( ((u_char *)(rad+1)), i);
-}
diff --git a/contrib/tcpdump/print-sll.c b/contrib/tcpdump/print-sll.c
deleted file mode 100644
index 8f2803a9e43c..000000000000
--- a/contrib/tcpdump/print-sll.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.3 2000/12/23 20:49:34 guy Exp $ (LBL)";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-struct mbuf;
-struct rtentry;
-
-#include <netinet/in.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <pcap.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "ethertype.h"
-
-#include "ether.h"
-#include "sll.h"
-
-const u_char *packetp;
-const u_char *snapend;
-
-static inline void
-sll_print(register const struct sll_header *sllp, u_int length)
-{
- u_short halen;
-
- switch (ntohs(sllp->sll_pkttype)) {
-
- case LINUX_SLL_HOST:
- (void)printf("< ");
- break;
-
- case LINUX_SLL_BROADCAST:
- (void)printf("B ");
- break;
-
- case LINUX_SLL_MULTICAST:
- (void)printf("M ");
- break;
-
- case LINUX_SLL_OTHERHOST:
- (void)printf("P ");
- break;
-
- case LINUX_SLL_OUTGOING:
- (void)printf("> ");
- break;
-
- default:
- (void)printf("? ");
- break;
- }
-
- /*
- * XXX - check the link-layer address type value?
- * For now, we just assume 6 means Ethernet.
- * XXX - print others as strings of hex?
- */
- halen = ntohs(sllp->sll_halen);
- if (halen == 6)
- (void)printf("%s ", etheraddr_string(sllp->sll_addr));
-
- if (!qflag)
- (void)printf("%s ", etherproto_string(sllp->sll_protocol));
- (void)printf("%d: ", length);
-}
-
-/*
- * This is the top level routine of the printer. 'p' is the points
- * to the ether header of the packet, 'h->tv' is the timestamp,
- * 'h->length' is the length of the packet off the wire, and 'h->caplen'
- * is the number of bytes actually captured.
- */
-void
-sll_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
-{
- u_int caplen = h->caplen;
- u_int length = h->len;
- register const struct sll_header *sllp;
- u_short pkttype;
- struct ether_header ehdr;
- u_short ether_type;
- u_short extracted_ethertype;
-
- ts_print(&h->ts);
-
- if (caplen < SLL_HDR_LEN) {
- /*
- * XXX - this "can't happen" because "pcap-linux.c" always
- * adds this many bytes of header to every packet in a
- * cooked socket capture.
- */
- printf("[|sll]");
- goto out;
- }
-
- sllp = (const struct sll_header *)p;
-
- /*
- * Fake up an Ethernet header for the benefit of printers that
- * insist on "packetp" pointing to an Ethernet header.
- */
- pkttype = ntohs(sllp->sll_pkttype);
-
- /* The source address is in the packet header */
- memcpy(ehdr.ether_shost, sllp->sll_addr, ETHER_ADDR_LEN);
-
- if (pkttype != LINUX_SLL_OUTGOING) {
- /*
- * We received this packet.
- *
- * We don't know the destination address, so
- * we fake it - all 0's except that the
- * bottommost bit of the bottommost octet
- * is set for a unicast packet, all 0's except
- * that the bottommost bit of the uppermost
- * octet is set for a multicast packet, all
- * 1's for a broadcast packet.
- */
- if (pkttype == LINUX_SLL_BROADCAST)
- memset(ehdr.ether_dhost, 0xFF, ETHER_ADDR_LEN);
- else {
- memset(ehdr.ether_dhost, 0, ETHER_ADDR_LEN);
- if (pkttype == LINUX_SLL_MULTICAST)
- ehdr.ether_dhost[0] = 1;
- else
- ehdr.ether_dhost[ETHER_ADDR_LEN-1] = 1;
- }
- } else {
- /*
- * We sent this packet; we don't know whether it's
- * broadcast, multicast, or unicast, so just make
- * the destination address all 0's.
- */
- memset(ehdr.ether_dhost, 0, ETHER_ADDR_LEN);
- }
-
- if (eflag)
- sll_print(sllp, length);
-
- /*
- * Some printers want to get back at the ethernet addresses,
- * and/or check that they're not walking off the end of the packet.
- * Rather than pass them all the way down, we set these globals.
- */
- snapend = p + caplen;
- /*
- * Actually, the only printers that use packetp are print-arp.c
- * and print-bootp.c, and they assume that packetp points to an
- * Ethernet header. The right thing to do is to fix them to know
- * which link type is in use when they excavate. XXX
- */
- packetp = (u_char *)&ehdr;
-
- length -= SLL_HDR_LEN;
- caplen -= SLL_HDR_LEN;
- p += SLL_HDR_LEN;
-
- ether_type = ntohs(sllp->sll_protocol);
-
- /*
- * Is it (gag) an 802.3 encapsulation, or some non-Ethernet
- * packet type?
- */
- extracted_ethertype = 0;
- if (ether_type <= ETHERMTU) {
- /*
- * Yes - what type is it?
- */
- switch (ether_type) {
-
- case LINUX_SLL_P_802_2:
- /*
- * 802.2.
- * Try to print the LLC-layer header & higher layers.
- */
- if (llc_print(p, length, caplen, ESRC(&ehdr),
- EDST(&ehdr), &extracted_ethertype) == 0)
- goto unknown; /* unknown LLC type */
- break;
-
- default:
- unknown:
- /* ether_type not known, print raw packet */
- if (!eflag)
- sll_print(sllp, length + SLL_HDR_LEN);
- if (extracted_ethertype) {
- printf("(LLC %s) ",
- etherproto_string(htons(extracted_ethertype)));
- }
- if (!xflag && !qflag)
- default_print(p, caplen);
- break;
- }
- } else if (ether_encap_print(ether_type, p, length, caplen,
- &extracted_ethertype) == 0) {
- /* ether_type not known, print raw packet */
- if (!eflag)
- sll_print(sllp, length + SLL_HDR_LEN);
- if (!xflag && !qflag)
- default_print(p, caplen);
- }
- if (xflag)
- default_print(p, caplen);
- out:
- putchar('\n');
-}
diff --git a/contrib/tcpdump/print-stp.c b/contrib/tcpdump/print-stp.c
deleted file mode 100644
index 928166331523..000000000000
--- a/contrib/tcpdump/print-stp.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2000 Lennert Buytenhek
- *
- * This software may be distributed either under the terms of the
- * BSD-style license that accompanies tcpdump or the GNU General
- * Public License
- *
- * Format and print IEEE 802.1d spanning tree protocol packets.
- * Contributed by Lennert Buytenhek <buytenh@gnu.org>
- */
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.6 2000/09/29 04:58:50 guy Exp $";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "extract.h"
-
-static void
-stp_print_bridge_id(const u_char *p)
-{
- printf("%.2x%.2x.%.2x:%.2x:%.2x:%.2x:%.2x:%.2x",
- p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
-}
-
-static void
-stp_print_config_bpdu(const u_char *p, u_int length)
-{
- printf("config ");
- if (p[7] & 1)
- printf("TOP_CHANGE ");
- if (p[7] & 0x80)
- printf("TOP_CHANGE_ACK ");
-
- stp_print_bridge_id(p+20);
- printf(".%.2x%.2x ", p[28], p[29]);
-
- printf("root ");
- stp_print_bridge_id(p+8);
-
- printf(" pathcost %i ", (p[16] << 24) | (p[17] << 16) | (p[18] << 8) | p[19]);
-
- printf("age %i ", p[30]);
- printf("max %i ", p[32]);
- printf("hello %i ", p[34]);
- printf("fdelay %i ", p[36]);
-}
-
-static void
-stp_print_tcn_bpdu(const u_char *p, u_int length)
-{
- printf("tcn");
-}
-
-/*
- * Print 802.1d packets.
- */
-void
-stp_print(const u_char *p, u_int length)
-{
- if (length < 7)
- goto trunc;
-
- printf("802.1d ");
- if (p[2] != 0x03 || p[3] || p[4] || p[5]) {
- printf("unknown version");
- return;
- }
-
- switch (p[6])
- {
- case 0:
- if (length < 10)
- goto trunc;
- stp_print_config_bpdu(p, length);
- break;
-
- case 1:
- stp_print_tcn_bpdu(p, length);
- break;
-
- default:
- printf("unknown type %i\n", p[6]);
- break;
- }
-
- return;
-trunc:
- printf("[|stp %d]", length);
-}
diff --git a/contrib/tcpdump/print-timed.c b/contrib/tcpdump/print-timed.c
deleted file mode 100644
index d683c409534f..000000000000
--- a/contrib/tcpdump/print-timed.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2000 Ben Smithurst <ben@scientia.demon.co.uk>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-timed.c,v 1.1 2000/10/06 05:35:37 guy Exp $";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/time.h>
-
-#include <netinet/in.h>
-#include "ip.h"
-#include "udp.h"
-#include "tcp.h"
-
-#include "timed.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "extract.h" /* must come after interface.h */
-
-static char *tsptype[TSPTYPENUMBER] =
- { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP",
- "SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT",
- "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ",
- "TEST", "SETDATE", "SETDATEREQ", "LOOP" };
-
-void
-timed_print(register const u_char *bp, u_int length)
-{
-#define endof(x) ((u_char *)&(x) + sizeof (x))
- struct tsp *tsp = (struct tsp *)bp;
- long sec, usec;
- const u_char *end;
-
- if (endof(tsp->tsp_type) > snapend) {
- fputs("[|timed]", stdout);
- return;
- }
- if (tsp->tsp_type < TSPTYPENUMBER)
- printf("TSP_%s", tsptype[tsp->tsp_type]);
- else
- printf("(tsp_type %#x)", tsp->tsp_type);
-
- if (endof(tsp->tsp_vers) > snapend) {
- fputs(" [|timed]", stdout);
- return;
- }
- printf(" vers %d", tsp->tsp_vers);
-
- if (endof(tsp->tsp_seq) > snapend) {
- fputs(" [|timed]", stdout);
- return;
- }
- printf(" seq %d", tsp->tsp_seq);
-
- if (tsp->tsp_type == TSP_LOOP) {
- if (endof(tsp->tsp_hopcnt) > snapend) {
- fputs(" [|timed]", stdout);
- return;
- }
- printf(" hopcnt %d", tsp->tsp_hopcnt);
- } else if (tsp->tsp_type == TSP_SETTIME ||
- tsp->tsp_type == TSP_ADJTIME ||
- tsp->tsp_type == TSP_SETDATE ||
- tsp->tsp_type == TSP_SETDATEREQ) {
- if (endof(tsp->tsp_time) > snapend) {
- fputs(" [|timed]", stdout);
- return;
- }
- sec = ntohl((long)tsp->tsp_time.tv_sec);
- usec = ntohl((long)tsp->tsp_time.tv_usec);
- if (usec < 0)
- /* corrupt, skip the rest of the packet */
- return;
- fputs(" time ", stdout);
- if (sec < 0 && usec != 0) {
- sec++;
- if (sec == 0)
- fputc('-', stdout);
- usec = 1000000 - usec;
- }
- printf("%ld.%06ld", sec, usec);
- }
-
- end = memchr(tsp->tsp_name, '\0', snapend - (u_char *)tsp->tsp_name);
- if (end == NULL)
- fputs(" [|timed]", stdout);
- else {
- fputs(" name ", stdout);
- fwrite(tsp->tsp_name, end - (u_char *)tsp->tsp_name, 1, stdout);
- }
-}
diff --git a/contrib/tcpdump/print-vrrp.c b/contrib/tcpdump/print-vrrp.c
deleted file mode 100644
index 6b7ac94d92b4..000000000000
--- a/contrib/tcpdump/print-vrrp.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2000 William C. Fenner.
- * All rights reserved.
- *
- * Kevin Steves <ks@hp.se> July 2000
- * Modified to:
- * - print version, type string and packet length
- * - print IP address count if > 1 (-v)
- * - verify checksum (-v)
- * - print authentication string (-v)
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code
- * distributions retain the above copyright notice and this paragraph
- * in its entirety, and (2) distributions including binary code include
- * the above copyright notice and this paragraph in its entirety in
- * the documentation or other materials provided with the distribution.
- * The name of William C. Fenner may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND
- * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
- * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-vrrp.c,v 1.3 2000/10/10 05:05:08 guy Exp $";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <netinet/in.h>
-
-#include "interface.h"
-#include "extract.h"
-#include "addrtoname.h"
-
-/*
- * RFC 2338:
- * 0 1 2 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * |Version| Type | Virtual Rtr ID| Priority | Count IP Addrs|
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Auth Type | Adver Int | Checksum |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | IP Address (1) |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | . |
- * | . |
- * | . |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | IP Address (n) |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Authentication Data (1) |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Authentication Data (2) |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
-void
-vrrp_print(register const u_char *bp, register u_int len, int ttl)
-{
- int version, type, auth_type;
- char *type_s;
-
- TCHECK(bp[0]);
- version = (bp[0] & 0xf0) >> 4;
- type = bp[0] & 0x0f;
- if (type == 1)
- type_s = "advertise";
- else
- type_s = "unknown";
- printf("VRRPv%d-%s %d: ", version, type_s, len);
- if (ttl != 255)
- printf("[ttl=%d!] ", ttl);
- if (version != 2 || type != 1)
- return;
- TCHECK(bp[2]);
- printf("vrid=%d prio=%d", bp[1], bp[2]);
- TCHECK(bp[5]);
- auth_type = bp[4];
- if (auth_type != 0)
- printf(" authtype=%d", auth_type);
- printf(" intvl=%d", bp[5]);
- if (vflag) {
- int naddrs = bp[3];
- int i;
- char c;
-
- if (TTEST2(bp[0], len) && in_cksum((const u_short*)bp, len, 0))
- printf(" (bad vrrp cksum %x!)",
- EXTRACT_16BITS(&bp[6]));
- printf(" addrs");
- if (naddrs > 1)
- printf("(%d)", naddrs);
- printf(":");
- c = ' ';
- bp += 8;
- for (i = 0; i < naddrs; i++) {
- TCHECK(bp[3]);
- printf("%c%s", c, ipaddr_string(bp));
- c = ',';
- bp += 4;
- }
- if (auth_type == 1) { /* simple text password */
- TCHECK(bp[7]);
- printf(" auth %.8s", bp);
- }
- }
- return;
-trunc:
- printf("[|vrrp]");
-}
diff --git a/contrib/tcpdump/slcompress.h b/contrib/tcpdump/slcompress.h
deleted file mode 100644
index d8a596cf5290..000000000000
--- a/contrib/tcpdump/slcompress.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Definitions for tcp compression routines.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/slcompress.h,v 1.2 2000/10/09 02:03:44 guy Exp $ (LBL)
- *
- * Copyright (c) 1989, 1990, 1992, 1993 Regents of the University of
- * California. All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Van Jacobson (van@ee.lbl.gov), Dec 31, 1989:
- * - Initial distribution.
- */
-
-/*
- * Compressed packet format:
- *
- * The first octet contains the packet type (top 3 bits), TCP
- * 'push' bit, and flags that indicate which of the 4 TCP sequence
- * numbers have changed (bottom 5 bits). The next octet is a
- * conversation number that associates a saved IP/TCP header with
- * the compressed packet. The next two octets are the TCP checksum
- * from the original datagram. The next 0 to 15 octets are
- * sequence number changes, one change per bit set in the header
- * (there may be no changes and there are two special cases where
- * the receiver implicitly knows what changed -- see below).
- *
- * There are 5 numbers which can change (they are always inserted
- * in the following order): TCP urgent pointer, window,
- * acknowlegement, sequence number and IP ID. (The urgent pointer
- * is different from the others in that its value is sent, not the
- * change in value.) Since typical use of SLIP links is biased
- * toward small packets (see comments on MTU/MSS below), changes
- * use a variable length coding with one octet for numbers in the
- * range 1 - 255 and 3 octets (0, MSB, LSB) for numbers in the
- * range 256 - 65535 or 0. (If the change in sequence number or
- * ack is more than 65535, an uncompressed packet is sent.)
- */
-
-/*
- * Packet types (must not conflict with IP protocol version)
- *
- * The top nibble of the first octet is the packet type. There are
- * three possible types: IP (not proto TCP or tcp with one of the
- * control flags set); uncompressed TCP (a normal IP/TCP packet but
- * with the 8-bit protocol field replaced by an 8-bit connection id --
- * this type of packet syncs the sender & receiver); and compressed
- * TCP (described above).
- *
- * LSB of 4-bit field is TCP "PUSH" bit (a worthless anachronism) and
- * is logically part of the 4-bit "changes" field that follows. Top
- * three bits are actual packet type. For backward compatibility
- * and in the interest of conserving bits, numbers are chosen so the
- * IP protocol version number (4) which normally appears in this nibble
- * means "IP packet".
- */
-
-/* packet types */
-#define TYPE_IP 0x40
-#define TYPE_UNCOMPRESSED_TCP 0x70
-#define TYPE_COMPRESSED_TCP 0x80
-#define TYPE_ERROR 0x00
-
-/* Bits in first octet of compressed packet */
-#define NEW_C 0x40 /* flag bits for what changed in a packet */
-#define NEW_I 0x20
-#define NEW_S 0x08
-#define NEW_A 0x04
-#define NEW_W 0x02
-#define NEW_U 0x01
-
-/* reserved, special-case values of above */
-#define SPECIAL_I (NEW_S|NEW_W|NEW_U) /* echoed interactive traffic */
-#define SPECIAL_D (NEW_S|NEW_A|NEW_W|NEW_U) /* unidirectional data */
-#define SPECIALS_MASK (NEW_S|NEW_A|NEW_W|NEW_U)
-
-#define TCP_PUSH_BIT 0x10
diff --git a/contrib/tcpdump/slip.h b/contrib/tcpdump/slip.h
deleted file mode 100644
index e64f3015ac3e..000000000000
--- a/contrib/tcpdump/slip.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Definitions that user level programs might need to know to interact
- * with serial line IP (slip) lines.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/slip.h,v 1.1 2000/10/09 01:53:21 guy Exp $
- *
- * Copyright (c) 1990 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/*
- * definitions of the pseudo- link-level header attached to slip
- * packets grabbed by the packet filter (bpf) traffic monitor.
- */
-#define SLIP_HDRLEN 16
-
-#define SLX_DIR 0
-#define SLX_CHDR 1
-#define CHDR_LEN 15
-
-#define SLIPDIR_IN 0
-#define SLIPDIR_OUT 1
diff --git a/contrib/tcpdump/sll.h b/contrib/tcpdump/sll.h
deleted file mode 100644
index 821a8456c048..000000000000
--- a/contrib/tcpdump/sll.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*-
- * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from the Stanford/CMU enet packet filter,
- * (net/enet.c) distributed as part of 4.3BSD, and code contributed
- * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
- * Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#) $Header: /tcpdump/master/tcpdump/sll.h,v 1.4 2000/12/23 07:52:11 guy Exp $ (LBL)
- */
-
-/*
- * For captures on Linux cooked sockets, we construct a fake header
- * that includes:
- *
- * a 2-byte "packet type" which is one of:
- *
- * LINUX_SLL_HOST packet was sent to us
- * LINUX_SLL_BROADCAST packet was broadcast
- * LINUX_SLL_MULTICAST packet was multicast
- * LINUX_SLL_OTHERHOST packet was sent to somebody else
- * LINUX_SLL_OUTGOING packet was sent *by* us;
- *
- * a 2-byte Ethernet protocol field;
- *
- * a 2-byte link-layer type;
- *
- * a 2-byte link-layer address length;
- *
- * an 8-byte source link-layer address, whose actual length is
- * specified by the previous value.
- *
- * All fields except for the link-layer address are in network byte order.
- *
- * DO NOT change the layout of this structure, or change any of the
- * LINUX_SLL_ values below. If you must change the link-layer header
- * for a "cooked" Linux capture, introduce a new DLT_ type (ask
- * "tcpdump-workers@tcpdump.org" for one, so that you don't give it a
- * value that collides with a value already being used), and use the
- * new header in captures of that type, so that programs that can
- * handle DLT_LINUX_SLL captures will continue to handle them correctly
- * without any change, and so that capture files with different headers
- * can be told apart and programs that read them can dissect the
- * packets in them.
- *
- * This structure, and the #defines below, must be the same in the
- * libpcap and tcpdump versions of "sll.h".
- */
-
-/*
- * A DLT_LINUX_SLL fake link-layer header.
- */
-#define SLL_HDR_LEN 16 /* total header length */
-#define SLL_ADDRLEN 8 /* length of address field */
-
-struct sll_header {
- u_int16_t sll_pkttype; /* packet type */
- u_int16_t sll_hatype; /* link-layer address type */
- u_int16_t sll_halen; /* link-layer address length */
- u_int8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
- u_int16_t sll_protocol; /* protocol */
-};
-
-/*
- * The LINUX_SLL_ values for "sll_pkttype"; these correspond to the
- * PACKET_ values on Linux, but are defined here so that they're
- * available even on systems other than Linux, and so that they
- * don't change even if the PACKET_ values change.
- */
-#define LINUX_SLL_HOST 0
-#define LINUX_SLL_BROADCAST 1
-#define LINUX_SLL_MULTICAST 2
-#define LINUX_SLL_OTHERHOST 3
-#define LINUX_SLL_OUTGOING 4
-
-/*
- * The LINUX_SLL_ values for "sll_protocol"; these correspond to the
- * ETH_P_ values on Linux, but are defined here so that they're
- * available even on systems other than Linux. We assume, for now,
- * that the ETH_P_ values won't change in Linux; if they do, then:
- *
- * if we don't translate them in "pcap-linux.c", capture files
- * won't necessarily be readable if captured on a system that
- * defines ETH_P_ values that don't match these values;
- *
- * if we do translate them in "pcap-linux.c", that makes life
- * unpleasant for the BPF code generator, as the values you test
- * for in the kernel aren't the values that you test for when
- * reading a capture file, so the fixup code run on BPF programs
- * handed to the kernel ends up having to do more work.
- *
- * Add other values here as necessary, for handling packet types that
- * might show up on non-Ethernet, non-802.x networks. (Not all the ones
- * in the Linux "if_ether.h" will, I suspect, actually show up in
- * captures.)
- */
-#define LINUX_SLL_P_802_3 0x0001 /* Novell 802.3 frames without 802.2 LLC header */
-#define LINUX_SLL_P_802_2 0x0004 /* 802.2 frames (not D/I/X Ethernet) */
diff --git a/contrib/tcpdump/tcp.h b/contrib/tcpdump/tcp.h
deleted file mode 100644
index a93c14f1b588..000000000000
--- a/contrib/tcpdump/tcp.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.7 2000/10/03 09:17:41 guy Exp $ (LBL) */
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp.h 8.1 (Berkeley) 6/10/93
- */
-
-typedef u_int32_t tcp_seq;
-/*
- * TCP header.
- * Per RFC 793, September, 1981.
- */
-struct tcphdr {
- u_int16_t th_sport; /* source port */
- u_int16_t th_dport; /* destination port */
- tcp_seq th_seq; /* sequence number */
- tcp_seq th_ack; /* acknowledgement number */
- u_int8_t th_offx2; /* data offset, rsvd */
-#define TH_OFF(th) (((th)->th_offx2 & 0xf0) >> 4)
- u_int8_t th_flags;
-#define TH_FIN 0x01
-#define TH_SYN 0x02
-#define TH_RST 0x04
-#define TH_PUSH 0x08
-#define TH_ACK 0x10
-#define TH_URG 0x20
- u_int16_t th_win; /* window */
- u_int16_t th_sum; /* checksum */
- u_int16_t th_urp; /* urgent pointer */
-};
-
-#define TCPOPT_EOL 0
-#define TCPOPT_NOP 1
-#define TCPOPT_MAXSEG 2
-#define TCPOLEN_MAXSEG 4
-#define TCPOPT_WINDOW 3
-#define TCPOLEN_WINDOW 3
-#define TCPOPT_SACK_PERMITTED 4 /* Experimental */
-#define TCPOLEN_SACK_PERMITTED 2
-#define TCPOPT_SACK 5 /* Experimental */
-#define TCPOPT_TIMESTAMP 8
-#define TCPOLEN_TIMESTAMP 10
-#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
-
-#define TCPOPT_TSTAMP_HDR \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
diff --git a/contrib/tcpdump/timed.h b/contrib/tcpdump/timed.h
deleted file mode 100644
index 136e55e1d7d3..000000000000
--- a/contrib/tcpdump/timed.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/timed.h,v 1.3 2000/12/17 23:07:51 guy Exp $ (LBL) */
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)timed.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _PROTOCOLS_TIMED_H_
-#define _PROTOCOLS_TIMED_H_
-
-/*
- * Time Synchronization Protocol
- */
-
-#define TSPVERSION 1
-#define ANYADDR NULL
-
-struct tsp {
- u_char tsp_type;
- u_char tsp_vers;
- u_short tsp_seq;
- union {
- struct timeval tspu_time;
- char tspu_hopcnt;
- } tsp_u;
- char tsp_name[256];
-};
-
-#define tsp_time tsp_u.tspu_time
-#define tsp_hopcnt tsp_u.tspu_hopcnt
-
-/*
- * Command types.
- */
-#define TSP_ANY 0 /* match any types */
-#define TSP_ADJTIME 1 /* send adjtime */
-#define TSP_ACK 2 /* generic acknowledgement */
-#define TSP_MASTERREQ 3 /* ask for master's name */
-#define TSP_MASTERACK 4 /* acknowledge master request */
-#define TSP_SETTIME 5 /* send network time */
-#define TSP_MASTERUP 6 /* inform slaves that master is up */
-#define TSP_SLAVEUP 7 /* slave is up but not polled */
-#define TSP_ELECTION 8 /* advance candidature for master */
-#define TSP_ACCEPT 9 /* support candidature of master */
-#define TSP_REFUSE 10 /* reject candidature of master */
-#define TSP_CONFLICT 11 /* two or more masters present */
-#define TSP_RESOLVE 12 /* masters' conflict resolution */
-#define TSP_QUIT 13 /* reject candidature if master is up */
-#define TSP_DATE 14 /* reset the time (date command) */
-#define TSP_DATEREQ 15 /* remote request to reset the time */
-#define TSP_DATEACK 16 /* acknowledge time setting */
-#define TSP_TRACEON 17 /* turn tracing on */
-#define TSP_TRACEOFF 18 /* turn tracing off */
-#define TSP_MSITE 19 /* find out master's site */
-#define TSP_MSITEREQ 20 /* remote master's site request */
-#define TSP_TEST 21 /* for testing election algo */
-#define TSP_SETDATE 22 /* New from date command */
-#define TSP_SETDATEREQ 23 /* New remote for above */
-#define TSP_LOOP 24 /* loop detection packet */
-
-#define TSPTYPENUMBER 25
-
-#endif /* !_TIMED_H_ */
diff --git a/contrib/tcpdump/udp.h b/contrib/tcpdump/udp.h
deleted file mode 100644
index 089ca01270f5..000000000000
--- a/contrib/tcpdump/udp.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/udp.h,v 1.2 2000/10/03 02:55:03 itojun Exp $ (LBL) */
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp.h 8.1 (Berkeley) 6/10/93
- */
-
-/*
- * Udp protocol header.
- * Per RFC 768, September, 1981.
- */
-struct udphdr {
- u_int16_t uh_sport; /* source port */
- u_int16_t uh_dport; /* destination port */
- u_int16_t uh_ulen; /* udp length */
- u_int16_t uh_sum; /* udp checksum */
-};
diff --git a/crypto/openssl/STATUS b/crypto/openssl/STATUS
deleted file mode 100644
index 028abb85abea..000000000000
--- a/crypto/openssl/STATUS
+++ /dev/null
@@ -1,92 +0,0 @@
-
- OpenSSL STATUS Last modified at
- ______________ $Date: 2000/09/24 15:42:34 $
-
- DEVELOPMENT STATE
-
- o OpenSSL 0.9.6: Released on September 24th, 2000
- o OpenSSL 0.9.5a: Released on April 1st, 2000
- o OpenSSL 0.9.5: Released on February 28th, 2000
- o OpenSSL 0.9.4: Released on August 09th, 1999
- o OpenSSL 0.9.3a: Released on May 29th, 1999
- o OpenSSL 0.9.3: Released on May 25th, 1999
- o OpenSSL 0.9.2b: Released on March 22th, 1999
- o OpenSSL 0.9.1c: Released on December 23th, 1998
-
- RELEASE SHOWSTOPPERS
-
- AVAILABLE PATCHES
-
- o CA.pl patch (Damien Miller)
-
- IN PROGRESS
-
- o Steve is currently working on (in no particular order):
- ASN1 code redesign, butchery, replacement.
- EVP cipher enhancement.
- Proper (or at least usable) certificate chain verification.
- Private key, certificate and CRL API and implementation.
- Developing and bugfixing PKCS#7 (S/MIME code).
- Various X509 issues: character sets, certificate request extensions.
- o Geoff and Richard are currently working on:
- ENGINE (the new code that gives hardware support among others).
- o Richard is currently working on:
- UTIL (a new set of library functions to support some higher level
- functionality that is currently missing).
- Dynamic thread-lock support.
- Shared library support for VMS.
-
- NEEDS PATCH
-
- o non-blocking socket on AIX
- o $(PERL) in */Makefile.ssl
- o "Sign the certificate?" - "n" creates empty certificate file
-
- OPEN ISSUES
-
- o internal_verify doesn't know about X509.v3 (basicConstraints
- CA flag ...)
-
- o The Makefile hierarchy and build mechanism is still not a round thing:
-
- 1. The config vs. Configure scripts
- It's the same nasty situation as for Apache with APACI vs.
- src/Configure. It confuses.
- Suggestion: Merge Configure and config into a single configure
- script with a Autoconf style interface ;-) and remove
- Configure and config. Or even let us use GNU Autoconf
- itself. Then we can avoid a lot of those platform checks
- which are currently in Configure.
-
- o Support for Shared Libraries has to be added at least
- for the major Unix platforms. The details we can rip from the stuff
- Ralf has done for the Apache src/Configure script. Ben wants the
- solution to be really simple.
-
- Status: Ralf will look how we can easily incorporate the
- compiler PIC and linker DSO flags from Apache
- into the OpenSSL Configure script.
-
- Ulf: +1 for using GNU autoconf and libtool (but not automake,
- which apparently is not flexible enough to generate
- libcrypto)
-
-
- o The perl/ stuff needs a major overhaul. Currently it's
- totally obsolete. Either we clean it up and enhance it to be up-to-date
- with the C code or we also could replace it with the really nice
- Net::SSLeay package we can find under
- http://www.neuronio.pt/SSLeay.pm.html. Ralf uses this package for a
- longer time and it works fine and is a nice Perl module. Best would be
- to convince the author to work for the OpenSSL project and create a
- Net::OpenSSL or Crypt::OpenSSL package out of it and maintains it for
- us.
-
- Status: Ralf thinks we should both contact the author of Net::SSLeay
- and look how much effort it is to bring Eric's perl/ stuff up
- to date.
- Paul +1
-
- WISHES
-
- o
diff --git a/crypto/openssl/TABLE b/crypto/openssl/TABLE
deleted file mode 100644
index 35421ceed48f..000000000000
--- a/crypto/openssl/TABLE
+++ /dev/null
@@ -1,2301 +0,0 @@
-Output of `Configure TABLE':
-
-*** BC-16
-$cc = bcc
-$cflags =
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** BC-32
-$cc = bcc32
-$cflags =
-$unistd =
-$thread_cflag =
-$lflags =
-$bn_ops = BN_LLONG DES_PTR RC4_INDEX
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = win32
-$shared_target=
-$shared_cflag =
-
-*** BS2000-OSD
-$cc = c89
-$cflags = -O -XLLML -XLLMK -XL -DB_ENDIAN -DTERMIOS -DCHARSET_EBCDIC
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lsocket -lnsl
-$bn_ops = THIRTY_TWO_BIT DES_PTR DES_UNROLL MD2_CHAR RC4_INDEX RC4_CHAR BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** CygWin32
-$cc = gcc
-$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
-$unistd =
-$thread_cflag =
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = win32
-$shared_target=
-$shared_cflag =
-
-*** FreeBSD
-$cc = gcc
-$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-out.o asm/co86-out.o
-$des_obj = asm/dx86-out.o asm/yx86-out.o
-$bf_obj = asm/bx86-out.o
-$md5_obj = asm/mx86-out.o
-$sha1_obj = asm/sx86-out.o
-$cast_obj = asm/cx86-out.o
-$rc4_obj = asm/rx86-out.o
-$rmd160_obj = asm/rm86-out.o
-$rc5_obj = asm/r586-out.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** FreeBSD-alpha
-$cc = gcc
-$cflags = -DTERMIOS -O -fomit-frame-pointer
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** FreeBSD-elf
-$cc = gcc
-$cflags = -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** MPE/iX-gcc
-$cc = gcc
-$cflags = -D_ENDIAN -DBN_DIV2W -O3 -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -L/SYSLOG/PUB -lsyslog -lsocket -lcurses
-$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** Mingw32
-$cc = gcc
-$cflags = -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
-$unistd =
-$thread_cflag =
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = win32
-$shared_target=
-$shared_cflag =
-
-*** NetBSD-m68
-$cc = gcc
-$cflags = -DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** NetBSD-sparc
-$cc = gcc
-$cflags = -DTERMIOS -O3 -fomit-frame-pointer -mv8 -Wall -DB_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** NetBSD-x86
-$cc = gcc
-$cflags = -DTERMIOS -O3 -fomit-frame-pointer -m486 -Wall
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** OpenBSD
-$cc = gcc
-$cflags = -DTERMIOS -O3 -fomit-frame-pointer
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG RC2_CHAR RC4_INDEX DES_UNROLL
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** OpenBSD-alpha
-$cc = gcc
-$cflags = -DTERMIOS -O3 -fomit-frame-pointer
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** OpenBSD-mips
-$cc = gcc
-$cflags = -O2 -DL_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags = BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** OpenBSD-x86
-$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -m486
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-out.o asm/co86-out.o
-$des_obj = asm/dx86-out.o asm/yx86-out.o
-$bf_obj = asm/bx86-out.o
-$md5_obj = asm/mx86-out.o
-$sha1_obj = asm/sx86-out.o
-$cast_obj = asm/cx86-out.o
-$rc4_obj = asm/rx86-out.o
-$rmd160_obj = asm/rm86-out.o
-$rc5_obj = asm/r586-out.o
-$dso_scheme = dlfcn
-$shared_target=
-$shared_cflag =
-
-*** ReliantUNIX
-$cc = cc
-$cflags = -KPIC -g -DSNI -DTERMIOS -DB_ENDIAN
-$unistd =
-$thread_cflag = -Kthread
-$lflags = -lsocket -lnsl -lc -L/usr/ucblib -lucb
-$bn_ops = BN_LLONG DES_PTR DES_RISC2 DES_UNROLL BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** SINIX
-$cc = cc
-$cflags = -O -DSNI
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lsocket -lnsl -lc -L/usr/ucblib -lucb
-$bn_ops = RC4_INDEX RC4_CHAR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** SINIX-N
-$cc = /usr/ucb/cc
-$cflags = -O2 -misaligned
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lucb
-$bn_ops = RC4_INDEX RC4_CHAR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** VC-MSDOS
-$cc = cl
-$cflags =
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** VC-NT
-$cc = cl
-$cflags =
-$unistd =
-$thread_cflag =
-$lflags =
-$bn_ops = BN_LLONG RC4_INDEX RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = win32
-$shared_target=
-$shared_cflag =
-
-*** VC-W31-16
-$cc = cl
-$cflags =
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** VC-W31-32
-$cc = cl
-$cflags =
-$unistd =
-$thread_cflag =
-$lflags =
-$bn_ops = BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** VC-WIN16
-$cc = cl
-$cflags =
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** VC-WIN32
-$cc = cl
-$cflags =
-$unistd =
-$thread_cflag =
-$lflags =
-$bn_ops = BN_LLONG RC4_INDEX RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = win32
-$shared_target=
-$shared_cflag =
-
-*** aix-cc
-$cc = cc
-$cflags = -O -DAIX -DB_ENDIAN -qmaxmem=16384
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG RC4_CHAR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** aix-gcc
-$cc = gcc
-$cflags = -O3 -DAIX -DB_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG RC4_CHAR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** alpha-cc
-$cc = cc
-$cflags = -std1 -tune host -O4 -readonly_strings
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
-$bn_obj = asm/alpha.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= true64-shared
-$shared_cflag =
-
-*** alpha-gcc
-$cc = gcc
-$cflags = -O3
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1
-$bn_obj = asm/alpha.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= true64-shared
-$shared_cflag =
-
-*** alpha164-cc
-$cc = cc
-$cflags = -std1 -tune host -fast -readonly_strings
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK
-$bn_obj = asm/alpha.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= true64-shared
-$shared_cflag =
-
-*** bsdi-elf-gcc
-$cc = gcc
-$cflags = -DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** bsdi-gcc
-$cc = gcc
-$cflags = -O3 -ffast-math -DL_ENDIAN -DPERL5 -m486
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = RSA_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86bsdi.o asm/co86bsdi.o
-$des_obj = asm/dx86bsdi.o asm/yx86bsdi.o
-$bf_obj = asm/bx86bsdi.o
-$md5_obj = asm/mx86bsdi.o
-$sha1_obj = asm/sx86bsdi.o
-$cast_obj = asm/cx86bsdi.o
-$rc4_obj = asm/rx86bsdi.o
-$rmd160_obj = asm/rm86bsdi.o
-$rc5_obj = asm/r586bsdi.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** cc
-$cc = cc
-$cflags = -O
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** cray-t3e
-$cc = cc
-$cflags = -DBIT_FIELD_LIMITS -DTERMIOS
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** cray-t90-cc
-$cc = cc
-$cflags = -DBIT_FIELD_LIMITS -DTERMIOS
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG DES_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** debug
-$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lefence
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** debug-ben
-$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -O2 -pedantic -Wall -Wshadow -Werror -pipe
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** debug-ben-debug
-$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** debug-ben-strict
-$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** debug-bodo
-$cc = gcc
-$cflags = -DL_ENDIAN -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -DBIO_PAIR_DEBUG -g -m486 -pedantic -Wshadow -Wall
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** debug-levitte-linux-elf
-$cc = gcc
-$cflags = -DUSE_ALLOCATING_PRINT -DRL_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DNO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -ggdb -g3 -m486 -pedantic -ansi -Wall -Wshadow -Wid-clash-31 -pipe
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldl
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target=
-$shared_cflag =
-
-*** debug-linux-elf
-$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lefence -ldl
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme = dlfcn
-$shared_target=
-$shared_cflag =
-
-*** debug-linux-elf-noefence
-$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -m486 -Wall
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldl
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme = dlfcn
-$shared_target=
-$shared_cflag =
-
-*** debug-rse
-$cc = cc
-$cflags = -DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** debug-solaris-sparcv8-cc
-$cc = cc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xarch=v8 -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -KPIC
-
-*** debug-solaris-sparcv8-gcc
-$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mv8 -Wall -DB_ENDIAN
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -fPIC
-
-*** debug-solaris-sparcv9-cc
-$cc = cc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -xtarget=ultra -xarch=v8plus -g -O -xstrconst -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8plus.o
-$des_obj =
-$bf_obj =
-$md5_obj = asm/md5-sparcv8plus.o
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -KPIC
-
-*** debug-solaris-sparcv9-gcc
-$cc = gcc
-$cflags = -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -O -g -mcpu=ultrasparc -Wall -DB_ENDIAN
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8plus.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -fPIC
-
-*** debug-steve
-$cc = gcc
-$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -g -O2 -m486 -pedantic -Wall -Werror -Wshadow -pipe
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** debug-ulf
-$cc = gcc
-$cflags = -DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG_ALL -g -O2 -m486 -Wall -Werror -Wshadow -pipe
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** dgux-R3-gcc
-$cc = gcc
-$cflags = -O3 -fomit-frame-pointer
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = RC4_INDEX DES_UNROLL
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** dgux-R4-gcc
-$cc = gcc
-$cflags = -O3 -fomit-frame-pointer
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lnsl -lsocket
-$bn_ops = RC4_INDEX
-$bn_obj = RC4_INDEX DES_UNROLL
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** dgux-R4-x86-gcc
-$cc = gcc
-$cflags = -O3 -fomit-frame-pointer -DL_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lnsl -lsocket
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** dist
-$cc = cc
-$cflags = -O
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** gcc
-$cc = gcc
-$cflags = -O3
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** hpux-brokencc
-$cc = cc
-$cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -ldld
-$bn_ops = DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux-brokengcc
-$cc = gcc
-$cflags = -DB_ENDIAN -DBN_DIV2W -O3
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -ldld
-$bn_ops = DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux-cc
-$cc = cc
-$cflags = -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -ldld
-$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux-gcc
-$cc = gcc
-$cflags = -DB_ENDIAN -DBN_DIV2W -O3
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -ldld
-$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux-parisc-cc
-$cc = cc
-$cflags = +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldld
-$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux-parisc-cc-o4
-$cc = cc
-$cflags = -Ae +O4 +ESlit -z -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY
-$unistd =
-$thread_cflag =
-$lflags = -ldld
-$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux-parisc-gcc
-$cc = gcc
-$cflags = -O3 -DB_ENDIAN -DBN_DIV2W
-$unistd =
-$thread_cflag =
-$lflags = -ldld
-$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux-parisc1_1-cc
-$cc = cc
-$cflags = +DA1.1 +DS1.1 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldld
-$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux-parisc2-cc
-$cc = cc
-$cflags = +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldld
-$bn_ops = SIXTY_FOUR_BIT MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
-$bn_obj = asm/pa-risc2.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux10-brokencc
-$cc = cc
-$cflags = -DB_ENDIAN -DBN_DIV2W -Ae +ESlit +O2 -z
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldld
-$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux10-brokengcc
-$cc = gcc
-$cflags = -DB_ENDIAN -DBN_DIV2W -O3
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldld
-$bn_ops = DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux10-cc
-$cc = cc
-$cflags = -DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY -Ae +ESlit +O3 -z
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldld
-$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux10-gcc
-$cc = gcc
-$cflags = -DB_ENDIAN -DBN_DIV2W -O3
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldld
-$bn_ops = BN_LLONG DES_PTR DES_UNROLL DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dl
-$shared_target=
-$shared_cflag =
-
-*** hpux64-parisc-cc
-$cc = cc
-$cflags = -Ae +DD64 +O3 +ESlit -z -DB_ENDIAN -DMD32_XARRAY
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldl
-$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target=
-$shared_cflag =
-
-*** hpux64-parisc2-cc
-$cc = cc
-$cflags = +DD64 +O3 +Optrs_strongly_typed +Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldl
-$bn_ops = SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT
-$bn_obj = asm/pa-risc2W.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target=
-$shared_cflag =
-
-*** irix-cc
-$cc = cc
-$cflags = -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC2 DES_UNROLL BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** irix-gcc
-$cc = gcc
-$cflags = -O3 -DTERMIOS -DB_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK DES_UNROLL DES_RISC2 DES_PTR BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** irix-mips3-cc
-$cc = cc
-$cflags = -n32 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
-$unistd =
-$thread_cflag = -D_SGI_MP_SOURCE
-$lflags =
-$bn_ops = DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT
-$bn_obj = asm/mips3.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** irix-mips3-gcc
-$cc = gcc
-$cflags = -mabi=n32 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W
-$unistd =
-$thread_cflag = -D_SGI_MP_SOURCE
-$lflags =
-$bn_ops = MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT
-$bn_obj = asm/mips3.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** irix64-mips4-cc
-$cc = cc
-$cflags = -64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
-$unistd =
-$thread_cflag = -D_SGI_MP_SOURCE
-$lflags =
-$bn_ops = RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG
-$bn_obj = asm/mips3.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** irix64-mips4-gcc
-$cc = gcc
-$cflags = -mabi=64 -mips4 -mmips-as -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W
-$unistd =
-$thread_cflag = -D_SGI_MP_SOURCE
-$lflags =
-$bn_ops = RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG
-$bn_obj = asm/mips3.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-alpha+bwx-ccc
-$cc = ccc
-$cflags = -fast -readonly_strings -DL_ENDIAN -DTERMIO
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL
-$bn_obj = asm/alpha.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-alpha+bwx-gcc
-$cc = gcc
-$cflags = -O3 -DL_ENDIAN -DTERMIO
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldl
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL
-$bn_obj = asm/alpha.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= linux-shared
-$shared_cflag = -fPIC
-
-*** linux-alpha-ccc
-$cc = ccc
-$cflags = -fast -readonly_strings -DL_ENDIAN -DTERMIO
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL
-$bn_obj = asm/alpha.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-alpha-gcc
-$cc = gcc
-$cflags = -O3 -DL_ENDIAN -DTERMIO
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldl
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL
-$bn_obj = asm/alpha.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= linux-shared
-$shared_cflag = -fPIC
-
-*** linux-aout
-$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-out.o asm/co86-out.o
-$des_obj = asm/dx86-out.o asm/yx86-out.o
-$bf_obj = asm/bx86-out.o
-$md5_obj = asm/mx86-out.o
-$sha1_obj = asm/sx86-out.o
-$cast_obj = asm/cx86-out.o
-$rc4_obj = asm/rx86-out.o
-$rmd160_obj = asm/rm86-out.o
-$rc5_obj = asm/r586-out.o
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-elf
-$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -ldl
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-elf.o asm/co86-elf.o
-$des_obj = asm/dx86-elf.o asm/yx86-elf.o
-$bf_obj = asm/bx86-elf.o
-$md5_obj = asm/mx86-elf.o
-$sha1_obj = asm/sx86-elf.o
-$cast_obj = asm/cx86-elf.o
-$rc4_obj = asm/rx86-elf.o
-$rmd160_obj = asm/rm86-elf.o
-$rc5_obj = asm/r586-elf.o
-$dso_scheme = dlfcn
-$shared_target= linux-shared
-$shared_cflag = -fPIC
-
-*** linux-elf-arm
-$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = BN_LLONG
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= linux-shared
-$shared_cflag = -fPIC
-
-*** linux-ia64
-$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = SIXTY_FOUR_BIT_LONG
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-m68k
-$cc = gcc
-$cflags = -DB_ENDIAN -DTERMIO -O2 -fomit-frame-pointer -Wall
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = BN_LLONG
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-mips
-$cc = gcc
-$cflags = -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-ppc
-$cc = gcc
-$cflags = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = BN_LLONG
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-sparcv7
-$cc = gcc
-$cflags = -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-sparcv8
-$cc = gcc
-$cflags = -mv8 -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -DBN_DIV2W
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** linux-sparcv9
-$cc = gcc
-$cflags = -mcpu=ultrasparc -DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DULTRASPARC -DBN_DIV2W
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags =
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8plus.o
-$des_obj =
-$bf_obj =
-$md5_obj = asm/md5-sparcv8plus.o
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** ncr-scde
-$cc = cc
-$cflags = -O6 -Xa -Hoff=BEHAVED -686 -Hwide -Hiw
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lsocket -lnsl
-$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** newsos4-gcc
-$cc = gcc
-$cflags = -O -DB_ENDIAN -DNEWS4
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lmld -liberty
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** nextstep
-$cc = cc
-$cflags = -O -Wall
-$unistd = <libc.h>
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** nextstep3.3
-$cc = cc
-$cflags = -O3 -Wall
-$unistd = <libc.h>
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** purify
-$cc = purify gcc
-$cflags = -g -DPURIFY -Wall
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lsocket -lnsl
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** qnx4
-$cc = cc
-$cflags = -DL_ENDIAN -DTERMIO
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** rhapsody-ppc-cc
-$cc = cc
-$cflags = -O3 -DB_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** sco5-cc
-$cc = cc
-$cflags =
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lsocket
-$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** sco5-gcc
-$cc = gcc
-$cflags = -O3 -fomit-frame-pointer
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lsocket
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** solaris-sparc-sc3
-$cc = cc
-$cflags = -fast -O -Xa -DB_ENDIAN
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -KPIC
-
-*** solaris-sparcv7-cc
-$cc = cc
-$cflags = -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -KPIC
-
-*** solaris-sparcv7-gcc
-$cc = gcc
-$cflags = -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -fPIC
-
-*** solaris-sparcv8-cc
-$cc = cc
-$cflags = -xarch=v8 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -KPIC
-
-*** solaris-sparcv8-gcc
-$cc = gcc
-$cflags = -mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8.o
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -fPIC
-
-*** solaris-sparcv9-cc
-$cc = cc
-$cflags = -xtarget=ultra -xarch=v8plus -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DBN_DIV2W -DULTRASPARC
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK_LL DES_PTR DES_RISC1 DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8plus.o
-$des_obj =
-$bf_obj =
-$md5_obj = asm/md5-sparcv8plus.o
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -KPIC
-
-*** solaris-sparcv9-gcc
-$cc = gcc
-$cflags = -mcpu=ultrasparc -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8plus.o
-$des_obj =
-$bf_obj =
-$md5_obj = asm/md5-sparcv8plus.o
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -fPIC
-
-*** solaris-sparcv9-gcc27
-$cc = gcc
-$cflags = -mv8 -O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W -DULTRASPARC
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR
-$bn_obj = asm/sparcv8plus-gcc27.o
-$des_obj =
-$bf_obj =
-$md5_obj = asm/md5-sparcv8plus-gcc27.o
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -fPIC
-
-*** solaris-x86-gcc
-$cc = gcc
-$cflags = -O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DNO_INLINE_ASM
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = BN_LLONG DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj = asm/bn86-sol.o asm/co86-sol.o
-$des_obj = asm/dx86-sol.o asm/yx86-sol.o
-$bf_obj = asm/bx86-sol.o
-$md5_obj = asm/mx86-sol.o
-$sha1_obj = asm/sx86-sol.o
-$cast_obj = asm/cx86-sol.o
-$rc4_obj = asm/rx86-sol.o
-$rmd160_obj = asm/rm86-sol.o
-$rc5_obj = asm/r586-sol.o
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -fPIC
-
-*** solaris64-sparcv9-cc
-$cc = cc
-$cflags = -xtarget=ultra -xarch=v9 -xO5 -xstrconst -xdepend -Xa -DB_ENDIAN -DULTRASPARC
-$unistd =
-$thread_cflag = -D_REENTRANT
-$lflags = -lsocket -lnsl -ldl
-$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj = asm/md5-sparcv9.o
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme = dlfcn
-$shared_target= solaris-shared
-$shared_cflag = -KPIC
-
-*** sunos-gcc
-$cc = gcc
-$cflags = -O3 -mv8 -Dssize_t=int
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops = BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL DES_PTR DES_RISC1
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** ultrix-cc
-$cc = cc
-$cflags = -std1 -O -Olimit 1000 -DL_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** ultrix-gcc
-$cc = gcc
-$cflags = -O3 -DL_ENDIAN
-$unistd =
-$thread_cflag = (unknown)
-$lflags =
-$bn_ops =
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** unixware-2.0
-$cc = cc
-$cflags = -O -DFILIO_H
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lsocket -lnsl
-$bn_ops = DES_PTR DES_RISC1 DES_UNROLL RC4_INDEX MD2_INT
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** unixware-2.0-pentium
-$cc = cc
-$cflags = -O -DFILIO_H -Kpentium -Kthread
-$unistd =
-$thread_cflag = (unknown)
-$lflags = -lsocket -lnsl
-$bn_ops = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
-
-*** unixware-7
-$cc = cc
-$cflags = -O -DFILIO_H -Kalloca
-$unistd =
-$thread_cflag = -Kthread
-$lflags = -lsocket -lnsl
-$bn_ops = MD2_CHAR RC4_INDEX DES_PTR DES_RISC1 DES_UNROLL
-$bn_obj =
-$des_obj =
-$bf_obj =
-$md5_obj =
-$sha1_obj =
-$cast_obj =
-$rc4_obj =
-$rmd160_obj =
-$rc5_obj =
-$dso_scheme =
-$shared_target=
-$shared_cflag =
diff --git a/crypto/openssl/certs/expired/rsa-ssca.pem b/crypto/openssl/certs/expired/rsa-ssca.pem
deleted file mode 100644
index c9403212d183..000000000000
--- a/crypto/openssl/certs/expired/rsa-ssca.pem
+++ /dev/null
@@ -1,19 +0,0 @@
-subject=/C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
-issuer= /C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority
-notBefore=941109235417Z
-notAfter =991231235417Z
------BEGIN X509 CERTIFICATE-----
-
-MIICKTCCAZYCBQJBAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMSAw
-HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJl
-IFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDkyMzU0MTda
-Fw05OTEyMzEyMzU0MTdaMF8xCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0
-YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJlIFNlcnZlciBDZXJ0aWZp
-Y2F0aW9uIEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCSznrB
-roM+WqqJg1esJQF2DK2ujiw3zus1eGRUA+WEQFHJv48I4oqCCNIWhjdV6bEhAq12
-aIGaBaJLyUslZiJWbIgHj/eBWW2EB2VwE3F2Ppt3TONQiVaYSLkdpykaEy5KEVmc
-HhXVSVQsczppgrGXOZxtcGdI5d0t1sgeewIDAQABMA0GCSqGSIb3DQEBAgUAA34A
-iNHReSHO4ovo+MF9NFM/YYPZtgs4F7boviGNjwC4i1N+RGceIr2XJ+CchcxK9oU7
-suK+ktPlDemvXA4MRpX/oRxePug2WHpzpgr4IhFrwwk4fia7c+8AvQKk8xQNMD9h
-cHsg/jKjn7P0Z1LctO6EjJY2IN6BCINxIYoPnqk=
------END X509 CERTIFICATE-----
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod b/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod
deleted file mode 100644
index 21a9db0e2a40..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod
+++ /dev/null
@@ -1,38 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_add_extra_chain_cert - add certificate to chain
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- long SSL_CTX_add_extra_chain_cert(SSL_CTX ctx, X509 *x509)
-
-=head1 DESCRIPTION
-
-SSL_CTX_add_extra_chain_cert() adds the certificate B<x509> to the certificate
-chain presented together with the certificate. Several certificates
-can be added one after the other.
-
-=head1 NOTES
-
-When constructing the certificate chain, the chain will be formed from
-these certificates explicitly specified. If no chain is specified,
-the library will try to complete the chain from the available CA
-certificates in the trusted CA storage, see
-L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>.
-
-=head1 RETURN VALUES
-
-SSL_CTX_add_extra_chain_cert() returns 1 on success. Check out the
-error stack to find out the reason for failure otherwise.
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>,
-L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod b/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod
deleted file mode 100644
index af326c2f7340..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_add_session.pod
+++ /dev/null
@@ -1,65 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_add_session, SSL_add_session, SSL_CTX_remove_session, SSL_remove_session - manipulate session cache
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c);
- int SSL_add_session(SSL_CTX *ctx, SSL_SESSION *c);
-
- int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c);
- int SSL_remove_session(SSL_CTX *ctx, SSL_SESSION *c);
-
-=head1 DESCRIPTION
-
-SSL_CTX_add_session() adds the session B<c> to the context B<ctx>. The
-reference count for session B<c> is incremented by 1. If a session with
-the same session id already exists, the old session is removed by calling
-L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>.
-
-SSL_CTX_remove_session() removes the session B<c> from the context B<ctx>.
-L<SSL_SESSION_free(3)|SSL_SESSION_free(3)> is called once for B<c>.
-
-SSL_add_session() and SSL_remove_session() are synonyms for their
-SSL_CTX_*() counterparts.
-
-=head1 NOTES
-
-When adding a new session to the internal session cache, it is examined
-whether a session with the same session id already exists. In this case
-it is assumed that both sessions are identical. If the same session is
-stored in a different SSL_SESSION object, The old session is
-removed and replaced by the new session. If the session is actually
-identical (the SSL_SESSION object is identical), SSL_CTX_add_session()
-is a no-op, and the return value is 0.
-
-
-=head1 RETURN VALUES
-
-The following values are returned by all functions:
-
-=over 4
-
-=item 0
-
- The operation failed. In case of the add operation, it was tried to add
- the same (identical) session twice. In case of the remove operation, the
- session was not found in the cache.
-
-=item 1
-
- The operation succeeded.
-
-=back
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
-L<SSL_SESSION_free(3)|SSL_SESSION_free(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_flush_sessions.pod b/crypto/openssl/doc/ssl/SSL_CTX_flush_sessions.pod
deleted file mode 100644
index 148c36c87151..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_flush_sessions.pod
+++ /dev/null
@@ -1,49 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_flush_sessions, SSL_flush_sessions - remove expired sessions
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);
- void SSL_flush_sessions(SSL_CTX *ctx, long tm);
-
-=head1 DESCRIPTION
-
-SSL_CTX_flush_sessions() causes a run through the session cache of
-B<ctx> to remove sessions expired at time B<tm>.
-
-SSL_flush_sessions() is a synonym for SSL_CTX_flush_sessions().
-
-=head1 NOTES
-
-If enabled, the internal session cache will collect all sessions established
-up to the specified maximum number (see SSL_CTX_sess_set_cache_size()).
-As sessions will not be reused ones they are expired, they should be
-removed from the cache to save resources. This can either be done
- automatically whenever 255 new sessions were established (see
-L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>)
-or manually by calling SSL_CTX_flush_sessions().
-
-The parameter B<tm> specifies the time which should be used for the
-expiration test, in most cases the actual time given by time(0)
-will be used.
-
-SSL_CTX_flush_sessions() will only check sessions stored in the internal
-cache. When a session is found and removed, the remove_session_cb is however
-called to synchronize with the external cache (see
-L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>).
-
-=head1 RETURN VALUES
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
-L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
-L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_get_ex_new_index.pod b/crypto/openssl/doc/ssl/SSL_CTX_get_ex_new_index.pod
deleted file mode 100644
index 15067438c82d..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_get_ex_new_index.pod
+++ /dev/null
@@ -1,53 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_get_ex_new_index, SSL_CTX_set_ex_data, SSL_CTX_get_ex_data - internal application specific data functions
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- int SSL_CTX_get_ex_new_index(long argl, void *argp,
- CRYPTO_EX_new *new_func,
- CRYPTO_EX_dup *dup_func,
- CRYPTO_EX_free *free_func);
-
- int SSL_CTX_set_ex_data(SSL_CTX *ctx, int idx, void *arg);
-
- void *SSL_CTX_get_ex_data(SSL_CTX *ctx, int idx);
-
- typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
- int idx, long argl, void *argp);
- typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
- int idx, long argl, void *argp);
- typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d,
- int idx, long argl, void *argp);
-
-=head1 DESCRIPTION
-
-Several OpenSSL structures can have application specific data attached to them.
-These functions are used internally by OpenSSL to manipulate application
-specific data attached to a specific structure.
-
-SSL_CTX_get_ex_new_index() is used to register a new index for application
-specific data.
-
-SSL_CTX_set_ex_data() is used to store application data at B<arg> for B<idx>
-into the B<ctx> object.
-
-SSL_CTX_get_ex_data() is used to retrieve the information for B<idx> from
-B<ctx>.
-
-A detailed description for the B<*_get_ex_new_index()> functionality
-can be found in L<RSA_get_ex_new_index.pod(3)|RSA_get_ex_new_index.pod(3)>.
-The B<*_get_ex_data()> and B<*_set_ex_data()> functionality is described in
-L<CRYPTO_set_ex_data(3)|CRYPTO_set_ex_data(3)>.
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<RSA_get_ex_new_index(3)|RSA_get_ex_new_index(3)>,
-L<CRYPTO_set_ex_data(3)|CRYPTO_set_ex_data(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_get_verify_mode.pod b/crypto/openssl/doc/ssl/SSL_CTX_get_verify_mode.pod
deleted file mode 100644
index 7f10c6e94509..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_get_verify_mode.pod
+++ /dev/null
@@ -1,50 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_get_verify_mode, SSL_get_verify_mode, SSL_CTX_get_verify_depth, SSL_get_verify_depth, SSL_get_verify_callback, SSL_CTX_get_verify_callback - get currently set verification parameters
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- int SSL_CTX_get_verify_mode(SSL_CTX *ctx);
- int SSL_get_verify_mode(SSL *ssl);
- int SSL_CTX_get_verify_depth(SSL_CTX *ctx);
- int SSL_get_verify_depth(SSL *ssl);
- int (*SSL_CTX_get_verify_callback(SSL_CTX *ctx))(int, X509_STORE_CTX *);
- int (*SSL_get_verify_callback(SSL *ssl))(int, X509_STORE_CTX *);
-
-=head1 DESCRIPTION
-
-SSL_CTX_get_verify_mode() returns the verification mode currently set in
-B<ctx>.
-
-SSL_get_verify_mode() returns the verification mode currently set in
-B<ssl>.
-
-SSL_CTX_get_verify_depth() returns the verification depth limit currently set
-in B<ctx>. If no limit has been explicitly set, -1 is returned and the
-default value will be used.
-
-SSL_get_verify_depth() returns the verification depth limit currently set
-in B<ssl>. If no limit has been explicitly set, -1 is returned and the
-default value will be used.
-
-SSL_CTX_get_verify_callback() returns a function pointer to the verification
-callback currently set in B<ctx>. If no callback was explicitly set, the
-NULL pointer is returned and the default callback will be used.
-
-SSL_get_verify_callback() returns a function pointer to the verification
-callback currently set in B<ssl>. If no callback was explicitly set, the
-NULL pointer is returned and the default callback will be used.
-
-=head1 RETURN VALUES
-
-See DESCRIPTION
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>, L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_sess_set_get_cb.pod b/crypto/openssl/doc/ssl/SSL_CTX_sess_set_get_cb.pod
deleted file mode 100644
index b6f15b440425..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_sess_set_get_cb.pod
+++ /dev/null
@@ -1,81 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_sess_set_new_cb, SSL_CTX_sess_set_remove_cb, SSL_CTX_sess_set_get_cb, SSL_CTX_sess_get_new_cb, SSL_CTX_sess_get_remove_cb, SSL_CTX_sess_get_get_cb - provide callback functions for server side external session caching
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,
- int (*new_session_cb)(SSL *, SSL_SESSION *));
- void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx,
- void (*remove_session_cb)(SSL_CTX *ctx, SSL_SESSION *));
- void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
- SSL_SESSION (*get_session_cb)(SSL *, unsigned char *, int, int *));
-
- int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(struct ssl_st *ssl, SSL_SESSION *sess);
- void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(struct ssl_ctx_st *ctx, SSL_SESSION *sess);
- SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl, unsigned char *data, int len, int *copy);
-
- int (*new_session_cb)(struct ssl_st *ssl, SSL_SESSION *sess);
- void (*remove_session_cb)(struct ssl_ctx_st *ctx, SSL_SESSION *sess);
- SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, unsigned char *data,
- int len, int *copy);
-
-=head1 DESCRIPTION
-
-SSL_CTX_sess_set_new_cb() sets the callback function, which is automatically
-called whenever a new session was negotiated.
-
-SSL_CTX_sess_set_remove_cb() sets the callback function, which is
-automatically called whenever a session is removed by the SSL engine,
-because it is considered faulty or the session has become obsolete because
-of exceeding the timeout value.
-
-SSL_CTX_sess_set_get_cb() sets the callback function which is called,
-whenever a SSL/TLS client proposed to resume a session but the session
-could not be found in the internal session cache (see
-L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>).
-(SSL/TLS server only.)
-
-SSL_CTX_sess_get_new_cb(), SSL_CTX_sess_get_remove_cb(), and
-SSL_CTX_sess_get_get_cb() allow to retrieve the function pointers of the
-provided callback functions. If a callback function has not been set,
-the NULL pointer is returned.
-
-=head1 NOTES
-
-In order to allow external session caching, synchronization with the internal
-session cache is realized via callback functions. Inside these callback
-functions, session can be saved to disk or put into a database using the
-L<d2i_SSL_SESSION(3)|d2i_SSL_SESSION(3)> interface.
-
-The new_session_cb() is called, whenever a new session has been negotiated
-and session caching is enabled (see
-L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>).
-The new_session_cb() is passed the B<ssl> connection and the ssl session
-B<sess>. If the callback returns B<0>, the session will be immediately
-removed again.
-
-The remove_session_cb() is called, whenever the SSL engine removes a session
-from the internal cache. This happens if the session is removed because
-it is expired or when a connection was not shutdown cleanly. The
-remove_session_cb() is passed the B<ctx> and the ssl session B<sess>.
-It does not provide any feedback.
-
-The get_session_cb() is only called on SSL/TLS servers with the session id
-proposed by the client. The get_session_cb() is always called, also when
-session caching was disabled. The get_session_cb() is passed the
-B<ssl> connection, the session id of length B<length> at the memory location
-B<data>. With the parameter B<copy> the callback can require the
-SSL engine to increment the reference count of the SSL_SESSION object.
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>, L<d2i_SSL_SESSION(3)|d2i_SSL_SESSION(3)>,
-L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
-L<SSL_CTX_flush_sessions(3)|<SSL_CTX_flush_sessions(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_set_default_passwd_cb.pod b/crypto/openssl/doc/ssl/SSL_CTX_set_default_passwd_cb.pod
deleted file mode 100644
index a5343a1cf398..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_set_default_passwd_cb.pod
+++ /dev/null
@@ -1,70 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_set_default_passwd_cb, SSL_CTX_set_default_passwd_cb_userdata - set passwd callback for encrypted PEM file handling
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
- void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
-
- int pem_passwd_cb(char *buf, int size, int rwflag, void *userdata);
-
-=head1 DESCRIPTION
-
-SSL_CTX_set_default_passwd_cb() sets the default password callback called
-when loading/storing a PEM certificate with encryption.
-
-SSL_CTX_set_default_passwd_cb_userdata() sets a pointer to B<userdata> which
-will be provided to the password callback on invocation.
-
-The pem_passwd_cb(), which must be provided by the application, hands back the
-password to be used during decryption. On invocation a pointer to B<userdata>
-is provided. The pem_passwd_cb must write the password into the provided buffer
-B<buf> which is of size B<size>. The actual length of the password must
-be returned to the calling function. B<rwflag> indicates whether the
-callback is used for reading/decryption (rwflag=0) or writing/encryption
-(rwflag=1).
-
-=head1 NOTES
-
-When loading or storing private keys, a password might be supplied to
-protect the private key. The way this password can be supplied may depend
-on the application. If only one private key is handled, it can be practical
-to have pem_passwd_cb() handle the password dialog interactively. If several
-keys have to be handled, it can be practical to ask for the password once,
-then keep it in memory and use it several times. In the last case, the
-password could be stored into the B<userdata> storage and the
-pem_passwd_cb() only returns the password already stored.
-
-Other items in PEM formatting (certificates) can also be encrypted, it is
-however not usual, as certificate information is considered public.
-
-=head1 RETURN VALUES
-
-SSL_CTX_set_default_passwd_cb() and SSL_CTX_set_default_passwd_cb_userdata()
-do not provide diagnostic information.
-
-=head1 EXAMPLES
-
-The following example returns the password provided as B<userdata> to the
-calling function. The password is considered to be a '\0' terminated
-string. If the password does not fit into the buffer, the password is
-truncated.
-
- int pem_passwd_cb(char *buf, int size, int rwflag, void *password)
- {
- strncpy(buf, (char *)(password), size);
- buf[size - 1] = '\0';
- return(strlen(buf));
- }
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_set_session_id_context.pod b/crypto/openssl/doc/ssl/SSL_CTX_set_session_id_context.pod
deleted file mode 100644
index 5949395159e7..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_set_session_id_context.pod
+++ /dev/null
@@ -1,82 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_set_session_id_context, SSL_set_session_id_context - set context within which session can be reused (server side only)
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx,
- unsigned int sid_ctx_len);
- int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx,
- unsigned int sid_ctx_len);
-
-=head1 DESCRIPTION
-
-SSL_CTX_set_session_id_context() sets the context B<sid_ctx> of length
-B<sid_ctx_len> within which a session can be reused for the B<ctx> object.
-
-SSL_set_session_id_context() sets the context B<sid_ctx> of length
-B<sid_ctx_len> within which a session can be reused for the B<ssl> object.
-
-=head1 NOTES
-
-Sessions are generated within a certain context. When exporting/importing
-sessions with B<i2d_SSL_SESSION>/B<d2i_SSL_SESSION> it would be possible,
-to re-import a session generated from another context (e.g. another
-application), which might lead to malfunctions. Therefore each application
-must set its own session id context B<sid_ctx> which is used to distinguish
-the contexts and is stored in exported sessions. The B<sid_ctx> can be
-any kind of binary data with a given length, it is therefore possible
-to use e.g. the name of the application and/or the hostname and/or service
-name ...
-
-The session id context becomes part of the session. The session id context
-is set by the SSL/TLS server. The SSL_CTX_set_session_id_context() and
-SSL_set_session_id_context() functions are therefore only useful on the
-server side.
-
-OpenSSL clients will check the session id context returned by the server
-when reusing a session.
-
-The maximum length of the B<sid_ctx> is limited to
-B<SSL_MAX_SSL_SESSION_ID_LENGTH>.
-
-=head1 WARNINGS
-
-If the session id context is not set on an SSL/TLS server, stored sessions
-will not be reused but a fatal error will be flagged and the handshake
-will fail.
-
-If a server returns a different session id context to an OpenSSL client
-when reusing a session, an error will be flagged and the handshake will
-fail. OpenSSL servers will always return the correct session id context,
-as an OpenSSL server checks the session id context itself before reusing
-a session as described above.
-
-=head1 RETURN VALUES
-
-SSL_CTX_set_session_id_context() and SSL_set_session_id_context()
-return the following values:
-
-=over 4
-
-=item 0
-
-The length B<sid_ctx_len> of the session id context B<sid_ctx> exceeded
-the maximum allowed length of B<SSL_MAX_SSL_SESSION_ID_LENGTH>. The error
-is logged to the error stack.
-
-=item 1
-
-The operation succeeded.
-
-=back
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_set_timeout.pod b/crypto/openssl/doc/ssl/SSL_CTX_set_timeout.pod
deleted file mode 100644
index 21faed12d425..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_set_timeout.pod
+++ /dev/null
@@ -1,55 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_set_timeout, SSL_CTX_get_timeout - manipulate timeout values for session caching
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- long SSL_CTX_set_timeout(SSL_CTX *ctx, long t);
- long SSL_CTX_get_timeout(SSL_CTX *ctx);
-
-=head1 DESCRIPTION
-
-SSL_CTX_set_timeout() sets the timeout for newly created sessions for
-B<ctx> to B<t>. The timeout value B<t> must be given in seconds.
-
-SSL_CTX_get_timeout() returns the currently set timeout value for B<ctx>.
-
-=head1 NOTES
-
-Whenever a new session is created, it is assigned a maximum lifetime. This
-lifetime is specified by storing the creation time of the session and the
-timeout value valid at this time. If the actual time is later than creation
-time plus timeout, the session is not reused.
-
-Due to this realization, all sessions behave according to the timeout value
-valid at the time of the session negotiation. Changes of the timeout value
-do not affect already established sessions.
-
-The expiration time of a single session can be modified using the
-L<SSL_SESSION_get_time(3)|SSL_SESSION_get_time(3)> family of functions.
-
-Expired sessions are removed from the internal session cache, whenever
-L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)> is called, either
-directly by the application or automatically (see
-L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>)
-
-The default value for session timeout is 300 seconds.
-
-=head1 RETURN VALUES
-
-SSL_CTX_set_timeout() returns the previously set timeout value.
-
-SSL_CTX_get_timeout() returns the currently set timeout value.
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<SSL_CTX_set_session_cache_mode(3)|SSL_CTX_set_session_cache_mode(3)>,
-L<SSL_SESSION_get_time(3)|SSL_SESSION_get_time(3)>,
-L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod b/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod
deleted file mode 100644
index fc0b76118fd1..000000000000
--- a/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod
+++ /dev/null
@@ -1,284 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_CTX_set_verify, SSL_set_verify, SSL_CTX_set_verify_depth, SSL_set_verify_depth - set peer certificate verification parameters
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- void SSL_CTX_set_verify(SSL_CTX *ctx, int mode,
- int (*verify_callback)(int, X509_STORE_CTX *));
- void SSL_set_verify(SSL *s, int mode,
- int (*verify_callback)(int, X509_STORE_CTX *));
- void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth);
- void SSL_set_verify_depth(SSL *s, int depth);
-
- int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx);
-
-=head1 DESCRIPTION
-
-SSL_CTX_set_verify() sets the verification flags for B<ctx> to be B<mode> and
-specifies the B<verify_callback> function to be used. If no callback function
-shall be specified, the NULL pointer can be used for B<verify_callback>.
-
-SSL_set_verify() sets the verification flags for B<ssl> to be B<mode> and
-specifies the B<verify_callback> function to be used. If no callback function
-shall be specified, the NULL pointer can be used for B<verify_callback>. In
-this case last B<verify_callback> set specifically for this B<ssl> remains. If
-no special B<callback> was set before, the default callback for the underlying
-B<ctx> is used, that was valid at the the time B<ssl> was created with
-L<SSL_new(3)|SSL_new(3)>.
-
-SSL_CTX_set_verify_depth() sets the maximum B<depth> for the certificate chain
-verification that shall be allowed for B<ctx>. (See the BUGS section.)
-
-SSL_set_verify_depth() sets the maximum B<depth> for the certificate chain
-verification that shall be allowed for B<ssl>. (See the BUGS section.)
-
-=head1 NOTES
-
-The verification of certificates can be controlled by a set of logically
-or'ed B<mode> flags:
-
-=over 4
-
-=item SSL_VERIFY_NONE
-
-B<Server mode:> the server will not send a client certificate request to the
-client, so the client will not send a certificate.
-
-B<Client mode:> if not using an anonymous cipher (by default disabled), the
-server will send a certificate which will be checked. The result of the
-certificate verification process can be checked after the TLS/SSL handshake
-using the L<SSL_get_verify_result(3)|SSL_get_verify_result(3)> function.
-The handshake will be continued regardless of the verification result.
-
-=item SSL_VERIFY_PEER
-
-B<Server mode:> the server sends a client certificate request to the client.
-The certificate returned (if any) is checked. If the verification process
-fails as indicated by B<verify_callback>, the TLS/SSL handshake is
-immediately terminated with an alert message containing the reason for
-the verification failure.
-The behaviour can be controlled by the additional
-SSL_VERIFY_FAIL_IF_NO_PEER_CERT and SSL_VERIFY_CLIENT_ONCE flags.
-
-B<Client mode:> the server certificate is verified. If the verification process
-fails as indicated by B<verify_callback>, the TLS/SSL handshake is
-immediately terminated with an alert message containing the reason for
-the verification failure. If no server certificate is sent, because an
-anonymous cipher is used, SSL_VERIFY_PEER is ignored.
-
-=item SSL_VERIFY_FAIL_IF_NO_PEER_CERT
-
-B<Server mode:> if the client did not return a certificate, the TLS/SSL
-handshake is immediately terminated with a "handshake failure" alert.
-This flag must be used together with SSL_VERIFY_PEER.
-
-B<Client mode:> ignored
-
-=item SSL_VERIFY_CLIENT_ONCE
-
-B<Server mode:> only request a client certificate on the initial TLS/SSL
-handshake. Do not ask for a client certificate again in case of a
-renegotiation. This flag must be used together with SSL_VERIFY_PEER.
-
-B<Client mode:> ignored
-
-=back
-
-Exactly one of the B<mode> flags SSL_VERIFY_NONE and SSL_VERIFY_PEER must be
-set at any time.
-
-SSL_CTX_set_verify_depth() and SSL_set_verify_depth() set the limit up
-to which depth certificates in a chain are used during the verification
-procedure. If the certificate chain is longer than allowed, the certificates
-above the limit are ignored. Error messages are generated as if these
-certificates would not be present, most likely a
-X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY will be issued.
-The depth count is "level 0:peer certificate", "level 1: CA certificate",
-"level 2: higher level CA certificate", and so on. Setting the maximum
-depth to 2 allows the levels 0, 1, and 2. The default depth limit is 9,
-allowing for the peer certificate and additional 9 CA certificates.
-
-The B<verify_callback> function is used to control the behaviour when the
-SSL_VERIFY_PEER flag is set. It must be supplied by the application and
-receives two arguments: B<preverify_ok> indicates, whether the verification of
-the certificate in question was passed (preverify_ok=1) or not
-(preverify_ok=0). B<x509_ctx> is a pointer to the complete context used
-for the certificate chain verification.
-
-The certificate chain is checked starting with the deepest nesting level
-(the root CA certificate) and worked upward to the peer's certificate.
-At each level signatures and issuer attributes are checked. Whenever
-a verification error is found, the error number is stored in B<x509_ctx>
-and B<verify_callback> is called with B<preverify_ok>=0. By applying
-X509_CTX_store_* functions B<verify_callback> can locate the certificate
-in question and perform additional steps (see EXAMPLES). If no error is
-found for a certificate, B<verify_callback> is called with B<preverify_ok>=1
-before advancing to the next level.
-
-The return value of B<verify_callback> controls the strategy of the further
-verification process. If B<verify_callback> returns 0, the verification
-process is immediately stopped with "verification failed" state. If
-SSL_VERIFY_PEER is set, a verification failure alert is sent to the peer and
-the TLS/SSL handshake is terminated. If B<verify_callback> returns 1,
-the verification process is continued. If B<verify_callback> always returns
-1, the TLS/SSL handshake will never be terminated because of this application
-experiencing a verification failure. The calling process can however
-retrieve the error code of the last verification error using
-L<SSL_get_verify_result(3)|SSL_get_verify_result(3)> or by maintaining its
-own error storage managed by B<verify_callback>.
-
-If no B<verify_callback> is specified, the default callback will be used.
-Its return value is identical to B<preverify_ok>, so that any verification
-failure will lead to a termination of the TLS/SSL handshake with an
-alert message, if SSL_VERIFY_PEER is set.
-
-=head1 BUGS
-
-In client mode, it is not checked whether the SSL_VERIFY_PEER flag
-is set, but whether SSL_VERIFY_NONE is not set. This can lead to
-unexpected behaviour, if the SSL_VERIFY_PEER and SSL_VERIFY_NONE are not
-used as required (exactly one must be set at any time).
-
-The certificate verification depth set with SSL[_CTX]_verify_depth()
-stops the verification at a certain depth. The error message produced
-will be that of an incomplete certificate chain and not
-X509_V_ERR_CERT_CHAIN_TOO_LONG as may be expected.
-
-=head1 RETURN VALUES
-
-The SSL*_set_verify*() functions do not provide diagnostic information.
-
-=head1 EXAMPLES
-
-The following code sequence realizes an example B<verify_callback> function
-that will always continue the TLS/SSL handshake regardless of verification
-failure, if wished. The callback realizes a verification depth limit with
-more informational output.
-
-All verification errors are printed, informations about the certificate chain
-are printed on request.
-The example is realized for a server that does allow but not require client
-certificates.
-
-The example makes use of the ex_data technique to store application data
-into/retrieve application data from the SSL structure
-(see L<SSL_get_ex_new_index(3)|SSL_get_ex_new_index(3)>,
-L<SSL_get_ex_data_X509_STORE_CTX_idx(3)|SSL_get_ex_data_X509_STORE_CTX_idx(3)>).
-
- ...
- typedef struct {
- int verbose_mode;
- int verify_depth;
- int always_continue;
- } mydata_t;
- int mydata_index;
- ...
- static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
- {
- char buf[256];
- X509 *err_cert;
- int err, depth;
- SSL *ssl;
- mydata_t *mydata;
-
- err_cert = X509_STORE_CTX_get_current_cert(ctx);
- err = X509_STORE_CTX_get_error(ctx);
- depth = X509_STORE_CTX_get_error_depth(ctx);
-
- /*
- * Retrieve the pointer to the SSL of the connection currently treated
- * and the application specific data stored into the SSL object.
- */
- ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
- mydata = SSL_get_ex_data(ssl, mydata_index);
-
- X509_NAME_oneline(X509_get_subject_name(err_cert), buf, 256);
-
- /*
- * Catch a too long certificate chain. The depth limit set using
- * SSL_CTX_set_verify_depth() is by purpose set to "limit+1" so
- * that whenever the "depth>verify_depth" condition is met, we
- * have violated the limit and want to log this error condition.
- * We must do it here, because the CHAIN_TOO_LONG error would not
- * be found explicitly; only errors introduced by cutting off the
- * additional certificates would be logged.
- */
- if (depth > mydata->verify_depth) {
- preverify_ok = 0;
- err = X509_V_ERR_CERT_CHAIN_TOO_LONG;
- X509_STORE_CTX_set_error(ctx, err);
- }
- if (!preverify_ok) {
- printf("verify error:num=%d:%s:depth=%d:%s\n", err,
- X509_verify_cert_error_string(err), depth, buf);
- }
- else if (mydata->verbose_mode)
- {
- printf("depth=%d:%s\n", depth, buf);
- }
-
- /*
- * At this point, err contains the last verification error. We can use
- * it for something special
- */
- if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)
- {
- X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256);
- printf("issuer= %s\n", buf);
- }
-
- if (mydata->always_continue)
- return 1;
- else
- return preverify_ok;
- }
- ...
-
- mydata_t mydata;
-
- ...
- mydata_index = SSL_get_ex_new_index(0, "mydata index", NULL, NULL, NULL);
-
- ...
- SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
- verify_callback);
-
- /*
- * Let the verify_callback catch the verify_depth error so that we get
- * an appropriate error in the logfile.
- */
- SSL_CTX_set_verify_depth(verify_depth + 1);
-
- /*
- * Set up the SSL specific data into "mydata" and store it into th SSL
- * structure.
- */
- mydata.verify_depth = verify_depth; ...
- SSL_set_ex_data(ssl, mydata_index, &mydata);
-
- ...
- SSL_accept(ssl); /* check of success left out for clarity */
- if (peer = SSL_get_peer_certificate(ssl))
- {
- if (SSL_get_verify_result(ssl) == X509_V_OK)
- {
- /* The client sent a certificate which verified OK */
- }
- }
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>, L<SSL_new(3)|SSL_new(3)>,
-L<SSL_CTX_get_verify_mode(3)|SSL_CTX_get_verify_mode(3)>,
-L<SSL_get_verify_result(3)|SSL_get_verify_result(3)>,
-L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>,
-L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>,
-L<SSL_get_ex_data_X509_STORE_CTX_idx(3)|SSL_get_ex_data_X509_STORE_CTX_idx(3)>,
-L<SSL_get_ex_new_index(3)|SSL_get_ex_new_index(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_SESSION_get_ex_new_index.pod b/crypto/openssl/doc/ssl/SSL_SESSION_get_ex_new_index.pod
deleted file mode 100644
index dd5cb4f04bba..000000000000
--- a/crypto/openssl/doc/ssl/SSL_SESSION_get_ex_new_index.pod
+++ /dev/null
@@ -1,61 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_SESSION_get_ex_new_index, SSL_SESSION_set_ex_data, SSL_SESSION_get_ex_data - internal application specific data functions
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- int SSL_SESSION_get_ex_new_index(long argl, void *argp,
- CRYPTO_EX_new *new_func,
- CRYPTO_EX_dup *dup_func,
- CRYPTO_EX_free *free_func);
-
- int SSL_SESSION_set_ex_data(SSL_SESSION *session, int idx, void *arg);
-
- void *SSL_SESSION_get_ex_data(SSL_SESSION *session, int idx);
-
- typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
- int idx, long argl, void *argp);
- typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
- int idx, long argl, void *argp);
- typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d,
- int idx, long argl, void *argp);
-
-=head1 DESCRIPTION
-
-Several OpenSSL structures can have application specific data attached to them.
-These functions are used internally by OpenSSL to manipulate application
-specific data attached to a specific structure.
-
-SSL_SESSION_get_ex_new_index() is used to register a new index for application
-specific data.
-
-SSL_SESSION_set_ex_data() is used to store application data at B<arg> for B<idx>
-into the B<session> object.
-
-SSL_SESSION_get_ex_data() is used to retrieve the information for B<idx> from
-B<session>.
-
-A detailed description for the B<*_get_ex_new_index()> functionality
-can be found in L<RSA_get_ex_new_index.pod(3)|RSA_get_ex_new_index.pod(3)>.
-The B<*_get_ex_data()> and B<*_set_ex_data()> functionality is described in
-L<CRYPTO_set_ex_data(3)|CRYPTO_set_ex_data(3)>.
-
-=head1 WARNINGS
-
-The application data is only maintained for sessions held in memory. The
-application data is not included when dumping the session with
-i2d_SSL_SESSION() (and all functions indirectly calling the dump functions
-like PEM_write_SSL_SESSION() and PEM_write_bio_SSL_SESSION()) and can
-therefore not be restored.
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<RSA_get_ex_new_index(3)|RSA_get_ex_new_index(3)>,
-L<CRYPTO_set_ex_data(3)|CRYPTO_set_ex_data(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_SESSION_get_time.pod b/crypto/openssl/doc/ssl/SSL_SESSION_get_time.pod
deleted file mode 100644
index cd33b73aa359..000000000000
--- a/crypto/openssl/doc/ssl/SSL_SESSION_get_time.pod
+++ /dev/null
@@ -1,63 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_SESSION_get_time, SSL_SESSION_set_time, SSL_SESSION_get_timeout, SSL_SESSION_get_timeout - retrieve and manipulate session time and timeout settings
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- long SSL_SESSION_get_time(SSL_SESSION *s);
- long SSL_SESSION_set_time(SSL_SESSION *s, long tm);
- long SSL_SESSION_get_timeout(SSL_SESSION *s);
- long SSL_SESSION_set_timeout(SSL_SESSION *s, long tm);
-
- long SSL_get_time(SSL_SESSION *s);
- long SSL_set_time(SSL_SESSION *s, long tm);
- long SSL_get_timeout(SSL_SESSION *s);
- long SSL_set_timeout(SSL_SESSION *s, long tm);
-
-=head1 DESCRIPTION
-
-SSL_SESSION_get_time() returns the time at which the session B<s> was
-established. The time is given in seconds since the Epoch and therefore
-compatible to the time delivered by the time() call.
-
-SSL_SESSION_set_time() replaces the creation time of the session B<s> with
-the chosen value B<tm>.
-
-SSL_SESSION_get_timeout() returns the timeout value set for session B<s>
-in seconds.
-
-SSL_SESSION_set_timeout() sets the timeout value for session B<s> in seconds
-to B<tm>.
-
-The SSL_get_time(), SSL_set_time(), SSL_get_timeout(), and SSL_set_timeout()
-functions are synonyms for the SSL_SESSION_*() counterparts.
-
-=head1 NOTES
-
-Sessions are expired by examining the creation time and the timeout value.
-Both are set at creation time of the session to the actual time and the
-default timeout value at creation, respectively, as set by
-L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>.
-Using these functions it is possible to extend or shorten the lifetime
-of the session.
-
-=head1 RETURN VALUES
-
-SSL_SESSION_get_time() and SSL_SESSION_get_timeout() return the currently
-valid values.
-
-SSL_SESSION_set_time() and SSL_SESSION_set_timeout() return 1 on success.
-
-If any of the function is passed the NULL pointer for the session B<s>,
-0 is returned.
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_get_ex_data_X509_STORE_CTX_idx.pod b/crypto/openssl/doc/ssl/SSL_get_ex_data_X509_STORE_CTX_idx.pod
deleted file mode 100644
index 165c6a5b2cae..000000000000
--- a/crypto/openssl/doc/ssl/SSL_get_ex_data_X509_STORE_CTX_idx.pod
+++ /dev/null
@@ -1,61 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_get_ex_data_X509_STORE_CTX_idx - get ex_data index to access SSL structure
-from X509_STORE_CTX
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- int SSL_get_ex_data_X509_STORE_CTX_idx(void);
-
-=head1 DESCRIPTION
-
-SSL_get_ex_data_X509_STORE_CTX_idx() returns the index number under which
-the pointer to the SSL object is stored into the X509_STORE_CTX object.
-
-=head1 NOTES
-
-Whenever a X509_STORE_CTX object is created for the verification of the
-peers certificate during a handshake, a pointer to the SSL object is
-stored into the X509_STORE_CTX object to identify the connection affected.
-To retrieve this pointer the X509_STORE_CTX_get_ex_data() function can
-be used with the correct index. This index is globally the same for all
-X509_STORE_CTX objects and can be retrieved using
-SSL_get_ex_data_X509_STORE_CTX_idx(). The index value is set when
-SSL_get_ex_data_X509_STORE_CTX_idx() is first called either by the application
-program directly or indirectly during other SSL setup functions or during
-the handshake.
-
-The value depends on other index values defined for X509_STORE_CTX objects
-before the SSL index is created.
-
-=head1 RETURN VALUES
-
-=over 4
-
-=item E<gt>=0
-
-The index value to access the pointer.
-
-=item E<lt>0
-
-An error occurred, check the error stack for a detailed error message.
-
-=back
-
-=head1 EXAMPLES
-
-The index returned from SSL_get_ex_data_X509_STORE_CTX_idx() allows to
-access the SSL object for the connection to be accessed during the
-verify_callback() when checking the peers certificate. Please check
-the example in L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>,
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>, L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>,
-L<CRYPTO_set_ex_data(3)|CRYPTO_set_ex_data(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_get_ex_new_index.pod b/crypto/openssl/doc/ssl/SSL_get_ex_new_index.pod
deleted file mode 100644
index 2b69bb105003..000000000000
--- a/crypto/openssl/doc/ssl/SSL_get_ex_new_index.pod
+++ /dev/null
@@ -1,59 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_get_ex_new_index, SSL_set_ex_data, SSL_get_ex_data - internal application specific data functions
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- int SSL_get_ex_new_index(long argl, void *argp,
- CRYPTO_EX_new *new_func,
- CRYPTO_EX_dup *dup_func,
- CRYPTO_EX_free *free_func);
-
- int SSL_set_ex_data(SSL *ssl, int idx, void *arg);
-
- void *SSL_get_ex_data(SSL *ssl, int idx);
-
- typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
- int idx, long argl, void *argp);
- typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
- int idx, long argl, void *argp);
- typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d,
- int idx, long argl, void *argp);
-
-=head1 DESCRIPTION
-
-Several OpenSSL structures can have application specific data attached to them.
-These functions are used internally by OpenSSL to manipulate application
-specific data attached to a specific structure.
-
-SSL_get_ex_new_index() is used to register a new index for application
-specific data.
-
-SSL_set_ex_data() is used to store application data at B<arg> for B<idx> into
-the B<ssl> object.
-
-SSL_get_ex_data() is used to retrieve the information for B<idx> from
-B<ssl>.
-
-A detailed description for the B<*_get_ex_new_index()> functionality
-can be found in L<RSA_get_ex_new_index.pod(3)|RSA_get_ex_new_index.pod(3)>.
-The B<*_get_ex_data()> and B<*_set_ex_data()> functionality is described in
-L<CRYPTO_set_ex_data(3)|CRYPTO_set_ex_data(3)>.
-
-=head1 EXAMPLES
-
-An example on how to use the functionality is included in the example
-verify_callback() in L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>.
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<RSA_get_ex_new_index(3)|RSA_get_ex_new_index(3)>,
-L<CRYPTO_set_ex_data(3)|CRYPTO_set_ex_data(3)>,
-L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>
-
-=cut
diff --git a/crypto/openssl/doc/ssl/SSL_load_client_CA_file.pod b/crypto/openssl/doc/ssl/SSL_load_client_CA_file.pod
deleted file mode 100644
index 02527dc2edc8..000000000000
--- a/crypto/openssl/doc/ssl/SSL_load_client_CA_file.pod
+++ /dev/null
@@ -1,62 +0,0 @@
-=pod
-
-=head1 NAME
-
-SSL_load_client_CA_file - load certificate names from file
-
-=head1 SYNOPSIS
-
- #include <openssl/ssl.h>
-
- STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
-
-=head1 DESCRIPTION
-
-SSL_load_client_CA_file() reads certificates from B<file> and returns
-a STACK_OF(X509_NAME) with the subject names found.
-
-=head1 NOTES
-
-SSL_load_client_CA_file() reads a file of PEM formatted certificates and
-extracts the X509_NAMES of the certificates found. While the name suggests
-the specific usage as support function for
-L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>,
-it is not limited to CA certificates.
-
-=head1 EXAMPLES
-
-Load names of CAs from file and use it as a client CA list:
-
- SSL_CTX *ctx;
- STACK_OF(X509_NAME) *cert_names;
-
- ...
- cert_names = SSL_load_client_CA_file("/path/to/CAfile.pem");
- if (cert_names != NULL)
- SSL_CTX_set_client_CA_list(ctx, cert_names);
- else
- error_handling();
- ...
-
-=head1 RETURN VALUES
-
-The following return values can occur:
-
-=over 4
-
-=item NULL
-
-The operation failed, check out the error stack for the reason.
-
-=item Pointer to STACK_OF(X509_NAME)
-
-Pointer to the subject names of the successfully read certificates.
-
-=back
-
-=head1 SEE ALSO
-
-L<ssl(3)|ssl(3)>,
-L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>
-
-=cut
diff --git a/etc/isdn/holidays.D b/etc/isdn/holidays.D
deleted file mode 100644
index 42bfd0d407db..000000000000
--- a/etc/isdn/holidays.D
+++ /dev/null
@@ -1,34 +0,0 @@
-#---------------------------------------------------------------------------
-#
-# german holidays file 2001 / bundeseinheitliche Feiertage 2001
-# -------------------------------------------------------------
-#
-# last edit-date: [Wed Jan 10 13:24:19 2001]
-#
-# ref: http://hamburg.de/Services/ferien/ferien.htm
-#
-# This file is only of value for installations which are
-# using the german Telekom "T-ISDN XXL" tariff where calls
-# on sundays and holidays are free of charge. Additional
-# configuration of /etc/isdnd.rc has to take place to enable
-# support for this tariff, see output of "man isdnd.rc" and
-# search for keyword "valid".
-#
-# $FreeBSD$
-#
-#---------------------------------------------------------------------------
-#
-# same day/month each year
-#
-1.1 Neujahr
-1.5 1. Mai
-3.10 Tag der deutschen Einheit
-25.12 1. Weihnachtsfeiertag
-26.12 2. Weihnachtsfeiertag
-#
-# different day/month each year
-#
-13.4.2001 Karfreitag
-16.4.2001 Ostermontag
-24.5.2001 Himmelfahrt
-4.6.2001 Pfingstmontag
diff --git a/etc/primes b/etc/primes
deleted file mode 100644
index 7f102c54d651..000000000000
--- a/etc/primes
+++ /dev/null
@@ -1,71 +0,0 @@
-# $OpenBSD: primes,v 1.2 2001/01/28 23:31:27 niklas Exp $
-
-# Time Type Tests Tries Size Generator Modulus
-20000522203501 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc589ab15b
-20000522203627 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc58c16733
-20000522203759 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc58ee9dc3
-20000522204003 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc592e0f7b
-20000522204023 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc592fbea3
-20000522204041 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5931088b
-20000522204128 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc59434203
-20000522204251 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5969401b
-20000522204314 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc596b4efb
-20000522204337 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc596dd953
-20000522204423 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc597da68b
-20000522204458 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5984e833
-20000522204530 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc598bb68b
-20000522204551 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc598def3b
-20000522204727 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc59b8d5f3
-20000522204750 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc59bbc4fb
-20000522204841 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc59cfa1fb
-20000522205105 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5a20812b
-20000522205142 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5a2c65b3
-20000522205216 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5a356e23
-20000522205340 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5a5d0ea3
-20000523002213 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc589ab15b
-20000523002333 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc58c16733
-20000523002506 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc58ee9dc3
-20000523002708 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc592e0f7b
-20000523002728 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc592fbea3
-20000523002746 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5931088b
-20000523002834 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc59434203
-20000523002958 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5969401b
-20000523003018 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc596b4efb
-20000523003040 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc596dd953
-20000523003122 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc597da68b
-20000523003151 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5984e833
-20000523003220 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc598bb68b
-20000523003240 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc598def3b
-20000523003415 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc59b8d5f3
-20000523003437 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc59bbc4fb
-20000523003527 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc59cfa1fb
-20000523003808 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5a20812b
-20000523003847 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5a2c65b3
-20000523132221 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5a356e23
-20000523132348 2 6 100 1025 2 2abb47271a1809f247f4433065ee7087815d189e8e2bec67827d173b078cd78bf4adc5bd775679384d763216edc12157afec6eb4d2435a2fc793183fafadc9ff35b5c87471da1e56600203f11ae654a377c80101957a0c0044ee9ae96e8a7cc785a629c17ca5d5ef2a981b83417db75f9616e0ffcbc92d440eb73a2cc5a5d0ea3
-20000523133632 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb029296c38f3b
-20000523134422 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb029296e2b50b
-20000523140206 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb029297404d63
-20000523142316 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb029297b3296b
-20000523144727 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929837023b
-20000523152219 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb029298fcdf8b
-20000523160139 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb029299d2ddcb
-20000523161127 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929a06becb
-20000523161954 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929a2be213
-20000523163925 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929a7f10eb
-20000524131812 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929b9678e3
-20000524132825 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929bc95393
-20000524134006 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929c01c4b3
-20000524135411 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929c497d43
-20000524135734 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929c53d50b
-20000525100237 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929cdb1183
-20000525101209 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929d09073b
-20000525101532 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929d12ae03
-20000525102821 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929d547323
-20000525103314 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929d65a2a3
-20000525103516 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929d66b373
-20000525104424 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929d923c13
-20000525104817 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929d9e8ce3
-20000525105713 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929dc8fe6b
-20000525110833 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929e0121eb
-20000525111133 2 6 100 2048 2 13adce8b316247c62077274d989c505ac8651f4ea63ad3715a49ebf7dc2aa74fc280ac8e3423453ec767e571fa0cf65a9585692669231b0fbbcf418bf4a4bbe2bb7d34904d1494927827dad9a34d08345ecd0374d6487815684affc279854d6eee72cb7941855cc46fd3ee056eb410a57c306185cd13e3d93acb336eb8f62bc61c311b0992dafbd35a835ca46aab4be71ca8a14b98b4fdd72a085115dc46531f711ba4ad41533aab44ef839d7952b7c4655a3309eefbbc3fe8df211397e58df223596c695a8993be7d81ec52b9891a51ece620fdeb8c4d1dad87f979ba375cde357bdd78d4672ea176521a9ef0c0e842d62cdef309b6ed2cd41cb02929e093edb
diff --git a/games/morse/morse.6 b/games/morse/morse.6
deleted file mode 100644
index 6b7f70835f35..000000000000
--- a/games/morse/morse.6
+++ /dev/null
@@ -1,168 +0,0 @@
-.\" Copyright (c) 2000 Alexey Zelkin. All rights reserved.
-.\" Copyright (c) 1988, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)bcd.6 8.1 (Berkeley) 5/31/93
-.\" $FreeBSD$
-.\"
-.Dd December 7, 2000
-.Dt MORSE 6
-.Os
-.Sh NAME
-.Nm morse
-.Nd reformat input as morse code
-.Sh SYNOPSIS
-.Nm
-.Op Fl p
-.Op Fl d Ar device
-.Op Fl e
-.Op Fl w Ar speed
-.Op Fl f Ar frequency
-.Op Fl s
-.Op Ar string ...
-.Sh DESCRIPTION
-The command
-.Nm
-read the given input and reformat it in the form of morse code.
-Acceptable input are command line arguments or the standard input.
-.Pp
-Available options:
-.Bl -tag -width flag
-.It Fl s
-The
-.Fl s
-option produces dots and dashes rather than words.
-.It Fl p
-Send morse the real way. This only works if your system has
-.Xr speaker 4
-support.
-.It Fl w Ar speed
-Set the sending speed in words per minute. If not specified the default
-speed of 20 WPM is used.
-.It Fl f Ar frequency
-Set the sidetone frequency to something other than the default 600 Hz.
-.It Fl d Ar device
-Similar to
-.Fl p ,
-but use the RTS line of
-.Ar device
-.Pq which must by a tty device
-in order to emit the morse code.
-.It Fl e
-echo each character before it is sent, used together with either
-.Fl p
-or
-.Fl d .
-.El
-.Pp
-The
-.Fl w
-and
-.Fl f
-flags only work in conjunction with either the
-.Fl p
-or the
-.Fl d
-flag.
-.Pp
-Not all prosigns have corresponding characters. Use
-.Ql #
-for
-.Em AS ,
-.Ql @
-for
-.Em SK ,
-.Ql *
-for
-.Em VE
-and
-.Ql %
-for
-.Em BK .
-The more common prosigns are
-.Ql =
-for
-.Em BT ,
-.Ql \&(
-for
-.Em KN
-and
-.Ql +
-for
-.Em AR .
-.Pp
-Using flag
-.Fl d Ar device
-it is possible to key an external device, like a sidetone generator with
-a headset for training purposes, or even your ham radio transceiver. For
-the latter, simply connect an NPN transistor to the serial port
-.Ar device ,
-emitter connected to ground, base connected through a resistor
-(few kiloohms) to RTS, collector to the key line of your transceiver
-(assuming the transceiver has a positive key supply voltage and is keyed
-by grounding the key input line). A capacitor (some nanofarads) between
-base and ground is advisable to keep stray RF away, and to supress the
-minor glitch that is generated during program startup.
-.Sh FILES
-.Bl -tag -width /dev/speaker -compact
-.It Pa /dev/speaker
-speaker device file
-.El
-.Sh ENVIRONMENT
-.Bl -tag -width LC_CTYPE -compact
-.It Ev LC_ALL
-.It Ev LC_CTYPE
-.It Ev LANG
-If one of these variables (in this priority) is set to a locale ending in
-.Ql KOI8-R ,
-characters with the high-order bit set are being interpreted as
-Cyrillic characters. In all other cases, they are being interpreted
-as belonging to the
-.Ql ISO_8859-1
-character set.
-.El
-.Sh SEE ALSO
-.Xr speaker 4
-.Sh HISTORY
-Sound support for
-.Nm
-added by
-.An Lyndon Nerenberg (VE7TCP/VE6BBM) Aq lyndon@orthanc.com .
-.Pp
-Ability to key an external device added by
-.An J\(:org Wunsch
-(DL8DTL).
-.Sh BUGS
-Does only understand a few European characters (namely German and
-French), but neither Asian ones, or the continental landline code.
-.Pp
-Sends a bit slower than it should due to system overhead. Some people
-would call this a feature.
diff --git a/gnu/usr.bin/groff/contrib/Makefile b/gnu/usr.bin/groff/contrib/Makefile
deleted file mode 100644
index 6718107cafdd..000000000000
--- a/gnu/usr.bin/groff/contrib/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-SUBDIR= mm
-
-.include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/groff/contrib/Makefile.inc b/gnu/usr.bin/groff/contrib/Makefile.inc
deleted file mode 100644
index d5552c54c4f8..000000000000
--- a/gnu/usr.bin/groff/contrib/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-DIST_SUBDIR= contrib/${.CURDIR:T}
-TOPREL= ../..
-
-.include "../Makefile.inc"
diff --git a/gnu/usr.bin/groff/contrib/mm/Makefile b/gnu/usr.bin/groff/contrib/mm/Makefile
deleted file mode 100644
index 3df1245cbcb6..000000000000
--- a/gnu/usr.bin/groff/contrib/mm/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# $FreeBSD$
-
-SCRIPTS= mmroff.pl
-MAN= mmroff.7
-
-TMACOWN?= ${BINOWN}
-TMACGRP?= ${BINGRP}
-TMACMODE?= ${NOBINMODE}
-TMACDIR?= ${SHAREDIR}/tmac
-
-FILES= 0.MT 5.MT 4.MT ms.cov se_ms.cov
-LOCALE= locale se_locale
-
-MAN+= groff_mm.7 groff_mmse.7
-MLINKS= groff_mm.7 mm.7 groff_mmse.7 mmse.7
-
-CLEANFILES+= ${MAN}
-
-beforeinstall:
- ${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
- ${DIST_DIR}/m.tmac ${DIST_DIR}/mse.tmac ${DESTDIR}${TMACDIR}
-.for file in ${FILES}
- ${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
- ${DIST_DIR}/mm/${file} ${DESTDIR}${TMACDIR}/mm
-.endfor
-.for locale in ${LOCALE}
-.if !exists(${locale}) || empty(${locale})
- ${INSTALL} -c -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
- /dev/null ${DESTDIR}${TMACDIR}/mm/${locale}
-.endif
-.endfor
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/font/Makefile b/gnu/usr.bin/groff/font/Makefile
deleted file mode 100644
index d78fc81e4b9e..000000000000
--- a/gnu/usr.bin/groff/font/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-SUBDIR= devX100 devX100-12 devX75 devX75-12 \
- devascii devcp1047 devdvi devhtml devkoi8-r \
- devlatin1 devlbp devlj4 devps devutf8
-
-.include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/groff/font/Makefile.dev b/gnu/usr.bin/groff/font/Makefile.dev
deleted file mode 100644
index 85be29ab73bb..000000000000
--- a/gnu/usr.bin/groff/font/Makefile.dev
+++ /dev/null
@@ -1,11 +0,0 @@
-# $FreeBSD$
-
-DEVICEDIR?= ${fontdir}/dev${DEV}
-
-all: ${DEVFILES}
-
-beforeinstall: ${DEVFILES}
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
- ${.ALLSRC} ${DESTDIR}${DEVICEDIR}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/font/Makefile.inc b/gnu/usr.bin/groff/font/Makefile.inc
deleted file mode 100644
index 22a1a42e40c7..000000000000
--- a/gnu/usr.bin/groff/font/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-DIST_SUBDIR= font/${.CURDIR:T}
-TOPREL= ../..
-
-.include "../Makefile.inc"
diff --git a/gnu/usr.bin/groff/font/Makefile.tty b/gnu/usr.bin/groff/font/Makefile.tty
deleted file mode 100644
index d515835614b0..000000000000
--- a/gnu/usr.bin/groff/font/Makefile.tty
+++ /dev/null
@@ -1,30 +0,0 @@
-# $FreeBSD$
-
-FONTS?=R I B BI S L CW
-DEVFILES=$(FONTS) DESC
-CLEANFILES=$(DEVFILES)
-
-RES=240
-CPI=10
-LPI=6
-
-$(FONTS): R.proto
- @${ECHO} Making ${.TARGET}
- @(charwidth=`expr $(RES) / $(CPI)` ; \
- sed -e "s/^name [A-Z]*$$/name ${.TARGET}/" \
- -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
- -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
- -e "s/^internalname .*$$/internalname $@/" \
- -e "/^internalname/s/BI/3/" \
- -e "/^internalname/s/B/2/" \
- -e "/^internalname/s/I/1/" \
- -e "/^internalname .*[^ 0-9]/d" \
- ${.ALLSRC} >$.${.TARGET})
-
-DESC: DESC.proto
- @${ECHO} Making ${.TARGET}
- @sed -e "s/^res .*$$/res $(RES)/" \
- -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
- -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
- -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
- ${.ALLSRC} >${.TARGET}
diff --git a/gnu/usr.bin/groff/font/devX100-12/Makefile b/gnu/usr.bin/groff/font/devX100-12/Makefile
deleted file mode 100644
index 9a136b819499..000000000000
--- a/gnu/usr.bin/groff/font/devX100-12/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-NOOBJ=
-
-.include "../Makefile.inc"
-.include "${DIST_DIR}/Makefile.sub"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devX100/Makefile b/gnu/usr.bin/groff/font/devX100/Makefile
deleted file mode 100644
index 9a136b819499..000000000000
--- a/gnu/usr.bin/groff/font/devX100/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-NOOBJ=
-
-.include "../Makefile.inc"
-.include "${DIST_DIR}/Makefile.sub"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devX75-12/Makefile b/gnu/usr.bin/groff/font/devX75-12/Makefile
deleted file mode 100644
index 9a136b819499..000000000000
--- a/gnu/usr.bin/groff/font/devX75-12/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-NOOBJ=
-
-.include "../Makefile.inc"
-.include "${DIST_DIR}/Makefile.sub"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devX75/Makefile b/gnu/usr.bin/groff/font/devX75/Makefile
deleted file mode 100644
index 9a136b819499..000000000000
--- a/gnu/usr.bin/groff/font/devX75/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-NOOBJ=
-
-.include "../Makefile.inc"
-.include "${DIST_DIR}/Makefile.sub"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devascii/Makefile b/gnu/usr.bin/groff/font/devascii/Makefile
deleted file mode 100644
index 544ec16e475d..000000000000
--- a/gnu/usr.bin/groff/font/devascii/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-DEV= ascii
-
-.include "../Makefile.tty"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devcp1047/Makefile b/gnu/usr.bin/groff/font/devcp1047/Makefile
deleted file mode 100644
index d0a887a685c4..000000000000
--- a/gnu/usr.bin/groff/font/devcp1047/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-DEV= cp1047
-
-.include "../Makefile.tty"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devdvi/Makefile b/gnu/usr.bin/groff/font/devdvi/Makefile
deleted file mode 100644
index cb747a5a4ee5..000000000000
--- a/gnu/usr.bin/groff/font/devdvi/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# $FreeBSD$
-
-DEV= dvi
-DEVFILES= DESC R I B BI CW CWI MI S EX H HI HB SA SB \
- generate/CompileFonts generate/Makefile generate/msam.map\
- generate/msbm.map generate/texb.map generate/texex.map \
- generate/texi.map generate/texmi.map generate/texr.map \
- generate/texsy.map generate/textt.map
-
-CLEANFILES+= DESC
-
-DESC: DESC.in
- cat ${DIST_DIR}/DESC.in >DESC
- test -z '${DVIPRINT}' || echo print '${DVIPRINT}' >>DESC
-
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devhtml/Makefile b/gnu/usr.bin/groff/font/devhtml/Makefile
deleted file mode 100644
index f44b14493680..000000000000
--- a/gnu/usr.bin/groff/font/devhtml/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-DEV= html
-FONTS= R I B BI CR S
-
-.include "../Makefile.tty"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devkoi8-r/DESC.proto b/gnu/usr.bin/groff/font/devkoi8-r/DESC.proto
deleted file mode 100644
index 041cebabfcf4..000000000000
--- a/gnu/usr.bin/groff/font/devkoi8-r/DESC.proto
+++ /dev/null
@@ -1,8 +0,0 @@
-res 240
-hor 24
-vert 40
-unitwidth 10
-sizes 10 0
-fonts 6 R I B BI S L
-tcommand
-postpro grotty
diff --git a/gnu/usr.bin/groff/font/devkoi8-r/Makefile b/gnu/usr.bin/groff/font/devkoi8-r/Makefile
deleted file mode 100644
index 399d2b6d0879..000000000000
--- a/gnu/usr.bin/groff/font/devkoi8-r/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-DEV= koi8-r
-
-.include "../Makefile.tty"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devlatin1/Makefile b/gnu/usr.bin/groff/font/devlatin1/Makefile
deleted file mode 100644
index 238320216c1e..000000000000
--- a/gnu/usr.bin/groff/font/devlatin1/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-DEV= latin1
-
-.include "../Makefile.tty"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devlbp/Makefile b/gnu/usr.bin/groff/font/devlbp/Makefile
deleted file mode 100644
index 4ea437eef811..000000000000
--- a/gnu/usr.bin/groff/font/devlbp/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-# $FreeBSD$
-
-DEV= lbp
-LBPPRINT= ${PSPRINT}
-DEVFILES= DESC HB HBI HI HR TB TBI TI TR
-
-CLEANFILES+= DESC
-
-DESC: DESC.in
- cat ${.ALLSRC} >${.TARGET}
- if test "${PAGE}" = A4; then \
- echo "papersize a4" >>${.TARGET}; \
- else \
- echo "papersize letter" >>${.TARGET}; \
- fi
- test -z '${LBPPRINT}' || echo print '${LBPPRINT}' >>${.TARGET}
-
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devlj4/Makefile b/gnu/usr.bin/groff/font/devlj4/Makefile
deleted file mode 100644
index 504677cec4c3..000000000000
--- a/gnu/usr.bin/groff/font/devlj4/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# $FreeBSD$
-
-DEV= lj4
-LJ4RES= 600
-LJ4PRINT= ${PSPRINT}
-DEVFILES= DESC \
- ALBB ALBR AOB AOI AOR CB CBI CI CR GB GBI GI GR \
- LGB LGI LGR OB OBI OI OR TB TBI TI TR UB UBI UI UR \
- UCB UCBI UCI UCR CLARENDON CORONET MARIGOLD S \
- generate/Makefile generate/text.map generate/special.map
-
-CLEANFILES+= DESC
-
-DESC: DESC.in
- echo "res ${LJ4RES}" >${.TARGET}
- echo "unitwidth `expr 7620000 / ${LJ4RES}`" >>${.TARGET}
- cat ${.ALLSRC} >>${.TARGET}
- if test "${PAGE}" = A4; then \
- echo "papersize a4" >>${.TARGET}; \
- else \
- echo "papersize letter" >>${.TARGET}; \
- fi
- test -z '${LJ4PRINT}' || echo print '${LJ4PRINT}' >>${.TARGET}
-
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/font/devps/Makefile b/gnu/usr.bin/groff/font/devps/Makefile
deleted file mode 100644
index 0383d01de2cb..000000000000
--- a/gnu/usr.bin/groff/font/devps/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-# $FreeBSD$
-
-DEV= ps
-DISTFILES= text.enc download \
- S ZD ZDR SS AB ABI AI AR BMB BMBI BMI BMR \
- CB CBI CI CR HB HBI HI HR HNB HNBI HNI HNR \
- NB NBI NI NR PB PBI PI PR TB TBI TI TR ZCMI
-PSFILES= prologue symbolsl.pfa zapfdr.pfa
-DEVGENFILES= generate/Makefile generate/afmname generate/dingbats.map \
- generate/dingbats.rmap generate/lgreekmap generate/symbol.sed \
- generate/symbolchars generate/symbolsl.afm generate/textmap
-DEVFILES= DESC ${PSFILES} ${DISTFILES} ${DEVGENFILES}
-
-CLEANFILES+= DESC ${PSFILES}
-
-DESC: DESC.in
- -rm -f DESC
- cat ${DIST_DIR}/DESC.in >DESC
- echo broken ${BROKEN_SPOOLER_FLAGS} >>DESC
- if test "${PAGE}" = A4; then \
- echo "paperlength 841890" >>DESC; \
- else \
- echo "paperlength 792000" >>DESC; \
- fi
- test -z '${PSPRINT}' || echo print '${PSPRINT}' >>DESC
-
-${PSFILES}:
- -rm -f $@
- sed -f ${DIST_DIR}/psstrip.sed $? >$@
-
-.include "../Makefile.dev"
-
-prologue: ${DIST_DIR}/prologue.ps
-zapfdr.pfa: ${DIST_DIR}/zapfdr.ps
-symbolsl.pfa: ${DIST_DIR}/symbolsl.ps
diff --git a/gnu/usr.bin/groff/font/devutf8/Makefile b/gnu/usr.bin/groff/font/devutf8/Makefile
deleted file mode 100644
index bf5965e19d3e..000000000000
--- a/gnu/usr.bin/groff/font/devutf8/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-DEV= utf8
-
-.include "../Makefile.tty"
-.include "../Makefile.dev"
diff --git a/gnu/usr.bin/groff/src/Makefile b/gnu/usr.bin/groff/src/Makefile
deleted file mode 100644
index 7d2ca90a2252..000000000000
--- a/gnu/usr.bin/groff/src/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-SUBDIR= libs devices preproc roff utils
-
-.include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/groff/src/devices/Makefile b/gnu/usr.bin/groff/src/devices/Makefile
deleted file mode 100644
index 8af4ff85b996..000000000000
--- a/gnu/usr.bin/groff/src/devices/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-SUBDIR= grodvi grohtml grolbp grolj4 grops grotty
-
-.include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/groff/src/devices/Makefile.inc b/gnu/usr.bin/groff/src/devices/Makefile.inc
deleted file mode 100644
index 4619cbe9ad15..000000000000
--- a/gnu/usr.bin/groff/src/devices/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-TOPREL= ../../..
-DIST_SUBDIR= src/devices/${.CURDIR:T}
-
-.include "../../Makefile.inc"
diff --git a/gnu/usr.bin/groff/src/devices/grodvi/Makefile b/gnu/usr.bin/groff/src/devices/grodvi/Makefile
deleted file mode 100644
index 771bc1e85427..000000000000
--- a/gnu/usr.bin/groff/src/devices/grodvi/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= grodvi
-SRCS= dvi.cc
-DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/devices/grohtml/Makefile b/gnu/usr.bin/groff/src/devices/grohtml/Makefile
deleted file mode 100644
index 6b67f9811266..000000000000
--- a/gnu/usr.bin/groff/src/devices/grohtml/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= post-grohtml
-SRCS= post-html.cc html-text.cc output.cc
-DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
-NOMAN= YES
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/devices/grolbp/Makefile b/gnu/usr.bin/groff/src/devices/grolbp/Makefile
deleted file mode 100644
index 304e3adfe4dc..000000000000
--- a/gnu/usr.bin/groff/src/devices/grolbp/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= grolbp
-SRCS= lbp.cc
-DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/devices/grolj4/Makefile b/gnu/usr.bin/groff/src/devices/grolj4/Makefile
deleted file mode 100644
index 52a43f87b319..000000000000
--- a/gnu/usr.bin/groff/src/devices/grolj4/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= grolj4
-SRCS= lj4.cc
-DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/devices/grops/Makefile b/gnu/usr.bin/groff/src/devices/grops/Makefile
deleted file mode 100644
index 3e8c2557956a..000000000000
--- a/gnu/usr.bin/groff/src/devices/grops/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= grops
-SRCS= ps.cc psrm.cc
-DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/devices/grotty/Makefile b/gnu/usr.bin/groff/src/devices/grotty/Makefile
deleted file mode 100644
index 1c4fd81b1269..000000000000
--- a/gnu/usr.bin/groff/src/devices/grotty/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= grotty
-SRCS= tty.cc
-DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBDRIVER} ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/include/defs.h b/gnu/usr.bin/groff/src/include/defs.h
deleted file mode 100644
index 76bd1178d45f..000000000000
--- a/gnu/usr.bin/groff/src/include/defs.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* $FreeBSD$ */
-
-#define PROG_PREFIX ""
-#define DEVICE "ps"
-#define BINPATH "/usr/bin"
-#define FONTPATH "/usr/share/groff_font"
-#define MACROPATH "/usr/share/tmac"
-#define INDEX_SUFFIX ".i"
-#define COMMON_WORDS_FILE "/usr/share/dict/eign"
-#define DEFAULT_INDEX_DIR "/usr/share/dict/papers"
-#define DEFAULT_INDEX_NAME "Ind"
-#define DEFAULT_INDEX "/usr/share/dict/papers/Ind"
diff --git a/gnu/usr.bin/groff/src/libs/Makefile b/gnu/usr.bin/groff/src/libs/Makefile
deleted file mode 100644
index 1461cda28bac..000000000000
--- a/gnu/usr.bin/groff/src/libs/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-SUBDIR= libgroff libdriver libbib
-
-.include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/groff/src/libs/Makefile.inc b/gnu/usr.bin/groff/src/libs/Makefile.inc
deleted file mode 100644
index 627553fa6e85..000000000000
--- a/gnu/usr.bin/groff/src/libs/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-TOPREL= ../../..
-DIST_SUBDIR= src/libs/${.CURDIR:T}
-
-.include "../../Makefile.inc"
diff --git a/gnu/usr.bin/groff/src/libs/libbib/Makefile b/gnu/usr.bin/groff/src/libs/libbib/Makefile
deleted file mode 100644
index af1f60590b96..000000000000
--- a/gnu/usr.bin/groff/src/libs/libbib/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-LIB= bib
-INTERNALLIB= YES
-INTERNALSTATICLIB=YES
-SRCS= common.cc index.cc linear.cc search.cc map.c
-
-.include <bsd.lib.mk>
diff --git a/gnu/usr.bin/groff/src/libs/libdriver/Makefile b/gnu/usr.bin/groff/src/libs/libdriver/Makefile
deleted file mode 100644
index e082c7930e6d..000000000000
--- a/gnu/usr.bin/groff/src/libs/libdriver/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-LIB= driver
-INTERNALLIB= YES
-INTERNALSTATICLIB=YES
-SRCS= input.cc printer.cc
-
-.include <bsd.lib.mk>
diff --git a/gnu/usr.bin/groff/src/libs/libgroff/Makefile b/gnu/usr.bin/groff/src/libs/libgroff/Makefile
deleted file mode 100644
index d8cfcf0d1d56..000000000000
--- a/gnu/usr.bin/groff/src/libs/libgroff/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# $FreeBSD$
-
-LIB= groff
-INTERNALLIB= YES
-INTERNALSTATICLIB=YES
-SRCS= assert.cc change_lf.cc cmap.cc cset.cc device.cc errarg.cc\
- error.cc fatal.cc filename.cc font.cc fontfile.cc\
- htmlindicate.cc lf.cc\
- lineno.cc macropath.cc nametoindex.cc new.cc prime.cc\
- progname.cc ptable.cc searchpath.cc string.cc strsave.cc\
- tmpfile.cc illegal.cc version.cc
-SRCS+= getopt.c getopt1.c iftoa.c itoa.c matherr.c
-CLEANFILES= version.cc
-
-.include <bsd.lib.mk>
-
-version.cc: ${GROFF_DIST}/VERSION ${GROFF_DIST}/REVISION
- @${ECHO} Making version.cc
- @echo const char \*version_string = \"`cat ${GROFF_DIST}/VERSION`\"\; >$@
- @echo const char \*revision_string = \"`cat ${GROFF_DIST}/REVISION`\"\; >>$@
- @echo const char \*Version_string = \"`cat ${GROFF_DIST}/VERSION`.`cat ${GROFF_DIST}/REVISION`\"\; | \
- sed -e 's/\.0\"/\"/' >>$@
diff --git a/gnu/usr.bin/groff/src/preproc/Makefile b/gnu/usr.bin/groff/src/preproc/Makefile
deleted file mode 100644
index 680399c507c8..000000000000
--- a/gnu/usr.bin/groff/src/preproc/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-SUBDIR= eqn grn html pic refer tbl
-
-# BSD already provides soelim(1)
-MISC= soelim
-
-.include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/groff/src/preproc/Makefile.inc b/gnu/usr.bin/groff/src/preproc/Makefile.inc
deleted file mode 100644
index 16c104a1aae6..000000000000
--- a/gnu/usr.bin/groff/src/preproc/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-TOPREL= ../../..
-DIST_SUBDIR= src/preproc/${.CURDIR:T}
-
-.include "../../Makefile.inc"
diff --git a/gnu/usr.bin/groff/src/preproc/eqn/Makefile b/gnu/usr.bin/groff/src/preproc/eqn/Makefile
deleted file mode 100644
index 217c3056b18f..000000000000
--- a/gnu/usr.bin/groff/src/preproc/eqn/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# $FreeBSD$
-
-PROG= eqn
-SRCS= eqn.cc eqn_tab.h main.cc lex.cc \
- box.cc limit.cc list.cc over.cc text.cc \
- script.cc mark.cc other.cc delim.cc sqrt.cc pile.cc special.cc
-CFLAGS+= -I${DIST_DIR} -I.
-DPADD= ${LIBGROFF}
-LDADD= ${LIBGROFF}
-SCRIPTS= neqn
-MAN= eqn.1 neqn.1
-CLEANFILES= eqn.cc eqn_tab.h ${SCRIPTS} ${MAN} y.tab.c y.tab.h
-
-eqn_tab.h: eqn.cc
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/preproc/grn/Makefile b/gnu/usr.bin/groff/src/preproc/grn/Makefile
deleted file mode 100644
index 8192e8df7af8..000000000000
--- a/gnu/usr.bin/groff/src/preproc/grn/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= grn
-SRCS= hdb.cc hpoint.cc hgraph.cc main.cc
-DPADD= ${LIBGROFF} ${LIBM}
-LDADD= ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/preproc/html/Makefile b/gnu/usr.bin/groff/src/preproc/html/Makefile
deleted file mode 100644
index 0cf0783556b5..000000000000
--- a/gnu/usr.bin/groff/src/preproc/html/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= pre-grohtml
-SRCS= pre-html.cc pushbackbuffer.cc
-DPADD= ${LIBGROFF}
-LDADD= ${LIBGROFF}
-NOMAN= YES
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/preproc/pic/Makefile b/gnu/usr.bin/groff/src/preproc/pic/Makefile
deleted file mode 100644
index 36a3b7e06ac5..000000000000
--- a/gnu/usr.bin/groff/src/preproc/pic/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# $FreeBSD$
-
-PROG= pic
-SRCS= lex.cc main.cc object.cc pic.cc pic_tab.h \
- common.cc troff.cc tex.cc
-CFLAGS+= -I${DIST_DIR} -I.
-DPADD= ${LIBGROFF} ${LIBM}
-LDADD= ${LIBGROFF} -lm
-CLEANFILES= ${MAN} pic.cc pic_tab.h y.tab.c y.tab.h
-
-pic_tab.h: pic.cc
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/preproc/refer/Makefile b/gnu/usr.bin/groff/src/preproc/refer/Makefile
deleted file mode 100644
index ac3799bcbc3b..000000000000
--- a/gnu/usr.bin/groff/src/preproc/refer/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-
-PROG= refer
-SRCS= command.cc label.cc ref.cc refer.cc token.cc
-CFLAGS+= -I${DIST_DIR}
-DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBBIB} ${LIBGROFF} -lm
-CLEANFILES= label.cc label_tab.h ${MAN} y.tab.c y.tab.h
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/preproc/soelim/Makefile b/gnu/usr.bin/groff/src/preproc/soelim/Makefile
deleted file mode 100644
index 662a67887880..000000000000
--- a/gnu/usr.bin/groff/src/preproc/soelim/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= soelim
-SRCS= soelim.cc
-DPADD= ${LIBGROFF}
-LDADD= ${LIBGROFF}
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/preproc/tbl/Makefile b/gnu/usr.bin/groff/src/preproc/tbl/Makefile
deleted file mode 100644
index d625af58466c..000000000000
--- a/gnu/usr.bin/groff/src/preproc/tbl/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= tbl
-SRCS= main.cc table.cc
-DPADD= ${LIBGROFF} ${LIBM}
-LDADD= ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/roff/Makefile b/gnu/usr.bin/groff/src/roff/Makefile
deleted file mode 100644
index 543a990c680f..000000000000
--- a/gnu/usr.bin/groff/src/roff/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-SUBDIR= groff grog nroff psroff troff
-
-.include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/groff/src/roff/Makefile.inc b/gnu/usr.bin/groff/src/roff/Makefile.inc
deleted file mode 100644
index f893659c1b99..000000000000
--- a/gnu/usr.bin/groff/src/roff/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-TOPREL= ../../..
-DIST_SUBDIR= src/roff/${.CURDIR:T}
-
-.include "../../Makefile.inc"
diff --git a/gnu/usr.bin/groff/src/roff/groff/Makefile b/gnu/usr.bin/groff/src/roff/groff/Makefile
deleted file mode 100644
index 97eb90413dcd..000000000000
--- a/gnu/usr.bin/groff/src/roff/groff/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= groff
-SRCS= groff.cc pipeline.c
-DPADD= ${LIBGROFF} ${LIBM}
-LDADD= ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/roff/grog/Makefile b/gnu/usr.bin/groff/src/roff/grog/Makefile
deleted file mode 100644
index 718f0cf78acd..000000000000
--- a/gnu/usr.bin/groff/src/roff/grog/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-SCRIPTS= grog
-MAN= grog.1
-CLEANFILES= ${SCRIPTS} ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/roff/nroff/Makefile b/gnu/usr.bin/groff/src/roff/nroff/Makefile
deleted file mode 100644
index 6971890c67e6..000000000000
--- a/gnu/usr.bin/groff/src/roff/nroff/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-SCRIPTS= nroff
-MAN= nroff.1
-CLEANFILES= ${SCRIPTS} ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/roff/psroff/Makefile b/gnu/usr.bin/groff/src/roff/psroff/Makefile
deleted file mode 100644
index 74bb4ad54980..000000000000
--- a/gnu/usr.bin/groff/src/roff/psroff/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-SCRIPTS= psroff.sh
-MAN= psroff.1
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/roff/psroff/psroff.1 b/gnu/usr.bin/groff/src/roff/psroff/psroff.1
deleted file mode 100644
index e2291bab49d3..000000000000
--- a/gnu/usr.bin/groff/src/roff/psroff/psroff.1
+++ /dev/null
@@ -1,46 +0,0 @@
-.\" Copyright (c) 1997 Wolfram Schneider <wosch@FreeBSD.org>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.Dd September 15, 1997
-.Dt PSROFF 1
-.Os
-.Sh NAME
-.Nm psroff
-.Nd "send troff to PostScript printer"
-.Sh SYNOPSIS
-.Nm
-.Op Ar "groff options"
-.Op Ar
-.Sh DESCRIPTION
-The
-.Nm
-program is actually just a shell script which invokes the
-.Xr groff 1
-command to print the troff files to a PostScript printer.
-.Sh SEE ALSO
-.Xr groff 1 ,
-.Xr lpr 1 ,
-.Xr vgrind 1 ,
-.Xr environ 7
diff --git a/gnu/usr.bin/groff/src/roff/psroff/psroff.sh b/gnu/usr.bin/groff/src/roff/psroff/psroff.sh
deleted file mode 100644
index 8a9008234b43..000000000000
--- a/gnu/usr.bin/groff/src/roff/psroff/psroff.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh -
-exec groff -Tps -l -C ${1+"$@"}
diff --git a/gnu/usr.bin/groff/src/roff/troff/Makefile b/gnu/usr.bin/groff/src/roff/troff/Makefile
deleted file mode 100644
index 6ce2b9712e16..000000000000
--- a/gnu/usr.bin/groff/src/roff/troff/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# $FreeBSD$
-
-PROG= troff
-SRCS= env.cc node.cc input.cc div.cc symbol.cc dictionary.cc reg.cc \
- number.cc majorminor.cc
-DPADD= ${LIBGROFF} ${LIBM}
-LDADD= ${LIBGROFF} -lm
-CLEANFILES= majorminor.cc ${MAN}
-
-.include <bsd.prog.mk>
-
-majorminor.cc: ${GROFF_DIST}/VERSION ${GROFF_DIST}/REVISION
- @${ECHO} Making $@
- @-rm -f $@
- @echo const char \*major_version = \
- \"`sed -e 's/^\([^.]*\)\..*$$/\1/' ${GROFF_DIST}/VERSION`\"\; >$@
- @echo const char \*minor_version = \
- \"`sed -e 's/^[^.]*\.\([0-9]*\).*$$/\1/' ${GROFF_DIST}/VERSION`\"\; >>$@
- @echo const char \*revision = \"`cat ${GROFF_DIST}/REVISION`\"\; >>$@
diff --git a/gnu/usr.bin/groff/src/utils/Makefile b/gnu/usr.bin/groff/src/utils/Makefile
deleted file mode 100644
index 14953b925312..000000000000
--- a/gnu/usr.bin/groff/src/utils/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-SUBDIR= addftinfo afmtodit hpftodit indxbib lkbib lookbib pfbtops tfmtodit
-
-.include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/groff/src/utils/Makefile.inc b/gnu/usr.bin/groff/src/utils/Makefile.inc
deleted file mode 100644
index 68945ab39f93..000000000000
--- a/gnu/usr.bin/groff/src/utils/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# $FreeBSD$
-
-TOPREL= ../../..
-DIST_SUBDIR= src/utils/${.CURDIR:T}
-
-.include "../../Makefile.inc"
diff --git a/gnu/usr.bin/groff/src/utils/addftinfo/Makefile b/gnu/usr.bin/groff/src/utils/addftinfo/Makefile
deleted file mode 100644
index 44d2b62a89ac..000000000000
--- a/gnu/usr.bin/groff/src/utils/addftinfo/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= addftinfo
-SRCS= addftinfo.cc guess.cc
-DPADD= ${LIBGROFF}
-LDADD= ${LIBGROFF}
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/utils/afmtodit/Makefile b/gnu/usr.bin/groff/src/utils/afmtodit/Makefile
deleted file mode 100644
index 00f88ad2b982..000000000000
--- a/gnu/usr.bin/groff/src/utils/afmtodit/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $FreeBSD$
-
-SCRIPTS= afmtodit
-MAN= afmtodit.1
-CLEANFILES= ${SCRIPTS} ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/utils/hpftodit/Makefile b/gnu/usr.bin/groff/src/utils/hpftodit/Makefile
deleted file mode 100644
index 7d50e48153a1..000000000000
--- a/gnu/usr.bin/groff/src/utils/hpftodit/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= hpftodit
-SRCS= hpftodit.cc
-DPADD= ${LIBGROFF} ${LIBM}
-LDADD= ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/utils/indxbib/Makefile b/gnu/usr.bin/groff/src/utils/indxbib/Makefile
deleted file mode 100644
index 2fa205911f8a..000000000000
--- a/gnu/usr.bin/groff/src/utils/indxbib/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# $FreeBSD$
-
-PROG= indxbib
-SRCS= indxbib.cc dirnamemax.c signal.c
-DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBBIB} ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-beforeinstall:
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
- ${DIST_DIR}/eign ${DESTDIR}${SHAREDIR}/dict/
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/utils/lkbib/Makefile b/gnu/usr.bin/groff/src/utils/lkbib/Makefile
deleted file mode 100644
index 7d59bf0e1f83..000000000000
--- a/gnu/usr.bin/groff/src/utils/lkbib/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= lkbib
-SRCS= lkbib.cc
-DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBBIB} ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/utils/lookbib/Makefile b/gnu/usr.bin/groff/src/utils/lookbib/Makefile
deleted file mode 100644
index 50fb79687cd7..000000000000
--- a/gnu/usr.bin/groff/src/utils/lookbib/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= lookbib
-SRCS= lookbib.cc
-DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM}
-LDADD= ${LIBBIB} ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/utils/pfbtops/Makefile b/gnu/usr.bin/groff/src/utils/pfbtops/Makefile
deleted file mode 100644
index 4fa71b525af6..000000000000
--- a/gnu/usr.bin/groff/src/utils/pfbtops/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-PROG= pfbtops
-DPADD= ${LIBGROFF}
-LDADD= ${LIBGROFF}
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile b/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile
deleted file mode 100644
index 34788714e89f..000000000000
--- a/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-PROG= tfmtodit
-SRCS= tfmtodit.cc
-DPADD= ${LIBGROFF} ${LIBM}
-LDADD= ${LIBGROFF} -lm
-CLEANFILES= ${MAN}
-
-.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/groff/tmac/hyphen.us-ru b/gnu/usr.bin/groff/tmac/hyphen.us-ru
deleted file mode 100644
index 3ccef48465fe..000000000000
--- a/gnu/usr.bin/groff/tmac/hyphen.us-ru
+++ /dev/null
@@ -1,4833 +0,0 @@
-% Hyphenation patterns for US English and Russian (koi8-r).
-% These are the standard Plain TeX hyphenation patterns (in hyphen.tex).
-.ach4
-.ad4der
-.af1t
-.al3t
-.am5at
-.an5c
-.ang4
-.ani5m
-.ant4
-.an3te
-.anti5s
-.ar5s
-.ar4tie
-.ar4ty
-.as3c
-.as1p
-.as1s
-.aster5
-.atom5
-.au1d
-.av4i
-.awn4
-.ba4g
-.ba5na
-.bas4e
-.ber4
-.be5ra
-.be3sm
-.be5sto
-.bri2
-.but4ti
-.cam4pe
-.can5c
-.capa5b
-.car5ol
-.ca4t
-.ce4la
-.ch4
-.chill5i
-.ci2
-.cit5r
-.co3e
-.co4r
-.cor5ner
-.de4moi
-.de3o
-.de3ra
-.de3ri
-.des4c
-.dictio5
-.do4t
-.du4c
-.dumb5
-.earth5
-.eas3i
-.eb4
-.eer4
-.eg2
-.el5d
-.el3em
-.enam3
-.en3g
-.en3s
-.eq5ui5t
-.er4ri
-.es3
-.eu3
-.eye5
-.fes3
-.for5mer
-.ga2
-.ge2
-.gen3t4
-.ge5og
-.gi5a
-.gi4b
-.go4r
-.hand5i
-.han5k
-.he2
-.hero5i
-.hes3
-.het3
-.hi3b
-.hi3er
-.hon5ey
-.hon3o
-.hov5
-.id4l
-.idol3
-.im3m
-.im5pin
-.in1
-.in3ci
-.ine2
-.in2k
-.in3s
-.ir5r
-.is4i
-.ju3r
-.la4cy
-.la4m
-.lat5er
-.lath5
-.le2
-.leg5e
-.len4
-.lep5
-.lev1
-.li4g
-.lig5a
-.li2n
-.li3o
-.li4t
-.mag5a5
-.mal5o
-.man5a
-.mar5ti
-.me2
-.mer3c
-.me5ter
-.mis1
-.mist5i
-.mon3e
-.mo3ro
-.mu5ta
-.muta5b
-.ni4c
-.od2
-.odd5
-.of5te
-.or5ato
-.or3c
-.or1d
-.or3t
-.os3
-.os4tl
-.oth3
-.out3
-.ped5al
-.pe5te
-.pe5tit
-.pi4e
-.pio5n
-.pi2t
-.pre3m
-.ra4c
-.ran4t
-.ratio5na
-.ree2
-.re5mit
-.res2
-.re5stat
-.ri4g
-.rit5u
-.ro4q
-.ros5t
-.row5d
-.ru4d
-.sci3e
-.self5
-.sell5
-.se2n
-.se5rie
-.sh2
-.si2
-.sing4
-.st4
-.sta5bl
-.sy2
-.ta4
-.te4
-.ten5an
-.th2
-.ti2
-.til4
-.tim5o5
-.ting4
-.tin5k
-.ton4a
-.to4p
-.top5i
-.tou5s
-.trib5ut
-.un1a
-.un3ce
-.under5
-.un1e
-.un5k
-.un5o
-.un3u
-.up3
-.ure3
-.us5a
-.ven4de
-.ve5ra
-.wil5i
-.ye4
-4ab.
-a5bal
-a5ban
-abe2
-ab5erd
-abi5a
-ab5it5ab
-ab5lat
-ab5o5liz
-4abr
-ab5rog
-ab3ul
-a4car
-ac5ard
-ac5aro
-a5ceou
-ac1er
-a5chet
-4a2ci
-a3cie
-ac1in
-a3cio
-ac5rob
-act5if
-ac3ul
-ac4um
-a2d
-ad4din
-ad5er.
-2adi
-a3dia
-ad3ica
-adi4er
-a3dio
-a3dit
-a5diu
-ad4le
-ad3ow
-ad5ran
-ad4su
-4adu
-a3duc
-ad5um
-ae4r
-aeri4e
-a2f
-aff4
-a4gab
-aga4n
-ag5ell
-age4o
-4ageu
-ag1i
-4ag4l
-ag1n
-a2go
-3agog
-ag3oni
-a5guer
-ag5ul
-a4gy
-a3ha
-a3he
-ah4l
-a3ho
-ai2
-a5ia
-a3ic.
-ai5ly
-a4i4n
-ain5in
-ain5o
-ait5en
-a1j
-ak1en
-al5ab
-al3ad
-a4lar
-4aldi
-2ale
-al3end
-a4lenti
-a5le5o
-al1i
-al4ia.
-ali4e
-al5lev
-4allic
-4alm
-a5log.
-a4ly.
-4alys
-5a5lyst
-5alyt
-3alyz
-4ama
-am5ab
-am3ag
-ama5ra
-am5asc
-a4matis
-a4m5ato
-am5era
-am3ic
-am5if
-am5ily
-am1in
-ami4no
-a2mo
-a5mon
-amor5i
-amp5en
-a2n
-an3age
-3analy
-a3nar
-an3arc
-anar4i
-a3nati
-4and
-ande4s
-an3dis
-an1dl
-an4dow
-a5nee
-a3nen
-an5est.
-a3neu
-2ang
-ang5ie
-an1gl
-a4n1ic
-a3nies
-an3i3f
-an4ime
-a5nimi
-a5nine
-an3io
-a3nip
-an3ish
-an3it
-a3niu
-an4kli
-5anniz
-ano4
-an5ot
-anoth5
-an2sa
-an4sco
-an4sn
-an2sp
-ans3po
-an4st
-an4sur
-antal4
-an4tie
-4anto
-an2tr
-an4tw
-an3ua
-an3ul
-a5nur
-4ao
-apar4
-ap5at
-ap5ero
-a3pher
-4aphi
-a4pilla
-ap5illar
-ap3in
-ap3ita
-a3pitu
-a2pl
-apoc5
-ap5ola
-apor5i
-apos3t
-aps5es
-a3pu
-aque5
-2a2r
-ar3act
-a5rade
-ar5adis
-ar3al
-a5ramete
-aran4g
-ara3p
-ar4at
-a5ratio
-ar5ativ
-a5rau
-ar5av4
-araw4
-arbal4
-ar4chan
-ar5dine
-ar4dr
-ar5eas
-a3ree
-ar3ent
-a5ress
-ar4fi
-ar4fl
-ar1i
-ar5ial
-ar3ian
-a3riet
-ar4im
-ar5inat
-ar3io
-ar2iz
-ar2mi
-ar5o5d
-a5roni
-a3roo
-ar2p
-ar3q
-arre4
-ar4sa
-ar2sh
-4as.
-as4ab
-as3ant
-ashi4
-a5sia.
-a3sib
-a3sic
-5a5si4t
-ask3i
-as4l
-a4soc
-as5ph
-as4sh
-as3ten
-as1tr
-asur5a
-a2ta
-at3abl
-at5ac
-at3alo
-at5ap
-ate5c
-at5ech
-at3ego
-at3en.
-at3era
-ater5n
-a5terna
-at3est
-at5ev
-4ath
-ath5em
-a5then
-at4ho
-ath5om
-4ati.
-a5tia
-at5i5b
-at1ic
-at3if
-ation5ar
-at3itu
-a4tog
-a2tom
-at5omiz
-a4top
-a4tos
-a1tr
-at5rop
-at4sk
-at4tag
-at5te
-at4th
-a2tu
-at5ua
-at5ue
-at3ul
-at3ura
-a2ty
-au4b
-augh3
-au3gu
-au4l2
-aun5d
-au3r
-au5sib
-aut5en
-au1th
-a2va
-av3ag
-a5van
-ave4no
-av3era
-av5ern
-av5ery
-av1i
-avi4er
-av3ig
-av5oc
-a1vor
-3away
-aw3i
-aw4ly
-aws4
-ax4ic
-ax4id
-ay5al
-aye4
-ays4
-azi4er
-azz5i
-5ba.
-bad5ger
-ba4ge
-bal1a
-ban5dag
-ban4e
-ban3i
-barbi5
-bari4a
-bas4si
-1bat
-ba4z
-2b1b
-b2be
-b3ber
-bbi4na
-4b1d
-4be.
-beak4
-beat3
-4be2d
-be3da
-be3de
-be3di
-be3gi
-be5gu
-1bel
-be1li
-be3lo
-4be5m
-be5nig
-be5nu
-4bes4
-be3sp
-be5str
-3bet
-bet5iz
-be5tr
-be3tw
-be3w
-be5yo
-2bf
-4b3h
-bi2b
-bi4d
-3bie
-bi5en
-bi4er
-2b3if
-1bil
-bi3liz
-bina5r4
-bin4d
-bi5net
-bi3ogr
-bi5ou
-bi2t
-3bi3tio
-bi3tr
-3bit5ua
-b5itz
-b1j
-bk4
-b2l2
-blath5
-b4le.
-blen4
-5blesp
-b3lis
-b4lo
-blun4t
-4b1m
-4b3n
-bne5g
-3bod
-bod3i
-bo4e
-bol3ic
-bom4bi
-bon4a
-bon5at
-3boo
-5bor.
-4b1ora
-bor5d
-5bore
-5bori
-5bos4
-b5ota
-both5
-bo4to
-bound3
-4bp
-4brit
-broth3
-2b5s2
-bsor4
-2bt
-bt4l
-b4to
-b3tr
-buf4fer
-bu4ga
-bu3li
-bumi4
-bu4n
-bunt4i
-bu3re
-bus5ie
-buss4e
-5bust
-4buta
-3butio
-b5uto
-b1v
-4b5w
-5by.
-bys4
-1ca
-cab3in
-ca1bl
-cach4
-ca5den
-4cag4
-2c5ah
-ca3lat
-cal4la
-call5in
-4calo
-can5d
-can4e
-can4ic
-can5is
-can3iz
-can4ty
-cany4
-ca5per
-car5om
-cast5er
-cas5tig
-4casy
-ca4th
-4cativ
-cav5al
-c3c
-ccha5
-cci4a
-ccompa5
-ccon4
-ccou3t
-2ce.
-4ced.
-4ceden
-3cei
-5cel.
-3cell
-1cen
-3cenc
-2cen4e
-4ceni
-3cent
-3cep
-ce5ram
-4cesa
-3cessi
-ces5si5b
-ces5t
-cet4
-c5e4ta
-cew4
-2ch
-4ch.
-4ch3ab
-5chanic
-ch5a5nis
-che2
-cheap3
-4ched
-che5lo
-3chemi
-ch5ene
-ch3er.
-ch3ers
-4ch1in
-5chine.
-ch5iness
-5chini
-5chio
-3chit
-chi2z
-3cho2
-ch4ti
-1ci
-3cia
-ci2a5b
-cia5r
-ci5c
-4cier
-5cific.
-4cii
-ci4la
-3cili
-2cim
-2cin
-c4ina
-3cinat
-cin3em
-c1ing
-c5ing.
-5cino
-cion4
-4cipe
-ci3ph
-4cipic
-4cista
-4cisti
-2c1it
-cit3iz
-5ciz
-ck1
-ck3i
-1c4l4
-4clar
-c5laratio
-5clare
-cle4m
-4clic
-clim4
-cly4
-c5n
-1co
-co5ag
-coe2
-2cog
-co4gr
-coi4
-co3inc
-col5i
-5colo
-col3or
-com5er
-con4a
-c4one
-con3g
-con5t
-co3pa
-cop3ic
-co4pl
-4corb
-coro3n
-cos4e
-cov1
-cove4
-cow5a
-coz5e
-co5zi
-c1q
-cras5t
-5crat.
-5cratic
-cre3at
-5cred
-4c3reta
-cre4v
-cri2
-cri5f
-c4rin
-cris4
-5criti
-cro4pl
-crop5o
-cros4e
-cru4d
-4c3s2
-2c1t
-cta4b
-ct5ang
-c5tant
-c2te
-c3ter
-c4ticu
-ctim3i
-ctu4r
-c4tw
-cud5
-c4uf
-c4ui
-cu5ity
-5culi
-cul4tis
-3cultu
-cu2ma
-c3ume
-cu4mi
-3cun
-cu3pi
-cu5py
-cur5a4b
-cu5ria
-1cus
-cuss4i
-3c4ut
-cu4tie
-4c5utiv
-4cutr
-1cy
-cze4
-1d2a
-5da.
-2d3a4b
-dach4
-4daf
-2dag
-da2m2
-dan3g
-dard5
-dark5
-4dary
-3dat
-4dativ
-4dato
-5dav4
-dav5e
-5day
-d1b
-d5c
-d1d4
-2de.
-deaf5
-deb5it
-de4bon
-decan4
-de4cil
-de5com
-2d1ed
-4dee.
-de5if
-deli4e
-del5i5q
-de5lo
-d4em
-5dem.
-3demic
-dem5ic.
-de5mil
-de4mons
-demor5
-1den
-de4nar
-de3no
-denti5f
-de3nu
-de1p
-de3pa
-depi4
-de2pu
-d3eq
-d4erh
-5derm
-dern5iz
-der5s
-des2
-d2es.
-de1sc
-de2s5o
-des3ti
-de3str
-de4su
-de1t
-de2to
-de1v
-dev3il
-4dey
-4d1f
-d4ga
-d3ge4t
-dg1i
-d2gy
-d1h2
-5di.
-1d4i3a
-dia5b
-di4cam
-d4ice
-3dict
-3did
-5di3en
-d1if
-di3ge
-di4lato
-d1in
-1dina
-3dine.
-5dini
-di5niz
-1dio
-dio5g
-di4pl
-dir2
-di1re
-dirt5i
-dis1
-5disi
-d4is3t
-d2iti
-1di1v
-d1j
-d5k2
-4d5la
-3dle.
-3dled
-3dles.
-4dless
-2d3lo
-4d5lu
-2dly
-d1m
-4d1n4
-1do
-3do.
-do5de
-5doe
-2d5of
-d4og
-do4la
-doli4
-do5lor
-dom5iz
-do3nat
-doni4
-doo3d
-dop4p
-d4or
-3dos
-4d5out
-do4v
-3dox
-d1p
-1dr
-drag5on
-4drai
-dre4
-drea5r
-5dren
-dri4b
-dril4
-dro4p
-4drow
-5drupli
-4dry
-2d1s2
-ds4p
-d4sw
-d4sy
-d2th
-1du
-d1u1a
-du2c
-d1uca
-duc5er
-4duct.
-4ducts
-du5el
-du4g
-d3ule
-dum4be
-du4n
-4dup
-du4pe
-d1v
-d1w
-d2y
-5dyn
-dy4se
-dys5p
-e1a4b
-e3act
-ead1
-ead5ie
-ea4ge
-ea5ger
-ea4l
-eal5er
-eal3ou
-eam3er
-e5and
-ear3a
-ear4c
-ear5es
-ear4ic
-ear4il
-ear5k
-ear2t
-eart3e
-ea5sp
-e3ass
-east3
-ea2t
-eat5en
-eath3i
-e5atif
-e4a3tu
-ea2v
-eav3en
-eav5i
-eav5o
-2e1b
-e4bel.
-e4bels
-e4ben
-e4bit
-e3br
-e4cad
-ecan5c
-ecca5
-e1ce
-ec5essa
-ec2i
-e4cib
-ec5ificat
-ec5ifie
-ec5ify
-ec3im
-eci4t
-e5cite
-e4clam
-e4clus
-e2col
-e4comm
-e4compe
-e4conc
-e2cor
-ec3ora
-eco5ro
-e1cr
-e4crem
-ec4tan
-ec4te
-e1cu
-e4cul
-ec3ula
-2e2da
-4ed3d
-e4d1er
-ede4s
-4edi
-e3dia
-ed3ib
-ed3ica
-ed3im
-ed1it
-edi5z
-4edo
-e4dol
-edon2
-e4dri
-e4dul
-ed5ulo
-ee2c
-eed3i
-ee2f
-eel3i
-ee4ly
-ee2m
-ee4na
-ee4p1
-ee2s4
-eest4
-ee4ty
-e5ex
-e1f
-e4f3ere
-1eff
-e4fic
-5efici
-efil4
-e3fine
-ef5i5nite
-3efit
-efor5es
-e4fuse.
-4egal
-eger4
-eg5ib
-eg4ic
-eg5ing
-e5git5
-eg5n
-e4go.
-e4gos
-eg1ul
-e5gur
-5egy
-e1h4
-eher4
-ei2
-e5ic
-ei5d
-eig2
-ei5gl
-e3imb
-e3inf
-e1ing
-e5inst
-eir4d
-eit3e
-ei3th
-e5ity
-e1j
-e4jud
-ej5udi
-eki4n
-ek4la
-e1la
-e4la.
-e4lac
-elan4d
-el5ativ
-e4law
-elaxa4
-e3lea
-el5ebra
-5elec
-e4led
-el3ega
-e5len
-e4l1er
-e1les
-el2f
-el2i
-e3libe
-e4l5ic.
-el3ica
-e3lier
-el5igib
-e5lim
-e4l3ing
-e3lio
-e2lis
-el5ish
-e3liv3
-4ella
-el4lab
-ello4
-e5loc
-el5og
-el3op.
-el2sh
-el4ta
-e5lud
-el5ug
-e4mac
-e4mag
-e5man
-em5ana
-em5b
-e1me
-e2mel
-e4met
-em3ica
-emi4e
-em5igra
-em1in2
-em5ine
-em3i3ni
-e4mis
-em5ish
-e5miss
-em3iz
-5emniz
-emo4g
-emoni5o
-em3pi
-e4mul
-em5ula
-emu3n
-e3my
-en5amo
-e4nant
-ench4er
-en3dic
-e5nea
-e5nee
-en3em
-en5ero
-en5esi
-en5est
-en3etr
-e3new
-en5ics
-e5nie
-e5nil
-e3nio
-en3ish
-en3it
-e5niu
-5eniz
-4enn
-4eno
-eno4g
-e4nos
-en3ov
-en4sw
-ent5age
-4enthes
-en3ua
-en5uf
-e3ny.
-4en3z
-e5of
-eo2g
-e4oi4
-e3ol
-eop3ar
-e1or
-eo3re
-eo5rol
-eos4
-e4ot
-eo4to
-e5out
-e5ow
-e2pa
-e3pai
-ep5anc
-e5pel
-e3pent
-ep5etitio
-ephe4
-e4pli
-e1po
-e4prec
-ep5reca
-e4pred
-ep3reh
-e3pro
-e4prob
-ep4sh
-ep5ti5b
-e4put
-ep5uta
-e1q
-equi3l
-e4q3ui3s
-er1a
-era4b
-4erand
-er3ar
-4erati.
-2erb
-er4bl
-er3ch
-er4che
-2ere.
-e3real
-ere5co
-ere3in
-er5el.
-er3emo
-er5ena
-er5ence
-4erene
-er3ent
-ere4q
-er5ess
-er3est
-eret4
-er1h
-er1i
-e1ria4
-5erick
-e3rien
-eri4er
-er3ine
-e1rio
-4erit
-er4iu
-eri4v
-e4riva
-er3m4
-er4nis
-4ernit
-5erniz
-er3no
-2ero
-er5ob
-e5roc
-ero4r
-er1ou
-er1s
-er3set
-ert3er
-4ertl
-er3tw
-4eru
-eru4t
-5erwau
-e1s4a
-e4sage.
-e4sages
-es2c
-e2sca
-es5can
-e3scr
-es5cu
-e1s2e
-e2sec
-es5ecr
-es5enc
-e4sert.
-e4serts
-e4serva
-4esh
-e3sha
-esh5en
-e1si
-e2sic
-e2sid
-es5iden
-es5igna
-e2s5im
-es4i4n
-esis4te
-esi4u
-e5skin
-es4mi
-e2sol
-es3olu
-e2son
-es5ona
-e1sp
-es3per
-es5pira
-es4pre
-2ess
-es4si4b
-estan4
-es3tig
-es5tim
-4es2to
-e3ston
-2estr
-e5stro
-estruc5
-e2sur
-es5urr
-es4w
-eta4b
-eten4d
-e3teo
-ethod3
-et1ic
-e5tide
-etin4
-eti4no
-e5tir
-e5titio
-et5itiv
-4etn
-et5ona
-e3tra
-e3tre
-et3ric
-et5rif
-et3rog
-et5ros
-et3ua
-et5ym
-et5z
-4eu
-e5un
-e3up
-eu3ro
-eus4
-eute4
-euti5l
-eu5tr
-eva2p5
-e2vas
-ev5ast
-e5vea
-ev3ell
-evel3o
-e5veng
-even4i
-ev1er
-e5verb
-e1vi
-ev3id
-evi4l
-e4vin
-evi4v
-e5voc
-e5vu
-e1wa
-e4wag
-e5wee
-e3wh
-ewil5
-ew3ing
-e3wit
-1exp
-5eyc
-5eye.
-eys4
-1fa
-fa3bl
-fab3r
-fa4ce
-4fag
-fain4
-fall5e
-4fa4ma
-fam5is
-5far
-far5th
-fa3ta
-fa3the
-4fato
-fault5
-4f5b
-4fd
-4fe.
-feas4
-feath3
-fe4b
-4feca
-5fect
-2fed
-fe3li
-fe4mo
-fen2d
-fend5e
-fer1
-5ferr
-fev4
-4f1f
-f4fes
-f4fie
-f5fin.
-f2f5is
-f4fly
-f2fy
-4fh
-1fi
-fi3a
-2f3ic.
-4f3ical
-f3ican
-4ficate
-f3icen
-fi3cer
-fic4i
-5ficia
-5ficie
-4fics
-fi3cu
-fi5del
-fight5
-fil5i
-fill5in
-4fily
-2fin
-5fina
-fin2d5
-fi2ne
-f1in3g
-fin4n
-fis4ti
-f4l2
-f5less
-flin4
-flo3re
-f2ly5
-4fm
-4fn
-1fo
-5fon
-fon4de
-fon4t
-fo2r
-fo5rat
-for5ay
-fore5t
-for4i
-fort5a
-fos5
-4f5p
-fra4t
-f5rea
-fres5c
-fri2
-fril4
-frol5
-2f3s
-2ft
-f4to
-f2ty
-3fu
-fu5el
-4fug
-fu4min
-fu5ne
-fu3ri
-fusi4
-fus4s
-4futa
-1fy
-1ga
-gaf4
-5gal.
-3gali
-ga3lo
-2gam
-ga5met
-g5amo
-gan5is
-ga3niz
-gani5za
-4gano
-gar5n4
-gass4
-gath3
-4gativ
-4gaz
-g3b
-gd4
-2ge.
-2ged
-geez4
-gel4in
-ge5lis
-ge5liz
-4gely
-1gen
-ge4nat
-ge5niz
-4geno
-4geny
-1geo
-ge3om
-g4ery
-5gesi
-geth5
-4geto
-ge4ty
-ge4v
-4g1g2
-g2ge
-g3ger
-gglu5
-ggo4
-gh3in
-gh5out
-gh4to
-5gi.
-1gi4a
-gia5r
-g1ic
-5gicia
-g4ico
-gien5
-5gies.
-gil4
-g3imen
-3g4in.
-gin5ge
-5g4ins
-5gio
-3gir
-gir4l
-g3isl
-gi4u
-5giv
-3giz
-gl2
-gla4
-glad5i
-5glas
-1gle
-gli4b
-g3lig
-3glo
-glo3r
-g1m
-g4my
-gn4a
-g4na.
-gnet4t
-g1ni
-g2nin
-g4nio
-g1no
-g4non
-1go
-3go.
-gob5
-5goe
-3g4o4g
-go3is
-gon2
-4g3o3na
-gondo5
-go3ni
-5goo
-go5riz
-gor5ou
-5gos.
-gov1
-g3p
-1gr
-4grada
-g4rai
-gran2
-5graph.
-g5rapher
-5graphic
-4graphy
-4gray
-gre4n
-4gress.
-4grit
-g4ro
-gruf4
-gs2
-g5ste
-gth3
-gu4a
-3guard
-2gue
-5gui5t
-3gun
-3gus
-4gu4t
-g3w
-1gy
-2g5y3n
-gy5ra
-h3ab4l
-hach4
-hae4m
-hae4t
-h5agu
-ha3la
-hala3m
-ha4m
-han4ci
-han4cy
-5hand.
-han4g
-hang5er
-hang5o
-h5a5niz
-han4k
-han4te
-hap3l
-hap5t
-ha3ran
-ha5ras
-har2d
-hard3e
-har4le
-harp5en
-har5ter
-has5s
-haun4
-5haz
-haz3a
-h1b
-1head
-3hear
-he4can
-h5ecat
-h4ed
-he5do5
-he3l4i
-hel4lis
-hel4ly
-h5elo
-hem4p
-he2n
-hena4
-hen5at
-heo5r
-hep5
-h4era
-hera3p
-her4ba
-here5a
-h3ern
-h5erou
-h3ery
-h1es
-he2s5p
-he4t
-het4ed
-heu4
-h1f
-h1h
-hi5an
-hi4co
-high5
-h4il2
-himer4
-h4ina
-hion4e
-hi4p
-hir4l
-hi3ro
-hir4p
-hir4r
-his3el
-his4s
-hith5er
-hi2v
-4hk
-4h1l4
-hlan4
-h2lo
-hlo3ri
-4h1m
-hmet4
-2h1n
-h5odiz
-h5ods
-ho4g
-hoge4
-hol5ar
-3hol4e
-ho4ma
-home3
-hon4a
-ho5ny
-3hood
-hoon4
-hor5at
-ho5ris
-hort3e
-ho5ru
-hos4e
-ho5sen
-hos1p
-1hous
-house3
-hov5el
-4h5p
-4hr4
-hree5
-hro5niz
-hro3po
-4h1s2
-h4sh
-h4tar
-ht1en
-ht5es
-h4ty
-hu4g
-hu4min
-hun5ke
-hun4t
-hus3t4
-hu4t
-h1w
-h4wart
-hy3pe
-hy3ph
-hy2s
-2i1a
-i2al
-iam4
-iam5ete
-i2an
-4ianc
-ian3i
-4ian4t
-ia5pe
-iass4
-i4ativ
-ia4tric
-i4atu
-ibe4
-ib3era
-ib5ert
-ib5ia
-ib3in
-ib5it.
-ib5ite
-i1bl
-ib3li
-i5bo
-i1br
-i2b5ri
-i5bun
-4icam
-5icap
-4icar
-i4car.
-i4cara
-icas5
-i4cay
-iccu4
-4iceo
-4ich
-2ici
-i5cid
-ic5ina
-i2cip
-ic3ipa
-i4cly
-i2c5oc
-4i1cr
-5icra
-i4cry
-ic4te
-ictu2
-ic4t3ua
-ic3ula
-ic4um
-ic5uo
-i3cur
-2id
-i4dai
-id5anc
-id5d
-ide3al
-ide4s
-i2di
-id5ian
-idi4ar
-i5die
-id3io
-idi5ou
-id1it
-id5iu
-i3dle
-i4dom
-id3ow
-i4dr
-i2du
-id5uo
-2ie4
-ied4e
-5ie5ga
-ield3
-ien5a4
-ien4e
-i5enn
-i3enti
-i1er.
-i3esc
-i1est
-i3et
-4if.
-if5ero
-iff5en
-if4fr
-4ific.
-i3fie
-i3fl
-4ift
-2ig
-iga5b
-ig3era
-ight3i
-4igi
-i3gib
-ig3il
-ig3in
-ig3it
-i4g4l
-i2go
-ig3or
-ig5ot
-i5gre
-igu5i
-ig1ur
-i3h
-4i5i4
-i3j
-4ik
-i1la
-il3a4b
-i4lade
-i2l5am
-ila5ra
-i3leg
-il1er
-ilev4
-il5f
-il1i
-il3ia
-il2ib
-il3io
-il4ist
-2ilit
-il2iz
-ill5ab
-4iln
-il3oq
-il4ty
-il5ur
-il3v
-i4mag
-im3age
-ima5ry
-imenta5r
-4imet
-im1i
-im5ida
-imi5le
-i5mini
-4imit
-im4ni
-i3mon
-i2mu
-im3ula
-2in.
-i4n3au
-4inav
-incel4
-in3cer
-4ind
-in5dling
-2ine
-i3nee
-iner4ar
-i5ness
-4inga
-4inge
-in5gen
-4ingi
-in5gling
-4ingo
-4ingu
-2ini
-i5ni.
-i4nia
-in3io
-in1is
-i5nite.
-5initio
-in3ity
-4ink
-4inl
-2inn
-2i1no
-i4no4c
-ino4s
-i4not
-2ins
-in3se
-insur5a
-2int.
-2in4th
-in1u
-i5nus
-4iny
-2io
-4io.
-ioge4
-io2gr
-i1ol
-io4m
-ion3at
-ion4ery
-ion3i
-io5ph
-ior3i
-i4os
-io5th
-i5oti
-io4to
-i4our
-2ip
-ipe4
-iphras4
-ip3i
-ip4ic
-ip4re4
-ip3ul
-i3qua
-iq5uef
-iq3uid
-iq3ui3t
-4ir
-i1ra
-ira4b
-i4rac
-ird5e
-ire4de
-i4ref
-i4rel4
-i4res
-ir5gi
-ir1i
-iri5de
-ir4is
-iri3tu
-5i5r2iz
-ir4min
-iro4g
-5iron.
-ir5ul
-2is.
-is5ag
-is3ar
-isas5
-2is1c
-is3ch
-4ise
-is3er
-3isf
-is5han
-is3hon
-ish5op
-is3ib
-isi4d
-i5sis
-is5itiv
-4is4k
-islan4
-4isms
-i2so
-iso5mer
-is1p
-is2pi
-is4py
-4is1s
-is4sal
-issen4
-is4ses
-is4ta.
-is1te
-is1ti
-ist4ly
-4istral
-i2su
-is5us
-4ita.
-ita4bi
-i4tag
-4ita5m
-i3tan
-i3tat
-2ite
-it3era
-i5teri
-it4es
-2ith
-i1ti
-4itia
-4i2tic
-it3ica
-5i5tick
-it3ig
-it5ill
-i2tim
-2itio
-4itis
-i4tism
-i2t5o5m
-4iton
-i4tram
-it5ry
-4itt
-it3uat
-i5tud
-it3ul
-4itz.
-i1u
-2iv
-iv3ell
-iv3en.
-i4v3er.
-i4vers.
-iv5il.
-iv5io
-iv1it
-i5vore
-iv3o3ro
-i4v3ot
-4i5w
-ix4o
-4iy
-4izar
-izi4
-5izont
-5ja
-jac4q
-ja4p
-1je
-jer5s
-4jestie
-4jesty
-jew3
-jo4p
-5judg
-3ka.
-k3ab
-k5ag
-kais4
-kal4
-k1b
-k2ed
-1kee
-ke4g
-ke5li
-k3en4d
-k1er
-kes4
-k3est.
-ke4ty
-k3f
-kh4
-k1i
-5ki.
-5k2ic
-k4ill
-kilo5
-k4im
-k4in.
-kin4de
-k5iness
-kin4g
-ki4p
-kis4
-k5ish
-kk4
-k1l
-4kley
-4kly
-k1m
-k5nes
-1k2no
-ko5r
-kosh4
-k3ou
-kro5n
-4k1s2
-k4sc
-ks4l
-k4sy
-k5t
-k1w
-lab3ic
-l4abo
-laci4
-l4ade
-la3dy
-lag4n
-lam3o
-3land
-lan4dl
-lan5et
-lan4te
-lar4g
-lar3i
-las4e
-la5tan
-4lateli
-4lativ
-4lav
-la4v4a
-2l1b
-lbin4
-4l1c2
-lce4
-l3ci
-2ld
-l2de
-ld4ere
-ld4eri
-ldi4
-ld5is
-l3dr
-l4dri
-le2a
-le4bi
-left5
-5leg.
-5legg
-le4mat
-lem5atic
-4len.
-3lenc
-5lene.
-1lent
-le3ph
-le4pr
-lera5b
-ler4e
-3lerg
-3l4eri
-l4ero
-les2
-le5sco
-5lesq
-3less
-5less.
-l3eva
-lev4er.
-lev4era
-lev4ers
-3ley
-4leye
-2lf
-l5fr
-4l1g4
-l5ga
-lgar3
-l4ges
-lgo3
-2l3h
-li4ag
-li2am
-liar5iz
-li4as
-li4ato
-li5bi
-5licio
-li4cor
-4lics
-4lict.
-l4icu
-l3icy
-l3ida
-lid5er
-3lidi
-lif3er
-l4iff
-li4fl
-5ligate
-3ligh
-li4gra
-3lik
-4l4i4l
-lim4bl
-lim3i
-li4mo
-l4im4p
-l4ina
-1l4ine
-lin3ea
-lin3i
-link5er
-li5og
-4l4iq
-lis4p
-l1it
-l2it.
-5litica
-l5i5tics
-liv3er
-l1iz
-4lj
-lka3
-l3kal
-lka4t
-l1l
-l4law
-l2le
-l5lea
-l3lec
-l3leg
-l3lel
-l3le4n
-l3le4t
-ll2i
-l2lin4
-l5lina
-ll4o
-lloqui5
-ll5out
-l5low
-2lm
-l5met
-lm3ing
-l4mod
-lmon4
-2l1n2
-3lo.
-lob5al
-lo4ci
-4lof
-3logic
-l5ogo
-3logu
-lom3er
-5long
-lon4i
-l3o3niz
-lood5
-5lope.
-lop3i
-l3opm
-lora4
-lo4rato
-lo5rie
-lor5ou
-5los.
-los5et
-5losophiz
-5losophy
-los4t
-lo4ta
-loun5d
-2lout
-4lov
-2lp
-lpa5b
-l3pha
-l5phi
-lp5ing
-l3pit
-l4pl
-l5pr
-4l1r
-2l1s2
-l4sc
-l2se
-l4sie
-4lt
-lt5ag
-ltane5
-l1te
-lten4
-ltera4
-lth3i
-l5ties.
-ltis4
-l1tr
-ltu2
-ltur3a
-lu5a
-lu3br
-luch4
-lu3ci
-lu3en
-luf4
-lu5id
-lu4ma
-5lumi
-l5umn.
-5lumnia
-lu3o
-luo3r
-4lup
-luss4
-lus3te
-1lut
-l5ven
-l5vet4
-2l1w
-1ly
-4lya
-4lyb
-ly5me
-ly3no
-2lys4
-l5yse
-1ma
-2mab
-ma2ca
-ma5chine
-ma4cl
-mag5in
-5magn
-2mah
-maid5
-4mald
-ma3lig
-ma5lin
-mal4li
-mal4ty
-5mania
-man5is
-man3iz
-4map
-ma5rine.
-ma5riz
-mar4ly
-mar3v
-ma5sce
-mas4e
-mas1t
-5mate
-math3
-ma3tis
-4matiza
-4m1b
-mba4t5
-m5bil
-m4b3ing
-mbi4v
-4m5c
-4me.
-2med
-4med.
-5media
-me3die
-m5e5dy
-me2g
-mel5on
-mel4t
-me2m
-mem1o3
-1men
-men4a
-men5ac
-men4de
-4mene
-men4i
-mens4
-mensu5
-3ment
-men4te
-me5on
-m5ersa
-2mes
-3mesti
-me4ta
-met3al
-me1te
-me5thi
-m4etr
-5metric
-me5trie
-me3try
-me4v
-4m1f
-2mh
-5mi.
-mi3a
-mid4a
-mid4g
-mig4
-3milia
-m5i5lie
-m4ill
-min4a
-3mind
-m5inee
-m4ingl
-min5gli
-m5ingly
-min4t
-m4inu
-miot4
-m2is
-mis4er.
-mis5l
-mis4ti
-m5istry
-4mith
-m2iz
-4mk
-4m1l
-m1m
-mma5ry
-4m1n
-mn4a
-m4nin
-mn4o
-1mo
-4mocr
-5mocratiz
-mo2d1
-mo4go
-mois2
-moi5se
-4mok
-mo5lest
-mo3me
-mon5et
-mon5ge
-moni3a
-mon4ism
-mon4ist
-mo3niz
-monol4
-mo3ny.
-mo2r
-4mora.
-mos2
-mo5sey
-mo3sp
-moth3
-m5ouf
-3mous
-mo2v
-4m1p
-mpara5
-mpa5rab
-mpar5i
-m3pet
-mphas4
-m2pi
-mpi4a
-mp5ies
-m4p1in
-m5pir
-mp5is
-mpo3ri
-mpos5ite
-m4pous
-mpov5
-mp4tr
-m2py
-4m3r
-4m1s2
-m4sh
-m5si
-4mt
-1mu
-mula5r4
-5mult
-multi3
-3mum
-mun2
-4mup
-mu4u
-4mw
-1na
-2n1a2b
-n4abu
-4nac.
-na4ca
-n5act
-nag5er.
-nak4
-na4li
-na5lia
-4nalt
-na5mit
-n2an
-nanci4
-nan4it
-nank4
-nar3c
-4nare
-nar3i
-nar4l
-n5arm
-n4as
-nas4c
-nas5ti
-n2at
-na3tal
-nato5miz
-n2au
-nau3se
-3naut
-nav4e
-4n1b4
-ncar5
-n4ces.
-n3cha
-n5cheo
-n5chil
-n3chis
-nc1in
-nc4it
-ncour5a
-n1cr
-n1cu
-n4dai
-n5dan
-n1de
-nd5est.
-ndi4b
-n5d2if
-n1dit
-n3diz
-n5duc
-ndu4r
-nd2we
-2ne.
-n3ear
-ne2b
-neb3u
-ne2c
-5neck
-2ned
-ne4gat
-neg5ativ
-5nege
-ne4la
-nel5iz
-ne5mi
-ne4mo
-1nen
-4nene
-3neo
-ne4po
-ne2q
-n1er
-nera5b
-n4erar
-n2ere
-n4er5i
-ner4r
-1nes
-2nes.
-4nesp
-2nest
-4nesw
-3netic
-ne4v
-n5eve
-ne4w
-n3f
-n4gab
-n3gel
-nge4n4e
-n5gere
-n3geri
-ng5ha
-n3gib
-ng1in
-n5git
-n4gla
-ngov4
-ng5sh
-n1gu
-n4gum
-n2gy
-4n1h4
-nha4
-nhab3
-nhe4
-3n4ia
-ni3an
-ni4ap
-ni3ba
-ni4bl
-ni4d
-ni5di
-ni4er
-ni2fi
-ni5ficat
-n5igr
-nik4
-n1im
-ni3miz
-n1in
-5nine.
-nin4g
-ni4o
-5nis.
-nis4ta
-n2it
-n4ith
-3nitio
-n3itor
-ni3tr
-n1j
-4nk2
-n5kero
-n3ket
-nk3in
-n1kl
-4n1l
-n5m
-nme4
-nmet4
-4n1n2
-nne4
-nni3al
-nni4v
-nob4l
-no3ble
-n5ocl
-4n3o2d
-3noe
-4nog
-noge4
-nois5i
-no5l4i
-5nologis
-3nomic
-n5o5miz
-no4mo
-no3my
-no4n
-non4ag
-non5i
-n5oniz
-4nop
-5nop5o5li
-nor5ab
-no4rary
-4nosc
-nos4e
-nos5t
-no5ta
-1nou
-3noun
-nov3el3
-nowl3
-n1p4
-npi4
-npre4c
-n1q
-n1r
-nru4
-2n1s2
-ns5ab
-nsati4
-ns4c
-n2se
-n4s3es
-nsid1
-nsig4
-n2sl
-ns3m
-n4soc
-ns4pe
-n5spi
-nsta5bl
-n1t
-nta4b
-nter3s
-nt2i
-n5tib
-nti4er
-nti2f
-n3tine
-n4t3ing
-nti4p
-ntrol5li
-nt4s
-ntu3me
-nu1a
-nu4d
-nu5en
-nuf4fe
-n3uin
-3nu3it
-n4um
-nu1me
-n5umi
-3nu4n
-n3uo
-nu3tr
-n1v2
-n1w4
-nym4
-nyp4
-4nz
-n3za
-4oa
-oad3
-o5a5les
-oard3
-oas4e
-oast5e
-oat5i
-ob3a3b
-o5bar
-obe4l
-o1bi
-o2bin
-ob5ing
-o3br
-ob3ul
-o1ce
-och4
-o3chet
-ocif3
-o4cil
-o4clam
-o4cod
-oc3rac
-oc5ratiz
-ocre3
-5ocrit
-octor5a
-oc3ula
-o5cure
-od5ded
-od3ic
-odi3o
-o2do4
-odor3
-od5uct.
-od5ucts
-o4el
-o5eng
-o3er
-oe4ta
-o3ev
-o2fi
-of5ite
-ofit4t
-o2g5a5r
-og5ativ
-o4gato
-o1ge
-o5gene
-o5geo
-o4ger
-o3gie
-1o1gis
-og3it
-o4gl
-o5g2ly
-3ogniz
-o4gro
-ogu5i
-1ogy
-2ogyn
-o1h2
-ohab5
-oi2
-oic3es
-oi3der
-oiff4
-oig4
-oi5let
-o3ing
-oint5er
-o5ism
-oi5son
-oist5en
-oi3ter
-o5j
-2ok
-o3ken
-ok5ie
-o1la
-o4lan
-olass4
-ol2d
-old1e
-ol3er
-o3lesc
-o3let
-ol4fi
-ol2i
-o3lia
-o3lice
-ol5id.
-o3li4f
-o5lil
-ol3ing
-o5lio
-o5lis.
-ol3ish
-o5lite
-o5litio
-o5liv
-olli4e
-ol5ogiz
-olo4r
-ol5pl
-ol2t
-ol3ub
-ol3ume
-ol3un
-o5lus
-ol2v
-o2ly
-om5ah
-oma5l
-om5atiz
-om2be
-om4bl
-o2me
-om3ena
-om5erse
-o4met
-om5etry
-o3mia
-om3ic.
-om3ica
-o5mid
-om1in
-o5mini
-5ommend
-omo4ge
-o4mon
-om3pi
-ompro5
-o2n
-on1a
-on4ac
-o3nan
-on1c
-3oncil
-2ond
-on5do
-o3nen
-on5est
-on4gu
-on1ic
-o3nio
-on1is
-o5niu
-on3key
-on4odi
-on3omy
-on3s
-onspi4
-onspir5a
-onsu4
-onten4
-on3t4i
-ontif5
-on5um
-onva5
-oo2
-ood5e
-ood5i
-oo4k
-oop3i
-o3ord
-oost5
-o2pa
-ope5d
-op1er
-3opera
-4operag
-2oph
-o5phan
-o5pher
-op3ing
-o3pit
-o5pon
-o4posi
-o1pr
-op1u
-opy5
-o1q
-o1ra
-o5ra.
-o4r3ag
-or5aliz
-or5ange
-ore5a
-o5real
-or3ei
-ore5sh
-or5est.
-orew4
-or4gu
-4o5ria
-or3ica
-o5ril
-or1in
-o1rio
-or3ity
-o3riu
-or2mi
-orn2e
-o5rof
-or3oug
-or5pe
-3orrh
-or4se
-ors5en
-orst4
-or3thi
-or3thy
-or4ty
-o5rum
-o1ry
-os3al
-os2c
-os4ce
-o3scop
-4oscopi
-o5scr
-os4i4e
-os5itiv
-os3ito
-os3ity
-osi4u
-os4l
-o2so
-os4pa
-os4po
-os2ta
-o5stati
-os5til
-os5tit
-o4tan
-otele4g
-ot3er.
-ot5ers
-o4tes
-4oth
-oth5esi
-oth3i4
-ot3ic.
-ot5ica
-o3tice
-o3tif
-o3tis
-oto5s
-ou2
-ou3bl
-ouch5i
-ou5et
-ou4l
-ounc5er
-oun2d
-ou5v
-ov4en
-over4ne
-over3s
-ov4ert
-o3vis
-oviti4
-o5v4ol
-ow3der
-ow3el
-ow5est
-ow1i
-own5i
-o4wo
-oy1a
-1pa
-pa4ca
-pa4ce
-pac4t
-p4ad
-5pagan
-p3agat
-p4ai
-pain4
-p4al
-pan4a
-pan3el
-pan4ty
-pa3ny
-pa1p
-pa4pu
-para5bl
-par5age
-par5di
-3pare
-par5el
-p4a4ri
-par4is
-pa2te
-pa5ter
-5pathic
-pa5thy
-pa4tric
-pav4
-3pay
-4p1b
-pd4
-4pe.
-3pe4a
-pear4l
-pe2c
-2p2ed
-3pede
-3pedi
-pedia4
-ped4ic
-p4ee
-pee4d
-pek4
-pe4la
-peli4e
-pe4nan
-p4enc
-pen4th
-pe5on
-p4era.
-pera5bl
-p4erag
-p4eri
-peri5st
-per4mal
-perme5
-p4ern
-per3o
-per3ti
-pe5ru
-per1v
-pe2t
-pe5ten
-pe5tiz
-4pf
-4pg
-4ph.
-phar5i
-phe3no
-ph4er
-ph4es.
-ph1ic
-5phie
-ph5ing
-5phisti
-3phiz
-ph2l
-3phob
-3phone
-5phoni
-pho4r
-4phs
-ph3t
-5phu
-1phy
-pi3a
-pian4
-pi4cie
-pi4cy
-p4id
-p5ida
-pi3de
-5pidi
-3piec
-pi3en
-pi4grap
-pi3lo
-pi2n
-p4in.
-pind4
-p4ino
-3pi1o
-pion4
-p3ith
-pi5tha
-pi2tu
-2p3k2
-1p2l2
-3plan
-plas5t
-pli3a
-pli5er
-4plig
-pli4n
-ploi4
-plu4m
-plum4b
-4p1m
-2p3n
-po4c
-5pod.
-po5em
-po3et5
-5po4g
-poin2
-5point
-poly5t
-po4ni
-po4p
-1p4or
-po4ry
-1pos
-pos1s
-p4ot
-po4ta
-5poun
-4p1p
-ppa5ra
-p2pe
-p4ped
-p5pel
-p3pen
-p3per
-p3pet
-ppo5site
-pr2
-pray4e
-5preci
-pre5co
-pre3em
-pref5ac
-pre4la
-pre3r
-p3rese
-3press
-pre5ten
-pre3v
-5pri4e
-prin4t3
-pri4s
-pris3o
-p3roca
-prof5it
-pro3l
-pros3e
-pro1t
-2p1s2
-p2se
-ps4h
-p4sib
-2p1t
-pt5a4b
-p2te
-p2th
-pti3m
-ptu4r
-p4tw
-pub3
-pue4
-puf4
-pul3c
-pu4m
-pu2n
-pur4r
-5pus
-pu2t
-5pute
-put3er
-pu3tr
-put4ted
-put4tin
-p3w
-qu2
-qua5v
-2que.
-3quer
-3quet
-2rab
-ra3bi
-rach4e
-r5acl
-raf5fi
-raf4t
-r2ai
-ra4lo
-ram3et
-r2ami
-rane5o
-ran4ge
-r4ani
-ra5no
-rap3er
-3raphy
-rar5c
-rare4
-rar5ef
-4raril
-r2as
-ration4
-rau4t
-ra5vai
-rav3el
-ra5zie
-r1b
-r4bab
-r4bag
-rbi2
-rbi4f
-r2bin
-r5bine
-rb5ing.
-rb4o
-r1c
-r2ce
-rcen4
-r3cha
-rch4er
-r4ci4b
-rc4it
-rcum3
-r4dal
-rd2i
-rdi4a
-rdi4er
-rdin4
-rd3ing
-2re.
-re1al
-re3an
-re5arr
-5reav
-re4aw
-r5ebrat
-rec5oll
-rec5ompe
-re4cre
-2r2ed
-re1de
-re3dis
-red5it
-re4fac
-re2fe
-re5fer.
-re3fi
-re4fy
-reg3is
-re5it
-re1li
-re5lu
-r4en4ta
-ren4te
-re1o
-re5pin
-re4posi
-re1pu
-r1er4
-r4eri
-rero4
-re5ru
-r4es.
-re4spi
-ress5ib
-res2t
-re5stal
-re3str
-re4ter
-re4ti4z
-re3tri
-reu2
-re5uti
-rev2
-re4val
-rev3el
-r5ev5er.
-re5vers
-re5vert
-re5vil
-rev5olu
-re4wh
-r1f
-rfu4
-r4fy
-rg2
-rg3er
-r3get
-r3gic
-rgi4n
-rg3ing
-r5gis
-r5git
-r1gl
-rgo4n
-r3gu
-rh4
-4rh.
-4rhal
-ri3a
-ria4b
-ri4ag
-r4ib
-rib3a
-ric5as
-r4ice
-4rici
-5ricid
-ri4cie
-r4ico
-rid5er
-ri3enc
-ri3ent
-ri1er
-ri5et
-rig5an
-5rigi
-ril3iz
-5riman
-rim5i
-3rimo
-rim4pe
-r2ina
-5rina.
-rin4d
-rin4e
-rin4g
-ri1o
-5riph
-riph5e
-ri2pl
-rip5lic
-r4iq
-r2is
-r4is.
-ris4c
-r3ish
-ris4p
-ri3ta3b
-r5ited.
-rit5er.
-rit5ers
-rit3ic
-ri2tu
-rit5ur
-riv5el
-riv3et
-riv3i
-r3j
-r3ket
-rk4le
-rk4lin
-r1l
-rle4
-r2led
-r4lig
-r4lis
-rl5ish
-r3lo4
-r1m
-rma5c
-r2me
-r3men
-rm5ers
-rm3ing
-r4ming.
-r4mio
-r3mit
-r4my
-r4nar
-r3nel
-r4ner
-r5net
-r3ney
-r5nic
-r1nis4
-r3nit
-r3niv
-rno4
-r4nou
-r3nu
-rob3l
-r2oc
-ro3cr
-ro4e
-ro1fe
-ro5fil
-rok2
-ro5ker
-5role.
-rom5ete
-rom4i
-rom4p
-ron4al
-ron4e
-ro5n4is
-ron4ta
-1room
-5root
-ro3pel
-rop3ic
-ror3i
-ro5ro
-ros5per
-ros4s
-ro4the
-ro4ty
-ro4va
-rov5el
-rox5
-r1p
-r4pea
-r5pent
-rp5er.
-r3pet
-rp4h4
-rp3ing
-r3po
-r1r4
-rre4c
-rre4f
-r4reo
-rre4st
-rri4o
-rri4v
-rron4
-rros4
-rrys4
-4rs2
-r1sa
-rsa5ti
-rs4c
-r2se
-r3sec
-rse4cr
-rs5er.
-rs3es
-rse5v2
-r1sh
-r5sha
-r1si
-r4si4b
-rson3
-r1sp
-r5sw
-rtach4
-r4tag
-r3teb
-rten4d
-rte5o
-r1ti
-rt5ib
-rti4d
-r4tier
-r3tig
-rtil3i
-rtil4l
-r4tily
-r4tist
-r4tiv
-r3tri
-rtroph4
-rt4sh
-ru3a
-ru3e4l
-ru3en
-ru4gl
-ru3in
-rum3pl
-ru2n
-runk5
-run4ty
-r5usc
-ruti5n
-rv4e
-rvel4i
-r3ven
-rv5er.
-r5vest
-r3vey
-r3vic
-rvi4v
-r3vo
-r1w
-ry4c
-5rynge
-ry3t
-sa2
-2s1ab
-5sack
-sac3ri
-s3act
-5sai
-salar4
-sal4m
-sa5lo
-sal4t
-3sanc
-san4de
-s1ap
-sa5ta
-5sa3tio
-sat3u
-sau4
-sa5vor
-5saw
-4s5b
-scan4t5
-sca4p
-scav5
-s4ced
-4scei
-s4ces
-sch2
-s4cho
-3s4cie
-5scin4d
-scle5
-s4cli
-scof4
-4scopy
-scour5a
-s1cu
-4s5d
-4se.
-se4a
-seas4
-sea5w
-se2c3o
-3sect
-4s4ed
-se4d4e
-s5edl
-se2g
-seg3r
-5sei
-se1le
-5self
-5selv
-4seme
-se4mol
-sen5at
-4senc
-sen4d
-s5ened
-sen5g
-s5enin
-4sentd
-4sentl
-sep3a3
-4s1er.
-s4erl
-ser4o
-4servo
-s1e4s
-se5sh
-ses5t
-5se5um
-5sev
-sev3en
-sew4i
-5sex
-4s3f
-2s3g
-s2h
-2sh.
-sh1er
-5shev
-sh1in
-sh3io
-3ship
-shiv5
-sho4
-sh5old
-shon3
-shor4
-short5
-4shw
-si1b
-s5icc
-3side.
-5sides
-5sidi
-si5diz
-4signa
-sil4e
-4sily
-2s1in
-s2ina
-5sine.
-s3ing
-1sio
-5sion
-sion5a
-si2r
-sir5a
-1sis
-3sitio
-5siu
-1siv
-5siz
-sk2
-4ske
-s3ket
-sk5ine
-sk5ing
-s1l2
-s3lat
-s2le
-slith5
-2s1m
-s3ma
-small3
-sman3
-smel4
-s5men
-5smith
-smol5d4
-s1n4
-1so
-so4ce
-soft3
-so4lab
-sol3d2
-so3lic
-5solv
-3som
-3s4on.
-sona4
-son4g
-s4op
-5sophic
-s5ophiz
-s5ophy
-sor5c
-sor5d
-4sov
-so5vi
-2spa
-5spai
-spa4n
-spen4d
-2s5peo
-2sper
-s2phe
-3spher
-spho5
-spil4
-sp5ing
-4spio
-s4ply
-s4pon
-spor4
-4spot
-squal4l
-s1r
-2ss
-s1sa
-ssas3
-s2s5c
-s3sel
-s5seng
-s4ses.
-s5set
-s1si
-s4sie
-ssi4er
-ss5ily
-s4sl
-ss4li
-s4sn
-sspend4
-ss2t
-ssur5a
-ss5w
-2st.
-s2tag
-s2tal
-stam4i
-5stand
-s4ta4p
-5stat.
-s4ted
-stern5i
-s5tero
-ste2w
-stew5a
-s3the
-st2i
-s4ti.
-s5tia
-s1tic
-5stick
-s4tie
-s3tif
-st3ing
-5stir
-s1tle
-5stock
-stom3a
-5stone
-s4top
-3store
-st4r
-s4trad
-5stratu
-s4tray
-s4trid
-4stry
-4st3w
-s2ty
-1su
-su1al
-su4b3
-su2g3
-su5is
-suit3
-s4ul
-su2m
-sum3i
-su2n
-su2r
-4sv
-sw2
-4swo
-s4y
-4syc
-3syl
-syn5o
-sy5rin
-1ta
-3ta.
-2tab
-ta5bles
-5taboliz
-4taci
-ta5do
-4taf4
-tai5lo
-ta2l
-ta5la
-tal5en
-tal3i
-4talk
-tal4lis
-ta5log
-ta5mo
-tan4de
-tanta3
-ta5per
-ta5pl
-tar4a
-4tarc
-4tare
-ta3riz
-tas4e
-ta5sy
-4tatic
-ta4tur
-taun4
-tav4
-2taw
-tax4is
-2t1b
-4tc
-t4ch
-tch5et
-4t1d
-4te.
-tead4i
-4teat
-tece4
-5tect
-2t1ed
-te5di
-1tee
-teg4
-te5ger
-te5gi
-3tel.
-teli4
-5tels
-te2ma2
-tem3at
-3tenan
-3tenc
-3tend
-4tenes
-1tent
-ten4tag
-1teo
-te4p
-te5pe
-ter3c
-5ter3d
-1teri
-ter5ies
-ter3is
-teri5za
-5ternit
-ter5v
-4tes.
-4tess
-t3ess.
-teth5e
-3teu
-3tex
-4tey
-2t1f
-4t1g
-2th.
-than4
-th2e
-4thea
-th3eas
-the5at
-the3is
-3thet
-th5ic.
-th5ica
-4thil
-5think
-4thl
-th5ode
-5thodic
-4thoo
-thor5it
-tho5riz
-2ths
-1tia
-ti4ab
-ti4ato
-2ti2b
-4tick
-t4ico
-t4ic1u
-5tidi
-3tien
-tif2
-ti5fy
-2tig
-5tigu
-till5in
-1tim
-4timp
-tim5ul
-2t1in
-t2ina
-3tine.
-3tini
-1tio
-ti5oc
-tion5ee
-5tiq
-ti3sa
-3tise
-tis4m
-ti5so
-tis4p
-5tistica
-ti3tl
-ti4u
-1tiv
-tiv4a
-1tiz
-ti3za
-ti3zen
-2tl
-t5la
-tlan4
-3tle.
-3tled
-3tles.
-t5let.
-t5lo
-4t1m
-tme4
-2t1n2
-1to
-to3b
-to5crat
-4todo
-2tof
-to2gr
-to5ic
-to2ma
-tom4b
-to3my
-ton4ali
-to3nat
-4tono
-4tony
-to2ra
-to3rie
-tor5iz
-tos2
-5tour
-4tout
-to3war
-4t1p
-1tra
-tra3b
-tra5ch
-traci4
-trac4it
-trac4te
-tras4
-tra5ven
-trav5es5
-tre5f
-tre4m
-trem5i
-5tria
-tri5ces
-5tricia
-4trics
-2trim
-tri4v
-tro5mi
-tron5i
-4trony
-tro5phe
-tro3sp
-tro3v
-tru5i
-trus4
-4t1s2
-t4sc
-tsh4
-t4sw
-4t3t2
-t4tes
-t5to
-ttu4
-1tu
-tu1a
-tu3ar
-tu4bi
-tud2
-4tue
-4tuf4
-5tu3i
-3tum
-tu4nis
-2t3up.
-3ture
-5turi
-tur3is
-tur5o
-tu5ry
-3tus
-4tv
-tw4
-4t1wa
-twis4
-4two
-1ty
-4tya
-2tyl
-type3
-ty5ph
-4tz
-tz4e
-4uab
-uac4
-ua5na
-uan4i
-uar5ant
-uar2d
-uar3i
-uar3t
-u1at
-uav4
-ub4e
-u4bel
-u3ber
-u4bero
-u1b4i
-u4b5ing
-u3ble.
-u3ca
-uci4b
-uc4it
-ucle3
-u3cr
-u3cu
-u4cy
-ud5d
-ud3er
-ud5est
-udev4
-u1dic
-ud3ied
-ud3ies
-ud5is
-u5dit
-u4don
-ud4si
-u4du
-u4ene
-uens4
-uen4te
-uer4il
-3ufa
-u3fl
-ugh3en
-ug5in
-2ui2
-uil5iz
-ui4n
-u1ing
-uir4m
-uita4
-uiv3
-uiv4er.
-u5j
-4uk
-u1la
-ula5b
-u5lati
-ulch4
-5ulche
-ul3der
-ul4e
-u1len
-ul4gi
-ul2i
-u5lia
-ul3ing
-ul5ish
-ul4lar
-ul4li4b
-ul4lis
-4ul3m
-u1l4o
-4uls
-uls5es
-ul1ti
-ultra3
-4ultu
-u3lu
-ul5ul
-ul5v
-um5ab
-um4bi
-um4bly
-u1mi
-u4m3ing
-umor5o
-um2p
-unat4
-u2ne
-un4er
-u1ni
-un4im
-u2nin
-un5ish
-uni3v
-un3s4
-un4sw
-unt3ab
-un4ter.
-un4tes
-unu4
-un5y
-un5z
-u4ors
-u5os
-u1ou
-u1pe
-uper5s
-u5pia
-up3ing
-u3pl
-up3p
-upport5
-upt5ib
-uptu4
-u1ra
-4ura.
-u4rag
-u4ras
-ur4be
-urc4
-ur1d
-ure5at
-ur4fer
-ur4fr
-u3rif
-uri4fic
-ur1in
-u3rio
-u1rit
-ur3iz
-ur2l
-url5ing.
-ur4no
-uros4
-ur4pe
-ur4pi
-urs5er
-ur5tes
-ur3the
-urti4
-ur4tie
-u3ru
-2us
-u5sad
-u5san
-us4ap
-usc2
-us3ci
-use5a
-u5sia
-u3sic
-us4lin
-us1p
-us5sl
-us5tere
-us1tr
-u2su
-usur4
-uta4b
-u3tat
-4ute.
-4utel
-4uten
-uten4i
-4u1t2i
-uti5liz
-u3tine
-ut3ing
-ution5a
-u4tis
-5u5tiz
-u4t1l
-ut5of
-uto5g
-uto5matic
-u5ton
-u4tou
-uts4
-u3u
-uu4m
-u1v2
-uxu3
-uz4e
-1va
-5va.
-2v1a4b
-vac5il
-vac3u
-vag4
-va4ge
-va5lie
-val5o
-val1u
-va5mo
-va5niz
-va5pi
-var5ied
-3vat
-4ve.
-4ved
-veg3
-v3el.
-vel3li
-ve4lo
-v4ely
-ven3om
-v5enue
-v4erd
-5vere.
-v4erel
-v3eren
-ver5enc
-v4eres
-ver3ie
-vermi4n
-3verse
-ver3th
-v4e2s
-4ves.
-ves4te
-ve4te
-vet3er
-ve4ty
-vi5ali
-5vian
-5vide.
-5vided
-4v3iden
-5vides
-5vidi
-v3if
-vi5gn
-vik4
-2vil
-5vilit
-v3i3liz
-v1in
-4vi4na
-v2inc
-vin5d
-4ving
-vio3l
-v3io4r
-vi1ou
-vi4p
-vi5ro
-vis3it
-vi3so
-vi3su
-4viti
-vit3r
-4vity
-3viv
-5vo.
-voi4
-3vok
-vo4la
-v5ole
-5volt
-3volv
-vom5i
-vor5ab
-vori4
-vo4ry
-vo4ta
-4votee
-4vv4
-v4y
-w5abl
-2wac
-wa5ger
-wag5o
-wait5
-w5al.
-wam4
-war4t
-was4t
-wa1te
-wa5ver
-w1b
-wea5rie
-weath3
-wed4n
-weet3
-wee5v
-wel4l
-w1er
-west3
-w3ev
-whi4
-wi2
-wil2
-will5in
-win4de
-win4g
-wir4
-3wise
-with3
-wiz5
-w4k
-wl4es
-wl3in
-w4no
-1wo2
-wom1
-wo5ven
-w5p
-wra4
-wri4
-writa4
-w3sh
-ws4l
-ws4pe
-w5s4t
-4wt
-wy4
-x1a
-xac5e
-x4ago
-xam3
-x4ap
-xas5
-x3c2
-x1e
-xe4cuto
-x2ed
-xer4i
-xe5ro
-x1h
-xhi2
-xhil5
-xhu4
-x3i
-xi5a
-xi5c
-xi5di
-x4ime
-xi5miz
-x3o
-x4ob
-x3p
-xpan4d
-xpecto5
-xpe3d
-x1t2
-x3ti
-x1u
-xu3a
-xx4
-y5ac
-3yar4
-y5at
-y1b
-y1c
-y2ce
-yc5er
-y3ch
-ych4e
-ycom4
-ycot4
-y1d
-y5ee
-y1er
-y4erf
-yes4
-ye4t
-y5gi
-4y3h
-y1i
-y3la
-ylla5bl
-y3lo
-y5lu
-ymbol5
-yme4
-ympa3
-yn3chr
-yn5d
-yn5g
-yn5ic
-5ynx
-y1o4
-yo5d
-y4o5g
-yom4
-yo5net
-y4ons
-y4os
-y4ped
-yper5
-yp3i
-y3po
-y4poc
-yp2ta
-y5pu
-yra5m
-yr5ia
-y3ro
-yr4r
-ys4c
-y3s2e
-ys3ica
-ys3io
-3ysis
-y4so
-yss4
-ys1t
-ys3ta
-ysur4
-y3thin
-yt3ic
-y1w
-za1
-z5a2b
-zar2
-4zb
-2ze
-ze4n
-ze4p
-z1er
-ze3ro
-zet4
-2z1i
-z4il
-z4is
-5zl
-4zm
-1zo
-zo4m
-zo5ol
-zte4
-4z1z2
-z4zy
-Á1Á
-Á1Å
-Á1É
-Á1Ï
-Á1Õ
-Á1Ù
-Á1Ü
-Á1À
-Á1Ñ
-Å1Á
-Å1Å
-Å1É
-Å1Ï
-Å1Õ
-Å1Ù
-Å1Ü
-Å1À
-Å1Ñ
-É1Á
-É1Å
-É1É
-É1Ï
-É1Õ
-É1Ù
-É1Ü
-É1À
-É1Ñ
-Ï1Á
-Ï1Å
-Ï1É
-Ï1Ï
-Ï1Õ
-Ï1Ù
-Ï1Ü
-Ï1À
-Ï1Ñ
-Õ1Á
-Õ1Å
-Õ1É
-Õ1Ï
-Õ1Õ
-Õ1Ù
-Õ1Ü
-Õ1À
-Õ1Ñ
-Ù1Á
-Ù1Å
-Ù1É
-Ù1Ï
-Ù1Õ
-Ù1Ù
-Ù1Ü
-Ù1À
-Ù1Ñ
-Ü1Á
-Ü1Å
-Ü1É
-Ü1Ï
-Ü1Õ
-Ü1Ù
-Ü1Ü
-Ü1À
-Ü1Ñ
-À1Á
-À1Å
-À1É
-À1Ï
-À1Õ
-À1Ù
-À1Ü
-À1À
-À1Ñ
-Ñ1Á
-Ñ1Å
-Ñ1É
-Ñ1Ï
-Ñ1Õ
-Ñ1Ù
-Ñ1Ü
-Ñ1À
-Ñ1Ñ
-.ÂÄ2
-.ÂÌ2
-.ÂÒ2
-.ÂØ2
-.×Â2
-.×ÂÌ2
-.×ÂÒ2
-.××2
-.××Ò2
-.×ÇÌ2
-.×Ä2
-.×Ä×2
-.×ÄÒ2
-.×Ú2
-.×ÚÂ2
-.×Ú×2
-.×ÚÇ2
-.×ÚÇÌ2
-.×ÚÇÒ2
-.×ÚÄ2
-.×ÚÄÒ2
-.×ÚÌ2
-.×ÚÍ2
-.×ÚÒ2
-.×Úß2
-.×Ë2
-.×ËÌ2
-.×ËÒ2
-.×Ì2
-.×Í2
-.×Î2
-.×Ð2
-.×ÐÌ2
-.×ÐÒ2
-.×Ò2
-.×Ó2
-.×ÓË2
-.×ÓËÒ2
-.×ÓÌ2
-.×ÓÍ2
-.×ÓÐ2
-.×ÓÐÌ2
-.×ÓÐÒ2
-.×ÓÔ2
-.×ÓÔÒ2
-.×ÓÈ2
-.×ÓÈÌ2
-.×Ô2
-.×ÔÒ2
-.×È2
-.×Ã2
-.×Þ2
-.×Ø2
-.Ç×2
-.ÇÄ2
-.ÇÌ2
-.ÇÎ2
-.ÇÒ2
-.Ä×2
-.ÄÌ2
-.ÄÎ2
-.ÄÒ2
-.ÄØ2
-.Ö×2
-.ÖÇ2
-.ÖÇÌ2
-.ÖÄ2
-.ÖÖ2
-.ÖÒ2
-.Ú×2
-.ÚÄ2
-.ÚÄÒ2
-.ÚÌ2
-.ÚÍ2
-.ÚÎ2
-.ÚÒ2
-.Ë×2
-.ËÌ2
-.ËÎ2
-.ËÒ2
-.ËÓÔ2
-.ËÔ2
-.ÌÂ2
-.ÌÇ2
-.ÌÖ2
-.ÌØ2
-.ÌØ×2
-.ÍÇÌ2
-.ÍÇÎ2
-.ÍÌ2
-.ÍÎ2
-.ÍÒ2
-.ÍÓÔ2
-.ÍÈ2
-.ÍÞ2
-.ÍÝ2
-.ÎÒ2
-.ÐÌ2
-.ÐÎ2
-.ÐÒ2
-.ÐÓ2
-.ÐÔ2
-.ÐÈ2
-.ÐÞ2
-.ÐÛ2
-.ÐØ2
-.Ò×2
-.ÒÖ2
-.ÒÔ2
-.ÓÂ2
-.ÓÂÌ2
-.ÓÂÒ2
-.Ó×2
-.Ó×ÓÔ2
-.ÓÇ2
-.ÓÇÎ2
-.ÓÇÒ2
-.ÓÄ2
-.ÓÄ×2
-.ÓÄÒ2
-.ÓÖ2
-.ÓÚ2
-.ÓË2
-.ÓË×2
-.ÓËÌ2
-.ÓËÒ2
-.ÓÌ2
-.ÓÍ2
-.ÓÎ2
-.ÓÐ2
-.ÓÐÌ2
-.ÓÐÒ2
-.ÓÒ2
-.ÓÓ2
-.ÓÔ2
-.ÓÔ×2
-.ÓÔÌ2
-.ÓÔÒ2
-.ÓÆ2
-.ÓÈ2
-.ÓÈ×2
-.ÓÈÌ2
-.ÓÞ2
-.ÓÛ2
-.Óß2
-.Ô×2
-.ÔË2
-.ÔËÎ2
-.ÔÌ2
-.ÔÒ2
-.ÔÝ2
-.ÔØÍ2
-.ÔØÆ2
-.ÆÌ2
-.ÆÒ2
-.È×2
-.ÈÌ2
-.ÈÍ2
-.ÈÎ2
-.ÈÒ2
-.Ã×2
-.ÞÌ2
-.ÞÒ2
-.ÞÔ2
-.ÞØ2
-.Û×2
-.ÛË2
-.ÛË×2
-.ÛÌ2
-.ÛÎ2
-.ÛÐ2
-.ÛÒ2
-.ÛÔ2
-.ÛÔÒ2
-1ÂÁ
-1ÂÅ
-1ÂÉ
-1ÂÏ
-1ÂÕ
-1ÂÙ
-1ÂÑ
-1×Á
-1×Å
-1×É
-1×Ï
-1×Õ
-1×Ù
-1×Ñ
-1ÇÁ
-1ÇÅ
-1ÇÉ
-1ÇÏ
-1ÇÕ
-1ÄÁ
-1ÄÅ
-1ÄÉ
-1ÄÏ
-1ÄÕ
-1ÄÙ
-1ÄÀ
-1ÄÑ
-1ÖÁ
-1ÖÅ
-1ÖÉ
-1ÖÏ
-1ÖÕ
-1ÖÙ
-1ÚÁ
-1ÚÅ
-1ÚÉ
-1ÚÏ
-1ÚÕ
-1ÚÙ
-1ÚÑ
-1ËÁ
-1ËÅ
-1ËÉ
-1ËÏ
-1ËÕ
-1ÌÁ
-1ÌÅ
-1ÌÉ
-1ÌÏ
-1ÌÕ
-1ÌÙ
-1ÌÀ
-1ÌÑ
-1ÍÁ
-1ÍÅ
-1ÍÉ
-1ÍÏ
-1ÍÕ
-1ÍÙ
-1ÍÑ
-1ÎÁ
-1ÎÅ
-1ÎÉ
-1ÎÏ
-1ÎÕ
-1ÎÙ
-1ÎÀ
-1ÎÑ
-1ÐÁ
-1ÐÅ
-1ÐÉ
-1ÐÏ
-1ÐÕ
-1ÐÙ
-1ÐÑ
-1ÒÁ
-1ÒÅ
-1ÒÉ
-1ÒÏ
-1ÒÕ
-1ÒÙ
-1ÒÀ
-1ÒÑ
-1ÓÁ
-1ÓÅ
-1ÓÉ
-1ÓÏ
-1ÓÕ
-1ÓÙ
-1ÓÑ
-1ÔÁ
-1ÔÅ
-1ÔÉ
-1ÔÏ
-1ÔÕ
-1ÔÙ
-1ÔÀ
-1ÔÑ
-1ÆÁ
-1ÆÅ
-1ÆÉ
-1ÆÏ
-1ÆÕ
-1ÆÙ
-1ÈÁ
-1ÈÅ
-1ÈÉ
-1ÈÏ
-1ÈÕ
-1ÃÁ
-1ÃÅ
-1ÃÉ
-1ÃÏ
-1ÃÕ
-1ÃÙ
-1ÞÁ
-1ÞÅ
-1ÞÉ
-1ÞÏ
-1ÞÕ
-1ÛÁ
-1ÛÅ
-1ÛÉ
-1ÛÏ
-1ÛÕ
-1ÝÁ
-1ÝÅ
-1ÝÉ
-1ÝÏ
diff --git a/lib/libc/gen/fmtcheck.c b/lib/libc/gen/fmtcheck.c
deleted file mode 100644
index 7cc8cfffa7ec..000000000000
--- a/lib/libc/gen/fmtcheck.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/* $FreeBSD$ */
-/* $NetBSD: fmtcheck.c,v 1.2 2000/11/01 01:17:20 briggs Exp $ */
-
-/*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code was contributed to The NetBSD Foundation by Allen Briggs.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#ifndef lint
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
-
-#include "namespace.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#ifdef __weak_alias
-__weak_alias(fmtcheck,__fmtcheck)
-#endif
-
-enum __e_fmtcheck_types {
- FMTCHECK_START,
- FMTCHECK_SHORT,
- FMTCHECK_INT,
- FMTCHECK_LONG,
- FMTCHECK_QUAD,
- FMTCHECK_SHORTPOINTER,
- FMTCHECK_INTPOINTER,
- FMTCHECK_LONGPOINTER,
- FMTCHECK_QUADPOINTER,
- FMTCHECK_DOUBLE,
- FMTCHECK_LONGDOUBLE,
- FMTCHECK_STRING,
- FMTCHECK_WIDTH,
- FMTCHECK_PRECISION,
- FMTCHECK_DONE,
- FMTCHECK_UNKNOWN
-};
-typedef enum __e_fmtcheck_types EFT;
-
-#define RETURN(pf,f,r) do { \
- *(pf) = (f); \
- return r; \
- } /*NOTREACHED*/ /*CONSTCOND*/ while (0)
-
-static EFT
-get_next_format_from_precision(const char **pf)
-{
- int sh, lg, quad, longdouble;
- const char *f;
-
- sh = lg = quad = longdouble = 0;
-
- f = *pf;
- switch (*f) {
- case 'h':
- f++;
- sh = 1;
- break;
- case 'l':
- f++;
- if (!*f) RETURN(pf,f,FMTCHECK_UNKNOWN);
- if (*f == 'l') {
- f++;
- quad = 1;
- } else {
- lg = 1;
- }
- break;
- case 'q':
- f++;
- quad = 1;
- break;
- case 'L':
- f++;
- longdouble = 1;
- break;
- default:
- break;
- }
- if (!*f) RETURN(pf,f,FMTCHECK_UNKNOWN);
- if (strchr("diouxX", *f)) {
- if (longdouble)
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- if (lg)
- RETURN(pf,f,FMTCHECK_LONG);
- if (quad)
- RETURN(pf,f,FMTCHECK_QUAD);
- RETURN(pf,f,FMTCHECK_INT);
- }
- if (*f == 'n') {
- if (longdouble)
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- if (sh)
- RETURN(pf,f,FMTCHECK_SHORTPOINTER);
- if (lg)
- RETURN(pf,f,FMTCHECK_LONGPOINTER);
- if (quad)
- RETURN(pf,f,FMTCHECK_QUADPOINTER);
- RETURN(pf,f,FMTCHECK_INTPOINTER);
- }
- if (strchr("DOU", *f)) {
- if (sh + lg + quad + longdouble)
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- RETURN(pf,f,FMTCHECK_LONG);
- }
- if (strchr("eEfg", *f)) {
- if (longdouble)
- RETURN(pf,f,FMTCHECK_LONGDOUBLE);
- if (sh + lg + quad)
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- RETURN(pf,f,FMTCHECK_DOUBLE);
- }
- if (*f == 'c') {
- if (sh + lg + quad + longdouble)
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- RETURN(pf,f,FMTCHECK_INT);
- }
- if (*f == 's') {
- if (sh + lg + quad + longdouble)
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- RETURN(pf,f,FMTCHECK_STRING);
- }
- if (*f == 'p') {
- if (sh + lg + quad + longdouble)
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- RETURN(pf,f,FMTCHECK_LONG);
- }
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- /*NOTREACHED*/
-}
-
-static EFT
-get_next_format_from_width(const char **pf)
-{
- const char *f;
-
- f = *pf;
- if (*f == '.') {
- f++;
- if (*f == '*') {
- RETURN(pf,f,FMTCHECK_PRECISION);
- }
- /* eat any precision (empty is allowed) */
- while (isdigit(*f)) f++;
- if (!*f) RETURN(pf,f,FMTCHECK_UNKNOWN);
- }
- RETURN(pf,f,get_next_format_from_precision(pf));
- /*NOTREACHED*/
-}
-
-static EFT
-get_next_format(const char **pf, EFT eft)
-{
- int infmt;
- const char *f;
-
- if (eft == FMTCHECK_WIDTH) {
- (*pf)++;
- return get_next_format_from_width(pf);
- } else if (eft == FMTCHECK_PRECISION) {
- (*pf)++;
- return get_next_format_from_precision(pf);
- }
-
- f = *pf;
- infmt = 0;
- while (!infmt) {
- f = strchr(f, '%');
- if (f == NULL)
- RETURN(pf,f,FMTCHECK_DONE);
- f++;
- if (!*f)
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- if (*f != '%')
- infmt = 1;
- else
- f++;
- }
-
- /* Eat any of the flags */
- while (*f && (strchr("#0- +", *f)))
- f++;
-
- if (*f == '*') {
- RETURN(pf,f,FMTCHECK_WIDTH);
- }
- /* eat any width */
- while (isdigit(*f)) f++;
- if (!*f) {
- RETURN(pf,f,FMTCHECK_UNKNOWN);
- }
-
- RETURN(pf,f,get_next_format_from_width(pf));
- /*NOTREACHED*/
-}
-
-__const char *
-fmtcheck(const char *f1, const char *f2)
-{
- const char *f1p, *f2p;
- EFT f1t, f2t;
-
- if (!f1) return f2;
-
- f1p = f1;
- f1t = FMTCHECK_START;
- f2p = f2;
- f2t = FMTCHECK_START;
- while ((f1t = get_next_format(&f1p, f1t)) != FMTCHECK_DONE) {
- if (f1t == FMTCHECK_UNKNOWN)
- return f2;
- f2t = get_next_format(&f2p, f2t);
- if (f1t != f2t)
- return f2;
- }
- return f1;
-}
diff --git a/lib/libpcap/config.h b/lib/libpcap/config.h
deleted file mode 100644
index 729b4c54a08f..000000000000
--- a/lib/libpcap/config.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* $FreeBSD$ */
-/* This is an edited copy of the config.h generated by configure. */
-
-/* config.h. Generated automatically by configure. */
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define to empty if the keyword does not work. */
-/* #undef const */
-
-/* Define as __inline if that's what the C compiler calls it. */
-/* #undef inline */
-
-/* Define if you have the ether_hostton function. */
-#define HAVE_ETHER_HOSTTON 1
-
-/* Define if you have the freeifaddrs function. */
-#define HAVE_FREEIFADDRS 1
-
-/* Define if you have the strerror function. */
-#define HAVE_STRERROR 1
-
-/* Define if you have the strlcpy function. */
-#define HAVE_STRLCPY 1
-
-/* Define if you have the <ifaddrs.h> header file. */
-#define HAVE_IFADDRS_H 1
-
-/* Define if you have the <netinet/if_ether.h> header file. */
-#define HAVE_NETINET_IF_ETHER_H 1
-
-/* Define if you have the <netpacket/packet.h> header file. */
-/* #undef HAVE_NETPACKET_PACKET_H */
-
-/* Define if you have the <sys/bufmod.h> header file. */
-/* #undef HAVE_SYS_BUFMOD_H */
-
-/* Define if you have the <sys/dlpi_ext.h> header file. */
-/* #undef HAVE_SYS_DLPI_EXT_H */
-
-/* Define if you have the <sys/ioccom.h> header file. */
-#define HAVE_SYS_IOCCOM_H 1
-
-/* Define if you have the <sys/sockio.h> header file. */
-#define HAVE_SYS_SOCKIO_H 1
-
-/* needed on HP-UX */
-/* #undef _HPUX_SOURCE */
-
-/* define if your compiler has __attribute__ */
-#define HAVE___ATTRIBUTE__ 1
-
-/* if we have u_int8_t */
-/* #undef u_int8_t */
-
-/* if we have u_int16_t */
-/* #undef u_int16_t */
-
-/* if we have u_int32_t */
-/* #undef u_int32_t */
-
-/* do not use protochain */
-/* #undef NO_PROTOCHAIN */
-
-/* IPv6 */
-/* XXX Handled by Makefile, to handle NOINET6 */
-/* #define INET6 1 */
-
-/* define if you have a /dev/dlpi */
-/* #undef HAVE_DEV_DLPI */
-
-/* /dev/dlpi directory */
-/* #undef PCAP_DEV_PREFIX */
-
-/* define on AIX to get certain functions */
-/* #undef _SUN */
-
-/* on HP-UX 9.x */
-/* #undef HAVE_HPUX9 */
-
-/* on HP-UX 10.20 */
-/* #undef HAVE_HPUX10_20 */
-
-/* on sinix */
-/* #undef sinix */
-
-/* On solaris */
-/* #undef HAVE_SOLARIS */
-
-/* if there's an os_proto.h */
-/* #undef HAVE_OS_PROTO_H */
-
-/* if struct sockaddr has sa_len */
-#define HAVE_SOCKADDR_SA_LEN 1
-
-/* if ppa_info_t_dl_module_id exists */
-/* #undef HAVE_HP_PPA_INFO_T_DL_MODULE_ID_1 */
-
-/* if unaligned access fails */
-/* #undef LBL_ALIGN */
-
diff --git a/release/scripts/driver-copy2.pl b/release/scripts/driver-copy2.pl
deleted file mode 100644
index 541e3e093f32..000000000000
--- a/release/scripts/driver-copy2.pl
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright (c) 2000 "HOSOKAWA, Tatsumi" <hosokawa@FreeBSD.org>
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $FreeBSD$
-#
-
-if ($#ARGV != 2) {
- print STDERR "Usage: driver-copy.pl config_file src_ko_dir dst_ko_dir\n";
- exit 1;
-}
-
-$config = $ARGV[0];
-$srcdir = $ARGV[1];
-$dstdir = $ARGV[2];
-
-open CONFIG, "< $config" or die "Cannot open $config.\n";
-while (<CONFIG>) {
- s/#.*$//;
- if (/^(\w+)\s+(\w+)\s+(\d+)\s+(\w+)\s+\"(.*)\"\s*$/) {
- $flp{$2} = $3;
- $dsc{$2} = $5;
- }
-}
-close CONFIG;
-
--d $srcdir or die "Cannot find $srcdir directory.\n";
--d $dstdir or die "Cannot find $dstdir directory.\n";
-
-undef $/;
-
-foreach $f (sort keys %flp) {
- if ($flp{$f} == 1) {
- print STDERR "$f: There's nothing to do with driver on first floppy.\n";
- }
- elsif ($flp{$f} == 2) {
- $srcfile = $srcdir . '/' . $f . '.ko';
- $dstfile = $dstdir . '/' . $f . '.ko';
- $dscfile = $dstdir . '/' . $f . '.dsc';
- print STDERR "Copying $f.ko to $dstdir\n";
- open SRC, "< $srcfile" or die "Cannot open $srcfile\n";
- $file = <SRC>;
- close SRC;
- open DST, "> $dstfile" or die "Cannot open $dstfile\n";
- print DST $file;
- close DST;
- open DSC, "> $dscfile" or die "Cannot open $dscfile\n";
- print DSC $dsc{$f};
- close DSC;
- }
- elsif ($flp{$f} == 3) {
- # third driver floppy (currently not implemnted yet...)
- print STDERR "3rd driver floppy support has not implemented yet\n";
- exit 1;
- }
-}
diff --git a/release/scripts/driver-remove.pl b/release/scripts/driver-remove.pl
deleted file mode 100644
index 2ff5a8886d65..000000000000
--- a/release/scripts/driver-remove.pl
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/perl
-#
-# Copyright (c) 2000 "HOSOKAWA, Tatsumi" <hosokawa@FreeBSD.org>
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $FreeBSD$
-#
-
-if ($#ARGV != 1) {
- print STDERR "Usage: driver-remove.pl config_file BOOTMFS\n";
- exit 1;
-}
-
-$config = $ARGV[0];
-$bootmfs = $ARGV[1];
-
-open CONFIG, "< $config" or die "Cannot open $config.\n";
-while (<CONFIG>) {
- s/#.*$//;
- if (/^(\w+)\s+(\w+)\s+(\d+)\s+(\w+)\s+\"(.*)\"\s*$/) {
- $drivers{$1} = 1;
- }
-}
-close CONFIG;
-
-open BOOTMFS, "< $bootmfs" or die "Cannot open $bootmfs.\n";
-while (<BOOTMFS>) {
- next if (/^device\s+(\w+)/ && $drivers{$1});
- push @bootmfs, $_;
-}
-close BOOTMFS;
-
-open BOOTMFS, "> $bootmfs" or die "Cannot open $bootmfs.\n";
-foreach (@bootmfs) {
- print BOOTMFS;
-}
-close BOOTMFS;
diff --git a/sbin/ffsinfo/Makefile b/sbin/ffsinfo/Makefile
deleted file mode 100644
index 6172ab924444..000000000000
--- a/sbin/ffsinfo/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# @(#)Makefile 8.8 (Berkeley) 6/21/2000
-#
-# $TSHeader: src/sbin/ffsinfo/Makefile,v 1.3 2000/12/05 19:45:10 tomsoft Exp $
-# $FreeBSD$
-#
-
-MAINTAINER= tomsoft@FreeBSD.ORG, chm@FreeBSD.ORG
-
-#CFLAGS+=${BDECFLAGS}
-
-PROG= ffsinfo
-SRCS= ffsinfo.c debug.c
-MAN= ffsinfo.8
-
-GROWFS= ${.CURDIR}/../growfs
-CFLAGS+=-DFS_DEBUG -I${GROWFS}
-.PATH: ${GROWFS}
-
-.include <bsd.prog.mk>
diff --git a/sbin/growfs/Makefile b/sbin/growfs/Makefile
deleted file mode 100644
index 7dba7cbaf51b..000000000000
--- a/sbin/growfs/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# @(#)Makefile 8.8 (Berkeley) 6/21/2000
-#
-# $TSHeader: src/sbin/growfs/Makefile,v 1.4 2000/12/05 19:45:24 tomsoft Exp $
-# $FreeBSD$
-#
-
-MAINTAINER= tomsoft@FreeBSD.ORG, chm@FreeBSD.ORG
-
-#GFSDBG=YES
-#CFLAGS+=${BDECFLAGS}
-
-PROG= growfs
-SRCS= growfs.c
-MAN= growfs.8
-
-.if defined(GFSDBG)
-SRCS+= debug.c
-CFLAGS+=-DFS_DEBUG
-.endif
-
-.include <bsd.prog.mk>
diff --git a/sbin/growfs/debug.h b/sbin/growfs/debug.h
deleted file mode 100644
index 78ac625ece9f..000000000000
--- a/sbin/growfs/debug.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz
- * Copyright (c) 1980, 1989, 1993 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christoph Herrmann and Thomas-Henning von Kamptz, Munich and Frankfurt.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors, as well as Christoph
- * Herrmann and Thomas-Henning von Kamptz.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $TSHeader: src/sbin/growfs/debug.h,v 1.2 2000/11/16 18:43:50 tom Exp $
- * $FreeBSD$
- *
- */
-
-#ifdef FS_DEBUG
-
-/* ********************************************************** INCLUDES ***** */
-#include <sys/param.h>
-
-#include <ufs/ufs/dinode.h>
-#include <ufs/ffs/fs.h>
-
-void dbg_open(const char *);
-void dbg_close(void);
-void dbg_dump_hex(struct fs *, const char *, unsigned char *);
-void dbg_dump_fs(struct fs *, const char *);
-void dbg_dump_cg(const char *, struct cg *);
-void dbg_dump_csum(const char *, struct csum *);
-void dbg_dump_ino(struct fs *, const char *, struct dinode *);
-void dbg_dump_iblk(struct fs *, const char *, char *, size_t);
-void dbg_dump_inmap(struct fs *, const char *, struct cg *);
-void dbg_dump_frmap(struct fs *, const char *, struct cg *);
-void dbg_dump_clmap(struct fs *, const char *, struct cg *);
-void dbg_dump_clsum(struct fs *, const char *, struct cg *);
-void dbg_dump_sptbl(struct fs *, const char *, struct cg *);
-
-#define DBG_OPEN(P) dbg_open((P))
-#define DBG_CLOSE dbg_close()
-#define DBG_DUMP_HEX(F,C,M) dbg_dump_hex((F),(C),(M))
-#define DBG_DUMP_FS(F,C) dbg_dump_fs((F),(C))
-#define DBG_DUMP_CG(F,C,M) dbg_dump_cg((C),(M))
-#define DBG_DUMP_CSUM(F,C,M) dbg_dump_csum((C),(M))
-#define DBG_DUMP_INO(F,C,M) dbg_dump_ino((F),(C),(M))
-#define DBG_DUMP_IBLK(F,C,M,L) dbg_dump_iblk((F),(C),(M),(L))
-#define DBG_DUMP_INMAP(F,C,M) dbg_dump_inmap((F),(C),(M))
-#define DBG_DUMP_FRMAP(F,C,M) dbg_dump_frmap((F),(C),(M))
-#define DBG_DUMP_CLMAP(F,C,M) dbg_dump_clmap((F),(C),(M))
-#define DBG_DUMP_CLSUM(F,C,M) dbg_dump_clsum((F),(C),(M))
-#define DBG_DUMP_SPTBL(F,C,M) dbg_dump_sptbl((F),(C),(M))
-
-#define DL_TRC 0x01
-#define DL_INFO 0x02
-extern int _dbg_lvl_;
-
-#define DBG_FUNC(N) char __FKT__[] = (N);
-#define DBG_ENTER if(_dbg_lvl_ & DL_TRC) { \
- fprintf(stderr, "~>%s: %s\n", __FILE__, __FKT__ ); \
- }
-#define DBG_LEAVE if(_dbg_lvl_ & DL_TRC) { \
- fprintf(stderr, "~<%s[%d]: %s\n", __FILE__, __LINE__, __FKT__ ); \
- }
-#define DBG_TRC if(_dbg_lvl_ & DL_TRC) { \
- fprintf(stderr, "~=%s[%d]: %s\n", __FILE__, __LINE__, __FKT__ ); \
- }
-#define DBG_PRINT0(A) if(_dbg_lvl_ & DL_INFO) { \
- fprintf(stderr, "~ %s", (A)); \
- }
-#define DBG_PRINT1(A,B) if(_dbg_lvl_ & DL_INFO) { \
- fprintf(stderr, "~ "); \
- fprintf(stderr, (A), (B)); \
- }
-#define DBG_PRINT2(A,B,C) if(_dbg_lvl_ & DL_INFO) { \
- fprintf(stderr, "~ "); \
- fprintf(stderr, (A), (B), (C)); \
- }
-#define DBG_PRINT3(A,B,C,D) if(_dbg_lvl_ & DL_INFO) { \
- fprintf(stderr, "~ "); \
- fprintf(stderr, (A), (B), (C), (D)); \
- }
-#define DBG_PRINT4(A,B,C,D,E) if(_dbg_lvl_ & DL_INFO) { \
- fprintf(stderr, "~ "); \
- fprintf(stderr, (A), (B), (C), (D), (E)); \
- }
-#else /* not FS_DEBUG */
-
-#define DBG_OPEN(P)
-#define DBG_CLOSE
-#define DBG_DUMP_HEX(F,C,M)
-#define DBG_DUMP_FS(F,C)
-#define DBG_DUMP_CG(F,C,M)
-#define DBG_DUMP_CSUM(F,C,M)
-#define DBG_DUMP_INO(F,C,M)
-#define DBG_DUMP_IBLK(F,C,M,L)
-#define DBG_DUMP_INMAP(F,C,M)
-#define DBG_DUMP_FRMAP(F,C,M)
-#define DBG_DUMP_CLMAP(F,C,M)
-#define DBG_DUMP_CLSUM(F,C,M)
-#define DBG_DUMP_SPTBL(F,C,M)
-#define DBG_FUNC(N)
-#define DBG_ENTER
-#define DBG_TRC
-#define DBG_LEAVE
-#define DBG_PRINT0(A)
-#define DBG_PRINT1(A,B)
-#define DBG_PRINT2(A,B,C)
-#define DBG_PRINT3(A,B,C,D)
-#define DBG_PRINT4(A,B,C,D,E)
-
-#endif /* FS_DEBUG */
diff --git a/secure/lib/libcrypt/blowfish.c b/secure/lib/libcrypt/blowfish.c
deleted file mode 100644
index 3d74c05c0f21..000000000000
--- a/secure/lib/libcrypt/blowfish.c
+++ /dev/null
@@ -1,783 +0,0 @@
-/*
- * Blowfish block cipher
- * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
- * All rights reserved.
- *
- * Implementation advice by David Mazieres <dm@lcs.mit.edu>.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Niels Provos.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * This code is derived from section 14.3 and the given source
- * in section V of Applied Cryptography, second edition.
- * Blowfish is an unpatented fast block cipher designed by
- * Bruce Schneier.
- */
-
-/*
- * FreeBSD implementation by Paul Herman <pherman@frenchfries.net>
- */
-
-#if 0
-#include <stdio.h> /* used for debugging */
-#include <string.h>
-#endif
-
-#include <sys/types.h>
-#include "blowfish.h"
-
-#undef inline
-#ifdef __GNUC__
-#define inline __inline
-#else /* !__GNUC__ */
-#define inline
-#endif /* !__GNUC__ */
-
-/* Function for Feistel Networks */
-
-#define F(s, x) ((((s)[ (((x)>>24)&0xFF)] \
- + (s)[0x100 + (((x)>>16)&0xFF)]) \
- ^ (s)[0x200 + (((x)>> 8)&0xFF)]) \
- + (s)[0x300 + ( (x) &0xFF)])
-
-#define BLFRND(s,p,i,j,n) (i ^= F(s,j) ^ (p)[n])
-
-void
-Blowfish_encipher(c, xl, xr)
- blf_ctx *c;
- u_int32_t *xl;
- u_int32_t *xr;
-{
- u_int32_t Xl;
- u_int32_t Xr;
- u_int32_t *s = c->S[0];
- u_int32_t *p = c->P;
-
- Xl = *xl;
- Xr = *xr;
-
- Xl ^= p[0];
- BLFRND(s, p, Xr, Xl, 1); BLFRND(s, p, Xl, Xr, 2);
- BLFRND(s, p, Xr, Xl, 3); BLFRND(s, p, Xl, Xr, 4);
- BLFRND(s, p, Xr, Xl, 5); BLFRND(s, p, Xl, Xr, 6);
- BLFRND(s, p, Xr, Xl, 7); BLFRND(s, p, Xl, Xr, 8);
- BLFRND(s, p, Xr, Xl, 9); BLFRND(s, p, Xl, Xr, 10);
- BLFRND(s, p, Xr, Xl, 11); BLFRND(s, p, Xl, Xr, 12);
- BLFRND(s, p, Xr, Xl, 13); BLFRND(s, p, Xl, Xr, 14);
- BLFRND(s, p, Xr, Xl, 15); BLFRND(s, p, Xl, Xr, 16);
-
- *xl = Xr ^ p[17];
- *xr = Xl;
-}
-
-void
-Blowfish_decipher(c, xl, xr)
- blf_ctx *c;
- u_int32_t *xl;
- u_int32_t *xr;
-{
- u_int32_t Xl;
- u_int32_t Xr;
- u_int32_t *s = c->S[0];
- u_int32_t *p = c->P;
-
- Xl = *xl;
- Xr = *xr;
-
- Xl ^= p[17];
- BLFRND(s, p, Xr, Xl, 16); BLFRND(s, p, Xl, Xr, 15);
- BLFRND(s, p, Xr, Xl, 14); BLFRND(s, p, Xl, Xr, 13);
- BLFRND(s, p, Xr, Xl, 12); BLFRND(s, p, Xl, Xr, 11);
- BLFRND(s, p, Xr, Xl, 10); BLFRND(s, p, Xl, Xr, 9);
- BLFRND(s, p, Xr, Xl, 8); BLFRND(s, p, Xl, Xr, 7);
- BLFRND(s, p, Xr, Xl, 6); BLFRND(s, p, Xl, Xr, 5);
- BLFRND(s, p, Xr, Xl, 4); BLFRND(s, p, Xl, Xr, 3);
- BLFRND(s, p, Xr, Xl, 2); BLFRND(s, p, Xl, Xr, 1);
-
- *xl = Xr ^ p[0];
- *xr = Xl;
-}
-
-void
-Blowfish_initstate(c)
- blf_ctx *c;
-{
-
-/* P-box and S-box tables initialized with digits of Pi */
-
- const blf_ctx initstate =
-
- { {
- {
- 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
- 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
- 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
- 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
- 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
- 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
- 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,
- 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
- 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
- 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
- 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,
- 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
- 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,
- 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
- 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
- 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
- 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,
- 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
- 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,
- 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
- 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
- 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
- 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,
- 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
- 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
- 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
- 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
- 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7,
- 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba,
- 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
- 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f,
- 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09,
- 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,
- 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb,
- 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
- 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
- 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab,
- 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82,
- 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,
- 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
- 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0,
- 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
- 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790,
- 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8,
- 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
- 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0,
- 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7,
- 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
- 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad,
- 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
- 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,
- 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9,
- 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477,
- 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
- 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
- 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af,
- 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,
- 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5,
- 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41,
- 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
- 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400,
- 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915,
- 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
- 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a},
- {
- 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
- 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,
- 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,
- 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e,
- 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,
- 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
- 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e,
- 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
- 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,
- 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8,
- 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
- 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
- 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701,
- 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,
- 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,
- 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
- 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,
- 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
- 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e,
- 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,
- 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
- 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2,
- 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,
- 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
- 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b,
- 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
- 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,
- 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3,
- 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,
- 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
- 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
- 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,
- 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,
- 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28,
- 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,
- 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
- 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510,
- 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,
- 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,
- 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e,
- 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
- 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
- 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8,
- 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
- 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,
- 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
- 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,
- 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
- 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0,
- 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,
- 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
- 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250,
- 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,
- 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
- 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00,
- 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
- 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,
- 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e,
- 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,
- 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
- 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
- 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
- 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,
- 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7},
- {
- 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,
- 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
- 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,
- 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,
- 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45,
- 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
- 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
- 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb,
- 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,
- 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,
- 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42,
- 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
- 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,
- 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb,
- 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,
- 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
- 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
- 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
- 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,
- 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc,
- 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,
- 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
- 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b,
- 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
- 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,
- 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728,
- 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
- 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,
- 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37,
- 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
- 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,
- 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
- 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,
- 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
- 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d,
- 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
- 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
- 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9,
- 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,
- 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,
- 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d,
- 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
- 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,
- 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61,
- 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,
- 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,
- 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
- 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
- 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,
- 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633,
- 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,
- 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
- 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52,
- 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
- 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,
- 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62,
- 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
- 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,
- 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24,
- 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
- 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,
- 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
- 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,
- 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0},
- {
- 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b,
- 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe,
- 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
- 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4,
- 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8,
- 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
- 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304,
- 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
- 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,
- 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6,
- 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9,
- 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
- 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
- 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51,
- 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
- 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c,
- 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b,
- 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
- 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c,
- 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd,
- 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,
- 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319,
- 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
- 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
- 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991,
- 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32,
- 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,
- 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
- 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae,
- 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
- 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5,
- 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47,
- 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
- 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d,
- 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84,
- 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
- 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8,
- 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
- 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,
- 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7,
- 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38,
- 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
- 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
- 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525,
- 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,
- 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442,
- 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964,
- 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
- 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8,
- 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d,
- 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
- 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299,
- 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
- 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
- 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614,
- 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a,
- 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,
- 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
- 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0,
- 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
- 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e,
- 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9,
- 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
- 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6}
- },
- {
- 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
- 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
- 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
- 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
- 0x9216d5d9, 0x8979fb1b
- } };
-
- *c = initstate;
-
-}
-
-#ifdef __STDC__
-u_int32_t
-Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, u_int16_t *current)
-#else
-u_int32_t
-Blowfish_stream2word(data, databytes, current)
- const u_int8_t *data;
- u_int16_t databytes;
- u_int16_t *current;
-#endif
-{
- u_int8_t i;
- u_int16_t j;
- u_int32_t temp;
-
- temp = 0x00000000;
- j = *current;
-
- for (i = 0; i < 4; i++, j++) {
- if (j >= databytes)
- j = 0;
- temp = (temp << 8) | data[j];
- }
-
- *current = j;
- return temp;
-}
-
-#if __STDC__
-void
-Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes)
-#else
-void
-Blowfish_expand0state(c, key, keybytes)
- blf_ctx *c;
- const u_int8_t *key;
- u_int16_t keybytes;
-#endif
-{
- u_int16_t i;
- u_int16_t j;
- u_int16_t k;
- u_int32_t temp;
- u_int32_t datal;
- u_int32_t datar;
-
- j = 0;
- for (i = 0; i < BLF_N + 2; i++) {
- /* Extract 4 int8 to 1 int32 from keystream */
- temp = Blowfish_stream2word(key, keybytes, &j);
- c->P[i] = c->P[i] ^ temp;
- }
-
- j = 0;
- datal = 0x00000000;
- datar = 0x00000000;
- for (i = 0; i < BLF_N + 2; i += 2) {
- Blowfish_encipher(c, &datal, &datar);
-
- c->P[i] = datal;
- c->P[i + 1] = datar;
- }
-
- for (i = 0; i < 4; i++) {
- for (k = 0; k < 256; k += 2) {
- Blowfish_encipher(c, &datal, &datar);
-
- c->S[i][k] = datal;
- c->S[i][k + 1] = datar;
- }
- }
-}
-
-
-#if __STDC__
-void
-Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes,
- const u_int8_t *key, u_int16_t keybytes)
-#else
-void
-Blowfish_expandstate(c, data, databytes, key, keybytes)
- blf_ctx *c;
- const u_int8_t *data;
- u_int16_t databytes;
- const u_int8_t *key;
- u_int16_t keybytes;
-#endif
-{
- u_int16_t i;
- u_int16_t j;
- u_int16_t k;
- u_int32_t temp;
- u_int32_t datal;
- u_int32_t datar;
-
- j = 0;
- for (i = 0; i < BLF_N + 2; i++) {
- /* Extract 4 int8 to 1 int32 from keystream */
- temp = Blowfish_stream2word(key, keybytes, &j);
- c->P[i] = c->P[i] ^ temp;
- }
-
- j = 0;
- datal = 0x00000000;
- datar = 0x00000000;
- for (i = 0; i < BLF_N + 2; i += 2) {
- datal ^= Blowfish_stream2word(data, databytes, &j);
- datar ^= Blowfish_stream2word(data, databytes, &j);
- Blowfish_encipher(c, &datal, &datar);
-
- c->P[i] = datal;
- c->P[i + 1] = datar;
- }
-
- for (i = 0; i < 4; i++) {
- for (k = 0; k < 256; k += 2) {
- datal ^= Blowfish_stream2word(data, databytes, &j);
- datar ^= Blowfish_stream2word(data, databytes, &j);
- Blowfish_encipher(c, &datal, &datar);
-
- c->S[i][k] = datal;
- c->S[i][k + 1] = datar;
- }
- }
-
-}
-
-#if __STDC__
-void
-blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len)
-#else
-void
-blf_key(c, k, len)
- blf_ctx *c;
- const u_int8_t *k;
- u_int16_t len;
-#endif
-{
- /* Initalize S-boxes and subkeys with Pi */
- Blowfish_initstate(c);
-
- /* Transform S-boxes and subkeys with key */
- Blowfish_expand0state(c, k, len);
-}
-
-#if __STDC__
-void
-blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
-#else
-void
-blf_enc(c, data, blocks)
- blf_ctx *c;
- u_int32_t *data;
- u_int16_t blocks;
-#endif
-{
- u_int32_t *d;
- u_int16_t i;
-
- d = data;
- for (i = 0; i < blocks; i++) {
- Blowfish_encipher(c, d, d + 1);
- d += 2;
- }
-}
-
-#if __STDC__
-void
-blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks)
-#else
-void
-blf_dec(c, data, blocks)
- blf_ctx *c;
- u_int32_t *data;
- u_int16_t blocks;
-#endif
-{
- u_int32_t *d;
- u_int16_t i;
-
- d = data;
- for (i = 0; i < blocks; i++) {
- Blowfish_decipher(c, d, d + 1);
- d += 2;
- }
-}
-
-#if __STDC__
-void
-blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
-#else
-void
-blf_ecb_encrypt(c, data, len)
- blf_ctx *c;
- u_int8_t *data;
- u_int32_t len;
-#endif
-{
- u_int32_t l, r;
- u_int32_t i;
-
- for (i = 0; i < len; i += 8) {
- l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
- r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
- Blowfish_encipher(c, &l, &r);
- data[0] = l >> 24 & 0xff;
- data[1] = l >> 16 & 0xff;
- data[2] = l >> 8 & 0xff;
- data[3] = l & 0xff;
- data[4] = r >> 24 & 0xff;
- data[5] = r >> 16 & 0xff;
- data[6] = r >> 8 & 0xff;
- data[7] = r & 0xff;
- data += 8;
- }
-}
-
-#if __STDC__
-void
-blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len)
-#else
-void
-blf_ecb_decrypt(c, data, len)
- blf_ctx *c;
- u_int8_t *data;
- u_int32_t len;
-#endif
-{
- u_int32_t l, r;
- u_int32_t i;
-
- for (i = 0; i < len; i += 8) {
- l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
- r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
- Blowfish_decipher(c, &l, &r);
- data[0] = l >> 24 & 0xff;
- data[1] = l >> 16 & 0xff;
- data[2] = l >> 8 & 0xff;
- data[3] = l & 0xff;
- data[4] = r >> 24 & 0xff;
- data[5] = r >> 16 & 0xff;
- data[6] = r >> 8 & 0xff;
- data[7] = r & 0xff;
- data += 8;
- }
-}
-
-#if __STDC__
-void
-blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len)
-#else
-void
-blf_cbc_encrypt(c, iv, data, len)
- blf_ctx *c;
- u_int8_t *iv;
- u_int8_t *data;
- u_int32_t len;
-#endif
-{
- u_int32_t l, r;
- u_int32_t i, j;
-
- for (i = 0; i < len; i += 8) {
- for (j = 0; j < 8; j++)
- data[j] ^= iv[j];
- l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
- r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
- Blowfish_encipher(c, &l, &r);
- data[0] = l >> 24 & 0xff;
- data[1] = l >> 16 & 0xff;
- data[2] = l >> 8 & 0xff;
- data[3] = l & 0xff;
- data[4] = r >> 24 & 0xff;
- data[5] = r >> 16 & 0xff;
- data[6] = r >> 8 & 0xff;
- data[7] = r & 0xff;
- iv = data;
- data += 8;
- }
-}
-
-#if __STDC__
-void
-blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len)
-#else
-void
-blf_cbc_decrypt(c, iva, data, len)
- blf_ctx *c;
- u_int8_t *iva;
- u_int8_t *data;
- u_int32_t len;
-#endif
-{
- u_int32_t l, r;
- u_int8_t *iv;
- u_int32_t i, j;
-
- iv = data + len - 16;
- data = data + len - 8;
- for (i = len - 8; i >= 8; i -= 8) {
- l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
- r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
- Blowfish_decipher(c, &l, &r);
- data[0] = l >> 24 & 0xff;
- data[1] = l >> 16 & 0xff;
- data[2] = l >> 8 & 0xff;
- data[3] = l & 0xff;
- data[4] = r >> 24 & 0xff;
- data[5] = r >> 16 & 0xff;
- data[6] = r >> 8 & 0xff;
- data[7] = r & 0xff;
- for (j = 0; j < 8; j++)
- data[j] ^= iv[j];
- iv -= 8;
- data -= 8;
- }
- l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3];
- r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7];
- Blowfish_decipher(c, &l, &r);
- data[0] = l >> 24 & 0xff;
- data[1] = l >> 16 & 0xff;
- data[2] = l >> 8 & 0xff;
- data[3] = l & 0xff;
- data[4] = r >> 24 & 0xff;
- data[5] = r >> 16 & 0xff;
- data[6] = r >> 8 & 0xff;
- data[7] = r & 0xff;
- for (j = 0; j < 8; j++)
- data[j] ^= iva[j];
-}
-
-#if 0
-void
-report(u_int32_t data[], u_int16_t len)
-{
- u_int16_t i;
- for (i = 0; i < len; i += 2)
- printf("Block %0hd: %08lx %08lx.\n",
- i / 2, data[i], data[i + 1]);
-}
-void
-main(void)
-{
-
- blf_ctx c;
- char key[] = "AAAAA";
- char key2[] = "abcdefghijklmnopqrstuvwxyz";
-
- u_int32_t data[10];
- u_int32_t data2[] =
- {0x424c4f57l, 0x46495348l};
-
- u_int16_t i;
-
- /* First test */
- for (i = 0; i < 10; i++)
- data[i] = i;
-
- blf_key(&c, (u_int8_t *) key, 5);
- blf_enc(&c, data, 5);
- blf_dec(&c, data, 1);
- blf_dec(&c, data + 2, 4);
- printf("Should read as 0 - 9.\n");
- report(data, 10);
-
- /* Second test */
- blf_key(&c, (u_int8_t *) key2, strlen(key2));
- blf_enc(&c, data2, 1);
- printf("\nShould read as: 0x324ed0fe 0xf413a203.\n");
- report(data2, 2);
- blf_dec(&c, data2, 1);
- report(data2, 2);
-}
-#endif
diff --git a/secure/lib/libcrypt/blowfish.h b/secure/lib/libcrypt/blowfish.h
deleted file mode 100644
index 12e60ccf4341..000000000000
--- a/secure/lib/libcrypt/blowfish.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Blowfish - a fast block cipher designed by Bruce Schneier
- *
- * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Niels Provos.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * FreeBSD implementation by Paul Herman <pherman@frenchfries.net>
- */
-
-#ifndef _BLF_H_
-#define _BLF_H_
-
-/* Schneier states the maximum key length to be 56 bytes.
- * The way how the subkeys are initalized by the key up
- * to (N+2)*4 i.e. 72 bytes are utilized.
- * Warning: For normal blowfish encryption only 56 bytes
- * of the key affect all cipherbits.
- */
-
-#define BLF_N 16 /* Number of Subkeys */
-#define BLF_MAXKEYLEN ((BLF_N-2)*4) /* 448 bits */
-
-/* Blowfish context */
-typedef struct BlowfishContext {
- u_int32_t S[4][256]; /* S-Boxes */
- u_int32_t P[BLF_N + 2]; /* Subkeys */
-} blf_ctx;
-
-/* Raw access to customized Blowfish
- * blf_key is just:
- * Blowfish_initstate( state )
- * Blowfish_expand0state( state, key, keylen )
- */
-
-void Blowfish_encipher __P((blf_ctx *, u_int32_t *, u_int32_t *));
-void Blowfish_decipher __P((blf_ctx *, u_int32_t *, u_int32_t *));
-void Blowfish_initstate __P((blf_ctx *));
-void Blowfish_expand0state __P((blf_ctx *, const u_int8_t *, u_int16_t));
-void Blowfish_expandstate
- __P((blf_ctx *, const u_int8_t *, u_int16_t, const u_int8_t *, u_int16_t));
-
-/* Standard Blowfish */
-
-void blf_key __P((blf_ctx *, const u_int8_t *, u_int16_t));
-void blf_enc __P((blf_ctx *, u_int32_t *, u_int16_t));
-void blf_dec __P((blf_ctx *, u_int32_t *, u_int16_t));
-
-void blf_ecb_encrypt __P((blf_ctx *, u_int8_t *, u_int32_t));
-void blf_ecb_decrypt __P((blf_ctx *, u_int8_t *, u_int32_t));
-
-void blf_cbc_encrypt __P((blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t));
-void blf_cbc_decrypt __P((blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t));
-
-/* Converts u_int8_t to u_int32_t */
-u_int32_t Blowfish_stream2word __P((const u_int8_t *, u_int16_t , u_int16_t *));
-
-#endif
diff --git a/secure/lib/libcrypt/crypt-blowfish.c b/secure/lib/libcrypt/crypt-blowfish.c
deleted file mode 100644
index 6893da3416de..000000000000
--- a/secure/lib/libcrypt/crypt-blowfish.c
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Niels Provos.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/* This password hashing algorithm was designed by David Mazieres
- * <dm@lcs.mit.edu> and works as follows:
- *
- * 1. state := InitState ()
- * 2. state := ExpandKey (state, salt, password) 3.
- * REPEAT rounds:
- * state := ExpandKey (state, 0, salt)
- * state := ExpandKey(state, 0, password)
- * 4. ctext := "OrpheanBeholderScryDoubt"
- * 5. REPEAT 64:
- * ctext := Encrypt_ECB (state, ctext);
- * 6. RETURN Concatenate (salt, ctext);
- *
- */
-
-/*
- * FreeBSD implementation by Paul Herman <pherman@frenchfries.net>
- */
-
-#if 0
-#include <stdio.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <string.h>
-#include <pwd.h>
-#include "blowfish.h"
-
-/* This implementation is adaptable to current computing power.
- * You can have up to 2^31 rounds which should be enough for some
- * time to come.
- */
-
-#define BCRYPT_VERSION '2'
-#define BCRYPT_MAXSALT 16 /* Precomputation is just so nice */
-#define BCRYPT_BLOCKS 6 /* Ciphertext blocks */
-#define BCRYPT_MINROUNDS 16 /* we have log2(rounds) in salt */
-
-char *bcrypt_gensalt __P((u_int8_t));
-
-static void encode_salt __P((char *, u_int8_t *, u_int16_t, u_int8_t));
-static void encode_base64 __P((u_int8_t *, u_int8_t *, u_int16_t));
-static void decode_base64 __P((u_int8_t *, u_int16_t, u_int8_t *));
-
-static char encrypted[_PASSWORD_LEN];
-static char gsalt[BCRYPT_MAXSALT * 4 / 3 + 1];
-static char error[] = ":";
-
-const static u_int8_t Base64Code[] =
-"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-
-const static u_int8_t index_64[128] =
-{
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
- 255, 255, 255, 255, 255, 255, 0, 1, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63, 255, 255,
- 255, 255, 255, 255, 255, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 255, 255, 255, 255, 255, 255, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
- 51, 52, 53, 255, 255, 255, 255, 255
-};
-#define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)])
-
-#ifdef __STDC__
-static void
-decode_base64(u_int8_t *buffer, u_int16_t len, u_int8_t *data)
-#else
-static void
-decode_base64(buffer, len, data)
- u_int8_t *buffer;
- u_int16_t len;
- u_int8_t *data;
-#endif
-{
- u_int8_t *bp = buffer;
- u_int8_t *p = data;
- u_int8_t c1, c2, c3, c4;
- while (bp < buffer + len) {
- c1 = CHAR64(*p);
- c2 = CHAR64(*(p + 1));
-
- /* Invalid data */
- if (c1 == 255 || c2 == 255)
- break;
-
- *bp++ = (c1 << 2) | ((c2 & 0x30) >> 4);
- if (bp >= buffer + len)
- break;
-
- c3 = CHAR64(*(p + 2));
- if (c3 == 255)
- break;
-
- *bp++ = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2);
- if (bp >= buffer + len)
- break;
-
- c4 = CHAR64(*(p + 3));
- if (c4 == 255)
- break;
- *bp++ = ((c3 & 0x03) << 6) | c4;
-
- p += 4;
- }
-}
-
-#ifdef __STDC__
-static void
-encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr)
-#else
-static void
-encode_salt(salt, csalt, clen, logr)
- char *salt;
- u_int8_t *csalt;
- u_int16_t clen;
- u_int8_t logr;
-#endif
-{
- salt[0] = '$';
- salt[1] = BCRYPT_VERSION;
- salt[2] = 'a';
- salt[3] = '$';
-
- snprintf(salt + 4, 4, "%2.2u$", logr);
-
- encode_base64((u_int8_t *) salt + 7, csalt, clen);
-}
-/* Generates a salt for this version of crypt.
- Since versions may change. Keeping this here
- seems sensible.
- */
-
-#ifdef __STDC__
-char *
-bcrypt_gensalt(u_int8_t log_rounds)
-#else
-char *
-bcrypt_gensalt(log_rounds)
- u_int8_t log_rounds;
-#endif
-{
- u_int8_t csalt[BCRYPT_MAXSALT];
- u_int16_t i;
- u_int32_t seed = 0;
-
- for (i = 0; i < BCRYPT_MAXSALT; i++) {
- if (i % 4 == 0)
- seed = arc4random();
- csalt[i] = seed & 0xff;
- seed = seed >> 8;
- }
-
- if (log_rounds < 4)
- log_rounds = 4;
-
- encode_salt(gsalt, csalt, BCRYPT_MAXSALT, log_rounds);
- return gsalt;
-}
-/* We handle $Vers$log2(NumRounds)$salt+passwd$
- i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */
-
-char *
-crypt_blowfish(key, salt)
- const char *key;
- const char *salt;
-{
- blf_ctx state;
- u_int32_t rounds, i, k;
- u_int16_t j;
- u_int8_t key_len, salt_len, logr, minor;
- u_int8_t ciphertext[4 * BCRYPT_BLOCKS] = "OrpheanBeholderScryDoubt";
- u_int8_t csalt[BCRYPT_MAXSALT];
- u_int32_t cdata[BCRYPT_BLOCKS];
- static char *magic = "$2a$04$";
-
- /* Defaults */
- minor = 'a';
- logr = 4;
- rounds = 1 << logr;
-
- /* If it starts with the magic string, then skip that */
- if(!strncmp(salt, magic, strlen(magic))) {
- salt += strlen(magic);
- }
- else if (*salt == '$') {
-
- /* Discard "$" identifier */
- salt++;
-
- if (*salt > BCRYPT_VERSION) {
- /* How do I handle errors ? Return ':' */
- return error;
- }
-
- /* Check for minor versions */
- if (salt[1] != '$') {
- switch (salt[1]) {
- case 'a':
- /* 'ab' should not yield the same as 'abab' */
- minor = salt[1];
- salt++;
- break;
- default:
- return error;
- }
- } else
- minor = 0;
-
- /* Discard version + "$" identifier */
- salt += 2;
-
- if (salt[2] != '$')
- /* Out of sync with passwd entry */
- return error;
-
- /* Computer power doesnt increase linear, 2^x should be fine */
- if ((rounds = (u_int32_t) 1 << (logr = atoi(salt))) < BCRYPT_MINROUNDS)
- return error;
-
- /* Discard num rounds + "$" identifier */
- salt += 3;
- }
-
-
- /* We dont want the base64 salt but the raw data */
- decode_base64(csalt, BCRYPT_MAXSALT, (u_int8_t *) salt);
- salt_len = BCRYPT_MAXSALT;
- key_len = strlen(key) + (minor >= 'a' ? 1 : 0);
-
- /* Setting up S-Boxes and Subkeys */
- Blowfish_initstate(&state);
- Blowfish_expandstate(&state, csalt, salt_len,
- (u_int8_t *) key, key_len);
- for (k = 0; k < rounds; k++) {
- Blowfish_expand0state(&state, (u_int8_t *) key, key_len);
- Blowfish_expand0state(&state, csalt, salt_len);
- }
-
- /* This can be precomputed later */
- j = 0;
- for (i = 0; i < BCRYPT_BLOCKS; i++)
- cdata[i] = Blowfish_stream2word(ciphertext, 4 * BCRYPT_BLOCKS, &j);
-
- /* Now do the encryption */
- for (k = 0; k < 64; k++)
- blf_enc(&state, cdata, BCRYPT_BLOCKS / 2);
-
- for (i = 0; i < BCRYPT_BLOCKS; i++) {
- ciphertext[4 * i + 3] = cdata[i] & 0xff;
- cdata[i] = cdata[i] >> 8;
- ciphertext[4 * i + 2] = cdata[i] & 0xff;
- cdata[i] = cdata[i] >> 8;
- ciphertext[4 * i + 1] = cdata[i] & 0xff;
- cdata[i] = cdata[i] >> 8;
- ciphertext[4 * i + 0] = cdata[i] & 0xff;
- }
-
-
- i = 0;
- encrypted[i++] = '$';
- encrypted[i++] = BCRYPT_VERSION;
- if (minor)
- encrypted[i++] = minor;
- encrypted[i++] = '$';
-
- snprintf(encrypted + i, 4, "%2.2u$", logr);
-
- encode_base64((u_int8_t *) encrypted + i + 3, csalt, BCRYPT_MAXSALT);
- encode_base64((u_int8_t *) encrypted + strlen(encrypted), ciphertext,
- 4 * BCRYPT_BLOCKS - 1);
- return encrypted;
-}
-
-#ifdef __STDC__
-static void
-encode_base64(u_int8_t *buffer, u_int8_t *data, u_int16_t len)
-#else
-static void
-encode_base64(buffer, data, len)
- u_int8_t *buffer;
- u_int8_t *data;
- u_int16_t len;
-#endif
-{
- u_int8_t *bp = buffer;
- u_int8_t *p = data;
- u_int8_t c1, c2;
- while (p < data + len) {
- c1 = *p++;
- *bp++ = Base64Code[(c1 >> 2)];
- c1 = (c1 & 0x03) << 4;
- if (p >= data + len) {
- *bp++ = Base64Code[c1];
- break;
- }
- c2 = *p++;
- c1 |= (c2 >> 4) & 0x0f;
- *bp++ = Base64Code[c1];
- c1 = (c2 & 0x0f) << 2;
- if (p >= data + len) {
- *bp++ = Base64Code[c1];
- break;
- }
- c2 = *p++;
- c1 |= (c2 >> 6) & 0x03;
- *bp++ = Base64Code[c1];
- *bp++ = Base64Code[c2 & 0x3f];
- }
- *bp = '\0';
-}
-#if 0
-void
-main()
-{
- char blubber[73];
- char salt[100];
- char *p;
- salt[0] = '$';
- salt[1] = BCRYPT_VERSION;
- salt[2] = '$';
-
- snprintf(salt + 3, 4, "%2.2u$", 5);
-
- printf("24 bytes of salt: ");
- fgets(salt + 6, 94, stdin);
- salt[99] = 0;
- printf("72 bytes of password: ");
- fpurge(stdin);
- fgets(blubber, 73, stdin);
- blubber[72] = 0;
-
- p = crypt(blubber, salt);
- printf("Passwd entry: %s\n\n", p);
-
- p = bcrypt_gensalt(5);
- printf("Generated salt: %s\n", p);
- p = crypt(blubber, p);
- printf("Passwd entry: %s\n", p);
-}
-#endif
diff --git a/share/colldef/la_LN.US-ASCII.src b/share/colldef/la_LN.US-ASCII.src
deleted file mode 100644
index df3c34088764..000000000000
--- a/share/colldef/la_LN.US-ASCII.src
+++ /dev/null
@@ -1,6 +0,0 @@
-# ASCII
-#
-# $FreeBSD$
-#
-order \
- \x00;...;\xff
diff --git a/share/colldef/map.ISO8859-1 b/share/colldef/map.ISO8859-1
deleted file mode 100644
index ee5a557ca627..000000000000
--- a/share/colldef/map.ISO8859-1
+++ /dev/null
@@ -1,174 +0,0 @@
-NU \x00
-SH \x01
-SX \x02
-EX \x03
-ET \x04
-EQ \x05
-AK \x06
-BL \x07
-BS \x08
-HT \x09
-LF \x0a
-VT \x0b
-FF \x0c
-CR \x0d
-SO \x0e
-SI \x0f
-DL \x10
-D1 \x11
-D2 \x12
-D3 \x13
-D4 \x14
-NK \x15
-SY \x16
-EB \x17
-CN \x18
-EM \x19
-SB \x1a
-EC \x1b
-FS \x1c
-GS \x1d
-RS \x1e
-US \x1f
-SP \x20
-Nb \x23
-DO \x24
-At \x40
-<( \x5b
-// \x5c
-)> \x5d
-'> \x5e
-'! \x60
-(! \x7b
-!! \x7c
-!) \x7d
-'? \x7e
-DT \x7f
-PA \x80
-HO \x81
-BH \x82
-NH \x83
-IN \x84
-NL \x85
-SA \x86
-ES \x87
-HS \x88
-HJ \x89
-VS \x8a
-PD \x8b
-PU \x8c
-RI \x8d
-S2 \x8e
-S3 \x8f
-DC \x90
-P1 \x91
-P2 \x92
-TS \x93
-CC \x94
-MW \x95
-SG \x96
-EG \x97
-SS \x98
-GC \x99
-SC \x9a
-CI \x9b
-ST \x9c
-OC \x9d
-PM \x9e
-AC \x9f
-NS \xa0
-!I \xa1
-Ct \xa2
-Pd \xa3
-Cu \xa4
-Ye \xa5
-BB \xa6
-SE \xa7
-': \xa8
-Co \xa9
--a \xaa
-<< \xab
-NO \xac
--- \xad
-Rg \xae
-'m \xaf
-DG \xb0
-+- \xb1
-2S \xb2
-3S \xb3
-'' \xb4
-My \xb5
-PI \xb6
-.M \xb7
-', \xb8
-1S \xb9
--o \xba
->> \xbb
-14 \xbc
-12 \xbd
-34 \xbe
-?I \xbf
-A! \xc0
-A' \xc1
-A> \xc2
-A? \xc3
-A: \xc4
-AA \xc5
-AE \xc6
-C, \xc7
-E! \xc8
-E' \xc9
-E> \xca
-E: \xcb
-I! \xcc
-I' \xcd
-I> \xce
-I: \xcf
-D- \xd0
-N? \xd1
-O! \xd2
-O' \xd3
-O> \xd4
-O? \xd5
-O: \xd6
-*X \xd7
-O/ \xd8
-U! \xd9
-U' \xda
-U> \xdb
-U: \xdc
-Y' \xdd
-TH \xde
-ss \xdf
-a! \xe0
-a' \xe1
-a> \xe2
-a? \xe3
-a: \xe4
-aa \xe5
-ae \xe6
-c, \xe7
-e! \xe8
-e' \xe9
-e> \xea
-e: \xeb
-i! \xec
-i' \xed
-i> \xee
-i: \xef
-d- \xf0
-n? \xf1
-o! \xf2
-o' \xf3
-o> \xf4
-o? \xf5
-o: \xf6
--: \xf7
-o/ \xf8
-u! \xf9
-u' \xfa
-u> \xfb
-u: \xfc
-y' \xfd
-th \xfe
-y: \xff
diff --git a/share/colldef/map.ISO8859-15 b/share/colldef/map.ISO8859-15
deleted file mode 100644
index 041dd5a1311b..000000000000
--- a/share/colldef/map.ISO8859-15
+++ /dev/null
@@ -1,174 +0,0 @@
-NU \x00
-SH \x01
-SX \x02
-EX \x03
-ET \x04
-EQ \x05
-AK \x06
-BL \x07
-BS \x08
-HT \x09
-LF \x0a
-VT \x0b
-FF \x0c
-CR \x0d
-SO \x0e
-SI \x0f
-DL \x10
-D1 \x11
-D2 \x12
-D3 \x13
-D4 \x14
-NK \x15
-SY \x16
-EB \x17
-CN \x18
-EM \x19
-SB \x1a
-EC \x1b
-FS \x1c
-GS \x1d
-RS \x1e
-US \x1f
-SP \x20
-Nb \x23
-DO \x24
-At \x40
-<( \x5b
-// \x5c
-)> \x5d
-'> \x5e
-'! \x60
-(! \x7b
-!! \x7c
-!) \x7d
-'? \x7e
-DT \x7f
-PA \x80
-HO \x81
-BH \x82
-NH \x83
-IN \x84
-NL \x85
-SA \x86
-ES \x87
-HS \x88
-HJ \x89
-VS \x8a
-PD \x8b
-PU \x8c
-RI \x8d
-S2 \x8e
-S3 \x8f
-DC \x90
-P1 \x91
-P2 \x92
-TS \x93
-CC \x94
-MW \x95
-SG \x96
-EG \x97
-SS \x98
-GC \x99
-SC \x9a
-CI \x9b
-ST \x9c
-OC \x9d
-PM \x9e
-AC \x9f
-NS \xa0
-!I \xa1
-Ct \xa2
-Pd \xa3
-Eu \xa4
-Ye \xa5
-S< \xa6
-SE \xa7
-s< \xa8
-Co \xa9
--a \xaa
-<< \xab
-NO \xac
--- \xad
-Rg \xae
-'m \xaf
-DG \xb0
-+- \xb1
-2S \xb2
-3S \xb3
-Z< \xb4
-My \xb5
-PI \xb6
-.M \xb7
-z< \xb8
-1S \xb9
--o \xba
->> \xbb
-OE \xbc
-oe \xbd
-Y: \xbe
-?I \xbf
-A! \xc0
-A' \xc1
-A> \xc2
-A? \xc3
-A: \xc4
-AA \xc5
-AE \xc6
-C, \xc7
-E! \xc8
-E' \xc9
-E> \xca
-E: \xcb
-I! \xcc
-I' \xcd
-I> \xce
-I: \xcf
-D- \xd0
-N? \xd1
-O! \xd2
-O' \xd3
-O> \xd4
-O? \xd5
-O: \xd6
-*X \xd7
-O/ \xd8
-U! \xd9
-U' \xda
-U> \xdb
-U: \xdc
-Y' \xdd
-TH \xde
-ss \xdf
-a! \xe0
-a' \xe1
-a> \xe2
-a? \xe3
-a: \xe4
-aa \xe5
-ae \xe6
-c, \xe7
-e! \xe8
-e' \xe9
-e> \xea
-e: \xeb
-i! \xec
-i' \xed
-i> \xee
-i: \xef
-d- \xf0
-n? \xf1
-o! \xf2
-o' \xf3
-o> \xf4
-o? \xf5
-o: \xf6
--: \xf7
-o/ \xf8
-u! \xf9
-u' \xfa
-u> \xfb
-u: \xfc
-y' \xfd
-th \xfe
-y: \xff
diff --git a/share/colldef/map.ISO8859-2 b/share/colldef/map.ISO8859-2
deleted file mode 100644
index 75f201357172..000000000000
--- a/share/colldef/map.ISO8859-2
+++ /dev/null
@@ -1,174 +0,0 @@
-NU \x00
-SH \x01
-SX \x02
-EX \x03
-ET \x04
-EQ \x05
-AK \x06
-BL \x07
-BS \x08
-HT \x09
-LF \x0a
-VT \x0b
-FF \x0c
-CR \x0d
-SO \x0e
-SI \x0f
-DL \x10
-D1 \x11
-D2 \x12
-D3 \x13
-D4 \x14
-NK \x15
-SY \x16
-EB \x17
-CN \x18
-EM \x19
-SB \x1a
-EC \x1b
-FS \x1c
-GS \x1d
-RS \x1e
-US \x1f
-SP \x20
-Nb \x23
-DO \x24
-At \x40
-<( \x5b
-// \x5c
-)> \x5d
-'> \x5e
-'! \x60
-(! \x7b
-!! \x7c
-!) \x7d
-'? \x7e
-DT \x7f
-PA \x80
-HO \x81
-BH \x82
-NH \x83
-IN \x84
-NL \x85
-SA \x86
-ES \x87
-HS \x88
-HJ \x89
-VS \x8a
-PD \x8b
-PU \x8c
-RI \x8d
-S2 \x8e
-S3 \x8f
-DC \x90
-P1 \x91
-P2 \x92
-TS \x93
-CC \x94
-MW \x95
-SG \x96
-EG \x97
-SS \x98
-GC \x99
-SC \x9a
-CI \x9b
-ST \x9c
-OC \x9d
-PM \x9e
-AC \x9f
-NS \xa0
-A; \xa1
-'( \xa2
-L/ \xa3
-Cu \xa4
-L< \xa5
-S' \xa6
-SE \xa7
-': \xa8
-S< \xa9
-S, \xaa
-T< \xab
-Z' \xac
--- \xad
-Z< \xae
-Z. \xaf
-DG \xb0
-a; \xb1
-'; \xb2
-l/ \xb3
-'' \xb4
-l< \xb5
-s' \xb6
-'< \xb7
-', \xb8
-s< \xb9
-s, \xba
-t< \xbb
-z' \xbc
-'" \xbd
-z< \xbe
-z. \xbf
-R' \xc0
-A' \xc1
-A> \xc2
-A( \xc3
-A: \xc4
-L' \xc5
-C' \xc6
-C, \xc7
-C< \xc8
-E' \xc9
-E; \xca
-E: \xcb
-E< \xcc
-I' \xcd
-I> \xce
-D< \xcf
-D/ \xd0
-N' \xd1
-N< \xd2
-O' \xd3
-O> \xd4
-O" \xd5
-O: \xd6
-*X \xd7
-R< \xd8
-U0 \xd9
-U' \xda
-U" \xdb
-U: \xdc
-Y' \xdd
-T, \xde
-ss \xdf
-r' \xe0
-a' \xe1
-a> \xe2
-a( \xe3
-a: \xe4
-l' \xe5
-c' \xe6
-c, \xe7
-c< \xe8
-e' \xe9
-e; \xea
-e: \xeb
-e< \xec
-i' \xed
-i> \xee
-d< \xef
-d/ \xf0
-n' \xf1
-n< \xf2
-o' \xf3
-o> \xf4
-o" \xf5
-o: \xf6
--: \xf7
-r< \xf8
-u0 \xf9
-u' \xfa
-u" \xfb
-u: \xfc
-y' \xfd
-t, \xfe
-'. \xff
diff --git a/share/colldef/map.ISO8859-4 b/share/colldef/map.ISO8859-4
deleted file mode 100644
index 8bbeb57ea1dc..000000000000
--- a/share/colldef/map.ISO8859-4
+++ /dev/null
@@ -1,175 +0,0 @@
-# $FreeBSD$
-NU \x00
-SH \x01
-SX \x02
-EX \x03
-ET \x04
-EQ \x05
-AK \x06
-BL \x07
-BS \x08
-HT \x09
-LF \x0a
-VT \x0b
-FF \x0c
-CR \x0d
-SO \x0e
-SI \x0f
-DL \x10
-D1 \x11
-D2 \x12
-D3 \x13
-D4 \x14
-NK \x15
-SY \x16
-EB \x17
-CN \x18
-EM \x19
-SB \x1a
-EC \x1b
-FS \x1c
-GS \x1d
-RS \x1e
-US \x1f
-SP \x20
-Nb \x23
-DO \x24
-At \x40
-<( \x5b
-// \x5c
-)> \x5d
-'> \x5e
-'! \x60
-(! \x7b
-!! \x7c
-!) \x7d
-'? \x7e
-DT \x7f
-PA \x80
-HO \x81
-BH \x82
-NH \x83
-IN \x84
-NL \x85
-SA \x86
-ES \x87
-HS \x88
-HJ \x89
-VS \x8a
-PD \x8b
-PU \x8c
-RI \x8d
-S2 \x8e
-S3 \x8f
-DC \x90
-P1 \x91
-P2 \x92
-TS \x93
-CC \x94
-MW \x95
-SG \x96
-EG \x97
-SS \x98
-GC \x99
-SC \x9a
-CI \x9b
-ST \x9c
-OC \x9d
-PM \x9e
-AC \x9f
-NS \xa0
-A; \xa1
-kk \xa2
-R, \xa3
-Cu \xa4
-I? \xa5
-L, \xa6
-SE \xa7
-': \xa8
-S< \xa9
-E- \xaa
-G, \xab
-T/ \xac
--- \xad
-Z< \xae
-'m \xaf
-DG \xb0
-a; \xb1
-'; \xb2
-r, \xb3
-'' \xb4
-i? \xb5
-l, \xb6
-'< \xb7
-', \xb8
-s< \xb9
-e- \xba
-g, \xbb
-t/ \xbc
-NG \xbd
-z< \xbe
-ng \xbf
-A- \xc0
-A' \xc1
-A> \xc2
-A? \xc3
-A: \xc4
-AA \xc5
-AE \xc6
-I; \xc7
-C< \xc8
-E' \xc9
-E; \xca
-E: \xcb
-E. \xcc
-I' \xcd
-I> \xce
-I- \xcf
-D/ \xd0
-N, \xd1
-O- \xd2
-K, \xd3
-O> \xd4
-O? \xd5
-O: \xd6
-*X \xd7
-O/ \xd8
-U; \xd9
-U' \xda
-U> \xdb
-U: \xdc
-U? \xdd
-U- \xde
-ss \xdf
-a- \xe0
-a' \xe1
-a> \xe2
-a? \xe3
-a: \xe4
-aa \xe5
-ae \xe6
-i; \xe7
-c< \xe8
-e' \xe9
-e; \xea
-e: \xeb
-e. \xec
-i' \xed
-i> \xee
-i- \xef
-d/ \xf0
-n, \xf1
-o- \xf2
-k, \xf3
-o> \xf4
-o? \xf5
-o: \xf6
--: \xf7
-o/ \xf8
-u; \xf9
-u' \xfa
-u> \xfb
-u: \xfc
-u? \xfd
-u- \xfe
-'. \xff
diff --git a/share/colldef/map.ISO8859-5 b/share/colldef/map.ISO8859-5
deleted file mode 100644
index 230b559c659b..000000000000
--- a/share/colldef/map.ISO8859-5
+++ /dev/null
@@ -1,175 +0,0 @@
-# $FreeBSD$
-NU \x00
-SH \x01
-SX \x02
-EX \x03
-ET \x04
-EQ \x05
-AK \x06
-BL \x07
-BS \x08
-HT \x09
-LF \x0a
-VT \x0b
-FF \x0c
-CR \x0d
-SO \x0e
-SI \x0f
-DL \x10
-D1 \x11
-D2 \x12
-D3 \x13
-D4 \x14
-NK \x15
-SY \x16
-EB \x17
-CN \x18
-EM \x19
-SB \x1a
-EC \x1b
-FS \x1c
-GS \x1d
-RS \x1e
-US \x1f
-SP \x20
-Nb \x23
-DO \x24
-At \x40
-<( \x5b
-// \x5c
-)> \x5d
-'> \x5e
-'! \x60
-(! \x7b
-!! \x7c
-!) \x7d
-'? \x7e
-DT \x7f
-PA \x80
-HO \x81
-BH \x82
-NH \x83
-IN \x84
-NL \x85
-SA \x86
-ES \x87
-HS \x88
-HJ \x89
-VS \x8a
-PD \x8b
-PU \x8c
-RI \x8d
-S2 \x8e
-S3 \x8f
-DC \x90
-P1 \x91
-P2 \x92
-TS \x93
-CC \x94
-MW \x95
-SG \x96
-EG \x97
-SS \x98
-GC \x99
-SC \x9a
-CI \x9b
-ST \x9c
-OC \x9d
-PM \x9e
-AC \x9f
-NS \xa0
-IO \xa1
-D% \xa2
-G% \xa3
-IE \xa4
-DS \xa5
-II \xa6
-YI \xa7
-J% \xa8
-LJ \xa9
-NJ \xaa
-Ts \xab
-KJ \xac
--- \xad
-V% \xae
-DZ \xaf
-A= \xb0
-B= \xb1
-V= \xb2
-G= \xb3
-D= \xb4
-E= \xb5
-Z% \xb6
-Z= \xb7
-I= \xb8
-J= \xb9
-K= \xba
-L= \xbb
-M= \xbc
-N= \xbd
-O= \xbe
-P= \xbf
-R= \xc0
-S= \xc1
-T= \xc2
-U= \xc3
-F= \xc4
-H= \xc5
-C= \xc6
-C% \xc7
-S% \xc8
-Sc \xc9
-=" \xca
-Y= \xcb
-%" \xcc
-JE \xcd
-JU \xce
-JA \xcf
-a= \xd0
-b= \xd1
-v= \xd2
-g= \xd3
-d= \xd4
-e= \xd5
-z% \xd6
-z= \xd7
-i= \xd8
-j= \xd9
-k= \xda
-l= \xdb
-m= \xdc
-n= \xdd
-o= \xde
-p= \xdf
-r= \xe0
-s= \xe1
-t= \xe2
-u= \xe3
-f= \xe4
-h= \xe5
-c= \xe6
-c% \xe7
-s% \xe8
-sc \xe9
-=' \xea
-y= \xeb
-%' \xec
-je \xed
-ju \xee
-ja \xef
-N0 \xf0
-io \xf1
-d% \xf2
-g% \xf3
-ie \xf4
-ds \xf5
-ii \xf6
-yi \xf7
-j% \xf8
-lj \xf9
-nj \xfa
-ts \xfb
-kj \xfc
-SE \xfd
-v% \xfe
-dz \xff
diff --git a/share/colldef/map.ISO8859-7 b/share/colldef/map.ISO8859-7
deleted file mode 100644
index b45066a32b73..000000000000
--- a/share/colldef/map.ISO8859-7
+++ /dev/null
@@ -1,175 +0,0 @@
-# $FreeBSD$
-NU \x00
-SH \x01
-SX \x02
-EX \x03
-ET \x04
-EQ \x05
-AK \x06
-BL \x07
-BS \x08
-HT \x09
-LF \x0a
-VT \x0b
-FF \x0c
-CR \x0d
-SO \x0e
-SI \x0f
-DL \x10
-D1 \x11
-D2 \x12
-D3 \x13
-D4 \x14
-NK \x15
-SY \x16
-EB \x17
-CN \x18
-EM \x19
-SB \x1a
-EC \x1b
-FS \x1c
-GS \x1d
-RS \x1e
-US \x1f
-SP \x20
-Nb \x23
-DO \x24
-At \x40
-<( \x5b
-// \x5c
-)> \x5d
-'> \x5e
-'! \x60
-(! \x7b
-!! \x7c
-!) \x7d
-'? \x7e
-DT \x7f
-PA \x80
-HO \x81
-BH \x82
-NH \x83
-IN \x84
-NL \x85
-SA \x86
-ES \x87
-HS \x88
-HJ \x89
-VS \x8a
-PD \x8b
-PU \x8c
-RI \x8d
-S2 \x8e
-S3 \x8f
-DC \x90
-P1 \x91
-P2 \x92
-TS \x93
-CC \x94
-MW \x95
-SG \x96
-EG \x97
-SS \x98
-GC \x99
-SC \x9a
-CI \x9b
-ST \x9c
-OC \x9d
-PM \x9e
-AC \x9f
-NS \xa0
-9' \xa1
-'9 \xa2
-Pd \xa3
-IE \xa4
-DS \xa5
-BB \xa6
-SE \xa7
-': \xa8
-Co \xa9
-NJ \xaa
-<< \xab
-NO \xac
--- \xad
-V% \xae
--M \xaf
-DG \xb0
-+- \xb1
-2S \xb2
-3S \xb3
-'' \xb4
-'% \xb5
-A% \xb6
-.M \xb7
-E% \xb8
-Y% \xb9
-I% \xba
->> \xbb
-O% \xbc
-12 \xbd
-U% \xbe
-W% \xbf
-i3 \xc0
-A* \xc1
-B* \xc2
-G* \xc3
-D* \xc4
-E* \xc5
-Z* \xc6
-Y* \xc7
-H* \xc8
-I* \xc9
-K* \xca
-L* \xcb
-M* \xcc
-N* \xcd
-C* \xce
-O* \xcf
-P* \xd0
-R* \xd1
-v= \xd2
-S* \xd3
-T* \xd4
-U* \xd5
-F* \xd6
-X* \xd7
-Q* \xd8
-W* \xd9
-J* \xda
-V* \xdb
-a% \xdc
-e% \xdd
-y% \xde
-i% \xdf
-u3 \xe0
-a* \xe1
-b* \xe2
-g* \xe3
-d* \xe4
-e* \xe5
-z* \xe6
-y* \xe7
-h* \xe8
-i* \xe9
-k* \xea
-l* \xeb
-m* \xec
-n* \xed
-c* \xee
-o* \xef
-p* \xf0
-r* \xf1
-*s \xf2
-s* \xf3
-t* \xf4
-u* \xf5
-f* \xf6
-x* \xf7
-q* \xf8
-w* \xf9
-j* \xfa
-v* \xfb
-o% \xfc
-u% \xfd
-w% \xfe
-dz \xff
diff --git a/share/colldef/ru_RU.CP866.src b/share/colldef/ru_RU.CP866.src
deleted file mode 100644
index 2fc2d20835c3..000000000000
--- a/share/colldef/ru_RU.CP866.src
+++ /dev/null
@@ -1,39 +0,0 @@
-# CP866 (backward compatible with ASCII)
-#
-# $FreeBSD$
-#
-charmap map.CP866
-order \
-# controls
- <NU>;...;<US>;\
-#
- <NS>;<SP>;!;\";<Nb>;<DO>;\
- %;&;';\(;\);*;+;<-:>;\,;-;.;/;\
-# digits
- 0;1;(2,<2S>);3;...;9;\
-#
- :;\;;\<;<=<>;=;</>=>;>;?;<Co>;<At>;\
-# capital
- A;...;Z;\
- <A=>;<B=>;<V=>;<G=>;<D=>;<E=>;<IO>;<Z%>;<Z=>;\
- <I=>;<J=>;<K=>;<L=>;<M=>;<N=>;<O=>;<P=>;<R=>;\
- <S=>;<T=>;<U=>;<F=>;<H=>;<C=>;<C%>;<S%>;<Sc>;\
- <=">;<Y=>;<%">;<JE>;<JU>;<JA>;\
-#
- [;\\;];^;_;`;\
-# small
- a;...;z;\
- <a=>;<b=>;<v=>;<g=>;<d=>;<e=>;<io>;<z%>;<z=>;\
- <i=>;<j=>;<k=>;<l=>;<m=>;<n=>;<o=>;<p=>;<r=>;\
- <s=>;<t=>;<u=>;<f=>;<h=>;<c=>;<c%>;<s%>;<sc>;\
- <='>;<y=>;<%'>;<je>;<ju>;<ja>;\
-#
- \{;|;\};~;<.M>;<DG>;<DT>;\
-#
- <sb>;<RT>;<?2>;<Iu>;<Il>;\
- <hh>;<HH>;<vv>;<VV>;<dr>;<dR>;<Dr>;<DR>;\
- <dl>;<dL>;<Dl>;<LD>;<ur>;<uR>;<Ur>;<UR>;\
- <ul>;<uL>;<Ul>;<UL>;<vr>;<vR>;<Vr>;<VR>;\
- <vl>;<vL>;<Vl>;<VL>;<dh>;<dH>;<Dh>;<DH>;\
- <uh>;<uH>;<Uh>;<UH>;<vh>;<vH>;<Vh>;<VH>;\
- <TB>;<LB>;<FB>;<lB>;<RB>;<.S>;<:S>;<?S>;<fS>
diff --git a/share/colldef/ru_RU.KOI8-R.src b/share/colldef/ru_RU.KOI8-R.src
deleted file mode 100644
index 3a67bc4e39fb..000000000000
--- a/share/colldef/ru_RU.KOI8-R.src
+++ /dev/null
@@ -1,39 +0,0 @@
-# koi8-r (backward compatible with ASCII)
-#
-# $FreeBSD$
-#
-charmap map.KOI8-R
-order \
-# controls
- <NU>;...;<US>;\
-#
- <NS>;<SP>;!;\";<Nb>;<DO>;\
- %;&;';\(;\);*;+;<-:>;\,;-;.;/;\
-# digits
- 0;1;(2,<2S>);3;...;9;\
-#
- :;\;;\<;<=<>;=;</>=>;>;?;<Co>;<At>;\
-# capital
- A;...;Z;\
- <A=>;<B=>;<V=>;<G=>;<D=>;<E=>;<IO>;<Z%>;<Z=>;\
- <I=>;<J=>;<K=>;<L=>;<M=>;<N=>;<O=>;<P=>;<R=>;\
- <S=>;<T=>;<U=>;<F=>;<H=>;<C=>;<C%>;<S%>;<Sc>;\
- <=">;<Y=>;<%">;<JE>;<JU>;<JA>;\
-#
- [;\\;];^;_;`;\
-# small
- a;...;z;\
- <a=>;<b=>;<v=>;<g=>;<d=>;<e=>;<io>;<z%>;<z=>;\
- <i=>;<j=>;<k=>;<l=>;<m=>;<n=>;<o=>;<p=>;<r=>;\
- <s=>;<t=>;<u=>;<f=>;<h=>;<c=>;<c%>;<s%>;<sc>;\
- <='>;<y=>;<%'>;<je>;<ju>;<ja>;\
-#
- \{;|;\};~;<.M>;<DG>;<DT>;\
-#
- <sb>;<RT>;<?2>;<Iu>;<Il>;\
- <hh>;<HH>;<vv>;<VV>;<dr>;<dR>;<Dr>;<DR>;\
- <dl>;<dL>;<Dl>;<LD>;<ur>;<uR>;<Ur>;<UR>;\
- <ul>;<uL>;<Ul>;<UL>;<vr>;<vR>;<Vr>;<VR>;\
- <vl>;<vL>;<Vl>;<VL>;<dh>;<dH>;<Dh>;<DH>;\
- <uh>;<uH>;<Uh>;<UH>;<vh>;<vH>;<Vh>;<VH>;\
- <TB>;<LB>;<FB>;<lB>;<RB>;<.S>;<:S>;<?S>;<fS>
diff --git a/share/man/man9/DECLARE_MODULE.9 b/share/man/man9/DECLARE_MODULE.9
deleted file mode 100644
index 56b4093024de..000000000000
--- a/share/man/man9/DECLARE_MODULE.9
+++ /dev/null
@@ -1,113 +0,0 @@
-.\" -*- nroff -*-
-.\"
-.\" Copyright (c) 2000 Alexander Langer
-.\"
-.\" All rights reserved.
-.\"
-.\" This program is free software.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 3, 2001
-.Dt DECLARE_MODULE 9
-.Os
-.Sh NAME
-.Nm DECLARE_MODULE
-.Nd kernel module declaration macro
-.Sh SYNOPSIS
-.Fd #include <sys/module.h>
-.Fn DECLARE_MODULE "name" "moduledata_t data" "sub" "order"
-.Sh DESCRIPTION
-The
-.Fn DECLARE_MODULE
-macro declares a generic kernel module.
-It is used to register the module with the system, using the
-.Fn SYSINIT
-macro.
-.Fn DECLARE_MODULE
-is usually used within other macros, such as
-.Xr DRIVER_MODULE 9 ,
-.Xr DEV_MODULE 9
-and
-.Xr SYSCALL_MODULE 9 .
-However, it can be called directly of course, for example in
-order to implement dynamic sysctls.
-.Pp
-The arguments to
-.Fn DECLARE_MODULE :
-.Pp
-.Fa name
-is the name of the module, which will be used in the
-.Fn SYSINIT
-call to identify the module.
-.Pp
-.Fa data
-is a pointer to the
-.Vt moduledata_t
-structure, which contains two main items, the official name of the
-module name, which will be used in the
-.Vt module_t
-structure and a pointer to the event handler function of type
-.Vt modeventhand_t .
-.Pp
-.Fa sub
-is an argument directed to the
-.Fn SYSINIT
-macro.
-Valid values for this are contained in the
-.Vt sysstem_sub_id
-enumeration
-(see
-.Pa kernel.h )
-and specify the type of system startup interfaces.
-The
-.Xr DRIVER_MODULE 9
-macro uses a value of
-.Dv SI_SUB_DRIVERS
-here for example, since these modules contain a driver for a device.
-For kernel modules that are loaded at runtime, a value of
-.Dv SI_SUB_EXEC
-is common.
-.Pp
-The
-.Fa order
-value is another argument for
-.Fn SYSINIT .
-It represents the KLDs order of initialization within the subsystem.
-Valid values are defined in the
-.Vt sysinit_elem_order
-enumeration
-.Pa ( kernel.h ) .
-.Sh SEE ALSO
-.Xr DEV_MODULE 9 ,
-.Xr DRIVER_MODULE 9 ,
-.Xr SYSCALL_MODULE 9 ,
-.Xr module 9 ,
-.Pa /usr/include/sys/kernel.h ,
-.Pa /usr/share/examples/kld
-.Sh AUTHORS
-.An -nosplit
-This manual page was written by
-.An Alexander Langer Aq alex@FreeBSD.org ,
-inspired by the KLD Facility Programming Tutorial by
-.An Andrew Reiter Aq arr@watson.org .
diff --git a/share/man/man9/DEVICE_IDENTIFY.9 b/share/man/man9/DEVICE_IDENTIFY.9
deleted file mode 100644
index 19dc8059dbc1..000000000000
--- a/share/man/man9/DEVICE_IDENTIFY.9
+++ /dev/null
@@ -1,97 +0,0 @@
-.\" -*- nroff -*-
-.\"
-.\" Copyright (c) 2001 Alexander Langer
-.\"
-.\" All rights reserved.
-.\"
-.\" This program is free software.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 10, 2001
-.Dt DEVICE_IDENTIFY 9
-.Os
-.Sh NAME
-.Nm DEVICE_IDENTIFY
-.Nd identify a device, register it
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/bus.h>
-.Ft void
-.Fn DEVICE_IDENTIFY "driver_t *driver" "device_t parent"
-.Sh DESCRIPTION
-.Pp
-The identify function for a device is only needed for devices on busses
-that cannot identify their childs independently, e.g. the ISA bus.
-It is used to recognize the device (usually done by accessing non-ambigous
-registers in the hardware) and to tell the kernel about it and thus
-creating a new device instance.
-.Pp
-.Xr BUS_ADD_CHILD 9
-is used to register the device as a child of the bus.
-The device's resources (such as IRQ and I/O ports) are registered
-with the kernel by calling
-.Fn bus_set_resource
-for each resource (refer to
-.Xr bus_set_resource 9
-for more information).
-.Sh EXAMPLES
-.Pp
-The following pseudo-code shows an example of a function that
-probes for a piece of hardware and registers it and its resource
-(an I/O port) with the kernel.
-It also sets the description of the device.
-.Bd -literal
-void
-foo_identify(driver_t *driver, device_t parent)
-{
- device_t child;
-
- retrieve_device_information;
- if (devices matches one of your supported devices) {
- child = BUS_ADD_CHILD(parent, 0, "foo", -1);
- device_set_desc_copy(child, "foo chip ver.123");
- device_set_driver(child, driver);
- bus_set_resource(child, SYS_RES_IOPORT, 0, FOO_IOADDR, 1);
- }
-}
-.Ed
-.Sh RETURN VALUES
-.Pp
-Zero is returned on success,
-otherwise an appropriate error is returned (see
-.Xr errno 2 ) .
-.Sh SEE ALSO
-.Xr device 9 ,
-.Xr BUS_ADD_CHILD 9 ,
-.Xr device_add_child 9 ,
-.Xr device_set_desc_copy 9 ,
-.Xr device_set_driver 9 ,
-.Xr DEVICE_ATTACH 9 ,
-.Xr DEVICE_DETACH 9 ,
-.Xr DEVICE_PROBE 9 ,
-.Xr DEVICE_SHUTDOWN 9 ,
-.Xr bus_set_resource 9
-.Sh AUTHORS
-This man page was written by
-.An Alexander Langer Aq alex@FreeBSD.org .
diff --git a/share/man/man9/DEV_MODULE.9 b/share/man/man9/DEV_MODULE.9
deleted file mode 100644
index a173cd3fc127..000000000000
--- a/share/man/man9/DEV_MODULE.9
+++ /dev/null
@@ -1,103 +0,0 @@
-.\" -*- nroff -*-
-.\"
-.\" Copyright (c) 2001 Alexander Langer
-.\"
-.\" All rights reserved.
-.\"
-.\" This program is free software.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 11, 2001
-.Dt DEV_MODULE 9
-.Os
-.Sh NAME
-.Nm DEV_MODULE
-.Nd device driver module declaration macro
-.Sh SYNOPSIS
-.Fd #include <sys/module.h>
-.Fd #include <sys/conf.h>
-.Fn DEV_MODULE "name" "modeventhand_t evh" "void *arg"
-.Sh DESCRIPTION
-The
-.Fn DEV_MODULE
-macro declares a device driver kernel module.
-It fills in a
-.Vt moduledata_t
-structure and then calls
-.Fn DECLARE_MODULE
-with the correct args, where
-.Fa name
-is the name of the module and
-.Fa evh
-(with its argument
-.Fa arg )
-is the event handler for the module (refer to
-.Xr DECLARE_MODULE 9
-for more information).
-The event handler is supposed to create the device with
-.Fn make_dev
-on load and to destroy it when it is unloaded using
-.Fn destroy_dev .
-.Sh EXAMPLES
-.Bd -literal
-#include <sys/module.h>
-#include <sys/conf.h>
-
-static struct cdevsw foo_devsw = { ... };
-
-static dev_t sdev;
-
-static int
-foo_load(module_t mod, int cmd, void *arg)
-{
- int err = 0;
-
- switch (cmd) {
- case MOD_LOAD:
- sdev = make_dev(&foo_devsw, 0, UID_ROOT, GID_WHEEL, 0600, "foo");
- break; /* Success*/
-
- case MOD_UNLOAD:
- case MOD_SHUTDOWN:
- destroy_dev(sdev);
- break; /* Success*/
-
- default:
- err = EINVAL;
- break;
- }
-
- return(err);
-}
-
-DEV_MODULE(foo, foo_load, NULL);
-.Ed
-.Sh SEE ALSO
-.Xr module 9 ,
-.Xr DECLARE_MODULE 9 ,
-.Xr make_dev 9 ,
-.Xr destroy_dev 9
-.Sh AUTHORS
-This manual page was written by
-.An Alexander Langer Aq alex@FreeBSD.org .
diff --git a/share/man/man9/MODULE_DEPEND.9 b/share/man/man9/MODULE_DEPEND.9
deleted file mode 100644
index 2a45ce7d9473..000000000000
--- a/share/man/man9/MODULE_DEPEND.9
+++ /dev/null
@@ -1,62 +0,0 @@
-.\" -*- nroff -*-
-.\"
-.\" Copyright (c) 2001 Alexander Langer
-.\"
-.\" All rights reserved.
-.\"
-.\" This program is free software.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 11, 2001
-.Dt MODULE_DEPEND 9
-.Os
-.Sh NAME
-.Nm MODULE_DEPEND
-.Nd set kernel module dependencies
-.Sh SYNOPSIS
-.Fd #include <sys/module.h>
-.Fn MODULE_DEPEND "name" "moddepend" "int minversion" "int prefversion" "int maxversion"
-.Sh DESCRIPTION
-The
-.Fn MODULE_DEPEND
-macro sets a dependency on another kernel module with name
-.Fa moddepend ,
-which has been registered
-its version with
-.Fn MODULE_VERSION .
-Three versions must be specified on which the module can depend:
-The minimal and maximal versions this module can depend on as well
-as the preferred version.
-.Sh EXAMPLES
-.Bd -literal
-MODULE_DEPEND(foo, bar, 1, 3, 4);
-.Ed
-.Sh SEE ALSO
-.Xr DECLARE_MODULE 9 ,
-.Xr MODULE_VERSION 9 ,
-.Xr module 9
-.Sh AUTHORS
-.An -nosplit
-This manual page was written by
-.An Alexander Langer Aq alex@FreeBSD.org .
diff --git a/share/man/man9/MODULE_VERSION.9 b/share/man/man9/MODULE_VERSION.9
deleted file mode 100644
index 4d7e2bb8f34a..000000000000
--- a/share/man/man9/MODULE_VERSION.9
+++ /dev/null
@@ -1,58 +0,0 @@
-.\" -*- nroff -*-
-.\"
-.\" Copyright (c) 2001 Alexander Langer
-.\"
-.\" All rights reserved.
-.\"
-.\" This program is free software.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 11, 2001
-.Dt MODULE_VERSION 9
-.Os
-.Sh NAME
-.Nm MODULE_VERSION
-.Nd set kernel module version
-.Sh SYNOPSIS
-.Fd #include <sys/module.h>
-.Fn MODULE_VERSION "name" "int version"
-.Sh DESCRIPTION
-The
-.Fn MODULE_VERSION
-macro sets the version of the module called
-.Fa name .
-Other kernel modules can then depend on this module (see
-.Xr MODULE_DEPEND 9 ) .
-.Sh EXAMPLES
-.Bd -literal
-MODULE_VERSION(foo, 1);
-.Ed
-.Sh SEE ALSO
-.Xr DECLARE_MODULE 9 ,
-.Xr MODULE_DEPEND 9 ,
-.Xr module 9
-.Sh AUTHORS
-.An -nosplit
-This manual page was written by
-.An Alexander Langer Aq alex@FreeBSD.org .
diff --git a/share/man/man9/module.9 b/share/man/man9/module.9
deleted file mode 100644
index b29408d38b55..000000000000
--- a/share/man/man9/module.9
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" -*- nroff -*-
-.\"
-.\" Copyright (c) 2000 Alexander Langer
-.\"
-.\" All rights reserved.
-.\"
-.\" This program is free software.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd March 1, 2001
-.Dt MODULE 9
-.Os FreeBSD
-.Sh NAME
-.Nm module
-.Nd structure describing a kernel module
-.Sh DESCRIPTION
-Each module in the kernel is described by a
-.Vt module_t
-structure.
-The structure contains the name of the device, a unique ID number,
-a pointer to an event handler function and to an argument,
-which is given to the event handler,
-as well as some kernel internal data.
-.Pp
-The
-.Xr DECLARE_MODULE 9
-macro
-registers the module with the system.
-When the module is loaded, the event handler function is called with
-the
-.Fa what
-argument set to
-.Dv MOD_LOAD .
-On unload,
-.Fa what
-is set to
-.Dv MOD_UNLOAD .
-When the system is shutting down,
-.Fa what
-contains the value of
-.Dv MOD_SHUTDOWN .
-.Sh EXAMPLES
-.Bd -literal
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-
-static int foo_handler(module_t mod, int /*modeventtype_t*/ what,
- void *arg);
-
-static moduledata_t mod_data= {
- "foo",
- foo_handler,
- 0
-};
-
-MODULE_VERSION(foo, 1);
-MODULE_DEPEND(foo, bar, 1, 3, 4);
-
-DECLARE_MODULE(foo, mod_data, SI_SUB_EXEC, SI_ORDER_ANY);
-.Ed
-.Sh SEE ALSO
-.Xr DEV_MODULE 9 ,
-.Xr DECLARE_MODULE 9 ,
-.Xr DRIVER_MODULE 9 ,
-.Xr MODULE_DEPEND 9 ,
-.Xr MODULE_VERSION 9 ,
-.Xr SYSCALL_MODULE 9 ,
-.Pa /usr/share/examples/kld
-.Sh AUTHORS
-This man page was written by
-.An Alexander Langer Aq alex@FreeBSD.org .
diff --git a/share/monetdef/af_ZA.ISO8859-1.src b/share/monetdef/af_ZA.ISO8859-1.src
deleted file mode 100644
index 4a17750e0a0f..000000000000
--- a/share/monetdef/af_ZA.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-ZAR
-# currency_symbol
-R
-# mon_decimal_point
-,
-# mon_thousands_sep
-.
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/da_DK.ISO8859-1.src b/share/monetdef/da_DK.ISO8859-1.src
deleted file mode 100644
index a18b4cb4b014..000000000000
--- a/share/monetdef/da_DK.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-DKK
-# currency_symbol
-kr
-# mon_decimal_point
-,
-# mon_thousands_sep
-.
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-2
-# n_cs_precedes
-1
-# n_sep_by_space
-2
-# p_sign_posn
-4
-# n_sign_posn
-4
-# EOF
diff --git a/share/monetdef/en_AU.ISO8859-1.src b/share/monetdef/en_AU.ISO8859-1.src
deleted file mode 100644
index 826108915d36..000000000000
--- a/share/monetdef/en_AU.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-AUD
-# currency_symbol
-$
-# mon_decimal_point
-.
-# mon_thousands_sep
-,
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/en_CA.ISO8859-1.src b/share/monetdef/en_CA.ISO8859-1.src
deleted file mode 100644
index 75e31f60cc5d..000000000000
--- a/share/monetdef/en_CA.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-CAD
-# currency_symbol
-$
-# mon_decimal_point
-.
-# mon_thousands_sep
-,
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/en_GB.ISO8859-1.src b/share/monetdef/en_GB.ISO8859-1.src
deleted file mode 100644
index a0472d307968..000000000000
--- a/share/monetdef/en_GB.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-GBP
-# currency_symbol
-# mon_decimal_point
-.
-# mon_thousands_sep
-,
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/en_NZ.ISO8859-1.src b/share/monetdef/en_NZ.ISO8859-1.src
deleted file mode 100644
index 1cb82617599f..000000000000
--- a/share/monetdef/en_NZ.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-NZD
-# currency_symbol
-$
-# mon_decimal_point
-.
-# mon_thousands_sep
-,
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/en_US.ISO8859-1.src b/share/monetdef/en_US.ISO8859-1.src
deleted file mode 100644
index faf42e5ae780..000000000000
--- a/share/monetdef/en_US.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-USD
-# currency_symbol
-$
-# mon_decimal_point
-.
-# mon_thousands_sep
-,
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/et_EE.ISO8859-15.src b/share/monetdef/et_EE.ISO8859-15.src
deleted file mode 100644
index a03ad1a2afbf..000000000000
--- a/share/monetdef/et_EE.ISO8859-15.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-EEK
-# currency_symbol
-kr
-# mon_decimal_point
-.
-# mon_thousands_sep
-
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-0
-# p_sep_by_space
-1
-# n_cs_precedes
-0
-# n_sep_by_space
-1
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/fr_CA.ISO8859-1.src b/share/monetdef/fr_CA.ISO8859-1.src
deleted file mode 100644
index 64ff444dae09..000000000000
--- a/share/monetdef/fr_CA.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-CAD
-# currency_symbol
-$
-# mon_decimal_point
-,
-# mon_thousands_sep
-
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-0
-# p_sep_by_space
-1
-# n_cs_precedes
-0
-# n_sep_by_space
-1
-# p_sign_posn
-1
-# n_sign_posn
-2
-# EOF
diff --git a/share/monetdef/hu_HU.ISO8859-2.src b/share/monetdef/hu_HU.ISO8859-2.src
deleted file mode 100644
index 183f155d2c3e..000000000000
--- a/share/monetdef/hu_HU.ISO8859-2.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-HUF
-# currency_symbol
-Ft
-# mon_decimal_point
-,
-# mon_thousands_sep
-
-# mon_grouping
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-2
-# n_cs_precedes
-1
-# n_sep_by_space
-2
-# p_sign_posn
-4
-# n_sign_posn
-4
-# EOF
diff --git a/share/monetdef/is_IS.ISO8859-1.src b/share/monetdef/is_IS.ISO8859-1.src
deleted file mode 100644
index 66a80374e449..000000000000
--- a/share/monetdef/is_IS.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-ISK
-# currency_symbol
-kr
-# mon_decimal_point
-,
-# mon_thousands_sep
-.
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-0
-# p_sep_by_space
-1
-# n_cs_precedes
-0
-# n_sep_by_space
-1
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/ja_JP.eucJP.src b/share/monetdef/ja_JP.eucJP.src
deleted file mode 100644
index 462a88dc286c..000000000000
--- a/share/monetdef/ja_JP.eucJP.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-JPY
-# currency_symbol
-\
-# mon_decimal_point
-.
-# mon_thousands_sep
-,
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-0
-# frac_digits
-0
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-4
-# EOF
diff --git a/share/monetdef/ko_KR.eucKR.src b/share/monetdef/ko_KR.eucKR.src
deleted file mode 100644
index 0723dfa24596..000000000000
--- a/share/monetdef/ko_KR.eucKR.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-KRW
-# currency_symbol
-\
-# mon_decimal_point
-.
-# mon_thousands_sep
-,
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-0
-# frac_digits
-0
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-4
-# EOF
diff --git a/share/monetdef/no_NO.ISO8859-1.src b/share/monetdef/no_NO.ISO8859-1.src
deleted file mode 100644
index 181953389aa1..000000000000
--- a/share/monetdef/no_NO.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-NOK
-# currency_symbol
-kr
-# mon_decimal_point
-,
-# mon_thousands_sep
-.
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-4
-# n_sign_posn
-4
-# EOF
diff --git a/share/monetdef/pl_PL.ISO8859-2.src b/share/monetdef/pl_PL.ISO8859-2.src
deleted file mode 100644
index b749031e9960..000000000000
--- a/share/monetdef/pl_PL.ISO8859-2.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-PLN
-# currency_symbol
-z³
-# mon_decimal_point
-,
-# mon_thousands_sep
-
-# mon_grouping
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-1
-# p_sep_by_space
-2
-# n_cs_precedes
-1
-# n_sep_by_space
-2
-# p_sign_posn
-4
-# n_sign_posn
-4
-# EOF
diff --git a/share/monetdef/ru_RU.CP866.src b/share/monetdef/ru_RU.CP866.src
deleted file mode 100644
index cae485aa7d8f..000000000000
--- a/share/monetdef/ru_RU.CP866.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-RUR
-# currency_symbol
-àã¡.
-# mon_decimal_point
-,
-# mon_thousands_sep
-
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-0
-# p_sep_by_space
-1
-# n_cs_precedes
-0
-# n_sep_by_space
-1
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/ru_RU.ISO8859-5.src b/share/monetdef/ru_RU.ISO8859-5.src
deleted file mode 100644
index 0f14f0e8ba0d..000000000000
--- a/share/monetdef/ru_RU.ISO8859-5.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-RUR
-# currency_symbol
-àãÑ.
-# mon_decimal_point
-,
-# mon_thousands_sep
-
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-0
-# p_sep_by_space
-1
-# n_cs_precedes
-0
-# n_sep_by_space
-1
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/ru_RU.KOI8-R.src b/share/monetdef/ru_RU.KOI8-R.src
deleted file mode 100644
index e4064bc19693..000000000000
--- a/share/monetdef/ru_RU.KOI8-R.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-RUR
-# currency_symbol
-ÒÕÂ.
-# mon_decimal_point
-,
-# mon_thousands_sep
-
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-0
-# p_sep_by_space
-1
-# n_cs_precedes
-0
-# n_sep_by_space
-1
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/sv_SE.ISO8859-1.src b/share/monetdef/sv_SE.ISO8859-1.src
deleted file mode 100644
index a835567ef9be..000000000000
--- a/share/monetdef/sv_SE.ISO8859-1.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-SEK
-# currency_symbol
-kr
-# mon_decimal_point
-,
-# mon_thousands_sep
-
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-0
-# p_sep_by_space
-1
-# n_cs_precedes
-0
-# n_sep_by_space
-1
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/uk_UA.KOI8-U.src b/share/monetdef/uk_UA.KOI8-U.src
deleted file mode 100644
index 5464d142d093..000000000000
--- a/share/monetdef/uk_UA.KOI8-U.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-UAH
-# currency_symbol
-ÇÒÎ.
-# mon_decimal_point
-,
-# mon_thousands_sep
-
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-2
-# frac_digits
-2
-# p_cs_precedes
-0
-# p_sep_by_space
-1
-# n_cs_precedes
-0
-# n_sep_by_space
-1
-# p_sign_posn
-1
-# n_sign_posn
-1
-# EOF
diff --git a/share/monetdef/zh_CN.eucCN.src b/share/monetdef/zh_CN.eucCN.src
deleted file mode 100644
index 3f5fc2409c1e..000000000000
--- a/share/monetdef/zh_CN.eucCN.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-CNY
-# currency_symbol
-£¤
-# mon_decimal_point
-.
-# mon_thousands_sep
-,
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-0
-# frac_digits
-0
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-4
-# EOF
diff --git a/share/monetdef/zh_TW.Big5.src b/share/monetdef/zh_TW.Big5.src
deleted file mode 100644
index 1e86417df204..000000000000
--- a/share/monetdef/zh_TW.Big5.src
+++ /dev/null
@@ -1,36 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# int_curr_symbol (last character always SPACE)
-TWD
-# currency_symbol
-NT$
-# mon_decimal_point
-.
-# mon_thousands_sep
-,
-# mon_grouping, separated by ;
-3;3
-# positive_sign
-
-# negative_sign
--
-# int_frac_digits
-0
-# frac_digits
-0
-# p_cs_precedes
-1
-# p_sep_by_space
-0
-# n_cs_precedes
-1
-# n_sep_by_space
-0
-# p_sign_posn
-1
-# n_sign_posn
-4
-# EOF
diff --git a/share/msgdef/af_ZA.ISO8859-1.src b/share/msgdef/af_ZA.ISO8859-1.src
deleted file mode 100644
index a87da07feee2..000000000000
--- a/share/msgdef/af_ZA.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[jJyY].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/cs_CZ.ISO8859-2.src b/share/msgdef/cs_CZ.ISO8859-2.src
deleted file mode 100644
index a6fc83634397..000000000000
--- a/share/msgdef/cs_CZ.ISO8859-2.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[aAyY].*
-# noexpr
-^[nN].*
-# yesstr
-ano
-# nostr
-ne
-# EOF
diff --git a/share/msgdef/da_DK.ISO8859-1.src b/share/msgdef/da_DK.ISO8859-1.src
deleted file mode 100644
index a87da07feee2..000000000000
--- a/share/msgdef/da_DK.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[jJyY].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/de_DE.ISO8859-1.src b/share/msgdef/de_DE.ISO8859-1.src
deleted file mode 100644
index a87da07feee2..000000000000
--- a/share/msgdef/de_DE.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[jJyY].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/el_GR.ISO8859-7.src b/share/msgdef/el_GR.ISO8859-7.src
deleted file mode 100644
index 85d433e990cf..000000000000
--- a/share/msgdef/el_GR.ISO8859-7.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[íÍyY].*
-# noexpr
-^[ïÏnN].*
-# yesstr
-ÍÁÉ
-# nostr
-Ï×É
-# EOF
diff --git a/share/msgdef/en_US.ISO8859-1.src b/share/msgdef/en_US.ISO8859-1.src
deleted file mode 100644
index bc2594ded3df..000000000000
--- a/share/msgdef/en_US.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[yYsS].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/et_EE.ISO8859-15.src b/share/msgdef/et_EE.ISO8859-15.src
deleted file mode 100644
index 0d31afd0a2ec..000000000000
--- a/share/msgdef/et_EE.ISO8859-15.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[1JjYy].*
-# noexpr
-^[0EeNn].*
-# EOF
diff --git a/share/msgdef/fi_FI.ISO8859-1.src b/share/msgdef/fi_FI.ISO8859-1.src
deleted file mode 100644
index ac0092a84b3f..000000000000
--- a/share/msgdef/fi_FI.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[kKjJyY].*
-# noexpr
-^[nNeE].*
-# EOF
diff --git a/share/msgdef/fr_FR.ISO8859-1.src b/share/msgdef/fr_FR.ISO8859-1.src
deleted file mode 100644
index 80d0218e78e6..000000000000
--- a/share/msgdef/fr_FR.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[oOyY].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/hu_HU.ISO8859-2.src b/share/msgdef/hu_HU.ISO8859-2.src
deleted file mode 100644
index 4f009c700567..000000000000
--- a/share/msgdef/hu_HU.ISO8859-2.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[iIyY].*
-# noexpr
-^[nN].*
-# yesstr
-igen
-# nostr
-nem
-# EOF
diff --git a/share/msgdef/is_IS.ISO8859-1.src b/share/msgdef/is_IS.ISO8859-1.src
deleted file mode 100644
index a87da07feee2..000000000000
--- a/share/msgdef/is_IS.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[jJyY].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/ja_JP.eucJP.src b/share/msgdef/ja_JP.eucJP.src
deleted file mode 100644
index 2f06e015abae..000000000000
--- a/share/msgdef/ja_JP.eucJP.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[yY£ù£Ù¤Ï¥Ï].*
-# noexpr
-^[nN£î£Î¤¤¥¤].*
-# EOF
diff --git a/share/msgdef/ko_KR.eucKR.src b/share/msgdef/ko_KR.eucKR.src
deleted file mode 100644
index e839a0a217ba..000000000000
--- a/share/msgdef/ko_KR.eucKR.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[sSyY].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/nl_NL.ISO8859-1.src b/share/msgdef/nl_NL.ISO8859-1.src
deleted file mode 100644
index a87da07feee2..000000000000
--- a/share/msgdef/nl_NL.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[jJyY].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/no_NO.ISO8859-1.src b/share/msgdef/no_NO.ISO8859-1.src
deleted file mode 100644
index a87da07feee2..000000000000
--- a/share/msgdef/no_NO.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[jJyY].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/pl_PL.ISO8859-2.src b/share/msgdef/pl_PL.ISO8859-2.src
deleted file mode 100644
index a7acd2adf1f0..000000000000
--- a/share/msgdef/pl_PL.ISO8859-2.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[tTyY].*
-# noexpr
-^[nN].*
-# yesstr
-tak
-# nostr
-nie
-# EOF
diff --git a/share/msgdef/ru_RU.CP866.src b/share/msgdef/ru_RU.CP866.src
deleted file mode 100644
index df2b035bb4b6..000000000000
--- a/share/msgdef/ru_RU.CP866.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[¤„yY].*
-# noexpr
-^[­nN].*
-# yesstr
-¤ 
-# nostr
-­½â
-# EOF
diff --git a/share/msgdef/ru_RU.ISO8859-5.src b/share/msgdef/ru_RU.ISO8859-5.src
deleted file mode 100644
index 360485e980e4..000000000000
--- a/share/msgdef/ru_RU.ISO8859-5.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[Ô´yY].*
-# noexpr
-^[ݽnN].*
-# yesstr
-ÔÐ
-# nostr
-ÝÕâ
-# EOF
diff --git a/share/msgdef/ru_RU.KOI8-R.src b/share/msgdef/ru_RU.KOI8-R.src
deleted file mode 100644
index 465cfa69f259..000000000000
--- a/share/msgdef/ru_RU.KOI8-R.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[ÄäyY].*
-# noexpr
-^[ÎînN].*
-# yesstr
-ÄÁ
-# nostr
-ÎÅÔ
-# EOF
diff --git a/share/msgdef/sv_SE.ISO8859-1.src b/share/msgdef/sv_SE.ISO8859-1.src
deleted file mode 100644
index a87da07feee2..000000000000
--- a/share/msgdef/sv_SE.ISO8859-1.src
+++ /dev/null
@@ -1,10 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[jJyY].*
-# noexpr
-^[nN].*
-# EOF
diff --git a/share/msgdef/uk_UA.KOI8-U.src b/share/msgdef/uk_UA.KOI8-U.src
deleted file mode 100644
index 5eec97264d5d..000000000000
--- a/share/msgdef/uk_UA.KOI8-U.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[ÔôyY].*
-# noexpr
-^[ÎînN].*
-# yesstr
-ÔÁË
-# nostr
-Φ
-# EOF
diff --git a/share/msgdef/zh_CN.eucCN.src b/share/msgdef/zh_CN.eucCN.src
deleted file mode 100644
index 6e9cd83e04e3..000000000000
--- a/share/msgdef/zh_CN.eucCN.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[yY£ù£ÙÊÇ].*
-# noexpr
-^[nN£î£Î²»·ñ].*
-# yesstr
-ÊÇ
-# nostr
-·ñ
-# EOF
diff --git a/share/msgdef/zh_TW.Big5.src b/share/msgdef/zh_TW.Big5.src
deleted file mode 100644
index cc1bfce72027..000000000000
--- a/share/msgdef/zh_TW.Big5.src
+++ /dev/null
@@ -1,14 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# yesexpr
-^[yY£B¢ç¬O].*
-# noexpr
-^[nN¢ö¢Ü¤£§_].*
-# yesstr
-¬O
-# nostr
-§_
-# EOF
diff --git a/share/numericdef/af_ZA.ISO8859-1.src b/share/numericdef/af_ZA.ISO8859-1.src
deleted file mode 100644
index 9c48fd3b1593..000000000000
--- a/share/numericdef/af_ZA.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-.
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/cs_CZ.ISO8859-2.src b/share/numericdef/cs_CZ.ISO8859-2.src
deleted file mode 100644
index 68677812c355..000000000000
--- a/share/numericdef/cs_CZ.ISO8859-2.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping
-3;3
-# EOF
diff --git a/share/numericdef/da_DK.ISO8859-1.src b/share/numericdef/da_DK.ISO8859-1.src
deleted file mode 100644
index 9c48fd3b1593..000000000000
--- a/share/numericdef/da_DK.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-.
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/de_DE.ISO8859-1.src b/share/numericdef/de_DE.ISO8859-1.src
deleted file mode 100644
index 0036ad362aae..000000000000
--- a/share/numericdef/de_DE.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
--1
-# EOF
diff --git a/share/numericdef/el_GR.ISO8859-7.src b/share/numericdef/el_GR.ISO8859-7.src
deleted file mode 100644
index ee9ee5b4d15e..000000000000
--- a/share/numericdef/el_GR.ISO8859-7.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-.
-# grouping
--1
-# EOF
diff --git a/share/numericdef/en_US.ISO8859-1.src b/share/numericdef/en_US.ISO8859-1.src
deleted file mode 100644
index cd49d3608dc5..000000000000
--- a/share/numericdef/en_US.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-.
-# thousands_sep
-,
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/et_EE.ISO8859-15.src b/share/numericdef/et_EE.ISO8859-15.src
deleted file mode 100644
index 4ebc899962aa..000000000000
--- a/share/numericdef/et_EE.ISO8859-15.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/fi_FI.ISO8859-1.src b/share/numericdef/fi_FI.ISO8859-1.src
deleted file mode 100644
index 9c48fd3b1593..000000000000
--- a/share/numericdef/fi_FI.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-.
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/fr_FR.ISO8859-1.src b/share/numericdef/fr_FR.ISO8859-1.src
deleted file mode 100644
index 0036ad362aae..000000000000
--- a/share/numericdef/fr_FR.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
--1
-# EOF
diff --git a/share/numericdef/hu_HU.ISO8859-2.src b/share/numericdef/hu_HU.ISO8859-2.src
deleted file mode 100644
index 68677812c355..000000000000
--- a/share/numericdef/hu_HU.ISO8859-2.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping
-3;3
-# EOF
diff --git a/share/numericdef/is_IS.ISO8859-1.src b/share/numericdef/is_IS.ISO8859-1.src
deleted file mode 100644
index 4ebc899962aa..000000000000
--- a/share/numericdef/is_IS.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/ja_JP.eucJP.src b/share/numericdef/ja_JP.eucJP.src
deleted file mode 100644
index cd49d3608dc5..000000000000
--- a/share/numericdef/ja_JP.eucJP.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-.
-# thousands_sep
-,
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/ko_KR.eucKR.src b/share/numericdef/ko_KR.eucKR.src
deleted file mode 100644
index cd49d3608dc5..000000000000
--- a/share/numericdef/ko_KR.eucKR.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-.
-# thousands_sep
-,
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/nl_NL.ISO8859-1.src b/share/numericdef/nl_NL.ISO8859-1.src
deleted file mode 100644
index 0036ad362aae..000000000000
--- a/share/numericdef/nl_NL.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
--1
-# EOF
diff --git a/share/numericdef/no_NO.ISO8859-1.src b/share/numericdef/no_NO.ISO8859-1.src
deleted file mode 100644
index 9c48fd3b1593..000000000000
--- a/share/numericdef/no_NO.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-.
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/pl_PL.ISO8859-2.src b/share/numericdef/pl_PL.ISO8859-2.src
deleted file mode 100644
index 68677812c355..000000000000
--- a/share/numericdef/pl_PL.ISO8859-2.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping
-3;3
-# EOF
diff --git a/share/numericdef/ru_RU.CP866.src b/share/numericdef/ru_RU.CP866.src
deleted file mode 100644
index 4ebc899962aa..000000000000
--- a/share/numericdef/ru_RU.CP866.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/ru_RU.ISO8859-5.src b/share/numericdef/ru_RU.ISO8859-5.src
deleted file mode 100644
index 4ebc899962aa..000000000000
--- a/share/numericdef/ru_RU.ISO8859-5.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/ru_RU.KOI8-R.src b/share/numericdef/ru_RU.KOI8-R.src
deleted file mode 100644
index 4ebc899962aa..000000000000
--- a/share/numericdef/ru_RU.KOI8-R.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/sv_SE.ISO8859-1.src b/share/numericdef/sv_SE.ISO8859-1.src
deleted file mode 100644
index 4ebc899962aa..000000000000
--- a/share/numericdef/sv_SE.ISO8859-1.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/uk_UA.KOI8-U.src b/share/numericdef/uk_UA.KOI8-U.src
deleted file mode 100644
index 4ebc899962aa..000000000000
--- a/share/numericdef/uk_UA.KOI8-U.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-,
-# thousands_sep
-
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/zh_CN.eucCN.src b/share/numericdef/zh_CN.eucCN.src
deleted file mode 100644
index cd49d3608dc5..000000000000
--- a/share/numericdef/zh_CN.eucCN.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-.
-# thousands_sep
-,
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/numericdef/zh_TW.Big5.src b/share/numericdef/zh_TW.Big5.src
deleted file mode 100644
index cd49d3608dc5..000000000000
--- a/share/numericdef/zh_TW.Big5.src
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# decimal_point
-.
-# thousands_sep
-,
-# grouping, separated by ;
-3;3
-# EOF
diff --git a/share/syscons/fonts/cp866u-8x14.fnt b/share/syscons/fonts/cp866u-8x14.fnt
deleted file mode 100644
index 9251f5e5d19e..000000000000
--- a/share/syscons/fonts/cp866u-8x14.fnt
+++ /dev/null
@@ -1,84 +0,0 @@
-# $FreeBSD$
-begin 644 cp866u-8x14.fnt
-M`````````````````````'Z!I8&!I9F!?@``````?O_;___#Y_]^````````
-M;/[^_OY\.!`````````0.'S^?#@0````````&#P\Y^?G&!@\```````8/'[_
-M_WX8&#P``````````!@\/!@``````/______Y\/#Y_______`````#QF0D)F
-M/`````#_____PYF]O9G#_____P``'@X:,GC,S,QX```````\9F9F/!A^&!@`
-M`````#\S/S`P,'#PX```````?V-_8V-C9^?FP``````8&-L\YSS;&!@`````
-M`(#`X/C^^.#`@````````@8./OX^#@8"```````8/'X8&!A^/!@``````&9F
-M9F9F9@!F9@``````?]O;VWL;&QL;`````'S&8#ALQL9L.`S&?```````````
-M`/[^_@``````&#Q^&!@8?CP8?@`````8/'X8&!@8&!@``````!@8&!@8&'X\
-M&``````````8#/X,&````````````#!@_F`P`````````````,#`P/X`````
-M```````H;/YL*```````````$#@X?'S^_@````````#^_GQ\.#@0````````
-M```````````````````8/#P\&!@`&!@`````9F9F)```````````````;&S^
-M;&QL_FQL````&!A\QL+`?`:&QGP8&```````PL8,&#!FQ@``````.&QL.';<
-MS,QV`````#`P,&````````````````P8,#`P,#`8#```````,!@,#`P,#!@P
-M`````````&8\_SQF````````````&!A^&!@`````````````````&!@8,```
-M````````_@`````````````````````8&````````@8,&#!@P(````````!\
-MQL[>]N;&QGP``````!@X>!@8&!@8?@``````?,8&#!@P8,;^``````!\Q@8&
-M/`8&QGP```````P</&S,_@P,'@``````_L#`P/P&!L9\```````X8,#`_,;&
-MQGP``````/[&!@P8,#`P,```````?,;&QGS&QL9\``````!\QL;&?@8&#'@`
-M```````8&````!@8`````````!@8````&!@P```````&#!@P8#`8#`8`````
-M`````'X``'X`````````8#`8#`8,&#!@``````!\QL8,&!@`&!@``````'S&
-MQM[>WMS`?```````$#ALQL;^QL;&``````#\9F9F?&9F9OP``````#QFPL#`
-MP,)F/```````^&QF9F9F9FSX``````#^9F)H>&AB9OX``````/YF8FAX:&!@
-M\```````/&;"P,#>QF8Z``````#&QL;&_L;&QL8``````#P8&!@8&!@8/```
-M````'@P,#`P,S,QX``````#F9FQL>&QL9N8``````/!@8&!@8&)F_@``````
-MQN[^_M;&QL;&``````#&YO;^WL[&QL8``````#ALQL;&QL9L.```````_&9F
-M9GQ@8&#P``````!\QL;&QM;>?`P.`````/QF9F9\;&9FY@``````?,;&8#@,
-MQL9\``````!^?EH8&!@8&#P``````,;&QL;&QL;&?```````QL;&QL;&;#@0
-M``````#&QL;&UM;^?&P``````,;&;#@X.&S&Q@``````9F9F9CP8&!@\````
-M``#^QHP8,&#"QOX``````#PP,#`P,#`P/```````@,#@<#@<#@8"```````\
-M#`P,#`P,##P````0.&S&`````````````````````````````/\`,#`8````
-M`````````````````'@,?,S,=@``````X&!@>&QF9F9\``````````!\QL#`
-MQGP``````!P,##QLS,S,=@``````````?,;^P,9\```````X;&1@\&!@8/``
-M`````````';,S,Q\#,QX````X&!@;'9F9F;F```````8&``X&!@8&#P`````
-M``8&``X&!@8&9F8\````X&!@9FQX;&;F```````X&!@8&!@8&#P`````````
-M`.S^UM;6Q@``````````W&9F9F9F``````````!\QL;&QGP``````````-QF
-M9F9\8&#P````````=LS,S'P,#!X```````#<=F9@8/```````````'S&<!S&
-M?```````$#`P_#`P,#8<``````````#,S,S,S'8``````````&9F9F8\&```
-M````````QL;6UOYL``````````#&;#@X;,8``````````,;&QL9^!@SX````
-M````_LP8,&;^```````.&!@8<!@8&`X``````!@8&!@`&!@8&```````<!@8
-M&`X8&!AP``````!VW```````````````````$#ALQL;^````````/F;&QL;^
-MQL;&``````#^P,#\QL;&QOP``````/S&QL;\QL;&_```````_L;`P,#`P,#`
-M```````\;&QL;&QL;/[&@@```/[&P,#PP,#&_@``````UM;65'S6UM;6````
-M``!\Q@8<!@;&QGP``````,;&QL[>]N;&Q@`````,VL;&SM[VYL;&``````#&
-MS-CP\-C,QL8``````!XV9L;&QL;&Q@``````@L;&[N[^UL;&``````#&QL;&
-M_L;&QL8``````'[&QL;&QL;&_```````_L;&QL;&QL;&``````#\QL;&QOS`
-MP,```````'S&QL#`P,;&?```````?GY:&!@8&!@8``````#&QL;&QGX&QGP`
-M`````'S6UM;6UGP0.```````QL9L.#ALQL;&``````#,S,S,S,S,S/X"!@``
-M`,;&QL;&?@8&!@````#6UM;6UM;6UM;^`````-;6UM;6UM;6UOX"!@```.#@
-M8'QF9F9F?```````QL;&YK:VMK;F``````#`P,#\QL;&QOP``````'S&!AX&
-M!L;&?```````G+:VMO:VMK:<``````!^QL;&QGXV9L8``````````'S&QO[&
-MQ@``````````_L#\QL;\``````````#\QOS&QOP``````````/["P,#`P```
-M````````/&QL;&S^QH(```````!\QOS`QGP``````````-;6?-;6U@``````
-M````?,8<!L9\``````````#&SM[VYL8````````,&,;.WO;FQ@``````````
-MQLSXV,S&```````````^9F9F9L8``````````,;N_M;&Q@``````````QL;&
-M_L;&``````````!^QL;&QOP``````````/[&QL;&Q@```!%$$4011!%$$401
-M1!%$5:I5JE6J5:I5JE6J5:K==]UWW7?==]UWW7?==Q@8&!@8&!@8&!@8&!@8
-M&!@8&!@8&/@8&!@8&!@8&!@8&/@8^!@8&!@8&#8V-C8V-C;V-C8V-C8V````
-M`````/XV-C8V-C8``````/@8^!@8&!@8&#8V-C8V]@;V-C8V-C8V-C8V-C8V
-M-C8V-C8V-C8``````/X&]C8V-C8V-C8V-C8V]@;^````````-C8V-C8V-OX`
-M```````8&!@8&/@8^`````````````````#X&!@8&!@8&!@8&!@8&!\`````
-M```8&!@8&!@8_P````````````````#_&!@8&!@8&!@8&!@8&!\8&!@8&!@`
-M````````_P```````!@8&!@8&!C_&!@8&!@8&!@8&!@?&!\8&!@8&!@V-C8V
-M-C8V-S8V-C8V-C8V-C8V-S`_```````````````_,#<V-C8V-C8V-C8V-O<`
-M_P``````````````_P#W-C8V-C8V-C8V-C8W,#<V-C8V-C8``````/\`_P``
-M`````#8V-C8V]P#W-C8V-C8V&!@8&!C_`/\````````V-C8V-C8V_P``````
-M````````_P#_&!@8&!@8`````````/\V-C8V-C8V-C8V-C8V/P```````!@8
-M&!@8'Q@?```````````````?&!\8&!@8&!@`````````/S8V-C8V-C8V-C8V
-M-C;_-C8V-C8V&!@8&!C_&/\8&!@8&!@8&!@8&!@8^``````````````````?
-M&!@8&!@8__________________\`````````__________#P\/#P\/#P\/#P
-M\/#P#P\/#P\/#P\/#P\/#P__________````````````````_,;&QL;\P,``
-M``````!\QL#`QGP``````````'Y:&!@8&```````````QL;&QL9^!GP`````
-M`!!\UM;6UGP0.````````,9L.#ALQ@``````````S,S,S,S^!@P```````#&
-MQL9^!@8``````````-;6UM;6_@``````````UM;6UM;^`@8```````#@8'QF
-M9GP``````````,;&YK:VY@``````````P,#\QL;\``````````!\QAX&QGP`
-M`````````)RVMO:VG```````````?L9^-F;&````;&P`_L;`\,#`QOX`````
-M`&QL`'S&_,#&?``````&_L#`P,#`P,#```````````;^P,#`P,```````'S&
-MP,#XP,#&?```````````?,;PP,9\`````!@`/!@8&!@8&#P``````!`0`#@8
-M&!@8/`````!F`#P8&!@8&!@\```````H*``X&!@8&#P`````````````&```
-M```````/#`P,#`SL;#P<``````!\@KJJHJ*JNH)\````<-@P8,CX````````
-=``````!\?'Q\?'P```````````````````````!\
-`
-end
diff --git a/share/syscons/fonts/cp866u-8x16.fnt b/share/syscons/fonts/cp866u-8x16.fnt
deleted file mode 100644
index 78965b06aec8..000000000000
--- a/share/syscons/fonts/cp866u-8x16.fnt
+++ /dev/null
@@ -1,96 +0,0 @@
-# $FreeBSD$
-begin 644 cp866u-8x16.fnt
-M````````````````````````?H&E@8&EF8&!?@```````'[_V___V^?__WX`
-M`````````&S^_O[^?#@0```````````0.'S^?#@0```````````8/#SGY^<8
-M&#P`````````&#Q^__]^&!@\`````````````!@\/!@```````#________G
-MP\/G________```````\9D)"9CP``````/______PYF]O9G#______\``!X&
-M#AIXS,S,S'@````````\9F9F9CP8?A@8````````/S,_,#`P,'#PX```````
-M`']C?V-C8V-GY^;`````````&!C;/.<\VQ@8``````"`P.#P^/[X\.#`@```
-M`````@8.'C[^/AX.!@(````````8/'X8&!A^/!@`````````9F9F9F9F9@!F
-M9@```````'_;V]M[&QL;&QL``````'S&8#ALQL9L.`S&?```````````````
-M_O[^_@```````!@\?A@8&'X\&'X````````8/'X8&!@8&!@8````````&!@8
-M&!@8&'X\&````````````!@,_@P8```````````````P8/Y@,```````````
-M`````,#`P/X``````````````"AL_FPH`````````````!`X.'Q\_OX`````
-M``````#^_GQ\.#@0```````````````````````````````8/#P\&!@8`!@8
-M``````!F9F8D``````````````````!L;/YL;&S^;&P`````&!A\QL+`?`8&
-MAL9\&!@```````#"Q@P8,&#&A@```````#AL;#AVW,S,S'8``````#`P,&``
-M````````````````#!@P,#`P,#`8#````````#`8#`P,#`P,&#``````````
-M``!F//\\9@``````````````&!A^&!@````````````````````8&!@P````
-M`````````/X````````````````````````8&````````````@8,&#!@P(``
-M```````X;,;&UM;&QFPX````````&#AX&!@8&!@8?@```````'S&!@P8,&#`
-MQOX```````!\Q@8&/`8&!L9\````````#!P\;,S^#`P,'@```````/[`P,#\
-M!@8&QGP````````X8,#`_,;&QL9\````````_L8&!@P8,#`P,````````'S&
-MQL9\QL;&QGP```````!\QL;&?@8&!@QX```````````8&````!@8````````
-M````&!@````8&#``````````!@P8,&`P&`P&````````````?@``?@``````
-M``````!@,!@,!@P8,&````````!\QL8,&!@8`!@8`````````'S&QM[>WMS`
-M?````````!`X;,;&_L;&QL8```````#\9F9F?&9F9F;\````````/&;"P,#`
-MP,)F/````````/AL9F9F9F9F;/@```````#^9F)H>&A@8F;^````````_F9B
-M:'AH8&!@\````````#QFPL#`WL;&9CH```````#&QL;&_L;&QL;&````````
-M/!@8&!@8&!@8/````````!X,#`P,#,S,S'@```````#F9F9L>'AL9F;F````
-M````\&!@8&!@8&)F_@```````,;N_O[6QL;&QL8```````#&YO;^WL[&QL;&
-M````````?,;&QL;&QL;&?````````/QF9F9\8&!@8/````````!\QL;&QL;&
-MUMY\#`X`````_&9F9GQL9F9FY@```````'S&QF`X#`;&QGP```````!^?EH8
-M&!@8&!@\````````QL;&QL;&QL;&?````````,;&QL;&QL9L.!````````#&
-MQL;&UM;6_NYL````````QL9L?#@X?&S&Q@```````&9F9F8\&!@8&#P`````
-M``#^QH8,&#!@PL;^````````/#`P,#`P,#`P/`````````"`P.!P.!P.!@(`
-M```````\#`P,#`P,#`P\`````!`X;,8`````````````````````````````
-M````_P``,#`8````````````````````````>`Q\S,S,=@```````.!@8'AL
-M9F9F9GP```````````!\QL#`P,9\````````'`P,/&S,S,S,=@``````````
-M`'S&_L#`QGP````````X;&1@\&!@8&#P````````````=LS,S,S,?`S,>```
-M`.!@8&QV9F9F9N8````````8&``X&!@8&!@\````````!@8`#@8&!@8&!F9F
-M/````.!@8&9L>'AL9N8````````X&!@8&!@8&!@\````````````[/[6UM;6
-MQ@```````````-QF9F9F9F8```````````!\QL;&QL9\````````````W&9F
-M9F9F?&!@\````````';,S,S,S'P,#!X```````#<=F9@8&#P````````````
-M?,9@.`S&?````````!`P,/PP,#`P-AP```````````#,S,S,S,QV````````
-M````9F9F9F8\&````````````,;&UM;6_FP```````````#&;#@X.&S&````
-M````````QL;&QL;&?@8,^````````/[,&#!@QOX````````.&!@8<!@8&!@.
-M````````&!@8&``8&!@8&````````'`8&!@.&!@8&'````````!VW```````
-M```````````````0.&S&QL;^`````````#YFQL;&_L;&QL8```````#^P,#`
-M_,;&QL;\````````_,;&QOS&QL;&_````````/[&P,#`P,#`P,`````````\
-M;&QL;&QL;&S^QH(`````_L;`P/#`P,#&_@```````-;6UE1\UM;6UM8`````
-M``!\Q@8&'`8&QL9\````````QL;&QL[>]N;&Q@``````#-K&QL;.WO;FQL8`
-M``````#&S-CP\-C,QL;&````````'C9FQL;&QL;&Q@```````,;&[N[^_M;6
-MQL8```````#&QL;&_L;&QL;&````````?L;&QL;&QL;&_````````/[&QL;&
-MQL;&QL8```````#\QL;&QL;\P,#`````````?,;&P,#`P,;&?````````'Y^
-M6A@8&!@8&!@```````#&QL;&QL9^!L9\````````?-;6UM;6UGP0.```````
-M`,;&;#@X;,;&QL8```````#,S,S,S,S,S,S^`@8$````QL;&QL9^!@8&!@``
-M`````-;6UM;6UM;6UOX```````#6UM;6UM;6UM;^`@8$````X.!@8'QF9F9F
-M?````````,;&QL;FMK:VMN8```````#`P,#`_,;&QL;\````````>,P&!AX>
-M!@;,>````````)RVMK;VMK:VMIP```````!^QL;&QGXV9L;&````````````
-M?,;&QO[&Q@```````````/[`_,;&QOP```````````#\QL;\QL;\````````
-M````_L;"P,#`P````````````#QL;&QL;/[&@@````````!\QL;\P,9\````
-M````````UM;6?-;6U@```````````'S&!AP&QGP```````````#&QL[>]N;&
-M``````````P8QL;.WO;FQ@```````````,;,V/C8S,8````````````^9F9F
-M9F;&````````````QN[^UL;&Q@```````````,;&QO[&QL8```````````!^
-MQL;&QL;\````````````_L;&QL;&Q@`````11!%$$4011!%$$4011!%$5:I5
-MJE6J5:I5JE6J5:I5JMUWW7?==]UWW7?==]UWW7<8&!@8&!@8&!@8&!@8&!@8
-M&!@8&!@8&/@8&!@8&!@8&!@8&!@8^!CX&!@8&!@8&!@V-C8V-C8V]C8V-C8V
-M-C8V`````````/XV-C8V-C8V-@``````^!CX&!@8&!@8&!@V-C8V-O8&]C8V
-M-C8V-C8V-C8V-C8V-C8V-C8V-C8V-@``````_@;V-C8V-C8V-C8V-C8V-O8&
-M_@``````````-C8V-C8V-OX``````````!@8&!@8^!CX````````````````
-M````^!@8&!@8&!@8&!@8&!@8&!\``````````!@8&!@8&!C_````````````
-M````````_Q@8&!@8&!@8&!@8&!@8&!\8&!@8&!@8&`````````#_````````
-M```8&!@8&!@8_Q@8&!@8&!@8&!@8&!@?&!\8&!@8&!@8&#8V-C8V-C8W-C8V
-M-C8V-C8V-C8V-C<P/P`````````````````_,#<V-C8V-C8V-C8V-C8V]P#_
-M`````````````````/\`]S8V-C8V-C8V-C8V-C8W,#<V-C8V-C8V-@``````
-M_P#_```````````V-C8V-O<`]S8V-C8V-C8V&!@8&!C_`/\``````````#8V
-M-C8V-C;_`````````````````/\`_Q@8&!@8&!@8`````````/\V-C8V-C8V
-M-C8V-C8V-C8_```````````8&!@8&!\8'P`````````````````?&!\8&!@8
-M&!@8&``````````_-C8V-C8V-C8V-C8V-C8V_S8V-C8V-C8V&!@8&!C_&/\8
-M&!@8&!@8&!@8&!@8&!CX````````````````````'Q@8&!@8&!@8________
-M_____________P````````#____________P\/#P\/#P\/#P\/#P\/#P#P\/
-M#P\/#P\/#P\/#P\/#_________\``````````````````/S&QL;&QOS`P,``
-M``````!\QL#`PL9\````````````?EH8&!@8&````````````,;&QL;&QGX&
-MQGP``````!!\UM;6UM9\$#@`````````QFPX.&S&Q@```````````,S,S,S,
-MS/X&#`````````#&QL;&?@8&````````````UM;6UM;6_@```````````-;6
-MUM;6UOX"!@0```````#@8'QF9F9\````````````QL;FMK:VY@``````````
-M`,#`_,;&QOP```````````!\Q@8>!L9\````````````G+:V]K:VG```````
-M`````'[&QGXV9L8`````9F8`_L;`P/#`P,;^````````;&P`?,;&_,#&?```
-M````!O[`P,#`P,#`P,````````````;^P,#`P,#`````````/&;`P/C`P,!F
-M/````````````'S&P/#`QGP``````!@`/!@8&!@8&!@\````````$!``.!@8
-M&!@8/```````9@`\&!@8&!@8&#P````````H*``X&!@8&!@\````````````
-M````&```````````#PP,#`P,[&QL/!P```````!\@KJJHJ*BJKJ"?`````!P
-MV#!@R/@`````````````````?'Q\?'Q\?```````````````````````````
-!`#!@
-`
-end
diff --git a/share/syscons/fonts/cp866u-8x8.fnt b/share/syscons/fonts/cp866u-8x8.fnt
deleted file mode 100644
index f979393c3135..000000000000
--- a/share/syscons/fonts/cp866u-8x8.fnt
+++ /dev/null
@@ -1,50 +0,0 @@
-# $FreeBSD$
-begin 644 cp866u-8x8.fnt
-M``````````!^@:6!O9F!?G[_V__#Y_]^;/[^_GPX$``0.'S^?#@0`#A\./[^
-M?#A\$!`X?/Y\.'P``!@\/!@``/__Y\/#Y___`#QF0D)F/`#_PYF]O9G#_P\'
-M#WW,S,QX/&9F9CP8?A@_,S\P,'#PX']C?V-C9^;`F5H\Y^<\6IF`X/C^^."`
-M``(./OX^#@(`&#Q^&!A^/!AF9F9F9@!F`'_;VWL;&QL`/F,X;&PXS'@`````
-M?GY^`!@\?AA^/!C_&#Q^&!@8&``8&!@8?CP8```8#/X,&````#!@_F`P````
-M`,#`P/X````D9O]F)````!@\?O__````__]^/!@`````````````,'AX,#``
-M,`!L;&P``````&QL_FS^;&P`,'S`>`SX,```QLP8,&;&`#AL.';<S'8`8&#`
-M```````8,&!@8#`8`&`P&!@8,&```&8\_SQF````,##\,#``````````,#!@
-M````_````````````#`P``8,&#!@P(``?,;.WO;F?``P<#`P,##\`'C,##A@
-MS/P`>,P,.`S,>``</&S,_@P>`/S`^`P,S'@`.&#`^,S,>`#\S`P8,#`P`'C,
-MS'C,S'@`>,S,?`P8<```,#```#`P```P,```,#!@&#!@P&`P&````/P``/P`
-M`&`P&`P8,&``>,P,&#``,`!\QM[>WL!X`#!XS,S\S,P`_&9F?&9F_``\9L#`
-MP&8\`/AL9F9F;/@`_F)H>&AB_@#^8FAX:&#P`#QFP,#.9CX`S,S,_,S,S`!X
-M,#`P,#!X`!X,#`S,S'@`YF9L>&QFY@#P8&!@8F;^`,;N_O[6QL8`QN;VWL[&
-MQ@`X;,;&QFPX`/QF9GQ@8/``>,S,S-QX'`#\9F9\;&;F`'C,X'`<S'@`_+0P
-M,#`P>`#,S,S,S,S\`,S,S,S,>#``QL;&UO[NQ@#&1&PX.&S&`,S,S'@P,'@`
-M_L:,&#)F_@!X8&!@8&!X`,!@,!@,!@(`>!@8&!@8>``0.&S&````````````
-M``#_,#`8`````````'@,?,Q\`&!@8'QF9GP```!XS,#,>``,#`Q\S,Q\````
-M>,S\P'@`.&Q@\&!@\````'S,S'P,^&!@?&9F9F8`,`!P,#`P>``,``P,#`QL
-M.&!@9FQX;&8`<#`P,#`P>````,S^_M;&````^,S,S,P```!XS,S,>````'QF
-M9GQ@8```?,S,?`P,``#<=F9@\````'S`>`SX`!`P?#`P-!@```#,S,S,?```
-M`,S,S'@P````QM;^_FP```#&;#ALQ@```,S,S'P,^```_)@P9/P`'#`PX#`P
-M'``8&!@`&!@8`.`P,!PP,.``=MP`````````$#ALQL;^`!XV9F9^9F8`?&!@
-M?&9F?`!\9F9\9F9\`'Y@8&!@8&``.&QL;&QL_L9^8&!\8&!^`-O;?CQ^V]L`
-M/&8&'`9F/`!F9FY^=F9F`#QF;GYV9F8`9FQX<'AL9@`>-F9F9F9F`,;N_O[6
-MQL8`9F9F?F9F9@`\9F9F9F8\`'YF9F9F9F8`?&9F9GQ@8``\9F!@8&8\`'X8
-M&!@8&!@`9F9F/@9F/`!^V]O;?A@8`&9F/!@\9F8`9F9F9F9F?P-F9F8^!@8&
-M`-O;V]O;V_\`V]O;V]O;_P/@8&!\9F9\`,;&QO;>WO8`8&!@?&9F?`!XC`8^
-M!HQX`,[;V_O;V\X`/F9F9CXV9@```'@,?,QV```\8#QF9CP```!\9GQF?```
-M`'Y@8&!@````/&QL;/[&```\9GY@/````-M^/'[;````/&8,9CP```!F;GYV
-M9@``&&9N?G9F````9FQX;&8````>-F9F9@```,;^_M;&````9F9^9F8````\
-M9F9F/````'YF9F9F`!%$$4011!%$5:I5JE6J5:K==]UWW7?==Q@8&!@8&!@8
-M&!@8^!@8&!@8^!CX&!@8&#8V-O8V-C8V````_C8V-C8`^!CX&!@8&#;V!O8V
-M-C8V-C8V-C8V-C8`_@;V-C8V-C;V!OX`````-C8V_@`````8^!CX````````
-M`/@8&!@8&!@8'P`````8&!C_`````````/\8&!@8&!@8'Q@8&!@```#_````
-M`!@8&/\8&!@8&!\8'Q@8&!@V-C8W-C8V-C8W,#\``````#\P-S8V-C8V]P#_
-M``````#_`/<V-C8V-C<P-S8V-C8`_P#_`````#;W`/<V-C8V&/\`_P`````V
-M-C;_``````#_`/\8&!@8````_S8V-C8V-C8_`````!@?&!\``````!\8'Q@8
-M&!@````_-C8V-C8V-O\V-C8V&/\8_Q@8&!@8&!CX`````````!\8&!@8____
-M______\```#_______#P\/#P\/#P#P\/#P\/#P____\`````````?&9F?&``
-M```\9F!F/````'X8&!@8````9F8^!CP```!^V]M^&````&8\&#QF````9F9F
-M9G\#``!F9CX&!@```-O;V]O_````V]O;V_\#``#@8'QF?````,;&]M[V````
-M8&!\9GP```!\!CX&?````,[;^]O.````/F8^-F8`9@!^8'Q@?@`D`#QF?F`\
-M``9^8&!@8&````9^8&!@8``\9L#XP&8\````?,#XP'P`,'@P,#`P>``@`'`P
-M,#!X`$AX,#`P,'@`4`!P,#`P>``````X.`````,"!@3,:#@0/$*9H:&90CPP
-72!`@>```````?'Q\?`````````!"?@`X
-`
-end
diff --git a/share/syscons/fonts/koi8-u-8x14.fnt b/share/syscons/fonts/koi8-u-8x14.fnt
deleted file mode 100644
index a99856a19083..000000000000
--- a/share/syscons/fonts/koi8-u-8x14.fnt
+++ /dev/null
@@ -1,84 +0,0 @@
-# $FreeBSD$
-begin 444 koi8-u-8x14
-M`````````````````````'Z!I8&!I9F!?@``````?O_;___#Y_]^````````
-M;/[^_OY\.!`````````0.'S^?#@0````````&#P\Y^?G&!@\```````8/'[_
-M_WX8&#P``````````!@\/!@``````/______Y\/#Y_______`````#QF0D)F
-M/`````#_____PYF]O9G#_____P``'@X:,GC,S,QX```````\9F9F/!A^&!@`
-M`````#\S/S`P,'#PX```````?V-_8V-C9^?FP``````8&-L\YSS;&!@`````
-M`(#`X/C^^.#`@````````@8./OX^#@8"```````8/'X8&!A^/!@``````&9F
-M9F9F9@!F9@``````?]O;VWL;&QL;`````'S&8#ALQL9L.`S&?```````````
-M`/[^_@``````&#Q^&!@8?CP8?@`````8/'X8&!@8&!@``````!@8&!@8&'X\
-M&``````````8#/X,&````````````#!@_F`P`````````````,#`P/X`````
-M```````H;/YL*```````````$#@X?'S^_@````````#^_GQ\.#@0````````
-M```````````````````8/#P\&!@`&!@`````9F9F)```````````````;&S^
-M;&QL_FQL````&!A\QL+`?`:&QGP8&```````PL8,&#!FQ@``````.&QL.';<
-MS,QV`````#`P,&````````````````P8,#`P,#`8#```````,!@,#`P,#!@P
-M`````````&8\_SQF````````````&!A^&!@`````````````````&!@8,```
-M````````_@`````````````````````8&````````@8,&#!@P(````````!\
-MQL[>]N;&QGP``````!@X>!@8&!@8?@``````?,8&#!@P8,;^``````!\Q@8&
-M/`8&QGP```````P</&S,_@P,'@``````_L#`P/P&!L9\```````X8,#`_,;&
-MQGP``````/[&!@P8,#`P,```````?,;&QGS&QL9\``````!\QL;&?@8&#'@`
-M```````8&````!@8`````````!@8````&!@P```````&#!@P8#`8#`8`````
-M`````'X``'X`````````8#`8#`8,&#!@``````!\QL8,&!@`&!@``````'S&
-MQM[>WMS`?```````$#ALQL;^QL;&``````#\9F9F?&9F9OP``````#QFPL#`
-MP,)F/```````^&QF9F9F9FSX``````#^9F)H>&AB9OX``````/YF8FAX:&!@
-M\```````/&;"P,#>QF8Z``````#&QL;&_L;&QL8``````#P8&!@8&!@8/```
-M````'@P,#`P,S,QX``````#F9FQL>&QL9N8``````/!@8&!@8&)F_@``````
-MQN[^_M;&QL;&``````#&YO;^WL[&QL8``````#ALQL;&QL9L.```````_&9F
-M9GQ@8&#P``````!\QL;&QM;>?`P.`````/QF9F9\;&9FY@``````?,;&8#@,
-MQL9\``````!^?EH8&!@8&#P``````,;&QL;&QL;&?```````QL;&QL;&;#@0
-M``````#&QL;&UM;^?&P``````,;&;#@X.&S&Q@``````9F9F9CP8&!@\````
-M``#^QHP8,&#"QOX``````#PP,#`P,#`P/```````@,#@<#@<#@8"```````\
-M#`P,#`P,##P````0.&S&`````````````````````````````/\`,#`8````
-M`````````````````'@,?,S,=@``````X&!@>&QF9F9\``````````!\QL#`
-MQGP``````!P,##QLS,S,=@``````````?,;^P,9\```````X;&1@\&!@8/``
-M`````````';,S,Q\#,QX````X&!@;'9F9F;F```````8&``X&!@8&#P`````
-M``8&``X&!@8&9F8\````X&!@9FQX;&;F```````X&!@8&!@8&#P`````````
-M`.S^UM;6Q@``````````W&9F9F9F``````````!\QL;&QGP``````````-QF
-M9F9\8&#P````````=LS,S'P,#!X```````#<=F9@8/```````````'S&<!S&
-M?```````$#`P_#`P,#8<``````````#,S,S,S'8``````````&9F9F8\&```
-M````````QL;6UOYL``````````#&;#@X;,8``````````,;&QL9^!@SX````
-M````_LP8,&;^```````.&!@8<!@8&`X``````!@8&!@`&!@8&```````<!@8
-M&`X8&!AP``````!VW```````````````````$#ALQL;^``````````````#_
-M````````&!@8&!@8&!@8&!@8&!@`````````'Q@8&!@8&`````````#X&!@8
-M&!@8&!@8&!@8&!\````````8&!@8&!@8^````````!@8&!@8&!@?&!@8&!@8
-M&!@8&!@8&/@8&!@8&!@`````````_Q@8&!@8&!@8&!@8&!C_````````&!@8
-M&!@8&/\8&!@8&!C_________``````````````````#_________________
-M___________P\/#P\/#P\/#P\/#P\`\/#P\/#P\/#P\/#P\/$4011!%$$401
-M1!%$$415JE6J5:I5JE6J5:I5JMUWW7?==]UWW7?==]UW```.&QL8&!@8&!@8
-M&!@`````?'Q\?'Q\`````````````!@8``````````\,#`P,#.QL/!P`````
-M````=MP`=MP`````````#!@P8#`8#`!^```````P&`P&#!@P`'X`````````
-M`````````````!@8&!@8&!@8V-AP`````#AL;#@`````````````<-@P8,CX
-M```````````````````8````````````&!@`?@`8&````````````/\`_P``
-M`````#8V-C8V-C8V-C8V-C8V```````?&!\8&!@8&!@``&QL`'S&_,#&?```
-M````````?,;PP,9\```````````_,#<V-C8V-C8``!`0`#@8&!@8/```````
-M*"@`.!@8&!@\``````````#^!O8V-C8V-C88&!@8&!\8'P```````#8V-C8V
-M-C8_````````-C8V-C8W,#\````````8&!@8&/@8^``````````````&_L#`
-MP,#`````-C8V-C;V!OX````````8&!@8&!\8'Q@8&!@8&#8V-C8V-C8W-C8V
-M-C8V-C8V-C8W,#<V-C8V-C88&!@8&/@8^!@8&!@8&&QL`/[&P/#`P,;^````
-M``!\QL#`^,#`QGP````V-C8V-O8&]C8V-C8V-@`8`#P8&!@8&!@\`````&8`
-M/!@8&!@8&#P``````````/\`]S8V-C8V-A@8&!@8_P#_````````-C8V-C8V
-M-O\````````V-C8V-O<`_P```````!@8&!@8_QC_&!@8&!@8``;^P,#`P,#`
-MP,`````V-C8V-O<`]S8V-C8V-@``?(*ZJJ*BJKJ"?`````````"<MK;VMIP`
-M`````````'S&QO[&Q@``````````_L#\QL;\``````````#,S,S,S/X&#```
-M`````#QL;&QL_L:"````````?,;\P,9\`````````!!\UM;6UGP0.```````
-M`/["P,#`P```````````QFPX.&S&``````````#&SM[VYL8````````,&,;.
-MWO;FQ@``````````QLSXV,S&```````````^9F9F9L8``````````,;N_M;&
-MQ@``````````QL;&_L;&``````````!^QL;&QOP``````````/[&QL;&Q@``
-M````````?L9^-F;&``````````#\QL;&QOS`P````````'S&P,#&?```````
-M````?EH8&!@8``````````#&QL;&QGX&?````````-;6?-;6U@``````````
-M_,;\QL;\``````````#`P/S&QOP``````````,;&YK:VY@``````````?,8<
-M!L9\``````````#6UM;6UOX``````````'S&'@;&?```````````UM;6UM;^
-M`@8```````#&QL9^!@8``````````.!@?&9F?```````G+:VMO:VMK:<````
-M```^9L;&QO[&QL8``````/[`P/S&QL;&_```````S,S,S,S,S,S^`@8````\
-M;&QL;&QL;/[&@@```/[&P,#PP,#&_@``````?-;6UM;6?!`X``````#^QL#`
-MP,#`P,```````,;&;#@X;,;&Q@``````QL;&SM[VYL;&``````S:QL;.WO;F
-MQL8``````,;,V/#PV,S&Q@``````'C9FQL;&QL;&``````""QL;N[O[6QL8`
-M`````,;&QL;^QL;&Q@``````?L;&QL;&QL;\``````#^QL;&QL;&QL8`````
-M`'[&QL;&?C9FQ@``````_,;&QL;\P,#```````!\QL;`P,#&QGP``````'Y^
-M6A@8&!@8&```````QL;&QL9^!L9\``````#6UM94?-;6UM8``````/S&QL;\
-MQL;&_```````P,#`_,;&QL;\``````#&QL;FMK:VMN8``````'S&!AP&!L;&
-M?`````#6UM;6UM;6UM;^``````!\Q@8>!@;&QGP`````UM;6UM;6UM;6_@(&
-=````QL;&QL9^!@8&``````#@X&!\9F9F9GP`````
-`
-end
diff --git a/share/syscons/fonts/koi8-u-8x16.fnt b/share/syscons/fonts/koi8-u-8x16.fnt
deleted file mode 100644
index 8f8dd3ef33f3..000000000000
--- a/share/syscons/fonts/koi8-u-8x16.fnt
+++ /dev/null
@@ -1,96 +0,0 @@
-# $FreeBSD$
-begin 444 koi8-u-8x16
-M````````````````````````?H&E@8&EF8&!?@```````'[_V___V^?__WX`
-M`````````&S^_O[^?#@0```````````0.'S^?#@0```````````8/#SGY^<8
-M&#P`````````&#Q^__]^&!@\`````````````!@\/!@```````#________G
-MP\/G________```````\9D)"9CP``````/______PYF]O9G#______\``!X&
-M#AIXS,S,S'@````````\9F9F9CP8?A@8````````/S,_,#`P,'#PX```````
-M`']C?V-C8V-GY^;`````````&!C;/.<\VQ@8``````"`P.#P^/[X\.#`@```
-M`````@8.'C[^/AX.!@(````````8/'X8&!A^/!@`````````9F9F9F9F9@!F
-M9@```````'_;V]M[&QL;&QL``````'S&8#ALQL9L.`S&?```````````````
-M_O[^_@```````!@\?A@8&'X\&'X````````8/'X8&!@8&!@8````````&!@8
-M&!@8&'X\&````````````!@,_@P8```````````````P8/Y@,```````````
-M`````,#`P/X``````````````"AL_FPH`````````````!`X.'Q\_OX`````
-M``````#^_GQ\.#@0```````````````````````````````8/#P\&!@8`!@8
-M``````!F9F8D``````````````````!L;/YL;&S^;&P`````&!A\QL+`?`8&
-MAL9\&!@```````#"Q@P8,&#&A@```````#AL;#AVW,S,S'8``````#`P,&``
-M````````````````#!@P,#`P,#`8#````````#`8#`P,#`P,&#``````````
-M``!F//\\9@``````````````&!A^&!@````````````````````8&!@P````
-M`````````/X````````````````````````8&````````````@8,&#!@P(``
-M```````X;,;&UM;&QFPX````````&#AX&!@8&!@8?@```````'S&!@P8,&#`
-MQOX```````!\Q@8&/`8&!L9\````````#!P\;,S^#`P,'@```````/[`P,#\
-M!@8&QGP````````X8,#`_,;&QL9\````````_L8&!@P8,#`P,````````'S&
-MQL9\QL;&QGP```````!\QL;&?@8&!@QX```````````8&````!@8````````
-M````&!@````8&#``````````!@P8,&`P&`P&````````````?@``?@``````
-M``````!@,!@,!@P8,&````````!\QL8,&!@8`!@8`````````'S&QM[>WMS`
-M?````````!`X;,;&_L;&QL8```````#\9F9F?&9F9F;\````````/&;"P,#`
-MP,)F/````````/AL9F9F9F9F;/@```````#^9F)H>&A@8F;^````````_F9B
-M:'AH8&!@\````````#QFPL#`WL;&9CH```````#&QL;&_L;&QL;&````````
-M/!@8&!@8&!@8/````````!X,#`P,#,S,S'@```````#F9F9L>'AL9F;F````
-M````\&!@8&!@8&)F_@```````,;N_O[6QL;&QL8```````#&YO;^WL[&QL;&
-M````````?,;&QL;&QL;&?````````/QF9F9\8&!@8/````````!\QL;&QL;&
-MUMY\#`X`````_&9F9GQL9F9FY@```````'S&QF`X#`;&QGP```````!^?EH8
-M&!@8&!@\````````QL;&QL;&QL;&?````````,;&QL;&QL9L.!````````#&
-MQL;&UM;6_NYL````````QL9L?#@X?&S&Q@```````&9F9F8\&!@8&#P`````
-M``#^QH8,&#!@PL;^````````/#`P,#`P,#`P/`````````"`P.!P.!P.!@(`
-M```````\#`P,#`P,#`P\`````!`X;,8`````````````````````````````
-M````_P``,#`8````````````````````````>`Q\S,S,=@```````.!@8'AL
-M9F9F9GP```````````!\QL#`P,9\````````'`P,/&S,S,S,=@``````````
-M`'S&_L#`QGP````````X;&1@\&!@8&#P````````````=LS,S,S,?`S,>```
-M`.!@8&QV9F9F9N8````````8&``X&!@8&!@\````````!@8`#@8&!@8&!F9F
-M/````.!@8&9L>'AL9N8````````X&!@8&!@8&!@\````````````[/[6UM;6
-MQ@```````````-QF9F9F9F8```````````!\QL;&QL9\````````````W&9F
-M9F9F?&!@\````````';,S,S,S'P,#!X```````#<=F9@8&#P````````````
-M?,9@.`S&?````````!`P,/PP,#`P-AP```````````#,S,S,S,QV````````
-M````9F9F9F8\&````````````,;&UM;6_FP```````````#&;#@X.&S&````
-M````````QL;&QL;&?@8,^````````/[,&#!@QOX````````.&!@8<!@8&!@.
-M````````&!@8&``8&!@8&````````'`8&!@.&!@8&'````````!VW```````
-M```````````````0.&S&QL;^````````````````_P``````````&!@8&!@8
-M&!@8&!@8&!@8&``````````?&!@8&!@8&!@`````````^!@8&!@8&!@8&!@8
-M&!@8&!\``````````!@8&!@8&!CX```````````8&!@8&!@8'Q@8&!@8&!@8
-M&!@8&!@8&/@8&!@8&!@8&`````````#_&!@8&!@8&!@8&!@8&!@8_P``````
-M````&!@8&!@8&/\8&!@8&!@8&/________\`````````````````````____
-M______________________________#P\/#P\/#P\/#P\/#P\/`/#P\/#P\/
-M#P\/#P\/#P\/$4011!%$$4011!%$$4011%6J5:I5JE6J5:I5JE6J5:K==]UW
-MW7?==]UWW7?==]UW```.&QL8&!@8&!@8&!@8&`````!\?'Q\?'Q\````````
-M````````&!@```````````\,#`P,#.QL;#P<````````````=MP`=MP`````
-M```````,&#!@,!@,`'X`````````,!@,!@P8,`!^````````````````````
-M```````8&!@8&!@8&-C8V'```````#AL;#@```````````````!PV#!@R/@`
-M`````````````````````!@``````````````!@8`'X`&!@`````````````
-M_P#_```````````V-C8V-C8V-C8V-C8V-C8V```````?&!\8&!@8&!@8&```
-M;&P`?,;&_,#&?````````````'S&P/#`QGP````````````_,#<V-C8V-C8V
-M-@``$!``.!@8&!@8/````````"@H`#@8&!@8&#P```````````#^!O8V-C8V
-M-C8V-A@8&!@8'Q@?```````````V-C8V-C8V/P``````````-C8V-C8W,#\`
-M`````````!@8&!@8^!CX````````````````!O[`P,#`P,``````-C8V-C;V
-M!OX``````````!@8&!@8'Q@?&!@8&!@8&!@V-C8V-C8V-S8V-C8V-C8V-C8V
-M-C8W,#<V-C8V-C8V-A@8&!@8^!CX&!@8&!@8&!AF9@#^QL#`\,#`QOX`````
-M```\9L#`^,#`P&8\`````#8V-C8V]@;V-C8V-C8V-C8`&``\&!@8&!@8&#P`
-M`````&8`/!@8&!@8&!@\````````````_P#W-C8V-C8V-C88&!@8&/\`_P``
-M````````-C8V-C8V-O\``````````#8V-C8V]P#_```````````8&!@8&/\8
-M_Q@8&!@8&!@8``;^P,#`P,#`P,#``````#8V-C8V]P#W-C8V-C8V-C8``'R"
-MNJJBHJ*JNH)\``````````"<MK;VMK:<````````````?,;&QO[&Q@``````
-M`````/[`_,;&QOP```````````#,S,S,S,S^!@P`````````/&QL;&QL_L:"
-M`````````'S&QOS`QGP``````````!!\UM;6UM9\$#@`````````_L;"P,#`
-MP````````````,9L.#ALQL8```````````#&QL[>]N;&``````````P8QL;.
-MWO;FQ@```````````,;,V/C8S,8````````````^9F9F9F;&````````````
-MQN[^UL;&Q@```````````,;&QO[&QL8```````````!^QL;&QL;\````````
-M````_L;&QL;&Q@```````````'[&QGXV9L8```````````#\QL;&QL;\P,#`
-M````````?,;`P,+&?````````````'Y:&!@8&!@```````````#&QL;&QL9^
-M!L9\````````UM;6?-;6U@```````````/S&QOS&QOP```````````#`P/S&
-MQL;\````````````QL;FMK:VY@```````````'S&!AP&QGP```````````#6
-MUM;6UM;^````````````?,8&'@;&?````````````-;6UM;6UOX"!@0`````
-M``#&QL;&?@8&````````````X&!\9F9F?````````)RVMK;VMK:VMIP`````
-M```^9L;&QO[&QL;&````````_L#`P/S&QL;&_````````,S,S,S,S,S,S/X"
-M!@0````\;&QL;&QL;&S^QH(`````_L;`P/#`P,#&_@```````'S6UM;6UM9\
-M$#@```````#^QL#`P,#`P,#`````````QL9L.#ALQL;&Q@```````,;&QL;.
-MWO;FQL8```````S:QL;&SM[VYL;&````````QLS8\/#8S,;&Q@```````!XV
-M9L;&QL;&QL8```````#&QN[N_O[6UL;&````````QL;&QO[&QL;&Q@``````
-M`'[&QL;&QL;&QOP```````#^QL;&QL;&QL;&````````?L;&QL9^-F;&Q@``
-M`````/S&QL;&QOS`P,````````!\QL;`P,#`QL9\````````?GY:&!@8&!@8
-M&````````,;&QL;&QGX&QGP```````#6UM94?-;6UM;6````````_,;&QOS&
-MQL;&_````````,#`P,#\QL;&QOP```````#&QL;&YK:VMK;F````````?,8&
-M!AP&!L;&?````````-;6UM;6UM;6UOX```````!XS`8&'AX&!LQX````````
-MUM;6UM;6UM;6_@(&!````,;&QL;&?@8&!@8```````#@X&!@?&9F9F9\````
-!`-;6
-`
-end
diff --git a/share/syscons/fonts/koi8-u-8x8.fnt b/share/syscons/fonts/koi8-u-8x8.fnt
deleted file mode 100644
index a17f5c21a287..000000000000
--- a/share/syscons/fonts/koi8-u-8x8.fnt
+++ /dev/null
@@ -1,50 +0,0 @@
-# $FreeBSD$
-begin 444 koi8-u-8x8
-M``````````!^@:6!O9F!?G[_V__#Y_]^;/[^_GPX$``0.'S^?#@0`#A\./[^
-M?#A\$!`X?/Y\.'P``!@\/!@``/__Y\/#Y___`#QF0D)F/`#_PYF]O9G#_P\'
-M#WW,S,QX/&9F9CP8?A@_,S\P,'#PX']C?V-C9^;`F5H\Y^<\6IF`X/C^^."`
-M``(./OX^#@(`&#Q^&!A^/!AF9F9F9@!F`'_;VWL;&QL`/F,X;&PXS'@`````
-M?GY^`!@\?AA^/!C_&#Q^&!@8&``8&!@8?CP8```8#/X,&````#!@_F`P````
-M`,#`P/X````D9O]F)````!@\?O__````__]^/!@`````````````,'AX,#``
-M,`!L;&P``````&QL_FS^;&P`,'S`>`SX,```QLP8,&;&`#AL.';<S'8`8&#`
-M```````8,&!@8#`8`&`P&!@8,&```&8\_SQF````,##\,#``````````,#!@
-M````_````````````#`P``8,&#!@P(``?,;.WO;F?``P<#`P,##\`'C,##A@
-MS/P`>,P,.`S,>``</&S,_@P>`/S`^`P,S'@`.&#`^,S,>`#\S`P8,#`P`'C,
-MS'C,S'@`>,S,?`P8<```,#```#`P```P,```,#!@&#!@P&`P&````/P``/P`
-M`&`P&`P8,&``>,P,&#``,`!\QM[>WL!X`#!XS,S\S,P`_&9F?&9F_``\9L#`
-MP&8\`/AL9F9F;/@`_F)H>&AB_@#^8FAX:&#P`#QFP,#.9CX`S,S,_,S,S`!X
-M,#`P,#!X`!X,#`S,S'@`YF9L>&QFY@#P8&!@8F;^`,;N_O[6QL8`QN;VWL[&
-MQ@`X;,;&QFPX`/QF9GQ@8/``>,S,S-QX'`#\9F9\;&;F`'C,X'`<S'@`_+0P
-M,#`P>`#,S,S,S,S\`,S,S,S,>#``QL;&UO[NQ@#&1&PX.&S&`,S,S'@P,'@`
-M_L:,&#)F_@!X8&!@8&!X`,!@,!@,!@(`>!@8&!@8>``0.&S&````````````
-M``#_,#`8`````````'@,?,Q\`&!@8'QF9GP```!XS,#,>``,#`Q\S,Q\````
-M>,S\P'@`.&Q@\&!@\````'S,S'P,^&!@?&9F9F8`,`!P,#`P>``,``P,#`QL
-M.&!@9FQX;&8`<#`P,#`P>````,S^_M;&````^,S,S,P```!XS,S,>````'QF
-M9GQ@8```?,S,?`P,``#<=F9@\````'S`>`SX`!`P?#`P-!@```#,S,S,?```
-M`,S,S'@P````QM;^_FP```#&;#ALQ@```,S,S'P,^```_)@P9/P`'#`PX#`P
-M'``8&!@`&!@8`.`P,!PP,.``=MP`````````$#ALQL;^`````/\`````&!@8
-M&!@8&!@````?&!@8&````/@8&!@8&!@8'P`````8&!CX`````!@8&!\8&!@8
-M&!@8^!@8&!@```#_&!@8&!@8&/\`````&!@8_Q@8&!C___\``````````/__
-M_______________P\/#P\/#P\`\/#P\/#P\/$4011!%$$415JE6J5:I5JMUW
-MW7?==]UW#AL;&!@8&!@``'Q\?'P````````8`````P(&!,QH.!``=MP`=MP`
-M```,&#!@,!@,`#`8#`8,&#```````$)^`!@8&!@8V-AP`#AL;#@````P2!`@
-M>````````#@X`````!@8`'X`&!@`_P#_`````#8V-C8V-C8V`!\8'Q@8&!@D
-M`#QF?F`\````?,#XP'P``#\P-S8V-C8@`'`P,#!X`%``<#`P,'@``/X&]C8V
-M-C88'Q@?`````#8V-C\`````-C<P/P`````8^!CX```````&?F!@8&``-O8&
-M_@`````8'Q@?&!@8&#8V-C<V-C8V-C<P-S8V-C88^!CX&!@8&&8`?F!\8'X`
-M/&;`^,!F/``V]@;V-C8V-C!X,#`P,'@`2'@P,#`P>```_P#W-C8V-AC_`/\`
-M````-C8V_P`````V]P#_`````!C_&/\8&!@8-C8V_S8V-C8V]P#W-C8V-CQ"
-MF:&AF4(\``#.V_O;S@```'@,?,QV```\8#QF9CP```!F9F9F?P,``#QL;&S^
-MQ@``/&9^8#P```!^V]M^&````'Y@8&!@````9CP8/&8```!F;GYV9@``&&9N
-M?G9F````9FQX;&8````>-F9F9@```,;^_M;&````9F9^9F8````\9F9F/```
-M`'YF9F9F````/F8^-F8```!\9F9\8````#QF8&8\````?A@8&!@```!F9CX&
-M/````-M^/'[;````?&9\9GP```!@8'QF?````,;&]M[V````/&8,9CP```#;
-MV]O;_P```'P&/@9\````V]O;V_\#``!F9CX&!@```.!@?&9\`,[;V_O;V\X`
-M'C9F9GYF9@!\8&!\9F9\`&9F9F9F9G\#.&QL;&QL_L9^8&!\8&!^`'[;V]M^
-M&!@`?F!@8&!@8`!F9CP8/&9F`&9F;GYV9F8`/&9N?G9F9@!F;'AP>&QF`!XV
-M9F9F9F8`QN[^_M;&Q@!F9F9^9F9F`#QF9F9F9CP`?F9F9F9F9@`^9F9F/C9F
-M`'QF9F9\8&``/&9@8&!F/`!^&!@8&!@8`&9F9CX&9CP`V]M^/'[;VP!\9F9\
-M9F9\`&!@8'QF9GP`QL;&]M[>]@`\9@8<!F8\`-O;V]O;V_\`>(P&/@:,>`#;
-7V]O;V]O_`V9F9CX&!@8`X&!@?&9F?``<
-`
-end
diff --git a/share/syscons/keymaps/gr.elot.acc.kbd b/share/syscons/keymaps/gr.elot.acc.kbd
deleted file mode 100644
index 2abc97dc93ce..000000000000
--- a/share/syscons/keymaps/gr.elot.acc.kbd
+++ /dev/null
@@ -1,281 +0,0 @@
-# $FreeBSD$
-#
-# Built on Wed 1 Apr 15:59:44 EEST 1998 by peppe@cs.uoi.gr
-# alt
-# scan cntrl alt alt cntrl lock
-# code base shift cntrl shift alt shift cntrl shift state
-# ------------------------------------------------------------------
-#
- 000 nop nop nop nop nop nop nop nop O
- 001 esc esc nop nop esc esc debug nop O
- 002 '1' '!' nop nop '1' '!' nop nop O
- 003 '2' '"' nul nul '2' '"' nul nul O
- 004 '3' '£' nop nop '3' '£' nop nop O
- 005 '4' '$' nop nop '4' '$' nop nop O
- 006 '5' '%' nop nop '5' '%' nop nop O
- 007 '6' '^' rs rs '6' '^' rs rs O
- 008 '7' '&' nop nop '7' '&' nop nop O
- 009 '8' '*' nop nop '8' '*' nop nop O
- 010 '9' '(' nop nop '9' '(' nop nop O
- 011 '0' ')' nop nop '0' ')' nop nop O
- 012 '-' '_' ns ns '-' '_' ns ns O
- 013 '=' '+' nop nop '=' '+' nop nop O
- 014 bs bs del del bs bs del del O
- 015 ht btab nop nop ht btab nop nop O
- 016 'q' 'Q' dc1 dc1 171 187 dc1 dc1 C
- 017 'w' 'W' etb etb 242 211 etb etb C
- 018 'e' 'E' enq enq 229 197 enq enq C
- 019 'r' 'R' dc2 dc2 241 209 dc2 dc2 C
- 020 't' 'T' dc4 dc4 244 212 dc4 dc4 C
- 021 'y' 'Y' em em 245 213 em em C
- 022 'u' 'U' nak nak 232 200 nak nak C
- 023 'i' 'I' ht ht 233 201 ht ht C
- 024 'o' 'O' si si 239 207 si si C
- 025 'p' 'P' dle dle 240 208 dle dle C
- 026 '[' '{' esc esc '[' '{' esc esc O
- 027 ']' '}' gs gs ']' '}' gs gs O
- 028 cr cr nl nl cr cr nl nl O
- 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O
- 030 'a' 'A' soh soh 225 193 soh soh C
- 031 's' 'S' dc3 dc3 243 211 dc3 dc3 C
- 032 'd' 'D' eot eot 228 196 eot eot C
- 033 'f' 'F' ack ack 246 214 ack ack C
- 034 'g' 'G' bel bel 227 195 bel bel C
- 035 'h' 'H' bs bs 231 199 bs bs C
- 036 'j' 'J' nl nl 238 206 nl nl C
- 037 'k' 'K' vt vt 234 202 vt vt C
- 038 'l' 'L' ff ff 235 203 ff ff C
- 039 ';' ':' nop nop ';' ':' nop nop O
- 040 '/' '@' nop nop dacu ddia nop dcir O
- 041 '`' ''' nop nop '`' ''' nop nop O
- 042 lshift lshift lshift lshift lshift lshift lshift lshift O
- 043 '#' '~' fs fs '#' '~' fs fs O
- 044 'z' 'Z' sub sub 230 198 sub sub C
- 045 'x' 'X' can can 247 215 can can C
- 046 'c' 'C' etx etx 248 216 etx etx C
- 047 'v' 'V' syn syn 249 217 syn syn C
- 048 'b' 'B' stx stx 226 194 stx stx C
- 049 'n' 'N' so so 237 205 so so C
- 050 'm' 'M' cr cr 236 204 cr cr C
- 051 ',' '<' nop nop ',' '<' nop nop O
- 052 '.' '>' nop nop '.' '>' nop nop O
- 053 '/' '?' nop nop '/' '?' nop nop O
- 054 rshift rshift rshift rshift rshift rshift rshift rshift O
- 055 '*' '*' nscr nscr '*' '*' nscr nscr O
- 056 lalt lalt lalt lalt lalt lalt lalt lalt O
- 057 ' ' ' ' nul ' ' alock ' ' susp ' ' O
- 058 clock clock clock clock clock clock clock clock O
- 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O
- 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O
- 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O
- 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O
- 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O
- 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O
- 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O
- 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O
- 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O
- 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O
- 069 nlock nlock nlock nlock nlock nlock nlock nlock O
- 070 slock slock slock slock slock slock slock slock O
- 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N
- 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N
- 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N
- 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N
- 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N
- 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N
- 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N
- 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N
- 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N
- 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N
- 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N
- 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N
- 083 del '.' '.' '.' '.' '.' boot boot N
- 084 ns ns ns ns ns ns ns ns O
- 085 nop nop nop nop nop nop nop nop O
- 086 '\' '|' nop nop '\' '|' nop nop O
- 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O
- 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O
- 089 cr cr nl nl cr cr nl nl O
- 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O
- 091 '/' '/' '/' '/' '/' '/' '/' '/' N
- 092 nscr pscr debug nop nop nop nop nop O
- 093 ralt ralt ralt ralt ralt ralt ralt ralt O
- 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O
- 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O
- 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O
- 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O
- 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O
- 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O
- 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O
- 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O
- 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O
- 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O
- 104 slock slock slock slock slock slock slock slock O
- 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O
- 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O
- 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O
-#
- 108 nop nop nop nop nop nop nop nop O
- 109 nop nop nop nop nop nop nop nop O
- 110 nop nop nop nop nop nop nop nop O
- 111 nop nop nop nop nop nop nop nop O
- 112 nop nop nop nop nop nop nop nop O
- 113 nop nop nop nop nop nop nop nop O
- 114 nop nop nop nop nop nop nop nop O
- 115 nop nop nop nop nop nop nop nop O
- 116 nop nop nop nop nop nop nop nop O
- 117 nop nop nop nop nop nop nop nop O
- 118 nop nop nop nop nop nop nop nop O
- 119 nop nop nop nop nop nop nop nop O
- 120 nop nop nop nop nop nop nop nop O
- 121 nop nop nop nop nop nop nop nop O
- 122 nop nop nop nop nop nop nop nop O
- 123 nop nop nop nop nop nop nop nop O
- 124 nop nop nop nop nop nop nop nop O
- 125 nop nop nop nop nop nop nop nop O
- 126 nop nop nop nop nop nop nop nop O
- 127 nop nop nop nop nop nop nop nop O
-#
- 128 nop nop nop nop nop nop nop nop O
- 129 esc esc nop nop esc esc debug nop O
- 130 '1' '!' nop nop '1' '!' nop nop O
- 131 '2' '"' nul nul '2' '"' nul nul O
- 132 '3' '£' nop nop '3' '£' nop nop O
- 133 '4' '$' nop nop '4' '$' nop nop O
- 134 '5' '%' nop nop '5' '%' nop nop O
- 135 '6' '^' rs rs '6' '^' rs rs O
- 136 '7' '&' nop nop '7' '&' nop nop O
- 137 '8' '*' nop nop '8' '*' nop nop O
- 138 '9' '(' nop nop '9' '(' nop nop O
- 139 '0' ')' nop nop '0' ')' nop nop O
- 140 '-' '_' ns ns '-' '_' ns ns O
- 141 '=' '+' nop nop '=' '+' nop nop O
- 142 bs bs del del bs bs del del O
- 143 ht btab nop nop ht btab nop nop O
- 144 171 187 dc1 dc1 'q' 'Q' dc1 dc1 C
- 145 242 211 etb etb 'w' 'W' etb etb C
- 146 229 197 enq enq 'e' 'E' enq enq C
- 147 241 209 dc2 dc2 'r' 'R' dc2 dc2 C
- 148 244 212 dc4 dc4 't' 'T' dc4 dc4 C
- 149 245 213 em em 'y' 'Y' em em C
- 150 232 200 nak nak 'u' 'U' nak nak C
- 151 233 201 ht ht 'i' 'I' ht ht C
- 152 239 207 si si 'o' 'O' si si C
- 153 240 208 dle dle 'p' 'P' dle dle C
- 154 '[' '{' esc esc '[' '{' esc esc O
- 155 ']' '}' gs gs ']' '}' gs gs O
- 156 cr cr nl nl cr cr nl nl O
- 157 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O
- 158 225 193 soh soh 'a' 'A' soh soh C
- 159 243 211 dc3 dc3 's' 'S' dc3 dc3 C
- 160 228 196 eot eot 'd' 'D' eot eot C
- 161 246 214 ack ack 'f' 'F' ack ack C
- 162 227 195 bel bel 'g' 'G' bel bel C
- 163 231 199 bs bs 'h' 'H' bs bs C
- 164 238 206 nl nl 'j' 'J' nl nl C
- 165 234 202 vt vt 'k' 'K' vt vt C
- 166 235 203 ff ff 'l' 'L' ff ff C
- 167 ';' ':' nop nop ';' ':' nop nop O
- 168 dacu ddia dcir nop '/' '@' nop nop O
- 169 '`' ''' nop nop '`' ''' nop nop O
- 170 lshift lshift lshift lshift lshift lshift lshift lshift O
- 171 '#' '~' fs fs '#' '~' fs fs O
- 172 230 198 sub sub 'z' 'Z' sub sub C
- 173 247 215 can can 'x' 'X' can can C
- 174 248 216 etx etx 'c' 'C' etx etx C
- 175 249 217 syn syn 'v' 'V' syn syn C
- 176 226 194 stx stx 'b' 'B' stx stx C
- 177 237 205 so so 'n' 'N' so so C
- 178 236 204 cr cr 'm' 'M' cr cr C
- 179 ',' '<' nop nop ',' '<' nop nop O
- 180 '.' '>' nop nop '.' '>' nop nop O
- 181 '/' '?' nop nop '/' '?' nop nop O
- 182 rshift rshift rshift rshift rshift rshift rshift rshift O
- 183 '*' '*' nscr nscr '*' '*' nscr nscr O
- 184 lalt lalt lalt lalt lalt lalt lalt lalt O
- 185 ' ' ' ' nul ' ' alock ' ' susp ' ' O
- 186 clock clock clock clock clock clock clock clock O
- 187 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O
- 188 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O
- 189 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O
- 190 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O
- 191 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O
- 192 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O
- 193 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O
- 194 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O
- 195 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O
- 196 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O
- 197 nlock nlock nlock nlock nlock nlock nlock nlock O
- 198 slock slock slock slock slock slock slock slock O
- 199 fkey49 '7' '7' '7' '7' '7' '7' '7' N
- 200 fkey50 '8' '8' '8' '8' '8' '8' '8' N
- 201 fkey51 '9' '9' '9' '9' '9' '9' '9' N
- 202 fkey52 '-' '-' '-' '-' '-' '-' '-' N
- 203 fkey53 '4' '4' '4' '4' '4' '4' '4' N
- 204 fkey54 '5' '5' '5' '5' '5' '5' '5' N
- 205 fkey55 '6' '6' '6' '6' '6' '6' '6' N
- 206 fkey56 '+' '+' '+' '+' '+' '+' '+' N
- 207 fkey57 '1' '1' '1' '1' '1' '1' '1' N
- 208 fkey58 '2' '2' '2' '2' '2' '2' '2' N
- 209 fkey59 '3' '3' '3' '3' '3' '3' '3' N
- 210 fkey60 '0' '0' '0' '0' '0' '0' '0' N
- 211 del '.' '.' '.' '.' '.' boot boot N
- 212 ns ns ns ns ns ns ns ns O
- 213 nop nop nop nop nop nop nop nop O
- 214 '\' '|' nop nop '\' '|' nop nop O
- 215 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O
- 216 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O
- 217 cr cr nl nl cr cr nl nl O
- 218 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O
- 219 '/' '/' '/' '/' '/' '/' '/' '/' N
- 220 nscr pscr debug nop nop nop nop nop O
- 221 ralt ralt ralt ralt ralt ralt ralt ralt O
- 222 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O
- 223 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O
- 224 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O
- 225 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O
- 226 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O
- 227 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O
- 228 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O
- 229 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O
- 230 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O
- 231 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O
- 232 slock slock slock slock slock slock slock slock O
- 233 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O
- 234 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O
- 235 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O
-
-dgra 000
-dacu 180 (225 220) (193 182) (229 221) (197 184)
- (233 223) (201 186) (231 222) (199 185)
- (245 253) (213 190) (239 252) (207 188)
- (249 254) (217 191)
-
-dcir 181 (233 192) (201 218) (245 224) (213 219)
-
-dtil 000
-
-dmac 000
-
-dbre 000
-
-ddot 000
-
-duml 000
-
-ddia 168 (233 250) (201 218) (245 251) (213 219)
-
-dsla 000
-
-drin 000
-
-dced 000
-
-dapo 000
-
-ddac 000
-
-dogo 000
-
-dcar 000
-
diff --git a/share/syscons/keymaps/gr.us101.acc.kbd b/share/syscons/keymaps/gr.us101.acc.kbd
deleted file mode 100644
index a3a4f41c408c..000000000000
--- a/share/syscons/keymaps/gr.us101.acc.kbd
+++ /dev/null
@@ -1,281 +0,0 @@
-# $FreeBSD$
-#
-# Built on Wed 1 Apr 15:59:44 EEST 1998 by peppe@cs.uoi.gr
-# alt
-# scan cntrl alt alt cntrl lock
-# code base shift cntrl shift alt shift cntrl shift state
-# ------------------------------------------------------------------
-#
- 000 nop nop nop nop nop nop nop nop O
- 001 esc esc nop nop esc esc debug nop O
- 002 '1' '!' nop nop '1' '!' nop nop O
- 003 '2' '@' nul nul '2' '@' nul nul O
- 004 '3' '#' nop nop '3' '#' nop nop O
- 005 '4' '$' nop nop '4' '$' nop nop O
- 006 '5' '%' nop nop '5' '%' nop nop O
- 007 '6' '^' rs rs '6' '^' rs rs O
- 008 '7' '&' nop nop '7' '&' nop nop O
- 009 '8' '*' nop nop '8' '*' nop nop O
- 010 '9' '(' nop nop '9' '(' nop nop O
- 011 '0' ')' nop nop '0' ')' nop nop O
- 012 '-' '_' ns ns '-' '_' ns ns O
- 013 '=' '+' nop nop '=' '+' nop nop O
- 014 bs bs del del bs bs del del O
- 015 ht btab nop nop ht btab nop nop O
- 016 'q' 'Q' dc1 dc1 ';' ':' dc1 dc1 C
- 017 'w' 'W' etb etb 242 211 etb etb C
- 018 'e' 'E' enq enq 229 197 enq enq C
- 019 'r' 'R' dc2 dc2 241 209 dc2 dc2 C
- 020 't' 'T' dc4 dc4 244 212 dc4 dc4 C
- 021 'y' 'Y' em em 245 213 em em C
- 022 'u' 'U' nak nak 232 200 nak nak C
- 023 'i' 'I' ht ht 233 201 ht ht C
- 024 'o' 'O' si si 239 207 si si C
- 025 'p' 'P' dle dle 240 208 dle dle C
- 026 '[' '{' esc esc '[' '{' esc esc O
- 027 ']' '}' gs gs ']' '}' gs gs O
- 028 cr cr nl nl cr cr nl nl O
- 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O
- 030 'a' 'A' soh soh 225 193 soh soh C
- 031 's' 'S' dc3 dc3 243 211 dc3 dc3 C
- 032 'd' 'D' eot eot 228 196 eot eot C
- 033 'f' 'F' ack ack 246 214 ack ack C
- 034 'g' 'G' bel bel 227 195 bel bel C
- 035 'h' 'H' bs bs 231 199 bs bs C
- 036 'j' 'J' nl nl 238 206 nl nl C
- 037 'k' 'K' vt vt 234 202 vt vt C
- 038 'l' 'L' ff ff 235 203 ff ff C
- 039 ';' ':' nop nop dacu ddia dcir nop O
- 040 ''' '"' nop nop ''' '"' nop nop O
- 041 '`' '~' nop nop '`' '~' nop nop O
- 042 lshift lshift lshift lshift lshift lshift lshift lshift O
- 043 '\' '|' fs fs '\' '|' fs fs O
- 044 'z' 'Z' sub sub 230 198 sub sub C
- 045 'x' 'X' can can 247 215 can can C
- 046 'c' 'C' etx etx 248 216 etx etx C
- 047 'v' 'V' syn syn 249 217 syn syn C
- 048 'b' 'B' stx stx 226 194 stx stx C
- 049 'n' 'N' so so 237 205 so so C
- 050 'm' 'M' cr cr 236 204 cr cr C
- 051 ',' '<' nop nop ',' '<' nop nop O
- 052 '.' '>' nop nop '.' '>' nop nop O
- 053 '/' '?' nop nop '/' '?' nop nop O
- 054 rshift rshift rshift rshift rshift rshift rshift rshift O
- 055 '*' '*' nscr nscr '*' '*' nscr nscr O
- 056 lalt lalt lalt lalt lalt lalt lalt lalt O
- 057 ' ' ' ' nul ' ' alock ' ' susp ' ' O
- 058 clock clock clock clock clock clock clock clock O
- 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O
- 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O
- 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O
- 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O
- 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O
- 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O
- 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O
- 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O
- 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O
- 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O
- 069 nlock nlock nlock nlock nlock nlock nlock nlock O
- 070 slock slock slock slock slock slock slock slock O
- 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N
- 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N
- 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N
- 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N
- 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N
- 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N
- 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N
- 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N
- 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N
- 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N
- 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N
- 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N
- 083 del '.' '.' '.' '.' '.' boot boot N
- 084 ns ns ns ns ns ns ns ns O
- 085 nop nop nop nop nop nop nop nop O
- 086 '\' '|' nop nop '\' '|' nop nop O
- 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O
- 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O
- 089 cr cr nl nl cr cr nl nl O
- 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O
- 091 '/' '/' '/' '/' '/' '/' '/' '/' N
- 092 nscr pscr debug nop nop nop nop nop O
- 093 ralt ralt ralt ralt ralt ralt ralt ralt O
- 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O
- 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O
- 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O
- 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O
- 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O
- 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O
- 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O
- 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O
- 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O
- 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O
- 104 slock slock slock slock slock slock slock slock O
- 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O
- 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O
- 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O
-#
- 108 nop nop nop nop nop nop nop nop O
- 109 nop nop nop nop nop nop nop nop O
- 110 nop nop nop nop nop nop nop nop O
- 111 nop nop nop nop nop nop nop nop O
- 112 nop nop nop nop nop nop nop nop O
- 113 nop nop nop nop nop nop nop nop O
- 114 nop nop nop nop nop nop nop nop O
- 115 nop nop nop nop nop nop nop nop O
- 116 nop nop nop nop nop nop nop nop O
- 117 nop nop nop nop nop nop nop nop O
- 118 nop nop nop nop nop nop nop nop O
- 119 nop nop nop nop nop nop nop nop O
- 120 nop nop nop nop nop nop nop nop O
- 121 nop nop nop nop nop nop nop nop O
- 122 nop nop nop nop nop nop nop nop O
- 123 nop nop nop nop nop nop nop nop O
- 124 nop nop nop nop nop nop nop nop O
- 125 nop nop nop nop nop nop nop nop O
- 126 nop nop nop nop nop nop nop nop O
- 127 nop nop nop nop nop nop nop nop O
-#
- 128 nop nop nop nop nop nop nop nop O
- 129 esc esc nop nop esc esc debug nop O
- 130 '1' '!' nop nop '1' '!' nop nop O
- 131 '2' '@' nul nul '2' '@' nul nul O
- 132 '3' '#' nop nop '3' '#' nop nop O
- 133 '4' '$' nop nop '4' '$' nop nop O
- 134 '5' '%' nop nop '5' '%' nop nop O
- 135 '6' '^' rs rs '6' '^' rs rs O
- 136 '7' '&' nop nop '7' '&' nop nop O
- 137 '8' '*' nop nop '8' '*' nop nop O
- 138 '9' '(' nop nop '9' '(' nop nop O
- 139 '0' ')' nop nop '0' ')' nop nop O
- 140 '-' '_' ns ns '-' '_' ns ns O
- 141 '=' '+' nop nop '=' '+' nop nop O
- 142 bs bs del del bs bs del del O
- 143 ht btab nop nop ht btab nop nop O
- 144 ';' ':' dc1 dc1 'q' 'Q' dc1 dc1 C
- 145 242 211 etb etb 'w' 'W' etb etb C
- 146 229 197 enq enq 'e' 'E' enq enq C
- 147 241 209 dc2 dc2 'r' 'R' dc2 dc2 C
- 148 244 212 dc4 dc4 't' 'T' dc4 dc4 C
- 149 245 213 em em 'y' 'Y' em em C
- 150 232 200 nak nak 'u' 'U' nak nak C
- 151 233 201 ht ht 'i' 'I' ht ht C
- 152 239 207 si si 'o' 'O' si si C
- 153 240 208 dle dle 'p' 'P' dle dle C
- 154 '[' '{' esc esc '[' '{' esc esc O
- 155 ']' '}' gs gs ']' '}' gs gs O
- 156 cr cr nl nl cr cr nl nl O
- 157 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O
- 158 225 193 soh soh 'a' 'A' soh soh C
- 159 243 211 dc3 dc3 's' 'S' dc3 dc3 C
- 160 228 196 eot eot 'd' 'D' eot eot C
- 161 246 214 ack ack 'f' 'F' ack ack C
- 162 227 195 bel bel 'g' 'G' bel bel C
- 163 231 199 bs bs 'h' 'H' bs bs C
- 164 238 206 nl nl 'j' 'J' nl nl C
- 165 234 202 vt vt 'k' 'K' vt vt C
- 166 235 203 ff ff 'l' 'L' ff ff C
- 167 dacu ddia dcir nop ';' ':' nop nop O
- 168 ''' '"' nop nop ''' '"' nop nop O
- 169 '`' '~' nop nop '`' '~' nop nop O
- 170 lshift lshift lshift lshift lshift lshift lshift lshift O
- 171 '\' '|' fs fs '\' '|' fs fs O
- 172 230 198 sub sub 'z' 'Z' sub sub C
- 173 247 215 can can 'x' 'X' can can C
- 174 248 216 etx etx 'c' 'C' etx etx C
- 175 249 217 syn syn 'v' 'V' syn syn C
- 176 226 194 stx stx 'b' 'B' stx stx C
- 177 237 205 so so 'n' 'N' so so C
- 178 236 204 cr cr 'm' 'M' cr cr C
- 179 ',' '<' nop nop ',' '<' nop nop O
- 180 '.' '>' nop nop '.' '>' nop nop O
- 181 '/' '?' nop nop '/' '?' nop nop O
- 182 rshift rshift rshift rshift rshift rshift rshift rshift O
- 183 '*' '*' nscr nscr '*' '*' nscr nscr O
- 184 lalt lalt lalt lalt lalt lalt lalt lalt O
- 185 ' ' ' ' nul ' ' alock ' ' susp ' ' O
- 186 clock clock clock clock clock clock clock clock O
- 187 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O
- 188 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O
- 189 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O
- 190 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O
- 191 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O
- 192 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O
- 193 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O
- 194 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O
- 195 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O
- 196 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O
- 197 nlock nlock nlock nlock nlock nlock nlock nlock O
- 198 slock slock slock slock slock slock slock slock O
- 199 fkey49 '7' '7' '7' '7' '7' '7' '7' N
- 200 fkey50 '8' '8' '8' '8' '8' '8' '8' N
- 201 fkey51 '9' '9' '9' '9' '9' '9' '9' N
- 202 fkey52 '-' '-' '-' '-' '-' '-' '-' N
- 203 fkey53 '4' '4' '4' '4' '4' '4' '4' N
- 204 fkey54 '5' '5' '5' '5' '5' '5' '5' N
- 205 fkey55 '6' '6' '6' '6' '6' '6' '6' N
- 206 fkey56 '+' '+' '+' '+' '+' '+' '+' N
- 207 fkey57 '1' '1' '1' '1' '1' '1' '1' N
- 208 fkey58 '2' '2' '2' '2' '2' '2' '2' N
- 209 fkey59 '3' '3' '3' '3' '3' '3' '3' N
- 210 fkey60 '0' '0' '0' '0' '0' '0' '0' N
- 211 del '.' '.' '.' '.' '.' boot boot N
- 212 ns ns ns ns ns ns ns ns O
- 213 nop nop nop nop nop nop nop nop O
- 214 '\' '|' nop nop '\' '|' nop nop O
- 215 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O
- 216 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O
- 217 cr cr nl nl cr cr nl nl O
- 218 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O
- 219 '/' '/' '/' '/' '/' '/' '/' '/' N
- 220 nscr pscr debug nop nop nop nop nop O
- 221 ralt ralt ralt ralt ralt ralt ralt ralt O
- 222 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O
- 223 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O
- 224 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O
- 225 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O
- 226 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O
- 227 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O
- 228 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O
- 229 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O
- 230 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O
- 231 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O
- 232 slock slock slock slock slock slock slock slock O
- 233 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O
- 234 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O
- 235 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O
-
-dgra 000
-dacu 180 (225 220) (193 182) (229 221) (197 184)
- (233 223) (201 186) (231 222) (199 185)
- (245 253) (213 190) (239 252) (207 188)
- (249 254) (217 191)
-
-dcir 181 (233 192) (201 218) (245 224) (213 219)
-
-dtil 000
-
-dmac 000
-
-dbre 000
-
-ddot 000
-
-duml 000
-
-ddia 168 (233 250) (201 218) (245 251) (213 219)
-
-dsla 000
-
-drin 000
-
-dced 000
-
-dapo 000
-
-ddac 000
-
-dogo 000
-
-dcar 000
-
diff --git a/share/syscons/keymaps/pl_PL.ISO8859-2.kbd b/share/syscons/keymaps/pl_PL.ISO8859-2.kbd
deleted file mode 100644
index ee7adaa7a157..000000000000
--- a/share/syscons/keymaps/pl_PL.ISO8859-2.kbd
+++ /dev/null
@@ -1,116 +0,0 @@
-# Polish ISO-8859-2 keymap by Krzysztof Mlynarski (17:46 27-04-1996 MET DST)
-# (krzysio@hydra.mimuw.edu.pl)
-# $FreeBSD$
-# alt
-# scan cntrl alt alt cntrl lock
-# code base shift cntrl shift alt shift cntrl shift state
-# ------------------------------------------------------------------
- 000 nop nop nop nop nop nop nop nop O
- 001 esc esc esc esc esc esc debug esc O
- 002 '1' '!' nop nop '1' '!' nop nop O
- 003 '2' '@' nul nul '2' '@' nul nul O
- 004 '3' '#' nop nop '3' '#' nop nop O
- 005 '4' '$' nop nop '4' '$' nop nop O
- 006 '5' '%' nop nop '5' '%' nop nop O
- 007 '6' '^' rs rs '6' '^' rs rs O
- 008 '7' '&' nop nop '7' '&' nop nop O
- 009 '8' '*' nop nop '8' '*' nop nop O
- 010 '9' '(' nop nop '9' '(' nop nop O
- 011 '0' ')' nop nop '0' ')' nop nop O
- 012 '-' '_' us us '-' '_' us us O
- 013 '=' '+' nop nop '=' '+' nop nop O
- 014 bs bs del del bs bs del del O
- 015 ht btab nop nop ht btab nop nop O
- 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C
- 017 'w' 'W' etb etb 'w' 'W' etb etb C
- 018 'e' 'E' enq enq 234 202 enq enq C
- 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C
- 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C
- 021 'y' 'Y' em em 'y' 'Y' em em C
- 022 'u' 'U' nak nak 'u' 'U' nak nak C
- 023 'i' 'I' ht ht 'i' 'I' ht ht C
- 024 'o' 'O' si si 243 211 si si C
- 025 'p' 'P' dle dle 'p' 'P' dle dle C
- 026 '[' '{' esc esc '[' '{' esc esc O
- 027 ']' '}' gs gs ']' '}' gs gs O
- 028 cr cr nl nl cr cr nl nl O
- 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O
- 030 'a' 'A' soh soh 177 161 soh soh C
- 031 's' 'S' dc3 dc3 182 166 dc3 dc3 C
- 032 'd' 'D' eot eot 'd' 'D' eot eot C
- 033 'f' 'F' ack ack 'f' 'F' ack ack C
- 034 'g' 'G' bel bel 'g' 'G' bel bel C
- 035 'h' 'H' bs bs 'h' 'H' bs bs C
- 036 'j' 'J' nl nl 'j' 'J' nl nl C
- 037 'k' 'K' vt vt 'k' 'K' vt vt C
- 038 'l' 'L' ff ff 179 163 ff ff C
- 039 ';' ':' nop nop ';' ':' nop nop O
- 040 ''' '"' nop nop ''' '"' nop nop O
- 041 '`' '~' nop nop '`' '~' nop nop O
- 042 lshift lshift lshift lshift lshift lshift lshift lshift O
- 043 '\' '|' fs fs '\' '|' fs fs O
- 044 'z' 'Z' sub sub 191 175 sub sub C
- 045 'x' 'X' can can 188 172 can can C
- 046 'c' 'C' etx etx 230 198 etx etx C
- 047 'v' 'V' syn syn 'v' 'V' syn syn C
- 048 'b' 'B' stx stx 'b' 'B' stx stx C
- 049 'n' 'N' so so 241 209 so so C
- 050 'm' 'M' cr cr 'm' 'M' cr cr C
- 051 ',' '<' nop nop ',' '<' nop nop O
- 052 '.' '>' nop nop '.' '>' nop nop O
- 053 '/' '?' nop nop '/' '?' nop nop O
- 054 rshift rshift rshift rshift rshift rshift rshift rshift O
- 055 '*' '*' '*' '*' '*' '*' '*' '*' O
- 056 lalt lalt lalt lalt lalt lalt lalt lalt O
- 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O
- 058 clock clock clock clock clock clock clock clock O
- 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O
- 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O
- 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O
- 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O
- 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O
- 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O
- 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O
- 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O
- 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O
- 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O
- 069 nlock nlock nlock nlock nlock nlock nlock nlock O
- 070 slock slock slock slock slock slock slock slock O
- 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N
- 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N
- 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N
- 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N
- 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N
- 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N
- 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N
- 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N
- 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N
- 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N
- 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N
- 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N
- 083 del '.' '.' '.' '.' '.' boot boot N
- 084 nop nop nop nop nop nop nop nop O
- 085 nop nop nop nop nop nop nop nop O
- 086 nop nop nop nop nop nop nop nop O
- 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O
- 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O
- 089 cr cr cr cr cr cr cr cr O
- 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O
- 091 '/' '/' '/' '/' '/' '/' '/' '/' O
- 092 nscr pscr debug debug nop nop nop nop O
- 093 ralt ralt ralt ralt ralt ralt ralt ralt O
- 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O
- 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O
- 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O
- 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O
- 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O
- 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O
- 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O
- 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O
- 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O
- 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O
- 104 slock saver slock saver susp nop susp nop O
- 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O
- 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O
- 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O
- 108 nop nop nop nop nop nop nop nop O
diff --git a/share/syscons/keymaps/ua.koi8-u.shift.alt.kbd b/share/syscons/keymaps/ua.koi8-u.shift.alt.kbd
deleted file mode 100644
index b32cad3e9339..000000000000
--- a/share/syscons/keymaps/ua.koi8-u.shift.alt.kbd
+++ /dev/null
@@ -1,254 +0,0 @@
-# $FreeBSD$
-#
-# keyboard mapping for both Ukrainian and Russian languages, koi8-u charset.
-# by sia@lot.cs.kiev.ua
-# based on ru.koi8-r.kbd by ache@FreeBSD.org
-# some additions by petr@i.am and kunia@i.am
-#
-# it has 'i', 'ye','yi',"g'" at positions of '-','=','\','`';
-# ->`1234567890-=\<-
-# ->­1234567890¦¤§<-
-# Lwin,Rwin=Meta, Menu=Screensaver
-# PrScr=NextScreen, Shift+PrScr=PrevScreen
-# Shift+Insert=paste
-# alt
-# scan cntrl alt alt cntrl lock
-# code base shift cntrl shift alt shift cntrl shift state
-# ------------------------------------------------------------------
- 000 nop nop nop nop nop nop nop nop O
- 001 esc esc nop nop esc esc debug nop O
- 002 '1' '!' nop nop '1' '!' nop nop O
- 003 '2' '@' nul nul '2' '"' 128 128 O
- 004 '3' '#' nop nop '3' ''' nop nop O
- 005 '4' '$' nop nop '4' ';' nop nop O
- 006 '5' '%' nop nop '5' ':' nop nop O
- 007 '6' '^' rs rs '6' ',' 158 158 O
- 008 '7' '&' nop nop '7' '.' nop nop O
- 009 '8' '*' nop nop '8' '*' nop nop O
- 010 '9' '(' nop nop '9' '(' nop nop O
- 011 '0' ')' nop nop '0' ')' nop nop O
- 012 '-' '_' ns ns 0xa6 0xb6 159 159 O
- 013 '=' '+' nop nop 0xa4 0xb4 nop nop O
- 014 bs bs del del bs bs 255 255 O
- 015 ht btab nop nop ht btab nop nop O
- 016 'q' 'Q' dc1 dc1 202 234 145 145 C
- 017 'w' 'W' etb etb 195 227 151 151 C
- 018 'e' 'E' enq enq 213 245 133 133 C
- 019 'r' 'R' dc2 dc2 203 235 146 146 C
- 020 't' 'T' dc4 dc4 197 229 148 148 C
- 021 'y' 'Y' em em 206 238 153 153 C
- 022 'u' 'U' nak nak 199 231 149 149 C
- 023 'i' 'I' ht ht 219 251 137 137 C
- 024 'o' 'O' si si 221 253 143 143 C
- 025 'p' 'P' dle dle 218 250 144 144 C
- 026 '[' '{' esc esc 200 232 155 155 O
- 027 ']' '}' gs gs 223 255 157 157 O
- 028 cr cr nl nl cr cr 138 138 O
- 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O
- 030 'a' 'A' soh soh 198 230 129 129 C
- 031 's' 'S' dc3 dc3 217 249 147 147 C
- 032 'd' 'D' eot eot 215 247 132 132 C
- 033 'f' 'F' ack ack 193 225 134 134 C
- 034 'g' 'G' bel bel 208 240 135 135 C
- 035 'h' 'H' bs bs 210 242 136 136 C
- 036 'j' 'J' nl nl 207 239 138 138 C
- 037 'k' 'K' vt vt 204 236 139 139 C
- 038 'l' 'L' ff ff 196 228 140 140 C
- 039 ';' ':' nop nop 214 246 nop nop O
- 040 ''' '"' nop nop 220 252 nop nop O
- 041 '`' '~' nop nop 0xad 0xbd nop nop O
- 042 lshift lshift lshift lshift lshift lshift lshift lshift O
- 043 '\' '|' fs fs 0xa7 0xb7 156 156 O
- 044 'z' 'Z' sub sub 209 241 154 154 C
- 045 'x' 'X' can can 222 254 152 152 C
- 046 'c' 'C' etx etx 211 243 131 131 C
- 047 'v' 'V' syn syn 205 237 150 150 C
- 048 'b' 'B' stx stx 201 233 130 130 C
- 049 'n' 'N' so so 212 244 142 142 C
- 050 'm' 'M' cr cr 216 248 141 141 C
- 051 ',' '<' nop nop 194 226 nop nop O
- 052 '.' '>' nop nop 192 224 nop nop O
- 053 '/' '?' nop nop 0xa3 0xb3 nop nop O
- 054 rshift rshift rshift rshift rshift rshift rshift rshift O
- 055 '*' '*' nl nl '*' '*' 138 138 O
- 056 lalt lalt lalt lalt lalt lalt lalt lalt O
- 057 ' ' ' ' ' ' ' ' ' ' ' ' 160 160 O
- 058 alock clock clock clock clock clock clock clock O
- 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O
- 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O
- 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O
- 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O
- 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O
- 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O
- 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O
- 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O
- 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O
- 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O
- 069 nlock nlock nlock nlock nlock nlock nlock nlock O
- 070 slock slock slock slock slock slock slock slock O
- 071 fkey49 '7' '7' '7' 183 183 183 183 N
- 072 fkey50 '8' '8' '8' 184 184 184 184 N
- 073 fkey51 '9' '9' '9' 185 185 185 185 N
- 074 fkey52 '-' '-' '-' 173 173 173 173 N
- 075 fkey53 '4' '4' '4' 180 180 180 180 N
- 076 fkey48 '5' '5' '5' 181 181 181 181 N
- 077 fkey55 '6' '6' '6' 182 182 182 182 N
- 078 fkey56 '+' '+' '+' 171 171 171 171 N
- 079 fkey57 '1' '1' '1' 177 177 177 177 N
- 080 fkey58 '2' '2' '2' 178 178 178 178 N
- 081 fkey59 '3' '3' '3' 179 179 179 179 N
- 082 fkey60 '0' '0' '0' 176 176 176 176 N
- 083 fkey54 '.' del del 255 255 boot halt N
- 084 alock alock alock alock alock alock alock alock O
- 085 nop nop nop nop nop nop nop nop O
- 086 nop nop nop nop nop nop nop nop O
- 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O
- 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O
- 089 cr cr nl nl 141 141 138 138 O
- 090 alock rctrl rctrl rctrl rctrl rctrl rctrl rctrl O
- 091 '/' '/' nop nop 175 175 nop nop O
- 092 nscr pscr debug nop nop nop nop nop O
- 093 ralt ralt ralt ralt ralt ralt ralt ralt O
- 094 fkey49 fkey49 fkey69 fkey49 fkey49 fkey49 fkey49 fkey49 O
- 095 fkey50 fkey50 fkey70 fkey50 fkey50 fkey50 fkey50 fkey50 O
- 096 fkey51 fkey51 fkey71 fkey51 fkey51 fkey51 fkey51 fkey51 O
- 097 fkey53 fkey53 fkey73 fkey53 fkey53 fkey53 fkey53 fkey53 O
- 098 fkey55 fkey55 fkey75 fkey55 fkey55 fkey55 fkey55 fkey55 O
- 099 fkey57 fkey57 fkey77 fkey57 fkey57 fkey57 fkey57 fkey57 O
- 100 fkey58 fkey58 fkey78 fkey58 fkey58 fkey58 fkey58 fkey58 O
- 101 fkey59 fkey59 fkey79 fkey59 fkey59 fkey59 fkey59 fkey59 O
- 102 fkey60 paste fkey80 fkey60 fkey60 fkey60 fkey60 fkey60 O
- 103 del del fkey81 del fkey61 fkey61 boot pdwn O
- 104 slock saver slock saver susp nop susp nop O
- 105 meta fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O
- 106 meta fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O
- 107 saver fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O
- 108 nop nop nop nop nop nop nop nop O
- 109 nop nop nop nop nop nop nop nop O
- 110 nop nop nop nop nop nop nop nop O
- 111 nop nop nop nop nop nop nop nop O
- 112 nop nop nop nop nop nop nop nop O
- 113 nop nop nop nop nop nop nop nop O
- 114 nop nop nop nop nop nop nop nop O
- 115 nop nop nop nop nop nop nop nop O
- 116 nop nop nop nop nop nop nop nop O
- 117 nop nop nop nop nop nop nop nop O
- 118 nop nop nop nop nop nop nop nop O
- 119 nop nop nop nop nop nop nop nop O
- 120 nop nop nop nop nop nop nop nop O
- 121 nop nop nop nop nop nop nop nop O
- 122 nop nop nop nop nop nop nop nop O
- 123 nop nop nop nop nop nop nop nop O
- 124 nop nop nop nop nop nop nop nop O
- 125 nop nop nop nop nop nop nop nop O
- 126 nop nop nop nop nop nop nop nop O
- 127 nop nop nop nop nop nop nop nop O
- 128 nop nop nop nop nop nop nop nop O
- 129 esc esc nop nop esc esc debug nop O
- 130 '1' '!' nop nop '1' '!' nop nop O
- 131 '2' '"' nul nul '2' '@' 128 128 O
- 132 '3' ''' nop nop '3' '#' nop nop O
- 133 '4' ';' nop nop '4' '$' nop nop O
- 134 '5' ':' nop nop '5' '%' nop nop O
- 135 '6' ',' rs rs '6' '^' 158 158 O
- 136 '7' '.' nop nop '7' '&' nop nop O
- 137 '8' '*' nop nop '8' '*' nop nop O
- 138 '9' '(' nop nop '9' '(' nop nop O
- 139 '0' ')' nop nop '0' ')' nop nop O
- 140 0xa6 0xb6 ns ns '-' '_' 159 159 O
- 141 0xa4 0xb4 nop nop '=' '+' nop nop O
- 142 bs bs del del bs bs 255 255 O
- 143 ht btab nop nop ht btab nop nop O
- 144 202 234 dc1 dc1 'q' 'Q' 145 145 C
- 145 195 227 etb etb 'w' 'W' 151 151 C
- 146 213 245 enq enq 'e' 'E' 133 133 C
- 147 203 235 dc2 dc2 'r' 'R' 146 146 C
- 148 197 229 dc4 dc4 't' 'T' 148 148 C
- 149 206 238 em em 'y' 'Y' 153 153 C
- 150 199 231 nak nak 'u' 'U' 149 149 C
- 151 219 251 ht ht 'i' 'I' 137 137 C
- 152 221 253 si si 'o' 'O' 143 143 C
- 153 218 250 dle dle 'p' 'P' 144 144 C
- 154 200 232 esc esc '[' '{' 155 155 C
- 155 223 255 gs gs ']' '}' 157 157 C
- 156 cr cr nl nl cr cr 138 138 O
- 157 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O
- 158 198 230 soh soh 'a' 'A' 129 129 C
- 159 217 249 dc3 dc3 's' 'S' 147 147 C
- 160 215 247 eot eot 'd' 'D' 132 132 C
- 161 193 225 ack ack 'f' 'F' 134 134 C
- 162 208 240 bel bel 'g' 'G' 135 135 C
- 163 210 242 bs bs 'h' 'H' 136 136 C
- 164 207 239 nl nl 'j' 'J' 138 138 C
- 165 204 236 vt vt 'k' 'K' 139 139 C
- 166 196 228 ff ff 'l' 'L' 140 140 C
- 167 214 246 nop nop ';' ':' nop nop C
- 168 220 252 nop nop ''' '"' nop nop C
- 169 0xad 0xbd nop nop '`' '~' nop nop C
- 170 lshift lshift lshift lshift lshift lshift lshift lshift O
- 171 0xa7 0xb7 fs fs '\' '|' 156 156 O
- 172 209 241 sub sub 'z' 'Z' 154 154 C
- 173 222 254 can can 'x' 'X' 152 152 C
- 174 211 243 etx etx 'c' 'C' 131 131 C
- 175 205 237 syn syn 'v' 'V' 150 150 C
- 176 201 233 stx stx 'b' 'B' 130 130 C
- 177 212 244 so so 'n' 'N' 142 142 C
- 178 216 248 cr cr 'm' 'M' 141 141 C
- 179 194 226 nop nop ',' '<' nop nop C
- 180 192 224 nop nop '.' '>' nop nop C
- 181 0xa3 0xb3 nop nop '/' '?' nop nop O
- 182 rshift rshift rshift rshift rshift rshift rshift rshift O
- 183 '*' '*' nl nl '*' '*' 138 138 O
- 184 lalt lalt lalt lalt lalt lalt lalt lalt O
- 185 ' ' ' ' ' ' ' ' ' ' ' ' 160 160 O
- 186 alock clock clock clock clock clock clock clock O
- 187 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O
- 188 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O
- 189 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O
- 190 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O
- 191 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O
- 192 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O
- 193 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O
- 194 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O
- 195 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O
- 196 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O
- 197 nlock nlock nlock nlock nlock nlock nlock nlock O
- 198 slock slock slock slock slock slock slock slock O
- 199 fkey49 '7' '7' '7' 183 183 183 183 N
- 200 fkey50 '8' '8' '8' 184 184 184 184 N
- 201 fkey51 '9' '9' '9' 185 185 185 185 N
- 202 fkey52 '-' '-' '-' 173 173 173 173 N
- 203 fkey53 '4' '4' '4' 180 180 180 180 N
- 204 fkey48 '5' '5' '5' 181 181 181 181 N
- 205 fkey55 '6' '6' '6' 182 182 182 182 N
- 206 fkey56 '+' '+' '+' 171 171 171 171 N
- 207 fkey57 '1' '1' '1' 177 177 177 177 N
- 208 fkey58 '2' '2' '2' 178 178 178 178 N
- 209 fkey59 '3' '3' '3' 179 179 179 179 N
- 210 fkey60 '0' '0' '0' 176 176 176 176 N
- 211 del '.' del del 255 255 boot halt N
- 212 alock alock alock alock alock alock alock alock O
- 213 nop nop nop nop nop nop nop nop O
- 214 nop nop nop nop nop nop nop nop O
- 215 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O
- 216 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O
- 217 cr cr nl nl 141 141 138 138 O
- 218 alock rctrl rctrl rctrl rctrl rctrl rctrl rctrl O
- 219 '/' '/' nop nop 175 175 nop nop O
- 220 nscr pscr debug nop nop nop nop nop O
- 221 ralt ralt ralt ralt ralt ralt ralt ralt O
- 222 fkey49 fkey49 fkey69 fkey49 fkey49 fkey49 fkey49 fkey49 O
- 223 fkey50 fkey50 fkey70 fkey50 fkey50 fkey50 fkey50 fkey50 O
- 224 fkey51 fkey51 fkey71 fkey51 fkey51 fkey51 fkey51 fkey51 O
- 225 fkey53 fkey53 fkey73 fkey53 fkey53 fkey53 fkey53 fkey53 O
- 226 fkey55 fkey55 fkey75 fkey55 fkey55 fkey55 fkey55 fkey55 O
- 227 fkey57 fkey57 fkey77 fkey57 fkey57 fkey57 fkey57 fkey57 O
- 228 fkey58 fkey58 fkey78 fkey58 fkey58 fkey58 fkey58 fkey58 O
- 229 fkey59 fkey59 fkey79 fkey59 fkey59 fkey59 fkey59 fkey59 O
- 230 fkey60 paste fkey80 fkey60 fkey60 fkey60 fkey60 fkey60 O
- 231 del del fkey81 del fkey61 fkey61 boot pdwn O
- 232 slock saver slock saver susp nop susp nop O
- 233 meta fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O
- 234 meta fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O
- 235 saver fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O
- 236 nop nop nop nop nop nop nop nop O
diff --git a/share/syscons/scrnmaps/koi8-u2cp866u b/share/syscons/scrnmaps/koi8-u2cp866u
deleted file mode 100644
index efc48b0bb88e..000000000000
--- a/share/syscons/scrnmaps/koi8-u2cp866u
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 1996 by Igor Sviridov <sia@lot.cs.kiev.ua>
- * Copyright (C) 1999 by Oleg Cherevko <olwi@icyb.kiev.ua>
- * Adrey Gapon <andriy@icyb.kiev.ua>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-scrmap_t scrmap = {
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
- 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
- 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
- 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
- 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
- 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
- 0xc4, 0xb3, 0xda, 0xbf, 0xc0, 0xd9, 0xc3, 0xb4,
- 0xc2, 0xc1, 0xc5, 0xdf, 0xdc, 0xdb, 0xdd, 0xde,
- 0xb0, 0xb1, 0xb2, 0xd1, 0xfe, 0xd6, 0xfb, 0xd7,
- 0xb7, 0xb8, 0xff, 0xd2, 0xb6, 0xfd, 0xfa, 0xbd,
- 0xcd, 0xba, 0xd5, 0xf1, 0xf5, 0xc9, 0xf7, 0xf9,
- 0xbb, 0xd4, 0xd3, 0xc8, 0xbe, 0xf3, 0xbc, 0xc6,
- 0xc7, 0xcc, 0xb5, 0xf0, 0xf4, 0xb9, 0xf6, 0xf8,
- 0xcb, 0xcf, 0xd0, 0xca, 0xd8, 0xf2, 0xce, 0xfc,
- 0xee, 0xa0, 0xa1, 0xe6, 0xa4, 0xa5, 0xe4, 0xa3,
- 0xe5, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae,
- 0xaf, 0xef, 0xe0, 0xe1, 0xe2, 0xe3, 0xa6, 0xa2,
- 0xec, 0xeb, 0xa7, 0xe8, 0xed, 0xe9, 0xe7, 0xea,
- 0x9e, 0x80, 0x81, 0x96, 0x84, 0x85, 0x94, 0x83,
- 0x95, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e,
- 0x8f, 0x9f, 0x90, 0x91, 0x92, 0x93, 0x86, 0x82,
- 0x9c, 0x9b, 0x87, 0x98, 0x9d, 0x99, 0x97, 0x9a
-};
diff --git a/share/timedef/cs_CZ.ISO8859-2.src b/share/timedef/cs_CZ.ISO8859-2.src
deleted file mode 100644
index 62a9c98e46ab..000000000000
--- a/share/timedef/cs_CZ.ISO8859-2.src
+++ /dev/null
@@ -1,105 +0,0 @@
-# Czech month and day names
-# by Rudolf Cejka <cejkar@dcse.fee.vutbr.cz>
-#
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-led
-úno
-bøe
-dub
-kvì
-èrv
-èvc
-srp
-záø
-øíj
-lis
-pro
-#
-# Long months names
-#
-ledna
-února
-bøezna
-dubna
-kvìtna
-èervna
-èervence
-srpna
-záøí
-øíjna
-listopadu
-prosince
-#
-# Short weekdays names
-#
-ne
-po
-út
-st
-èt
-pá
-so
-#
-# Long weekdays names
-#
-nedìle
-pondìlí
-úterý
-støeda
-ètvrtek
-pátek
-sobota
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%Y/%m/%d
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-dp
-#
-# pm
-#
-od
-#
-# date_fmt
-#
-%a %e. %B %Y %X %Z
-#
-# Long month names in alternative form
-#
-leden
-únor
-bøezen
-duben
-kvìten
-èerven
-èervenec
-srpen
-záøí
-øíjen
-listopad
-prosinec
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/da_DK.ISO8859-1.src b/share/timedef/da_DK.ISO8859-1.src
deleted file mode 100644
index 5f84abf6894f..000000000000
--- a/share/timedef/da_DK.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-Jan
-Feb
-Mar
-Apr
-Maj
-Jun
-Jul
-Aug
-Sep
-Okt
-Nov
-Dec
-#
-# Long months names
-#
-Januar
-Februar
-Marts
-April
-Maj
-Juni
-Juli
-August
-September
-Oktober
-November
-December
-#
-# Short weekdays names
-#
-Søn
-Man
-Tir
-Ons
-Tor
-Fre
-Lør
-#
-# Long weekdays names
-#
-Søndag
-Mandag
-Tirsdag
-Onsdag
-Torsdag
-Fredag
-Lørdag
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-Januar
-Februar
-Marts
-April
-Maj
-Juni
-Juli
-August
-September
-Oktober
-November
-December
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/de_AT.ISO8859-1.src b/share/timedef/de_AT.ISO8859-1.src
deleted file mode 100644
index a07193dd6198..000000000000
--- a/share/timedef/de_AT.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-Jan
-Feb
-Mär
-Apr
-Mai
-Jun
-Jul
-Aug
-Sep
-Okt
-Nov
-Dez
-#
-# Long months names
-#
-Jänner
-Februar
-März
-April
-Mai
-Juni
-Juli
-August
-September
-Oktober
-November
-Dezember
-#
-# Short weekdays names
-#
-So
-Mo
-Di
-Mi
-Do
-Fr
-Sa
-#
-# Long weekdays names
-#
-Sonntag
-Montag
-Dienstag
-Mittwoch
-Donnerstag
-Freitag
-Samstag
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-Jänner
-Februar
-März
-April
-Mai
-Juni
-Juli
-August
-September
-Oktober
-November
-Dezember
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/de_DE.ISO8859-1.src b/share/timedef/de_DE.ISO8859-1.src
deleted file mode 100644
index 64085022b420..000000000000
--- a/share/timedef/de_DE.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-Jan
-Feb
-Mär
-Apr
-Mai
-Jun
-Jul
-Aug
-Sep
-Okt
-Nov
-Dez
-#
-# Long months names
-#
-Januar
-Februar
-März
-April
-Mai
-Juni
-Juli
-August
-September
-Oktober
-November
-Dezember
-#
-# Short weekdays names
-#
-So
-Mo
-Di
-Mi
-Do
-Fr
-Sa
-#
-# Long weekdays names
-#
-Sonntag
-Montag
-Dienstag
-Mittwoch
-Donnerstag
-Freitag
-Samstag
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-Januar
-Februar
-März
-April
-Mai
-Juni
-Juli
-August
-September
-Oktober
-November
-Dezember
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/en_GB.ISO8859-1.src b/share/timedef/en_GB.ISO8859-1.src
deleted file mode 100644
index 8c10578cdcba..000000000000
--- a/share/timedef/en_GB.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-Jan
-Feb
-Mar
-Apr
-May
-Jun
-Jul
-Aug
-Sep
-Oct
-Nov
-Dec
-#
-# Long month names
-#
-January
-February
-March
-April
-May
-June
-July
-August
-September
-October
-November
-December
-#
-# Short weekday names
-#
-Sun
-Mon
-Tue
-Wed
-Thu
-Fri
-Sat
-#
-# Long weekday names
-#
-Sunday
-Monday
-Tuesday
-Wednesday
-Thursday
-Friday
-Saturday
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d/%m/%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-January
-February
-March
-April
-May
-June
-July
-August
-September
-October
-November
-December
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/en_US.ISO8859-1.src b/share/timedef/en_US.ISO8859-1.src
deleted file mode 100644
index 7fee051b5fcd..000000000000
--- a/share/timedef/en_US.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-Jan
-Feb
-Mar
-Apr
-May
-Jun
-Jul
-Aug
-Sep
-Oct
-Nov
-Dec
-#
-# Long month names
-#
-January
-February
-March
-April
-May
-June
-July
-August
-September
-October
-November
-December
-#
-# Short weekday names
-#
-Sun
-Mon
-Tue
-Wed
-Thu
-Fri
-Sat
-#
-# Long weekday names
-#
-Sunday
-Monday
-Tuesday
-Wednesday
-Thursday
-Friday
-Saturday
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%m/%d/%Y
-#
-# c_fmt
-#
-%a %b %e %X %Y
-#
-# am
-#
-AM
-#
-# pm
-#
-PM
-#
-# date_fmt
-#
-%a %b %e %X %Z %Y
-#
-# Long months names (alternative)
-#
-January
-February
-March
-April
-May
-June
-July
-August
-September
-October
-November
-December
-#
-# md_order
-#
-md
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/es_ES.ISO8859-1.src b/share/timedef/es_ES.ISO8859-1.src
deleted file mode 100644
index 78d2cb848838..000000000000
--- a/share/timedef/es_ES.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-ene
-feb
-mar
-abr
-may
-jun
-jul
-ago
-sep
-oct
-nov
-dic
-#
-# Long months names
-#
-enero
-febrero
-marzo
-abril
-mayo
-junio
-julio
-agosto
-septiembre
-octubre
-noviembre
-diciembre
-#
-# Short weekdays names
-#
-dom
-lun
-mar
-mié
-jue
-vie
-sáb
-#
-# Long weekdays names
-#
-domingo
-lunes
-martes
-miércoles
-jueves
-viernes
-sábado
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d/%m/%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-AM
-#
-# pm
-#
-PM
-#
-# date_fmt
-#
-%A, %e de %B de %Y, %X %Z
-#
-# Long months names (alternative)
-#
-enero
-febrero
-marzo
-abril
-mayo
-junio
-julio
-agosto
-septiembre
-octubre
-noviembre
-diciembre
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/et_EE.ISO8859-15.src b/share/timedef/et_EE.ISO8859-15.src
deleted file mode 100644
index 82595e877c93..000000000000
--- a/share/timedef/et_EE.ISO8859-15.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-jaan
-veebr
-märts
-apr
-mai
-juuni
-juuli
-aug
-sept
-okt
-nov
-dets
-#
-# Long month names
-#
-jaanuar
-veebruar
-märts
-aprill
-mai
-juuni
-juuli
-august
-september
-oktoober
-november
-detsember
-#
-# Short weekday names
-#
-P
-E
-T
-K
-N
-R
-L
-#
-# Long weekday names
-#
-pühapäev
-esmaspäev
-teisipäev
-kolmapäev
-neljapäev
-reede
-laupäev
-#
-# t_fmt
-#
-%H:%M:%S
-#
-# d_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a, %d. %b %Y. %T
-#
-# am
-#
-
-#
-# pm
-#
-
-#
-# d_t_fmt
-#
-%A, %d. %B %Y. %T %Z
-#
-# Long months names (alternative)
-#
-jaanuar
-veebruar
-märts
-aprill
-mai
-juuni
-juuli
-august
-september
-oktoober
-november
-detsember
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-
-# EOF
diff --git a/share/timedef/fi_FI.ISO8859-1.src b/share/timedef/fi_FI.ISO8859-1.src
deleted file mode 100644
index fffed1848a96..000000000000
--- a/share/timedef/fi_FI.ISO8859-1.src
+++ /dev/null
@@ -1,101 +0,0 @@
-# $FreeBSD$
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-Tam
-Hel
-Maa
-Huh
-Tou
-Kes
-Hei
-Elo
-Syy
-Lok
-Mar
-Jou
-#
-# Long month names
-#
-Tammikuu
-Helmikuu
-Maaliskuu
-Huhtikuu
-Toukokuu
-Kesäkuu
-Heinäkuu
-Elokuu
-Syyskuu
-Lokakuu
-Marraskuu
-Joulukuu
-#
-# Short weekday names
-#
-Su
-Ma
-Ti
-Ke
-To
-Pe
-La
-#
-# Long weekday names
-#
-Sunnuntai
-Maanantai
-Tiistai
-Keskiviikko
-Torstai
-Perjantai
-Lauantai
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-Tammikuu
-Helmikuu
-Maaliskuu
-Huhtikuu
-Toukokuu
-Kesäkuu
-Heinäkuu
-Elokuu
-Syyskuu
-Lokakuu
-Marraskuu
-Joulukuu
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/fr_FR.ISO8859-1.src b/share/timedef/fr_FR.ISO8859-1.src
deleted file mode 100644
index d905c99429b4..000000000000
--- a/share/timedef/fr_FR.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-jan
-fév
-mar
-avr
-mai
-jui
-jul
-aoû
-sep
-oct
-nov
-déc
-#
-# Long months names
-#
-janvier
-février
-mars
-avril
-mai
-juin
-juillet
-août
-septembre
-octobre
-novembre
-décembre
-#
-# Short weekdays names
-#
-Dim
-Lun
-Mar
-Mer
-Jeu
-Ven
-Sam
-#
-# Long weekdays names
-#
-Dimanche
-Lundi
-Mardi
-Mercredi
-Jeudi
-Vendredi
-Samedi
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-
-#
-# pm
-#
-
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-janvier
-février
-mars
-avril
-mai
-juin
-juillet
-août
-septembre
-octobre
-novembre
-décembre
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-
-# EOF
diff --git a/share/timedef/hr_HR.ISO8859-2.src b/share/timedef/hr_HR.ISO8859-2.src
deleted file mode 100644
index 2b8d2cca1cf3..000000000000
--- a/share/timedef/hr_HR.ISO8859-2.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-Sij
-Vel
-O¾u
-Tra
-Svi
-Lip
-Srp
-Kol
-Ruj
-Lis
-Stu
-Pro
-#
-# Long months names
-#
-Sijeèanj
-Veljaèa
-O¾ujak
-Travanj
-Svibanj
-Lipanj
-Srpanj
-Kolovoz
-Rujan
-Listopad
-Studeni
-Prosinac
-#
-# Short weekdays names
-#
-Ne
-Po
-Ut
-Sr
-Èe
-Pe
-Su
-#
-# Long weekdays names
-#
-Nedjelja
-Ponedjeljak
-Utorak
-Srijeda
-Èetvrtak
-Petak
-Subota
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-Sijeèanj
-Veljaèa
-O¾ujak
-Travanj
-Svibanj
-Lipanj
-Srpanj
-Kolovoz
-Rujan
-Listopad
-Studeni
-Prosinac
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/hu_HU.ISO8859-2.src b/share/timedef/hu_HU.ISO8859-2.src
deleted file mode 100644
index 724e24ad1df7..000000000000
--- a/share/timedef/hu_HU.ISO8859-2.src
+++ /dev/null
@@ -1,101 +0,0 @@
-# This is a Hungarian LC_TIME file for ISO 8859-2 code-table
-# Made by Gabor Zahemszky <zgabor@CoDe.hu>
-# $FreeBSD$
-#
-# Short month names
-#
-Jan
-Feb
-Már
-Ápr
-Máj
-Jún
-Júl
-Aug
-Sze
-Okt
-Nov
-Dec
-#
-# Long month names
-#
-Január
-Február
-Március
-Április
-Május
-Június
-Július
-Augusztus
-Szeptember
-Október
-November
-December
-#
-# Short weekday names
-#
-Vas
-Hét
-Ked
-Sze
-Csü
-Pén
-Szo
-#
-# Long weekday names
-#
-Vasárnap
-Hétfõ
-Kedd
-Szerda
-Csütörtök
-Péntek
-Szombat
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%Y/%m/%d
-#
-# c_fmt
-#
-%a %b %e %X %Y
-#
-# am
-#
-de
-#
-# pm
-#
-du
-#
-# date_fmt
-#
-%Y %b %e %a %X %Z
-#
-# Long months names (alternative)
-#
-Január
-Február
-Március
-Április
-Május
-Június
-Július
-Augusztus
-Szeptember
-Október
-November
-December
-#
-# md_order
-#
-md
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/is_IS.ISO8859-1.src b/share/timedef/is_IS.ISO8859-1.src
deleted file mode 100644
index 9da9efcd66b6..000000000000
--- a/share/timedef/is_IS.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-jan
-feb
-mar
-apr
-maí
-jún
-júl
-ágú
-sep
-okt
-nóv
-des
-#
-# Long month names
-#
-janúar
-febrúar
-mars
-apríl
-maí
-júní
-júlí
-ágúst
-september
-október
-nóvember
-desember
-#
-# Short weekday names
-#
-sun
-mán
-þri
-mið
-fim
-fös
-lau
-#
-# Long weekday names
-#
-sunnudagur
-mánudagur
-þriðjudagur
-miðvikudagur
-fimmtudagur
-föstudagur
-laugardagur
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-fh
-#
-# pm
-#
-eh
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-janúar
-febrúar
-mars
-apríl
-maí
-júní
-júlí
-ágúst
-september
-október
-nóvember
-desember
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/it_IT.ISO8859-1.src b/share/timedef/it_IT.ISO8859-1.src
deleted file mode 100644
index c1f67b490dcf..000000000000
--- a/share/timedef/it_IT.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-Gen
-Feb
-Mar
-Apr
-Mag
-Giu
-Lug
-Ago
-Set
-Ott
-Nov
-Dic
-#
-# Long month names
-#
-Gennaio
-Febbraio
-Marzo
-Aprile
-Maggio
-Giugno
-Luglio
-Agosto
-Settembre
-Ottobre
-Novembre
-Dicembre
-#
-# Short weekday names
-#
-Dom
-Lun
-Mar
-Mer
-Gio
-Ven
-Sab
-#
-# Long weekday names
-#
-Domenica
-Lunedi
-Martedi
-Mercoledi
-Giovedi
-Venerdi
-Sabato
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-Gennaio
-Febbraio
-Marzo
-Aprile
-Maggio
-Giugno
-Luglio
-Agosto
-Settembre
-Ottobre
-Novembre
-Dicembre
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/ja_JP.eucJP.src b/share/timedef/ja_JP.eucJP.src
deleted file mode 100644
index c73c47d57243..000000000000
--- a/share/timedef/ja_JP.eucJP.src
+++ /dev/null
@@ -1,105 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-#
-# Long month names
-#
-1·î
-2·î
-3·î
-4·î
-5·î
-6·î
-7·î
-8·î
-9·î
-10·î
-11·î
-12·î
-#
-# Short weekday names
-#
-Æü
-·î
-²Ð
-¿å
-ÌÚ
-¶â
-ÅÚ
-#
-# Long weekday names
-#
-ÆüÍËÆü
-·îÍËÆü
-²ÐÍËÆü
-¿åÍËÆü
-ÌÚÍËÆü
-¶âÍËÆü
-ÅÚÍËÆü
-#
-# X_fmt
-#
-%H»þ%Mʬ%SÉÃ
-#
-# x_fmt
-#
-%Y/%m/%d
-#
-# c_fmt
-#
-# just following tradition...
-# %a %b %e %H:%M:%S %Y
-%a %b/%e %T %Y
-#
-# am
-#
-#¸áÁ°
-AM
-#
-# pm
-#
-#¸á¸å
-PM
-#
-# date_fmt
-#
-%Yǯ %B%eÆü %A %X %Z
-#
-# Long months names (alternative)
-#
-1·î
-2·î
-3·î
-4·î
-5·î
-6·î
-7·î
-8·î
-9·î
-10·î
-11·î
-12·î
-#
-# md_order
-#
-md
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/ko_KR.eucKR.src b/share/timedef/ko_KR.eucKR.src
deleted file mode 100644
index 59c24244b89c..000000000000
--- a/share/timedef/ko_KR.eucKR.src
+++ /dev/null
@@ -1,108 +0,0 @@
-# $FreeBSD$
-#
-# Originally by CHOI Junho <cjh@FreeBSD.org>
-# 27 Mar 1997
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-#
-# Long month names
-#
-1¿ù
-2¿ù
-3¿ù
-4¿ù
-5¿ù
-6¿ù
-7¿ù
-8¿ù
-9¿ù
-10¿ù
-11¿ù
-12¿ù
-#
-# Short weekday names
-#
-ÀÏ
-¿ù
-È­
-¼ö
-¸ñ
-±Ý
-Åä
-#
-# Long weekday names
-#
-ÀÏ¿äÀÏ
-¿ù¿äÀÏ
-È­¿äÀÏ
-¼ö¿äÀÏ
-¸ñ¿äÀÏ
-±Ý¿äÀÏ
-Åä¿äÀÏ
-#
-# X_fmt
-#
-%H½Ã %MºÐ %SÃÊ
-#
-# x_fmt
-#
-%Y/%m/%d
-#
-# c_fmt
-#
-# just following tradition...
-# %Y³â %b¿ù %eÀÏ %a¿äÀÏ %X
-%a %b/%e %H:%M:%S %Y
-#
-# am
-#
-#¿ÀÀü
-AM
-#
-# pm
-#
-#¿ÀÈÄ
-PM
-#
-# date_fmt
-#
-%Y³â %B %eÀÏ %A %X %Z
-#
-# Long months names (alternative)
-#
-1¿ù
-2¿ù
-3¿ù
-4¿ù
-5¿ù
-6¿ù
-7¿ù
-8¿ù
-9¿ù
-10¿ù
-11¿ù
-12¿ù
-#
-# md_order
-#
-md
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/la_LN.ISO8859-1.src b/share/timedef/la_LN.ISO8859-1.src
deleted file mode 100644
index 30038445e118..000000000000
--- a/share/timedef/la_LN.ISO8859-1.src
+++ /dev/null
@@ -1,104 +0,0 @@
-# $FreeBSD$
-# This is Latin. The week with seven days was introduced in the
-# Roman Empire 321 AD. (Konstantin I)
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-Ian
-Feb
-Mar
-Apr
-Mai
-Iun
-Iul
-Aug
-Sep
-Oct
-Nov
-Dec
-#
-# Long month names
-#
-Ianuarius
-Februarius
-Martius
-Aprilis
-Maius
-Iunius
-Iulius
-Augustus
-September
-October
-November
-December
-#
-# Short weekday names
-#
-Sol
-Lun
-Mar
-Mer
-Iov
-Ven
-Sat
-#
-# Long weekday names
-#
-dies Solis
-dies Lunae
-dies Martis
-dies Mercurii
-dies Iovis
-dies Veneris
-dies Saturni
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-Ianuarius
-Februarius
-Martius
-Aprilis
-Maius
-Iunius
-Iulius
-Augustus
-September
-October
-November
-December
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/lt_LT.ISO8859-4.src b/share/timedef/lt_LT.ISO8859-4.src
deleted file mode 100644
index 157597c016c4..000000000000
--- a/share/timedef/lt_LT.ISO8859-4.src
+++ /dev/null
@@ -1,101 +0,0 @@
-# $FreeBSD$
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-Sau
-Vas
-Kov
-Bal
-Geg
-Bir
-Lie
-Rgp
-Rgs
-Spa
-Lap
-Grd
-#
-# Long month names
-#
-sausio
-vasario
-kovo
-baland¾io
-gegu¾ìs
-bir¾elio
-liepos
-rugpjþèio
-rugsìjo
-spalio
-lapkrièio
-gruod¾io
-#
-# Short weekday names
-#
-Sk
-Pr
-An
-Tr
-Kt
-Pn
-©t
-#
-# Long weekday names
-#
-Sekmadienis
-Pirmadienis
-Antradienis
-Treèiadienis
-Ketvirtadienis
-Penktadienis
-©e¹tadienis
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%Y.%m.%d
-#
-# c_fmt
-# %A, %Y m. %B %e d. %T
-%a %b %e %X %Y
-#
-# am
-#
-
-#
-# pm
-#
-
-#
-# date_fmt
-#
-%A, %Y m. %B %e d. %T %Z
-#
-# Long month names in alternative form
-#
-sausis
-vasaris
-kovas
-balandis
-gegu¾ì
-bir¾elis
-liepa
-rugpjþtis
-rugsìjis
-spalis
-lapkritis
-gruodis
-#
-# md_order
-#
-md
-#
-# ampm_fmt
-#
-
-# EOF
diff --git a/share/timedef/nl_NL.ISO8859-1.src b/share/timedef/nl_NL.ISO8859-1.src
deleted file mode 100644
index f94f21271827..000000000000
--- a/share/timedef/nl_NL.ISO8859-1.src
+++ /dev/null
@@ -1,101 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-jan
-feb
-mrt
-apr
-mei
-jun
-jul
-aug
-sep
-okt
-nov
-dec
-#
-# Long month names
-#
-januari
-februari
-maart
-april
-mei
-juni
-juli
-augustus
-september
-oktober
-november
-december
-#
-# Short weekday names
-zo
-ma
-di
-wo
-do
-vr
-za
-#
-# Long weekday names
-#
-zondag
-maandag
-dinsdag
-woensdag
-donderdag
-vrijdag
-zaterdag
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d-%m-%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-januari
-februari
-maart
-april
-mei
-juni
-juli
-augustus
-september
-oktober
-november
-december
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/no_NO.ISO8859-1.src b/share/timedef/no_NO.ISO8859-1.src
deleted file mode 100644
index 04c7a950b631..000000000000
--- a/share/timedef/no_NO.ISO8859-1.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-jan
-feb
-mar
-apr
-mai
-jun
-jul
-aug
-sep
-okt
-nov
-des
-#
-# Long months names
-#
-januar
-februar
-mars
-april
-mai
-juni
-juli
-august
-september
-oktober
-november
-desember
-#
-# Short weekdays names
-#
-søn
-man
-tir
-ons
-tor
-fre
-lør
-#
-# Long weekdays names
-#
-søndag
-mandag
-tirsdag
-onsdag
-torsdag
-fredag
-lørdag
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-januar
-februar
-mars
-april
-mai
-juni
-juli
-august
-september
-oktober
-november
-desember
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/pl_PL.ISO8859-2.src b/share/timedef/pl_PL.ISO8859-2.src
deleted file mode 100644
index 2631e6d11b33..000000000000
--- a/share/timedef/pl_PL.ISO8859-2.src
+++ /dev/null
@@ -1,99 +0,0 @@
-# $FreeBSD$
-#
-# Short month names
-#
-Sty
-Lut
-Mar
-Kwi
-Maj
-Cze
-Lip
-Sie
-Wrz
-Paz
-Lis
-Gru
-#
-# Long month names
-#
-Styczeñ
-Luty
-Marzec
-Kwiecieñ
-Maj
-Czerwiec
-Lipiec
-Sierpieñ
-Wrzesieñ
-Pa¼dziernik
-Listopad
-Grudzieñ
-#
-# Short weekday names
-#
-Ndz
-Pon
-Wto
-¦ro
-Czw
-Pi±
-Sob
-#
-# Long weekday names
-#
-Niedziela
-Poniedzia³ek
-Wtorek
-¦roda
-Czwartek
-Pi±tek
-Sobota
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%Y.%m.%d
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-
-#
-# pm
-#
-
-#
-# date_fmt
-#
-%a %e %b %X %Y %Z
-#
-# Long months names (alternative)
-#
-Styczeñ
-Luty
-Marzec
-Kwiecieñ
-Maj
-Czerwiec
-Lipiec
-Sierpieñ
-Wrzesieñ
-Pa¼dziernik
-Listopad
-Grudzieñ
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-
-# EOF
diff --git a/share/timedef/pt_PT.ISO8859-1.src b/share/timedef/pt_PT.ISO8859-1.src
deleted file mode 100644
index 452834d1349f..000000000000
--- a/share/timedef/pt_PT.ISO8859-1.src
+++ /dev/null
@@ -1,103 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-# In Portugal we don't use the 12 + am/pm but the 24h format
-#
-# Short months names
-#
-Jan
-Fev
-Mar
-Abr
-Mai
-Jun
-Jul
-Ago
-Set
-Out
-Nov
-Dez
-#
-# Long months names
-#
-Janeiro
-Fevereiro
-Março
-Abril
-Maio
-Junho
-Julho
-Agosto
-Setembro
-Outubro
-Novembro
-Dezembro
-#
-# Short weekdays names
-#
-Dom
-Seg
-Ter
-Qua
-Qui
-Sex
-Sáb
-#
-# Long weekdays names
-#
-Domingo
-Segunda Feira
-Terça Feira
-Quarta Feira
-Quinta Feira
-Sexta Feira
-Sábado
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-
-#
-# pm
-#
-
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-Janeiro
-Fevereiro
-Março
-Abril
-Maio
-Junho
-Julho
-Agosto
-Setembro
-Outubro
-Novembro
-Dezembro
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-
-# EOF
diff --git a/share/timedef/ru_RU.CP866.src b/share/timedef/ru_RU.CP866.src
deleted file mode 100644
index db15000322ee..000000000000
--- a/share/timedef/ru_RU.CP866.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-ï­¢
-䥢
-¬ à
- ¯à
-¬ ©
-¨î­
-¨î«
- ¢£
-ᥭ
-®ªâ
-­®ï
-¤¥ª
-#
-# Long months names
-#
-ï­¢ àï
-䥢ࠫï
-¬ àâ 
- ¯à¥«ï
-¬ ï
-¨î­ï
-¨î«ï
- ¢£ãáâ 
-ᥭâï¡àï
-®ªâï¡àï
-­®ï¡àï
-¤¥ª ¡àï
-#
-# Short weekdays names
-#
-¢á
-¯­
-¢â
-áà
-çâ
-¯â
-á¡
-#
-# Long weekdays names
-#
-¢®áªà¥á¥­ì¥
-¯®­¥¤¥«ì­¨ª
-¢â®à­¨ª
-á। 
-ç¥â¢¥à£
-¯ïâ­¨æ 
-áã¡¡®â 
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%A, %e %B %Y £. %X
-#
-# am
-#
-
-#
-# pm
-#
-
-#
-# date_fmt
-#
-%A, %e %B %Y £. %X (%Z)
-#
-# Long month names in alternative form
-#
-ï­¢ àì
-䥢ࠫì
-¬ àâ
- ¯à¥«ì
-¬ ©
-¨î­ì
-¨î«ì
- ¢£ãáâ
-ᥭâï¡àì
-®ªâï¡àì
-­®ï¡àì
-¤¥ª ¡àì
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-
-# EOF
diff --git a/share/timedef/ru_RU.ISO8859-5.src b/share/timedef/ru_RU.ISO8859-5.src
deleted file mode 100644
index 750bd189f458..000000000000
--- a/share/timedef/ru_RU.ISO8859-5.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-ïÝÒ
-äÕÒ
-ÜÐà
-Ðßà
-ÜÐÙ
-ØîÝ
-ØîÛ
-ÐÒÓ
-áÕÝ
-ÞÚâ
-ÝÞï
-ÔÕÚ
-#
-# Long months names
-#
-ïÝÒÐàï
-äÕÒàÐÛï
-ÜÐàâÐ
-ÐßàÕÛï
-ÜÐï
-ØîÝï
-ØîÛï
-ÐÒÓãáâÐ
-áÕÝâïÑàï
-ÞÚâïÑàï
-ÝÞïÑàï
-ÔÕÚÐÑàï
-#
-# Short weekdays names
-#
-Òá
-ßÝ
-Òâ
-áà
-çâ
-ßâ
-áÑ
-#
-# Long weekdays names
-#
-ÒÞáÚàÕáÕÝìÕ
-ßÞÝÕÔÕÛìÝØÚ
-ÒâÞàÝØÚ
-áàÕÔÐ
-çÕâÒÕàÓ
-ßïâÝØæÐ
-áãÑÑÞâÐ
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%A, %e %B %Y Ó. %X
-#
-# am
-#
-
-#
-# pm
-#
-
-#
-# date_fmt
-#
-%A, %e %B %Y Ó. %X (%Z)
-#
-# Long month names in alternative form
-#
-ïÝÒÐàì
-äÕÒàÐÛì
-ÜÐàâ
-ÐßàÕÛì
-ÜÐÙ
-ØîÝì
-ØîÛì
-ÐÒÓãáâ
-áÕÝâïÑàì
-ÞÚâïÑàì
-ÝÞïÑàì
-ÔÕÚÐÑàì
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-
-# EOF
diff --git a/share/timedef/ru_RU.KOI8-R.src b/share/timedef/ru_RU.KOI8-R.src
deleted file mode 100644
index f5a250f62186..000000000000
--- a/share/timedef/ru_RU.KOI8-R.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-ÑÎ×
-ÆÅ×
-ÍÁÒ
-ÁÐÒ
-ÍÁÊ
-ÉÀÎ
-ÉÀÌ
-Á×Ç
-ÓÅÎ
-ÏËÔ
-ÎÏÑ
-ÄÅË
-#
-# Long months names
-#
-ÑÎ×ÁÒÑ
-ÆÅ×ÒÁÌÑ
-ÍÁÒÔÁ
-ÁÐÒÅÌÑ
-ÍÁÑ
-ÉÀÎÑ
-ÉÀÌÑ
-Á×ÇÕÓÔÁ
-ÓÅÎÔÑÂÒÑ
-ÏËÔÑÂÒÑ
-ÎÏÑÂÒÑ
-ÄÅËÁÂÒÑ
-#
-# Short weekdays names
-#
-×Ó
-ÐÎ
-×Ô
-ÓÒ
-ÞÔ
-ÐÔ
-ÓÂ
-#
-# Long weekdays names
-#
-×ÏÓËÒÅÓÅÎØÅ
-ÐÏÎÅÄÅÌØÎÉË
-×ÔÏÒÎÉË
-ÓÒÅÄÁ
-ÞÅÔ×ÅÒÇ
-ÐÑÔÎÉÃÁ
-ÓÕÂÂÏÔÁ
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%A, %e %B %Y Ç. %X
-#
-# am
-#
-
-#
-# pm
-#
-
-#
-# date_fmt
-#
-%A, %e %B %Y Ç. %X (%Z)
-#
-# Long month names in alternative form
-#
-ÑÎ×ÁÒØ
-ÆÅ×ÒÁÌØ
-ÍÁÒÔ
-ÁÐÒÅÌØ
-ÍÁÊ
-ÉÀÎØ
-ÉÀÌØ
-Á×ÇÕÓÔ
-ÓÅÎÔÑÂÒØ
-ÏËÔÑÂÒØ
-ÎÏÑÂÒØ
-ÄÅËÁÂÒØ
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-
-# EOF
diff --git a/share/timedef/sl_SI.ISO8859-2.src b/share/timedef/sl_SI.ISO8859-2.src
deleted file mode 100644
index 266238fc36dc..000000000000
--- a/share/timedef/sl_SI.ISO8859-2.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short months names
-#
-Jan
-Feb
-Mar
-Apr
-Maj
-Jun
-Jul
-Avg
-Sep
-Okt
-Nov
-Dec
-#
-# Long months names
-#
-Januar
-Februar
-Marec
-April
-Maj
-Junij
-Julij
-Avgust
-September
-Oktober
-November
-December
-#
-# Short weekdays names
-#
-Ned
-Pon
-Tor
-Sre
-Èet
-Pet
-Sob
-#
-# Long weekdays names
-#
-Nedelja
-Ponedeljek
-Torek
-Sreda
-Èetrtek
-Petek
-Sobota
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long months names (alternative)
-#
-Januar
-Februar
-Marec
-April
-Maj
-Junij
-Julij
-Avgust
-September
-Oktober
-November
-December
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/sv_SE.ISO8859-1.src b/share/timedef/sv_SE.ISO8859-1.src
deleted file mode 100644
index 3eb603f1f93c..000000000000
--- a/share/timedef/sv_SE.ISO8859-1.src
+++ /dev/null
@@ -1,101 +0,0 @@
-# $FreeBSD$
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
-Jan
-Feb
-Mar
-Apr
-Maj
-Jun
-Jul
-Aug
-Sep
-Okt
-Nov
-Dec
-#
-# Long month names
-#
-Januari
-Februari
-Mars
-April
-Maj
-Juni
-Juli
-Augusti
-September
-Oktober
-November
-December
-#
-# Short weekday names
-#
-Sön
-Mån
-Tis
-Ons
-Tor
-Fre
-Lör
-#
-# Long weekday names
-#
-Söndag
-Måndag
-Tisdag
-Onsdag
-Torsdag
-Fredag
-Lördag
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d.%m.%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-am
-#
-# pm
-#
-pm
-#
-# date_fmt
-#
-%a %e %b %Y %X %Z
-#
-# Long month names (alternative)
-#
-Januari
-Februari
-Mars
-April
-Maj
-Juni
-Juli
-Augusti
-September
-Oktober
-November
-December
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/tr_TR.ISO8859-9.src b/share/timedef/tr_TR.ISO8859-9.src
deleted file mode 100644
index 7a32eb80ef09..000000000000
--- a/share/timedef/tr_TR.ISO8859-9.src
+++ /dev/null
@@ -1,104 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Evren Yurtesen <yurtesen@ispro.net.tr>
-#
-# Short month names
-#
-Oca
-Þub
-Mar
-Nis
-May
-Haz
-Tem
-Aðu
-Eyl
-Eki
-Kas
-Ara
-#
-# Long month names
-#
-Ocak
-Þubat
-Mart
-Nisan
-Mayýs
-Haziran
-Temmuz
-Aðustos
-Eylül
-Ekim
-Kasým
-Aralýk
-#
-# Short weekday names
-#
-Paz
-Pts
-Sal
-Çar
-Per
-Cum
-Cts
-#
-# Long weekday names
-#
-Pazar
-Pazartesi
-Salý
-Çarþamba
-Perþembe
-Cuma
-Cumartesi
-#
-# X_fmt
-#
-%H:%M:%S
-#
-# x_fmt
-#
-%d/%m/%Y
-#
-# c_fmt
-#
-%a %e %b %X %Y
-#
-# am
-#
-AM
-#
-# pm
-#
-PM
-#
-# date_fmt
-#
-%e %b %Y %a %Z %X
-#
-# Long months names (alternative)
-#
-Ocak
-Subat
-Mart
-Nisan
-Mayis
-Haziran
-Temmuz
-Agustos
-Eylul
-Ekim
-Kasim
-Aralik
-#
-# md_order
-#
-dm
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/share/timedef/zh_CN.eucCN.src b/share/timedef/zh_CN.eucCN.src
deleted file mode 100644
index 3aef210f292c..000000000000
--- a/share/timedef/zh_CN.eucCN.src
+++ /dev/null
@@ -1,102 +0,0 @@
-# $FreeBSD$
-#
-# WARNING: spaces may be essential at the end of lines
-# WARNING: empty lines are essential too
-#
-# Short month names
-#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-#
-# Long month names
-#
-Ò»ÔÂ
-¶þÔÂ
-ÈýÔÂ
-ËÄÔÂ
-ÎåÔÂ
-ÁùÔÂ
-ÆßÔÂ
-°ËÔÂ
-¾ÅÔÂ
-Ê®ÔÂ
-ʮһÔÂ
-Ê®¶þÔÂ
-#
-# Short weekday names
-#
-ÖÜÈÕ
-ÖÜÒ»
-Öܶþ
-ÖÜÈý
-ÖÜËÄ
-ÖÜÎå
-ÖÜÁù
-#
-# Long weekday names
-#
-ÐÇÆÚÈÕ
-ÐÇÆÚÒ»
-ÐÇÆÚ¶þ
-ÐÇÆÚÈý
-ÐÇÆÚËÄ
-ÐÇÆÚÎå
-ÐÇÆÚÁù
-#
-# X_fmt
-#
-%Hʱ%M·Ö%SÃë
-#
-# x_fmt
-#
-%Y/%m/%d
-#
-# c_fmt
-#
-%a %b/%e %T %Y
-#
-# am
-#
-ÉÏÎç
-#
-# pm
-#
-ÏÂÎç
-#
-# date_fmt
-#
-%YÄê%bÔÂ%eÈÕ %A %X %Z
-#
-# Long month names (alternative)
-#
-Ò»ÔÂ
-¶þÔÂ
-ÈýÔÂ
-ËÄÔÂ
-ÎåÔÂ
-ÁùÔÂ
-ÆßÔÂ
-°ËÔÂ
-¾ÅÔÂ
-Ê®ÔÂ
-ʮһÔÂ
-Ê®¶þÔÂ
-#
-# md_order
-#
-md
-#
-# ampm_fmt
-#
-%I:%M:%S %p
-# EOF
diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c
deleted file mode 100644
index 6d4622e86114..000000000000
--- a/sys/contrib/ipfilter/netinet/fil.c
+++ /dev/null
@@ -1,2132 +0,0 @@
-/*
- * Copyright (C) 1993-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- */
-#if !defined(lint)
-static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed";
-/* static const char rcsid[] = "@(#)$Id: fil.c,v 2.3.2.16 2000/01/27 08:49:37 darrenr Exp $"; */
-static const char rcsid[] = "@(#)$FreeBSD$";
-#endif
-
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/file.h>
-#if defined(__NetBSD__) && (NetBSD >= 199905) && !defined(IPFILTER_LKM) && \
- defined(_KERNEL)
-# include "opt_ipfilter_log.h"
-#endif
-#if (defined(KERNEL) || defined(_KERNEL)) && defined(__FreeBSD_version) && \
- (__FreeBSD_version >= 220000)
-# if (__FreeBSD_version >= 400000)
-# ifndef KLD_MODULE
-# include "opt_inet6.h"
-# endif
-# if (__FreeBSD_version == 400019)
-# define CSUM_DELAY_DATA
-# endif
-# endif
-# include <sys/filio.h>
-# include <sys/fcntl.h>
-#else
-# include <sys/ioctl.h>
-#endif
-#if (defined(_KERNEL) || defined(KERNEL)) && !defined(linux)
-# include <sys/systm.h>
-#else
-# include <stdio.h>
-# include <string.h>
-# include <stdlib.h>
-#endif
-#include <sys/uio.h>
-#if !defined(__SVR4) && !defined(__svr4__)
-# ifndef linux
-# include <sys/mbuf.h>
-# endif
-#else
-# include <sys/byteorder.h>
-# if SOLARIS2 < 5
-# include <sys/dditypes.h>
-# endif
-# include <sys/stream.h>
-#endif
-#ifndef linux
-# include <sys/protosw.h>
-# include <sys/socket.h>
-#endif
-#include <net/if.h>
-#ifdef sun
-# include <net/af.h>
-#endif
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#ifndef linux
-# include <netinet/ip_var.h>
-#endif
-#if defined(__sgi) && defined(IFF_DRVRLOCK) /* IRIX 6 */
-# include <sys/hashing.h>
-# include <netinet/in_var.h>
-#endif
-#include <netinet/tcp.h>
-#include <netinet/udp.h>
-#include <netinet/ip_icmp.h>
-#include "netinet/ip_compat.h"
-#ifdef USE_INET6
-# include <netinet/icmp6.h>
-# if !SOLARIS && defined(_KERNEL)
-# include <netinet6/in6_var.h>
-# endif
-#endif
-#include <netinet/tcpip.h>
-#include "netinet/ip_fil.h"
-#include "netinet/ip_proxy.h"
-#include "netinet/ip_nat.h"
-#include "netinet/ip_frag.h"
-#include "netinet/ip_state.h"
-#include "netinet/ip_auth.h"
-# if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000)
-# include <sys/malloc.h>
-# if defined(_KERNEL) && !defined(IPFILTER_LKM)
-# include "opt_ipfilter.h"
-# endif
-# endif
-#ifndef MIN
-# define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-#include "netinet/ipl.h"
-
-#include <machine/in_cksum.h>
-
-#ifndef _KERNEL
-# include "ipf.h"
-# include "ipt.h"
-extern int opts;
-
-# define FR_VERBOSE(verb_pr) verbose verb_pr
-# define FR_DEBUG(verb_pr) debug verb_pr
-# define IPLLOG(a, c, d, e) ipllog()
-#else /* #ifndef _KERNEL */
-# define FR_VERBOSE(verb_pr)
-# define FR_DEBUG(verb_pr)
-# define IPLLOG(a, c, d, e) ipflog(a, c, d, e)
-# if SOLARIS || defined(__sgi)
-extern KRWLOCK_T ipf_mutex, ipf_auth, ipf_nat;
-extern kmutex_t ipf_rw;
-# endif
-# if SOLARIS
-# define FR_NEWAUTH(m, fi, ip, qif) fr_newauth((mb_t *)m, fi, \
- ip, qif)
-# else /* SOLARIS */
-# define FR_NEWAUTH(m, fi, ip, qif) fr_newauth((mb_t *)m, fi, ip)
-# endif /* SOLARIS || __sgi */
-#endif /* _KERNEL */
-
-
-struct filterstats frstats[2] = {{0,0,0,0,0},{0,0,0,0,0}};
-struct frentry *ipfilter[2][2] = { { NULL, NULL }, { NULL, NULL } },
-#ifdef USE_INET6
- *ipfilter6[2][2] = { { NULL, NULL }, { NULL, NULL } },
- *ipacct6[2][2] = { { NULL, NULL }, { NULL, NULL } },
-#endif
- *ipacct[2][2] = { { NULL, NULL }, { NULL, NULL } };
-struct frgroup *ipfgroups[3][2];
-int fr_flags = IPF_LOGGING;
-int fr_active = 0;
-int fr_chksrc = 0;
-int fr_minttl = 3;
-int fr_minttllog = 1;
-#if defined(IPFILTER_DEFAULT_BLOCK)
-int fr_pass = FR_NOMATCH|FR_BLOCK;
-#else
-int fr_pass = (IPF_DEFAULT_PASS|FR_NOMATCH);
-#endif
-char ipfilter_version[] = IPL_VERSION;
-
-fr_info_t frcache[2];
-
-static int frflushlist __P((int, minor_t, int *, frentry_t **));
-#ifdef _KERNEL
-static void frsynclist __P((frentry_t *));
-#endif
-
-
-/*
- * bit values for identifying presence of individual IP options
- */
-struct optlist ipopts[20] = {
- { IPOPT_NOP, 0x000001 },
- { IPOPT_RR, 0x000002 },
- { IPOPT_ZSU, 0x000004 },
- { IPOPT_MTUP, 0x000008 },
- { IPOPT_MTUR, 0x000010 },
- { IPOPT_ENCODE, 0x000020 },
- { IPOPT_TS, 0x000040 },
- { IPOPT_TR, 0x000080 },
- { IPOPT_SECURITY, 0x000100 },
- { IPOPT_LSRR, 0x000200 },
- { IPOPT_E_SEC, 0x000400 },
- { IPOPT_CIPSO, 0x000800 },
- { IPOPT_SATID, 0x001000 },
- { IPOPT_SSRR, 0x002000 },
- { IPOPT_ADDEXT, 0x004000 },
- { IPOPT_VISA, 0x008000 },
- { IPOPT_IMITD, 0x010000 },
- { IPOPT_EIP, 0x020000 },
- { IPOPT_FINN, 0x040000 },
- { 0, 0x000000 }
-};
-
-/*
- * bit values for identifying presence of individual IP security options
- */
-struct optlist secopt[8] = {
- { IPSO_CLASS_RES4, 0x01 },
- { IPSO_CLASS_TOPS, 0x02 },
- { IPSO_CLASS_SECR, 0x04 },
- { IPSO_CLASS_RES3, 0x08 },
- { IPSO_CLASS_CONF, 0x10 },
- { IPSO_CLASS_UNCL, 0x20 },
- { IPSO_CLASS_RES2, 0x40 },
- { IPSO_CLASS_RES1, 0x80 }
-};
-
-
-/*
- * compact the IP header into a structure which contains just the info.
- * which is useful for comparing IP headers with.
- */
-void fr_makefrip(hlen, ip, fin)
-int hlen;
-ip_t *ip;
-fr_info_t *fin;
-{
- u_short optmsk = 0, secmsk = 0, auth = 0;
- int i, mv, ol, off, p, plen, v;
- fr_ip_t *fi = &fin->fin_fi;
- struct optlist *op;
- u_char *s, opt;
- tcphdr_t *tcp;
-
- fin->fin_rev = 0;
- fin->fin_fr = NULL;
- fin->fin_tcpf = 0;
- fin->fin_data[0] = 0;
- fin->fin_data[1] = 0;
- fin->fin_rule = -1;
- fin->fin_group = -1;
-#ifdef _KERNEL
- fin->fin_icode = ipl_unreach;
-#endif
- v = fin->fin_v;
- fi->fi_v = v;
- fin->fin_hlen = hlen;
- if (v == 4) {
- fin->fin_id = ip->ip_id;
- fi->fi_tos = ip->ip_tos;
- off = (ip->ip_off & IP_OFFMASK) << 3;
- tcp = (tcphdr_t *)((char *)ip + hlen);
- (*(((u_short *)fi) + 1)) = (*(((u_short *)ip) + 4));
- fi->fi_src.i6[1] = 0;
- fi->fi_src.i6[2] = 0;
- fi->fi_src.i6[3] = 0;
- fi->fi_dst.i6[1] = 0;
- fi->fi_dst.i6[2] = 0;
- fi->fi_dst.i6[3] = 0;
- fi->fi_saddr = ip->ip_src.s_addr;
- fi->fi_daddr = ip->ip_dst.s_addr;
- p = ip->ip_p;
- fi->fi_fl = (hlen > sizeof(ip_t)) ? FI_OPTIONS : 0;
- if (ip->ip_off & 0x3fff)
- fi->fi_fl |= FI_FRAG;
- plen = ip->ip_len;
- fin->fin_dlen = plen - hlen;
- }
-#ifdef USE_INET6
- else if (v == 6) {
- ip6_t *ip6 = (ip6_t *)ip;
-
- off = 0;
- p = ip6->ip6_nxt;
- fi->fi_p = p;
- fi->fi_ttl = ip6->ip6_hlim;
- tcp = (tcphdr_t *)(ip6 + 1);
- fi->fi_src.in6 = ip6->ip6_src;
- fi->fi_dst.in6 = ip6->ip6_dst;
- fin->fin_id = (u_short)(ip6->ip6_flow & 0xffff);
- fi->fi_tos = 0;
- fi->fi_fl = 0;
- plen = ntohs(ip6->ip6_plen);
- fin->fin_dlen = plen;
- }
-#endif
- else
- return;
-
- fin->fin_off = off;
- fin->fin_plen = plen;
- fin->fin_dp = (void *)tcp;
-
- switch (p)
- {
-#ifdef USE_INET6
- case IPPROTO_ICMPV6 :
- {
- int minicmpsz = sizeof(struct icmp6_hdr);
- struct icmp6_hdr *icmp6;
-
- if (fin->fin_dlen > 1) {
- fin->fin_data[0] = *(u_short *)tcp;
-
- icmp6 = (struct icmp6_hdr *)tcp;
-
- switch (icmp6->icmp6_type)
- {
- case ICMP6_ECHO_REPLY :
- case ICMP6_ECHO_REQUEST :
- minicmpsz = ICMP6ERR_MINPKTLEN;
- break;
- case ICMP6_DST_UNREACH :
- case ICMP6_PACKET_TOO_BIG :
- case ICMP6_TIME_EXCEEDED :
- case ICMP6_PARAM_PROB :
- minicmpsz = ICMP6ERR_IPICMPHLEN;
- break;
- default :
- break;
- }
- }
-
- if (!(plen >= hlen + minicmpsz))
- fi->fi_fl |= FI_SHORT;
-
- break;
- }
-#endif
- case IPPROTO_ICMP :
- {
- int minicmpsz = sizeof(struct icmp);
- icmphdr_t *icmp;
-
- if (!off && (fin->fin_dlen > 1)) {
- fin->fin_data[0] = *(u_short *)tcp;
-
- icmp = (icmphdr_t *)tcp;
-
- if (icmp->icmp_type == ICMP_ECHOREPLY ||
- icmp->icmp_type == ICMP_ECHO)
- minicmpsz = ICMP_MINLEN;
-
- /*
- * type(1) + code(1) + cksum(2) + id(2) seq(2) +
- * 3*timestamp(3*4)
- */
- else if (icmp->icmp_type == ICMP_TSTAMP ||
- icmp->icmp_type == ICMP_TSTAMPREPLY)
- minicmpsz = 20;
-
- /*
- * type(1) + code(1) + cksum(2) + id(2) seq(2) +
- * mask(4)
- */
- else if (icmp->icmp_type == ICMP_MASKREQ ||
- icmp->icmp_type == ICMP_MASKREPLY)
- minicmpsz = 12;
- }
-
- if ((!(plen >= hlen + minicmpsz) && !off) ||
- (off && off < sizeof(struct icmp)))
- fi->fi_fl |= FI_SHORT;
-
- break;
- }
- case IPPROTO_TCP :
- fi->fi_fl |= FI_TCPUDP;
-#ifdef USE_INET6
- if (v == 6) {
- if (plen < sizeof(struct tcphdr))
- fi->fi_fl |= FI_SHORT;
- } else
-#endif
- if (v == 4) {
- if ((!IPMINLEN(ip, tcphdr) && !off) ||
- (off && off < sizeof(struct tcphdr)))
- fi->fi_fl |= FI_SHORT;
- }
- if (!(fi->fi_fl & FI_SHORT) && !off)
- fin->fin_tcpf = tcp->th_flags;
- goto getports;
- case IPPROTO_UDP :
- fi->fi_fl |= FI_TCPUDP;
-#ifdef USE_INET6
- if (v == 6) {
- if (plen < sizeof(struct udphdr))
- fi->fi_fl |= FI_SHORT;
- } else
-#endif
- if (v == 4) {
- if ((!IPMINLEN(ip, udphdr) && !off) ||
- (off && off < sizeof(struct udphdr)))
- fi->fi_fl |= FI_SHORT;
- }
-getports:
- if (!off && (fin->fin_dlen > 3)) {
- fin->fin_data[0] = ntohs(tcp->th_sport);
- fin->fin_data[1] = ntohs(tcp->th_dport);
- }
- break;
- default :
- break;
- }
-
-#ifdef USE_INET6
- if (v == 6) {
- fi->fi_optmsk = 0;
- fi->fi_secmsk = 0;
- fi->fi_auth = 0;
- return;
- }
-#endif
-
- for (s = (u_char *)(ip + 1), hlen -= (int)sizeof(*ip); hlen > 0; ) {
- opt = *s;
- if (opt == '\0')
- break;
- else if (opt == IPOPT_NOP)
- ol = 1;
- else {
- if (hlen < 2)
- break;
- ol = (int)*(s + 1);
- if (ol < 2 || ol > hlen)
- break;
- }
- for (i = 9, mv = 4; mv >= 0; ) {
- op = ipopts + i;
- if (opt == (u_char)op->ol_val) {
- optmsk |= op->ol_bit;
- if (opt == IPOPT_SECURITY) {
- struct optlist *sp;
- u_char sec;
- int j, m;
-
- sec = *(s + 2); /* classification */
- for (j = 3, m = 2; m >= 0; ) {
- sp = secopt + j;
- if (sec == sp->ol_val) {
- secmsk |= sp->ol_bit;
- auth = *(s + 3);
- auth *= 256;
- auth += *(s + 4);
- break;
- }
- if (sec < sp->ol_val)
- j -= m--;
- else
- j += m--;
- }
- }
- break;
- }
- if (opt < op->ol_val)
- i -= mv--;
- else
- i += mv--;
- }
- hlen -= ol;
- s += ol;
- }
- if (auth && !(auth & 0x0100))
- auth &= 0xff00;
- fi->fi_optmsk = optmsk;
- fi->fi_secmsk = secmsk;
- fi->fi_auth = auth;
-}
-
-
-/*
- * check an IP packet for TCP/UDP characteristics such as ports and flags.
- */
-int fr_tcpudpchk(ft, fin)
-frtuc_t *ft;
-fr_info_t *fin;
-{
- register u_short po, tup;
- register char i;
- register int err = 1;
-
- /*
- * Both ports should *always* be in the first fragment.
- * So far, I cannot find any cases where they can not be.
- *
- * compare destination ports
- */
- if ((i = (int)ft->ftu_dcmp)) {
- po = ft->ftu_dport;
- tup = fin->fin_data[1];
- /*
- * Do opposite test to that required and
- * continue if that succeeds.
- */
- if (!--i && tup != po) /* EQUAL */
- err = 0;
- else if (!--i && tup == po) /* NOTEQUAL */
- err = 0;
- else if (!--i && tup >= po) /* LESSTHAN */
- err = 0;
- else if (!--i && tup <= po) /* GREATERTHAN */
- err = 0;
- else if (!--i && tup > po) /* LT or EQ */
- err = 0;
- else if (!--i && tup < po) /* GT or EQ */
- err = 0;
- else if (!--i && /* Out of range */
- (tup >= po && tup <= ft->ftu_dtop))
- err = 0;
- else if (!--i && /* In range */
- (tup <= po || tup >= ft->ftu_dtop))
- err = 0;
- }
- /*
- * compare source ports
- */
- if (err && (i = (int)ft->ftu_scmp)) {
- po = ft->ftu_sport;
- tup = fin->fin_data[0];
- if (!--i && tup != po)
- err = 0;
- else if (!--i && tup == po)
- err = 0;
- else if (!--i && tup >= po)
- err = 0;
- else if (!--i && tup <= po)
- err = 0;
- else if (!--i && tup > po)
- err = 0;
- else if (!--i && tup < po)
- err = 0;
- else if (!--i && /* Out of range */
- (tup >= po && tup <= ft->ftu_stop))
- err = 0;
- else if (!--i && /* In range */
- (tup <= po || tup >= ft->ftu_stop))
- err = 0;
- }
-
- /*
- * If we don't have all the TCP/UDP header, then how can we
- * expect to do any sort of match on it ? If we were looking for
- * TCP flags, then NO match. If not, then match (which should
- * satisfy the "short" class too).
- */
- if (err && (fin->fin_fi.fi_p == IPPROTO_TCP)) {
- if (fin->fin_fi.fi_fl & FI_SHORT)
- return !(ft->ftu_tcpf | ft->ftu_tcpfm);
- /*
- * Match the flags ? If not, abort this match.
- */
- if (ft->ftu_tcpfm &&
- ft->ftu_tcpf != (fin->fin_tcpf & ft->ftu_tcpfm)) {
- FR_DEBUG(("f. %#x & %#x != %#x\n", fin->fin_tcpf,
- ft->ftu_tcpfm, ft->ftu_tcpf));
- err = 0;
- }
- }
- return err;
-}
-
-/*
- * Check the input/output list of rules for a match and result.
- * Could be per interface, but this gets real nasty when you don't have
- * kernel sauce.
- */
-int fr_scanlist(pass, ip, fin, m)
-u_32_t pass;
-ip_t *ip;
-register fr_info_t *fin;
-void *m;
-{
- register struct frentry *fr;
- register fr_ip_t *fi = &fin->fin_fi;
- int rulen, portcmp = 0, off, skip = 0, logged = 0;
- u_32_t passt;
-
- fr = fin->fin_fr;
- fin->fin_fr = NULL;
- fin->fin_rule = 0;
- fin->fin_group = 0;
- if (fin->fin_v == 4)
- off = ip->ip_off & IP_OFFMASK;
- else
- off = 0;
- pass |= (fi->fi_fl << 24);
-
- if ((fi->fi_fl & FI_TCPUDP) && (fin->fin_dlen > 3) && !off)
- portcmp = 1;
-
- for (rulen = 0; fr; fr = fr->fr_next, rulen++) {
- if (skip) {
- skip--;
- continue;
- }
- /*
- * In all checks below, a null (zero) value in the
- * filter struture is taken to mean a wildcard.
- *
- * check that we are working for the right interface
- */
-#ifdef _KERNEL
-# if BSD >= 199306
- if (fin->fin_out != 0) {
- if ((fr->fr_oifa &&
- fr->fr_oifa != ((mb_t *)m)->m_pkthdr.rcvif) ||
- (fr->fr_ifa && fr->fr_ifa != fin->fin_ifp))
- continue;
- } else
-# endif
- if (fr->fr_ifa && fr->fr_ifa != fin->fin_ifp)
- continue;
-#else
- if (opts & (OPT_VERBOSE|OPT_DEBUG))
- printf("\n");
- FR_VERBOSE(("%c", (pass & FR_PASS) ? 'p' :
- (pass & FR_AUTH) ? 'a' : 'b'));
- if (fr->fr_ifa && fr->fr_ifa != fin->fin_ifp)
- continue;
- FR_VERBOSE((":i"));
-#endif
- {
- register u_32_t *ld, *lm, *lip;
- register int i;
-
- lip = (u_32_t *)fi;
- lm = (u_32_t *)&fr->fr_mip;
- ld = (u_32_t *)&fr->fr_ip;
- i = ((*lip & *lm) != *ld);
- FR_DEBUG(("0. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- if (i)
- continue;
- /*
- * We now know whether the packet version and the
- * rule version match, along with protocol, ttl and
- * tos.
- */
- lip++, lm++, ld++;
- /*
- * Unrolled loops (4 each, for 32 bits).
- */
- i |= ((*lip & *lm) != *ld) << 19;
- FR_DEBUG(("1a. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- if (fi->fi_v == 6) {
- lip++, lm++, ld++;
- i |= ((*lip & *lm) != *ld) << 19;
- FR_DEBUG(("1b. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- lip++, lm++, ld++;
- i |= ((*lip & *lm) != *ld) << 19;
- FR_DEBUG(("1c. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- lip++, lm++, ld++;
- i |= ((*lip & *lm) != *ld) << 19;
- FR_DEBUG(("1d. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- } else {
- lip += 3;
- lm += 3;
- ld += 3;
- }
- i ^= (fr->fr_flags & FR_NOTSRCIP);
- if (i)
- continue;
- lip++, lm++, ld++;
- i |= ((*lip & *lm) != *ld) << 20;
- FR_DEBUG(("2a. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- if (fi->fi_v == 6) {
- lip++, lm++, ld++;
- i |= ((*lip & *lm) != *ld) << 20;
- FR_DEBUG(("2b. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- lip++, lm++, ld++;
- i |= ((*lip & *lm) != *ld) << 20;
- FR_DEBUG(("2c. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- lip++, lm++, ld++;
- i |= ((*lip & *lm) != *ld) << 20;
- FR_DEBUG(("2d. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- } else {
- lip += 3;
- lm += 3;
- ld += 3;
- }
- i ^= (fr->fr_flags & FR_NOTDSTIP);
- if (i)
- continue;
- lip++, lm++, ld++;
- i |= ((*lip & *lm) != *ld);
- FR_DEBUG(("3. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- lip++, lm++, ld++;
- i |= ((*lip & *lm) != *ld);
- FR_DEBUG(("4. %#08x & %#08x != %#08x\n",
- *lip, *lm, *ld));
- if (i)
- continue;
- }
-
- /*
- * If a fragment, then only the first has what we're looking
- * for here...
- */
- if (!portcmp && (fr->fr_dcmp || fr->fr_scmp || fr->fr_tcpf ||
- fr->fr_tcpfm))
- continue;
- if (fi->fi_fl & FI_TCPUDP) {
- if (!fr_tcpudpchk(&fr->fr_tuc, fin))
- continue;
- } else if (fr->fr_icmpm || fr->fr_icmp) {
- if ((fi->fi_p != IPPROTO_ICMP) || off ||
- (fin->fin_dlen < 2))
- continue;
- if ((fin->fin_data[0] & fr->fr_icmpm) != fr->fr_icmp) {
- FR_DEBUG(("i. %#x & %#x != %#x\n",
- fin->fin_data[0], fr->fr_icmpm,
- fr->fr_icmp));
- continue;
- }
- }
- FR_VERBOSE(("*"));
- /*
- * Just log this packet...
- */
- passt = fr->fr_flags;
-#if (BSD >= 199306) && (defined(_KERNEL) || defined(KERNEL))
- if (securelevel <= 0)
-#endif
- if ((passt & FR_CALLNOW) && fr->fr_func)
- passt = (*fr->fr_func)(passt, ip, fin);
- fin->fin_fr = fr;
-#ifdef IPFILTER_LOG
- if ((passt & FR_LOGMASK) == FR_LOG) {
- if (!IPLLOG(passt, ip, fin, m)) {
- if (passt & FR_LOGORBLOCK)
- passt |= FR_BLOCK|FR_QUICK;
- ATOMIC_INCL(frstats[fin->fin_out].fr_skip);
- }
- ATOMIC_INCL(frstats[fin->fin_out].fr_pkl);
- logged = 1;
- }
-#endif /* IPFILTER_LOG */
- if (!(skip = fr->fr_skip) && (passt & FR_LOGMASK) != FR_LOG)
- pass = passt;
- FR_DEBUG(("pass %#x\n", pass));
- ATOMIC_INCL(fr->fr_hits);
- if (pass & FR_ACCOUNT)
- fr->fr_bytes += (U_QUAD_T)ip->ip_len;
- else
- fin->fin_icode = fr->fr_icode;
- fin->fin_rule = rulen;
- fin->fin_group = fr->fr_group;
- if (fr->fr_grp) {
- fin->fin_fr = fr->fr_grp;
- pass = fr_scanlist(pass, ip, fin, m);
- if (fin->fin_fr == NULL) {
- fin->fin_rule = rulen;
- fin->fin_group = fr->fr_group;
- fin->fin_fr = fr;
- }
- if (pass & FR_DONTCACHE)
- logged = 1;
- }
- if (pass & FR_QUICK)
- break;
- }
- if (logged)
- pass |= FR_DONTCACHE;
- return pass;
-}
-
-
-/*
- * frcheck - filter check
- * check using source and destination addresses/ports in a packet whether
- * or not to pass it on or not.
- */
-int fr_check(ip, hlen, ifp, out
-#if defined(_KERNEL) && SOLARIS
-, qif, mp)
-qif_t *qif;
-#else
-, mp)
-#endif
-mb_t **mp;
-ip_t *ip;
-int hlen;
-void *ifp;
-int out;
-{
- /*
- * The above really sucks, but short of writing a diff
- */
- fr_info_t frinfo, *fc;
- register fr_info_t *fin = &frinfo;
- int changed, error = EHOSTUNREACH, v = ip->ip_v;
- frentry_t *fr = NULL, *list;
- u_32_t pass, apass;
-#if !SOLARIS || !defined(_KERNEL)
- register mb_t *m = *mp;
-#endif
-
-#ifdef _KERNEL
- int p, len, drop = 0, logit = 0;
- mb_t *mc = NULL;
-# if !defined(__SVR4) && !defined(__svr4__)
-# ifdef __sgi
- char hbuf[(0xf << 2) + sizeof(struct icmp) + sizeof(ip_t) + 8];
-# endif
- int up;
-
-# ifdef M_CANFASTFWD
- /*
- * XXX For now, IP Filter and fast-forwarding of cached flows
- * XXX are mutually exclusive. Eventually, IP Filter should
- * XXX get a "can-fast-forward" filter rule.
- */
- m->m_flags &= ~M_CANFASTFWD;
-# endif /* M_CANFASTFWD */
-# ifdef CSUM_DELAY_DATA
- /*
- * disable delayed checksums.
- */
- if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
- in_delayed_cksum(m);
- m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
- }
-# endif /* CSUM_DELAY_DATA */
-
-# ifdef USE_INET6
- if (v == 6) {
- len = ntohs(((ip6_t*)ip)->ip6_plen);
- p = ((ip6_t *)ip)->ip6_nxt;
- } else
-# endif
- {
- p = ip->ip_p;
- len = ip->ip_len;
- }
-
- if ((p == IPPROTO_TCP || p == IPPROTO_UDP || p == IPPROTO_ICMP
-# ifdef USE_INET6
- || (v == 6 && p == IPPROTO_ICMPV6)
-# endif
- )) {
- int plen = 0;
-
- if ((v == 6) || (ip->ip_off & IP_OFFMASK) == 0)
- switch(p)
- {
- case IPPROTO_TCP:
- plen = sizeof(tcphdr_t);
- break;
- case IPPROTO_UDP:
- plen = sizeof(udphdr_t);
- break;
- /* 96 - enough for complete ICMP error IP header */
- case IPPROTO_ICMP:
- plen = ICMPERR_MAXPKTLEN - sizeof(ip_t);
- break;
-# ifdef USE_INET6
- case IPPROTO_ICMPV6 :
- /*
- * XXX does not take intermediate header
- * into account
- */
- plen = ICMP6ERR_MINPKTLEN + 8 - sizeof(ip6_t);
- break;
-# endif
- }
- up = MIN(hlen + plen, len);
-
- if (up > m->m_len) {
-# ifdef __sgi
- /* Under IRIX, avoid m_pullup as it makes ping <hostname> panic */
- if ((up > sizeof(hbuf)) || (m_length(m) < up)) {
- ATOMIC_INCL(frstats[out].fr_pull[1]);
- return -1;
- }
- m_copydata(m, 0, up, hbuf);
- ATOMIC_INCL(frstats[out].fr_pull[0]);
- ip = (ip_t *)hbuf;
-# else /* __ sgi */
-# ifndef linux
- if ((*mp = m_pullup(m, up)) == 0) {
- ATOMIC_INCL(frstats[out].fr_pull[1]);
- return -1;
- } else {
- ATOMIC_INCL(frstats[out].fr_pull[0]);
- m = *mp;
- ip = mtod(m, ip_t *);
- }
-# endif /* !linux */
-# endif /* __sgi */
- } else
- up = 0;
- } else
- up = 0;
-# endif /* !defined(__SVR4) && !defined(__svr4__) */
-# if SOLARIS
- mb_t *m = qif->qf_m;
-
- if ((u_int)ip & 0x3)
- return 2;
- fin->fin_qfm = m;
- fin->fin_qif = qif;
-# endif
-#endif /* _KERNEL */
-
-#ifndef __FreeBSD__
- /*
- * Be careful here: ip_id is in network byte order when called
- * from ip_output()
- */
- if ((out) && (v == 4))
- ip->ip_id = ntohs(ip->ip_id);
-#endif
-
- changed = 0;
- fin->fin_ifp = ifp;
- fin->fin_v = v;
- fin->fin_out = out;
- fin->fin_mp = mp;
- fr_makefrip(hlen, ip, fin);
-
-#ifdef _KERNEL
-# ifdef USE_INET6
- if (v == 6) {
- ATOMIC_INCL(frstats[0].fr_ipv6[out]);
- if (((ip6_t *)ip)->ip6_hlim < fr_minttl) {
- ATOMIC_INCL(frstats[0].fr_badttl);
- if (fr_minttllog)
- logit = -2;
- }
- } else
-# endif
- if (!out) {
- if (fr_chksrc && !fr_verifysrc(ip->ip_src, ifp)) {
- ATOMIC_INCL(frstats[0].fr_badsrc);
- if (fr_chksrc == 2)
- logit = -2;
- } else if (ip->ip_ttl < fr_minttl) {
- ATOMIC_INCL(frstats[0].fr_badttl);
- if (fr_minttllog)
- logit = -3;
- }
- }
- if (drop) {
-# ifdef IPFILTER_LOG
- if (logit) {
- fin->fin_group = logit;
- pass = FR_INQUE|FR_NOMATCH|FR_LOGB;
- (void) IPLLOG(pass, ip, fin, m);
- }
-# endif
-# if !SOLARIS
- m_freem(m);
-# endif
- return error;
- }
-#endif
- pass = fr_pass;
- if (fin->fin_fi.fi_fl & FI_SHORT) {
- ATOMIC_INCL(frstats[out].fr_short);
- }
-
- READ_ENTER(&ipf_mutex);
-
- if (fin->fin_fi.fi_fl & FI_SHORT)
- ATOMIC_INCL(frstats[out].fr_short);
-
- /*
- * Check auth now. This, combined with the check below to see if apass
- * is 0 is to ensure that we don't count the packet twice, which can
- * otherwise occur when we reprocess it. As it is, we only count it
- * after it has no auth. table matchup. This also stops NAT from
- * occuring until after the packet has been auth'd.
- */
- apass = fr_checkauth(ip, fin);
-
- if (!out) {
-#ifdef USE_INET6
- if (v == 6)
- list = ipacct6[0][fr_active];
- else
-#endif
- list = ipacct[0][fr_active];
- changed = ip_natin(ip, fin);
- if (!apass && (fin->fin_fr = list) &&
- (fr_scanlist(FR_NOMATCH, ip, fin, m) & FR_ACCOUNT)) {
- ATOMIC_INCL(frstats[0].fr_acct);
- }
- }
-
- if (apass || (!(fr = ipfr_knownfrag(ip, fin)) &&
- !(fr = fr_checkstate(ip, fin)))) {
- /*
- * If a packet is found in the auth table, then skip checking
- * the access lists for permission but we do need to consider
- * the result as if it were from the ACL's.
- */
- if (!apass) {
- fc = frcache + out;
- if (!bcmp((char *)fin, (char *)fc, FI_CSIZE)) {
- /*
- * copy cached data so we can unlock the mutex
- * earlier.
- */
- bcopy((char *)fc, (char *)fin, FI_COPYSIZE);
- ATOMIC_INCL(frstats[out].fr_chit);
- if ((fr = fin->fin_fr)) {
- ATOMIC_INCL(fr->fr_hits);
- pass = fr->fr_flags;
- }
- } else {
-#ifdef USE_INET6
- if (v == 6)
- list = ipfilter6[out][fr_active];
- else
-#endif
- list = ipfilter[out][fr_active];
- if ((fin->fin_fr = list))
- pass = fr_scanlist(fr_pass, ip, fin, m);
- if (!(pass & (FR_KEEPSTATE|FR_DONTCACHE)))
- bcopy((char *)fin, (char *)fc,
- FI_COPYSIZE);
- if (pass & FR_NOMATCH) {
- ATOMIC_INCL(frstats[out].fr_nom);
- }
- }
- fr = fin->fin_fr;
- } else
- pass = apass;
-
- /*
- * If we fail to add a packet to the authorization queue,
- * then we drop the packet later. However, if it was added
- * then pretend we've dropped it already.
- */
- if ((pass & FR_AUTH))
- if (fr_newauth((mb_t *)m, fin, ip) != 0)
-#ifdef _KERNEL
- m = *mp = NULL;
-#else
- ;
-#endif
-
- if (pass & FR_PREAUTH) {
- READ_ENTER(&ipf_auth);
- if ((fin->fin_fr = ipauth) &&
- (pass = fr_scanlist(0, ip, fin, m))) {
- ATOMIC_INCL(fr_authstats.fas_hits);
- } else {
- ATOMIC_INCL(fr_authstats.fas_miss);
- }
- RWLOCK_EXIT(&ipf_auth);
- }
-
- fin->fin_fr = fr;
- if ((pass & (FR_KEEPFRAG|FR_KEEPSTATE)) == FR_KEEPFRAG) {
- if (fin->fin_fi.fi_fl & FI_FRAG) {
- if (ipfr_newfrag(ip, fin, pass) == -1) {
- ATOMIC_INCL(frstats[out].fr_bnfr);
- } else {
- ATOMIC_INCL(frstats[out].fr_nfr);
- }
- } else {
- ATOMIC_INCL(frstats[out].fr_cfr);
- }
- }
- if (pass & FR_KEEPSTATE) {
- if (fr_addstate(ip, fin, 0) == NULL) {
- ATOMIC_INCL(frstats[out].fr_bads);
- } else {
- ATOMIC_INCL(frstats[out].fr_ads);
- }
- }
- } else if (fr != NULL) {
- pass = fr->fr_flags;
- if (pass & FR_LOGFIRST)
- pass &= ~(FR_LOGFIRST|FR_LOG);
- }
-
-#if (BSD >= 199306) && (defined(_KERNEL) || defined(KERNEL))
- if (securelevel <= 0)
-#endif
- if (fr && fr->fr_func && !(pass & FR_CALLNOW))
- pass = (*fr->fr_func)(pass, ip, fin);
-
- /*
- * Only count/translate packets which will be passed on, out the
- * interface.
- */
- if (out && (pass & FR_PASS)) {
-#ifdef USE_INET6
- if (v == 6)
- list = ipacct6[1][fr_active];
- else
-#endif
- list = ipacct[1][fr_active];
- if ((fin->fin_fr = list) &&
- (fr_scanlist(FR_NOMATCH, ip, fin, m) & FR_ACCOUNT)) {
- ATOMIC_INCL(frstats[1].fr_acct);
- }
- fin->fin_fr = fr;
- changed = ip_natout(ip, fin);
- } else
- fin->fin_fr = fr;
- RWLOCK_EXIT(&ipf_mutex);
-
-#ifdef IPFILTER_LOG
- if ((fr_flags & FF_LOGGING) || (pass & FR_LOGMASK)) {
- if ((fr_flags & FF_LOGNOMATCH) && (pass & FR_NOMATCH)) {
- pass |= FF_LOGNOMATCH;
- ATOMIC_INCL(frstats[out].fr_npkl);
- goto logit;
- } else if (((pass & FR_LOGMASK) == FR_LOGP) ||
- ((pass & FR_PASS) && (fr_flags & FF_LOGPASS))) {
- if ((pass & FR_LOGMASK) != FR_LOGP)
- pass |= FF_LOGPASS;
- ATOMIC_INCL(frstats[out].fr_ppkl);
- goto logit;
- } else if (((pass & FR_LOGMASK) == FR_LOGB) ||
- ((pass & FR_BLOCK) && (fr_flags & FF_LOGBLOCK))) {
- if ((pass & FR_LOGMASK) != FR_LOGB)
- pass |= FF_LOGBLOCK;
- ATOMIC_INCL(frstats[out].fr_bpkl);
-logit:
- if (!IPLLOG(pass, ip, fin, m)) {
- ATOMIC_INCL(frstats[out].fr_skip);
- if ((pass & (FR_PASS|FR_LOGORBLOCK)) ==
- (FR_PASS|FR_LOGORBLOCK))
- pass ^= FR_PASS|FR_BLOCK;
- }
- }
- }
-#endif /* IPFILTER_LOG */
-
-#ifndef __FreeBSD__
- if ((out) && (v == 4))
- ip->ip_id = htons(ip->ip_id);
-#endif
-
-#ifdef _KERNEL
- /*
- * Only allow FR_DUP to work if a rule matched - it makes no sense to
- * set FR_DUP as a "default" as there are no instructions about where
- * to send the packet.
- */
- if (fr && (pass & FR_DUP))
-# if SOLARIS
- mc = dupmsg(m);
-# else
-# ifndef linux
- mc = m_copy(m, 0, M_COPYALL);
-# else
- ;
-# endif
-# endif
-#endif
- if (pass & FR_PASS) {
- ATOMIC_INCL(frstats[out].fr_pass);
- } else if (pass & FR_BLOCK) {
- ATOMIC_INCL(frstats[out].fr_block);
- /*
- * Should we return an ICMP packet to indicate error
- * status passing through the packet filter ?
- * WARNING: ICMP error packets AND TCP RST packets should
- * ONLY be sent in repsonse to incoming packets. Sending them
- * in response to outbound packets can result in a panic on
- * some operating systems.
- */
- if (!out) {
-#ifdef _KERNEL
- if (pass & FR_RETICMP) {
- int dst;
-
- if ((pass & FR_RETMASK) == FR_FAKEICMP)
- dst = 1;
- else
- dst = 0;
- send_icmp_err(ip, ICMP_UNREACH, fin, dst);
- ATOMIC_INCL(frstats[0].fr_ret);
- } else if (((pass & FR_RETMASK) == FR_RETRST) &&
- !(fin->fin_fi.fi_fl & FI_SHORT)) {
- if (send_reset(ip, fin) == 0) {
- ATOMIC_INCL(frstats[1].fr_ret);
- }
- }
-#else
- if ((pass & FR_RETMASK) == FR_RETICMP) {
- verbose("- ICMP unreachable sent\n");
- ATOMIC_INCL(frstats[0].fr_ret);
- } else if ((pass & FR_RETMASK) == FR_FAKEICMP) {
- verbose("- forged ICMP unreachable sent\n");
- ATOMIC_INCL(frstats[0].fr_ret);
- } else if (((pass & FR_RETMASK) == FR_RETRST) &&
- !(fin->fin_fi.fi_fl & FI_SHORT)) {
- verbose("- TCP RST sent\n");
- ATOMIC_INCL(frstats[1].fr_ret);
- }
-#endif
- } else {
- if (pass & FR_RETRST)
- error = ECONNRESET;
- }
- }
-
- /*
- * If we didn't drop off the bottom of the list of rules (and thus
- * the 'current' rule fr is not NULL), then we may have some extra
- * instructions about what to do with a packet.
- * Once we're finished return to our caller, freeing the packet if
- * we are dropping it (* BSD ONLY *).
- */
- if ((changed == -1) && (pass & FR_PASS)) {
- pass &= ~FR_PASS;
- pass |= FR_BLOCK;
- }
-#if defined(_KERNEL)
-# if !SOLARIS
-# if !defined(linux)
- if (fr) {
- frdest_t *fdp = &fr->fr_tif;
-
- if (((pass & FR_FASTROUTE) && !out) ||
- (fdp->fd_ifp && fdp->fd_ifp != (struct ifnet *)-1)) {
- if (ipfr_fastroute(m, fin, fdp) == 0)
- m = *mp = NULL;
- }
- if (mc)
- ipfr_fastroute(mc, fin, &fr->fr_dif);
- }
- if (!(pass & FR_PASS) && m)
- m_freem(m);
-# ifdef __sgi
- else if (changed && up && m)
- m_copyback(m, 0, up, hbuf);
-# endif
-# endif /* !linux */
-# else /* !SOLARIS */
- if (fr) {
- frdest_t *fdp = &fr->fr_tif;
-
- if (((pass & FR_FASTROUTE) && !out) ||
- (fdp->fd_ifp && fdp->fd_ifp != (struct ifnet *)-1)) {
- if (ipfr_fastroute(ip, m, mp, fin, fdp) == 0)
- m = *mp = NULL;
- }
- if (mc)
- ipfr_fastroute(ip, mc, mp, fin, &fr->fr_dif);
- }
-# endif /* !SOLARIS */
- return (pass & FR_PASS) ? 0 : error;
-#else /* _KERNEL */
- if (pass & FR_NOMATCH)
- return 1;
- if (pass & FR_PASS)
- return 0;
- if (pass & FR_AUTH)
- return -2;
- return -1;
-#endif /* _KERNEL */
-}
-
-
-/*
- * ipf_cksum
- * addr should be 16bit aligned and len is in bytes.
- * length is in bytes
- */
-u_short ipf_cksum(addr, len)
-register u_short *addr;
-register int len;
-{
- register u_32_t sum = 0;
-
- for (sum = 0; len > 1; len -= 2)
- sum += *addr++;
-
- /* mop up an odd byte, if necessary */
- if (len == 1)
- sum += *(u_char *)addr;
-
- /*
- * add back carry outs from top 16 bits to low 16 bits
- */
- sum = (sum >> 16) + (sum & 0xffff); /* add hi 16 to low 16 */
- sum += (sum >> 16); /* add carry */
- return (u_short)(~sum);
-}
-
-
-/*
- * NB: This function assumes we've pullup'd enough for all of the IP header
- * and the TCP header. We also assume that data blocks aren't allocated in
- * odd sizes.
- */
-u_short fr_tcpsum(m, ip, tcp)
-mb_t *m;
-ip_t *ip;
-tcphdr_t *tcp;
-{
- u_short *sp, slen, ts;
- u_int sum, sum2;
- int hlen;
-
- /*
- * Add up IP Header portion
- */
- hlen = ip->ip_hl << 2;
- slen = ip->ip_len - hlen;
- sum = htons((u_short)ip->ip_p);
- sum += htons(slen);
- sp = (u_short *)&ip->ip_src;
- sum += *sp++; /* ip_src */
- sum += *sp++;
- sum += *sp++; /* ip_dst */
- sum += *sp++;
- ts = tcp->th_sum;
- tcp->th_sum = 0;
-#ifdef KERNEL
-# if SOLARIS
- sum2 = ip_cksum(m, hlen, sum); /* hlen == offset */
- sum2 = (sum2 & 0xffff) + (sum2 >> 16);
- sum2 = ~sum2 & 0xffff;
-# else /* SOLARIS */
-# if defined(BSD) || defined(sun)
-# if BSD >= 199306
- m->m_data += hlen;
-# else
- m->m_off += hlen;
-# endif
- m->m_len -= hlen;
- sum2 = in_cksum(m, slen);
- m->m_len += hlen;
-# if BSD >= 199306
- m->m_data -= hlen;
-# else
- m->m_off -= hlen;
-# endif
- /*
- * Both sum and sum2 are partial sums, so combine them together.
- */
- sum = (sum & 0xffff) + (sum >> 16);
- sum = ~sum & 0xffff;
- sum2 += sum;
- sum2 = (sum2 & 0xffff) + (sum2 >> 16);
-# else /* defined(BSD) || defined(sun) */
-{
- union {
- u_char c[2];
- u_short s;
- } bytes;
- u_short len = ip->ip_len;
-# if defined(__sgi)
- int add;
-# endif
-
- /*
- * Add up IP Header portion
- */
- sp = (u_short *)&ip->ip_src;
- len -= (ip->ip_hl << 2);
- sum = ntohs(IPPROTO_TCP);
- sum += htons(len);
- sum += *sp++; /* ip_src */
- sum += *sp++;
- sum += *sp++; /* ip_dst */
- sum += *sp++;
- if (sp != (u_short *)tcp)
- sp = (u_short *)tcp;
- sum += *sp++; /* sport */
- sum += *sp++; /* dport */
- sum += *sp++; /* seq */
- sum += *sp++;
- sum += *sp++; /* ack */
- sum += *sp++;
- sum += *sp++; /* off */
- sum += *sp++; /* win */
- sum += *sp++; /* Skip over checksum */
- sum += *sp++; /* urp */
-
-# ifdef __sgi
- /*
- * In case we had to copy the IP & TCP header out of mbufs,
- * skip over the mbuf bits which are the header
- */
- if ((caddr_t)ip != mtod(m, caddr_t)) {
- hlen = (caddr_t)sp - (caddr_t)ip;
- while (hlen) {
- add = MIN(hlen, m->m_len);
- sp = (u_short *)(mtod(m, caddr_t) + add);
- hlen -= add;
- if (add == m->m_len) {
- m = m->m_next;
- if (!hlen) {
- if (!m)
- break;
- sp = mtod(m, u_short *);
- }
- PANIC((!m),("fr_tcpsum(1): not enough data"));
- }
- }
- }
-# endif
-
- if (!(len -= sizeof(*tcp)))
- goto nodata;
- while (len > 1) {
- if (((caddr_t)sp - mtod(m, caddr_t)) >= m->m_len) {
- m = m->m_next;
- PANIC((!m),("fr_tcpsum(2): not enough data"));
- sp = mtod(m, u_short *);
- }
- if (((caddr_t)(sp + 1) - mtod(m, caddr_t)) > m->m_len) {
- bytes.c[0] = *(u_char *)sp;
- m = m->m_next;
- PANIC((!m),("fr_tcpsum(3): not enough data"));
- sp = mtod(m, u_short *);
- bytes.c[1] = *(u_char *)sp;
- sum += bytes.s;
- sp = (u_short *)((u_char *)sp + 1);
- }
- if ((u_long)sp & 1) {
- bcopy((char *)sp++, (char *)&bytes.s, sizeof(bytes.s));
- sum += bytes.s;
- } else
- sum += *sp++;
- len -= 2;
- }
- if (len)
- sum += ntohs(*(u_char *)sp << 8);
-nodata:
- while (sum > 0xffff)
- sum = (sum & 0xffff) + (sum >> 16);
- sum2 = (u_short)(~sum & 0xffff);
-}
-# endif /* defined(BSD) || defined(sun) */
-# endif /* SOLARIS */
-#else /* KERNEL */
- sum2 = 0;
-#endif /* KERNEL */
- tcp->th_sum = ts;
- return sum2;
-}
-
-
-#if defined(_KERNEL) && ( ((BSD < 199306) && !SOLARIS) || defined(__sgi) )
-/*
- * Copyright (c) 1982, 1986, 1988, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94
- * $Id: fil.c,v 2.35.2.30 2000/12/17 05:49:22 darrenr Exp $
- */
-/*
- * Copy data from an mbuf chain starting "off" bytes from the beginning,
- * continuing for "len" bytes, into the indicated buffer.
- */
-void
-m_copydata(m, off, len, cp)
- register mb_t *m;
- register int off;
- register int len;
- caddr_t cp;
-{
- register unsigned count;
-
- if (off < 0 || len < 0)
- panic("m_copydata");
- while (off > 0) {
- if (m == 0)
- panic("m_copydata");
- if (off < m->m_len)
- break;
- off -= m->m_len;
- m = m->m_next;
- }
- while (len > 0) {
- if (m == 0)
- panic("m_copydata");
- count = MIN(m->m_len - off, len);
- bcopy(mtod(m, caddr_t) + off, cp, count);
- len -= count;
- cp += count;
- off = 0;
- m = m->m_next;
- }
-}
-
-
-# ifndef linux
-/*
- * Copy data from a buffer back into the indicated mbuf chain,
- * starting "off" bytes from the beginning, extending the mbuf
- * chain if necessary.
- */
-void
-m_copyback(m0, off, len, cp)
- struct mbuf *m0;
- register int off;
- register int len;
- caddr_t cp;
-{
- register int mlen;
- register struct mbuf *m = m0, *n;
- int totlen = 0;
-
- if (m0 == 0)
- return;
- while (off > (mlen = m->m_len)) {
- off -= mlen;
- totlen += mlen;
- if (m->m_next == 0) {
- n = m_getclr(M_DONTWAIT, m->m_type);
- if (n == 0)
- goto out;
- n->m_len = min(MLEN, len + off);
- m->m_next = n;
- }
- m = m->m_next;
- }
- while (len > 0) {
- mlen = min (m->m_len - off, len);
- bcopy(cp, off + mtod(m, caddr_t), (unsigned)mlen);
- cp += mlen;
- len -= mlen;
- mlen += off;
- off = 0;
- totlen += mlen;
- if (len == 0)
- break;
- if (m->m_next == 0) {
- n = m_get(M_DONTWAIT, m->m_type);
- if (n == 0)
- break;
- n->m_len = min(MLEN, len);
- m->m_next = n;
- }
- m = m->m_next;
- }
-out:
-#if 0
- if (((m = m0)->m_flags & M_PKTHDR) && (m->m_pkthdr.len < totlen))
- m->m_pkthdr.len = totlen;
-#endif
- return;
-}
-# endif /* linux */
-#endif /* (_KERNEL) && ( ((BSD < 199306) && !SOLARIS) || __sgi) */
-
-
-frgroup_t *fr_findgroup(num, flags, which, set, fgpp)
-u_32_t num, flags;
-minor_t which;
-int set;
-frgroup_t ***fgpp;
-{
- frgroup_t *fg, **fgp;
-
- if (which == IPL_LOGAUTH)
- fgp = &ipfgroups[2][set];
- else if (flags & FR_ACCOUNT)
- fgp = &ipfgroups[1][set];
- else if (flags & (FR_OUTQUE|FR_INQUE))
- fgp = &ipfgroups[0][set];
- else
- return NULL;
- num &= 0xffff;
-
- while ((fg = *fgp))
- if (fg->fg_num == num)
- break;
- else
- fgp = &fg->fg_next;
- if (fgpp)
- *fgpp = fgp;
- return fg;
-}
-
-
-frgroup_t *fr_addgroup(num, fp, which, set)
-u_32_t num;
-frentry_t *fp;
-minor_t which;
-int set;
-{
- frgroup_t *fg, **fgp;
-
- if ((fg = fr_findgroup(num, fp->fr_flags, which, set, &fgp)))
- return fg;
-
- KMALLOC(fg, frgroup_t *);
- if (fg) {
- fg->fg_num = num;
- fg->fg_next = *fgp;
- fg->fg_head = fp;
- fg->fg_start = &fp->fr_grp;
- *fgp = fg;
- }
- return fg;
-}
-
-
-void fr_delgroup(num, flags, which, set)
-u_32_t num, flags;
-minor_t which;
-int set;
-{
- frgroup_t *fg, **fgp;
-
- if (!(fg = fr_findgroup(num, flags, which, set, &fgp)))
- return;
-
- *fgp = fg->fg_next;
- KFREE(fg);
-}
-
-
-
-/*
- * recursively flush rules from the list, descending groups as they are
- * encountered. if a rule is the head of a group and it has lost all its
- * group members, then also delete the group reference.
- */
-static int frflushlist(set, unit, nfreedp, listp)
-int set;
-minor_t unit;
-int *nfreedp;
-frentry_t **listp;
-{
- register int freed = 0, i;
- register frentry_t *fp;
-
- while ((fp = *listp)) {
- *listp = fp->fr_next;
- if (fp->fr_grp) {
- i = frflushlist(set, unit, nfreedp, &fp->fr_grp);
- MUTEX_ENTER(&ipf_rw);
- fp->fr_ref -= i;
- MUTEX_EXIT(&ipf_rw);
- }
-
- ATOMIC_DEC32(fp->fr_ref);
- if (fp->fr_grhead) {
- fr_delgroup(fp->fr_grhead, fp->fr_flags,
- unit, set);
- fp->fr_grhead = 0;
- }
- if (fp->fr_ref == 0) {
- KFREE(fp);
- freed++;
- } else
- fp->fr_next = NULL;
- }
- *nfreedp += freed;
- return freed;
-}
-
-
-int frflush(unit, flags)
-minor_t unit;
-int flags;
-{
- int flushed = 0, set;
-
- if (unit != IPL_LOGIPF)
- return 0;
- WRITE_ENTER(&ipf_mutex);
- bzero((char *)frcache, sizeof(frcache[0]) * 2);
-
- set = fr_active;
- if (flags & FR_INACTIVE)
- set = 1 - set;
-
- if (flags & FR_OUTQUE) {
-#ifdef USE_INET6
- (void) frflushlist(set, unit, &flushed, &ipfilter6[1][set]);
- (void) frflushlist(set, unit, &flushed, &ipacct6[1][set]);
-#endif
- (void) frflushlist(set, unit, &flushed, &ipfilter[1][set]);
- (void) frflushlist(set, unit, &flushed, &ipacct[1][set]);
- }
- if (flags & FR_INQUE) {
-#ifdef USE_INET6
- (void) frflushlist(set, unit, &flushed, &ipfilter6[0][set]);
- (void) frflushlist(set, unit, &flushed, &ipacct6[0][set]);
-#endif
- (void) frflushlist(set, unit, &flushed, &ipfilter[0][set]);
- (void) frflushlist(set, unit, &flushed, &ipacct[0][set]);
- }
- RWLOCK_EXIT(&ipf_mutex);
- return flushed;
-}
-
-
-char *memstr(src, dst, slen, dlen)
-char *src, *dst;
-int slen, dlen;
-{
- char *s = NULL;
-
- while (dlen >= slen) {
- if (bcmp(src, dst, slen) == 0) {
- s = dst;
- break;
- }
- dst++;
- dlen--;
- }
- return s;
-}
-
-
-void fixskip(listp, rp, addremove)
-frentry_t **listp, *rp;
-int addremove;
-{
- frentry_t *fp;
- int rules = 0, rn = 0;
-
- for (fp = *listp; fp && (fp != rp); fp = fp->fr_next, rules++)
- ;
-
- if (!fp)
- return;
-
- for (fp = *listp; fp && (fp != rp); fp = fp->fr_next, rn++)
- if (fp->fr_skip && (rn + fp->fr_skip >= rules))
- fp->fr_skip += addremove;
-}
-
-
-#ifdef _KERNEL
-/*
- * count consecutive 1's in bit mask. If the mask generated by counting
- * consecutive 1's is different to that passed, return -1, else return #
- * of bits.
- */
-int countbits(ip)
-u_32_t ip;
-{
- u_32_t ipn;
- int cnt = 0, i, j;
-
- ip = ipn = ntohl(ip);
- for (i = 32; i; i--, ipn *= 2)
- if (ipn & 0x80000000)
- cnt++;
- else
- break;
- ipn = 0;
- for (i = 32, j = cnt; i; i--, j--) {
- ipn *= 2;
- if (j > 0)
- ipn++;
- }
- if (ipn == ip)
- return cnt;
- return -1;
-}
-
-
-/*
- * return the first IP Address associated with an interface
- */
-int fr_ifpaddr(v, ifptr, inp)
-int v;
-void *ifptr;
-struct in_addr *inp;
-{
-# ifdef USE_INET6
- struct in6_addr *inp6 = NULL;
-# endif
-# if SOLARIS
- ill_t *ill = ifptr;
-# else
- struct ifnet *ifp = ifptr;
-# endif
- struct in_addr in;
-
-# if SOLARIS
-# ifdef USE_INET6
- if (v == 6) {
- struct in6_addr in6;
-
- /*
- * First is always link local.
- */
- if (ill->ill_ipif->ipif_next)
- in6 = ill->ill_ipif->ipif_next->ipif_v6lcl_addr;
- else
- bzero((char *)&in6, sizeof(in6));
- bcopy((char *)&in6, (char *)inp, sizeof(in6));
- } else
-# endif
- {
- in.s_addr = ill->ill_ipif->ipif_local_addr;
- *inp = in;
- }
-# else /* SOLARIS */
-# if linux
- ;
-# else /* linux */
- struct sockaddr_in *sin;
- struct ifaddr *ifa;
-
-# if (__FreeBSD_version >= 300000)
- ifa = TAILQ_FIRST(&ifp->if_addrhead);
-# else
-# if defined(__NetBSD__) || defined(__OpenBSD__)
- ifa = ifp->if_addrlist.tqh_first;
-# else
-# if defined(__sgi) && defined(IFF_DRVRLOCK) /* IRIX 6 */
- ifa = &((struct in_ifaddr *)ifp->in_ifaddr)->ia_ifa;
-# else
- ifa = ifp->if_addrlist;
-# endif
-# endif /* __NetBSD__ || __OpenBSD__ */
-# endif /* __FreeBSD_version >= 300000 */
-# if (BSD < 199306) && !(/*IRIX6*/defined(__sgi) && defined(IFF_DRVRLOCK))
- sin = (struct sockaddr_in *)&ifa->ifa_addr;
-# else
- sin = (struct sockaddr_in *)ifa->ifa_addr;
- while (sin && ifa) {
- if ((v == 4) && (sin->sin_family == AF_INET))
- break;
-# ifdef USE_INET6
- if ((v == 6) && (sin->sin_family == AF_INET6)) {
- inp6 = &((struct sockaddr_in6 *)sin)->sin6_addr;
- if (!IN6_IS_ADDR_LINKLOCAL(inp6) &&
- !IN6_IS_ADDR_LOOPBACK(inp6))
- break;
- }
-# endif
-# if (__FreeBSD_version >= 300000)
- ifa = TAILQ_NEXT(ifa, ifa_link);
-# else
-# if defined(__NetBSD__) || defined(__OpenBSD__)
- ifa = ifa->ifa_list.tqe_next;
-# else
- ifa = ifa->ifa_next;
-# endif
-# endif /* __FreeBSD_version >= 300000 */
- if (ifa)
- sin = (struct sockaddr_in *)ifa->ifa_addr;
- }
- if (ifa == NULL)
- sin = NULL;
- if (sin == NULL)
- return -1;
-# endif /* (BSD < 199306) && (!__sgi && IFF_DRVLOCK) */
-# ifdef USE_INET6
- if (v == 6)
- bcopy((char *)inp6, (char *)inp, sizeof(*inp6));
- else
-# endif
- {
- in = sin->sin_addr;
- *inp = in;
- }
-# endif /* linux */
-# endif /* SOLARIS */
- return 0;
-}
-
-
-static void frsynclist(fr)
-register frentry_t *fr;
-{
- for (; fr; fr = fr->fr_next) {
- if (fr->fr_ifa != NULL) {
- fr->fr_ifa = GETUNIT(fr->fr_ifname, fr->fr_ip.fi_v);
- if (fr->fr_ifa == NULL)
- fr->fr_ifa = (void *)-1;
- }
- if (fr->fr_grp)
- frsynclist(fr->fr_grp);
- }
-}
-
-
-void frsync()
-{
-# if !SOLARIS
- register struct ifnet *ifp;
-
-# if defined(__OpenBSD__) || ((NetBSD >= 199511) && (NetBSD < 1991011)) || \
- (defined(__FreeBSD_version) && (__FreeBSD_version >= 300000))
-# if (NetBSD >= 199905) || defined(__OpenBSD__)
- for (ifp = ifnet.tqh_first; ifp; ifp = ifp->if_list.tqe_next)
-# else
- for (ifp = ifnet.tqh_first; ifp; ifp = ifp->if_link.tqe_next)
-# endif
-# else
- for (ifp = ifnet; ifp; ifp = ifp->if_next)
-# endif
- {
- ip_natsync(ifp);
- ip_statesync(ifp);
- }
- ip_natsync((struct ifnet *)-1);
-# endif
-
- WRITE_ENTER(&ipf_mutex);
- frsynclist(ipacct[0][fr_active]);
- frsynclist(ipacct[1][fr_active]);
- frsynclist(ipfilter[0][fr_active]);
- frsynclist(ipfilter[1][fr_active]);
-#ifdef USE_INET6
- frsynclist(ipacct6[0][fr_active]);
- frsynclist(ipacct6[1][fr_active]);
- frsynclist(ipfilter6[0][fr_active]);
- frsynclist(ipfilter6[1][fr_active]);
-#endif
- RWLOCK_EXIT(&ipf_mutex);
-}
-
-
-/*
- * In the functions below, bcopy() is called because the pointer being
- * copied _from_ in this instance is a pointer to a char buf (which could
- * end up being unaligned) and on the kernel's local stack.
- */
-int ircopyptr(a, b, c)
-void *a, *b;
-size_t c;
-{
- caddr_t ca;
- int err;
-
-#if SOLARIS
- if (copyin(a, (char *)&ca, sizeof(ca)))
- return EFAULT;
-#else
- bcopy(a, &ca, sizeof(ca));
-#endif
- err = copyin(ca, b, c);
- if (err)
- err = EFAULT;
- return err;
-}
-
-
-int iwcopyptr(a, b, c)
-void *a, *b;
-size_t c;
-{
- caddr_t ca;
- int err;
-
-#if SOLARIS
- if (copyin(b, (char *)&ca, sizeof(ca)))
- return EFAULT;
-#else
- bcopy(b, &ca, sizeof(ca));
-#endif
- err = copyout(a, ca, c);
- if (err)
- err = EFAULT;
- return err;
-}
-
-#else /* _KERNEL */
-
-
-/*
- * return the first IP Address associated with an interface
- */
-int fr_ifpaddr(v, ifptr, inp)
-int v;
-void *ifptr;
-struct in_addr *inp;
-{
- return 0;
-}
-
-
-int ircopyptr(a, b, c)
-void *a, *b;
-size_t c;
-{
- caddr_t ca;
-
- bcopy(a, &ca, sizeof(ca));
- bcopy(ca, b, c);
- return 0;
-}
-
-
-int iwcopyptr(a, b, c)
-void *a, *b;
-size_t c;
-{
- caddr_t ca;
-
- bcopy(b, &ca, sizeof(ca));
- bcopy(a, ca, c);
- return 0;
-}
-
-
-#endif
-
-
-int fr_lock(data, lockp)
-caddr_t data;
-int *lockp;
-{
- int arg, error;
-
- error = IRCOPY(data, (caddr_t)&arg, sizeof(arg));
- if (!error) {
- error = IWCOPY((caddr_t)lockp, data, sizeof(*lockp));
- if (!error)
- *lockp = arg;
- }
- return error;
-}
-
-
-void fr_getstat(fiop)
-friostat_t *fiop;
-{
- bcopy((char *)frstats, (char *)fiop->f_st, sizeof(filterstats_t) * 2);
- fiop->f_locks[0] = fr_state_lock;
- fiop->f_locks[1] = fr_nat_lock;
- fiop->f_locks[2] = fr_frag_lock;
- fiop->f_locks[3] = fr_auth_lock;
- fiop->f_fin[0] = ipfilter[0][0];
- fiop->f_fin[1] = ipfilter[0][1];
- fiop->f_fout[0] = ipfilter[1][0];
- fiop->f_fout[1] = ipfilter[1][1];
- fiop->f_acctin[0] = ipacct[0][0];
- fiop->f_acctin[1] = ipacct[0][1];
- fiop->f_acctout[0] = ipacct[1][0];
- fiop->f_acctout[1] = ipacct[1][1];
-#ifdef USE_INET6
- fiop->f_fin6[0] = ipfilter6[0][0];
- fiop->f_fin6[1] = ipfilter6[0][1];
- fiop->f_fout6[0] = ipfilter6[1][0];
- fiop->f_fout6[1] = ipfilter6[1][1];
- fiop->f_acctin6[0] = ipacct6[0][0];
- fiop->f_acctin6[1] = ipacct6[0][1];
- fiop->f_acctout6[0] = ipacct6[1][0];
- fiop->f_acctout6[1] = ipacct6[1][1];
-#else
- fiop->f_fin6[0] = NULL;
- fiop->f_fin6[1] = NULL;
- fiop->f_fout6[0] = NULL;
- fiop->f_fout6[1] = NULL;
- fiop->f_acctin6[0] = NULL;
- fiop->f_acctin6[1] = NULL;
- fiop->f_acctout6[0] = NULL;
- fiop->f_acctout6[1] = NULL;
-#endif
- fiop->f_active = fr_active;
- fiop->f_froute[0] = ipl_frouteok[0];
- fiop->f_froute[1] = ipl_frouteok[1];
-
- fiop->f_running = fr_running;
- fiop->f_groups[0][0] = ipfgroups[0][0];
- fiop->f_groups[0][1] = ipfgroups[0][1];
- fiop->f_groups[1][0] = ipfgroups[1][0];
- fiop->f_groups[1][1] = ipfgroups[1][1];
- fiop->f_groups[2][0] = ipfgroups[2][0];
- fiop->f_groups[2][1] = ipfgroups[2][1];
-#ifdef IPFILTER_LOG
- fiop->f_logging = 1;
-#else
- fiop->f_logging = 0;
-#endif
- fiop->f_defpass = fr_pass;
- strncpy(fiop->f_version, ipfilter_version, sizeof(fiop->f_version));
-}
-
-
-#ifdef USE_INET6
-int icmptoicmp6types[ICMP_MAXTYPE+1] = {
- ICMP6_ECHO_REPLY, /* 0: ICMP_ECHOREPLY */
- -1, /* 1: UNUSED */
- -1, /* 2: UNUSED */
- ICMP6_DST_UNREACH, /* 3: ICMP_UNREACH */
- -1, /* 4: ICMP_SOURCEQUENCH */
- ND_REDIRECT, /* 5: ICMP_REDIRECT */
- -1, /* 6: UNUSED */
- -1, /* 7: UNUSED */
- ICMP6_ECHO_REQUEST, /* 8: ICMP_ECHO */
- -1, /* 9: UNUSED */
- -1, /* 10: UNUSED */
- ICMP6_TIME_EXCEEDED, /* 11: ICMP_TIMXCEED */
- ICMP6_PARAM_PROB, /* 12: ICMP_PARAMPROB */
- -1, /* 13: ICMP_TSTAMP */
- -1, /* 14: ICMP_TSTAMPREPLY */
- -1, /* 15: ICMP_IREQ */
- -1, /* 16: ICMP_IREQREPLY */
- -1, /* 17: ICMP_MASKREQ */
- -1, /* 18: ICMP_MASKREPLY */
-};
-
-
-int icmptoicmp6unreach[ICMP_MAX_UNREACH] = {
- ICMP6_DST_UNREACH_ADDR, /* 0: ICMP_UNREACH_NET */
- ICMP6_DST_UNREACH_ADDR, /* 1: ICMP_UNREACH_HOST */
- -1, /* 2: ICMP_UNREACH_PROTOCOL */
- ICMP6_DST_UNREACH_NOPORT, /* 3: ICMP_UNREACH_PORT */
- -1, /* 4: ICMP_UNREACH_NEEDFRAG */
- ICMP6_DST_UNREACH_NOTNEIGHBOR, /* 5: ICMP_UNREACH_SRCFAIL */
- ICMP6_DST_UNREACH_ADDR, /* 6: ICMP_UNREACH_NET_UNKNOWN */
- ICMP6_DST_UNREACH_ADDR, /* 7: ICMP_UNREACH_HOST_UNKNOWN */
- -1, /* 8: ICMP_UNREACH_ISOLATED */
- ICMP6_DST_UNREACH_ADMIN, /* 9: ICMP_UNREACH_NET_PROHIB */
- ICMP6_DST_UNREACH_ADMIN, /* 10: ICMP_UNREACH_HOST_PROHIB */
- -1, /* 11: ICMP_UNREACH_TOSNET */
- -1, /* 12: ICMP_UNREACH_TOSHOST */
- ICMP6_DST_UNREACH_ADMIN, /* 13: ICMP_UNREACH_ADMIN_PROHIBIT */
-};
-#endif
diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c
deleted file mode 100644
index 2931cc688323..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_auth.c
+++ /dev/null
@@ -1,543 +0,0 @@
-/*
- * Copyright (C) 1998-2000 by Darren Reed & Guido van Rooij.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- */
-#if !defined(lint)
-/*static const char rcsid[] = "@(#)$Id: ip_auth.c,v 2.1.2.2 2000/01/16 10:12:14 darrenr Exp $";*/
-static const char rcsid[] = "@(#)$FreeBSD$";
-#endif
-
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/file.h>
-#if !defined(_KERNEL) && !defined(KERNEL)
-# include <stdio.h>
-# include <stdlib.h>
-# include <string.h>
-#endif
-#if (defined(KERNEL) || defined(_KERNEL)) && (__FreeBSD_version >= 220000)
-# include <sys/filio.h>
-# include <sys/fcntl.h>
-#else
-# include <sys/ioctl.h>
-#endif
-#include <sys/uio.h>
-#ifndef linux
-# include <sys/protosw.h>
-#endif
-#include <sys/socket.h>
-#if (defined(_KERNEL) || defined(KERNEL)) && !defined(linux)
-# include <sys/systm.h>
-#endif
-#if !defined(__SVR4) && !defined(__svr4__)
-# ifndef linux
-# include <sys/mbuf.h>
-# endif
-#else
-# include <sys/filio.h>
-# include <sys/byteorder.h>
-# ifdef _KERNEL
-# include <sys/dditypes.h>
-# endif
-# include <sys/stream.h>
-# include <sys/kmem.h>
-#endif
-#if (_BSDI_VERSION >= 199802) || (__FreeBSD_version >= 400000)
-# include <sys/queue.h>
-#endif
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(bsdi)
-# include <machine/cpu.h>
-#endif
-#include <net/if.h>
-#ifdef sun
-# include <net/af.h>
-#endif
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#ifndef KERNEL
-# define KERNEL
-# define NOT_KERNEL
-#endif
-#ifndef linux
-# include <netinet/ip_var.h>
-#endif
-#ifdef NOT_KERNEL
-# undef KERNEL
-#endif
-#ifdef __sgi
-# ifdef IFF_DRVRLOCK /* IRIX6 */
-# include <sys/hashing.h>
-# endif
-#endif
-#include <netinet/tcp.h>
-#if defined(__sgi) && !defined(IFF_DRVRLOCK) /* IRIX < 6 */
-extern struct ifqueue ipintrq; /* ip packet input queue */
-#else
-# ifndef linux
-# if __FreeBSD_version >= 300000
-# include <net/if_var.h>
-# endif
-# include <netinet/in_var.h>
-# include <netinet/tcp_fsm.h>
-# endif
-#endif
-#include <netinet/udp.h>
-#include <netinet/ip_icmp.h>
-#include "netinet/ip_compat.h"
-#include <netinet/tcpip.h>
-#include "netinet/ip_fil.h"
-#include "netinet/ip_auth.h"
-#if !SOLARIS && !defined(linux)
-# include <net/netisr.h>
-# ifdef __FreeBSD__
-# include <machine/cpufunc.h>
-# endif
-#endif
-#if (__FreeBSD_version >= 300000)
-# include <sys/malloc.h>
-# if (defined(_KERNEL) || defined(KERNEL)) && !defined(IPFILTER_LKM)
-# include <sys/libkern.h>
-# include <sys/systm.h>
-# endif
-#endif
-
-
-
-#if (SOLARIS || defined(__sgi)) && defined(_KERNEL)
-extern KRWLOCK_T ipf_auth;
-extern kmutex_t ipf_authmx;
-# if SOLARIS
-extern kcondvar_t ipfauthwait;
-# endif
-#endif
-#ifdef linux
-static struct wait_queue *ipfauthwait = NULL;
-#endif
-
-int fr_authsize = FR_NUMAUTH;
-int fr_authused = 0;
-int fr_defaultauthage = 600;
-int fr_auth_lock = 0;
-fr_authstat_t fr_authstats;
-static frauth_t fr_auth[FR_NUMAUTH];
-mb_t *fr_authpkts[FR_NUMAUTH];
-static int fr_authstart = 0, fr_authend = 0, fr_authnext = 0;
-static frauthent_t *fae_list = NULL;
-frentry_t *ipauth = NULL;
-
-
-/*
- * Check if a packet has authorization. If the packet is found to match an
- * authorization result and that would result in a feedback loop (i.e. it
- * will end up returning FR_AUTH) then return FR_BLOCK instead.
- */
-u_32_t fr_checkauth(ip, fin)
-ip_t *ip;
-fr_info_t *fin;
-{
- u_short id = ip->ip_id;
- u_32_t pass;
- int i;
-
- if (fr_auth_lock)
- return 0;
-
- READ_ENTER(&ipf_auth);
- for (i = fr_authstart; i != fr_authend; ) {
- /*
- * index becomes -2 only after an SIOCAUTHW. Check this in
- * case the same packet gets sent again and it hasn't yet been
- * auth'd.
- */
- if ((fr_auth[i].fra_index == -2) &&
- (id == fr_auth[i].fra_info.fin_id) &&
- !bcmp((char *)fin,(char *)&fr_auth[i].fra_info,FI_CSIZE)) {
- /*
- * Avoid feedback loop.
- */
- if (!(pass = fr_auth[i].fra_pass) || (pass & FR_AUTH))
- pass = FR_BLOCK;
- RWLOCK_EXIT(&ipf_auth);
- WRITE_ENTER(&ipf_auth);
- fr_authstats.fas_hits++;
- fr_auth[i].fra_index = -1;
- fr_authused--;
- if (i == fr_authstart) {
- while (fr_auth[i].fra_index == -1) {
- i++;
- if (i == FR_NUMAUTH)
- i = 0;
- fr_authstart = i;
- if (i == fr_authend)
- break;
- }
- if (fr_authstart == fr_authend) {
- fr_authnext = 0;
- fr_authstart = fr_authend = 0;
- }
- }
- RWLOCK_EXIT(&ipf_auth);
- return pass;
- }
- i++;
- if (i == FR_NUMAUTH)
- i = 0;
- }
- fr_authstats.fas_miss++;
- RWLOCK_EXIT(&ipf_auth);
- return 0;
-}
-
-
-/*
- * Check if we have room in the auth array to hold details for another packet.
- * If we do, store it and wake up any user programs which are waiting to
- * hear about these events.
- */
-int fr_newauth(m, fin, ip)
-mb_t *m;
-fr_info_t *fin;
-ip_t *ip;
-{
-#if defined(_KERNEL) && SOLARIS
- qif_t *qif = fin->fin_qif;
-#endif
- int i;
-
- if (fr_auth_lock)
- return 0;
-
- WRITE_ENTER(&ipf_auth);
- if (fr_authstart > fr_authend) {
- fr_authstats.fas_nospace++;
- RWLOCK_EXIT(&ipf_auth);
- return 0;
- } else {
- if ((fr_authstart == 0) && (fr_authend == FR_NUMAUTH - 1)) {
- fr_authstats.fas_nospace++;
- RWLOCK_EXIT(&ipf_auth);
- return 0;
- }
- }
-
- fr_authstats.fas_added++;
- fr_authused++;
- i = fr_authend++;
- if (fr_authend == FR_NUMAUTH)
- fr_authend = 0;
- RWLOCK_EXIT(&ipf_auth);
- fr_auth[i].fra_index = i;
- fr_auth[i].fra_pass = 0;
- fr_auth[i].fra_age = fr_defaultauthage;
- bcopy((char *)fin, (char *)&fr_auth[i].fra_info, sizeof(*fin));
-#if !defined(sparc) && !defined(m68k)
- /*
- * No need to copyback here as we want to undo the changes, not keep
- * them.
- */
-# if SOLARIS && defined(_KERNEL)
- if ((ip == (ip_t *)m->b_rptr) && (ip->ip_v == 4))
-# endif
- {
- register u_short bo;
-
- bo = ip->ip_len;
- ip->ip_len = htons(bo);
-# if !SOLARIS && !defined(__NetBSD__) && !defined(__FreeBSD__)
- /* 4.4BSD converts this ip_input.c, but I don't in solaris.c */
- bo = ip->ip_id;
- ip->ip_id = htons(bo);
-# endif
- bo = ip->ip_off;
- ip->ip_off = htons(bo);
- }
-#endif
-#if SOLARIS && defined(_KERNEL)
- m->b_rptr -= qif->qf_off;
- fr_authpkts[i] = *(mblk_t **)fin->fin_mp;
- fr_auth[i].fra_q = qif->qf_q;
- cv_signal(&ipfauthwait);
-#else
- fr_authpkts[i] = m;
-# if defined(linux) && defined(_KERNEL)
- wake_up_interruptible(&ipfauthwait);
-# else
- WAKEUP(&fr_authnext);
-# endif
-#endif
- return 1;
-}
-
-
-int fr_auth_ioctl(data, cmd, fr, frptr)
-caddr_t data;
-#if defined(__NetBSD__) || defined(__OpenBSD__) || (FreeBSD_version >= 300003)
-u_long cmd;
-#else
-int cmd;
-#endif
-frentry_t *fr, **frptr;
-{
- mb_t *m;
- frauth_t auth, *au = &auth;
- frauthent_t *fae, **faep;
- int i, error = 0;
-
- switch (cmd)
- {
- case SIOCSTLCK :
- error = fr_lock(data, &fr_auth_lock);
- break;
- case SIOCINIFR :
- case SIOCRMIFR :
- case SIOCADIFR :
- error = EINVAL;
- break;
- case SIOCINAFR :
- error = EINVAL;
- break;
- case SIOCRMAFR :
- case SIOCADAFR :
- for (faep = &fae_list; (fae = *faep); )
- if (&fae->fae_fr == fr)
- break;
- else
- faep = &fae->fae_next;
- if (cmd == SIOCRMAFR) {
- if (!fae)
- error = ESRCH;
- else {
- WRITE_ENTER(&ipf_auth);
- *faep = fae->fae_next;
- *frptr = fr->fr_next;
- RWLOCK_EXIT(&ipf_auth);
- KFREE(fae);
- }
- } else {
- KMALLOC(fae, frauthent_t *);
- if (fae != NULL) {
- bcopy((char *)fr, (char *)&fae->fae_fr,
- sizeof(*fr));
- WRITE_ENTER(&ipf_auth);
- fae->fae_age = fr_defaultauthage;
- fae->fae_fr.fr_hits = 0;
- fae->fae_fr.fr_next = *frptr;
- *frptr = &fae->fae_fr;
- fae->fae_next = *faep;
- *faep = fae;
- ipauth = &fae_list->fae_fr;
- RWLOCK_EXIT(&ipf_auth);
- } else
- error = ENOMEM;
- }
- break;
- case SIOCATHST:
- READ_ENTER(&ipf_auth);
- fr_authstats.fas_faelist = fae_list;
- RWLOCK_EXIT(&ipf_auth);
- error = IWCOPYPTR((char *)&fr_authstats, data,
- sizeof(fr_authstats));
- break;
- case SIOCAUTHW:
-fr_authioctlloop:
- READ_ENTER(&ipf_auth);
- if ((fr_authnext != fr_authend) && fr_authpkts[fr_authnext]) {
- error = IWCOPYPTR((char *)&fr_auth[fr_authnext], data,
- sizeof(frauth_t));
- RWLOCK_EXIT(&ipf_auth);
- if (error)
- break;
- WRITE_ENTER(&ipf_auth);
- fr_authnext++;
- if (fr_authnext == FR_NUMAUTH)
- fr_authnext = 0;
- RWLOCK_EXIT(&ipf_auth);
- return 0;
- }
-#ifdef _KERNEL
-# if SOLARIS
- mutex_enter(&ipf_authmx);
- if (!cv_wait_sig(&ipfauthwait, &ipf_authmx)) {
- mutex_exit(&ipf_authmx);
- return EINTR;
- }
- mutex_exit(&ipf_authmx);
-# else
-# ifdef linux
- interruptible_sleep_on(&ipfauthwait);
- if (current->signal & ~current->blocked)
- error = -EINTR;
-# else
- error = SLEEP(&fr_authnext, "fr_authnext");
-# endif
-# endif
-#endif
- RWLOCK_EXIT(&ipf_auth);
- if (!error)
- goto fr_authioctlloop;
- break;
- case SIOCAUTHR:
- error = IRCOPYPTR(data, (caddr_t)&auth, sizeof(auth));
- if (error)
- return error;
- WRITE_ENTER(&ipf_auth);
- i = au->fra_index;
- if ((i < 0) || (i > FR_NUMAUTH) ||
- (fr_auth[i].fra_info.fin_id != au->fra_info.fin_id)) {
- RWLOCK_EXIT(&ipf_auth);
- return EINVAL;
- }
- m = fr_authpkts[i];
- fr_auth[i].fra_index = -2;
- fr_auth[i].fra_pass = au->fra_pass;
- fr_authpkts[i] = NULL;
-#ifdef _KERNEL
- RWLOCK_EXIT(&ipf_auth);
-# ifndef linux
- if (m && au->fra_info.fin_out) {
-# if SOLARIS
- error = fr_qout(fr_auth[i].fra_q, m);
-# else /* SOLARIS */
-# if (_BSDI_VERSION >= 199802) || defined(__OpenBSD__)
- error = ip_output(m, NULL, NULL, IP_FORWARDING, NULL,
- NULL);
-# else
- error = ip_output(m, NULL, NULL, IP_FORWARDING, NULL);
-# endif
-# endif /* SOLARIS */
- if (error)
- fr_authstats.fas_sendfail++;
- else
- fr_authstats.fas_sendok++;
- } else if (m) {
-# if SOLARIS
- error = fr_qin(fr_auth[i].fra_q, m);
-# else /* SOLARIS */
- if (! IF_HANDOFF(&ipintrq, m, NULL))
- error = ENOBUFS;
- else
- schednetisr(NETISR_IP);
-# endif /* SOLARIS */
- if (error)
- fr_authstats.fas_quefail++;
- else
- fr_authstats.fas_queok++;
- } else
- error = EINVAL;
-# endif
-# if SOLARIS
- if (error)
- error = EINVAL;
-# else
- /*
- * If we experience an error which will result in the packet
- * not being processed, make sure we advance to the next one.
- */
- if (error == ENOBUFS) {
- fr_authused--;
- fr_auth[i].fra_index = -1;
- fr_auth[i].fra_pass = 0;
- if (i == fr_authstart) {
- while (fr_auth[i].fra_index == -1) {
- i++;
- if (i == FR_NUMAUTH)
- i = 0;
- fr_authstart = i;
- if (i == fr_authend)
- break;
- }
- if (fr_authstart == fr_authend) {
- fr_authnext = 0;
- fr_authstart = fr_authend = 0;
- }
- }
- }
-# endif
-#endif /* _KERNEL */
- break;
- default :
- error = EINVAL;
- break;
- }
- return error;
-}
-
-
-#ifdef _KERNEL
-/*
- * Free all network buffer memory used to keep saved packets.
- */
-void fr_authunload()
-{
- register int i;
- register frauthent_t *fae, **faep;
- mb_t *m;
-
- WRITE_ENTER(&ipf_auth);
- for (i = 0; i < FR_NUMAUTH; i++) {
- if ((m = fr_authpkts[i])) {
- FREE_MB_T(m);
- fr_authpkts[i] = NULL;
- fr_auth[i].fra_index = -1;
- }
- }
-
-
- for (faep = &fae_list; (fae = *faep); ) {
- *faep = fae->fae_next;
- KFREE(fae);
- }
- ipauth = NULL;
- RWLOCK_EXIT(&ipf_auth);
-}
-
-
-/*
- * Slowly expire held auth records. Timeouts are set
- * in expectation of this being called twice per second.
- */
-void fr_authexpire()
-{
- register int i;
- register frauth_t *fra;
- register frauthent_t *fae, **faep;
- mb_t *m;
-#if !SOLARIS
- int s;
-#endif
-
- if (fr_auth_lock)
- return;
-
- SPL_NET(s);
- WRITE_ENTER(&ipf_auth);
- for (i = 0, fra = fr_auth; i < FR_NUMAUTH; i++, fra++) {
- if ((!--fra->fra_age) && (m = fr_authpkts[i])) {
- FREE_MB_T(m);
- fr_authpkts[i] = NULL;
- fr_auth[i].fra_index = -1;
- fr_authstats.fas_expire++;
- fr_authused--;
- }
- }
-
- for (faep = &fae_list; (fae = *faep); ) {
- if (!--fae->fae_age) {
- *faep = fae->fae_next;
- KFREE(fae);
- fr_authstats.fas_expire++;
- } else
- faep = &fae->fae_next;
- }
- ipauth = &fae_list->fae_fr;
- RWLOCK_EXIT(&ipf_auth);
- SPL_X(s);
-}
-#endif
diff --git a/sys/contrib/ipfilter/netinet/ip_auth.h b/sys/contrib/ipfilter/netinet/ip_auth.h
deleted file mode 100644
index 2851c3dd8c36..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_auth.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 1997-2000 by Darren Reed & Guido Van Rooij.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * $Id: ip_auth.h,v 2.1 1999/08/04 17:29:54 darrenr Exp $
- * $FreeBSD$
- *
- */
-#ifndef __IP_AUTH_H__
-#define __IP_AUTH_H__
-
-#define FR_NUMAUTH 32
-
-typedef struct frauth {
- int fra_age;
- int fra_index;
- u_32_t fra_pass;
- fr_info_t fra_info;
-#if SOLARIS
- queue_t *fra_q;
-#endif
-} frauth_t;
-
-typedef struct frauthent {
- struct frentry fae_fr;
- struct frauthent *fae_next;
- u_long fae_age;
-} frauthent_t;
-
-typedef struct fr_authstat {
- U_QUAD_T fas_hits;
- U_QUAD_T fas_miss;
- u_long fas_nospace;
- u_long fas_added;
- u_long fas_sendfail;
- u_long fas_sendok;
- u_long fas_queok;
- u_long fas_quefail;
- u_long fas_expire;
- frauthent_t *fas_faelist;
-} fr_authstat_t;
-
-
-extern frentry_t *ipauth;
-extern struct fr_authstat fr_authstats;
-extern int fr_defaultauthage;
-extern int fr_authsize;
-extern int fr_authused;
-extern int fr_auth_lock;
-extern u_32_t fr_checkauth __P((ip_t *, fr_info_t *));
-extern void fr_authexpire __P((void));
-extern void fr_authunload __P((void));
-extern mb_t *fr_authpkts[];
-extern int fr_newauth __P((mb_t *, fr_info_t *, ip_t *));
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-extern int fr_auth_ioctl __P((caddr_t, u_long, frentry_t *, frentry_t **));
-#else
-extern int fr_auth_ioctl __P((caddr_t, int, frentry_t *, frentry_t **));
-#endif
-#endif /* __IP_AUTH_H__ */
diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h
deleted file mode 100644
index aefd50d952ed..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_compat.h
+++ /dev/null
@@ -1,1013 +0,0 @@
-/*
- * Copyright (C) 1993-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * @(#)ip_compat.h 1.8 1/14/96
- * $Id: ip_compat.h,v 2.26.2.9 2001/01/14 14:58:01 darrenr Exp $
- * $FreeBSD$
- */
-
-#ifndef __IP_COMPAT_H__
-#define __IP_COMPAT_H__
-
-#ifndef __P
-# ifdef __STDC__
-# define __P(x) x
-# else
-# define __P(x) ()
-# endif
-#endif
-#ifndef __STDC__
-# undef const
-# define const
-#endif
-
-#ifndef SOLARIS
-#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
-#endif
-#if SOLARIS2 >= 8
-# ifndef USE_INET6
-# define USE_INET6
-# endif
-#endif
-
-#if defined(_KERNEL) || defined(KERNEL) || defined(__KERNEL__)
-# undef KERNEL
-# undef _KERNEL
-# undef __KERNEL__
-# define KERNEL
-# define _KERNEL
-# define __KERNEL__
-#endif
-
-#if defined(__SVR4) || defined(__svr4__) || defined(__sgi)
-#define index strchr
-# if !defined(KERNEL)
-# define bzero(a,b) memset(a,0,b)
-# define bcmp memcmp
-# define bcopy(a,b,c) memmove(b,a,c)
-# endif
-#endif
-
-#ifndef offsetof
-#define offsetof(t,m) (int)((&((t *)0L)->m))
-#endif
-
-#if defined(__sgi) || defined(bsdi)
-struct ether_addr {
- u_char ether_addr_octet[6];
-};
-#endif
-
-#if defined(__sgi) && !defined(IPFILTER_LKM)
-# ifdef __STDC__
-# define IPL_EXTERN(ep) ipfilter##ep
-# else
-# define IPL_EXTERN(ep) ipfilter/**/ep
-# endif
-#else
-# ifdef __STDC__
-# define IPL_EXTERN(ep) ipl##ep
-# else
-# define IPL_EXTERN(ep) ipl/**/ep
-# endif
-#endif
-
-#ifdef linux
-# include <sys/sysmacros.h>
-#endif
-#if SOLARIS
-# define MTYPE(m) ((m)->b_datap->db_type)
-# include <sys/isa_defs.h>
-# include <sys/ioccom.h>
-# include <sys/sysmacros.h>
-# include <sys/kmem.h>
-/*
- * because Solaris 2 defines these in two places :-/
- */
-# undef IPOPT_EOL
-# undef IPOPT_NOP
-# undef IPOPT_LSRR
-# undef IPOPT_RR
-# undef IPOPT_SSRR
-# ifndef KERNEL
-# define _KERNEL
-# undef RES_INIT
-# if SOLARIS2 >= 8
-# include <netinet/ip6.h>
-# endif
-# include <inet/common.h>
-# include <inet/ip.h>
-# include <inet/ip_ire.h>
-# undef _KERNEL
-# else /* _KERNEL */
-# if SOLARIS2 >= 8
-# include <netinet/ip6.h>
-# endif
-# include <inet/common.h>
-# include <inet/ip.h>
-# include <inet/ip_ire.h>
-# endif /* _KERNEL */
-# if SOLARIS2 >= 8
-# include <inet/ip_if.h>
-# include <netinet/ip6.h>
-# define ipif_local_addr ipif_lcl_addr
-/* Only defined in private include file */
-# ifndef V4_PART_OF_V6
-# define V4_PART_OF_V6(v6) v6.s6_addr32[3]
-# endif
-# endif
-#else
-# if !defined(__sgi)
-typedef int minor_t;
-#endif
-#endif /* SOLARIS */
-#define IPMINLEN(i, h) ((i)->ip_len >= ((i)->ip_hl * 4 + sizeof(struct h)))
-
-#if defined(__FreeBSD__) && (__FreeBSD__ >= 5) && defined(_KERNEL)
-# include <machine/in_cksum.h>
-#endif
-
-#ifndef IP_OFFMASK
-#define IP_OFFMASK 0x1fff
-#endif
-
-#if BSD > 199306
-# define USE_QUAD_T
-# define U_QUAD_T u_quad_t
-# define QUAD_T quad_t
-#else /* BSD > 199306 */
-# define U_QUAD_T u_long
-# define QUAD_T long
-#endif /* BSD > 199306 */
-
-
-/*
- * These operating systems already take care of the problem for us.
- */
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \
- defined(__sgi)
-typedef u_int32_t u_32_t;
-# if defined(_KERNEL) && !defined(IPFILTER_LKM)
-# if defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 104110000)
-# include "opt_inet.h"
-# endif
-# if defined(__FreeBSD_version) && (__FreeBSD_version >= 400000) && \
- !defined(KLD_MODULE)
-# include "opt_inet6.h"
-# endif
-# ifdef INET6
-# define USE_INET6
-# endif
-# endif
-#else
-/*
- * Really, any arch where sizeof(long) != sizeof(int).
- */
-# if defined(__alpha__) || defined(__alpha) || defined(_LP64)
-typedef unsigned int u_32_t;
-# else
-# if SOLARIS2 >= 6
-typedef uint32_t u_32_t;
-# else
-typedef unsigned int u_32_t;
-# endif
-# endif
-#endif /* __NetBSD__ || __OpenBSD__ || __FreeBSD__ || __sgi */
-
-#ifdef USE_INET6
-# if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
-# include <netinet/ip6.h>
-# ifdef _KERNEL
-# include <netinet6/ip6_var.h>
-# endif
-typedef struct ip6_hdr ip6_t;
-# endif
-union i6addr {
- u_32_t i6[4];
- struct in_addr in4;
- struct in6_addr in6;
-};
-#else
-union i6addr {
- u_32_t i6[4];
- struct in_addr in4;
-};
-#endif
-
-#define IP6CMP(a,b) bcmp((char *)&(a), (char *)&(b), sizeof(a))
-#define IP6EQ(a,b) (bcmp((char *)&(a), (char *)&(b), sizeof(a)) == 0)
-#define IP6NEQ(a,b) (bcmp((char *)&(a), (char *)&(b), sizeof(a)) != 0)
-
-#ifndef MAX
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-
-/*
- * Security Options for Intenet Protocol (IPSO) as defined in RFC 1108.
- *
- * Basic Option
- *
- * 00000001 - (Reserved 4)
- * 00111101 - Top Secret
- * 01011010 - Secret
- * 10010110 - Confidential
- * 01100110 - (Reserved 3)
- * 11001100 - (Reserved 2)
- * 10101011 - Unclassified
- * 11110001 - (Reserved 1)
- */
-#define IPSO_CLASS_RES4 0x01
-#define IPSO_CLASS_TOPS 0x3d
-#define IPSO_CLASS_SECR 0x5a
-#define IPSO_CLASS_CONF 0x96
-#define IPSO_CLASS_RES3 0x66
-#define IPSO_CLASS_RES2 0xcc
-#define IPSO_CLASS_UNCL 0xab
-#define IPSO_CLASS_RES1 0xf1
-
-#define IPSO_AUTH_GENSER 0x80
-#define IPSO_AUTH_ESI 0x40
-#define IPSO_AUTH_SCI 0x20
-#define IPSO_AUTH_NSA 0x10
-#define IPSO_AUTH_DOE 0x08
-#define IPSO_AUTH_UN 0x06
-#define IPSO_AUTH_FTE 0x01
-
-/*
- * IP option #defines
- */
-/*#define IPOPT_RR 7 */
-#define IPOPT_ZSU 10 /* ZSU */
-#define IPOPT_MTUP 11 /* MTUP */
-#define IPOPT_MTUR 12 /* MTUR */
-#define IPOPT_ENCODE 15 /* ENCODE */
-/*#define IPOPT_TS 68 */
-#define IPOPT_TR 82 /* TR */
-/*#define IPOPT_SECURITY 130 */
-/*#define IPOPT_LSRR 131 */
-#define IPOPT_E_SEC 133 /* E-SEC */
-#define IPOPT_CIPSO 134 /* CIPSO */
-/*#define IPOPT_SATID 136 */
-#ifndef IPOPT_SID
-# define IPOPT_SID IPOPT_SATID
-#endif
-/*#define IPOPT_SSRR 137 */
-#define IPOPT_ADDEXT 147 /* ADDEXT */
-#define IPOPT_VISA 142 /* VISA */
-#define IPOPT_IMITD 144 /* IMITD */
-#define IPOPT_EIP 145 /* EIP */
-#define IPOPT_FINN 205 /* FINN */
-
-
-#if defined(__FreeBSD__) && (defined(KERNEL) || defined(_KERNEL))
-# ifdef IPFILTER_LKM
-# include <sys/param.h>
-# define ACTUALLY_LKM_NOT_KERNEL
-# else
-# include <sys/param.h>
-# endif
-# if __FreeBSD__ < 3
-# include <machine/spl.h>
-# else
-# if __FreeBSD__ == 3
-# if defined(IPFILTER_LKM) && !defined(ACTUALLY_LKM_NOT_KERNEL)
-# define ACTUALLY_LKM_NOT_KERNEL
-# endif
-# endif
-# endif
-#endif /* __FreeBSD__ && KERNEL */
-
-/*
- * Build some macros and #defines to enable the same code to compile anywhere
- * Well, that's the idea, anyway :-)
- */
-#if !SOLARIS || (SOLARIS2 < 6) || !defined(KERNEL)
-# define ATOMIC_INCL ATOMIC_INC
-# define ATOMIC_INC64 ATOMIC_INC
-# define ATOMIC_INC32 ATOMIC_INC
-# define ATOMIC_INC16 ATOMIC_INC
-# define ATOMIC_DECL ATOMIC_DEC
-# define ATOMIC_DEC64 ATOMIC_DEC
-# define ATOMIC_DEC32 ATOMIC_DEC
-# define ATOMIC_DEC16 ATOMIC_DEC
-#endif
-#ifdef __sgi
-# define hz HZ
-# include <sys/ksynch.h>
-# define IPF_LOCK_PL plhi
-# include <sys/sema.h>
-#undef kmutex_t
-typedef struct {
- lock_t *l;
- int pl;
-} kmutex_t;
-# undef MUTEX_INIT
-# undef MUTEX_DESTROY
-#endif
-#ifdef KERNEL
-# if SOLARIS
-# if SOLARIS2 >= 6
-# include <sys/atomic.h>
-# if SOLARIS2 == 6
-# define ATOMIC_INCL(x) atomic_add_long((uint32_t*)&(x), 1)
-# define ATOMIC_DECL(x) atomic_add_long((uint32_t*)&(x), -1)
-# else
-# define ATOMIC_INCL(x) atomic_add_long(&(x), 1)
-# define ATOMIC_DECL(x) atomic_add_long(&(x), -1)
-# endif
-# define ATOMIC_INC64(x) atomic_add_64((uint64_t*)&(x), 1)
-# define ATOMIC_INC32(x) atomic_add_32((uint32_t*)&(x), 1)
-# define ATOMIC_INC16(x) atomic_add_16((uint16_t*)&(x), 1)
-# define ATOMIC_DEC64(x) atomic_add_64((uint64_t*)&(x), -1)
-# define ATOMIC_DEC32(x) atomic_add_32((uint32_t*)&(x), -1)
-# define ATOMIC_DEC16(x) atomic_add_16((uint16_t*)&(x), -1)
-# else
-# define ATOMIC_INC(x) { mutex_enter(&ipf_rw); (x)++; \
- mutex_exit(&ipf_rw); }
-# define ATOMIC_DEC(x) { mutex_enter(&ipf_rw); (x)--; \
- mutex_exit(&ipf_rw); }
-# endif
-# define MUTEX_ENTER(x) mutex_enter(x)
-# if 1
-# define KRWLOCK_T krwlock_t
-# define READ_ENTER(x) rw_enter(x, RW_READER)
-# define WRITE_ENTER(x) rw_enter(x, RW_WRITER)
-# define RW_UPGRADE(x) { if (rw_tryupgrade(x) == 0) { \
- rw_exit(x); \
- rw_enter(x, RW_WRITER); } \
- }
-# define MUTEX_DOWNGRADE(x) rw_downgrade(x)
-# define RWLOCK_INIT(x, y, z) rw_init((x), (y), RW_DRIVER, (z))
-# define RWLOCK_EXIT(x) rw_exit(x)
-# define RW_DESTROY(x) rw_destroy(x)
-# else
-# define KRWLOCK_T kmutex_t
-# define READ_ENTER(x) mutex_enter(x)
-# define WRITE_ENTER(x) mutex_enter(x)
-# define MUTEX_DOWNGRADE(x) ;
-# define RWLOCK_INIT(x, y, z) mutex_init((x), (y), MUTEX_DRIVER, (z))
-# define RWLOCK_EXIT(x) mutex_exit(x)
-# define RW_DESTROY(x) mutex_destroy(x)
-# endif
-# define MUTEX_INIT(x, y, z) mutex_init((x), (y), MUTEX_DRIVER, (z))
-# define MUTEX_DESTROY(x) mutex_destroy(x)
-# define MUTEX_EXIT(x) mutex_exit(x)
-# define MTOD(m,t) (t)((m)->b_rptr)
-# define IRCOPY(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c))
-# define IWCOPY(a,b,c) copyout((caddr_t)(a), (caddr_t)(b), (c))
-# define IRCOPYPTR ircopyptr
-# define IWCOPYPTR iwcopyptr
-# define FREE_MB_T(m) freemsg(m)
-# define SPL_NET(x) ;
-# define SPL_IMP(x) ;
-# undef SPL_X
-# define SPL_X(x) ;
-# ifdef sparc
-# define ntohs(x) (x)
-# define ntohl(x) (x)
-# define htons(x) (x)
-# define htonl(x) (x)
-# endif /* sparc */
-# define KMALLOC(a,b) (a) = (b)kmem_alloc(sizeof(*(a)), KM_NOSLEEP)
-# define KMALLOCS(a,b,c) (a) = (b)kmem_alloc((c), KM_NOSLEEP)
-# define GET_MINOR(x) getminor(x)
-typedef struct qif {
- struct qif *qf_next;
- ill_t *qf_ill;
- kmutex_t qf_lock;
- void *qf_iptr;
- void *qf_optr;
- queue_t *qf_in;
- queue_t *qf_out;
- struct qinit *qf_wqinfo;
- struct qinit *qf_rqinfo;
- struct qinit qf_wqinit;
- struct qinit qf_rqinit;
- mblk_t *qf_m; /* These three fields are for passing data up from */
- queue_t *qf_q; /* fr_qin and fr_qout to the packet processing. */
- size_t qf_off;
- size_t qf_len; /* this field is used for in ipfr_fastroute */
- char qf_name[8];
- /*
- * in case the ILL has disappeared...
- */
- size_t qf_hl; /* header length */
- int qf_sap;
-} qif_t;
-extern ill_t *get_unit __P((char *, int));
-# define GETUNIT(n, v) get_unit(n, v)
-# define IFNAME(x) ((ill_t *)x)->ill_name
-# else /* SOLARIS */
-# if defined(__sgi)
-# define ATOMIC_INC(x) { MUTEX_ENTER(&ipf_rw); \
- (x)++; MUTEX_EXIT(&ipf_rw); }
-# define ATOMIC_DEC(x) { MUTEX_ENTER(&ipf_rw); \
- (x)--; MUTEX_EXIT(&ipf_rw); }
-# define MUTEX_ENTER(x) (x)->pl = LOCK((x)->l, IPF_LOCK_PL);
-# define KRWLOCK_T kmutex_t
-# define READ_ENTER(x) MUTEX_ENTER(x)
-# define WRITE_ENTER(x) MUTEX_ENTER(x)
-# define RW_UPGRADE(x) ;
-# define MUTEX_DOWNGRADE(x) ;
-# define RWLOCK_EXIT(x) MUTEX_EXIT(x)
-# define MUTEX_EXIT(x) UNLOCK((x)->l, (x)->pl);
-# define MUTEX_INIT(x,y,z) (x)->l = LOCK_ALLOC((uchar_t)-1, IPF_LOCK_PL, (lkinfo_t *)-1, KM_NOSLEEP)
-# define MUTEX_DESTROY(x) LOCK_DEALLOC((x)->l)
-# else /* __sgi */
-# define ATOMIC_INC(x) (x)++
-# define ATOMIC_DEC(x) (x)--
-# define MUTEX_ENTER(x) ;
-# define READ_ENTER(x) ;
-# define WRITE_ENTER(x) ;
-# define RW_UPGRADE(x) ;
-# define MUTEX_DOWNGRADE(x) ;
-# define RWLOCK_EXIT(x) ;
-# define MUTEX_EXIT(x) ;
-# define MUTEX_INIT(x,y,z) ;
-# define MUTEX_DESTROY(x) ;
-# endif /* __sgi */
-# ifndef linux
-# define FREE_MB_T(m) m_freem(m)
-# define MTOD(m,t) mtod(m,t)
-# define IRCOPY(a,b,c) (bcopy((a), (b), (c)), 0)
-# define IWCOPY(a,b,c) (bcopy((a), (b), (c)), 0)
-# define IRCOPYPTR ircopyptr
-# define IWCOPYPTR iwcopyptr
-# endif /* !linux */
-# endif /* SOLARIS */
-
-# ifdef sun
-# if !SOLARIS
-# include <sys/kmem_alloc.h>
-# define GETUNIT(n, v) ifunit(n, IFNAMSIZ)
-# define IFNAME(x) ((struct ifnet *)x)->if_name
-# endif
-# else
-# ifndef linux
-# define GETUNIT(n, v) ifunit(n)
-# if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603))
-# define IFNAME(x) ((struct ifnet *)x)->if_xname
-# else
-# define IFNAME(x) ((struct ifnet *)x)->if_name
-# endif
-# endif
-# endif /* sun */
-
-# if defined(sun) && !defined(linux) || defined(__sgi)
-# define UIOMOVE(a,b,c,d) uiomove((caddr_t)a,b,c,d)
-# define SLEEP(id, n) sleep((id), PZERO+1)
-# define WAKEUP(id) wakeup(id)
-# define KFREE(x) kmem_free((char *)(x), sizeof(*(x)))
-# define KFREES(x,s) kmem_free((char *)(x), (s))
-# if !SOLARIS
-extern void m_copydata __P((struct mbuf *, int, int, caddr_t));
-extern void m_copyback __P((struct mbuf *, int, int, caddr_t));
-# endif
-# ifdef __sgi
-# include <sys/kmem.h>
-# include <sys/ddi.h>
-# define KMALLOC(a,b) (a) = (b)kmem_alloc(sizeof(*(a)), KM_NOSLEEP)
-# define KMALLOCS(a,b,c) (a) = (b)kmem_alloc((c), KM_NOSLEEP)
-# define GET_MINOR(x) getminor(x)
-# else
-# if !SOLARIS
-# define KMALLOC(a,b) (a) = (b)new_kmem_alloc(sizeof(*(a)), \
- KMEM_NOSLEEP)
-# define KMALLOCS(a,b,c) (a) = (b)new_kmem_alloc((c), KMEM_NOSLEEP)
-# endif /* SOLARIS */
-# endif /* __sgi */
-# endif /* sun && !linux */
-# ifndef GET_MINOR
-# define GET_MINOR(x) minor(x)
-# endif
-# if (BSD >= 199306) || defined(__FreeBSD__)
-# include <vm/vm.h>
-# if !defined(__FreeBSD__) || (defined (__FreeBSD__) && __FreeBSD__>=3)
-# include <vm/vm_extern.h>
-# include <sys/proc.h>
-extern vm_map_t kmem_map;
-# else /* !__FreeBSD__ || (__FreeBSD__ && __FreeBSD__>=3) */
-# include <vm/vm_kern.h>
-# endif /* !__FreeBSD__ || (__FreeBSD__ && __FreeBSD__>=3) */
-# ifdef M_PFIL
-# define KMALLOC(a, b) MALLOC((a), b, sizeof(*(a)), M_PFIL, M_NOWAIT)
-# define KMALLOCS(a, b, c) MALLOC((a), b, (c), M_PFIL, M_NOWAIT)
-# define KFREE(x) FREE((x), M_PFIL)
-# define KFREES(x,s) FREE((x), M_PFIL)
-# else
-# define KMALLOC(a, b) MALLOC((a), b, sizeof(*(a)), M_TEMP, M_NOWAIT)
-# define KMALLOCS(a, b, c) MALLOC((a), b, (c), M_TEMP, M_NOWAIT)
-# define KFREE(x) FREE((x), M_TEMP)
-# define KFREES(x,s) FREE((x), M_TEMP)
-# endif /* M_PFIL */
-# define UIOMOVE(a,b,c,d) uiomove(a,b,d)
-# define SLEEP(id, n) tsleep((id), PPAUSE|PCATCH, n, 0)
-# define WAKEUP(id) wakeup(id)
-# endif /* BSD */
-# if defined(NetBSD) && NetBSD <= 1991011 && NetBSD >= 199407
-# define SPL_NET(x) x = splsoftnet()
-# define SPL_X(x) (void) splx(x)
-# else
-# if !SOLARIS && !defined(linux)
-# define SPL_IMP(x) x = splimp()
-# define SPL_NET(x) x = splnet()
-# define SPL_X(x) (void) splx(x)
-# endif
-# endif /* NetBSD && NetBSD <= 1991011 && NetBSD >= 199407 */
-# define PANIC(x,y) if (x) panic y
-#else /* KERNEL */
-# define SLEEP(x,y) ;
-# define WAKEUP(x) ;
-# define PANIC(x,y) ;
-# define ATOMIC_INC(x) (x)++
-# define ATOMIC_DEC(x) (x)--
-# define MUTEX_ENTER(x) ;
-# define READ_ENTER(x) ;
-# define MUTEX_INIT(x,y,z) ;
-# define MUTEX_DESTROY(x) ;
-# define WRITE_ENTER(x) ;
-# define RW_UPGRADE(x) ;
-# define MUTEX_DOWNGRADE(x) ;
-# define RWLOCK_EXIT(x) ;
-# define MUTEX_EXIT(x) ;
-# define SPL_NET(x) ;
-# define SPL_IMP(x) ;
-# undef SPL_X
-# define SPL_X(x) ;
-# define KMALLOC(a,b) (a) = (b)malloc(sizeof(*a))
-# define KMALLOCS(a,b,c) (a) = (b)malloc(c)
-# define KFREE(x) free(x)
-# define KFREES(x,s) free(x)
-# define GETUNIT(x, v) get_unit(x,v)
-# define IRCOPY(a,b,c) (bcopy((a), (b), (c)), 0)
-# define IWCOPY(a,b,c) (bcopy((a), (b), (c)), 0)
-# define IRCOPYPTR ircopyptr
-# define IWCOPYPTR iwcopyptr
-#endif /* KERNEL */
-
-#if SOLARIS
-typedef mblk_t mb_t;
-# if SOLARIS2 >= 7
-# ifdef lint
-# define ALIGN32(ptr) (ptr ? 0L : 0L)
-# define ALIGN16(ptr) (ptr ? 0L : 0L)
-# else
-# define ALIGN32(ptr) (ptr)
-# define ALIGN16(ptr) (ptr)
-# endif
-# endif
-#else
-# ifdef linux
-# ifndef kernel
-typedef struct mb {
- struct mb *next;
- u_int len;
- u_char *data;
-} mb_t;
-# else
-typedef struct sk_buff mb_t;
-# endif
-# else
-typedef struct mbuf mb_t;
-# endif
-#endif /* SOLARIS */
-
-#if defined(linux) || defined(__sgi)
-/*
- * These #ifdef's are here mainly for linux, but who knows, they may
- * not be in other places or maybe one day linux will grow up and some
- * of these will turn up there too.
- */
-#ifndef ICMP_MINLEN
-# define ICMP_MINLEN 8
-#endif
-#ifndef ICMP_UNREACH
-# define ICMP_UNREACH ICMP_DEST_UNREACH
-#endif
-#ifndef ICMP_SOURCEQUENCH
-# define ICMP_SOURCEQUENCH ICMP_SOURCE_QUENCH
-#endif
-#ifndef ICMP_TIMXCEED
-# define ICMP_TIMXCEED ICMP_TIME_EXCEEDED
-#endif
-#ifndef ICMP_PARAMPROB
-# define ICMP_PARAMPROB ICMP_PARAMETERPROB
-#endif
-#ifndef ICMP_TSTAMP
-# define ICMP_TSTAMP ICMP_TIMESTAMP
-#endif
-#ifndef ICMP_TSTAMPREPLY
-# define ICMP_TSTAMPREPLY ICMP_TIMESTAMPREPLY
-#endif
-#ifndef ICMP_IREQ
-# define ICMP_IREQ ICMP_INFO_REQUEST
-#endif
-#ifndef ICMP_IREQREPLY
-# define ICMP_IREQREPLY ICMP_INFO_REPLY
-#endif
-#ifndef ICMP_MASKREQ
-# define ICMP_MASKREQ ICMP_ADDRESS
-#endif
-#ifndef ICMP_MASKREPLY
-# define ICMP_MASKREPLY ICMP_ADDRESSREPLY
-#endif
-#ifndef IPVERSION
-# define IPVERSION 4
-#endif
-#ifndef IPOPT_MINOFF
-# define IPOPT_MINOFF 4
-#endif
-#ifndef IPOPT_COPIED
-# define IPOPT_COPIED(x) ((x)&0x80)
-#endif
-#ifndef IPOPT_EOL
-# define IPOPT_EOL 0
-#endif
-#ifndef IPOPT_NOP
-# define IPOPT_NOP 1
-#endif
-#ifndef IP_MF
-# define IP_MF ((u_short)0x2000)
-#endif
-#ifndef ETHERTYPE_IP
-# define ETHERTYPE_IP ((u_short)0x0800)
-#endif
-#ifndef TH_FIN
-# define TH_FIN 0x01
-#endif
-#ifndef TH_SYN
-# define TH_SYN 0x02
-#endif
-#ifndef TH_RST
-# define TH_RST 0x04
-#endif
-#ifndef TH_PUSH
-# define TH_PUSH 0x08
-#endif
-#ifndef TH_ACK
-# define TH_ACK 0x10
-#endif
-#ifndef TH_URG
-# define TH_URG 0x20
-#endif
-#ifndef IPOPT_EOL
-# define IPOPT_EOL 0
-#endif
-#ifndef IPOPT_NOP
-# define IPOPT_NOP 1
-#endif
-#ifndef IPOPT_RR
-# define IPOPT_RR 7
-#endif
-#ifndef IPOPT_TS
-# define IPOPT_TS 68
-#endif
-#ifndef IPOPT_SECURITY
-# define IPOPT_SECURITY 130
-#endif
-#ifndef IPOPT_LSRR
-# define IPOPT_LSRR 131
-#endif
-#ifndef IPOPT_SATID
-# define IPOPT_SATID 136
-#endif
-#ifndef IPOPT_SSRR
-# define IPOPT_SSRR 137
-#endif
-#ifndef IPOPT_SECUR_UNCLASS
-# define IPOPT_SECUR_UNCLASS ((u_short)0x0000)
-#endif
-#ifndef IPOPT_SECUR_CONFID
-# define IPOPT_SECUR_CONFID ((u_short)0xf135)
-#endif
-#ifndef IPOPT_SECUR_EFTO
-# define IPOPT_SECUR_EFTO ((u_short)0x789a)
-#endif
-#ifndef IPOPT_SECUR_MMMM
-# define IPOPT_SECUR_MMMM ((u_short)0xbc4d)
-#endif
-#ifndef IPOPT_SECUR_RESTR
-# define IPOPT_SECUR_RESTR ((u_short)0xaf13)
-#endif
-#ifndef IPOPT_SECUR_SECRET
-# define IPOPT_SECUR_SECRET ((u_short)0xd788)
-#endif
-#ifndef IPOPT_SECUR_TOPSECRET
-# define IPOPT_SECUR_TOPSECRET ((u_short)0x6bc5)
-#endif
-#ifndef IPOPT_OLEN
-# define IPOPT_OLEN 1
-#endif
-#endif /* linux || __sgi */
-
-#ifdef linux
-#include <linux/in_systm.h>
-/*
- * TCP States
- */
-#define TCPS_CLOSED 0 /* closed */
-#define TCPS_LISTEN 1 /* listening for connection */
-#define TCPS_SYN_SENT 2 /* active, have sent syn */
-#define TCPS_SYN_RECEIVED 3 /* have send and received syn */
-/* states < TCPS_ESTABLISHED are those where connections not established */
-#define TCPS_ESTABLISHED 4 /* established */
-#define TCPS_CLOSE_WAIT 5 /* rcvd fin, waiting for close */
-/* states > TCPS_CLOSE_WAIT are those where user has closed */
-#define TCPS_FIN_WAIT_1 6 /* have closed, sent fin */
-#define TCPS_CLOSING 7 /* closed xchd FIN; await FIN ACK */
-#define TCPS_LAST_ACK 8 /* had fin and close; await FIN ACK */
-/* states > TCPS_CLOSE_WAIT && < TCPS_FIN_WAIT_2 await ACK of FIN */
-#define TCPS_FIN_WAIT_2 9 /* have closed, fin is acked */
-#define TCPS_TIME_WAIT 10 /* in 2*msl quiet wait after close */
-
-/*
- * file flags.
- */
-#ifdef WRITE
-#define FWRITE WRITE
-#define FREAD READ
-#else
-#define FWRITE _IOC_WRITE
-#define FREAD _IOC_READ
-#endif
-/*
- * mbuf related problems.
- */
-#define mtod(m,t) (t)((m)->data)
-#define m_len len
-#define m_next next
-
-#ifdef IP_DF
-#undef IP_DF
-#endif
-#define IP_DF 0x4000
-
-typedef struct {
- __u16 th_sport;
- __u16 th_dport;
- __u32 th_seq;
- __u32 th_ack;
-# if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\
- defined(vax)
- __u8 th_res:4;
- __u8 th_off:4;
-#else
- __u8 th_off:4;
- __u8 th_res:4;
-#endif
- __u8 th_flags;
- __u16 th_win;
- __u16 th_sum;
- __u16 th_urp;
-} tcphdr_t;
-
-typedef struct {
- __u16 uh_sport;
- __u16 uh_dport;
- __u16 uh_ulen;
- __u16 uh_sum;
-} udphdr_t;
-
-typedef struct {
-# if defined(__i386__) || defined(__MIPSEL__) || defined(__alpha__) ||\
- defined(vax)
- __u8 ip_hl:4;
- __u8 ip_v:4;
-# else
- __u8 ip_v:4;
- __u8 ip_hl:4;
-# endif
- __u8 ip_tos;
- __u16 ip_len;
- __u16 ip_id;
- __u16 ip_off;
- __u8 ip_ttl;
- __u8 ip_p;
- __u16 ip_sum;
- struct in_addr ip_src;
- struct in_addr ip_dst;
-} ip_t;
-
-/*
- * Structure of an icmp header.
- */
-typedef struct icmp {
- __u8 icmp_type; /* type of message, see below */
- __u8 icmp_code; /* type sub code */
- __u16 icmp_cksum; /* ones complement cksum of struct */
- union {
- __u8 ih_pptr; /* ICMP_PARAMPROB */
- struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
- struct ih_idseq {
- __u16 icd_id;
- __u16 icd_seq;
- } ih_idseq;
- int ih_void;
- } icmp_hun;
-# define icmp_pptr icmp_hun.ih_pptr
-# define icmp_gwaddr icmp_hun.ih_gwaddr
-# define icmp_id icmp_hun.ih_idseq.icd_id
-# define icmp_seq icmp_hun.ih_idseq.icd_seq
-# define icmp_void icmp_hun.ih_void
- union {
- struct id_ts {
- n_time its_otime;
- n_time its_rtime;
- n_time its_ttime;
- } id_ts;
- struct id_ip {
- ip_t idi_ip;
- /* options and then 64 bits of data */
- } id_ip;
- u_long id_mask;
- char id_data[1];
- } icmp_dun;
-# define icmp_otime icmp_dun.id_ts.its_otime
-# define icmp_rtime icmp_dun.id_ts.its_rtime
-# define icmp_ttime icmp_dun.id_ts.its_ttime
-# define icmp_ip icmp_dun.id_ip.idi_ip
-# define icmp_mask icmp_dun.id_mask
-# define icmp_data icmp_dun.id_data
-} icmphdr_t;
-
-# ifndef LINUX_IPOVLY
-# define LINUX_IPOVLY
-struct ipovly {
- caddr_t ih_next, ih_prev; /* for protocol sequence q's */
- u_char ih_x1; /* (unused) */
- u_char ih_pr; /* protocol */
- short ih_len; /* protocol length */
- struct in_addr ih_src; /* source internet address */
- struct in_addr ih_dst; /* destination internet address */
-};
-# endif
-
-typedef struct {
- __u8 ether_dhost[6];
- __u8 ether_shost[6];
- __u16 ether_type;
-} ether_header_t;
-
-typedef struct uio {
- int uio_resid;
- int uio_rw;
- caddr_t uio_buf;
-} uio_t;
-
-# define UIO_READ 0
-# define UIO_WRITE 1
-# define UIOMOVE(a, b, c, d) uiomove(a,b,c,d)
-
-/*
- * For masking struct ifnet onto struct device
- */
-# define if_name name
-
-# ifdef KERNEL
-# define GETUNIT(x, v) dev_get(x)
-# define FREE_MB_T(m) kfree_skb(m, FREE_WRITE)
-# define uniqtime do_gettimeofday
-# undef INT_MAX
-# undef UINT_MAX
-# undef LONG_MAX
-# undef ULONG_MAX
-# include <linux/netdevice.h>
-# define SPL_X(x)
-# define SPL_NET(x)
-# define SPL_IMP(x)
-
-# define bcmp(a,b,c) memcmp(a,b,c)
-# define bcopy(a,b,c) memcpy(b,a,c)
-# define bzero(a,c) memset(a,0,c)
-
-# define UNITNAME(n) dev_get((n))
-
-# define KMALLOC(a,b) (a) = (b)kmalloc(sizeof(*(a)), GFP_ATOMIC)
-# define KMALLOCS(a,b,c) (a) = (b)kmalloc((c), GFP_ATOMIC)
-# define KFREE(x) kfree_s((x), sizeof(*(x)))
-# define KFREES(x,s) kfree_s((x), (s))
-#define IRCOPY(const void *a, void *b, size_t c) { \
- int error; \
-
- error = verify_area(VERIFY_READ, a ,c); \
- if (!error) \
- memcpy_fromfs(b, a, c); \
- return error; \
-}
-static inline int IWCOPY(const void *a, void *b, size_t c)
-{
- int error;
-
- error = verify_area(VERIFY_WRITE, b, c);
- if (!error)
- memcpy_tofs(b, a, c);
- return error;
-}
-static inline int IRCOPYPTR(const void *a, void *b, size_t c) {
- caddr_t ca;
- int error;
-
- error = verify_area(VERIFY_READ, a ,sizeof(ca));
- if (!error) {
- memcpy_fromfs(ca, a, sizeof(ca));
- error = verify_area(VERIFY_READ, ca , c);
- if (!error)
- memcpy_fromfs(b, ca, c);
- }
- return error;
-}
-static inline int IWCOPYPTR(const void *a, void *b, size_t c) {
- caddr_t ca;
- int error;
-
-
- error = verify_area(VERIFY_READ, b ,sizeof(ca));
- if (!error) {
- memcpy_fromfs(ca, b, sizeof(ca));
- error = verify_area(VERIFY_WRITE, ca, c);
- if (!error)
- memcpy_tofs(ca, a, c);
- }
- return error;
-}
-# else
-# define __KERNEL__
-# undef INT_MAX
-# undef UINT_MAX
-# undef LONG_MAX
-# undef ULONG_MAX
-# define s8 __s8
-# define u8 __u8
-# define s16 __s16
-# define u16 __u16
-# define s32 __s32
-# define u32 __u32
-# include <linux/netdevice.h>
-# undef __KERNEL__
-# endif
-# define ifnet device
-#else
-typedef struct tcphdr tcphdr_t;
-typedef struct udphdr udphdr_t;
-typedef struct icmp icmphdr_t;
-typedef struct ip ip_t;
-typedef struct ether_header ether_header_t;
-#endif /* linux */
-typedef struct tcpiphdr tcpiphdr_t;
-
-#if defined(hpux) || defined(linux)
-struct ether_addr {
- char ether_addr_octet[6];
-};
-#endif
-
-/*
- * XXX - This is one of those *awful* hacks which nobody likes
- */
-#ifdef ultrix
-#define A_A
-#else
-#define A_A &
-#endif
-
-#ifndef ICMP_ROUTERADVERT
-# define ICMP_ROUTERADVERT 9
-#endif
-#ifndef ICMP_ROUTERSOLICIT
-# define ICMP_ROUTERSOLICIT 10
-#endif
-#undef ICMP_MAX_UNREACH
-#define ICMP_MAX_UNREACH 14
-#undef ICMP_MAXTYPE
-#define ICMP_MAXTYPE 18
-/*
- * ICMP error replies have an IP header (20 bytes), 8 bytes of ICMP data,
- * another IP header and then 64 bits of data, totalling 56. Of course,
- * the last 64 bits is dependant on that being available.
- */
-#define ICMPERR_ICMPHLEN 8
-#define ICMPERR_IPICMPHLEN (20 + 8)
-#define ICMPERR_MINPKTLEN (20 + 8 + 20)
-#define ICMPERR_MAXPKTLEN (20 + 8 + 20 + 8)
-#define ICMP6ERR_MINPKTLEN (40 + 8)
-#define ICMP6ERR_IPICMPHLEN (40 + 8 + 40)
-
-/*
- * ECN is a new addition to TCP - RFC 2481
- */
-#ifndef TH_ECN
-# define TH_ECN 0x40
-#endif
-#ifndef TH_CWR
-# define TH_CWR 0x80
-#endif
-#define TH_ECNALL (TH_ECN|TH_CWR)
-
-#define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|TH_ECN|TH_CWR)
-
-#endif /* __IP_COMPAT_H__ */
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/sys/contrib/ipfilter/netinet/ip_fil.c
deleted file mode 100644
index ff80058e206c..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_fil.c
+++ /dev/null
@@ -1,1763 +0,0 @@
-/*
- * Copyright (C) 1993-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- */
-#if !defined(lint)
-static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-1995 Darren Reed";
-/*static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.42.2.14 2000/07/18 13:57:55 darrenr Exp $";*/
-static const char rcsid[] = "@(#)$FreeBSD$";
-#endif
-
-#ifndef SOLARIS
-#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
-#endif
-
-#if defined(KERNEL) && !defined(_KERNEL)
-# define _KERNEL
-#endif
-#if defined(_KERNEL) && defined(__FreeBSD_version) && \
- (__FreeBSD_version >= 400000) && !defined(KLD_MODULE)
-#include "opt_inet6.h"
-#endif
-#include <sys/param.h>
-#if defined(__NetBSD__) && (NetBSD >= 199905) && !defined(IPFILTER_LKM) && \
- defined(_KERNEL)
-# include "opt_ipfilter_log.h"
-#endif
-#if defined(__FreeBSD__) && !defined(__FreeBSD_version)
-# if !defined(_KERNEL) || defined(IPFILTER_LKM)
-# include <osreldate.h>
-# endif
-#endif
-#ifndef _KERNEL
-# include <stdio.h>
-# include <string.h>
-# include <stdlib.h>
-# include <ctype.h>
-# include <fcntl.h>
-#endif
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/file.h>
-#if __FreeBSD_version >= 220000 && defined(_KERNEL)
-# include <sys/fcntl.h>
-# include <sys/filio.h>
-#else
-# include <sys/ioctl.h>
-#endif
-#include <sys/time.h>
-#ifdef _KERNEL
-# include <sys/systm.h>
-#endif
-#include <sys/uio.h>
-#if !SOLARIS
-# if (NetBSD > 199609) || (OpenBSD > 199603) || (__FreeBSD_version >= 300000)
-# include <sys/dirent.h>
-# else
-# include <sys/dir.h>
-# endif
-# include <sys/mbuf.h>
-#else
-# include <sys/filio.h>
-#endif
-#include <sys/protosw.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-#ifdef sun
-# include <net/af.h>
-#endif
-#if __FreeBSD_version >= 300000
-# include <net/if_var.h>
-# if defined(_KERNEL) && !defined(IPFILTER_LKM)
-# include "opt_ipfilter.h"
-# endif
-#endif
-#ifdef __sgi
-#include <sys/debug.h>
-# ifdef IFF_DRVRLOCK /* IRIX6 */
-#include <sys/hashing.h>
-# endif
-#endif
-#include <net/route.h>
-#include <netinet/in.h>
-#if !(defined(__sgi) && !defined(IFF_DRVRLOCK)) /* IRIX < 6 */
-# include <netinet/in_var.h>
-#endif
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/udp.h>
-#include <netinet/tcpip.h>
-#include <netinet/ip_icmp.h>
-#ifndef _KERNEL
-# include <unistd.h>
-# include <syslog.h>
-#endif
-#include "netinet/ip_compat.h"
-#ifdef USE_INET6
-# include <netinet/icmp6.h>
-#endif
-#include "netinet/ip_fil.h"
-#include "netinet/ip_proxy.h"
-#include "netinet/ip_nat.h"
-#include "netinet/ip_frag.h"
-#include "netinet/ip_state.h"
-#include "netinet/ip_auth.h"
-#if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000)
-# include <sys/malloc.h>
-#endif
-#ifndef MIN
-# define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-#if !SOLARIS && defined(_KERNEL) && !defined(__sgi)
-# include <sys/kernel.h>
-extern int ip_optcopy __P((struct ip *, struct ip *));
-#endif
-
-#include <machine/in_cksum.h>
-
-extern struct protosw inetsw[];
-
-#ifndef _KERNEL
-# include "ipt.h"
-static struct ifnet **ifneta = NULL;
-static int nifs = 0;
-#else
-# if (BSD < 199306) || defined(__sgi)
-extern int tcp_ttl;
-# endif
-#endif
-
-int ipl_unreach = ICMP_UNREACH_FILTER;
-u_long ipl_frouteok[2] = {0, 0};
-
-static int frzerostats __P((caddr_t));
-#if defined(__NetBSD__) || defined(__OpenBSD__) || (__FreeBSD_version >= 300003)
-static int frrequest __P((int, u_long, caddr_t, int));
-#else
-static int frrequest __P((int, int, caddr_t, int));
-#endif
-#ifdef _KERNEL
-static int (*fr_savep) __P((ip_t *, int, void *, int, struct mbuf **));
-static int send_ip __P((ip_t *, fr_info_t *, struct mbuf *));
-# ifdef __sgi
-extern kmutex_t ipf_rw;
-extern KRWLOCK_T ipf_mutex;
-# endif
-#else
-int ipllog __P((void));
-void init_ifp __P((void));
-# ifdef __sgi
-static int no_output __P((struct ifnet *, struct mbuf *,
- struct sockaddr *));
-static int write_output __P((struct ifnet *, struct mbuf *,
- struct sockaddr *));
-# else
-static int no_output __P((struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *));
-static int write_output __P((struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *));
-# endif
-#endif
-int fr_running = 0;
-
-#if (__FreeBSD_version >= 300000) && defined(_KERNEL)
-struct callout_handle ipfr_slowtimer_ch;
-#endif
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104230000)
-# include <sys/callout.h>
-struct callout ipfr_slowtimer_ch;
-#endif
-#if defined(__sgi) && defined(_KERNEL)
-toid_t ipfr_slowtimer_ch;
-#endif
-
-#if (_BSDI_VERSION >= 199510) && defined(_KERNEL)
-# include <sys/device.h>
-# include <sys/conf.h>
-
-struct cfdriver iplcd = {
- NULL, "ipl", NULL, NULL, DV_DULL, 0
-};
-
-struct devsw iplsw = {
- &iplcd,
- iplopen, iplclose, iplread, nowrite, iplioctl, noselect, nommap,
- nostrat, nodump, nopsize, 0,
- nostop
-};
-#endif /* _BSDI_VERSION >= 199510 && _KERNEL */
-
-#if defined(__NetBSD__) || defined(__OpenBSD__) || \
- (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 500011)
-# include <sys/conf.h>
-# if defined(NETBSD_PF)
-# include <net/pfil.h>
-/*
- * We provide the fr_checkp name just to minimize changes later.
- */
-int (*fr_checkp) __P((ip_t *ip, int hlen, void *ifp, int out, mb_t **mp));
-# endif /* NETBSD_PF */
-#endif /* __NetBSD__ */
-
-#ifdef _KERNEL
-# if defined(IPFILTER_LKM) && !defined(__sgi)
-int iplidentify(s)
-char *s;
-{
- if (strcmp(s, "ipl") == 0)
- return 1;
- return 0;
-}
-# endif /* IPFILTER_LKM */
-
-
-/*
- * Try to detect the case when compiling for NetBSD with pseudo-device
- */
-# if defined(__NetBSD__) && defined(PFIL_HOOKS)
-void
-ipfilterattach(count)
-int count;
-{
- if (iplattach() != 0)
- printf("IP Filter failed to attach\n");
-}
-# endif
-
-
-int iplattach()
-{
- char *defpass;
- int s;
-# if defined(__sgi) || (defined(NETBSD_PF) && \
- ((__NetBSD_Version__ >= 104200000) || (__FreeBSD_version >= 500011)))
- int error = 0;
-# endif
-
- SPL_NET(s);
- if (fr_running || (fr_checkp == fr_check)) {
- printf("IP Filter: already initialized\n");
- SPL_X(s);
- return EBUSY;
- }
-
-# ifdef IPFILTER_LOG
- ipflog_init();
-# endif
- if (nat_init() == -1)
- return -1;
- if (fr_stateinit() == -1)
- return -1;
- if (appr_init() == -1)
- return -1;
-
-# ifdef NETBSD_PF
-# if (__NetBSD_Version__ >= 104200000) || (__FreeBSD_version >= 500011)
- error = pfil_add_hook((void *)fr_check, PFIL_IN|PFIL_OUT,
- &inetsw[ip_protox[IPPROTO_IP]].pr_pfh);
- if (error) {
-# ifdef USE_INET6
- goto pfil_error;
-# else
- appr_unload();
- ip_natunload();
- fr_stateunload();
- return error;
-# endif
- }
-# else
- pfil_add_hook((void *)fr_check, PFIL_IN|PFIL_OUT);
-# endif
-# ifdef USE_INET6
- error = pfil_add_hook((void *)fr_check, PFIL_IN|PFIL_OUT,
- &inetsw[ip_protox[IPPROTO_IPV6]].pr_pfh);
- if (error) {
- pfil_remove_hook((void *)fr_check, PFIL_IN|PFIL_OUT,
- &inetsw[ip_protox[IPPROTO_IP]].pr_pfh);
-pfil_error:
- appr_unload();
- ip_natunload();
- fr_stateunload();
- return error;
- }
-# endif
-# endif
-
-# ifdef __sgi
- error = ipfilter_sgi_attach();
- if (error) {
- SPL_X(s);
- appr_unload();
- ip_natunload();
- fr_stateunload();
- return error;
- }
-# endif
-
- bzero((char *)frcache, sizeof(frcache));
- fr_savep = fr_checkp;
- fr_checkp = fr_check;
- fr_running = 1;
-
- SPL_X(s);
- if (fr_pass & FR_PASS)
- defpass = "pass";
- else if (fr_pass & FR_BLOCK)
- defpass = "block";
- else
- defpass = "no-match -> block";
-
- printf("%s initialized. Default = %s all, Logging = %s\n",
- ipfilter_version, defpass,
-# ifdef IPFILTER_LOG
- "enabled");
-# else
- "disabled");
-# endif
-#ifdef _KERNEL
-# if defined(__NetBSD__) && (__NetBSD_Version__ >= 104230000)
- callout_init(&ipfr_slowtimer_ch);
- callout_reset(&ipfr_slowtimer_ch, hz / 2, ipfr_slowtimer, NULL);
-# else
-# if (__FreeBSD_version >= 300000) || defined(__sgi)
- ipfr_slowtimer_ch = timeout(ipfr_slowtimer, NULL, hz/2);
-# else
- timeout(ipfr_slowtimer, NULL, hz/2);
-# endif
-# endif
-#endif
- return 0;
-}
-
-
-/*
- * Disable the filter by removing the hooks from the IP input/output
- * stream.
- */
-int ipldetach()
-{
- int s, i = FR_INQUE|FR_OUTQUE;
-#if defined(NETBSD_PF) && \
- ((__NetBSD_Version__ >= 104200000) || (__FreeBSD_version >= 500011))
- int error = 0;
-#endif
-
-#ifdef _KERNEL
-# if defined(__NetBSD__) && (__NetBSD_Version__ >= 104230000)
- callout_stop(&ipfr_slowtimer_ch);
-# else
-# if (__FreeBSD_version >= 300000)
- untimeout(ipfr_slowtimer, NULL, ipfr_slowtimer_ch);
-# else
-# ifdef __sgi
- untimeout(ipfr_slowtimer_ch);
-# else
- untimeout(ipfr_slowtimer, NULL);
-# endif
-# endif /* FreeBSD */
-# endif /* NetBSD */
-#endif
- SPL_NET(s);
- if (!fr_running)
- {
- printf("IP Filter: not initialized\n");
- SPL_X(s);
- return 0;
- }
-
- printf("%s unloaded\n", ipfilter_version);
-
- fr_checkp = fr_savep;
- i = frflush(IPL_LOGIPF, i);
- fr_running = 0;
-
-# ifdef NETBSD_PF
-# if ((__NetBSD_Version__ >= 104200000) || (__FreeBSD_version >= 500011))
- error = pfil_remove_hook((void *)fr_check, PFIL_IN|PFIL_OUT,
- &inetsw[ip_protox[IPPROTO_IP]].pr_pfh);
- if (error)
- return error;
-# else
- pfil_remove_hook((void *)fr_check, PFIL_IN|PFIL_OUT);
-# endif
-# ifdef USE_INET6
- error = pfil_remove_hook((void *)fr_check, PFIL_IN|PFIL_OUT,
- &inetsw[ip_protox[IPPROTO_IPV6]].pr_pfh);
- if (error)
- return error;
-# endif
-# endif
-
-# ifdef __sgi
- ipfilter_sgi_detach();
-# endif
-
- appr_unload();
- ipfr_unload();
- ip_natunload();
- fr_stateunload();
- fr_authunload();
-
- SPL_X(s);
- return 0;
-}
-#endif /* _KERNEL */
-
-
-static int frzerostats(data)
-caddr_t data;
-{
- friostat_t fio;
- int error;
-
- fr_getstat(&fio);
- error = IWCOPYPTR((caddr_t)&fio, data, sizeof(fio));
- if (error)
- return EFAULT;
-
- bzero((char *)frstats, sizeof(*frstats) * 2);
-
- return 0;
-}
-
-
-/*
- * Filter ioctl interface.
- */
-#ifdef __sgi
-int IPL_EXTERN(ioctl)(dev_t dev, int cmd, caddr_t data, int mode
-# ifdef _KERNEL
- , cred_t *cp, int *rp
-# endif
-)
-#else
-int IPL_EXTERN(ioctl)(dev, cmd, data, mode
-# if (defined(_KERNEL) && ((_BSDI_VERSION >= 199510) || (BSD >= 199506) || \
- (NetBSD >= 199511) || (__FreeBSD_version >= 220000) || \
- defined(__OpenBSD__)))
-, p)
-struct proc *p;
-# else
-)
-# endif
-dev_t dev;
-# if defined(__NetBSD__) || defined(__OpenBSD__) || \
- (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000)
-u_long cmd;
-# else
-int cmd;
-# endif
-caddr_t data;
-int mode;
-#endif /* __sgi */
-{
-#if defined(_KERNEL) && !SOLARIS
- int s;
-#endif
- int error = 0, unit = 0, tmp;
-
-#if (BSD >= 199306) && defined(_KERNEL)
- if ((securelevel >= 2) && (mode & FWRITE))
- return EPERM;
-#endif
-#ifdef _KERNEL
- unit = GET_MINOR(dev);
- if ((IPL_LOGMAX < unit) || (unit < 0))
- return ENXIO;
-#else
- unit = dev;
-#endif
-
- SPL_NET(s);
-
- if (unit == IPL_LOGNAT) {
- if (fr_running)
- error = nat_ioctl(data, cmd, mode);
- else
- error = EIO;
- SPL_X(s);
- return error;
- }
- if (unit == IPL_LOGSTATE) {
- if (fr_running)
- error = fr_state_ioctl(data, cmd, mode);
- else
- error = EIO;
- SPL_X(s);
- return error;
- }
- if (unit == IPL_LOGAUTH) {
- if (!fr_running)
- return EIO;
- error = fr_auth_ioctl(data, cmd, NULL, NULL);
- SPL_X(s);
- return error;
- }
-
- switch (cmd) {
- case FIONREAD :
-#ifdef IPFILTER_LOG
- error = IWCOPY((caddr_t)&iplused[IPL_LOGIPF], (caddr_t)data,
- sizeof(iplused[IPL_LOGIPF]));
-#endif
- break;
-#if !defined(IPFILTER_LKM) && defined(_KERNEL)
- case SIOCFRENB :
- {
- u_int enable;
-
- if (!(mode & FWRITE))
- error = EPERM;
- else {
- error = IRCOPY(data, (caddr_t)&enable, sizeof(enable));
- if (error)
- break;
- if (enable)
- error = iplattach();
- else
- error = ipldetach();
- }
- break;
- }
-#endif
- case SIOCSETFF :
- if (!(mode & FWRITE))
- error = EPERM;
- else
- error = IRCOPY(data, (caddr_t)&fr_flags,
- sizeof(fr_flags));
- break;
- case SIOCGETFF :
- error = IWCOPY((caddr_t)&fr_flags, data, sizeof(fr_flags));
- break;
- case SIOCINAFR :
- case SIOCRMAFR :
- case SIOCADAFR :
- case SIOCZRLST :
- if (!(mode & FWRITE))
- error = EPERM;
- else
- error = frrequest(unit, cmd, data, fr_active);
- break;
- case SIOCINIFR :
- case SIOCRMIFR :
- case SIOCADIFR :
- if (!(mode & FWRITE))
- error = EPERM;
- else
- error = frrequest(unit, cmd, data, 1 - fr_active);
- break;
- case SIOCSWAPA :
- if (!(mode & FWRITE))
- error = EPERM;
- else {
- bzero((char *)frcache, sizeof(frcache[0]) * 2);
- *(u_int *)data = fr_active;
- fr_active = 1 - fr_active;
- }
- break;
- case SIOCGETFS :
- {
- friostat_t fio;
-
- fr_getstat(&fio);
- error = IWCOPYPTR((caddr_t)&fio, data, sizeof(fio));
- if (error)
- return EFAULT;
- break;
- }
- case SIOCFRZST :
- if (!(mode & FWRITE))
- error = EPERM;
- else
- error = frzerostats(data);
- break;
- case SIOCIPFFL :
- if (!(mode & FWRITE))
- error = EPERM;
- else {
- error = IRCOPY(data, (caddr_t)&tmp, sizeof(tmp));
- if (!error) {
- tmp = frflush(unit, tmp);
- error = IWCOPY((caddr_t)&tmp, data,
- sizeof(tmp));
- }
- }
- break;
- case SIOCSTLCK :
- error = IRCOPY(data, (caddr_t)&tmp, sizeof(tmp));
- if (!error) {
- fr_state_lock = tmp;
- fr_nat_lock = tmp;
- fr_frag_lock = tmp;
- fr_auth_lock = tmp;
- } else
- error = EFAULT;
- break;
-#ifdef IPFILTER_LOG
- case SIOCIPFFB :
- if (!(mode & FWRITE))
- error = EPERM;
- else
- *(int *)data = ipflog_clear(unit);
- break;
-#endif /* IPFILTER_LOG */
- case SIOCGFRST :
- error = IWCOPYPTR((caddr_t)ipfr_fragstats(), data,
- sizeof(ipfrstat_t));
- if (error)
- return EFAULT;
- break;
- case SIOCAUTHW :
- case SIOCAUTHR :
- if (!(mode & FWRITE)) {
- error = EPERM;
- break;
- }
- case SIOCFRSYN :
- if (!(mode & FWRITE))
- error = EPERM;
- else {
-#if defined(_KERNEL) && defined(__sgi)
- ipfsync();
-#endif
- frsync();
- }
- break;
- default :
- error = EINVAL;
- break;
- }
- SPL_X(s);
- return error;
-}
-
-
-void fr_forgetifp(ifp)
-void *ifp;
-{
- register frentry_t *f;
-
- WRITE_ENTER(&ipf_mutex);
- for (f = ipacct[0][fr_active]; (f != NULL); f = f->fr_next)
- if (f->fr_ifa == ifp)
- f->fr_ifa = (void *)-1;
- for (f = ipacct[1][fr_active]; (f != NULL); f = f->fr_next)
- if (f->fr_ifa == ifp)
- f->fr_ifa = (void *)-1;
- for (f = ipfilter[0][fr_active]; (f != NULL); f = f->fr_next)
- if (f->fr_ifa == ifp)
- f->fr_ifa = (void *)-1;
- for (f = ipfilter[1][fr_active]; (f != NULL); f = f->fr_next)
- if (f->fr_ifa == ifp)
- f->fr_ifa = (void *)-1;
-#ifdef USE_INET6
- for (f = ipacct6[0][fr_active]; (f != NULL); f = f->fr_next)
- if (f->fr_ifa == ifp)
- f->fr_ifa = (void *)-1;
- for (f = ipacct6[1][fr_active]; (f != NULL); f = f->fr_next)
- if (f->fr_ifa == ifp)
- f->fr_ifa = (void *)-1;
- for (f = ipfilter6[0][fr_active]; (f != NULL); f = f->fr_next)
- if (f->fr_ifa == ifp)
- f->fr_ifa = (void *)-1;
- for (f = ipfilter6[1][fr_active]; (f != NULL); f = f->fr_next)
- if (f->fr_ifa == ifp)
- f->fr_ifa = (void *)-1;
-#endif
- RWLOCK_EXIT(&ipf_mutex);
- ip_natsync(ifp);
-}
-
-
-static int frrequest(unit, req, data, set)
-int unit;
-#if defined(__NetBSD__) || defined(__OpenBSD__) || (__FreeBSD_version >= 300003)
-u_long req;
-#else
-int req;
-#endif
-int set;
-caddr_t data;
-{
- register frentry_t *fp, *f, **fprev;
- register frentry_t **ftail;
- frentry_t frd;
- frdest_t *fdp;
- frgroup_t *fg = NULL;
- u_int *p, *pp;
- int error = 0, in;
- u_int group;
-
- fp = &frd;
- error = IRCOPYPTR(data, (caddr_t)fp, sizeof(*fp));
- if (error)
- return EFAULT;
- fp->fr_ref = 0;
-#if (BSD >= 199306) && defined(_KERNEL)
- if ((securelevel > 0) && (fp->fr_func != NULL))
- return EPERM;
-#endif
-
- /*
- * Check that the group number does exist and that if a head group
- * has been specified, doesn't exist.
- */
- if ((req != SIOCZRLST) && fp->fr_grhead &&
- fr_findgroup((u_int)fp->fr_grhead, fp->fr_flags, unit, set, NULL))
- return EEXIST;
- if ((req != SIOCZRLST) && fp->fr_group &&
- !fr_findgroup((u_int)fp->fr_group, fp->fr_flags, unit, set, NULL))
- return ESRCH;
-
- in = (fp->fr_flags & FR_INQUE) ? 0 : 1;
-
- if (unit == IPL_LOGAUTH)
- ftail = fprev = &ipauth;
- else if ((fp->fr_flags & FR_ACCOUNT) && (fp->fr_v == 4))
- ftail = fprev = &ipacct[in][set];
- else if ((fp->fr_flags & (FR_OUTQUE|FR_INQUE)) && (fp->fr_v == 4))
- ftail = fprev = &ipfilter[in][set];
-#ifdef USE_INET6
- else if ((fp->fr_flags & FR_ACCOUNT) && (fp->fr_v == 6))
- ftail = fprev = &ipacct6[in][set];
- else if ((fp->fr_flags & (FR_OUTQUE|FR_INQUE)) && (fp->fr_v == 6))
- ftail = fprev = &ipfilter6[in][set];
-#endif
- else
- return ESRCH;
-
- if ((group = fp->fr_group)) {
- if (!(fg = fr_findgroup(group, fp->fr_flags, unit, set, NULL)))
- return ESRCH;
- ftail = fprev = fg->fg_start;
- }
-
- bzero((char *)frcache, sizeof(frcache[0]) * 2);
-
- if (*fp->fr_ifname) {
- fp->fr_ifa = GETUNIT(fp->fr_ifname, fp->fr_v);
- if (!fp->fr_ifa)
- fp->fr_ifa = (void *)-1;
- }
-#if BSD >= 199306
- if (*fp->fr_oifname) {
- fp->fr_oifa = GETUNIT(fp->fr_oifname, fp->fr_v);
- if (!fp->fr_oifa)
- fp->fr_oifa = (void *)-1;
- }
-#endif
-
- fdp = &fp->fr_dif;
- fp->fr_flags &= ~FR_DUP;
- if (*fdp->fd_ifname) {
- fdp->fd_ifp = GETUNIT(fdp->fd_ifname, fp->fr_v);
- if (!fdp->fd_ifp)
- fdp->fd_ifp = (struct ifnet *)-1;
- else
- fp->fr_flags |= FR_DUP;
- }
-
- fdp = &fp->fr_tif;
- if (*fdp->fd_ifname) {
- fdp->fd_ifp = GETUNIT(fdp->fd_ifname, fp->fr_v);
- if (!fdp->fd_ifp)
- fdp->fd_ifp = (struct ifnet *)-1;
- }
-
- /*
- * Look for a matching filter rule, but don't include the next or
- * interface pointer in the comparison (fr_next, fr_ifa).
- */
- for (fp->fr_cksum = 0, p = (u_int *)&fp->fr_ip, pp = &fp->fr_cksum;
- p < pp; p++)
- fp->fr_cksum += *p;
-
- for (; (f = *ftail); ftail = &f->fr_next)
- if ((fp->fr_cksum == f->fr_cksum) &&
- !bcmp((char *)&f->fr_ip, (char *)&fp->fr_ip, FR_CMPSIZ))
- break;
-
- /*
- * If zero'ing statistics, copy current to caller and zero.
- */
- if (req == SIOCZRLST) {
- if (!f)
- return ESRCH;
- error = IWCOPYPTR((caddr_t)f, data, sizeof(*f));
- if (error)
- return EFAULT;
- f->fr_hits = 0;
- f->fr_bytes = 0;
- return 0;
- }
-
- if (!f) {
- if (req != SIOCINAFR && req != SIOCINIFR)
- while ((f = *ftail))
- ftail = &f->fr_next;
- else {
- if (fp->fr_hits) {
- ftail = fprev;
- while (--fp->fr_hits && (f = *ftail))
- ftail = &f->fr_next;
- }
- f = NULL;
- }
- }
-
- if (req == SIOCRMAFR || req == SIOCRMIFR) {
- if (!f)
- error = ESRCH;
- else {
- /*
- * Only return EBUSY if there is a group list, else
- * it's probably just state information referencing
- * the rule.
- */
- if ((f->fr_ref > 1) && f->fr_grp)
- return EBUSY;
- if (fg && fg->fg_head)
- fg->fg_head->fr_ref--;
- if (unit == IPL_LOGAUTH)
- return fr_auth_ioctl(data, req, f, ftail);
- if (f->fr_grhead)
- fr_delgroup((u_int)f->fr_grhead, fp->fr_flags,
- unit, set);
- fixskip(fprev, f, -1);
- *ftail = f->fr_next;
- f->fr_next = NULL;
- if (f->fr_ref == 0)
- KFREE(f);
- }
- } else {
- if (f)
- error = EEXIST;
- else {
- if (unit == IPL_LOGAUTH)
- return fr_auth_ioctl(data, req, fp, ftail);
- KMALLOC(f, frentry_t *);
- if (f != NULL) {
- if (fg && fg->fg_head)
- fg->fg_head->fr_ref++;
- bcopy((char *)fp, (char *)f, sizeof(*f));
- f->fr_ref = 1;
- f->fr_hits = 0;
- f->fr_next = *ftail;
- *ftail = f;
- if (req == SIOCINIFR || req == SIOCINAFR)
- fixskip(fprev, f, 1);
- f->fr_grp = NULL;
- if ((group = f->fr_grhead))
- fg = fr_addgroup(group, f, unit, set);
- } else
- error = ENOMEM;
- }
- }
- return (error);
-}
-
-
-#ifdef _KERNEL
-/*
- * routines below for saving IP headers to buffer
- */
-# ifdef __sgi
-# ifdef _KERNEL
-int IPL_EXTERN(open)(dev_t *pdev, int flags, int devtype, cred_t *cp)
-# else
-int IPL_EXTERN(open)(dev_t dev, int flags)
-# endif
-# else
-int IPL_EXTERN(open)(dev, flags
-# if ((_BSDI_VERSION >= 199510) || (BSD >= 199506) || (NetBSD >= 199511) || \
- (__FreeBSD_version >= 220000) || defined(__OpenBSD__)) && defined(_KERNEL)
-, devtype, p)
-int devtype;
-struct proc *p;
-# else
-)
-# endif
-dev_t dev;
-int flags;
-# endif /* __sgi */
-{
-# if defined(__sgi) && defined(_KERNEL)
- u_int min = geteminor(*pdev);
-# else
- u_int min = GET_MINOR(dev);
-# endif
-
- if (IPL_LOGMAX < min)
- min = ENXIO;
- else
- min = 0;
- return min;
-}
-
-
-# ifdef __sgi
-int IPL_EXTERN(close)(dev_t dev, int flags, int devtype, cred_t *cp)
-#else
-int IPL_EXTERN(close)(dev, flags
-# if ((_BSDI_VERSION >= 199510) || (BSD >= 199506) || (NetBSD >= 199511) || \
- (__FreeBSD_version >= 220000) || defined(__OpenBSD__)) && defined(_KERNEL)
-, devtype, p)
-int devtype;
-struct proc *p;
-# else
-)
-# endif
-dev_t dev;
-int flags;
-# endif /* __sgi */
-{
- u_int min = GET_MINOR(dev);
-
- if (IPL_LOGMAX < min)
- min = ENXIO;
- else
- min = 0;
- return min;
-}
-
-/*
- * iplread/ipllog
- * both of these must operate with at least splnet() lest they be
- * called during packet processing and cause an inconsistancy to appear in
- * the filter lists.
- */
-# ifdef __sgi
-int IPL_EXTERN(read)(dev_t dev, uio_t *uio, cred_t *crp)
-# else
-# if BSD >= 199306
-int IPL_EXTERN(read)(dev, uio, ioflag)
-int ioflag;
-# else
-int IPL_EXTERN(read)(dev, uio)
-# endif
-dev_t dev;
-register struct uio *uio;
-# endif /* __sgi */
-{
-# ifdef IPFILTER_LOG
- return ipflog_read(GET_MINOR(dev), uio);
-# else
- return ENXIO;
-# endif
-}
-
-
-/*
- * send_reset - this could conceivably be a call to tcp_respond(), but that
- * requires a large amount of setting up and isn't any more efficient.
- */
-int send_reset(oip, fin)
-struct ip *oip;
-fr_info_t *fin;
-{
- struct tcphdr *tcp, *tcp2;
- int tlen = 0, hlen;
- struct mbuf *m;
-#ifdef USE_INET6
- ip6_t *ip6, *oip6 = (ip6_t *)oip;
-#endif
- ip_t *ip;
-
- tcp = (struct tcphdr *)fin->fin_dp;
- if (tcp->th_flags & TH_RST)
- return -1; /* feedback loop */
-# if (BSD < 199306) || defined(__sgi)
- m = m_get(M_DONTWAIT, MT_HEADER);
-# else
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
-# endif
- if (m == NULL)
- return ENOBUFS;
- if (m == NULL)
- return -1;
-
- tlen = oip->ip_len - fin->fin_hlen - (tcp->th_off << 2) +
- ((tcp->th_flags & TH_SYN) ? 1 : 0) +
- ((tcp->th_flags & TH_FIN) ? 1 : 0);
-
-#ifdef USE_INET6
- hlen = (fin->fin_v == 6) ? sizeof(ip6_t) : sizeof(ip_t);
-#else
- hlen = sizeof(ip_t);
-#endif
- m->m_len = sizeof(*tcp2) + hlen;
-# if BSD >= 199306
- m->m_data += max_linkhdr;
- m->m_pkthdr.len = m->m_len;
- m->m_pkthdr.rcvif = (struct ifnet *)0;
-# endif
- ip = mtod(m, struct ip *);
-# ifdef USE_INET6
- ip6 = (ip6_t *)ip;
-# endif
- bzero((char *)ip, sizeof(*tcp2) + hlen);
- tcp2 = (struct tcphdr *)((char *)ip + hlen);
-
- tcp2->th_sport = tcp->th_dport;
- tcp2->th_dport = tcp->th_sport;
- if (tcp->th_flags & TH_ACK) {
- tcp2->th_seq = tcp->th_ack;
- tcp2->th_flags = TH_RST;
- } else {
- tcp2->th_ack = ntohl(tcp->th_seq);
- tcp2->th_ack += tlen;
- tcp2->th_ack = htonl(tcp2->th_ack);
- tcp2->th_flags = TH_RST|TH_ACK;
- }
- tcp2->th_off = sizeof(*tcp2) >> 2;
-# ifdef USE_INET6
- if (fin->fin_v == 6) {
- ip6->ip6_plen = htons(sizeof(struct tcphdr));
- ip6->ip6_nxt = IPPROTO_TCP;
- ip6->ip6_src = oip6->ip6_dst;
- ip6->ip6_dst = oip6->ip6_src;
- tcp2->th_sum = in6_cksum(m, IPPROTO_TCP,
- sizeof(*ip6), sizeof(*tcp2));
- return send_ip(oip, fin, m);
- }
-# endif
- ip->ip_p = IPPROTO_TCP;
- ip->ip_len = htons(sizeof(struct tcphdr));
- ip->ip_src.s_addr = oip->ip_dst.s_addr;
- ip->ip_dst.s_addr = oip->ip_src.s_addr;
- tcp2->th_sum = in_cksum(m, hlen + sizeof(*tcp2));
- ip->ip_len = hlen + sizeof(*tcp2);
- return send_ip(oip, fin, m);
-}
-
-
-static int send_ip(oip, fin, m)
-ip_t *oip;
-fr_info_t *fin;
-struct mbuf *m;
-{
- ip_t *ip;
-
- ip = mtod(m, ip_t *);
-
- ip->ip_v = fin->fin_v;
- if (ip->ip_v == 4) {
- ip->ip_hl = (sizeof(*oip) >> 2);
- ip->ip_v = IPVERSION;
- ip->ip_tos = oip->ip_tos;
- ip->ip_id = oip->ip_id;
- ip->ip_off = 0;
-# if (BSD < 199306) || defined(__sgi)
- ip->ip_ttl = tcp_ttl;
-# else
- ip->ip_ttl = ip_defttl;
-# endif
- ip->ip_sum = 0;
- }
-# ifdef USE_INET6
- else if (ip->ip_v == 6) {
- ip6_t *ip6 = (ip6_t *)ip;
-
- ip6->ip6_hlim = 127;
-
- return ip6_output(m, NULL, NULL, 0, NULL, NULL);
- }
-# endif
-# ifdef IPSEC
- m->m_pkthdr.rcvif = NULL;
-# endif
- return ipfr_fastroute(m, fin, NULL);
-}
-
-
-int send_icmp_err(oip, type, fin, dst)
-ip_t *oip;
-int type;
-fr_info_t *fin;
-int dst;
-{
- int err, hlen = 0, xtra = 0, iclen, ohlen = 0, avail, code;
- struct in_addr dst4;
- struct icmp *icmp;
- struct mbuf *m;
- void *ifp;
-#ifdef USE_INET6
- ip6_t *ip6, *oip6 = (ip6_t *)oip;
- struct in6_addr dst6;
-#endif
- ip_t *ip;
-
- if ((type < 0) || (type > ICMP_MAXTYPE))
- return -1;
-
- code = fin->fin_icode;
-#ifdef USE_INET6
- if ((code < 0) || (code > sizeof(icmptoicmp6unreach)/sizeof(int)))
- return -1;
-#endif
-
- avail = 0;
- m = NULL;
- ifp = fin->fin_ifp;
- if (fin->fin_v == 4) {
- if ((oip->ip_p == IPPROTO_ICMP) &&
- !(fin->fin_fi.fi_fl & FI_SHORT))
- switch (ntohs(fin->fin_data[0]) >> 8)
- {
- case ICMP_ECHO :
- case ICMP_TSTAMP :
- case ICMP_IREQ :
- case ICMP_MASKREQ :
- break;
- default :
- return 0;
- }
-
-# if (BSD < 199306) || defined(__sgi)
- avail = MLEN;
- m = m_get(M_DONTWAIT, MT_HEADER);
-# else
- avail = MHLEN;
- m = m_gethdr(M_DONTWAIT, MT_HEADER);
-# endif
- if (m == NULL)
- return ENOBUFS;
-
- if (dst == 0) {
- if (fr_ifpaddr(4, ifp, &dst4) == -1)
- return -1;
- } else
- dst4.s_addr = oip->ip_dst.s_addr;
-
- hlen = sizeof(ip_t);
- ohlen = oip->ip_hl << 2;
- xtra = 8;
- }
-
-#ifdef USE_INET6
- else if (fin->fin_v == 6) {
- hlen = sizeof(ip6_t);
- ohlen = sizeof(ip6_t);
- type = icmptoicmp6types[type];
- if (type == ICMP6_DST_UNREACH)
- code = icmptoicmp6unreach[code];
-
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
- if (!m)
- return ENOBUFS;
-
- MCLGET(m, M_DONTWAIT);
- if ((m->m_flags & M_EXT) == 0) {
- m_freem(m);
- return ENOBUFS;
- }
-# ifdef M_TRAILINGSPACE
- m->m_len = 0;
- avail = M_TRAILINGSPACE(m);
-# else
- avail = MCLBYTES;
-# endif
- xtra = MIN(ntohs(oip6->ip6_plen) + sizeof(ip6_t),
- avail - hlen - sizeof(*icmp) - max_linkhdr);
- if (dst == 0) {
- if (fr_ifpaddr(6, ifp, (struct in_addr *)&dst6) == -1)
- return -1;
- } else
- dst6 = oip6->ip6_dst;
- }
-#endif
-
- iclen = hlen + sizeof(*icmp);
-# if BSD >= 199306
- avail -= (max_linkhdr + iclen);
- m->m_data += max_linkhdr;
- m->m_pkthdr.rcvif = (struct ifnet *)0;
- if (xtra > avail)
- xtra = avail;
- iclen += xtra;
- m->m_pkthdr.len = iclen;
-#else
- avail -= (m->m_off + iclen);
- if (xtra > avail)
- xtra = avail;
- iclen += xtra;
-#endif
- m->m_len = iclen;
- ip = mtod(m, ip_t *);
- icmp = (struct icmp *)((char *)ip + hlen);
- bzero((char *)ip, iclen);
-
- icmp->icmp_type = type;
- icmp->icmp_code = fin->fin_icode;
- icmp->icmp_cksum = 0;
-#ifdef icmp_nextmtu
- if (type == ICMP_UNREACH &&
- fin->fin_icode == ICMP_UNREACH_NEEDFRAG && ifp)
- icmp->icmp_nextmtu = htons(((struct ifnet *) ifp)->if_mtu);
-#endif
-
- if (avail) {
- bcopy((char *)oip, (char *)&icmp->icmp_ip, MIN(ohlen, avail));
- avail -= MIN(ohlen, avail);
- }
-
-#ifdef USE_INET6
- ip6 = (ip6_t *)ip;
- if (fin->fin_v == 6) {
- ip6->ip6_flow = 0;
- ip6->ip6_plen = htons(iclen - hlen);
- ip6->ip6_nxt = IPPROTO_ICMPV6;
- ip6->ip6_hlim = 0;
- ip6->ip6_src = dst6;
- ip6->ip6_dst = oip6->ip6_src;
- if (avail)
- bcopy((char *)oip + ohlen,
- (char *)&icmp->icmp_ip + ohlen, avail);
- icmp->icmp_cksum = in6_cksum(m, IPPROTO_ICMPV6,
- sizeof(*ip6), iclen - hlen);
- } else
-#endif
- {
- ip->ip_src.s_addr = dst4.s_addr;
- ip->ip_dst.s_addr = oip->ip_src.s_addr;
-
- if (avail > 8)
- avail = 8;
- if (avail)
- bcopy((char *)oip + ohlen,
- (char *)&icmp->icmp_ip + ohlen, avail);
- icmp->icmp_cksum = ipf_cksum((u_short *)icmp,
- sizeof(*icmp) + 8);
- ip->ip_len = iclen;
- ip->ip_p = IPPROTO_ICMP;
- }
- err = send_ip(oip, fin, m);
- return err;
-}
-
-
-# if !defined(IPFILTER_LKM) && (__FreeBSD_version < 300000) && !defined(__sgi)
-# if (BSD < 199306)
-int iplinit __P((void));
-
-int
-# else
-void iplinit __P((void));
-
-void
-# endif
-iplinit()
-{
- if (iplattach() != 0)
- printf("IP Filter failed to attach\n");
- ip_init();
-}
-# endif /* ! __NetBSD__ */
-
-
-size_t mbufchainlen(m0)
-register struct mbuf *m0;
-{
- register size_t len = 0;
-
- for (; m0; m0 = m0->m_next)
- len += m0->m_len;
- return len;
-}
-
-
-int ipfr_fastroute(m0, fin, fdp)
-struct mbuf *m0;
-fr_info_t *fin;
-frdest_t *fdp;
-{
- register struct ip *ip, *mhip;
- register struct mbuf *m = m0;
- register struct route *ro;
- int len, off, error = 0, hlen, code;
- struct ifnet *ifp, *sifp;
- struct sockaddr_in *dst;
- struct route iproute;
- frentry_t *fr;
-
- hlen = fin->fin_hlen;
- ip = mtod(m0, struct ip *);
-
-#ifdef USE_INET6
- if (ip->ip_v == 6) {
- /*
- * currently "to <if>" and "to <if>:ip#" are not supported
- * for IPv6
- */
- return ip6_output(m0, NULL, NULL, 0, NULL, NULL);
- }
-#endif
- /*
- * Route packet.
- */
- ro = &iproute;
- bzero((caddr_t)ro, sizeof (*ro));
- dst = (struct sockaddr_in *)&ro->ro_dst;
- dst->sin_family = AF_INET;
-
- fr = fin->fin_fr;
- if (fdp)
- ifp = fdp->fd_ifp;
- else {
- ifp = fin->fin_ifp;
- dst->sin_addr = ip->ip_dst;
- }
-
- /*
- * In case we're here due to "to <if>" being used with "keep state",
- * check that we're going in the correct direction.
- */
- if ((fr != NULL) && (fin->fin_rev != 0)) {
- if ((ifp != NULL) && (fdp == &fr->fr_tif))
- return -1;
- dst->sin_addr = ip->ip_dst;
- } else if (fdp)
- dst->sin_addr = fdp->fd_ip.s_addr ? fdp->fd_ip : ip->ip_dst;
-
-# if BSD >= 199306
- dst->sin_len = sizeof(*dst);
-# endif
-# if (BSD >= 199306) && !defined(__NetBSD__) && !defined(__bsdi__) && \
- !defined(__OpenBSD__)
-# ifdef RTF_CLONING
- rtalloc_ign(ro, RTF_CLONING);
-# else
- rtalloc_ign(ro, RTF_PRCLONING);
-# endif
-# else
- rtalloc(ro);
-# endif
- if (!ifp) {
- if (!fr || !(fr->fr_flags & FR_FASTROUTE)) {
- error = -2;
- goto bad;
- }
- if (ro->ro_rt == 0 || (ifp = ro->ro_rt->rt_ifp) == 0) {
- if (in_localaddr(ip->ip_dst))
- error = EHOSTUNREACH;
- else
- error = ENETUNREACH;
- goto bad;
- }
- if (ro->ro_rt->rt_flags & RTF_GATEWAY)
- dst = (struct sockaddr_in *)&ro->ro_rt->rt_gateway;
- }
- if (ro->ro_rt)
- ro->ro_rt->rt_use++;
-
- /*
- * For input packets which are being "fastrouted", they won't
- * go back through output filtering and miss their chance to get
- * NAT'd and counted.
- */
- fin->fin_ifp = ifp;
- if (fin->fin_out == 0) {
- fin->fin_out = 1;
- if ((fin->fin_fr = ipacct[1][fr_active]) &&
- (fr_scanlist(FR_NOMATCH, ip, fin, m) & FR_ACCOUNT)) {
- ATOMIC_INCL(frstats[1].fr_acct);
- }
- fin->fin_fr = NULL;
- if (!fr || !(fr->fr_flags & FR_RETMASK))
- (void) fr_checkstate(ip, fin);
- (void) ip_natout(ip, fin);
- } else
- ip->ip_sum = 0;
- /*
- * If small enough for interface, can just send directly.
- */
- if (ip->ip_len <= ifp->if_mtu) {
-# if BSD >= 199306
- int i = 0;
-
- if ((m->m_flags & M_EXT) && MEXT_IS_REF(m))
- i = 1;
-# endif
-# ifndef sparc
-# ifndef __FreeBSD__
- ip->ip_id = htons(ip->ip_id);
-# endif
- ip->ip_len = htons(ip->ip_len);
- ip->ip_off = htons(ip->ip_off);
-# endif
- if (!ip->ip_sum)
- ip->ip_sum = in_cksum(m, hlen);
-# if BSD >= 199306
- error = (*ifp->if_output)(ifp, m, (struct sockaddr *)dst,
- ro->ro_rt);
- if (i) {
-# ifndef __FreeBSD__
- ip->ip_id = ntohs(ip->ip_id);
-# endif
- ip->ip_len = ntohs(ip->ip_len);
- ip->ip_off = ntohs(ip->ip_off);
- }
-# else
- error = (*ifp->if_output)(ifp, m, (struct sockaddr *)dst);
-# endif
- goto done;
- }
- /*
- * Too large for interface; fragment if possible.
- * Must be able to put at least 8 bytes per fragment.
- */
- if (ip->ip_off & IP_DF) {
- error = EMSGSIZE;
- goto bad;
- }
- len = (ifp->if_mtu - hlen) &~ 7;
- if (len < 8) {
- error = EMSGSIZE;
- goto bad;
- }
-
- {
- int mhlen, firstlen = len;
- struct mbuf **mnext = &m->m_act;
-
- /*
- * Loop through length of segment after first fragment,
- * make new header and copy data of each part and link onto chain.
- */
- m0 = m;
- mhlen = sizeof (struct ip);
- for (off = hlen + len; off < ip->ip_len; off += len) {
-# ifdef MGETHDR
- MGETHDR(m, M_DONTWAIT, MT_HEADER);
-# else
- MGET(m, M_DONTWAIT, MT_HEADER);
-# endif
- if (m == 0) {
- error = ENOBUFS;
- goto bad;
- }
-# if BSD >= 199306
- m->m_data += max_linkhdr;
-# else
- m->m_off = MMAXOFF - hlen;
-# endif
- mhip = mtod(m, struct ip *);
- bcopy((char *)ip, (char *)mhip, sizeof(*ip));
- if (hlen > sizeof (struct ip)) {
- mhlen = ip_optcopy(ip, mhip) + sizeof (struct ip);
- mhip->ip_hl = mhlen >> 2;
- }
- m->m_len = mhlen;
- mhip->ip_off = ((off - hlen) >> 3) + (ip->ip_off & ~IP_MF);
- if (ip->ip_off & IP_MF)
- mhip->ip_off |= IP_MF;
- if (off + len >= ip->ip_len)
- len = ip->ip_len - off;
- else
- mhip->ip_off |= IP_MF;
- mhip->ip_len = htons((u_short)(len + mhlen));
- m->m_next = m_copy(m0, off, len);
- if (m->m_next == 0) {
- error = ENOBUFS; /* ??? */
- goto sendorfree;
- }
-# if BSD >= 199306
- m->m_pkthdr.len = mhlen + len;
- m->m_pkthdr.rcvif = NULL;
-# endif
-# ifndef sparc
- mhip->ip_off = htons((u_short)mhip->ip_off);
-# endif
- mhip->ip_sum = 0;
- mhip->ip_sum = in_cksum(m, mhlen);
- *mnext = m;
- mnext = &m->m_act;
- }
- /*
- * Update first fragment by trimming what's been copied out
- * and updating header, then send each fragment (in order).
- */
- m_adj(m0, hlen + firstlen - ip->ip_len);
- ip->ip_len = htons((u_short)(hlen + firstlen));
- ip->ip_off = htons((u_short)(ip->ip_off | IP_MF));
- ip->ip_sum = 0;
- ip->ip_sum = in_cksum(m0, hlen);
-sendorfree:
- for (m = m0; m; m = m0) {
- m0 = m->m_act;
- m->m_act = 0;
- if (error == 0)
-# if BSD >= 199306
- error = (*ifp->if_output)(ifp, m,
- (struct sockaddr *)dst, ro->ro_rt);
-# else
- error = (*ifp->if_output)(ifp, m,
- (struct sockaddr *)dst);
-# endif
- else
- m_freem(m);
- }
- }
-done:
- if (!error)
- ipl_frouteok[0]++;
- else
- ipl_frouteok[1]++;
-
- if (ro->ro_rt)
- RTFREE(ro->ro_rt);
- return 0;
-bad:
- if (error == EMSGSIZE) {
- sifp = fin->fin_ifp;
- code = fin->fin_icode;
- fin->fin_icode = ICMP_UNREACH_NEEDFRAG;
- fin->fin_ifp = ifp;
- (void) send_icmp_err(ip, ICMP_UNREACH, fin, 1);
- fin->fin_ifp = sifp;
- fin->fin_icode = code;
- }
- m_freem(m);
- goto done;
-}
-
-
-int fr_verifysrc(ipa, ifp)
-struct in_addr ipa;
-void *ifp;
-{
- struct sockaddr_in *dst;
- struct route iproute;
-
- bzero((char *)&iproute, sizeof(iproute));
- dst = (struct sockaddr_in *)&iproute.ro_dst;
- dst->sin_family = AF_INET;
- dst->sin_addr = ipa;
-# if (BSD >= 199306) && !defined(__NetBSD__) && !defined(__bsdi__) && \
- !defined(__OpenBSD__)
-# ifdef RTF_CLONING
- rtalloc_ign(&iproute, RTF_CLONING);
-# else
- rtalloc_ign(&iproute, RTF_PRCLONING);
-# endif
-# else
- rtalloc(&iproute);
-# endif
- if (iproute.ro_rt == NULL)
- return 0;
- return (ifp == iproute.ro_rt->rt_ifp);
-}
-
-#else /* #ifdef _KERNEL */
-
-
-# ifdef __sgi
-static int no_output __P((struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *s))
-# else
-static int no_output __P((struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *s, struct rtentry *rt))
-# endif
-{
- return 0;
-}
-
-
-# ifdef __STDC__
-# ifdef __sgi
-static int write_output __P((struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *s))
-# else
-static int write_output __P((struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *s, struct rtentry *rt))
-# endif
-{
- ip_t *ip = (ip_t *)m;
-# else
-static int write_output(ifp, ip)
-struct ifnet *ifp;
-ip_t *ip;
-{
-# endif
- char fname[32];
- int fd;
-
-# if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603))
- sprintf(fname, "/tmp/%s", ifp->if_xname);
-# else
- sprintf(fname, "/tmp/%s%d", ifp->if_name, ifp->if_unit);
-# endif
- fd = open(fname, O_WRONLY|O_APPEND);
- if (fd == -1) {
- perror("open");
- return -1;
- }
- write(fd, (char *)ip, ntohs(ip->ip_len));
- close(fd);
- return 0;
-}
-
-
-struct ifnet *get_unit(name, v)
-char *name;
-int v;
-{
- struct ifnet *ifp, **ifa;
-# if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603))
- for (ifa = ifneta; ifa && (ifp = *ifa); ifa++) {
- if (!strcmp(name, ifp->if_xname))
- return ifp;
- }
-# else
- char ifname[32], *s;
-
- for (ifa = ifneta; ifa && (ifp = *ifa); ifa++) {
- (void) sprintf(ifname, "%s%d", ifp->if_name, ifp->if_unit);
- if (!strcmp(name, ifname))
- return ifp;
- }
-# endif
-
- if (!ifneta) {
- ifneta = (struct ifnet **)malloc(sizeof(ifp) * 2);
- if (!ifneta)
- return NULL;
- ifneta[1] = NULL;
- ifneta[0] = (struct ifnet *)calloc(1, sizeof(*ifp));
- if (!ifneta[0]) {
- free(ifneta);
- return NULL;
- }
- nifs = 1;
- } else {
- nifs++;
- ifneta = (struct ifnet **)realloc(ifneta,
- (nifs + 1) * sizeof(*ifa));
- if (!ifneta) {
- nifs = 0;
- return NULL;
- }
- ifneta[nifs] = NULL;
- ifneta[nifs - 1] = (struct ifnet *)malloc(sizeof(*ifp));
- if (!ifneta[nifs - 1]) {
- nifs--;
- return NULL;
- }
- }
- ifp = ifneta[nifs - 1];
-
-# if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603))
- strncpy(ifp->if_xname, name, sizeof(ifp->if_xname));
-# else
- for (s = name; *s && !isdigit(*s); s++)
- ;
- if (*s && isdigit(*s)) {
- ifp->if_unit = atoi(s);
- ifp->if_name = (char *)malloc(s - name + 1);
- strncpy(ifp->if_name, name, s - name);
- ifp->if_name[s - name] = '\0';
- } else {
- ifp->if_name = strdup(name);
- ifp->if_unit = -1;
- }
-# endif
- ifp->if_output = no_output;
- return ifp;
-}
-
-
-
-void init_ifp()
-{
- struct ifnet *ifp, **ifa;
- char fname[32];
- int fd;
-
-# if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199606)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603))
- for (ifa = ifneta; ifa && (ifp = *ifa); ifa++) {
- ifp->if_output = write_output;
- sprintf(fname, "/tmp/%s", ifp->if_xname);
- fd = open(fname, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600);
- if (fd == -1)
- perror("open");
- else
- close(fd);
- }
-# else
-
- for (ifa = ifneta; ifa && (ifp = *ifa); ifa++) {
- ifp->if_output = write_output;
- sprintf(fname, "/tmp/%s%d", ifp->if_name, ifp->if_unit);
- fd = open(fname, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600);
- if (fd == -1)
- perror("open");
- else
- close(fd);
- }
-# endif
-}
-
-
-int ipfr_fastroute(ip, fin, fdp)
-ip_t *ip;
-fr_info_t *fin;
-frdest_t *fdp;
-{
- struct ifnet *ifp = fdp->fd_ifp;
-
- if (!ifp)
- return 0; /* no routing table out here */
-
- ip->ip_len = htons((u_short)ip->ip_len);
- ip->ip_off = htons((u_short)(ip->ip_off | IP_MF));
- ip->ip_sum = 0;
-#ifdef __sgi
- (*ifp->if_output)(ifp, (void *)ip, NULL);
-#else
- (*ifp->if_output)(ifp, (void *)ip, NULL, 0);
-#endif
- return 0;
-}
-
-
-int ipllog __P((void))
-{
- verbose("l");
- return 0;
-}
-
-
-int send_reset(ip, ifp)
-ip_t *ip;
-struct ifnet *ifp;
-{
- verbose("- TCP RST sent\n");
- return 0;
-}
-
-
-int icmp_error(ip, ifp)
-ip_t *ip;
-struct ifnet *ifp;
-{
- verbose("- TCP RST sent\n");
- return 0;
-}
-
-
-void frsync()
-{
- return;
-}
-#endif /* _KERNEL */
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h
deleted file mode 100644
index a960349e9ac9..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_fil.h
+++ /dev/null
@@ -1,634 +0,0 @@
-/*
- * Copyright (C) 1993-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * @(#)ip_fil.h 1.35 6/5/96
- * $Id: ip_fil.h,v 2.29.2.4 2000/11/12 11:54:53 darrenr Exp $
- * $FreeBSD$
- */
-
-#ifndef __IP_FIL_H__
-#define __IP_FIL_H__
-
-/*
- * Pathnames for various IP Filter control devices. Used by LKM
- * and userland, so defined here.
- */
-#define IPNAT_NAME "/dev/ipnat"
-#define IPSTATE_NAME "/dev/ipstate"
-#define IPAUTH_NAME "/dev/ipauth"
-
-#ifndef SOLARIS
-# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
-#endif
-
-#if defined(KERNEL) && !defined(_KERNEL)
-# define _KERNEL
-#endif
-
-#ifndef __P
-# ifdef __STDC__
-# define __P(x) x
-# else
-# define __P(x) ()
-# endif
-#endif
-
-#if defined(__STDC__) || defined(__GNUC__)
-# define SIOCADAFR _IOW('r', 60, struct frentry *)
-# define SIOCRMAFR _IOW('r', 61, struct frentry *)
-# define SIOCSETFF _IOW('r', 62, u_int)
-# define SIOCGETFF _IOR('r', 63, u_int)
-# define SIOCGETFS _IOWR('r', 64, struct friostat *)
-# define SIOCIPFFL _IOWR('r', 65, int)
-# define SIOCIPFFB _IOR('r', 66, int)
-# define SIOCADIFR _IOW('r', 67, struct frentry *)
-# define SIOCRMIFR _IOW('r', 68, struct frentry *)
-# define SIOCSWAPA _IOR('r', 69, u_int)
-# define SIOCINAFR _IOW('r', 70, struct frentry *)
-# define SIOCINIFR _IOW('r', 71, struct frentry *)
-# define SIOCFRENB _IOW('r', 72, u_int)
-# define SIOCFRSYN _IOW('r', 73, u_int)
-# define SIOCFRZST _IOWR('r', 74, struct friostat *)
-# define SIOCZRLST _IOWR('r', 75, struct frentry *)
-# define SIOCAUTHW _IOWR('r', 76, struct fr_info *)
-# define SIOCAUTHR _IOWR('r', 77, struct fr_info *)
-# define SIOCATHST _IOWR('r', 78, struct fr_authstat *)
-# define SIOCSTLCK _IOWR('r', 79, u_int)
-# define SIOCSTPUT _IOWR('r', 80, struct ipstate_save *)
-# define SIOCSTGET _IOWR('r', 81, struct ipstate_save *)
-# define SIOCSTGSZ _IOWR('r', 82, struct natget *)
-# define SIOCGFRST _IOWR('r', 83, struct ipfrstat *)
-#else
-# define SIOCADAFR _IOW(r, 60, struct frentry *)
-# define SIOCRMAFR _IOW(r, 61, struct frentry *)
-# define SIOCSETFF _IOW(r, 62, u_int)
-# define SIOCGETFF _IOR(r, 63, u_int)
-# define SIOCGETFS _IOWR(r, 64, struct friostat *)
-# define SIOCIPFFL _IOWR(r, 65, int)
-# define SIOCIPFFB _IOR(r, 66, int)
-# define SIOCADIFR _IOW(r, 67, struct frentry *)
-# define SIOCRMIFR _IOW(r, 68, struct frentry *)
-# define SIOCSWAPA _IOR(r, 69, u_int)
-# define SIOCINAFR _IOW(r, 70, struct frentry *)
-# define SIOCINIFR _IOW(r, 71, struct frentry *)
-# define SIOCFRENB _IOW(r, 72, u_int)
-# define SIOCFRSYN _IOW(r, 73, u_int)
-# define SIOCFRZST _IOWR(r, 74, struct friostat *)
-# define SIOCZRLST _IOWR(r, 75, struct frentry *)
-# define SIOCAUTHW _IOWR(r, 76, struct fr_info *)
-# define SIOCAUTHR _IOWR(r, 77, struct fr_info *)
-# define SIOCATHST _IOWR(r, 78, struct fr_authstat *)
-# define SIOCSTLCK _IOWR(r, 79, u_int)
-# define SIOCSTPUT _IOWR(r, 80, struct ipstate_save *)
-# define SIOCSTGET _IOWR(r, 81, struct ipstate_save *)
-# define SIOCSTGSZ _IOWR(r, 82, struct natget *)
-# define SIOCGFRST _IOWR(r, 83, struct ipfrstat *)
-#endif
-#define SIOCADDFR SIOCADAFR
-#define SIOCDELFR SIOCRMAFR
-#define SIOCINSFR SIOCINAFR
-
-
-typedef struct fr_ip {
- u_32_t fi_v:4; /* IP version */
- u_32_t fi_fl:4; /* packet flags */
- u_32_t fi_tos:8; /* IP packet TOS */
- u_32_t fi_ttl:8; /* IP packet TTL */
- u_32_t fi_p:8; /* IP packet protocol */
- union i6addr fi_src; /* source address from packet */
- union i6addr fi_dst; /* destination address from packet */
- u_32_t fi_optmsk; /* bitmask composed from IP options */
- u_short fi_secmsk; /* bitmask composed from IP security options */
- u_short fi_auth; /* authentication code from IP sec. options */
-} fr_ip_t;
-
-#define FI_OPTIONS (FF_OPTIONS >> 24)
-#define FI_TCPUDP (FF_TCPUDP >> 24) /* TCP/UCP implied comparison*/
-#define FI_FRAG (FF_FRAG >> 24)
-#define FI_SHORT (FF_SHORT >> 24)
-#define FI_CMP (FI_OPTIONS|FI_TCPUDP|FI_SHORT)
-
-#define fi_saddr fi_src.in4.s_addr
-#define fi_daddr fi_dst.in4.s_addr
-
-
-/*
- * These are both used by the state and NAT code to indicate that one port or
- * the other should be treated as a wildcard.
- */
-#define FI_W_SPORT 0x00000100
-#define FI_W_DPORT 0x00000200
-#define FI_WILDP (FI_W_SPORT|FI_W_DPORT)
-#define FI_W_SADDR 0x00000400
-#define FI_W_DADDR 0x00000800
-#define FI_WILDA (FI_W_SADDR|FI_W_DADDR)
-#define FI_NEWFR 0x00001000
-
-typedef struct fr_info {
- void *fin_ifp; /* interface packet is `on' */
- struct fr_ip fin_fi; /* IP Packet summary */
- u_short fin_data[2]; /* TCP/UDP ports, ICMP code/type */
- u_char fin_out; /* in or out ? 1 == out, 0 == in */
- u_char fin_rev; /* state only: 1 = reverse */
- u_short fin_hlen; /* length of IP header in bytes */
- u_char fin_tcpf; /* TCP header flags (SYN, ACK, etc) */
- /* From here on is packet specific */
- u_char fin_icode; /* ICMP error to return */
- u_short fin_rule; /* rule # last matched */
- u_32_t fin_group; /* group number, -1 for none */
- struct frentry *fin_fr; /* last matching rule */
- char *fin_dp; /* start of data past IP header */
- u_short fin_dlen; /* length of data portion of packet */
- u_short fin_id; /* IP packet id field */
- void *fin_mp; /* pointer to pointer to mbuf */
-#if SOLARIS
- void *fin_qfm; /* pointer to mblk where pkt starts */
- void *fin_qif;
-#endif
- u_short fin_plen;
- u_short fin_off;
-} fr_info_t;
-
-#define fin_v fin_fi.fi_v
-
-/*
- * Size for compares on fr_info structures
- */
-#define FI_CSIZE offsetof(fr_info_t, fin_icode)
-
-/*
- * Size for copying cache fr_info structure
- */
-#define FI_COPYSIZE offsetof(fr_info_t, fin_dp)
-
-typedef struct frdest {
- void *fd_ifp;
- struct in_addr fd_ip;
- char fd_ifname[IFNAMSIZ];
-} frdest_t;
-
-typedef struct frpcmp {
- int frp_cmp; /* data for port comparisons */
- u_short frp_port; /* top port for <> and >< */
- u_short frp_top; /* top port for <> and >< */
-} frpcmp_t;
-
-typedef struct frtuc {
- u_char ftu_tcpfm; /* tcp flags mask */
- u_char ftu_tcpf; /* tcp flags */
- frpcmp_t ftu_src;
- frpcmp_t ftu_dst;
-} frtuc_t;
-
-#define ftu_scmp ftu_src.frp_cmp
-#define ftu_dcmp ftu_dst.frp_cmp
-#define ftu_sport ftu_src.frp_port
-#define ftu_dport ftu_dst.frp_port
-#define ftu_stop ftu_src.frp_top
-#define ftu_dtop ftu_dst.frp_top
-
-typedef struct frentry {
- struct frentry *fr_next;
- u_32_t fr_group; /* group to which this rule belongs */
- u_32_t fr_grhead; /* group # which this rule starts */
- struct frentry *fr_grp;
- int fr_ref; /* reference count - for grouping */
- void *fr_ifa;
-#if BSD >= 199306
- void *fr_oifa;
-#endif
- /*
- * These are only incremented when a packet matches this rule and
- * it is the last match
- */
- U_QUAD_T fr_hits;
- U_QUAD_T fr_bytes;
- /*
- * Fields after this may not change whilst in the kernel.
- */
- struct fr_ip fr_ip;
- struct fr_ip fr_mip; /* mask structure */
-
-
- u_short fr_icmpm; /* data for ICMP packets (mask) */
- u_short fr_icmp;
-
- frtuc_t fr_tuc;
- u_32_t fr_flags; /* per-rule flags && options (see below) */
- u_int fr_skip; /* # of rules to skip */
- u_int fr_loglevel; /* syslog log facility + priority */
- int (*fr_func) __P((int, ip_t *, fr_info_t *)); /* call this function */
- int fr_sap; /* For solaris only */
- u_char fr_icode; /* return ICMP code */
- char fr_ifname[IFNAMSIZ];
-#if BSD >= 199306
- char fr_oifname[IFNAMSIZ];
-#endif
- struct frdest fr_tif; /* "to" interface */
- struct frdest fr_dif; /* duplicate packet interfaces */
- u_int fr_cksum; /* checksum on filter rules for performance */
-} frentry_t;
-
-#define fr_v fr_ip.fi_v
-#define fr_proto fr_ip.fi_p
-#define fr_ttl fr_ip.fi_ttl
-#define fr_tos fr_ip.fi_tos
-#define fr_tcpfm fr_tuc.ftu_tcpfm
-#define fr_tcpf fr_tuc.ftu_tcpf
-#define fr_scmp fr_tuc.ftu_scmp
-#define fr_dcmp fr_tuc.ftu_dcmp
-#define fr_dport fr_tuc.ftu_dport
-#define fr_sport fr_tuc.ftu_sport
-#define fr_stop fr_tuc.ftu_stop
-#define fr_dtop fr_tuc.ftu_dtop
-#define fr_dst fr_ip.fi_dst.in4
-#define fr_src fr_ip.fi_src.in4
-#define fr_dmsk fr_mip.fi_dst.in4
-#define fr_smsk fr_mip.fi_src.in4
-
-#ifndef offsetof
-#define offsetof(t,m) (int)((&((t *)0L)->m))
-#endif
-#define FR_CMPSIZ (sizeof(struct frentry) - offsetof(frentry_t, fr_ip))
-
-/*
- * fr_flags
- */
-#define FR_BLOCK 0x00001 /* do not allow packet to pass */
-#define FR_PASS 0x00002 /* allow packet to pass */
-#define FR_OUTQUE 0x00004 /* outgoing packets */
-#define FR_INQUE 0x00008 /* ingoing packets */
-#define FR_LOG 0x00010 /* Log */
-#define FR_LOGB 0x00011 /* Log-fail */
-#define FR_LOGP 0x00012 /* Log-pass */
-#define FR_LOGBODY 0x00020 /* Log the body */
-#define FR_LOGFIRST 0x00040 /* Log the first byte if state held */
-#define FR_RETRST 0x00080 /* Return TCP RST packet - reset connection */
-#define FR_RETICMP 0x00100 /* Return ICMP unreachable packet */
-#define FR_FAKEICMP 0x00180 /* Return ICMP unreachable with fake source */
-#define FR_NOMATCH 0x00200 /* no match occured */
-#define FR_ACCOUNT 0x00400 /* count packet bytes */
-#define FR_KEEPFRAG 0x00800 /* keep fragment information */
-#define FR_KEEPSTATE 0x01000 /* keep `connection' state information */
-#define FR_INACTIVE 0x02000
-#define FR_QUICK 0x04000 /* match & stop processing list */
-#define FR_FASTROUTE 0x08000 /* bypass normal routing */
-#define FR_CALLNOW 0x10000 /* call another function (fr_func) if matches */
-#define FR_DUP 0x20000 /* duplicate packet */
-#define FR_LOGORBLOCK 0x40000 /* block the packet if it can't be logged */
-#define FR_NOTSRCIP 0x80000 /* not the src IP# */
-#define FR_NOTDSTIP 0x100000 /* not the dst IP# */
-#define FR_AUTH 0x200000 /* use authentication */
-#define FR_PREAUTH 0x400000 /* require preauthentication */
-#define FR_DONTCACHE 0x800000 /* don't cache the result */
-
-#define FR_LOGMASK (FR_LOG|FR_LOGP|FR_LOGB)
-#define FR_RETMASK (FR_RETICMP|FR_RETRST|FR_FAKEICMP)
-
-/*
- * These correspond to #define's for FI_* and are stored in fr_flags
- */
-#define FF_OPTIONS 0x01000000
-#define FF_TCPUDP 0x02000000
-#define FF_FRAG 0x04000000
-#define FF_SHORT 0x08000000
-/*
- * recognized flags for SIOCGETFF and SIOCSETFF, and get put in fr_flags
- */
-#define FF_LOGPASS 0x10000000
-#define FF_LOGBLOCK 0x20000000
-#define FF_LOGNOMATCH 0x40000000
-#define FF_LOGGING (FF_LOGPASS|FF_LOGBLOCK|FF_LOGNOMATCH)
-#define FF_BLOCKNONIP 0x80000000 /* Solaris2 Only */
-
-#define FR_NONE 0
-#define FR_EQUAL 1
-#define FR_NEQUAL 2
-#define FR_LESST 3
-#define FR_GREATERT 4
-#define FR_LESSTE 5
-#define FR_GREATERTE 6
-#define FR_OUTRANGE 7
-#define FR_INRANGE 8
-
-typedef struct filterstats {
- u_long fr_pass; /* packets allowed */
- u_long fr_block; /* packets denied */
- u_long fr_nom; /* packets which don't match any rule */
- u_long fr_short; /* packets which are short */
- u_long fr_ppkl; /* packets allowed and logged */
- u_long fr_bpkl; /* packets denied and logged */
- u_long fr_npkl; /* packets unmatched and logged */
- u_long fr_pkl; /* packets logged */
- u_long fr_skip; /* packets to be logged but buffer full */
- u_long fr_ret; /* packets for which a return is sent */
- u_long fr_acct; /* packets for which counting was performed */
- u_long fr_bnfr; /* bad attempts to allocate fragment state */
- u_long fr_nfr; /* new fragment state kept */
- u_long fr_cfr; /* add new fragment state but complete pkt */
- u_long fr_bads; /* bad attempts to allocate packet state */
- u_long fr_ads; /* new packet state kept */
- u_long fr_chit; /* cached hit */
- u_long fr_tcpbad; /* TCP checksum check failures */
- u_long fr_pull[2]; /* good and bad pullup attempts */
- u_long fr_badsrc; /* source received doesn't match route */
- u_long fr_badttl; /* TTL in packet doesn't reach minimum */
-#if SOLARIS
- u_long fr_notdata; /* PROTO/PCPROTO that have no data */
- u_long fr_nodata; /* mblks that have no data */
- u_long fr_bad; /* bad IP packets to the filter */
- u_long fr_notip; /* packets passed through no on ip queue */
- u_long fr_drop; /* packets dropped - no info for them! */
- u_long fr_copy; /* messages copied due to db_ref > 1 */
-#endif
- u_long fr_ipv6[2]; /* IPv6 packets in/out */
-} filterstats_t;
-
-/*
- * For SIOCGETFS
- */
-typedef struct friostat {
- struct filterstats f_st[2];
- struct frentry *f_fin[2];
- struct frentry *f_fout[2];
- struct frentry *f_acctin[2];
- struct frentry *f_acctout[2];
- struct frentry *f_fin6[2];
- struct frentry *f_fout6[2];
- struct frentry *f_acctin6[2];
- struct frentry *f_acctout6[2];
- struct frentry *f_auth;
- struct frgroup *f_groups[3][2];
- u_long f_froute[2];
- int f_defpass; /* default pass - from fr_pass */
- char f_active; /* 1 or 0 - active rule set */
- char f_running; /* 1 if running, else 0 */
- char f_logging; /* 1 if enabled, else 0 */
- char f_version[32]; /* version string */
- int f_locks[4];
-} friostat_t;
-
-typedef struct optlist {
- u_short ol_val;
- int ol_bit;
-} optlist_t;
-
-
-/*
- * Group list structure.
- */
-typedef struct frgroup {
- u_32_t fg_num;
- struct frgroup *fg_next;
- struct frentry *fg_head;
- struct frentry **fg_start;
-} frgroup_t;
-
-
-/*
- * Log structure. Each packet header logged is prepended by one of these.
- * Following this in the log records read from the device will be an ipflog
- * structure which is then followed by any packet data.
- */
-typedef struct iplog {
- u_32_t ipl_magic;
- u_int ipl_count;
- u_long ipl_sec;
- u_long ipl_usec;
- size_t ipl_dsize;
- struct iplog *ipl_next;
-} iplog_t;
-
-#define IPL_MAGIC 0x49504c4d /* 'IPLM' */
-
-typedef struct ipflog {
-#if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199603)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603))
- u_char fl_ifname[IFNAMSIZ];
-#else
- u_int fl_unit;
- u_char fl_ifname[4];
-#endif
- u_char fl_plen; /* extra data after hlen */
- u_char fl_hlen; /* length of IP headers saved */
- u_short fl_loglevel; /* syslog log level */
- u_32_t fl_rule;
- u_32_t fl_group;
- u_32_t fl_flags;
- u_32_t fl_lflags;
-} ipflog_t;
-
-
-#ifndef ICMP_UNREACH_FILTER
-# define ICMP_UNREACH_FILTER 13
-#endif
-
-#ifndef IPF_LOGGING
-# define IPF_LOGGING 0
-#endif
-#ifndef IPF_DEFAULT_PASS
-# define IPF_DEFAULT_PASS FR_PASS
-#endif
-
-#define IPMINLEN(i, h) ((i)->ip_len >= ((i)->ip_hl * 4 + sizeof(struct h)))
-#define IPLLOGSIZE 8192
-
-/*
- * Device filenames for reading log information. Use ipf on Solaris2 because
- * ipl is already a name used by something else.
- */
-#ifndef IPL_NAME
-# if SOLARIS
-# define IPL_NAME "/dev/ipf"
-# else
-# define IPL_NAME "/dev/ipl"
-# endif
-#endif
-#define IPL_NAT IPNAT_NAME
-#define IPL_STATE IPSTATE_NAME
-#define IPL_AUTH IPAUTH_NAME
-
-#define IPL_LOGIPF 0 /* Minor device #'s for accessing logs */
-#define IPL_LOGNAT 1
-#define IPL_LOGSTATE 2
-#define IPL_LOGAUTH 3
-#define IPL_LOGMAX 3
-
-#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) && \
- (__FreeBSD_version >= 220000)
-# define CDEV_MAJOR 79
-#endif
-
-/*
- * Post NetBSD 1.2 has the PFIL interface for packet filters. This turns
- * on those hooks. We don't need any special mods in non-IP Filter code
- * with this!
- */
-#if (defined(NetBSD) && (NetBSD > 199609) && (NetBSD <= 1991011)) || \
- (defined(NetBSD1_2) && NetBSD1_2 > 1) || (defined(__FreeBSD_version) && \
- (__FreeBSD_version >= 500011))
-# if (NetBSD >= 199905)
-# define PFIL_HOOKS
-# endif
-# ifdef PFIL_HOOKS
-# define NETBSD_PF
-# endif
-#endif
-
-
-#ifndef _KERNEL
-struct ifnet;
-extern int fr_check __P((ip_t *, int, void *, int, mb_t **));
-extern int (*fr_checkp) __P((ip_t *, int, void *, int, mb_t **));
-extern int send_reset __P((ip_t *, struct ifnet *));
-extern int icmp_error __P((ip_t *, struct ifnet *));
-extern int ipf_log __P((void));
-extern int ipfr_fastroute __P((ip_t *, fr_info_t *, frdest_t *));
-extern struct ifnet *get_unit __P((char *, int));
-# if defined(__NetBSD__) || defined(__OpenBSD__) || \
- (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000)
-extern int iplioctl __P((dev_t, u_long, caddr_t, int));
-# else
-extern int iplioctl __P((dev_t, int, caddr_t, int));
-# endif
-extern int iplopen __P((dev_t, int));
-extern int iplclose __P((dev_t, int));
-#else /* #ifndef _KERNEL */
-# if defined(__NetBSD__) && defined(PFIL_HOOKS)
-extern void ipfilterattach __P((int));
-# endif
-extern int iplattach __P((void));
-extern int ipl_enable __P((void));
-extern int ipl_disable __P((void));
-extern void ipflog_init __P((void));
-extern int ipflog_clear __P((minor_t));
-extern int ipflog_read __P((minor_t, struct uio *));
-extern int ipflog __P((u_int, ip_t *, fr_info_t *, mb_t *));
-extern int ipllog __P((int, fr_info_t *, void **, size_t *, int *, int));
-extern int send_icmp_err __P((ip_t *, int, fr_info_t *, int));
-extern int send_reset __P((ip_t *, fr_info_t *));
-# if SOLARIS
-extern int fr_check __P((ip_t *, int, void *, int, qif_t *, mb_t **));
-extern int (*fr_checkp) __P((ip_t *, int, void *,
- int, qif_t *, mb_t **));
-# if SOLARIS2 >= 7
-extern int iplioctl __P((dev_t, int, intptr_t, int, cred_t *, int *));
-# else
-extern int iplioctl __P((dev_t, int, int *, int, cred_t *, int *));
-# endif
-extern int iplopen __P((dev_t *, int, int, cred_t *));
-extern int iplclose __P((dev_t, int, int, cred_t *));
-extern int ipfsync __P((void));
-extern int ipfr_fastroute __P((ip_t *, mblk_t *, mblk_t **,
- fr_info_t *, frdest_t *));
-extern void copyin_mblk __P((mblk_t *, size_t, size_t, char *));
-extern void copyout_mblk __P((mblk_t *, size_t, size_t, char *));
-extern int fr_qin __P((queue_t *, mblk_t *));
-extern int fr_qout __P((queue_t *, mblk_t *));
-extern int iplread __P((dev_t, struct uio *, cred_t *));
-# else /* SOLARIS */
-extern int fr_check __P((ip_t *, int, void *, int, mb_t **));
-extern int (*fr_checkp) __P((ip_t *, int, void *, int, mb_t **));
-extern int ipfr_fastroute __P((mb_t *, fr_info_t *, frdest_t *));
-extern size_t mbufchainlen __P((mb_t *));
-# ifdef __sgi
-# include <sys/cred.h>
-extern int iplioctl __P((dev_t, int, caddr_t, int, cred_t *, int *));
-extern int iplopen __P((dev_t *, int, int, cred_t *));
-extern int iplclose __P((dev_t, int, int, cred_t *));
-extern int iplread __P((dev_t, struct uio *, cred_t *));
-extern int ipfsync __P((void));
-extern int ipfilter_sgi_attach __P((void));
-extern void ipfilter_sgi_detach __P((void));
-extern void ipfilter_sgi_intfsync __P((void));
-# else
-# ifdef IPFILTER_LKM
-extern int iplidentify __P((char *));
-# endif
-# if (_BSDI_VERSION >= 199510) || (__FreeBSD_version >= 220000) || \
- (NetBSD >= 199511) || defined(__OpenBSD__)
-# if defined(__NetBSD__) || (_BSDI_VERSION >= 199701) || \
- defined(__OpenBSD__) || (__FreeBSD_version >= 300000)
-extern int iplioctl __P((dev_t, u_long, caddr_t, int, struct proc *));
-# else
-extern int iplioctl __P((dev_t, int, caddr_t, int, struct proc *));
-# endif
-extern int iplopen __P((dev_t, int, int, struct proc *));
-extern int iplclose __P((dev_t, int, int, struct proc *));
-# else
-# ifndef linux
-extern int iplopen __P((dev_t, int));
-extern int iplclose __P((dev_t, int));
-extern int iplioctl __P((dev_t, int, caddr_t, int));
-# else
-extern int iplioctl(struct inode *, struct file *, u_int, u_long);
-extern int iplopen __P((struct inode *, struct file *));
-extern void iplclose __P((struct inode *, struct file *));
-# endif /* !linux */
-# endif /* (_BSDI_VERSION >= 199510) */
-# if BSD >= 199306
-extern int iplread __P((dev_t, struct uio *, int));
-# else
-# ifndef linux
-extern int iplread __P((dev_t, struct uio *));
-# else
-extern int iplread(struct inode *, struct file *, char *, int);
-# endif /* !linux */
-# endif /* BSD >= 199306 */
-# endif /* __ sgi */
-# endif /* SOLARIS */
-#endif /* #ifndef _KERNEL */
-
-extern char *memstr __P((char *, char *, int, int));
-extern void fixskip __P((frentry_t **, frentry_t *, int));
-extern int countbits __P((u_32_t));
-extern int ipldetach __P((void));
-extern u_short ipf_cksum __P((u_short *, int));
-extern int ircopyptr __P((void *, void *, size_t));
-extern int iwcopyptr __P((void *, void *, size_t));
-
-extern int frflush __P((minor_t, int));
-extern void frsync __P((void));
-extern frgroup_t *fr_addgroup __P((u_32_t, frentry_t *, minor_t, int));
-extern void fr_delgroup __P((u_32_t, u_32_t, minor_t, int));
-extern frgroup_t *fr_findgroup __P((u_32_t, u_32_t, minor_t, int,
- frgroup_t ***));
-
-extern int fr_copytolog __P((int, char *, int));
-extern void fr_forgetifp __P((void *));
-extern void fr_getstat __P((struct friostat *));
-extern int fr_ifpaddr __P((int, void *, struct in_addr *));
-extern int fr_lock __P((caddr_t, int *));
-extern void fr_makefrip __P((int, ip_t *, fr_info_t *));
-extern u_short fr_tcpsum __P((mb_t *, ip_t *, tcphdr_t *));
-extern int fr_scanlist __P((u_32_t, ip_t *, fr_info_t *, void *));
-extern int fr_tcpudpchk __P((frtuc_t *, fr_info_t *));
-extern int fr_verifysrc __P((struct in_addr, void *));
-
-extern int ipl_unreach;
-extern int fr_running;
-extern u_long ipl_frouteok[2];
-extern int fr_pass;
-extern int fr_flags;
-extern int fr_active;
-extern int fr_chksrc;
-extern int fr_minttl;
-extern int fr_minttllog;
-extern fr_info_t frcache[2];
-extern char ipfilter_version[];
-extern iplog_t **iplh[IPL_LOGMAX+1], *iplt[IPL_LOGMAX+1];
-extern size_t iplused[IPL_LOGMAX + 1];
-extern struct frentry *ipfilter[2][2], *ipacct[2][2];
-#ifdef USE_INET6
-extern struct frentry *ipfilter6[2][2], *ipacct6[2][2];
-extern int icmptoicmp6types[ICMP_MAXTYPE+1];
-extern int icmptoicmp6unreach[ICMP_MAX_UNREACH];
-#endif
-extern struct frgroup *ipfgroups[3][2];
-extern struct filterstats frstats[];
-
-#endif /* __IP_FIL_H__ */
diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/sys/contrib/ipfilter/netinet/ip_frag.c
deleted file mode 100644
index f5548fc7f6fe..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_frag.c
+++ /dev/null
@@ -1,576 +0,0 @@
-/*
- * Copyright (C) 1993-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- */
-#if !defined(lint)
-static const char sccsid[] = "@(#)ip_frag.c 1.11 3/24/96 (C) 1993-1995 Darren Reed";
-static const char rcsid[] = "@(#)$FreeBSD$";
-#endif
-
-#if defined(KERNEL) && !defined(_KERNEL)
-# define _KERNEL
-#endif
-
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/file.h>
-#if !defined(_KERNEL) && !defined(KERNEL)
-# include <stdio.h>
-# include <string.h>
-# include <stdlib.h>
-#endif
-#if (defined(KERNEL) || defined(_KERNEL)) && (__FreeBSD_version >= 220000)
-# include <sys/filio.h>
-# include <sys/fcntl.h>
-#else
-# include <sys/ioctl.h>
-#endif
-#include <sys/uio.h>
-#ifndef linux
-# include <sys/protosw.h>
-#endif
-#include <sys/socket.h>
-#if defined(_KERNEL) && !defined(linux)
-# include <sys/systm.h>
-#endif
-#if !defined(__SVR4) && !defined(__svr4__)
-# if defined(_KERNEL) && !defined(__sgi)
-# include <sys/kernel.h>
-# endif
-# ifndef linux
-# include <sys/mbuf.h>
-# endif
-#else
-# include <sys/byteorder.h>
-# ifdef _KERNEL
-# include <sys/dditypes.h>
-# endif
-# include <sys/stream.h>
-# include <sys/kmem.h>
-#endif
-#include <net/if.h>
-#ifdef sun
-# include <net/af.h>
-#endif
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#ifndef linux
-# include <netinet/ip_var.h>
-#endif
-#include <netinet/tcp.h>
-#include <netinet/udp.h>
-#include <netinet/ip_icmp.h>
-#include "netinet/ip_compat.h"
-#include <netinet/tcpip.h>
-#include "netinet/ip_fil.h"
-#include "netinet/ip_proxy.h"
-#include "netinet/ip_nat.h"
-#include "netinet/ip_frag.h"
-#include "netinet/ip_state.h"
-#include "netinet/ip_auth.h"
-#if (__FreeBSD_version >= 300000)
-# include <sys/malloc.h>
-# if (defined(KERNEL) || defined(_KERNEL))
-# ifndef IPFILTER_LKM
-# include <sys/libkern.h>
-# include <sys/systm.h>
-# endif
-extern struct callout_handle ipfr_slowtimer_ch;
-# endif
-#endif
-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104230000)
-# include <sys/callout.h>
-extern struct callout ipfr_slowtimer_ch;
-#endif
-
-
-static ipfr_t *ipfr_heads[IPFT_SIZE];
-static ipfr_t *ipfr_nattab[IPFT_SIZE];
-static ipfrstat_t ipfr_stats;
-static int ipfr_inuse = 0;
-
-int fr_ipfrttl = 120; /* 60 seconds */
-int fr_frag_lock = 0;
-
-#ifdef _KERNEL
-# if SOLARIS2 >= 7
-extern timeout_id_t ipfr_timer_id;
-# else
-extern int ipfr_timer_id;
-# endif
-#endif
-#if (SOLARIS || defined(__sgi)) && defined(_KERNEL)
-extern KRWLOCK_T ipf_frag, ipf_natfrag, ipf_nat, ipf_mutex;
-# if SOLARIS
-extern KRWLOCK_T ipf_solaris;
-# else
-KRWLOCK_T ipf_solaris;
-# endif
-extern kmutex_t ipf_rw;
-#endif
-
-
-static ipfr_t *ipfr_new __P((ip_t *, fr_info_t *, u_int, ipfr_t **));
-static ipfr_t *ipfr_lookup __P((ip_t *, fr_info_t *, ipfr_t **));
-static void ipfr_delete __P((ipfr_t *));
-
-
-ipfrstat_t *ipfr_fragstats()
-{
- ipfr_stats.ifs_table = ipfr_heads;
- ipfr_stats.ifs_nattab = ipfr_nattab;
- ipfr_stats.ifs_inuse = ipfr_inuse;
- return &ipfr_stats;
-}
-
-
-/*
- * add a new entry to the fragment cache, registering it as having come
- * through this box, with the result of the filter operation.
- */
-static ipfr_t *ipfr_new(ip, fin, pass, table)
-ip_t *ip;
-fr_info_t *fin;
-u_int pass;
-ipfr_t *table[];
-{
- ipfr_t **fp, *fra, frag;
- u_int idx, off;
-
- if (ipfr_inuse >= IPFT_SIZE)
- return NULL;
-
- if (!(fin->fin_fi.fi_fl & FI_FRAG))
- return NULL;
-
- frag.ipfr_p = ip->ip_p;
- idx = ip->ip_p;
- frag.ipfr_id = ip->ip_id;
- idx += ip->ip_id;
- frag.ipfr_tos = ip->ip_tos;
- frag.ipfr_src.s_addr = ip->ip_src.s_addr;
- idx += ip->ip_src.s_addr;
- frag.ipfr_dst.s_addr = ip->ip_dst.s_addr;
- idx += ip->ip_dst.s_addr;
- frag.ipfr_ifp = fin->fin_ifp;
- idx *= 127;
- idx %= IPFT_SIZE;
-
- /*
- * first, make sure it isn't already there...
- */
- for (fp = &table[idx]; (fra = *fp); fp = &fra->ipfr_next)
- if (!bcmp((char *)&frag.ipfr_src, (char *)&fra->ipfr_src,
- IPFR_CMPSZ)) {
- ATOMIC_INCL(ipfr_stats.ifs_exists);
- return NULL;
- }
-
- /*
- * allocate some memory, if possible, if not, just record that we
- * failed to do so.
- */
- KMALLOC(fra, ipfr_t *);
- if (fra == NULL) {
- ATOMIC_INCL(ipfr_stats.ifs_nomem);
- return NULL;
- }
-
- if ((fra->ipfr_rule = fin->fin_fr) != NULL) {
- ATOMIC_INC32(fin->fin_fr->fr_ref);
- }
-
-
- /*
- * Instert the fragment into the fragment table, copy the struct used
- * in the search using bcopy rather than reassign each field.
- * Set the ttl to the default and mask out logging from "pass"
- */
- if ((fra->ipfr_next = table[idx]))
- table[idx]->ipfr_prev = fra;
- fra->ipfr_prev = NULL;
- fra->ipfr_data = NULL;
- table[idx] = fra;
- bcopy((char *)&frag.ipfr_src, (char *)&fra->ipfr_src, IPFR_CMPSZ);
- fra->ipfr_ttl = fr_ipfrttl;
- /*
- * Compute the offset of the expected start of the next packet.
- */
- off = ip->ip_off & IP_OFFMASK;
- if (!off)
- fra->ipfr_seen0 = 1;
- fra->ipfr_off = off + (fin->fin_dlen >> 3);
- ATOMIC_INCL(ipfr_stats.ifs_new);
- ATOMIC_INC32(ipfr_inuse);
- return fra;
-}
-
-
-int ipfr_newfrag(ip, fin, pass)
-ip_t *ip;
-fr_info_t *fin;
-u_int pass;
-{
- ipfr_t *ipf;
-
- if ((ip->ip_v != 4) || (fr_frag_lock))
- return -1;
- WRITE_ENTER(&ipf_frag);
- ipf = ipfr_new(ip, fin, pass, ipfr_heads);
- RWLOCK_EXIT(&ipf_frag);
- return ipf ? 0 : -1;
-}
-
-
-int ipfr_nat_newfrag(ip, fin, pass, nat)
-ip_t *ip;
-fr_info_t *fin;
-u_int pass;
-nat_t *nat;
-{
- ipfr_t *ipf;
-
- if ((ip->ip_v != 4) || (fr_frag_lock))
- return -1;
- WRITE_ENTER(&ipf_natfrag);
- ipf = ipfr_new(ip, fin, pass, ipfr_nattab);
- if (ipf != NULL) {
- ipf->ipfr_data = nat;
- nat->nat_data = ipf;
- }
- RWLOCK_EXIT(&ipf_natfrag);
- return ipf ? 0 : -1;
-}
-
-
-/*
- * check the fragment cache to see if there is already a record of this packet
- * with its filter result known.
- */
-static ipfr_t *ipfr_lookup(ip, fin, table)
-ip_t *ip;
-fr_info_t *fin;
-ipfr_t *table[];
-{
- ipfr_t *f, frag;
- u_int idx;
-
- if (!(fin->fin_fi.fi_fl & FI_FRAG))
- return NULL;
-
- /*
- * For fragments, we record protocol, packet id, TOS and both IP#'s
- * (these should all be the same for all fragments of a packet).
- *
- * build up a hash value to index the table with.
- */
- frag.ipfr_p = ip->ip_p;
- idx = ip->ip_p;
- frag.ipfr_id = ip->ip_id;
- idx += ip->ip_id;
- frag.ipfr_tos = ip->ip_tos;
- frag.ipfr_src.s_addr = ip->ip_src.s_addr;
- idx += ip->ip_src.s_addr;
- frag.ipfr_dst.s_addr = ip->ip_dst.s_addr;
- idx += ip->ip_dst.s_addr;
- frag.ipfr_ifp = fin->fin_ifp;
- idx *= 127;
- idx %= IPFT_SIZE;
-
- /*
- * check the table, careful to only compare the right amount of data
- */
- for (f = table[idx]; f; f = f->ipfr_next)
- if (!bcmp((char *)&frag.ipfr_src, (char *)&f->ipfr_src,
- IPFR_CMPSZ)) {
- u_short atoff, off;
-
- /*
- * XXX - We really need to be guarding against the
- * retransmission of (src,dst,id,offset-range) here
- * because a fragmented packet is never resent with
- * the same IP ID#.
- */
- off = ip->ip_off & IP_OFFMASK;
- if (f->ipfr_seen0) {
- if (!off || (fin->fin_fi.fi_fl & FI_SHORT))
- continue;
- } else if (!off)
- f->ipfr_seen0 = 1;
-
- if (f != table[idx]) {
- /*
- * move fragment info. to the top of the list
- * to speed up searches.
- */
- if ((f->ipfr_prev->ipfr_next = f->ipfr_next))
- f->ipfr_next->ipfr_prev = f->ipfr_prev;
- f->ipfr_next = table[idx];
- table[idx]->ipfr_prev = f;
- f->ipfr_prev = NULL;
- table[idx] = f;
- }
- atoff = off + (fin->fin_dlen >> 3);
- /*
- * If we've follwed the fragments, and this is the
- * last (in order), shrink expiration time.
- */
- if (off == f->ipfr_off) {
- if (!(ip->ip_off & IP_MF))
- f->ipfr_ttl = 1;
- else
- f->ipfr_off = atoff;
- }
- ATOMIC_INCL(ipfr_stats.ifs_hits);
- return f;
- }
- return NULL;
-}
-
-
-/*
- * functional interface for NAT lookups of the NAT fragment cache
- */
-nat_t *ipfr_nat_knownfrag(ip, fin)
-ip_t *ip;
-fr_info_t *fin;
-{
- nat_t *nat;
- ipfr_t *ipf;
-
- if ((ip->ip_v != 4) || (fr_frag_lock))
- return NULL;
- READ_ENTER(&ipf_natfrag);
- ipf = ipfr_lookup(ip, fin, ipfr_nattab);
- if (ipf != NULL) {
- nat = ipf->ipfr_data;
- /*
- * This is the last fragment for this packet.
- */
- if ((ipf->ipfr_ttl == 1) && (nat != NULL)) {
- nat->nat_data = NULL;
- ipf->ipfr_data = NULL;
- }
- } else
- nat = NULL;
- RWLOCK_EXIT(&ipf_natfrag);
- return nat;
-}
-
-
-/*
- * functional interface for normal lookups of the fragment cache
- */
-frentry_t *ipfr_knownfrag(ip, fin)
-ip_t *ip;
-fr_info_t *fin;
-{
- frentry_t *fr = NULL;
- ipfr_t *fra;
-
- if ((ip->ip_v != 4) || (fr_frag_lock))
- return NULL;
- READ_ENTER(&ipf_frag);
- fra = ipfr_lookup(ip, fin, ipfr_heads);
- if (fra != NULL)
- fr = fra->ipfr_rule;
- RWLOCK_EXIT(&ipf_frag);
- return fr;
-}
-
-
-/*
- * forget any references to this external object.
- */
-void ipfr_forget(nat)
-void *nat;
-{
- ipfr_t *fr;
- int idx;
-
- WRITE_ENTER(&ipf_natfrag);
- for (idx = IPFT_SIZE - 1; idx >= 0; idx--)
- for (fr = ipfr_heads[idx]; fr; fr = fr->ipfr_next)
- if (fr->ipfr_data == nat)
- fr->ipfr_data = NULL;
-
- RWLOCK_EXIT(&ipf_natfrag);
-}
-
-
-static void ipfr_delete(fra)
-ipfr_t *fra;
-{
- frentry_t *fr;
-
- fr = fra->ipfr_rule;
- if (fr != NULL) {
- ATOMIC_DEC32(fr->fr_ref);
- if (fr->fr_ref == 0)
- KFREE(fr);
- }
- if (fra->ipfr_prev)
- fra->ipfr_prev->ipfr_next = fra->ipfr_next;
- if (fra->ipfr_next)
- fra->ipfr_next->ipfr_prev = fra->ipfr_prev;
- KFREE(fra);
-}
-
-
-/*
- * Free memory in use by fragment state info. kept.
- */
-void ipfr_unload()
-{
- ipfr_t **fp, *fra;
- nat_t *nat;
- int idx;
-
- WRITE_ENTER(&ipf_frag);
- for (idx = IPFT_SIZE - 1; idx >= 0; idx--)
- for (fp = &ipfr_heads[idx]; (fra = *fp); ) {
- *fp = fra->ipfr_next;
- ipfr_delete(fra);
- }
- RWLOCK_EXIT(&ipf_frag);
-
- WRITE_ENTER(&ipf_nat);
- WRITE_ENTER(&ipf_natfrag);
- for (idx = IPFT_SIZE - 1; idx >= 0; idx--)
- for (fp = &ipfr_nattab[idx]; (fra = *fp); ) {
- *fp = fra->ipfr_next;
- nat = fra->ipfr_data;
- if (nat != NULL) {
- if (nat->nat_data == fra)
- nat->nat_data = NULL;
- }
- ipfr_delete(fra);
- }
- RWLOCK_EXIT(&ipf_natfrag);
- RWLOCK_EXIT(&ipf_nat);
-}
-
-
-#ifdef _KERNEL
-void ipfr_fragexpire()
-{
- ipfr_t **fp, *fra;
- nat_t *nat;
- int idx;
-#if defined(_KERNEL)
-# if !SOLARIS
- int s;
-# endif
-#endif
-
- if (fr_frag_lock)
- return;
-
- SPL_NET(s);
- WRITE_ENTER(&ipf_frag);
-
- /*
- * Go through the entire table, looking for entries to expire,
- * decreasing the ttl by one for each entry. If it reaches 0,
- * remove it from the chain and free it.
- */
- for (idx = IPFT_SIZE - 1; idx >= 0; idx--)
- for (fp = &ipfr_heads[idx]; (fra = *fp); ) {
- --fra->ipfr_ttl;
- if (fra->ipfr_ttl == 0) {
- *fp = fra->ipfr_next;
- ipfr_delete(fra);
- ATOMIC_INCL(ipfr_stats.ifs_expire);
- ATOMIC_DEC32(ipfr_inuse);
- } else
- fp = &fra->ipfr_next;
- }
- RWLOCK_EXIT(&ipf_frag);
-
- /*
- * Same again for the NAT table, except that if the structure also
- * still points to a NAT structure, and the NAT structure points back
- * at the one to be free'd, NULL the reference from the NAT struct.
- * NOTE: We need to grab both mutex's early, and in this order so as
- * to prevent a deadlock if both try to expire at the same time.
- */
- WRITE_ENTER(&ipf_nat);
- WRITE_ENTER(&ipf_natfrag);
- for (idx = IPFT_SIZE - 1; idx >= 0; idx--)
- for (fp = &ipfr_nattab[idx]; (fra = *fp); ) {
- --fra->ipfr_ttl;
- if (fra->ipfr_ttl == 0) {
- ATOMIC_INCL(ipfr_stats.ifs_expire);
- ATOMIC_DEC32(ipfr_inuse);
- nat = fra->ipfr_data;
- if (nat != NULL) {
- if (nat->nat_data == fra)
- nat->nat_data = NULL;
- }
- *fp = fra->ipfr_next;
- ipfr_delete(fra);
- } else
- fp = &fra->ipfr_next;
- }
- RWLOCK_EXIT(&ipf_natfrag);
- RWLOCK_EXIT(&ipf_nat);
- SPL_X(s);
-}
-
-
-/*
- * Slowly expire held state for fragments. Timeouts are set * in expectation
- * of this being called twice per second.
- */
-# if (BSD >= 199306) || SOLARIS || defined(__sgi)
-# if defined(SOLARIS2) && (SOLARIS2 < 7)
-void ipfr_slowtimer()
-# else
-void ipfr_slowtimer __P((void *ptr))
-# endif
-# else
-int ipfr_slowtimer()
-# endif
-{
-#if defined(_KERNEL) && SOLARIS
- extern int fr_running;
-
- if (fr_running <= 0)
- return;
-#endif
-
- READ_ENTER(&ipf_solaris);
-#ifdef __sgi
- ipfilter_sgi_intfsync();
-#endif
-
- ipfr_fragexpire();
- fr_timeoutstate();
- ip_natexpire();
- fr_authexpire();
-# if SOLARIS
- ipfr_timer_id = timeout(ipfr_slowtimer, NULL, drv_usectohz(500000));
- RWLOCK_EXIT(&ipf_solaris);
-# else
-# if defined(__NetBSD__) && (__NetBSD_Version__ >= 104240000)
- callout_reset(&ipfr_slowtimer_ch, hz / 2, ipfr_slowtimer, NULL);
-# else
-# if (__FreeBSD_version >= 300000)
- ipfr_slowtimer_ch = timeout(ipfr_slowtimer, NULL, hz/2);
-# else
- timeout(ipfr_slowtimer, NULL, hz/2);
-# endif
-# if (BSD < 199306) && !defined(__sgi)
- return 0;
-# endif /* FreeBSD */
-# endif /* NetBSD */
-# endif /* SOLARIS */
-}
-#endif /* defined(_KERNEL) */
diff --git a/sys/contrib/ipfilter/netinet/ip_frag.h b/sys/contrib/ipfilter/netinet/ip_frag.h
deleted file mode 100644
index 2d0b9bec3df0..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_frag.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 1993-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * @(#)ip_frag.h 1.5 3/24/96
- * $Id: ip_frag.h,v 2.4.2.2 2000/11/10 13:10:54 darrenr Exp $
- * $FreeBSD$
- */
-
-#ifndef __IP_FRAG_H__
-#define __IP_FRAG_H__
-
-#define IPFT_SIZE 257
-
-typedef struct ipfr {
- struct ipfr *ipfr_next, *ipfr_prev;
- void *ipfr_data;
- struct in_addr ipfr_src;
- struct in_addr ipfr_dst;
- void *ipfr_ifp;
- u_short ipfr_id;
- u_char ipfr_p;
- u_char ipfr_tos;
- u_short ipfr_off;
- u_char ipfr_ttl;
- u_char ipfr_seen0;
- frentry_t *ipfr_rule;
-} ipfr_t;
-
-
-typedef struct ipfrstat {
- u_long ifs_exists; /* add & already exists */
- u_long ifs_nomem;
- u_long ifs_new;
- u_long ifs_hits;
- u_long ifs_expire;
- u_long ifs_inuse;
- struct ipfr **ifs_table;
- struct ipfr **ifs_nattab;
-} ipfrstat_t;
-
-#define IPFR_CMPSZ (offsetof(ipfr_t, ipfr_off) - \
- offsetof(ipfr_t, ipfr_src))
-
-extern int fr_ipfrttl;
-extern int fr_frag_lock;
-extern ipfrstat_t *ipfr_fragstats __P((void));
-extern int ipfr_newfrag __P((ip_t *, fr_info_t *, u_int));
-extern int ipfr_nat_newfrag __P((ip_t *, fr_info_t *, u_int, struct nat *));
-extern nat_t *ipfr_nat_knownfrag __P((ip_t *, fr_info_t *));
-extern frentry_t *ipfr_knownfrag __P((ip_t *, fr_info_t *));
-extern void ipfr_forget __P((void *));
-extern void ipfr_unload __P((void));
-extern void ipfr_fragexpire __P((void));
-
-#if (BSD >= 199306) || SOLARIS || defined(__sgi)
-# if defined(SOLARIS2) && (SOLARIS2 < 7)
-extern void ipfr_slowtimer __P((void));
-# else
-extern void ipfr_slowtimer __P((void *));
-# endif
-#else
-extern int ipfr_slowtimer __P((void));
-#endif /* (BSD >= 199306) || SOLARIS */
-
-#endif /* __IP_FIL_H__ */
diff --git a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c b/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
deleted file mode 100644
index 6e4fe5342dfa..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
+++ /dev/null
@@ -1,786 +0,0 @@
-/*
- * Simple FTP transparent proxy for in-kernel use. For use with the NAT
- * code.
- *
- * $FreeBSD$
- */
-#if SOLARIS && defined(_KERNEL)
-extern kmutex_t ipf_rw;
-#endif
-
-#define isdigit(x) ((x) >= '0' && (x) <= '9')
-#define isupper(x) (((unsigned)(x) >= 'A') && ((unsigned)(x) <= 'Z'))
-#define islower(x) (((unsigned)(x) >= 'a') && ((unsigned)(x) <= 'z'))
-#define isalpha(x) (isupper(x) || islower(x))
-#define toupper(x) (isupper(x) ? (x) : (x) - 'a' + 'A')
-
-#define IPF_FTP_PROXY
-
-#define IPF_MINPORTLEN 18
-#define IPF_MAXPORTLEN 30
-#define IPF_MIN227LEN 39
-#define IPF_MAX227LEN 51
-#define IPF_FTPBUFSZ 96 /* This *MUST* be >= 53! */
-
-
-int ippr_ftp_client __P((fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int));
-int ippr_ftp_complete __P((char *, size_t));
-int ippr_ftp_in __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *));
-int ippr_ftp_init __P((void));
-int ippr_ftp_new __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *));
-int ippr_ftp_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *));
-int ippr_ftp_pasv __P((fr_info_t *, ip_t *, nat_t *, ftpside_t *, int));
-int ippr_ftp_port __P((fr_info_t *, ip_t *, nat_t *, ftpside_t *, int));
-int ippr_ftp_process __P((fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int));
-int ippr_ftp_server __P((fr_info_t *, ip_t *, nat_t *, ftpinfo_t *, int));
-int ippr_ftp_valid __P((char *, size_t));
-u_short ippr_ftp_atoi __P((char **));
-
-static frentry_t natfr;
-int ippr_ftp_pasvonly = 0;
-int ippr_ftp_insecure = 0;
-
-
-/*
- * Initialize local structures.
- */
-int ippr_ftp_init()
-{
- bzero((char *)&natfr, sizeof(natfr));
- natfr.fr_ref = 1;
- natfr.fr_flags = FR_INQUE|FR_PASS|FR_QUICK|FR_KEEPSTATE;
- return 0;
-}
-
-
-int ippr_ftp_new(fin, ip, aps, nat)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-nat_t *nat;
-{
- ftpinfo_t *ftp;
- ftpside_t *f;
-
- KMALLOC(ftp, ftpinfo_t *);
- if (ftp == NULL)
- return -1;
- aps->aps_data = ftp;
- aps->aps_psiz = sizeof(ftpinfo_t);
-
- bzero((char *)ftp, sizeof(*ftp));
- f = &ftp->ftp_side[0];
- f->ftps_rptr = f->ftps_buf;
- f->ftps_wptr = f->ftps_buf;
- f = &ftp->ftp_side[1];
- f->ftps_rptr = f->ftps_buf;
- f->ftps_wptr = f->ftps_buf;
- return 0;
-}
-
-
-int ippr_ftp_port(fin, ip, nat, f, dlen)
-fr_info_t *fin;
-ip_t *ip;
-nat_t *nat;
-ftpside_t *f;
-int dlen;
-{
- tcphdr_t *tcp, tcph, *tcp2 = &tcph;
- char newbuf[IPF_FTPBUFSZ], *s;
- u_short a5, a6, sp, dp;
- u_int a1, a2, a3, a4;
- struct in_addr swip;
- size_t nlen, olen;
- fr_info_t fi;
- int inc, off;
- nat_t *ipn;
- mb_t *m;
-#if SOLARIS
- mb_t *m1;
-#endif
-
- tcp = (tcphdr_t *)fin->fin_dp;
- /*
- * Check for client sending out PORT message.
- */
- if (dlen < IPF_MINPORTLEN)
- return 0;
- off = fin->fin_hlen + (tcp->th_off << 2);
- /*
- * Skip the PORT command + space
- */
- s = f->ftps_rptr + 5;
- /*
- * Pick out the address components, two at a time.
- */
- a1 = ippr_ftp_atoi(&s);
- if (!s)
- return 0;
- a2 = ippr_ftp_atoi(&s);
- if (!s)
- return 0;
- /*
- * check that IP address in the PORT/PASV reply is the same as the
- * sender of the command - prevents using PORT for port scanning.
- */
- a1 <<= 16;
- a1 |= a2;
- if (a1 != ntohl(nat->nat_inip.s_addr))
- return 0;
-
- a5 = ippr_ftp_atoi(&s);
- if (!s)
- return 0;
- if (*s == ')')
- s++;
-
- /*
- * check for CR-LF at the end.
- */
- if (*s == '\n')
- s--;
- if ((*s == '\r') && (*(s + 1) == '\n')) {
- s += 2;
- a6 = a5 & 0xff;
- } else
- return 0;
- a5 >>= 8;
- a5 &= 0xff;
- /*
- * Calculate new address parts for PORT command
- */
- a1 = ntohl(ip->ip_src.s_addr);
- a2 = (a1 >> 16) & 0xff;
- a3 = (a1 >> 8) & 0xff;
- a4 = a1 & 0xff;
- a1 >>= 24;
- olen = s - f->ftps_rptr;
- /* DO NOT change this to sprintf! */
- (void) sprintf(newbuf, "%s %u,%u,%u,%u,%u,%u\r\n",
- "PORT", a1, a2, a3, a4, a5, a6);
-
- nlen = strlen(newbuf);
- inc = nlen - olen;
- if ((inc + ip->ip_len) > 65535)
- return 0;
-
-#if SOLARIS
- m = fin->fin_qfm;
- for (m1 = m; m1->b_cont; m1 = m1->b_cont)
- ;
- if ((inc > 0) && (m1->b_datap->db_lim - m1->b_wptr < inc)) {
- mblk_t *nm;
-
- /* alloc enough to keep same trailer space for lower driver */
- nm = allocb(nlen, BPRI_MED);
- PANIC((!nm),("ippr_ftp_out: allocb failed"));
-
- nm->b_band = m1->b_band;
- nm->b_wptr += nlen;
-
- m1->b_wptr -= olen;
- PANIC((m1->b_wptr < m1->b_rptr),
- ("ippr_ftp_out: cannot handle fragmented data block"));
-
- linkb(m1, nm);
- } else {
- if (m1->b_datap->db_struiolim == m1->b_wptr)
- m1->b_datap->db_struiolim += inc;
- m1->b_datap->db_struioflag &= ~STRUIO_IP;
- m1->b_wptr += inc;
- }
- copyin_mblk(m, off, nlen, newbuf);
-#else
- m = *((mb_t **)fin->fin_mp);
- if (inc < 0)
- m_adj(m, inc);
- /* the mbuf chain will be extended if necessary by m_copyback() */
- m_copyback(m, off, nlen, newbuf);
-# ifdef M_PKTHDR
- if (!(m->m_flags & M_PKTHDR))
- m->m_pkthdr.len += inc;
-# endif
-#endif
- if (inc != 0) {
-#if SOLARIS || defined(__sgi)
- register u_32_t sum1, sum2;
-
- sum1 = ip->ip_len;
- sum2 = ip->ip_len + inc;
-
- /* Because ~1 == -2, We really need ~1 == -1 */
- if (sum1 > sum2)
- sum2--;
- sum2 -= sum1;
- sum2 = (sum2 & 0xffff) + (sum2 >> 16);
-
- fix_outcksum(&ip->ip_sum, sum2);
-#endif
- ip->ip_len += inc;
- }
-
- /*
- * Add skeleton NAT entry for connection which will come back the
- * other way.
- */
- sp = htons(a5 << 8 | a6);
- /*
- * Don't allow the PORT command to specify a port < 1024 due to
- * security crap.
- */
- if (ntohs(sp) < 1024)
- return 0;
- /*
- * The server may not make the connection back from port 20, but
- * it is the most likely so use it here to check for a conflicting
- * mapping.
- */
- dp = htons(fin->fin_data[1] - 1);
- ipn = nat_outlookup(fin->fin_ifp, IPN_TCP, nat->nat_p, nat->nat_inip,
- ip->ip_dst, (dp << 16) | sp, 0);
- if (ipn == NULL) {
- int slen;
-
- slen = ip->ip_len;
- ip->ip_len = fin->fin_hlen + sizeof(*tcp2);
- bcopy((char *)fin, (char *)&fi, sizeof(fi));
- bzero((char *)tcp2, sizeof(*tcp2));
- tcp2->th_win = htons(8192);
- tcp2->th_sport = sp;
- tcp2->th_off = 5;
- tcp2->th_dport = 0; /* XXX - don't specify remote port */
- fi.fin_data[0] = ntohs(sp);
- fi.fin_data[1] = 0;
- fi.fin_dlen = sizeof(*tcp2);
- fi.fin_dp = (char *)tcp2;
- fi.fin_fr = &natfr;
- swip = ip->ip_src;
- fi.fin_fi.fi_saddr = nat->nat_inip.s_addr;
- ip->ip_src = nat->nat_inip;
- ipn = nat_new(nat->nat_ptr, ip, &fi, IPN_TCP|FI_W_DPORT,
- NAT_OUTBOUND);
- if (ipn != NULL) {
- ipn->nat_age = fr_defnatage;
- (void) fr_addstate(ip, &fi, FI_W_DPORT);
- }
- ip->ip_len = slen;
- ip->ip_src = swip;
- }
- return APR_INC(inc);
-}
-
-
-int ippr_ftp_client(fin, ip, nat, ftp, dlen)
-fr_info_t *fin;
-nat_t *nat;
-ftpinfo_t *ftp;
-ip_t *ip;
-int dlen;
-{
- char *rptr, *wptr, cmd[6], c;
- ftpside_t *f;
- int inc, i;
-
- inc = 0;
- f = &ftp->ftp_side[0];
- rptr = f->ftps_rptr;
- wptr = f->ftps_wptr;
-
- for (i = 0; (i < 5) && (i < dlen); i++) {
- c = rptr[i];
- if (isalpha(c)) {
- cmd[i] = toupper(c);
- } else {
- cmd[i] = c;
- }
- }
- cmd[i] = '\0';
-
- if ((ftp->ftp_passok == 0) && !strncmp(cmd, "USER ", 5))
- ftp->ftp_passok = 1;
- else if ((ftp->ftp_passok == 2) && !strncmp(cmd, "PASS ", 5))
- ftp->ftp_passok = 3;
- else if ((ftp->ftp_passok == 4) && !ippr_ftp_pasvonly &&
- !strncmp(cmd, "PORT ", 5)) {
- inc = ippr_ftp_port(fin, ip, nat, f, dlen);
- } else if (ippr_ftp_insecure && !ippr_ftp_pasvonly &&
- !strncmp(cmd, "PORT ", 5)) {
- inc = ippr_ftp_port(fin, ip, nat, f, dlen);
- }
-
- while ((*rptr++ != '\n') && (rptr < wptr))
- ;
- f->ftps_rptr = rptr;
- return inc;
-}
-
-
-int ippr_ftp_pasv(fin, ip, nat, f, dlen)
-fr_info_t *fin;
-ip_t *ip;
-nat_t *nat;
-ftpside_t *f;
-int dlen;
-{
- tcphdr_t *tcp, tcph, *tcp2 = &tcph;
- struct in_addr swip, swip2;
- u_short a5, a6, sp, dp;
- u_int a1, a2, a3, a4;
- fr_info_t fi;
- nat_t *ipn;
- int inc;
- char *s;
-
- /*
- * Check for PASV reply message.
- */
- if (dlen < IPF_MIN227LEN)
- return 0;
- else if (strncmp(f->ftps_rptr, "227 Entering Passive Mode", 25))
- return 0;
-
- tcp = (tcphdr_t *)fin->fin_dp;
-
- /*
- * Skip the PORT command + space
- */
- s = f->ftps_rptr + 25;
- while (*s && !isdigit(*s))
- s++;
- /*
- * Pick out the address components, two at a time.
- */
- a1 = ippr_ftp_atoi(&s);
- if (!s)
- return 0;
- a2 = ippr_ftp_atoi(&s);
- if (!s)
- return 0;
-
- /*
- * check that IP address in the PORT/PASV reply is the same as the
- * sender of the command - prevents using PORT for port scanning.
- */
- a1 <<= 16;
- a1 |= a2;
- if (a1 != ntohl(nat->nat_oip.s_addr))
- return 0;
-
- a5 = ippr_ftp_atoi(&s);
- if (!s)
- return 0;
-
- if (*s == ')')
- s++;
- if (*s == '\n')
- s--;
- /*
- * check for CR-LF at the end.
- */
- if ((*s == '\r') && (*(s + 1) == '\n')) {
- s += 2;
- a6 = a5 & 0xff;
- } else
- return 0;
- a5 >>= 8;
- /*
- * Calculate new address parts for 227 reply
- */
- a1 = ntohl(ip->ip_src.s_addr);
- a2 = (a1 >> 16) & 0xff;
- a3 = (a1 >> 8) & 0xff;
- a4 = a1 & 0xff;
- a1 >>= 24;
- inc = 0;
-#if 0
- olen = s - f->ftps_rptr;
- (void) sprintf(newbuf, "%s %u,%u,%u,%u,%u,%u\r\n",
- "227 Entering Passive Mode", a1, a2, a3, a4, a5, a6);
- nlen = strlen(newbuf);
- inc = nlen - olen;
- if ((inc + ip->ip_len) > 65535)
- return 0;
-
-#if SOLARIS
- m = fin->fin_qfm;
- for (m1 = m; m1->b_cont; m1 = m1->b_cont)
- ;
- if ((inc > 0) && (m1->b_datap->db_lim - m1->b_wptr < inc)) {
- mblk_t *nm;
-
- /* alloc enough to keep same trailer space for lower driver */
- nm = allocb(nlen, BPRI_MED);
- PANIC((!nm),("ippr_ftp_out: allocb failed"));
-
- nm->b_band = m1->b_band;
- nm->b_wptr += nlen;
-
- m1->b_wptr -= olen;
- PANIC((m1->b_wptr < m1->b_rptr),
- ("ippr_ftp_out: cannot handle fragmented data block"));
-
- linkb(m1, nm);
- } else {
- m1->b_wptr += inc;
- }
- /*copyin_mblk(m, off, nlen, newbuf);*/
-#else /* SOLARIS */
- m = *((mb_t **)fin->fin_mp);
- if (inc < 0)
- m_adj(m, inc);
- /* the mbuf chain will be extended if necessary by m_copyback() */
- /*m_copyback(m, off, nlen, newbuf);*/
-#endif /* SOLARIS */
- if (inc != 0) {
-#if SOLARIS || defined(__sgi)
- register u_32_t sum1, sum2;
-
- sum1 = ip->ip_len;
- sum2 = ip->ip_len + inc;
-
- /* Because ~1 == -2, We really need ~1 == -1 */
- if (sum1 > sum2)
- sum2--;
- sum2 -= sum1;
- sum2 = (sum2 & 0xffff) + (sum2 >> 16);
-
- fix_outcksum(&ip->ip_sum, sum2);
-#endif /* SOLARIS || defined(__sgi) */
- ip->ip_len += inc;
- }
-#endif /* 0 */
-
- /*
- * Add skeleton NAT entry for connection which will come back the
- * other way.
- */
- sp = 0;
- dp = htons(fin->fin_data[1] - 1);
- ipn = nat_outlookup(fin->fin_ifp, IPN_TCP, nat->nat_p, nat->nat_inip,
- ip->ip_dst, (dp << 16) | sp, 0);
- if (ipn == NULL) {
- int slen;
-
- slen = ip->ip_len;
- ip->ip_len = fin->fin_hlen + sizeof(*tcp2);
- bcopy((char *)fin, (char *)&fi, sizeof(fi));
- bzero((char *)tcp2, sizeof(*tcp2));
- tcp2->th_win = htons(8192);
- tcp2->th_sport = 0; /* XXX - fake it for nat_new */
- tcp2->th_off = 5;
- fi.fin_data[1] = a5 << 8 | a6;
- fi.fin_dlen = sizeof(*tcp2);
- tcp2->th_dport = htons(fi.fin_data[1]);
- fi.fin_data[0] = 0;
- fi.fin_dp = (char *)tcp2;
- fi.fin_fr = &natfr;
- swip = ip->ip_src;
- swip2 = ip->ip_dst;
- fi.fin_fi.fi_daddr = ip->ip_src.s_addr;
- fi.fin_fi.fi_saddr = nat->nat_inip.s_addr;
- ip->ip_dst = ip->ip_src;
- ip->ip_src = nat->nat_inip;
- ipn = nat_new(nat->nat_ptr, ip, &fi, IPN_TCP|FI_W_SPORT,
- NAT_OUTBOUND);
- if (ipn != NULL) {
- ipn->nat_age = fr_defnatage;
- (void) fr_addstate(ip, &fi, FI_W_SPORT);
- }
- ip->ip_len = slen;
- ip->ip_src = swip;
- ip->ip_dst = swip2;
- }
- return inc;
-}
-
-
-int ippr_ftp_server(fin, ip, nat, ftp, dlen)
-fr_info_t *fin;
-ip_t *ip;
-nat_t *nat;
-ftpinfo_t *ftp;
-int dlen;
-{
- char *rptr, *wptr;
- ftpside_t *f;
- int inc;
-
- inc = 0;
- f = &ftp->ftp_side[1];
- rptr = f->ftps_rptr;
- wptr = f->ftps_wptr;
-
- if ((ftp->ftp_passok == 1) && !strncmp(rptr, "331", 3))
- ftp->ftp_passok = 2;
- else if ((ftp->ftp_passok == 3) && !strncmp(rptr, "230", 3))
- ftp->ftp_passok = 4;
- else if ((ftp->ftp_passok == 3) && !strncmp(rptr, "530", 3))
- ftp->ftp_passok = 0;
- else if ((ftp->ftp_passok == 4) && !strncmp(rptr, "227 ", 4)) {
- inc = ippr_ftp_pasv(fin, ip, nat, f, dlen);
- } else if (ippr_ftp_insecure && !strncmp(rptr, "227 ", 4)) {
- inc = ippr_ftp_pasv(fin, ip, nat, f, dlen);
- }
- while ((*rptr++ != '\n') && (rptr < wptr))
- ;
- f->ftps_rptr = rptr;
- return inc;
-}
-
-
-/*
- * Look to see if the buffer starts with something which we recognise as
- * being the correct syntax for the FTP protocol.
- */
-int ippr_ftp_valid(buf, len)
-char *buf;
-size_t len;
-{
- register char *s, c;
- register size_t i = len;
-
- if (i < 5)
- return 2;
- s = buf;
- c = *s++;
- i--;
-
- if (isdigit(c)) {
- c = *s++;
- i--;
- if (isdigit(c)) {
- c = *s++;
- i--;
- if (isdigit(c)) {
- c = *s++;
- i--;
- if ((c != '-') && (c != ' '))
- return 1;
- } else
- return 1;
- } else
- return 1;
- } else if (isalpha(c)) {
- c = *s++;
- i--;
- if (isalpha(c)) {
- c = *s++;
- i--;
- if (isalpha(c)) {
- c = *s++;
- i--;
- if (isalpha(c)) {
- c = *s++;
- i--;
- if ((c != ' ') && (c != '\r'))
- return 1;
- } else if ((c != ' ') && (c != '\r'))
- return 1;
- } else
- return 1;
- } else
- return 1;
- } else
- return 1;
- for (; i; i--) {
- c = *s++;
- if (c == '\n')
- return 0;
- }
- return 2;
-}
-
-
-int ippr_ftp_process(fin, ip, nat, ftp, rv)
-fr_info_t *fin;
-ip_t *ip;
-nat_t *nat;
-ftpinfo_t *ftp;
-int rv;
-{
- int mlen, len, off, inc, i, sel;
- char *rptr, *wptr;
- ftpside_t *f, *t;
- tcphdr_t *tcp;
- mb_t *m;
-
- tcp = (tcphdr_t *)fin->fin_dp;
- off = fin->fin_hlen + (tcp->th_off << 2);
-
-#if SOLARIS
- m = fin->fin_qfm;
-#else
- m = *((mb_t **)fin->fin_mp);
-#endif
-
-#if SOLARIS
- mlen = msgdsize(m) - off;
-#else
- mlen = mbufchainlen(m) - off;
-#endif
-
- t = &ftp->ftp_side[1 - rv];
- f = &ftp->ftp_side[rv];
- if (!mlen) {
- if (!t->ftps_seq ||
- (int)ntohl(tcp->th_ack) - (int)t->ftps_seq > 0)
- t->ftps_seq = ntohl(tcp->th_ack);
- f->ftps_len = 0;
- return 0;
- }
-
- inc = 0;
- rptr = f->ftps_rptr;
- wptr = f->ftps_wptr;
-
- sel = nat->nat_aps->aps_sel[1 - rv];
- if (rv)
- i = nat->nat_aps->aps_ackoff[sel];
- else
- i = nat->nat_aps->aps_seqoff[sel];
- /*
- * XXX - Ideally, this packet should get dropped because we now know
- * that it is out of order (and there is no real danger in doing so
- * apart from causing packets to go through here ordered).
- */
- if (f->ftps_len + f->ftps_seq == ntohl(tcp->th_seq))
- f->ftps_seq = ntohl(tcp->th_seq);
- else if (ntohl(tcp->th_seq) + i != f->ftps_seq) {
- return APR_ERR(-1);
- }
- f->ftps_len = mlen;
-
- while (mlen > 0) {
- len = MIN(mlen, FTP_BUFSZ / 2);
-
-#if SOLARIS
- copyout_mblk(m, off, len, wptr);
-#else
- m_copydata(m, off, len, wptr);
-#endif
- mlen -= len;
- off += len;
- wptr += len;
- f->ftps_wptr = wptr;
- if (f->ftps_junk == 2)
- f->ftps_junk = ippr_ftp_valid(rptr, wptr - rptr);
-
- while ((f->ftps_junk == 0) && (wptr > rptr)) {
- f->ftps_junk = ippr_ftp_valid(rptr, wptr - rptr);
- if (f->ftps_junk == 0) {
- len = wptr - rptr;
- f->ftps_rptr = rptr;
- if (rv)
- inc += ippr_ftp_server(fin, ip, nat,
- ftp, len);
- else
- inc += ippr_ftp_client(fin, ip, nat,
- ftp, len);
- rptr = f->ftps_rptr;
- }
- }
-
- while ((f->ftps_junk == 1) && (rptr < wptr)) {
- while ((rptr < wptr) && (*rptr != '\r'))
- rptr++;
-
- if (*rptr == '\r') {
- if (rptr + 1 < wptr) {
- if (*(rptr + 1) == '\n') {
- rptr += 2;
- f->ftps_junk = 0;
- } else
- rptr++;
- } else
- break;
- }
- }
- f->ftps_rptr = rptr;
-
- if (rptr == wptr) {
- rptr = wptr = f->ftps_buf;
- } else {
- if ((wptr > f->ftps_buf + FTP_BUFSZ / 2)) {
- i = wptr - rptr;
- if ((rptr == f->ftps_buf) ||
- (wptr - rptr > FTP_BUFSZ / 2)) {
- f->ftps_junk = 1;
- rptr = wptr = f->ftps_buf;
- } else {
- bcopy(rptr, f->ftps_buf, i);
- wptr = f->ftps_buf + i;
- rptr = f->ftps_buf;
- }
- }
- f->ftps_rptr = rptr;
- f->ftps_wptr = wptr;
- }
- }
-
- t->ftps_seq = ntohl(tcp->th_ack);
- f->ftps_rptr = rptr;
- f->ftps_wptr = wptr;
- return APR_INC(inc);
-}
-
-
-int ippr_ftp_out(fin, ip, aps, nat)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-nat_t *nat;
-{
- ftpinfo_t *ftp;
-
- ftp = aps->aps_data;
- if (ftp == NULL)
- return 0;
- return ippr_ftp_process(fin, ip, nat, ftp, 0);
-}
-
-
-int ippr_ftp_in(fin, ip, aps, nat)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-nat_t *nat;
-{
- ftpinfo_t *ftp;
-
- ftp = aps->aps_data;
- if (ftp == NULL)
- return 0;
- return ippr_ftp_process(fin, ip, nat, ftp, 1);
-}
-
-
-/*
- * ippr_ftp_atoi - implement a version of atoi which processes numbers in
- * pairs separated by commas (which are expected to be in the range 0 - 255),
- * returning a 16 bit number combining either side of the , as the MSB and
- * LSB.
- */
-u_short ippr_ftp_atoi(ptr)
-char **ptr;
-{
- register char *s = *ptr, c;
- register u_char i = 0, j = 0;
-
- while ((c = *s++) && isdigit(c)) {
- i *= 10;
- i += c - '0';
- }
- if (c != ',') {
- *ptr = NULL;
- return 0;
- }
- while ((c = *s++) && isdigit(c)) {
- j *= 10;
- j += c - '0';
- }
- *ptr = s;
- i &= 0xff;
- j &= 0xff;
- return (i << 8) | j;
-}
diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c
deleted file mode 100644
index 082a0a3cf832..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_log.c
+++ /dev/null
@@ -1,507 +0,0 @@
-/*
- * Copyright (C) 1997-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * $Id: ip_log.c,v 2.5.2.1 2000/07/19 13:11:47 darrenr Exp $
- * $FreeBSD$
- */
-#include <sys/param.h>
-#if defined(KERNEL) && !defined(_KERNEL)
-# define _KERNEL
-#endif
-#if defined(__NetBSD__) && (NetBSD >= 199905) && !defined(IPFILTER_LKM)
-# include "opt_ipfilter_log.h"
-#endif
-#ifdef __FreeBSD__
-# if defined(IPFILTER_LKM) || defined(_KERNEL)
-# if !defined(__FreeBSD_version)
-# include <sys/osreldate.h>
-# endif
-# if !defined(IPFILTER_LKM)
-# if defined(__FreeBSD_version) && (__FreeBSD_version >= 300000)
-# include "opt_ipfilter.h"
-# endif
-# endif
-# else
-# ifdef KLD_MODULE
-# include <osreldate.h>
-# endif
-# endif
-#endif
-#ifdef IPFILTER_LOG
-# ifndef SOLARIS
-# define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
-# endif
-# ifndef _KERNEL
-# include <stdio.h>
-# include <string.h>
-# include <stdlib.h>
-# include <ctype.h>
-# endif
-# include <sys/errno.h>
-# include <sys/types.h>
-# include <sys/file.h>
-# if __FreeBSD_version >= 220000 && defined(_KERNEL)
-# include <sys/fcntl.h>
-# include <sys/filio.h>
-# else
-# include <sys/ioctl.h>
-# endif
-# include <sys/time.h>
-# if defined(_KERNEL) && !defined(linux)
-# include <sys/systm.h>
-# endif
-# include <sys/uio.h>
-# if !SOLARIS
-# if (NetBSD > 199609) || (OpenBSD > 199603) || (__FreeBSD_version >= 300000)
-# include <sys/dirent.h>
-# else
-# include <sys/dir.h>
-# endif
-# ifndef linux
-# include <sys/mbuf.h>
-# endif
-# else
-# include <sys/filio.h>
-# include <sys/cred.h>
-# include <sys/ddi.h>
-# include <sys/sunddi.h>
-# include <sys/ksynch.h>
-# include <sys/kmem.h>
-# include <sys/mkdev.h>
-# include <sys/dditypes.h>
-# include <sys/cmn_err.h>
-# endif
-# ifndef linux
-# include <sys/protosw.h>
-# endif
-# include <sys/socket.h>
-
-# include <net/if.h>
-# ifdef sun
-# include <net/af.h>
-# endif
-# if __FreeBSD_version >= 300000
-# include <net/if_var.h>
-# endif
-# include <net/route.h>
-# include <netinet/in.h>
-# ifdef __sgi
-# include <sys/ddi.h>
-# ifdef IFF_DRVRLOCK /* IRIX6 */
-# include <sys/hashing.h>
-# endif
-# endif
-# if !defined(linux) && !(defined(__sgi) && !defined(IFF_DRVRLOCK)) /*IRIX<6*/
-# include <netinet/in_var.h>
-# endif
-# include <netinet/in_systm.h>
-# include <netinet/ip.h>
-# include <netinet/tcp.h>
-# include <netinet/udp.h>
-# include <netinet/ip_icmp.h>
-# ifndef linux
-# include <netinet/ip_var.h>
-# endif
-# ifndef _KERNEL
-# include <syslog.h>
-# endif
-# include "netinet/ip_compat.h"
-# include <netinet/tcpip.h>
-# include "netinet/ip_fil.h"
-# include "netinet/ip_proxy.h"
-# include "netinet/ip_nat.h"
-# include "netinet/ip_frag.h"
-# include "netinet/ip_state.h"
-# include "netinet/ip_auth.h"
-# if (__FreeBSD_version >= 300000)
-# include <sys/malloc.h>
-# endif
-
-# ifndef MIN
-# define MIN(a,b) (((a)<(b))?(a):(b))
-# endif
-
-
-# if SOLARIS || defined(__sgi)
-extern kmutex_t ipl_mutex;
-# if SOLARIS
-extern kcondvar_t iplwait;
-# endif
-# endif
-
-iplog_t **iplh[IPL_LOGMAX+1], *iplt[IPL_LOGMAX+1], *ipll[IPL_LOGMAX+1];
-size_t iplused[IPL_LOGMAX+1];
-static fr_info_t iplcrc[IPL_LOGMAX+1];
-# ifdef linux
-static struct wait_queue *iplwait[IPL_LOGMAX+1];
-# endif
-
-
-/*
- * Initialise log buffers & pointers. Also iniialised the CRC to a local
- * secret for use in calculating the "last log checksum".
- */
-void ipflog_init()
-{
- int i;
-
- for (i = IPL_LOGMAX; i >= 0; i--) {
- iplt[i] = NULL;
- ipll[i] = NULL;
- iplh[i] = &iplt[i];
- iplused[i] = 0;
- bzero((char *)&iplcrc[i], sizeof(iplcrc[i]));
- }
-}
-
-
-/*
- * ipflog
- * Create a log record for a packet given that it has been triggered by a
- * rule (or the default setting). Calculate the transport protocol header
- * size using predetermined size of a couple of popular protocols and thus
- * how much data to copy into the log, including part of the data body if
- * requested.
- */
-int ipflog(flags, ip, fin, m)
-u_int flags;
-ip_t *ip;
-fr_info_t *fin;
-mb_t *m;
-{
- ipflog_t ipfl;
- register size_t mlen, hlen;
- size_t sizes[2];
- void *ptrs[2];
- int types[2];
- u_char p;
-# if SOLARIS
- ill_t *ifp = fin->fin_ifp;
-# else
- struct ifnet *ifp = fin->fin_ifp;
-# endif
-
- /*
- * calculate header size.
- */
- hlen = fin->fin_hlen;
- if (fin->fin_off == 0) {
- p = fin->fin_fi.fi_p;
- if (p == IPPROTO_TCP)
- hlen += MIN(sizeof(tcphdr_t), fin->fin_dlen);
- else if (p == IPPROTO_UDP)
- hlen += MIN(sizeof(udphdr_t), fin->fin_dlen);
- else if (p == IPPROTO_ICMP) {
- struct icmp *icmp;
-
- icmp = (struct icmp *)fin->fin_dp;
-
- /*
- * For ICMP, if the packet is an error packet, also
- * include the information about the packet which
- * caused the error.
- */
- switch (icmp->icmp_type)
- {
- case ICMP_UNREACH :
- case ICMP_SOURCEQUENCH :
- case ICMP_REDIRECT :
- case ICMP_TIMXCEED :
- case ICMP_PARAMPROB :
- hlen += MIN(sizeof(struct icmp) + 8,
- fin->fin_dlen);
- break;
- default :
- hlen += MIN(sizeof(struct icmp),
- fin->fin_dlen);
- break;
- }
- }
- }
- /*
- * Get the interface number and name to which this packet is
- * currently associated.
- */
-# if SOLARIS
- ipfl.fl_unit = (u_char)ifp->ill_ppa;
- bcopy(ifp->ill_name, ipfl.fl_ifname, MIN(ifp->ill_name_length, 4));
- mlen = (flags & FR_LOGBODY) ? MIN(msgdsize(m) - hlen, 128) : 0;
-# else
-# if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199603)) || \
- (defined(OpenBSD) && (OpenBSD >= 199603))
- strncpy(ipfl.fl_ifname, ifp->if_xname, IFNAMSIZ);
-# else
-# ifndef linux
- ipfl.fl_unit = (u_char)ifp->if_unit;
-# endif
- if ((ipfl.fl_ifname[0] = ifp->if_name[0]))
- if ((ipfl.fl_ifname[1] = ifp->if_name[1]))
- if ((ipfl.fl_ifname[2] = ifp->if_name[2]))
- ipfl.fl_ifname[3] = ifp->if_name[3];
-# endif
- mlen = (flags & FR_LOGBODY) ? MIN(fin->fin_plen - hlen, 128) : 0;
-# endif
- ipfl.fl_plen = (u_char)mlen;
- ipfl.fl_hlen = (u_char)hlen;
- ipfl.fl_rule = fin->fin_rule;
- ipfl.fl_group = fin->fin_group;
- if (fin->fin_fr != NULL)
- ipfl.fl_loglevel = fin->fin_fr->fr_loglevel;
- else
- ipfl.fl_loglevel = 0xffff;
- ipfl.fl_flags = flags;
- ptrs[0] = (void *)&ipfl;
- sizes[0] = sizeof(ipfl);
- types[0] = 0;
-# if SOLARIS
- /*
- * Are we copied from the mblk or an aligned array ?
- */
- if (ip == (ip_t *)m->b_rptr) {
- ptrs[1] = m;
- sizes[1] = hlen + mlen;
- types[1] = 1;
- } else {
- ptrs[1] = ip;
- sizes[1] = hlen + mlen;
- types[1] = 0;
- }
-# else
- ptrs[1] = m;
- sizes[1] = hlen + mlen;
- types[1] = 1;
-# endif
- return ipllog(IPL_LOGIPF, fin, ptrs, sizes, types, 2);
-}
-
-
-/*
- * ipllog
- */
-int ipllog(dev, fin, items, itemsz, types, cnt)
-int dev;
-fr_info_t *fin;
-void **items;
-size_t *itemsz;
-int *types, cnt;
-{
- caddr_t buf, s;
- iplog_t *ipl;
- size_t len;
- int i;
-
- /*
- * Check to see if this log record has a CRC which matches the last
- * record logged. If it does, just up the count on the previous one
- * rather than create a new one.
- */
- MUTEX_ENTER(&ipl_mutex);
- if (fin != NULL) {
- if ((ipll[dev] != NULL) &&
- bcmp((char *)fin, (char *)&iplcrc[dev], FI_CSIZE) == 0) {
- ipll[dev]->ipl_count++;
- MUTEX_EXIT(&ipl_mutex);
- return 1;
- }
- bcopy((char *)fin, (char *)&iplcrc[dev], FI_CSIZE);
- } else
- bzero((char *)&iplcrc[dev], FI_CSIZE);
- MUTEX_EXIT(&ipl_mutex);
-
- /*
- * Get the total amount of data to be logged.
- */
- for (i = 0, len = sizeof(iplog_t); i < cnt; i++)
- len += itemsz[i];
-
- /*
- * check that we have space to record this information and can
- * allocate that much.
- */
- KMALLOCS(buf, caddr_t, len);
- if (!buf)
- return 0;
- MUTEX_ENTER(&ipl_mutex);
- if ((iplused[dev] + len) > IPLLOGSIZE) {
- MUTEX_EXIT(&ipl_mutex);
- KFREES(buf, len);
- return 0;
- }
- iplused[dev] += len;
- MUTEX_EXIT(&ipl_mutex);
-
- /*
- * advance the log pointer to the next empty record and deduct the
- * amount of space we're going to use.
- */
- ipl = (iplog_t *)buf;
- ipl->ipl_magic = IPL_MAGIC;
- ipl->ipl_count = 1;
- ipl->ipl_next = NULL;
- ipl->ipl_dsize = len;
-# if SOLARIS || defined(sun) || defined(linux)
- uniqtime((struct timeval *)&ipl->ipl_sec);
-# else
-# if BSD >= 199306 || defined(__FreeBSD__) || defined(__sgi)
- microtime((struct timeval *)&ipl->ipl_sec);
-# endif
-# endif
-
- /*
- * Loop through all the items to be logged, copying each one to the
- * buffer. Use bcopy for normal data or the mb_t copyout routine.
- */
- for (i = 0, s = buf + sizeof(*ipl); i < cnt; i++) {
- if (types[i] == 0)
- bcopy(items[i], s, itemsz[i]);
- else if (types[i] == 1) {
-# if SOLARIS
- copyout_mblk(items[i], 0, itemsz[i], s);
-# else
- m_copydata(items[i], 0, itemsz[i], s);
-# endif
- }
- s += itemsz[i];
- }
- MUTEX_ENTER(&ipl_mutex);
- ipll[dev] = ipl;
- *iplh[dev] = ipl;
- iplh[dev] = &ipl->ipl_next;
-# if SOLARIS
- cv_signal(&iplwait);
- mutex_exit(&ipl_mutex);
-# else
- MUTEX_EXIT(&ipl_mutex);
-# ifdef linux
- wake_up_interruptible(&iplwait[dev]);
-# else
- wakeup(&iplh[dev]);
-# endif
-# endif
- return 1;
-}
-
-
-int ipflog_read(unit, uio)
-minor_t unit;
-struct uio *uio;
-{
- size_t dlen, copied;
- int error = 0;
- iplog_t *ipl;
-# if defined(_KERNEL) && !SOLARIS
- int s;
-# endif
-
- /*
- * Sanity checks. Make sure the minor # is valid and we're copying
- * a valid chunk of data.
- */
- if (IPL_LOGMAX < unit)
- return ENXIO;
- if (!uio->uio_resid)
- return 0;
- if ((uio->uio_resid < sizeof(iplog_t)) ||
- (uio->uio_resid > IPLLOGSIZE))
- return EINVAL;
-
- /*
- * Lock the log so we can snapshot the variables. Wait for a signal
- * if the log is empty.
- */
- SPL_NET(s);
- MUTEX_ENTER(&ipl_mutex);
-
- while (!iplused[unit] || !iplt[unit]) {
-# if SOLARIS && defined(_KERNEL)
- if (!cv_wait_sig(&iplwait, &ipl_mutex)) {
- MUTEX_EXIT(&ipl_mutex);
- return EINTR;
- }
-# else
-# ifdef linux
- interruptible_sleep_on(&iplwait[unit]);
- if (current->signal & ~current->blocked)
- return -EINTR;
-# else
- MUTEX_EXIT(&ipl_mutex);
- SPL_X(s);
- error = SLEEP(&iplh[unit], "ipl sleep");
- if (error)
- return error;
- SPL_NET(s);
- MUTEX_ENTER(&ipl_mutex);
-# endif /* linux */
-# endif /* SOLARIS */
- }
-
-# if BSD >= 199306 || defined(__FreeBSD__)
- uio->uio_rw = UIO_READ;
-# endif
-
- for (copied = 0; (ipl = iplt[unit]); copied += dlen) {
- dlen = ipl->ipl_dsize;
- if (dlen > uio->uio_resid)
- break;
- /*
- * Don't hold the mutex over the uiomove call.
- */
- iplt[unit] = ipl->ipl_next;
- iplused[unit] -= dlen;
- MUTEX_EXIT(&ipl_mutex);
- SPL_X(s);
- error = UIOMOVE((caddr_t)ipl, dlen, UIO_READ, uio);
- if (error) {
- SPL_NET(s);
- MUTEX_ENTER(&ipl_mutex);
- ipl->ipl_next = iplt[unit];
- iplt[unit] = ipl;
- iplused[unit] += dlen;
- break;
- }
- KFREES((caddr_t)ipl, dlen);
- SPL_NET(s);
- MUTEX_ENTER(&ipl_mutex);
- }
- if (!iplt[unit]) {
- iplused[unit] = 0;
- iplh[unit] = &iplt[unit];
- ipll[unit] = NULL;
- }
-
- MUTEX_EXIT(&ipl_mutex);
- SPL_X(s);
-# ifdef linux
- if (!error)
- return (int)copied;
- return -error;
-# else
- return error;
-# endif
-}
-
-
-int ipflog_clear(unit)
-minor_t unit;
-{
- iplog_t *ipl;
- int used;
-
- MUTEX_ENTER(&ipl_mutex);
- while ((ipl = iplt[unit])) {
- iplt[unit] = ipl->ipl_next;
- KFREES((caddr_t)ipl, ipl->ipl_dsize);
- }
- iplh[unit] = &iplt[unit];
- ipll[unit] = NULL;
- used = iplused[unit];
- iplused[unit] = 0;
- bzero((char *)&iplcrc[unit], FI_CSIZE);
- MUTEX_EXIT(&ipl_mutex);
- return used;
-}
-#endif /* IPFILTER_LOG */
diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c
deleted file mode 100644
index 816d8e793d4a..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_nat.c
+++ /dev/null
@@ -1,2739 +0,0 @@
-/*
- * Copyright (C) 1995-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * Added redirect stuff and a LOT of bug fixes. (mcn@EnGarde.com)
- */
-#if !defined(lint)
-/*static const char rcsid[] = "@(#)$Id: ip_nat.c,v 2.37.2.16 2000/07/18 13:57:40 darrenr Exp $";*/
-static const char rcsid[] = "@(#)$FreeBSD$";
-#endif
-
-#if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL)
-#define _KERNEL
-#endif
-
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/file.h>
-#if defined(__NetBSD__) && (NetBSD >= 199905) && !defined(IPFILTER_LKM) && \
- defined(_KERNEL)
-# include "opt_ipfilter_log.h"
-#endif
-#if !defined(_KERNEL) && !defined(KERNEL)
-# include <stdio.h>
-# include <string.h>
-# include <stdlib.h>
-#endif
-#if (defined(KERNEL) || defined(_KERNEL)) && (__FreeBSD_version >= 220000)
-# include <sys/filio.h>
-# include <sys/fcntl.h>
-#else
-# include <sys/ioctl.h>
-#endif
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#ifndef linux
-# include <sys/protosw.h>
-#endif
-#include <sys/socket.h>
-#if defined(_KERNEL) && !defined(linux)
-# include <sys/systm.h>
-#endif
-#if !defined(__SVR4) && !defined(__svr4__)
-# ifndef linux
-# include <sys/mbuf.h>
-# endif
-#else
-# include <sys/filio.h>
-# include <sys/byteorder.h>
-# ifdef _KERNEL
-# include <sys/dditypes.h>
-# endif
-# include <sys/stream.h>
-# include <sys/kmem.h>
-#endif
-#if __FreeBSD_version >= 300000
-# include <sys/queue.h>
-#endif
-#include <net/if.h>
-#if __FreeBSD_version >= 300000
-# include <net/if_var.h>
-# if defined(_KERNEL) && !defined(IPFILTER_LKM)
-# include "opt_ipfilter.h"
-# endif
-#endif
-#ifdef sun
-# include <net/af.h>
-#endif
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-
-#ifdef __sgi
-# ifdef IFF_DRVRLOCK /* IRIX6 */
-#include <sys/hashing.h>
-#include <netinet/in_var.h>
-# endif
-#endif
-
-#ifdef RFC1825
-# include <vpn/md5.h>
-# include <vpn/ipsec.h>
-extern struct ifnet vpnif;
-#endif
-
-#ifndef linux
-# include <netinet/ip_var.h>
-#endif
-#include <netinet/tcp.h>
-#include <netinet/udp.h>
-#include <netinet/ip_icmp.h>
-#include "netinet/ip_compat.h"
-#include <netinet/tcpip.h>
-#include "netinet/ip_fil.h"
-#include "netinet/ip_proxy.h"
-#include "netinet/ip_nat.h"
-#include "netinet/ip_frag.h"
-#include "netinet/ip_state.h"
-#if (__FreeBSD_version >= 300000)
-# include <sys/malloc.h>
-#endif
-#ifndef MIN
-# define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-#undef SOCKADDR_IN
-#define SOCKADDR_IN struct sockaddr_in
-
-nat_t **nat_table[2] = { NULL, NULL },
- *nat_instances = NULL;
-ipnat_t *nat_list = NULL;
-u_int ipf_nattable_sz = NAT_TABLE_SZ;
-u_int ipf_natrules_sz = NAT_SIZE;
-u_int ipf_rdrrules_sz = RDR_SIZE;
-u_int ipf_hostmap_sz = HOSTMAP_SIZE;
-u_32_t nat_masks = 0;
-u_32_t rdr_masks = 0;
-ipnat_t **nat_rules = NULL;
-ipnat_t **rdr_rules = NULL;
-hostmap_t **maptable = NULL;
-
-u_long fr_defnatage = DEF_NAT_AGE,
- fr_defnaticmpage = 6; /* 3 seconds */
-natstat_t nat_stats;
-int fr_nat_lock = 0;
-#if (SOLARIS || defined(__sgi)) && defined(_KERNEL)
-extern kmutex_t ipf_rw;
-extern KRWLOCK_T ipf_nat;
-#endif
-
-static int nat_flushtable __P((void));
-static int nat_clearlist __P((void));
-static void nat_addnat __P((struct ipnat *));
-static void nat_addrdr __P((struct ipnat *));
-static void nat_delete __P((struct nat *));
-static void nat_delrdr __P((struct ipnat *));
-static void nat_delnat __P((struct ipnat *));
-static int fr_natgetent __P((caddr_t));
-static int fr_natgetsz __P((caddr_t));
-static int fr_natputent __P((caddr_t));
-static void nat_tabmove __P((nat_t *, u_32_t));
-static int nat_match __P((fr_info_t *, ipnat_t *, ip_t *));
-static hostmap_t *nat_hostmap __P((ipnat_t *, struct in_addr,
- struct in_addr));
-static void nat_hostmapdel __P((struct hostmap *));
-
-
-int nat_init()
-{
- KMALLOCS(nat_table[0], nat_t **, sizeof(nat_t *) * ipf_nattable_sz);
- if (nat_table[0] != NULL)
- bzero((char *)nat_table[0], ipf_nattable_sz * sizeof(nat_t *));
- else
- return -1;
-
- KMALLOCS(nat_table[1], nat_t **, sizeof(nat_t *) * ipf_nattable_sz);
- if (nat_table[1] != NULL)
- bzero((char *)nat_table[1], ipf_nattable_sz * sizeof(nat_t *));
- else
- return -1;
-
- KMALLOCS(nat_rules, ipnat_t **, sizeof(ipnat_t *) * ipf_natrules_sz);
- if (nat_rules != NULL)
- bzero((char *)nat_rules, ipf_natrules_sz * sizeof(ipnat_t *));
- else
- return -1;
-
- KMALLOCS(rdr_rules, ipnat_t **, sizeof(ipnat_t *) * ipf_rdrrules_sz);
- if (rdr_rules != NULL)
- bzero((char *)rdr_rules, ipf_rdrrules_sz * sizeof(ipnat_t *));
- else
- return -1;
-
- KMALLOCS(maptable, hostmap_t **, sizeof(hostmap_t *) * ipf_hostmap_sz);
- if (maptable != NULL)
- bzero((char *)maptable, sizeof(hostmap_t *) * ipf_hostmap_sz);
- else
- return -1;
- return 0;
-}
-
-
-static void nat_addrdr(n)
-ipnat_t *n;
-{
- ipnat_t **np;
- u_32_t j;
- u_int hv;
- int k;
-
- k = countbits(n->in_outmsk);
- if ((k >= 0) && (k != 32))
- rdr_masks |= 1 << k;
- j = (n->in_outip & n->in_outmsk);
- hv = NAT_HASH_FN(j, 0, ipf_rdrrules_sz);
- np = rdr_rules + hv;
- while (*np != NULL)
- np = &(*np)->in_rnext;
- n->in_rnext = NULL;
- n->in_prnext = np;
- *np = n;
-}
-
-
-static void nat_addnat(n)
-ipnat_t *n;
-{
- ipnat_t **np;
- u_32_t j;
- u_int hv;
- int k;
-
- k = countbits(n->in_inmsk);
- if ((k >= 0) && (k != 32))
- nat_masks |= 1 << k;
- j = (n->in_inip & n->in_inmsk);
- hv = NAT_HASH_FN(j, 0, ipf_natrules_sz);
- np = nat_rules + hv;
- while (*np != NULL)
- np = &(*np)->in_mnext;
- n->in_mnext = NULL;
- n->in_pmnext = np;
- *np = n;
-}
-
-
-static void nat_delrdr(n)
-ipnat_t *n;
-{
- if (n->in_rnext)
- n->in_rnext->in_prnext = n->in_prnext;
- *n->in_prnext = n->in_rnext;
-}
-
-
-static void nat_delnat(n)
-ipnat_t *n;
-{
- if (n->in_mnext)
- n->in_mnext->in_pmnext = n->in_pmnext;
- *n->in_pmnext = n->in_mnext;
-}
-
-
-/*
- * check if an ip address has already been allocated for a given mapping that
- * is not doing port based translation.
- *
- * Must be called with ipf_nat held as a write lock.
- */
-static struct hostmap *nat_hostmap(np, real, map)
-ipnat_t *np;
-struct in_addr real;
-struct in_addr map;
-{
- hostmap_t *hm;
- u_int hv;
-
- hv = real.s_addr % HOSTMAP_SIZE;
- for (hm = maptable[hv]; hm; hm = hm->hm_next)
- if ((hm->hm_realip.s_addr == real.s_addr) &&
- (np == hm->hm_ipnat)) {
- hm->hm_ref++;
- return hm;
- }
-
- KMALLOC(hm, hostmap_t *);
- if (hm) {
- hm->hm_next = maptable[hv];
- hm->hm_pnext = maptable + hv;
- if (maptable[hv])
- maptable[hv]->hm_pnext = &hm->hm_next;
- maptable[hv] = hm;
- hm->hm_ipnat = np;
- hm->hm_realip = real;
- hm->hm_mapip = map;
- hm->hm_ref = 1;
- }
- return hm;
-}
-
-
-/*
- * Must be called with ipf_nat held as a write lock.
- */
-static void nat_hostmapdel(hm)
-struct hostmap *hm;
-{
- ATOMIC_DEC32(hm->hm_ref);
- if (hm->hm_ref == 0) {
- if (hm->hm_next)
- hm->hm_next->hm_pnext = hm->hm_pnext;
- *hm->hm_pnext = hm->hm_next;
- KFREE(hm);
- }
-}
-
-
-void fix_outcksum(sp, n)
-u_short *sp;
-u_32_t n;
-{
- register u_short sumshort;
- register u_32_t sum1;
-
- if (!n)
- return;
-#if SOLARIS2 >= 6
- else if (n & NAT_HW_CKSUM) {
- *sp = n & 0xffff;
- return;
- }
-#endif
- sum1 = (~ntohs(*sp)) & 0xffff;
- sum1 += (n);
- sum1 = (sum1 >> 16) + (sum1 & 0xffff);
- /* Again */
- sum1 = (sum1 >> 16) + (sum1 & 0xffff);
- sumshort = ~(u_short)sum1;
- *(sp) = htons(sumshort);
-}
-
-
-void fix_incksum(sp, n)
-u_short *sp;
-u_32_t n;
-{
- register u_short sumshort;
- register u_32_t sum1;
-
- if (!n)
- return;
-#if SOLARIS2 >= 6
- else if (n & NAT_HW_CKSUM) {
- *sp = n & 0xffff;
- return;
- }
-#endif
-#ifdef sparc
- sum1 = (~(*sp)) & 0xffff;
-#else
- sum1 = (~ntohs(*sp)) & 0xffff;
-#endif
- sum1 += ~(n) & 0xffff;
- sum1 = (sum1 >> 16) + (sum1 & 0xffff);
- /* Again */
- sum1 = (sum1 >> 16) + (sum1 & 0xffff);
- sumshort = ~(u_short)sum1;
- *(sp) = htons(sumshort);
-}
-
-
-/*
- * fix_datacksum is used *only* for the adjustments of checksums in the data
- * section of an IP packet.
- *
- * The only situation in which you need to do this is when NAT'ing an
- * ICMP error message. Such a message, contains in its body the IP header
- * of the original IP packet, that causes the error.
- *
- * You can't use fix_incksum or fix_outcksum in that case, because for the
- * kernel the data section of the ICMP error is just data, and no special
- * processing like hardware cksum or ntohs processing have been done by the
- * kernel on the data section.
- */
-void fix_datacksum(sp, n)
-u_short *sp;
-u_32_t n;
-{
- register u_short sumshort;
- register u_32_t sum1;
-
- if (!n)
- return;
-
- sum1 = (~ntohs(*sp)) & 0xffff;
- sum1 += (n);
- sum1 = (sum1 >> 16) + (sum1 & 0xffff);
- /* Again */
- sum1 = (sum1 >> 16) + (sum1 & 0xffff);
- sumshort = ~(u_short)sum1;
- *(sp) = htons(sumshort);
-}
-
-/*
- * How the NAT is organised and works.
- *
- * Inside (interface y) NAT Outside (interface x)
- * -------------------- -+- -------------------------------------
- * Packet going | out, processsed by ip_natout() for x
- * ------------> | ------------>
- * src=10.1.1.1 | src=192.1.1.1
- * |
- * | in, processed by ip_natin() for x
- * <------------ | <------------
- * dst=10.1.1.1 | dst=192.1.1.1
- * -------------------- -+- -------------------------------------
- * ip_natout() - changes ip_src and if required, sport
- * - creates a new mapping, if required.
- * ip_natin() - changes ip_dst and if required, dport
- *
- * In the NAT table, internal source is recorded as "in" and externally
- * seen as "out".
- */
-
-/*
- * Handle ioctls which manipulate the NAT.
- */
-int nat_ioctl(data, cmd, mode)
-#if defined(__NetBSD__) || defined(__OpenBSD__) || (__FreeBSD_version >= 300003)
-u_long cmd;
-#else
-int cmd;
-#endif
-caddr_t data;
-int mode;
-{
- register ipnat_t *nat, *nt, *n = NULL, **np = NULL;
- int error = 0, ret, arg;
- ipnat_t natd;
- u_32_t i, j;
-
-#if (BSD >= 199306) && defined(_KERNEL)
- if ((securelevel >= 2) && (mode & FWRITE))
- return EPERM;
-#endif
-
- nat = NULL; /* XXX gcc -Wuninitialized */
- KMALLOC(nt, ipnat_t *);
- if ((cmd == SIOCADNAT) || (cmd == SIOCRMNAT))
- error = IRCOPYPTR(data, (char *)&natd, sizeof(natd));
- else if (cmd == SIOCIPFFL) { /* SIOCFLNAT & SIOCCNATL */
- error = IRCOPY(data, (char *)&arg, sizeof(arg));
- if (error)
- error = EFAULT;
- }
-
- if (error)
- goto done;
-
- /*
- * For add/delete, look to see if the NAT entry is already present
- */
- WRITE_ENTER(&ipf_nat);
- if ((cmd == SIOCADNAT) || (cmd == SIOCRMNAT)) {
- nat = &natd;
- nat->in_flags &= IPN_USERFLAGS;
- if ((nat->in_redir & NAT_MAPBLK) == 0) {
- if ((nat->in_flags & IPN_SPLIT) == 0)
- nat->in_inip &= nat->in_inmsk;
- if ((nat->in_flags & IPN_IPRANGE) == 0)
- nat->in_outip &= nat->in_outmsk;
- }
- for (np = &nat_list; (n = *np); np = &n->in_next)
- if (!bcmp((char *)&nat->in_flags, (char *)&n->in_flags,
- IPN_CMPSIZ))
- break;
- }
-
- switch (cmd)
- {
-#ifdef IPFILTER_LOG
- case SIOCIPFFB :
- {
- int tmp;
-
- if (!(mode & FWRITE))
- error = EPERM;
- else {
- tmp = ipflog_clear(IPL_LOGNAT);
- IWCOPY((char *)&tmp, (char *)data, sizeof(tmp));
- }
- break;
- }
-#endif
- case SIOCADNAT :
- if (!(mode & FWRITE)) {
- error = EPERM;
- break;
- }
- if (n) {
- error = EEXIST;
- break;
- }
- if (nt == NULL) {
- error = ENOMEM;
- break;
- }
- n = nt;
- nt = NULL;
- bcopy((char *)nat, (char *)n, sizeof(*n));
- n->in_ifp = (void *)GETUNIT(n->in_ifname, 4);
- if (!n->in_ifp)
- n->in_ifp = (void *)-1;
- if (n->in_plabel[0] != '\0') {
- n->in_apr = appr_match(n->in_p, n->in_plabel);
- if (!n->in_apr) {
- error = ENOENT;
- break;
- }
- }
- n->in_next = NULL;
- *np = n;
-
- if (n->in_redir & NAT_REDIRECT) {
- n->in_flags &= ~IPN_NOTDST;
- nat_addrdr(n);
- }
- if (n->in_redir & (NAT_MAP|NAT_MAPBLK)) {
- n->in_flags &= ~IPN_NOTSRC;
- nat_addnat(n);
- }
-
- n->in_use = 0;
- if (n->in_redir & NAT_MAPBLK)
- n->in_space = USABLE_PORTS * ~ntohl(n->in_outmsk);
- else if (n->in_flags & IPN_AUTOPORTMAP)
- n->in_space = USABLE_PORTS * ~ntohl(n->in_inmsk);
- else if (n->in_flags & IPN_IPRANGE)
- n->in_space = ntohl(n->in_outmsk) - ntohl(n->in_outip);
- else if (n->in_flags & IPN_SPLIT)
- n->in_space = 2;
- else
- n->in_space = ~ntohl(n->in_outmsk);
- /*
- * Calculate the number of valid IP addresses in the output
- * mapping range. In all cases, the range is inclusive of
- * the start and ending IP addresses.
- * If to a CIDR address, lose 2: broadcast + network address
- * (so subtract 1)
- * If to a range, add one.
- * If to a single IP address, set to 1.
- */
- if (n->in_space) {
- if ((n->in_flags & IPN_IPRANGE) != 0)
- n->in_space += 1;
- else
- n->in_space -= 1;
- } else
- n->in_space = 1;
- if ((n->in_outmsk != 0xffffffff) && (n->in_outmsk != 0) &&
- ((n->in_flags & (IPN_IPRANGE|IPN_SPLIT)) == 0))
- n->in_nip = ntohl(n->in_outip) + 1;
- else if ((n->in_flags & IPN_SPLIT) &&
- (n->in_redir & NAT_REDIRECT))
- n->in_nip = ntohl(n->in_inip);
- else
- n->in_nip = ntohl(n->in_outip);
- if (n->in_redir & NAT_MAP) {
- n->in_pnext = ntohs(n->in_pmin);
- /*
- * Multiply by the number of ports made available.
- */
- if (ntohs(n->in_pmax) >= ntohs(n->in_pmin)) {
- n->in_space *= (ntohs(n->in_pmax) -
- ntohs(n->in_pmin) + 1);
- /*
- * Because two different sources can map to
- * different destinations but use the same
- * local IP#/port #.
- * If the result is smaller than in_space, then
- * we may have wrapped around 32bits.
- */
- i = n->in_inmsk;
- if ((i != 0) && (i != 0xffffffff)) {
- j = n->in_space * (~ntohl(i) + 1);
- if (j >= n->in_space)
- n->in_space = j;
- else
- n->in_space = 0xffffffff;
- }
- }
- /*
- * If no protocol is specified, multiple by 256.
- */
- if ((n->in_flags & IPN_TCPUDP) == 0) {
- j = n->in_space * 256;
- if (j >= n->in_space)
- n->in_space = j;
- else
- n->in_space = 0xffffffff;
- }
- }
- /* Otherwise, these fields are preset */
- n = NULL;
- nat_stats.ns_rules++;
- break;
- case SIOCRMNAT :
- if (!(mode & FWRITE)) {
- error = EPERM;
- n = NULL;
- break;
- }
- if (!n) {
- error = ESRCH;
- break;
- }
- if (n->in_redir & NAT_REDIRECT)
- nat_delrdr(n);
- if (n->in_redir & (NAT_MAPBLK|NAT_MAP))
- nat_delnat(n);
- if (nat_list == NULL) {
- nat_masks = 0;
- rdr_masks = 0;
- }
- *np = n->in_next;
- if (!n->in_use) {
- if (n->in_apr)
- appr_free(n->in_apr);
- KFREE(n);
- nat_stats.ns_rules--;
- } else {
- n->in_flags |= IPN_DELETE;
- n->in_next = NULL;
- }
- n = NULL;
- break;
- case SIOCGNATS :
- MUTEX_DOWNGRADE(&ipf_nat);
- nat_stats.ns_table[0] = nat_table[0];
- nat_stats.ns_table[1] = nat_table[1];
- nat_stats.ns_list = nat_list;
- nat_stats.ns_nattab_sz = ipf_nattable_sz;
- nat_stats.ns_rultab_sz = ipf_natrules_sz;
- nat_stats.ns_rdrtab_sz = ipf_rdrrules_sz;
- nat_stats.ns_instances = nat_instances;
- nat_stats.ns_apslist = ap_sess_list;
- error = IWCOPYPTR((char *)&nat_stats, (char *)data,
- sizeof(nat_stats));
- break;
- case SIOCGNATL :
- {
- natlookup_t nl;
-
- MUTEX_DOWNGRADE(&ipf_nat);
- error = IRCOPYPTR((char *)data, (char *)&nl, sizeof(nl));
- if (error)
- break;
-
- if (nat_lookupredir(&nl)) {
- error = IWCOPYPTR((char *)&nl, (char *)data,
- sizeof(nl));
- } else
- error = ESRCH;
- break;
- }
- case SIOCIPFFL : /* old SIOCFLNAT & SIOCCNATL */
- if (!(mode & FWRITE)) {
- error = EPERM;
- break;
- }
- error = 0;
- if (arg == 0)
- ret = nat_flushtable();
- else if (arg == 1)
- ret = nat_clearlist();
- else
- error = EINVAL;
- MUTEX_DOWNGRADE(&ipf_nat);
- if (!error) {
- error = IWCOPY((caddr_t)&ret, data, sizeof(ret));
- if (error)
- error = EFAULT;
- }
- break;
- case SIOCSTLCK :
- error = IRCOPY(data, (caddr_t)&arg, sizeof(arg));
- if (!error) {
- error = IWCOPY((caddr_t)&fr_nat_lock, data,
- sizeof(fr_nat_lock));
- if (!error)
- fr_nat_lock = arg;
- } else
- error = EFAULT;
- break;
- case SIOCSTPUT :
- if (fr_nat_lock)
- error = fr_natputent(data);
- else
- error = EACCES;
- break;
- case SIOCSTGSZ :
- if (fr_nat_lock)
- error = fr_natgetsz(data);
- else
- error = EACCES;
- break;
- case SIOCSTGET :
- if (fr_nat_lock)
- error = fr_natgetent(data);
- else
- error = EACCES;
- break;
- case FIONREAD :
-#ifdef IPFILTER_LOG
- arg = (int)iplused[IPL_LOGNAT];
- MUTEX_DOWNGRADE(&ipf_nat);
- error = IWCOPY((caddr_t)&arg, (caddr_t)data, sizeof(arg));
- if (error)
- error = EFAULT;
-#endif
- break;
- default :
- error = EINVAL;
- break;
- }
- RWLOCK_EXIT(&ipf_nat); /* READ/WRITE */
-done:
- if (nt)
- KFREE(nt);
- return error;
-}
-
-
-static int fr_natgetsz(data)
-caddr_t data;
-{
- ap_session_t *aps;
- nat_t *nat, *n;
- int error = 0;
- natget_t ng;
-
- error = IRCOPY(data, (caddr_t)&ng, sizeof(ng));
- if (error)
- return EFAULT;
-
- nat = ng.ng_ptr;
- if (!nat) {
- nat = nat_instances;
- ng.ng_sz = 0;
- if (nat == NULL) {
- error = IWCOPY((caddr_t)&ng, data, sizeof(ng));
- if (error)
- error = EFAULT;
- return error;
- }
- } else {
- /*
- * Make sure the pointer we're copying from exists in the
- * current list of entries. Security precaution to prevent
- * copying of random kernel data.
- */
- for (n = nat_instances; n; n = n->nat_next)
- if (n == nat)
- break;
- if (!n)
- return ESRCH;
- }
-
- ng.ng_sz = sizeof(nat_save_t);
- aps = nat->nat_aps;
- if ((aps != NULL) && (aps->aps_data != 0)) {
- ng.ng_sz += sizeof(ap_session_t);
- ng.ng_sz += aps->aps_psiz;
- }
-
- error = IWCOPY((caddr_t)&ng, data, sizeof(ng));
- if (error)
- error = EFAULT;
- return error;
-}
-
-
-static int fr_natgetent(data)
-caddr_t data;
-{
- nat_save_t ipn, *ipnp, *ipnn = NULL;
- register nat_t *n, *nat;
- ap_session_t *aps;
- int error;
-
- error = IRCOPY(data, (caddr_t)&ipnp, sizeof(ipnp));
- if (error)
- return EFAULT;
- error = IRCOPY((caddr_t)ipnp, (caddr_t)&ipn, sizeof(ipn));
- if (error)
- return EFAULT;
-
- nat = ipn.ipn_next;
- if (!nat) {
- nat = nat_instances;
- if (nat == NULL) {
- if (nat_instances == NULL)
- return ENOENT;
- return 0;
- }
- } else {
- /*
- * Make sure the pointer we're copying from exists in the
- * current list of entries. Security precaution to prevent
- * copying of random kernel data.
- */
- for (n = nat_instances; n; n = n->nat_next)
- if (n == nat)
- break;
- if (!n)
- return ESRCH;
- }
-
- ipn.ipn_next = nat->nat_next;
- ipn.ipn_dsize = 0;
- bcopy((char *)nat, (char *)&ipn.ipn_nat, sizeof(ipn.ipn_nat));
- ipn.ipn_nat.nat_data = NULL;
-
- if (nat->nat_ptr) {
- bcopy((char *)nat->nat_ptr, (char *)&ipn.ipn_ipnat,
- sizeof(ipn.ipn_ipnat));
- }
-
- if (nat->nat_fr)
- bcopy((char *)nat->nat_fr, (char *)&ipn.ipn_rule,
- sizeof(ipn.ipn_rule));
-
- if ((aps = nat->nat_aps)) {
- ipn.ipn_dsize = sizeof(*aps);
- if (aps->aps_data)
- ipn.ipn_dsize += aps->aps_psiz;
- KMALLOCS(ipnn, nat_save_t *, sizeof(*ipnn) + ipn.ipn_dsize);
- if (ipnn == NULL)
- return ENOMEM;
- bcopy((char *)&ipn, (char *)ipnn, sizeof(ipn));
-
- bcopy((char *)aps, ipnn->ipn_data, sizeof(*aps));
- if (aps->aps_data) {
- bcopy(aps->aps_data, ipnn->ipn_data + sizeof(*aps),
- aps->aps_psiz);
- ipnn->ipn_dsize += aps->aps_psiz;
- }
- error = IWCOPY((caddr_t)ipnn, ipnp,
- sizeof(ipn) + ipn.ipn_dsize);
- if (error)
- error = EFAULT;
- KFREES(ipnn, sizeof(*ipnn) + ipn.ipn_dsize);
- } else {
- error = IWCOPY((caddr_t)&ipn, ipnp, sizeof(ipn));
- if (error)
- error = EFAULT;
- }
- return error;
-}
-
-
-static int fr_natputent(data)
-caddr_t data;
-{
- nat_save_t ipn, *ipnp, *ipnn = NULL;
- register nat_t *n, *nat;
- ap_session_t *aps;
- frentry_t *fr;
- ipnat_t *in;
-
- int error;
-
- error = IRCOPY(data, (caddr_t)&ipnp, sizeof(ipnp));
- if (error)
- return EFAULT;
- error = IRCOPY((caddr_t)ipnp, (caddr_t)&ipn, sizeof(ipn));
- if (error)
- return EFAULT;
- nat = NULL;
- if (ipn.ipn_dsize) {
- KMALLOCS(ipnn, nat_save_t *, sizeof(ipn) + ipn.ipn_dsize);
- if (ipnn == NULL)
- return ENOMEM;
- bcopy((char *)&ipn, (char *)ipnn, sizeof(ipn));
- error = IRCOPY((caddr_t)ipnp, (caddr_t)ipn.ipn_data,
- ipn.ipn_dsize);
- if (error) {
- error = EFAULT;
- goto junkput;
- }
- } else
- ipnn = NULL;
-
- KMALLOC(nat, nat_t *);
- if (nat == NULL) {
- error = EFAULT;
- goto junkput;
- }
-
- bcopy((char *)&ipn.ipn_nat, (char *)nat, sizeof(*nat));
- /*
- * Initialize all these so that nat_delete() doesn't cause a crash.
- */
- nat->nat_phnext[0] = NULL;
- nat->nat_phnext[1] = NULL;
- fr = nat->nat_fr;
- nat->nat_fr = NULL;
- aps = nat->nat_aps;
- nat->nat_aps = NULL;
- in = nat->nat_ptr;
- nat->nat_ptr = NULL;
- nat->nat_data = NULL;
-
- /*
- * Restore the rule associated with this nat session
- */
- if (in) {
- KMALLOC(in, ipnat_t *);
- if (in == NULL) {
- error = ENOMEM;
- goto junkput;
- }
- nat->nat_ptr = in;
- bcopy((char *)&ipn.ipn_ipnat, (char *)in, sizeof(*in));
- in->in_use = 1;
- in->in_flags |= IPN_DELETE;
- in->in_next = NULL;
- in->in_rnext = NULL;
- in->in_prnext = NULL;
- in->in_mnext = NULL;
- in->in_pmnext = NULL;
- in->in_ifp = GETUNIT(in->in_ifname, 4);
- if (in->in_plabel[0] != '\0') {
- in->in_apr = appr_match(in->in_p, in->in_plabel);
- }
- }
-
- /*
- * Restore ap_session_t structure. Include the private data allocated
- * if it was there.
- */
- if (aps) {
- KMALLOC(aps, ap_session_t *);
- if (aps == NULL) {
- error = ENOMEM;
- goto junkput;
- }
- nat->nat_aps = aps;
- aps->aps_next = ap_sess_list;
- ap_sess_list = aps;
- bcopy(ipnn->ipn_data, (char *)aps, sizeof(*aps));
- if (in)
- aps->aps_apr = in->in_apr;
- if (aps->aps_psiz) {
- KMALLOCS(aps->aps_data, void *, aps->aps_psiz);
- if (aps->aps_data == NULL) {
- error = ENOMEM;
- goto junkput;
- }
- bcopy(ipnn->ipn_data + sizeof(*aps), aps->aps_data,
- aps->aps_psiz);
- } else {
- aps->aps_psiz = 0;
- aps->aps_data = NULL;
- }
- }
-
- /*
- * If there was a filtering rule associated with this entry then
- * build up a new one.
- */
- if (fr != NULL) {
- if (nat->nat_flags & FI_NEWFR) {
- KMALLOC(fr, frentry_t *);
- nat->nat_fr = fr;
- if (fr == NULL) {
- error = ENOMEM;
- goto junkput;
- }
- bcopy((char *)&ipn.ipn_fr, (char *)fr, sizeof(*fr));
- ipn.ipn_nat.nat_fr = fr;
- error = IWCOPY((caddr_t)&ipn, ipnp, sizeof(ipn));
- if (error) {
- error = EFAULT;
- goto junkput;
- }
- } else {
- for (n = nat_instances; n; n = n->nat_next)
- if (n->nat_fr == fr)
- break;
- if (!n) {
- error = ESRCH;
- goto junkput;
- }
- }
- }
-
- if (ipnn)
- KFREES(ipnn, sizeof(ipn) + ipn.ipn_dsize);
- nat_insert(nat);
- return 0;
-junkput:
- if (ipnn)
- KFREES(ipnn, sizeof(ipn) + ipn.ipn_dsize);
- if (nat)
- nat_delete(nat);
- return error;
-}
-
-
-/*
- * Delete a nat entry from the various lists and table.
- */
-static void nat_delete(natd)
-struct nat *natd;
-{
- struct ipnat *ipn;
-
- if (natd->nat_flags & FI_WILDP)
- nat_stats.ns_wilds--;
- if (natd->nat_hnext[0])
- natd->nat_hnext[0]->nat_phnext[0] = natd->nat_phnext[0];
- *natd->nat_phnext[0] = natd->nat_hnext[0];
- if (natd->nat_hnext[1])
- natd->nat_hnext[1]->nat_phnext[1] = natd->nat_phnext[1];
- *natd->nat_phnext[1] = natd->nat_hnext[1];
-
- if (natd->nat_fr != NULL) {
- ATOMIC_DEC32(natd->nat_fr->fr_ref);
- }
-
- if (natd->nat_hm != NULL)
- nat_hostmapdel(natd->nat_hm);
-
- /*
- * If there is an active reference from the nat entry to its parent
- * rule, decrement the rule's reference count and free it too if no
- * longer being used.
- */
- ipn = natd->nat_ptr;
- if (ipn != NULL) {
- ipn->in_space++;
- ipn->in_use--;
- if (!ipn->in_use && (ipn->in_flags & IPN_DELETE)) {
- if (ipn->in_apr)
- appr_free(ipn->in_apr);
- KFREE(ipn);
- nat_stats.ns_rules--;
- }
- }
-
- MUTEX_DESTROY(&natd->nat_lock);
- /*
- * If there's a fragment table entry too for this nat entry, then
- * dereference that as well.
- */
- ipfr_forget((void *)natd);
- aps_free(natd->nat_aps);
- nat_stats.ns_inuse--;
- KFREE(natd);
-}
-
-
-/*
- * nat_flushtable - clear the NAT table of all mapping entries.
- */
-static int nat_flushtable()
-{
- register nat_t *nat, **natp;
- register int j = 0;
-
- /*
- * ALL NAT mappings deleted, so lets just make the deletions
- * quicker.
- */
- if (nat_table[0] != NULL)
- bzero((char *)nat_table[0],
- sizeof(nat_table[0]) * ipf_nattable_sz);
- if (nat_table[1] != NULL)
- bzero((char *)nat_table[1],
- sizeof(nat_table[1]) * ipf_nattable_sz);
-
- for (natp = &nat_instances; (nat = *natp); ) {
- *natp = nat->nat_next;
-#ifdef IPFILTER_LOG
- nat_log(nat, NL_FLUSH);
-#endif
- nat_delete(nat);
- j++;
- }
- nat_stats.ns_inuse = 0;
- return j;
-}
-
-
-/*
- * nat_clearlist - delete all rules in the active NAT mapping list.
- */
-static int nat_clearlist()
-{
- register ipnat_t *n, **np = &nat_list;
- int i = 0;
-
- if (nat_rules != NULL)
- bzero((char *)nat_rules, sizeof(*nat_rules) * ipf_natrules_sz);
- if (rdr_rules != NULL)
- bzero((char *)rdr_rules, sizeof(*rdr_rules) * ipf_rdrrules_sz);
-
- while ((n = *np)) {
- *np = n->in_next;
- if (!n->in_use) {
- if (n->in_apr)
- appr_free(n->in_apr);
- KFREE(n);
- nat_stats.ns_rules--;
- } else {
- n->in_flags |= IPN_DELETE;
- n->in_next = NULL;
- }
- i++;
- }
- nat_masks = 0;
- rdr_masks = 0;
- return i;
-}
-
-
-/*
- * Create a new NAT table entry.
- * NOTE: assumes write lock on ipf_nat has been obtained already.
- */
-nat_t *nat_new(np, ip, fin, flags, direction)
-ipnat_t *np;
-ip_t *ip;
-fr_info_t *fin;
-u_int flags;
-int direction;
-{
- register u_32_t sum1, sum2, sumd, l;
- u_short port = 0, sport = 0, dport = 0, nport = 0;
- struct in_addr in, inb;
- tcphdr_t *tcp = NULL;
- hostmap_t *hm = NULL;
- nat_t *nat, *natl;
- u_short nflags;
-#if SOLARIS && defined(_KERNEL) && (SOLARIS2 >= 6)
- qif_t *qf = fin->fin_qif;
-#endif
-
- nflags = flags & np->in_flags;
- if (flags & IPN_TCPUDP) {
- tcp = (tcphdr_t *)fin->fin_dp;
- sport = tcp->th_sport;
- dport = tcp->th_dport;
- }
-
- /* Give me a new nat */
- KMALLOC(nat, nat_t *);
- if (nat == NULL) {
- nat_stats.ns_memfail++;
- return NULL;
- }
-
- bzero((char *)nat, sizeof(*nat));
- nat->nat_flags = flags;
- if (flags & FI_WILDP)
- nat_stats.ns_wilds++;
- /*
- * Search the current table for a match.
- */
- if (direction == NAT_OUTBOUND) {
- /*
- * Values at which the search for a free resouce starts.
- */
- u_32_t st_ip;
- u_short st_port;
-
- /*
- * If it's an outbound packet which doesn't match any existing
- * record, then create a new port
- */
- l = 0;
- st_ip = np->in_nip;
- st_port = np->in_pnext;
-
- do {
- port = 0;
- in.s_addr = htonl(np->in_nip);
- if (l == 0) {
- /*
- * Check to see if there is an existing NAT
- * setup for this IP address pair.
- */
- hm = nat_hostmap(np, ip->ip_src, in);
- if (hm != NULL)
- in.s_addr = hm->hm_mapip.s_addr;
- } else if ((l == 1) && (hm != NULL)) {
- nat_hostmapdel(hm);
- hm = NULL;
- }
- in.s_addr = ntohl(in.s_addr);
-
- nat->nat_hm = hm;
-
- if ((np->in_outmsk == 0xffffffff) &&
- (np->in_pnext == 0)) {
- if (l > 0)
- goto badnat;
- }
-
- if (np->in_redir & NAT_MAPBLK) {
- if ((l >= np->in_ppip) || ((l > 0) &&
- !(flags & IPN_TCPUDP)))
- goto badnat;
- /*
- * map-block - Calculate destination address.
- */
- in.s_addr = ntohl(ip->ip_src.s_addr);
- in.s_addr &= ntohl(~np->in_inmsk);
- inb.s_addr = in.s_addr;
- in.s_addr /= np->in_ippip;
- in.s_addr &= ntohl(~np->in_outmsk);
- in.s_addr += ntohl(np->in_outip);
- /*
- * Calculate destination port.
- */
- if ((flags & IPN_TCPUDP) &&
- (np->in_ppip != 0)) {
- port = ntohs(sport) + l;
- port %= np->in_ppip;
- port += np->in_ppip *
- (inb.s_addr % np->in_ippip);
- port += MAPBLK_MINPORT;
- port = htons(port);
- }
- } else if (!np->in_outip &&
- (np->in_outmsk == 0xffffffff)) {
- /*
- * 0/32 - use the interface's IP address.
- */
- if ((l > 0) ||
- fr_ifpaddr(4, fin->fin_ifp, &in) == -1)
- goto badnat;
- in.s_addr = ntohl(in.s_addr);
- } else if (!np->in_outip && !np->in_outmsk) {
- /*
- * 0/0 - use the original source address/port.
- */
- if (l > 0)
- goto badnat;
- in.s_addr = ntohl(ip->ip_src.s_addr);
- } else if ((np->in_outmsk != 0xffffffff) &&
- (np->in_pnext == 0) &&
- ((l > 0) || (hm == NULL)))
- np->in_nip++;
- natl = NULL;
-
- if ((nflags & IPN_TCPUDP) &&
- ((np->in_redir & NAT_MAPBLK) == 0) &&
- (np->in_flags & IPN_AUTOPORTMAP)) {
- if ((l > 0) && (l % np->in_ppip == 0)) {
- if (l > np->in_space) {
- goto badnat;
- } else if ((l > np->in_ppip) &&
- np->in_outmsk != 0xffffffff)
- np->in_nip++;
- }
- if (np->in_ppip != 0) {
- port = ntohs(sport);
- port += (l % np->in_ppip);
- port %= np->in_ppip;
- port += np->in_ppip *
- (ntohl(ip->ip_src.s_addr) %
- np->in_ippip);
- port += MAPBLK_MINPORT;
- port = htons(port);
- }
- } else if (((np->in_redir & NAT_MAPBLK) == 0) &&
- (nflags & IPN_TCPUDP) &&
- (np->in_pnext != 0)) {
- port = htons(np->in_pnext++);
- if (np->in_pnext > ntohs(np->in_pmax)) {
- np->in_pnext = ntohs(np->in_pmin);
- if (np->in_outmsk != 0xffffffff)
- np->in_nip++;
- }
- }
-
- if (np->in_flags & IPN_IPRANGE) {
- if (np->in_nip > ntohl(np->in_outmsk))
- np->in_nip = ntohl(np->in_outip);
- } else {
- if ((np->in_outmsk != 0xffffffff) &&
- ((np->in_nip + 1) & ntohl(np->in_outmsk)) >
- ntohl(np->in_outip))
- np->in_nip = ntohl(np->in_outip) + 1;
- }
-
- if (!port && (flags & IPN_TCPUDP))
- port = sport;
-
- /*
- * Here we do a lookup of the connection as seen from
- * the outside. If an IP# pair already exists, try
- * again. So if you have A->B becomes C->B, you can
- * also have D->E become C->E but not D->B causing
- * another C->B. Also take protocol and ports into
- * account when determining whether a pre-existing
- * NAT setup will cause an external conflict where
- * this is appropriate.
- */
- inb.s_addr = htonl(in.s_addr);
- natl = nat_inlookup(fin->fin_ifp, flags & ~FI_WILDP,
- (u_int)ip->ip_p, ip->ip_dst, inb,
- (port << 16) | dport, 1);
-
- /*
- * Has the search wrapped around and come back to the
- * start ?
- */
- if ((natl != NULL) &&
- (np->in_pnext != 0) && (st_port == np->in_pnext) &&
- (np->in_nip != 0) && (st_ip == np->in_nip))
- goto badnat;
- l++;
- } while (natl != NULL);
-
- if (np->in_space > 0)
- np->in_space--;
-
- /* Setup the NAT table */
- nat->nat_inip = ip->ip_src;
- nat->nat_outip.s_addr = htonl(in.s_addr);
- nat->nat_oip = ip->ip_dst;
- if (nat->nat_hm == NULL)
- nat->nat_hm = nat_hostmap(np, ip->ip_src,
- nat->nat_outip);
-
- sum1 = LONG_SUM(ntohl(ip->ip_src.s_addr)) + ntohs(sport);
- sum2 = LONG_SUM(in.s_addr) + ntohs(port);
-
- if (flags & IPN_TCPUDP) {
- nat->nat_inport = sport;
- nat->nat_outport = port; /* sport */
- nat->nat_oport = dport;
- }
- } else {
- /*
- * Otherwise, it's an inbound packet. Most likely, we don't
- * want to rewrite source ports and source addresses. Instead,
- * we want to rewrite to a fixed internal address and fixed
- * internal port.
- */
- if (np->in_flags & IPN_SPLIT) {
- in.s_addr = np->in_nip;
- if (np->in_inip == htonl(in.s_addr))
- np->in_nip = ntohl(np->in_inmsk);
- else {
- np->in_nip = ntohl(np->in_inip);
- if (np->in_flags & IPN_ROUNDR) {
- nat_delrdr(np);
- nat_addrdr(np);
- }
- }
- } else {
- in.s_addr = ntohl(np->in_inip);
- if (np->in_flags & IPN_ROUNDR) {
- nat_delrdr(np);
- nat_addrdr(np);
- }
- }
- if (!np->in_pnext)
- nport = dport;
- else {
- /*
- * Whilst not optimized for the case where
- * pmin == pmax, the gain is not significant.
- */
- nport = ntohs(dport) - ntohs(np->in_pmin) +
- ntohs(np->in_pnext);
- nport = htons(nport);
- }
-
- /*
- * When the redirect-to address is set to 0.0.0.0, just
- * assume a blank `forwarding' of the packet. We don't
- * setup any translation for this either.
- */
- if (in.s_addr == 0) {
- if (nport == dport)
- goto badnat;
- in.s_addr = ntohl(ip->ip_dst.s_addr);
- }
-
- nat->nat_inip.s_addr = htonl(in.s_addr);
- nat->nat_outip = ip->ip_dst;
- nat->nat_oip = ip->ip_src;
-
- sum1 = LONG_SUM(ntohl(ip->ip_dst.s_addr)) + ntohs(dport);
- sum2 = LONG_SUM(in.s_addr) + ntohs(nport);
-
- if (flags & IPN_TCPUDP) {
- nat->nat_inport = nport;
- nat->nat_outport = dport;
- nat->nat_oport = sport;
- }
- }
-
- CALC_SUMD(sum1, sum2, sumd);
- nat->nat_sumd[0] = (sumd & 0xffff) + (sumd >> 16);
-#if SOLARIS && defined(_KERNEL) && (SOLARIS2 >= 6)
- if ((flags == IPN_TCP) && dohwcksum &&
- (qf->qf_ill->ill_ick.ick_magic == ICK_M_CTL_MAGIC)) {
- if (direction == NAT_OUTBOUND)
- sum1 = LONG_SUM(ntohl(in.s_addr));
- else
- sum1 = LONG_SUM(ntohl(ip->ip_src.s_addr));
- sum1 += LONG_SUM(ntohl(ip->ip_dst.s_addr));
- sum1 += 30;
- sum1 = (sum1 & 0xffff) + (sum1 >> 16);
- nat->nat_sumd[1] = NAT_HW_CKSUM|(sum1 & 0xffff);
- } else
-#endif
- nat->nat_sumd[1] = nat->nat_sumd[0];
-
- if ((flags & IPN_TCPUDP) && ((sport != port) || (dport != nport))) {
- if (direction == NAT_OUTBOUND)
- sum1 = LONG_SUM(ntohl(ip->ip_src.s_addr));
- else
- sum1 = LONG_SUM(ntohl(ip->ip_dst.s_addr));
-
- sum2 = LONG_SUM(in.s_addr);
-
- CALC_SUMD(sum1, sum2, sumd);
- nat->nat_ipsumd = (sumd & 0xffff) + (sumd >> 16);
- } else
- nat->nat_ipsumd = nat->nat_sumd[0];
-
- in.s_addr = htonl(in.s_addr);
-
-#ifdef _KERNEL
- strncpy(nat->nat_ifname, IFNAME(fin->fin_ifp), IFNAMSIZ);
-#endif
- nat_insert(nat);
-
- nat->nat_dir = direction;
- nat->nat_ifp = fin->fin_ifp;
- nat->nat_ptr = np;
- nat->nat_p = ip->ip_p;
- nat->nat_bytes = 0;
- nat->nat_pkts = 0;
- nat->nat_fr = fin->fin_fr;
- if (nat->nat_fr != NULL) {
- ATOMIC_INC32(nat->nat_fr->fr_ref);
- }
- if (direction == NAT_OUTBOUND) {
- if (flags & IPN_TCPUDP)
- tcp->th_sport = port;
- } else {
- if (flags & IPN_TCPUDP)
- tcp->th_dport = nport;
- }
- np->in_use++;
-#ifdef IPFILTER_LOG
- nat_log(nat, (u_int)np->in_redir);
-#endif
- return nat;
-badnat:
- nat_stats.ns_badnat++;
- if ((hm = nat->nat_hm) != NULL)
- nat_hostmapdel(hm);
- KFREE(nat);
- return NULL;
-}
-
-
-void nat_insert(nat)
-nat_t *nat;
-{
- nat_t **natp;
- u_int hv;
-
- MUTEX_INIT(&nat->nat_lock, "nat entry lock", NULL);
-
- nat->nat_age = fr_defnatage;
- nat->nat_ifname[sizeof(nat->nat_ifname) - 1] = '\0';
- if (nat->nat_ifname[0] !='\0') {
- nat->nat_ifp = GETUNIT(nat->nat_ifname, 4);
- }
-
- nat->nat_next = nat_instances;
- nat_instances = nat;
-
- hv = NAT_HASH_FN(nat->nat_inip.s_addr, nat->nat_inport,
- ipf_nattable_sz);
- natp = &nat_table[0][hv];
- if (*natp)
- (*natp)->nat_phnext[0] = &nat->nat_hnext[0];
- nat->nat_phnext[0] = natp;
- nat->nat_hnext[0] = *natp;
- *natp = nat;
-
- hv = NAT_HASH_FN(nat->nat_outip.s_addr, nat->nat_outport,
- ipf_nattable_sz);
- natp = &nat_table[1][hv];
- if (*natp)
- (*natp)->nat_phnext[1] = &nat->nat_hnext[1];
- nat->nat_phnext[1] = natp;
- nat->nat_hnext[1] = *natp;
- *natp = nat;
-
- nat_stats.ns_added++;
- nat_stats.ns_inuse++;
-}
-
-
-nat_t *nat_icmplookup(ip, fin, dir)
-ip_t *ip;
-fr_info_t *fin;
-int dir;
-{
- icmphdr_t *icmp;
- tcphdr_t *tcp = NULL;
- ip_t *oip;
- int flags = 0, type, minlen;
-
- icmp = (icmphdr_t *)fin->fin_dp;
- /*
- * Does it at least have the return (basic) IP header ?
- * Only a basic IP header (no options) should be with an ICMP error
- * header.
- */
- if ((ip->ip_hl != 5) || (ip->ip_len < ICMPERR_MINPKTLEN))
- return NULL;
- type = icmp->icmp_type;
- /*
- * If it's not an error type, then return.
- */
- if ((type != ICMP_UNREACH) && (type != ICMP_SOURCEQUENCH) &&
- (type != ICMP_REDIRECT) && (type != ICMP_TIMXCEED) &&
- (type != ICMP_PARAMPROB))
- return NULL;
-
- oip = (ip_t *)((char *)fin->fin_dp + 8);
- minlen = (oip->ip_hl << 2);
- if (minlen < sizeof(ip_t))
- return NULL;
- if (ip->ip_len < ICMPERR_IPICMPHLEN + minlen)
- return NULL;
- /*
- * Is the buffer big enough for all of it ? It's the size of the IP
- * header claimed in the encapsulated part which is of concern. It
- * may be too big to be in this buffer but not so big that it's
- * outside the ICMP packet, leading to TCP deref's causing problems.
- * This is possible because we don't know how big oip_hl is when we
- * do the pullup early in fr_check() and thus can't gaurantee it is
- * all here now.
- */
-#ifdef _KERNEL
- {
- mb_t *m;
-
-# if SOLARIS
- m = fin->fin_qfm;
- if ((char *)oip + fin->fin_dlen - ICMPERR_ICMPHLEN > (char *)m->b_wptr)
- return NULL;
-# else
- m = *(mb_t **)fin->fin_mp;
- if ((char *)oip + fin->fin_dlen - ICMPERR_ICMPHLEN >
- (char *)ip + m->m_len)
- return NULL;
-# endif
- }
-#endif
-
- if (oip->ip_p == IPPROTO_TCP)
- flags = IPN_TCP;
- else if (oip->ip_p == IPPROTO_UDP)
- flags = IPN_UDP;
- if (flags & IPN_TCPUDP) {
- minlen += 8; /* + 64bits of data to get ports */
- if (ip->ip_len < ICMPERR_IPICMPHLEN + minlen)
- return NULL;
- tcp = (tcphdr_t *)((char *)oip + (oip->ip_hl << 2));
- if (dir == NAT_INBOUND)
- return nat_inlookup(fin->fin_ifp, flags,
- (u_int)oip->ip_p, oip->ip_dst, oip->ip_src,
- (tcp->th_sport << 16) | tcp->th_dport, 0);
- else
- return nat_outlookup(fin->fin_ifp, flags,
- (u_int)oip->ip_p, oip->ip_dst, oip->ip_src,
- (tcp->th_sport << 16) | tcp->th_dport, 0);
- }
- if (dir == NAT_INBOUND)
- return nat_inlookup(fin->fin_ifp, 0, (u_int)oip->ip_p,
- oip->ip_dst, oip->ip_src, 0, 0);
- else
- return nat_outlookup(fin->fin_ifp, 0, (u_int)oip->ip_p,
- oip->ip_dst, oip->ip_src, 0, 0);
-}
-
-
-/*
- * This should *ONLY* be used for incoming packets to make sure a NAT'd ICMP
- * packet gets correctly recognised.
- */
-nat_t *nat_icmp(ip, fin, nflags, dir)
-ip_t *ip;
-fr_info_t *fin;
-u_int *nflags;
-int dir;
-{
- u_32_t sum1, sum2, sumd, sumd2 = 0;
- struct in_addr in;
- icmphdr_t *icmp;
- udphdr_t *udp;
- nat_t *nat;
- ip_t *oip;
- int flags = 0;
-
- if ((fin->fin_fi.fi_fl & FI_SHORT) || (ip->ip_off & IP_OFFMASK))
- return NULL;
- /*
- * nat_icmplookup() will return NULL for `defective' packets.
- */
- if ((ip->ip_v != 4) || !(nat = nat_icmplookup(ip, fin, dir)))
- return NULL;
- *nflags = IPN_ICMPERR;
- icmp = (icmphdr_t *)fin->fin_dp;
- oip = (ip_t *)&icmp->icmp_ip;
- if (oip->ip_p == IPPROTO_TCP)
- flags = IPN_TCP;
- else if (oip->ip_p == IPPROTO_UDP)
- flags = IPN_UDP;
- udp = (udphdr_t *)((((char *)oip) + (oip->ip_hl << 2)));
- /*
- * Need to adjust ICMP header to include the real IP#'s and
- * port #'s. Only apply a checksum change relative to the
- * IP address change as it will be modified again in ip_natout
- * for both address and port. Two checksum changes are
- * necessary for the two header address changes. Be careful
- * to only modify the checksum once for the port # and twice
- * for the IP#.
- */
-
- /*
- * Step 1
- * Fix the IP addresses in the offending IP packet. You also need
- * to adjust the IP header checksum of that offending IP packet
- * and the ICMP checksum of the ICMP error message itself.
- *
- * Unfortunately, for UDP and TCP, the IP addresses are also contained
- * in the pseudo header that is used to compute the UDP resp. TCP
- * checksum. So, we must compensate that as well. Even worse, the
- * change in the UDP and TCP checksums require yet another
- * adjustment of the ICMP checksum of the ICMP error message.
- *
- * For the moment we forget about TCP, because that checksum is not
- * in the first 8 bytes, so it will not be available in most cases.
- */
-
- if (oip->ip_dst.s_addr == nat->nat_oip.s_addr) {
- sum1 = LONG_SUM(ntohl(oip->ip_src.s_addr));
- in = nat->nat_inip;
- oip->ip_src = in;
- } else {
- sum1 = LONG_SUM(ntohl(oip->ip_dst.s_addr));
- in = nat->nat_outip;
- oip->ip_dst = in;
- }
-
- sum2 = LONG_SUM(ntohl(in.s_addr));
-
- CALC_SUMD(sum1, sum2, sumd);
-
- if (nat->nat_dir == NAT_OUTBOUND) {
- /*
- * Fix IP checksum of the offending IP packet to adjust for
- * the change in the IP address.
- *
- * Normally, you would expect that the ICMP checksum of the
- * ICMP error message needs to be adjusted as well for the
- * IP address change in oip.
- * However, this is a NOP, because the ICMP checksum is
- * calculated over the complete ICMP packet, which includes the
- * changed oip IP addresses and oip->ip_sum. However, these
- * two changes cancel each other out (if the delta for
- * the IP address is x, then the delta for ip_sum is minus x),
- * so no change in the icmp_cksum is necessary.
- *
- * Be careful that nat_dir refers to the direction of the
- * offending IP packet (oip), not to its ICMP response (icmp)
- */
- fix_datacksum(&oip->ip_sum, sumd);
-
- /*
- * Fix UDP pseudo header checksum to compensate for the
- * IP address change.
- */
- if (oip->ip_p == IPPROTO_UDP && udp->uh_sum) {
- /*
- * The UDP checksum is optional, only adjust it
- * if it has been set.
- */
- sum1 = ntohs(udp->uh_sum);
- fix_datacksum(&udp->uh_sum, sumd);
- sum2 = ntohs(udp->uh_sum);
-
- /*
- * Fix ICMP checksum to compensate the UDP
- * checksum adjustment.
- */
- CALC_SUMD(sum1, sum2, sumd);
- sumd2 = sumd;
- }
-
-#if 0
- /*
- * Fix TCP pseudo header checksum to compensate for the
- * IP address change. Before we can do the change, we
- * must make sure that oip is sufficient large to hold
- * the TCP checksum (normally it does not!).
- */
- if (oip->ip_p == IPPROTO_TCP) {
-
- }
-#endif
- } else {
-
- /*
- * Fix IP checksum of the offending IP packet to adjust for
- * the change in the IP address.
- *
- * Normally, you would expect that the ICMP checksum of the
- * ICMP error message needs to be adjusted as well for the
- * IP address change in oip.
- * However, this is a NOP, because the ICMP checksum is
- * calculated over the complete ICMP packet, which includes the
- * changed oip IP addresses and oip->ip_sum. However, these
- * two changes cancel each other out (if the delta for
- * the IP address is x, then the delta for ip_sum is minus x),
- * so no change in the icmp_cksum is necessary.
- *
- * Be careful that nat_dir refers to the direction of the
- * offending IP packet (oip), not to its ICMP response (icmp)
- */
- fix_datacksum(&oip->ip_sum, sumd);
-
-/* XXX FV : without having looked at Solaris source code, it seems unlikely
- * that SOLARIS would compensate this in the kernel (a body of an IP packet
- * in the data section of an ICMP packet). I have the feeling that this should
- * be unconditional, but I'm not in a position to check.
- */
-#if !SOLARIS && !defined(__sgi)
- /*
- * Fix UDP pseudo header checksum to compensate for the
- * IP address change.
- */
- if (oip->ip_p == IPPROTO_UDP && udp->uh_sum) {
- /*
- * The UDP checksum is optional, only adjust it
- * if it has been set
- */
- sum1 = ntohs(udp->uh_sum);
- fix_datacksum(&udp->uh_sum, sumd);
- sum2 = ntohs(udp->uh_sum);
-
- /*
- * Fix ICMP checksum to compensate the UDP
- * checksum adjustment.
- */
- CALC_SUMD(sum1, sum2, sumd);
- sumd2 = sumd;
- }
-
-#if 0
- /*
- * Fix TCP pseudo header checksum to compensate for the
- * IP address change. Before we can do the change, we
- * must make sure that oip is sufficient large to hold
- * the TCP checksum (normally it does not!).
- */
- if (oip->ip_p == IPPROTO_TCP) {
-
- };
-#endif
-
-#endif
- }
-
- if ((flags & IPN_TCPUDP) != 0) {
- tcphdr_t *tcp;
-
- /*
- * XXX - what if this is bogus hl and we go off the end ?
- * In this case, nat_icmpinlookup() will have returned NULL.
- */
- tcp = (tcphdr_t *)udp;
-
- /*
- * Step 2 :
- * For offending TCP/UDP IP packets, translate the ports as
- * well, based on the NAT specification. Of course such
- * a change must be reflected in the ICMP checksum as well.
- *
- * Advance notice : Now it becomes complicated :-)
- *
- * Since the port fields are part of the TCP/UDP checksum
- * of the offending IP packet, you need to adjust that checksum
- * as well... but, if you change, you must change the icmp
- * checksum *again*, to reflect that change.
- *
- * To further complicate: the TCP checksum is not in the first
- * 8 bytes of the offending ip packet, so it most likely is not
- * available (we might have to fix that if the encounter a
- * device that returns more than 8 data bytes on icmp error)
- */
-
- if (nat->nat_oport == tcp->th_dport) {
- if (tcp->th_sport != nat->nat_inport) {
- /*
- * Fix ICMP checksum to compensate port
- * adjustment.
- */
- sum1 = ntohs(tcp->th_sport);
- sum2 = ntohs(nat->nat_inport);
- CALC_SUMD(sum1, sum2, sumd);
- sumd2 += sumd;
- tcp->th_sport = nat->nat_inport;
-
- /*
- * Fix udp checksum to compensate port
- * adjustment. NOTE : the offending IP packet
- * flows the other direction compared to the
- * ICMP message.
- *
- * The UDP checksum is optional, only adjust
- * it if it has been set.
- */
- if (oip->ip_p == IPPROTO_UDP && udp->uh_sum) {
-
- sum1 = ntohs(udp->uh_sum);
- fix_datacksum(&udp->uh_sum, sumd);
- sum2 = ntohs(udp->uh_sum);
-
- /*
- * Fix ICMP checksum to
- * compensate UDP checksum
- * adjustment.
- */
- CALC_SUMD(sum1, sum2, sumd);
- sumd2 += sumd;
- }
- }
- } else {
- if (tcp->th_dport != nat->nat_outport) {
- /*
- * Fix ICMP checksum to compensate port
- * adjustment.
- */
- sum1 = ntohs(tcp->th_dport);
- sum2 = ntohs(nat->nat_outport);
- CALC_SUMD(sum1, sum2, sumd);
- sumd2 += sumd;
- tcp->th_dport = nat->nat_outport;
-
- /*
- * Fix udp checksum to compensate port
- * adjustment. NOTE : the offending IP
- * packet flows the other direction compared
- * to the ICMP message.
- *
- * The UDP checksum is optional, only adjust
- * it if it has been set.
- */
- if (oip->ip_p == IPPROTO_UDP && udp->uh_sum) {
-
- sum1 = ntohs(udp->uh_sum);
- fix_datacksum(&udp->uh_sum, sumd);
- sum2 = ntohs(udp->uh_sum);
-
- /*
- * Fix ICMP checksum to compensate
- * UDP checksum adjustment.
- */
- CALC_SUMD(sum1, sum2, sumd);
- sumd2 += sumd;
- }
- }
- }
- if (sumd2) {
- sumd2 = (sumd2 & 0xffff) + (sumd2 >> 16);
- sumd2 = (sumd2 & 0xffff) + (sumd2 >> 16);
- if (nat->nat_dir == NAT_OUTBOUND) {
- fix_outcksum(&icmp->icmp_cksum, sumd2);
- } else {
- fix_incksum(&icmp->icmp_cksum, sumd2);
- }
- }
- }
- nat->nat_age = fr_defnaticmpage;
- return nat;
-}
-
-
-/*
- * NB: these lookups don't lock access to the list, it assume it has already
- * been done!
- */
-/*
- * Lookup a nat entry based on the mapped destination ip address/port and
- * real source address/port. We use this lookup when receiving a packet,
- * we're looking for a table entry, based on the destination address.
- * NOTE: THE PACKET BEING CHECKED (IF FOUND) HAS A MAPPING ALREADY.
- */
-nat_t *nat_inlookup(ifp, flags, p, src, mapdst, ports, rw)
-void *ifp;
-register u_int flags, p;
-struct in_addr src , mapdst;
-u_32_t ports;
-int rw;
-{
- register u_short sport, dport;
- register nat_t *nat;
- register int nflags;
- register u_32_t dst;
- u_int hv;
-
- dst = mapdst.s_addr;
- dport = ports >> 16;
- sport = ports & 0xffff;
- flags &= IPN_TCPUDP;
-
- hv = NAT_HASH_FN(dst, dport, ipf_nattable_sz);
- nat = nat_table[1][hv];
- for (; nat; nat = nat->nat_hnext[1]) {
- nflags = nat->nat_flags;
- if ((!ifp || ifp == nat->nat_ifp) &&
- nat->nat_oip.s_addr == src.s_addr &&
- nat->nat_outip.s_addr == dst &&
- (((p == 0) && (flags == (nat->nat_flags & IPN_TCPUDP)))
- || (p == nat->nat_p)) && (!flags ||
- (((nat->nat_oport == sport) || (nflags & FI_W_DPORT)) &&
- ((nat->nat_outport == dport) || (nflags & FI_W_SPORT)))))
- return nat;
- }
- if (!nat_stats.ns_wilds || !(flags & IPN_TCPUDP))
- return NULL;
- if (!rw) {
- RWLOCK_EXIT(&ipf_nat);
- }
- hv = NAT_HASH_FN(dst, 0, ipf_nattable_sz);
- if (!rw) {
- WRITE_ENTER(&ipf_nat);
- }
- nat = nat_table[1][hv];
- for (; nat; nat = nat->nat_hnext[1]) {
- nflags = nat->nat_flags;
- if (ifp && ifp != nat->nat_ifp)
- continue;
- if (!(nflags & IPN_TCPUDP))
- continue;
- if (!(nflags & FI_WILDP))
- continue;
- if (nat->nat_oip.s_addr != src.s_addr ||
- nat->nat_outip.s_addr != dst)
- continue;
- if (((nat->nat_oport == sport) || (nflags & FI_W_DPORT)) &&
- ((nat->nat_outport == dport) || (nflags & FI_W_SPORT))) {
- nat_tabmove(nat, ports);
- break;
- }
- }
- if (!rw) {
- MUTEX_DOWNGRADE(&ipf_nat);
- }
- return nat;
-}
-
-
-/*
- * This function is only called for TCP/UDP NAT table entries where the
- * original was placed in the table without hashing on the ports and we now
- * want to include hashing on port numbers.
- */
-static void nat_tabmove(nat, ports)
-nat_t *nat;
-u_32_t ports;
-{
- register u_short sport, dport;
- nat_t **natp;
- u_int hv;
-
- dport = ports >> 16;
- sport = ports & 0xffff;
-
- if (nat->nat_oport == dport) {
- nat->nat_inport = sport;
- nat->nat_outport = sport;
- }
-
- /*
- * Remove the NAT entry from the old location
- */
- if (nat->nat_hnext[0])
- nat->nat_hnext[0]->nat_phnext[0] = nat->nat_phnext[0];
- *nat->nat_phnext[0] = nat->nat_hnext[0];
-
- if (nat->nat_hnext[1])
- nat->nat_hnext[1]->nat_phnext[1] = nat->nat_phnext[1];
- *nat->nat_phnext[1] = nat->nat_hnext[1];
-
- /*
- * Add into the NAT table in the new position
- */
- hv = NAT_HASH_FN(nat->nat_inip.s_addr, sport, ipf_nattable_sz);
- natp = &nat_table[0][hv];
- if (*natp)
- (*natp)->nat_phnext[0] = &nat->nat_hnext[0];
- nat->nat_phnext[0] = natp;
- nat->nat_hnext[0] = *natp;
- *natp = nat;
-
- hv = NAT_HASH_FN(nat->nat_outip.s_addr, sport, ipf_nattable_sz);
- natp = &nat_table[1][hv];
- if (*natp)
- (*natp)->nat_phnext[1] = &nat->nat_hnext[1];
- nat->nat_phnext[1] = natp;
- nat->nat_hnext[1] = *natp;
- *natp = nat;
-}
-
-
-/*
- * Lookup a nat entry based on the source 'real' ip address/port and
- * destination address/port. We use this lookup when sending a packet out,
- * we're looking for a table entry, based on the source address.
- * NOTE: THE PACKET BEING CHECKED (IF FOUND) HAS A MAPPING ALREADY.
- */
-nat_t *nat_outlookup(ifp, flags, p, src, dst, ports, rw)
-void *ifp;
-register u_int flags, p;
-struct in_addr src , dst;
-u_32_t ports;
-int rw;
-{
- register u_short sport, dport;
- register nat_t *nat;
- register int nflags;
- u_32_t srcip;
- u_int hv;
-
- sport = ports & 0xffff;
- dport = ports >> 16;
- flags &= IPN_TCPUDP;
- srcip = src.s_addr;
-
- hv = NAT_HASH_FN(srcip, sport, ipf_nattable_sz);
- nat = nat_table[0][hv];
- for (; nat; nat = nat->nat_hnext[0]) {
- nflags = nat->nat_flags;
-
- if ((!ifp || ifp == nat->nat_ifp) &&
- nat->nat_inip.s_addr == srcip &&
- nat->nat_oip.s_addr == dst.s_addr &&
- (((p == 0) && (flags == (nflags & IPN_TCPUDP)))
- || (p == nat->nat_p)) && (!flags ||
- ((nat->nat_inport == sport || nflags & FI_W_SPORT) &&
- (nat->nat_oport == dport || nflags & FI_W_DPORT))))
- return nat;
- }
- if (!nat_stats.ns_wilds || !(flags & IPN_TCPUDP))
- return NULL;
- if (!rw) {
- RWLOCK_EXIT(&ipf_nat);
- }
- hv = NAT_HASH_FN(srcip, 0, ipf_nattable_sz);
- if (!rw) {
- WRITE_ENTER(&ipf_nat);
- }
- nat = nat_table[0][hv];
- for (; nat; nat = nat->nat_hnext[0]) {
- nflags = nat->nat_flags;
- if (ifp && ifp != nat->nat_ifp)
- continue;
- if (!(nflags & IPN_TCPUDP))
- continue;
- if (!(nflags & FI_WILDP))
- continue;
- if ((nat->nat_inip.s_addr != srcip) ||
- (nat->nat_oip.s_addr != dst.s_addr))
- continue;
- if (((nat->nat_inport == sport) || (nflags & FI_W_SPORT)) &&
- ((nat->nat_oport == dport) || (nflags & FI_W_DPORT))) {
- nat_tabmove(nat, ports);
- break;
- }
- }
- if (!rw) {
- MUTEX_DOWNGRADE(&ipf_nat);
- }
- return nat;
-}
-
-
-/*
- * Lookup the NAT tables to search for a matching redirect
- */
-nat_t *nat_lookupredir(np)
-register natlookup_t *np;
-{
- u_32_t ports;
- nat_t *nat;
-
- ports = (np->nl_outport << 16) | np->nl_inport;
- /*
- * If nl_inip is non null, this is a lookup based on the real
- * ip address. Else, we use the fake.
- */
- if ((nat = nat_outlookup(NULL, np->nl_flags, 0, np->nl_inip,
- np->nl_outip, ports, 0))) {
- np->nl_realip = nat->nat_outip;
- np->nl_realport = nat->nat_outport;
- }
- return nat;
-}
-
-
-static int nat_match(fin, np, ip)
-fr_info_t *fin;
-ipnat_t *np;
-ip_t *ip;
-{
- frtuc_t *ft;
-
- if (ip->ip_v != 4)
- return 0;
-
- if (np->in_p && ip->ip_p != np->in_p)
- return 0;
- if (fin->fin_out) {
- if (!(np->in_redir & (NAT_MAP|NAT_MAPBLK)))
- return 0;
- if (((fin->fin_fi.fi_saddr & np->in_inmsk) != np->in_inip)
- ^ ((np->in_flags & IPN_NOTSRC) != 0))
- return 0;
- if (((fin->fin_fi.fi_daddr & np->in_srcmsk) != np->in_srcip)
- ^ ((np->in_flags & IPN_NOTDST) != 0))
- return 0;
- } else {
- if (!(np->in_redir & NAT_REDIRECT))
- return 0;
- if (((fin->fin_fi.fi_saddr & np->in_srcmsk) != np->in_srcip)
- ^ ((np->in_flags & IPN_NOTSRC) != 0))
- return 0;
- if (((fin->fin_fi.fi_daddr & np->in_outmsk) != np->in_outip)
- ^ ((np->in_flags & IPN_NOTDST) != 0))
- return 0;
- }
-
- ft = &np->in_tuc;
- if (!(fin->fin_fi.fi_fl & FI_TCPUDP) ||
- (fin->fin_fi.fi_fl & FI_SHORT) || (ip->ip_off & IP_OFFMASK)) {
- if (ft->ftu_scmp || ft->ftu_dcmp)
- return 0;
- return 1;
- }
-
- return fr_tcpudpchk(ft, fin);
-}
-
-
-/*
- * Packets going out on the external interface go through this.
- * Here, the source address requires alteration, if anything.
- */
-int ip_natout(ip, fin)
-ip_t *ip;
-fr_info_t *fin;
-{
- register ipnat_t *np = NULL;
- register u_32_t ipa;
- tcphdr_t *tcp = NULL;
- u_short sport = 0, dport = 0, *csump = NULL;
- struct ifnet *ifp;
- int natadd = 1;
- frentry_t *fr;
- u_int nflags = 0, hv, msk;
- u_32_t iph;
- nat_t *nat;
- int i;
-
- if (nat_list == NULL || (fr_nat_lock))
- return 0;
-
- if ((fr = fin->fin_fr) && !(fr->fr_flags & FR_DUP) &&
- fr->fr_tif.fd_ifp && fr->fr_tif.fd_ifp != (void *)-1)
- ifp = fr->fr_tif.fd_ifp;
- else
- ifp = fin->fin_ifp;
-
- if (!(ip->ip_off & IP_OFFMASK) && !(fin->fin_fi.fi_fl & FI_SHORT)) {
- if (ip->ip_p == IPPROTO_TCP)
- nflags = IPN_TCP;
- else if (ip->ip_p == IPPROTO_UDP)
- nflags = IPN_UDP;
- if ((nflags & IPN_TCPUDP)) {
- tcp = (tcphdr_t *)fin->fin_dp;
- sport = tcp->th_sport;
- dport = tcp->th_dport;
- }
- }
-
- ipa = ip->ip_src.s_addr;
-
- READ_ENTER(&ipf_nat);
-
- if ((ip->ip_p == IPPROTO_ICMP) &&
- (nat = nat_icmp(ip, fin, &nflags, NAT_OUTBOUND)))
- ;
- else if ((ip->ip_off & (IP_OFFMASK|IP_MF)) &&
- (nat = ipfr_nat_knownfrag(ip, fin)))
- natadd = 0;
- else if ((nat = nat_outlookup(ifp, nflags, (u_int)ip->ip_p,
- ip->ip_src, ip->ip_dst,
- (dport << 16) | sport, 0))) {
- nflags = nat->nat_flags;
- if ((nflags & (FI_W_SPORT|FI_W_DPORT)) != 0) {
- if ((nflags & FI_W_SPORT) &&
- (nat->nat_inport != sport))
- nat->nat_inport = sport;
- else if ((nflags & FI_W_DPORT) &&
- (nat->nat_oport != dport))
- nat->nat_oport = dport;
- if (nat->nat_outport == 0)
- nat->nat_outport = sport;
- nat->nat_flags &= ~(FI_W_DPORT|FI_W_SPORT);
- nflags = nat->nat_flags;
- nat_stats.ns_wilds--;
- }
- } else {
- RWLOCK_EXIT(&ipf_nat);
- WRITE_ENTER(&ipf_nat);
- /*
- * If there is no current entry in the nat table for this IP#,
- * create one for it (if there is a matching rule).
- */
- msk = 0xffffffff;
- i = 32;
-maskloop:
- iph = ipa & htonl(msk);
- hv = NAT_HASH_FN(iph, 0, ipf_natrules_sz);
- for (np = nat_rules[hv]; np; np = np->in_mnext)
- {
- if ((np->in_ifp && (np->in_ifp != ifp)) ||
- !np->in_space)
- continue;
- if ((np->in_flags & IPN_RF) &&
- !(np->in_flags & nflags))
- continue;
- if (np->in_flags & IPN_FILTER) {
- if (!nat_match(fin, np, ip))
- continue;
- } else if ((ipa & np->in_inmsk) != np->in_inip)
- continue;
- if (np->in_redir & (NAT_MAP|NAT_MAPBLK)) {
- if (*np->in_plabel && !appr_ok(ip, tcp, np))
- continue;
- /*
- * If it's a redirection, then we don't want to
- * create new outgoing port stuff.
- * Redirections are only for incoming
- * connections.
- */
- if (!(np->in_redir & (NAT_MAP|NAT_MAPBLK)))
- continue;
- if ((nat = nat_new(np, ip, fin, (u_int)nflags,
- NAT_OUTBOUND))) {
- np->in_hits++;
- break;
- }
- }
- }
- if ((np == NULL) && (i > 0)) {
- do {
- i--;
- msk <<= 1;
- } while ((i >= 0) && ((nat_masks & (1 << i)) == 0));
- if (i >= 0)
- goto maskloop;
- }
- MUTEX_DOWNGRADE(&ipf_nat);
- }
-
- /*
- * NOTE: ipf_nat must now only be held as a read lock
- */
- if (nat) {
- np = nat->nat_ptr;
- if (natadd && (fin->fin_fi.fi_fl & FI_FRAG) &&
- np && (np->in_flags & IPN_FRAG))
- ipfr_nat_newfrag(ip, fin, 0, nat);
- MUTEX_ENTER(&nat->nat_lock);
- nat->nat_age = fr_defnatage;
- nat->nat_bytes += ip->ip_len;
- nat->nat_pkts++;
- MUTEX_EXIT(&nat->nat_lock);
-
- /*
- * Fix up checksums, not by recalculating them, but
- * simply computing adjustments.
- */
- if (nflags == IPN_ICMPERR) {
- u_32_t s1, s2, sumd;
-
- s1 = LONG_SUM(ntohl(ip->ip_src.s_addr));
- s2 = LONG_SUM(ntohl(nat->nat_outip.s_addr));
- CALC_SUMD(s1, s2, sumd);
-
- if (nat->nat_dir == NAT_OUTBOUND)
- fix_incksum(&ip->ip_sum, sumd);
- else
- fix_outcksum(&ip->ip_sum, sumd);
- }
-#if SOLARIS || defined(__sgi)
- else {
- if (nat->nat_dir == NAT_OUTBOUND)
- fix_outcksum(&ip->ip_sum, nat->nat_ipsumd);
- else
- fix_incksum(&ip->ip_sum, nat->nat_ipsumd);
- }
-#endif
- ip->ip_src = nat->nat_outip;
-
- if (!(ip->ip_off & IP_OFFMASK) &&
- !(fin->fin_fi.fi_fl & FI_SHORT)) {
-
- if ((nat->nat_outport != 0) && (nflags & IPN_TCPUDP)) {
- tcp->th_sport = nat->nat_outport;
- fin->fin_data[0] = ntohs(tcp->th_sport);
- }
-
- if (ip->ip_p == IPPROTO_TCP) {
- csump = &tcp->th_sum;
- MUTEX_ENTER(&nat->nat_lock);
- fr_tcp_age(&nat->nat_age,
- nat->nat_tcpstate, fin, 1);
- if (nat->nat_age < fr_defnaticmpage)
- nat->nat_age = fr_defnaticmpage;
-#ifdef LARGE_NAT
- else if (nat->nat_age > fr_defnatage)
- nat->nat_age = fr_defnatage;
-#endif
- /*
- * Increase this because we may have
- * "keep state" following this too and
- * packet storms can occur if this is
- * removed too quickly.
- */
- if (nat->nat_age == fr_tcpclosed)
- nat->nat_age = fr_tcplastack;
- MUTEX_EXIT(&nat->nat_lock);
- } else if (ip->ip_p == IPPROTO_UDP) {
- udphdr_t *udp = (udphdr_t *)tcp;
-
- if (udp->uh_sum)
- csump = &udp->uh_sum;
- } else if (ip->ip_p == IPPROTO_ICMP) {
- nat->nat_age = fr_defnaticmpage;
- }
-
- if (csump) {
- if (nat->nat_dir == NAT_OUTBOUND)
- fix_outcksum(csump, nat->nat_sumd[1]);
- else
- fix_incksum(csump, nat->nat_sumd[1]);
- }
- }
-
- if ((np->in_apr != NULL) && (np->in_dport == 0 ||
- (tcp != NULL && dport == np->in_dport))) {
- i = appr_check(ip, fin, nat);
- if (i == 0)
- i = 1;
- } else
- i = 1;
- ATOMIC_INCL(nat_stats.ns_mapped[1]);
- RWLOCK_EXIT(&ipf_nat); /* READ */
- return i;
- }
- RWLOCK_EXIT(&ipf_nat); /* READ/WRITE */
- return 0;
-}
-
-
-/*
- * Packets coming in from the external interface go through this.
- * Here, the destination address requires alteration, if anything.
- */
-int ip_natin(ip, fin)
-ip_t *ip;
-fr_info_t *fin;
-{
- register struct in_addr src;
- register struct in_addr in;
- register ipnat_t *np;
- u_int nflags = 0, natadd = 1, hv, msk;
- struct ifnet *ifp = fin->fin_ifp;
- tcphdr_t *tcp = NULL;
- u_short sport = 0, dport = 0, *csump = NULL;
- nat_t *nat;
- u_32_t iph;
- int i;
-
- if ((nat_list == NULL) || (ip->ip_v != 4) || (fr_nat_lock))
- return 0;
-
- if (!(ip->ip_off & IP_OFFMASK) && !(fin->fin_fi.fi_fl & FI_SHORT)) {
- if (ip->ip_p == IPPROTO_TCP)
- nflags = IPN_TCP;
- else if (ip->ip_p == IPPROTO_UDP)
- nflags = IPN_UDP;
- if ((nflags & IPN_TCPUDP)) {
- tcp = (tcphdr_t *)fin->fin_dp;
- dport = tcp->th_dport;
- sport = tcp->th_sport;
- }
- }
-
- in = ip->ip_dst;
- /* make sure the source address is to be redirected */
- src = ip->ip_src;
-
- READ_ENTER(&ipf_nat);
-
- if ((ip->ip_p == IPPROTO_ICMP) &&
- (nat = nat_icmp(ip, fin, &nflags, NAT_INBOUND)))
- ;
- else if ((ip->ip_off & (IP_OFFMASK|IP_MF)) &&
- (nat = ipfr_nat_knownfrag(ip, fin)))
- natadd = 0;
- else if ((nat = nat_inlookup(fin->fin_ifp, nflags, (u_int)ip->ip_p,
- ip->ip_src, in, (dport << 16) | sport,
- 0))) {
- nflags = nat->nat_flags;
- if ((nflags & (FI_W_SPORT|FI_W_DPORT)) != 0) {
- if ((nat->nat_oport != sport) && (nflags & FI_W_DPORT))
- nat->nat_oport = sport;
- else if ((nat->nat_outport != dport) &&
- (nflags & FI_W_SPORT))
- nat->nat_outport = dport;
- nat->nat_flags &= ~(FI_W_SPORT|FI_W_DPORT);
- nflags = nat->nat_flags;
- nat_stats.ns_wilds--;
- }
- } else {
- RWLOCK_EXIT(&ipf_nat);
- WRITE_ENTER(&ipf_nat);
- /*
- * If there is no current entry in the nat table for this IP#,
- * create one for it (if there is a matching rule).
- */
- msk = 0xffffffff;
- i = 32;
-maskloop:
- iph = in.s_addr & htonl(msk);
- hv = NAT_HASH_FN(iph, 0, ipf_rdrrules_sz);
- for (np = rdr_rules[hv]; np; np = np->in_rnext) {
- if ((np->in_ifp && (np->in_ifp != ifp)) ||
- (np->in_p && (np->in_p != ip->ip_p)) ||
- (np->in_flags && !(nflags & np->in_flags)))
- continue;
- if (np->in_flags & IPN_FILTER) {
- if (!nat_match(fin, np, ip))
- continue;
- } else if ((in.s_addr & np->in_outmsk) != np->in_outip)
- continue;
- if ((np->in_redir & NAT_REDIRECT) &&
- (!np->in_pmin || (np->in_flags & IPN_FILTER) ||
- ((ntohs(np->in_pmax) >= ntohs(dport)) &&
- (ntohs(dport) >= ntohs(np->in_pmin)))))
- if ((nat = nat_new(np, ip, fin, nflags,
- NAT_INBOUND))) {
- np->in_hits++;
- break;
- }
- }
-
- if ((np == NULL) && (i > 0)) {
- do {
- i--;
- msk <<= 1;
- } while ((i >= 0) && ((rdr_masks & (1 << i)) == 0));
- if (i >= 0)
- goto maskloop;
- }
- MUTEX_DOWNGRADE(&ipf_nat);
- }
-
- /*
- * NOTE: ipf_nat must now only be held as a read lock
- */
- if (nat) {
- np = nat->nat_ptr;
- fin->fin_fr = nat->nat_fr;
- if (natadd && (fin->fin_fi.fi_fl & FI_FRAG) &&
- np && (np->in_flags & IPN_FRAG))
- ipfr_nat_newfrag(ip, fin, 0, nat);
- if ((np->in_apr != NULL) && (np->in_dport == 0 ||
- (tcp != NULL && sport == np->in_dport))) {
- i = appr_check(ip, fin, nat);
- if (i == -1) {
- RWLOCK_EXIT(&ipf_nat);
- return i;
- }
- }
-
- MUTEX_ENTER(&nat->nat_lock);
- if (nflags != IPN_ICMPERR)
- nat->nat_age = fr_defnatage;
-
- nat->nat_bytes += ip->ip_len;
- nat->nat_pkts++;
- MUTEX_EXIT(&nat->nat_lock);
- ip->ip_dst = nat->nat_inip;
- fin->fin_fi.fi_daddr = nat->nat_inip.s_addr;
-
- /*
- * Fix up checksums, not by recalculating them, but
- * simply computing adjustments.
- */
-#if SOLARIS || defined(__sgi)
- if (nat->nat_dir == NAT_OUTBOUND)
- fix_incksum(&ip->ip_sum, nat->nat_ipsumd);
- else
- fix_outcksum(&ip->ip_sum, nat->nat_ipsumd);
-#endif
- if (!(ip->ip_off & IP_OFFMASK) &&
- !(fin->fin_fi.fi_fl & FI_SHORT)) {
-
- if ((nat->nat_inport != 0) && (nflags & IPN_TCPUDP)) {
- tcp->th_dport = nat->nat_inport;
- fin->fin_data[1] = ntohs(tcp->th_dport);
- }
-
- if (ip->ip_p == IPPROTO_TCP) {
- csump = &tcp->th_sum;
- MUTEX_ENTER(&nat->nat_lock);
- fr_tcp_age(&nat->nat_age,
- nat->nat_tcpstate, fin, 0);
- if (nat->nat_age < fr_defnaticmpage)
- nat->nat_age = fr_defnaticmpage;
-#ifdef LARGE_NAT
- else if (nat->nat_age > fr_defnatage)
- nat->nat_age = fr_defnatage;
-#endif
- /*
- * Increase this because we may have
- * "keep state" following this too and
- * packet storms can occur if this is
- * removed too quickly.
- */
- if (nat->nat_age == fr_tcpclosed)
- nat->nat_age = fr_tcplastack;
- MUTEX_EXIT(&nat->nat_lock);
- } else if (ip->ip_p == IPPROTO_UDP) {
- udphdr_t *udp = (udphdr_t *)tcp;
-
- if (udp->uh_sum)
- csump = &udp->uh_sum;
- } else if (ip->ip_p == IPPROTO_ICMP) {
- nat->nat_age = fr_defnaticmpage;
- }
-
- if (csump) {
- if (nat->nat_dir == NAT_OUTBOUND)
- fix_incksum(csump, nat->nat_sumd[0]);
- else
- fix_outcksum(csump, nat->nat_sumd[0]);
- }
- }
- ATOMIC_INCL(nat_stats.ns_mapped[0]);
- RWLOCK_EXIT(&ipf_nat); /* READ */
- return 1;
- }
- RWLOCK_EXIT(&ipf_nat); /* READ/WRITE */
- return 0;
-}
-
-
-/*
- * Free all memory used by NAT structures allocated at runtime.
- */
-void ip_natunload()
-{
- WRITE_ENTER(&ipf_nat);
- (void) nat_clearlist();
- (void) nat_flushtable();
- RWLOCK_EXIT(&ipf_nat);
-
- if (nat_table[0] != NULL) {
- KFREES(nat_table[0], sizeof(nat_t *) * ipf_nattable_sz);
- nat_table[0] = NULL;
- }
- if (nat_table[1] != NULL) {
- KFREES(nat_table[1], sizeof(nat_t *) * ipf_nattable_sz);
- nat_table[1] = NULL;
- }
- if (nat_rules != NULL) {
- KFREES(nat_rules, sizeof(ipnat_t *) * ipf_natrules_sz);
- nat_rules = NULL;
- }
- if (rdr_rules != NULL) {
- KFREES(rdr_rules, sizeof(ipnat_t *) * ipf_rdrrules_sz);
- rdr_rules = NULL;
- }
- if (maptable != NULL) {
- KFREES(maptable, sizeof(hostmap_t *) * ipf_hostmap_sz);
- maptable = NULL;
- }
-}
-
-
-/*
- * Slowly expire held state for NAT entries. Timeouts are set in
- * expectation of this being called twice per second.
- */
-void ip_natexpire()
-{
- register struct nat *nat, **natp;
-#if defined(_KERNEL) && !SOLARIS
- int s;
-#endif
-
- SPL_NET(s);
- WRITE_ENTER(&ipf_nat);
- for (natp = &nat_instances; (nat = *natp); ) {
- nat->nat_age--;
- if (nat->nat_age) {
- natp = &nat->nat_next;
- continue;
- }
- *natp = nat->nat_next;
-#ifdef IPFILTER_LOG
- nat_log(nat, NL_EXPIRE);
-#endif
- nat_delete(nat);
- nat_stats.ns_expire++;
- }
- RWLOCK_EXIT(&ipf_nat);
- SPL_X(s);
-}
-
-
-/*
- */
-void ip_natsync(ifp)
-void *ifp;
-{
- register ipnat_t *n;
- register nat_t *nat;
- register u_32_t sum1, sum2, sumd;
- struct in_addr in;
- ipnat_t *np;
- void *ifp2;
-#if defined(_KERNEL) && !SOLARIS
- int s;
-#endif
-
- /*
- * Change IP addresses for NAT sessions for any protocol except TCP
- * since it will break the TCP connection anyway.
- */
- SPL_NET(s);
- WRITE_ENTER(&ipf_nat);
- for (nat = nat_instances; nat; nat = nat->nat_next)
- if (((ifp == NULL) || (ifp == nat->nat_ifp)) &&
- !(nat->nat_flags & IPN_TCP) && (np = nat->nat_ptr) &&
- (np->in_outmsk == 0xffffffff) && !np->in_nip) {
- ifp2 = nat->nat_ifp;
- /*
- * Change the map-to address to be the same as the
- * new one.
- */
- sum1 = nat->nat_outip.s_addr;
- if (fr_ifpaddr(4, ifp2, &in) != -1)
- nat->nat_outip = in;
- sum2 = nat->nat_outip.s_addr;
-
- if (sum1 == sum2)
- continue;
- /*
- * Readjust the checksum adjustment to take into
- * account the new IP#.
- */
- CALC_SUMD(sum1, sum2, sumd);
- /* XXX - dont change for TCP when solaris does
- * hardware checksumming.
- */
- sumd += nat->nat_sumd[0];
- nat->nat_sumd[0] = (sumd & 0xffff) + (sumd >> 16);
- nat->nat_sumd[1] = nat->nat_sumd[0];
- }
-
- for (n = nat_list; (n != NULL); n = n->in_next)
- if (n->in_ifp == ifp) {
- n->in_ifp = (void *)GETUNIT(n->in_ifname, 4);
- if (!n->in_ifp)
- n->in_ifp = (void *)-1;
- }
- RWLOCK_EXIT(&ipf_nat);
- SPL_X(s);
-}
-
-
-#ifdef IPFILTER_LOG
-void nat_log(nat, type)
-struct nat *nat;
-u_int type;
-{
- struct ipnat *np;
- struct natlog natl;
- void *items[1];
- size_t sizes[1];
- int rulen, types[1];
-
- natl.nl_inip = nat->nat_inip;
- natl.nl_outip = nat->nat_outip;
- natl.nl_origip = nat->nat_oip;
- natl.nl_bytes = nat->nat_bytes;
- natl.nl_pkts = nat->nat_pkts;
- natl.nl_origport = nat->nat_oport;
- natl.nl_inport = nat->nat_inport;
- natl.nl_outport = nat->nat_outport;
- natl.nl_p = nat->nat_p;
- natl.nl_type = type;
- natl.nl_rule = -1;
-#ifndef LARGE_NAT
- if (nat->nat_ptr != NULL) {
- for (rulen = 0, np = nat_list; np; np = np->in_next, rulen++)
- if (np == nat->nat_ptr) {
- natl.nl_rule = rulen;
- break;
- }
- }
-#endif
- items[0] = &natl;
- sizes[0] = sizeof(natl);
- types[0] = 0;
-
- (void) ipllog(IPL_LOGNAT, NULL, items, sizes, types, 1);
-}
-#endif
diff --git a/sys/contrib/ipfilter/netinet/ip_nat.h b/sys/contrib/ipfilter/netinet/ip_nat.h
deleted file mode 100644
index afa7e14bd578..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_nat.h
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * Copyright (C) 1995-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * @(#)ip_nat.h 1.5 2/4/96
- * $Id: ip_nat.h,v 2.17.2.14 2000/11/18 03:58:04 darrenr Exp $
- * $FreeBSD$
- */
-
-#ifndef __IP_NAT_H__
-#define __IP_NAT_H__
-
-#ifndef SOLARIS
-#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
-#endif
-
-#if defined(__STDC__) || defined(__GNUC__)
-#define SIOCADNAT _IOW('r', 60, struct ipnat *)
-#define SIOCRMNAT _IOW('r', 61, struct ipnat *)
-#define SIOCGNATS _IOWR('r', 62, struct natstat *)
-#define SIOCGNATL _IOWR('r', 63, struct natlookup *)
-#else
-#define SIOCADNAT _IOW(r, 60, struct ipnat *)
-#define SIOCRMNAT _IOW(r, 61, struct ipnat *)
-#define SIOCGNATS _IOWR(r, 62, struct natstat *)
-#define SIOCGNATL _IOWR(r, 63, struct natlookup *)
-#endif
-
-#undef LARGE_NAT /* define this if you're setting up a system to NAT
- * LARGE numbers of networks/hosts - i.e. in the
- * hundreds or thousands. In such a case, you should
- * also change the RDR_SIZE and NAT_SIZE below to more
- * appropriate sizes. The figures below were used for
- * a setup with 1000-2000 networks to NAT.
- */
-#define NAT_SIZE 127
-#define RDR_SIZE 127
-#define HOSTMAP_SIZE 127
-#define NAT_TABLE_SZ 127
-#ifdef LARGE_NAT
-#undef NAT_SIZE
-#undef RDR_SIZE
-#undef NAT_TABLE_SZ
-#undef HOSTMAP_SIZE 127
-#define NAT_SIZE 2047
-#define RDR_SIZE 2047
-#define NAT_TABLE_SZ 16383
-#define HOSTMAP_SIZE 8191
-#endif
-#ifndef APR_LABELLEN
-#define APR_LABELLEN 16
-#endif
-#define NAT_HW_CKSUM 0x80000000
-
-#define DEF_NAT_AGE 1200 /* 10 minutes (600 seconds) */
-
-struct ap_session;
-
-typedef struct nat {
- u_long nat_age;
- int nat_flags;
- u_32_t nat_sumd[2];
- u_32_t nat_ipsumd;
- void *nat_data;
- struct ap_session *nat_aps; /* proxy session */
- struct frentry *nat_fr; /* filter rule ptr if appropriate */
- struct in_addr nat_inip;
- struct in_addr nat_outip;
- struct in_addr nat_oip; /* other ip */
- U_QUAD_T nat_pkts;
- U_QUAD_T nat_bytes;
- u_short nat_oport; /* other port */
- u_short nat_inport;
- u_short nat_outport;
- u_short nat_use;
- u_char nat_tcpstate[2];
- u_char nat_p; /* protocol for NAT */
- struct ipnat *nat_ptr; /* pointer back to the rule */
- struct hostmap *nat_hm;
- struct nat *nat_next;
- struct nat *nat_hnext[2];
- struct nat **nat_phnext[2];
- void *nat_ifp;
- int nat_dir;
- char nat_ifname[IFNAMSIZ];
-#if SOLARIS || defined(__sgi)
- kmutex_t nat_lock;
-#endif
-} nat_t;
-
-typedef struct ipnat {
- struct ipnat *in_next;
- struct ipnat *in_rnext;
- struct ipnat **in_prnext;
- struct ipnat *in_mnext;
- struct ipnat **in_pmnext;
- void *in_ifp;
- void *in_apr;
- u_long in_space;
- u_int in_use;
- u_int in_hits;
- struct in_addr in_nextip;
- u_short in_pnext;
- u_short in_ippip; /* IP #'s per IP# */
- u_32_t in_flags; /* From here to in_dport must be reflected */
- u_short in_spare;
- u_short in_ppip; /* ports per IP */
- u_short in_port[2]; /* correctly in IPN_CMPSIZ */
- struct in_addr in_in[2];
- struct in_addr in_out[2];
- struct in_addr in_src[2];
- struct frtuc in_tuc;
- int in_redir; /* 0 if it's a mapping, 1 if it's a hard redir */
- char in_ifname[IFNAMSIZ];
- char in_plabel[APR_LABELLEN]; /* proxy label */
- char in_p; /* protocol */
-} ipnat_t;
-
-#define in_pmin in_port[0] /* Also holds static redir port */
-#define in_pmax in_port[1]
-#define in_nip in_nextip.s_addr
-#define in_inip in_in[0].s_addr
-#define in_inmsk in_in[1].s_addr
-#define in_outip in_out[0].s_addr
-#define in_outmsk in_out[1].s_addr
-#define in_srcip in_src[0].s_addr
-#define in_srcmsk in_src[1].s_addr
-#define in_scmp in_tuc.ftu_scmp
-#define in_dcmp in_tuc.ftu_dcmp
-#define in_stop in_tuc.ftu_stop
-#define in_dtop in_tuc.ftu_dtop
-#define in_sport in_tuc.ftu_sport
-#define in_dport in_tuc.ftu_dport
-
-#define NAT_OUTBOUND 0
-#define NAT_INBOUND 1
-
-#define NAT_MAP 0x01
-#define NAT_REDIRECT 0x02
-#define NAT_BIMAP (NAT_MAP|NAT_REDIRECT)
-#define NAT_MAPBLK 0x04
-/* 0x100 reserved for FI_W_SPORT */
-/* 0x200 reserved for FI_W_DPORT */
-/* 0x400 reserved for FI_W_SADDR */
-/* 0x800 reserved for FI_W_DADDR */
-/* 0x1000 reserved for FI_W_NEWFR */
-
-#define MAPBLK_MINPORT 1024 /* don't use reserved ports for src port */
-#define USABLE_PORTS (65536 - MAPBLK_MINPORT)
-
-#define IPN_CMPSIZ (sizeof(ipnat_t) - offsetof(ipnat_t, in_flags))
-
-typedef struct natlookup {
- struct in_addr nl_inip;
- struct in_addr nl_outip;
- struct in_addr nl_realip;
- int nl_flags;
- u_short nl_inport;
- u_short nl_outport;
- u_short nl_realport;
-} natlookup_t;
-
-
-typedef struct nat_save {
- void *ipn_next;
- struct nat ipn_nat;
- struct ipnat ipn_ipnat;
- struct frentry ipn_fr;
- int ipn_dsize;
- char ipn_data[4];
-} nat_save_t;
-
-#define ipn_rule ipn_nat.nat_fr
-
-typedef struct natget {
- void *ng_ptr;
- int ng_sz;
-} natget_t;
-
-
-typedef struct hostmap {
- struct hostmap *hm_next;
- struct hostmap **hm_pnext;
- struct ipnat *hm_ipnat;
- struct in_addr hm_realip;
- struct in_addr hm_mapip;
- int hm_ref;
-} hostmap_t;
-
-
-typedef struct natstat {
- u_long ns_mapped[2];
- u_long ns_rules;
- u_long ns_added;
- u_long ns_expire;
- u_long ns_inuse;
- u_long ns_logged;
- u_long ns_logfail;
- u_long ns_memfail;
- u_long ns_badnat;
- nat_t **ns_table[2];
- ipnat_t *ns_list;
- void *ns_apslist;
- u_int ns_nattab_sz;
- u_int ns_rultab_sz;
- u_int ns_rdrtab_sz;
- nat_t *ns_instances;
- u_int ns_wilds;
-} natstat_t;
-
-#define IPN_ANY 0x000
-#define IPN_TCP 0x001
-#define IPN_UDP 0x002
-#define IPN_TCPUDP (IPN_TCP|IPN_UDP)
-#define IPN_DELETE 0x004
-#define IPN_ICMPERR 0x008
-#define IPN_RF (IPN_TCPUDP|IPN_DELETE|IPN_ICMPERR)
-#define IPN_AUTOPORTMAP 0x010
-#define IPN_IPRANGE 0x020
-#define IPN_USERFLAGS (IPN_TCPUDP|IPN_AUTOPORTMAP|IPN_IPRANGE|IPN_SPLIT|\
- IPN_ROUNDR|IPN_FILTER|IPN_NOTSRC|IPN_NOTDST)
-#define IPN_FILTER 0x040
-#define IPN_SPLIT 0x080
-#define IPN_ROUNDR 0x100
-#define IPN_NOTSRC 0x080000
-#define IPN_NOTDST 0x100000
-#define IPN_FRAG 0x200000
-
-
-typedef struct natlog {
- struct in_addr nl_origip;
- struct in_addr nl_outip;
- struct in_addr nl_inip;
- u_short nl_origport;
- u_short nl_outport;
- u_short nl_inport;
- u_short nl_type;
- int nl_rule;
- U_QUAD_T nl_pkts;
- U_QUAD_T nl_bytes;
- u_char nl_p;
-} natlog_t;
-
-
-#define NL_NEWMAP NAT_MAP
-#define NL_NEWRDR NAT_REDIRECT
-#define NL_NEWBIMAP NAT_BIMAP
-#define NL_NEWBLOCK NAT_MAPBLK
-#define NL_FLUSH 0xfffe
-#define NL_EXPIRE 0xffff
-
-#define NAT_HASH_FN(k,l,m) (((k) + ((k) >> 12) + l) % (m))
-
-#define LONG_SUM(in) (((in) & 0xffff) + ((in) >> 16))
-
-#define CALC_SUMD(s1, s2, sd) { \
- (s1) = ((s1) & 0xffff) + ((s1) >> 16); \
- (s2) = ((s2) & 0xffff) + ((s2) >> 16); \
- /* Do it twice */ \
- (s1) = ((s1) & 0xffff) + ((s1) >> 16); \
- (s2) = ((s2) & 0xffff) + ((s2) >> 16); \
- /* Because ~1 == -2, We really need ~1 == -1 */ \
- if ((s1) > (s2)) (s2)--; \
- (sd) = (s2) - (s1); \
- (sd) = ((sd) & 0xffff) + ((sd) >> 16); }
-
-
-extern u_int ipf_nattable_sz;
-extern u_int ipf_natrules_sz;
-extern u_int ipf_rdrrules_sz;
-extern int fr_nat_lock;
-extern void ip_natsync __P((void *));
-extern u_long fr_defnatage;
-extern u_long fr_defnaticmpage;
-extern nat_t **nat_table[2];
-extern nat_t *nat_instances;
-extern ipnat_t **nat_rules;
-extern ipnat_t **rdr_rules;
-extern natstat_t nat_stats;
-#if defined(__NetBSD__) || defined(__OpenBSD__) || (__FreeBSD_version >= 300003)
-extern int nat_ioctl __P((caddr_t, u_long, int));
-#else
-extern int nat_ioctl __P((caddr_t, int, int));
-#endif
-extern int nat_init __P((void));
-extern nat_t *nat_new __P((ipnat_t *, ip_t *, fr_info_t *, u_int, int));
-extern nat_t *nat_outlookup __P((void *, u_int, u_int, struct in_addr,
- struct in_addr, u_32_t, int));
-extern nat_t *nat_inlookup __P((void *, u_int, u_int, struct in_addr,
- struct in_addr, u_32_t, int));
-extern nat_t *nat_maplookup __P((void *, u_int, struct in_addr,
- struct in_addr));
-extern nat_t *nat_lookupredir __P((natlookup_t *));
-extern nat_t *nat_icmplookup __P((ip_t *, fr_info_t *, int));
-extern nat_t *nat_icmp __P((ip_t *, fr_info_t *, u_int *, int));
-extern void nat_insert __P((nat_t *));
-
-extern int ip_natout __P((ip_t *, fr_info_t *));
-extern int ip_natin __P((ip_t *, fr_info_t *));
-extern void ip_natunload __P((void)), ip_natexpire __P((void));
-extern void nat_log __P((struct nat *, u_int));
-extern void fix_incksum __P((u_short *, u_32_t));
-extern void fix_outcksum __P((u_short *, u_32_t));
-extern void fix_datacksum __P((u_short *, u_32_t));
-
-#endif /* __IP_NAT_H__ */
diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c
deleted file mode 100644
index 47d0e5ea0de3..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_proxy.c
+++ /dev/null
@@ -1,452 +0,0 @@
-/*
- * Copyright (C) 1997-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- */
-#if !defined(lint)
-/*static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 2.2.2.1 1999/09/19 12:18:19 darrenr Exp $";*/
-static const char rcsid[] = "@(#)$FreeBSD$";
-#endif
-
-#if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL)
-# define _KERNEL
-#endif
-
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/file.h>
-#if !defined(__FreeBSD_version)
-# include <sys/ioctl.h>
-#endif
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#if !defined(_KERNEL) && !defined(KERNEL)
-# include <stdio.h>
-# include <string.h>
-# include <stdlib.h>
-#endif
-#ifndef linux
-# include <sys/protosw.h>
-#endif
-#include <sys/socket.h>
-#if defined(_KERNEL)
-# if !defined(linux)
-# include <sys/systm.h>
-# else
-# include <linux/string.h>
-# endif
-#endif
-#if !defined(__SVR4) && !defined(__svr4__)
-# ifndef linux
-# include <sys/mbuf.h>
-# endif
-#else
-# include <sys/byteorder.h>
-# ifdef _KERNEL
-# include <sys/dditypes.h>
-# endif
-# include <sys/stream.h>
-# include <sys/kmem.h>
-#endif
-#if __FreeBSD__ > 2
-# include <sys/queue.h>
-#endif
-#include <net/if.h>
-#ifdef sun
-# include <net/af.h>
-#endif
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#ifndef linux
-# include <netinet/ip_var.h>
-#endif
-#include <netinet/tcp.h>
-#include <netinet/udp.h>
-#include <netinet/ip_icmp.h>
-#include "netinet/ip_compat.h"
-#include <netinet/tcpip.h>
-#include "netinet/ip_fil.h"
-#include "netinet/ip_proxy.h"
-#include "netinet/ip_nat.h"
-#include "netinet/ip_state.h"
-#if (__FreeBSD_version >= 300000)
-# include <sys/malloc.h>
-#endif
-
-
-#ifndef MIN
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-
-static ap_session_t *appr_new_session __P((aproxy_t *, ip_t *,
- fr_info_t *, nat_t *));
-static int appr_fixseqack __P((fr_info_t *, ip_t *, ap_session_t *, int ));
-
-
-#define AP_SESS_SIZE 53
-
-#if defined(_KERNEL) && !defined(linux)
-#include "netinet/ip_ftp_pxy.c"
-#include "netinet/ip_rcmd_pxy.c"
-#include "netinet/ip_raudio_pxy.c"
-#endif
-
-ap_session_t *ap_sess_tab[AP_SESS_SIZE];
-ap_session_t *ap_sess_list = NULL;
-aproxy_t *ap_proxylist = NULL;
-aproxy_t ap_proxies[] = {
-#ifdef IPF_FTP_PROXY
- { NULL, "ftp", (char)IPPROTO_TCP, 0, 0, ippr_ftp_init, NULL,
- ippr_ftp_new, ippr_ftp_in, ippr_ftp_out },
-#endif
-#ifdef IPF_RCMD_PROXY
- { NULL, "rcmd", (char)IPPROTO_TCP, 0, 0, ippr_rcmd_init, NULL,
- ippr_rcmd_new, NULL, ippr_rcmd_out },
-#endif
-#ifdef IPF_RAUDIO_PROXY
- { NULL, "raudio", (char)IPPROTO_TCP, 0, 0, ippr_raudio_init, NULL,
- ippr_raudio_new, ippr_raudio_in, ippr_raudio_out },
-#endif
- { NULL, "", '\0', 0, 0, NULL, NULL }
-};
-
-
-int appr_add(ap)
-aproxy_t *ap;
-{
- aproxy_t *a;
-
- for (a = ap_proxies; a->apr_p; a++)
- if ((a->apr_p == ap->apr_p) &&
- !strncmp(a->apr_label, ap->apr_label,
- sizeof(ap->apr_label)))
- return -1;
-
- for (a = ap_proxylist; a->apr_p; a = a->apr_next)
- if ((a->apr_p == ap->apr_p) &&
- !strncmp(a->apr_label, ap->apr_label,
- sizeof(ap->apr_label)))
- return -1;
- ap->apr_next = ap_proxylist;
- ap_proxylist = ap;
- return (*ap->apr_init)();
-}
-
-
-int appr_del(ap)
-aproxy_t *ap;
-{
- aproxy_t *a, **app;
-
- for (app = &ap_proxylist; (a = *app); app = &a->apr_next)
- if (a == ap) {
- if (ap->apr_ref != 0)
- return 1;
- *app = a->apr_next;
- return 0;
- }
- return -1;
-}
-
-
-int appr_ok(ip, tcp, nat)
-ip_t *ip;
-tcphdr_t *tcp;
-ipnat_t *nat;
-{
- aproxy_t *apr = nat->in_apr;
- u_short dport = nat->in_dport;
-
- if (!apr || (apr->apr_flags & APR_DELETE) ||
- (ip->ip_p != apr->apr_p))
- return 0;
- if ((tcp && (tcp->th_dport != dport)) || (!tcp && dport))
- return 0;
- return 1;
-}
-
-
-/*
- * Allocate a new application proxy structure and fill it in with the
- * relevant details. call the init function once complete, prior to
- * returning.
- */
-static ap_session_t *appr_new_session(apr, ip, fin, nat)
-aproxy_t *apr;
-ip_t *ip;
-fr_info_t *fin;
-nat_t *nat;
-{
- register ap_session_t *aps;
-
- if (!apr || (apr->apr_flags & APR_DELETE) || (ip->ip_p != apr->apr_p))
- return NULL;
-
- KMALLOC(aps, ap_session_t *);
- if (!aps)
- return NULL;
- bzero((char *)aps, sizeof(*aps));
- aps->aps_p = ip->ip_p;
- aps->aps_data = NULL;
- aps->aps_apr = apr;
- aps->aps_psiz = 0;
- if (apr->apr_new != NULL)
- if ((*apr->apr_new)(fin, ip, aps, nat) == -1) {
- KFREE(aps);
- return NULL;
- }
- aps->aps_nat = nat;
- aps->aps_next = ap_sess_list;
- ap_sess_list = aps;
- return aps;
-}
-
-
-/*
- * check to see if a packet should be passed through an active proxy routine
- * if one has been setup for it.
- */
-int appr_check(ip, fin, nat)
-ip_t *ip;
-fr_info_t *fin;
-nat_t *nat;
-{
- ap_session_t *aps;
- aproxy_t *apr;
- tcphdr_t *tcp = NULL;
- u_32_t sum;
- short rv;
- int err;
-
- if (nat->nat_aps == NULL)
- nat->nat_aps = appr_new_session(nat->nat_ptr->in_apr, ip,
- fin, nat);
- aps = nat->nat_aps;
- if ((aps != NULL) && (aps->aps_p == ip->ip_p)) {
- if (ip->ip_p == IPPROTO_TCP) {
- tcp = (tcphdr_t *)fin->fin_dp;
- /*
- * verify that the checksum is correct. If not, then
- * don't do anything with this packet.
- */
-#if SOLARIS && defined(_KERNEL)
- sum = fr_tcpsum(fin->fin_qfm, ip, tcp);
-#else
- sum = fr_tcpsum(*(mb_t **)fin->fin_mp, ip, tcp);
-#endif
- if (sum != tcp->th_sum) {
- frstats[fin->fin_out].fr_tcpbad++;
- return -1;
- }
- }
-
- apr = aps->aps_apr;
- err = 0;
- if (fin->fin_out != 0) {
- if (apr->apr_outpkt != NULL)
- err = (*apr->apr_outpkt)(fin, ip, aps, nat);
- } else {
- if (apr->apr_inpkt != NULL)
- err = (*apr->apr_inpkt)(fin, ip, aps, nat);
- }
-
- rv = APR_EXIT(err);
- if (rv == -1)
- return rv;
-
- if (tcp != NULL) {
- err = appr_fixseqack(fin, ip, aps, APR_INC(err));
-#if SOLARIS && defined(_KERNEL)
- tcp->th_sum = fr_tcpsum(fin->fin_qfm, ip, tcp);
-#else
- tcp->th_sum = fr_tcpsum(*(mb_t **)fin->fin_mp, ip, tcp);
-#endif
- }
- aps->aps_bytes += ip->ip_len;
- aps->aps_pkts++;
- return 1;
- }
- return 0;
-}
-
-
-aproxy_t *appr_match(pr, name)
-u_int pr;
-char *name;
-{
- aproxy_t *ap;
-
- for (ap = ap_proxies; ap->apr_p; ap++)
- if ((ap->apr_p == pr) &&
- !strncmp(name, ap->apr_label, sizeof(ap->apr_label))) {
- ap->apr_ref++;
- return ap;
- }
-
- for (ap = ap_proxylist; ap; ap = ap->apr_next)
- if ((ap->apr_p == pr) &&
- !strncmp(name, ap->apr_label, sizeof(ap->apr_label))) {
- ap->apr_ref++;
- return ap;
- }
- return NULL;
-}
-
-
-void appr_free(ap)
-aproxy_t *ap;
-{
- ap->apr_ref--;
-}
-
-
-void aps_free(aps)
-ap_session_t *aps;
-{
- ap_session_t *a, **ap;
-
- if (!aps)
- return;
-
- for (ap = &ap_sess_list; (a = *ap); ap = &a->aps_next)
- if (a == aps) {
- *ap = a->aps_next;
- break;
- }
-
- if ((aps->aps_data != NULL) && (aps->aps_psiz != 0))
- KFREES(aps->aps_data, aps->aps_psiz);
- KFREE(aps);
-}
-
-
-static int appr_fixseqack(fin, ip, aps, inc)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-int inc;
-{
- int sel, ch = 0, out, nlen;
- u_32_t seq1, seq2;
- tcphdr_t *tcp;
-
- tcp = (tcphdr_t *)fin->fin_dp;
- out = fin->fin_out;
- nlen = ip->ip_len;
- nlen -= (ip->ip_hl << 2) + (tcp->th_off << 2);
-
- if (out != 0) {
- seq1 = (u_32_t)ntohl(tcp->th_seq);
- sel = aps->aps_sel[out];
-
- /* switch to other set ? */
- if ((aps->aps_seqmin[!sel] > aps->aps_seqmin[sel]) &&
- (seq1 > aps->aps_seqmin[!sel]))
- sel = aps->aps_sel[out] = !sel;
-
- if (aps->aps_seqoff[sel]) {
- seq2 = aps->aps_seqmin[sel] - aps->aps_seqoff[sel];
- if (seq1 > seq2) {
- seq2 = aps->aps_seqoff[sel];
- seq1 += seq2;
- tcp->th_seq = htonl(seq1);
- ch = 1;
- }
- }
-
- if (inc && (seq1 > aps->aps_seqmin[!sel])) {
- aps->aps_seqmin[!sel] = seq1 + nlen - 1;
- aps->aps_seqoff[!sel] = aps->aps_seqoff[sel] + inc;
- }
-
- /***/
-
- seq1 = ntohl(tcp->th_ack);
- sel = aps->aps_sel[1 - out];
-
- /* switch to other set ? */
- if ((aps->aps_ackmin[!sel] > aps->aps_ackmin[sel]) &&
- (seq1 > aps->aps_ackmin[!sel]))
- sel = aps->aps_sel[1 - out] = !sel;
-
- if (aps->aps_ackoff[sel] && (seq1 > aps->aps_ackmin[sel])) {
- seq2 = aps->aps_ackoff[sel];
- tcp->th_ack = htonl(seq1 - seq2);
- ch = 1;
- }
- } else {
- seq1 = ntohl(tcp->th_seq);
- sel = aps->aps_sel[out];
-
- /* switch to other set ? */
- if ((aps->aps_ackmin[!sel] > aps->aps_ackmin[sel]) &&
- (seq1 > aps->aps_ackmin[!sel]))
- sel = aps->aps_sel[out] = !sel;
-
- if (aps->aps_ackoff[sel]) {
- seq2 = aps->aps_ackmin[sel] -
- aps->aps_ackoff[sel];
- if (seq1 > seq2) {
- seq2 = aps->aps_ackoff[sel];
- seq1 += seq2;
- tcp->th_seq = htonl(seq1);
- ch = 1;
- }
- }
-
- if (inc && (seq1 > aps->aps_ackmin[!sel])) {
- aps->aps_ackmin[!sel] = seq1 + nlen - 1;
- aps->aps_ackoff[!sel] = aps->aps_ackoff[sel] + inc;
- }
-
- /***/
-
- seq1 = ntohl(tcp->th_ack);
- sel = aps->aps_sel[1 - out];
-
- /* switch to other set ? */
- if ((aps->aps_seqmin[!sel] > aps->aps_seqmin[sel]) &&
- (seq1 > aps->aps_seqmin[!sel]))
- sel = aps->aps_sel[1 - out] = !sel;
-
- if (aps->aps_seqoff[sel] && (seq1 > aps->aps_seqmin[sel])) {
- seq2 = aps->aps_seqoff[sel];
- tcp->th_ack = htonl(seq1 - seq2);
- ch = 1;
- }
- }
- return ch ? 2 : 0;
-}
-
-
-int appr_init()
-{
- aproxy_t *ap;
- int err = 0;
-
- for (ap = ap_proxies; ap->apr_p; ap++) {
- err = (*ap->apr_init)();
- if (err != 0)
- break;
- }
- return err;
-}
-
-
-void appr_unload()
-{
- aproxy_t *ap;
-
- for (ap = ap_proxies; ap->apr_p; ap++)
- if (ap->apr_fini)
- (*ap->apr_fini)();
- for (ap = ap_proxylist; ap; ap = ap->apr_next)
- if (ap->apr_fini)
- (*ap->apr_fini)();
-}
diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.h b/sys/contrib/ipfilter/netinet/ip_proxy.h
deleted file mode 100644
index f22c709a71da..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_proxy.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 1997-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * $Id: ip_proxy.h,v 2.8.2.4 2000/12/02 00:15:03 darrenr Exp $
- * $FreeBSD$
- */
-
-#ifndef __IP_PROXY_H__
-#define __IP_PROXY_H__
-
-#ifndef SOLARIS
-#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
-#endif
-
-#ifndef APR_LABELLEN
-#define APR_LABELLEN 16
-#endif
-#define AP_SESS_SIZE 53
-
-struct nat;
-struct ipnat;
-
-typedef struct ap_tcp {
- u_short apt_sport; /* source port */
- u_short apt_dport; /* destination port */
- short apt_sel[2]; /* {seq,ack}{off,min} set selector */
- short apt_seqoff[2]; /* sequence # difference */
- tcp_seq apt_seqmin[2]; /* don't change seq-off until after this */
- short apt_ackoff[2]; /* sequence # difference */
- tcp_seq apt_ackmin[2]; /* don't change seq-off until after this */
- u_char apt_state[2]; /* connection state */
-} ap_tcp_t;
-
-typedef struct ap_udp {
- u_short apu_sport; /* source port */
- u_short apu_dport; /* destination port */
-} ap_udp_t;
-
-typedef struct ap_session {
- struct aproxy *aps_apr;
- union {
- struct ap_tcp apu_tcp;
- struct ap_udp apu_udp;
- } aps_un;
- u_int aps_flags;
- U_QUAD_T aps_bytes; /* bytes sent */
- U_QUAD_T aps_pkts; /* packets sent */
- void *aps_nat; /* pointer back to nat struct */
- void *aps_data; /* private data */
- int aps_p; /* protocol */
- int aps_psiz; /* size of private data */
- struct ap_session *aps_hnext;
- struct ap_session *aps_next;
-} ap_session_t;
-
-#define aps_sport aps_un.apu_tcp.apt_sport
-#define aps_dport aps_un.apu_tcp.apt_dport
-#define aps_sel aps_un.apu_tcp.apt_sel
-#define aps_seqoff aps_un.apu_tcp.apt_seqoff
-#define aps_seqmin aps_un.apu_tcp.apt_seqmin
-#define aps_state aps_un.apu_tcp.apt_state
-#define aps_ackoff aps_un.apu_tcp.apt_ackoff
-#define aps_ackmin aps_un.apu_tcp.apt_ackmin
-
-
-typedef struct aproxy {
- struct aproxy *apr_next;
- char apr_label[APR_LABELLEN]; /* Proxy label # */
- u_char apr_p; /* protocol */
- int apr_ref; /* +1 per rule referencing it */
- int apr_flags;
- int (* apr_init) __P((void));
- void (* apr_fini) __P((void));
- int (* apr_new) __P((fr_info_t *, ip_t *,
- ap_session_t *, struct nat *));
- int (* apr_inpkt) __P((fr_info_t *, ip_t *,
- ap_session_t *, struct nat *));
- int (* apr_outpkt) __P((fr_info_t *, ip_t *,
- ap_session_t *, struct nat *));
-} aproxy_t;
-
-#define APR_DELETE 1
-
-#define APR_ERR(x) (((x) & 0xffff) << 16)
-#define APR_EXIT(x) (((x) >> 16) & 0xffff)
-#define APR_INC(x) ((x) & 0xffff)
-
-#define FTP_BUFSZ 160
-/*
- * For the ftp proxy.
- */
-typedef struct ftpside {
- char *ftps_rptr;
- char *ftps_wptr;
- u_32_t ftps_seq;
- u_32_t ftps_len;
- int ftps_junk;
- char ftps_buf[FTP_BUFSZ];
-} ftpside_t;
-
-typedef struct ftpinfo {
- u_int ftp_passok;
- ftpside_t ftp_side[2];
-} ftpinfo_t;
-
-/*
- * Real audio proxy structure and #defines
- */
-typedef struct {
- int rap_seenpna;
- int rap_seenver;
- int rap_version;
- int rap_eos; /* End Of Startup */
- int rap_gotid;
- int rap_gotlen;
- int rap_mode;
- int rap_sdone;
- u_short rap_plport;
- u_short rap_prport;
- u_short rap_srport;
- char rap_svr[19];
- u_32_t rap_sbf; /* flag to indicate which of the 19 bytes have
- * been filled
- */
- tcp_seq rap_sseq;
-} raudio_t;
-
-#define RA_ID_END 0
-#define RA_ID_UDP 1
-#define RA_ID_ROBUST 7
-
-#define RAP_M_UDP 1
-#define RAP_M_ROBUST 2
-#define RAP_M_TCP 4
-#define RAP_M_UDP_ROBUST (RAP_M_UDP|RAP_M_ROBUST)
-
-
-extern ap_session_t *ap_sess_tab[AP_SESS_SIZE];
-extern ap_session_t *ap_sess_list;
-extern aproxy_t ap_proxies[];
-extern int ippr_ftp_pasvonly;
-
-extern int appr_add __P((aproxy_t *));
-extern int appr_del __P((aproxy_t *));
-extern int appr_init __P((void));
-extern void appr_unload __P((void));
-extern int appr_ok __P((ip_t *, tcphdr_t *, struct ipnat *));
-extern void appr_free __P((aproxy_t *));
-extern void aps_free __P((ap_session_t *));
-extern int appr_check __P((ip_t *, fr_info_t *, struct nat *));
-extern aproxy_t *appr_match __P((u_int, char *));
-
-#endif /* __IP_PROXY_H__ */
diff --git a/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c b/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c
deleted file mode 100644
index 8b2c23162bc8..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * $FreeBSD$
- */
-#if SOLARIS && defined(_KERNEL)
-extern kmutex_t ipf_rw;
-#endif
-
-#define IPF_RAUDIO_PROXY
-
-
-int ippr_raudio_init __P((void));
-int ippr_raudio_new __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *));
-int ippr_raudio_in __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *));
-int ippr_raudio_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *));
-
-static frentry_t raudiofr;
-
-
-/*
- * Real Audio application proxy initialization.
- */
-int ippr_raudio_init()
-{
- bzero((char *)&raudiofr, sizeof(raudiofr));
- raudiofr.fr_ref = 1;
- raudiofr.fr_flags = FR_INQUE|FR_PASS|FR_QUICK|FR_KEEPSTATE;
- return 0;
-}
-
-
-/*
- * Setup for a new proxy to handle Real Audio.
- */
-int ippr_raudio_new(fin, ip, aps, nat)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-nat_t *nat;
-{
- raudio_t *rap;
-
-
- KMALLOCS(aps->aps_data, void *, sizeof(raudio_t));
- if (aps->aps_data == NULL)
- return -1;
-
- bzero(aps->aps_data, sizeof(raudio_t));
- rap = aps->aps_data;
- aps->aps_psiz = sizeof(raudio_t);
- rap->rap_mode = RAP_M_TCP; /* default is for TCP */
- return 0;
-}
-
-
-
-int ippr_raudio_out(fin, ip, aps, nat)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-nat_t *nat;
-{
- raudio_t *rap = aps->aps_data;
- unsigned char membuf[512 + 1], *s;
- u_short id = 0;
- tcphdr_t *tcp;
- int off, dlen;
- int len = 0;
- mb_t *m;
-#if SOLARIS
- mb_t *m1;
-#endif
-
- /*
- * If we've already processed the start messages, then nothing left
- * for the proxy to do.
- */
- if (rap->rap_eos == 1)
- return 0;
-
- tcp = (tcphdr_t *)fin->fin_dp;
- off = (ip->ip_hl << 2) + (tcp->th_off << 2);
- bzero(membuf, sizeof(membuf));
-#if SOLARIS
- m = fin->fin_qfm;
-
- dlen = msgdsize(m) - off;
- if (dlen <= 0)
- return 0;
- copyout_mblk(m, off, MIN(sizeof(membuf), dlen), (char *)membuf);
-#else
- m = *(mb_t **)fin->fin_mp;
-
- dlen = mbufchainlen(m) - off;
- if (dlen <= 0)
- return 0;
- m_copydata(m, off, MIN(sizeof(membuf), dlen), (char *)membuf);
-#endif
- /*
- * In all the startup parsing, ensure that we don't go outside
- * the packet buffer boundary.
- */
- /*
- * Look for the start of connection "PNA" string if not seen yet.
- */
- if (rap->rap_seenpna == 0) {
- s = (u_char *)memstr("PNA", (char *)membuf, 3, dlen);
- if (s == NULL)
- return 0;
- s += 3;
- rap->rap_seenpna = 1;
- } else
- s = membuf;
-
- /*
- * Directly after the PNA will be the version number of this
- * connection.
- */
- if (rap->rap_seenpna == 1 && rap->rap_seenver == 0) {
- if ((s + 1) - membuf < dlen) {
- rap->rap_version = (*s << 8) | *(s + 1);
- s += 2;
- rap->rap_seenver = 1;
- } else
- return 0;
- }
-
- /*
- * Now that we've been past the PNA and version number, we're into the
- * startup messages block. This ends when a message with an ID of 0.
- */
- while ((rap->rap_eos == 0) && ((s + 1) - membuf < dlen)) {
- if (rap->rap_gotid == 0) {
- id = (*s << 8) | *(s + 1);
- s += 2;
- rap->rap_gotid = 1;
- if (id == RA_ID_END) {
- rap->rap_eos = 1;
- break;
- }
- } else if (rap->rap_gotlen == 0) {
- len = (*s << 8) | *(s + 1);
- s += 2;
- rap->rap_gotlen = 1;
- }
-
- if (rap->rap_gotid == 1 && rap->rap_gotlen == 1) {
- if (id == RA_ID_UDP) {
- rap->rap_mode &= ~RAP_M_TCP;
- rap->rap_mode |= RAP_M_UDP;
- rap->rap_plport = (*s << 8) | *(s + 1);
- } else if (id == RA_ID_ROBUST) {
- rap->rap_mode |= RAP_M_ROBUST;
- rap->rap_prport = (*s << 8) | *(s + 1);
- }
- s += len;
- rap->rap_gotlen = 0;
- rap->rap_gotid = 0;
- }
- }
- return 0;
-}
-
-
-int ippr_raudio_in(fin, ip, aps, nat)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-nat_t *nat;
-{
- unsigned char membuf[IPF_MAXPORTLEN + 1], *s;
- tcphdr_t *tcp, tcph, *tcp2 = &tcph;
- raudio_t *rap = aps->aps_data;
- struct in_addr swa, swb;
- int off, dlen, slen;
- int a1, a2, a3, a4;
- u_short sp, dp;
- fr_info_t fi;
- tcp_seq seq;
- nat_t *ipn;
- u_char swp;
- mb_t *m;
-#if SOLARIS
- mb_t *m1;
-#endif
-
- /*
- * Wait until we've seen the end of the start messages and even then
- * only proceed further if we're using UDP. If they want to use TCP
- * then data is sent back on the same channel that is already open.
- */
- if (rap->rap_sdone != 0)
- return 0;
-
- tcp = (tcphdr_t *)fin->fin_dp;
- off = (ip->ip_hl << 2) + (tcp->th_off << 2);
- m = *(mb_t **)fin->fin_mp;
-
-#if SOLARIS
- m = fin->fin_qfm;
-
- dlen = msgdsize(m) - off;
- if (dlen <= 0)
- return 0;
- bzero(membuf, sizeof(membuf));
- copyout_mblk(m, off, MIN(sizeof(membuf), dlen), (char *)membuf);
-#else
- dlen = mbufchainlen(m) - off;
- if (dlen <= 0)
- return 0;
- bzero(membuf, sizeof(membuf));
- m_copydata(m, off, MIN(sizeof(membuf), dlen), (char *)membuf);
-#endif
-
- seq = ntohl(tcp->th_seq);
- /*
- * Check to see if the data in this packet is of interest to us.
- * We only care for the first 19 bytes coming back from the server.
- */
- if (rap->rap_sseq == 0) {
- s = (u_char *)memstr("PNA", (char *)membuf, 3, dlen);
- if (s == NULL)
- return 0;
- a1 = s - membuf;
- dlen -= a1;
- a1 = 0;
- rap->rap_sseq = seq;
- a2 = MIN(dlen, sizeof(rap->rap_svr));
- } else if (seq <= rap->rap_sseq + sizeof(rap->rap_svr)) {
- /*
- * seq # which is the start of data and from that the offset
- * into the buffer array.
- */
- a1 = seq - rap->rap_sseq;
- a2 = MIN(dlen, sizeof(rap->rap_svr));
- a2 -= a1;
- s = membuf;
- } else
- return 0;
-
- for (a3 = a1, a4 = a2; (a4 > 0) && (a3 < 19) && (a3 >= 0); a4--,a3++) {
- rap->rap_sbf |= (1 << a3);
- rap->rap_svr[a3] = *s++;
- }
-
- if ((rap->rap_sbf != 0x7ffff) || (!rap->rap_eos)) /* 19 bits */
- return 0;
- rap->rap_sdone = 1;
-
- s = (u_char *)rap->rap_svr + 11;
- if (((*s << 8) | *(s + 1)) == RA_ID_ROBUST) {
- s += 2;
- rap->rap_srport = (*s << 8) | *(s + 1);
- }
-
- swp = ip->ip_p;
- swa = ip->ip_src;
- swb = ip->ip_dst;
-
- ip->ip_p = IPPROTO_UDP;
- ip->ip_src = nat->nat_inip;
- ip->ip_dst = nat->nat_oip;
-
- bcopy((char *)fin, (char *)&fi, sizeof(fi));
- bzero((char *)tcp2, sizeof(*tcp2));
- tcp2->th_off = 5;
- fi.fin_dp = (char *)tcp2;
- fi.fin_fr = &raudiofr;
- fi.fin_dlen = sizeof(*tcp2);
- tcp2->th_win = htons(8192);
- slen = ip->ip_len;
- ip->ip_len = fin->fin_hlen + sizeof(*tcp);
-
- if (((rap->rap_mode & RAP_M_UDP_ROBUST) == RAP_M_UDP_ROBUST) &&
- (rap->rap_srport != 0)) {
- dp = rap->rap_srport;
- sp = rap->rap_prport;
- tcp2->th_sport = htons(sp);
- tcp2->th_dport = htons(dp);
- fi.fin_data[0] = dp;
- fi.fin_data[1] = sp;
- ipn = nat_new(nat->nat_ptr, ip, &fi,
- IPN_UDP | (sp ? 0 : FI_W_SPORT), NAT_OUTBOUND);
- if (ipn != NULL) {
- ipn->nat_age = fr_defnatage;
- (void) fr_addstate(ip, &fi, sp ? 0 : FI_W_SPORT);
- }
- }
-
- if ((rap->rap_mode & RAP_M_UDP) == RAP_M_UDP) {
- sp = rap->rap_plport;
- tcp2->th_sport = htons(sp);
- tcp2->th_dport = 0; /* XXX - don't specify remote port */
- fi.fin_data[0] = sp;
- fi.fin_data[1] = 0;
- ipn = nat_new(nat->nat_ptr, ip, &fi, IPN_UDP|FI_W_DPORT,
- NAT_OUTBOUND);
- if (ipn != NULL) {
- ipn->nat_age = fr_defnatage;
- (void) fr_addstate(ip, &fi, FI_W_DPORT);
- }
- }
-
- ip->ip_p = swp;
- ip->ip_len = slen;
- ip->ip_src = swa;
- ip->ip_dst = swb;
- return 0;
-}
diff --git a/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c b/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c
deleted file mode 100644
index 0ae021087b85..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * $Id: ip_rcmd_pxy.c,v 1.4.2.4 2000/11/01 14:34:20 darrenr Exp $
- */
-/*
- * Simple RCMD transparent proxy for in-kernel use. For use with the NAT
- * code.
- * $FreeBSD$
- */
-#if SOLARIS && defined(_KERNEL)
-extern kmutex_t ipf_rw;
-#endif
-
-#define isdigit(x) ((x) >= '0' && (x) <= '9')
-
-#define IPF_RCMD_PROXY
-
-
-int ippr_rcmd_init __P((void));
-int ippr_rcmd_new __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *));
-int ippr_rcmd_out __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *));
-u_short ipf_rcmd_atoi __P((char *));
-int ippr_rcmd_portmsg __P((fr_info_t *, ip_t *, ap_session_t *, nat_t *));
-
-static frentry_t rcmdfr;
-
-
-/*
- * RCMD application proxy initialization.
- */
-int ippr_rcmd_init()
-{
- bzero((char *)&rcmdfr, sizeof(rcmdfr));
- rcmdfr.fr_ref = 1;
- rcmdfr.fr_flags = FR_INQUE|FR_PASS|FR_QUICK|FR_KEEPSTATE;
- return 0;
-}
-
-
-/*
- * Setup for a new RCMD proxy.
- */
-int ippr_rcmd_new(fin, ip, aps, nat)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-nat_t *nat;
-{
- tcphdr_t *tcp = (tcphdr_t *)fin->fin_dp;
-
- aps->aps_psiz = sizeof(u_32_t);
- KMALLOCS(aps->aps_data, u_32_t *, sizeof(u_32_t));
- if (aps->aps_data == NULL)
- return -1;
- *(u_32_t *)aps->aps_data = 0;
- aps->aps_sport = tcp->th_sport;
- aps->aps_dport = tcp->th_dport;
- return 0;
-}
-
-
-/*
- * ipf_rcmd_atoi - implement a simple version of atoi
- */
-u_short ipf_rcmd_atoi(ptr)
-char *ptr;
-{
- register char *s = ptr, c;
- register u_short i = 0;
-
- while ((c = *s++) && isdigit(c)) {
- i *= 10;
- i += c - '0';
- }
- return i;
-}
-
-
-int ippr_rcmd_portmsg(fin, ip, aps, nat)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-nat_t *nat;
-{
- char portbuf[8], *s;
- struct in_addr swip;
- u_short sp, dp;
- int off, dlen;
- tcphdr_t *tcp, tcph, *tcp2 = &tcph;
- fr_info_t fi;
- nat_t *ipn;
- mb_t *m;
-#if SOLARIS
- mb_t *m1;
-#endif
-
- tcp = (tcphdr_t *)fin->fin_dp;
-
- if (tcp->th_flags & TH_SYN) {
- *(u_32_t *)aps->aps_data = htonl(ntohl(tcp->th_seq) + 1);
- return 0;
- }
-
- if ((*(u_32_t *)aps->aps_data != 0) &&
- (tcp->th_seq != *(u_32_t *)aps->aps_data))
- return 0;
-
- off = (ip->ip_hl << 2) + (tcp->th_off << 2);
-
-#if SOLARIS
- m = fin->fin_qfm;
-
- dlen = msgdsize(m) - off;
- bzero(portbuf, sizeof(portbuf));
- copyout_mblk(m, off, MIN(sizeof(portbuf), dlen), portbuf);
-#else
- m = *(mb_t **)fin->fin_mp;
- dlen = mbufchainlen(m) - off;
- bzero(portbuf, sizeof(portbuf));
- m_copydata(m, off, MIN(sizeof(portbuf), dlen), portbuf);
-#endif
-
- portbuf[sizeof(portbuf) - 1] = '\0';
- s = portbuf;
- sp = ipf_rcmd_atoi(s);
- if (!sp)
- return 0;
-
- /*
- * Add skeleton NAT entry for connection which will come back the
- * other way.
- */
- sp = htons(sp);
- dp = htons(fin->fin_data[1]);
- ipn = nat_outlookup(fin->fin_ifp, IPN_TCP, nat->nat_p, nat->nat_inip,
- ip->ip_dst, (dp << 16) | sp, 0);
- if (ipn == NULL) {
- int slen;
-
- slen = ip->ip_len;
- ip->ip_len = fin->fin_hlen + sizeof(*tcp);
- bcopy((char *)fin, (char *)&fi, sizeof(fi));
- bzero((char *)tcp2, sizeof(*tcp2));
- tcp2->th_win = htons(8192);
- tcp2->th_sport = sp;
- tcp2->th_dport = 0; /* XXX - don't specify remote port */
- tcp2->th_off = 5;
- fi.fin_data[0] = ntohs(sp);
- fi.fin_data[1] = 0;
- fi.fin_dp = (char *)tcp2;
- fi.fin_dlen = sizeof(*tcp2);
- swip = ip->ip_src;
- ip->ip_src = nat->nat_inip;
- ipn = nat_new(nat->nat_ptr, ip, &fi, IPN_TCP|FI_W_DPORT,
- NAT_OUTBOUND);
- if (ipn != NULL) {
- ipn->nat_age = fr_defnatage;
- fi.fin_fr = &rcmdfr;
- (void) fr_addstate(ip, &fi, FI_W_DPORT);
- }
- ip->ip_len = slen;
- ip->ip_src = swip;
- }
- return 0;
-}
-
-
-int ippr_rcmd_out(fin, ip, aps, nat)
-fr_info_t *fin;
-ip_t *ip;
-ap_session_t *aps;
-nat_t *nat;
-{
- return ippr_rcmd_portmsg(fin, ip, aps, nat);
-}
diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c
deleted file mode 100644
index 8cfe62dbf9c4..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_state.c
+++ /dev/null
@@ -1,1901 +0,0 @@
-/*
- * Copyright (C) 1995-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- */
-#if !defined(lint)
-static const char sccsid[] = "@(#)ip_state.c 1.8 6/5/96 (C) 1993-1995 Darren Reed";
-static const char rcsid[] = "@(#)$FreeBSD$";
-#endif
-
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/file.h>
-#if defined(__NetBSD__) && (NetBSD >= 199905) && !defined(IPFILTER_LKM) && \
- defined(_KERNEL)
-# include "opt_ipfilter_log.h"
-#endif
-#if defined(_KERNEL) && defined(__FreeBSD_version) && \
- (__FreeBSD_version >= 400000) && !defined(KLD_MODULE)
-#include "opt_inet6.h"
-#endif
-#if !defined(_KERNEL) && !defined(KERNEL) && !defined(__KERNEL__)
-# include <stdio.h>
-# include <stdlib.h>
-# include <string.h>
-#else
-# ifdef linux
-# include <linux/kernel.h>
-# include <linux/module.h>
-# endif
-#endif
-#if (defined(KERNEL) || defined(_KERNEL)) && (__FreeBSD_version >= 220000)
-# include <sys/filio.h>
-# include <sys/fcntl.h>
-# if (__FreeBSD_version >= 300000) && !defined(IPFILTER_LKM)
-# include "opt_ipfilter.h"
-# endif
-#else
-# include <sys/ioctl.h>
-#endif
-#include <sys/time.h>
-#include <sys/uio.h>
-#ifndef linux
-# include <sys/protosw.h>
-#endif
-#include <sys/socket.h>
-#if (defined(_KERNEL) || defined(KERNEL)) && !defined(linux)
-# include <sys/systm.h>
-#endif
-#if !defined(__SVR4) && !defined(__svr4__)
-# ifndef linux
-# include <sys/mbuf.h>
-# endif
-#else
-# include <sys/filio.h>
-# include <sys/byteorder.h>
-# ifdef _KERNEL
-# include <sys/dditypes.h>
-# endif
-# include <sys/stream.h>
-# include <sys/kmem.h>
-#endif
-
-#include <net/if.h>
-#ifdef sun
-# include <net/af.h>
-#endif
-#include <net/route.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
-#ifndef linux
-# include <netinet/ip_var.h>
-# include <netinet/tcp_fsm.h>
-#endif
-#include <netinet/udp.h>
-#include <netinet/ip_icmp.h>
-#include "netinet/ip_compat.h"
-#include <netinet/tcpip.h>
-#include "netinet/ip_fil.h"
-#include "netinet/ip_nat.h"
-#include "netinet/ip_frag.h"
-#include "netinet/ip_proxy.h"
-#include "netinet/ip_state.h"
-#ifdef USE_INET6
-#include <netinet/icmp6.h>
-#endif
-#if (__FreeBSD_version >= 300000)
-# include <sys/malloc.h>
-# if (defined(_KERNEL) || defined(KERNEL)) && !defined(IPFILTER_LKM)
-# include <sys/libkern.h>
-# include <sys/systm.h>
-# endif
-#endif
-
-#ifndef MIN
-# define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-
-#define TCP_CLOSE (TH_FIN|TH_RST)
-
-static ipstate_t **ips_table = NULL;
-static ipstate_t *ips_list = NULL;
-static int ips_num = 0;
-static int ips_wild = 0;
-static ips_stat_t ips_stats;
-#if (SOLARIS || defined(__sgi)) && defined(_KERNEL)
-extern KRWLOCK_T ipf_state, ipf_mutex;
-extern kmutex_t ipf_rw;
-#endif
-
-#ifdef USE_INET6
-static frentry_t *fr_checkicmp6matchingstate __P((ip6_t *, fr_info_t *));
-#endif
-static int fr_matchsrcdst __P((ipstate_t *, union i6addr, union i6addr,
- fr_info_t *, tcphdr_t *));
-static frentry_t *fr_checkicmpmatchingstate __P((ip_t *, fr_info_t *));
-static int fr_matchicmpqueryreply __P((int, ipstate_t *, icmphdr_t *));
-static int fr_state_flush __P((int));
-static ips_stat_t *fr_statetstats __P((void));
-static void fr_delstate __P((ipstate_t *));
-static int fr_state_remove __P((caddr_t));
-static void fr_ipsmove __P((ipstate_t **, ipstate_t *, u_int));
-int fr_stputent __P((caddr_t));
-int fr_stgetent __P((caddr_t));
-void fr_stinsert __P((ipstate_t *));
-
-
-#define FIVE_DAYS (2 * 5 * 86400) /* 5 days: half closed session */
-
-#define TCP_MSL 240 /* 2 minutes */
-u_long fr_tcpidletimeout = FIVE_DAYS,
- fr_tcpclosewait = 2 * TCP_MSL,
- fr_tcplastack = 2 * TCP_MSL,
- fr_tcptimeout = 2 * TCP_MSL,
- fr_tcpclosed = 120,
- fr_tcphalfclosed = 2 * 2 * 3600, /* 2 hours */
- fr_udptimeout = 240,
- fr_icmptimeout = 120;
-int fr_statemax = IPSTATE_MAX,
- fr_statesize = IPSTATE_SIZE;
-int fr_state_doflush = 0,
- fr_state_lock = 0;
-
-static int icmpreplytype4[ICMP_MAXTYPE + 1];
-
-int fr_stateinit()
-{
- int i;
-
- KMALLOCS(ips_table, ipstate_t **, fr_statesize * sizeof(ipstate_t *));
- if (ips_table != NULL)
- bzero((char *)ips_table, fr_statesize * sizeof(ipstate_t *));
- else
- return -1;
-
- /* fill icmp reply type table */
- for (i = 0; i <= ICMP_MAXTYPE; i++)
- icmpreplytype4[i] = -1;
- icmpreplytype4[ICMP_ECHO] = ICMP_ECHOREPLY;
- icmpreplytype4[ICMP_TSTAMP] = ICMP_TSTAMPREPLY;
- icmpreplytype4[ICMP_IREQ] = ICMP_IREQREPLY;
- icmpreplytype4[ICMP_MASKREQ] = ICMP_MASKREPLY;
-
- return 0;
-}
-
-
-static ips_stat_t *fr_statetstats()
-{
- ips_stats.iss_active = ips_num;
- ips_stats.iss_table = ips_table;
- ips_stats.iss_list = ips_list;
- return &ips_stats;
-}
-
-
-/*
- * flush state tables. two actions currently defined:
- * which == 0 : flush all state table entries
- * which == 1 : flush TCP connections which have started to close but are
- * stuck for some reason.
- */
-static int fr_state_flush(which)
-int which;
-{
- register ipstate_t *is, **isp;
-#if defined(_KERNEL) && !SOLARIS
- int s;
-#endif
- int delete, removed = 0;
-
- SPL_NET(s);
- for (isp = &ips_list; (is = *isp); ) {
- delete = 0;
-
- switch (which)
- {
- case 0 :
- delete = 1;
- break;
- case 1 :
- if (is->is_p != IPPROTO_TCP)
- break;
- if ((is->is_state[0] != TCPS_ESTABLISHED) ||
- (is->is_state[1] != TCPS_ESTABLISHED))
- delete = 1;
- break;
- }
-
- if (delete) {
- if (is->is_p == IPPROTO_TCP)
- ips_stats.iss_fin++;
- else
- ips_stats.iss_expire++;
-#ifdef IPFILTER_LOG
- ipstate_log(is, ISL_FLUSH);
-#endif
- fr_delstate(is);
- removed++;
- } else
- isp = &is->is_next;
- }
- SPL_X(s);
- return removed;
-}
-
-
-static int fr_state_remove(data)
-caddr_t data;
-{
- ipstate_t *sp, st;
- int error;
-
- sp = &st;
- error = IRCOPYPTR(data, (caddr_t)&st, sizeof(st));
- if (error)
- return EFAULT;
-
- for (sp = ips_list; sp; sp = sp->is_next)
- if ((sp->is_p == st.is_p) && (sp->is_v == st.is_v) &&
- !bcmp((char *)&sp->is_src, (char *)&st.is_src,
- sizeof(st.is_src)) &&
- !bcmp((char *)&sp->is_dst, (char *)&st.is_src,
- sizeof(st.is_dst)) &&
- !bcmp((char *)&sp->is_ps, (char *)&st.is_ps,
- sizeof(st.is_ps))) {
- WRITE_ENTER(&ipf_state);
-#ifdef IPFILTER_LOG
- ipstate_log(sp, ISL_REMOVE);
-#endif
- fr_delstate(sp);
- RWLOCK_EXIT(&ipf_state);
- return 0;
- }
- return ESRCH;
-}
-
-
-int fr_state_ioctl(data, cmd, mode)
-caddr_t data;
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-u_long cmd;
-#else
-int cmd;
-#endif
-int mode;
-{
- int arg, ret, error = 0;
-
- switch (cmd)
- {
- case SIOCDELST :
- error = fr_state_remove(data);
- break;
- case SIOCIPFFL :
- error = IRCOPY(data, (caddr_t)&arg, sizeof(arg));
- if (error)
- break;
- if (arg == 0 || arg == 1) {
- WRITE_ENTER(&ipf_state);
- ret = fr_state_flush(arg);
- RWLOCK_EXIT(&ipf_state);
- error = IWCOPY((caddr_t)&ret, data, sizeof(ret));
- } else
- error = EINVAL;
- break;
-#ifdef IPFILTER_LOG
- case SIOCIPFFB :
- if (!(mode & FWRITE))
- error = EPERM;
- else {
- int tmp;
-
- tmp = ipflog_clear(IPL_LOGSTATE);
- IWCOPY((char *)&tmp, data, sizeof(tmp));
- }
- break;
-#endif
- case SIOCGETFS :
- error = IWCOPYPTR((caddr_t)fr_statetstats(), data,
- sizeof(ips_stat_t));
- break;
- case FIONREAD :
-#ifdef IPFILTER_LOG
- arg = (int)iplused[IPL_LOGSTATE];
- error = IWCOPY((caddr_t)&arg, (caddr_t)data, sizeof(arg));
-#endif
- break;
- case SIOCSTLCK :
- error = fr_lock(data, &fr_state_lock);
- break;
- case SIOCSTPUT :
- if (!fr_state_lock) {
- error = EACCES;
- break;
- }
- error = fr_stputent(data);
- break;
- case SIOCSTGET :
- if (!fr_state_lock) {
- error = EACCES;
- break;
- }
- error = fr_stgetent(data);
- break;
- default :
- error = EINVAL;
- break;
- }
- return error;
-}
-
-
-int fr_stgetent(data)
-caddr_t data;
-{
- register ipstate_t *is, *isn;
- ipstate_save_t ips, *ipsp;
- int error;
-
- error = IRCOPY(data, (caddr_t)&ipsp, sizeof(ipsp));
- if (error)
- return EFAULT;
- error = IRCOPY((caddr_t)ipsp, (caddr_t)&ips, sizeof(ips));
- if (error)
- return EFAULT;
-
- isn = ips.ips_next;
- if (!isn) {
- isn = ips_list;
- if (isn == NULL) {
- if (ips.ips_next == NULL)
- return ENOENT;
- return 0;
- }
- } else {
- /*
- * Make sure the pointer we're copying from exists in the
- * current list of entries. Security precaution to prevent
- * copying of random kernel data.
- */
- for (is = ips_list; is; is = is->is_next)
- if (is == isn)
- break;
- if (!is)
- return ESRCH;
- }
- ips.ips_next = isn->is_next;
- bcopy((char *)isn, (char *)&ips.ips_is, sizeof(ips.ips_is));
- if (isn->is_rule)
- bcopy((char *)isn->is_rule, (char *)&ips.ips_fr,
- sizeof(ips.ips_fr));
- error = IWCOPY((caddr_t)&ips, ipsp, sizeof(ips));
- if (error)
- error = EFAULT;
- return error;
-}
-
-
-int fr_stputent(data)
-caddr_t data;
-{
- register ipstate_t *is, *isn;
- ipstate_save_t ips, *ipsp;
- int error, out;
- frentry_t *fr;
-
- error = IRCOPY(data, (caddr_t)&ipsp, sizeof(ipsp));
- if (error)
- return EFAULT;
- error = IRCOPY((caddr_t)ipsp, (caddr_t)&ips, sizeof(ips));
- if (error)
- return EFAULT;
-
- KMALLOC(isn, ipstate_t *);
- if (isn == NULL)
- return ENOMEM;
-
- bcopy((char *)&ips.ips_is, (char *)isn, sizeof(*isn));
- fr = isn->is_rule;
- if (fr != NULL) {
- if (isn->is_flags & FI_NEWFR) {
- KMALLOC(fr, frentry_t *);
- if (fr == NULL) {
- KFREE(isn);
- return ENOMEM;
- }
- bcopy((char *)&ips.ips_fr, (char *)fr, sizeof(*fr));
- out = fr->fr_flags & FR_OUTQUE ? 1 : 0;
- isn->is_rule = fr;
- ips.ips_is.is_rule = fr;
- if (*fr->fr_ifname) {
- fr->fr_ifa = GETUNIT(fr->fr_ifname, fr->fr_v);
- if (fr->fr_ifa == NULL)
- fr->fr_ifa = (void *)-1;
-#ifdef _KERNEL
- else {
- strncpy(isn->is_ifname[out],
- IFNAME(fr->fr_ifa), IFNAMSIZ);
- isn->is_ifp[out] = fr->fr_ifa;
- }
-#endif
- } else
- fr->fr_ifa = NULL;
- /*
- * send a copy back to userland of what we ended up
- * to allow for verification.
- */
- error = IWCOPY((caddr_t)&ips, ipsp, sizeof(ips));
- if (error) {
- KFREE(isn);
- KFREE(fr);
- return EFAULT;
- }
- } else {
- for (is = ips_list; is; is = is->is_next)
- if (is->is_rule == fr)
- break;
- if (!is) {
- KFREE(isn);
- return ESRCH;
- }
- }
- }
- fr_stinsert(isn);
- return 0;
-}
-
-
-void fr_stinsert(is)
-register ipstate_t *is;
-{
- register u_int hv = is->is_hv;
-
- MUTEX_INIT(&is->is_lock, "ipf state entry", NULL);
-
- is->is_ifname[0][sizeof(is->is_ifname[0]) - 1] = '\0';
- if (is->is_ifname[0][0] != '\0') {
- is->is_ifp[0] = GETUNIT(is->is_ifname[0], is->is_v);
- }
- is->is_ifname[1][sizeof(is->is_ifname[0]) - 1] = '\0';
- if (is->is_ifname[1][0] != '\0') {
- is->is_ifp[1] = GETUNIT(is->is_ifname[1], is->is_v);
- }
-
- /*
- * add into list table.
- */
- if (ips_list)
- ips_list->is_pnext = &is->is_next;
- is->is_pnext = &ips_list;
- is->is_next = ips_list;
- ips_list = is;
- if (ips_table[hv])
- ips_table[hv]->is_phnext = &is->is_hnext;
- else
- ips_stats.iss_inuse++;
- is->is_phnext = ips_table + hv;
- is->is_hnext = ips_table[hv];
- ips_table[hv] = is;
- ips_num++;
-}
-
-
-/*
- * Create a new ipstate structure and hang it off the hash table.
- */
-ipstate_t *fr_addstate(ip, fin, flags)
-ip_t *ip;
-fr_info_t *fin;
-u_int flags;
-{
- register tcphdr_t *tcp = NULL;
- register ipstate_t *is;
- register u_int hv;
- ipstate_t ips;
- u_int pass;
- int out;
-
- if (fr_state_lock || (fin->fin_off & IP_OFFMASK) ||
- (fin->fin_fi.fi_fl & FI_SHORT))
- return NULL;
- if (ips_num == fr_statemax) {
- ips_stats.iss_max++;
- fr_state_doflush = 1;
- return NULL;
- }
- out = fin->fin_out;
- is = &ips;
- bzero((char *)is, sizeof(*is));
- ips.is_age = 1;
- ips.is_state[0] = 0;
- ips.is_state[1] = 0;
- /*
- * Copy and calculate...
- */
- hv = (is->is_p = fin->fin_fi.fi_p);
- is->is_src = fin->fin_fi.fi_src;
- hv += is->is_saddr;
- is->is_dst = fin->fin_fi.fi_dst;
- hv += is->is_daddr;
-#ifdef USE_INET6
- if (fin->fin_v == 6) {
- if (is->is_p == IPPROTO_ICMPV6) {
- if (IN6_IS_ADDR_MULTICAST(&is->is_dst.in6))
- flags |= FI_W_DADDR;
- if (out)
- hv -= is->is_daddr;
- else
- hv -= is->is_saddr;
- }
- }
-#endif
-
- switch (is->is_p)
- {
-#ifdef USE_INET6
- case IPPROTO_ICMPV6 :
-#endif
- case IPPROTO_ICMP :
- {
- struct icmp *ic = (struct icmp *)fin->fin_dp;
-
-#ifdef USE_INET6
- if ((is->is_p == IPPROTO_ICMPV6) &&
- ((ic->icmp_type & ICMP6_INFOMSG_MASK) == 0))
- return NULL;
-#endif
- switch (ic->icmp_type)
- {
-#ifdef USE_INET6
- case ICMP6_ECHO_REQUEST :
- is->is_icmp.ics_type = ICMP6_ECHO_REPLY;
- hv += (is->is_icmp.ics_id = ic->icmp_id);
- hv += (is->is_icmp.ics_seq = ic->icmp_seq);
- break;
- case ICMP6_MEMBERSHIP_QUERY :
- case ND_ROUTER_SOLICIT :
- case ND_NEIGHBOR_SOLICIT :
- is->is_icmp.ics_type = ic->icmp_type + 1;
- break;
-#endif
- case ICMP_ECHO :
- case ICMP_TSTAMP :
- case ICMP_IREQ :
- case ICMP_MASKREQ :
- is->is_icmp.ics_type = ic->icmp_type;
- hv += (is->is_icmp.ics_id = ic->icmp_id);
- hv += (is->is_icmp.ics_seq = ic->icmp_seq);
- break;
- default :
- return NULL;
- }
- ATOMIC_INCL(ips_stats.iss_icmp);
- is->is_age = fr_icmptimeout;
- break;
- }
- case IPPROTO_TCP :
- {
- tcp = (tcphdr_t *)fin->fin_dp;
-
- if (tcp->th_flags & TH_RST)
- return NULL;
- /*
- * The endian of the ports doesn't matter, but the ack and
- * sequence numbers do as we do mathematics on them later.
- */
- is->is_dport = tcp->th_dport;
- is->is_sport = tcp->th_sport;
- if ((flags & (FI_W_DPORT|FI_W_SPORT)) == 0) {
- hv += tcp->th_dport;
- hv += tcp->th_sport;
- }
- is->is_send = ntohl(tcp->th_seq) + fin->fin_dlen -
- (tcp->th_off << 2) +
- ((tcp->th_flags & TH_SYN) ? 1 : 0) +
- ((tcp->th_flags & TH_FIN) ? 1 : 0);
- is->is_maxsend = is->is_send;
- is->is_dend = 0;
- is->is_maxdwin = 1;
- is->is_maxswin = ntohs(tcp->th_win);
- if (is->is_maxswin == 0)
- is->is_maxswin = 1;
- /*
- * If we're creating state for a starting connection, start the
- * timer on it as we'll never see an error if it fails to
- * connect.
- */
- ATOMIC_INCL(ips_stats.iss_tcp);
- break;
- }
- case IPPROTO_UDP :
- {
- tcp = (tcphdr_t *)fin->fin_dp;
-
- is->is_dport = tcp->th_dport;
- is->is_sport = tcp->th_sport;
- if ((flags & (FI_W_DPORT|FI_W_SPORT)) == 0) {
- hv += tcp->th_dport;
- hv += tcp->th_sport;
- }
- ATOMIC_INCL(ips_stats.iss_udp);
- is->is_age = fr_udptimeout;
- break;
- }
- default :
- return NULL;
- }
-
- KMALLOC(is, ipstate_t *);
- if (is == NULL) {
- ATOMIC_INCL(ips_stats.iss_nomem);
- return NULL;
- }
- bcopy((char *)&ips, (char *)is, sizeof(*is));
- hv %= fr_statesize;
- is->is_hv = hv;
- is->is_rule = fin->fin_fr;
- if (is->is_rule != NULL) {
- ATOMIC_INC32(is->is_rule->fr_ref);
- pass = is->is_rule->fr_flags;
- } else
- pass = fr_flags;
- WRITE_ENTER(&ipf_state);
-
- is->is_pass = pass;
- is->is_pkts = 1;
- is->is_bytes = fin->fin_dlen + fin->fin_hlen;
- /*
- * We want to check everything that is a property of this packet,
- * but we don't (automatically) care about it's fragment status as
- * this may change.
- */
- is->is_v = fin->fin_fi.fi_v;
- is->is_opt = fin->fin_fi.fi_optmsk;
- is->is_optmsk = 0xffffffff;
- is->is_sec = fin->fin_fi.fi_secmsk;
- is->is_secmsk = 0xffff;
- is->is_auth = fin->fin_fi.fi_auth;
- is->is_authmsk = 0xffff;
- is->is_flags = fin->fin_fi.fi_fl & FI_CMP;
- is->is_flags |= FI_CMP << 4;
- is->is_flags |= flags & (FI_WILDP|FI_WILDA);
- if (flags & (FI_WILDP|FI_WILDA))
- ips_wild++;
- is->is_ifp[1 - out] = NULL;
- is->is_ifp[out] = fin->fin_ifp;
-#ifdef _KERNEL
- strncpy(is->is_ifname[out], IFNAME(fin->fin_ifp), IFNAMSIZ);
-#endif
- is->is_ifname[1 - out][0] = '\0';
- if (pass & FR_LOGFIRST)
- is->is_pass &= ~(FR_LOGFIRST|FR_LOG);
- fr_stinsert(is);
- if (is->is_p == IPPROTO_TCP) {
- MUTEX_ENTER(&is->is_lock);
- fr_tcp_age(&is->is_age, is->is_state, fin,
- 0); /* 0 = packet from the source */
- MUTEX_EXIT(&is->is_lock);
- }
-#ifdef IPFILTER_LOG
- ipstate_log(is, ISL_NEW);
-#endif
- RWLOCK_EXIT(&ipf_state);
- fin->fin_rev = IP6NEQ(is->is_dst, fin->fin_fi.fi_dst);
- if ((fin->fin_fi.fi_fl & FI_FRAG) && (pass & FR_KEEPFRAG))
- ipfr_newfrag(ip, fin, pass ^ FR_KEEPSTATE);
- return is;
-}
-
-
-
-/*
- * check to see if a packet with TCP headers fits within the TCP window.
- * change timeout depending on whether new packet is a SYN-ACK returning for a
- * SYN or a RST or FIN which indicate time to close up shop.
- */
-int fr_tcpstate(is, fin, ip, tcp)
-register ipstate_t *is;
-fr_info_t *fin;
-ip_t *ip;
-tcphdr_t *tcp;
-{
- register tcp_seq seq, ack, end;
- register int ackskew;
- tcpdata_t *fdata, *tdata;
- u_short win, maxwin;
- int ret = 0;
- int source;
-
- /*
- * Find difference between last checked packet and this packet.
- */
- source = IP6EQ(fin->fin_fi.fi_src, is->is_src);
- fdata = &is->is_tcp.ts_data[!source];
- tdata = &is->is_tcp.ts_data[source];
- seq = ntohl(tcp->th_seq);
- ack = ntohl(tcp->th_ack);
- win = ntohs(tcp->th_win);
- end = seq + fin->fin_dlen - (tcp->th_off << 2) +
- ((tcp->th_flags & TH_SYN) ? 1 : 0) +
- ((tcp->th_flags & TH_FIN) ? 1 : 0);
-
- MUTEX_ENTER(&is->is_lock);
- if (fdata->td_end == 0) {
- /*
- * Must be a (outgoing) SYN-ACK in reply to a SYN.
- */
- fdata->td_end = end;
- fdata->td_maxwin = 1;
- fdata->td_maxend = end + 1;
- }
-
- if (!(tcp->th_flags & TH_ACK)) { /* Pretend an ack was sent */
- ack = tdata->td_end;
- } else if (((tcp->th_flags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) &&
- (ack == 0)) {
- /* gross hack to get around certain broken tcp stacks */
- ack = tdata->td_end;
- }
-
- if (seq == end)
- seq = end = fdata->td_end;
-
- maxwin = tdata->td_maxwin;
- ackskew = tdata->td_end - ack;
-
-#define SEQ_GE(a,b) ((int)((a) - (b)) >= 0)
-#define SEQ_GT(a,b) ((int)((a) - (b)) > 0)
- if ((SEQ_GE(fdata->td_maxend, end)) &&
- (SEQ_GE(seq, fdata->td_end - maxwin)) &&
-/* XXX what about big packets */
-#define MAXACKWINDOW 66000
- (ackskew >= -MAXACKWINDOW) &&
- (ackskew <= MAXACKWINDOW)) {
- /* if ackskew < 0 then this should be due to fragented
- * packets. There is no way to know the length of the
- * total packet in advance.
- * We do know the total length from the fragment cache though.
- * Note however that there might be more sessions with
- * exactly the same source and destination paramters in the
- * state cache (and source and destination is the only stuff
- * that is saved in the fragment cache). Note further that
- * some TCP connections in the state cache are hashed with
- * sport and dport as well which makes it not worthwhile to
- * look for them.
- * Thus, when ackskew is negative but still seems to belong
- * to this session, we bump up the destinations end value.
- */
- if (ackskew < 0)
- tdata->td_end = ack;
-
- /* update max window seen */
- if (fdata->td_maxwin < win)
- fdata->td_maxwin = win;
- if (SEQ_GT(end, fdata->td_end))
- fdata->td_end = end;
- if (SEQ_GE(ack + win, tdata->td_maxend)) {
- tdata->td_maxend = ack + win;
- if (win == 0)
- tdata->td_maxend++;
- }
-
- ATOMIC_INCL(ips_stats.iss_hits);
- /*
- * Nearing end of connection, start timeout.
- */
- /* source ? 0 : 1 -> !source */
- fr_tcp_age(&is->is_age, is->is_state, fin, !source);
- ret = 1;
- }
- MUTEX_EXIT(&is->is_lock);
- return ret;
-}
-
-
-static int fr_matchsrcdst(is, src, dst, fin, tcp)
-ipstate_t *is;
-union i6addr src, dst;
-fr_info_t *fin;
-tcphdr_t *tcp;
-{
- int ret = 0, rev, out, flags;
- u_short sp, dp;
- void *ifp;
-
- rev = fin->fin_rev = IP6NEQ(is->is_dst, dst);
- ifp = fin->fin_ifp;
- out = fin->fin_out;
-
- if (tcp != NULL) {
- flags = is->is_flags;
- sp = tcp->th_sport;
- dp = tcp->th_dport;
- } else {
- flags = is->is_flags & FI_WILDA;
- sp = 0;
- dp = 0;
- }
-
- if (rev == 0) {
- if (!out) {
- if (is->is_ifpin == NULL || is->is_ifpin == ifp)
- ret = 1;
- } else {
- if (is->is_ifpout == NULL || is->is_ifpout == ifp)
- ret = 1;
- }
- } else {
- if (out) {
- if (is->is_ifpin == NULL || is->is_ifpin == ifp)
- ret = 1;
- } else {
- if (is->is_ifpout == NULL || is->is_ifpout == ifp)
- ret = 1;
- }
- }
- if (ret == 0)
- return 0;
- ret = 0;
-
- if (rev == 0) {
- if (
- (IP6EQ(is->is_dst, dst) || (flags & FI_W_DADDR)) &&
- (IP6EQ(is->is_src, src) || (flags & FI_W_SADDR)) &&
- (!tcp || ((sp == is->is_sport || flags & FI_W_SPORT) &&
- (dp == is->is_dport || flags & FI_W_DPORT)))) {
- ret = 1;
- }
- } else {
- if (
- (IP6EQ(is->is_dst, src) || (flags & FI_W_DADDR)) &&
- (IP6EQ(is->is_src, dst) || (flags & FI_W_SADDR)) &&
- (!tcp || ((sp == is->is_dport || flags & FI_W_DPORT) &&
- (dp == is->is_sport || flags & FI_W_SPORT)))) {
- ret = 1;
- }
- }
- if (ret == 0)
- return 0;
-
- /*
- * Whether or not this should be here, is questionable, but the aim
- * is to get this out of the main line.
- */
- if (tcp == NULL)
- flags = is->is_flags & (FI_CMP|(FI_CMP<<4));
-
- if (((fin->fin_fi.fi_fl & (flags >> 4)) != (flags & FI_CMP)) ||
- ((fin->fin_fi.fi_optmsk & is->is_optmsk) != is->is_opt) ||
- ((fin->fin_fi.fi_secmsk & is->is_secmsk) != is->is_sec) ||
- ((fin->fin_fi.fi_auth & is->is_authmsk) != is->is_auth))
- return 0;
-
- if ((flags & (FI_W_SPORT|FI_W_DPORT))) {
- if ((flags & FI_W_SPORT) != 0) {
- if (rev == 0) {
- is->is_sport = sp;
- is->is_send = htonl(tcp->th_seq);
- } else {
- is->is_sport = dp;
- is->is_send = htonl(tcp->th_ack);
- }
- is->is_maxsend = is->is_send + 1;
- } else if ((flags & FI_W_DPORT) != 0) {
- if (rev == 0) {
- is->is_dport = dp;
- is->is_dend = htonl(tcp->th_ack);
- } else {
- is->is_dport = sp;
- is->is_dend = htonl(tcp->th_seq);
- }
- is->is_maxdend = is->is_dend + 1;
- }
- is->is_flags &= ~(FI_W_SPORT|FI_W_DPORT);
- ips_wild--;
- }
-
- ret = -1;
-
- if (!rev) {
- if (out) {
- if (!is->is_ifpout)
- ret = 1;
- } else {
- if (!is->is_ifpin)
- ret = 0;
- }
- } else {
- if (out) {
- if (!is->is_ifpin)
- ret = 0;
- } else {
- if (!is->is_ifpout)
- ret = 1;
- }
- }
-
- if (ret >= 0) {
- is->is_ifp[ret] = ifp;
-#ifdef _KERNEL
- strncpy(is->is_ifname[out], IFNAME(fin->fin_ifp),
- sizeof(is->is_ifname[1]));
-#endif
- }
-#ifdef _KERNEL
- if (ret >= 0) {
- strncpy(is->is_ifname[out], IFNAME(fin->fin_ifp),
- sizeof(is->is_ifname[1]));
- }
-#endif
- return 1;
-}
-
-static int fr_matchicmpqueryreply(v, is, icmp)
-int v;
-ipstate_t *is;
-icmphdr_t *icmp;
-{
- if (v == 4) {
- /*
- * If we matched its type on the way in, then when going out
- * it will still be the same type.
- */
- if (((icmp->icmp_type == is->is_type) ||
- (icmpreplytype4[is->is_type] == icmp->icmp_type)) &&
- (icmp->icmp_id == is->is_icmp.ics_id) &&
- (icmp->icmp_seq == is->is_icmp.ics_seq)) {
- return 1;
- };
- }
-#ifdef USE_INET6
- else if (is->is_v == 6) {
- if ((is->is_type == ICMP6_ECHO_REPLY) &&
- (icmp->icmp_type == ICMP6_ECHO_REQUEST) &&
- (icmp->icmp_id == is->is_icmp.ics_id) &&
- (icmp->icmp_seq == is->is_icmp.ics_seq)) {
- return 1;
- };
- }
-#endif
- return 0;
-}
-
-static frentry_t *fr_checkicmpmatchingstate(ip, fin)
-ip_t *ip;
-fr_info_t *fin;
-{
- register ipstate_t *is, **isp;
- register u_short sport, dport;
- register u_char pr;
- union i6addr dst, src;
- struct icmp *ic;
- u_short savelen;
- icmphdr_t *icmp;
- fr_info_t ofin;
- int type, len;
- tcphdr_t *tcp;
- frentry_t *fr;
- ip_t *oip;
- u_int hv;
-
- /*
- * Does it at least have the return (basic) IP header ?
- * Only a basic IP header (no options) should be with
- * an ICMP error header.
- */
- if (((ip->ip_v != 4) || (ip->ip_hl != 5)) ||
- (fin->fin_plen < ICMPERR_MINPKTLEN))
- return NULL;
- ic = (struct icmp *)fin->fin_dp;
- type = ic->icmp_type;
- /*
- * If it's not an error type, then return
- */
- if ((type != ICMP_UNREACH) && (type != ICMP_SOURCEQUENCH) &&
- (type != ICMP_REDIRECT) && (type != ICMP_TIMXCEED) &&
- (type != ICMP_PARAMPROB))
- return NULL;
-
- oip = (ip_t *)((char *)ic + ICMPERR_ICMPHLEN);
- if (fin->fin_plen < ICMPERR_MAXPKTLEN + ((oip->ip_hl - 5) << 2))
- return NULL;
-
- /*
- * Sanity checks.
- */
- len = fin->fin_dlen - ICMPERR_ICMPHLEN;
- if ((len <= 0) || ((oip->ip_hl << 2) > len))
- return NULL;
-
- /*
- * Is the buffer big enough for all of it ? It's the size of the IP
- * header claimed in the encapsulated part which is of concern. It
- * may be too big to be in this buffer but not so big that it's
- * outside the ICMP packet, leading to TCP deref's causing problems.
- * This is possible because we don't know how big oip_hl is when we
- * do the pullup early in fr_check() and thus can't gaurantee it is
- * all here now.
- */
-#ifdef _KERNEL
- {
- mb_t *m;
-
-# if SOLARIS
- m = fin->fin_qfm;
- if ((char *)oip + len > (char *)m->b_wptr)
- return NULL;
-# else
- m = *(mb_t **)fin->fin_mp;
- if ((char *)oip + len > (char *)ip + m->m_len)
- return NULL;
-# endif
- }
-#endif
-
- /*
- * in the IPv4 case we must zero the i6addr union otherwise
- * the IP6EQ and IP6NEQ macros produce the wrong results because
- * of the 'junk' in the unused part of the union
- */
- bzero((char *)&src, sizeof(src));
- bzero((char *)&dst, sizeof(dst));
-
- if (oip->ip_p == IPPROTO_ICMP) {
- icmp = (icmphdr_t *)((char *)oip + (oip->ip_hl << 2));
-
- /*
- * a ICMP error can only be generated as a result of an
- * ICMP query, not as the response on an ICMP error
- *
- * XXX theoretically ICMP_ECHOREP and the other reply's are
- * ICMP query's as well, but adding them here seems strange XXX
- */
- if ((icmp->icmp_type != ICMP_ECHO) &&
- (icmp->icmp_type != ICMP_TSTAMP) &&
- (icmp->icmp_type != ICMP_IREQ) &&
- (icmp->icmp_type != ICMP_MASKREQ))
- return NULL;
-
- /*
- * perform a lookup of the ICMP packet in the state table
- */
- hv = (pr = oip->ip_p);
- src.in4 = oip->ip_src;
- hv += src.in4.s_addr;
- dst.in4 = oip->ip_dst;
- hv += dst.in4.s_addr;
- hv += icmp->icmp_id;
- hv += icmp->icmp_seq;
- hv %= fr_statesize;
-
- savelen = oip->ip_len;
- oip->ip_len = len;
- ofin.fin_v = 4;
- fr_makefrip(oip->ip_hl << 2, oip, &ofin);
- oip->ip_len = savelen;
- ofin.fin_ifp = fin->fin_ifp;
- ofin.fin_out = !fin->fin_out;
- ofin.fin_mp = NULL; /* if dereferenced, panic XXX */
-
- READ_ENTER(&ipf_state);
- for (isp = &ips_table[hv]; (is = *isp); isp = &is->is_hnext)
- if ((is->is_p == pr) && (is->is_v == 4) &&
- fr_matchsrcdst(is, src, dst, &ofin, NULL) &&
- fr_matchicmpqueryreply(is->is_v, is, icmp)) {
- ips_stats.iss_hits++;
- is->is_pkts++;
- is->is_bytes += ip->ip_len;
- fr = is->is_rule;
- RWLOCK_EXIT(&ipf_state);
- return fr;
- }
- RWLOCK_EXIT(&ipf_state);
- return NULL;
- };
-
- if ((oip->ip_p != IPPROTO_TCP) && (oip->ip_p != IPPROTO_UDP))
- return NULL;
-
- tcp = (tcphdr_t *)((char *)oip + (oip->ip_hl << 2));
- dport = tcp->th_dport;
- sport = tcp->th_sport;
-
- hv = (pr = oip->ip_p);
- src.in4 = oip->ip_src;
- hv += src.in4.s_addr;
- dst.in4 = oip->ip_dst;
- hv += dst.in4.s_addr;
- hv += dport;
- hv += sport;
- hv %= fr_statesize;
- /*
- * we make an fin entry to be able to feed it to
- * matchsrcdst note that not all fields are encessary
- * but this is the cleanest way. Note further we fill
- * in fin_mp such that if someone uses it we'll get
- * a kernel panic. fr_matchsrcdst does not use this.
- *
- * watch out here, as ip is in host order and oip in network
- * order. Any change we make must be undone afterwards.
- */
- savelen = oip->ip_len;
- oip->ip_len = len;
- ofin.fin_v = 4;
- fr_makefrip(oip->ip_hl << 2, oip, &ofin);
- oip->ip_len = savelen;
- ofin.fin_ifp = fin->fin_ifp;
- ofin.fin_out = !fin->fin_out;
- ofin.fin_mp = NULL; /* if dereferenced, panic XXX */
- READ_ENTER(&ipf_state);
- for (isp = &ips_table[hv]; (is = *isp); isp = &is->is_hnext) {
- /*
- * Only allow this icmp though if the
- * encapsulated packet was allowed through the
- * other way around. Note that the minimal amount
- * of info present does not allow for checking against
- * tcp internals such as seq and ack numbers.
- */
- if ((is->is_p == pr) && (is->is_v == 4) &&
- fr_matchsrcdst(is, src, dst, &ofin, tcp)) {
- fr = is->is_rule;
- ips_stats.iss_hits++;
- is->is_pkts++;
- is->is_bytes += fin->fin_plen;
- /*
- * we deliberately do not touch the timeouts
- * for the accompanying state table entry.
- * It remains to be seen if that is correct. XXX
- */
- RWLOCK_EXIT(&ipf_state);
- return fr;
- }
- }
- RWLOCK_EXIT(&ipf_state);
- return NULL;
-}
-
-
-static void fr_ipsmove(isp, is, hv)
-ipstate_t **isp, *is;
-u_int hv;
-{
- u_int hvm;
-
- hvm = is->is_hv;
- /*
- * Remove the hash from the old location...
- */
- if (is->is_hnext)
- is->is_hnext->is_phnext = isp;
- *isp = is->is_hnext;
- if (ips_table[hvm] == NULL)
- ips_stats.iss_inuse--;
-
- /*
- * ...and put the hash in the new one.
- */
- hvm = hv % fr_statesize;
- is->is_hv = hvm;
- isp = &ips_table[hvm];
- if (*isp)
- (*isp)->is_phnext = &is->is_hnext;
- else
- ips_stats.iss_inuse++;
- is->is_phnext = isp;
- is->is_hnext = *isp;
- *isp = is;
-}
-
-
-/*
- * Check if a packet has a registered state.
- */
-frentry_t *fr_checkstate(ip, fin)
-ip_t *ip;
-fr_info_t *fin;
-{
- union i6addr dst, src;
- register ipstate_t *is, **isp;
- register u_char pr;
- u_int hv, hvm, hlen, tryagain, pass, v;
- struct icmp *ic;
- frentry_t *fr;
- tcphdr_t *tcp;
-
- if (fr_state_lock || (fin->fin_off & IP_OFFMASK) ||
- (fin->fin_fi.fi_fl & FI_SHORT))
- return NULL;
-
- is = NULL;
- hlen = fin->fin_hlen;
- tcp = (tcphdr_t *)((char *)ip + hlen);
- ic = (struct icmp *)tcp;
- hv = (pr = fin->fin_fi.fi_p);
- src = fin->fin_fi.fi_src;
- dst = fin->fin_fi.fi_dst;
- hv += src.in4.s_addr;
- hv += dst.in4.s_addr;
-
- /*
- * Search the hash table for matching packet header info.
- */
- v = fin->fin_fi.fi_v;
- switch (fin->fin_fi.fi_p)
- {
-#ifdef USE_INET6
- case IPPROTO_ICMPV6 :
- if (v == 6) {
- if (fin->fin_out)
- hv -= dst.in4.s_addr;
- else
- hv -= src.in4.s_addr;
- if ((ic->icmp_type == ICMP6_ECHO_REQUEST) ||
- (ic->icmp_type == ICMP6_ECHO_REPLY)) {
- hv += ic->icmp_id;
- hv += ic->icmp_seq;
- }
- }
-#endif
- case IPPROTO_ICMP :
- if (v == 4) {
- hv += ic->icmp_id;
- hv += ic->icmp_seq;
- }
- hv %= fr_statesize;
- READ_ENTER(&ipf_state);
- for (isp = &ips_table[hv]; (is = *isp); isp = &is->is_hnext) {
- if ((is->is_p == pr) && (is->is_v == v) &&
- fr_matchsrcdst(is, src, dst, fin, NULL) &&
- fr_matchicmpqueryreply(v, is, ic)) {
- is->is_age = fr_icmptimeout;
- break;
- }
- }
- if (is != NULL)
- break;
- RWLOCK_EXIT(&ipf_state);
- /*
- * No matching icmp state entry. Perhaps this is a
- * response to another state entry.
- */
-#ifdef USE_INET6
- if (v == 6)
- fr = fr_checkicmp6matchingstate((ip6_t *)ip, fin);
- else
-#endif
- fr = fr_checkicmpmatchingstate(ip, fin);
- if (fr)
- return fr;
- break;
- case IPPROTO_TCP :
- {
- register u_short dport, sport;
- register int i;
-
- i = tcp->th_flags;
- /*
- * Just plain ignore RST flag set with either FIN or SYN.
- */
- if ((i & TH_RST) &&
- ((i & (TH_FIN|TH_SYN|TH_RST)) != TH_RST))
- break;
- case IPPROTO_UDP :
- dport = tcp->th_dport;
- sport = tcp->th_sport;
- tryagain = 0;
- hv += dport;
- hv += sport;
- READ_ENTER(&ipf_state);
-retry_tcpudp:
- hvm = hv % fr_statesize;
- for (isp = &ips_table[hvm]; (is = *isp); isp = &is->is_hnext)
- if ((is->is_p == pr) && (is->is_v == v) &&
- fr_matchsrcdst(is, src, dst, fin, tcp)) {
- if ((pr == IPPROTO_TCP)) {
- if (!fr_tcpstate(is, fin, ip, tcp)) {
- continue;
- }
- }
- break;
- }
- if (is != NULL) {
- if (tryagain &&
- !(is->is_flags & (FI_WILDP|FI_WILDA))) {
- hv += dport;
- hv += sport;
- fr_ipsmove(isp, is, hv);
- MUTEX_DOWNGRADE(&ipf_state);
- }
- break;
- }
- RWLOCK_EXIT(&ipf_state);
- if (!tryagain && ips_wild) {
- hv -= dport;
- hv -= sport;
- tryagain = 1;
- WRITE_ENTER(&ipf_state);
- goto retry_tcpudp;
- }
- break;
- }
- default :
- break;
- }
- if (is == NULL) {
- ATOMIC_INCL(ips_stats.iss_miss);
- return NULL;
- }
- MUTEX_ENTER(&is->is_lock);
- is->is_bytes += fin->fin_plen;
- ips_stats.iss_hits++;
- is->is_pkts++;
- MUTEX_EXIT(&is->is_lock);
- fr = is->is_rule;
- fin->fin_fr = fr;
- pass = is->is_pass;
-#ifndef _KERNEL
- if (tcp->th_flags & TCP_CLOSE)
- fr_delstate(is);
-#endif
- RWLOCK_EXIT(&ipf_state);
- if ((fin->fin_fi.fi_fl & FI_FRAG) && (pass & FR_KEEPFRAG))
- ipfr_newfrag(ip, fin, pass ^ FR_KEEPSTATE);
- return fr;
-}
-
-
-void ip_statesync(ifp)
-void *ifp;
-{
- register ipstate_t *is;
-
- WRITE_ENTER(&ipf_state);
- for (is = ips_list; is; is = is->is_next) {
- if (is->is_ifpin == ifp) {
- is->is_ifpin = GETUNIT(is->is_ifname[0], is->is_v);
- if (!is->is_ifpin)
- is->is_ifpin = (void *)-1;
- }
- if (is->is_ifpout == ifp) {
- is->is_ifpout = GETUNIT(is->is_ifname[1], is->is_v);
- if (!is->is_ifpout)
- is->is_ifpout = (void *)-1;
- }
- }
- RWLOCK_EXIT(&ipf_state);
-}
-
-
-/*
- * Must always be called with fr_ipfstate held as a write lock.
- */
-static void fr_delstate(is)
-ipstate_t *is;
-{
- frentry_t *fr;
-
- if (is->is_flags & (FI_WILDP|FI_WILDA))
- ips_wild--;
- if (is->is_next)
- is->is_next->is_pnext = is->is_pnext;
- *is->is_pnext = is->is_next;
- if (is->is_hnext)
- is->is_hnext->is_phnext = is->is_phnext;
- *is->is_phnext = is->is_hnext;
- if (ips_table[is->is_hv] == NULL)
- ips_stats.iss_inuse--;
-
- fr = is->is_rule;
- if (fr != NULL) {
- fr->fr_ref--;
- if (fr->fr_ref == 0) {
- KFREE(fr);
- }
- }
-#ifdef _KERNEL
- MUTEX_DESTROY(&is->is_lock);
-#endif
- KFREE(is);
- ips_num--;
-}
-
-
-/*
- * Free memory in use by all state info. kept.
- */
-void fr_stateunload()
-{
- register ipstate_t *is;
-
- WRITE_ENTER(&ipf_state);
- while ((is = ips_list))
- fr_delstate(is);
- ips_stats.iss_inuse = 0;
- ips_num = 0;
- RWLOCK_EXIT(&ipf_state);
- KFREES(ips_table, fr_statesize * sizeof(ipstate_t *));
- ips_table = NULL;
-}
-
-
-/*
- * Slowly expire held state for thingslike UDP and ICMP. Timeouts are set
- * in expectation of this being called twice per second.
- */
-void fr_timeoutstate()
-{
- register ipstate_t *is, **isp;
-#if defined(_KERNEL) && !SOLARIS
- int s;
-#endif
-
- SPL_NET(s);
- WRITE_ENTER(&ipf_state);
- for (isp = &ips_list; (is = *isp); )
- if (is->is_age && !--is->is_age) {
- if (is->is_p == IPPROTO_TCP)
- ips_stats.iss_fin++;
- else
- ips_stats.iss_expire++;
-#ifdef IPFILTER_LOG
- ipstate_log(is, ISL_EXPIRE);
-#endif
- fr_delstate(is);
- } else
- isp = &is->is_next;
- if (fr_state_doflush) {
- (void) fr_state_flush(1);
- fr_state_doflush = 0;
- }
- RWLOCK_EXIT(&ipf_state);
- SPL_X(s);
-}
-
-
-/*
- * Original idea freom Pradeep Krishnan for use primarily with NAT code.
- * (pkrishna@netcom.com)
- *
- * Rewritten by Arjan de Vet <Arjan.deVet@adv.iae.nl>, 2000-07-29:
- *
- * - (try to) base state transitions on real evidence only,
- * i.e. packets that are sent and have been received by ipfilter;
- * diagram 18.12 of TCP/IP volume 1 by W. Richard Stevens was used.
- *
- * - deal with half-closed connections correctly;
- *
- * - store the state of the source in state[0] such that ipfstat
- * displays the state as source/dest instead of dest/source; the calls
- * to fr_tcp_age have been changed accordingly.
- *
- * Parameters:
- *
- * state[0] = state of source (host that initiated connection)
- * state[1] = state of dest (host that accepted the connection)
- *
- * dir == 0 : a packet from source to dest
- * dir == 1 : a packet from dest to source
- *
- */
-void fr_tcp_age(age, state, fin, dir)
-u_long *age;
-u_char *state;
-fr_info_t *fin;
-int dir;
-{
- tcphdr_t *tcp = (tcphdr_t *)fin->fin_dp;
- u_char flags = tcp->th_flags;
- int dlen, ostate;
-
- ostate = state[1 - dir];
-
- dlen = fin->fin_plen - fin->fin_hlen - (tcp->th_off << 2);
-
- if (flags & TH_RST) {
- if (!(tcp->th_flags & TH_PUSH) && !dlen) {
- *age = fr_tcpclosed;
- state[dir] = TCPS_CLOSED;
- } else {
- *age = fr_tcpclosewait;
- state[dir] = TCPS_CLOSE_WAIT;
- }
- return;
- }
-
- *age = fr_tcptimeout; /* default 4 mins */
-
- switch(state[dir])
- {
- case TCPS_CLOSED: /* 0 */
- if ((flags & TH_OPENING) == TH_OPENING) {
- /*
- * 'dir' received an S and sends SA in response,
- * CLOSED -> SYN_RECEIVED
- */
- state[dir] = TCPS_SYN_RECEIVED;
- *age = fr_tcptimeout;
- } else if ((flags & (TH_SYN|TH_ACK)) == TH_SYN) {
- /* 'dir' sent S, CLOSED -> SYN_SENT */
- state[dir] = TCPS_SYN_SENT;
- *age = fr_tcptimeout;
- }
- /*
- * The next piece of code makes it possible to get
- * already established connections into the state table
- * after a restart or reload of the filter rules; this
- * does not work when a strict 'flags S keep state' is
- * used for tcp connections of course
- */
- if ((flags & (TH_FIN|TH_SYN|TH_RST|TH_ACK)) == TH_ACK) {
- /* we saw an A, guess 'dir' is in ESTABLISHED mode */
- state[dir] = TCPS_ESTABLISHED;
- *age = fr_tcpidletimeout;
- }
- /*
- * TODO: besides regular ACK packets we can have other
- * packets as well; it is yet to be determined how we
- * should initialize the states in those cases
- */
- break;
-
- case TCPS_LISTEN: /* 1 */
- /* NOT USED */
- break;
-
- case TCPS_SYN_SENT: /* 2 */
- if ((flags & (TH_SYN|TH_FIN|TH_ACK)) == TH_ACK) {
- /*
- * We see an A from 'dir' which is in SYN_SENT
- * state: 'dir' sent an A in response to an SA
- * which it received, SYN_SENT -> ESTABLISHED
- */
- state[dir] = TCPS_ESTABLISHED;
- *age = fr_tcpidletimeout;
- } else if (flags & TH_FIN) {
- /*
- * We see an F from 'dir' which is in SYN_SENT
- * state and wants to close its side of the
- * connection; SYN_SENT -> FIN_WAIT_1
- */
- state[dir] = TCPS_FIN_WAIT_1;
- *age = fr_tcpidletimeout; /* or fr_tcptimeout? */
- } else if ((flags & TH_OPENING) == TH_OPENING) {
- /*
- * We see an SA from 'dir' which is already in
- * SYN_SENT state, this means we have a
- * simultaneous open; SYN_SENT -> SYN_RECEIVED
- */
- state[dir] = TCPS_SYN_RECEIVED;
- *age = fr_tcptimeout;
- }
- break;
-
- case TCPS_SYN_RECEIVED: /* 3 */
- if ((flags & (TH_SYN|TH_FIN|TH_ACK)) == TH_ACK) {
- /*
- * We see an A from 'dir' which was in SYN_RECEIVED
- * state so it must now be in established state,
- * SYN_RECEIVED -> ESTABLISHED
- */
- state[dir] = TCPS_ESTABLISHED;
- *age = fr_tcpidletimeout;
- } else if (flags & TH_FIN) {
- /*
- * We see an F from 'dir' which is in SYN_RECEIVED
- * state and wants to close its side of the connection;
- * SYN_RECEIVED -> FIN_WAIT_1
- */
- state[dir] = TCPS_FIN_WAIT_1;
- *age = fr_tcpidletimeout;
- }
- break;
-
- case TCPS_ESTABLISHED: /* 4 */
- if (flags & TH_FIN) {
- /*
- * 'dir' closed its side of the connection; this
- * gives us a half-closed connection;
- * ESTABLISHED -> FIN_WAIT_1
- */
- state[dir] = TCPS_FIN_WAIT_1;
- *age = fr_tcphalfclosed;
- } else if (flags & TH_ACK) {
- /* an ACK, should we exclude other flags here? */
- if (ostate == TCPS_FIN_WAIT_1) {
- /*
- * We know the other side did an active close,
- * so we are ACKing the recvd FIN packet (does
- * the window matching code guarantee this?)
- * and go into CLOSE_WAIT state; this gives us
- * a half-closed connection
- */
- state[dir] = TCPS_CLOSE_WAIT;
- *age = fr_tcphalfclosed;
- } else if (ostate < TCPS_CLOSE_WAIT)
- /*
- * Still a fully established connection,
- * reset timeout
- */
- *age = fr_tcpidletimeout;
- }
- break;
-
- case TCPS_CLOSE_WAIT: /* 5 */
- if (flags & TH_FIN) {
- /*
- * Application closed and 'dir' sent a FIN, we're now
- * going into LAST_ACK state
- */
- *age = fr_tcplastack;
- state[dir] = TCPS_LAST_ACK;
- } else {
- /*
- * We remain in CLOSE_WAIT because the other side has
- * closed already and we did not close our side yet;
- * reset timeout
- */
- *age = fr_tcphalfclosed;
- }
- break;
-
- case TCPS_FIN_WAIT_1: /* 6 */
- if ((flags & TH_ACK) && ostate > TCPS_CLOSE_WAIT) {
- /*
- * If the other side is not active anymore it has sent
- * us a FIN packet that we are ack'ing now with an ACK;
- * this means both sides have now closed the connection
- * and we go into TIME_WAIT
- */
- /*
- * XXX: how do we know we really are ACKing the FIN
- * packet here? does the window code guarantee that?
- */
- state[dir] = TCPS_TIME_WAIT;
- *age = fr_tcptimeout;
- } else
- /*
- * We closed our side of the connection already but the
- * other side is still active (ESTABLISHED/CLOSE_WAIT);
- * continue with this half-closed connection
- */
- *age = fr_tcphalfclosed;
- break;
-
- case TCPS_CLOSING: /* 7 */
- /* NOT USED */
- break;
-
- case TCPS_LAST_ACK: /* 8 */
- if (flags & TH_ACK) {
- if ((flags & TH_PUSH) || dlen)
- /*
- * There is still data to be delivered, reset
- * timeout
- */
- *age = fr_tcplastack;
- }
- /*
- * We cannot detect when we go out of LAST_ACK state to CLOSED
- * because that is based on the reception of ACK packets;
- * ipfilter can only detect that a packet has been sent by a
- * host
- */
- break;
-
- case TCPS_FIN_WAIT_2: /* 9 */
- /* NOT USED */
- break;
-
- case TCPS_TIME_WAIT: /* 10 */
- /* we're in 2MSL timeout now */
- break;
- }
-}
-
-
-#ifdef IPFILTER_LOG
-void ipstate_log(is, type)
-struct ipstate *is;
-u_int type;
-{
- struct ipslog ipsl;
- void *items[1];
- size_t sizes[1];
- int types[1];
-
- ipsl.isl_type = type;
- ipsl.isl_pkts = is->is_pkts;
- ipsl.isl_bytes = is->is_bytes;
- ipsl.isl_src = is->is_src;
- ipsl.isl_dst = is->is_dst;
- ipsl.isl_p = is->is_p;
- ipsl.isl_v = is->is_v;
- ipsl.isl_flags = is->is_flags;
- if (ipsl.isl_p == IPPROTO_TCP || ipsl.isl_p == IPPROTO_UDP) {
- ipsl.isl_sport = is->is_sport;
- ipsl.isl_dport = is->is_dport;
- if (ipsl.isl_p == IPPROTO_TCP) {
- ipsl.isl_state[0] = is->is_state[0];
- ipsl.isl_state[1] = is->is_state[1];
- }
- } else if (ipsl.isl_p == IPPROTO_ICMP)
- ipsl.isl_itype = is->is_icmp.ics_type;
- else {
- ipsl.isl_ps.isl_filler[0] = 0;
- ipsl.isl_ps.isl_filler[1] = 0;
- }
- items[0] = &ipsl;
- sizes[0] = sizeof(ipsl);
- types[0] = 0;
-
- (void) ipllog(IPL_LOGSTATE, NULL, items, sizes, types, 1);
-}
-#endif
-
-
-#ifdef USE_INET6
-frentry_t *fr_checkicmp6matchingstate(ip, fin)
-ip6_t *ip;
-fr_info_t *fin;
-{
- register ipstate_t *is, **isp;
- register u_short sport, dport;
- register u_char pr;
- struct icmp6_hdr *ic, *oic;
- union i6addr dst, src;
- u_short savelen;
- fr_info_t ofin;
- tcphdr_t *tcp;
- frentry_t *fr;
- ip6_t *oip;
- int type;
- u_int hv;
-
- /*
- * Does it at least have the return (basic) IP header ?
- * Only a basic IP header (no options) should be with
- * an ICMP error header.
- */
- if ((fin->fin_v != 6) || (fin->fin_plen < ICMP6ERR_MINPKTLEN))
- return NULL;
- ic = (struct icmp6_hdr *)fin->fin_dp;
- type = ic->icmp6_type;
- /*
- * If it's not an error type, then return
- */
- if ((type != ICMP6_DST_UNREACH) && (type != ICMP6_PACKET_TOO_BIG) &&
- (type != ICMP6_TIME_EXCEEDED) && (type != ICMP6_PARAM_PROB))
- return NULL;
-
- oip = (ip6_t *)((char *)ic + ICMPERR_ICMPHLEN);
- if (fin->fin_plen < sizeof(*oip))
- return NULL;
-
- if (oip->ip6_nxt == IPPROTO_ICMPV6) {
- oic = (struct icmp6_hdr *)(oip + 1);
- /*
- * a ICMP error can only be generated as a result of an
- * ICMP query, not as the response on an ICMP error
- *
- * XXX theoretically ICMP_ECHOREP and the other reply's are
- * ICMP query's as well, but adding them here seems strange XXX
- */
- if (!(oic->icmp6_type & ICMP6_INFOMSG_MASK))
- return NULL;
-
- /*
- * perform a lookup of the ICMP packet in the state table
- */
- hv = (pr = oip->ip6_nxt);
- src.in6 = oip->ip6_src;
- hv += src.in4.s_addr;
- dst.in6 = oip->ip6_dst;
- hv += dst.in4.s_addr;
- hv += oic->icmp6_id;
- hv += oic->icmp6_seq;
- hv %= fr_statesize;
-
- oip->ip6_plen = ntohs(oip->ip6_plen);
- ofin.fin_v = 6;
- fr_makefrip(sizeof(*oip), (ip_t *)oip, &ofin);
- oip->ip6_plen = htons(oip->ip6_plen);
- ofin.fin_ifp = fin->fin_ifp;
- ofin.fin_out = !fin->fin_out;
- ofin.fin_mp = NULL; /* if dereferenced, panic XXX */
-
- READ_ENTER(&ipf_state);
- for (isp = &ips_table[hv]; (is = *isp); isp = &is->is_hnext)
- if ((is->is_p == pr) &&
- (oic->icmp6_id == is->is_icmp.ics_id) &&
- (oic->icmp6_seq == is->is_icmp.ics_seq) &&
- fr_matchsrcdst(is, src, dst, &ofin, NULL)) {
- /*
- * in the state table ICMP query's are stored
- * with the type of the corresponding ICMP
- * response. Correct here
- */
- if (((is->is_type == ICMP6_ECHO_REPLY) &&
- (oic->icmp6_type == ICMP6_ECHO_REQUEST)) ||
- (is->is_type - 1 == oic->icmp6_type )) {
- ips_stats.iss_hits++;
- is->is_pkts++;
- is->is_bytes += fin->fin_plen;
- return is->is_rule;
- }
- }
- RWLOCK_EXIT(&ipf_state);
-
- return NULL;
- };
-
- if ((oip->ip6_nxt != IPPROTO_TCP) && (oip->ip6_nxt != IPPROTO_UDP))
- return NULL;
- tcp = (tcphdr_t *)(oip + 1);
- dport = tcp->th_dport;
- sport = tcp->th_sport;
-
- hv = (pr = oip->ip6_nxt);
- src.in6 = oip->ip6_src;
- hv += src.in4.s_addr;
- dst.in6 = oip->ip6_dst;
- hv += dst.in4.s_addr;
- hv += dport;
- hv += sport;
- hv %= fr_statesize;
- /*
- * we make an fin entry to be able to feed it to
- * matchsrcdst note that not all fields are encessary
- * but this is the cleanest way. Note further we fill
- * in fin_mp such that if someone uses it we'll get
- * a kernel panic. fr_matchsrcdst does not use this.
- *
- * watch out here, as ip is in host order and oip in network
- * order. Any change we make must be undone afterwards.
- */
- savelen = oip->ip6_plen;
- oip->ip6_plen = ip->ip6_plen - sizeof(*ip) - ICMPERR_ICMPHLEN;
- ofin.fin_v = 6;
- fr_makefrip(sizeof(*oip), (ip_t *)oip, &ofin);
- oip->ip6_plen = savelen;
- ofin.fin_ifp = fin->fin_ifp;
- ofin.fin_out = !fin->fin_out;
- ofin.fin_mp = NULL; /* if dereferenced, panic XXX */
- READ_ENTER(&ipf_state);
- for (isp = &ips_table[hv]; (is = *isp); isp = &is->is_hnext) {
- /*
- * Only allow this icmp though if the
- * encapsulated packet was allowed through the
- * other way around. Note that the minimal amount
- * of info present does not allow for checking against
- * tcp internals such as seq and ack numbers.
- */
- if ((is->is_p == pr) && (is->is_v == 6) &&
- fr_matchsrcdst(is, src, dst, &ofin, tcp)) {
- fr = is->is_rule;
- ips_stats.iss_hits++;
- /*
- * we must swap src and dst here because the icmp
- * comes the other way around
- */
- is->is_pkts++;
- is->is_bytes += fin->fin_plen;
- /*
- * we deliberately do not touch the timeouts
- * for the accompanying state table entry.
- * It remains to be seen if that is correct. XXX
- */
- RWLOCK_EXIT(&ipf_state);
- return fr;
- }
- }
- RWLOCK_EXIT(&ipf_state);
- return NULL;
-}
-#endif
diff --git a/sys/contrib/ipfilter/netinet/ip_state.h b/sys/contrib/ipfilter/netinet/ip_state.h
deleted file mode 100644
index 765709c047c4..000000000000
--- a/sys/contrib/ipfilter/netinet/ip_state.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright (C) 1995-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * @(#)ip_state.h 1.3 1/12/96 (C) 1995 Darren Reed
- * $Id: ip_state.h,v 2.13.2.1 2000/07/08 02:15:35 darrenr Exp $
- * $FreeBSD$
- */
-#ifndef __IP_STATE_H__
-#define __IP_STATE_H__
-
-#if defined(__STDC__) || defined(__GNUC__)
-# define SIOCDELST _IOW('r', 61, struct ipstate *)
-#else
-# define SIOCDELST _IOW(r, 61, struct ipstate *)
-#endif
-
-#define IPSTATE_SIZE 5737
-#define IPSTATE_MAX 4013 /* Maximum number of states held */
-
-#define PAIRS(s1,d1,s2,d2) ((((s1) == (s2)) && ((d1) == (d2))) ||\
- (((s1) == (d2)) && ((d1) == (s2))))
-#define IPPAIR(s1,d1,s2,d2) PAIRS((s1).s_addr, (d1).s_addr, \
- (s2).s_addr, (d2).s_addr)
-
-
-typedef struct udpstate {
- u_short us_sport;
- u_short us_dport;
-} udpstate_t;
-
-typedef struct icmpstate {
- u_short ics_id;
- u_short ics_seq;
- u_char ics_type;
-} icmpstate_t;
-
-typedef struct tcpdata {
- u_32_t td_end;
- u_32_t td_maxend;
- u_short td_maxwin;
-} tcpdata_t;
-
-typedef struct tcpstate {
- u_short ts_sport;
- u_short ts_dport;
- tcpdata_t ts_data[2];
- u_char ts_state[2];
-} tcpstate_t;
-
-typedef struct ipstate {
- struct ipstate *is_next;
- struct ipstate **is_pnext;
- struct ipstate *is_hnext;
- struct ipstate **is_phnext;
- u_long is_age;
- u_int is_pass;
- U_QUAD_T is_pkts;
- U_QUAD_T is_bytes;
- void *is_ifp[2];
- frentry_t *is_rule;
- union i6addr is_src;
- union i6addr is_dst;
- u_char is_p; /* Protocol */
- u_char is_v;
- u_int is_hv;
- u_32_t is_flags;
- u_32_t is_opt; /* packet options set */
- u_32_t is_optmsk; /* " " mask */
- u_short is_sec; /* security options set */
- u_short is_secmsk; /* " " mask */
- u_short is_auth; /* authentication options set */
- u_short is_authmsk; /* " " mask */
- union {
- icmpstate_t is_ics;
- tcpstate_t is_ts;
- udpstate_t is_us;
- } is_ps;
- char is_ifname[2][IFNAMSIZ];
-#if SOLARIS || defined(__sgi)
- kmutex_t is_lock;
-#endif
-} ipstate_t;
-
-#define is_saddr is_src.in4.s_addr
-#define is_daddr is_dst.in4.s_addr
-#define is_icmp is_ps.is_ics
-#define is_type is_icmp.ics_type
-#define is_code is_icmp.ics_code
-#define is_tcp is_ps.is_ts
-#define is_udp is_ps.is_us
-#define is_send is_tcp.ts_data[0].td_end
-#define is_dend is_tcp.ts_data[1].td_end
-#define is_maxswin is_tcp.ts_data[0].td_maxwin
-#define is_maxdwin is_tcp.ts_data[1].td_maxwin
-#define is_maxsend is_tcp.ts_data[0].td_maxend
-#define is_maxdend is_tcp.ts_data[1].td_maxend
-#define is_sport is_tcp.ts_sport
-#define is_dport is_tcp.ts_dport
-#define is_state is_tcp.ts_state
-#define is_ifpin is_ifp[0]
-#define is_ifpout is_ifp[1]
-
-#define TH_OPENING (TH_SYN|TH_ACK)
-/*
- * is_flags:
- * Bits 0 - 3 are use as a mask with the current packet's bits to check for
- * whether it is short, tcp/udp, a fragment or the presence of IP options.
- * Bits 4 - 7 are set from the initial packet and contain what the packet
- * anded with bits 0-3 must match.
- * Bits 8,9 are used to indicate wildcard source/destination port matching.
- */
-
-typedef struct ipstate_save {
- void *ips_next;
- struct ipstate ips_is;
- struct frentry ips_fr;
-} ipstate_save_t;
-
-#define ips_rule ips_is.is_rule
-
-
-typedef struct ipslog {
- U_QUAD_T isl_pkts;
- U_QUAD_T isl_bytes;
- union i6addr isl_src;
- union i6addr isl_dst;
- u_short isl_type;
- union {
- u_short isl_filler[2];
- u_short isl_ports[2];
- u_short isl_icmp;
- } isl_ps;
- u_char isl_v;
- u_char isl_p;
- u_char isl_flags;
- u_char isl_state[2];
-} ipslog_t;
-
-#define isl_sport isl_ps.isl_ports[0]
-#define isl_dport isl_ps.isl_ports[1]
-#define isl_itype isl_ps.isl_icmp
-
-#define ISL_NEW 0
-#define ISL_EXPIRE 0xffff
-#define ISL_FLUSH 0xfffe
-#define ISL_REMOVE 0xfffd
-
-
-typedef struct ips_stat {
- u_long iss_hits;
- u_long iss_miss;
- u_long iss_max;
- u_long iss_tcp;
- u_long iss_udp;
- u_long iss_icmp;
- u_long iss_nomem;
- u_long iss_expire;
- u_long iss_fin;
- u_long iss_active;
- u_long iss_logged;
- u_long iss_logfail;
- u_long iss_inuse;
- ipstate_t **iss_table;
- ipstate_t *iss_list;
-} ips_stat_t;
-
-
-extern u_long fr_tcpidletimeout;
-extern u_long fr_tcpclosewait;
-extern u_long fr_tcplastack;
-extern u_long fr_tcptimeout;
-extern u_long fr_tcpclosed;
-extern u_long fr_tcphalfclosed;
-extern u_long fr_udptimeout;
-extern u_long fr_icmptimeout;
-extern int fr_state_lock;
-extern int fr_stateinit __P((void));
-extern int fr_tcpstate __P((ipstate_t *, fr_info_t *, ip_t *, tcphdr_t *));
-extern ipstate_t *fr_addstate __P((ip_t *, fr_info_t *, u_int));
-extern frentry_t *fr_checkstate __P((ip_t *, fr_info_t *));
-extern void ip_statesync __P((void *));
-extern void fr_timeoutstate __P((void));
-extern void fr_tcp_age __P((u_long *, u_char *, fr_info_t *, int));
-extern void fr_stateunload __P((void));
-extern void ipstate_log __P((struct ipstate *, u_int));
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-extern int fr_state_ioctl __P((caddr_t, u_long, int));
-#else
-extern int fr_state_ioctl __P((caddr_t, int, int));
-#endif
-
-#endif /* __IP_STATE_H__ */
diff --git a/sys/contrib/ipfilter/netinet/ipl.h b/sys/contrib/ipfilter/netinet/ipl.h
deleted file mode 100644
index 79d0bd33843b..000000000000
--- a/sys/contrib/ipfilter/netinet/ipl.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (C) 1993-2000 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- *
- * @(#)ipl.h 1.21 6/5/96
- * $FreeBSD$
- */
-
-#ifndef __IPL_H__
-#define __IPL_H__
-
-#define IPL_VERSION "IP Filter: v3.4.16"
-
-#endif
diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c
deleted file mode 100644
index 2a51d7dc002a..000000000000
--- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright 1999 Guido van Rooij. All rights reserved.
- *
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/conf.h>
-#include <sys/socket.h>
-#include <sys/sysctl.h>
-#include <net/if.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#if (__FreeBSD_version >= 199511)
-# include <net/route.h>
-# include <netinet/ip_var.h>
-# include <netinet/tcp.h>
-# include <netinet/tcpip.h>
-#endif
-
-
-#include <netinet/ipl.h>
-#include <netinet/ip_compat.h>
-#include <netinet/ip_fil.h>
-#include <netinet/ip_state.h>
-#include <netinet/ip_nat.h>
-#include <netinet/ip_auth.h>
-#include <netinet/ip_frag.h>
-#include <netinet/ip_proxy.h>
-
-static dev_t ipf_devs[IPL_LOGMAX + 1];
-
-SYSCTL_DECL(_net_inet);
-SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &fr_flags, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_pass, CTLFLAG_RW, &fr_pass, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &fr_active, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpidletimeout, CTLFLAG_RW,
- &fr_tcpidletimeout, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpclosewait, CTLFLAG_RW,
- &fr_tcpclosewait, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcplastack, CTLFLAG_RW,
- &fr_tcplastack, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcptimeout, CTLFLAG_RW,
- &fr_tcptimeout, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpclosed, CTLFLAG_RW,
- &fr_tcpclosed, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcphalfclosed, CTLFLAG_RW,
- &fr_tcphalfclosed, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_udptimeout, CTLFLAG_RW,
- &fr_udptimeout, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_icmptimeout, CTLFLAG_RW,
- &fr_icmptimeout, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_defnatage, CTLFLAG_RW,
- &fr_defnatage, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_ipfrttl, CTLFLAG_RW,
- &fr_ipfrttl, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, ipl_unreach, CTLFLAG_RW,
- &ipl_unreach, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD,
- &fr_running, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_authsize, CTLFLAG_RD,
- &fr_authsize, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_authused, CTLFLAG_RD,
- &fr_authused, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_defaultauthage, CTLFLAG_RW,
- &fr_defaultauthage, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &fr_chksrc, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, ippr_ftp_pasvonly, CTLFLAG_RW,
- &ippr_ftp_pasvonly, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &fr_minttl, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_minttllog, CTLFLAG_RW,
- &fr_minttllog, 0, "");
-
-#define CDEV_MAJOR 79
-static struct cdevsw ipl_cdevsw = {
- /* open */ iplopen,
- /* close */ iplclose,
- /* read */ iplread,
- /* write */ nowrite,
- /* ioctl */ iplioctl,
- /* poll */ nopoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "ipl",
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ 0,
-};
-
-static int
-ipfilter_modevent(module_t mod, int type, void *unused)
-{
- char *c;
- int i, error = 0;
-
- switch (type) {
- case MOD_LOAD :
-
- error = iplattach();
- if (error)
- break;
-
- c = NULL;
- for(i=strlen(IPL_NAME); i>0; i--)
- if (IPL_NAME[i] == '/') {
- c = &IPL_NAME[i+1];
- break;
- }
- if (!c)
- c = IPL_NAME;
- ipf_devs[IPL_LOGIPF] =
- make_dev(&ipl_cdevsw, IPL_LOGIPF, 0, 0, 0600, c);
-
- c = NULL;
- for(i=strlen(IPL_NAT); i>0; i--)
- if (IPL_NAT[i] == '/') {
- c = &IPL_NAT[i+1];
- break;
- }
- if (!c)
- c = IPL_NAT;
- ipf_devs[IPL_LOGNAT] =
- make_dev(&ipl_cdevsw, IPL_LOGNAT, 0, 0, 0600, c);
-
- c = NULL;
- for(i=strlen(IPL_STATE); i>0; i--)
- if (IPL_STATE[i] == '/') {
- c = &IPL_STATE[i+1];
- break;
- }
- if (!c)
- c = IPL_STATE;
- ipf_devs[IPL_LOGSTATE] =
- make_dev(&ipl_cdevsw, IPL_LOGSTATE, 0, 0, 0600, c);
-
- c = NULL;
- for(i=strlen(IPL_AUTH); i>0; i--)
- if (IPL_AUTH[i] == '/') {
- c = &IPL_AUTH[i+1];
- break;
- }
- if (!c)
- c = IPL_AUTH;
- ipf_devs[IPL_LOGAUTH] =
- make_dev(&ipl_cdevsw, IPL_LOGAUTH, 0, 0, 0600, c);
-
- break;
- case MOD_UNLOAD :
- destroy_dev(ipf_devs[IPL_LOGIPF]);
- destroy_dev(ipf_devs[IPL_LOGNAT]);
- destroy_dev(ipf_devs[IPL_LOGSTATE]);
- destroy_dev(ipf_devs[IPL_LOGAUTH]);
- error = ipldetach();
- break;
- default:
- error = EINVAL;
- break;
- }
- return error;
-}
-
-static moduledata_t ipfiltermod = {
- IPL_VERSION,
- ipfilter_modevent,
- 0
-};
-DECLARE_MODULE(ipfilter, ipfiltermod, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY);
diff --git a/sys/crypto/rijndael/rijndael.h b/sys/crypto/rijndael/rijndael.h
deleted file mode 100644
index 8f2cc895b433..000000000000
--- a/sys/crypto/rijndael/rijndael.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $KAME: rijndael.h,v 1.2 2000/10/02 17:14:27 itojun Exp $ */
-
-#include <crypto/rijndael/rijndael-api-fst.h>
diff --git a/sys/dev/ar/if_ar.h b/sys/dev/ar/if_ar.h
deleted file mode 100644
index 875e42a6745c..000000000000
--- a/sys/dev/ar/if_ar.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * if_ar.h
- *
- * Copyright (C) 1997-1999 Whistle Communications Inc.
- * All rights reserved.
- *
- * Subject to the following obligations and disclaimer of warranty, use and
- * redistribution of this software, in source or object code forms, with or
- * without modifications are expressly permitted by Whistle Communications;
- * provided, however, that:
- * 1. Any and all reproductions of the source or object code must include the
- * copyright notice above and the following disclaimer of warranties; and
- * 2. No rights are granted, in any manner or form, to use Whistle
- * Communications, Inc. trademarks, including the mark "WHISTLE
- * COMMUNICATIONS" on advertising, endorsements, or otherwise except as
- * such appears in the above copyright notice or in the software.
- *
- * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
- * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
- * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
- * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
- * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
- * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
- * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
- * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
- * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
- * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _I386_ISA_IF_AR_H_
-#define _I386_ISA_IF_AR_H_
-
-/* Node type name and type cookie */
-#define NG_AR_NODE_TYPE "sync_ar"
-#define NG_AR_COOKIE 860552149
-
-/* Netgraph hooks */
-#define NG_AR_HOOK_DEBUG "debug"
-#define NG_AR_HOOK_RAW "rawdata"
-
-#endif /* _I386_ISA_IF_AR_H_ */
-
diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c
deleted file mode 100644
index c236c82d803b..000000000000
--- a/sys/dev/ar/if_ar_isa.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 1995 - 2001 John Hay. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY John Hay ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL John Hay BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Programming assumptions and other issues.
- *
- * The descriptors of a DMA channel will fit in a 16K memory window.
- *
- * The buffers of a transmit DMA channel will fit in a 16K memory window.
- *
- * Only the ISA bus cards with X.21 and V.35 is tested.
- *
- * When interface is going up, handshaking is set and it is only cleared
- * when the interface is down'ed.
- *
- * There should be a way to set/reset Raw HDLC/PPP, Loopback, DCE/DTE,
- * internal/external clock, etc.....
- *
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-#include <machine/bus.h>
-#include <machine/resource.h>
-#include <machine/bus_pio.h>
-#include <machine/bus_memio.h>
-#include <sys/rman.h>
-
-#include <isa/isavar.h>
-#include "isa_if.h"
-
-#include <dev/ic/hd64570.h>
-#include <dev/ar/if_arregs.h>
-
-#ifdef TRACE
-#define TRC(x) x
-#else
-#define TRC(x)
-#endif
-
-#define TRCL(x) x
-
-static int ar_isa_probe (device_t);
-static int ar_isa_attach (device_t);
-
-static struct isa_pnp_id ar_ids[] = {
- {0, NULL}
-};
-
-static device_method_t ar_methods[] = {
- DEVMETHOD(device_probe, ar_isa_probe),
- DEVMETHOD(device_attach, ar_isa_attach),
- DEVMETHOD(device_detach, ar_detach),
- { 0, 0 }
-};
-
-static driver_t ar_isa_driver = {
- "ar",
- ar_methods,
- sizeof (struct ar_hardc)
-};
-
-devclass_t ar_devclass;
-
-DRIVER_MODULE(if_ar, isa, ar_isa_driver, ar_devclass, 0, 0);
-
-/*
- * Probe to see if it is there.
- * Get its information and fill it in.
- */
-static int
-ar_isa_probe(device_t device)
-{
- int error;
- u_long membase, memsize, port_start, port_count;
-
- error = ISA_PNP_PROBE(device_get_parent(device), device, ar_ids);
- if(error == ENXIO || error == 0)
- return (error);
-
- if((error = ar_allocate_ioport(device, 0, ARC_IO_SIZ))) {
- return (ENXIO);
- }
-
- /*
- * Now see if the card is realy there.
- *
- * XXX For now I just check the undocumented ports
- * for "570". We will probably have to do more checking.
- */
- error = bus_get_resource(device, SYS_RES_IOPORT, 0, &port_start,
- &port_count);
-
- if((inb(port_start + AR_ID_5) != '5') ||
- (inb(port_start + AR_ID_7) != '7') ||
- (inb(port_start + AR_ID_0) != '0')) {
- ar_deallocate_resources(device);
- return (ENXIO);
- }
- membase = bus_get_resource_start(device, SYS_RES_MEMORY, 0);
- memsize = inb(port_start + AR_REV);
- memsize = 1 << ((memsize & AR_WSIZ_MSK) >> AR_WSIZ_SHFT);
- memsize *= ARC_WIN_SIZ;
- error = bus_set_resource(device, SYS_RES_MEMORY, 0, membase, memsize);
- ar_deallocate_resources(device);
-
- return (error);
-}
-
-/*
- * Malloc memory for the softc structures.
- * Reset the card to put it in a known state.
- * Register the ports on the adapter.
- * Fill in the info for each port.
- * Attach each port to sppp and bpf.
- */
-static int
-ar_isa_attach(device_t device)
-{
- u_int tmp;
- u_long irq, junk;
- struct ar_hardc *hc;
-
- hc = (struct ar_hardc *)device_get_softc(device);
- if(ar_allocate_ioport(device, 0, ARC_IO_SIZ))
- return (ENXIO);
- hc->bt = rman_get_bustag(hc->res_ioport);
- hc->bh = rman_get_bushandle(hc->res_ioport);
-
- hc->iobase = rman_get_start(hc->res_ioport);
-
- tmp = inb(hc->iobase + AR_BMI);
- hc->bustype = tmp & AR_BUS_MSK;
- hc->memsize = (tmp & AR_MEM_MSK) >> AR_MEM_SHFT;
- hc->memsize = 1 << hc->memsize;
- hc->memsize <<= 16;
- hc->interface[0] = (tmp & AR_IFACE_MSK);
- hc->interface[1] = hc->interface[0];
- hc->interface[2] = hc->interface[0];
- hc->interface[3] = hc->interface[0];
- tmp = inb(hc->iobase + AR_REV);
- hc->revision = tmp & AR_REV_MSK;
- hc->winsize = 1 << ((tmp & AR_WSIZ_MSK) >> AR_WSIZ_SHFT);
- hc->winsize *= ARC_WIN_SIZ;
- hc->winmsk = hc->winsize - 1;
- hc->numports = inb(hc->iobase + AR_PNUM);
- hc->handshake = inb(hc->iobase + AR_HNDSH);
-
- if(ar_allocate_memory(device, 0, hc->winsize))
- return (ENXIO);
-
- hc->mem_start = rman_get_virtual(hc->res_memory);
- hc->mem_end = hc->mem_start + hc->winsize;
- hc->cunit = device_get_unit(device);
-
- switch(hc->interface[0]) {
- case AR_IFACE_EIA_232:
- printf("ar%d: The EIA 232 interface is not supported.\n",
- hc->cunit);
- ar_deallocate_resources(device);
- return (ENXIO);
- case AR_IFACE_V_35:
- break;
- case AR_IFACE_EIA_530:
- printf("ar%d: WARNING: The EIA 530 interface is untested.\n",
- hc->cunit);
- break;
- case AR_IFACE_X_21:
- break;
- case AR_IFACE_COMBO:
- printf("ar%d: WARNING: The COMBO interface is untested.\n",
- hc->cunit);
- break;
- }
-
- /*
- * Do a little sanity check.
- */
- if((hc->numports > NPORT) || (hc->memsize > (512*1024))) {
- ar_deallocate_resources(device);
- return (ENXIO);
- }
-
- if(ar_allocate_irq(device, 0, 1))
- return (ENXIO);
-
- if(bus_get_resource(device, SYS_RES_IRQ, 0, &irq, &junk)) {
- ar_deallocate_resources(device);
- return (ENXIO);
- }
- hc->isa_irq = irq;
-
- if(ar_attach(device)) {
- ar_deallocate_resources(device);
- return (ENXIO);
- }
-
- return (0);
-}
-
-
-
-
-
-
-
-/*
- ********************************* END ************************************
- */
diff --git a/sys/dev/ar/if_ar_pci.c b/sys/dev/ar/if_ar_pci.c
deleted file mode 100644
index d14b416ef4f4..000000000000
--- a/sys/dev/ar/if_ar_pci.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1999 - 2001 John Hay.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/bus.h>
-#include <machine/bus.h>
-#include <machine/resource.h>
-#include <machine/bus_pio.h>
-#include <machine/bus_memio.h>
-#include <sys/rman.h>
-
-#include <pci/pcireg.h>
-#include <pci/pcivar.h>
-
-#include <dev/ic/hd64570.h>
-#include <dev/ar/if_arregs.h>
-
-#ifdef TRACE
-#define TRC(x) x
-#else
-#define TRC(x)
-#endif
-
-#define TRCL(x) x
-
-static int ar_pci_probe(device_t);
-static int ar_pci_attach(device_t);
-
-static device_method_t ar_pci_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, ar_pci_probe),
- DEVMETHOD(device_attach, ar_pci_attach),
- DEVMETHOD(device_detach, ar_detach),
- { 0, 0 }
-};
-
-static driver_t ar_pci_driver = {
- "ar",
- ar_pci_methods,
- sizeof(struct ar_hardc),
-};
-
-DRIVER_MODULE(if_ar, pci, ar_pci_driver, ar_devclass, 0, 0);
-
-static int
-ar_pci_probe(device_t device)
-{
- u_int32_t type = pci_get_devid(device);
-
- switch(type) {
- case 0x5012114f:
- device_set_desc(device, "Digi SYNC/570i-PCI 2 port");
- return (0);
- break;
- case 0x5010114f:
- printf("Digi SYNC/570i-PCI 2 port (mapped below 1M)\n");
- printf("Please change the jumper to select linear mode.\n");
- break;
- case 0x5013114f:
- device_set_desc(device, "Digi SYNC/570i-PCI 4 port");
- return (0);
- break;
- case 0x5011114f:
- printf("Digi SYNC/570i-PCI 4 port (mapped below 1M)\n");
- printf("Please change the jumper to select linear mode.\n");
- break;
- default:
- break;
- }
- return (ENXIO);
-}
-
-static int
-ar_pci_attach(device_t device)
-{
- int error;
- u_int i, tmp;
- u_char *inten;
- struct ar_hardc *hc;
-
- hc = (struct ar_hardc *)device_get_softc(device);
- bzero(hc, sizeof(struct ar_hardc));
-
- error = ar_allocate_plx_memory(device, 0x10, 1);
- if(error)
- goto errexit;
-
- error = ar_allocate_memory(device, 0x18, 1);
- if(error)
- goto errexit;
-
- error = ar_allocate_irq(device, 0, 1);
- if(error)
- goto errexit;
-
- hc->plx_mem = rman_get_virtual(hc->res_plx_memory);
- hc->mem_start = rman_get_virtual(hc->res_memory);
-
- hc->cunit = device_get_unit(device);
- hc->sca[0] = (sca_regs *)(hc->mem_start + AR_PCI_SCA_1_OFFSET);
- hc->sca[1] = (sca_regs *)(hc->mem_start + AR_PCI_SCA_2_OFFSET);
- hc->iobase = 0;
- hc->orbase = (u_char *)(hc->mem_start + AR_PCI_ORBASE_OFFSET);
-
- tmp = hc->orbase[AR_BMI * 4];
- hc->bustype = tmp & AR_BUS_MSK;
- hc->memsize = (tmp & AR_MEM_MSK) >> AR_MEM_SHFT;
- hc->memsize = 1 << hc->memsize;
- hc->memsize <<= 16;
- hc->interface[0] = (tmp & AR_IFACE_MSK);
- tmp = hc->orbase[AR_REV * 4];
- hc->revision = tmp & AR_REV_MSK;
- hc->winsize = (1 << ((tmp & AR_WSIZ_MSK) >> AR_WSIZ_SHFT)) * 16 * 1024;
- hc->mem_end = (caddr_t)(hc->mem_start + hc->winsize);
- hc->winmsk = hc->winsize - 1;
- hc->numports = hc->orbase[AR_PNUM * 4];
- hc->handshake = hc->orbase[AR_HNDSH * 4];
-
- for(i = 1; i < hc->numports; i++)
- hc->interface[i] = hc->interface[0];
-
- TRC(printf("arp%d: bus %x, rev %d, memstart %p, winsize %d, "
- "winmsk %x, interface %x\n",
- unit, hc->bustype, hc->revision, hc->mem_start, hc->winsize,
- hc->winmsk, hc->interface[0]));
-
- ar_attach(device);
-
- /* Magic to enable the card to generate interrupts. */
- inten = (u_char *)hc->plx_mem;
- inten[0x69] = 0x09;
-
- return (0);
-
-errexit:
- ar_deallocate_resources(device);
- return (ENXIO);
-}
-
diff --git a/sys/dev/ar/if_arregs.h b/sys/dev/ar/if_arregs.h
deleted file mode 100644
index 552d20e81ac7..000000000000
--- a/sys/dev/ar/if_arregs.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 1995 - 2001 John Hay. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY [your name] AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _IF_ARREGS_H_
-#define _IF_ARREGS_H_
-
-#define NCHAN 2 /* A HD64570 chip have 2 channels */
-#define NPORT 4 /* A ArNet board can have 4 ports or */
- /* channels */
-
-#define AR_BUF_SIZ 512
-#define AR_TX_BLOCKS 2
-#define ARC_IO_SIZ 0x10
-#define ARC_WIN_SIZ 0x00004000
-#define ARC_WIN_MSK (ARC_WIN_SIZ - 1)
-#define ARC_WIN_SHFT 14
-
-/* Some PCI specific offsets. */
-#define AR_PCI_SCA_1_OFFSET 0x00040000
-#define AR_PCI_SCA_2_OFFSET 0x00040400
-#define AR_PCI_ORBASE_OFFSET 0x00041000
-#define AR_PCI_SCA_PCR 0x0208
-#define AR_PCI_SCA_DMER 0x0309
-/* PCI Legacy (below 1M) offsets. */
-#define AR_PCI_L_SCA_1_OFFSET 0x00004000
-#define AR_PCI_L_SCA_2_OFFSET 0x00004400
-#define AR_PCI_L_ORBASE_OFFSET 0x00005000
-
-#define AR_ID_5 0x00 /* RO, Card probe '5' */
-#define AR_ID_7 0x01 /* RO, Card probe '7' */
-#define AR_ID_0 0x02 /* RO, Card probe '0' */
-#define AR_BMI 0x03 /* RO, Bus, mem and interface type */
-#define AR_REV 0x04 /* RO, Adapter revision */
-#define AR_PNUM 0x05 /* RO, Port number */
-#define AR_HNDSH 0x06 /* RO, Supported handshake */
-#define AR_ISTAT 0x07 /* RO, DCD and Interrupt status */
-#define AR_MSCA_EN 0x08 /* WO, Memory and SCA enable */
-#define AR_TXC_DTR0 0x09 /* WO, Tx Clock and DTR control 0 + 1 */
-#define AR_SEC_PAL 0x0A /* RW, Security PAL */
-#define AR_INT_ACK0 0x0B /* RO, Interrupt Acknowledge 0 + 1 */
-#define AR_INT_SEL 0x0C /* RW, Interrupt Select */
-#define AR_MEM_SEL 0x0D /* RW, Memory Select */
-#define AR_INT_ACK2 0x0E /* RO, Interrupt Acknowledge 2 + 3 */
-#define AR_TXC_DTR2 0x0E /* WO, Tx Clock and DTR control 2 + 3 */
-/* PCI only */
-#define AR_PIMCTRL 0x4C /* RW, PIM and LEDs */
-#define AR_INT_SCB 0x50 /* RO, Interrupt Scoreboard */
-
-#define AR_REV_MSK 0x0F
-#define AR_WSIZ_MSK 0xE0
-#define AR_WSIZ_SHFT 5
-/* Bus memory and interface type */
-#define AR_BUS_MSK 0x03
-#define AR_BUS_ISA 0x00
-#define AR_BUS_MCA 0x01
-#define AR_BUS_EISA 0x02
-#define AR_BUS_PCI 0x03
-
-#define AR_MEM_MSK 0x1C
-#define AR_MEM_SHFT 0x02
-#define AR_MEM_64K 0x00
-#define AR_MEM_128K 0x04
-#define AR_MEM_256K 0x08
-#define AR_MEM_512K 0x0C
-
-/*
- * EIA-232
- * V.35/EIA-232
- * EIA-530
- * X.21
- * EIA-530/X.21 Combo
- */
-#define AR_IFACE_MSK 0xE0
-#define AR_IFACE_SHFT 0x05
-#define AR_IFACE_EIA_232 0x00 /* Only on the 570 card, not 570i */
-#define AR_IFACE_V_35 0x20 /* Selectable between V.35 and EIA-232 */
-#define AR_IFACE_EIA_530 0x40
-#define AR_IFACE_X_21 0x60
-#define AR_IFACE_COMBO 0xC0 /* X.21 / EIA-530 */
-#define AR_IFACE_PIM 0xE0 /* PIM module */
-#define AR_IFACE_LOOPBACK 0xFE
-#define AR_IFACE_UNKNOWN 0xFF
-
-/* Supported Handshake signals */
-#define AR_SHSK_DTR 0x01
-#define AR_SHSK_RTS 0x02
-#define AR_SHSK_CTS 0x10
-#define AR_SHSK_DSR 0x20
-#define AR_SHSK_RI 0x40
-#define AR_SHSK_DCD 0x80
-
-/* DCD and Interrupt status */
-#define AR_BD_INT 0x01
-#define AR_INT_0 0x20
-#define AR_INT_1 0x40
-
-#define AR_DCD_MSK 0x1E
-#define AR_DCD_SHFT 0x01
-#define AR_DCD_0 0x02
-#define AR_DCD_1 0x04
-#define AR_DCD_2 0x08
-#define AR_DCD_3 0x10
-
-/* Memory and SCA enable */
-#define AR_WIN_MSK 0x1F
-
-#define AR_SEL_SCA_0 0x00
-#define AR_SEL_SCA_1 0x20
-#define AR_ENA_SCA 0x40
-#define AR_ENA_MEM 0x80
-
-/* Transmit Clock and DTR and RESET */
-#define AR_TXC_DTR_TX0 0x01
-#define AR_TXC_DTR_TX1 0x02
-#define AR_TXC_DTR_DTR0 0x04
-#define AR_TXC_DTR_DTR1 0x08
-#define AR_TXC_DTR_TXCS0 0x10
-#define AR_TXC_DTR_TXCS1 0x20
-#define AR_TXC_DTR_NOTRESET 0x40
-#define AR_TXC_DTR_RESET 0x00
-
-/* Interrupt select register */
-#define AR_INTS_CEN 0x01
-#define AR_INTS_ISEL0 0x02
-#define AR_INTS_ISEL1 0x04
-#define AR_INTS_ISEL2 0x08
-#define AR_INTS_CMA14 0x10
-#define AR_INTS_CMA15 0x20
-
-/* Advanced PIM Control */
-#define AR_PIM_STROBE 0x01
-#define AR_PIM_DATA 0x02
-#define AR_PIM_MODEG 0x04
-#define AR_PIM_A2D_STROBE 0x04
-#define AR_PIM_MODEY 0x08
-#define AR_PIM_A2D_DOUT 0x08
-#define AR_PIM_AUTO_LED 0x10
-#define AR_PIM_INT 0x20
-
-#define AR_PIM_RESET 0x00 /* MODEG and MODEY 0 */
-#define AR_PIM_READ AR_PIM_MODEG
-#define AR_PIM_WRITE AR_PIM_MODEY
-
-#define ARC_GET_WIN(addr) ((addr >> ARC_WIN_SHFT) & AR_WIN_MSK)
-
-#define ARC_SET_MEM(iobase,win) outb(iobase+AR_MSCA_EN, AR_ENA_MEM | \
- ARC_GET_WIN(win))
-#define ARC_SET_SCA(iobase,ch) outb(iobase+AR_MSCA_EN, AR_ENA_MEM | \
- AR_ENA_SCA | (ch ? AR_SEL_SCA_1:AR_SEL_SCA_0))
-#define ARC_SET_OFF(iobase) outb(iobase+AR_MSCA_EN, 0)
-
-struct ar_hardc {
- int cunit;
- struct ar_softc *sc;
- u_short iobase;
- int isa_irq;
- int numports;
- caddr_t mem_start;
- caddr_t mem_end;
- caddr_t plx_mem;
- u_char *orbase;
-
- u_int memsize; /* in bytes */
- u_int winsize; /* in bytes */
- u_int winmsk;
- u_char bustype; /* ISA, MCA, PCI.... */
- u_char interface[NPORT];/* X21, V.35, EIA-530.... */
- u_char revision;
- u_char handshake; /* handshake lines supported by card. */
-
- u_char txc_dtr[NPORT/NCHAN]; /* the register is write only */
- u_int txc_dtr_off[NPORT/NCHAN];
-
- sca_regs *sca[NPORT/NCHAN];
-
- bus_space_tag_t bt;
- bus_space_handle_t bh;
- int rid_ioport;
- int rid_memory;
- int rid_plx_memory;
- int rid_irq;
- int rid_drq;
- struct resource* res_ioport; /* resource for port range */
- struct resource* res_memory; /* resource for mem range */
- struct resource* res_plx_memory;
- struct resource* res_irq; /* resource for irq range */
- struct resource* res_drq; /* resource for dma channel */
- void *intr_cookie;
-};
-
-extern devclass_t ar_devclass;
-
-int ar_allocate_ioport(device_t device, int rid, u_long size);
-int ar_allocate_irq(device_t device, int rid, u_long size);
-int ar_allocate_memory(device_t device, int rid, u_long size);
-int ar_allocate_plx_memory(device_t device, int rid, u_long size);
-int ar_deallocate_resources(device_t device);
-int ar_attach(device_t device);
-int ar_detach (device_t);
-
-#endif /* _IF_ARREGS_H_ */
diff --git a/sys/dev/fxp/if_fxpvar.h b/sys/dev/fxp/if_fxpvar.h
deleted file mode 100644
index d9938886f0a9..000000000000
--- a/sys/dev/fxp/if_fxpvar.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 1995, David Greenman
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice unmodified, this list of conditions, and the following
- * disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Misc. defintions for the Intel EtherExpress Pro/100B PCI Fast
- * Ethernet driver
- */
-
-/*
- * Number of transmit control blocks. This determines the number
- * of transmit buffers that can be chained in the CB list.
- * This must be a power of two.
- */
-#define FXP_NTXCB 128
-
-/*
- * Number of completed TX commands at which point an interrupt
- * will be generated to garbage collect the attached buffers.
- * Must be at least one less than FXP_NTXCB, and should be
- * enough less so that the transmitter doesn't becomes idle
- * during the buffer rundown (which would reduce performance).
- */
-#define FXP_CXINT_THRESH 120
-
-/*
- * TxCB list index mask. This is used to do list wrap-around.
- */
-#define FXP_TXCB_MASK (FXP_NTXCB - 1)
-
-/*
- * Number of receive frame area buffers. These are large so chose
- * wisely.
- */
-#define FXP_NRFABUFS 64
-
-/*
- * Maximum number of seconds that the receiver can be idle before we
- * assume it's dead and attempt to reset it by reprogramming the
- * multicast filter. This is part of a work-around for a bug in the
- * NIC. See fxp_stats_update().
- */
-#define FXP_MAX_RX_IDLE 15
-
-#if __FreeBSD_version < 500000
-#define FXP_LOCK(_sc)
-#define FXP_UNLOCK(_sc)
-#define mtx_init(a, b, c)
-#define mtx_destroy(a)
-struct mtx { int dummy; };
-#else
-#define FXP_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
-#define FXP_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
-#endif
-
-#ifdef __alpha__
-#undef vtophys
-#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)(va))
-#endif /* __alpha__ */
-
-/*
- * NOTE: Elements are ordered for optimal cacheline behavior, and NOT
- * for functional grouping.
- */
-struct fxp_softc {
- struct arpcom arpcom; /* per-interface network data */
- struct resource *mem; /* resource descriptor for registers */
- int rtp; /* register resource type */
- int rgd; /* register descriptor in use */
- struct resource *irq; /* resource descriptor for interrupt */
- void *ih; /* interrupt handler cookie */
- struct mtx sc_mtx;
- bus_space_tag_t sc_st; /* bus space tag */
- bus_space_handle_t sc_sh; /* bus space handle */
- struct mbuf *rfa_headm; /* first mbuf in receive frame area */
- struct mbuf *rfa_tailm; /* last mbuf in receive frame area */
- struct fxp_cb_tx *cbl_first; /* first active TxCB in list */
- int tx_queued; /* # of active TxCB's */
- int need_mcsetup; /* multicast filter needs programming */
- struct fxp_cb_tx *cbl_last; /* last active TxCB in list */
- struct fxp_stats *fxp_stats; /* Pointer to interface stats */
- int rx_idle_secs; /* # of seconds RX has been idle */
- struct callout_handle stat_ch; /* Handle for canceling our stat timeout */
- struct fxp_cb_tx *cbl_base; /* base of TxCB list */
- struct fxp_cb_mcs *mcsp; /* Pointer to mcast setup descriptor */
- struct ifmedia sc_media; /* media information */
- device_t miibus;
- device_t dev;
- int eeprom_size; /* size of serial EEPROM */
- int suspended; /* 0 = normal 1 = suspended (APM) */
- int chip;
- int flags;
- u_int32_t saved_maps[5]; /* pci data */
- u_int32_t saved_biosaddr;
- u_int8_t saved_intline;
- u_int8_t saved_cachelnsz;
- u_int8_t saved_lattimer;
-};
-
-#define FXP_CHIP_82557 1 /* 82557 chip type */
-
-#define FXP_FLAG_MWI_ENABLE 0x0001 /* MWI enable */
-#define FXP_FLAG_READ_ALIGN 0x0002 /* align read access with cacheline */
-#define FXP_FLAG_WRITE_ALIGN 0x0004 /* end write on cacheline */
-#define FXP_FLAG_EXT_TXCB 0x0008 /* enable use of extended TXCB */
-#define FXP_FLAG_SERIAL_MEDIA 0x0010 /* 10Mbps serial interface */
-#define FXP_FLAG_LONG_PKT_EN 0x0020 /* enable long packet reception */
-#define FXP_FLAG_ALL_MCAST 0x0040 /* accept all multicast frames */
-
-/* Macros to ease CSR access. */
-#define CSR_READ_1(sc, reg) \
- bus_space_read_1((sc)->sc_st, (sc)->sc_sh, (reg))
-#define CSR_READ_2(sc, reg) \
- bus_space_read_2((sc)->sc_st, (sc)->sc_sh, (reg))
-#define CSR_READ_4(sc, reg) \
- bus_space_read_4((sc)->sc_st, (sc)->sc_sh, (reg))
-#define CSR_WRITE_1(sc, reg, val) \
- bus_space_write_1((sc)->sc_st, (sc)->sc_sh, (reg), (val))
-#define CSR_WRITE_2(sc, reg, val) \
- bus_space_write_2((sc)->sc_st, (sc)->sc_sh, (reg), (val))
-#define CSR_WRITE_4(sc, reg, val) \
- bus_space_write_4((sc)->sc_st, (sc)->sc_sh, (reg), (val))
-
-#define sc_if arpcom.ac_if
-
-#define FXP_UNIT(_sc) (_sc)->arpcom.ac_if.if_unit
diff --git a/sys/dev/ic/hd64570.h b/sys/dev/ic/hd64570.h
deleted file mode 100644
index b676e25a9cd5..000000000000
--- a/sys/dev/ic/hd64570.h
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Copyright (c) 1995 John Hay. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by [your name]
- * and [any other names deserving credit ]
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY [your name] AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _HD64570_H_
-#define _HD64570_H_
-
-typedef struct msci_channel
- {
- union
- {
- unsigned short us_trb; /* rw */
- struct
- {
- unsigned char uc_trbl;
- unsigned char uc_trbh;
- }uc_trb;
- }u_trb;
- unsigned char st0; /* ro */
- unsigned char st1; /* rw */
- unsigned char st2; /* rw */
- unsigned char st3; /* ro */
- unsigned char fst; /* rw */
- unsigned char unused0;
- unsigned char ie0; /* rw */
- unsigned char ie1; /* rw */
- unsigned char ie2; /* rw */
- unsigned char fie; /* rw */
- unsigned char cmd; /* wo */
- unsigned char unused1;
- unsigned char md0; /* rw */
- unsigned char md1; /* rw */
- unsigned char md2; /* rw */
- unsigned char ctl; /* rw */
- unsigned char sa0; /* rw */
- unsigned char sa1; /* rw */
- unsigned char idl; /* rw */
- unsigned char tmc; /* rw */
- unsigned char rxs; /* rw */
- unsigned char txs; /* rw */
- unsigned char trc0; /* rw */
- unsigned char trc1; /* rw */
- unsigned char rrc; /* rw */
- unsigned char unused2;
- unsigned char cst0; /* rw */
- unsigned char cst1; /* rw */
- unsigned char unused3[2];
- }msci_channel;
-
-#define trb u_trb.us_trb
-#define trbl u_trb.uc_trb.uc_trbl
-#define trbh u_trb.uc_trb.uc_trbh
-
-typedef struct timer_channel
- {
- unsigned short tcnt; /* rw */
- unsigned short tconr; /* wo */
- unsigned char tcsr; /* rw */
- unsigned char tepr; /* rw */
- unsigned char unused[2];
- }timer_channel;
-
-typedef struct dmac_channel
- {
- unsigned short dar; /* rw */
- unsigned char darb; /* rw */
- unsigned char unused0;
- unsigned short sar; /* rw On odd numbered dmacs (tx) only */
- unsigned char sarb; /* rw */
-#define cpb sarb
- unsigned char unused1;
- unsigned short cda; /* rw */
- unsigned short eda; /* rw */
- unsigned short bfl; /* rw On even numbered dmacs (rx) only */
- unsigned short bcr; /* rw */
- unsigned char dsr; /* rw */
- unsigned char dmr; /* rw */
- unsigned char unused2;
- unsigned char fct; /* rw */
- unsigned char dir; /* rw */
- unsigned char dcr; /* rw */
- unsigned char unused3[10];
- }dmac_channel;
-
-/* x is the channel number. rx channels are even numbered and tx, odd. */
-#define DMAC_RXCH(x) ((x*2) + 0)
-#define DMAC_TXCH(x) ((x*2) + 1)
-
-typedef struct sca_regs
- {
- unsigned char lpr; /* rw */
- unsigned char unused0; /* -- */
- /* Wait system */
- unsigned char pabr0; /* rw */
- unsigned char pabr1; /* rw */
- unsigned char wcrl; /* rw */
- unsigned char wcrm; /* rw */
- unsigned char wcrh; /* rw */
- unsigned char unused1;
- /* DMAC */
- unsigned char pcr; /* rw */
- unsigned char dmer; /* rw */
- unsigned char unused2[6];
- /* Interrupt */
- unsigned char isr0; /* ro */
- unsigned char isr1; /* ro */
- unsigned char isr2; /* ro */
- unsigned char unused3;
- unsigned char ier0; /* rw */
- unsigned char ier1; /* rw */
- unsigned char ier2; /* rw */
- unsigned char unused4;
- unsigned char itcr; /* rw */
- unsigned char unused5;
- unsigned char ivr; /* rw */
- unsigned char unused6;
- unsigned char imvr; /* rw */
- unsigned char unused7[3];
- /* MSCI Channel 0 */
- msci_channel msci[2];
- timer_channel timer[4];
- dmac_channel dmac[4];
- }sca_regs;
-
-#define SCA_CMD_TXRESET 0x01
-#define SCA_CMD_TXENABLE 0x02
-#define SCA_CMD_TXDISABLE 0x03
-#define SCA_CMD_TXCRCINIT 0x04
-#define SCA_CMD_TXCRCEXCL 0x05
-#define SCA_CMS_TXEOM 0x06
-#define SCA_CMD_TXABORT 0x07
-#define SCA_CMD_MPON 0x08
-#define SCA_CMD_TXBCLEAR 0x09
-
-#define SCA_CMD_RXRESET 0x11
-#define SCA_CMD_RXENABLE 0x12
-#define SCA_CMD_RXDISABLE 0x13
-#define SCA_CMD_RXCRCINIT 0x14
-#define SCA_CMD_RXMSGREJ 0x15
-#define SCA_CMD_MPSEARCH 0x16
-#define SCA_CMD_RXCRCEXCL 0x17
-#define SCA_CMD_RXCRCCALC 0x18
-
-#define SCA_CMD_NOP 0x00
-#define SCA_CMD_RESET 0x21
-#define SCA_CMD_SEARCH 0x31
-
-#define SCA_MD0_CRC_1 0x01
-#define SCA_MD0_CRC_CCITT 0x02
-#define SCA_MD0_CRC_ENABLE 0x04
-#define SCA_MD0_AUTO_ENABLE 0x10
-#define SCA_MD0_MODE_ASYNC 0x00
-#define SCA_MD0_MODE_BYTESYNC1 0x20
-#define SCA_MD0_MODE_BISYNC 0x40
-#define SCA_MD0_MODE_BYTESYNC2 0x60
-#define SCA_MD0_MODE_HDLC 0x80
-
-#define SCA_MD1_NOADDRCHK 0x00
-#define SCA_MD1_SNGLADDR1 0x40
-#define SCA_MD1_SNGLADDR2 0x80
-#define SCA_MD1_DUALADDR 0xC0
-
-#define SCA_MD2_DUPLEX 0x00
-#define SCA_MD2_ECHO 0x01
-#define SCA_MD2_LOOPBACK 0x03
-#define SCA_MD2_ADPLLx8 0x00
-#define SCA_MD2_ADPLLx16 0x08
-#define SCA_MD2_ADPLLx32 0x10
-#define SCA_MD2_NRZ 0x00
-#define SCA_MD2_NRZI 0x20
-#define SCA_MD2_MANCHESTER 0x80
-#define SCA_MD2_FM0 0xC0
-#define SCA_MD2_FM1 0xA0
-
-#define SCA_CTL_RTS 0x01
-#define SCA_CTL_IDLPAT 0x10
-#define SCA_CTL_UDRNC 0x20
-
-#define SCA_RXS_DIV_MASK 0x0F
-#define SCA_RXS_DIV1 0x00
-#define SCA_RXS_DIV2 0x01
-#define SCA_RXS_DIV4 0x02
-#define SCA_RXS_DIV8 0x03
-#define SCA_RXS_DIV16 0x04
-#define SCA_RXS_DIV32 0x05
-#define SCA_RXS_DIV64 0x06
-#define SCA_RXS_DIV128 0x07
-#define SCA_RXS_DIV256 0x08
-#define SCA_RXS_DIV512 0x09
-#define SCA_RXS_CLK_RXC0 0x00
-#define SCA_RXS_CLK_RXC1 0x20
-#define SCA_RXS_CLK_INT 0x40
-#define SCA_RXS_CLK_ADPLL_OUT 0x60
-#define SCA_RXS_CLK_ADPLL_IN 0x70
-
-#define SCA_TXS_DIV_MASK 0x0F
-#define SCA_TXS_DIV1 0x00
-#define SCA_TXS_DIV2 0x01
-#define SCA_TXS_DIV4 0x02
-#define SCA_TXS_DIV8 0x03
-#define SCA_TXS_DIV16 0x04
-#define SCA_TXS_DIV32 0x05
-#define SCA_TXS_DIV64 0x06
-#define SCA_TXS_DIV128 0x07
-#define SCA_TXS_DIV256 0x08
-#define SCA_TXS_DIV512 0x09
-#define SCA_TXS_CLK_TXC 0x00
-#define SCA_TXS_CLK_INT 0x40
-#define SCA_TXS_CLK_RX 0x60
-
-#define SCA_ST0_RXRDY 0x01
-#define SCA_ST0_TXRDY 0x02
-#define SCA_ST0_RXINT 0x40
-#define SCA_ST0_TXINT 0x80
-
-#define SCA_ST1_IDLST 0x01
-#define SCA_ST1_ABTST 0x02
-#define SCA_ST1_DCDCHG 0x04
-#define SCA_ST1_CTSCHG 0x08
-#define SCA_ST1_FLAG 0x10
-#define SCA_ST1_TXIDL 0x40
-#define SCA_ST1_UDRN 0x80
-
-/* ST2 and FST look the same */
-#define SCA_FST_CRCERR 0x04
-#define SCA_FST_OVRN 0x08
-#define SCA_FST_RESFRM 0x10
-#define SCA_FST_ABRT 0x20
-#define SCA_FST_SHRT 0x40
-#define SCA_FST_EOM 0x80
-
-#define SCA_ST3_RXENA 0x01
-#define SCA_ST3_TXENA 0x02
-#define SCA_ST3_DCD 0x04
-#define SCA_ST3_CTS 0x08
-#define SCA_ST3_ADPLLSRCH 0x10
-#define SCA_ST3_TXDATA 0x20
-
-#define SCA_FIE_EOMFE 0x80
-
-#define SCA_IE0_RXRDY 0x01
-#define SCA_IE0_TXRDY 0x02
-#define SCA_IE0_RXINT 0x40
-#define SCA_IE0_TXINT 0x80
-
-#define SCA_IE1_IDLDE 0x01
-#define SCA_IE1_ABTDE 0x02
-#define SCA_IE1_DCD 0x04
-#define SCA_IE1_CTS 0x08
-#define SCA_IE1_FLAG 0x10
-#define SCA_IE1_IDL 0x40
-#define SCA_IE1_UDRN 0x80
-
-#define SCA_IE2_CRCERR 0x04
-#define SCA_IE2_OVRN 0x08
-#define SCA_IE2_RESFRM 0x10
-#define SCA_IE2_ABRT 0x20
-#define SCA_IE2_SHRT 0x40
-#define SCA_IE2_EOM 0x80
-
-/* This is for RRC, TRC0 and TRC1. */
-#define SCA_RCR_MASK 0x1F
-
-#define SCA_IE1_
-
-#define SCA_IV_CHAN0 0x00
-#define SCA_IV_CHAN1 0x20
-
-#define SCA_IV_RXRDY 0x04
-#define SCA_IV_TXRDY 0x06
-#define SCA_IV_RXINT 0x08
-#define SCA_IV_TXINT 0x0A
-
-#define SCA_IV_DMACH0 0x00
-#define SCA_IV_DMACH1 0x08
-#define SCA_IV_DMACH2 0x20
-#define SCA_IV_DMACH3 0x28
-
-#define SCA_IV_DMIA 0x14
-#define SCA_IV_DMIB 0x16
-
-#define SCA_IV_TIMER0 0x1C
-#define SCA_IV_TIMER1 0x1E
-#define SCA_IV_TIMER2 0x3C
-#define SCA_IV_TIMER3 0x3E
-
-/*
- * DMA registers
- */
-#define SCA_DSR_EOT 0x80
-#define SCA_DSR_EOM 0x40
-#define SCA_DSR_BOF 0x20
-#define SCA_DSR_COF 0x10
-#define SCA_DSR_DE 0x02
-#define SCA_DSR_DWE 0x01
-
-#define SCA_DMR_TMOD 0x10
-#define SCA_DMR_NF 0x04
-#define SCA_DMR_CNTE 0x02
-
-#define SCA_DMER_EN 0x80
-
-#define SCA_DCR_ABRT 0x01
-#define SCA_DCR_FCCLR 0x02 /* Clear frame end intr counter */
-
-#define SCA_DIR_EOT 0x80
-#define SCA_DIR_EOM 0x40
-#define SCA_DIR_BOF 0x20
-#define SCA_DIR_COF 0x10
-
-#define SCA_PCR_BRC 0x10
-#define SCA_PCR_CCC 0x08
-#define SCA_PCR_PR2 0x04
-#define SCA_PCR_PR1 0x02
-#define SCA_PCR_PR0 0x01
-
-typedef struct sca_descriptor
- {
- unsigned short cp;
- unsigned short bp;
- unsigned char bpb;
- unsigned char unused0;
- unsigned short len;
- unsigned char stat;
- unsigned char unused1;
- }sca_descriptor;
-
-#define SCA_DESC_EOT 0x01
-#define SCA_DESC_CRC 0x04
-#define SCA_DESC_OVRN 0x08
-#define SCA_DESC_RESD 0x10
-#define SCA_DESC_ABORT 0x20
-#define SCA_DESC_SHRTFRM 0x40
-#define SCA_DESC_EOM 0x80
-#define SCA_DESC_ERRORS 0x7C
-
-/*
-***************************************************************************
-** END
-***************************************************************************
-**/
-#endif /* _HD64570_H_ */
-
diff --git a/sys/dev/mii/acphy.c b/sys/dev/mii/acphy.c
deleted file mode 100644
index 96fefa28334f..000000000000
--- a/sys/dev/mii/acphy.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/*-
- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1997 Manuel Bouyer. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Manuel Bouyer.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Driver for Altima AC101 10/100 PHY
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/errno.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-
-#include <net/if.h>
-#include <net/if_media.h>
-
-#include <dev/mii/mii.h>
-#include <dev/mii/miivar.h>
-#include <dev/mii/miidevs.h>
-
-#include <dev/mii/acphyreg.h>
-
-#include "miibus_if.h"
-
-#if !defined(lint)
-static const char rcsid[] =
- "$FreeBSD$";
-#endif
-
-static int acphy_probe __P((device_t));
-static int acphy_attach __P((device_t));
-static int acphy_detach __P((device_t));
-
-static device_method_t acphy_methods[] = {
- /* device interface */
- DEVMETHOD(device_probe, acphy_probe),
- DEVMETHOD(device_attach, acphy_attach),
- DEVMETHOD(device_detach, acphy_detach),
- DEVMETHOD(device_shutdown, bus_generic_shutdown),
- { 0, 0 }
-};
-
-static devclass_t acphy_devclass;
-
-static driver_t acphy_driver = {
- "acphy",
- acphy_methods,
- sizeof(struct mii_softc)
-};
-
-DRIVER_MODULE(acphy, miibus, acphy_driver, acphy_devclass, 0, 0);
-
-int acphy_service __P((struct mii_softc *, struct mii_data *, int));
-void acphy_reset __P((struct mii_softc *));
-void acphy_status __P((struct mii_softc *));
-
-static int acphy_probe(dev)
- device_t dev;
-{
- struct mii_attach_args *ma;
-
- ma = device_get_ivars(dev);
-
- if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxALTIMA &&
- MII_MODEL(ma->mii_id2) == MII_MODEL_xxALTIMA_AC101) {
- device_set_desc(dev, MII_STR_xxALTIMA_AC101);
- } else
- return (ENXIO);
-
- return (0);
-}
-
-static int acphy_attach(dev)
- device_t dev;
-{
- struct mii_softc *sc;
- struct mii_attach_args *ma;
- struct mii_data *mii;
-
- sc = device_get_softc(dev);
- ma = device_get_ivars(dev);
- sc->mii_dev = device_get_parent(dev);
- mii = device_get_softc(sc->mii_dev);
- LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
-
- sc->mii_inst = mii->mii_instance;
- sc->mii_phy = ma->mii_phyno;
- sc->mii_service = acphy_service;
- sc->mii_pdata = mii;
- sc->mii_flags |= MIIF_NOISOLATE;
-
- acphy_reset(sc);
-
- mii->mii_instance++;
-
- sc->mii_capabilities =
- PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
- device_printf(dev, " ");
- if (sc->mii_capabilities & BMSR_MEDIAMASK)
- mii_add_media(mii, sc->mii_capabilities,
- sc->mii_inst);
- printf("\n");
-
- MIIBUS_MEDIAINIT(sc->mii_dev);
- return (0);
-}
-
-static int acphy_detach(dev)
- device_t dev;
-{
- struct mii_softc *sc;
- struct mii_data *mii;
-
- sc = device_get_softc(dev);
- mii = device_get_softc(device_get_parent(dev));
- sc->mii_dev = NULL;
- LIST_REMOVE(sc, mii_list);
-
- return(0);
-}
-
-int
-acphy_service(sc, mii, cmd)
- struct mii_softc *sc;
- struct mii_data *mii;
- int cmd;
-{
- struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int reg;
-
- switch (cmd) {
- case MII_POLLSTAT:
- /*
- * If we're not polling our PHY instance, just return.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst)
- return (0);
- break;
-
- case MII_MEDIACHG:
- /*
- * If the media indicates a different PHY instance,
- * isolate ourselves.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
- reg = PHY_READ(sc, MII_BMCR);
- PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO | BMCR_PDOWN);
- return (0);
- }
-
- /*
- * If the interface is not up, don't do anything.
- */
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
- break;
-
- /* Wake & deisolate up is needed */
- reg = PHY_READ(sc, MII_BMCR);
- if (reg & (BMCR_ISO | BMCR_PDOWN))
- PHY_WRITE(sc, MII_BMCR, reg & ~(BMCR_ISO | BMCR_PDOWN));
-
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
-
- (void) mii_phy_auto(sc, 1);
- break;
-
- default:
- /*
- * BMCR data is stored in the ifmedia entry.
- */
- PHY_WRITE(sc, MII_ANAR,
- mii_anar(ife->ifm_media));
- PHY_WRITE(sc, MII_BMCR, ife->ifm_data);
- }
- break;
-
- case MII_TICK:
- /*
- * If we're not currently selected, just return.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst)
- return (0);
-
- /*
- * Only used for autonegotiation.
- */
- if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO)
- return (0);
-
- /*
- * Is the interface even up?
- */
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
- return (0);
-
- /*
- * Check to see if we have link. If we do, we don't
- * need to restart the autonegotiation process. Read
- * the BMSR twice in case it's latched.
- */
- reg = PHY_READ(sc, MII_BMSR) |
- PHY_READ(sc, MII_BMSR);
- if (reg & BMSR_LINK)
- return (0);
-
- /*
- * Only retry autonegotiation every 5 seconds.
- */
- if (++sc->mii_ticks != 5)
- return (0);
-
- sc->mii_ticks = 0;
- acphy_reset(sc);
- if (mii_phy_auto(sc, 0) == EJUSTRETURN)
- return (0);
- break;
- }
-
- /* Update the media status. */
- acphy_status(sc);
-
- /* Callback if something changed. */
- if (sc->mii_active != mii->mii_media_active || cmd == MII_MEDIACHG) {
- MIIBUS_STATCHG(sc->mii_dev);
- sc->mii_active = mii->mii_media_active;
- }
- return (0);
-}
-
-void
-acphy_status(sc)
- struct mii_softc *sc;
-{
- struct mii_data *mii = sc->mii_pdata;
- struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int bmsr, bmcr, diag;
-
- mii->mii_media_status = IFM_AVALID;
- mii->mii_media_active = IFM_ETHER;
-
- bmsr = PHY_READ(sc, MII_BMSR) |
- PHY_READ(sc, MII_BMSR);
- if (bmsr & BMSR_LINK)
- mii->mii_media_status |= IFM_ACTIVE;
-
- bmcr = PHY_READ(sc, MII_BMCR);
- if (bmcr & BMCR_ISO) {
- mii->mii_media_active |= IFM_NONE;
- mii->mii_media_status = 0;
- return;
- }
-
- if (bmcr & BMCR_LOOP)
- mii->mii_media_active |= IFM_LOOP;
-
- if (bmcr & BMCR_AUTOEN) {
- if ((bmsr & BMSR_ACOMP) == 0) {
- /* Erg, still trying, I guess... */
- mii->mii_media_active |= IFM_NONE;
- return;
- }
- diag = PHY_READ(sc, MII_ACPHY_DIAG) |
- PHY_READ(sc, MII_ACPHY_DIAG);
- if (diag & AC_DIAG_SPEED)
- mii->mii_media_active |= IFM_100_TX;
- else
- mii->mii_media_active |= IFM_10_T;
-
- if (diag & AC_DIAG_DUPLEX)
- mii->mii_media_active |= IFM_FDX;
- } else
- mii->mii_media_active = ife->ifm_media;
-}
-
-void
-acphy_reset(sc)
- struct mii_softc *sc;
-{
-
- mii_phy_reset(sc);
- PHY_WRITE(sc, MII_ACPHY_INT, 0);
-}
diff --git a/sys/dev/mii/acphyreg.h b/sys/dev/mii/acphyreg.h
deleted file mode 100644
index 827aba68f157..000000000000
--- a/sys/dev/mii/acphyreg.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * Copyright (c) 2001 Semen Ustimenko (semenu@FreeBSD.org)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _DEV_MII_ACPHYREG_H_
-#define _DEV_MII_ACPHYREG_H_
-
-/*
- * Register definitions for the Altima Communications AC101
- */
-
-#define MII_ACPHY_POL 0x10 /* Polarity int level */
-
-/* High byte is interrupt mask register */
-#define MII_ACPHY_INT 0x11 /* Interrupt control/status */
-#define AC_INT_ACOMP 0x0001 /* Autoneg complete */
-#define AC_INT_REM_FLT 0x0002 /* Remote fault */
-#define AC_INT_LINK_DOWN 0x0004 /* Link not OK */
-#define AC_INT_LP_ACK 0x0008 /* FLP ack recved */
-#define AC_INT_PD_FLT 0x0010 /* Parallel detect fault */
-#define AC_INT_PAGE_RECV 0x0020 /* New page recved */
-#define AC_INT_RX_ER 0x0040 /* RX_ER transitions high */
-#define AC_INT_JAB 0x0080 /* Jabber detected */
-
-#define MII_ACPHY_DIAG 0x12 /* Diagnostic */
-#define AC_DIAG_RX_LOCK 0x0100
-#define AC_DIAG_RX_PASS 0x0200
-#define AC_DIAG_SPEED 0x0400 /* Aneg speed result */
-#define AC_DIAG_DUPLEX 0x0800 /* Aneg duplex result */
-
-#define MII_ACPHY_PWRLOOP 0x13 /* Power/Loopback */
-#define MII_ACPHY_CBLMEAS 0x14 /* Cable meas. */
-
-#define MII_ACPHY_MCTL 0x15 /* Mode control */
-#define AC_MCTL_FX_SEL 0x0001 /* FX mode */
-#define AC_MCTL_BYP_PCS 0x0001 /* Bypass PCS */
-#define AC_MCTL_SCRMBL 0x0004 /* Data scrambling */
-#define AC_MCTL_REM_LOOP 0x0008 /* Remote loopback */
-#define AC_MCTL_DIS_WDT 0x0010 /* Disable watchdog timer */
-#define AC_MCTL_DIS_REC 0x0020 /* Disable recv error counter */
-#define AC_MCTL_REC_FULL 0x0040 /* Recv error counter full */
-#define AC_MCTL_FRC_FEF 0x0080 /* Force Far End Fault Insert. */
-#define AC_MCTL_DIS_FEF 0x0100 /* Disable FEF Insertion */
-#define AC_MCTL_LED_SEL 0x0200 /* Compat LED config */
-#define AC_MCTL_ALED_SEL 0x0400 /* ActLED RX&TX - RX only */
-#define AC_MCTL_10BT_SEL 0x0800 /* Enable 7-wire interface */
-#define AC_MCTL_DIS_JAB 0x1000 /* Disable jabber */
-#define AC_MCTL_FRC_LINK 0x2000 /* Force TX link up */
-#define AC_MCTL_DIS_NLP 0x4000 /* Disable NLP check */
-
-#define MII_ACPHY_REC 0x18 /* Recv error counter */
-
-#endif /* _DEV_MII_ACPHYREG_H_ */
diff --git a/sys/dev/mii/e1000phy.c b/sys/dev/mii/e1000phy.c
deleted file mode 100644
index 6f35b114c96d..000000000000
--- a/sys/dev/mii/e1000phy.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/* $FreeBSD$ */
-/*
- * Principal Author: Parag Patel
- * Copyright (c) 2001
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice unmodified, this list of conditions, and the following
- * disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Additonal Copyright (c) 2001 by Traakan Software under same licence.
- * Secondary Author: Matthew Jacob
- */
-
-/*
- * driver for the Marvell 88E1000 series external 1000/100/10-BT PHY.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/socket.h>
-#include <sys/bus.h>
-
-#include <machine/clock.h>
-
-#include <net/if.h>
-#include <net/if_media.h>
-
-#include <dev/mii/mii.h>
-#include <dev/mii/miivar.h>
-#include <dev/mii/miidevs.h>
-
-#include <dev/mii/e1000phyreg.h>
-
-#include "miibus_if.h"
-
-static int e1000phy_probe(device_t);
-static int e1000phy_attach(device_t);
-static int e1000phy_detach(device_t);
-
-static device_method_t e1000phy_methods[] = {
- /* device interface */
- DEVMETHOD(device_probe, e1000phy_probe),
- DEVMETHOD(device_attach, e1000phy_attach),
- DEVMETHOD(device_detach, e1000phy_detach),
- DEVMETHOD(device_shutdown, bus_generic_shutdown),
- { 0, 0 }
-};
-
-static devclass_t e1000phy_devclass;
-static driver_t e1000phy_driver = {
- "e1000phy", e1000phy_methods, sizeof (struct mii_softc)
-};
-DRIVER_MODULE(e1000phy, miibus, e1000phy_driver, e1000phy_devclass, 0, 0);
-
-int e1000phy_service(struct mii_softc *, struct mii_data *, int);
-void e1000phy_status(struct mii_softc *);
-
-static int e1000phy_mii_phy_auto(struct mii_softc *, int);
-extern void mii_phy_auto_timeout(void *);
-static void e1000phy_reset(struct mii_softc *);
-
-static int e1000phy_debug = 0;
-
-static int
-e1000phy_probe(device_t dev)
-{
- struct mii_attach_args *ma;
- u_int32_t id;
-
- ma = device_get_ivars(dev);
- id = ((ma->mii_id1 << 16) | ma->mii_id2) & E1000_ID_MASK;
-
- if (id != E1000_ID_88E1000 && id != E1000_ID_88E1000S) {
- return ENXIO;
- }
-
- device_set_desc(dev, MII_STR_MARVELL_E1000);
- return 0;
-}
-
-static int
-e1000phy_attach(device_t dev)
-{
- struct mii_softc *sc;
- struct mii_attach_args *ma;
- struct mii_data *mii;
- const char *sep = "";
-
- getenv_int("e1000phy_debug", &e1000phy_debug);
-
- sc = device_get_softc(dev);
- ma = device_get_ivars(dev);
- sc->mii_dev = device_get_parent(dev);
- mii = device_get_softc(sc->mii_dev);
- LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
-
- sc->mii_inst = mii->mii_instance;
- sc->mii_phy = ma->mii_phyno;
- sc->mii_service = e1000phy_service;
- sc->mii_pdata = mii;
-
- sc->mii_flags |= MIIF_NOISOLATE;
- mii->mii_instance++;
- e1000phy_reset(sc);
-
-#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
-#define PRINT(s) printf("%s%s", sep, s); sep = ", "
-
-#if 0
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst),
- E1000_CR_ISOLATE);
-#endif
-
- device_printf(dev, " ");
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, IFM_FDX, sc->mii_inst),
- E1000_CR_SPEED_1000 | E1000_CR_FULL_DUPLEX);
- PRINT("1000baseTX-FDX");
- /*
- TODO - apparently 1000BT-simplex not supported?
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_TX, 0, sc->mii_inst),
- E1000_CR_SPEED_1000);
- PRINT("1000baseTX");
- */
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst),
- E1000_CR_SPEED_100 | E1000_CR_FULL_DUPLEX);
- PRINT("100baseTX-FDX");
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst),
- E1000_CR_SPEED_100);
- PRINT("100baseTX");
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst),
- E1000_CR_SPEED_10 | E1000_CR_FULL_DUPLEX);
- PRINT("10baseTX-FDX");
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst),
- E1000_CR_SPEED_10);
- PRINT("10baseTX");
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0);
- PRINT("auto");
-
- printf("\n");
-#undef ADD
-#undef PRINT
-
- MIIBUS_MEDIAINIT(sc->mii_dev);
- return(0);
-}
-
-static int
-e1000phy_detach(device_t dev)
-{
- struct mii_softc *sc;
- struct mii_data *mii;
-
- sc = device_get_softc(dev);
- mii = device_get_softc(device_get_parent(dev));
-
- if (sc->mii_flags & MIIF_DOINGAUTO)
- untimeout(mii_phy_auto_timeout, sc, sc->mii_auto_ch);
-
- sc->mii_dev = NULL;
- LIST_REMOVE(sc, mii_list);
-
- return 0;
-}
-
-static void
-e1000phy_reset(struct mii_softc *sc)
-{
- u_int32_t reg;
- int i;
-
- /* initialize custom E1000 registers to magic values */
- reg = PHY_READ(sc, E1000_SCR);
- reg &= ~E1000_SCR_AUTO_X_MODE;
- PHY_WRITE(sc, E1000_SCR, reg);
-
- /* normal PHY reset */
- /*mii_phy_reset(sc);*/
- reg = PHY_READ(sc, E1000_CR);
- reg |= E1000_CR_RESET;
- PHY_WRITE(sc, E1000_CR, reg);
-
- for (i = 0; i < 500; i++) {
- DELAY(1);
- reg = PHY_READ(sc, E1000_CR);
- if (!(reg & E1000_CR_RESET))
- break;
- }
-
- /* set more custom E1000 registers to magic values */
- reg = PHY_READ(sc, E1000_SCR);
- reg |= E1000_SCR_ASSERT_CRS_ON_TX;
- PHY_WRITE(sc, E1000_SCR, reg);
-
- reg = PHY_READ(sc, E1000_ESCR);
- reg |= E1000_ESCR_TX_CLK_25;
- PHY_WRITE(sc, E1000_ESCR, reg);
-
- /* even more magic to reset DSP? */
- PHY_WRITE(sc, 29, 0x1d);
- PHY_WRITE(sc, 30, 0xc1);
- PHY_WRITE(sc, 30, 0x00);
-}
-
-int
-e1000phy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
-{
- struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int reg;
-
- switch (cmd) {
- case MII_POLLSTAT:
- /*
- * If we're not polling our PHY instance, just return.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst)
- return (0);
- break;
-
- case MII_MEDIACHG:
- /*
- * If the media indicates a different PHY instance,
- * isolate ourselves.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
- reg = PHY_READ(sc, E1000_CR);
- PHY_WRITE(sc, E1000_CR, reg | E1000_CR_ISOLATE);
- return (0);
- }
-
- /*
- * If the interface is not up, don't do anything.
- */
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0) {
- break;
- }
-
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (sc->mii_flags & MIIF_DOINGAUTO) {
- return (0);
- }
- e1000phy_reset(sc);
- (void)e1000phy_mii_phy_auto(sc, 1);
- break;
-
- case IFM_1000_TX:
- if (sc->mii_flags & MIIF_DOINGAUTO)
- return (0);
-
- e1000phy_reset(sc);
-
- /* TODO - any other way to force 1000BT? */
- (void)e1000phy_mii_phy_auto(sc, 1);
- break;
-
- case IFM_100_TX:
- e1000phy_reset(sc);
-
- if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
- PHY_WRITE(sc, E1000_CR,
- E1000_CR_FULL_DUPLEX | E1000_CR_SPEED_100);
- PHY_WRITE(sc, E1000_AR, E1000_AR_100TX_FD);
- } else {
- PHY_WRITE(sc, E1000_CR, E1000_CR_SPEED_100);
- PHY_WRITE(sc, E1000_AR, E1000_AR_100TX);
- }
- break;
-
- case IFM_10_T:
- e1000phy_reset(sc);
-
- if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
- PHY_WRITE(sc, E1000_CR,
- E1000_CR_FULL_DUPLEX | E1000_CR_SPEED_10);
- PHY_WRITE(sc, E1000_AR, E1000_AR_10T_FD);
- } else {
- PHY_WRITE(sc, E1000_CR, E1000_CR_SPEED_10);
- PHY_WRITE(sc, E1000_AR, E1000_AR_10T);
- }
-
- break;
-
- default:
- return (EINVAL);
- }
-
- break;
-
- case MII_TICK:
- /*
- * If we're not currently selected, just return.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
- return (0);
- }
-
- /*
- * Only used for autonegotiation.
- */
- if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) {
- return (0);
- }
-
- /*
- * Is the interface even up?
- */
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0) {
- return (0);
- }
-
- /*
- * Only retry autonegotiation every 5 seconds.
- */
- if (++(sc->mii_ticks) != 5) {
- return (0);
- }
- sc->mii_ticks = 0;
-
- /*
- * Check to see if we have link. If we do, we don't
- * need to restart the autonegotiation process. Read
- * the BMSR twice in case it's latched.
- */
- reg = PHY_READ(sc, E1000_SR) | PHY_READ(sc, E1000_SR);
-
- if (reg & E1000_SR_LINK_STATUS)
- break;
-
- e1000phy_reset(sc);
-
- if (e1000phy_mii_phy_auto(sc, 0) == EJUSTRETURN) {
- return(0);
- }
-
- break;
- }
-
- /* Update the media status. */
- e1000phy_status(sc);
-
- /* Callback if something changed. */
- if (sc->mii_active != mii->mii_media_active || cmd == MII_MEDIACHG) {
- MIIBUS_STATCHG(sc->mii_dev);
- sc->mii_active = mii->mii_media_active;
- }
-
- return (0);
-}
-
-void
-e1000phy_status(struct mii_softc *sc)
-{
- struct mii_data *mii = sc->mii_pdata;
- int bmsr, bmcr, esr, ssr, isr, ar, lpar;
-
- mii->mii_media_status = IFM_AVALID;
- mii->mii_media_active = IFM_ETHER;
-
- bmsr = PHY_READ(sc, E1000_SR) | PHY_READ(sc, E1000_SR);
- esr = PHY_READ(sc, E1000_ESR);
- bmcr = PHY_READ(sc, E1000_CR);
- ssr = PHY_READ(sc, E1000_SSR);
- isr = PHY_READ(sc, E1000_ISR);
- ar = PHY_READ(sc, E1000_AR);
- lpar = PHY_READ(sc, E1000_LPAR);
-
- if (bmsr & E1000_SR_LINK_STATUS)
- mii->mii_media_status |= IFM_ACTIVE;
-
- if (bmcr & E1000_CR_LOOPBACK)
- mii->mii_media_active |= IFM_LOOP;
-
- if ((sc->mii_flags & MIIF_DOINGAUTO) &&
- (!(bmsr & E1000_SR_AUTO_NEG_COMPLETE) || !(ssr & E1000_SSR_LINK) ||
- !(ssr & E1000_SSR_SPD_DPLX_RESOLVED))) {
- /* Erg, still trying, I guess... */
- mii->mii_media_active |= IFM_NONE;
- return;
- }
-
- if (ssr & E1000_SSR_1000MBS)
- mii->mii_media_active |= IFM_1000_TX;
- else if (ssr & E1000_SSR_100MBS)
- mii->mii_media_active |= IFM_100_TX;
- else
- mii->mii_media_active |= IFM_10_T;
-
- if (ssr & E1000_SSR_DUPLEX)
- mii->mii_media_active |= IFM_FDX;
- else
- mii->mii_media_active |= IFM_HDX;
-
- /* FLAG0==rx-flow-control FLAG1==tx-flow-control */
- if ((ar & E1000_AR_PAUSE) && (lpar & E1000_LPAR_PAUSE)) {
- mii->mii_media_active |= IFM_FLAG0 | IFM_FLAG1;
- } else if (!(ar & E1000_AR_PAUSE) && (ar & E1000_AR_ASM_DIR) &&
- (lpar & E1000_LPAR_PAUSE) && (lpar & E1000_LPAR_ASM_DIR)) {
- mii->mii_media_active |= IFM_FLAG1;
- } else if ((ar & E1000_AR_PAUSE) && (ar & E1000_AR_ASM_DIR) &&
- !(lpar & E1000_LPAR_PAUSE) && (lpar & E1000_LPAR_ASM_DIR)) {
- mii->mii_media_active |= IFM_FLAG0;
- }
-}
-
-static int
-e1000phy_mii_phy_auto(struct mii_softc *mii, int waitfor)
-{
- int bmsr, i;
-
- if ((mii->mii_flags & MIIF_DOINGAUTO) == 0) {
- PHY_WRITE(mii, E1000_AR, E1000_AR_10T | E1000_AR_10T_FD |
- E1000_AR_100TX | E1000_AR_100TX_FD |
- E1000_AR_PAUSE | E1000_AR_ASM_DIR);
- PHY_WRITE(mii, E1000_1GCR, E1000_1GCR_1000T_FD);
- PHY_WRITE(mii, E1000_CR,
- E1000_CR_AUTO_NEG_ENABLE | E1000_CR_RESTART_AUTO_NEG);
- }
-
- if (waitfor) {
- /* Wait 500ms for it to complete. */
- for (i = 0; i < 500; i++) {
- bmsr =
- PHY_READ(mii, E1000_SR) | PHY_READ(mii, E1000_SR);
-
- if (bmsr & E1000_SR_AUTO_NEG_COMPLETE) {
- return (0);
- }
- DELAY(1000);
- }
-
- /*
- * Don't need to worry about clearing MIIF_DOINGAUTO.
- * If that's set, a timeout is pending, and it will
- * clear the flag. [do it anyway]
- */
- }
-
- /*
- * Just let it finish asynchronously. This is for the benefit of
- * the tick handler driving autonegotiation. Don't want 500ms
- * delays all the time while the system is running!
- */
- if ((mii->mii_flags & MIIF_DOINGAUTO) == 0) {
- mii->mii_flags |= MIIF_DOINGAUTO;
- mii->mii_ticks = 0;
- mii->mii_auto_ch = timeout(mii_phy_auto_timeout, mii, hz >> 1);
- }
- return (EJUSTRETURN);
-}
diff --git a/sys/dev/mii/e1000phyreg.h b/sys/dev/mii/e1000phyreg.h
deleted file mode 100644
index e7dfb36043e9..000000000000
--- a/sys/dev/mii/e1000phyreg.h
+++ /dev/null
@@ -1,286 +0,0 @@
-/* $FreeBSD$ */
-/*
- * Principal Author: Parag Patel
- * Copyright (c) 2001
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice unmodified, this list of conditions, and the following
- * disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Additonal Copyright (c) 2001 by Traakan Software under same licence.
- * Secondary Author: Matthew Jacob
- */
-
-/*
- * Derived by information released by Intel under the following license:
- *
- * Copyright (c) 1999 - 2001, Intel Corporation
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of Intel Corporation nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
- * Marvell E1000 PHY registers
- */
-
-#define E1000_MAX_REG_ADDRESS 0x1F
-
-#define E1000_CR 0x00 /* control register */
-#define E1000_CR_SPEED_SELECT_MSB 0x0040
-#define E1000_CR_COLL_TEST_ENABLE 0x0080
-#define E1000_CR_FULL_DUPLEX 0x0100
-#define E1000_CR_RESTART_AUTO_NEG 0x0200
-#define E1000_CR_ISOLATE 0x0400
-#define E1000_CR_POWER_DOWN 0x0800
-#define E1000_CR_AUTO_NEG_ENABLE 0x1000
-#define E1000_CR_SPEED_SELECT_LSB 0x2000
-#define E1000_CR_LOOPBACK 0x4000
-#define E1000_CR_RESET 0x8000
-
-#define E1000_CR_SPEED_1000 0x0040
-#define E1000_CR_SPEED_100 0x2000
-#define E1000_CR_SPEED_10 0x0000
-
-#define E1000_SR 0x01 /* status register */
-#define E1000_SR_EXTENDED 0x0001
-#define E1000_SR_JABBER_DETECT 0x0002
-#define E1000_SR_LINK_STATUS 0x0004
-#define E1000_SR_AUTO_NEG 0x0008
-#define E1000_SR_REMOTE_FAULT 0x0010
-#define E1000_SR_AUTO_NEG_COMPLETE 0x0020
-#define E1000_SR_PREAMBLE_SUPPRESS 0x0040
-#define E1000_SR_EXTENDED_STATUS 0x0100
-#define E1000_SR_100T2 0x0200
-#define E1000_SR_100T2_FD 0x0400
-#define E1000_SR_10T 0x0800
-#define E1000_SR_10T_FD 0x1000
-#define E1000_SR_100TX 0x2000
-#define E1000_SR_100TX_FD 0x4000
-#define E1000_SR_100T4 0x8000
-
-#define E1000_ID1 0x02 /* ID register 1 */
-#define E1000_ID2 0x03 /* ID register 2 */
-#define E1000_ID_88E1000 0x01410C50
-#define E1000_ID_88E1000S 0x01410C40
-#define E1000_ID_MASK 0xFFFFFFF0
-
-#define E1000_AR 0x04 /* autonegotiation advertise reg */
-#define E1000_AR_SELECTOR_FIELD 0x0001
-#define E1000_AR_10T 0x0020
-#define E1000_AR_10T_FD 0x0040
-#define E1000_AR_100TX 0x0080
-#define E1000_AR_100TX_FD 0x0100
-#define E1000_AR_100T4 0x0200
-#define E1000_AR_PAUSE 0x0400
-#define E1000_AR_ASM_DIR 0x0800
-#define E1000_AR_REMOTE_FAULT 0x2000
-#define E1000_AR_NEXT_PAGE 0x8000
-#define E1000_AR_SPEED_MASK 0x01E0
-
-#define E1000_LPAR 0x05 /* autoneg link partner abilities reg */
-#define E1000_LPAR_SELECTOR_FIELD 0x0001
-#define E1000_LPAR_10T 0x0020
-#define E1000_LPAR_10T_FD 0x0040
-#define E1000_LPAR_100TX 0x0080
-#define E1000_LPAR_100TX_FD 0x0100
-#define E1000_LPAR_100T4 0x0200
-#define E1000_LPAR_PAUSE 0x0400
-#define E1000_LPAR_ASM_DIR 0x0800
-#define E1000_LPAR_REMOTE_FAULT 0x2000
-#define E1000_LPAR_ACKNOWLEDGE 0x4000
-#define E1000_LPAR_NEXT_PAGE 0x8000
-
-#define E1000_ER 0x06 /* autoneg expansion reg */
-#define E1000_ER_LP_NWAY 0x0001
-#define E1000_ER_PAGE_RXD 0x0002
-#define E1000_ER_NEXT_PAGE 0x0004
-#define E1000_ER_LP_NEXT_PAGE 0x0008
-#define E1000_ER_PAR_DETECT_FAULT 0x0100
-
-#define E1000_NPTX 0x07 /* autoneg next page TX */
-#define E1000_NPTX_MSG_CODE_FIELD 0x0001
-#define E1000_NPTX_TOGGLE 0x0800
-#define E1000_NPTX_ACKNOWLDGE2 0x1000
-#define E1000_NPTX_MSG_PAGE 0x2000
-#define E1000_NPTX_NEXT_PAGE 0x8000
-
-#define E1000_RNPR 0x08 /* autoneg link-partner (?) next page */
-#define E1000_RNPR_MSG_CODE_FIELD 0x0001
-#define E1000_RNPR_TOGGLE 0x0800
-#define E1000_RNPR_ACKNOWLDGE2 0x1000
-#define E1000_RNPR_MSG_PAGE 0x2000
-#define E1000_RNPR_ACKNOWLDGE 0x4000
-#define E1000_RNPR_NEXT_PAGE 0x8000
-
-#define E1000_1GCR 0x09 /* 1000T (1G) control reg */
-#define E1000_1GCR_ASYM_PAUSE 0x0080
-#define E1000_1GCR_1000T 0x0100
-#define E1000_1GCR_1000T_FD 0x0200
-#define E1000_1GCR_REPEATER_DTE 0x0400
-#define E1000_1GCR_MS_VALUE 0x0800
-#define E1000_1GCR_MS_ENABLE 0x1000
-#define E1000_1GCR_TEST_MODE_NORMAL 0x0000
-#define E1000_1GCR_TEST_MODE_1 0x2000
-#define E1000_1GCR_TEST_MODE_2 0x4000
-#define E1000_1GCR_TEST_MODE_3 0x6000
-#define E1000_1GCR_TEST_MODE_4 0x8000
-#define E1000_1GCR_SPEED_MASK 0x0300
-
-#define E1000_1GSR 0x0A /* 1000T (1G) status reg */
-#define E1000_1GSR_IDLE_ERROR_CNT 0x0000
-#define E1000_1GSR_ASYM_PAUSE_DIR 0x0100
-#define E1000_1GSR_LP 0x0400
-#define E1000_1GSR_LP_FD 0x0800
-#define E1000_1GSR_REMOTE_RX_STATUS 0x1000
-#define E1000_1GSR_LOCAL_RX_STATUS 0x2000
-#define E1000_1GSR_MS_CONFIG_RES 0x4000
-#define E1000_1GSR_MS_CONFIG_FAULT 0x8000
-
-#define E1000_ESR 0x0F /* IEEE extended status reg */
-#define E1000_ESR_1000T 0x1000
-#define E1000_ESR_1000T_FD 0x2000
-#define E1000_ESR_1000X 0x4000
-#define E1000_ESR_1000X_FD 0x8000
-
-#define E1000_TX_POLARITY_MASK 0x0100
-#define E1000_TX_NORMAL_POLARITY 0
-
-#define E1000_AUTO_POLARITY_DISABLE 0x0010
-
-#define E1000_SCR 0x10 /* special control register */
-#define E1000_SCR_JABBER_DISABLE 0x0001
-#define E1000_SCR_POLARITY_REVERSAL 0x0002
-#define E1000_SCR_SQE_TEST 0x0004
-#define E1000_SCR_INT_FIFO_DISABLE 0x0008
-#define E1000_SCR_CLK125_DISABLE 0x0010
-#define E1000_SCR_MDI_MANUAL_MODE 0x0000
-#define E1000_SCR_MDIX_MANUAL_MODE 0x0020
-#define E1000_SCR_AUTO_X_1000T 0x0040
-#define E1000_SCR_AUTO_X_MODE 0x0060
-#define E1000_SCR_10BT_EXT_ENABLE 0x0080
-#define E1000_SCR_MII_5BIT_ENABLE 0x0100
-#define E1000_SCR_SCRAMBLER_DISABLE 0x0200
-#define E1000_SCR_FORCE_LINK_GOOD 0x0400
-#define E1000_SCR_ASSERT_CRS_ON_TX 0x0800
-#define E1000_SCR_RX_FIFO_DEPTH_6 0x0000
-#define E1000_SCR_RX_FIFO_DEPTH_8 0x1000
-#define E1000_SCR_RX_FIFO_DEPTH_10 0x2000
-#define E1000_SCR_RX_FIFO_DEPTH_12 0x3000
-#define E1000_SCR_TX_FIFO_DEPTH_6 0x0000
-#define E1000_SCR_TX_FIFO_DEPTH_8 0x4000
-#define E1000_SCR_TX_FIFO_DEPTH_10 0x8000
-#define E1000_SCR_TX_FIFO_DEPTH_12 0xC000
-
-#define E1000_SSR 0x11 /* special status register */
-#define E1000_SSR_JABBER 0x0001
-#define E1000_SSR_REV_POLARITY 0x0002
-#define E1000_SSR_MDIX 0x0020
-#define E1000_SSR_LINK 0x0400
-#define E1000_SSR_SPD_DPLX_RESOLVED 0x0800
-#define E1000_SSR_PAGE_RCVD 0x1000
-#define E1000_SSR_DUPLEX 0x2000
-#define E1000_SSR_SPEED 0xC000
-#define E1000_SSR_10MBS 0x0000
-#define E1000_SSR_100MBS 0x4000
-#define E1000_SSR_1000MBS 0x8000
-
-#define E1000_IER 0x12 /* interrupt enable reg */
-#define E1000_IER_JABBER 0x0001
-#define E1000_IER_POLARITY_CHANGE 0x0002
-#define E1000_IER_MDIX_CHANGE 0x0040
-#define E1000_IER_FIFO_OVER_UNDERUN 0x0080
-#define E1000_IER_FALSE_CARRIER 0x0100
-#define E1000_IER_SYMBOL_ERROR 0x0200
-#define E1000_IER_LINK_STAT_CHANGE 0x0400
-#define E1000_IER_AUTO_NEG_COMPLETE 0x0800
-#define E1000_IER_PAGE_RECEIVED 0x1000
-#define E1000_IER_DUPLEX_CHANGED 0x2000
-#define E1000_IER_SPEED_CHANGED 0x4000
-#define E1000_IER_AUTO_NEG_ERR 0x8000
-
-#define E1000_ISR 0x13 /* interrupt status reg */
-#define E1000_ISR_JABBER 0x0001
-#define E1000_ISR_POLARITY_CHANGE 0x0002
-#define E1000_ISR_MDIX_CHANGE 0x0040
-#define E1000_ISR_FIFO_OVER_UNDERUN 0x0080
-#define E1000_ISR_FALSE_CARRIER 0x0100
-#define E1000_ISR_SYMBOL_ERROR 0x0200
-#define E1000_ISR_LINK_STAT_CHANGE 0x0400
-#define E1000_ISR_AUTO_NEG_COMPLETE 0x0800
-#define E1000_ISR_PAGE_RECEIVED 0x1000
-#define E1000_ISR_DUPLEX_CHANGED 0x2000
-#define E1000_ISR_SPEED_CHANGED 0x4000
-#define E1000_ISR_AUTO_NEG_ERR 0x8000
-
-#define E1000_ESCR 0x14 /* extended special control reg */
-#define E1000_ESCR_FIBER_LOOPBACK 0x4000
-#define E1000_ESCR_DOWN_NO_IDLE 0x8000
-#define E1000_ESCR_TX_CLK_2_5 0x0060
-#define E1000_ESCR_TX_CLK_25 0x0070
-#define E1000_ESCR_TX_CLK_0 0x0000
-
-#define E1000_RECR 0x15 /* RX error counter reg */
-
-#define E1000_LCR 0x18 /* LED control reg */
-#define E1000_LCR_LED_TX 0x0001
-#define E1000_LCR_LED_RX 0x0002
-#define E1000_LCR_LED_DUPLEX 0x0004
-#define E1000_LCR_LINK 0x0008
-#define E1000_LCR_BLINK_42MS 0x0000
-#define E1000_LCR_BLINK_84MS 0x0100
-#define E1000_LCR_BLINK_170MS 0x0200
-#define E1000_LCR_BLINK_340MS 0x0300
-#define E1000_LCR_BLINK_670MS 0x0400
-#define E1000_LCR_PULSE_OFF 0x0000
-#define E1000_LCR_PULSE_21_42MS 0x1000
-#define E1000_LCR_PULSE_42_84MS 0x2000
-#define E1000_LCR_PULSE_84_170MS 0x3000
-#define E1000_LCR_PULSE_170_340MS 0x4000
-#define E1000_LCR_PULSE_340_670MS 0x5000
-#define E1000_LCR_PULSE_670_13S 0x6000
-#define E1000_LCR_PULSE_13_26S 0x7000
diff --git a/sys/dev/mii/inphyreg.h b/sys/dev/mii/inphyreg.h
deleted file mode 100644
index 4b7d1f113051..000000000000
--- a/sys/dev/mii/inphyreg.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*-
- * Copyright (c) 2001 Jonathan Lemon
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#define MII_INPHY_SCR 0x10 /* status and control register */
-#define SCR_FLOWCTL 0x8000
-#define SCR_S100 0x0002 /* autonegotiated speed */
-#define SCR_FDX 0x0001 /* autonegotiated duplex */
diff --git a/sys/dev/mii/lxtphy.c b/sys/dev/mii/lxtphy.c
deleted file mode 100644
index d5601075e570..000000000000
--- a/sys/dev/mii/lxtphy.c
+++ /dev/null
@@ -1,392 +0,0 @@
-/* OpenBSD: lxtphy.c,v 1.5 2000/08/26 20:04:17 nate Exp */
-/* NetBSD: lxtphy.c,v 1.19 2000/02/02 23:34:57 thorpej Exp */
-
-/*-
- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1997 Manuel Bouyer. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Manuel Bouyer.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * driver for Level One's LXT-970 ethernet 10/100 PHY
- * datasheet from www.level1.com
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/errno.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-
-#include <net/if.h>
-#include <net/if_media.h>
-
-#include <dev/mii/mii.h>
-#include <dev/mii/miivar.h>
-#include <dev/mii/miidevs.h>
-
-#include <dev/mii/lxtphyreg.h>
-
-#include "miibus_if.h"
-
-#if !defined(lint)
-static const char rcsid[] =
- "$FreeBSD$";
-#endif
-
-static int lxtphy_probe __P((device_t));
-static int lxtphy_attach __P((device_t));
-static int lxtphy_detach __P((device_t));
-
-static device_method_t lxtphy_methods[] = {
- /* device interface */
- DEVMETHOD(device_probe, lxtphy_probe),
- DEVMETHOD(device_attach, lxtphy_attach),
- DEVMETHOD(device_detach, lxtphy_detach),
- DEVMETHOD(device_shutdown, bus_generic_shutdown),
- { 0, 0 }
-};
-
-static devclass_t lxtphy_devclass;
-
-static driver_t lxtphy_driver = {
- "lxtphy",
- lxtphy_methods,
- sizeof(struct mii_softc)
-};
-
-DRIVER_MODULE(lxtphy, miibus, lxtphy_driver, lxtphy_devclass, 0, 0);
-
-static int lxtphy_service __P((struct mii_softc *, struct mii_data *, int));
-static void lxtphy_status __P((struct mii_softc *));
-static void lxtphy_set_tp __P((struct mii_softc *));
-static void lxtphy_set_fx __P((struct mii_softc *));
-
-static int lxtphy_probe(dev)
- device_t dev;
-{
- struct mii_attach_args *ma;
-
- ma = device_get_ivars(dev);
-
- if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_xxLEVEL1 &&
- MII_MODEL(ma->mii_id2) == MII_MODEL_xxLEVEL1_LXT970) {
- device_set_desc(dev, MII_STR_xxLEVEL1_LXT970);
- } else
- return (ENXIO);
-
- return (0);
-}
-
-static int lxtphy_attach(dev)
- device_t dev;
-{
- struct mii_softc *sc;
- struct mii_attach_args *ma;
- struct mii_data *mii;
-
- sc = device_get_softc(dev);
- ma = device_get_ivars(dev);
- sc->mii_dev = device_get_parent(dev);
- mii = device_get_softc(sc->mii_dev);
- LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
-
- sc->mii_inst = mii->mii_instance;
- sc->mii_phy = ma->mii_phyno;
- sc->mii_service = lxtphy_service;
- sc->mii_pdata = mii;
- sc->mii_flags |= MIIF_NOISOLATE;
-
- mii_phy_reset(sc);
-
- mii->mii_instance++;
-
- sc->mii_capabilities =
- PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
- device_printf(dev, " ");
-
-#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst),
- BMCR_ISO);
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst),
- BMCR_S100);
- printf("100baseFX, ");
- ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst),
- BMCR_S100|BMCR_FDX);
- printf("100baseFX-FDX, ");
-#undef ADD
-
- if (sc->mii_capabilities & BMSR_MEDIAMASK)
- mii_add_media(mii, sc->mii_capabilities,
- sc->mii_inst);
- printf("\n");
-
- MIIBUS_MEDIAINIT(sc->mii_dev);
- return(0);
-}
-
-
-static int lxtphy_detach(dev)
- device_t dev;
-{
- struct mii_softc *sc;
- struct mii_data *mii;
-
- sc = device_get_softc(dev);
- mii = device_get_softc(device_get_parent(dev));
- sc->mii_dev = NULL;
- LIST_REMOVE(sc, mii_list);
-
- return(0);
-}
-
-static int
-lxtphy_service(sc, mii, cmd)
- struct mii_softc *sc;
- struct mii_data *mii;
- int cmd;
-{
- struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int reg;
-
- switch (cmd) {
- case MII_POLLSTAT:
- /*
- * If we're not polling our PHY instance, just return.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst)
- return (0);
- break;
-
- case MII_MEDIACHG:
- /*
- * If the media indicates a different PHY instance,
- * isolate ourselves.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
- reg = PHY_READ(sc, MII_BMCR);
- PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO);
- return (0);
- }
-
- /*
- * If the interface is not up, don't do anything.
- */
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
- break;
-
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
-
- lxtphy_set_tp(sc);
-
- (void) mii_phy_auto(sc, 1);
- break;
- case IFM_100_T4:
- /*
- * XXX Not supported as a manual setting right now.
- */
- return (EINVAL);
-
- case IFM_100_FX:
- lxtphy_set_fx(sc);
-
- default:
- /*
- * BMCR data is stored in the ifmedia entry.
- */
- PHY_WRITE(sc, MII_ANAR,
- mii_anar(ife->ifm_media));
- PHY_WRITE(sc, MII_BMCR, ife->ifm_data);
- }
- break;
-
- case MII_TICK:
- /*
- * If we're not currently selected, just return.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst)
- return (0);
-
- /*
- * Only used for autonegotiation.
- */
- if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO)
- return (0);
-
- /*
- * Is the interface even up?
- */
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
- return (0);
-
- /*
- * Check to see if we have link. If we do, we don't
- * need to restart the autonegotiation process. Read
- * the BMSR twice in case it's latched.
- */
- reg = PHY_READ(sc, MII_BMSR) |
- PHY_READ(sc, MII_BMSR);
- if (reg & BMSR_LINK)
- return (0);
-
- /*
- * Only retry autonegotiation every 5 seconds.
- */
- if (++sc->mii_ticks != 5)
- return (0);
-
- sc->mii_ticks = 0;
- mii_phy_reset(sc);
- if (mii_phy_auto(sc, 0) == EJUSTRETURN)
- return (0);
- break;
- }
-
- /* Update the media status. */
- lxtphy_status(sc);
-
- /* Callback if something changed. */
- if (sc->mii_active != mii->mii_media_active || cmd == MII_MEDIACHG) {
- MIIBUS_STATCHG(sc->mii_dev);
- sc->mii_active = mii->mii_media_active;
- }
- return (0);
-}
-
-static void
-lxtphy_status(sc)
- struct mii_softc *sc;
-{
- struct mii_data *mii = sc->mii_pdata;
- struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int bmcr, bmsr, csr;
-
- mii->mii_media_status = IFM_AVALID;
- mii->mii_media_active = IFM_ETHER;
-
- /*
- * Get link status from the CSR; we need to read the CSR
- * for media type anyhow, and the link status in the CSR
- * doens't latch, so fewer register reads are required.
- */
- csr = PHY_READ(sc, MII_LXTPHY_CSR);
- if (csr & CSR_LINK)
- mii->mii_media_status |= IFM_ACTIVE;
-
- bmcr = PHY_READ(sc, MII_BMCR);
- if (bmcr & BMCR_ISO) {
- mii->mii_media_active |= IFM_NONE;
- mii->mii_media_status = 0;
- return;
- }
-
- if (bmcr & BMCR_LOOP)
- mii->mii_media_active |= IFM_LOOP;
-
- if (bmcr & BMCR_AUTOEN) {
- bmsr = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR);
- if ((bmsr & BMSR_ACOMP) == 0) {
- /* Erg, still trying, I guess... */
- mii->mii_media_active |= IFM_NONE;
- return;
- }
- if (csr & CSR_SPEED)
- mii->mii_media_active |= IFM_100_TX;
- else
- mii->mii_media_active |= IFM_10_T;
- if (csr & CSR_DUPLEX)
- mii->mii_media_active |= IFM_FDX;
- } else
- mii->mii_media_active = ife->ifm_media;
-}
-
-static void
-lxtphy_set_tp(sc)
- struct mii_softc *sc;
-{
- int cfg;
-
- cfg = PHY_READ(sc, MII_LXTPHY_CONFIG);
- cfg &= ~CONFIG_100BASEFX;
- PHY_WRITE(sc, MII_LXTPHY_CONFIG, cfg);
-}
-
-static void
-lxtphy_set_fx(sc)
- struct mii_softc *sc;
-{
- int cfg;
-
- cfg = PHY_READ(sc, MII_LXTPHY_CONFIG);
- cfg |= CONFIG_100BASEFX;
- PHY_WRITE(sc, MII_LXTPHY_CONFIG, cfg);
-}
-
diff --git a/sys/dev/mii/lxtphyreg.h b/sys/dev/mii/lxtphyreg.h
deleted file mode 100644
index 662bd34b280e..000000000000
--- a/sys/dev/mii/lxtphyreg.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* OpenBSD: lxtphyreg.h,v 1.1 1998/11/11 19:34:47 jason Exp */
-/* NetBSD: lxtphyreg.h,v 1.1 1998/10/24 00:33:17 thorpej Exp */
-/* $FreeBSD$ */
-
-/*-
- * Copyright (c) 1998 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _DEV_MII_LXTPHYREG_H_
-#define _DEV_MII_LXTPHYREG_H_
-
-/*
- * LXT970 registers.
- */
-
-#define MII_LXTPHY_MIRROR 0x10 /* Mirror register */
- /* All bits user-defined */
-
-#define MII_LXTPHY_IER 0x11 /* Interrupt Enable Register */
-#define IER_MIIDRVLVL 0x0008 /* Rediced MII driver levels */
-#define IER_LNK_CRITERIA 0x0004 /* Enhanced Link Loss Criteria */
-#define IER_INTEN 0x0002 /* Interrupt Enable */
-#define IER_TINT 0x0001 /* Force Interrupt */
-
-#define MII_LXTPHY_ISR 0x12 /* Interrupt Status Register */
-#define ISR_MINT 0x8000 /* MII Interrupt Pending */
-#define ISR_XTALOK 0x4000 /* Clocks OK */
-
-#define MII_LXTPHY_CONFIG 0x13 /* Configuration Register */
-#define CONFIG_TXMIT_TEST 0x4000 /* 100base-T Transmit Test */
-#define CONFIG_REPEATER 0x2000 /* Repeater Mode */
-#define CONFIG_MDIO_INT 0x1000 /* Enable intr signalling on MDIO */
-#define CONFIG_TPLOOP 0x0800 /* Disable 10base-T Loopback */
-#define CONFIG_SQE 0x0400 /* Enable SQE */
-#define CONFIG_DISJABBER 0x0200 /* Disable Jabber */
-#define CONFIG_DISLINKTEST 0x0100 /* Disable Link Test */
-#define CONFIG_LEDC1 0x0080 /* LEDC configuration */
-#define CONFIG_LEDC0 0x0040 /* ... */
- /* 0 0 LEDC indicates collision */
- /* 0 1 LEDC is off */
- /* 1 0 LEDC indicates activity */
- /* 1 1 LEDC is on */
-#define CONFIG_ADVTXCLK 0x0020 /* Advance TX clock */
-#define CONFIG_5BSYMBOL 0x0010 /* 5-bit Symbol mode */
-#define CONFIG_SCRAMBLER 0x0008 /* Bypass scrambler */
-#define CONFIG_100BASEFX 0x0004 /* 100base-FX */
-#define CONFIG_TXDISCON 0x0001 /* Disconnect TP transmitter */
-
-#define MII_LXTPHY_CSR 0x14 /* Chip Status Register */
-#define CSR_LINK 0x2000 /* Link is up */
-#define CSR_DUPLEX 0x1000 /* Full-duplex */
-#define CSR_SPEED 0x0800 /* 100Mbps */
-#define CSR_ACOMP 0x0400 /* Autonegotiation complete */
-#define CSR_PAGERCVD 0x0200 /* Link page received */
-#define CSR_LOWVCC 0x0004 /* Low Voltage Fault */
-
-#endif /* _DEV_MII_LXTPHYREG_H_ */
diff --git a/sys/dev/mii/qsphy.c b/sys/dev/mii/qsphy.c
deleted file mode 100644
index 4f00e467d477..000000000000
--- a/sys/dev/mii/qsphy.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/* OpenBSD: qsphy.c,v 1.6 2000/08/26 20:04:18 nate Exp */
-/* NetBSD: qsphy.c,v 1.19 2000/02/02 23:34:57 thorpej Exp */
-
-/*-
- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1997 Manuel Bouyer. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Manuel Bouyer.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * driver for Quality Semiconductor's QS6612 ethernet 10/100 PHY
- * datasheet from www.qualitysemi.com
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/errno.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-
-#include <net/if.h>
-#include <net/if_media.h>
-
-#include <dev/mii/mii.h>
-#include <dev/mii/miivar.h>
-#include <dev/mii/miidevs.h>
-
-#include <dev/mii/qsphyreg.h>
-
-#include "miibus_if.h"
-
-#if !defined(lint)
-static const char rcsid[] =
- "$FreeBSD$";
-#endif
-
-static int qsphy_probe __P((device_t));
-static int qsphy_attach __P((device_t));
-static int qsphy_detach __P((device_t));
-
-static device_method_t qsphy_methods[] = {
- /* device interface */
- DEVMETHOD(device_probe, qsphy_probe),
- DEVMETHOD(device_attach, qsphy_attach),
- DEVMETHOD(device_detach, qsphy_detach),
- DEVMETHOD(device_shutdown, bus_generic_shutdown),
- { 0, 0 }
-};
-
-static devclass_t qsphy_devclass;
-
-static driver_t qsphy_driver = {
- "qsphy",
- qsphy_methods,
- sizeof(struct mii_softc)
-};
-
-DRIVER_MODULE(qsphy, miibus, qsphy_driver, qsphy_devclass, 0, 0);
-
-int qsphy_service __P((struct mii_softc *, struct mii_data *, int));
-void qsphy_reset __P((struct mii_softc *));
-void qsphy_status __P((struct mii_softc *));
-
-static int qsphy_probe(dev)
- device_t dev;
-{
- struct mii_attach_args *ma;
-
- ma = device_get_ivars(dev);
-
- if (MII_OUI(ma->mii_id1, ma->mii_id2) == MII_OUI_QUALSEMI &&
- MII_MODEL(ma->mii_id2) == MII_MODEL_QUALSEMI_QS6612) {
- device_set_desc(dev, MII_STR_QUALSEMI_QS6612);
- } else
- return (ENXIO);
-
- return (0);
-}
-
-static int qsphy_attach(dev)
- device_t dev;
-{
- struct mii_softc *sc;
- struct mii_attach_args *ma;
- struct mii_data *mii;
-
- sc = device_get_softc(dev);
- ma = device_get_ivars(dev);
- sc->mii_dev = device_get_parent(dev);
- mii = device_get_softc(sc->mii_dev);
- LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
-
- sc->mii_inst = mii->mii_instance;
- sc->mii_phy = ma->mii_phyno;
- sc->mii_service = qsphy_service;
- sc->mii_pdata = mii;
- sc->mii_flags |= MIIF_NOISOLATE;
-
- qsphy_reset(sc);
-
- mii->mii_instance++;
-
- sc->mii_capabilities =
- PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
- device_printf(dev, " ");
- if (sc->mii_capabilities & BMSR_MEDIAMASK)
- mii_add_media(mii, sc->mii_capabilities,
- sc->mii_inst);
- printf("\n");
-
- MIIBUS_MEDIAINIT(sc->mii_dev);
- return (0);
-}
-
-static int qsphy_detach(dev)
- device_t dev;
-{
- struct mii_softc *sc;
- struct mii_data *mii;
-
- sc = device_get_softc(dev);
- mii = device_get_softc(device_get_parent(dev));
- sc->mii_dev = NULL;
- LIST_REMOVE(sc, mii_list);
-
- return(0);
-}
-
-int
-qsphy_service(sc, mii, cmd)
- struct mii_softc *sc;
- struct mii_data *mii;
- int cmd;
-{
- struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int reg;
-
- switch (cmd) {
- case MII_POLLSTAT:
- /*
- * If we're not polling our PHY instance, just return.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst)
- return (0);
- break;
-
- case MII_MEDIACHG:
- /*
- * If the media indicates a different PHY instance,
- * isolate ourselves.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
- reg = PHY_READ(sc, MII_BMCR);
- PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO);
- return (0);
- }
-
- /*
- * If the interface is not up, don't do anything.
- */
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
- break;
-
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
-
- (void) mii_phy_auto(sc, 1);
- break;
-
- default:
- /*
- * BMCR data is stored in the ifmedia entry.
- */
- PHY_WRITE(sc, MII_ANAR,
- mii_anar(ife->ifm_media));
- PHY_WRITE(sc, MII_BMCR, ife->ifm_data);
- }
- break;
-
- case MII_TICK:
- /*
- * If we're not currently selected, just return.
- */
- if (IFM_INST(ife->ifm_media) != sc->mii_inst)
- return (0);
-
- /*
- * Only used for autonegotiation.
- */
- if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO)
- return (0);
-
- /*
- * Is the interface even up?
- */
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
- return (0);
-
- /*
- * Check to see if we have link. If we do, we don't
- * need to restart the autonegotiation process. Read
- * the BMSR twice in case it's latched.
- */
- reg = PHY_READ(sc, MII_BMSR) |
- PHY_READ(sc, MII_BMSR);
- if (reg & BMSR_LINK)
- return (0);
-
- /*
- * Only retry autonegotiation every 5 seconds.
- */
- if (++sc->mii_ticks != 5)
- return (0);
-
- sc->mii_ticks = 0;
- mii_phy_reset(sc);
- if (mii_phy_auto(sc, 0) == EJUSTRETURN)
- return (0);
- break;
- }
-
- /* Update the media status. */
- qsphy_status(sc);
-
- /* Callback if something changed. */
- if (sc->mii_active != mii->mii_media_active || cmd == MII_MEDIACHG) {
- MIIBUS_STATCHG(sc->mii_dev);
- sc->mii_active = mii->mii_media_active;
- }
- return (0);
-}
-
-void
-qsphy_status(sc)
- struct mii_softc *sc;
-{
- struct mii_data *mii = sc->mii_pdata;
- struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- int bmsr, bmcr, pctl;
-
- mii->mii_media_status = IFM_AVALID;
- mii->mii_media_active = IFM_ETHER;
-
- bmsr = PHY_READ(sc, MII_BMSR) |
- PHY_READ(sc, MII_BMSR);
- if (bmsr & BMSR_LINK)
- mii->mii_media_status |= IFM_ACTIVE;
-
- bmcr = PHY_READ(sc, MII_BMCR);
- if (bmcr & BMCR_ISO) {
- mii->mii_media_active |= IFM_NONE;
- mii->mii_media_status = 0;
- return;
- }
-
- if (bmcr & BMCR_LOOP)
- mii->mii_media_active |= IFM_LOOP;
-
- if (bmcr & BMCR_AUTOEN) {
- if ((bmsr & BMSR_ACOMP) == 0) {
- /* Erg, still trying, I guess... */
- mii->mii_media_active |= IFM_NONE;
- return;
- }
- pctl = PHY_READ(sc, MII_QSPHY_PCTL) |
- PHY_READ(sc, MII_QSPHY_PCTL);
- switch (pctl & PCTL_OPMASK) {
- case PCTL_10_T:
- mii->mii_media_active |= IFM_10_T;
- break;
- case PCTL_10_T_FDX:
- mii->mii_media_active |= IFM_10_T|IFM_FDX;
- break;
- case PCTL_100_TX:
- mii->mii_media_active |= IFM_100_TX;
- break;
- case PCTL_100_TX_FDX:
- mii->mii_media_active |= IFM_100_TX|IFM_FDX;
- break;
- case PCTL_100_T4:
- mii->mii_media_active |= IFM_100_T4;
- break;
- default:
- /* Erg... this shouldn't happen. */
- mii->mii_media_active |= IFM_NONE;
- break;
- }
- } else
- mii->mii_media_active = ife->ifm_media;
-}
-
-void
-qsphy_reset(sc)
- struct mii_softc *sc;
-{
-
- mii_phy_reset(sc);
- PHY_WRITE(sc, MII_QSPHY_IMASK, 0);
-}
diff --git a/sys/dev/mii/qsphyreg.h b/sys/dev/mii/qsphyreg.h
deleted file mode 100644
index a69786596a29..000000000000
--- a/sys/dev/mii/qsphyreg.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* OpenBSD: qsphyreg.h,v 1.2 1999/03/09 00:02:45 jason Exp */
-/* NetBSD: qsphyreg.h,v 1.1 1998/08/11 00:01:03 thorpej Exp */
-/* $FreeBSD$ */
-
-/*-
- * Copyright (c) 1998 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _DEV_MII_QSPHYREG_H_
-#define _DEV_MII_QSPHYREG_H_
-
-/*
- * Register definitions for the Quality Semiconductor QS6612
- * Further documentation can be found at:
- * http://www.qualitysemi.com/products/network.html
- */
-
-#define MII_QSPHY_MCTL 0x11 /* Mode control */
-#define MCTL_T4PRE 0x1000 /* 100baseT4 interface present */
-#define MCTL_BTEXT 0x0800 /* reduce 10baseT squelch level */
-#define MCTL_FACTTEST 0x0100 /* factory test mode */
-#define MCTL_PHYADDRMASK 0x00f8 /* PHY address */
-#define MCTL_FACTTEST2 0x0004 /* another factory test mode */
-#define MCTL_NLPDIS 0x0002 /* disable link pulse tx */
-#define MCTL_SQEDIS 0x0001 /* disable SQE */
-
-#define MII_QSPHY_ISRC 0x1d /* Interrupt source */
-#define MII_QSPHY_IMASK 0x1e /* Interrupt mask */
-#define IMASK_TLINTR 0x8000 /* ThunderLAN interrupt mode */
-#define IMASK_ANCPL 0x0040 /* autonegotiation complete */
-#define IMASK_RFD 0x0020 /* remote fault detected */
-#define IMASK_LD 0x0010 /* link down */
-#define IMASK_ANLPA 0x0008 /* autonegotiation LP ACK */
-#define IMASK_PDT 0x0004 /* parallel detection fault */
-#define IMASK_ANPR 0x0002 /* autonegotiation page received */
-#define IMASK_REF 0x0001 /* receive error counter full */
-
-#define MII_QSPHY_PCTL 0x1f /* PHY control */
-#define PCTL_RXERDIS 0x2000 /* receive error counter disable */
-#define PCTL_ANC 0x1000 /* autonegotiation complete */
-#define PCTL_RLBEN 0x0200 /* remote coopback enable */
-#define PCTL_DCREN 0x0100 /* DC restoration enable */
-#define PCTL_4B5BEN 0x0040 /* 4b/5b encoding */
-#define PCTL_PHYISO 0x0020 /* isolate PHY */
-#define PCTL_OPMASK 0x001c /* operation mode mask */
-#define PCTL_AN 0x0000 /* autonegotiation in-progress */
-#define PCTL_10_T 0x0004 /* 10baseT */
-#define PCTL_100_TX 0x0008 /* 100baseTX */
-#define PCTL_100_T4 0x0010 /* 100baseT4 */
-#define PCTL_10_T_FDX 0x0014 /* 10baseT-FDX */
-#define PCTL_100_TX_FDX 0x0018 /* 100baseTX-FDX */
-#define PCTL_MLT3DIS 0x0002 /* disable MLT3 */
-#define PCTL_SRCDIS 0x0001 /* disable scrambling */
-
-#endif /* _DEV_MII_QSPHYREG_H_ */
diff --git a/sys/dev/mii/tdkphyreg.h b/sys/dev/mii/tdkphyreg.h
deleted file mode 100644
index 1f106251b607..000000000000
--- a/sys/dev/mii/tdkphyreg.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2000,2001 Jonathan Chen.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification, immediately at the beginning of the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Register definitions for TDK 78Q2120
- */
-
-#ifndef _DEV_MII_TDKPHYREG_H_
-#define _DEV_MII_TDKPHYREG_H_
-
-#define MII_VENDOR 16
-#define VENDOR_RXCC 0x0001
-#define VENDOR_PCSBP 0x0002
-#define VENDOR_RVSPOL 0x0010
-#define VENDOR_NOAPOL 0x0020
-#define VENDOR_GPIO0DIR 0x0040
-#define VENDOR_GPIO0DAT 0x0080
-#define VENDOR_GPIO1DIR 0x0100
-#define VENDOR_GPIO1DAT 0x0200
-#define VENDOR_10BTLOOP 0x0400
-#define VENDOR_NOSQE 0x0800
-#define VENDOR_TXHIM 0x1000
-#define VENDOR_INTLVL 0x4000
-#define VENDOR_RPTR 0x8000
-
-#define MII_INT 17
-#define INT_STAT_MASK 0x00ff
-#define INT_STAT_ACOMP 0x0001
-#define INT_STAT_RFAULT 0x0002
-#define INT_STAT_LSCHG 0x0004
-#define INT_STAT_LPACK 0x0008
-#define INT_STAT_PDF 0x0010
-#define INT_STAT_PRX 0x0020
-#define INT_STAT_RXERR 0x0040
-#define INT_STAT_JABBER 0x0080
-#define INT_CTRL_MASK 0xff00
-#define INT_CTRL_ACOMP 0x0100
-#define INT_CTRL_RFAULT 0x0200
-#define INT_CTRL_LSCHG 0x0400
-#define INT_CTRL_LPACK 0x0800
-#define INT_CTRL_PDF 0x1000
-#define INT_CTRL_PRX 0x2000
-#define INT_CTRL_RXERR 0x4000
-#define INT_CTRL_JABBER 0x8000
-
-
-#define MII_DIAG 18
-#define DIAG_RLOCK 0x0100
-#define DIAG_RPASS 0x0200
-#define DIAG_RATE_100 0x0400
-#define DIAG_DUPLEX 0x0800
-#define DIAG_NEGFAIL 0x1000
-
-
-#endif
diff --git a/sys/dev/rp/rp_isa.c b/sys/dev/rp/rp_isa.c
deleted file mode 100644
index bbbdcb210803..000000000000
--- a/sys/dev/rp/rp_isa.c
+++ /dev/null
@@ -1,502 +0,0 @@
-/*
- * Copyright (c) Comtrol Corporation <support@comtrol.com>
- * All rights reserved.
- *
- * ISA-specific part separated from:
- * sys/i386/isa/rp.c,v 1.33 1999/09/28 11:45:27 phk Exp
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted prodived that the follwoing conditions
- * are met.
- * 1. Redistributions of source code must retain the above copyright
- * notive, this list of conditions and the following disclainer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials prodided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Comtrol Corporation.
- * 4. The name of Comtrol Corporation may not be used to endorse or
- * promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY COMTROL CORPORATION ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL COMTROL CORPORATION BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/fcntl.h>
-#include <sys/malloc.h>
-#include <sys/tty.h>
-#include <sys/conf.h>
-#include <sys/kernel.h>
-#include <machine/resource.h>
-#include <machine/bus.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#define ROCKET_C
-#include <dev/rp/rpreg.h>
-#include <dev/rp/rpvar.h>
-
-#include <isa/isavar.h>
-
-/* ISA-specific part of CONTROLLER_t */
-struct ISACONTROLLER_T {
- int MBaseIO; /* rid of the Mudbac controller for this controller */
- int MReg0IO; /* offset0 of the Mudbac controller for this controller */
- int MReg1IO; /* offset1 of the Mudbac controller for this controller */
- int MReg2IO; /* offset2 of the Mudbac controller for this controller */
- int MReg3IO; /* offset3 of the Mudbac controller for this controller */
- Byte_t MReg2;
- Byte_t MReg3;
-};
-typedef struct ISACONTROLLER_T ISACONTROLLER_t;
-
-#define ISACTL(ctlp) ((ISACONTROLLER_t *)((ctlp)->bus_ctlp))
-
-/***************************************************************************
-Function: sControllerEOI
-Purpose: Strobe the MUDBAC's End Of Interrupt bit.
-Call: sControllerEOI(MudbacCtlP,CtlP)
- CONTROLLER_T *MudbacCtlP; Ptr to Mudbac controller structure
- CONTROLLER_T *CtlP; Ptr to controller structure
-*/
-#define sControllerEOI(MudbacCtlP,CtlP) \
- rp_writeio1(MudbacCtlP,ISACTL(CtlP)->MBaseIO,ISACTL(CtlP)->MReg2IO,ISACTL(CtlP)->MReg2 | INT_STROB)
-
-/***************************************************************************
-Function: sDisAiop
-Purpose: Disable I/O access to an AIOP
-Call: sDisAiop(MudbacCtlP,CtlP)
- CONTROLLER_T *MudbacCtlP; Ptr to Mudbac controller structure
- CONTROLLER_T *CtlP; Ptr to controller structure
- int AiopNum; Number of AIOP on controller
-*/
-#define sDisAiop(MudbacCtlP,CtlP,AIOPNUM) \
-{ \
- ISACTL(CtlP)->MReg3 &= rp_sBitMapClrTbl[AIOPNUM]; \
- rp_writeio1(MudbacCtlP,ISACTL(CtlP)->MBaseIO,ISACTL(CtlP)->MReg3IO,ISACTL(CtlP)->MReg3); \
-}
-
-/***************************************************************************
-Function: sEnAiop
-Purpose: Enable I/O access to an AIOP
-Call: sEnAiop(MudbacCtlP,CtlP)
- CONTROLLER_T *MudbacCtlP; Ptr to Mudbac controller structure
- CONTROLLER_T *CtlP; Ptr to controller structure
- int AiopNum; Number of AIOP on controller
-*/
-#define sEnAiop(MudbacCtlP,CtlP,AIOPNUM) \
-{ \
- ISACTL(CtlP)->MReg3 |= rp_sBitMapSetTbl[AIOPNUM]; \
- rp_writeio1(MudbacCtlP,ISACTL(CtlP)->MBaseIO,ISACTL(CtlP)->MReg3IO,ISACTL(CtlP)->MReg3); \
-}
-
-/***************************************************************************
-Function: sGetControllerIntStatus
-Purpose: Get the controller interrupt status
-Call: sGetControllerIntStatus(MudbacCtlP,CtlP)
- CONTROLLER_T *MudbacCtlP; Ptr to Mudbac controller structure
- CONTROLLER_T *CtlP; Ptr to controller structure
-Return: Byte_t: The controller interrupt status in the lower 4
- bits. Bits 0 through 3 represent AIOP's 0
- through 3 respectively. If a bit is set that
- AIOP is interrupting. Bits 4 through 7 will
- always be cleared.
-*/
-#define sGetControllerIntStatus(MudbacCtlP,CtlP) \
- (rp_readio1(MudbacCtlP,ISACTL(CtlP)->MBaseIO,ISACTL(CtlP)->MReg1IO) & 0x0f)
-
-static devclass_t rp_devclass;
-static CONTROLLER_t *rp_controller;
-static int rp_nisadevs;
-
-static int rp_probe(device_t dev);
-static int rp_attach(device_t dev);
-static void rp_isareleaseresource(CONTROLLER_t *ctlp);
-static int sInitController(CONTROLLER_T *CtlP,
- CONTROLLER_T *MudbacCtlP,
- int AiopNum,
- int IRQNum,
- Byte_t Frequency,
- int PeriodicOnly);
-static rp_aiop2rid_t rp_isa_aiop2rid;
-static rp_aiop2off_t rp_isa_aiop2off;
-static rp_ctlmask_t rp_isa_ctlmask;
-
-static int
-rp_probe(device_t dev)
-{
- int unit;
- CONTROLLER_t *controller;
- int num_aiops;
- CONTROLLER_t *ctlp;
- int retval;
-
- /*
- * We have no PnP RocketPort cards.
- * (At least according to LINT)
- */
- if (isa_get_logicalid(dev) != 0)
- return (ENXIO);
-
- /* We need IO port resource to configure an ISA device. */
- if (bus_get_resource_count(dev, SYS_RES_IOPORT, 0) == 0)
- return (ENXIO);
-
- unit = device_get_unit(dev);
- if (unit >= 4) {
- device_printf(dev, "rpprobe: unit number %d invalid.\n", unit);
- return (ENXIO);
- }
- device_printf(dev, "probing for RocketPort(ISA) unit %d.\n", unit);
-
- ctlp = device_get_softc(dev);
- bzero(ctlp, sizeof(*ctlp));
- ctlp->dev = dev;
- ctlp->aiop2rid = rp_isa_aiop2rid;
- ctlp->aiop2off = rp_isa_aiop2off;
- ctlp->ctlmask = rp_isa_ctlmask;
-
- /* The IO ports of AIOPs for an ISA controller are discrete. */
- ctlp->io_num = 1;
- ctlp->io_rid = malloc(sizeof(*(ctlp->io_rid)) * MAX_AIOPS_PER_BOARD, M_DEVBUF, M_NOWAIT | M_ZERO);
- ctlp->io = malloc(sizeof(*(ctlp->io)) * MAX_AIOPS_PER_BOARD, M_DEVBUF, M_NOWAIT | M_ZERO);
- if (ctlp->io_rid == NULL || ctlp->io == NULL) {
- device_printf(dev, "rp_attach: Out of memory.\n");
- retval = ENOMEM;
- goto nogo;
- }
-
- ctlp->bus_ctlp = malloc(sizeof(ISACONTROLLER_t) * 1, M_DEVBUF, M_NOWAIT | M_ZERO);
- if (ctlp->bus_ctlp == NULL) {
- device_printf(dev, "rp_attach: Out of memory.\n");
- retval = ENOMEM;
- goto nogo;
- }
-
- ctlp->io_rid[0] = 0;
- if (rp_controller != NULL) {
- controller = rp_controller;
- ctlp->io[0] = bus_alloc_resource(dev, SYS_RES_IOPORT, &ctlp->io_rid[0], 0, ~0, 0x40, RF_ACTIVE);
- } else {
- controller = rp_controller = ctlp;
- ctlp->io[0] = bus_alloc_resource(dev, SYS_RES_IOPORT, &ctlp->io_rid[0], 0, ~0, 0x44, RF_ACTIVE);
- }
- if (ctlp->io[0] == NULL) {
- device_printf(dev, "rp_attach: Resource not available.\n");
- retval = ENXIO;
- goto nogo;
- }
-
- num_aiops = sInitController(ctlp,
- controller,
- MAX_AIOPS_PER_BOARD, 0,
- FREQ_DIS, 0);
- if (num_aiops <= 0) {
- device_printf(dev, "board%d init failed.\n", unit);
- retval = ENXIO;
- goto nogo;
- }
-
- if (rp_controller == NULL)
- rp_controller = controller;
- rp_nisadevs++;
-
- device_set_desc(dev, "RocketPort ISA");
-
- return (0);
-
-nogo:
- rp_isareleaseresource(ctlp);
-
- return (retval);
-}
-
-static int
-rp_attach(device_t dev)
-{
- int unit;
- int num_ports, num_aiops;
- int aiop;
- CONTROLLER_t *ctlp;
- int retval;
-
- unit = device_get_unit(dev);
-
- ctlp = device_get_softc(dev);
-
-#if notdef
- num_aiops = sInitController(ctlp,
- rp_controller,
- MAX_AIOPS_PER_BOARD, 0,
- FREQ_DIS, 0);
-#else
- num_aiops = ctlp->NumAiop;
-#endif /* notdef */
-
- num_ports = 0;
- for(aiop=0; aiop < num_aiops; aiop++) {
- sResetAiopByNum(ctlp, aiop);
- sEnAiop(rp_controller, ctlp, aiop);
- num_ports += sGetAiopNumChan(ctlp, aiop);
- }
-
- retval = rp_attachcommon(ctlp, num_aiops, num_ports);
- if (retval != 0)
- goto nogo;
-
- return (0);
-
-nogo:
- rp_isareleaseresource(ctlp);
-
- return (retval);
-}
-
-static void
-rp_isareleaseresource(CONTROLLER_t *ctlp)
-{
- int i;
-
- rp_releaseresource(ctlp);
-
- if (ctlp == rp_controller)
- rp_controller = NULL;
- if (ctlp->io != NULL) {
- for (i = 0 ; i < MAX_AIOPS_PER_BOARD ; i++)
- if (ctlp->io[i] != NULL)
- bus_release_resource(ctlp->dev, SYS_RES_IOPORT, ctlp->io_rid[i], ctlp->io[i]);
- free(ctlp->io, M_DEVBUF);
- }
- if (ctlp->io_rid != NULL)
- free(ctlp->io_rid, M_DEVBUF);
- if (rp_controller != NULL && rp_controller->io[ISACTL(ctlp)->MBaseIO] != NULL) {
- bus_release_resource(rp_controller->dev, SYS_RES_IOPORT, rp_controller->io_rid[ISACTL(ctlp)->MBaseIO], rp_controller->io[ISACTL(ctlp)->MBaseIO]);
- rp_controller->io[ISACTL(ctlp)->MBaseIO] = NULL;
- rp_controller->io_rid[ISACTL(ctlp)->MBaseIO] = 0;
- }
- if (ctlp->bus_ctlp != NULL)
- free(ctlp->bus_ctlp, M_DEVBUF);
-}
-
-/***************************************************************************
-Function: sInitController
-Purpose: Initialization of controller global registers and controller
- structure.
-Call: sInitController(CtlP,MudbacCtlP,AiopNum,
- IRQNum,Frequency,PeriodicOnly)
- CONTROLLER_T *CtlP; Ptr to controller structure
- CONTROLLER_T *MudbacCtlP; Ptr to Mudbac controller structure
- int AiopNum; Number of Aiops
- int IRQNum; Interrupt Request number. Can be any of the following:
- 0: Disable global interrupts
- 3: IRQ 3
- 4: IRQ 4
- 5: IRQ 5
- 9: IRQ 9
- 10: IRQ 10
- 11: IRQ 11
- 12: IRQ 12
- 15: IRQ 15
- Byte_t Frequency: A flag identifying the frequency
- of the periodic interrupt, can be any one of the following:
- FREQ_DIS - periodic interrupt disabled
- FREQ_137HZ - 137 Hertz
- FREQ_69HZ - 69 Hertz
- FREQ_34HZ - 34 Hertz
- FREQ_17HZ - 17 Hertz
- FREQ_9HZ - 9 Hertz
- FREQ_4HZ - 4 Hertz
- If IRQNum is set to 0 the Frequency parameter is
- overidden, it is forced to a value of FREQ_DIS.
- int PeriodicOnly: TRUE if all interrupts except the periodic
- interrupt are to be blocked.
- FALSE is both the periodic interrupt and
- other channel interrupts are allowed.
- If IRQNum is set to 0 the PeriodicOnly parameter is
- overidden, it is forced to a value of FALSE.
-Return: int: Number of AIOPs on the controller, or CTLID_NULL if controller
- initialization failed.
-
-Comments:
- If periodic interrupts are to be disabled but AIOP interrupts
- are allowed, set Frequency to FREQ_DIS and PeriodicOnly to FALSE.
-
- If interrupts are to be completely disabled set IRQNum to 0.
-
- Setting Frequency to FREQ_DIS and PeriodicOnly to TRUE is an
- invalid combination.
-
- This function performs initialization of global interrupt modes,
- but it does not actually enable global interrupts. To enable
- and disable global interrupts use functions sEnGlobalInt() and
- sDisGlobalInt(). Enabling of global interrupts is normally not
- done until all other initializations are complete.
-
- Even if interrupts are globally enabled, they must also be
- individually enabled for each channel that is to generate
- interrupts.
-
-Warnings: No range checking on any of the parameters is done.
-
- No context switches are allowed while executing this function.
-
- After this function all AIOPs on the controller are disabled,
- they can be enabled with sEnAiop().
-*/
-static int
-sInitController( CONTROLLER_T *CtlP,
- CONTROLLER_T *MudbacCtlP,
- int AiopNum,
- int IRQNum,
- Byte_t Frequency,
- int PeriodicOnly)
-{
- int i;
- int ctl_base, aiop_base, aiop_size;
-
- CtlP->CtlID = CTLID_0001; /* controller release 1 */
-
- ISACTL(CtlP)->MBaseIO = rp_nisadevs;
- if (MudbacCtlP->io[ISACTL(CtlP)->MBaseIO] != NULL) {
- ISACTL(CtlP)->MReg0IO = 0x40 + 0;
- ISACTL(CtlP)->MReg1IO = 0x40 + 1;
- ISACTL(CtlP)->MReg2IO = 0x40 + 2;
- ISACTL(CtlP)->MReg3IO = 0x40 + 3;
- } else {
- MudbacCtlP->io_rid[ISACTL(CtlP)->MBaseIO] = ISACTL(CtlP)->MBaseIO;
- ctl_base = rman_get_start(MudbacCtlP->io[0]) + 0x40 + 0x400 * rp_nisadevs;
- MudbacCtlP->io[ISACTL(CtlP)->MBaseIO] = bus_alloc_resource(MudbacCtlP->dev, SYS_RES_IOPORT, &CtlP->io_rid[ISACTL(CtlP)->MBaseIO], ctl_base, ctl_base + 3, 4, RF_ACTIVE);
- ISACTL(CtlP)->MReg0IO = 0;
- ISACTL(CtlP)->MReg1IO = 1;
- ISACTL(CtlP)->MReg2IO = 2;
- ISACTL(CtlP)->MReg3IO = 3;
- }
-#if 1
- ISACTL(CtlP)->MReg2 = 0; /* interrupt disable */
- ISACTL(CtlP)->MReg3 = 0; /* no periodic interrupts */
-#else
- if(sIRQMap[IRQNum] == 0) /* interrupts globally disabled */
- {
- ISACTL(CtlP)->MReg2 = 0; /* interrupt disable */
- ISACTL(CtlP)->MReg3 = 0; /* no periodic interrupts */
- }
- else
- {
- ISACTL(CtlP)->MReg2 = sIRQMap[IRQNum]; /* set IRQ number */
- ISACTL(CtlP)->MReg3 = Frequency; /* set frequency */
- if(PeriodicOnly) /* periodic interrupt only */
- {
- ISACTL(CtlP)->MReg3 |= PERIODIC_ONLY;
- }
- }
-#endif
- rp_writeio1(MudbacCtlP,ISACTL(CtlP)->MBaseIO,ISACTL(CtlP)->MReg2IO,ISACTL(CtlP)->MReg2);
- rp_writeio1(MudbacCtlP,ISACTL(CtlP)->MBaseIO,ISACTL(CtlP)->MReg3IO,ISACTL(CtlP)->MReg3);
- sControllerEOI(MudbacCtlP,CtlP); /* clear EOI if warm init */
-
- /* Init AIOPs */
- CtlP->NumAiop = 0;
- for(i=0; i < AiopNum; i++)
- {
- if (CtlP->io[i] == NULL) {
- CtlP->io_rid[i] = i;
- aiop_base = rman_get_start(CtlP->io[0]) + 0x400 * i;
- if (rp_nisadevs == 0)
- aiop_size = 0x44;
- else
- aiop_size = 0x40;
- CtlP->io[i] = bus_alloc_resource(CtlP->dev, SYS_RES_IOPORT, &CtlP->io_rid[i], aiop_base, aiop_base + aiop_size - 1, aiop_size, RF_ACTIVE);
- } else
- aiop_base = rman_get_start(CtlP->io[i]);
- rp_writeio1(MudbacCtlP,ISACTL(CtlP)->MBaseIO,
- ISACTL(CtlP)->MReg2IO,
- ISACTL(CtlP)->MReg2 | (i & 0x03)); /* AIOP index */
- rp_writeio1(MudbacCtlP,ISACTL(CtlP)->MBaseIO,
- ISACTL(CtlP)->MReg0IO,
- (Byte_t)(aiop_base >> 6)); /* set up AIOP I/O in MUDBAC */
- sEnAiop(MudbacCtlP,CtlP,i); /* enable the AIOP */
-
- CtlP->AiopID[i] = sReadAiopID(CtlP, i); /* read AIOP ID */
- if(CtlP->AiopID[i] == AIOPID_NULL) /* if AIOP does not exist */
- {
- sDisAiop(MudbacCtlP,CtlP,i); /* disable AIOP */
- bus_release_resource(CtlP->dev, SYS_RES_IOPORT, CtlP->io_rid[i], CtlP->io[i]);
- CtlP->io[i] = NULL;
- break; /* done looking for AIOPs */
- }
-
- CtlP->AiopNumChan[i] = sReadAiopNumChan(CtlP, i); /* num channels in AIOP */
- rp_writeaiop2(CtlP,i,_INDX_ADDR,_CLK_PRE); /* clock prescaler */
- rp_writeaiop1(CtlP,i,_INDX_DATA,CLOCK_PRESC);
- CtlP->NumAiop++; /* bump count of AIOPs */
- sDisAiop(MudbacCtlP,CtlP,i); /* disable AIOP */
- }
-
- if(CtlP->NumAiop == 0)
- return(-1);
- else
- return(CtlP->NumAiop);
-}
-
-/*
- * ARGSUSED
- * Maps (aiop, offset) to rid.
- */
-static int
-rp_isa_aiop2rid(int aiop, int offset)
-{
- /* rid equals to aiop for an ISA controller. */
- return aiop;
-}
-
-/*
- * ARGSUSED
- * Maps (aiop, offset) to the offset of resource.
- */
-static int
-rp_isa_aiop2off(int aiop, int offset)
-{
- /* Each aiop has its own resource. */
- return offset;
-}
-
-/* Read the int status for an ISA controller. */
-unsigned char
-rp_isa_ctlmask(CONTROLLER_t *ctlp)
-{
- return sGetControllerIntStatus(rp_controller,ctlp);
-}
-
-static device_method_t rp_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, rp_probe),
- DEVMETHOD(device_attach, rp_attach),
-
- { 0, 0 }
-};
-
-static driver_t rp_driver = {
- "rp",
- rp_methods,
- sizeof(CONTROLLER_t),
-};
-
-/*
- * rp can be attached to an isa bus.
- */
-DRIVER_MODULE(rp, isa, rp_driver, rp_devclass, 0, 0);
diff --git a/sys/dev/rp/rp_pci.c b/sys/dev/rp/rp_pci.c
deleted file mode 100644
index fa25dea4f6f2..000000000000
--- a/sys/dev/rp/rp_pci.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * Copyright (c) Comtrol Corporation <support@comtrol.com>
- * All rights reserved.
- *
- * PCI-specific part separated from:
- * sys/i386/isa/rp.c,v 1.33 1999/09/28 11:45:27 phk Exp
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted prodived that the follwoing conditions
- * are met.
- * 1. Redistributions of source code must retain the above copyright
- * notive, this list of conditions and the following disclainer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials prodided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Comtrol Corporation.
- * 4. The name of Comtrol Corporation may not be used to endorse or
- * promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY COMTROL CORPORATION ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL COMTROL CORPORATION BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/fcntl.h>
-#include <sys/malloc.h>
-#include <sys/tty.h>
-#include <sys/conf.h>
-#include <sys/kernel.h>
-#include <machine/resource.h>
-#include <machine/bus.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#define ROCKET_C
-#include <dev/rp/rpreg.h>
-#include <dev/rp/rpvar.h>
-
-#include <pci/pcireg.h>
-#include <pci/pcivar.h>
-
-/* PCI IDs */
-#define RP_VENDOR_ID 0x11FE
-#define RP_DEVICE_ID_32I 0x0001
-#define RP_DEVICE_ID_8I 0x0002
-#define RP_DEVICE_ID_16I 0x0003
-#define RP_DEVICE_ID_4Q 0x0004
-#define RP_DEVICE_ID_8O 0x0005
-#define RP_DEVICE_ID_8J 0x0006
-#define RP_DEVICE_ID_4J 0x0007
-#define RP_DEVICE_ID_6M 0x000C
-#define RP_DEVICE_ID_4M 0x000D
-
-/**************************************************************************
- MUDBAC remapped for PCI
-**************************************************************************/
-
-#define _CFG_INT_PCI 0x40
-#define _PCI_INT_FUNC 0x3A
-
-#define PCI_STROB 0x2000
-#define INTR_EN_PCI 0x0010
-
-/***************************************************************************
-Function: sPCIControllerEOI
-Purpose: Strobe the MUDBAC's End Of Interrupt bit.
-Call: sPCIControllerEOI(CtlP)
- CONTROLLER_T *CtlP; Ptr to controller structure
-*/
-#define sPCIControllerEOI(CtlP) rp_writeio2(CtlP, 0, _PCI_INT_FUNC, PCI_STROB)
-
-/***************************************************************************
-Function: sPCIGetControllerIntStatus
-Purpose: Get the controller interrupt status
-Call: sPCIGetControllerIntStatus(CtlP)
- CONTROLLER_T *CtlP; Ptr to controller structure
-Return: Byte_t: The controller interrupt status in the lower 4
- bits. Bits 0 through 3 represent AIOP's 0
- through 3 respectively. If a bit is set that
- AIOP is interrupting. Bits 4 through 7 will
- always be cleared.
-*/
-#define sPCIGetControllerIntStatus(CTLP) ((rp_readio2(CTLP, 0, _PCI_INT_FUNC) >> 8) & 0x1f)
-
-static devclass_t rp_devclass;
-
-static int rp_pciprobe(device_t dev);
-static int rp_pciattach(device_t dev);
-#if notdef
-static int rp_pcidetach(device_t dev);
-static int rp_pcishutdown(device_t dev);
-#endif /* notdef */
-static void rp_pcireleaseresource(CONTROLLER_t *ctlp);
-static int sPCIInitController( CONTROLLER_t *CtlP,
- int AiopNum,
- int IRQNum,
- Byte_t Frequency,
- int PeriodicOnly,
- int VendorDevice);
-static rp_aiop2rid_t rp_pci_aiop2rid;
-static rp_aiop2off_t rp_pci_aiop2off;
-static rp_ctlmask_t rp_pci_ctlmask;
-
-/*
- * The following functions are the pci-specific part
- * of rp driver.
- */
-
-static int
-rp_pciprobe(device_t dev)
-{
- char *s;
-
- s = NULL;
- if ((pci_get_devid(dev) & 0xffff) == RP_VENDOR_ID)
- s = "RocketPort PCI";
-
- if (s != NULL) {
- device_set_desc(dev, s);
- return (0);
- }
-
- return (ENXIO);
-}
-
-static int
-rp_pciattach(device_t dev)
-{
- int num_ports, num_aiops;
- int aiop;
- CONTROLLER_t *ctlp;
- int unit;
- int retval;
- u_int32_t stcmd;
-
- ctlp = device_get_softc(dev);
- bzero(ctlp, sizeof(*ctlp));
- ctlp->dev = dev;
- unit = device_get_unit(dev);
- ctlp->aiop2rid = rp_pci_aiop2rid;
- ctlp->aiop2off = rp_pci_aiop2off;
- ctlp->ctlmask = rp_pci_ctlmask;
-
- /* Wake up the device. */
- stcmd = pci_read_config(dev, PCIR_COMMAND, 4);
- if ((stcmd & PCIM_CMD_PORTEN) == 0) {
- stcmd |= (PCIM_CMD_PORTEN);
- pci_write_config(dev, PCIR_COMMAND, 4, stcmd);
- }
-
- /* The IO ports of AIOPs for a PCI controller are continuous. */
- ctlp->io_num = 1;
- ctlp->io_rid = malloc(sizeof(*(ctlp->io_rid)) * ctlp->io_num, M_DEVBUF, M_NOWAIT | M_ZERO);
- ctlp->io = malloc(sizeof(*(ctlp->io)) * ctlp->io_num, M_DEVBUF, M_NOWAIT | M_ZERO);
- if (ctlp->io_rid == NULL || ctlp->io == NULL) {
- device_printf(dev, "rp_pciattach: Out of memory.\n");
- retval = ENOMEM;
- goto nogo;
- }
-
- ctlp->bus_ctlp = NULL;
-
- ctlp->io_rid[0] = 0x10;
- ctlp->io[0] = bus_alloc_resource(dev, SYS_RES_IOPORT, &ctlp->io_rid[0], 0, ~0, 1, RF_ACTIVE);
- if(ctlp->io[0] == NULL) {
- device_printf(dev, "ioaddr mapping failed for RocketPort(PCI).\n");
- retval = ENXIO;
- goto nogo;
- }
-
- num_aiops = sPCIInitController(ctlp,
- MAX_AIOPS_PER_BOARD, 0,
- FREQ_DIS, 0, (pci_get_devid(dev) >> 16) & 0xffff);
-
- num_ports = 0;
- for(aiop=0; aiop < num_aiops; aiop++) {
- sResetAiopByNum(ctlp, aiop);
- num_ports += sGetAiopNumChan(ctlp, aiop);
- }
-
- retval = rp_attachcommon(ctlp, num_aiops, num_ports);
- if (retval != 0)
- goto nogo;
-
- return (0);
-
-nogo:
- rp_pcireleaseresource(ctlp);
-
- return (retval);
-}
-
-#if notdef
-static int
-rp_pcidetach(device_t dev)
-{
- CONTROLLER_t *ctlp;
-
- if (device_get_state(dev) == DS_BUSY)
- return (EBUSY);
-
- ctlp = device_get_softc(dev);
-
- rp_pcireleaseresource(ctlp);
-
- return (0);
-}
-
-static int
-rp_pcishutdown(device_t dev)
-{
- CONTROLLER_t *ctlp;
-
- if (device_get_state(dev) == DS_BUSY)
- return (EBUSY);
-
- ctlp = device_get_softc(dev);
-
- rp_pcireleaseresource(ctlp);
-
- return (0);
-}
-#endif /* notdef */
-
-static void
-rp_pcireleaseresource(CONTROLLER_t *ctlp)
-{
- rp_releaseresource(ctlp);
-
- if (ctlp->io != NULL) {
- if (ctlp->io[0] != NULL)
- bus_release_resource(ctlp->dev, SYS_RES_IOPORT, ctlp->io_rid[0], ctlp->io[0]);
- free(ctlp->io, M_DEVBUF);
- }
- if (ctlp->io_rid != NULL)
- free(ctlp->io_rid, M_DEVBUF);
-}
-
-static int
-sPCIInitController( CONTROLLER_t *CtlP,
- int AiopNum,
- int IRQNum,
- Byte_t Frequency,
- int PeriodicOnly,
- int VendorDevice)
-{
- int i;
-
- CtlP->CtlID = CTLID_0001; /* controller release 1 */
-
- sPCIControllerEOI(CtlP);
-
- /* Init AIOPs */
- CtlP->NumAiop = 0;
- for(i=0; i < AiopNum; i++)
- {
- /*device_printf(CtlP->dev, "aiop %d.\n", i);*/
- CtlP->AiopID[i] = sReadAiopID(CtlP, i); /* read AIOP ID */
- /*device_printf(CtlP->dev, "ID = %d.\n", CtlP->AiopID[i]);*/
- if(CtlP->AiopID[i] == AIOPID_NULL) /* if AIOP does not exist */
- {
- break; /* done looking for AIOPs */
- }
-
- switch( VendorDevice ) {
- case RP_DEVICE_ID_4Q:
- case RP_DEVICE_ID_4J:
- case RP_DEVICE_ID_4M:
- CtlP->AiopNumChan[i] = 4;
- break;
- case RP_DEVICE_ID_6M:
- CtlP->AiopNumChan[i] = 6;
- break;
- case RP_DEVICE_ID_8O:
- case RP_DEVICE_ID_8J:
- case RP_DEVICE_ID_8I:
- case RP_DEVICE_ID_16I:
- case RP_DEVICE_ID_32I:
- CtlP->AiopNumChan[i] = 8;
- break;
- default:
-#if notdef
- CtlP->AiopNumChan[i] = 8;
-#else
- CtlP->AiopNumChan[i] = sReadAiopNumChan(CtlP, i);
-#endif /* notdef */
- break;
- }
- /*device_printf(CtlP->dev, "%d channels.\n", CtlP->AiopNumChan[i]);*/
- rp_writeaiop2(CtlP, i, _INDX_ADDR,_CLK_PRE); /* clock prescaler */
- /*device_printf(CtlP->dev, "configuring clock prescaler.\n");*/
- rp_writeaiop1(CtlP, i, _INDX_DATA,CLOCK_PRESC);
- /*device_printf(CtlP->dev, "configured clock prescaler.\n");*/
- CtlP->NumAiop++; /* bump count of AIOPs */
- }
-
- if(CtlP->NumAiop == 0)
- return(-1);
- else
- return(CtlP->NumAiop);
-}
-
-/*
- * ARGSUSED
- * Maps (aiop, offset) to rid.
- */
-static int
-rp_pci_aiop2rid(int aiop, int offset)
-{
- /* Always return zero for a PCI controller. */
- return 0;
-}
-
-/*
- * ARGSUSED
- * Maps (aiop, offset) to the offset of resource.
- */
-static int
-rp_pci_aiop2off(int aiop, int offset)
-{
- /* Each AIOP reserves 0x40 bytes. */
- return aiop * 0x40 + offset;
-}
-
-/* Read the int status for a PCI controller. */
-unsigned char
-rp_pci_ctlmask(CONTROLLER_t *ctlp)
-{
- return sPCIGetControllerIntStatus(ctlp);
-}
-
-static device_method_t rp_pcimethods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, rp_pciprobe),
- DEVMETHOD(device_attach, rp_pciattach),
-#if notdef
- DEVMETHOD(device_detach, rp_pcidetach),
- DEVMETHOD(device_shutdown, rp_pcishutdown),
-#endif /* notdef */
-
- { 0, 0 }
-};
-
-static driver_t rp_pcidriver = {
- "rp",
- rp_pcimethods,
- sizeof(CONTROLLER_t),
-};
-
-/*
- * rp can be attached to a pci bus.
- */
-DRIVER_MODULE(rp, pci, rp_pcidriver, rp_devclass, 0, 0);
diff --git a/sys/dev/rp/rpreg.h b/sys/dev/rp/rpreg.h
deleted file mode 100644
index a7cde1b03a25..000000000000
--- a/sys/dev/rp/rpreg.h
+++ /dev/null
@@ -1,1015 +0,0 @@
-/*
- * Copyright (c) Comtrol Corporation <support@comtrol.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted prodived that the follwoing conditions
- * are met.
- * 1. Redistributions of source code must retain the above copyright
- * notive, this list of conditions and the following disclainer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials prodided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Comtrol Corporation.
- * 4. The name of Comtrol Corporation may not be used to endorse or
- * promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY COMTROL CORPORATION ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL COMTROL CORPORATION BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Begin OS-specific defines - rpreg.h - for RocketPort FreeBSD
- */
-
-typedef unsigned char Byte_t;
-typedef unsigned int ByteIO_t;
-
-typedef unsigned int Word_t;
-typedef unsigned int WordIO_t;
-
-typedef unsigned long DWord_t;
-typedef unsigned int DWordIO_t;
-
-#define rp_readio(size, ctlp, rid, offset) \
- (bus_space_read_##size(rman_get_bustag(ctlp->io[rid]), rman_get_bushandle(ctlp->io[rid]), offset))
-#define rp_readmultiio(size, ctlp, rid, offset, addr, count) \
- (bus_space_read_multi_##size(rman_get_bustag(ctlp->io[rid]), rman_get_bushandle(ctlp->io[rid]), offset, addr, count))
-#define rp_writeio(size, ctlp, rid, offset, data) \
- (bus_space_write_##size(rman_get_bustag(ctlp->io[rid]), rman_get_bushandle(ctlp->io[rid]), offset, data))
-#define rp_writemultiio(size, ctlp, rid, offset, addr, count) \
- (bus_space_write_multi_##size(rman_get_bustag(ctlp->io[rid]), rman_get_bushandle(ctlp->io[rid]), offset, addr, count))
-
-#define rp_readio1(ctlp, rid, offset) rp_readio(1, ctlp, rid, offset)
-#define rp_readio2(ctlp, rid, offset) rp_readio(2, ctlp, rid, offset)
-#define rp_readio4(ctlp, rid, offset) rp_readio(4, ctlp, rid, offset)
-#define rp_writeio1(ctlp, rid, offset, data) rp_writeio(1, ctlp, rid, offset, data)
-#define rp_writeio2(ctlp, rid, offset, data) rp_writeio(2, ctlp, rid, offset, data)
-#define rp_writeio4(ctlp, rid, offset, data) rp_writeio(4, ctlp, rid, offset, data)
-#define rp_readmultiio1(ctlp, rid, offset, addr, count) rp_readmultiio(1, ctlp, rid, offset, addr, count)
-#define rp_readmultiio2(ctlp, rid, offset, addr, count) rp_readmultiio(2, ctlp, rid, offset, addr, count)
-#define rp_readmultiio4(ctlp, rid, offset, addr, count) rp_readmultiio(4, ctlp, rid, offset, addr, count)
-#define rp_writemultiio1(ctlp, rid, offset, addr, count) rp_writemultiio(1, ctlp, rid, offset, addr, count)
-#define rp_writemultiio2(ctlp, rid, offset, addr, count) rp_writemultiio(2, ctlp, rid, offset, addr, count)
-#define rp_writemultiio4(ctlp, rid, offset, addr, count) rp_writemultiio(4, ctlp, rid, offset, addr, count)
-
-#define rp_readaiop1(ctlp, aiop, offset) \
- (rp_readio1((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset)))
-#define rp_readaiop2(ctlp, aiop, offset) \
- (rp_readio2((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset)))
-#define rp_readaiop4(ctlp, aiop, offset) \
- (rp_readio4((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset)))
-#define rp_readmultiaiop1(ctlp, aiop, offset, addr, count) \
- (rp_readmultiio1((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset), addr, count))
-#define rp_readmultiaiop2(ctlp, aiop, offset, addr, count) \
- (rp_readmultiio2((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset), addr, count))
-#define rp_readmultiaiop4(ctlp, aiop, offset, addr, count) \
- (rp_readmultiio4((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset), addr, count))
-#define rp_writeaiop1(ctlp, aiop, offset, data) \
- (rp_writeio1((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset), data))
-#define rp_writeaiop2(ctlp, aiop, offset, data) \
- (rp_writeio2((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset), data))
-#define rp_writeaiop4(ctlp, aiop, offset, data) \
- (rp_writeio4((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset), data))
-#define rp_writemultiaiop1(ctlp, aiop, offset, addr, count) \
- (rp_writemultiio1((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset), addr, count))
-#define rp_writemultiaiop2(ctlp, aiop, offset, addr, count) \
- (rp_writemultiio2((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset), addr, count))
-#define rp_writemultiaiop4(ctlp, aiop, offset, addr, count) \
- (rp_writemultiio4((ctlp), (ctlp)->aiop2rid(aiop, offset), (ctlp)->aiop2off(aiop, offset), addr, count))
-
-#define rp_readch1(chp, offset) \
- (rp_readaiop1((chp)->CtlP, (chp)->AiopNum, offset))
-#define rp_readch2(chp, offset) \
- (rp_readaiop2((chp)->CtlP, (chp)->AiopNum, offset))
-#define rp_readch4(chp, offset) \
- (rp_readaiop4((chp)->CtlP, (chp)->AiopNum, offset))
-#define rp_readmultich1(chp, offset, addr, count) \
- (rp_readmultiaiop1((chp)->CtlP, (chp)->AiopNum, offset, addr, count))
-#define rp_readmultich2(chp, offset, addr, count) \
- (rp_readmultiaiop2((chp)->CtlP, (chp)->AiopNum, offset, addr, count))
-#define rp_readmultich4(chp, offset, addr, count) \
- (rp_readmultiaiop4((chp)->CtlP, (chp)->AiopNum, offset, addr, count))
-#define rp_writech1(chp, offset, data) \
- (rp_writeaiop1((chp)->CtlP, (chp)->AiopNum, offset, data))
-#define rp_writech2(chp, offset, data) \
- (rp_writeaiop2((chp)->CtlP, (chp)->AiopNum, offset, data))
-#define rp_writech4(chp, offset, data) \
- (rp_writeaiop4((chp)->CtlP, (chp)->AiopNum, offset, data))
-#define rp_writemultich1(chp, offset, addr, count) \
- (rp_writemultiaiop1((chp)->CtlP, (chp)->AiopNum, offset, addr, count))
-#define rp_writemultich2(chp, offset, addr, count) \
- (rp_writemultiaiop2((chp)->CtlP, (chp)->AiopNum, offset, addr, count))
-#define rp_writemultich4(chp, offset, addr, count) \
- (rp_writemultiaiop4((chp)->CtlP, (chp)->AiopNum, offset, addr, count))
-
-/*
- * End of OS-specific defines
- */
-
-#define ROCKET_H
-
-#define CTL_SIZE 4
-#define AIOP_CTL_SIZE 4
-#define CHAN_AIOP_SIZE 8
-#define MAX_PORTS_PER_AIOP 8
-#define MAX_AIOPS_PER_BOARD 4
-#define MAX_PORTS_PER_BOARD 32
-
-/* Controller ID numbers */
-#define CTLID_NULL -1 /* no controller exists */
-#define CTLID_0001 0x0001 /* controller release 1 */
-
-/* AIOP ID numbers, identifies AIOP type implementing channel */
-#define AIOPID_NULL -1 /* no AIOP or channel exists */
-#define AIOPID_0001 0x0001 /* AIOP release 1 */
-
-#define NULLDEV -1 /* identifies non-existant device */
-#define NULLCTL -1 /* identifies non-existant controller */
-#define NULLCTLPTR (CONTROLLER_T *)0 /* identifies non-existant controller */
-#define NULLAIOP -1 /* identifies non-existant AIOP */
-#define NULLCHAN -1 /* identifies non-existant channel */
-
-/************************************************************************
- Global Register Offsets - Direct Access - Fixed values
-************************************************************************/
-
-#define _CMD_REG 0x38 /* Command Register 8 Write */
-#define _INT_CHAN 0x39 /* Interrupt Channel Register 8 Read */
-#define _INT_MASK 0x3A /* Interrupt Mask Register 8 Read / Write */
-#define _UNUSED 0x3B /* Unused 8 */
-#define _INDX_ADDR 0x3C /* Index Register Address 16 Write */
-#define _INDX_DATA 0x3E /* Index Register Data 8/16 Read / Write */
-
-/************************************************************************
- Channel Register Offsets for 1st channel in AIOP - Direct Access
-************************************************************************/
-#define _TD0 0x00 /* Transmit Data 16 Write */
-#define _RD0 0x00 /* Receive Data 16 Read */
-#define _CHN_STAT0 0x20 /* Channel Status 8/16 Read / Write */
-#define _FIFO_CNT0 0x10 /* Transmit/Receive FIFO Count 16 Read */
-#define _INT_ID0 0x30 /* Interrupt Identification 8 Read */
-
-/************************************************************************
- Tx Control Register Offsets - Indexed - External - Fixed
-************************************************************************/
-#define _TX_ENBLS 0x980 /* Tx Processor Enables Register 8 Read / Write */
-#define _TXCMP1 0x988 /* Transmit Compare Value #1 8 Read / Write */
-#define _TXCMP2 0x989 /* Transmit Compare Value #2 8 Read / Write */
-#define _TXREP1B1 0x98A /* Tx Replace Value #1 - Byte 1 8 Read / Write */
-#define _TXREP1B2 0x98B /* Tx Replace Value #1 - Byte 2 8 Read / Write */
-#define _TXREP2 0x98C /* Transmit Replace Value #2 8 Read / Write */
-
-/************************************************************************
- Receive FIFO
-************************************************************************/
-#define RXFIFO_DATA 0x5f
-#define RXFIFO_OUT 0x5c
-#define RXFIFO_EN 0x08
-#define RXFIFO_DIS 0xa7
-
-/************************************************************************
-Memory Controller Register Offsets - Indexed - External - Fixed
-************************************************************************/
-#define _RX_FIFO 0x000 /* Rx FIFO */
-#define _TX_FIFO 0x800 /* Tx FIFO */
-#define _RXF_OUTP 0x990 /* Rx FIFO OUT pointer 16 Read / Write */
-#define _RXF_INP 0x992 /* Rx FIFO IN pointer 16 Read / Write */
-#define _TXF_OUTP 0x994 /* Tx FIFO OUT pointer 8 Read / Write */
-#define _TXF_INP 0x995 /* Tx FIFO IN pointer 8 Read / Write */
-#define _TXP_CNT 0x996 /* Tx Priority Count 8 Read / Write */
-#define _TXP_PNTR 0x997 /* Tx Priority Pointer 8 Read / Write */
-
-#define PRI_PEND 0x80 /* Priority data pending (bit7, Tx pri cnt) */
-#define TXFIFO_SIZE 255 /* size of Tx FIFO */
-#define RXFIFO_SIZE 1023 /* size of Rx FIFO */
-
-/************************************************************************
-Tx Priority Buffer - Indexed - External - Fixed
-************************************************************************/
-#define _TXP_BUF 0x9C0 /* Tx Priority Buffer 32 Bytes Read / Write */
-#define TXP_SIZE 0x20 /* 32 bytes */
-
-/************************************************************************
-Channel Register Offsets - Indexed - Internal - Fixed
-************************************************************************/
-
-#define _TX_CTRL 0xFF0 /* Transmit Control 16 Write */
-#define _RX_CTRL 0xFF2 /* Receive Control 8 Write */
-#define _BAUD 0xFF4 /* Baud Rate 16 Write */
-#define _CLK_PRE 0xFF6 /* Clock Prescaler 8 Write */
-
-#define CLOCK_PRESC 0x19 /* mod 9 (divide by 10) prescale */
-
-#define BRD50 4607
-#define BRD75 3071
-#define BRD110 2094
-#define BRD134 1712
-#define BRD150 1535
-#define BRD200 1151
-#define BRD300 767
-#define BRD600 383
-#define BRD1200 191
-#define BRD1800 127
-#define BRD2000 114
-#define BRD2400 95
-#define BRD3600 64
-#define BRD4800 47
-#define BRD7200 31
-#define BRD9600 23
-#define BRD14400 15
-#define BRD19200 11
-#define BRD38400 5
-#define BRD57600 3
-#define BRD76800 2
-#define BRD115200 1
-#define BRD230400 0
-
-#define STMBREAK 0x08 /* BREAK */
-#define STMFRAME 0x04 /* framing error */
-#define STMRCVROVR 0x02 /* receiver over run error */
-#define STMPARITY 0x01 /* parity error */
-#define STMERROR (STMBREAK | STMFRAME | STMPARITY)
-#define STMBREAKH 0x800 /* BREAK */
-#define STMFRAMEH 0x400 /* framing error */
-#define STMRCVROVRH 0x200 /* receiver over run error */
-#define STMPARITYH 0x100 /* parity error */
-#define STMERRORH (STMBREAKH | STMFRAMEH | STMPARITYH)
-
-#define CTS_ACT 0x20 /* CTS input asserted */
-#define DSR_ACT 0x10 /* DSR input asserted */
-#define CD_ACT 0x08 /* CD input asserted */
-#define TXFIFOMT 0x04 /* Tx FIFO is empty */
-#define TXSHRMT 0x02 /* Tx shift register is empty */
-#define RDA 0x01 /* Rx data available */
-#define DRAINED (TXFIFOMT | TXSHRMT) /* indicates Tx is drained */
-
-#define STATMODE 0x8000 /* status mode enable bit */
-#define RXFOVERFL 0x2000 /* receive FIFO overflow */
-#define RX2MATCH 0x1000 /* receive compare byte 2 match */
-#define RX1MATCH 0x0800 /* receive compare byte 1 match */
-#define RXBREAK 0x0400 /* received BREAK */
-#define RXFRAME 0x0200 /* received framing error */
-#define RXPARITY 0x0100 /* received parity error */
-#define STATERROR (RXBREAK | RXFRAME | RXPARITY)
-
-#define CTSFC_EN 0x80 /* CTS flow control enable bit */
-#define RTSTOG_EN 0x40 /* RTS toggle enable bit */
-#define TXINT_EN 0x10 /* transmit interrupt enable */
-#define STOP2 0x08 /* enable 2 stop bits (0 = 1 stop) */
-#define PARITY_EN 0x04 /* enable parity (0 = no parity) */
-#define EVEN_PAR 0x02 /* even parity (0 = odd parity) */
-#define DATA8BIT 0x01 /* 8 bit data (0 = 7 bit data) */
-
-#define SETBREAK 0x10 /* send break condition (must clear) */
-#define LOCALLOOP 0x08 /* local loopback set for test */
-#define SET_DTR 0x04 /* assert DTR */
-#define SET_RTS 0x02 /* assert RTS */
-#define TX_ENABLE 0x01 /* enable transmitter */
-
-#define RTSFC_EN 0x40 /* RTS flow control enable */
-#define RXPROC_EN 0x20 /* receive processor enable */
-#define TRIG_NO 0x00 /* Rx FIFO trigger level 0 (no trigger) */
-#define TRIG_1 0x08 /* trigger level 1 char */
-#define TRIG_1_2 0x10 /* trigger level 1/2 */
-#define TRIG_7_8 0x18 /* trigger level 7/8 */
-#define TRIG_MASK 0x18 /* trigger level mask */
-#define SRCINT_EN 0x04 /* special Rx condition interrupt enable */
-#define RXINT_EN 0x02 /* Rx interrupt enable */
-#define MCINT_EN 0x01 /* modem change interrupt enable */
-
-#define RXF_TRIG 0x20 /* Rx FIFO trigger level interrupt */
-#define TXFIFO_MT 0x10 /* Tx FIFO empty interrupt */
-#define SRC_INT 0x08 /* special receive condition interrupt */
-#define DELTA_CD 0x04 /* CD change interrupt */
-#define DELTA_CTS 0x02 /* CTS change interrupt */
-#define DELTA_DSR 0x01 /* DSR change interrupt */
-
-#define REP1W2_EN 0x10 /* replace byte 1 with 2 bytes enable */
-#define IGN2_EN 0x08 /* ignore byte 2 enable */
-#define IGN1_EN 0x04 /* ignore byte 1 enable */
-#define COMP2_EN 0x02 /* compare byte 2 enable */
-#define COMP1_EN 0x01 /* compare byte 1 enable */
-
-#define RESET_ALL 0x80 /* reset AIOP (all channels) */
-#define TXOVERIDE 0x40 /* Transmit software off override */
-#define RESETUART 0x20 /* reset channel's UART */
-#define RESTXFCNT 0x10 /* reset channel's Tx FIFO count register */
-#define RESRXFCNT 0x08 /* reset channel's Rx FIFO count register */
-
-#define INTSTAT0 0x01 /* AIOP 0 interrupt status */
-#define INTSTAT1 0x02 /* AIOP 1 interrupt status */
-#define INTSTAT2 0x04 /* AIOP 2 interrupt status */
-#define INTSTAT3 0x08 /* AIOP 3 interrupt status */
-
-#define INTR_EN 0x08 /* allow interrupts to host */
-#define INT_STROB 0x04 /* strobe and clear interrupt line (EOI) */
-
-#define CHAN3_EN 0x08 /* enable AIOP 3 */
-#define CHAN2_EN 0x04 /* enable AIOP 2 */
-#define CHAN1_EN 0x02 /* enable AIOP 1 */
-#define CHAN0_EN 0x01 /* enable AIOP 0 */
-#define FREQ_DIS 0x00
-#define FREQ_274HZ 0x60
-#define FREQ_137HZ 0x50
-#define FREQ_69HZ 0x40
-#define FREQ_34HZ 0x30
-#define FREQ_17HZ 0x20
-#define FREQ_9HZ 0x10
-#define PERIODIC_ONLY 0x80 /* only PERIODIC interrupt */
-
-#define CHANINT_EN 0x0100 /* flags to enable/disable channel ints */
-
-#define RDATASIZE 72
-#define RREGDATASIZE 52
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-struct CONTROLLER_str;
-struct CHANNEL_str;
-
-/* The types of bus-specific methods */
-typedef int rp_aiop2rid_t(int, int);
-typedef int rp_aiop2off_t(int, int);
-typedef unsigned char rp_ctlmask_t(struct CONTROLLER_str *);
-
-/* Controller level information structure */
-struct CONTROLLER_str
-{
- int CtlID;
- int NumAiop;
- int AiopID[AIOP_CTL_SIZE];
- int AiopNumChan[AIOP_CTL_SIZE];
-
- /* Device and resource management */
- device_t dev; /* device */
- int io_num; /* Number of IO resources */
- int *io_rid; /* IO resource IDs */
- struct resource **io; /* IO resources */
-
- struct rp_port *rp; /* port */
- struct tty *tty; /* tty */
-
- /* Device nodes */
- dev_t *dev_nodes;
-
- /* Bus-specific properties */
- void *bus_ctlp;
-
- /* Bus-specific methods */
- rp_aiop2rid_t *aiop2rid; /* (aiop, offset) -> rid */
- rp_aiop2off_t *aiop2off; /* (aiop, offset) -> off */
- rp_ctlmask_t *ctlmask; /* Int status */
-};
-typedef struct CONTROLLER_str CONTROLLER_T;
-typedef CONTROLLER_T CONTROLLER_t;
-
-/* Channel level information structure */
-struct CHANNEL_str
-{
- CONTROLLER_t *CtlP;
- int AiopNum;
- int ChanID;
- int ChanNum;
-
- Word_t TxFIFO;
- Word_t TxFIFOPtrs;
- Word_t RxFIFO;
- Word_t RxFIFOPtrs;
- Word_t TxPrioCnt;
- Word_t TxPrioPtr;
- Word_t TxPrioBuf;
-
- Byte_t R[RREGDATASIZE];
-
- Byte_t BaudDiv[4];
- Byte_t TxControl[4];
- Byte_t RxControl[4];
- Byte_t TxEnables[4];
- Byte_t TxCompare[4];
- Byte_t TxReplace1[4];
- Byte_t TxReplace2[4];
-};
-
-typedef struct CHANNEL_str CHANNEL_T;
-typedef CHANNEL_T CHANNEL_t;
-typedef CHANNEL_T * CHANPTR_T;
-
-#define CHNOFF_TXRXDATA(chp) ((chp)->ChanNum * 2 + _TD0)
-#define CHNOFF_CHANSTAT(chp) ((chp)->ChanNum * 2 + _CHN_STAT0)
-#define CHNOFF_TXRXCOUNT(chp) ((chp)->ChanNum * 2 + _FIFO_CNT0)
-#define CHNOFF_INTID(chp) ((chp)->ChanNum + _INT_ID0)
-
-/***************************************************************************
-Function: sClrBreak
-Purpose: Stop sending a transmit BREAK signal
-Call: sClrBreak(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sClrBreak(ChP) \
-{ \
- (ChP)->TxControl[3] &= ~SETBREAK; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sClrDTR
-Purpose: Clr the DTR output
-Call: sClrDTR(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sClrDTR(ChP) \
-{ \
- (ChP)->TxControl[3] &= ~SET_DTR; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sClrRTS
-Purpose: Clr the RTS output
-Call: sClrRTS(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sClrRTS(ChP) \
-{ \
- (ChP)->TxControl[3] &= ~SET_RTS; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sClrTxXOFF
-Purpose: Clear any existing transmit software flow control off condition
-Call: sClrTxXOFF(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sClrTxXOFF(ChP) \
-{ \
- rp_writech1(ChP,_CMD_REG,TXOVERIDE | (Byte_t)(ChP)->ChanNum); \
- rp_writech1(ChP,_CMD_REG,(Byte_t)(ChP)->ChanNum); \
-}
-
-/***************************************************************************
-Function: sDisCTSFlowCtl
-Purpose: Disable output flow control using CTS
-Call: sDisCTSFlowCtl(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sDisCTSFlowCtl(ChP) \
-{ \
- (ChP)->TxControl[2] &= ~CTSFC_EN; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: DisParity
-Purpose: Disable parity
-Call: sDisParity(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Comments: Function sSetParity() can be used in place of functions sEnParity(),
- sDisParity(), sSetOddParity(), and sSetEvenParity().
-*/
-#define sDisParity(ChP) \
-{ \
- (ChP)->TxControl[2] &= ~PARITY_EN; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sDisRxFIFO
-Purpose: Disable Rx FIFO
-Call: sDisRxFIFO(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sDisRxFIFO(ChP) \
-{ \
- (ChP)->R[0x32] = 0x0a; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->R[0x30]); \
-}
-
-/***************************************************************************
-Function: sDisRxStatusMode
-Purpose: Disable the Rx status mode
-Call: sDisRxStatusMode(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Comments: This takes the channel out of the receive status mode. All
- subsequent reads of receive data using sReadRxWord() will return
- two data bytes.
-*/
-#define sDisRxStatusMode(ChP) rp_writech2(ChP,CHNOFF_CHANSTAT(ChP),0)
-
-/***************************************************************************
-Function: sDisTransmit
-Purpose: Disable transmit
-Call: sDisTransmit(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
- This disables movement of Tx data from the Tx FIFO into the 1 byte
- Tx buffer. Therefore there could be up to a 2 byte latency
- between the time sDisTransmit() is called and the transmit buffer
- and transmit shift register going completely empty.
-*/
-#define sDisTransmit(ChP) \
-{ \
- (ChP)->TxControl[3] &= ~TX_ENABLE; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sDisTxSoftFlowCtl
-Purpose: Disable Tx Software Flow Control
-Call: sDisTxSoftFlowCtl(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sDisTxSoftFlowCtl(ChP) \
-{ \
- (ChP)->R[0x06] = 0x8a; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->R[0x04]); \
-}
-
-/***************************************************************************
-Function: sEnCTSFlowCtl
-Purpose: Enable output flow control using CTS
-Call: sEnCTSFlowCtl(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sEnCTSFlowCtl(ChP) \
-{ \
- (ChP)->TxControl[2] |= CTSFC_EN; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: EnParity
-Purpose: Enable parity
-Call: sEnParity(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Comments: Function sSetParity() can be used in place of functions sEnParity(),
- sDisParity(), sSetOddParity(), and sSetEvenParity().
-
-Warnings: Before enabling parity odd or even parity should be chosen using
- functions sSetOddParity() or sSetEvenParity().
-*/
-#define sEnParity(ChP) \
-{ \
- (ChP)->TxControl[2] |= PARITY_EN; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sEnRTSFlowCtl
-Return: void
-*/
-#define sEnRTSFlowCtl(ChP) \
-{ \
- (ChP)->TxControl[2] &= ~RTSTOG_EN; \
- (ChP)->TxControl[3] &= ~SET_RTS; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
- (ChP)->RxControl[2] |= RTSFC_EN; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->RxControl[0]); \
-}
-
-/***************************************************************************
-Function: sDisRTSFlowCtl
-Return: void
-*/
-#define sDisRTSFlowCtl(ChP) \
-{ \
- (ChP)->RxControl[2] &= ~RTSFC_EN; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->RxControl[0]); \
-}
-
-/***************************************************************************
-Function: sEnRxFIFO
-Purpose: Enable Rx FIFO
-Call: sEnRxFIFO(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sEnRxFIFO(ChP) \
-{ \
- (ChP)->R[0x32] = 0x08; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->R[0x30]); \
-}
-
-/***************************************************************************
-Function: sEnRxProcessor
-Purpose: Enable the receive processor
-Call: sEnRxProcessor(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Comments: This function is used to start the receive processor. When
- the channel is in the reset state the receive processor is not
- running. This is done to prevent the receive processor from
- executing invalid microcode instructions prior to the
- downloading of the microcode.
-
-Warnings: This function must be called after valid microcode has been
- downloaded to the AIOP, and it must not be called before the
- microcode has been downloaded.
-*/
-#define sEnRxProcessor(ChP) \
-{ \
- (ChP)->RxControl[2] |= RXPROC_EN; \
- rp_writech2(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->RxControl[0]); \
-}
-
-/***************************************************************************
-Function: sEnRxStatusMode
-Purpose: Enable the Rx status mode
-Call: sEnRxStatusMode(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Comments: This places the channel in the receive status mode. All subsequent
- reads of receive data using sReadRxWord() will return a data byte
- in the low word and a status byte in the high word.
-
-*/
-#define sEnRxStatusMode(ChP) rp_writech2(ChP,CHNOFF_CHANSTAT(ChP),STATMODE)
-
-/***************************************************************************
-Function: sEnTransmit
-Purpose: Enable transmit
-Call: sEnTransmit(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sEnTransmit(ChP) \
-{ \
- (ChP)->TxControl[3] |= TX_ENABLE; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sGetAiopIntStatus
-Purpose: Get the AIOP interrupt status
-Call: sGetAiopIntStatus(CtlP,AiopNum)
- CONTROLLER_T *CtlP; Ptr to controller structure
- int AiopNum; AIOP number
-Return: Byte_t: The AIOP interrupt status. Bits 0 through 7
- represent channels 0 through 7 respectively. If a
- bit is set that channel is interrupting.
-*/
-#define sGetAiopIntStatus(CtlP,AIOPNUM) rp_readaiop1(CtlP,AIOPNUM,_INT_CHAN)
-
-/***************************************************************************
-Function: sGetAiopNumChan
-Purpose: Get the number of channels supported by an AIOP
-Call: sGetAiopNumChan(CtlP,AiopNum)
- CONTROLLER_T *CtlP; Ptr to controller structure
- int AiopNum; AIOP number
-Return: int: The number of channels supported by the AIOP
-*/
-#define sGetAiopNumChan(CtlP,AIOPNUM) CtlP->AiopNumChan[AIOPNUM]
-
-/***************************************************************************
-Function: sGetChanIntID
-Purpose: Get a channel's interrupt identification byte
-Call: sGetChanIntID(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Return: Byte_t: The channel interrupt ID. Can be any
- combination of the following flags:
- RXF_TRIG: Rx FIFO trigger level interrupt
- TXFIFO_MT: Tx FIFO empty interrupt
- SRC_INT: Special receive condition interrupt
- DELTA_CD: CD change interrupt
- DELTA_CTS: CTS change interrupt
- DELTA_DSR: DSR change interrupt
-*/
-#define sGetChanIntID(ChP) (rp_readch1(ChP,(ChP)->ChanNum+_INT_ID0) & (RXF_TRIG | TXFIFO_MT | SRC_INT | DELTA_CD | DELTA_CTS | DELTA_DSR))
-
-/***************************************************************************
-Function: sGetChanNum
-Purpose: Get the number of a channel within an AIOP
-Call: sGetChanNum(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Return: int: Channel number within AIOP, or NULLCHAN if channel does
- not exist.
-*/
-#define sGetChanNum(ChP) (ChP)->ChanNum
-
-/***************************************************************************
-Function: sGetChanStatus
-Purpose: Get the channel status
-Call: sGetChanStatus(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Return: Word_t: The channel status. Can be any combination of
- the following flags:
- LOW BYTE FLAGS
- CTS_ACT: CTS input asserted
- DSR_ACT: DSR input asserted
- CD_ACT: CD input asserted
- TXFIFOMT: Tx FIFO is empty
- TXSHRMT: Tx shift register is empty
- RDA: Rx data available
-
- HIGH BYTE FLAGS
- STATMODE: status mode enable bit
- RXFOVERFL: receive FIFO overflow
- RX2MATCH: receive compare byte 2 match
- RX1MATCH: receive compare byte 1 match
- RXBREAK: received BREAK
- RXFRAME: received framing error
- RXPARITY: received parity error
-Warnings: This function will clear the high byte flags in the Channel
- Status Register.
-*/
-#define sGetChanStatus(ChP) rp_readch2(ChP,CHNOFF_CHANSTAT(ChP))
-
-/***************************************************************************
-Function: sGetChanStatusLo
-Purpose: Get the low byte only of the channel status
-Call: sGetChanStatusLo(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Return: Byte_t: The channel status low byte. Can be any combination
- of the following flags:
- CTS_ACT: CTS input asserted
- DSR_ACT: DSR input asserted
- CD_ACT: CD input asserted
- TXFIFOMT: Tx FIFO is empty
- TXSHRMT: Tx shift register is empty
- RDA: Rx data available
-*/
-#define sGetChanStatusLo(ChP) rp_readch1(ChP,CHNOFF_CHANSTAT(ChP))
-
-/***************************************************************************
-Function: sGetRxCnt
-Purpose: Get the number of data bytes in the Rx FIFO
-Call: sGetRxCnt(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Return: int: The number of data bytes in the Rx FIFO.
-Comments: Byte read of count register is required to obtain Rx count.
-
-*/
-#define sGetRxCnt(ChP) rp_readch2(ChP,CHNOFF_TXRXCOUNT(ChP))
-
-/***************************************************************************
-Function: sGetTxCnt
-Purpose: Get the number of data bytes in the Tx FIFO
-Call: sGetTxCnt(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Return: Byte_t: The number of data bytes in the Tx FIFO.
-Comments: Byte read of count register is required to obtain Tx count.
-
-*/
-#define sGetTxCnt(ChP) rp_readch1(ChP,CHNOFF_TXRXCOUNT(ChP))
-
-/*****************************************************************************
-Function: sGetTxRxDataIO
-Purpose: Get the offset of a channel's TxRx Data register
-Call: sGetTxRxDataIO(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Return: WordIO_t: offset of a channel's TxRx Data register
-*/
-#define sGetTxRxDataIO(ChP) CHNOFF_TXRXDATA(ChP)
-
-/***************************************************************************
-Function: sInitChanDefaults
-Purpose: Initialize a channel structure to its default state.
-Call: sInitChanDefaults(ChP)
- CHANNEL_T *ChP; Ptr to the channel structure
-Comments: This function must be called once for every channel structure
- that exists before any other SSCI calls can be made.
-
-*/
-#define sInitChanDefaults(ChP) \
-{ \
- (ChP)->CtlP = NULLCTLPTR; \
- (ChP)->AiopNum = NULLAIOP; \
- (ChP)->ChanID = AIOPID_NULL; \
- (ChP)->ChanNum = NULLCHAN; \
-}
-
-/***************************************************************************
-Function: sResetAiopByNum
-Purpose: Reset the AIOP by number
-Call: sResetAiopByNum(CTLP,AIOPNUM)
- CONTROLLER_T CTLP; Ptr to controller structure
- AIOPNUM; AIOP index
-*/
-#define sResetAiopByNum(CTLP,AIOPNUM) \
-{ \
- rp_writeaiop1(CTLP,AIOPNUM,_CMD_REG,RESET_ALL); \
- rp_writeaiop1(CTLP,AIOPNUM,_CMD_REG,0x0); \
-}
-
-/***************************************************************************
-Function: sSendBreak
-Purpose: Send a transmit BREAK signal
-Call: sSendBreak(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sSendBreak(ChP) \
-{ \
- (ChP)->TxControl[3] |= SETBREAK; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sSetBaud
-Purpose: Set baud rate
-Call: sSetBaud(ChP,Divisor)
- CHANNEL_T *ChP; Ptr to channel structure
- Word_t Divisor; 16 bit baud rate divisor for channel
-*/
-#define sSetBaud(ChP,DIVISOR) \
-{ \
- (ChP)->BaudDiv[2] = (Byte_t)(DIVISOR); \
- (ChP)->BaudDiv[3] = (Byte_t)((DIVISOR) >> 8); \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->BaudDiv[0]); \
-}
-
-/***************************************************************************
-Function: sSetData7
-Purpose: Set data bits to 7
-Call: sSetData7(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sSetData7(ChP) \
-{ \
- (ChP)->TxControl[2] &= ~DATA8BIT; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sSetData8
-Purpose: Set data bits to 8
-Call: sSetData8(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sSetData8(ChP) \
-{ \
- (ChP)->TxControl[2] |= DATA8BIT; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sSetDTR
-Purpose: Set the DTR output
-Call: sSetDTR(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sSetDTR(ChP) \
-{ \
- (ChP)->TxControl[3] |= SET_DTR; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sSetEvenParity
-Purpose: Set even parity
-Call: sSetEvenParity(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Comments: Function sSetParity() can be used in place of functions sEnParity(),
- sDisParity(), sSetOddParity(), and sSetEvenParity().
-
-Warnings: This function has no effect unless parity is enabled with function
- sEnParity().
-*/
-#define sSetEvenParity(ChP) \
-{ \
- (ChP)->TxControl[2] |= EVEN_PAR; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sSetOddParity
-Purpose: Set odd parity
-Call: sSetOddParity(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Comments: Function sSetParity() can be used in place of functions sEnParity(),
- sDisParity(), sSetOddParity(), and sSetEvenParity().
-
-Warnings: This function has no effect unless parity is enabled with function
- sEnParity().
-*/
-#define sSetOddParity(ChP) \
-{ \
- (ChP)->TxControl[2] &= ~EVEN_PAR; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sSetRTS
-Purpose: Set the RTS output
-Call: sSetRTS(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sSetRTS(ChP) \
-{ \
- (ChP)->TxControl[3] |= SET_RTS; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sSetRxTrigger
-Purpose: Set the Rx FIFO trigger level
-Call: sSetRxProcessor(ChP,Level)
- CHANNEL_T *ChP; Ptr to channel structure
- Byte_t Level; Number of characters in Rx FIFO at which the
- interrupt will be generated. Can be any of the following flags:
-
- TRIG_NO: no trigger
- TRIG_1: 1 character in FIFO
- TRIG_1_2: FIFO 1/2 full
- TRIG_7_8: FIFO 7/8 full
-Comments: An interrupt will be generated when the trigger level is reached
- only if function sEnInterrupt() has been called with flag
- RXINT_EN set. The RXF_TRIG flag in the Interrupt Idenfification
- register will be set whenever the trigger level is reached
- regardless of the setting of RXINT_EN.
-
-*/
-#define sSetRxTrigger(ChP,LEVEL) \
-{ \
- (ChP)->RxControl[2] &= ~TRIG_MASK; \
- (ChP)->RxControl[2] |= LEVEL; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->RxControl[0]); \
-}
-
-/***************************************************************************
-Function: sSetStop1
-Purpose: Set stop bits to 1
-Call: sSetStop1(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sSetStop1(ChP) \
-{ \
- (ChP)->TxControl[2] &= ~STOP2; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sSetStop2
-Purpose: Set stop bits to 2
-Call: sSetStop2(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-*/
-#define sSetStop2(ChP) \
-{ \
- (ChP)->TxControl[2] |= STOP2; \
- rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->TxControl[0]); \
-}
-
-/***************************************************************************
-Function: sStartRxProcessor
-Purpose: Start a channel's receive processor
-Call: sStartRxProcessor(ChP)
- CHANNEL_T *ChP; Ptr to channel structure
-Comments: This function is used to start a Rx processor after it was
- stopped with sStopRxProcessor() or sStopSWInFlowCtl(). It
- will restart both the Rx processor and software input flow control.
-
-*/
-#define sStartRxProcessor(ChP) rp_writech4(ChP,_INDX_ADDR,*(DWord_t *)&(ChP)->R[0])
-
-/***************************************************************************
-Function: sWriteTxByte
-Purpose: Write a transmit data byte to a channel.
- CHANNEL_T *ChP; Ptr to channel structure
- ByteIO_t io: Channel transmit register I/O address. This can
- be obtained with sGetTxRxDataIO().
- Byte_t Data; The transmit data byte.
-Warnings: This function writes the data byte without checking to see if
- sMaxTxSize is exceeded in the Tx FIFO.
-*/
-#define sWriteTxByte(ChP,IO,DATA) rp_writech1(ChP,IO,DATA)
-
-int sReadAiopID(CONTROLLER_T *CtlP, int aiop);
-int sReadAiopNumChan(CONTROLLER_T *CtlP, int aiop);
-int sInitChan( CONTROLLER_T *CtlP,
- CHANNEL_T *ChP,
- int AiopNum,
- int ChanNum);
-Byte_t sGetRxErrStatus(CHANNEL_T *ChP);
-void sStopRxProcessor(CHANNEL_T *ChP);
-void sStopSWInFlowCtl(CHANNEL_T *ChP);
-void sFlushRxFIFO(CHANNEL_T *ChP);
-void sFlushTxFIFO(CHANNEL_T *ChP);
-int sWriteTxPrioByte(CHANNEL_T *ChP, Byte_t Data);
-void sEnInterrupts(CHANNEL_T *ChP,Word_t Flags);
-void sDisInterrupts(CHANNEL_T *ChP,Word_t Flags);
-int rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports);
-void rp_releaseresource(CONTROLLER_t *ctlp);
-
-#ifndef ROCKET_C
-extern Byte_t R[RDATASIZE];
-extern CONTROLLER_T sController[CTL_SIZE];
-extern Byte_t sIRQMap[16];
-#endif
-extern Byte_t rp_sBitMapClrTbl[8];
-extern Byte_t rp_sBitMapSetTbl[8];
diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c
deleted file mode 100644
index 30ea12a5cf8e..000000000000
--- a/sys/dev/sound/pci/vibes.c
+++ /dev/null
@@ -1,929 +0,0 @@
-/*
- * Copyright (c) 2001 Orion Hodson <O.Hodson@cs.ucl.ac.uk>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This card has the annoying habit of "clicking" when attached and
- * detached, haven't been able to remedy this with any combination of
- * muting.
- *
- * $FreeBSD$ */
-
-#include <dev/sound/pcm/sound.h>
-#include <dev/sound/pci/vibes.h>
-
-#include <pci/pcireg.h>
-#include <pci/pcivar.h>
-
-#include "mixer_if.h"
-
-/* ------------------------------------------------------------------------- */
-/* Constants */
-
-#define SV_PCI_ID 0xca005333
-#define SV_MAX_BUFFER 8192
-#define SV_MIN_BUFFER 128
-#define SV_INTR_PER_BUFFER 2
-
-#ifndef DEB
-#define DEB(x) /* (x) */
-#endif
-
-/* ------------------------------------------------------------------------- */
-/* Structures */
-
-struct sc_info;
-
-struct sc_chinfo {
- struct sc_info *parent;
- struct pcm_channel *channel;
- struct snd_dbuf *buffer;
- u_int32_t fmt, spd;
- int dir;
- int dma_active, dma_was_active;
-};
-
-struct sc_info {
- device_t dev;
-
- /* DMA buffer allocator */
- bus_dma_tag_t parent_dmat;
-
- /* Enhanced register resources */
- struct resource *enh_reg;
- bus_space_tag_t enh_st;
- bus_space_handle_t enh_sh;
- int enh_type;
- int enh_rid;
-
- /* DMA configuration */
- struct resource *dmaa_reg, *dmac_reg;
- bus_space_tag_t dmaa_st, dmac_st;
- bus_space_handle_t dmaa_sh, dmac_sh;
- int dmaa_type, dmac_type;
- int dmaa_rid, dmac_rid;
-
- /* Interrupt resources */
- struct resource *irq;
- int irqid;
- void *ih;
-
- struct sc_chinfo rch, pch;
- u_int8_t rev;
-};
-
-static u_int32_t sc_fmt[] = {
- AFMT_U8,
- AFMT_U8 | AFMT_STEREO,
- AFMT_S16_LE,
- AFMT_S16_LE | AFMT_STEREO,
- 0
-};
-
-static struct pcmchan_caps sc_caps = {8000, 48000, sc_fmt, 0};
-
-/* ------------------------------------------------------------------------- */
-/* Register Manipulations */
-
-#define sv_direct_set(x, y, z) _sv_direct_set(x, y, z, __LINE__)
-
-static u_int8_t
-sv_direct_get(struct sc_info *sc, u_int8_t reg)
-{
- return bus_space_read_1(sc->enh_st, sc->enh_sh, reg);
-}
-
-static void
-_sv_direct_set(struct sc_info *sc, u_int8_t reg, u_int8_t val, int line)
-{
- u_int8_t n;
- bus_space_write_1(sc->enh_st, sc->enh_sh, reg, val);
-
- n = sv_direct_get(sc, reg);
- if (n != val) {
- device_printf(sc->dev, "sv_direct_set register 0x%02x %d != %d from line %d\n", reg, n, val, line);
- }
-}
-
-static u_int8_t
-sv_indirect_get(struct sc_info *sc, u_int8_t reg)
-{
- if (reg == SV_REG_FORMAT || reg == SV_REG_ANALOG_PWR)
- reg |= SV_CM_INDEX_MCE;
-
- bus_space_write_1(sc->enh_st, sc->enh_sh, SV_CM_INDEX, reg);
- return bus_space_read_1(sc->enh_st, sc->enh_sh, SV_CM_DATA);
-}
-
-#define sv_indirect_set(x, y, z) _sv_indirect_set(x, y, z, __LINE__)
-
-static void
-_sv_indirect_set(struct sc_info *sc, u_int8_t reg, u_int8_t val, int line)
-{
- if (reg == SV_REG_FORMAT || reg == SV_REG_ANALOG_PWR)
- reg |= SV_CM_INDEX_MCE;
-
- bus_space_write_1(sc->enh_st, sc->enh_sh, SV_CM_INDEX, reg);
- bus_space_write_1(sc->enh_st, sc->enh_sh, SV_CM_DATA, val);
-
- reg &= ~SV_CM_INDEX_MCE;
- if (reg != SV_REG_ADC_PLLM) {
- u_int8_t n;
- n = sv_indirect_get(sc, reg);
- if (n != val) {
- device_printf(sc->dev, "sv_indirect_set register 0x%02x %d != %d line %d\n", reg, n, val, line);
- }
- }
-}
-
-static void
-sv_dma_set_config(bus_space_tag_t st, bus_space_handle_t sh,
- u_int32_t base, u_int32_t count, u_int8_t mode)
-{
- bus_space_write_4(st, sh, SV_DMA_ADDR, base);
- bus_space_write_4(st, sh, SV_DMA_COUNT, count & 0xffffff);
- bus_space_write_1(st, sh, SV_DMA_MODE, mode);
-
- DEB(printf("base 0x%08x count %5d mode 0x%02x\n",
- base, count, mode));
-}
-
-static u_int32_t
-sv_dma_get_count(bus_space_tag_t st, bus_space_handle_t sh)
-{
- return bus_space_read_4(st, sh, SV_DMA_COUNT) & 0xffffff;
-}
-
-/* ------------------------------------------------------------------------- */
-/* Play / Record Common Interface */
-
-static void *
-svchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
-{
- struct sc_info *sc = devinfo;
- struct sc_chinfo *ch;
- ch = (dir == PCMDIR_PLAY) ? &sc->pch : &sc->rch;
-
- ch->parent = sc;
- ch->channel = c;
- ch->dir = dir;
-
- if (sndbuf_alloc(b, sc->parent_dmat, SV_MAX_BUFFER) != 0) {
- DEB(printf("svchan_init failed\n"));
- return NULL;
- }
- ch->buffer = b;
- ch->fmt = AFMT_U8;
- ch->spd = DSP_DEFAULT_SPEED;
- ch->dma_active = ch->dma_was_active = 0;
-
- return ch;
-}
-
-static struct pcmchan_caps *
-svchan_getcaps(kobj_t obj, void *data)
-{
- return &sc_caps;
-}
-
-static int
-svchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize)
-{
- struct sc_chinfo *ch = data;
-
- /* user has requested interrupts every blocksize bytes */
- RANGE(blocksize, SV_MIN_BUFFER, SV_MAX_BUFFER / SV_INTR_PER_BUFFER);
- sndbuf_resize(ch->buffer, SV_INTR_PER_BUFFER, blocksize);
- DEB(printf("svchan_setblocksize: %d\n", blocksize));
- return sndbuf_getsize(ch->buffer);
-}
-
-static int
-svchan_setformat(kobj_t obj, void *data, u_int32_t format)
-{
- struct sc_chinfo *ch = data;
- /* NB Just note format here as setting format register
- * generates noise if dma channel is inactive. */
- ch->fmt = (format & AFMT_STEREO) ? SV_AFMT_STEREO : SV_AFMT_MONO;
- ch->fmt |= (format & AFMT_16BIT) ? SV_AFMT_S16 : SV_AFMT_U8;
- return 0;
-}
-
-static int
-svchan_setspeed(kobj_t obj, void *data, u_int32_t speed)
-{
- struct sc_chinfo *ch = data;
- RANGE(speed, 8000, 48000);
- ch->spd = speed;
- return speed;
-}
-
-/* ------------------------------------------------------------------------- */
-/* Recording interface */
-
-static int
-sv_set_recspeed(struct sc_info *sc, u_int32_t speed)
-{
- u_int32_t f_out, f_actual;
- u_int32_t rs, re, r, best_r = 0, r2, t, n, best_n = 0;
- int32_t m, best_m = 0, ms, me, err, min_err;
-
- /* This algorithm is a variant described in sonicvibes.pdf
- * appendix A. This search is marginally more extensive and
- * results in (nominally) better sample rate matching. */
-
- f_out = SV_F_SCALE * speed;
- min_err = 0x7fffffff;
-
- /* Find bounds of r to examine, rs <= r <= re */
- t = 80000000 / f_out;
- for (rs = 1; (1 << rs) < t; rs++);
-
- t = 150000000 / f_out;
- for (re = 1; (2 << re) < t; re++);
- if (re > 7) re = 7;
-
- /* Search over r, n, m */
- for (r = rs; r <= re; r++) {
- r2 = (1 << r);
- for (n = 3; n < 34; n++) {
- m = f_out * n / (SV_F_REF / r2);
- ms = (m > 3) ? (m - 1) : 3;
- me = (m < 129) ? (m + 1) : 129;
- for (m = ms; m <= me; m++) {
- f_actual = m * SV_F_REF / (n * r2);
- if (f_actual > f_out) {
- err = f_actual - f_out;
- } else {
- err = f_out - f_actual;
- }
- if (err < min_err) {
- best_r = r;
- best_m = m - 2;
- best_n = n - 2;
- min_err = err;
- if (err == 0) break;
- }
- }
- }
- }
-
- sv_indirect_set(sc, SV_REG_ADC_PLLM, best_m);
- sv_indirect_set(sc, SV_REG_ADC_PLLN,
- SV_ADC_PLLN(best_n) | SV_ADC_PLLR(best_r));
- DEB(printf("svrchan_setspeed: %d -> PLLM 0x%02x PLLNR 0x%08x\n",
- speed,
- sv_indirect_get(sc, SV_REG_ADC_PLLM),
- sv_indirect_get(sc, SV_REG_ADC_PLLN)));
- return 0;
-}
-
-static int
-svrchan_trigger(kobj_t obj, void *data, int go)
-{
- struct sc_chinfo *ch = data;
- struct sc_info *sc = ch->parent;
- u_int32_t count, enable;
- u_int8_t v;
-
- switch(go) {
- case PCMTRIG_START:
- /* Set speed */
- sv_set_recspeed(sc, ch->spd);
-
- /* Set format */
- v = sv_indirect_get(sc, SV_REG_FORMAT) & ~SV_AFMT_DMAC_MSK;
- v |= SV_AFMT_DMAC(ch->fmt);
- sv_indirect_set(sc, SV_REG_FORMAT, v);
-
- /* Program DMA */
- count = sndbuf_getsize(ch->buffer) / 2; /* DMAC uses words */
- sv_dma_set_config(sc->dmac_st, sc->dmac_sh,
- vtophys(sndbuf_getbuf(ch->buffer)),
- count - 1,
- SV_DMA_MODE_AUTO | SV_DMA_MODE_RD);
- count = count / SV_INTR_PER_BUFFER - 1;
- sv_indirect_set(sc, SV_REG_DMAC_COUNT_HI, count >> 8);
- sv_indirect_set(sc, SV_REG_DMAC_COUNT_LO, count & 0xff);
-
- /* Enable DMA */
- enable = sv_indirect_get(sc, SV_REG_ENABLE) | SV_RECORD_ENABLE;
- sv_indirect_set(sc, SV_REG_ENABLE, enable);
- ch->dma_active = 1;
- break;
- case PCMTRIG_ABORT:
- enable = sv_indirect_get(sc, SV_REG_ENABLE) & ~SV_RECORD_ENABLE;
- sv_indirect_set(sc, SV_REG_ENABLE, enable);
- ch->dma_active = 0;
- break;
- }
-
- return 0;
-}
-
-static int
-svrchan_getptr(kobj_t obj, void *data)
-{
- struct sc_chinfo *ch = data;
- struct sc_info *sc = ch->parent;
- u_int32_t sz, remain;
-
- sz = sndbuf_getsize(ch->buffer);
- /* DMAC uses words */
- remain = (sv_dma_get_count(sc->dmac_st, sc->dmac_sh) + 1) * 2;
- return sz - remain;
-}
-
-static kobj_method_t svrchan_methods[] = {
- KOBJMETHOD(channel_init, svchan_init),
- KOBJMETHOD(channel_setformat, svchan_setformat),
- KOBJMETHOD(channel_setspeed, svchan_setspeed),
- KOBJMETHOD(channel_setblocksize, svchan_setblocksize),
- KOBJMETHOD(channel_trigger, svrchan_trigger),
- KOBJMETHOD(channel_getptr, svrchan_getptr),
- KOBJMETHOD(channel_getcaps, svchan_getcaps),
- { 0, 0 }
-};
-CHANNEL_DECLARE(svrchan);
-
-/* ------------------------------------------------------------------------- */
-/* Playback interface */
-
-static int
-svpchan_trigger(kobj_t obj, void *data, int go)
-{
- struct sc_chinfo *ch = data;
- struct sc_info *sc = ch->parent;
- u_int32_t count, enable, speed;
- u_int8_t v;
-
- switch(go) {
- case PCMTRIG_START:
- /* Set speed */
- speed = (ch->spd * 65536) / 48000;
- if (speed > 65535)
- speed = 65535;
- sv_indirect_set(sc, SV_REG_PCM_SAMPLING_HI, speed >> 8);
- sv_indirect_set(sc, SV_REG_PCM_SAMPLING_LO, speed & 0xff);
-
- /* Set format */
- v = sv_indirect_get(sc, SV_REG_FORMAT) & ~SV_AFMT_DMAA_MSK;
- v |= SV_AFMT_DMAA(ch->fmt);
- sv_indirect_set(sc, SV_REG_FORMAT, v);
-
- /* Program DMA */
- count = sndbuf_getsize(ch->buffer);
- sv_dma_set_config(sc->dmaa_st, sc->dmaa_sh,
- vtophys(sndbuf_getbuf(ch->buffer)),
- count - 1,
- SV_DMA_MODE_AUTO | SV_DMA_MODE_WR);
- count = count / SV_INTR_PER_BUFFER - 1;
- sv_indirect_set(sc, SV_REG_DMAA_COUNT_HI, count >> 8);
- sv_indirect_set(sc, SV_REG_DMAA_COUNT_LO, count & 0xff);
-
- /* Enable DMA */
- enable = sv_indirect_get(sc, SV_REG_ENABLE);
- enable = (enable | SV_PLAY_ENABLE) & ~SV_PLAYBACK_PAUSE;
- sv_indirect_set(sc, SV_REG_ENABLE, enable);
- ch->dma_active = 1;
- break;
- case PCMTRIG_ABORT:
- enable = sv_indirect_get(sc, SV_REG_ENABLE) & ~SV_PLAY_ENABLE;
- sv_indirect_set(sc, SV_REG_ENABLE, enable);
- ch->dma_active = 0;
- break;
- }
-
- return 0;
-}
-
-static int
-svpchan_getptr(kobj_t obj, void *data)
-{
- struct sc_chinfo *ch = data;
- struct sc_info *sc = ch->parent;
- u_int32_t sz, remain;
-
- sz = sndbuf_getsize(ch->buffer);
- /* DMAA uses bytes */
- remain = sv_dma_get_count(sc->dmaa_st, sc->dmaa_sh) + 1;
- return (sz - remain);
-}
-
-static kobj_method_t svpchan_methods[] = {
- KOBJMETHOD(channel_init, svchan_init),
- KOBJMETHOD(channel_setformat, svchan_setformat),
- KOBJMETHOD(channel_setspeed, svchan_setspeed),
- KOBJMETHOD(channel_setblocksize, svchan_setblocksize),
- KOBJMETHOD(channel_trigger, svpchan_trigger),
- KOBJMETHOD(channel_getptr, svpchan_getptr),
- KOBJMETHOD(channel_getcaps, svchan_getcaps),
- { 0, 0 }
-};
-CHANNEL_DECLARE(svpchan);
-
-/* ------------------------------------------------------------------------- */
-/* Mixer support */
-
-struct sv_mix_props {
- u_int8_t reg; /* Register */
- u_int8_t stereo:1; /* Supports 2 channels */
- u_int8_t mute:1; /* Supports muting */
- u_int8_t neg:1; /* Negative gain */
- u_int8_t max; /* Max gain */
- u_int8_t iselect; /* Input selector */
-} static const mt [SOUND_MIXER_NRDEVICES] = {
- [SOUND_MIXER_LINE1] = {SV_REG_AUX1, 1, 1, 1, SV_DEFAULT_MAX, SV_INPUT_AUX1},
- [SOUND_MIXER_CD] = {SV_REG_CD, 1, 1, 1, SV_DEFAULT_MAX, SV_INPUT_CD},
- [SOUND_MIXER_LINE] = {SV_REG_LINE, 1, 1, 1, SV_DEFAULT_MAX, SV_INPUT_LINE},
- [SOUND_MIXER_MIC] = {SV_REG_MIC, 0, 1, 1, SV_MIC_MAX, SV_INPUT_MIC},
- [SOUND_MIXER_SYNTH] = {SV_REG_SYNTH, 0, 1, 1, SV_DEFAULT_MAX, 0},
- [SOUND_MIXER_LINE2] = {SV_REG_AUX2, 1, 1, 1, SV_DEFAULT_MAX, SV_INPUT_AUX2},
- [SOUND_MIXER_VOLUME] = {SV_REG_MIX, 1, 1, 1, SV_DEFAULT_MAX, 0},
- [SOUND_MIXER_PCM] = {SV_REG_PCM, 1, 1, 1, SV_PCM_MAX, 0},
- [SOUND_MIXER_RECLEV] = {SV_REG_ADC_INPUT, 1, 0, 0, SV_ADC_MAX, 0},
-};
-
-static void
-sv_channel_gain(struct sc_info *sc, u_int32_t dev, u_int32_t gain, u_int32_t channel)
-{
- u_int8_t v;
- int32_t g;
-
- g = mt[dev].max * gain / 100;
- if (mt[dev].neg)
- g = mt[dev].max - g;
- v = sv_indirect_get(sc, mt[dev].reg + channel) & ~mt[dev].max;
- v |= g;
-
- if (mt[dev].mute) {
- if (gain == 0) {
- v |= SV_MUTE;
- } else {
- v &= ~SV_MUTE;
- }
- }
- sv_indirect_set(sc, mt[dev].reg + channel, v);
-}
-
-static int
-sv_gain(struct sc_info *sc, u_int32_t dev, u_int32_t left, u_int32_t right)
-{
- sv_channel_gain(sc, dev, left, 0);
- if (mt[dev].stereo)
- sv_channel_gain(sc, dev, right, 1);
- return 0;
-}
-
-static void
-sv_mix_mute_all(struct sc_info *sc)
-{
- int32_t i;
- for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- if (mt[i].reg) sv_gain(sc, i, 0, 0);
- }
-}
-
-static int
-sv_mix_init(struct snd_mixer *m)
-{
- u_int32_t i, v;
-
- for(i = v = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- if (mt[i].max) v |= (1 << i);
- }
- mix_setdevs(m, v);
-
- for(i = v = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- if (mt[i].iselect) v |= (1 << i);
- }
- mix_setrecdevs(m, v);
-
- return 0;
-}
-
-static int
-sv_mix_set(struct snd_mixer *m, u_int32_t dev, u_int32_t left, u_int32_t right)
-{
- struct sc_info *sc = mix_getdevinfo(m);
- return sv_gain(sc, dev, left, right);
-}
-
-static int
-sv_mix_setrecsrc(struct snd_mixer *m, u_int32_t mask)
-{
- struct sc_info *sc = mix_getdevinfo(m);
- u_int32_t i, v;
-
- v = sv_indirect_get(sc, SV_REG_ADC_INPUT) & SV_INPUT_GAIN_MASK;
- for(i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- if ((1 << i) & mask) {
- v |= mt[i].iselect;
- }
- }
- DEB(printf("sv_mix_setrecsrc: mask 0x%08x adc_input 0x%02x\n", mask, v));
- return mask;
-}
-
-static kobj_method_t sv_mixer_methods[] = {
- KOBJMETHOD(mixer_init, sv_mix_init),
- KOBJMETHOD(mixer_set, sv_mix_set),
- KOBJMETHOD(mixer_setrecsrc, sv_mix_setrecsrc),
- { 0, 0 }
-};
-MIXER_DECLARE(sv_mixer);
-
-/* ------------------------------------------------------------------------- */
-/* Power management and reset */
-
-static void
-sv_power(struct sc_info *sc, int state)
-{
- u_int8_t v;
-
- switch (state) {
- case 0:
- /* power on */
- v = sv_indirect_get(sc, SV_REG_ANALOG_PWR) &~ SV_ANALOG_OFF;
- v |= SV_ANALOG_OFF_SRS | SV_ANALOG_OFF_SPLL;
- sv_indirect_set(sc, SV_REG_ANALOG_PWR, v);
- v = sv_indirect_get(sc, SV_REG_DIGITAL_PWR) &~ SV_DIGITAL_OFF;
- v |= SV_DIGITAL_OFF_SYN | SV_DIGITAL_OFF_MU | SV_DIGITAL_OFF_GP;
- sv_indirect_set(sc, SV_REG_DIGITAL_PWR, v);
- break;
- default:
- /* power off */
- v = sv_indirect_get(sc, SV_REG_ANALOG_PWR) | SV_ANALOG_OFF;
- sv_indirect_set(sc, SV_REG_ANALOG_PWR, v);
- v = sv_indirect_get(sc, SV_REG_DIGITAL_PWR) | SV_DIGITAL_OFF;
- sv_indirect_set(sc, SV_REG_DIGITAL_PWR, SV_DIGITAL_OFF);
- break;
- }
- DEB(printf("Power state %d\n", state));
-}
-
-static int
-sv_init(struct sc_info *sc)
-{
- u_int8_t v;
-
- /* Effect reset */
- v = sv_direct_get(sc, SV_CM_CONTROL) & ~SV_CM_CONTROL_ENHANCED;
- v |= SV_CM_CONTROL_RESET;
- sv_direct_set(sc, SV_CM_CONTROL, v);
- DELAY(50);
-
- v = sv_direct_get(sc, SV_CM_CONTROL) & ~SV_CM_CONTROL_RESET;
- sv_direct_set(sc, SV_CM_CONTROL, v);
- DELAY(50);
-
- /* Set in enhanced mode */
- v = sv_direct_get(sc, SV_CM_CONTROL);
- v |= SV_CM_CONTROL_ENHANCED;
- sv_direct_set(sc, SV_CM_CONTROL, v);
-
- /* Enable interrupts (UDM and MIDM are superfluous) */
- v = sv_direct_get(sc, SV_CM_IMR);
- v &= ~(SV_CM_IMR_AMSK | SV_CM_IMR_CMSK | SV_CM_IMR_SMSK);
- sv_direct_set(sc, SV_CM_IMR, v);
-
- /* Select ADC PLL for ADC clock */
- v = sv_indirect_get(sc, SV_REG_CLOCK_SOURCE) & ~SV_CLOCK_ALTERNATE;
- sv_indirect_set(sc, SV_REG_CLOCK_SOURCE, v);
-
- /* Disable loopback - binds ADC and DAC rates */
- v = sv_indirect_get(sc, SV_REG_LOOPBACK) & ~SV_LOOPBACK_ENABLE;
- sv_indirect_set(sc, SV_REG_LOOPBACK, v);
-
- /* Disable SRS */
- v = sv_indirect_get(sc, SV_REG_SRS_SPACE) | SV_SRS_DISABLED;
- sv_indirect_set(sc, SV_REG_SRS_SPACE, v);
-
- /* Get revision */
- sc->rev = sv_indirect_get(sc, SV_REG_REVISION);
-
- return 0;
-}
-
-static int
-sv_suspend(device_t dev)
-{
- struct sc_info *sc = pcm_getdevinfo(dev);
-
- sc->rch.dma_was_active = sc->rch.dma_active;
- svrchan_trigger(NULL, &sc->rch, PCMTRIG_ABORT);
-
- sc->pch.dma_was_active = sc->pch.dma_active;
- svrchan_trigger(NULL, &sc->pch, PCMTRIG_ABORT);
-
- sv_mix_mute_all(sc);
- sv_power(sc, 3);
-
- return 0;
-}
-
-static int
-sv_resume(device_t dev)
-{
- struct sc_info *sc = pcm_getdevinfo(dev);
-
- sv_mix_mute_all(sc);
- sv_power(sc, 0);
- if (sv_init(sc) == -1) {
- device_printf(dev, "unable to reinitialize the card\n");
- return ENXIO;
- }
-
- if (mixer_reinit(dev) == -1) {
- device_printf(dev, "unable to reinitialize the mixer\n");
- return ENXIO;
- }
-
- if (sc->rch.dma_was_active) {
- svrchan_trigger(0, &sc->rch, PCMTRIG_START);
- }
-
- if (sc->pch.dma_was_active) {
- svpchan_trigger(0, &sc->pch, PCMTRIG_START);
- }
-
- return 0;
-}
-
-/* ------------------------------------------------------------------------- */
-/* Resource related */
-
-static void
-sv_intr(void *data)
-{
- struct sc_info *sc = data;
- u_int8_t status;
-
- status = sv_direct_get(sc, SV_CM_STATUS);
- if (status & SV_CM_STATUS_AINT)
- chn_intr(sc->pch.channel);
-
- if (status & SV_CM_STATUS_CINT)
- chn_intr(sc->rch.channel);
-
- status &= ~(SV_CM_STATUS_AINT|SV_CM_STATUS_CINT);
- DEB(if (status) printf("intr 0x%02x ?\n", status));
-
- return;
-}
-
-static int
-sv_probe(device_t dev)
-{
- switch(pci_get_devid(dev)) {
- case SV_PCI_ID:
- device_set_desc(dev, "S3 Sonicvibes");
- return 0;
- default:
- return ENXIO;
- }
-}
-
-static int
-sv_attach(device_t dev) {
- struct snddev_info *d;
- struct sc_info *sc;
- u_int32_t data;
- char status[SND_STATUSLEN];
- u_long midi_start, games_start, count, sdmaa, sdmac;
-
- d = device_get_softc(dev);
-
- sc = malloc(sizeof(struct sc_info), M_DEVBUF, M_NOWAIT);
- if (sc == NULL) {
- device_printf(dev, "cannot allocate softc");
- return ENXIO;
- }
- bzero(sc, sizeof(sc));
- sc->dev = dev;
-
- data = pci_read_config(dev, PCIR_COMMAND, 2);
- data |= (PCIM_CMD_PORTEN|PCIM_CMD_BUSMASTEREN);
- pci_write_config(dev, PCIR_COMMAND, data, 2);
- data = pci_read_config(dev, PCIR_COMMAND, 2);
-
-#if __FreeBSD_version > 500000
- if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
- device_printf(dev, "chip is in D%d power mode "
- "-- setting to D0\n", pci_get_powerstate(dev));
- pci_set_powerstate(dev, PCI_POWERSTATE_D0);
- }
-#endif
- sc->enh_rid = SV_PCI_ENHANCED;
- sc->enh_type = SYS_RES_IOPORT;
- sc->enh_reg = bus_alloc_resource(dev, sc->enh_type,
- &sc->enh_rid, 0, ~0,
- SV_PCI_ENHANCED_SIZE, RF_ACTIVE);
- if (sc->enh_reg == NULL) {
- device_printf(dev, "sv_attach: cannot allocate enh\n");
- return ENXIO;
- }
- sc->enh_st = rman_get_bustag(sc->enh_reg);
- sc->enh_sh = rman_get_bushandle(sc->enh_reg);
-
- data = pci_read_config(dev, SV_PCI_DMAA, 4);
- DEB(printf("sv_attach: initial dmaa 0x%08x\n", data));
- data = pci_read_config(dev, SV_PCI_DMAC, 4);
- DEB(printf("sv_attach: initial dmac 0x%08x\n", data));
-
- /* Initialize DMA_A and DMA_C */
- pci_write_config(dev, SV_PCI_DMAA, SV_PCI_DMA_EXTENDED, 4);
- pci_write_config(dev, SV_PCI_DMAC, 0, 4);
-
- /* Register IRQ handler */
- sc->irqid = 0;
- sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
- 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
- if (!sc->irq ||
- bus_setup_intr(dev, sc->irq, INTR_TYPE_TTY, sv_intr, sc, &sc->ih)) {
- device_printf(dev, "sv_attach: Unable to map interrupt\n");
- goto fail;
- }
-
- if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/2, /*boundary*/0,
- /*lowaddr*/BUS_SPACE_MAXADDR_24BIT,
- /*highaddr*/BUS_SPACE_MAXADDR,
- /*filter*/NULL, /*filterarg*/NULL,
- /*maxsize*/SV_MAX_BUFFER, /*nsegments*/1,
- /*maxsegz*/0x3ffff, /*flags*/0,
- &sc->parent_dmat) != 0) {
- device_printf(dev, "sv_attach: Unable to create dma tag\n");
- goto fail;
- }
-
- /* Power up and initialize */
- sv_mix_mute_all(sc);
- sv_power(sc, 0);
- sv_init(sc);
-
- if (mixer_init(dev, &sv_mixer_class, sc) != 0) {
- device_printf(dev, "sv_attach: Mixer failed to initialize\n");
- goto fail;
- }
-
- /* XXX This is a hack, and it's ugly. Okay, the deal is this
- * card has two more io regions that available for automatic
- * configuration by the pci code. These need to be allocated
- * to used as control registers for the DMA engines.
- * Unfortunately FBSD has no bus_space_foo() functions so we
- * have to grab port space in region of existing resources. Go
- * for space between midi and game ports.
- */
- bus_get_resource(dev, SYS_RES_IOPORT, SV_PCI_MIDI, &midi_start, &count);
- bus_get_resource(dev, SYS_RES_IOPORT, SV_PCI_GAMES, &games_start, &count);
-
- /* Check assumptions about space availability and alignment. */
- if ((midi_start - games_start != 0x200) || midi_start & 0xff) {
- device_printf(dev, "sv_attach: resource assumptions not met\n");
- goto fail;
- }
-
- sdmaa = games_start + 0x40;
- sdmac = sdmaa + 0x40;
-
- /* Add resources to list of pci resources for this device - from here on
- * they look like normal pci resources. */
- bus_set_resource(dev, SYS_RES_IOPORT, SV_PCI_DMAA, sdmaa, SV_PCI_DMAA_SIZE);
- bus_set_resource(dev, SYS_RES_IOPORT, SV_PCI_DMAC, sdmac, SV_PCI_DMAC_SIZE);
-
- /* Cache resource short-cuts for dma_a */
- sc->dmaa_rid = SV_PCI_DMAA;
- sc->dmaa_type = SYS_RES_IOPORT;
- sc->dmaa_reg = bus_alloc_resource(dev, sc->dmaa_type,
- &sc->dmaa_rid, 0, ~0,
- SV_PCI_ENHANCED_SIZE, RF_ACTIVE);
- if (sc->dmaa_reg == NULL) {
- device_printf(dev, "sv_attach: cannot allocate dmaa\n");
- goto fail;
- }
- sc->dmaa_st = rman_get_bustag(sc->dmaa_reg);
- sc->dmaa_sh = rman_get_bushandle(sc->dmaa_reg);
-
- /* Poke port into dma_a configuration, nb bit flags to enable dma */
- data = pci_read_config(dev, SV_PCI_DMAA, 4) | SV_PCI_DMA_ENABLE | SV_PCI_DMA_EXTENDED;
- data = ((u_int32_t)sdmaa & 0xfffffff0) | (data & 0x0f);
- pci_write_config(dev, SV_PCI_DMAA, data, 4);
- DEB(printf("dmaa: 0x%x 0x%x\n", data, pci_read_config(dev, SV_PCI_DMAA, 4)));
-
- /* Cache resource short-cuts for dma_c */
- sc->dmac_rid = SV_PCI_DMAC;
- sc->dmac_type = SYS_RES_IOPORT;
- sc->dmac_reg = bus_alloc_resource(dev, sc->dmac_type,
- &sc->dmac_rid, 0, ~0,
- SV_PCI_ENHANCED_SIZE, RF_ACTIVE);
- if (sc->dmac_reg == NULL) {
- device_printf(dev, "sv_attach: cannot allocate dmac\n");
- goto fail;
- }
- sc->dmac_st = rman_get_bustag(sc->dmac_reg);
- sc->dmac_sh = rman_get_bushandle(sc->dmac_reg);
-
- /* Poke port into dma_c configuration, nb bit flags to enable dma */
- data = pci_read_config(dev, SV_PCI_DMAC, 4) | SV_PCI_DMA_ENABLE | SV_PCI_DMA_EXTENDED;
- data = ((u_int32_t)sdmac & 0xfffffff0) | (data & 0x0f);
- pci_write_config(dev, SV_PCI_DMAC, data, 4);
- DEB(printf("dmac: 0x%x 0x%x\n", data, pci_read_config(dev, SV_PCI_DMAC, 4)));
-
- if (bootverbose)
- printf("Sonicvibes: revision %d.\n", sc->rev);
-
- if (pcm_register(dev, sc, 1, 1)) {
- device_printf(dev, "sv_attach: pcm_register fail\n");
- goto fail;
- }
-
- pcm_addchan(dev, PCMDIR_PLAY, &svpchan_class, sc);
- pcm_addchan(dev, PCMDIR_REC, &svrchan_class, sc);
-
- snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld",
- rman_get_start(sc->enh_reg), rman_get_start(sc->irq));
- pcm_setstatus(dev, status);
-
- DEB(printf("sv_attach: succeeded\n"));
-
- return 0;
-
- fail:
- if (sc->parent_dmat)
- bus_dma_tag_destroy(sc->parent_dmat);
- if (sc->ih)
- bus_teardown_intr(dev, sc->irq, sc->ih);
- if (sc->irq)
- bus_release_resource(dev, SYS_RES_IRQ, sc->irqid, sc->irq);
- if (sc->enh_reg)
- bus_release_resource(dev, sc->enh_type, sc->enh_rid, sc->enh_reg);
- if (sc->dmaa_reg)
- bus_release_resource(dev, sc->dmaa_type, sc->dmaa_rid, sc->dmaa_reg);
- if (sc->dmac_reg)
- bus_release_resource(dev, sc->dmac_type, sc->dmac_rid, sc->dmac_reg);
- return ENXIO;
-}
-
-static int
-sv_detach(device_t dev) {
- struct sc_info *sc;
- int r;
-
- r = pcm_unregister(dev);
- if (r) return r;
-
- sc = pcm_getdevinfo(dev);
- sv_mix_mute_all(sc);
- sv_power(sc, 3);
-
- bus_dma_tag_destroy(sc->parent_dmat);
- bus_teardown_intr(dev, sc->irq, sc->ih);
- bus_release_resource(dev, SYS_RES_IRQ, sc->irqid, sc->irq);
- bus_release_resource(dev, sc->enh_type, sc->enh_rid, sc->enh_reg);
- bus_release_resource(dev, sc->dmaa_type, sc->dmaa_rid, sc->dmaa_reg);
- bus_release_resource(dev, sc->dmac_type, sc->dmac_rid, sc->dmac_reg);
-
- free(sc, M_DEVBUF);
-
- return 0;
-}
-
-static device_method_t sc_methods[] = {
- DEVMETHOD(device_probe, sv_probe),
- DEVMETHOD(device_attach, sv_attach),
- DEVMETHOD(device_detach, sv_detach),
- DEVMETHOD(device_resume, sv_resume),
- DEVMETHOD(device_suspend, sv_suspend),
- { 0, 0 }
-};
-
-static driver_t sonicvibes_driver = {
- "pcm",
- sc_methods,
- sizeof(struct snddev_info)
-};
-
-static devclass_t pcm_devclass;
-DRIVER_MODULE(snd_sonicvibes, pci, sonicvibes_driver, pcm_devclass, 0, 0);
-MODULE_DEPEND(snd_sonicvibes, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER);
-MODULE_VERSION(snd_sonicvibes, 1);
diff --git a/sys/dev/sound/pci/vibes.h b/sys/dev/sound/pci/vibes.h
deleted file mode 100644
index 36cbadd66781..000000000000
--- a/sys/dev/sound/pci/vibes.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2001 Orion Hodson <O.Hodson@cs.ucl.ac.uk>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/* ------------------------------------------------------------------------- */
-/* PCI Configuration Register Offsets */
-
-#define SV_PCI_COMPAT 0x10
-#define SV_PCI_ENHANCED 0x14
-#define SV_PCI_FMSYNTH 0x18
-#define SV_PCI_MIDI 0x1c
-#define SV_PCI_GAMES 0x20
-#define SV_PCI_DMAA 0x40
-#define SV_PCI_DMAC 0x48
-
-#define SV_PCI_DMAA_SIZE 0x10
-#define SV_PCI_DMAA_ALIGN 0x10
-#define SV_PCI_DMAC_SIZE 0x10
-#define SV_PCI_DMAC_ALIGN 0x10
-
-#define SV_PCI_ENHANCED_SIZE 0x08
-
-#define SV_PCI_DMA_ENABLE 0x00000001
-#define SV_PCI_DMA_EXTENDED 0x00000008
-
-/* ------------------------------------------------------------------------- */
-/* DMA Configuration Registers */
-
-#define SV_DMA_ADDR 0x00
-#define SV_DMA_COUNT 0x04
-
-#define SV_DMA_MODE 0x0B
-#define SV_DMA_MODE_AUTO 0x10
-#define SV_DMA_MODE_RD 0x04
-#define SV_DMA_MODE_WR 0x08
-
-/* ------------------------------------------------------------------------- */
-/* Enhanced Mode Configuration Registers */
-
-#define SV_CM_CONTROL 0x00
-#define SV_CM_CONTROL_ENHANCED 0x01
-#define SV_CM_CONTROL_TEST 0x02
-#define SV_CM_CONTROL_REVERB 0x04
-#define SV_CM_CONTROL_PWS 0x08
-#define SV_CM_CONTROL_INTA 0x20
-#define SV_CM_CONTROL_RESET 0x80
-
-#define SV_CM_IMR 0x01
-#define SV_CM_IMR_AMSK 0x01
-#define SV_CM_IMR_CMSK 0x04
-#define SV_CM_IMR_SMSK 0x08
-#define SV_CM_IMR_UDM 0x40
-#define SV_CM_IMR_MIDM 0x80
-
-#define SV_CM_STATUS 0x02
-#define SV_CM_STATUS_AINT 0x01
-#define SV_CM_STATUS_CINT 0x04
-#define SV_CM_STATUS_SINT 0x08
-#define SV_CM_STATUS_UDI 0x40
-#define SV_CM_STATUS_MI 0x80
-
-#define SV_CM_INDEX 0x04
-#define SV_CM_INDEX_MASK 0x3f
-#define SV_CM_INDEX_MCE 0x40
-#define SV_CM_INDEX_TRD 0x80
-
-#define SV_CM_DATA 0x05
-
-/* ------------------------------------------------------------------------- */
-/* Indexed Codec/Mixer Registers (left channels were applicable) */
-
-#define SV_REG_ADC_INPUT 0x00
-#define SV_INPUT_GAIN_MASK 0x0f
-#define SV_INPUT_MICGAIN 0x10
-#define SV_INPUT_CD 0x20
-#define SV_INPUT_DAC 0x40
-#define SV_INPUT_AUX2 0x60
-#define SV_INPUT_LINE 0x80
-#define SV_INPUT_AUX1 0xa0
-#define SV_INPUT_MIC 0xc0
-#define SV_INPUT_MIXOUT 0xe0
-
-#define SV_REG_AUX1 0x02
-#define SV_REG_CD 0x04
-#define SV_REG_LINE 0x06
-#define SV_REG_MIC 0x08
-#define SV_REG_SYNTH 0x0a
-#define SV_REG_AUX2 0x0c
-#define SV_REG_MIX 0x0e
-#define SV_REG_PCM 0x10
-#define SV_DEFAULT_MAX 0x1f
-#define SV_ADC_MAX 0x0f
-#define SV_MIC_MAX 0x0f
-#define SV_PCM_MAX 0x3f
-#define SV_MUTE 0x80
-
-#define SV_REG_FORMAT 0x12
-#define SV_AFMT_MONO 0x00
-#define SV_AFMT_STEREO 0x01
-#define SV_AFMT_S16 0x02
-#define SV_AFMT_U8 0x00
-#define SV_AFMT_DMAA(x) (x)
-#define SV_AFMT_DMAA_MSK 0x03
-#define SV_AFMT_DMAC(x) ((x) << 4)
-#define SV_AFMT_DMAC_MSK 0x30
-
-#define SV_REG_ENABLE 0x13
-#define SV_PLAY_ENABLE 0x01
-#define SV_RECORD_ENABLE 0x02
-#define SV_PLAYBACK_PAUSE 0x04
-
-#define SV_REG_REVISION 0x15
-
-#define SV_REG_LOOPBACK 0x16
-#define SV_LOOPBACK_ENABLE 0x01
-#define SV_LOOPBACK_MAX 0x3f
-#define SV_LOOPBACK_LEVEL(x) ((x) << 2)
-
-#define SV_REG_DMAA_COUNT_HI 0x18
-#define SV_REG_DMAA_COUNT_LO 0x19
-#define SV_REG_DMAC_COUNT_HI 0x1c
-#define SV_REG_DMAC_COUNT_LO 0x1d
-
-#define SV_REG_PCM_SAMPLING_LO 0x1e
-#define SV_REG_PCM_SAMPLING_HI 0x1f
-
-#define SV_REG_SYN_SAMPLING_LO 0x20
-#define SV_REG_SYN_SAMPLING_HI 0x21
-
-#define SV_REG_CLOCK_SOURCE 0x22
-#define SV_CLOCK_ALTERNATE 0x10
-#define SV_REG_ALT_RATE 0x23
-
-#define SV_REG_ADC_PLLM 0x24
-#define SV_REG_ADC_PLLN 0x25
-#define SV_ADC_PLLN(x) ((x) & 0x1f)
-#define SV_ADC_PLLR(x) ((x) << 5)
-
-#define SV_REG_SYNTH_PLLM 0x26
-#define SV_REG_SYNTH_PLLN 0x27
-#define SV_SYNTH_PLLN(x) ((x) & 0x1f)
-#define SV_SYNTH_PLLR(x) ((x) << 5)
-
-#define SV_REG_SRS_SPACE 0x2c
-#define SV_SRS_SPACE_100 0x00
-#define SV_SRS_SPACE_75 0x01
-#define SV_SRS_SPACE_50 0x02
-#define SV_SRS_SPACE_25 0x03
-#define SV_SRS_SPACE_0 0x04
-#define SV_SRS_DISABLED 0x80
-
-#define SV_REG_SRS_CENTER 0x2d
-#define SV_SRS_CENTER_100 0x00
-#define SV_SRS_CENTER_75 0x01
-#define SV_SRS_CENTER_50 0x02
-#define SV_SRS_CENTER_25 0x03
-#define SV_SRS_CENTER_0 0x04
-
-#define SV_REG_ANALOG_PWR 0x30
-#define SV_ANALOG_OFF_DAC 0x01
-#define SV_ANALOG_OFF_ADC 0x08
-#define SV_ANALOG_OFF_MIX 0x10
-#define SV_ANALOG_OFF_SRS 0x20
-#define SV_ANALOG_OFF_SPLL 0x40
-#define SV_ANALOG_OFF_APLL 0x80
-#define SV_ANALOG_OFF 0xf9
-
-#define SV_REG_DIGITAL_PWR 0x31
-#define SV_DIGITAL_OFF_SYN 0x01
-#define SV_DIGITAL_OFF_MU 0x02
-#define SV_DIGITAL_OFF_GP 0x04
-#define SV_DIGITAL_OFF_BI 0x08
-#define SV_DIGITAL_OFF 0x0f
-
-/* ------------------------------------------------------------------------- */
-/* ADC PLL constants */
-
-#define SV_F_SCALE 512
-#define SV_F_REF 24576000
diff --git a/sys/dev/sr/if_sr.h b/sys/dev/sr/if_sr.h
deleted file mode 100644
index a55a6d3f6b56..000000000000
--- a/sys/dev/sr/if_sr.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * if_sr.h
- *
- * Copyright (C) 1997-1999 Whistle Communications Inc.
- * All rights reserved.
- *
- * Subject to the following obligations and disclaimer of warranty, use and
- * redistribution of this software, in source or object code forms, with or
- * without modifications are expressly permitted by Whistle Communications;
- * provided, however, that:
- * 1. Any and all reproductions of the source or object code must include the
- * copyright notice above and the following disclaimer of warranties; and
- * 2. No rights are granted, in any manner or form, to use Whistle
- * Communications, Inc. trademarks, including the mark "WHISTLE
- * COMMUNICATIONS" on advertising, endorsements, or otherwise except as
- * such appears in the above copyright notice or in the software.
- *
- * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
- * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
- * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
- * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
- * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
- * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
- * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
- * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
- * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
- * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
-
- * $FreeBSD$
- */
-
-#ifndef _I386_ISA_IF_SR_H_
-#define _I386_ISA_IF_SR_H_
-
-/* Node type name and type cookie */
-#define NG_SR_NODE_TYPE "sync_sr"
-#define NG_SR_COOKIE 860552148
-
-/* Netgraph hooks */
-#define NG_SR_HOOK_DEBUG "debug"
-#define NG_SR_HOOK_RAW "rawdata"
-
-#endif /* _I386_ISA_IF_SR_H_ */
-
diff --git a/sys/dev/sr/if_sr_isa.c b/sys/dev/sr/if_sr_isa.c
deleted file mode 100644
index 46adf353f705..000000000000
--- a/sys/dev/sr/if_sr_isa.c
+++ /dev/null
@@ -1,440 +0,0 @@
-/*
- * Copyright (c) 1996 - 2001 John Hay.
- * Copyright (c) 1996 SDL Communications, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/conf.h> /* cdevsw stuff */
-#include <sys/kernel.h> /* SYSINIT stuff */
-#include <sys/uio.h> /* SYSINIT stuff */
-#include <sys/malloc.h> /* malloc region definitions */
-#include <sys/module.h>
-#include <sys/bus.h>
-#include <machine/bus.h>
-#include <machine/resource.h>
-#include <machine/bus_pio.h>
-#include <machine/bus_memio.h>
-#include <sys/rman.h>
-#include <sys/time.h>
-
-#include <isa/isavar.h>
-#include "isa_if.h"
-
-#include <dev/ic/hd64570.h>
-#include <dev/sr/if_srregs.h>
-
-/*
- * List of valid interrupt numbers for the N2 ISA card.
- */
-static int sr_irqtable[16] = {
- 0, /* 0 */
- 0, /* 1 */
- 0, /* 2 */
- 1, /* 3 */
- 1, /* 4 */
- 1, /* 5 */
- 0, /* 6 */
- 1, /* 7 */
- 0, /* 8 */
- 0, /* 9 */
- 1, /* 10 */
- 1, /* 11 */
- 1, /* 12 */
- 0, /* 13 */
- 0, /* 14 */
- 1 /* 15 */
-};
-
-static int sr_isa_probe (device_t);
-static int sr_isa_attach (device_t);
-
-static struct isa_pnp_id sr_ids[] = {
- {0, NULL}
-};
-
-static device_method_t sr_methods[] = {
- DEVMETHOD(device_probe, sr_isa_probe),
- DEVMETHOD(device_attach, sr_isa_attach),
- DEVMETHOD(device_detach, sr_detach),
- { 0, 0 }
-};
-
-static driver_t sr_isa_driver = {
- "sr",
- sr_methods,
- sizeof (struct sr_hardc)
-};
-
-DRIVER_MODULE(if_sr, isa, sr_isa_driver, sr_devclass, 0, 0);
-
-static u_int src_get8_io(u_int base, u_int off);
-static u_int src_get16_io(u_int base, u_int off);
-static void src_put8_io(u_int base, u_int off, u_int val);
-static void src_put16_io(u_int base, u_int off, u_int val);
-static u_int src_dpram_size(device_t device);
-
-/*
- * Probe for an ISA card. If it is there, size its memory. Then get the
- * rest of its information and fill it in.
- */
-static int
-sr_isa_probe (device_t device)
-{
- struct sr_hardc *hc;
- int error;
- u_int32_t flags;
- u_int i, tmp;
- u_short port;
- u_long irq, junk, membase, memsize, port_start, port_count;
- sca_regs *sca = 0;
-
- error = ISA_PNP_PROBE(device_get_parent(device), device, sr_ids);
- if (error == ENXIO || error == 0)
- return (error);
-
- hc = device_get_softc(device);
- bzero(hc, sizeof(struct sr_hardc));
-
- if (sr_allocate_ioport(device, 0, SRC_IO_SIZ)) {
- return (ENXIO);
- }
-
- /*
- * Now see if the card is realy there.
- */
- error = bus_get_resource(device, SYS_RES_IOPORT, 0, &port_start,
- &port_count);
- port = port_start;
-
- hc->cardtype = SR_CRD_N2;
- hc->cunit = device_get_unit(device);
- hc->iobase = port_start;
- /*
- * We have to fill these in early because the SRC_PUT* and SRC_GET*
- * macros use them.
- */
- hc->src_get8 = src_get8_io;
- hc->src_get16 = src_get16_io;
- hc->src_put8 = src_put8_io;
- hc->src_put16 = src_put16_io;
-
- hc->sca = 0;
- hc->numports = NCHAN; /* assumed # of channels on the card */
-
- flags = device_get_flags(device);
- if (flags & SR_FLAGS_NCHAN_MSK)
- hc->numports = flags & SR_FLAGS_NCHAN_MSK;
-
- outb(port + SR_PCR, 0); /* turn off the card */
-
- /*
- * Next, we'll test the Base Address Register to retension of
- * data... ... seeing if we're *really* talking to an N2.
- */
- for (i = 0; i < 0x100; i++) {
- outb(port + SR_BAR, i);
- inb(port + SR_PCR);
- tmp = inb(port + SR_BAR);
- if (tmp != i) {
- printf("sr%d: probe failed BAR %x, %x.\n",
- hc->cunit, i, tmp);
- goto errexit;
- }
- }
-
- /*
- * Now see if we can see the SCA.
- */
- outb(port + SR_PCR, SR_PCR_SCARUN | inb(port + SR_PCR));
- SRC_PUT8(port, sca->wcrl, 0);
- SRC_PUT8(port, sca->wcrm, 0);
- SRC_PUT8(port, sca->wcrh, 0);
- SRC_PUT8(port, sca->pcr, 0);
- SRC_PUT8(port, sca->msci[0].tmc, 0);
- inb(port);
-
- tmp = SRC_GET8(port, sca->msci[0].tmc);
- if (tmp != 0) {
- printf("sr%d: Error reading SCA 0, %x\n", hc->cunit, tmp);
- goto errexit;
- }
- SRC_PUT8(port, sca->msci[0].tmc, 0x5A);
- inb(port);
-
- tmp = SRC_GET8(port, sca->msci[0].tmc);
- if (tmp != 0x5A) {
- printf("sr%d: Error reading SCA 0x5A, %x\n", hc->cunit, tmp);
- goto errexit;
- }
- SRC_PUT16(port, sca->dmac[0].cda, 0);
- inb(port);
-
- tmp = SRC_GET16(port, sca->dmac[0].cda);
- if (tmp != 0) {
- printf("sr%d: Error reading SCA 0, %x\n", hc->cunit, tmp);
- goto errexit;
- }
- SRC_PUT16(port, sca->dmac[0].cda, 0x55AA);
- inb(port);
-
- tmp = SRC_GET16(port, sca->dmac[0].cda);
- if (tmp != 0x55AA) {
- printf("sr%d: Error reading SCA 0x55AA, %x\n",
- hc->cunit, tmp);
- goto errexit;
- }
-
- membase = bus_get_resource_start(device, SYS_RES_MEMORY, 0);
- memsize = SRC_WIN_SIZ;
- if (bus_set_resource(device, SYS_RES_MEMORY, 0, membase, memsize))
- goto errexit;
-
- if (sr_allocate_memory(device, 0, SRC_WIN_SIZ))
- goto errexit;
-
- if (src_dpram_size(device) < 4)
- goto errexit;
-
- if (sr_allocate_irq(device, 0, 1))
- goto errexit;
-
- if (bus_get_resource(device, SYS_RES_IRQ, 0, &irq, &junk)) {
- goto errexit;
- }
- /*
- * Do a little sanity check.
- */
- if (sr_irqtable[irq] == 0)
- printf("sr%d: Warning: illegal interrupt %ld chosen.\n",
- hc->cunit, irq);
-
- /*
- * Bogus card configuration
- */
- if ((hc->numports > NCHAN) /* only 2 ports/card */
- ||(hc->memsize > (512 * 1024))) /* no more than 256K */
- goto errexit;
-
- sr_deallocate_resources(device);
- return (0);
-
-errexit:
- sr_deallocate_resources(device);
- return (ENXIO);
-}
-
-/*
- * srattach_isa and srattach_pci allocate memory for hardc, softc and
- * data buffers. It also does any initialization that is bus specific.
- * At the end they call the common srattach() function.
- */
-static int
-sr_isa_attach (device_t device)
-{
- u_char mar;
- u_int32_t flags;
- struct sr_hardc *hc;
-
- hc = device_get_softc(device);
- bzero(hc, sizeof(struct sr_hardc));
-
- if (sr_allocate_ioport(device, 0, SRC_IO_SIZ))
- goto errexit;
- if (sr_allocate_memory(device, 0, SRC_WIN_SIZ))
- goto errexit;
- if (sr_allocate_irq(device, 0, 1))
- goto errexit;
-
- /*
- * We have to fill these in early because the SRC_PUT* and SRC_GET*
- * macros use them.
- */
- hc->src_get8 = src_get8_io;
- hc->src_get16 = src_get16_io;
- hc->src_put8 = src_put8_io;
- hc->src_put16 = src_put16_io;
-
- hc->cardtype = SR_CRD_N2;
- hc->cunit = device_get_unit(device);
- hc->sca = 0;
- hc->numports = NCHAN; /* assumed # of channels on the card */
- flags = device_get_flags(device);
- if (flags & SR_FLAGS_NCHAN_MSK)
- hc->numports = flags & SR_FLAGS_NCHAN_MSK;
-
- hc->iobase = rman_get_start(hc->res_ioport);
- hc->sca_base = hc->iobase;
- hc->mem_start = (caddr_t)rman_get_virtual(hc->res_memory);
- hc->mem_end = hc->mem_start + SRC_WIN_SIZ;
- hc->mem_pstart = 0;
- hc->winmsk = SRC_WIN_MSK;
-
- hc->mempages = src_dpram_size(device);
- hc->memsize = hc->mempages * SRC_WIN_SIZ;
-
- outb(hc->iobase + SR_PCR, inb(hc->iobase + SR_PCR) | SR_PCR_SCARUN);
- outb(hc->iobase + SR_PSR, inb(hc->iobase + SR_PSR) | SR_PSR_EN_SCA_DMA);
- outb(hc->iobase + SR_MCR,
- SR_MCR_DTR0 | SR_MCR_DTR1 | SR_MCR_TE0 | SR_MCR_TE1);
-
- SRC_SET_ON(hc->iobase);
-
- /*
- * Configure the card. Mem address, irq,
- */
- mar = (rman_get_start(hc->res_memory) >> 16) & SR_PCR_16M_SEL;
- outb(hc->iobase + SR_PCR,
- mar | (inb(hc->iobase + SR_PCR) & ~SR_PCR_16M_SEL));
- mar = rman_get_start(hc->res_memory) >> 12;
- outb(hc->iobase + SR_BAR, mar);
-
- return sr_attach(device);
-
-errexit:
- sr_deallocate_resources(device);
- return (ENXIO);
-}
-
-/*
- * I/O for ISA N2 card(s)
- */
-#define SRC_REG(iobase,y) ((((y) & 0xf) + (((y) & 0xf0) << 6) + \
- (iobase)) | 0x8000)
-
-static u_int
-src_get8_io(u_int base, u_int off)
-{
- return inb(SRC_REG(base, off));
-}
-
-static u_int
-src_get16_io(u_int base, u_int off)
-{
- return inw(SRC_REG(base, off));
-}
-
-static void
-src_put8_io(u_int base, u_int off, u_int val)
-{
- outb(SRC_REG(base, off), val);
-}
-
-static void
-src_put16_io(u_int base, u_int off, u_int val)
-{
- outw(SRC_REG(base, off), val);
-}
-
-static u_int
-src_dpram_size(device_t device)
-{
- u_int pgs, i;
- u_short port;
- u_short *smem;
- u_char mar;
- u_long membase;
- struct sr_hardc *hc;
-
- hc = device_get_softc(device);
- port = hc->iobase;
-
- /*
- * OK, the board's interface registers seem to work. Now we'll see
- * if the Dual-Ported RAM is fully accessible...
- */
- outb(port + SR_PCR, SR_PCR_EN_VPM | SR_PCR_ISA16);
- outb(port + SR_PSR, SR_PSR_WIN_16K);
-
- /*
- * Take the kernel "virtual" address supplied to us and convert
- * it to a "real" address. Then program the card to use that.
- */
- membase = rman_get_start(hc->res_memory);
- mar = (membase >> 16) & SR_PCR_16M_SEL;
- outb(port + SR_PCR, mar | inb(port + SR_PCR));
- mar = membase >> 12;
- outb(port + SR_BAR, mar);
- outb(port + SR_PCR, inb(port + SR_PCR) | SR_PCR_MEM_WIN);
- smem = (u_short *)rman_get_virtual(hc->res_memory);/* DP RAM Address */
- /*
- * Here we will perform the memory scan to size the device.
- *
- * This is done by marking each potential page with a magic number.
- * We then loop through the pages looking for that magic number. As
- * soon as we no longer see that magic number, we'll quit the scan,
- * knowing that no more memory is present. This provides the number
- * of pages present on the card.
- *
- * Note: We're sizing 16K memory granules.
- */
- for (i = 0; i <= SR_PSR_PG_SEL; i++) {
- outb(port + SR_PSR,
- (inb(port + SR_PSR) & ~SR_PSR_PG_SEL) | i);
-
- *smem = 0xAA55;
- }
-
- for (i = 0; i <= SR_PSR_PG_SEL; i++) {
- outb(port + SR_PSR,
- (inb(port + SR_PSR) & ~SR_PSR_PG_SEL) | i);
-
- if (*smem != 0xAA55) {
- /*
- * If we have less than 64k of memory, give up. That
- * is 4 x 16k pages.
- */
- if (i < 4) {
- printf("sr%d: Bad mem page %d, mem %x, %x.\n",
- hc->cunit, i, 0xAA55, *smem);
- return 0;
- }
- break;
- }
- *smem = i;
- }
-
- hc->mempages = i;
- hc->memsize = i * SRC_WIN_SIZ;
- hc->winmsk = SRC_WIN_MSK;
- pgs = i; /* final count of 16K pages */
-
- /*
- * This next loop erases the contents of that page in DPRAM
- */
- for (i = 0; i <= pgs; i++) {
- outb(port + SR_PSR,
- (inb(port + SR_PSR) & ~SR_PSR_PG_SEL) | i);
- bzero(smem, SRC_WIN_SIZ);
- }
-
- SRC_SET_OFF(port);
- return (pgs);
-}
diff --git a/sys/dev/sr/if_sr_pci.c b/sys/dev/sr/if_sr_pci.c
deleted file mode 100644
index 5b2b95aa35e9..000000000000
--- a/sys/dev/sr/if_sr_pci.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 1996 - 2001 John Hay.
- * Copyright (c) 1996 SDL Communications, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/bus.h>
-#include <machine/bus.h>
-#include <machine/resource.h>
-#include <machine/bus_pio.h>
-#include <machine/bus_memio.h>
-#include <sys/rman.h>
-
-#include <pci/pcivar.h>
-#include <machine/md_var.h>
-
-#include <dev/ic/hd64570.h>
-#include <dev/sr/if_srregs.h>
-
-#ifndef BUGGY
-#define BUGGY 0
-#endif
-
-static int sr_pci_probe(device_t);
-static int sr_pci_attach(device_t);
-
-static device_method_t sr_pci_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, sr_pci_probe),
- DEVMETHOD(device_attach, sr_pci_attach),
- DEVMETHOD(device_detach, sr_detach),
- { 0, 0 }
-};
-
-static driver_t sr_pci_driver = {
- "sr",
- sr_pci_methods,
- sizeof(struct sr_hardc),
-};
-
-DRIVER_MODULE(if_sr, pci, sr_pci_driver, sr_devclass, 0, 0);
-
-static u_int src_get8_mem(u_int base, u_int off);
-static u_int src_get16_mem(u_int base, u_int off);
-static void src_put8_mem(u_int base, u_int off, u_int val);
-static void src_put16_mem(u_int base, u_int off, u_int val);
-
-static int
-sr_pci_probe(device_t device)
-{
- u_int32_t type = pci_get_devid(device);
-
- switch(type) {
- case 0x556812aa:
- device_set_desc(device, "RISCom/N2pci");
- return (0);
- break;
- case 0x55684778:
- case 0x55684877:
- /*
- * XXX This can probably be removed sometime.
- */
- device_set_desc(device, "RISCom/N2pci (old id)");
- return (0);
- break;
- default:
- break;
- }
- return (ENXIO);
-}
-
-static int
-sr_pci_attach(device_t device)
-{
- int numports;
- u_int fecr, *fecrp;
- struct sr_hardc *hc;
-
- hc = (struct sr_hardc *)device_get_softc(device);
- bzero(hc, sizeof(struct sr_hardc));
-
- if (sr_allocate_plx_memory(device, 0x10, 1))
- goto errexit;
-
- if (sr_allocate_memory(device, 0x18, 1))
- goto errexit;
-
- if (sr_allocate_irq(device, 0, 1))
- goto errexit;
-
- hc->plx_base = rman_get_virtual(hc->res_plx_memory);
- hc->sca_base = (vm_offset_t)rman_get_virtual(hc->res_memory);
-
- hc->cunit = device_get_unit(device);
-
-
- /*
- * Configure the PLX. This is magic. I'm doing it just like I'm told
- * to. :-)
- *
- * offset
- * 0x00 - Map Range - Mem-mapped to locate anywhere
- * 0x04 - Re-Map - PCI address decode enable
- * 0x18 - Bus Region - 32-bit bus, ready enable
- * 0x1c - Master Range - include all 16 MB
- * 0x20 - Master RAM - Map SCA Base at 0
- * 0x28 - Master Remap - direct master memory enable
- * 0x68 - Interrupt - Enable interrupt (0 to disable)
- *
- * Note: This is "cargo cult" stuff. - jrc
- */
- *((u_int *)(hc->plx_base + 0x00)) = 0xfffff000;
- *((u_int *)(hc->plx_base + 0x04)) = 1;
- *((u_int *)(hc->plx_base + 0x18)) = 0x40030043;
- *((u_int *)(hc->plx_base + 0x1c)) = 0xff000000;
- *((u_int *)(hc->plx_base + 0x20)) = 0;
- *((u_int *)(hc->plx_base + 0x28)) = 0xe9;
- *((u_int *)(hc->plx_base + 0x68)) = 0x10900;
-
- /*
- * Get info from card.
- *
- * Only look for the second port if the first exists. Too many things
- * will break if we have only a second port.
- */
- fecrp = (u_int *)(hc->sca_base + SR_FECR);
- fecr = *fecrp;
- numports = 0;
-
- if (((fecr & SR_FECR_ID0) >> SR_FE_ID0_SHFT) != SR_FE_ID_NONE) {
- numports++;
- if (((fecr & SR_FECR_ID1) >> SR_FE_ID1_SHFT) != SR_FE_ID_NONE)
- numports++;
- }
- if (numports == 0)
- goto errexit;
-
- hc->numports = numports;
- hc->cardtype = SR_CRD_N2PCI;
-
- hc->src_put8 = src_put8_mem;
- hc->src_put16 = src_put16_mem;
- hc->src_get8 = src_get8_mem;
- hc->src_get16 = src_get16_mem;
-
- /*
- * Malloc area for tx and rx buffers. For now allocate SRC_WIN_SIZ
- * (16k) for each buffer.
- *
- * Allocate the block below 16M because the N2pci card can only access
- * 16M memory at a time.
- *
- * (We could actually allocate a contiguous block above the 16MB limit,
- * but this would complicate card programming more than we want to
- * right now -jrc)
- */
- hc->memsize = 2 * hc->numports * SRC_WIN_SIZ;
- hc->mem_start = contigmalloc(hc->memsize,
- M_DEVBUF,
- M_NOWAIT,
- 0ul,
- 0xfffffful,
- 0x10000,
- 0x1000000);
-
- if (hc->mem_start == NULL) {
- printf("src%d: pci: failed to allocate buffer space.\n",
- hc->cunit);
- goto errexit;
- }
- hc->winmsk = 0xffffffff;
- hc->mem_end = (caddr_t)((u_int)hc->mem_start + hc->memsize);
- hc->mem_pstart = kvtop(hc->mem_start);
- bzero(hc->mem_start, hc->memsize);
-
- *fecrp = SR_FECR_DTR0
- | SR_FECR_DTR1
- | SR_FECR_TE0
- | SR_FECR_TE1;
-
- if (sr_attach(device))
- goto errexit;
-
- return (0);
-errexit:
- sr_deallocate_resources(device);
- return (ENXIO);
-}
-
-/*
- * I/O for PCI N2 card(s)
- */
-#define SRC_PCI_SCA_REG(y) ((y & 2) ? ((y & 0xfd) + 0x100) : y)
-
-static u_int
-src_get8_mem(u_int base, u_int off)
-{
- return *((u_char *)(base + SRC_PCI_SCA_REG(off)));
-}
-
-static u_int
-src_get16_mem(u_int base, u_int off)
-{
- return *((u_short *)(base + SRC_PCI_SCA_REG(off)));
-}
-
-static void
-src_put8_mem(u_int base, u_int off, u_int val)
-{
- *((u_char *)(base + SRC_PCI_SCA_REG(off))) = (u_char)val;
-}
-
-static void
-src_put16_mem(u_int base, u_int off, u_int val)
-{
- *((u_short *)(base + SRC_PCI_SCA_REG(off))) = (u_short)val;
-}
diff --git a/sys/dev/sr/if_srregs.h b/sys/dev/sr/if_srregs.h
deleted file mode 100644
index 2e2df76b4880..000000000000
--- a/sys/dev/sr/if_srregs.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 1995 - 2001 John Hay.
- * Copyright (c) 1996 SDL Communications, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _IF_SRREGS_H_
-#define _IF_SRREGS_H_
-
-#define NCHAN 2 /* A HD64570 chip have 2 channels */
-
-#define SR_BUF_SIZ 512
-#define SR_TX_BLOCKS 2 /* Sepperate sets of tx buffers */
-
-#define SR_CRD_N2 1
-#define SR_CRD_N2PCI 2
-
-/*
- * RISCom/N2 ISA card.
- */
-#define SRC_IO_SIZ 0x10 /* Actually a lie. It uses a lot more. */
-#define SRC_WIN_SIZ 0x00004000
-#define SRC_WIN_MSK (SRC_WIN_SIZ - 1)
-#define SRC_WIN_SHFT 14
-
-#define SR_FLAGS_NCHAN_MSK 0x0000000F
-#define SR_FLAGS_0_CLK_MSK 0x00000030
-#define SR_FLAGS_0_EXT_CLK 0x00000000 /* External RX clock shared by TX */
-#define SR_FLAGS_0_EXT_SEP_CLK 0x00000010 /* Sepperate external clocks */
-#define SR_FLAGS_0_INT_CLK 0x00000020 /* Internal clock */
-#define SR_FLAGS_1_CLK_MSK 0x000000C0
-#define SR_FLAGS_1_EXT_CLK 0x00000000 /* External RX clock shared by TX */
-#define SR_FLAGS_1_EXT_SEP_CLK 0x00000040 /* Sepperate external clocks */
-#define SR_FLAGS_1_INT_CLK 0x00000080 /* Internal clock */
-
-#define SR_FLAGS_CLK_SHFT 4
-#define SR_FLAGS_CLK_CHAN_SHFT 2
-#define SR_FLAGS_EXT_CLK 0x00000000 /* External RX clock shared by TX */
-#define SR_FLAGS_EXT_SEP_CLK 0x00000001 /* Sepperate external clocks */
-#define SR_FLAGS_INT_CLK 0x00000002 /* Internal clock */
-
-#define SR_PCR 0x00 /* RW, PC Control Register */
-#define SR_BAR 0x02 /* RW, Base Address Register */
-#define SR_PSR 0x04 /* RW, Page Scan Register */
-#define SR_MCR 0x06 /* RW, Modem Control Register */
-
-#define SR_PCR_SCARUN 0x01 /* !Reset */
-#define SR_PCR_EN_VPM 0x02 /* Running above 1M */
-#define SR_PCR_MEM_WIN 0x04 /* Open memory window */
-#define SR_PCR_ISA16 0x08 /* 16 bit ISA mode */
-#define SR_PCR_16M_SEL 0xF0 /* A20-A23 Addresses */
-
-#define SR_PSR_PG_SEL 0x1F /* Page 0 - 31 select */
-#define SR_PG_MSK 0x1F
-#define SR_PSR_WIN_SIZ 0x60 /* Window size select */
-#define SR_PSR_WIN_16K 0x00
-#define SR_PSR_WIN_32K 0x20
-#define SR_PSR_WIN_64K 0x40
-#define SR_PSR_WIN_128K 0x60
-#define SR_PSR_EN_SCA_DMA 0x80 /* Enable the SCA DMA */
-
-#define SR_MCR_DTR0 0x01 /* Deactivate DTR0 */
-#define SR_MCR_DTR1 0x02 /* Deactivate DTR1 */
-#define SR_MCR_DSR0 0x04 /* DSR0 Status */
-#define SR_MCR_DSR1 0x08 /* DSR1 Status */
-#define SR_MCR_TE0 0x10 /* Enable RS422 TXD */
-#define SR_MCR_TE1 0x20 /* Enable RS422 TXD */
-#define SR_MCR_ETC0 0x40 /* Enable Ext Clock out */
-#define SR_MCR_ETC1 0x80 /* Enable Ext Clock out */
-
-/*
- * RISCom/N2 PCI card.
- */
-#define SR_FECR 0x0200 /* Front End Control Register */
-#define SR_FECR_ETC0 0x0001 /* Enable Ext Clock out */
-#define SR_FECR_ETC1 0x0002 /* Enable Ext Clock out */
-#define SR_FECR_TE0 0x0004 /* Enable RS422 TXD */
-#define SR_FECR_TE1 0x0008 /* Enable RS422 TXD */
-#define SR_FECR_GPO0 0x0010 /* General Purpose Output */
-#define SR_FECR_GPO1 0x0020 /* General Purpose Output */
-#define SR_FECR_DTR0 0x0040 /* 0 for active, 1 for inactive */
-#define SR_FECR_DTR1 0x0080 /* 0 for active, 1 for inactive */
-#define SR_FECR_DSR0 0x0100 /* DSR0 Status */
-#define SR_FECR_ID0 0x0E00 /* ID of channel 0 */
-#define SR_FECR_DSR1 0x1000 /* DSR1 Status */
-#define SR_FECR_ID1 0xE000 /* ID of channel 1 */
-
-#define SR_FE_ID_V35 0x00 /* V.35 Interface */
-#define SR_FE_ID_RS232 0x01 /* RS232 Interface */
-#define SR_FE_ID_TEST 0x02 /* Test Board */
-#define SR_FE_ID_RS422 0x03 /* RS422 Interface */
-#define SR_FE_ID_HSSI 0x05 /* HSSI Interface */
-#define SR_FE_ID_X21 0x06 /* X.21 Interface */
-#define SR_FE_ID_NONE 0x07 /* No card present */
-#define SR_FE_ID0_SHFT 9
-#define SR_FE_ID1_SHFT 13
-
-/*
- * These macros are used to hide the difference between the way the
- * ISA N2 cards and the PCI N2 cards access the Hitachi 64570 SCA.
- */
-#define SRC_GET8(base,off) (*hc->src_get8)(base,(u_int)&off)
-#define SRC_GET16(base,off) (*hc->src_get16)(base,(u_int)&off)
-#define SRC_PUT8(base,off,d) (*hc->src_put8)(base,(u_int)&off,d)
-#define SRC_PUT16(base,off,d) (*hc->src_put16)(base,(u_int)&off,d)
-
-/*
- * These macros enable/disable the DPRAM and select the correct
- * DPRAM page.
- */
-#define SRC_GET_WIN(addr) ((addr >> SRC_WIN_SHFT) & SR_PG_MSK)
-
-#define SRC_SET_ON(iobase) outb(iobase+SR_PCR, \
- SR_PCR_MEM_WIN | inb(iobase+SR_PCR))
-#define SRC_SET_MEM(iobase,win) outb(iobase+SR_PSR, SRC_GET_WIN(win) | \
- (inb(iobase+SR_PSR) & ~SR_PG_MSK))
-#define SRC_SET_OFF(iobase) outb(iobase+SR_PCR, \
- ~SR_PCR_MEM_WIN & inb(iobase+SR_PCR))
-
-/*
- * Define the hardware (card information) structure needed to keep
- * track of the device itself... There is only one per card.
- */
-struct sr_hardc {
- struct sr_softc *sc; /* software channels */
- int cunit; /* card w/in system */
-
- u_short iobase; /* I/O Base Address */
- int cardtype;
- int numports; /* # of ports on cd */
- int mempages;
- u_int memsize; /* DPRAM size: bytes */
- u_int winmsk;
- vm_offset_t sca_base;
- vm_offset_t mem_pstart; /* start of buffer */
- caddr_t mem_start; /* start of DP RAM */
- caddr_t mem_end; /* end of DP RAM */
- caddr_t plx_base;
-
- sca_regs *sca; /* register array */
-
- bus_space_tag_t bt;
- bus_space_handle_t bh;
- int rid_ioport;
- int rid_memory;
- int rid_plx_memory;
- int rid_irq;
- struct resource* res_ioport; /* resource for port range */
- struct resource* res_memory; /* resource for mem range */
- struct resource* res_plx_memory;
- struct resource* res_irq; /* resource for irq range */
- void *intr_cookie;
-
- /*
- * We vectorize the following functions to allow re-use between the
- * ISA card's needs and those of the PCI card.
- */
- void (*src_put8)(u_int base, u_int off, u_int val);
- void (*src_put16)(u_int base, u_int off, u_int val);
- u_int (*src_get8)(u_int base, u_int off);
- u_int (*src_get16)(u_int base, u_int off);
-};
-
-extern devclass_t sr_devclass;
-
-int sr_allocate_ioport(device_t device, int rid, u_long size);
-int sr_allocate_irq(device_t device, int rid, u_long size);
-int sr_allocate_memory(device_t device, int rid, u_long size);
-int sr_allocate_plx_memory(device_t device, int rid, u_long size);
-int sr_deallocate_resources(device_t device);
-int sr_attach(device_t device);
-int sr_detach(device_t device);
-
-#endif /* _IF_SRREGS_H_ */
diff --git a/sys/dev/usb/rio500_usb.h b/sys/dev/usb/rio500_usb.h
deleted file mode 100644
index c2da72e91b11..000000000000
--- a/sys/dev/usb/rio500_usb.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* ----------------------------------------------------------------------
-
- Copyright (C) 2000 Cesar Miquel (miquel@df.uba.ar)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted under any licence of your choise which
- meets the open source licence definiton
- http://www.opensource.org/opd.html such as the GNU licence or the
- BSD licence.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License or the BSD license for more details.
-
- ----------------------------------------------------------------------
-
- Modified for FreeBSD by Iwasa Kazmi <kzmi@ca2.so-net.ne.jp>
-
- ---------------------------------------------------------------------- */
-
-/* $FreeBSD$ */
-
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-#include <sys/ioccom.h>
-#ifndef USB_VENDOR_DIAMOND
-#define USB_VENDOR_DIAMOND 0x841
-#endif
-#ifndef USB_PRODUCT_DIAMOND_RIO500USB
-#define USB_PRODUCT_DIAMOND_RIO500USB 0x1
-#endif
-#endif
-
-struct RioCommand
-{
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
- u_int16_t length;
-#else
- short length;
-#endif
- int request;
- int requesttype;
- int value;
- int index;
- void *buffer;
- int timeout;
-};
-
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-#define RIO_SEND_COMMAND _IOWR('U', 200, struct RioCommand)
-#define RIO_RECV_COMMAND _IOWR('U', 201, struct RioCommand)
-#else
-#define RIO_SEND_COMMAND 0x1
-#define RIO_RECV_COMMAND 0x2
-#endif
-
-#define RIO_DIR_OUT 0x0
-#define RIO_DIR_IN 0x1
diff --git a/sys/fs/smbfs/smbfs.h b/sys/fs/smbfs/smbfs.h
deleted file mode 100644
index 5aa72dada3fa..000000000000
--- a/sys/fs/smbfs/smbfs.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _SMBFS_SMBFS_H_
-#define _SMBFS_SMBFS_H_
-
-#define SMBFS_VERMAJ 1
-#define SMBFS_VERMIN 1012
-#define SMBFS_VERSION (SMBFS_VERMAJ*100000 + SMBFS_VERMIN)
-#define SMBFS_VFSNAME "smbfs"
-
-/* Values for flags */
-#define SMBFS_MOUNT_SOFT 0x0001
-#define SMBFS_MOUNT_INTR 0x0002
-#define SMBFS_MOUNT_STRONG 0x0004
-#define SMBFS_MOUNT_HAVE_NLS 0x0008
-#define SMBFS_MOUNT_NO_LONG 0x0010
-
-#define SMBFS_MAXPATHCOMP 256 /* maximum number of path components */
-
-
-/* Layout of the mount control block for a netware file system. */
-struct smbfs_args {
- int version;
- int dev;
- u_int flags;
- char mount_point[MAXPATHLEN];
- u_char root_path[512+1];
- uid_t uid;
- gid_t gid;
- mode_t file_mode;
- mode_t dir_mode;
- int caseopt;
-};
-
-#ifdef _KERNEL
-
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_SMBFSMNT);
-#endif
-
-struct smbnode;
-struct smb_share;
-struct u_cred;
-struct vop_ioctl_args;
-struct buf;
-
-struct smbmount {
- struct smbfs_args sm_args;
- struct mount * sm_mp;
- struct smbnode * sm_root;
- struct ucred * sm_owner;
- int sm_flags;
- long sm_nextino;
- struct smb_share * sm_share;
-/* struct simplelock sm_npslock;*/
- struct smbnode * sm_npstack[SMBFS_MAXPATHCOMP];
- int sm_caseopt;
- struct lock sm_hashlock;
- LIST_HEAD(smbnode_hashhead, smbnode) *sm_hash;
- u_long sm_hashlen;
-};
-
-#define VFSTOSMBFS(mp) ((struct smbmount *)((mp)->mnt_data))
-#define SMBFSTOVFS(smp) ((struct mount *)((smp)->sm_mp))
-#define VTOVFS(vp) ((vp)->v_mount)
-#define VTOSMBFS(vp) (VFSTOSMBFS(VTOVFS(vp)))
-
-int smbfs_ioctl(struct vop_ioctl_args *ap);
-int smbfs_doio(struct buf *bp, struct ucred *cr, struct proc *p);
-int smbfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
- struct proc *p, int intrflg);
-#endif /* KERNEL */
-
-#endif /* _SMBFS_SMBFS_H_ */
diff --git a/sys/fs/smbfs/smbfs_node.h b/sys/fs/smbfs/smbfs_node.h
deleted file mode 100644
index 1a5a643a2e0a..000000000000
--- a/sys/fs/smbfs/smbfs_node.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _FS_SMBFS_NODE_H_
-#define _FS_SMBFS_NODE_H_
-
-#define SMBFS_ROOT_INO 2 /* just like in UFS */
-
-/* Bits for smbnode.n_flag */
-#define NFLUSHINPROG 0x0001
-#define NFLUSHWANT 0x0002 /* they should gone ... */
-#define NMODIFIED 0x0004 /* bogus, until async IO implemented */
-/*efine NNEW 0x0008*//* smb/vnode has been allocated */
-#define NREFPARENT 0x0010 /* node holds parent from recycling */
-
-struct smbfs_fctx;
-
-struct smbnode {
-#ifndef FB_CURRENT
- struct lock n_lock; /* smbnode lock. (mbf) */
-#endif
- int n_flag;
- struct smbnode * n_parent;
- struct vnode * n_vnode;
- struct smbmount * n_mount;
- time_t n_attrage; /* attributes cache time */
-/* time_t n_ctime;*/
- struct timespec n_mtime; /* modify time */
- struct timespec n_atime; /* last access time */
- u_quad_t n_size;
- long n_ino;
- int n_dosattr;
- int n_opencount;
- u_int16_t n_fid; /* file handle */
- int n_rwstate; /* granted access mode */
- u_char n_nmlen;
- u_char * n_name;
- struct smbfs_fctx * n_dirseq; /* ff context */
- long n_dirofs; /* last ff offset */
- struct lockf * n_lockf; /* Locking records of file */
- LIST_ENTRY(smbnode) n_hash;
-};
-
-#define VTOSMB(vp) ((struct smbnode *)(vp)->v_data)
-#define SMBTOV(np) ((struct vnode *)(np)->n_vnode)
-
-struct vop_getpages_args;
-struct vop_inactive_args;
-struct vop_putpages_args;
-struct vop_reclaim_args;
-struct ucred;
-struct uio;
-struct smbfattr;
-
-int smbfs_inactive(struct vop_inactive_args *);
-int smbfs_reclaim(struct vop_reclaim_args *);
-int smbfs_nget(struct mount *mp, struct vnode *dvp, const char *name, int nmlen,
- struct smbfattr *fap, struct vnode **vpp);
-u_int32_t smbfs_hash(const u_char *name, int nmlen);
-
-int smbfs_getpages(struct vop_getpages_args *);
-int smbfs_putpages(struct vop_putpages_args *);
-int smbfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred);
-int smbfs_writevnode(struct vnode *vp, struct uio *uiop, struct ucred *cred, int ioflag);
-void smbfs_attr_cacheenter(struct vnode *vp, struct smbfattr *fap);
-int smbfs_attr_cachelookup(struct vnode *vp ,struct vattr *va);
-
-#define smbfs_attr_cacheremove(vp) VTOSMB(vp)->n_attrage = 0
-
-#endif /* _FS_SMBFS_NODE_H_ */
diff --git a/sys/fs/smbfs/smbfs_smb.c b/sys/fs/smbfs/smbfs_smb.c
deleted file mode 100644
index 373d5c141a61..000000000000
--- a/sys/fs/smbfs/smbfs_smb.c
+++ /dev/null
@@ -1,1273 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/proc.h>
-#include <sys/lock.h>
-#include <sys/vnode.h>
-#include <sys/mbuf.h>
-#include <sys/mount.h>
-
-#ifdef USE_MD5_HASH
-#include <sys/md5.h>
-#endif
-
-#include <netsmb/smb.h>
-#include <netsmb/smb_subr.h>
-#include <netsmb/smb_rq.h>
-#include <netsmb/smb_conn.h>
-
-#include <fs/smbfs/smbfs.h>
-#include <fs/smbfs/smbfs_node.h>
-#include <fs/smbfs/smbfs_subr.h>
-
-/*
- * Lack of inode numbers leads us to the problem of generating them.
- * Partially this problem can be solved by having a dir/file cache
- * with inode numbers generated from the incremented by one counter.
- * However this way will require too much kernel memory, gives all
- * sorts of locking and consistency problems, not to mentinon counter overflows.
- * So, I'm decided to use a hash function to generate pseudo random (and unique)
- * inode numbers.
- */
-static long
-smbfs_getino(struct smbnode *dnp, const char *name, int nmlen)
-{
-#ifdef USE_MD5_HASH
- MD5_CTX md5;
- u_int32_t state[4];
- long ino;
- int i;
-
- MD5Init(&md5);
- MD5Update(&md5, name, nmlen);
- MD5Final((u_char *)state, &md5);
- for (i = 0, ino = 0; i < 4; i++)
- ino += state[i];
- return dnp->n_ino + ino;
-#endif
- u_int32_t ino;
-
- ino = dnp->n_ino + smbfs_hash(name, nmlen);
- if (ino <= 2)
- ino += 3;
- return ino;
-}
-
-static int
-smbfs_smb_lockandx(struct smbnode *np, int op, u_int32_t pid, off_t start, off_t end,
- struct smb_cred *scred)
-{
- struct smb_share *ssp = np->n_mount->sm_share;
- struct smb_rq rq, *rqp = &rq;
- struct mbchain *mbp;
- u_char ltype = 0;
- int error;
-
- if (op == SMB_LOCK_SHARED)
- ltype |= SMB_LOCKING_ANDX_SHARED_LOCK;
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_LOCKING_ANDX, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_uint8(mbp, 0xff); /* secondary command */
- mb_put_uint8(mbp, 0); /* MBZ */
- mb_put_uint16le(mbp, 0);
- mb_put_mem(mbp, (caddr_t)&np->n_fid, 2, MB_MSYSTEM);
- mb_put_uint8(mbp, ltype); /* locktype */
- mb_put_uint8(mbp, 0); /* oplocklevel - 0 seems is NO_OPLOCK */
- mb_put_uint32le(mbp, 0); /* timeout - break immediately */
- mb_put_uint16le(mbp, op == SMB_LOCK_RELEASE ? 1 : 0);
- mb_put_uint16le(mbp, op == SMB_LOCK_RELEASE ? 0 : 1);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint16le(mbp, pid);
- mb_put_uint32le(mbp, start);
- mb_put_uint32le(mbp, end - start);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smbfs_smb_lock(struct smbnode *np, int op, caddr_t id,
- off_t start, off_t end, struct smb_cred *scred)
-{
- struct smb_share *ssp = np->n_mount->sm_share;
-
- if (SMB_DIALECT(SSTOVC(ssp)) < SMB_DIALECT_LANMAN1_0)
- /*
- * TODO: use LOCK_BYTE_RANGE here.
- */
- return EINVAL;
- else
- return smbfs_smb_lockandx(np, op, (u_int32_t)id, start, end, scred);
-}
-
-int
-smbfs_smb_statfs2(struct smb_share *ssp, struct statfs *sbp,
- struct smb_cred *scred)
-{
- struct smb_t2rq *t2p;
- struct mbchain *mbp;
- struct mdchain *mdp;
- u_int16_t bsize;
- u_int32_t units, bpu, funits;
- int error;
-
- error = smb_t2_alloc(SSTOCP(ssp), SMB_TRANS2_QUERY_FS_INFORMATION,
- scred, &t2p);
- if (error)
- return error;
- mbp = &t2p->t2_tparam;
- mb_init(mbp);
- mb_put_uint16le(mbp, SMB_INFO_ALLOCATION);
- t2p->t2_maxpcount = 4;
- t2p->t2_maxdcount = 4 * 4 + 2;
- error = smb_t2_request(t2p);
- if (error) {
- smb_t2_done(t2p);
- return error;
- }
- mdp = &t2p->t2_rdata;
- md_get_uint32(mdp, NULL); /* fs id */
- md_get_uint32le(mdp, &bpu);
- md_get_uint32le(mdp, &units);
- md_get_uint32le(mdp, &funits);
- md_get_uint16le(mdp, &bsize);
- sbp->f_bsize = bpu * bsize; /* fundamental file system block size */
- sbp->f_blocks= units; /* total data blocks in file system */
- sbp->f_bfree = funits; /* free blocks in fs */
- sbp->f_bavail= funits; /* free blocks avail to non-superuser */
- sbp->f_files = 0xffff; /* total file nodes in file system */
- sbp->f_ffree = 0xffff; /* free file nodes in fs */
- smb_t2_done(t2p);
- return 0;
-}
-
-int
-smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp,
- struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct mdchain *mdp;
- u_int16_t units, bpu, bsize, funits;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_QUERY_INFORMATION_DISK, scred);
- if (error)
- return error;
- smb_rq_wstart(rqp);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- if (error) {
- smb_rq_done(rqp);
- return error;
- }
- smb_rq_getreply(rqp, &mdp);
- md_get_uint16le(mdp, &units);
- md_get_uint16le(mdp, &bpu);
- md_get_uint16le(mdp, &bsize);
- md_get_uint16le(mdp, &funits);
- sbp->f_bsize = bpu * bsize; /* fundamental file system block size */
- sbp->f_blocks= units; /* total data blocks in file system */
- sbp->f_bfree = funits; /* free blocks in fs */
- sbp->f_bavail= funits; /* free blocks avail to non-superuser */
- sbp->f_files = 0xffff; /* total file nodes in file system */
- sbp->f_ffree = 0xffff; /* free file nodes in fs */
- smb_rq_done(rqp);
- return 0;
-}
-
-int
-smbfs_smb_setfsize(struct smbnode *np, int newsize, struct smb_cred *scred)
-{
- struct smb_share *ssp = np->n_mount->sm_share;
- struct smb_rq rq, *rqp = &rq;
- struct mbchain *mbp;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_WRITE, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_mem(mbp, (caddr_t)&np->n_fid, 2, MB_MSYSTEM);
- mb_put_uint16le(mbp, 0);
- mb_put_uint32le(mbp, newsize);
- mb_put_uint16le(mbp, 0);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_DATA);
- mb_put_uint16le(mbp, 0);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- smb_rq_done(rqp);
- return error;
-}
-
-
-/*
- * Set DOS file attributes. mtime should be NULL for dialects above lm10
- */
-int
-smbfs_smb_setpattr(struct smbnode *np, u_int16_t attr, struct timespec *mtime,
- struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct smb_share *ssp = np->n_mount->sm_share;
- struct mbchain *mbp;
- u_long time;
- int error, svtz;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_SET_INFORMATION, scred);
- if (error)
- return error;
- svtz = SSTOVC(ssp)->vc_sopt.sv_tz;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, attr);
- if (mtime) {
- smb_time_local2server(mtime, svtz, &time);
- } else
- time = 0;
- mb_put_uint32le(mbp, time); /* mtime */
- mb_put_mem(mbp, NULL, 5 * 2, MB_MZERO);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_ASCII);
- do {
- error = smbfs_fullpath(mbp, SSTOVC(ssp), np, NULL, 0);
- if (error)
- break;
- mb_put_uint8(mbp, SMB_DT_ASCII);
- mb_put_uint8(mbp, 0);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- SMBERROR("%d\n", error);
- if (error)
- break;
- } while(0);
- smb_rq_done(rqp);
- return error;
-}
-
-/*
- * Note, win95 doesn't support this call.
- */
-int
-smbfs_smb_setptime2(struct smbnode *np, struct timespec *mtime,
- struct timespec *atime, int attr, struct smb_cred *scred)
-{
- struct smb_t2rq *t2p;
- struct smb_share *ssp = np->n_mount->sm_share;
- struct smb_vc *vcp = SSTOVC(ssp);
- struct mbchain *mbp;
- u_int16_t date, time;
- int error, tzoff;
-
- error = smb_t2_alloc(SSTOCP(ssp), SMB_TRANS2_SET_PATH_INFORMATION,
- scred, &t2p);
- if (error)
- return error;
- mbp = &t2p->t2_tparam;
- mb_init(mbp);
- mb_put_uint16le(mbp, SMB_INFO_STANDARD);
- mb_put_uint32le(mbp, 0); /* MBZ */
- error = smbfs_fullpath(mbp, vcp, np, NULL, 0);
- if (error) {
- smb_t2_done(t2p);
- return error;
- }
- tzoff = vcp->vc_sopt.sv_tz;
- mbp = &t2p->t2_tdata;
- mb_init(mbp);
- mb_put_uint32le(mbp, 0); /* creation time */
- if (atime)
- smb_time_unix2dos(atime, tzoff, &date, &time, NULL);
- else
- time = date = 0;
- mb_put_uint16le(mbp, date);
- mb_put_uint16le(mbp, time);
- if (mtime)
- smb_time_unix2dos(mtime, tzoff, &date, &time, NULL);
- else
- time = date = 0;
- mb_put_uint16le(mbp, date);
- mb_put_uint16le(mbp, time);
- mb_put_uint32le(mbp, 0); /* file size */
- mb_put_uint32le(mbp, 0); /* allocation unit size */
- mb_put_uint16le(mbp, attr); /* DOS attr */
- mb_put_uint32le(mbp, 0); /* EA size */
- t2p->t2_maxpcount = 5 * 2;
- t2p->t2_maxdcount = vcp->vc_txmax;
- error = smb_t2_request(t2p);
- smb_t2_done(t2p);
- return error;
-}
-
-/*
- * NT level. Specially for win9x
- */
-int
-smbfs_smb_setpattrNT(struct smbnode *np, u_short attr, struct timespec *mtime,
- struct timespec *atime, struct smb_cred *scred)
-{
- struct smb_t2rq *t2p;
- struct smb_share *ssp = np->n_mount->sm_share;
- struct smb_vc *vcp = SSTOVC(ssp);
- struct mbchain *mbp;
- int64_t tm;
- int error, tzoff;
-
- error = smb_t2_alloc(SSTOCP(ssp), SMB_TRANS2_SET_PATH_INFORMATION,
- scred, &t2p);
- if (error)
- return error;
- mbp = &t2p->t2_tparam;
- mb_init(mbp);
- mb_put_uint16le(mbp, SMB_SET_FILE_BASIC_INFO);
- mb_put_uint32le(mbp, 0); /* MBZ */
- error = smbfs_fullpath(mbp, vcp, np, NULL, 0);
- if (error) {
- smb_t2_done(t2p);
- return error;
- }
- tzoff = vcp->vc_sopt.sv_tz;
- mbp = &t2p->t2_tdata;
- mb_init(mbp);
- mb_put_int64le(mbp, 0); /* creation time */
- if (atime) {
- smb_time_local2NT(atime, tzoff, &tm);
- } else
- tm = 0;
- mb_put_int64le(mbp, tm);
- if (mtime) {
- smb_time_local2NT(mtime, tzoff, &tm);
- } else
- tm = 0;
- mb_put_int64le(mbp, tm);
- mb_put_int64le(mbp, tm); /* change time */
- mb_put_uint32le(mbp, attr); /* attr */
- t2p->t2_maxpcount = 24;
- t2p->t2_maxdcount = 56;
- error = smb_t2_request(t2p);
- smb_t2_done(t2p);
- return error;
-}
-
-/*
- * Set file atime and mtime. Doesn't supported by core dialect.
- */
-int
-smbfs_smb_setftime(struct smbnode *np, struct timespec *mtime,
- struct timespec *atime, struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct smb_share *ssp = np->n_mount->sm_share;
- struct mbchain *mbp;
- u_int16_t date, time;
- int error, tzoff;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_SET_INFORMATION2, scred);
- if (error)
- return error;
- tzoff = SSTOVC(ssp)->vc_sopt.sv_tz;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_mem(mbp, (caddr_t)&np->n_fid, 2, MB_MSYSTEM);
- mb_put_uint32le(mbp, 0); /* creation time */
-
- if (atime)
- smb_time_unix2dos(atime, tzoff, &date, &time, NULL);
- else
- time = date = 0;
- mb_put_uint16le(mbp, date);
- mb_put_uint16le(mbp, time);
- if (mtime)
- smb_time_unix2dos(mtime, tzoff, &date, &time, NULL);
- else
- time = date = 0;
- mb_put_uint16le(mbp, date);
- mb_put_uint16le(mbp, time);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- SMBSDEBUG("%d\n", error);
- smb_rq_done(rqp);
- return error;
-}
-
-/*
- * Set DOS file attributes.
- * Looks like this call can be used only if CAP_NT_SMBS bit is on.
- */
-int
-smbfs_smb_setfattrNT(struct smbnode *np, u_int16_t attr, struct timespec *mtime,
- struct timespec *atime, struct smb_cred *scred)
-{
- struct smb_t2rq *t2p;
- struct smb_share *ssp = np->n_mount->sm_share;
- struct mbchain *mbp;
- int64_t tm;
- int error, svtz;
-
- error = smb_t2_alloc(SSTOCP(ssp), SMB_TRANS2_SET_FILE_INFORMATION,
- scred, &t2p);
- if (error)
- return error;
- svtz = SSTOVC(ssp)->vc_sopt.sv_tz;
- mbp = &t2p->t2_tparam;
- mb_init(mbp);
- mb_put_mem(mbp, (caddr_t)&np->n_fid, 2, MB_MSYSTEM);
- mb_put_uint16le(mbp, SMB_SET_FILE_BASIC_INFO);
- mb_put_uint32le(mbp, 0);
- mbp = &t2p->t2_tdata;
- mb_init(mbp);
- mb_put_int64le(mbp, 0); /* creation time */
- if (atime) {
- smb_time_local2NT(atime, svtz, &tm);
- } else
- tm = 0;
- mb_put_int64le(mbp, tm);
- if (mtime) {
- smb_time_local2NT(mtime, svtz, &tm);
- } else
- tm = 0;
- mb_put_int64le(mbp, tm);
- mb_put_int64le(mbp, tm); /* change time */
- mb_put_uint16le(mbp, attr);
- mb_put_uint32le(mbp, 0); /* padding */
- mb_put_uint16le(mbp, 0);
- t2p->t2_maxpcount = 2;
- t2p->t2_maxdcount = 0;
- error = smb_t2_request(t2p);
- smb_t2_done(t2p);
- return error;
-}
-
-
-int
-smbfs_smb_open(struct smbnode *np, int accmode, struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct smb_share *ssp = np->n_mount->sm_share;
- struct mbchain *mbp;
- struct mdchain *mdp;
- u_int8_t wc;
- u_int16_t fid, wattr, grantedmode;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_OPEN, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, accmode);
- mb_put_uint16le(mbp, SMB_FA_SYSTEM | SMB_FA_HIDDEN);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_ASCII);
- do {
- error = smbfs_fullpath(mbp, SSTOVC(ssp), np, NULL, 0);
- if (error)
- break;
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- if (error)
- break;
- smb_rq_getreply(rqp, &mdp);
- if (md_get_uint8(mdp, &wc) != 0 || wc != 7) {
- error = EBADRPC;
- break;
- }
- md_get_uint16(mdp, &fid);
- md_get_uint16le(mdp, &wattr);
- md_get_uint32(mdp, NULL); /* mtime */
- md_get_uint32(mdp, NULL); /* fsize */
- md_get_uint16le(mdp, &grantedmode);
- /*
- * TODO: refresh attributes from this reply
- */
- } while(0);
- smb_rq_done(rqp);
- if (error)
- return error;
- np->n_fid = fid;
- np->n_rwstate = grantedmode;
- return 0;
-}
-
-
-int
-smbfs_smb_close(struct smb_share *ssp, u_int16_t fid, struct timespec *mtime,
- struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct mbchain *mbp;
- u_long time;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_CLOSE, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_mem(mbp, (caddr_t)&fid, sizeof(fid), MB_MSYSTEM);
- if (mtime) {
- smb_time_local2server(mtime, SSTOVC(ssp)->vc_sopt.sv_tz, &time);
- } else
- time = 0;
- mb_put_uint32le(mbp, time);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smbfs_smb_create(struct smbnode *dnp, const char *name, int nmlen,
- struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct smb_share *ssp = dnp->n_mount->sm_share;
- struct mbchain *mbp;
- struct mdchain *mdp;
- struct timespec ctime;
- u_int8_t wc;
- u_int16_t fid;
- u_long tm;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_CREATE, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, SMB_FA_ARCHIVE); /* attributes */
- nanotime(&ctime);
- smb_time_local2server(&ctime, SSTOVC(ssp)->vc_sopt.sv_tz, &tm);
- mb_put_uint32le(mbp, tm);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_ASCII);
- error = smbfs_fullpath(mbp, SSTOVC(ssp), dnp, name, nmlen);
- if (!error) {
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- if (!error) {
- smb_rq_getreply(rqp, &mdp);
- md_get_uint8(mdp, &wc);
- if (wc == 1)
- md_get_uint16(mdp, &fid);
- else
- error = EBADRPC;
- }
- }
- smb_rq_done(rqp);
- if (error)
- return error;
- smbfs_smb_close(ssp, fid, &ctime, scred);
- return error;
-}
-
-int
-smbfs_smb_delete(struct smbnode *np, struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct smb_share *ssp = np->n_mount->sm_share;
- struct mbchain *mbp;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_DELETE, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, SMB_FA_SYSTEM | SMB_FA_HIDDEN);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_ASCII);
- error = smbfs_fullpath(mbp, SSTOVC(ssp), np, NULL, 0);
- if (!error) {
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- }
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smbfs_smb_rename(struct smbnode *src, struct smbnode *tdnp,
- const char *tname, int tnmlen, struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct smb_share *ssp = src->n_mount->sm_share;
- struct mbchain *mbp;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_RENAME, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, SMB_FA_SYSTEM | SMB_FA_HIDDEN);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_ASCII);
- do {
- error = smbfs_fullpath(mbp, SSTOVC(ssp), src, NULL, 0);
- if (error)
- break;
- mb_put_uint8(mbp, SMB_DT_ASCII);
- error = smbfs_fullpath(mbp, SSTOVC(ssp), tdnp, tname, tnmlen);
- if (error)
- break;
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- } while(0);
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smbfs_smb_move(struct smbnode *src, struct smbnode *tdnp,
- const char *tname, int tnmlen, u_int16_t flags, struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct smb_share *ssp = src->n_mount->sm_share;
- struct mbchain *mbp;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_MOVE, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, SMB_TID_UNKNOWN);
- mb_put_uint16le(mbp, 0x20); /* delete target file */
- mb_put_uint16le(mbp, flags);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_ASCII);
- do {
- error = smbfs_fullpath(mbp, SSTOVC(ssp), src, NULL, 0);
- if (error)
- break;
- mb_put_uint8(mbp, SMB_DT_ASCII);
- error = smbfs_fullpath(mbp, SSTOVC(ssp), tdnp, tname, tnmlen);
- if (error)
- break;
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- } while(0);
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smbfs_smb_mkdir(struct smbnode *dnp, const char *name, int len,
- struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct smb_share *ssp = dnp->n_mount->sm_share;
- struct mbchain *mbp;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_CREATE_DIRECTORY, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_ASCII);
- error = smbfs_fullpath(mbp, SSTOVC(ssp), dnp, name, len);
- if (!error) {
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- }
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smbfs_smb_rmdir(struct smbnode *np, struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct smb_share *ssp = np->n_mount->sm_share;
- struct mbchain *mbp;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_DELETE_DIRECTORY, scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_ASCII);
- error = smbfs_fullpath(mbp, SSTOVC(ssp), np, NULL, 0);
- if (!error) {
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- }
- smb_rq_done(rqp);
- return error;
-}
-
-static int
-smbfs_smb_search(struct smbfs_fctx *ctx)
-{
- struct smb_vc *vcp = SSTOVC(ctx->f_ssp);
- struct smb_rq *rqp;
- struct mbchain *mbp;
- struct mdchain *mdp;
- u_int8_t wc, bt;
- u_int16_t ec, dlen, bc;
- int maxent, error, iseof = 0;
-
- maxent = min(ctx->f_left, (vcp->vc_txmax - SMB_HDRLEN - 3) / SMB_DENTRYLEN);
- if (ctx->f_rq) {
- smb_rq_done(ctx->f_rq);
- ctx->f_rq = NULL;
- }
- error = smb_rq_alloc(SSTOCP(ctx->f_ssp), SMB_COM_SEARCH, ctx->f_scred, &rqp);
- if (error)
- return error;
- ctx->f_rq = rqp;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, maxent); /* max entries to return */
- mb_put_uint16le(mbp, ctx->f_attrmask);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_ASCII); /* buffer format */
- if (ctx->f_flags & SMBFS_RDD_FINDFIRST) {
- error = smbfs_fullpath(mbp, vcp, ctx->f_dnp, ctx->f_wildcard, ctx->f_wclen);
- if (error)
- return error;
- mb_put_uint8(mbp, SMB_DT_VARIABLE);
- mb_put_uint16le(mbp, 0); /* context length */
- ctx->f_flags &= ~SMBFS_RDD_FINDFIRST;
- } else {
- mb_put_uint8(mbp, 0); /* file name length */
- mb_put_uint8(mbp, SMB_DT_VARIABLE);
- mb_put_uint16le(mbp, SMB_SKEYLEN);
- mb_put_mem(mbp, ctx->f_skey, SMB_SKEYLEN, MB_MSYSTEM);
- }
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- if (error) {
- if (rqp->sr_errclass == ERRDOS && rqp->sr_serror == ERRnofiles) {
- error = 0;
- iseof = 1;
- ctx->f_flags |= SMBFS_RDD_EOF;
- } else
- return error;
- }
- smb_rq_getreply(rqp, &mdp);
- md_get_uint8(mdp, &wc);
- if (wc != 1)
- return iseof ? ENOENT : EBADRPC;
- md_get_uint16le(mdp, &ec);
- if (ec == 0)
- return ENOENT;
- ctx->f_ecnt = ec;
- md_get_uint16le(mdp, &bc);
- if (bc < 3)
- return EBADRPC;
- bc -= 3;
- md_get_uint8(mdp, &bt);
- if (bt != SMB_DT_VARIABLE)
- return EBADRPC;
- md_get_uint16le(mdp, &dlen);
- if (dlen != bc || dlen % SMB_DENTRYLEN != 0)
- return EBADRPC;
- return 0;
-}
-
-static int
-smbfs_findopenLM1(struct smbfs_fctx *ctx, struct smbnode *dnp,
- const char *wildcard, int wclen, int attr, struct smb_cred *scred)
-{
- ctx->f_attrmask = attr;
- if (wildcard) {
- if (wclen == 1 && wildcard[0] == '*') {
- ctx->f_wildcard = "*.*";
- ctx->f_wclen = 3;
- } else {
- ctx->f_wildcard = wildcard;
- ctx->f_wclen = wclen;
- }
- } else {
- ctx->f_wildcard = NULL;
- ctx->f_wclen = 0;
- }
- ctx->f_name = ctx->f_fname;
- return 0;
-}
-
-static int
-smbfs_findnextLM1(struct smbfs_fctx *ctx, int limit)
-{
- struct mdchain *mbp;
- struct smb_rq *rqp;
- char *cp;
- u_int8_t battr;
- u_int16_t date, time;
- u_int32_t size;
- int error;
-
- if (ctx->f_ecnt == 0) {
- if (ctx->f_flags & SMBFS_RDD_EOF)
- return ENOENT;
- ctx->f_left = ctx->f_limit = limit;
- error = smbfs_smb_search(ctx);
- if (error)
- return error;
- }
- rqp = ctx->f_rq;
- smb_rq_getreply(rqp, &mbp);
- md_get_mem(mbp, ctx->f_skey, SMB_SKEYLEN, MB_MSYSTEM);
- md_get_uint8(mbp, &battr);
- md_get_uint16le(mbp, &time);
- md_get_uint16le(mbp, &date);
- md_get_uint32le(mbp, &size);
- cp = ctx->f_name;
- md_get_mem(mbp, cp, sizeof(ctx->f_fname), MB_MSYSTEM);
- cp[sizeof(ctx->f_fname) - 1] = 0;
- cp += strlen(cp) - 1;
- while (*cp == ' ' && cp >= ctx->f_name)
- *cp-- = 0;
- ctx->f_attr.fa_attr = battr;
- smb_dos2unixtime(date, time, 0, rqp->sr_vc->vc_sopt.sv_tz,
- &ctx->f_attr.fa_mtime);
- ctx->f_attr.fa_size = size;
- ctx->f_nmlen = strlen(ctx->f_name);
- ctx->f_ecnt--;
- ctx->f_left--;
- return 0;
-}
-
-static int
-smbfs_findcloseLM1(struct smbfs_fctx *ctx)
-{
- if (ctx->f_rq)
- smb_rq_done(ctx->f_rq);
- return 0;
-}
-
-/*
- * TRANS2_FIND_FIRST2/NEXT2, used for NT LM12 dialect
- */
-static int
-smbfs_smb_trans2find2(struct smbfs_fctx *ctx)
-{
- struct smb_t2rq *t2p;
- struct smb_vc *vcp = SSTOVC(ctx->f_ssp);
- struct mbchain *mbp;
- struct mdchain *mdp;
- u_int16_t tw, flags;
- int error;
-
- if (ctx->f_t2) {
- smb_t2_done(ctx->f_t2);
- ctx->f_t2 = NULL;
- }
- ctx->f_flags &= ~SMBFS_RDD_GOTRNAME;
- flags = 8 | 2; /* <resume> | <close if EOS> */
- if (ctx->f_flags & SMBFS_RDD_FINDSINGLE) {
- flags |= 1; /* close search after this request */
- ctx->f_flags |= SMBFS_RDD_NOCLOSE;
- }
- if (ctx->f_flags & SMBFS_RDD_FINDFIRST) {
- error = smb_t2_alloc(SSTOCP(ctx->f_ssp), SMB_TRANS2_FIND_FIRST2,
- ctx->f_scred, &t2p);
- if (error)
- return error;
- ctx->f_t2 = t2p;
- mbp = &t2p->t2_tparam;
- mb_init(mbp);
- mb_put_uint16le(mbp, ctx->f_attrmask);
- mb_put_uint16le(mbp, ctx->f_limit);
- mb_put_uint16le(mbp, flags);
- mb_put_uint16le(mbp, ctx->f_infolevel);
- mb_put_uint32le(mbp, 0);
- error = smbfs_fullpath(mbp, vcp, ctx->f_dnp, ctx->f_wildcard, ctx->f_wclen);
- if (error)
- return error;
- } else {
- error = smb_t2_alloc(SSTOCP(ctx->f_ssp), SMB_TRANS2_FIND_NEXT2,
- ctx->f_scred, &t2p);
- if (error)
- return error;
- ctx->f_t2 = t2p;
- mbp = &t2p->t2_tparam;
- mb_init(mbp);
- mb_put_mem(mbp, (caddr_t)&ctx->f_Sid, 2, MB_MSYSTEM);
- mb_put_uint16le(mbp, ctx->f_limit);
- mb_put_uint16le(mbp, ctx->f_infolevel);
- mb_put_uint32le(mbp, 0); /* resume key */
- mb_put_uint16le(mbp, flags);
- if (ctx->f_rname)
- mb_put_mem(mbp, ctx->f_rname, strlen(ctx->f_rname) + 1, MB_MSYSTEM);
- else
- mb_put_uint8(mbp, 0); /* resume file name */
-#if 0
- struct timeval tv;
- tv.tv_sec = 0;
- tv.tv_usec = 200 * 1000; /* 200ms */
- if (vcp->vc_flags & SMBC_WIN95) {
- /*
- * some implementations suggests to sleep here
- * for 200ms, due to the bug in the Win95.
- * I've didn't notice any problem, but put code
- * for it.
- */
- tsleep(&flags, PVFS, "fix95", tvtohz(&tv));
- }
-#endif
- }
- t2p->t2_maxpcount = 5 * 2;
- t2p->t2_maxdcount = vcp->vc_txmax;
- error = smb_t2_request(t2p);
- if (error)
- return error;
- mdp = &t2p->t2_rparam;
- if (ctx->f_flags & SMBFS_RDD_FINDFIRST) {
- if ((error = md_get_uint16(mdp, &ctx->f_Sid)) != 0)
- return error;
- ctx->f_flags &= ~SMBFS_RDD_FINDFIRST;
- }
- if ((error = md_get_uint16le(mdp, &tw)) != 0)
- return error;
- ctx->f_ecnt = tw;
- if ((error = md_get_uint16le(mdp, &tw)) != 0)
- return error;
- if (tw)
- ctx->f_flags |= SMBFS_RDD_EOF | SMBFS_RDD_NOCLOSE;
- if ((error = md_get_uint16le(mdp, &tw)) != 0)
- return error;
- if ((error = md_get_uint16le(mdp, &tw)) != 0)
- return error;
- if (ctx->f_ecnt == 0)
- return ENOENT;
- ctx->f_rnameofs = tw;
- mdp = &t2p->t2_rdata;
- if (mdp->md_top == NULL) {
- printf("bug: ecnt = %d, but data is NULL (please report)\n", ctx->f_ecnt);
- return ENOENT;
- }
- if (mdp->md_top->m_len == 0) {
- printf("bug: ecnt = %d, but m_len = 0 and m_next = %p (please report)\n", ctx->f_ecnt,mbp->mb_top->m_next);
- return ENOENT;
- }
- ctx->f_eofs = 0;
- return 0;
-}
-
-static int
-smbfs_smb_findclose2(struct smbfs_fctx *ctx)
-{
- struct smb_rq rq, *rqp = &rq;
- struct mbchain *mbp;
- int error;
-
- error = smb_rq_init(rqp, SSTOCP(ctx->f_ssp), SMB_COM_FIND_CLOSE2, ctx->f_scred);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_mem(mbp, (caddr_t)&ctx->f_Sid, 2, MB_MSYSTEM);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- smb_rq_done(rqp);
- return error;
-}
-
-static int
-smbfs_findopenLM2(struct smbfs_fctx *ctx, struct smbnode *dnp,
- const char *wildcard, int wclen, int attr, struct smb_cred *scred)
-{
- ctx->f_name = malloc(SMB_MAXFNAMELEN, M_SMBFSDATA, M_WAITOK);
- if (ctx->f_name == NULL)
- return ENOMEM;
- ctx->f_infolevel = SMB_DIALECT(SSTOVC(ctx->f_ssp)) < SMB_DIALECT_NTLM0_12 ?
- SMB_INFO_STANDARD : SMB_FIND_FILE_DIRECTORY_INFO;
- ctx->f_attrmask = attr;
- ctx->f_wildcard = wildcard;
- ctx->f_wclen = wclen;
- return 0;
-}
-
-static int
-smbfs_findnextLM2(struct smbfs_fctx *ctx, int limit)
-{
- struct mdchain *mbp;
- struct smb_t2rq *t2p;
- char *cp;
- u_int8_t tb;
- u_int16_t date, time, wattr;
- u_int32_t size, next, dattr;
- int64_t lint;
- int error, svtz, cnt, fxsz, nmlen, recsz;
-
- if (ctx->f_ecnt == 0) {
- if (ctx->f_flags & SMBFS_RDD_EOF)
- return ENOENT;
- ctx->f_left = ctx->f_limit = limit;
- error = smbfs_smb_trans2find2(ctx);
- if (error)
- return error;
- }
- t2p = ctx->f_t2;
- mbp = &t2p->t2_rdata;
- svtz = SSTOVC(ctx->f_ssp)->vc_sopt.sv_tz;
- switch (ctx->f_infolevel) {
- case SMB_INFO_STANDARD:
- next = 0;
- fxsz = 0;
- md_get_uint16le(mbp, &date);
- md_get_uint16le(mbp, &time); /* creation time */
- md_get_uint16le(mbp, &date);
- md_get_uint16le(mbp, &time); /* access time */
- smb_dos2unixtime(date, time, 0, svtz, &ctx->f_attr.fa_atime);
- md_get_uint16le(mbp, &date);
- md_get_uint16le(mbp, &time); /* access time */
- smb_dos2unixtime(date, time, 0, svtz, &ctx->f_attr.fa_mtime);
- md_get_uint32le(mbp, &size);
- ctx->f_attr.fa_size = size;
- md_get_uint32(mbp, NULL); /* allocation size */
- md_get_uint16le(mbp, &wattr);
- ctx->f_attr.fa_attr = wattr;
- md_get_uint8(mbp, &tb);
- size = nmlen = tb;
- fxsz = 23;
- recsz = next = 24 + nmlen; /* docs misses zero byte at end */
- break;
- case SMB_FIND_FILE_DIRECTORY_INFO:
- md_get_uint32le(mbp, &next);
- md_get_uint32(mbp, NULL); /* file index */
- md_get_int64(mbp, NULL); /* creation time */
- md_get_int64le(mbp, &lint);
- smb_time_NT2local(lint, svtz, &ctx->f_attr.fa_atime);
- md_get_int64le(mbp, &lint);
- smb_time_NT2local(lint, svtz, &ctx->f_attr.fa_mtime);
- md_get_int64le(mbp, &lint);
- smb_time_NT2local(lint, svtz, &ctx->f_attr.fa_ctime);
- md_get_int64le(mbp, &lint); /* file size */
- ctx->f_attr.fa_size = lint;
- md_get_int64(mbp, NULL); /* real size (should use) */
- md_get_uint32(mbp, &dattr); /* EA */
- ctx->f_attr.fa_attr = dattr;
- md_get_uint32le(mbp, &size); /* name len */
- fxsz = 64;
- recsz = next ? next : fxsz + size;
- break;
- default:
- SMBERROR("unexpected info level %d\n", ctx->f_infolevel);
- return EINVAL;
- }
- nmlen = min(size, SMB_MAXFNAMELEN);
- cp = ctx->f_name;
- error = md_get_mem(mbp, cp, nmlen, MB_MSYSTEM);
- if (error)
- return error;
- if (next) {
- cnt = next - nmlen - fxsz;
- if (cnt > 0)
- md_get_mem(mbp, NULL, cnt, MB_MSYSTEM);
- else if (cnt < 0) {
- SMBERROR("out of sync\n");
- return EBADRPC;
- }
- }
- if (nmlen && cp[nmlen - 1] == 0)
- nmlen--;
- if (nmlen == 0)
- return EBADRPC;
-
- next = ctx->f_eofs + recsz;
- if (ctx->f_rnameofs && (ctx->f_flags & SMBFS_RDD_GOTRNAME) == 0 &&
- (ctx->f_rnameofs >= ctx->f_eofs && ctx->f_rnameofs < next)) {
- /*
- * Server needs a resume filename.
- */
- if (ctx->f_rnamelen <= nmlen) {
- if (ctx->f_rname)
- free(ctx->f_rname, M_SMBFSDATA);
- ctx->f_rname = malloc(nmlen + 1, M_SMBFSDATA, M_WAITOK);
- ctx->f_rnamelen = nmlen;
- }
- bcopy(ctx->f_name, ctx->f_rname, nmlen);
- ctx->f_rname[nmlen] = 0;
- ctx->f_flags |= SMBFS_RDD_GOTRNAME;
- }
- ctx->f_nmlen = nmlen;
- ctx->f_eofs = next;
- ctx->f_ecnt--;
- ctx->f_left--;
- return 0;
-}
-
-static int
-smbfs_findcloseLM2(struct smbfs_fctx *ctx)
-{
- if (ctx->f_name)
- free(ctx->f_name, M_SMBFSDATA);
- if (ctx->f_t2)
- smb_t2_done(ctx->f_t2);
- if ((ctx->f_flags & SMBFS_RDD_NOCLOSE) == 0)
- smbfs_smb_findclose2(ctx);
- return 0;
-}
-
-int
-smbfs_findopen(struct smbnode *dnp, const char *wildcard, int wclen, int attr,
- struct smb_cred *scred, struct smbfs_fctx **ctxpp)
-{
- struct smbfs_fctx *ctx;
- int error;
-
- ctx = malloc(sizeof(*ctx), M_SMBFSDATA, M_WAITOK);
- if (ctx == NULL)
- return ENOMEM;
- bzero(ctx, sizeof(*ctx));
- ctx->f_ssp = dnp->n_mount->sm_share;
- ctx->f_dnp = dnp;
- ctx->f_flags = SMBFS_RDD_FINDFIRST;
- ctx->f_scred = scred;
- if (SMB_DIALECT(SSTOVC(ctx->f_ssp)) < SMB_DIALECT_LANMAN2_0 ||
- (dnp->n_mount->sm_args.flags & SMBFS_MOUNT_NO_LONG)) {
- ctx->f_flags |= SMBFS_RDD_USESEARCH;
- error = smbfs_findopenLM1(ctx, dnp, wildcard, wclen, attr, scred);
- } else
- error = smbfs_findopenLM2(ctx, dnp, wildcard, wclen, attr, scred);
- if (error)
- smbfs_findclose(ctx, scred);
- else
- *ctxpp = ctx;
- return error;
-}
-
-int
-smbfs_findnext(struct smbfs_fctx *ctx, int limit, struct smb_cred *scred)
-{
- int error;
-
- if (limit == 0)
- limit = 1000000;
- else if (limit > 1)
- limit *= 4; /* imperical */
- ctx->f_scred = scred;
- for (;;) {
- if (ctx->f_flags & SMBFS_RDD_USESEARCH) {
- error = smbfs_findnextLM1(ctx, limit);
- } else
- error = smbfs_findnextLM2(ctx, limit);
- if (error)
- return error;
- if ((ctx->f_nmlen == 1 && ctx->f_name[0] == '.') ||
- (ctx->f_nmlen == 2 && ctx->f_name[0] == '.' &&
- ctx->f_name[1] == '.'))
- continue;
- break;
- }
- smbfs_fname_tolocal(SSTOVC(ctx->f_ssp), ctx->f_name, ctx->f_nmlen,
- ctx->f_dnp->n_mount->sm_caseopt);
- ctx->f_attr.fa_ino = smbfs_getino(ctx->f_dnp, ctx->f_name, ctx->f_nmlen);
- return 0;
-}
-
-int
-smbfs_findclose(struct smbfs_fctx *ctx, struct smb_cred *scred)
-{
- ctx->f_scred = scred;
- if (ctx->f_flags & SMBFS_RDD_USESEARCH) {
- smbfs_findcloseLM1(ctx);
- } else
- smbfs_findcloseLM2(ctx);
- if (ctx->f_rname)
- free(ctx->f_rname, M_SMBFSDATA);
- free(ctx, M_SMBFSDATA);
- return 0;
-}
-
-int
-smbfs_smb_lookup(struct smbnode *dnp, const char *name, int nmlen,
- struct smbfattr *fap, struct smb_cred *scred)
-{
- struct smbfs_fctx *ctx;
- int error;
-
- if (dnp == NULL || (dnp->n_ino == 2 && name == NULL)) {
- bzero(fap, sizeof(*fap));
- fap->fa_attr = SMB_FA_DIR;
- fap->fa_ino = 2;
- return 0;
- }
- if (nmlen == 1 && name[0] == '.') {
- error = smbfs_smb_lookup(dnp, NULL, 0, fap, scred);
- return error;
- } else if (nmlen == 2 && name[0] == '.' && name[1] == '.') {
- error = smbfs_smb_lookup(dnp->n_parent, NULL, 0, fap, scred);
- printf("%s: knows NOTHING about '..'\n", __FUNCTION__);
- return error;
- }
- error = smbfs_findopen(dnp, name, nmlen,
- SMB_FA_SYSTEM | SMB_FA_HIDDEN | SMB_FA_DIR, scred, &ctx);
- if (error)
- return error;
- ctx->f_flags |= SMBFS_RDD_FINDSINGLE;
- error = smbfs_findnext(ctx, 1, scred);
- if (error == 0) {
- *fap = ctx->f_attr;
- if (name == NULL)
- fap->fa_ino = dnp->n_ino;
- }
- smbfs_findclose(ctx, scred);
- return error;
-}
diff --git a/sys/fs/smbfs/smbfs_subr.c b/sys/fs/smbfs/smbfs_subr.c
deleted file mode 100644
index 8012c0ba47c9..000000000000
--- a/sys/fs/smbfs/smbfs_subr.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <machine/clock.h>
-#include <sys/time.h>
-#include <sys/vnode.h>
-#include <sys/sysctl.h>
-#include <sys/iconv.h>
-
-#include <netsmb/smb.h>
-#include <netsmb/smb_conn.h>
-#include <netsmb/smb_subr.h>
-#include <netsmb/smb_rq.h>
-#include <netsmb/smb_dev.h>
-
-#include <fs/smbfs/smbfs.h>
-#include <fs/smbfs/smbfs_node.h>
-#include <fs/smbfs/smbfs_subr.h>
-
-MALLOC_DEFINE(M_SMBFSDATA, "SMBFS data", "SMBFS private data");
-
-/*
- * Time & date conversion routines taken from msdosfs. Although leap
- * year calculation is bogus, it's sufficient before 2100 :)
- */
-/*
- * This is the format of the contents of the deTime field in the direntry
- * structure.
- * We don't use bitfields because we don't know how compilers for
- * arbitrary machines will lay them out.
- */
-#define DT_2SECONDS_MASK 0x1F /* seconds divided by 2 */
-#define DT_2SECONDS_SHIFT 0
-#define DT_MINUTES_MASK 0x7E0 /* minutes */
-#define DT_MINUTES_SHIFT 5
-#define DT_HOURS_MASK 0xF800 /* hours */
-#define DT_HOURS_SHIFT 11
-
-/*
- * This is the format of the contents of the deDate field in the direntry
- * structure.
- */
-#define DD_DAY_MASK 0x1F /* day of month */
-#define DD_DAY_SHIFT 0
-#define DD_MONTH_MASK 0x1E0 /* month */
-#define DD_MONTH_SHIFT 5
-#define DD_YEAR_MASK 0xFE00 /* year - 1980 */
-#define DD_YEAR_SHIFT 9
-/*
- * Total number of days that have passed for each month in a regular year.
- */
-static u_short regyear[] = {
- 31, 59, 90, 120, 151, 181,
- 212, 243, 273, 304, 334, 365
-};
-
-/*
- * Total number of days that have passed for each month in a leap year.
- */
-static u_short leapyear[] = {
- 31, 60, 91, 121, 152, 182,
- 213, 244, 274, 305, 335, 366
-};
-
-/*
- * Variables used to remember parts of the last time conversion. Maybe we
- * can avoid a full conversion.
- */
-static u_long lasttime;
-static u_long lastday;
-static u_short lastddate;
-static u_short lastdtime;
-
-void
-smb_time_local2server(struct timespec *tsp, int tzoff, u_long *seconds)
-{
- *seconds = tsp->tv_sec - tzoff * 60 /*- tz.tz_minuteswest * 60 -
- (wall_cmos_clock ? adjkerntz : 0)*/;
-}
-
-void
-smb_time_server2local(u_long seconds, int tzoff, struct timespec *tsp)
-{
- tsp->tv_sec = seconds + tzoff * 60;
- /*+ tz.tz_minuteswest * 60 + (wall_cmos_clock ? adjkerntz : 0)*/;
-}
-
-/*
- * Number of seconds between 1970 and 1601 year
- */
-int64_t DIFF1970TO1601 = 11644473600ULL;
-
-/*
- * Time from server comes as UTC, so no need to use tz
- */
-void
-smb_time_NT2local(int64_t nsec, int tzoff, struct timespec *tsp)
-{
- smb_time_server2local(nsec / 10000000 - DIFF1970TO1601, 0, tsp);
-}
-
-void
-smb_time_local2NT(struct timespec *tsp, int tzoff, int64_t *nsec)
-{
- u_long seconds;
-
- smb_time_local2server(tsp, 0, &seconds);
- *nsec = (((int64_t)(seconds) & ~1) + DIFF1970TO1601) * (int64_t)10000000;
-}
-
-void
-smb_time_unix2dos(struct timespec *tsp, int tzoff, u_int16_t *ddp,
- u_int16_t *dtp, u_int8_t *dhp)
-{
- u_long t, days, year, month, inc;
- u_short *months;
-
- /*
- * If the time from the last conversion is the same as now, then
- * skip the computations and use the saved result.
- */
- smb_time_local2server(tsp, tzoff, &t);
- t &= ~1;
- if (lasttime != t) {
- lasttime = t;
- lastdtime = (((t / 2) % 30) << DT_2SECONDS_SHIFT)
- + (((t / 60) % 60) << DT_MINUTES_SHIFT)
- + (((t / 3600) % 24) << DT_HOURS_SHIFT);
-
- /*
- * If the number of days since 1970 is the same as the last
- * time we did the computation then skip all this leap year
- * and month stuff.
- */
- days = t / (24 * 60 * 60);
- if (days != lastday) {
- lastday = days;
- for (year = 1970;; year++) {
- inc = year & 0x03 ? 365 : 366;
- if (days < inc)
- break;
- days -= inc;
- }
- months = year & 0x03 ? regyear : leapyear;
- for (month = 0; days >= months[month]; month++)
- ;
- if (month > 0)
- days -= months[month - 1];
- lastddate = ((days + 1) << DD_DAY_SHIFT)
- + ((month + 1) << DD_MONTH_SHIFT);
- /*
- * Remember dos's idea of time is relative to 1980.
- * unix's is relative to 1970. If somehow we get a
- * time before 1980 then don't give totally crazy
- * results.
- */
- if (year > 1980)
- lastddate += (year - 1980) << DD_YEAR_SHIFT;
- }
- }
- if (dtp)
- *dtp = lastdtime;
- if (dhp)
- *dhp = (tsp->tv_sec & 1) * 100 + tsp->tv_nsec / 10000000;
-
- *ddp = lastddate;
-}
-
-/*
- * The number of seconds between Jan 1, 1970 and Jan 1, 1980. In that
- * interval there were 8 regular years and 2 leap years.
- */
-#define SECONDSTO1980 (((8 * 365) + (2 * 366)) * (24 * 60 * 60))
-
-static u_short lastdosdate;
-static u_long lastseconds;
-
-void
-smb_dos2unixtime(u_int dd, u_int dt, u_int dh, int tzoff,
- struct timespec *tsp)
-{
- u_long seconds;
- u_long month;
- u_long year;
- u_long days;
- u_short *months;
-
- if (dd == 0) {
- tsp->tv_sec = 0;
- tsp->tv_nsec = 0;
- return;
- }
- seconds = (((dt & DT_2SECONDS_MASK) >> DT_2SECONDS_SHIFT) << 1)
- + ((dt & DT_MINUTES_MASK) >> DT_MINUTES_SHIFT) * 60
- + ((dt & DT_HOURS_MASK) >> DT_HOURS_SHIFT) * 3600
- + dh / 100;
- /*
- * If the year, month, and day from the last conversion are the
- * same then use the saved value.
- */
- if (lastdosdate != dd) {
- lastdosdate = dd;
- days = 0;
- year = (dd & DD_YEAR_MASK) >> DD_YEAR_SHIFT;
- days = year * 365;
- days += year / 4 + 1; /* add in leap days */
- if ((year & 0x03) == 0)
- days--; /* if year is a leap year */
- months = year & 0x03 ? regyear : leapyear;
- month = (dd & DD_MONTH_MASK) >> DD_MONTH_SHIFT;
- if (month < 1 || month > 12) {
- month = 1;
- }
- if (month > 1)
- days += months[month - 2];
- days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1;
- lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980;
- }
- smb_time_server2local(seconds + lastseconds, tzoff, tsp);
- tsp->tv_nsec = (dh % 100) * 10000000;
-}
-
-static int
-smb_fphelp(struct mbchain *mbp, struct smb_vc *vcp, struct smbnode *np,
- int caseopt)
-{
- struct smbmount *smp= np->n_mount;
- struct smbnode **npp = smp->sm_npstack;
- int i, error = 0;
-
-/* simple_lock(&smp->sm_npslock);*/
- i = 0;
- while (np->n_parent) {
- if (i++ == SMBFS_MAXPATHCOMP) {
-/* simple_unlock(&smp->sm_npslock);*/
- return ENAMETOOLONG;
- }
- *npp++ = np;
- np = np->n_parent;
- }
-/* if (i == 0)
- return smb_put_dmem(mbp, vcp, "\\", 2, caseopt);*/
- while (i--) {
- np = *--npp;
- error = mb_put_uint8(mbp, '\\');
- if (error)
- break;
- error = smb_put_dmem(mbp, vcp, np->n_name, np->n_nmlen, caseopt);
- if (error)
- break;
- }
-/* simple_unlock(&smp->sm_npslock);*/
- return error;
-}
-
-int
-smbfs_fullpath(struct mbchain *mbp, struct smb_vc *vcp, struct smbnode *dnp,
- const char *name, int nmlen)
-{
- int caseopt = SMB_CS_NONE;
- int error;
-
- if (SMB_DIALECT(vcp) < SMB_DIALECT_LANMAN1_0)
- caseopt |= SMB_CS_UPPER;
- if (dnp != NULL) {
- error = smb_fphelp(mbp, vcp, dnp, caseopt);
- if (error)
- return error;
- }
- if (name) {
- error = mb_put_uint8(mbp, '\\');
- if (error)
- return error;
- error = smb_put_dmem(mbp, vcp, name, nmlen, caseopt);
- if (error)
- return error;
- }
- error = mb_put_uint8(mbp, 0);
- return error;
-}
-
-int
-smbfs_fname_tolocal(struct smb_vc *vcp, char *name, int nmlen, int caseopt)
-{
-/* if (caseopt & SMB_CS_UPPER)
- iconv_convmem(vcp->vc_toupper, name, name, nmlen);
- else if (caseopt & SMB_CS_LOWER)
- iconv_convmem(vcp->vc_tolower, name, name, nmlen);*/
- if (vcp->vc_tolocal)
- iconv_convmem(vcp->vc_tolocal, name, name, nmlen);
- return 0;
-}
diff --git a/sys/fs/smbfs/smbfs_subr.h b/sys/fs/smbfs/smbfs_subr.h
deleted file mode 100644
index d41e9a8ace8a..000000000000
--- a/sys/fs/smbfs/smbfs_subr.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _FS_SMBFS_SMBFS_SUBR_H_
-#define _FS_SMBFS_SMBFS_SUBR_H_
-
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_SMBFSDATA);
-#endif
-
-#define SMBFSERR(format, args...) printf("%s: "format, __FUNCTION__ ,## args)
-
-#ifdef SMB_VNODE_DEBUG
-#define SMBVDEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args)
-#else
-#define SMBVDEBUG(format, args...)
-#endif
-
-/*
- * Possible lock commands
- */
-#define SMB_LOCK_EXCL 0
-#define SMB_LOCK_SHARED 1
-#define SMB_LOCK_RELEASE 2
-
-struct smbmount;
-struct proc;
-struct timespec;
-struct ucred;
-struct vattr;
-struct vnode;
-struct statfs;
-
-struct smbfattr {
- int fa_attr;
- int64_t fa_size;
- struct timespec fa_atime;
- struct timespec fa_ctime;
- struct timespec fa_mtime;
- long fa_ino;
-};
-
-/*
- * Context to perform findfirst/findnext/findclose operations
- */
-#define SMBFS_RDD_FINDFIRST 0x01
-#define SMBFS_RDD_EOF 0x02
-#define SMBFS_RDD_FINDSINGLE 0x04
-#define SMBFS_RDD_USESEARCH 0x08
-#define SMBFS_RDD_NOCLOSE 0x10
-#define SMBFS_RDD_GOTRNAME 0x1000
-
-/*
- * Search context supplied by server
- */
-#define SMB_SKEYLEN 21 /* search context */
-#define SMB_DENTRYLEN (SMB_SKEYLEN + 22) /* entire entry */
-
-struct smbfs_fctx {
- /*
- * Setable values
- */
- int f_flags; /* SMBFS_RDD_ */
- /*
- * Return values
- */
- struct smbfattr f_attr; /* current attributes */
- char * f_name; /* current file name */
- int f_nmlen; /* name len */
- /*
- * Internal variables
- */
- int f_limit; /* maximum number of entries */
- int f_attrmask; /* SMB_FA_ */
- int f_wclen;
- const char * f_wildcard;
- struct smbnode* f_dnp;
- struct smb_cred*f_scred;
- struct smb_share *f_ssp;
- union {
- struct smb_rq * uf_rq;
- struct smb_t2rq * uf_t2;
- } f_urq;
- int f_left; /* entries left */
- int f_ecnt; /* entries left in the current reponse */
- int f_eofs; /* entry offset in the parameter block */
- u_char f_skey[SMB_SKEYLEN]; /* server side search context */
- u_char f_fname[8 + 1 + 3 + 1]; /* common case for 8.3 filenames */
- u_int16_t f_Sid;
- u_int16_t f_infolevel;
- int f_rnamelen;
- char * f_rname; /* resume name/key */
- int f_rnameofs;
-};
-
-#define f_rq f_urq.uf_rq
-#define f_t2 f_urq.uf_t2
-
-extern int smbfs_debuglevel;
-
-
-/*
- * smb level
- */
-int smbfs_smb_lock(struct smbnode *np, int op, caddr_t id,
- off_t start, off_t end, struct smb_cred *scred);
-int smbfs_smb_statfs2(struct smb_share *ssp, struct statfs *sbp,
- struct smb_cred *scred);
-int smbfs_smb_statfs(struct smb_share *ssp, struct statfs *sbp,
- struct smb_cred *scred);
-int smbfs_smb_setfsize(struct smbnode *np, int newsize, struct smb_cred *scred);
-
-int smbfs_smb_setpattr(struct smbnode *np, u_int16_t attr,
- struct timespec *mtime, struct smb_cred *scred);
-int smbfs_smb_setptime2(struct smbnode *np, struct timespec *mtime,
- struct timespec *atime, int attr, struct smb_cred *scred);
-int smbfs_smb_setpattrNT(struct smbnode *np, u_int16_t attr,
- struct timespec *mtime, struct timespec *atime, struct smb_cred *scred);
-
-int smbfs_smb_setftime(struct smbnode *np, struct timespec *mtime,
- struct timespec *atime, struct smb_cred *scred);
-int smbfs_smb_setfattrNT(struct smbnode *np, u_int16_t attr,
- struct timespec *mtime, struct timespec *atime, struct smb_cred *scred);
-
-int smbfs_smb_open(struct smbnode *np, int accmode, struct smb_cred *scred);
-int smbfs_smb_close(struct smb_share *ssp, u_int16_t fid,
- struct timespec *mtime, struct smb_cred *scred);
-int smbfs_smb_create(struct smbnode *dnp, const char *name, int len,
- struct smb_cred *scred);
-int smbfs_smb_delete(struct smbnode *np, struct smb_cred *scred);
-int smbfs_smb_rename(struct smbnode *src, struct smbnode *tdnp,
- const char *tname, int tnmlen, struct smb_cred *scred);
-int smbfs_smb_move(struct smbnode *src, struct smbnode *tdnp,
- const char *tname, int tnmlen, u_int16_t flags, struct smb_cred *scred);
-int smbfs_smb_mkdir(struct smbnode *dnp, const char *name, int len,
- struct smb_cred *scred);
-int smbfs_smb_rmdir(struct smbnode *np, struct smb_cred *scred);
-int smbfs_findopen(struct smbnode *dnp, const char *wildcard, int wclen,
- int attr, struct smb_cred *scred, struct smbfs_fctx **ctxpp);
-int smbfs_findnext(struct smbfs_fctx *ctx, int limit, struct smb_cred *scred);
-int smbfs_findclose(struct smbfs_fctx *ctx, struct smb_cred *scred);
-int smbfs_fullpath(struct mbchain *mbp, struct smb_vc *vcp,
- struct smbnode *dnp, const char *name, int nmlen);
-int smbfs_smb_lookup(struct smbnode *dnp, const char *name, int nmlen,
- struct smbfattr *fap, struct smb_cred *scred);
-
-int smbfs_fname_tolocal(struct smb_vc *vcp, char *name, int nmlen, int caseopt);
-
-void smb_time_local2server(struct timespec *tsp, int tzoff, u_long *seconds);
-void smb_time_server2local(u_long seconds, int tzoff, struct timespec *tsp);
-void smb_time_NT2local(int64_t nsec, int tzoff, struct timespec *tsp);
-void smb_time_local2NT(struct timespec *tsp, int tzoff, int64_t *nsec);
-void smb_time_unix2dos(struct timespec *tsp, int tzoff, u_int16_t *ddp,
- u_int16_t *dtp, u_int8_t *dhp);
-void smb_dos2unixtime (u_int dd, u_int dt, u_int dh, int tzoff, struct timespec *tsp);
-
-#endif /* !_FS_SMBFS_SMBFS_SUBR_H_ */
diff --git a/sys/gnu/ext2fs/alpha-bitops.h b/sys/gnu/ext2fs/alpha-bitops.h
deleted file mode 100644
index 3910da8a323b..000000000000
--- a/sys/gnu/ext2fs/alpha-bitops.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/* $FreeBSD$ */
-#ifndef _ALPHA_BITOPS_H
-#define _ALPHA_BITOPS_H
-
-/*
- * Copyright 1994, Linus Torvalds.
- */
-
-/*
- * These have to be done with inline assembly: that way the bit-setting
- * is guaranteed to be atomic. All bit operations return 0 if the bit
- * was cleared before the operation and != 0 if it was not.
- *
- * To get proper branch prediction for the main line, we must branch
- * forward to code at the end of this object's .text section, then
- * branch back to restart the operation.
- *
- * bit 0 is the LSB of addr; bit 64 is the LSB of (addr+1).
- */
-static __inline unsigned int set_bit(unsigned long, volatile void *);
-static __inline unsigned int clear_bit(unsigned long, volatile void *);
-static __inline unsigned int change_bit(unsigned long, volatile void *);
-static __inline unsigned int test_bit(int, volatile void *);
-static __inline unsigned long ffz_b(unsigned long x);
-static __inline unsigned long ffz(unsigned long);
-/* static __inline int ffs(int); */
-static __inline void * memscan(void *, int, size_t);
-#ifdef __alpha_cix__
-static __inline unsigned long hweight64(unsigned long);
-#endif
-static __inline unsigned long
-find_next_zero_bit(void *, unsigned long, unsigned long);
-
-static __inline unsigned int set_bit(unsigned long nr, volatile void * addr)
-{
- unsigned long oldbit;
- unsigned long temp;
- volatile unsigned int *m = ((volatile unsigned int *) addr) + (nr >> 5);
-
- __asm__ __volatile__(
- "1: ldl_l %0,%1\n"
- " and %0,%3,%2\n"
- " bne %2,2f\n"
- " xor %0,%3,%0\n"
- " stl_c %0,%1\n"
- " beq %0,3f\n"
- "2:\n"
- ".section .text2,\"ax\"\n"
- "3: br 1b\n"
- ".previous"
- :"=&r" (temp), "=m" (*m), "=&r" (oldbit)
- :"Ir" (1UL << (nr & 31)), "m" (*m));
- return oldbit;
-}
-
-static __inline unsigned int clear_bit(unsigned long nr, volatile void * addr)
-{
- unsigned long oldbit;
- unsigned long temp;
- volatile unsigned int *m = ((volatile unsigned int *) addr) + (nr >> 5);
-
- __asm__ __volatile__(
- "1: ldl_l %0,%1\n"
- " and %0,%3,%2\n"
- " beq %2,2f\n"
- " xor %0,%3,%0\n"
- " stl_c %0,%1\n"
- " beq %0,3f\n"
- "2:\n"
- ".section .text2,\"ax\"\n"
- "3: br 1b\n"
- ".previous"
- :"=&r" (temp), "=m" (*m), "=&r" (oldbit)
- :"Ir" (1UL << (nr & 31)), "m" (*m));
- return oldbit;
-}
-
-static __inline unsigned int change_bit(unsigned long nr, volatile void * addr)
-{
- unsigned long oldbit;
- unsigned long temp;
- volatile unsigned int *m = ((volatile unsigned int *) addr) + (nr >> 5);
-
- __asm__ __volatile__(
- "1: ldl_l %0,%1\n"
- " xor %0,%2,%0\n"
- " stl_c %0,%1\n"
- " beq %0,3f\n"
- ".section .text2,\"ax\"\n"
- "3: br 1b\n"
- ".previous"
- :"=&r" (temp), "=m" (*m), "=&r" (oldbit)
- :"Ir" (1UL << (nr & 31)), "m" (*m));
- return oldbit;
-}
-
-static __inline unsigned int test_bit(int nr, volatile void * addr)
-{
- return 1UL & (((volatile int *) addr)[nr >> 5] >> (nr & 31));
-}
-
-/*
- * ffz = Find First Zero in word. Undefined if no zero exists,
- * so code should check against ~0UL first..
- *
- * Do a binary search on the bits. Due to the nature of large
- * constants on the alpha, it is worthwhile to split the search.
- */
-static __inline unsigned long ffz_b(unsigned long x)
-{
- unsigned long sum = 0;
-
- x = ~x & -~x; /* set first 0 bit, clear others */
- if (x & 0xF0) sum += 4;
- if (x & 0xCC) sum += 2;
- if (x & 0xAA) sum += 1;
-
- return sum;
-}
-
-static __inline unsigned long ffz(unsigned long word)
-{
-#ifdef __alpha_cix__
- /* Whee. EV6 can calculate it directly. */
- unsigned long result;
- __asm__("ctlz %1,%0" : "=r"(result) : "r"(~word));
- return result;
-#else
- unsigned long bits, qofs, bofs;
-
- __asm__("cmpbge %1,%2,%0" : "=r"(bits) : "r"(word), "r"(~0UL));
- qofs = ffz_b(bits);
- __asm__("extbl %1,%2,%0" : "=r"(bits) : "r"(word), "r"(qofs));
- bofs = ffz_b(bits);
-
- return qofs*8 + bofs;
-#endif
-}
-
-#ifdef __KERNEL__
-#if 0
-/*
- * ffs: find first bit set. This is defined the same way as
- * the libc and compiler builtin ffs routines, therefore
- * differs in spirit from the above ffz (man ffs).
- */
-
-static __inline int ffs(int word)
-{
- int result = ffz(~word);
- return word ? result+1 : 0;
-}
-#endif
-
-/*
- * hweightN: returns the hamming weight (i.e. the number
- * of bits set) of a N-bit word
- */
-
-#ifdef __alpha_cix__
-/* Whee. EV6 can calculate it directly. */
-static __inline unsigned long hweight64(unsigned long w)
-{
- unsigned long result;
- __asm__("ctpop %1,%0" : "=r"(result) : "r"(w));
- return result;
-}
-
-#define hweight32(x) hweight64((x) & 0xfffffffful)
-#define hweight16(x) hweight64((x) & 0xfffful)
-#define hweight8(x) hweight64((x) & 0xfful)
-#else
-#define hweight32(x) generic_hweight32(x)
-#define hweight16(x) generic_hweight16(x)
-#define hweight8(x) generic_hweight8(x)
-#endif
-
-#endif /* __alpha_cix__ */
-
-/* from lib/string.c */
-static __inline void * memscan(void * addr, int c, size_t size)
-{
- unsigned char * p = (unsigned char *) addr;
-
- while (size) {
- if (*p == c)
- return (void *) p;
- p++;
- size--;
- }
- return (void *) p;
-}
-
-
-/*
- * Find next zero bit in a bitmap reasonably efficiently..
- */
-static __inline unsigned long find_next_zero_bit(void * addr, unsigned long size, unsigned long offset)
-{
- unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
- unsigned long result = offset & ~63UL;
- unsigned long tmp;
-
- if (offset >= size)
- return size;
- size -= result;
- offset &= 63UL;
- if (offset) {
- tmp = *(p++);
- tmp |= ~0UL >> (64-offset);
- if (size < 64)
- goto found_first;
- if (~tmp)
- goto found_middle;
- size -= 64;
- result += 64;
- }
- while (size & ~63UL) {
- if (~(tmp = *(p++)))
- goto found_middle;
- result += 64;
- size -= 64;
- }
- if (!size)
- return result;
- tmp = *p;
-found_first:
- tmp |= ~0UL << size;
-found_middle:
- return result + ffz(tmp);
-}
-
-/*
- * The optimizer actually does good code for this case..
- */
-#define find_first_zero_bit(addr, size) \
- find_next_zero_bit((addr), (size), 0)
-
-#ifdef __KERNEL__
-
-#define ext2_set_bit test_and_set_bit
-#define ext2_clear_bit test_and_clear_bit
-#define ext2_test_bit test_bit
-#define ext2_find_first_zero_bit find_first_zero_bit
-#define ext2_find_next_zero_bit find_next_zero_bit
-
-/* Bitmap functions for the minix filesystem. */
-#define minix_set_bit(nr,addr) test_and_set_bit(nr,addr)
-#define minix_clear_bit(nr,addr) test_and_clear_bit(nr,addr)
-#define minix_test_bit(nr,addr) test_bit(nr,addr)
-#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
-
-#endif /* __KERNEL__ */
-
-#endif /* _ALPHA_BITOPS_H */
diff --git a/sys/i386/include/i4b_isppp.h b/sys/i386/include/i4b_isppp.h
deleted file mode 100644
index 9d1b59e35529..000000000000
--- a/sys/i386/include/i4b_isppp.h
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Defines for synchronous PPP/Cisco link level subroutines.
- *
- * Copyright (C) 1994 Cronyx Ltd.
- * Author: Serge Vakulenko, <vak@cronyx.ru>
- *
- * Heavily revamped to conform to RFC 1661.
- * Copyright (C) 1997, Joerg Wunsch.
- *
- * This software is distributed with NO WARRANTIES, not even the implied
- * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Authors grant any other persons or organizations permission to use
- * or modify this software as long as this message is kept with the software,
- * all derivative works or modified versions.
- *
- * From: Version 2.0, Fri Oct 6 20:39:21 MSK 1995
- *
- * From: if_sppp.h,v 1.14 1999/03/30 13:28:26 phk Exp
- *
- * $Id: i4b_isppp.h,v 1.5 2000/07/18 15:05:37 hm Exp $
- *
- * $FreeBSD$
- */
-
-#ifndef _I4B_ISPPP_H_
-#define _I4B_ISPPP_H_
-
-#define SPPP_VJ /* use VJ compression */
-
-
-#ifdef SPPP_VJ
-#if !(defined (KERNEL) || defined (_KERNEL))
-#ifdef __FreeBSD__
-#if 0
-/*
- * this is needed on FreeBSD to make /usr/src/usr.bin/kdump and
- * /usr/src/usr.bin/truss compile.
- */
-#include <sys/mbuf.h>
-#endif
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <net/slcompress.h>
-#endif
-#endif
-#endif
-
-#define IDX_LCP 0 /* idx into state table */
-
-struct slcp {
- u_long opts; /* LCP options to send (bitfield) */
- u_long magic; /* local magic number */
- u_long mru; /* our max receive unit */
- u_long their_mru; /* their max receive unit */
- u_long protos; /* bitmask of protos that are started */
- u_char echoid; /* id of last keepalive echo request */
- /* restart max values, see RFC 1661 */
- int timeout;
- int max_terminate;
- int max_configure;
- int max_failure;
-};
-
-#define IDX_IPCP 1 /* idx into state table */
-
-struct sipcp {
- u_long opts; /* IPCP options to send (bitfield) */
- u_int flags;
-#define IPCP_HISADDR_SEEN 1 /* have seen his address already */
-#define IPCP_MYADDR_DYN 2 /* my address is dynamically assigned */
-#define IPCP_MYADDR_SEEN 4 /* have seen his address already */
-#define IPCP_VJ 8 /* We can use VJ compression */
- int max_state; /* Max-Slot-Id */
- int compress_cid; /* Comp-Slot-Id */
-};
-
-#define AUTHNAMELEN 32
-#define AUTHKEYLEN 16
-
-struct sauth {
- u_short proto; /* authentication protocol to use */
- u_short flags;
-#define AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */
- /* callouts */
-#define AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */
- u_char name[AUTHNAMELEN]; /* system identification name */
- u_char secret[AUTHKEYLEN]; /* secret password */
- u_char challenge[AUTHKEYLEN]; /* random challenge */
-};
-
-#define IDX_PAP 2
-#define IDX_CHAP 3
-
-#define IDX_COUNT (IDX_CHAP + 1) /* bump this when adding cp's! */
-
-/*
- * Don't change the order of this. Ordering the phases this way allows
- * for a comparision of ``pp_phase >= PHASE_AUTHENTICATE'' in order to
- * know whether LCP is up.
- */
-enum ppp_phase {
- PHASE_DEAD, PHASE_ESTABLISH, PHASE_TERMINATE,
- PHASE_AUTHENTICATE, PHASE_NETWORK
-};
-
-struct sppp {
- /* NB: pp_if _must_ be first */
- struct ifnet pp_if; /* network interface data */
- struct ifqueue pp_fastq; /* fast output queue */
- struct ifqueue pp_cpq; /* PPP control protocol queue */
- struct sppp *pp_next; /* next interface in keepalive list */
- u_int pp_mode; /* major protocol modes (cisco/ppp/...) */
- u_int pp_flags; /* sub modes */
- u_short pp_alivecnt; /* keepalive packets counter */
- u_short pp_loopcnt; /* loopback detection counter */
- u_long pp_seq; /* local sequence number */
- u_long pp_rseq; /* remote sequence number */
- time_t pp_last_sent;
- time_t pp_last_recv;
- enum ppp_phase pp_phase; /* phase we're currently in */
- int state[IDX_COUNT]; /* state machine */
- u_char confid[IDX_COUNT]; /* id of last configuration request */
- int rst_counter[IDX_COUNT]; /* restart counter */
- int fail_counter[IDX_COUNT]; /* negotiation failure counter */
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- struct callout_handle ch[IDX_COUNT]; /* per-proto and if callouts */
- struct callout_handle pap_my_to_ch; /* PAP needs one more... */
-#endif
- struct slcp lcp; /* LCP params */
- struct sipcp ipcp; /* IPCP params */
- struct sauth myauth; /* auth params, i'm peer */
- struct sauth hisauth; /* auth params, i'm authenticator */
-#ifdef SPPP_VJ
- int enable_vj; /* enable VJ negotiation */
- struct slcompress pp_comp; /* for VJ compression */
-#endif
- /*
- * These functions are filled in by sppp_attach(), and are
- * expected to be used by the lower layer (hardware) drivers
- * in order to communicate the (un)availability of the
- * communication link. Lower layer drivers that are always
- * ready to communicate (like hardware HDLC) can shortcut
- * pp_up from pp_tls, and pp_down from pp_tlf.
- */
- void (*pp_up)(struct sppp *sp);
- void (*pp_down)(struct sppp *sp);
- /*
- * These functions need to be filled in by the lower layer
- * (hardware) drivers if they request notification from the
- * PPP layer whether the link is actually required. They
- * correspond to the tls and tlf actions.
- */
- void (*pp_tls)(struct sppp *sp);
- void (*pp_tlf)(struct sppp *sp);
- /*
- * These (optional) functions may be filled by the hardware
- * driver if any notification of established connections
- * (currently: IPCP up) is desired (pp_con) or any internal
- * state change of the interface state machine should be
- * signaled for monitoring purposes (pp_chg).
- */
- void (*pp_con)(struct sppp *sp);
- void (*pp_chg)(struct sppp *sp, int new_state);
- /* These two fields are for use by the lower layer */
- void *pp_lowerp;
- int pp_loweri;
-};
-
-#define PP_KEEPALIVE 0x01 /* use keepalive protocol */
-#define PP_CALLIN 0x08 /* we are being called */
-#define PP_NEEDAUTH 0x10 /* remote requested authentication */
-
-
-#define PP_MTU 1500 /* default/minimal MRU */
-#define PP_MAX_MRU 2048 /* maximal MRU we want to negotiate */
-
-/*
- * Definitions to pass struct sppp data down into the kernel using the
- * SIOC[SG]IFGENERIC ioctl interface.
- *
- * In order to use this, create a struct spppreq, fill in the cmd
- * field with SPPPIOGDEFS, and put the address of this structure into
- * the ifr_data portion of a struct ifreq. Pass this struct to a
- * SIOCGIFGENERIC ioctl. Then replace the cmd field by SPPPIOCDEFS,
- * modify the defs field as desired, and pass the struct ifreq now
- * to a SIOCSIFGENERIC ioctl.
- */
-
-#define SPPPIOGDEFS ((caddr_t)(('S' << 24) + (1 << 16) + sizeof(struct sppp)))
-#define SPPPIOSDEFS ((caddr_t)(('S' << 24) + (2 << 16) + sizeof(struct sppp)))
-
-struct spppreq {
- u_long cmd;
- struct sppp defs;
-};
-
-#ifndef SIOCSIFGENERIC
-#define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */
-#endif
-
-#ifndef SIOCGIFGENERIC
-#define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */
-#endif
-
-#if defined(KERNEL) || defined(_KERNEL)
-
-#ifndef USE_ISPPP
-
-void sppp_attach (struct ifnet *ifp);
-void sppp_detach (struct ifnet *ifp);
-void sppp_input (struct ifnet *ifp, struct mbuf *m);
-
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 300003
-int sppp_ioctl (struct ifnet *ifp, u_long cmd, void *data);
-#else
-#ifdef __FreeBSD__
-int sppp_ioctl (struct ifnet *ifp, int cmd, void *data);
-#else
-int sppp_ioctl (struct ifnet *ifp, u_long cmd, void *data);
-#endif
-#endif
-
-struct mbuf *sppp_dequeue (struct ifnet *ifp);
-struct mbuf *sppp_pick(struct ifnet *ifp);
-int sppp_isempty (struct ifnet *ifp);
-void sppp_flush (struct ifnet *ifp);
-
-#else /* USE_ISPPP */
-
-void isppp_attach (struct ifnet *ifp);
-void isppp_detach (struct ifnet *ifp);
-void isppp_input (struct ifnet *ifp, struct mbuf *m);
-
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 300003
-int isppp_ioctl (struct ifnet *ifp, u_long cmd, void *data);
-#else
-#ifdef __FreeBSD__
-int isppp_ioctl (struct ifnet *ifp, int cmd, void *data);
-#else
-int isppp_ioctl (struct ifnet *ifp, u_long cmd, void *data);
-#endif
-#endif
-
-struct mbuf *isppp_dequeue (struct ifnet *ifp);
-struct mbuf *isppp_pick(struct ifnet *ifp);
-int isppp_isempty (struct ifnet *ifp);
-void isppp_flush (struct ifnet *ifp);
-#endif /* USE_ISPPP */
-
-#endif /* KERNEL */
-
-#endif /* _I4B_ISPPP_H_ */
diff --git a/sys/i386/include/pci_cfgreg.h b/sys/i386/include/pci_cfgreg.h
deleted file mode 100644
index 6e79a22fc6d5..000000000000
--- a/sys/i386/include/pci_cfgreg.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, Stefan Esser <se@freebsd.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice unmodified, this list of conditions, and the following
- * disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- *
- */
-
-#define CONF1_ADDR_PORT 0x0cf8
-#define CONF1_DATA_PORT 0x0cfc
-
-#define CONF1_ENABLE 0x80000000ul
-#define CONF1_ENABLE_CHK 0x80000000ul
-#define CONF1_ENABLE_MSK 0x7ff00000ul
-#define CONF1_ENABLE_CHK1 0xff000001ul
-#define CONF1_ENABLE_MSK1 0x80000001ul
-#define CONF1_ENABLE_RES1 0x80000000ul
-
-#define CONF2_ENABLE_PORT 0x0cf8
-#ifdef PC98
-#define CONF2_FORWARD_PORT 0x0cf9
-#else
-#define CONF2_FORWARD_PORT 0x0cfa
-#endif
-
-#define CONF2_ENABLE_CHK 0x0e
-#define CONF2_ENABLE_RES 0x0e
-
-extern int pci_cfgregopen(void);
-extern u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes);
-extern void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes);
-extern int pci_cfgintr(int bus, int device, int pin);
diff --git a/sys/i4b/driver/i4b_ing.c b/sys/i4b/driver/i4b_ing.c
deleted file mode 100644
index a430940fc821..000000000000
--- a/sys/i4b/driver/i4b_ing.c
+++ /dev/null
@@ -1,881 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ing.c - isdn4bsd B-channel to netgraph driver
- * -------------------------------------------------
- *
- * $Id: i4b_ing.c,v 1.10 2000/04/27 11:35:00 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Thu Nov 9 11:29:12 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#include "i4bing.h"
-
-#if NI4BING > 0
-
-#include "opt_i4b.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/errno.h>
-#include <sys/malloc.h>
-
-#include <net/if.h>
-
-#include <netgraph/ng_message.h>
-#include <netgraph/ng_parse.h>
-#include <netgraph/netgraph.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_debug.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_l3l4.h>
-
-#include <i4b/layer4/i4b_l4.h>
-
-#define I4BINGACCT 1 /* enable accounting messages */
-#define I4BINGACCTINTVL 2 /* accounting msg interval in secs */
-
-#define I4BINGMAXQLEN 50 /* max queue length */
-
-/* initialized by L4 */
-
-static drvr_link_t ing_drvr_linktab[NI4BING];
-static isdn_link_t *isdn_linktab[NI4BING];
-
-struct ing_softc {
- int sc_unit; /* unit number */
- int sc_state; /* state of the interface */
- call_desc_t *sc_cdp; /* ptr to call descriptor */
- int sc_updown; /* soft state of interface */
- struct ifqueue sc_fastq; /* interactive traffic */
- int sc_dialresp; /* dialresponse */
- int sc_lastdialresp;/* last dialresponse */
-
-#if I4BINGACCT
- struct callout_handle sc_callout;
- int sc_iinb; /* isdn driver # of inbytes */
- int sc_ioutb; /* isdn driver # of outbytes */
- int sc_inb; /* # of bytes rx'd */
- int sc_outb; /* # of bytes tx'd */
- int sc_linb; /* last # of bytes rx'd */
- int sc_loutb; /* last # of bytes tx'd */
- int sc_fn; /* flag, first null acct */
-#endif
-
- int sc_inpkt; /* incoming packets */
- int sc_outpkt; /* outgoing packets */
-
- struct ifqueue xmitq_hipri; /* hi-priority transmit queue */
- struct ifqueue xmitq; /* transmit queue */
-
- node_p node; /* back pointer to node */
- char nodename[NG_NODELEN + 1]; /* store our node name */
- hook_p debughook;
- hook_p hook;
-
- u_int packets_in; /* packets in from downstream */
- u_int packets_out; /* packets out towards downstream */
- u_int32_t flags;
-
-} ing_softc[NI4BING];
-
-enum ing_states {
- ST_IDLE, /* initialized, ready, idle */
- ST_DIALING, /* dialling out to remote */
- ST_CONNECTED /* connected to remote */
-};
-
-static void i4bingattach(void *);
-
-PSEUDO_SET(i4bingattach, i4b_ing);
-
-static void ing_init_linktab(int unit);
-static void ing_tx_queue_empty(int unit);
-
-/* ========= NETGRAPH ============= */
-
-#define NG_ING_NODE_TYPE "i4bing" /* node type name */
-#define NGM_ING_COOKIE 947513046 /* node type cookie */
-
-/* Hook names */
-#define NG_ING_HOOK_DEBUG "debug"
-#define NG_ING_HOOK_RAW "rawdata"
-
-/* Netgraph commands understood by this node type */
-enum {
- NGM_ING_SET_FLAG = 1,
- NGM_ING_GET_STATUS,
-};
-
-/* This structure is returned by the NGM_ING_GET_STATUS command */
-struct ngingstat {
- u_int packets_in; /* packets in from downstream */
- u_int packets_out; /* packets out towards downstream */
-};
-
-/*
- * This is used to define the 'parse type' for a struct ngingstat, which
- * is bascially a description of how to convert a binary struct ngingstat
- * to an ASCII string and back. See ng_parse.h for more info.
- *
- * This needs to be kept in sync with the above structure definition
- */
-#define NG_ING_STATS_TYPE_INFO { \
- { \
- { "packets_in", &ng_parse_int32_type }, \
- { "packets_out", &ng_parse_int32_type }, \
- { NULL }, \
- } \
-}
-
-/*
- * This section contains the netgraph method declarations for the
- * sample node. These methods define the netgraph 'type'.
- */
-
-static ng_constructor_t ng_ing_constructor;
-static ng_rcvmsg_t ng_ing_rcvmsg;
-static ng_shutdown_t ng_ing_shutdown;
-static ng_newhook_t ng_ing_newhook;
-static ng_connect_t ng_ing_connect;
-static ng_rcvdata_t ng_ing_rcvdata;
-static ng_disconnect_t ng_ing_disconnect;
-
-/* Parse type for struct ngingstat */
-static const struct
- ng_parse_struct_info ng_ing_stat_type_info = NG_ING_STATS_TYPE_INFO;
-
-static const struct ng_parse_type ng_ing_stat_type = {
- &ng_parse_struct_type,
- &ng_ing_stat_type_info
-};
-
-/* List of commands and how to convert arguments to/from ASCII */
-
-static const struct ng_cmdlist ng_ing_cmdlist[] = {
- {
- NGM_ING_COOKIE,
- NGM_ING_GET_STATUS,
- "getstatus",
- NULL,
- &ng_ing_stat_type,
- },
- {
- NGM_ING_COOKIE,
- NGM_ING_SET_FLAG,
- "setflag",
- &ng_parse_int32_type,
- NULL
- },
- { 0 }
-};
-
-/* Netgraph node type descriptor */
-static struct ng_type typestruct = {
- NG_ABI_VERSION,
- NG_ING_NODE_TYPE,
- NULL,
- ng_ing_constructor,
- ng_ing_rcvmsg,
- ng_ing_shutdown,
- ng_ing_newhook,
- NULL,
- ng_ing_connect,
- ng_ing_rcvdata,
- ng_ing_disconnect,
- ng_ing_cmdlist
-};
-
-NETGRAPH_INIT_ORDERED(ing, &typestruct, SI_SUB_DRIVERS, SI_ORDER_ANY);
-
-/*===========================================================================*
- * DEVICE DRIVER ROUTINES
- *===========================================================================*/
-
-/*---------------------------------------------------------------------------*
- * interface attach routine at kernel boot time
- *---------------------------------------------------------------------------*/
-static void
-i4bingattach(void *dummy)
-{
- struct ing_softc *sc = ing_softc;
- int i;
- int ret;
-
- printf("i4bing: %d i4b NetGraph ISDN B-channel device(s) attached\n", NI4BING);
-
- for(i=0; i < NI4BING; sc++, i++)
- {
- sc->sc_unit = i;
-
- ing_init_linktab(i);
-
- NDBGL4(L4_DIALST, "setting dial state to ST_IDLE");
-
- sc->sc_state = ST_IDLE;
-
- sc->sc_fastq.ifq_maxlen = I4BINGMAXQLEN;
- mtx_init(&sc->sc_fastq.ifq_mtx, "i4b_ing_fastq", MTX_DEF);
-
-#if I4BINGACCT
- callout_handle_init(&sc->sc_callout);
- sc->sc_iinb = 0;
- sc->sc_ioutb = 0;
- sc->sc_inb = 0;
- sc->sc_outb = 0;
- sc->sc_linb = 0;
- sc->sc_loutb = 0;
- sc->sc_fn = 1;
-#endif
-
- sc->sc_inpkt = 0;
- sc->sc_outpkt = 0;
-
- sc->sc_updown = SOFT_ENA; /* soft enabled */
-
- sc->sc_dialresp = DSTAT_NONE; /* no response */
- sc->sc_lastdialresp = DSTAT_NONE;
-
- /* setup a netgraph node */
-
- if ((ret = ng_make_node_common(&typestruct, &sc->node)))
- {
- printf("ing: ng_make_node_common, ret = %d\n!", ret);
- }
-
- /* name the netgraph node */
-
- sprintf(sc->nodename, "%s%d", NG_ING_NODE_TYPE, sc->sc_unit);
- if((ret = ng_name_node(sc->node, sc->nodename)))
- {
- printf("ing: ng_name node, ret = %d\n!", ret);
- NG_NODE_UNREF(sc->node);
- break;
- }
-
- NG_NODE_SET_PRIVATE(sc->node, sc);
-
- sc->xmitq.ifq_maxlen = IFQ_MAXLEN;
- sc->xmitq_hipri.ifq_maxlen = IFQ_MAXLEN;
- mtx_init(&sc->xmitq.ifq_mtx, "i4b_ing_xmitq", MTX_DEF);
- mtx_init(&sc->xmitq_hipri.ifq_mtx, "i4b_ing_hipri", MTX_DEF);
- }
-}
-
-#ifdef I4BINGACCT
-/*---------------------------------------------------------------------------*
- * accounting timeout routine
- *---------------------------------------------------------------------------*/
-static void
-ing_timeout(struct ing_softc *sc)
-{
- bchan_statistics_t bs;
- int unit = sc->sc_unit;
-
- /* get # of bytes in and out from the HSCX driver */
-
- (*isdn_linktab[unit]->bch_stat)
- (isdn_linktab[unit]->unit, isdn_linktab[unit]->channel, &bs);
-
- sc->sc_ioutb += bs.outbytes;
- sc->sc_iinb += bs.inbytes;
-
- if((sc->sc_iinb != sc->sc_linb) || (sc->sc_ioutb != sc->sc_loutb) || sc->sc_fn)
- {
- int ri = (sc->sc_iinb - sc->sc_linb)/I4BINGACCTINTVL;
- int ro = (sc->sc_ioutb - sc->sc_loutb)/I4BINGACCTINTVL;
-
- if((sc->sc_iinb == sc->sc_linb) && (sc->sc_ioutb == sc->sc_loutb))
- sc->sc_fn = 0;
- else
- sc->sc_fn = 1;
-
- sc->sc_linb = sc->sc_iinb;
- sc->sc_loutb = sc->sc_ioutb;
-
- i4b_l4_accounting(BDRV_ING, unit, ACCT_DURING,
- sc->sc_ioutb, sc->sc_iinb, ro, ri, sc->sc_ioutb, sc->sc_iinb);
- }
-
- sc->sc_callout = timeout((TIMEOUT_FUNC_T)ing_timeout,
- (void *)sc, I4BINGACCTINTVL*hz);
-}
-#endif /* I4BINGACCT */
-
-#if 0
-/*---------------------------------------------------------------------------*
- * clear the interface's send queues
- *---------------------------------------------------------------------------*/
-static void
-ingclearqueue(struct ifqueue *iq)
-{
- int x;
-
- x = splimp();
- IF_DRAIN(iq);
- splx(x);
-}
-#endif
-
-/*===========================================================================*
- * ISDN INTERFACE ROUTINES
- *===========================================================================*/
-
-/*---------------------------------------------------------------------------*
- * this routine is called from L4 handler at connect time
- *---------------------------------------------------------------------------*/
-static void
-ing_connect(int unit, void *cdp)
-{
- struct ing_softc *sc = &ing_softc[unit];
- int s;
-
- sc->sc_cdp = (call_desc_t *)cdp;
-
- s = SPLI4B();
-
- NDBGL4(L4_DIALST, "ing%d: setting dial state to ST_CONNECTED", unit);
-
- sc->sc_dialresp = DSTAT_NONE;
- sc->sc_lastdialresp = DSTAT_NONE;
-
-#if I4BINGACCT
- sc->sc_iinb = 0;
- sc->sc_ioutb = 0;
- sc->sc_inb = 0;
- sc->sc_outb = 0;
- sc->sc_linb = 0;
- sc->sc_loutb = 0;
- sc->sc_callout = timeout((TIMEOUT_FUNC_T)ing_timeout,
- (void *)sc, I4BINGACCTINTVL*hz);
-#endif
-
- sc->sc_state = ST_CONNECTED;
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * this routine is called from L4 handler at disconnect time
- *---------------------------------------------------------------------------*/
-static void
-ing_disconnect(int unit, void *cdp)
-{
- call_desc_t *cd = (call_desc_t *)cdp;
- struct ing_softc *sc = &ing_softc[unit];
-
- /* new stuff to check that the active channel is being closed */
-
- if (cd != sc->sc_cdp)
- {
- NDBGL4(L4_INGDBG, "ing%d: channel %d not active",
- cd->driver_unit, cd->channelid);
- return;
- }
-
-#if I4BINGACCT
- untimeout((TIMEOUT_FUNC_T)ing_timeout,
- (void *)sc, sc->sc_callout);
-#endif
-
- i4b_l4_accounting(BDRV_ING, cd->driver_unit, ACCT_FINAL,
- sc->sc_ioutb, sc->sc_iinb, 0, 0, sc->sc_outb, sc->sc_inb);
-
- sc->sc_cdp = (call_desc_t *)0;
-
- NDBGL4(L4_DIALST, "setting dial state to ST_IDLE");
-
- sc->sc_dialresp = DSTAT_NONE;
- sc->sc_lastdialresp = DSTAT_NONE;
-
- sc->sc_state = ST_IDLE;
-}
-
-/*---------------------------------------------------------------------------*
- * this routine is used to give a feedback from userland daemon
- * in case of dial problems
- *---------------------------------------------------------------------------*/
-static void
-ing_dialresponse(int unit, int status, cause_t cause)
-{
- struct ing_softc *sc = &ing_softc[unit];
- sc->sc_dialresp = status;
-
- NDBGL4(L4_INGDBG, "ing%d: last=%d, this=%d",
- unit, sc->sc_lastdialresp, sc->sc_dialresp);
-
- if(status != DSTAT_NONE)
- {
- NDBGL4(L4_INGDBG, "ing%d: clearing queues", unit);
-/* ingclearqueues(sc); */
- }
-}
-
-/*---------------------------------------------------------------------------*
- * interface soft up/down
- *---------------------------------------------------------------------------*/
-static void
-ing_updown(int unit, int updown)
-{
- struct ing_softc *sc = &ing_softc[unit];
- sc->sc_updown = updown;
-}
-
-/*---------------------------------------------------------------------------*
- * this routine is called from the HSCX interrupt handler
- * when a new frame (mbuf) has been received and was put on
- * the rx queue. It is assumed that this routines runs at
- * pri level splimp() ! Keep it short !
- *---------------------------------------------------------------------------*/
-static void
-ing_rx_data_rdy(int unit)
-{
- register struct ing_softc *sc = &ing_softc[unit];
- register struct mbuf *m;
- int error;
-
- if((m = *isdn_linktab[unit]->rx_mbuf) == NULL)
- return;
-
-#if I4BINGACCT
- sc->sc_inb += m->m_pkthdr.len;
-#endif
-
- m->m_pkthdr.rcvif = NULL;
-
- sc->sc_inpkt++;
-
- NG_SEND_DATA_ONLY(error, sc->hook, m);
-}
-
-/*---------------------------------------------------------------------------*
- * this routine is called from the HSCX interrupt handler
- * when the last frame has been sent out and there is no
- * further frame (mbuf) in the tx queue.
- *---------------------------------------------------------------------------*/
-static void
-ing_tx_queue_empty(int unit)
-{
- register struct ing_softc *sc = &ing_softc[unit];
- register struct mbuf *m;
- int x = 0;
-
- if(sc->sc_state != ST_CONNECTED)
- return;
-
- for(;;)
- {
- IF_DEQUEUE(&sc->xmitq_hipri, m);
-
- if(m == NULL)
- {
- IF_DEQUEUE(&sc->xmitq, m);
- if(m == NULL)
- break;
- }
-
-#if I4BINGACCT
- sc->sc_outb += m->m_pkthdr.len;
-#endif
-
- x = 1;
-
- if(! IF_HANDOFF(isdn_linktab[unit]->tx_queue, m, NULL))
- {
- NDBGL4(L4_INGDBG, "ing%d: tx queue full!", unit);
- }
- }
-
- if(x)
- (*isdn_linktab[unit]->bch_tx_start)(isdn_linktab[unit]->unit, isdn_linktab[unit]->channel);
-}
-
-/*---------------------------------------------------------------------------*
- * this routine is called from the HSCX interrupt handler
- * each time a packet is received or transmitted. It should
- * be used to implement an activity timeout mechanism.
- *---------------------------------------------------------------------------*/
-static void
-ing_activity(int unit, int rxtx)
-{
- ing_softc[unit].sc_cdp->last_active_time = SECOND;
-}
-
-/*---------------------------------------------------------------------------*
- * return this drivers linktab address
- *---------------------------------------------------------------------------*/
-drvr_link_t *
-ing_ret_linktab(int unit)
-{
- return(&ing_drvr_linktab[unit]);
-}
-
-/*---------------------------------------------------------------------------*
- * setup the isdn_linktab for this driver
- *---------------------------------------------------------------------------*/
-void
-ing_set_linktab(int unit, isdn_link_t *ilt)
-{
- isdn_linktab[unit] = ilt;
-}
-
-/*---------------------------------------------------------------------------*
- * initialize this drivers linktab
- *---------------------------------------------------------------------------*/
-static void
-ing_init_linktab(int unit)
-{
- ing_drvr_linktab[unit].unit = unit;
- ing_drvr_linktab[unit].bch_rx_data_ready = ing_rx_data_rdy;
- ing_drvr_linktab[unit].bch_tx_queue_empty = ing_tx_queue_empty;
- ing_drvr_linktab[unit].bch_activity = ing_activity;
- ing_drvr_linktab[unit].line_connected = ing_connect;
- ing_drvr_linktab[unit].line_disconnected = ing_disconnect;
- ing_drvr_linktab[unit].dial_response = ing_dialresponse;
- ing_drvr_linktab[unit].updown_ind = ing_updown;
-}
-
-/*===========================================================================*
- * NETGRAPH INTERFACE ROUTINES
- *===========================================================================*/
-
-/*---------------------------------------------------------------------------*
- * It is not possible or allowable to create a node of this type.
- * If the hardware exists, it will already have created it.
- *---------------------------------------------------------------------------*/
-static int
-ng_ing_constructor(node_p node)
-{
- return(EINVAL);
-}
-
-/*---------------------------------------------------------------------------*
- * Give our ok for a hook to be added...
- * Add the hook's private info to the hook structure.
- *---------------------------------------------------------------------------*/
-static int
-ng_ing_newhook(node_p node, hook_p hook, const char *name)
-{
- struct ing_softc *sc = NG_NODE_PRIVATE(node);
-
- /*
- * check if it's our friend the debug hook
- */
- if(strcmp(name, NG_ING_HOOK_DEBUG) == 0)
- {
- NG_HOOK_SET_PRIVATE(hook, NULL); /* paranoid */
- sc->debughook = hook;
- return (0);
- }
- /*
- * Check for raw mode hook.
- */
- if(strcmp(name, NG_ING_HOOK_RAW) == 0)
- {
- NG_HOOK_SET_PRIVATE(hook, sc);
- sc->hook = hook;
- return (0);
- }
-
- return (EINVAL);
-}
-
-/*---------------------------------------------------------------------------*
- * Get a netgraph control message.
- * Check it is one we understand. If needed, send a response.
- * We could save the address for an async action later, but don't here.
- * Always free the message.
- * The response should be in a malloc'd region that the caller can 'free'.
- * A response is not required.
- *---------------------------------------------------------------------------*/
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 500000
-static int
-ng_ing_rcvmsg(node_p node, item_p item, hook_p lasthook)
-#else
-static int
-ng_ing_rcvmsg(node_p node, struct ng_mesg *msg, const char *retaddr,
- struct ng_mesg **rptr)
-#endif
-{
- struct ing_softc *sc = NG_NODE_PRIVATE(node);
-
- struct ng_mesg *resp = NULL;
- int error = 0;
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 500000
- struct ng_mesg *msg;
-
- NGI_GET_MSG(item, msg);
-#endif
- if(msg->header.typecookie == NGM_GENERIC_COOKIE)
- {
- switch(msg->header.cmd)
- {
- case NGM_TEXT_STATUS:
- {
- char *arg;
- char *p;
- int pos = 0;
-
- NG_MKRESPONSE(resp, msg, sizeof(struct ng_mesg) + NG_TEXTRESPONSE, M_NOWAIT);
-
- if (resp == NULL)
- {
- error = ENOMEM;
- break;
- }
- arg = (char *) resp->data;
-
- switch(sc->sc_state)
- {
- case ST_IDLE:
- p = "idle";
- break;
- case ST_DIALING:
- p = "dialing";
- break;
- case ST_CONNECTED:
- p = "connected";
- break;
- default:
- p = "???";
- break;
- }
-
- pos = sprintf(arg, "state = %s (%d)\n", p, sc->sc_state);
-#if I4BINGACCT
- pos += sprintf(arg + pos, "%d bytes in, %d bytes out\n", sc->sc_inb, sc->sc_outb);
-#endif
- pos += sprintf(arg + pos, "%d pkts in, %d pkts out\n", sc->sc_inpkt, sc->sc_outpkt);
-
- resp->header.arglen = pos + 1;
- break;
- }
-
- default:
- error = EINVAL;
- break;
- }
- }
- else if(msg->header.typecookie == NGM_ING_COOKIE)
- {
- switch (msg->header.cmd)
- {
- case NGM_ING_GET_STATUS:
- {
- struct ngingstat *stats;
-
- NG_MKRESPONSE(resp, msg, sizeof(*stats), M_NOWAIT);
-
- if (!resp)
- {
- error = ENOMEM;
- break;
- }
-
- stats = (struct ngingstat *) resp->data;
- stats->packets_in = sc->packets_in;
- stats->packets_out = sc->packets_out;
- break;
- }
-
- case NGM_ING_SET_FLAG:
- if (msg->header.arglen != sizeof(u_int32_t))
- {
- error = EINVAL;
- break;
- }
- sc->flags = *((u_int32_t *) msg->data);
- break;
-
- default:
- error = EINVAL; /* unknown command */
- break;
- }
- }
- else
- {
- error = EINVAL; /* unknown cookie type */
- }
-
- /* Take care of synchronous response, if any */
- NG_RESPOND_MSG(error, node, item, resp);
- /* Free the message and return */
- NG_FREE_MSG(msg);
- return(error);
-}
-
-/*---------------------------------------------------------------------------*
- * get data from another node and transmit it out on a B-channel
- *---------------------------------------------------------------------------*/
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 500000
-static int
-ng_ing_rcvdata(hook_p hook, item_p item)
-#else
-static int
-ng_ing_rcvdata(hook_p hook, struct mbuf *m, meta_p meta)
-#endif
-{
- struct ing_softc *sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
- struct ifqueue *xmitq_p;
- int s;
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 500000
- struct mbuf *m;
- meta_p meta;
-
- NGI_GET_M(item, m);
- NGI_GET_META(item, meta);
- NG_FREE_ITEM(item);
-#endif
- if(NG_HOOK_PRIVATE(hook) == NULL)
- {
- NG_FREE_M(m);
- NG_FREE_META(meta);
- return(ENETDOWN);
- }
-
- if(sc->sc_state == ST_IDLE || sc->sc_state == ST_DIALING)
- {
- i4b_l4_dialout(BDRV_ING, sc->sc_unit);
- sc->sc_state = ST_DIALING;
- }
-
- sc->sc_outpkt++;
-
- /*
- * Now queue the data for when it can be sent
- */
-
- if (meta && meta->priority > 0)
- {
- xmitq_p = (&sc->xmitq_hipri);
- }
- else
- {
- xmitq_p = (&sc->xmitq);
- }
-
- s = splimp();
-
- IF_LOCK(xmitq_p);
- if (_IF_QFULL(xmitq_p))
- {
- _IF_DROP(xmitq_p);
- IF_UNLOCK(xmitq_p);
- splx(s);
- NG_FREE_M(m);
- NG_FREE_META(meta);
- return(ENOBUFS);
- }
-
- _IF_ENQUEUE(xmitq_p, m);
- IF_UNLOCK(xmitq_p);
-
- ing_tx_queue_empty(sc->sc_unit);
-
- splx(s);
- return (0);
-}
-
-/*---------------------------------------------------------------------------*
- * Do local shutdown processing..
- * If we are a persistant device, we might refuse to go away, and
- * we'd only remove our links and reset ourself.
- *---------------------------------------------------------------------------*/
-static int
-ng_ing_shutdown(node_p node)
-{
- struct ing_softc *sc = NG_NODE_PRIVATE(node);
- int ret;
-
- NG_NODE_UNREF(node);
-
- sc->packets_in = 0; /* reset stats */
- sc->packets_out = 0;
-
- if ((ret = ng_make_node_common(&typestruct, &sc->node)))
- {
- printf("ing: ng_make_node_common, ret = %d\n!", ret);
- }
-
- /* name the netgraph node */
- sprintf(sc->nodename, "%s%d", NG_ING_NODE_TYPE, sc->sc_unit);
- if((ret = ng_name_node(sc->node, sc->nodename)))
- {
- printf("ing: ng_name node, ret = %d\n!", ret);
- NG_NODE_UNREF(sc->node);
- return (0);
- }
-
- NG_NODE_SET_PRIVATE(sc->node, sc);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------*
- * This is called once we've already connected a new hook to the other node.
- *---------------------------------------------------------------------------*/
-static int
-ng_ing_connect(hook_p hook)
-{
- /* probably not at splnet, force outward queueing */
- NG_HOOK_FORCE_QUEUE(NG_HOOK_PEER(hook));
- return (0);
-}
-
-/*
- * Dook disconnection
- *
- * For this type, removal of the last link destroys the node
- */
-static int
-ng_ing_disconnect(hook_p hook)
-{
- struct ing_softc *sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
- int s;
-
- if(NG_HOOK_PRIVATE(hook))
- {
- s = splimp();
- splx(s);
- }
- else
- {
- sc->debughook = NULL;
- }
- return (0);
-}
-
-/*===========================================================================*/
-
-#endif /* NI4BING > 0 */
diff --git a/sys/i4b/driver/i4b_ispppsubr.c b/sys/i4b/driver/i4b_ispppsubr.c
deleted file mode 100644
index 3e4791243993..000000000000
--- a/sys/i4b/driver/i4b_ispppsubr.c
+++ /dev/null
@@ -1,4679 +0,0 @@
-/*
- * Synchronous PPP/Cisco link level subroutines.
- * Keepalive protocol implemented in both Cisco and PPP modes.
- *
- * Copyright (C) 1994-1996 Cronyx Engineering Ltd.
- * Author: Serge Vakulenko, <vak@cronyx.ru>
- *
- * Heavily revamped to conform to RFC 1661.
- * Copyright (C) 1997, Joerg Wunsch.
- *
- * This software is distributed with NO WARRANTIES, not even the implied
- * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Authors grant any other persons or organisations permission to use
- * or modify this software as long as this message is kept with the software,
- * all derivative works or modified versions.
- *
- * $FreeBSD$
- */
-
-#define USE_ISPPP
-
-#if defined(__NetBSD__) || defined(__FreeBSD__)
-#include "opt_inet.h"
-#include "opt_ipx.h"
-#endif
-
-#if defined(__NetBSD__)
-#include "opt_iso.h"
-#include "opt_ns.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/sockio.h>
-#include <sys/socket.h>
-#include <sys/syslog.h>
-
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-
-#if defined (__OpenBSD__)
-#include <sys/md5k.h>
-#else
-#include <sys/md5.h>
-#endif
-
-#include <net/if.h>
-#include <net/netisr.h>
-#include <net/if_types.h>
-#include <net/route.h>
-
-#include <machine/stdarg.h>
-
-#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
-
-#include <netinet/in.h>
-
-#if !defined (__OpenBSD__)
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#endif
-
-#include <net/slcompress.h>
-
-#if defined (__FreeBSD__) || defined (__OpenBSD__)
-#include <netinet/if_ether.h>
-#else
-#include <net/ethertypes.h>
-#endif
-#else
-#error Huh? sppp without INET?
-#endif
-
-#ifdef IPX
-#include <netipx/ipx.h>
-#include <netipx/ipx_if.h>
-#endif
-
-#ifdef NS
-#include <netns/ns.h>
-#include <netns/ns_if.h>
-#endif
-
-#ifdef ISO
-#include <netiso/argo_debug.h>
-#include <netiso/iso.h>
-#include <netiso/iso_var.h>
-#include <netiso/iso_snpac.h>
-#endif
-
-#if defined(__FreeBSD__)
-
-#ifndef USE_ISPPP
-#include <net/if_sppp.h>
-#else
-#include <machine/i4b_isppp.h>
-#include <i4b/include/i4b_global.h>
-#endif
-
-#else
-#include <i4b/sppp/if_sppp.h>
-#endif
-#if defined(__NetBSD__) || defined (__OpenBSD__)
-#include <machine/cpu.h> /* XXX for softnet */
-#endif
-
-#if defined(__FreeBSD__)
-# define UNTIMEOUT(fun, arg, handle) untimeout(fun, arg, handle)
-# define TIMEOUT(fun, arg1, arg2, handle) handle = timeout(fun, arg1, arg2)
-#else
-# define UNTIMEOUT(fun, arg, handle) untimeout(fun, arg)
-# define TIMEOUT(fun, arg1, arg2, handle) timeout(fun, arg1, arg2)
-#endif
-
-# define IOCTL_CMD_T u_long
-
-#if defined(__FreeBSD__)
-#define HAS_SNPRINTF
-#endif
-
-#define MAXALIVECNT 3 /* max. alive packets */
-
-/*
- * Interface flags that can be set in an ifconfig command.
- *
- * Setting link0 will make the link passive, i.e. it will be marked
- * as being administrative openable, but won't be opened to begin
- * with. Incoming calls will be answered, or subsequent calls with
- * -link1 will cause the administrative open of the LCP layer.
- *
- * Setting link1 will cause the link to auto-dial only as packets
- * arrive to be sent.
- *
- * Setting IFF_DEBUG will syslog the option negotiation and state
- * transitions at level kern.debug. Note: all logs consistently look
- * like
- *
- * <if-name><unit>: <proto-name> <additional info...>
- *
- * with <if-name><unit> being something like "bppp0", and <proto-name>
- * being one of "lcp", "ipcp", "cisco", "chap", "pap", etc.
- */
-
-#define IFF_PASSIVE IFF_LINK0 /* wait passively for connection */
-#define IFF_AUTO IFF_LINK1 /* auto-dial on output */
-#define IFF_CISCO IFF_LINK2 /* auto-dial on output */
-
-#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */
-#define PPP_UI 0x03 /* Unnumbered Information */
-#define PPP_IP 0x0021 /* Internet Protocol */
-#define PPP_ISO 0x0023 /* ISO OSI Protocol */
-#define PPP_XNS 0x0025 /* Xerox NS Protocol */
-#define PPP_IPX 0x002b /* Novell IPX Protocol */
-#define PPP_VJ_COMP 0x002d /* VJ compressed TCP/IP */
-#define PPP_VJ_UCOMP 0x002f /* VJ uncompressed TCP/IP */
-#define PPP_LCP 0xc021 /* Link Control Protocol */
-#define PPP_PAP 0xc023 /* Password Authentication Protocol */
-#define PPP_CHAP 0xc223 /* Challenge-Handshake Auth Protocol */
-#define PPP_IPCP 0x8021 /* Internet Protocol Control Protocol */
-
-#define CONF_REQ 1 /* PPP configure request */
-#define CONF_ACK 2 /* PPP configure acknowledge */
-#define CONF_NAK 3 /* PPP configure negative ack */
-#define CONF_REJ 4 /* PPP configure reject */
-#define TERM_REQ 5 /* PPP terminate request */
-#define TERM_ACK 6 /* PPP terminate acknowledge */
-#define CODE_REJ 7 /* PPP code reject */
-#define PROTO_REJ 8 /* PPP protocol reject */
-#define ECHO_REQ 9 /* PPP echo request */
-#define ECHO_REPLY 10 /* PPP echo reply */
-#define DISC_REQ 11 /* PPP discard request */
-
-#define LCP_OPT_MRU 1 /* maximum receive unit */
-#define LCP_OPT_ASYNC_MAP 2 /* async control character map */
-#define LCP_OPT_AUTH_PROTO 3 /* authentication protocol */
-#define LCP_OPT_QUAL_PROTO 4 /* quality protocol */
-#define LCP_OPT_MAGIC 5 /* magic number */
-#define LCP_OPT_RESERVED 6 /* reserved */
-#define LCP_OPT_PROTO_COMP 7 /* protocol field compression */
-#define LCP_OPT_ADDR_COMP 8 /* address/control field compression */
-
-#define IPCP_OPT_ADDRESSES 1 /* both IP addresses; deprecated */
-#define IPCP_OPT_COMPRESSION 2 /* IP compression protocol (VJ) */
-#define IPCP_OPT_ADDRESS 3 /* local IP address */
-
-#define IPCP_COMP_VJ 0x2d /* Code for VJ compression */
-
-#define PAP_REQ 1 /* PAP name/password request */
-#define PAP_ACK 2 /* PAP acknowledge */
-#define PAP_NAK 3 /* PAP fail */
-
-#define CHAP_CHALLENGE 1 /* CHAP challenge request */
-#define CHAP_RESPONSE 2 /* CHAP challenge response */
-#define CHAP_SUCCESS 3 /* CHAP response ok */
-#define CHAP_FAILURE 4 /* CHAP response failed */
-
-#define CHAP_MD5 5 /* hash algorithm - MD5 */
-
-#define CISCO_MULTICAST 0x8f /* Cisco multicast address */
-#define CISCO_UNICAST 0x0f /* Cisco unicast address */
-#define CISCO_KEEPALIVE 0x8035 /* Cisco keepalive protocol */
-#define CISCO_ADDR_REQ 0 /* Cisco address request */
-#define CISCO_ADDR_REPLY 1 /* Cisco address reply */
-#define CISCO_KEEPALIVE_REQ 2 /* Cisco keepalive request */
-
-/* states are named and numbered according to RFC 1661 */
-#define STATE_INITIAL 0
-#define STATE_STARTING 1
-#define STATE_CLOSED 2
-#define STATE_STOPPED 3
-#define STATE_CLOSING 4
-#define STATE_STOPPING 5
-#define STATE_REQ_SENT 6
-#define STATE_ACK_RCVD 7
-#define STATE_ACK_SENT 8
-#define STATE_OPENED 9
-
-struct ppp_header {
- u_char address;
- u_char control;
- u_short protocol;
-};
-#define PPP_HEADER_LEN sizeof (struct ppp_header)
-
-struct lcp_header {
- u_char type;
- u_char ident;
- u_short len;
-};
-#define LCP_HEADER_LEN sizeof (struct lcp_header)
-
-struct cisco_packet {
- u_long type;
- u_long par1;
- u_long par2;
- u_short rel;
- u_short time0;
- u_short time1;
-};
-#define CISCO_PACKET_LEN 18
-
-/*
- * We follow the spelling and capitalization of RFC 1661 here, to make
- * it easier comparing with the standard. Please refer to this RFC in
- * case you can't make sense out of these abbreviation; it will also
- * explain the semantics related to the various events and actions.
- */
-struct cp {
- u_short proto; /* PPP control protocol number */
- u_char protoidx; /* index into state table in struct sppp */
- u_char flags;
-#define CP_LCP 0x01 /* this is the LCP */
-#define CP_AUTH 0x02 /* this is an authentication protocol */
-#define CP_NCP 0x04 /* this is a NCP */
-#define CP_QUAL 0x08 /* this is a quality reporting protocol */
- const char *name; /* name of this control protocol */
- /* event handlers */
- void (*Up)(struct sppp *sp);
- void (*Down)(struct sppp *sp);
- void (*Open)(struct sppp *sp);
- void (*Close)(struct sppp *sp);
- void (*TO)(void *sp);
- int (*RCR)(struct sppp *sp, struct lcp_header *h, int len);
- void (*RCN_rej)(struct sppp *sp, struct lcp_header *h, int len);
- void (*RCN_nak)(struct sppp *sp, struct lcp_header *h, int len);
- /* actions */
- void (*tlu)(struct sppp *sp);
- void (*tld)(struct sppp *sp);
- void (*tls)(struct sppp *sp);
- void (*tlf)(struct sppp *sp);
- void (*scr)(struct sppp *sp);
-};
-
-static struct sppp *spppq;
-
-#if defined(__FreeBSD__)
-static struct callout_handle keepalive_ch;
-#endif
-
-#if defined(__FreeBSD__)
-#define SPP_FMT "%s%d: "
-#define SPP_ARGS(ifp) (ifp)->if_name, (ifp)->if_unit
-#else
-#define SPP_FMT "%s: "
-#define SPP_ARGS(ifp) (ifp)->if_xname
-#endif
-
-/*
- * The following disgusting hack gets around the problem that IP TOS
- * can't be set yet. We want to put "interactive" traffic on a high
- * priority queue. To decide if traffic is interactive, we check that
- * a) it is TCP and b) one of its ports is telnet, rlogin or ftp control.
- *
- * XXX is this really still necessary? - joerg -
- */
-static u_short interactive_ports[8] = {
- 0, 513, 0, 0,
- 0, 21, 0, 23,
-};
-#define INTERACTIVE(p) (interactive_ports[(p) & 7] == (p))
-
-/* almost every function needs these */
-#define STDDCL \
- struct ifnet *ifp = &sp->pp_if; \
- int debug = ifp->if_flags & IFF_DEBUG
-
-static int sppp_output(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *dst, struct rtentry *rt);
-
-static void sppp_cisco_send(struct sppp *sp, int type, long par1, long par2);
-static void sppp_cisco_input(struct sppp *sp, struct mbuf *m);
-
-static void sppp_cp_input(const struct cp *cp, struct sppp *sp,
- struct mbuf *m);
-static void sppp_cp_send(struct sppp *sp, u_short proto, u_char type,
- u_char ident, u_short len, void *data);
-/* static void sppp_cp_timeout(void *arg); */
-static void sppp_cp_change_state(const struct cp *cp, struct sppp *sp,
- int newstate);
-static void sppp_auth_send(const struct cp *cp,
- struct sppp *sp, unsigned int type, unsigned int id,
- ...);
-
-static void sppp_up_event(const struct cp *cp, struct sppp *sp);
-static void sppp_down_event(const struct cp *cp, struct sppp *sp);
-static void sppp_open_event(const struct cp *cp, struct sppp *sp);
-static void sppp_close_event(const struct cp *cp, struct sppp *sp);
-static void sppp_to_event(const struct cp *cp, struct sppp *sp);
-
-static void sppp_null(struct sppp *sp);
-
-static void sppp_lcp_init(struct sppp *sp);
-static void sppp_lcp_up(struct sppp *sp);
-static void sppp_lcp_down(struct sppp *sp);
-static void sppp_lcp_open(struct sppp *sp);
-static void sppp_lcp_close(struct sppp *sp);
-static void sppp_lcp_TO(void *sp);
-static int sppp_lcp_RCR(struct sppp *sp, struct lcp_header *h, int len);
-static void sppp_lcp_RCN_rej(struct sppp *sp, struct lcp_header *h, int len);
-static void sppp_lcp_RCN_nak(struct sppp *sp, struct lcp_header *h, int len);
-static void sppp_lcp_tlu(struct sppp *sp);
-static void sppp_lcp_tld(struct sppp *sp);
-static void sppp_lcp_tls(struct sppp *sp);
-static void sppp_lcp_tlf(struct sppp *sp);
-static void sppp_lcp_scr(struct sppp *sp);
-static void sppp_lcp_check_and_close(struct sppp *sp);
-static int sppp_ncp_check(struct sppp *sp);
-
-static void sppp_ipcp_init(struct sppp *sp);
-static void sppp_ipcp_up(struct sppp *sp);
-static void sppp_ipcp_down(struct sppp *sp);
-static void sppp_ipcp_open(struct sppp *sp);
-static void sppp_ipcp_close(struct sppp *sp);
-static void sppp_ipcp_TO(void *sp);
-static int sppp_ipcp_RCR(struct sppp *sp, struct lcp_header *h, int len);
-static void sppp_ipcp_RCN_rej(struct sppp *sp, struct lcp_header *h, int len);
-static void sppp_ipcp_RCN_nak(struct sppp *sp, struct lcp_header *h, int len);
-static void sppp_ipcp_tlu(struct sppp *sp);
-static void sppp_ipcp_tld(struct sppp *sp);
-static void sppp_ipcp_tls(struct sppp *sp);
-static void sppp_ipcp_tlf(struct sppp *sp);
-static void sppp_ipcp_scr(struct sppp *sp);
-
-static void sppp_pap_input(struct sppp *sp, struct mbuf *m);
-static void sppp_pap_init(struct sppp *sp);
-static void sppp_pap_open(struct sppp *sp);
-static void sppp_pap_close(struct sppp *sp);
-static void sppp_pap_TO(void *sp);
-static void sppp_pap_my_TO(void *sp);
-static void sppp_pap_tlu(struct sppp *sp);
-static void sppp_pap_tld(struct sppp *sp);
-static void sppp_pap_scr(struct sppp *sp);
-
-static void sppp_chap_input(struct sppp *sp, struct mbuf *m);
-static void sppp_chap_init(struct sppp *sp);
-static void sppp_chap_open(struct sppp *sp);
-static void sppp_chap_close(struct sppp *sp);
-static void sppp_chap_TO(void *sp);
-static void sppp_chap_tlu(struct sppp *sp);
-static void sppp_chap_tld(struct sppp *sp);
-static void sppp_chap_scr(struct sppp *sp);
-
-static const char *sppp_auth_type_name(u_short proto, u_char type);
-static const char *sppp_cp_type_name(u_char type);
-static const char *sppp_dotted_quad(u_long addr);
-static const char *sppp_ipcp_opt_name(u_char opt);
-static const char *sppp_lcp_opt_name(u_char opt);
-static const char *sppp_phase_name(enum ppp_phase phase);
-static const char *sppp_proto_name(u_short proto);
-static const char *sppp_state_name(int state);
-static int sppp_params(struct sppp *sp, IOCTL_CMD_T cmd, void *data);
-static int sppp_strnlen(u_char *p, int max);
-static void sppp_get_ip_addrs(struct sppp *sp, u_long *src, u_long *dst,
- u_long *srcmask);
-static void sppp_keepalive(void *dummy);
-static void sppp_phase_network(struct sppp *sp);
-static void sppp_print_bytes(const u_char *p, u_short len);
-static void sppp_print_string(const char *p, u_short len);
-static void sppp_qflush(struct ifqueue *ifq);
-static void sppp_set_ip_addr(struct sppp *sp, u_long src);
-
-/* our control protocol descriptors */
-static const struct cp lcp = {
- PPP_LCP, IDX_LCP, CP_LCP, "lcp",
- sppp_lcp_up, sppp_lcp_down, sppp_lcp_open, sppp_lcp_close,
- sppp_lcp_TO, sppp_lcp_RCR, sppp_lcp_RCN_rej, sppp_lcp_RCN_nak,
- sppp_lcp_tlu, sppp_lcp_tld, sppp_lcp_tls, sppp_lcp_tlf,
- sppp_lcp_scr
-};
-
-static const struct cp ipcp = {
- PPP_IPCP, IDX_IPCP, CP_NCP, "ipcp",
- sppp_ipcp_up, sppp_ipcp_down, sppp_ipcp_open, sppp_ipcp_close,
- sppp_ipcp_TO, sppp_ipcp_RCR, sppp_ipcp_RCN_rej, sppp_ipcp_RCN_nak,
- sppp_ipcp_tlu, sppp_ipcp_tld, sppp_ipcp_tls, sppp_ipcp_tlf,
- sppp_ipcp_scr
-};
-
-static const struct cp pap = {
- PPP_PAP, IDX_PAP, CP_AUTH, "pap",
- sppp_null, sppp_null, sppp_pap_open, sppp_pap_close,
- sppp_pap_TO, 0, 0, 0,
- sppp_pap_tlu, sppp_pap_tld, sppp_null, sppp_null,
- sppp_pap_scr
-};
-
-static const struct cp chap = {
- PPP_CHAP, IDX_CHAP, CP_AUTH, "chap",
- sppp_null, sppp_null, sppp_chap_open, sppp_chap_close,
- sppp_chap_TO, 0, 0, 0,
- sppp_chap_tlu, sppp_chap_tld, sppp_null, sppp_null,
- sppp_chap_scr
-};
-
-static const struct cp *cps[IDX_COUNT] = {
- &lcp, /* IDX_LCP */
- &ipcp, /* IDX_IPCP */
- &pap, /* IDX_PAP */
- &chap, /* IDX_CHAP */
-};
-
-
- /*
- * Exported functions, comprising our interface to the lower layer.
- */
-
-/*
- * Process the received packet.
- */
-void
-#ifndef USE_ISPPP
-sppp_input(struct ifnet *ifp, struct mbuf *m)
-#else
-isppp_input(struct ifnet *ifp, struct mbuf *m)
-#endif
-{
- struct ppp_header *h;
- struct ifqueue *inq = 0;
- int s;
- struct sppp *sp = (struct sppp *)ifp;
- int debug = ifp->if_flags & IFF_DEBUG;
-
- if (ifp->if_flags & IFF_UP)
- /* Count received bytes, add FCS and one flag */
- ifp->if_ibytes += m->m_pkthdr.len + 3;
-
- if (m->m_pkthdr.len <= PPP_HEADER_LEN) {
- /* Too small packet, drop it. */
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "input packet is too small, %d bytes\n",
- SPP_ARGS(ifp), m->m_pkthdr.len);
- drop:
- m_freem (m);
- drop2:
- ++ifp->if_ierrors;
- ++ifp->if_iqdrops;
- return;
- }
-
- /* Get PPP header. */
- h = mtod (m, struct ppp_header*);
- m_adj (m, PPP_HEADER_LEN);
-
- switch (h->address) {
- case PPP_ALLSTATIONS:
- if (h->control != PPP_UI)
- goto invalid;
- if (sp->pp_mode == IFF_CISCO) {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "PPP packet in Cisco mode "
- "<addr=0x%x ctrl=0x%x proto=0x%x>\n",
- SPP_ARGS(ifp),
- h->address, h->control, ntohs(h->protocol));
- goto drop;
- }
- switch (ntohs (h->protocol)) {
- default:
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "rejecting protocol "
- "<addr=0x%x ctrl=0x%x proto=0x%x>\n",
- SPP_ARGS(ifp),
- h->address, h->control, ntohs(h->protocol));
-
- if (sp->state[IDX_LCP] == STATE_OPENED)
- sppp_cp_send (sp, PPP_LCP, PROTO_REJ,
- ++sp->pp_seq, m->m_pkthdr.len + 2,
- &h->protocol);
-
- ++ifp->if_noproto;
- goto drop;
- case PPP_LCP:
- sppp_cp_input(&lcp, sp, m);
- m_freem (m);
- return;
- case PPP_PAP:
- if (sp->pp_phase >= PHASE_AUTHENTICATE)
- sppp_pap_input(sp, m);
- m_freem (m);
- return;
- case PPP_CHAP:
- if (sp->pp_phase >= PHASE_AUTHENTICATE)
- sppp_chap_input(sp, m);
- m_freem (m);
- return;
-#ifdef INET
- case PPP_IPCP:
- if (sp->pp_phase == PHASE_NETWORK)
- sppp_cp_input(&ipcp, sp, m);
- m_freem (m);
- return;
- case PPP_IP:
- if (sp->state[IDX_IPCP] == STATE_OPENED) {
- schednetisr (NETISR_IP);
- inq = &ipintrq;
- }
- break;
-#ifdef SPPP_VJ
- case PPP_VJ_COMP:
- if (sp->state[IDX_IPCP] == STATE_OPENED) {
- u_char *iphdr;
- int hlen, vjlen;
-
- if ((vjlen = sl_uncompress_tcp_core(m->m_data,
- m->m_len, m->m_len, TYPE_COMPRESSED_TCP,
- &sp->pp_comp, &iphdr, &hlen)) <= 0)
- goto drop;
-
- m_adj(m, vjlen);
-
- M_PREPEND(m, hlen, M_DONTWAIT);
- if (m == NULL)
- goto drop2;
- bcopy(iphdr, mtod(m, u_char *), hlen);
-
- schednetisr (NETISR_IP);
- inq = &ipintrq;
- }
- break;
- case PPP_VJ_UCOMP:
- if (sp->state[IDX_IPCP] == STATE_OPENED) {
- u_char *iphdr;
- int hlen;
-
- if ((sl_uncompress_tcp_core(m->m_data,
- m->m_len, m->m_len, TYPE_UNCOMPRESSED_TCP,
- &sp->pp_comp, &iphdr, &hlen)) != 0)
- goto drop;
-
- schednetisr (NETISR_IP);
- inq = &ipintrq;
- }
- break;
-#endif
-#endif
-#ifdef IPX
- case PPP_IPX:
- /* IPX IPXCP not implemented yet */
- if (sp->pp_phase == PHASE_NETWORK) {
- schednetisr (NETISR_IPX);
- inq = &ipxintrq;
- }
- break;
-#endif
-#ifdef NS
- case PPP_XNS:
- /* XNS IDPCP not implemented yet */
- if (sp->pp_phase == PHASE_NETWORK) {
- schednetisr (NETISR_NS);
- inq = &nsintrq;
- }
- break;
-#endif
-#ifdef ISO
- case PPP_ISO:
- /* OSI NLCP not implemented yet */
- if (sp->pp_phase == PHASE_NETWORK) {
- schednetisr (NETISR_ISO);
- inq = &clnlintrq;
- }
- break;
-#endif
- }
- break;
- case CISCO_MULTICAST:
- case CISCO_UNICAST:
- /* Don't check the control field here (RFC 1547). */
- if (sp->pp_mode != IFF_CISCO) {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "Cisco packet in PPP mode "
- "<addr=0x%x ctrl=0x%x proto=0x%x>\n",
- SPP_ARGS(ifp),
- h->address, h->control, ntohs(h->protocol));
- goto drop;
- }
- switch (ntohs (h->protocol)) {
- default:
- ++ifp->if_noproto;
- goto invalid;
- case CISCO_KEEPALIVE:
- sppp_cisco_input ((struct sppp*) ifp, m);
- m_freem (m);
- return;
-#ifdef INET
- case ETHERTYPE_IP:
- schednetisr (NETISR_IP);
- inq = &ipintrq;
- break;
-#endif
-#ifdef IPX
- case ETHERTYPE_IPX:
- schednetisr (NETISR_IPX);
- inq = &ipxintrq;
- break;
-#endif
-#ifdef NS
- case ETHERTYPE_NS:
- schednetisr (NETISR_NS);
- inq = &nsintrq;
- break;
-#endif
- }
- break;
- default: /* Invalid PPP packet. */
- invalid:
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "invalid input packet "
- "<addr=0x%x ctrl=0x%x proto=0x%x>\n",
- SPP_ARGS(ifp),
- h->address, h->control, ntohs(h->protocol));
- goto drop;
- }
-
- if (! (ifp->if_flags & IFF_UP) || ! inq)
- goto drop;
-
- /* Check queue. */
- s = splimp();
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- if (! IF_HANDOFF(inq, m, NULL)) {
- ++ifp->if_ierrors;
- ++ifp->if_iqdrops;
- if (debug)
- log(LOG_DEBUG, SPP_FMT "protocol queue overflow\n",
- SPP_ARGS(ifp));
- } else {
- sp->pp_last_recv = time_second;
- }
-#else
- if (IF_QFULL (inq)) {
- /* Queue overflow. */
- IF_DROP(inq);
- splx(s);
- if (debug)
- log(LOG_DEBUG, SPP_FMT "protocol queue overflow\n",
- SPP_ARGS(ifp));
- goto drop;
- }
- IF_ENQUEUE(inq, m);
- sp->pp_last_recv = time_second;
-#endif
- splx(s);
-}
-
-/*
- * Enqueue transmit packet.
- */
-static int
-sppp_output(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *dst, struct rtentry *rt)
-{
- struct sppp *sp = (struct sppp*) ifp;
- struct ppp_header *h;
- struct ifqueue *ifq;
- int s, rv = 0;
- int debug = ifp->if_flags & IFF_DEBUG;
-#ifdef SPPP_VJ
- int ipproto = PPP_IP;
-#endif
-
- s = splimp();
-
- if ((ifp->if_flags & IFF_UP) == 0 ||
- (ifp->if_flags & (IFF_RUNNING | IFF_AUTO)) == 0) {
- m_freem (m);
- splx (s);
- return (ENETDOWN);
- }
-
- if ((ifp->if_flags & (IFF_RUNNING | IFF_AUTO)) == IFF_AUTO) {
- /*
- * Interface is not yet running, but auto-dial. Need
- * to start LCP for it.
- */
- ifp->if_flags |= IFF_RUNNING;
- splx(s);
- lcp.Open(sp);
- s = splimp();
- }
-
- ifq = &ifp->if_snd;
-
-#ifdef INET
- if (dst->sa_family == AF_INET) {
- /* XXX Check mbuf length here? */
- struct ip *ip = mtod (m, struct ip*);
- struct tcphdr *tcp = (struct tcphdr*) ((long*)ip + ip->ip_hl);
-
- /*
- * When using dynamic local IP address assignment by using
- * 0.0.0.0 as a local address, the first TCP session will
- * not connect because the local TCP checksum is computed
- * using 0.0.0.0 which will later become our real IP address
- * so the TCP checksum computed at the remote end will
- * become invalid. So we
- * - don't let packets with src ip addr 0 thru
- * - we flag TCP packets with src ip 0 as an error
- */
-
- if(ip->ip_src.s_addr == INADDR_ANY) /* -hm */
- {
- m_freem(m);
- splx(s);
- if(ip->ip_p == IPPROTO_TCP)
- return(EADDRNOTAVAIL);
- else
- return(0);
- }
-
- /*
- * Put low delay, telnet, rlogin and ftp control packets
- * in front of the queue.
- */
- if (_IF_QFULL (&sp->pp_fastq))
- ;
- else if (ip->ip_tos & IPTOS_LOWDELAY)
- ifq = &sp->pp_fastq;
- else if (m->m_len < sizeof *ip + sizeof *tcp)
- ;
- else if (ip->ip_p != IPPROTO_TCP)
- ;
- else if (INTERACTIVE (ntohs (tcp->th_sport)))
- ifq = &sp->pp_fastq;
- else if (INTERACTIVE (ntohs (tcp->th_dport)))
- ifq = &sp->pp_fastq;
-
-#ifdef SPPP_VJ
- /*
- * Do IP Header compression
- */
- if (sp->pp_mode != IFF_CISCO &&
- (sp->ipcp.flags & IPCP_VJ) &&
- ip->ip_p == IPPROTO_TCP)
- {
- switch (sl_compress_tcp(m, ip, &sp->pp_comp,
- sp->ipcp.compress_cid)) {
- case TYPE_COMPRESSED_TCP:
- ipproto = PPP_VJ_COMP;
- break;
- case TYPE_UNCOMPRESSED_TCP:
- ipproto = PPP_VJ_UCOMP;
- break;
- case TYPE_IP:
- ipproto = PPP_IP;
- break;
- default:
- m_freem(m);
- splx(s);
- return (EINVAL);
- }
- }
-#endif
- }
-#endif
-
- /*
- * Prepend general data packet PPP header. For now, IP only.
- */
- M_PREPEND (m, PPP_HEADER_LEN, M_DONTWAIT);
- if (! m) {
- if (debug)
- log(LOG_DEBUG, SPP_FMT "no memory for transmit header\n",
- SPP_ARGS(ifp));
- ++ifp->if_oerrors;
- splx (s);
- return (ENOBUFS);
- }
- /*
- * May want to check size of packet
- * (albeit due to the implementation it's always enough)
- */
- h = mtod (m, struct ppp_header*);
- if (sp->pp_mode == IFF_CISCO) {
- h->address = CISCO_UNICAST; /* unicast address */
- h->control = 0;
- } else {
- h->address = PPP_ALLSTATIONS; /* broadcast address */
- h->control = PPP_UI; /* Unnumbered Info */
- }
-
- switch (dst->sa_family) {
-#ifdef INET
- case AF_INET: /* Internet Protocol */
- if (sp->pp_mode == IFF_CISCO)
- h->protocol = htons (ETHERTYPE_IP);
- else {
- /*
- * Don't choke with an ENETDOWN early. It's
- * possible that we just started dialing out,
- * so don't drop the packet immediately. If
- * we notice that we run out of buffer space
- * below, we will however remember that we are
- * not ready to carry IP packets, and return
- * ENETDOWN, as opposed to ENOBUFS.
- */
-#ifdef SPPP_VJ
- h->protocol = htons(ipproto);
-#else
- h->protocol = htons(PPP_IP);
-#endif
- if (sp->state[IDX_IPCP] != STATE_OPENED)
- rv = ENETDOWN;
- }
- break;
-#endif
-#ifdef NS
- case AF_NS: /* Xerox NS Protocol */
- h->protocol = htons (sp->pp_mode == IFF_CISCO ?
- ETHERTYPE_NS : PPP_XNS);
- break;
-#endif
-#ifdef IPX
- case AF_IPX: /* Novell IPX Protocol */
- h->protocol = htons (sp->pp_mode == IFF_CISCO ?
- ETHERTYPE_IPX : PPP_IPX);
- break;
-#endif
-#ifdef ISO
- case AF_ISO: /* ISO OSI Protocol */
- if (sp->pp_mode == IFF_CISCO)
- goto nosupport;
- h->protocol = htons (PPP_ISO);
- break;
-nosupport:
-#endif
- default:
- m_freem (m);
- ++ifp->if_oerrors;
- splx (s);
- return (EAFNOSUPPORT);
- }
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- /*
- * Queue message on interface, and start output if interface
- * not yet active.
- *
- * Count output packets and bytes.
- * The packet length includes header, FCS and 1 flag,
- * according to RFC 1333.
- */
- if (! IF_HANDOFF_ADJ(ifq, m, ifp, 3)) {
- ++ifp->if_oerrors;
- splx (s);
- return (rv? rv: ENOBUFS);
- }
-
-#else
- /*
- * Queue message on interface, and start output if interface
- * not yet active.
- */
- if (IF_QFULL (ifq)) {
- IF_DROP (&ifp->if_snd);
- m_freem (m);
- ++ifp->if_oerrors;
- splx (s);
- return (rv? rv: ENOBUFS);
- }
- IF_ENQUEUE (ifq, m);
- if (! (ifp->if_flags & IFF_OACTIVE))
- (*ifp->if_start) (ifp);
-
- /*
- * Count output packets and bytes.
- * The packet length includes header, FCS and 1 flag,
- * according to RFC 1333.
- */
- ifp->if_obytes += m->m_pkthdr.len + 3;
-#endif
- sp->pp_last_sent = time_second;
- splx (s);
- return (0);
-}
-
-void
-#ifndef USE_ISPPP
-sppp_attach(struct ifnet *ifp)
-#else
-isppp_attach(struct ifnet *ifp)
-#endif
-{
- struct sppp *sp = (struct sppp*) ifp;
-
- /* Initialize keepalive handler. */
- if (! spppq)
- TIMEOUT(sppp_keepalive, 0, hz * 10, keepalive_ch);
-
- /* Insert new entry into the keepalive list. */
- sp->pp_next = spppq;
- spppq = sp;
-
- sp->pp_if.if_mtu = PP_MTU;
- sp->pp_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST;
- sp->pp_if.if_type = IFT_PPP;
- sp->pp_if.if_output = sppp_output;
-
-#if 0
- sp->pp_flags = PP_KEEPALIVE;
-#endif
-
- sp->pp_fastq.ifq_maxlen = 32;
- sp->pp_cpq.ifq_maxlen = 20;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&sp->pp_fastq.ifq_mtx, "i4b_isppp_fastq", MTX_DEF);
- mtx_init(&sp->pp_cpq.ifq_mtx, "i4b_isppp_cpq", MTX_DEF);
-#endif
-
- sp->pp_loopcnt = 0;
- sp->pp_alivecnt = 0;
- sp->pp_seq = 0;
- sp->pp_rseq = 0;
- sp->pp_phase = PHASE_DEAD;
- sp->pp_up = lcp.Up;
- sp->pp_down = lcp.Down;
-
-#ifdef SPPP_VJ
- sp->enable_vj = 1;
-#ifdef __FreeBSD__
- sl_compress_init(&sp->pp_comp, -1);
-#else
- sl_compress_init(&sp->pp_comp);
-#endif
-#endif
-
- sp->pp_last_recv = sp->pp_last_sent = time_second;
- sppp_lcp_init(sp);
- sppp_ipcp_init(sp);
- sppp_pap_init(sp);
- sppp_chap_init(sp);
-}
-
-void
-#ifndef USE_ISPPP
-sppp_detach(struct ifnet *ifp)
-#else
-isppp_detach(struct ifnet *ifp)
-#endif
-{
- struct sppp **q, *p, *sp = (struct sppp*) ifp;
- int i;
-
- /* Remove the entry from the keepalive list. */
- for (q = &spppq; (p = *q); q = &p->pp_next)
- if (p == sp) {
- *q = p->pp_next;
- break;
- }
-
- /* Stop keepalive handler. */
- if (! spppq)
- UNTIMEOUT(sppp_keepalive, 0, keepalive_ch);
-
- for (i = 0; i < IDX_COUNT; i++)
- UNTIMEOUT((cps[i])->TO, (void *)sp, sp->ch[i]);
-
- UNTIMEOUT(sppp_pap_my_TO, (void *)sp, sp->pap_my_to_ch);
-}
-
-/*
- * Flush the interface output queue.
- */
-void
-#ifndef USE_ISPPP
-sppp_flush(struct ifnet *ifp)
-#else
-isppp_flush(struct ifnet *ifp)
-#endif
-{
- struct sppp *sp = (struct sppp*) ifp;
-
- sppp_qflush (&sp->pp_if.if_snd);
- sppp_qflush (&sp->pp_fastq);
- sppp_qflush (&sp->pp_cpq);
-}
-
-/*
- * Check if the output queue is empty.
- */
-int
-#ifndef USE_ISPPP
-sppp_isempty(struct ifnet *ifp)
-#else
-isppp_isempty(struct ifnet *ifp)
-#endif
-{
- struct sppp *sp = (struct sppp*) ifp;
- int empty, s;
-
- s = splimp();
- empty = !sp->pp_fastq.ifq_head && !sp->pp_cpq.ifq_head &&
- !sp->pp_if.if_snd.ifq_head;
- splx(s);
- return (empty);
-}
-
-/*
- * Get next packet to send.
- */
-struct mbuf *
-#ifndef USE_ISPPP
-sppp_dequeue(struct ifnet *ifp)
-#else
-isppp_dequeue(struct ifnet *ifp)
-#endif
-{
- struct sppp *sp = (struct sppp*) ifp;
- struct mbuf *m;
- int s;
-
- s = splimp();
- /*
- * Process only the control protocol queue until we have at
- * least one NCP open.
- *
- * Do always serve all three queues in Cisco mode.
- */
- IF_DEQUEUE(&sp->pp_cpq, m);
- if (m == NULL &&
- (sppp_ncp_check(sp) || sp->pp_mode == IFF_CISCO)) {
- IF_DEQUEUE(&sp->pp_fastq, m);
- if (m == NULL)
- IF_DEQUEUE (&sp->pp_if.if_snd, m);
- }
- splx(s);
- return m;
-}
-
-/*
- * Pick the next packet, do not remove it from the queue.
- */
-struct mbuf *
-#ifndef USE_ISPPP
-sppp_pick(struct ifnet *ifp)
-#else
-isppp_pick(struct ifnet *ifp)
-#endif
-{
- struct sppp *sp = (struct sppp*)ifp;
- struct mbuf *m;
- int s;
-
- s= splimp ();
-
- m = sp->pp_cpq.ifq_head;
- if (m == NULL &&
- (sp->pp_phase == PHASE_NETWORK || sp->pp_mode == IFF_CISCO))
- if ((m = sp->pp_fastq.ifq_head) == NULL)
- m = sp->pp_if.if_snd.ifq_head;
- splx (s);
- return (m);
-}
-
-/*
- * Process an ioctl request. Called on low priority level.
- */
-int
-#ifndef USE_ISPPP
-sppp_ioctl(struct ifnet *ifp, IOCTL_CMD_T cmd, void *data)
-#else
-isppp_ioctl(struct ifnet *ifp, IOCTL_CMD_T cmd, void *data)
-#endif
-{
- struct ifreq *ifr = (struct ifreq*) data;
- struct sppp *sp = (struct sppp*) ifp;
- int s, rv, going_up, going_down, newmode;
-
- s = splimp();
- rv = 0;
- switch (cmd) {
- case SIOCAIFADDR:
- case SIOCSIFDSTADDR:
- break;
-
- case SIOCSIFADDR:
- if_up(ifp);
- /* fall through... */
-
- case SIOCSIFFLAGS:
- going_up = ifp->if_flags & IFF_UP &&
- (ifp->if_flags & IFF_RUNNING) == 0;
- going_down = (ifp->if_flags & IFF_UP) == 0 &&
- ifp->if_flags & IFF_RUNNING;
-
- newmode = ifp->if_flags & IFF_PASSIVE;
- if (!newmode)
- newmode = ifp->if_flags & IFF_AUTO;
- if (!newmode)
- newmode = ifp->if_flags & IFF_CISCO;
- ifp->if_flags &= ~(IFF_PASSIVE | IFF_AUTO | IFF_CISCO);
- ifp->if_flags |= newmode;
-
- if (newmode != sp->pp_mode) {
- going_down = 1;
- if (!going_up)
- going_up = ifp->if_flags & IFF_RUNNING;
- }
-
- if (going_down) {
- if (sp->pp_mode != IFF_CISCO)
- lcp.Close(sp);
- else if (sp->pp_tlf)
- (sp->pp_tlf)(sp);
-
-#ifndef USE_ISPPP
- sppp_flush(ifp);
-#else
- isppp_flush(ifp);
-#endif
- ifp->if_flags &= ~IFF_RUNNING;
- sp->pp_mode = newmode;
- }
-
- if (going_up) {
- if (sp->pp_mode != IFF_CISCO)
- lcp.Close(sp);
- sp->pp_mode = newmode;
- if (sp->pp_mode == 0) {
- ifp->if_flags |= IFF_RUNNING;
- lcp.Open(sp);
- }
- if (sp->pp_mode == IFF_CISCO) {
- if (sp->pp_tls)
- (sp->pp_tls)(sp);
- ifp->if_flags |= IFF_RUNNING;
- }
- }
-
- break;
-
-#ifdef SIOCSIFMTU
-#ifndef ifr_mtu
-#define ifr_mtu ifr_metric
-#endif
- case SIOCSIFMTU:
- if (ifr->ifr_mtu < 128 || ifr->ifr_mtu > sp->lcp.their_mru)
- return (EINVAL);
- ifp->if_mtu = ifr->ifr_mtu;
- break;
-#endif
-#ifdef SLIOCSETMTU
- case SLIOCSETMTU:
- if (*(short*)data < 128 || *(short*)data > sp->lcp.their_mru)
- return (EINVAL);
- ifp->if_mtu = *(short*)data;
- break;
-#endif
-#ifdef SIOCGIFMTU
- case SIOCGIFMTU:
- ifr->ifr_mtu = ifp->if_mtu;
- break;
-#endif
-#ifdef SLIOCGETMTU
- case SLIOCGETMTU:
- *(short*)data = ifp->if_mtu;
- break;
-#endif
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- break;
-
- case SIOCGIFGENERIC:
- case SIOCSIFGENERIC:
- rv = sppp_params(sp, cmd, data);
- break;
-
- default:
- rv = ENOTTY;
- }
- splx(s);
- return rv;
-}
-
-
- /*
- * Cisco framing implementation.
- */
-
-/*
- * Handle incoming Cisco keepalive protocol packets.
- */
-static void
-sppp_cisco_input(struct sppp *sp, struct mbuf *m)
-{
- STDDCL;
- struct cisco_packet *h;
- u_long me, mymask;
-
- if (m->m_pkthdr.len < CISCO_PACKET_LEN) {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "cisco invalid packet length: %d bytes\n",
- SPP_ARGS(ifp), m->m_pkthdr.len);
- return;
- }
- h = mtod (m, struct cisco_packet*);
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "cisco input: %d bytes "
- "<0x%lx 0x%lx 0x%lx 0x%x 0x%x-0x%x>\n",
- SPP_ARGS(ifp), m->m_pkthdr.len,
- (u_long)ntohl (h->type), (u_long)h->par1, (u_long)h->par2, (u_int)h->rel,
- (u_int)h->time0, (u_int)h->time1);
- switch (ntohl (h->type)) {
- default:
- if (debug)
- log(-1, SPP_FMT "cisco unknown packet type: 0x%lx\n",
- SPP_ARGS(ifp), (u_long)ntohl (h->type));
- break;
- case CISCO_ADDR_REPLY:
- /* Reply on address request, ignore */
- break;
- case CISCO_KEEPALIVE_REQ:
- sp->pp_alivecnt = 0;
- sp->pp_rseq = ntohl (h->par1);
- if (sp->pp_seq == sp->pp_rseq) {
- /* Local and remote sequence numbers are equal.
- * Probably, the line is in loopback mode. */
- if (sp->pp_loopcnt >= MAXALIVECNT) {
- printf (SPP_FMT "loopback\n",
- SPP_ARGS(ifp));
- sp->pp_loopcnt = 0;
- if (ifp->if_flags & IFF_UP) {
- if_down (ifp);
- sppp_qflush (&sp->pp_cpq);
- }
- }
- ++sp->pp_loopcnt;
-
- /* Generate new local sequence number */
-#if defined(__NetBSD__) || (defined(__FreeBSD__) && __FreeBSD__ >= 3)
- sp->pp_seq = random();
-#else
- sp->pp_seq ^= time.tv_sec ^ time.tv_usec;
-#endif
- break;
- }
- sp->pp_loopcnt = 0;
- if (! (ifp->if_flags & IFF_UP) &&
- (ifp->if_flags & IFF_RUNNING)) {
- if_up(ifp);
- printf (SPP_FMT "up\n", SPP_ARGS(ifp));
- }
- break;
- case CISCO_ADDR_REQ:
- sppp_get_ip_addrs(sp, &me, 0, &mymask);
- if (me != 0L)
- sppp_cisco_send(sp, CISCO_ADDR_REPLY, me, mymask);
- break;
- }
-}
-
-/*
- * Send Cisco keepalive packet.
- */
-static void
-sppp_cisco_send(struct sppp *sp, int type, long par1, long par2)
-{
- STDDCL;
- struct ppp_header *h;
- struct cisco_packet *ch;
- struct mbuf *m;
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- struct timeval tv;
-#else
- u_long t = (time.tv_sec - boottime.tv_sec) * 1000;
-#endif
-
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- getmicrouptime(&tv);
-#endif
-
- MGETHDR (m, M_DONTWAIT, MT_DATA);
- if (! m)
- return;
- m->m_pkthdr.len = m->m_len = PPP_HEADER_LEN + CISCO_PACKET_LEN;
- m->m_pkthdr.rcvif = 0;
-
- h = mtod (m, struct ppp_header*);
- h->address = CISCO_MULTICAST;
- h->control = 0;
- h->protocol = htons (CISCO_KEEPALIVE);
-
- ch = (struct cisco_packet*) (h + 1);
- ch->type = htonl (type);
- ch->par1 = htonl (par1);
- ch->par2 = htonl (par2);
- ch->rel = -1;
-
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- ch->time0 = htons ((u_short) (tv.tv_sec >> 16));
- ch->time1 = htons ((u_short) tv.tv_sec);
-#else
- ch->time0 = htons ((u_short) (t >> 16));
- ch->time1 = htons ((u_short) t);
-#endif
-
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "cisco output: <0x%lx 0x%lx 0x%lx 0x%x 0x%x-0x%x>\n",
- SPP_ARGS(ifp), (u_long)ntohl (ch->type), (u_long)ch->par1,
- (u_long)ch->par2, (u_int)ch->rel, (u_int)ch->time0, (u_int)ch->time1);
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- (void) IF_HANDOFF_ADJ(&sp->pp_cpq, m, ifp, 3);
-#else
- if (IF_QFULL (&sp->pp_cpq)) {
- IF_DROP (&sp->pp_fastq);
- IF_DROP (&ifp->if_snd);
- m_freem (m);
- } else {
- IF_ENQUEUE (&sp->pp_cpq, m);
- }
- if (! (ifp->if_flags & IFF_OACTIVE))
- (*ifp->if_start) (ifp);
-
- ifp->if_obytes += m->m_pkthdr.len + 3;
-#endif
-}
-
- /*
- * PPP protocol implementation.
- */
-
-/*
- * Send PPP control protocol packet.
- */
-static void
-sppp_cp_send(struct sppp *sp, u_short proto, u_char type,
- u_char ident, u_short len, void *data)
-{
- STDDCL;
- struct ppp_header *h;
- struct lcp_header *lh;
- struct mbuf *m;
-
- if (len > MHLEN - PPP_HEADER_LEN - LCP_HEADER_LEN)
- len = MHLEN - PPP_HEADER_LEN - LCP_HEADER_LEN;
- MGETHDR (m, M_DONTWAIT, MT_DATA);
- if (! m)
- return;
- m->m_pkthdr.len = m->m_len = PPP_HEADER_LEN + LCP_HEADER_LEN + len;
- m->m_pkthdr.rcvif = 0;
-
- h = mtod (m, struct ppp_header*);
- h->address = PPP_ALLSTATIONS; /* broadcast address */
- h->control = PPP_UI; /* Unnumbered Info */
- h->protocol = htons (proto); /* Link Control Protocol */
-
- lh = (struct lcp_header*) (h + 1);
- lh->type = type;
- lh->ident = ident;
- lh->len = htons (LCP_HEADER_LEN + len);
- if (len)
- bcopy (data, lh+1, len);
-
- if (debug) {
- log(LOG_DEBUG, SPP_FMT "%s output <%s id=0x%x len=%d",
- SPP_ARGS(ifp),
- sppp_proto_name(proto),
- sppp_cp_type_name (lh->type), lh->ident,
- ntohs (lh->len));
- sppp_print_bytes ((u_char*) (lh+1), len);
- log(-1, ">\n");
- }
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- if (! IF_HANDOFF_ADJ(&sp->pp_cpq, m, ifp, 3))
- ++ifp->if_oerrors;
-#else
- if (IF_QFULL (&sp->pp_cpq)) {
- IF_DROP (&sp->pp_fastq);
- IF_DROP (&ifp->if_snd);
- m_freem (m);
- ++ifp->if_oerrors;
- } else {
- IF_ENQUEUE (&sp->pp_cpq, m);
- }
-
- if (! (ifp->if_flags & IFF_OACTIVE))
- (*ifp->if_start) (ifp);
-
- ifp->if_obytes += m->m_pkthdr.len + 3;
-#endif
-}
-
-/*
- * Handle incoming PPP control protocol packets.
- */
-static void
-sppp_cp_input(const struct cp *cp, struct sppp *sp, struct mbuf *m)
-{
- STDDCL;
- struct lcp_header *h;
- int len = m->m_pkthdr.len;
- int rv;
- u_char *p;
-
- if (len < 4) {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "%s invalid packet length: %d bytes\n",
- SPP_ARGS(ifp), cp->name, len);
- return;
- }
- h = mtod (m, struct lcp_header*);
- if (debug) {
- log(LOG_DEBUG,
- SPP_FMT "%s input(%s): <%s id=0x%x len=%d",
- SPP_ARGS(ifp), cp->name,
- sppp_state_name(sp->state[cp->protoidx]),
- sppp_cp_type_name (h->type), h->ident, ntohs (h->len));
- sppp_print_bytes ((u_char*) (h+1), len-4);
- log(-1, ">\n");
- }
- if (len > ntohs (h->len))
- len = ntohs (h->len);
- p = (u_char *)(h + 1);
- switch (h->type) {
- case CONF_REQ:
- if (len < 4) {
- if (debug)
- log(-1, SPP_FMT "%s invalid conf-req length %d\n",
- SPP_ARGS(ifp), cp->name,
- len);
- ++ifp->if_ierrors;
- break;
- }
- /* handle states where RCR doesn't get a SCA/SCN */
- switch (sp->state[cp->protoidx]) {
- case STATE_CLOSING:
- case STATE_STOPPING:
- return;
- case STATE_CLOSED:
- sppp_cp_send(sp, cp->proto, TERM_ACK, h->ident,
- 0, 0);
- return;
- }
- rv = (cp->RCR)(sp, h, len);
- switch (sp->state[cp->protoidx]) {
- case STATE_OPENED:
- (cp->tld)(sp);
- (cp->scr)(sp);
- /* fall through... */
- case STATE_ACK_SENT:
- case STATE_REQ_SENT:
- sppp_cp_change_state(cp, sp, rv?
- STATE_ACK_SENT: STATE_REQ_SENT);
- break;
- case STATE_STOPPED:
- sp->rst_counter[cp->protoidx] = sp->lcp.max_configure;
- (cp->scr)(sp);
- sppp_cp_change_state(cp, sp, rv?
- STATE_ACK_SENT: STATE_REQ_SENT);
- break;
- case STATE_ACK_RCVD:
- if (rv) {
- sppp_cp_change_state(cp, sp, STATE_OPENED);
- if (debug)
- log(LOG_DEBUG, SPP_FMT "%s tlu\n",
- SPP_ARGS(ifp),
- cp->name);
- (cp->tlu)(sp);
- } else
- sppp_cp_change_state(cp, sp, STATE_ACK_RCVD);
- break;
- default:
- printf(SPP_FMT "%s illegal %s in state %s\n",
- SPP_ARGS(ifp), cp->name,
- sppp_cp_type_name(h->type),
- sppp_state_name(sp->state[cp->protoidx]));
- ++ifp->if_ierrors;
- }
- break;
- case CONF_ACK:
- if (h->ident != sp->confid[cp->protoidx]) {
- if (debug)
- log(-1, SPP_FMT "%s id mismatch 0x%x != 0x%x\n",
- SPP_ARGS(ifp), cp->name,
- h->ident, sp->confid[cp->protoidx]);
- ++ifp->if_ierrors;
- break;
- }
- switch (sp->state[cp->protoidx]) {
- case STATE_CLOSED:
- case STATE_STOPPED:
- sppp_cp_send(sp, cp->proto, TERM_ACK, h->ident, 0, 0);
- break;
- case STATE_CLOSING:
- case STATE_STOPPING:
- break;
- case STATE_REQ_SENT:
- sp->rst_counter[cp->protoidx] = sp->lcp.max_configure;
- sppp_cp_change_state(cp, sp, STATE_ACK_RCVD);
- break;
- case STATE_OPENED:
- (cp->tld)(sp);
- /* fall through */
- case STATE_ACK_RCVD:
- (cp->scr)(sp);
- sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
- break;
- case STATE_ACK_SENT:
- sp->rst_counter[cp->protoidx] = sp->lcp.max_configure;
- sppp_cp_change_state(cp, sp, STATE_OPENED);
- if (debug)
- log(LOG_DEBUG, SPP_FMT "%s tlu\n",
- SPP_ARGS(ifp), cp->name);
- (cp->tlu)(sp);
- break;
- default:
- printf(SPP_FMT "%s illegal %s in state %s\n",
- SPP_ARGS(ifp), cp->name,
- sppp_cp_type_name(h->type),
- sppp_state_name(sp->state[cp->protoidx]));
- ++ifp->if_ierrors;
- }
- break;
- case CONF_NAK:
- case CONF_REJ:
- if (h->ident != sp->confid[cp->protoidx]) {
- if (debug)
- log(-1, SPP_FMT "%s id mismatch 0x%x != 0x%x\n",
- SPP_ARGS(ifp), cp->name,
- h->ident, sp->confid[cp->protoidx]);
- ++ifp->if_ierrors;
- break;
- }
- if (h->type == CONF_NAK)
- (cp->RCN_nak)(sp, h, len);
- else /* CONF_REJ */
- (cp->RCN_rej)(sp, h, len);
-
- switch (sp->state[cp->protoidx]) {
- case STATE_CLOSED:
- case STATE_STOPPED:
- sppp_cp_send(sp, cp->proto, TERM_ACK, h->ident, 0, 0);
- break;
- case STATE_REQ_SENT:
- case STATE_ACK_SENT:
- sp->rst_counter[cp->protoidx] = sp->lcp.max_configure;
- (cp->scr)(sp);
- break;
- case STATE_OPENED:
- (cp->tld)(sp);
- /* fall through */
- case STATE_ACK_RCVD:
- sppp_cp_change_state(cp, sp, STATE_ACK_SENT);
- (cp->scr)(sp);
- break;
- case STATE_CLOSING:
- case STATE_STOPPING:
- break;
- default:
- printf(SPP_FMT "%s illegal %s in state %s\n",
- SPP_ARGS(ifp), cp->name,
- sppp_cp_type_name(h->type),
- sppp_state_name(sp->state[cp->protoidx]));
- ++ifp->if_ierrors;
- }
- break;
-
- case TERM_REQ:
- switch (sp->state[cp->protoidx]) {
- case STATE_ACK_RCVD:
- case STATE_ACK_SENT:
- sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
- /* fall through */
- case STATE_CLOSED:
- case STATE_STOPPED:
- case STATE_CLOSING:
- case STATE_STOPPING:
- case STATE_REQ_SENT:
- sta:
- /* Send Terminate-Ack packet. */
- if (debug)
- log(LOG_DEBUG, SPP_FMT "%s send terminate-ack\n",
- SPP_ARGS(ifp), cp->name);
- sppp_cp_send(sp, cp->proto, TERM_ACK, h->ident, 0, 0);
- break;
- case STATE_OPENED:
- (cp->tld)(sp);
- sp->rst_counter[cp->protoidx] = 0;
- sppp_cp_change_state(cp, sp, STATE_STOPPING);
- goto sta;
- break;
- default:
- printf(SPP_FMT "%s illegal %s in state %s\n",
- SPP_ARGS(ifp), cp->name,
- sppp_cp_type_name(h->type),
- sppp_state_name(sp->state[cp->protoidx]));
- ++ifp->if_ierrors;
- }
- break;
- case TERM_ACK:
- switch (sp->state[cp->protoidx]) {
- case STATE_CLOSED:
- case STATE_STOPPED:
- case STATE_REQ_SENT:
- case STATE_ACK_SENT:
- break;
- case STATE_CLOSING:
- sppp_cp_change_state(cp, sp, STATE_CLOSED);
- (cp->tlf)(sp);
- break;
- case STATE_STOPPING:
- sppp_cp_change_state(cp, sp, STATE_STOPPED);
- (cp->tlf)(sp);
- break;
- case STATE_ACK_RCVD:
- sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
- break;
- case STATE_OPENED:
- (cp->tld)(sp);
- (cp->scr)(sp);
- sppp_cp_change_state(cp, sp, STATE_ACK_RCVD);
- break;
- default:
- printf(SPP_FMT "%s illegal %s in state %s\n",
- SPP_ARGS(ifp), cp->name,
- sppp_cp_type_name(h->type),
- sppp_state_name(sp->state[cp->protoidx]));
- ++ifp->if_ierrors;
- }
- break;
- case CODE_REJ:
- case PROTO_REJ:
- /* XXX catastrophic rejects (RXJ-) aren't handled yet. */
- log(LOG_INFO,
- SPP_FMT "%s: ignoring RXJ (%s) for proto 0x%x, "
- "danger will robinson\n",
- SPP_ARGS(ifp), cp->name,
- sppp_cp_type_name(h->type), ntohs(*((u_short *)p)));
- switch (sp->state[cp->protoidx]) {
- case STATE_CLOSED:
- case STATE_STOPPED:
- case STATE_REQ_SENT:
- case STATE_ACK_SENT:
- case STATE_CLOSING:
- case STATE_STOPPING:
- case STATE_OPENED:
- break;
- case STATE_ACK_RCVD:
- sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
- break;
- default:
- printf(SPP_FMT "%s illegal %s in state %s\n",
- SPP_ARGS(ifp), cp->name,
- sppp_cp_type_name(h->type),
- sppp_state_name(sp->state[cp->protoidx]));
- ++ifp->if_ierrors;
- }
- break;
- case DISC_REQ:
- if (cp->proto != PPP_LCP)
- goto illegal;
- /* Discard the packet. */
- break;
- case ECHO_REQ:
- if (cp->proto != PPP_LCP)
- goto illegal;
- if (sp->state[cp->protoidx] != STATE_OPENED) {
- if (debug)
- log(-1, SPP_FMT "lcp echo req but lcp closed\n",
- SPP_ARGS(ifp));
- ++ifp->if_ierrors;
- break;
- }
- if (len < 8) {
- if (debug)
- log(-1, SPP_FMT "invalid lcp echo request "
- "packet length: %d bytes\n",
- SPP_ARGS(ifp), len);
- break;
- }
-
- if ((sp->lcp.opts & (1 << LCP_OPT_MAGIC)) &&
- ntohl (*(long*)(h+1)) == sp->lcp.magic) {
-
- /* Line loopback mode detected. */
- printf(SPP_FMT "loopback\n", SPP_ARGS(ifp));
- if_down (ifp);
- sppp_qflush (&sp->pp_cpq);
-
- /* Shut down the PPP link. */
- /* XXX */
- lcp.Down(sp);
- lcp.Up(sp);
- break;
- }
- *(long*)(h+1) = htonl (sp->lcp.magic);
- if (debug)
- log(-1, SPP_FMT "got lcp echo req, sending echo rep\n",
- SPP_ARGS(ifp));
- sppp_cp_send (sp, PPP_LCP, ECHO_REPLY, h->ident, len-4, h+1);
- break;
- case ECHO_REPLY:
- if (cp->proto != PPP_LCP)
- goto illegal;
- if (h->ident != sp->lcp.echoid) {
- ++ifp->if_ierrors;
- break;
- }
- if (len < 8) {
- if (debug)
- log(-1, SPP_FMT "lcp invalid echo reply "
- "packet length: %d bytes\n",
- SPP_ARGS(ifp), len);
- break;
- }
- if (debug)
- log(-1, SPP_FMT "lcp got echo rep\n",
- SPP_ARGS(ifp));
-
- if (!(sp->lcp.opts & (1 << LCP_OPT_MAGIC)) ||
- ntohl (*(long*)(h+1)) != sp->lcp.magic)
- sp->pp_alivecnt = 0;
- break;
- default:
- /* Unknown packet type -- send Code-Reject packet. */
- illegal:
- if (debug)
- log(-1, SPP_FMT "%s send code-rej for 0x%x\n",
- SPP_ARGS(ifp), cp->name, h->type);
- sppp_cp_send(sp, cp->proto, CODE_REJ, ++sp->pp_seq,
- m->m_pkthdr.len, h);
- ++ifp->if_ierrors;
- }
-}
-
-
-/*
- * The generic part of all Up/Down/Open/Close/TO event handlers.
- * Basically, the state transition handling in the automaton.
- */
-static void
-sppp_up_event(const struct cp *cp, struct sppp *sp)
-{
- STDDCL;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "%s up(%s)\n",
- SPP_ARGS(ifp), cp->name,
- sppp_state_name(sp->state[cp->protoidx]));
-
- switch (sp->state[cp->protoidx]) {
- case STATE_INITIAL:
- sppp_cp_change_state(cp, sp, STATE_CLOSED);
- break;
- case STATE_STARTING:
- sp->rst_counter[cp->protoidx] = sp->lcp.max_configure;
- (cp->scr)(sp);
- sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
- break;
- default:
- printf(SPP_FMT "%s illegal up in state %s\n",
- SPP_ARGS(ifp), cp->name,
- sppp_state_name(sp->state[cp->protoidx]));
- }
-}
-
-static void
-sppp_down_event(const struct cp *cp, struct sppp *sp)
-{
- STDDCL;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "%s down(%s)\n",
- SPP_ARGS(ifp), cp->name,
- sppp_state_name(sp->state[cp->protoidx]));
-
- switch (sp->state[cp->protoidx]) {
- case STATE_CLOSED:
- case STATE_CLOSING:
- sppp_cp_change_state(cp, sp, STATE_INITIAL);
- break;
- case STATE_STOPPED:
- sppp_cp_change_state(cp, sp, STATE_STARTING);
- (cp->tls)(sp);
- break;
- case STATE_STOPPING:
- case STATE_REQ_SENT:
- case STATE_ACK_RCVD:
- case STATE_ACK_SENT:
- sppp_cp_change_state(cp, sp, STATE_STARTING);
- break;
- case STATE_OPENED:
- (cp->tld)(sp);
- sppp_cp_change_state(cp, sp, STATE_STARTING);
- break;
- default:
- printf(SPP_FMT "%s illegal down in state %s\n",
- SPP_ARGS(ifp), cp->name,
- sppp_state_name(sp->state[cp->protoidx]));
- }
-}
-
-
-static void
-sppp_open_event(const struct cp *cp, struct sppp *sp)
-{
- STDDCL;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "%s open(%s)\n",
- SPP_ARGS(ifp), cp->name,
- sppp_state_name(sp->state[cp->protoidx]));
-
- switch (sp->state[cp->protoidx]) {
- case STATE_INITIAL:
- sppp_cp_change_state(cp, sp, STATE_STARTING);
- (cp->tls)(sp);
- break;
- case STATE_STARTING:
- break;
- case STATE_CLOSED:
- sp->rst_counter[cp->protoidx] = sp->lcp.max_configure;
- (cp->scr)(sp);
- sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
- break;
- case STATE_STOPPED:
- /*
- * Try escaping stopped state. This seems to bite
- * people occasionally, in particular for IPCP,
- * presumably following previous IPCP negotiation
- * aborts. Somehow, we must have missed a Down event
- * which would have caused a transition into starting
- * state, so as a bandaid we force the Down event now.
- * This effectively implements (something like the)
- * `restart' option mentioned in the state transition
- * table of RFC 1661.
- */
- sppp_cp_change_state(cp, sp, STATE_STARTING);
- (cp->tls)(sp);
- break;
- case STATE_STOPPING:
- case STATE_REQ_SENT:
- case STATE_ACK_RCVD:
- case STATE_ACK_SENT:
- case STATE_OPENED:
- break;
- case STATE_CLOSING:
- sppp_cp_change_state(cp, sp, STATE_STOPPING);
- break;
- }
-}
-
-
-static void
-sppp_close_event(const struct cp *cp, struct sppp *sp)
-{
- STDDCL;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "%s close(%s)\n",
- SPP_ARGS(ifp), cp->name,
- sppp_state_name(sp->state[cp->protoidx]));
-
- switch (sp->state[cp->protoidx]) {
- case STATE_INITIAL:
- case STATE_CLOSED:
- case STATE_CLOSING:
- break;
- case STATE_STARTING:
- sppp_cp_change_state(cp, sp, STATE_INITIAL);
- (cp->tlf)(sp);
- break;
- case STATE_STOPPED:
- sppp_cp_change_state(cp, sp, STATE_CLOSED);
- break;
- case STATE_STOPPING:
- sppp_cp_change_state(cp, sp, STATE_CLOSING);
- break;
- case STATE_OPENED:
- (cp->tld)(sp);
- /* fall through */
- case STATE_REQ_SENT:
- case STATE_ACK_RCVD:
- case STATE_ACK_SENT:
- sp->rst_counter[cp->protoidx] = sp->lcp.max_terminate;
- sppp_cp_send(sp, cp->proto, TERM_REQ, ++sp->pp_seq, 0, 0);
- sppp_cp_change_state(cp, sp, STATE_CLOSING);
- break;
- }
-}
-
-static void
-sppp_to_event(const struct cp *cp, struct sppp *sp)
-{
- STDDCL;
- int s;
-
- s = splimp();
- if (debug)
- log(LOG_DEBUG, SPP_FMT "%s TO(%s) rst_counter = %d\n",
- SPP_ARGS(ifp), cp->name,
- sppp_state_name(sp->state[cp->protoidx]),
- sp->rst_counter[cp->protoidx]);
-
- if (--sp->rst_counter[cp->protoidx] < 0)
- /* TO- event */
- switch (sp->state[cp->protoidx]) {
- case STATE_CLOSING:
- sppp_cp_change_state(cp, sp, STATE_CLOSED);
- (cp->tlf)(sp);
- break;
- case STATE_STOPPING:
- sppp_cp_change_state(cp, sp, STATE_STOPPED);
- (cp->tlf)(sp);
- break;
- case STATE_REQ_SENT:
- case STATE_ACK_RCVD:
- case STATE_ACK_SENT:
- sppp_cp_change_state(cp, sp, STATE_STOPPED);
- (cp->tlf)(sp);
- break;
- }
- else
- /* TO+ event */
- switch (sp->state[cp->protoidx]) {
- case STATE_CLOSING:
- case STATE_STOPPING:
- sppp_cp_send(sp, cp->proto, TERM_REQ, ++sp->pp_seq,
- 0, 0);
- TIMEOUT(cp->TO, (void *)sp, sp->lcp.timeout,
- sp->ch[cp->protoidx]);
- break;
- case STATE_REQ_SENT:
- case STATE_ACK_RCVD:
- (cp->scr)(sp);
- /* sppp_cp_change_state() will restart the timer */
- sppp_cp_change_state(cp, sp, STATE_REQ_SENT);
- break;
- case STATE_ACK_SENT:
- (cp->scr)(sp);
- TIMEOUT(cp->TO, (void *)sp, sp->lcp.timeout,
- sp->ch[cp->protoidx]);
- break;
- }
-
- splx(s);
-}
-
-/*
- * Change the state of a control protocol in the state automaton.
- * Takes care of starting/stopping the restart timer.
- */
-void
-sppp_cp_change_state(const struct cp *cp, struct sppp *sp, int newstate)
-{
- sp->state[cp->protoidx] = newstate;
- UNTIMEOUT(cp->TO, (void *)sp, sp->ch[cp->protoidx]);
-
- switch (newstate) {
- case STATE_INITIAL:
- case STATE_STARTING:
- case STATE_CLOSED:
- case STATE_STOPPED:
- case STATE_OPENED:
- break;
- case STATE_CLOSING:
- case STATE_STOPPING:
- case STATE_REQ_SENT:
- case STATE_ACK_RCVD:
- case STATE_ACK_SENT:
- TIMEOUT(cp->TO, (void *)sp, sp->lcp.timeout,
- sp->ch[cp->protoidx]);
- break;
- }
-}
- /*
- *--------------------------------------------------------------------------*
- * *
- * The LCP implementation. *
- * *
- *--------------------------------------------------------------------------*
- */
-static void
-sppp_lcp_init(struct sppp *sp)
-{
- sp->lcp.opts = (1 << LCP_OPT_MAGIC);
- sp->lcp.magic = 0;
- sp->state[IDX_LCP] = STATE_INITIAL;
- sp->fail_counter[IDX_LCP] = 0;
- sp->lcp.protos = 0;
- sp->lcp.mru = sp->lcp.their_mru = PP_MTU;
-
- /* Note that these values are relevant for all control protocols */
- sp->lcp.timeout = 3 * hz;
-
- sp->lcp.max_terminate = 2;
- sp->lcp.max_configure = 10;
- sp->lcp.max_failure = 10;
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- callout_handle_init(&sp->ch[IDX_LCP]);
-#endif
-}
-
-static void
-sppp_lcp_up(struct sppp *sp)
-{
- STDDCL;
-
- /*
- * If this interface is passive or dial-on-demand, and we are
- * still in Initial state, it means we've got an incoming
- * call. Activate the interface.
- */
- if ((ifp->if_flags & (IFF_AUTO | IFF_PASSIVE)) != 0) {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "Up event", SPP_ARGS(ifp));
- ifp->if_flags |= IFF_RUNNING;
- if (sp->state[IDX_LCP] == STATE_INITIAL) {
- if (debug)
- log(-1, "(incoming call)\n");
- sp->pp_flags |= PP_CALLIN;
- lcp.Open(sp);
- } else if (debug)
- log(-1, "\n");
- }
-
- sppp_up_event(&lcp, sp);
-}
-
-static void
-sppp_lcp_down(struct sppp *sp)
-{
- STDDCL;
-
- sppp_down_event(&lcp, sp);
-
- /*
- * If this is neither a dial-on-demand nor a passive
- * interface, simulate an ``ifconfig down'' action, so the
- * administrator can force a redial by another ``ifconfig
- * up''. XXX For leased line operation, should we immediately
- * try to reopen the connection here?
- */
- if ((ifp->if_flags & (IFF_AUTO | IFF_PASSIVE)) == 0) {
- log(LOG_INFO,
- SPP_FMT "Down event, taking interface down.\n",
- SPP_ARGS(ifp));
- if_down(ifp);
- } else {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "Down event (carrier loss)\n",
- SPP_ARGS(ifp));
- }
- sp->pp_flags &= ~PP_CALLIN;
- if (sp->state[IDX_LCP] != STATE_INITIAL)
- lcp.Close(sp);
- ifp->if_flags &= ~IFF_RUNNING;
-}
-
-static void
-sppp_lcp_open(struct sppp *sp)
-{
- /*
- * If we are authenticator, negotiate LCP_AUTH
- */
- if (sp->hisauth.proto != 0)
- sp->lcp.opts |= (1 << LCP_OPT_AUTH_PROTO);
- else
- sp->lcp.opts &= ~(1 << LCP_OPT_AUTH_PROTO);
- sp->pp_flags &= ~PP_NEEDAUTH;
- sppp_open_event(&lcp, sp);
-}
-
-static void
-sppp_lcp_close(struct sppp *sp)
-{
- sppp_close_event(&lcp, sp);
-}
-
-static void
-sppp_lcp_TO(void *cookie)
-{
- sppp_to_event(&lcp, (struct sppp *)cookie);
-}
-
-/*
- * Analyze a configure request. Return true if it was agreeable, and
- * caused action sca, false if it has been rejected or nak'ed, and
- * caused action scn. (The return value is used to make the state
- * transition decision in the state automaton.)
- */
-static int
-sppp_lcp_RCR(struct sppp *sp, struct lcp_header *h, int len)
-{
- STDDCL;
- u_char *buf, *r, *p;
- int origlen, rlen;
- u_long nmagic;
- u_short authproto;
-
- len -= 4;
- origlen = len;
- buf = r = malloc (len, M_TEMP, M_NOWAIT);
- if (! buf)
- return (0);
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "lcp parse opts: ",
- SPP_ARGS(ifp));
-
- /* pass 1: check for things that need to be rejected */
- p = (void*) (h+1);
- for (rlen=0; len>1 && p[1]; len-=p[1], p+=p[1]) {
- if (debug)
- log(-1, " %s ", sppp_lcp_opt_name(*p));
- switch (*p) {
- case LCP_OPT_MAGIC:
- /* Magic number. */
- /* fall through, both are same length */
- case LCP_OPT_ASYNC_MAP:
- /* Async control character map. */
- if (len >= 6 || p[1] == 6)
- continue;
- if (debug)
- log(-1, "[invalid] ");
- break;
- case LCP_OPT_MRU:
- /* Maximum receive unit. */
- if (len >= 4 && p[1] == 4)
- continue;
- if (debug)
- log(-1, "[invalid] ");
- break;
- case LCP_OPT_AUTH_PROTO:
- if (len < 4) {
- if (debug)
- log(-1, "[invalid] ");
- break;
- }
- authproto = (p[2] << 8) + p[3];
- if (authproto == PPP_CHAP && p[1] != 5) {
- if (debug)
- log(-1, "[invalid chap len] ");
- break;
- }
- if (sp->myauth.proto == 0) {
- /* we are not configured to do auth */
- if (debug)
- log(-1, "[not configured] ");
- break;
- }
- /*
- * Remote want us to authenticate, remember this,
- * so we stay in PHASE_AUTHENTICATE after LCP got
- * up.
- */
- sp->pp_flags |= PP_NEEDAUTH;
- continue;
- default:
- /* Others not supported. */
- if (debug)
- log(-1, "[rej] ");
- break;
- }
- /* Add the option to rejected list. */
- bcopy (p, r, p[1]);
- r += p[1];
- rlen += p[1];
- }
- if (rlen) {
- if (debug)
- log(-1, " send conf-rej\n");
- sppp_cp_send (sp, PPP_LCP, CONF_REJ, h->ident, rlen, buf);
- return 0;
- } else if (debug)
- log(-1, "\n");
-
- /*
- * pass 2: check for option values that are unacceptable and
- * thus require to be nak'ed.
- */
- if (debug)
- log(LOG_DEBUG, SPP_FMT "lcp parse opt values: ",
- SPP_ARGS(ifp));
-
- p = (void*) (h+1);
- len = origlen;
- for (rlen=0; len>1 && p[1]; len-=p[1], p+=p[1]) {
- if (debug)
- log(-1, " %s ", sppp_lcp_opt_name(*p));
- switch (*p) {
- case LCP_OPT_MAGIC:
- /* Magic number -- extract. */
- nmagic = (u_long)p[2] << 24 |
- (u_long)p[3] << 16 | p[4] << 8 | p[5];
- if (nmagic != sp->lcp.magic) {
- if (debug)
- log(-1, "0x%lx ", nmagic);
- continue;
- }
- /*
- * Local and remote magics equal -- loopback?
- */
- if (sp->pp_loopcnt >= MAXALIVECNT*5) {
- printf (SPP_FMT "loopback\n",
- SPP_ARGS(ifp));
- sp->pp_loopcnt = 0;
- if (ifp->if_flags & IFF_UP) {
- if_down(ifp);
- sppp_qflush(&sp->pp_cpq);
- /* XXX ? */
- lcp.Down(sp);
- lcp.Up(sp);
- }
- } else if (debug)
- log(-1, "[glitch] ");
- ++sp->pp_loopcnt;
- /*
- * We negate our magic here, and NAK it. If
- * we see it later in an NAK packet, we
- * suggest a new one.
- */
- nmagic = ~sp->lcp.magic;
- /* Gonna NAK it. */
- p[2] = nmagic >> 24;
- p[3] = nmagic >> 16;
- p[4] = nmagic >> 8;
- p[5] = nmagic;
- break;
-
- case LCP_OPT_ASYNC_MAP:
-#ifdef NOTDEF
- /* Async control character map -- check to be zero. */
- if (! p[2] && ! p[3] && ! p[4] && ! p[5]) {
- if (debug)
- log(-1, "[empty] ");
- continue;
- }
- if (debug)
- log(-1, "[non-empty] ");
- from Armin Gruner:
-
- Anyway, if I remove the "p[2] = p[3] = p[4] = p[5] = 0;",
- the driver sends back the original async map request with a
- NAK, and the errors in the Win95 ppp log go away.
-
- /* suggest a zero one */
- p[2] = p[3] = p[4] = p[5] = 0;
- break;
-#endif
- continue; /* Stefan Bethke :-) told me */
- /* to continue .... */
-
- case LCP_OPT_MRU:
- /*
- * Maximum receive unit. Always agreeable,
- * but ignored by now.
- */
- sp->lcp.their_mru = p[2] * 256 + p[3];
- if (debug)
- log(-1, "%lu ", sp->lcp.their_mru);
- continue;
-
- case LCP_OPT_AUTH_PROTO:
- authproto = (p[2] << 8) + p[3];
- if (sp->myauth.proto != authproto) {
- /* not agreed, nak */
- if (debug)
- log(-1, "[mine %s != his %s] ",
- sppp_proto_name(sp->hisauth.proto),
- sppp_proto_name(authproto));
- p[2] = sp->myauth.proto >> 8;
- p[3] = sp->myauth.proto;
- break;
- }
- if (authproto == PPP_CHAP && p[4] != CHAP_MD5) {
- if (debug)
- log(-1, "[chap not MD5] ");
- p[4] = CHAP_MD5;
- break;
- }
- continue;
- }
- /* Add the option to nak'ed list. */
- bcopy (p, r, p[1]);
- r += p[1];
- rlen += p[1];
- }
- if (rlen) {
- if (++sp->fail_counter[IDX_LCP] >= sp->lcp.max_failure) {
- if (debug)
- log(-1, " max_failure (%d) exceeded, "
- "send conf-rej\n",
- sp->lcp.max_failure);
- sppp_cp_send(sp, PPP_LCP, CONF_REJ, h->ident, rlen, buf);
- } else {
- if (debug)
- log(-1, " send conf-nak\n");
- sppp_cp_send (sp, PPP_LCP, CONF_NAK, h->ident, rlen, buf);
- }
- return 0;
- } else {
- if (debug)
- log(-1, " send conf-ack\n");
- sp->fail_counter[IDX_LCP] = 0;
- sp->pp_loopcnt = 0;
- sppp_cp_send (sp, PPP_LCP, CONF_ACK,
- h->ident, origlen, h+1);
- }
-
- free (buf, M_TEMP);
- return (rlen == 0);
-}
-
-/*
- * Analyze the LCP Configure-Reject option list, and adjust our
- * negotiation.
- */
-static void
-sppp_lcp_RCN_rej(struct sppp *sp, struct lcp_header *h, int len)
-{
- STDDCL;
- u_char *buf, *p;
-
- len -= 4;
- buf = malloc (len, M_TEMP, M_NOWAIT);
- if (!buf)
- return;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "lcp rej opts: ",
- SPP_ARGS(ifp));
-
- p = (void*) (h+1);
- for (; len > 1 && p[1]; len -= p[1], p += p[1]) {
- if (debug)
- log(-1, " %s ", sppp_lcp_opt_name(*p));
- switch (*p) {
- case LCP_OPT_MAGIC:
- /* Magic number -- can't use it, use 0 */
- sp->lcp.opts &= ~(1 << LCP_OPT_MAGIC);
- sp->lcp.magic = 0;
- break;
- case LCP_OPT_MRU:
- /*
- * Should not be rejected anyway, since we only
- * negotiate a MRU if explicitly requested by
- * peer.
- */
- sp->lcp.opts &= ~(1 << LCP_OPT_MRU);
- break;
- case LCP_OPT_AUTH_PROTO:
- /*
- * Peer doesn't want to authenticate himself,
- * deny unless this is a dialout call, and
- * AUTHFLAG_NOCALLOUT is set.
- */
- if ((sp->pp_flags & PP_CALLIN) == 0 &&
- (sp->hisauth.flags & AUTHFLAG_NOCALLOUT) != 0) {
- if (debug)
- log(-1, "[don't insist on auth "
- "for callout]");
- sp->lcp.opts &= ~(1 << LCP_OPT_AUTH_PROTO);
- break;
- }
- if (debug)
- log(-1, "[access denied]\n");
- lcp.Close(sp);
- break;
- }
- }
- if (debug)
- log(-1, "\n");
- free (buf, M_TEMP);
- return;
-}
-
-/*
- * Analyze the LCP Configure-NAK option list, and adjust our
- * negotiation.
- */
-static void
-sppp_lcp_RCN_nak(struct sppp *sp, struct lcp_header *h, int len)
-{
- STDDCL;
- u_char *buf, *p;
- u_long magic;
-
- len -= 4;
- buf = malloc (len, M_TEMP, M_NOWAIT);
- if (!buf)
- return;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "lcp nak opts: ",
- SPP_ARGS(ifp));
-
- p = (void*) (h+1);
- for (; len > 1 && p[1]; len -= p[1], p += p[1]) {
- if (debug)
- log(-1, " %s ", sppp_lcp_opt_name(*p));
- switch (*p) {
- case LCP_OPT_MAGIC:
- /* Magic number -- renegotiate */
- if ((sp->lcp.opts & (1 << LCP_OPT_MAGIC)) &&
- len >= 6 && p[1] == 6) {
- magic = (u_long)p[2] << 24 |
- (u_long)p[3] << 16 | p[4] << 8 | p[5];
- /*
- * If the remote magic is our negated one,
- * this looks like a loopback problem.
- * Suggest a new magic to make sure.
- */
- if (magic == ~sp->lcp.magic) {
- if (debug)
- log(-1, "magic glitch ");
-#if defined(__NetBSD__) || (defined(__FreeBSD__) && __FreeBSD__ >= 3)
- sp->lcp.magic = random();
-#else
- sp->lcp.magic = time.tv_sec + time.tv_usec;
-#endif
- } else {
- sp->lcp.magic = magic;
- if (debug)
- log(-1, "%lu ", magic);
- }
- }
- break;
- case LCP_OPT_MRU:
- /*
- * Peer wants to advise us to negotiate an MRU.
- * Agree on it if it's reasonable, or use
- * default otherwise.
- */
- if (len >= 4 && p[1] == 4) {
- u_int mru = p[2] * 256 + p[3];
- if (debug)
- log(-1, "%d ", mru);
- if (mru < PP_MTU || mru > PP_MAX_MRU)
- mru = PP_MTU;
- sp->lcp.mru = mru;
- sp->lcp.opts |= (1 << LCP_OPT_MRU);
- }
- break;
- case LCP_OPT_AUTH_PROTO:
- /*
- * Peer doesn't like our authentication method,
- * deny.
- */
- if (debug)
- log(-1, "[access denied]\n");
- lcp.Close(sp);
- break;
- }
- }
- if (debug)
- log(-1, "\n");
- free (buf, M_TEMP);
- return;
-}
-
-static void
-sppp_lcp_tlu(struct sppp *sp)
-{
- STDDCL;
- int i;
- u_long mask;
-
- /* XXX ? */
- if (! (ifp->if_flags & IFF_UP) &&
- (ifp->if_flags & IFF_RUNNING)) {
- /* Coming out of loopback mode. */
- if_up(ifp);
- printf (SPP_FMT "up\n", SPP_ARGS(ifp));
- }
-
- for (i = 0; i < IDX_COUNT; i++)
- if ((cps[i])->flags & CP_QUAL)
- (cps[i])->Open(sp);
-
- if ((sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO)) != 0 ||
- (sp->pp_flags & PP_NEEDAUTH) != 0)
- sp->pp_phase = PHASE_AUTHENTICATE;
- else
- sp->pp_phase = PHASE_NETWORK;
-
- if(debug)
- log(LOG_DEBUG, SPP_FMT "phase %s\n", SPP_ARGS(ifp),
- sppp_phase_name(sp->pp_phase));
-
- /*
- * Open all authentication protocols. This is even required
- * if we already proceeded to network phase, since it might be
- * that remote wants us to authenticate, so we might have to
- * send a PAP request. Undesired authentication protocols
- * don't do anything when they get an Open event.
- */
- for (i = 0; i < IDX_COUNT; i++)
- if ((cps[i])->flags & CP_AUTH)
- (cps[i])->Open(sp);
-
- if (sp->pp_phase == PHASE_NETWORK) {
- /* Notify all NCPs. */
- for (i = 0; i < IDX_COUNT; i++)
- if ((cps[i])->flags & CP_NCP)
- (cps[i])->Open(sp);
- }
-
- /* Send Up events to all started protos. */
- for (i = 0, mask = 1; i < IDX_COUNT; i++, mask <<= 1)
- if (sp->lcp.protos & mask && ((cps[i])->flags & CP_LCP) == 0)
- (cps[i])->Up(sp);
-
- /* notify low-level driver of state change */
- if (sp->pp_chg)
- sp->pp_chg(sp, (int)sp->pp_phase);
-
- if (sp->pp_phase == PHASE_NETWORK)
- /* if no NCP is starting, close down */
- sppp_lcp_check_and_close(sp);
-}
-
-static void
-sppp_lcp_tld(struct sppp *sp)
-{
- STDDCL;
- int i;
- u_long mask;
-
- sp->pp_phase = PHASE_TERMINATE;
-
- if(debug)
- log(LOG_DEBUG, SPP_FMT "phase %s\n", SPP_ARGS(ifp),
- sppp_phase_name(sp->pp_phase));
-
- /*
- * Take upper layers down. We send the Down event first and
- * the Close second to prevent the upper layers from sending
- * ``a flurry of terminate-request packets'', as the RFC
- * describes it.
- */
- for (i = 0, mask = 1; i < IDX_COUNT; i++, mask <<= 1)
- if (sp->lcp.protos & mask && ((cps[i])->flags & CP_LCP) == 0) {
- (cps[i])->Down(sp);
- (cps[i])->Close(sp);
- }
-}
-
-static void
-sppp_lcp_tls(struct sppp *sp)
-{
- STDDCL;
-
- sp->pp_phase = PHASE_ESTABLISH;
-
- if(debug)
- log(LOG_DEBUG, SPP_FMT "phase %s\n", SPP_ARGS(ifp),
- sppp_phase_name(sp->pp_phase));
-
- /* Notify lower layer if desired. */
- if (sp->pp_tls)
- (sp->pp_tls)(sp);
- else
- (sp->pp_up)(sp);
-}
-
-static void
-sppp_lcp_tlf(struct sppp *sp)
-{
- STDDCL;
-
- sp->pp_phase = PHASE_DEAD;
-
- if(debug)
- log(LOG_DEBUG, SPP_FMT "phase %s\n", SPP_ARGS(ifp),
- sppp_phase_name(sp->pp_phase));
-
- /* Notify lower layer if desired. */
- if (sp->pp_tlf)
- (sp->pp_tlf)(sp);
- else
- (sp->pp_down)(sp);
-}
-
-static void
-sppp_lcp_scr(struct sppp *sp)
-{
- char opt[6 /* magicnum */ + 4 /* mru */ + 5 /* chap */];
- int i = 0;
- u_short authproto;
-
- if (sp->lcp.opts & (1 << LCP_OPT_MAGIC)) {
- if (! sp->lcp.magic)
-#if defined(__NetBSD__) || (defined(__FreeBSD__) && __FreeBSD__ >= 3)
- sp->lcp.magic = random();
-#else
- sp->lcp.magic = time.tv_sec + time.tv_usec;
-#endif
- opt[i++] = LCP_OPT_MAGIC;
- opt[i++] = 6;
- opt[i++] = sp->lcp.magic >> 24;
- opt[i++] = sp->lcp.magic >> 16;
- opt[i++] = sp->lcp.magic >> 8;
- opt[i++] = sp->lcp.magic;
- }
-
- if (sp->lcp.opts & (1 << LCP_OPT_MRU)) {
- opt[i++] = LCP_OPT_MRU;
- opt[i++] = 4;
- opt[i++] = sp->lcp.mru >> 8;
- opt[i++] = sp->lcp.mru;
- }
-
- if (sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO)) {
- authproto = sp->hisauth.proto;
- opt[i++] = LCP_OPT_AUTH_PROTO;
- opt[i++] = authproto == PPP_CHAP? 5: 4;
- opt[i++] = authproto >> 8;
- opt[i++] = authproto;
- if (authproto == PPP_CHAP)
- opt[i++] = CHAP_MD5;
- }
-
- sp->confid[IDX_LCP] = ++sp->pp_seq;
- sppp_cp_send (sp, PPP_LCP, CONF_REQ, sp->confid[IDX_LCP], i, &opt);
-}
-
-/*
- * Check the open NCPs, return true if at least one NCP is open.
- */
-static int
-sppp_ncp_check(struct sppp *sp)
-{
- int i, mask;
-
- for (i = 0, mask = 1; i < IDX_COUNT; i++, mask <<= 1)
- if (sp->lcp.protos & mask && (cps[i])->flags & CP_NCP)
- return 1;
- return 0;
-}
-
-/*
- * Re-check the open NCPs and see if we should terminate the link.
- * Called by the NCPs during their tlf action handling.
- */
-static void
-sppp_lcp_check_and_close(struct sppp *sp)
-{
-
- if (sp->pp_phase < PHASE_NETWORK)
- /* don't bother, we are already going down */
- return;
-
- if (sppp_ncp_check(sp))
- return;
-
- lcp.Close(sp);
-}
- /*
- *--------------------------------------------------------------------------*
- * *
- * The IPCP implementation. *
- * *
- *--------------------------------------------------------------------------*
- */
-
-static void
-sppp_ipcp_init(struct sppp *sp)
-{
- sp->ipcp.opts = 0;
- sp->ipcp.flags = 0;
- sp->state[IDX_IPCP] = STATE_INITIAL;
- sp->fail_counter[IDX_IPCP] = 0;
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- callout_handle_init(&sp->ch[IDX_IPCP]);
-#endif
-}
-
-static void
-sppp_ipcp_up(struct sppp *sp)
-{
- sppp_up_event(&ipcp, sp);
-}
-
-static void
-sppp_ipcp_down(struct sppp *sp)
-{
- sppp_down_event(&ipcp, sp);
-}
-
-static void
-sppp_ipcp_open(struct sppp *sp)
-{
- STDDCL;
- u_long myaddr, hisaddr;
-
-#ifdef SPPP_VJ
- if(sp->enable_vj)
- {
- sp->ipcp.flags &= ~(IPCP_HISADDR_SEEN | IPCP_MYADDR_SEEN |
- IPCP_MYADDR_DYN | IPCP_VJ);
- }
- else
- {
- sp->ipcp.flags &= ~(IPCP_HISADDR_SEEN | IPCP_MYADDR_SEEN |
- IPCP_MYADDR_DYN);
- }
-#else
- sp->ipcp.flags &= ~(IPCP_HISADDR_SEEN|IPCP_MYADDR_SEEN|IPCP_MYADDR_DYN);
-#endif
-
- sppp_get_ip_addrs(sp, &myaddr, &hisaddr, 0);
- /*
- * If we don't have his address, this probably means our
- * interface doesn't want to talk IP at all. (This could
- * be the case if somebody wants to speak only IPX, for
- * example.) Don't open IPCP in this case.
- */
- if (hisaddr == 0L) {
- /* XXX this message should go away */
- if (debug)
- log(LOG_DEBUG, SPP_FMT "ipcp_open(): no IP interface\n",
- SPP_ARGS(ifp));
- return;
- }
-
-#ifdef SPPP_VJ
- if(sp->enable_vj)
- sp->ipcp.opts |= (1 << IPCP_OPT_COMPRESSION);
-
- sp->ipcp.max_state = MAX_STATES - 1;
- sp->ipcp.compress_cid = 1;
-#endif
-
- if (myaddr == 0L) {
- /*
- * I don't have an assigned address, so i need to
- * negotiate my address.
- */
- sp->ipcp.flags |= IPCP_MYADDR_DYN;
- sp->ipcp.opts |= (1 << IPCP_OPT_ADDRESS);
- } else
- sp->ipcp.flags |= IPCP_MYADDR_SEEN;
- sppp_open_event(&ipcp, sp);
-}
-
-static void
-sppp_ipcp_close(struct sppp *sp)
-{
- sppp_close_event(&ipcp, sp);
- if (sp->ipcp.flags & IPCP_MYADDR_DYN)
- /*
- * My address was dynamic, clear it again.
- */
- sppp_set_ip_addr(sp, 0L);
-}
-
-static void
-sppp_ipcp_TO(void *cookie)
-{
- sppp_to_event(&ipcp, (struct sppp *)cookie);
-}
-
-/*
- * Analyze a configure request. Return true if it was agreeable, and
- * caused action sca, false if it has been rejected or nak'ed, and
- * caused action scn. (The return value is used to make the state
- * transition decision in the state automaton.)
- */
-static int
-sppp_ipcp_RCR(struct sppp *sp, struct lcp_header *h, int len)
-{
- u_char *buf, *r, *p;
- struct ifnet *ifp = &sp->pp_if;
- int rlen, origlen, debug = ifp->if_flags & IFF_DEBUG;
- u_long hisaddr, desiredaddr;
- int gotmyaddr = 0;
-#ifdef SPPP_VJ
- int desiredcomp;
-#endif
-
- len -= 4;
- origlen = len;
- /*
- * Make sure to allocate a buf that can at least hold a
- * conf-nak with an `address' option. We might need it below.
- */
- buf = r = malloc ((len < 6? 6: len), M_TEMP, M_NOWAIT);
- if (! buf)
- return (0);
-
- /* pass 1: see if we can recognize them */
- if (debug)
- log(LOG_DEBUG, SPP_FMT "ipcp parse opts: ",
- SPP_ARGS(ifp));
- p = (void*) (h+1);
- for (rlen=0; len>1 && p[1]; len-=p[1], p+=p[1]) {
- if (debug)
- log(-1, " %s ", sppp_ipcp_opt_name(*p));
- switch (*p) {
-
-#ifdef SPPP_VJ
- case IPCP_OPT_COMPRESSION:
- if(sp->enable_vj)
- {
- if (len >= 6 && p[1] == 6) {
- /* correctly formed compress option */
- continue;
- }
- if (debug)
- log(-1, "[invalid] ");
- }
- break;
-#endif
-
- case IPCP_OPT_ADDRESS:
- if (len >= 6 && p[1] == 6) {
- /* correctly formed address option */
- continue;
- }
- if (debug)
- log(-1, "[invalid] ");
- break;
- default:
- /* Others not supported. */
- if (debug)
- log(-1, "[rej] ");
- break;
- }
- /* Add the option to rejected list. */
- bcopy (p, r, p[1]);
- r += p[1];
- rlen += p[1];
- }
- if (rlen) {
- if (debug)
- log(-1, " send conf-rej\n");
- sppp_cp_send (sp, PPP_IPCP, CONF_REJ, h->ident, rlen, buf);
- return 0;
- } else if (debug)
- log(-1, "\n");
-
- /* pass 2: parse option values */
- sppp_get_ip_addrs(sp, 0, &hisaddr, 0);
- if (debug)
- log(LOG_DEBUG, SPP_FMT "ipcp parse opt values: ",
- SPP_ARGS(ifp));
- p = (void*) (h+1);
- len = origlen;
- for (rlen=0; len>1 && p[1]; len-=p[1], p+=p[1]) {
- if (debug)
- log(-1, " %s ", sppp_ipcp_opt_name(*p));
- switch (*p) {
-
-#ifdef SPPP_VJ
- case IPCP_OPT_COMPRESSION:
- desiredcomp = p[2] << 8 | p[3];
-
- /* We only support VJ */
- if (desiredcomp == IPCP_COMP_VJ)
- {
- if(sp->enable_vj)
- {
- if (debug)
- log(-1, "VJ [ack] ");
- sp->ipcp.flags |= IPCP_VJ;
-#ifdef __FreeBSD__
- sl_compress_init(&sp->pp_comp, p[4]);
-#else
- sl_compress_setup(&sp->pp_comp, p[4]);
-#endif
- sp->ipcp.max_state = p[4];
- sp->ipcp.compress_cid = p[5];
- continue;
- }
- else
- {
- if (debug)
- log(-1, "%#04x [VJ disabled] ", desiredcomp);
- p[2] = IPCP_COMP_VJ >> 8;
- p[3] = IPCP_COMP_VJ;
- break;
- }
- }
- if (debug)
- log(-1, "%#04x [not supported] ", desiredcomp);
- p[2] = IPCP_COMP_VJ >> 8;
- p[3] = IPCP_COMP_VJ;
- break;
-#endif
-
- case IPCP_OPT_ADDRESS:
- /* This is the address he wants in his end */
- desiredaddr = p[2] << 24 | p[3] << 16 |
- p[4] << 8 | p[5];
-
- if (desiredaddr == hisaddr ||
- (hisaddr == 1 && desiredaddr != 0)) {
- /*
- * Peer's address is same as our value,
- * or we have set it to 0.0.0.1 to
- * indicate that we do not really care,
- * this is agreeable. Gonna conf-ack
- * it.
- */
- if (debug)
- log(-1, "%s [ack] ",
- sppp_dotted_quad(hisaddr));
- /* record that we've seen it already */
- sp->ipcp.flags |= IPCP_HISADDR_SEEN;
- continue;
- }
- /*
- * The address wasn't agreeable. This is either
- * he sent us 0.0.0.0, asking to assign him an
- * address, or he send us another address not
- * matching our value. Either case, we gonna
- * conf-nak it with our value.
- * XXX: we should "rej" if hisaddr == 0
- */
- if (debug) {
- if (desiredaddr == 0)
- log(-1, "[addr requested] ");
- else
- log(-1, "%s [not agreed] ",
- sppp_dotted_quad(desiredaddr));
- }
- p[2] = hisaddr >> 24;
- p[3] = hisaddr >> 16;
- p[4] = hisaddr >> 8;
- p[5] = hisaddr;
- break;
- }
-
- /* Add the option to nak'ed list. */
- bcopy (p, r, p[1]);
- r += p[1];
- rlen += p[1];
- }
-
- /*
- * If we are about to conf-ack the request, but haven't seen
- * his address so far, gonna conf-nak it instead, with the
- * `address' option present and our idea of his address being
- * filled in there, to request negotiation of both addresses.
- *
- * XXX This can result in an endless req - nak loop if peer
- * doesn't want to send us his address. Q: What should we do
- * about it? XXX A: implement the max-failure counter.
- */
- if (rlen == 0 && !(sp->ipcp.flags & IPCP_HISADDR_SEEN) && !gotmyaddr) {
- buf[0] = IPCP_OPT_ADDRESS;
- buf[1] = 6;
- buf[2] = hisaddr >> 24;
- buf[3] = hisaddr >> 16;
- buf[4] = hisaddr >> 8;
- buf[5] = hisaddr;
- rlen = 6;
- if (debug)
- log(-1, "still need hisaddr ");
- }
-
- if (rlen) {
- if (debug)
- log(-1, " send conf-nak\n");
- sppp_cp_send (sp, PPP_IPCP, CONF_NAK, h->ident, rlen, buf);
- } else {
- if (debug)
- log(-1, " send conf-ack\n");
- sppp_cp_send (sp, PPP_IPCP, CONF_ACK,
- h->ident, origlen, h+1);
- }
-
- free (buf, M_TEMP);
- return (rlen == 0);
-}
-
-/*
- * Analyze the IPCP Configure-Reject option list, and adjust our
- * negotiation.
- */
-static void
-sppp_ipcp_RCN_rej(struct sppp *sp, struct lcp_header *h, int len)
-{
- u_char *buf, *p;
- struct ifnet *ifp = &sp->pp_if;
- int debug = ifp->if_flags & IFF_DEBUG;
-
- len -= 4;
- buf = malloc (len, M_TEMP, M_NOWAIT);
- if (!buf)
- return;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "ipcp rej opts: ",
- SPP_ARGS(ifp));
-
- p = (void*) (h+1);
- for (; len > 1 && p[1]; len -= p[1], p += p[1]) {
- if (debug)
- log(-1, " %s ", sppp_ipcp_opt_name(*p));
- switch (*p) {
-#ifdef SPPP_VJ
- case IPCP_OPT_COMPRESSION:
- sp->ipcp.opts &= ~(1 << IPCP_OPT_COMPRESSION);
- break;
-#endif
- case IPCP_OPT_ADDRESS:
- /*
- * Peer doesn't grok address option. This is
- * bad. XXX Should we better give up here?
- * XXX We could try old "addresses" option...
- */
- sp->ipcp.opts &= ~(1 << IPCP_OPT_ADDRESS);
- break;
-
-#ifdef NOTYET
- case IPCP_OPT_COMPRESS:
- sp->ipcp.opts &= ~(1 << IPCP_OPT_COMPRESS);
- break;
-#endif
- }
- }
- if (debug)
- log(-1, "\n");
- free (buf, M_TEMP);
- return;
-}
-
-/*
- * Analyze the IPCP Configure-NAK option list, and adjust our
- * negotiation.
- */
-static void
-sppp_ipcp_RCN_nak(struct sppp *sp, struct lcp_header *h, int len)
-{
- u_char *buf, *p;
- struct ifnet *ifp = &sp->pp_if;
- int debug = ifp->if_flags & IFF_DEBUG;
- u_long wantaddr;
-#ifdef SPPP_VJ
- int desiredcomp;
-#endif
-
- len -= 4;
- buf = malloc (len, M_TEMP, M_NOWAIT);
- if (!buf)
- return;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "ipcp nak opts: ",
- SPP_ARGS(ifp));
-
- p = (void*) (h+1);
- for (; len > 1 && p[1]; len -= p[1], p += p[1]) {
- if (debug)
- log(-1, " %s ", sppp_ipcp_opt_name(*p));
- switch (*p) {
-#ifdef SPPP_VJ
- case IPCP_OPT_COMPRESSION:
- if (len >= 6 && p[1] == 6) {
- desiredcomp = p[2] << 8 | p[3];
- if (debug)
- log(-1, "[wantcomp %#04x] ",
- desiredcomp);
- if (desiredcomp == IPCP_COMP_VJ && sp->enable_vj) {
-#ifdef __FreeBSD__
- sl_compress_init(&sp->pp_comp, p[4]);
-#else
- sl_compress_setup(&sp->pp_comp, p[4]);
-#endif
- sp->ipcp.max_state = p[4];
- sp->ipcp.compress_cid = p[5];
- log(-1, "[agree] ");
- } else
- sp->ipcp.opts &=
- ~(1 << IPCP_OPT_COMPRESSION);
- }
- break;
-#endif
- case IPCP_OPT_ADDRESS:
- /*
- * Peer doesn't like our local IP address. See
- * if we can do something for him. We'll drop
- * him our address then.
- */
- if (len >= 6 && p[1] == 6) {
- wantaddr = p[2] << 24 | p[3] << 16 |
- p[4] << 8 | p[5];
- sp->ipcp.opts |= (1 << IPCP_OPT_ADDRESS);
- if (debug)
- log(-1, "[wantaddr %s] ",
- sppp_dotted_quad(wantaddr));
- /*
- * When doing dynamic address assignment,
- * we accept his offer. Otherwise, we
- * ignore it and thus continue to negotiate
- * our already existing value.
- * XXX: Bogus, if he said no once, he'll
- * just say no again, might as well die.
- */
- if (sp->ipcp.flags & IPCP_MYADDR_DYN) {
- sppp_set_ip_addr(sp, wantaddr);
- if (debug)
- log(-1, "[agree] ");
- sp->ipcp.flags |= IPCP_MYADDR_SEEN;
- }
- }
- break;
-#ifdef NOTYET
- case IPCP_OPT_COMPRESS:
- /*
- * Peer wants different compression parameters.
- */
- break;
-#endif
- }
- }
- if (debug)
- log(-1, "\n");
- free (buf, M_TEMP);
- return;
-}
-
-static void
-sppp_ipcp_tlu(struct sppp *sp)
-{
- /* we are up - notify isdn daemon */
- if (sp->pp_con)
- sp->pp_con(sp);
-}
-
-static void
-sppp_ipcp_tld(struct sppp *sp)
-{
-}
-
-static void
-sppp_ipcp_tls(struct sppp *sp)
-{
- /* indicate to LCP that it must stay alive */
- sp->lcp.protos |= (1 << IDX_IPCP);
-}
-
-static void
-sppp_ipcp_tlf(struct sppp *sp)
-{
- /* we no longer need LCP */
- sp->lcp.protos &= ~(1 << IDX_IPCP);
- sppp_lcp_check_and_close(sp);
-}
-
-static void
-sppp_ipcp_scr(struct sppp *sp)
-{
- char opt[6 /* compression */ + 6 /* address */];
- u_long ouraddr;
- int i = 0;
-
-#ifdef SPPP_VJ
- if (sp->ipcp.opts & (1 << IPCP_OPT_COMPRESSION)) {
- opt[i++] = IPCP_OPT_COMPRESSION;
- opt[i++] = 6;
- opt[i++] = IPCP_COMP_VJ >> 8;
- opt[i++] = IPCP_COMP_VJ;
- opt[i++] = sp->ipcp.max_state;
- opt[i++] = sp->ipcp.compress_cid;
- }
-#endif
-
- if (sp->ipcp.opts & (1 << IPCP_OPT_ADDRESS)) {
- sppp_get_ip_addrs(sp, &ouraddr, 0, 0);
- opt[i++] = IPCP_OPT_ADDRESS;
- opt[i++] = 6;
- opt[i++] = ouraddr >> 24;
- opt[i++] = ouraddr >> 16;
- opt[i++] = ouraddr >> 8;
- opt[i++] = ouraddr;
- }
-
- sp->confid[IDX_IPCP] = ++sp->pp_seq;
- sppp_cp_send(sp, PPP_IPCP, CONF_REQ, sp->confid[IDX_IPCP], i, &opt);
-}
-
-
- /*
- *--------------------------------------------------------------------------*
- * *
- * The CHAP implementation. *
- * *
- *--------------------------------------------------------------------------*
- */
-
-/*
- * The authentication protocols don't employ a full-fledged state machine as
- * the control protocols do, since they do have Open and Close events, but
- * not Up and Down, nor are they explicitly terminated. Also, use of the
- * authentication protocols may be different in both directions (this makes
- * sense, think of a machine that never accepts incoming calls but only
- * calls out, it doesn't require the called party to authenticate itself).
- *
- * Our state machine for the local authentication protocol (we are requesting
- * the peer to authenticate) looks like:
- *
- * RCA-
- * +--------------------------------------------+
- * V scn,tld|
- * +--------+ Close +---------+ RCA+
- * | |<----------------------------------| |------+
- * +--->| Closed | TO* | Opened | sca |
- * | | |-----+ +-------| |<-----+
- * | +--------+ irc | | +---------+
- * | ^ | | ^
- * | | | | |
- * | | | | |
- * | TO-| | | |
- * | |tld TO+ V | |
- * | | +------->+ | |
- * | | | | | |
- * | +--------+ V | |
- * | | |<----+<--------------------+ |
- * | | Req- | scr |
- * | | Sent | |
- * | | | |
- * | +--------+ |
- * | RCA- | | RCA+ |
- * +------+ +------------------------------------------+
- * scn,tld sca,irc,ict,tlu
- *
- *
- * with:
- *
- * Open: LCP reached authentication phase
- * Close: LCP reached terminate phase
- *
- * RCA+: received reply (pap-req, chap-response), acceptable
- * RCN: received reply (pap-req, chap-response), not acceptable
- * TO+: timeout with restart counter >= 0
- * TO-: timeout with restart counter < 0
- * TO*: reschedule timeout for CHAP
- *
- * scr: send request packet (none for PAP, chap-challenge)
- * sca: send ack packet (pap-ack, chap-success)
- * scn: send nak packet (pap-nak, chap-failure)
- * ict: initialize re-challenge timer (CHAP only)
- *
- * tlu: this-layer-up, LCP reaches network phase
- * tld: this-layer-down, LCP enters terminate phase
- *
- * Note that in CHAP mode, after sending a new challenge, while the state
- * automaton falls back into Req-Sent state, it doesn't signal a tld
- * event to LCP, so LCP remains in network phase. Only after not getting
- * any response (or after getting an unacceptable response), CHAP closes,
- * causing LCP to enter terminate phase.
- *
- * With PAP, there is no initial request that can be sent. The peer is
- * expected to send one based on the successful negotiation of PAP as
- * the authentication protocol during the LCP option negotiation.
- *
- * Incoming authentication protocol requests (remote requests
- * authentication, we are peer) don't employ a state machine at all,
- * they are simply answered. Some peers [Ascend P50 firmware rev
- * 4.50] react allergically when sending IPCP requests while they are
- * still in authentication phase (thereby violating the standard that
- * demands that these NCP packets are to be discarded), so we keep
- * track of the peer demanding us to authenticate, and only proceed to
- * phase network once we've seen a positive acknowledge for the
- * authentication.
- */
-
-/*
- * Handle incoming CHAP packets.
- */
-void
-sppp_chap_input(struct sppp *sp, struct mbuf *m)
-{
- STDDCL;
- struct lcp_header *h;
- int len, x;
- u_char *value, *name, digest[AUTHKEYLEN], dsize;
- int value_len, name_len;
- MD5_CTX ctx;
-
- len = m->m_pkthdr.len;
- if (len < 4) {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "chap invalid packet length: %d bytes\n",
- SPP_ARGS(ifp), len);
- return;
- }
- h = mtod (m, struct lcp_header*);
- if (len > ntohs (h->len))
- len = ntohs (h->len);
-
- switch (h->type) {
- /* challenge, failure and success are his authproto */
- case CHAP_CHALLENGE:
- value = 1 + (u_char*)(h+1);
- value_len = value[-1];
- name = value + value_len;
- name_len = len - value_len - 5;
- if (name_len < 0) {
- if (debug) {
- log(LOG_DEBUG,
- SPP_FMT "chap corrupted challenge "
- "<%s id=0x%x len=%d",
- SPP_ARGS(ifp),
- sppp_auth_type_name(PPP_CHAP, h->type),
- h->ident, ntohs(h->len));
- sppp_print_bytes((u_char*) (h+1), len-4);
- log(-1, ">\n");
- }
- break;
- }
-
- if (debug) {
- log(LOG_DEBUG,
- SPP_FMT "chap input <%s id=0x%x len=%d name=",
- SPP_ARGS(ifp),
- sppp_auth_type_name(PPP_CHAP, h->type), h->ident,
- ntohs(h->len));
- sppp_print_string((char*) name, name_len);
- log(-1, " value-size=%d value=", value_len);
- sppp_print_bytes(value, value_len);
- log(-1, ">\n");
- }
-
- /* Compute reply value. */
- MD5Init(&ctx);
- MD5Update(&ctx, &h->ident, 1);
- MD5Update(&ctx, sp->myauth.secret,
- sppp_strnlen(sp->myauth.secret, AUTHKEYLEN));
- MD5Update(&ctx, value, value_len);
- MD5Final(digest, &ctx);
- dsize = sizeof digest;
-
- sppp_auth_send(&chap, sp, CHAP_RESPONSE, h->ident,
- sizeof dsize, (const char *)&dsize,
- sizeof digest, digest,
- (size_t)sppp_strnlen(sp->myauth.name, AUTHNAMELEN),
- sp->myauth.name,
- 0);
- break;
-
- case CHAP_SUCCESS:
- if (debug) {
- log(LOG_DEBUG, SPP_FMT "chap success",
- SPP_ARGS(ifp));
- if (len > 4) {
- log(-1, ": ");
- sppp_print_string((char*)(h + 1), len - 4);
- }
- log(-1, "\n");
- }
- x = splimp();
- sp->pp_flags &= ~PP_NEEDAUTH;
- if (sp->myauth.proto == PPP_CHAP &&
- (sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO)) &&
- (sp->lcp.protos & (1 << IDX_CHAP)) == 0) {
- /*
- * We are authenticator for CHAP but didn't
- * complete yet. Leave it to tlu to proceed
- * to network phase.
- */
- splx(x);
- break;
- }
- splx(x);
- sppp_phase_network(sp);
- break;
-
- case CHAP_FAILURE:
- if (debug) {
- log(LOG_INFO, SPP_FMT "chap failure",
- SPP_ARGS(ifp));
- if (len > 4) {
- log(-1, ": ");
- sppp_print_string((char*)(h + 1), len - 4);
- }
- log(-1, "\n");
- } else
- log(LOG_INFO, SPP_FMT "chap failure\n",
- SPP_ARGS(ifp));
- /* await LCP shutdown by authenticator */
- break;
-
- /* response is my authproto */
- case CHAP_RESPONSE:
- value = 1 + (u_char*)(h+1);
- value_len = value[-1];
- name = value + value_len;
- name_len = len - value_len - 5;
- if (name_len < 0) {
- if (debug) {
- log(LOG_DEBUG,
- SPP_FMT "chap corrupted response "
- "<%s id=0x%x len=%d",
- SPP_ARGS(ifp),
- sppp_auth_type_name(PPP_CHAP, h->type),
- h->ident, ntohs(h->len));
- sppp_print_bytes((u_char*)(h+1), len-4);
- log(-1, ">\n");
- }
- break;
- }
- if (h->ident != sp->confid[IDX_CHAP]) {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "chap dropping response for old ID "
- "(got %d, expected %d)\n",
- SPP_ARGS(ifp),
- h->ident, sp->confid[IDX_CHAP]);
- break;
- }
- if (name_len != sppp_strnlen(sp->hisauth.name, AUTHNAMELEN)
- || bcmp(name, sp->hisauth.name, name_len) != 0) {
- log(LOG_INFO, SPP_FMT "chap response, his name ",
- SPP_ARGS(ifp));
- sppp_print_string(name, name_len);
- log(-1, " != expected ");
- sppp_print_string(sp->hisauth.name,
- sppp_strnlen(sp->hisauth.name, AUTHNAMELEN));
- log(-1, "\n");
- }
- if (debug) {
- log(LOG_DEBUG, SPP_FMT "chap input(%s) "
- "<%s id=0x%x len=%d name=",
- SPP_ARGS(ifp),
- sppp_state_name(sp->state[IDX_CHAP]),
- sppp_auth_type_name(PPP_CHAP, h->type),
- h->ident, ntohs (h->len));
- sppp_print_string((char*)name, name_len);
- log(-1, " value-size=%d value=", value_len);
- sppp_print_bytes(value, value_len);
- log(-1, ">\n");
- }
- if (value_len != AUTHKEYLEN) {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "chap bad hash value length: "
- "%d bytes, should be %d\n",
- SPP_ARGS(ifp), value_len,
- AUTHKEYLEN);
- break;
- }
-
- MD5Init(&ctx);
- MD5Update(&ctx, &h->ident, 1);
- MD5Update(&ctx, sp->hisauth.secret,
- sppp_strnlen(sp->hisauth.secret, AUTHKEYLEN));
- MD5Update(&ctx, sp->myauth.challenge, AUTHKEYLEN);
- MD5Final(digest, &ctx);
-
-#define FAILMSG "Failed..."
-#define SUCCMSG "Welcome!"
-
- if (value_len != sizeof digest ||
- bcmp(digest, value, value_len) != 0) {
- /* action scn, tld */
- sppp_auth_send(&chap, sp, CHAP_FAILURE, h->ident,
- sizeof(FAILMSG) - 1, (u_char *)FAILMSG,
- 0);
- chap.tld(sp);
- break;
- }
- /* action sca, perhaps tlu */
- if (sp->state[IDX_CHAP] == STATE_REQ_SENT ||
- sp->state[IDX_CHAP] == STATE_OPENED)
- sppp_auth_send(&chap, sp, CHAP_SUCCESS, h->ident,
- sizeof(SUCCMSG) - 1, (u_char *)SUCCMSG,
- 0);
- if (sp->state[IDX_CHAP] == STATE_REQ_SENT) {
- sppp_cp_change_state(&chap, sp, STATE_OPENED);
- chap.tlu(sp);
- }
- break;
-
- default:
- /* Unknown CHAP packet type -- ignore. */
- if (debug) {
- log(LOG_DEBUG, SPP_FMT "chap unknown input(%s) "
- "<0x%x id=0x%xh len=%d",
- SPP_ARGS(ifp),
- sppp_state_name(sp->state[IDX_CHAP]),
- h->type, h->ident, ntohs(h->len));
- sppp_print_bytes((u_char*)(h+1), len-4);
- log(-1, ">\n");
- }
- break;
-
- }
-}
-
-static void
-sppp_chap_init(struct sppp *sp)
-{
- /* Chap doesn't have STATE_INITIAL at all. */
- sp->state[IDX_CHAP] = STATE_CLOSED;
- sp->fail_counter[IDX_CHAP] = 0;
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- callout_handle_init(&sp->ch[IDX_CHAP]);
-#endif
-}
-
-static void
-sppp_chap_open(struct sppp *sp)
-{
- if (sp->myauth.proto == PPP_CHAP &&
- (sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO)) != 0) {
- /* we are authenticator for CHAP, start it */
- chap.scr(sp);
- sp->rst_counter[IDX_CHAP] = sp->lcp.max_configure;
- sppp_cp_change_state(&chap, sp, STATE_REQ_SENT);
- }
- /* nothing to be done if we are peer, await a challenge */
-}
-
-static void
-sppp_chap_close(struct sppp *sp)
-{
- if (sp->state[IDX_CHAP] != STATE_CLOSED)
- sppp_cp_change_state(&chap, sp, STATE_CLOSED);
-}
-
-static void
-sppp_chap_TO(void *cookie)
-{
- struct sppp *sp = (struct sppp *)cookie;
- STDDCL;
- int s;
-
- s = splimp();
- if (debug)
- log(LOG_DEBUG, SPP_FMT "chap TO(%s) rst_counter = %d\n",
- SPP_ARGS(ifp),
- sppp_state_name(sp->state[IDX_CHAP]),
- sp->rst_counter[IDX_CHAP]);
-
- if (--sp->rst_counter[IDX_CHAP] < 0)
- /* TO- event */
- switch (sp->state[IDX_CHAP]) {
- case STATE_REQ_SENT:
- chap.tld(sp);
- sppp_cp_change_state(&chap, sp, STATE_CLOSED);
- break;
- }
- else
- /* TO+ (or TO*) event */
- switch (sp->state[IDX_CHAP]) {
- case STATE_OPENED:
- /* TO* event */
- sp->rst_counter[IDX_CHAP] = sp->lcp.max_configure;
- /* fall through */
- case STATE_REQ_SENT:
- chap.scr(sp);
- /* sppp_cp_change_state() will restart the timer */
- sppp_cp_change_state(&chap, sp, STATE_REQ_SENT);
- break;
- }
-
- splx(s);
-}
-
-static void
-sppp_chap_tlu(struct sppp *sp)
-{
- STDDCL;
- int i, x;
-
- i = 0;
- sp->rst_counter[IDX_CHAP] = sp->lcp.max_configure;
-
- /*
- * Some broken CHAP implementations (Conware CoNet, firmware
- * 4.0.?) don't want to re-authenticate their CHAP once the
- * initial challenge-response exchange has taken place.
- * Provide for an option to avoid rechallenges.
- */
- if ((sp->hisauth.flags & AUTHFLAG_NORECHALLENGE) == 0) {
- /*
- * Compute the re-challenge timeout. This will yield
- * a number between 300 and 810 seconds.
- */
- i = 300 + ((unsigned)(random() & 0xff00) >> 7);
- TIMEOUT(chap.TO, (void *)sp, i * hz, sp->ch[IDX_CHAP]);
- }
-
- if (debug) {
- log(LOG_DEBUG,
- SPP_FMT "chap %s, ",
- SPP_ARGS(ifp),
- sp->pp_phase == PHASE_NETWORK? "reconfirmed": "tlu");
- if ((sp->hisauth.flags & AUTHFLAG_NORECHALLENGE) == 0)
- log(-1, "next re-challenge in %d seconds\n", i);
- else
- log(-1, "re-challenging supressed\n");
- }
-
- x = splimp();
- /* indicate to LCP that we need to be closed down */
- sp->lcp.protos |= (1 << IDX_CHAP);
-
- if (sp->pp_flags & PP_NEEDAUTH) {
- /*
- * Remote is authenticator, but his auth proto didn't
- * complete yet. Defer the transition to network
- * phase.
- */
- splx(x);
- return;
- }
- splx(x);
-
- /*
- * If we are already in phase network, we are done here. This
- * is the case if this is a dummy tlu event after a re-challenge.
- */
- if (sp->pp_phase != PHASE_NETWORK)
- sppp_phase_network(sp);
-}
-
-static void
-sppp_chap_tld(struct sppp *sp)
-{
- STDDCL;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "chap tld\n", SPP_ARGS(ifp));
- UNTIMEOUT(chap.TO, (void *)sp, sp->ch[IDX_CHAP]);
- sp->lcp.protos &= ~(1 << IDX_CHAP);
-
- lcp.Close(sp);
-}
-
-static void
-sppp_chap_scr(struct sppp *sp)
-{
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
- struct timeval tv;
-#endif
- u_long *ch, seed;
- u_char clen;
-
- /* Compute random challenge. */
- ch = (u_long *)sp->myauth.challenge;
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
-
-#ifdef RANDOMDEV
- read_random(&seed, sizeof seed);
-#else
- seed = (u_long)random();
-#endif /* RANDOMDEV */
-
-#else
- microtime(&tv);
- seed = tv.tv_sec ^ tv.tv_usec;
-#endif
- ch[0] = seed ^ random();
- ch[1] = seed ^ random();
- ch[2] = seed ^ random();
- ch[3] = seed ^ random();
- clen = AUTHKEYLEN;
-
- sp->confid[IDX_CHAP] = ++sp->pp_seq;
-
- sppp_auth_send(&chap, sp, CHAP_CHALLENGE, sp->confid[IDX_CHAP],
- sizeof clen, (const char *)&clen,
- (size_t)AUTHKEYLEN, sp->myauth.challenge,
- (size_t)sppp_strnlen(sp->myauth.name, AUTHNAMELEN),
- sp->myauth.name,
- 0);
-}
- /*
- *--------------------------------------------------------------------------*
- * *
- * The PAP implementation. *
- * *
- *--------------------------------------------------------------------------*
- */
-/*
- * For PAP, we need to keep a little state also if we are the peer, not the
- * authenticator. This is since we don't get a request to authenticate, but
- * have to repeatedly authenticate ourself until we got a response (or the
- * retry counter is expired).
- */
-
-/*
- * Handle incoming PAP packets. */
-static void
-sppp_pap_input(struct sppp *sp, struct mbuf *m)
-{
- STDDCL;
- struct lcp_header *h;
- int len, x;
- u_char *name, *passwd, mlen;
- int name_len, passwd_len;
-
- len = m->m_pkthdr.len;
- if (len < 5) {
- if (debug)
- log(LOG_DEBUG,
- SPP_FMT "pap invalid packet length: %d bytes\n",
- SPP_ARGS(ifp), len);
- return;
- }
- h = mtod (m, struct lcp_header*);
- if (len > ntohs (h->len))
- len = ntohs (h->len);
- switch (h->type) {
- /* PAP request is my authproto */
- case PAP_REQ:
- name = 1 + (u_char*)(h+1);
- name_len = name[-1];
- passwd = name + name_len + 1;
- if (name_len > len - 6 ||
- (passwd_len = passwd[-1]) > len - 6 - name_len) {
- if (debug) {
- log(LOG_DEBUG, SPP_FMT "pap corrupted input "
- "<%s id=0x%x len=%d",
- SPP_ARGS(ifp),
- sppp_auth_type_name(PPP_PAP, h->type),
- h->ident, ntohs(h->len));
- sppp_print_bytes((u_char*)(h+1), len-4);
- log(-1, ">\n");
- }
- break;
- }
- if (debug) {
- log(LOG_DEBUG, SPP_FMT "pap input(%s) "
- "<%s id=0x%x len=%d name=",
- SPP_ARGS(ifp),
- sppp_state_name(sp->state[IDX_PAP]),
- sppp_auth_type_name(PPP_PAP, h->type),
- h->ident, ntohs(h->len));
- sppp_print_string((char*)name, name_len);
- log(-1, " passwd=");
- sppp_print_string((char*)passwd, passwd_len);
- log(-1, ">\n");
- }
- if (name_len != sppp_strnlen(sp->hisauth.name, AUTHNAMELEN) ||
- passwd_len != sppp_strnlen(sp->hisauth.secret, AUTHKEYLEN) ||
- bcmp(name, sp->hisauth.name, name_len) != 0 ||
- bcmp(passwd, sp->hisauth.secret, passwd_len) != 0) {
- /* action scn, tld */
- mlen = sizeof(FAILMSG) - 1;
- sppp_auth_send(&pap, sp, PAP_NAK, h->ident,
- sizeof mlen, (const char *)&mlen,
- sizeof(FAILMSG) - 1, (u_char *)FAILMSG,
- 0);
- pap.tld(sp);
- break;
- }
- /* action sca, perhaps tlu */
- if (sp->state[IDX_PAP] == STATE_REQ_SENT ||
- sp->state[IDX_PAP] == STATE_OPENED) {
- mlen = sizeof(SUCCMSG) - 1;
- sppp_auth_send(&pap, sp, PAP_ACK, h->ident,
- sizeof mlen, (const char *)&mlen,
- sizeof(SUCCMSG) - 1, (u_char *)SUCCMSG,
- 0);
- }
- if (sp->state[IDX_PAP] == STATE_REQ_SENT) {
- sppp_cp_change_state(&pap, sp, STATE_OPENED);
- pap.tlu(sp);
- }
- break;
-
- /* ack and nak are his authproto */
- case PAP_ACK:
- UNTIMEOUT(sppp_pap_my_TO, (void *)sp, sp->pap_my_to_ch);
- if (debug) {
- log(LOG_DEBUG, SPP_FMT "pap success",
- SPP_ARGS(ifp));
- name_len = *((char *)h);
- if (len > 5 && name_len) {
- log(-1, ": ");
- sppp_print_string((char*)(h+1), name_len);
- }
- log(-1, "\n");
- }
- x = splimp();
- sp->pp_flags &= ~PP_NEEDAUTH;
- if (sp->myauth.proto == PPP_PAP &&
- (sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO)) &&
- (sp->lcp.protos & (1 << IDX_PAP)) == 0) {
- /*
- * We are authenticator for PAP but didn't
- * complete yet. Leave it to tlu to proceed
- * to network phase.
- */
- splx(x);
- break;
- }
- splx(x);
- sppp_phase_network(sp);
- break;
-
- case PAP_NAK:
- UNTIMEOUT(sppp_pap_my_TO, (void *)sp, sp->pap_my_to_ch);
- if (debug) {
- log(LOG_INFO, SPP_FMT "pap failure",
- SPP_ARGS(ifp));
- name_len = *((char *)h);
- if (len > 5 && name_len) {
- log(-1, ": ");
- sppp_print_string((char*)(h+1), name_len);
- }
- log(-1, "\n");
- } else
- log(LOG_INFO, SPP_FMT "pap failure\n",
- SPP_ARGS(ifp));
- /* await LCP shutdown by authenticator */
- break;
-
- default:
- /* Unknown PAP packet type -- ignore. */
- if (debug) {
- log(LOG_DEBUG, SPP_FMT "pap corrupted input "
- "<0x%x id=0x%x len=%d",
- SPP_ARGS(ifp),
- h->type, h->ident, ntohs(h->len));
- sppp_print_bytes((u_char*)(h+1), len-4);
- log(-1, ">\n");
- }
- break;
-
- }
-}
-
-static void
-sppp_pap_init(struct sppp *sp)
-{
- /* PAP doesn't have STATE_INITIAL at all. */
- sp->state[IDX_PAP] = STATE_CLOSED;
- sp->fail_counter[IDX_PAP] = 0;
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- callout_handle_init(&sp->ch[IDX_PAP]);
- callout_handle_init(&sp->pap_my_to_ch);
-#endif
-}
-
-static void
-sppp_pap_open(struct sppp *sp)
-{
- if (sp->hisauth.proto == PPP_PAP &&
- (sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO)) != 0) {
- /* we are authenticator for PAP, start our timer */
- sp->rst_counter[IDX_PAP] = sp->lcp.max_configure;
- sppp_cp_change_state(&pap, sp, STATE_REQ_SENT);
- }
- if (sp->myauth.proto == PPP_PAP) {
- /* we are peer, send a request, and start a timer */
- pap.scr(sp);
- TIMEOUT(sppp_pap_my_TO, (void *)sp, sp->lcp.timeout,
- sp->pap_my_to_ch);
- }
-}
-
-static void
-sppp_pap_close(struct sppp *sp)
-{
- if (sp->state[IDX_PAP] != STATE_CLOSED)
- sppp_cp_change_state(&pap, sp, STATE_CLOSED);
-}
-
-/*
- * That's the timeout routine if we are authenticator. Since the
- * authenticator is basically passive in PAP, we can't do much here.
- */
-static void
-sppp_pap_TO(void *cookie)
-{
- struct sppp *sp = (struct sppp *)cookie;
- STDDCL;
- int s;
-
- s = splimp();
- if (debug)
- log(LOG_DEBUG, SPP_FMT "pap TO(%s) rst_counter = %d\n",
- SPP_ARGS(ifp),
- sppp_state_name(sp->state[IDX_PAP]),
- sp->rst_counter[IDX_PAP]);
-
- if (--sp->rst_counter[IDX_PAP] < 0)
- /* TO- event */
- switch (sp->state[IDX_PAP]) {
- case STATE_REQ_SENT:
- pap.tld(sp);
- sppp_cp_change_state(&pap, sp, STATE_CLOSED);
- break;
- }
- else
- /* TO+ event, not very much we could do */
- switch (sp->state[IDX_PAP]) {
- case STATE_REQ_SENT:
- /* sppp_cp_change_state() will restart the timer */
- sppp_cp_change_state(&pap, sp, STATE_REQ_SENT);
- break;
- }
-
- splx(s);
-}
-
-/*
- * That's the timeout handler if we are peer. Since the peer is active,
- * we need to retransmit our PAP request since it is apparently lost.
- * XXX We should impose a max counter.
- */
-static void
-sppp_pap_my_TO(void *cookie)
-{
- struct sppp *sp = (struct sppp *)cookie;
- STDDCL;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "pap peer TO\n",
- SPP_ARGS(ifp));
-
- pap.scr(sp);
-}
-
-static void
-sppp_pap_tlu(struct sppp *sp)
-{
- STDDCL;
- int x;
-
- sp->rst_counter[IDX_PAP] = sp->lcp.max_configure;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "%s tlu\n",
- SPP_ARGS(ifp), pap.name);
-
- x = splimp();
- /* indicate to LCP that we need to be closed down */
- sp->lcp.protos |= (1 << IDX_PAP);
-
- if (sp->pp_flags & PP_NEEDAUTH) {
- /*
- * Remote is authenticator, but his auth proto didn't
- * complete yet. Defer the transition to network
- * phase.
- */
- splx(x);
- return;
- }
- splx(x);
- sppp_phase_network(sp);
-}
-
-static void
-sppp_pap_tld(struct sppp *sp)
-{
- STDDCL;
-
- if (debug)
- log(LOG_DEBUG, SPP_FMT "pap tld\n", SPP_ARGS(ifp));
- UNTIMEOUT(pap.TO, (void *)sp, sp->ch[IDX_PAP]);
- UNTIMEOUT(sppp_pap_my_TO, (void *)sp, sp->pap_my_to_ch);
- sp->lcp.protos &= ~(1 << IDX_PAP);
-
- lcp.Close(sp);
-}
-
-static void
-sppp_pap_scr(struct sppp *sp)
-{
- u_char idlen, pwdlen;
-
- sp->confid[IDX_PAP] = ++sp->pp_seq;
- pwdlen = sppp_strnlen(sp->myauth.secret, AUTHKEYLEN);
- idlen = sppp_strnlen(sp->myauth.name, AUTHNAMELEN);
-
- sppp_auth_send(&pap, sp, PAP_REQ, sp->confid[IDX_PAP],
- sizeof idlen, (const char *)&idlen,
- (size_t)idlen, sp->myauth.name,
- sizeof pwdlen, (const char *)&pwdlen,
- (size_t)pwdlen, sp->myauth.secret,
- 0);
-}
- /*
- * Random miscellaneous functions.
- */
-
-/*
- * Send a PAP or CHAP proto packet.
- *
- * Varadic function, each of the elements for the ellipsis is of type
- * ``size_t mlen, const u_char *msg''. Processing will stop iff
- * mlen == 0.
- * NOTE: never declare variadic functions with types subject to type
- * promotion (i.e. u_char). This is asking for big trouble depending
- * on the architecture you are on...
- */
-
-static void
-sppp_auth_send(const struct cp *cp, struct sppp *sp,
- unsigned int type, unsigned int id,
- ...)
-{
- STDDCL;
- struct ppp_header *h;
- struct lcp_header *lh;
- struct mbuf *m;
- u_char *p;
- int len;
- unsigned int mlen;
- const char *msg;
- va_list ap;
-
- MGETHDR (m, M_DONTWAIT, MT_DATA);
- if (! m)
- return;
- m->m_pkthdr.rcvif = 0;
-
- h = mtod (m, struct ppp_header*);
- h->address = PPP_ALLSTATIONS; /* broadcast address */
- h->control = PPP_UI; /* Unnumbered Info */
- h->protocol = htons(cp->proto);
-
- lh = (struct lcp_header*)(h + 1);
- lh->type = type;
- lh->ident = id;
- p = (u_char*) (lh+1);
-
- va_start(ap, id);
- len = 0;
-
- while ((mlen = (unsigned int)va_arg(ap, size_t)) != 0) {
- msg = va_arg(ap, const char *);
- len += mlen;
- if (len > MHLEN - PPP_HEADER_LEN - LCP_HEADER_LEN) {
- va_end(ap);
- m_freem(m);
- return;
- }
-
- bcopy(msg, p, mlen);
- p += mlen;
- }
- va_end(ap);
-
- m->m_pkthdr.len = m->m_len = PPP_HEADER_LEN + LCP_HEADER_LEN + len;
- lh->len = htons (LCP_HEADER_LEN + len);
-
- if (debug) {
- log(LOG_DEBUG, SPP_FMT "%s output <%s id=0x%x len=%d",
- SPP_ARGS(ifp), cp->name,
- sppp_auth_type_name(cp->proto, lh->type),
- lh->ident, ntohs(lh->len));
- sppp_print_bytes((u_char*) (lh+1), len);
- log(-1, ">\n");
- }
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- if (! IF_HANDOFF_ADJ(&sp->pp_cpq, m, ifp, 3))
- ++ifp->if_oerrors;
-#else
- if (IF_QFULL (&sp->pp_cpq)) {
- IF_DROP (&sp->pp_fastq);
- IF_DROP (&ifp->if_snd);
- m_freem (m);
- ++ifp->if_oerrors;
- } else {
- IF_ENQUEUE (&sp->pp_cpq, m);
- }
-
- if (! (ifp->if_flags & IFF_OACTIVE))
- (*ifp->if_start) (ifp);
-
- ifp->if_obytes += m->m_pkthdr.len + 3;
-#endif
-}
-
-/*
- * Flush interface queue.
- */
-static void
-sppp_qflush(struct ifqueue *ifq)
-{
- struct mbuf *m, *n;
-
- n = ifq->ifq_head;
- while ((m = n)) {
- n = m->m_act;
- m_freem (m);
- }
- ifq->ifq_head = 0;
- ifq->ifq_tail = 0;
- ifq->ifq_len = 0;
-}
-
-/*
- * Send keepalive packets, every 10 seconds.
- */
-static void
-sppp_keepalive(void *dummy)
-{
- struct sppp *sp;
- int s;
-
- s = splimp();
- for (sp=spppq; sp; sp=sp->pp_next) {
- struct ifnet *ifp = &sp->pp_if;
-
- /* Keepalive mode disabled or channel down? */
- if (! (sp->pp_flags & PP_KEEPALIVE) ||
- ! (ifp->if_flags & IFF_RUNNING))
- continue;
-
- /* No keepalive in PPP mode if LCP not opened yet. */
- if (sp->pp_mode != IFF_CISCO &&
- sp->pp_phase < PHASE_AUTHENTICATE)
- continue;
-
- if (sp->pp_alivecnt == MAXALIVECNT) {
- /* No keepalive packets got. Stop the interface. */
- printf (SPP_FMT "down\n", SPP_ARGS(ifp));
- if_down (ifp);
- sppp_qflush (&sp->pp_cpq);
- if (sp->pp_mode != IFF_CISCO) {
- /* XXX */
- /* Shut down the PPP link. */
- lcp.Down(sp);
- /* Initiate negotiation. XXX */
- lcp.Up(sp);
- }
- }
- if (sp->pp_alivecnt <= MAXALIVECNT)
- ++sp->pp_alivecnt;
- if (sp->pp_mode == IFF_CISCO)
- sppp_cisco_send (sp, CISCO_KEEPALIVE_REQ, ++sp->pp_seq,
- sp->pp_rseq);
- else if (sp->pp_phase >= PHASE_AUTHENTICATE) {
- long nmagic = htonl (sp->lcp.magic);
- sp->lcp.echoid = ++sp->pp_seq;
- sppp_cp_send (sp, PPP_LCP, ECHO_REQ,
- sp->lcp.echoid, 4, &nmagic);
- }
- }
- splx(s);
- TIMEOUT(sppp_keepalive, 0, hz * 10, keepalive_ch);
-}
-
-/*
- * Get both IP addresses.
- */
-static void
-sppp_get_ip_addrs(struct sppp *sp, u_long *src, u_long *dst, u_long *srcmask)
-{
- struct ifnet *ifp = &sp->pp_if;
- struct ifaddr *ifa;
- struct sockaddr_in *si, *sm;
- u_long ssrc, ddst;
-
- sm = NULL;
- ssrc = ddst = 0L;
- /*
- * Pick the first AF_INET address from the list,
- * aliases don't make any sense on a p2p link anyway.
- */
- si = 0;
-
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
-#elif defined(__NetBSD__) || defined (__OpenBSD__)
- for (ifa = TAILQ_FIRST(&ifp->if_addrlist);
- ifa;
- ifa = TAILQ_NEXT(ifa, ifa_list))
-#else
- for (ifa = ifp->if_addrlist;
- ifa;
- ifa = ifa->ifa_next)
-#endif
- if (ifa->ifa_addr->sa_family == AF_INET) {
- si = (struct sockaddr_in *)ifa->ifa_addr;
- sm = (struct sockaddr_in *)ifa->ifa_netmask;
- if (si)
- break;
- }
- if (ifa) {
- if (si && si->sin_addr.s_addr) {
- ssrc = si->sin_addr.s_addr;
- if (srcmask)
- *srcmask = ntohl(sm->sin_addr.s_addr);
- }
-
- si = (struct sockaddr_in *)ifa->ifa_dstaddr;
- if (si && si->sin_addr.s_addr)
- ddst = si->sin_addr.s_addr;
- }
-
- if (dst) *dst = ntohl(ddst);
- if (src) *src = ntohl(ssrc);
-}
-
-/*
- * Set my IP address. Must be called at splimp.
- */
-static void
-sppp_set_ip_addr(struct sppp *sp, u_long src)
-{
- STDDCL;
- struct ifaddr *ifa;
- struct sockaddr_in *si;
-
- /*
- * Pick the first AF_INET address from the list,
- * aliases don't make any sense on a p2p link anyway.
- */
- si = 0;
-
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
- TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
-#elif defined(__NetBSD__) || defined (__OpenBSD__)
- for (ifa = TAILQ_FIRST(&ifp->if_addrlist);
- ifa;
- ifa = TAILQ_NEXT(ifa, ifa_list))
-#else
- for (ifa = ifp->if_addrlist;
- ifa;
- ifa = ifa->ifa_next)
-#endif
- {
- if (ifa->ifa_addr->sa_family == AF_INET)
- {
- si = (struct sockaddr_in *)ifa->ifa_addr;
- if (si)
- break;
- }
- }
-
- if (ifa && si)
- {
- int error;
-#if __NetBSD_Version__ >= 103080000
- struct sockaddr_in new_sin = *si;
-
- new_sin.sin_addr.s_addr = htonl(src);
- error = in_ifinit(ifp, ifatoia(ifa), &new_sin, 1);
- if(debug && error)
- {
- log(LOG_DEBUG, SPP_FMT "sppp_set_ip_addr: in_ifinit "
- " failed, error=%d\n", SPP_ARGS(ifp), error);
- }
-#else
- /* delete old route */
- error = rtinit(ifa, (int)RTM_DELETE, RTF_HOST);
- if(debug && error)
- {
- log(LOG_DEBUG, SPP_FMT "sppp_set_ip_addr: rtinit DEL failed, error=%d\n",
- SPP_ARGS(ifp), error);
- }
-
- /* set new address */
- si->sin_addr.s_addr = htonl(src);
-
- /* add new route */
- error = rtinit(ifa, (int)RTM_ADD, RTF_HOST);
- if (debug && error)
- {
- log(LOG_DEBUG, SPP_FMT "sppp_set_ip_addr: rtinit ADD failed, error=%d",
- SPP_ARGS(ifp), error);
- }
-#endif
- }
-}
-
-static int
-sppp_params(struct sppp *sp, IOCTL_CMD_T cmd, void *data)
-{
- struct ifreq *ifr = (struct ifreq *)data;
- int ret;
- struct spppreq *sppprp;
-
- if((sppprp = (struct spppreq *)malloc(sizeof(struct spppreq),
- M_TEMP, M_WAITOK)) == NULL)
- {
- printf("i4bsppp, sppp_params: malloc failed!\n");
- return EFAULT;
- }
-
- /*
- * ifr->ifr_data is supposed to point to a struct spppreq.
- */
- if (copyin((caddr_t)ifr->ifr_data, sppprp, sizeof(struct spppreq)) != 0)
- {
- free(sppprp, M_TEMP);
- return EFAULT;
- }
-
- switch (sppprp->cmd) {
- case SPPPIOGDEFS:
- if (cmd != SIOCGIFGENERIC)
- {
- free(sppprp, M_TEMP);
- return EINVAL;
- }
- /*
- * We copy over the entire current state, but clean
- * out some of the stuff we don't wanna pass up.
- * Remember, SIOCGIFGENERIC is unprotected, and can be
- * called by any user. No need to ever get PAP or
- * CHAP secrets back to userland anyway.
- */
- bcopy(sp, &sppprp->defs, sizeof(struct sppp));
- bzero(sppprp->defs.myauth.secret, AUTHKEYLEN);
- bzero(sppprp->defs.myauth.challenge, AUTHKEYLEN);
- bzero(sppprp->defs.hisauth.secret, AUTHKEYLEN);
- bzero(sppprp->defs.hisauth.challenge, AUTHKEYLEN);
- ret = copyout(sppprp, (caddr_t)ifr->ifr_data, sizeof(struct spppreq));
- free(sppprp, M_TEMP);
- return(ret);
-
- case SPPPIOSDEFS:
- if (cmd != SIOCSIFGENERIC)
- {
- free(sppprp, M_TEMP);
- return EINVAL;
- }
- /*
- * We have a very specific idea of which fields we allow
- * being passed back from userland, so to not clobber our
- * current state. For one, we only allow setting
- * anything if LCP is in dead phase. Once the LCP
- * negotiations started, the authentication settings must
- * not be changed again. (The administrator can force an
- * ifconfig down in order to get LCP back into dead
- * phase.)
- *
- * Also, we only allow for authentication parameters to be
- * specified.
- *
- * XXX Should allow to set or clear pp_flags.
- *
- * Finally, if the respective authentication protocol to
- * be used is set differently than 0, but the secret is
- * passed as all zeros, we don't trash the existing secret.
- * This allows an administrator to change the system name
- * only without clobbering the secret (which he didn't get
- * back in a previous SPPPIOGDEFS call). However, the
- * secrets are cleared if the authentication protocol is
- * reset to 0.
- */
- if (!((sp->pp_phase == PHASE_DEAD) ||
- (sp->pp_phase == PHASE_ESTABLISH)))
- {
- free(sppprp, M_TEMP);
- return EBUSY;
- }
-
- if ((sppprp->defs.myauth.proto != 0 && sppprp->defs.myauth.proto != PPP_PAP &&
- sppprp->defs.myauth.proto != PPP_CHAP) ||
- (sppprp->defs.hisauth.proto != 0 && sppprp->defs.hisauth.proto != PPP_PAP &&
- sppprp->defs.hisauth.proto != PPP_CHAP))
- {
- free(sppprp, M_TEMP);
- return EINVAL;
- }
-
- if (sppprp->defs.myauth.proto == 0)
- /* resetting myauth */
- bzero(&sp->myauth, sizeof sp->myauth);
- else {
- /* setting/changing myauth */
- sp->myauth.proto = sppprp->defs.myauth.proto;
- bcopy(sppprp->defs.myauth.name, sp->myauth.name, AUTHNAMELEN);
- if (sppprp->defs.myauth.secret[0] != '\0')
- bcopy(sppprp->defs.myauth.secret, sp->myauth.secret,
- AUTHKEYLEN);
- }
- if (sppprp->defs.hisauth.proto == 0)
- /* resetting hisauth */
- bzero(&sp->hisauth, sizeof sp->hisauth);
- else {
- /* setting/changing hisauth */
- sp->hisauth.proto = sppprp->defs.hisauth.proto;
- sp->hisauth.flags = sppprp->defs.hisauth.flags;
- bcopy(sppprp->defs.hisauth.name, sp->hisauth.name, AUTHNAMELEN);
- if (sppprp->defs.hisauth.secret[0] != '\0')
- bcopy(sppprp->defs.hisauth.secret, sp->hisauth.secret,
- AUTHKEYLEN);
- }
- if (sppprp->defs.lcp.timeout != 0) {
- /* Set the LCP timeout */
- sp->lcp.timeout = sppprp->defs.lcp.timeout;
- }
-
- /* Set enable VJ compression */
- sp->enable_vj = sppprp->defs.enable_vj;
-
- break;
-
- default:
- free(sppprp, M_TEMP);
- return EINVAL;
- }
- free(sppprp, M_TEMP);
- return 0;
-}
-
-static void
-sppp_phase_network(struct sppp *sp)
-{
- STDDCL;
- int i;
- u_long mask;
-
- sp->pp_phase = PHASE_NETWORK;
-
- if(debug)
- log(LOG_DEBUG, SPP_FMT "phase %s\n", SPP_ARGS(ifp),
- sppp_phase_name(sp->pp_phase));
-
- /* Notify NCPs now. */
- for (i = 0; i < IDX_COUNT; i++)
- if ((cps[i])->flags & CP_NCP)
- (cps[i])->Open(sp);
-
- /* Send Up events to all NCPs. */
- for (i = 0, mask = 1; i < IDX_COUNT; i++, mask <<= 1)
- if (sp->lcp.protos & mask && ((cps[i])->flags & CP_NCP))
- (cps[i])->Up(sp);
-
- /* if no NCP is starting, all this was in vain, close down */
- sppp_lcp_check_and_close(sp);
-}
-
-
-static const char *
-sppp_cp_type_name(u_char type)
-{
- static char buf[12];
- switch (type) {
- case CONF_REQ: return "conf-req";
- case CONF_ACK: return "conf-ack";
- case CONF_NAK: return "conf-nak";
- case CONF_REJ: return "conf-rej";
- case TERM_REQ: return "term-req";
- case TERM_ACK: return "term-ack";
- case CODE_REJ: return "code-rej";
- case PROTO_REJ: return "proto-rej";
- case ECHO_REQ: return "echo-req";
- case ECHO_REPLY: return "echo-reply";
- case DISC_REQ: return "discard-req";
- }
-#ifdef HAS_SNPRINTF
- snprintf (buf, sizeof(buf), "cp/0x%x", type);
-#else
- sprintf (buf, "cp/0x%x", type);
-#endif
- return buf;
-}
-
-static const char *
-sppp_auth_type_name(u_short proto, u_char type)
-{
- static char buf[12];
- switch (proto) {
- case PPP_CHAP:
- switch (type) {
- case CHAP_CHALLENGE: return "challenge";
- case CHAP_RESPONSE: return "response";
- case CHAP_SUCCESS: return "success";
- case CHAP_FAILURE: return "failure";
- }
- case PPP_PAP:
- switch (type) {
- case PAP_REQ: return "req";
- case PAP_ACK: return "ack";
- case PAP_NAK: return "nak";
- }
- }
-#ifdef HAS_SNPRINTF
- snprintf (buf, sizeof(buf), "auth/0x%x", type);
-#else
- sprintf (buf, "auth/0x%x", type);
-#endif
- return buf;
-}
-
-static const char *
-sppp_lcp_opt_name(u_char opt)
-{
- static char buf[12];
- switch (opt) {
- case LCP_OPT_MRU: return "mru";
- case LCP_OPT_ASYNC_MAP: return "async-map";
- case LCP_OPT_AUTH_PROTO: return "auth-proto";
- case LCP_OPT_QUAL_PROTO: return "qual-proto";
- case LCP_OPT_MAGIC: return "magic";
- case LCP_OPT_PROTO_COMP: return "proto-comp";
- case LCP_OPT_ADDR_COMP: return "addr-comp";
- }
-#ifdef HAS_SNPRINTF
- snprintf (buf, sizeof(buf), "lcp/0x%x", opt);
-#else
- sprintf (buf, "lcp/0x%x", opt);
-#endif
- return buf;
-}
-
-static const char *
-sppp_ipcp_opt_name(u_char opt)
-{
- static char buf[12];
- switch (opt) {
- case IPCP_OPT_ADDRESSES: return "addresses";
- case IPCP_OPT_COMPRESSION: return "compression";
- case IPCP_OPT_ADDRESS: return "address";
- }
-#ifdef HAS_SNPRINTF
- snprintf (buf, sizeof(buf), "ipcp/0x%x", opt);
-#else
- sprintf (buf, "ipcp/0x%x", opt);
-#endif
- return buf;
-}
-
-static const char *
-sppp_state_name(int state)
-{
- switch (state) {
- case STATE_INITIAL: return "initial";
- case STATE_STARTING: return "starting";
- case STATE_CLOSED: return "closed";
- case STATE_STOPPED: return "stopped";
- case STATE_CLOSING: return "closing";
- case STATE_STOPPING: return "stopping";
- case STATE_REQ_SENT: return "req-sent";
- case STATE_ACK_RCVD: return "ack-rcvd";
- case STATE_ACK_SENT: return "ack-sent";
- case STATE_OPENED: return "opened";
- }
- return "illegal";
-}
-
-static const char *
-sppp_phase_name(enum ppp_phase phase)
-{
- switch (phase) {
- case PHASE_DEAD: return "dead";
- case PHASE_ESTABLISH: return "establish";
- case PHASE_TERMINATE: return "terminate";
- case PHASE_AUTHENTICATE: return "authenticate";
- case PHASE_NETWORK: return "network";
- }
- return "illegal";
-}
-
-static const char *
-sppp_proto_name(u_short proto)
-{
- static char buf[12];
- switch (proto) {
- case PPP_LCP: return "lcp";
- case PPP_IPCP: return "ipcp";
- case PPP_PAP: return "pap";
- case PPP_CHAP: return "chap";
- }
-#ifdef HAS_SNPRINTF
- snprintf(buf, sizeof(buf), "proto/0x%x", (unsigned)proto);
-#else
- sprintf(buf, "proto/0x%x", (unsigned)proto);
-#endif
- return buf;
-}
-
-static void
-sppp_print_bytes(const u_char *p, u_short len)
-{
-#if defined(__FreeBSD_version) && (__FreeBSD_version > 300005)
- if (len)
- log(-1, " %*D", len, p, "-");
-#else
- if (!len)
- return;
-
- log(-1, "%x", *p++);
- while (--len)
- log(-1, "-%x", *p++);
-#endif
-}
-
-static void
-sppp_print_string(const char *p, u_short len)
-{
- u_char c;
-
- while (len-- > 0) {
- c = *p++;
- /*
- * Print only ASCII chars directly. RFC 1994 recommends
- * using only them, but we don't rely on it. */
- if (c < ' ' || c > '~')
- log(-1, "\\x%x", c);
- else
- log(-1, "%c", c);
- }
-}
-
-static const char *
-sppp_dotted_quad(u_long addr)
-{
- static char s[16];
- sprintf(s, "%d.%d.%d.%d",
- (int)((addr >> 24) & 0xff),
- (int)((addr >> 16) & 0xff),
- (int)((addr >> 8) & 0xff),
- (int)(addr & 0xff));
- return s;
-}
-
-static int
-sppp_strnlen(u_char *p, int max)
-{
- int len;
-
- for (len = 0; len < max && *p; ++p)
- ++len;
- return len;
-}
-
-/* a dummy, used to drop uninteresting events */
-static void
-sppp_null(struct sppp *unused)
-{
- /* do just nothing */
-}
diff --git a/sys/i4b/layer1/i4b_hdlc.h b/sys/i4b/layer1/i4b_hdlc.h
deleted file mode 100644
index 3dd892df2483..000000000000
--- a/sys/i4b/layer1/i4b_hdlc.h
+++ /dev/null
@@ -1,393 +0,0 @@
-/*
- * Copyright (c) 2000 Hans Petter Selasky. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_hdlc.h - software-HDLC header file
- * --------------------------------------
- *
- * $Id: i4b_hdlc.h,v 1.5 2000/08/28 07:41:19 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jul 19 09:41:13 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_HDLC_H_
-#define _I4B_HDLC_H_
-
-/*---------------------------------------------------------------------------*
- * HDLC CRC table
- *
- * Usage:
- * crc = (HDLC_FCS_TAB[(u_char)(crc ^ byte of data)] ^ (u_char)(crc >> 8));
- *
- * For more information see RFC 1662 (p. 10)
- *---------------------------------------------------------------------------*/
-const u_short HDLC_FCS_TAB[256] = { 0x0000,
- 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48,
- 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 0x1081,
- 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 0x9cc9,
- 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, 0x2102,
- 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 0xad4a,
- 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 0x3183,
- 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, 0xbdcb,
- 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 0x4204,
- 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, 0xce4c,
- 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 0x5285,
- 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, 0xdecd,
- 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 0x6306,
- 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 0xef4e,
- 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, 0x7387,
- 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 0xffcf,
- 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, 0x8408,
- 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 0x0840,
- 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, 0x9489,
- 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 0x18c1,
- 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 0xa50a,
- 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, 0x2942,
- 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 0xb58b,
- 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, 0x39c3,
- 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 0xc60c,
- 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, 0x4a44,
- 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 0xd68d,
- 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 0x5ac5,
- 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, 0xe70e,
- 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 0x6b46,
- 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, 0xf78f,
- 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7,
- 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
-};
-
-/*---------------------------------------------------------------------------*
- * HDLC bit table
- * ==============
- *
- * bits[0..3]: A value which tells how many set bits there are at the
- * beginning of the byte.
- *
- * bits[4..7]: Special bytes like 0x7e, 0x7d, 0xfd ... are flagged here
- * NOTE: Special bytes also means 'abort' bytes (7 or more
- * continuous set bits)
- *
- * bits[8..11]: A copy of bits[0..3] but only incremented by one.
- * NOTE: 0x7e has value '8' instead of '0'. Internal reasons.
- *
- * bits[12..15]: A value which tells how many set bits there are at the
- * end of the byte.
- * NOTE: 0xff has both '8' incoming and '8' outgoing bits.
- *
- *---------------------------------------------------------------------------*/
-const u_short HDLC_BIT_TAB[256] = { 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0504, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0605, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0504, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0160, 0x0706, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0504, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0605, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0504, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x01a0, 0x02a1, 0x0860, 0x0807, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1403, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1504, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1403, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1605, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1403, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1504, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1403, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1160, 0x1706, 0x2100,
- 0x2201, 0x2100, 0x2302, 0x2100, 0x2201, 0x2100, 0x2403, 0x2100,
- 0x2201, 0x2100, 0x2302, 0x2100, 0x2201, 0x2100, 0x2504, 0x2100,
- 0x2201, 0x2100, 0x2302, 0x2100, 0x2201, 0x2100, 0x2403, 0x2100,
- 0x2201, 0x2100, 0x2302, 0x2100, 0x2201, 0x2100, 0x2605, 0x3100,
- 0x3201, 0x3100, 0x3302, 0x3100, 0x3201, 0x3100, 0x3403, 0x3100,
- 0x3201, 0x3100, 0x3302, 0x3100, 0x3201, 0x3100, 0x3504, 0x4100,
- 0x4201, 0x4100, 0x4302, 0x4100, 0x4201, 0x4100, 0x4403, 0x5100,
- 0x5201, 0x5100, 0x5302, 0x6180, 0x6281, 0x7150, 0x8908
-};
-
-/*---------------------------------------------------------------------------*
- * HDLC_DECODE
- * ===========
- *
- * u_char: flag, blevel
- * u_short: crc, ib, tmp, tmp2, len
- *
- * next: 'continue' or 'goto xxx'
- *
- * cfr: complete frame
- * nfr: new frame
- * NOTE: must setup 'len' and 'dst', so that 'dst' may be written
- * at most 'len' times.
- *
- * rab: abort
- * rdd: read data (read byte is stored in 'tmp2')
- * rdo: overflow
- *
- * d: dummy
- *
- * NOTE: setting flag to '0' and len to '0' => recover from rdu
- * NOTE: bits[8 .. ] of tmp2 may be used to store custom data/flags
- * NOTE: these variables have to be 'suspended' / 'resumed' somehow:
- * flag, blevel, crc, ib, tmp, len
- * NOTE: zero is default value for all variables.
- * NOTE: each time 'dst' is written, 'len' is decreased by one.
- *---------------------------------------------------------------------------*/
-
-#define HDLC_DECODE(dst, len, tmp, tmp2, blevel, ib, crc, flag, rddcmd, nfrcmd, \
- cfrcmd, rabcmd, rdocmd, nextcmd, d) \
- \
- rddcmd; \
- \
- ib += HDLC_BIT_TAB[(u_char)tmp2]; \
- \
- if ((u_char)ib >= 5) \
- { \
- if (ib & 0x20) /* de-stuff (msb) */ \
- { \
- if ((u_char)tmp2 == 0x7e) goto j0##d; \
- tmp2 += tmp2 & 0x7f; \
- blevel--; \
- \
- if ((ib += 0x100) & 0xc) tmp2 |= 1; /* */ \
- } \
- \
- ib &= ~0xe0; \
- \
- if ((u_char)ib == 6) /* flag seq (lsb) */ \
- { \
- j0##d: if (flag >= 2) \
- { \
- len += (4 - flag) & 3; /* remove CRC bytes */ \
- crc ^= 0xf0b8; \
- cfrcmd; \
- len = 0; \
- } \
- \
- flag = 1; \
- \
- blevel = (ib >> 8) & 0xf; \
- tmp = ((u_char)tmp2) >> blevel; \
- blevel = 8 - blevel; \
- \
- ib >>= 12; \
- \
- nextcmd; \
- } \
- if ((u_char)ib >= 7) /* abort (msb & lsb) */ \
- { \
- if (flag >= 2) \
- { \
- rabcmd; \
- len = 0; \
- } \
- \
- flag = 0; \
- \
- ib >>= 12; \
- \
- nextcmd; \
- } \
- if ((u_char)ib == 5) /* de-stuff (lsb) */ \
- { \
- tmp2 = (tmp2 | (tmp2 + 1)) & ~0x1; \
- blevel--; \
- } \
- if (blevel > 7) /* EO - bits */ \
- { \
- tmp |= (u_char)tmp2 >> (8 - (blevel &= 7)); \
- \
- ib >>= 12; \
- \
- nextcmd; \
- } \
- } \
- \
- tmp |= (u_char)tmp2 << blevel; \
- \
- if (!len--) \
- { \
- len++; \
- \
- if (!flag++) { flag--; goto j5##d;} /* hunt mode */ \
- \
- switch (flag) \
- { case 2: /* new frame */ \
- nfrcmd; \
- crc = -1; \
- if (!len--) { len++; flag++; goto j4##d; } \
- goto j3##d; \
- case 3: /* CRC (lsb's) */ \
- case 4: /* CRC (msb's) */ \
- goto j4##d; \
- case 5: /* RDO */ \
- rdocmd; \
- flag = 0; \
- break; \
- } \
- } \
- else \
- { \
- j3##d: dst = (u_char)tmp; \
- j4##d: crc = (HDLC_FCS_TAB[(u_char)(tmp ^ crc)] ^ (u_char)(crc >> 8)); \
- } \
- \
- j5##d: ib >>= 12; \
- tmp >>= 8; \
-
-/*------ end of HDLC_DECODE -------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------*
- * HDLC_ENCODE
- * ===========
- *
- * u_char: flag, src
- * u_short: tmp2, blevel, ib, crc, len
- * u_int: tmp
- *
- * gfr: This is the place where you free the last [mbuf] chain, and get
- * the next one. If a mbuf is available the code should setup 'len'
- * and 'src' so that 'src' may be read 'len' times. If no mbuf is
- * available leave 'len' and 'src' untouched.
- *
- * wrd: write data (output = (u_char)tmp)
- *
- * d: dummy
- *
- * NOTE: setting flag to '-2' and len to '0' => abort bytes will be sent
- * NOTE: these variables have to be 'suspended' / 'resumed' somehow:
- * flag, blevel, crc, ib, tmp, len
- * NOTE: zero is default value for all variables.
- * NOTE: each time 'src' is read, 'len' is decreased by one.
- * NOTE: neither cmd's should exit through 'goto' or 'break' statements.
- *---------------------------------------------------------------------------*/
-
-#define HDLC_ENCODE(src, len, tmp, tmp2, blevel, ib, crc, flag, gfrcmd, wrdcmd, d) \
- \
- if (blevel >= 0x800) { blevel -= 0x800; goto j4##d; } \
- \
- if (!len--) \
- { \
- len++; \
- \
- switch(++flag) \
- { default: /* abort */ \
- tmp = blevel = 0; /* zero is default */ \
- tmp2 = 0xff; \
- goto j3##d; \
- case 1: /* 1st time FS */ \
- case 2: /* 2nd time FS */ \
- tmp2 = 0x7e; \
- goto j3##d; \
- case 3: \
- gfrcmd; /* get new frame */ \
- if (!len--) \
- { \
- len++; \
- flag--; /* don't proceed */ \
- tmp2 = 0x7e; \
- goto j3##d; /* final FS */ \
- } \
- else \
- { \
- crc = -1; \
- ib = 0; \
- goto j1##d; /* first byte */ \
- } \
- case 4: \
- crc ^= -1; \
- tmp2 = (u_char)crc; \
- goto j2##d; /* CRC (lsb's) */ \
- case 5: \
- tmp2 = (u_char)(crc >> 8); \
- flag = 1; \
- goto j2##d; /* CRC (msb's) */ \
- } \
- } \
- else \
- { j1##d : \
- tmp2 = (u_char)src; \
- crc =(HDLC_FCS_TAB[(u_char)(crc ^ tmp2)] ^ (u_char)(crc >> 8)); \
- j2##d: \
- \
- ib >>= 12; \
- ib += HDLC_BIT_TAB[(u_char)tmp2]; \
- \
- if ((u_char)ib >= 5) /* stuffing */ \
- { \
- blevel &= ~0xff; \
- \
- if (ib & 0xc0) /* bit stuff (msb) */ \
- { \
- tmp2 += tmp2 & (0xff * (ib & 0xc0)); \
- ib %= 0x5000; \
- blevel++; \
- } \
- \
- ib &= ~0xf0; \
- \
- if ((u_char)ib >= 5) /* bit stuff (lsb) */ \
- { \
- tmp2 += tmp2 & ~0x1f >> ((ib - (ib >> 8) + 1) \
- & 7); \
- blevel++; \
- \
- if ((u_char)ib >= 10) /* bit stuff (msb) */ \
- { \
- tmp2 += tmp2 & ~0x7ff >> ((ib - \
- (ib >> 8) + 1) & 7); \
- blevel++; \
- } \
- if (ib & 0x8000) /* bit walk */ \
- { \
- ib = ((u_char)ib % 5) << 12; \
- } \
- } \
- \
- tmp |= tmp2 << (u_char)(blevel >> 8); \
- blevel += (u_char)blevel << 8; \
- } \
- else /* no stuffing */ \
- { \
- j3##d:tmp |= tmp2 << (u_char)(blevel >> 8); \
- } \
- } \
- \
- j4##d: wrdcmd; \
- tmp >>= 8; \
-
-/*------ end of HDLC_ENCODE -------------------------------------------------*/
-
-
-#endif /* _I4B_HDLC_H_ */
-
diff --git a/sys/i4b/layer1/i4b_l1dmux.c b/sys/i4b/layer1/i4b_l1dmux.c
deleted file mode 100644
index 9df32b50c934..000000000000
--- a/sys/i4b/layer1/i4b_l1dmux.c
+++ /dev/null
@@ -1,455 +0,0 @@
-/*
- * Copyright (c) 2000, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_l1dmux.c - isdn4bsd layer 1 driver multiplexer
- * --------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 10 16:43:24 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "iwic.h"
-#include "ifpi.h"
-#include "ifpnp.h"
-#include "ihfc.h"
-#include "itjc.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_l1l2.h>
-#include <i4b/include/i4b_global.h>
-
-/*
- * this code is nothing but a big dynamic switch to multiplex and demultiplex
- * layer 1 hardware isdn drivers to a common layer 2.
- *
- * when a card is successfully attached at system boot time, the driver for
- * this card calls the routine i4b_l1_mph_status_ind() with status = STI_ATTACH.
- *
- * This command is used to setup the tables for converting a "driver unit" and
- * "driver type" pair (encoded in the calls from the hardware driver to the
- * routines in this source file) to a "unit number" used in layer 2 and the
- * layers above (up to and including the isdnd daemon) and for converting
- * layer 2 units back to calling the appropriate driver and driver unit
- * number.
- *
- * Example: in my setup, a Winbond (iwic) card is probed first and gets
- * driver unit number 0, driver type 1 in layer 1. This becomes unit
- * number 0 in layer 2 and up. The second card probed is a Teles card
- * (isic) and gets driver unit number 0, driver type 0 in layer 1. This
- * becomes unit number 1 in layer 1 and up.
- *
- * To add support for a new driver, add a new driver number to i4b_l1.h:
- * currently we have L1DRVR_ISIC and L1DRVR_IWIC, so you would add
- * L1DRVR_FOO. More you would want to add a L0FOOUNIT to encode unit
- * numbers in your driver. You then have to add a l1foounittab[] and
- * add an entry to the getl1tab() routine for your driver. The only
- * thing left now is to write your driver with the support functions
- * for this multiplexer ;-)
- */
-
-unsigned int i4b_l1_debug = L1_DEBUG_DEFAULT;
-
-#if NISIC > 0
-static int l1isicunittab[MAXL1UNITS];
-#endif
-
-#if NIWIC > 0
-static int l1iwicunittab[MAXL1UNITS];
-#endif
-
-#if NIFPI > 0
-static int l1ifpiunittab[MAXL1UNITS];
-#endif
-
-#if NIHFC > 0
-static int l1ihfcunittab[MAXL1UNITS];
-#endif
-
-#if NIFPNP > 0
-static int l1ifpnpunittab[MAXL1UNITS];
-#endif
-
-#if NITJC > 0
-static int l1itjcunittab[MAXL1UNITS];
-#endif
-
-static int numl1units = 0;
-
-static int l1drvunittab[MAXL1UNITS];
-static struct i4b_l1mux_func *l1mux_func[MAXL1DRVR];
-
-static int i4b_l1_ph_data_req(int, struct mbuf *, int);
-static int i4b_l1_ph_activate_req(int);
-
-/* from i4btrc driver i4b_trace.c */
-int get_trace_data_from_l1(int unit, int what, int len, char *buf);
-
-/* from layer 2 */
-int i4b_ph_data_ind(int unit, struct mbuf *m);
-int i4b_ph_activate_ind(int unit);
-int i4b_ph_deactivate_ind(int unit);
-int i4b_mph_status_ind(int, int, int);
-
-/* layer 1 lme */
-int i4b_l1_mph_command_req(int, int, void *);
-
-/*---------------------------------------------------------------------------*
- * jump table: interface function pointers L1/L2 interface
- *---------------------------------------------------------------------------*/
-struct i4b_l1l2_func i4b_l1l2_func = {
-
- /* Layer 1 --> Layer 2 */
-
- (int (*)(int, struct mbuf *)) i4b_ph_data_ind,
- (int (*)(int)) i4b_ph_activate_ind,
- (int (*)(int)) i4b_ph_deactivate_ind,
-
- /* Layer 2 --> Layer 1 */
-
- (int (*)(int, struct mbuf *, int)) i4b_l1_ph_data_req,
-
- (int (*)(int)) i4b_l1_ph_activate_req,
-
- /* Layer 1 --> trace interface driver, ISDN trace data */
-
- (int (*)(i4b_trace_hdr_t *, int, u_char *)) get_trace_data_from_l1,
-
- /* Driver control and status information */
-
- (int (*)(int, int, int)) i4b_mph_status_ind,
- (int (*)(int, int, void *)) i4b_l1_mph_command_req,
-};
-
-/*---------------------------------------------------------------------------*
- * return a pointer to a layer 0 drivers unit tab
- *---------------------------------------------------------------------------*/
-static __inline int *
-getl1tab(int drv)
-{
- switch(drv)
- {
-#if NISIC > 0
- case L1DRVR_ISIC:
- return(l1isicunittab);
- break;
-#endif
-#if NIWIC > 0
- case L1DRVR_IWIC:
- return(l1iwicunittab);
- break;
-#endif
-#if NIFPI > 0
- case L1DRVR_IFPI:
- return(l1ifpiunittab);
- break;
-#endif
-#if NIHFC > 0
- case L1DRVR_IHFC:
- return(l1ihfcunittab);
- break;
-#endif
-#if NIFPNP > 0
- case L1DRVR_IFPNP:
- return(l1ifpnpunittab);
- break;
-#endif
-#if NITJC > 0
- case L1DRVR_ITJC:
- return(l1itjcunittab);
- break;
-#endif
- default:
- return(NULL);
- break;
- }
-}
-
-/*===========================================================================*
- * B - Channel (data transfer)
- *===========================================================================*/
-
-/*---------------------------------------------------------------------------*
- * return the address of ISDN drivers linktab
- *---------------------------------------------------------------------------*/
-isdn_link_t *
-i4b_l1_ret_linktab(int unit, int channel)
-{
- int drv_unit, ch_unit;
-
- drv_unit = L0DRVR(l1drvunittab[unit]);
- ch_unit = L0UNIT(l1drvunittab[unit]);
-
- NDBGL1(L1_PRIM, "unit %d -> drv %d / drvunit %d", unit, drv_unit, ch_unit);
-
- if (drv_unit >= MAXL1DRVR || l1mux_func[drv_unit] == NULL
- || l1mux_func[drv_unit]->ret_linktab == NULL)
- panic("i4b_l1_ret_linktab: unknown driver type %d\n", drv_unit);
-
- return(l1mux_func[drv_unit]->ret_linktab(ch_unit, channel));
-}
-
-/*---------------------------------------------------------------------------*
- * set the ISDN driver linktab
- *---------------------------------------------------------------------------*/
-void
-i4b_l1_set_linktab(int unit, int channel, drvr_link_t *dlt)
-{
- int drv_unit, ch_unit;
-
- drv_unit = L0DRVR(l1drvunittab[unit]);
- ch_unit = L0UNIT(l1drvunittab[unit]);
-
- NDBGL1(L1_PRIM, "unit %d -> drv %d / drvunit %d", unit, drv_unit, ch_unit);
-
- if (drv_unit >= MAXL1DRVR || l1mux_func[drv_unit] == NULL
- || l1mux_func[drv_unit]->set_linktab == NULL)
- panic("i4b_l1_set_linktab: unknown driver type %d\n", drv_unit);
-
- l1mux_func[drv_unit]->set_linktab(ch_unit, channel, dlt);
-}
-
-/*===========================================================================*
- * trace D- and B-Channel support
- *===========================================================================*/
-
-/*---------------------------------------------------------------------------*
- * L0 -> L1 trace information to trace driver
- *---------------------------------------------------------------------------*/
-int
-i4b_l1_trace_ind(i4b_trace_hdr_t *hdr, int len, u_char *data)
-{
- register int *tab;
-
- if((tab = getl1tab(L0DRVR(hdr->unit))) == NULL)
- panic("i4b_l1_trace_ind: unknown driver type %d\n", L0DRVR(hdr->unit));
-
- NDBGL1(L1_PRIM, "(drv %d / drvunit %d) -> unit %d", L0DRVR(hdr->unit), L0UNIT(hdr->unit), tab[L0UNIT(hdr->unit)]);
-
- hdr->unit = tab[L0UNIT(hdr->unit)];
-
- return(MPH_Trace_Ind(hdr, len, data));
-}
-
-/*===========================================================================*
- * D - Channel (signalling)
- *===========================================================================*/
-
-/*---------------------------------------------------------------------------*
- * L0 -> L1 status indication from hardware
- *---------------------------------------------------------------------------*/
-int
-i4b_l1_mph_status_ind(int drv_unit, int status, int parm, struct i4b_l1mux_func *l1mux_func_p)
-{
- register int *tab;
-
- /*
- * in case the status STI_ATTACH is sent from the hardware, the
- * driver has just attached itself and we need to initialize
- * the tables and assorted variables.
- */
-
- if(status == STI_ATTACH)
- {
- if (l1mux_func_p == (struct i4b_l1mux_func *)0)
- panic("i4b_l1_mph_status_ind: i4b_l1mux_func pointer is NULL\n");
-
- if(numl1units < MAXL1UNITS)
- {
- if((tab = getl1tab(L0DRVR(drv_unit))) == NULL)
- panic("i4b_l1_mph_status_ind: unknown driver type %d\n", L0DRVR(drv_unit));
-
- tab[L0UNIT(drv_unit)] = numl1units;
-
- l1drvunittab[numl1units] = drv_unit;
-
- l1mux_func[L0DRVR(drv_unit)] = l1mux_func_p;
-
- switch(L0DRVR(drv_unit))
- {
-#if NISIC > 0
- case L1DRVR_ISIC:
- printf("isic%d: passive stack unit %d\n", L0UNIT(drv_unit), numl1units);
- break;
-#endif
-#if NIWIC > 0
- case L1DRVR_IWIC:
- printf("iwic%d: passive stack unit %d\n", L0UNIT(drv_unit), numl1units);
- break;
-#endif
-#if NIFPI > 0
- case L1DRVR_IFPI:
- printf("ifpi%d: passive stack unit %d\n", L0UNIT(drv_unit), numl1units);
- break;
-#endif
-#if NIFPNP > 0
- case L1DRVR_IFPNP:
- printf("ifpnp%d: passive stack unit %d\n", L0UNIT(drv_unit), numl1units);
- break;
-#endif
-#if NIHFC > 0
- case L1DRVR_IHFC:
- printf("ihfc%d: passive stack unit %d\n", L0UNIT(drv_unit), numl1units);
- break;
-#endif
-#if NITJC > 0
- case L1DRVR_ITJC:
- printf("itjc%d: passive stack unit %d\n", L0UNIT(drv_unit), numl1units);
- break;
-#endif
- }
-
- NDBGL1(L1_PRIM, "ATTACH drv %d, drvunit %d -> unit %d", L0DRVR(drv_unit), L0UNIT(drv_unit), numl1units);
-
- numl1units++;
- }
- }
-
- if((tab = getl1tab(L0DRVR(drv_unit))) == NULL)
- panic("i4b_l1_mph_status_ind: unknown driver type %d\n", L0DRVR(drv_unit));
-
- NDBGL1(L1_PRIM, "(drv %d / drvunit %d) -> unit %d\n", L0DRVR(drv_unit), L0UNIT(drv_unit), tab[L0UNIT(drv_unit)]);
-
- return(MPH_Status_Ind(tab[L0UNIT(drv_unit)], status, parm));
-}
-
-/*---------------------------------------------------------------------------*
- * L0 -> L1 data from hardware
- *---------------------------------------------------------------------------*/
-int
-i4b_l1_ph_data_ind(int drv_unit, struct mbuf *data)
-{
- register int *tab;
-
- if((tab = getl1tab(L0DRVR(drv_unit))) == NULL)
- panic("i4b_l1_ph_data_ind: unknown driver type %d\n", L0DRVR(drv_unit));
-
-#if 0
- NDBGL1(L1_PRIM, "(drv %d / drvunit %d) -> unit %d", L0DRVR(drv_unit), L0UNIT(drv_unit), tab[L0UNIT(drv_unit)]);
-#endif
-
- return(PH_Data_Ind(tab[L0UNIT(drv_unit)], data));
-}
-
-/*---------------------------------------------------------------------------*
- * L0 -> L1 activate indication from hardware
- *---------------------------------------------------------------------------*/
-int
-i4b_l1_ph_activate_ind(int drv_unit)
-{
- register int *tab;
-
- if((tab = getl1tab(L0DRVR(drv_unit))) == NULL)
- panic("i4b_l1_ph_activate_ind: unknown driver type %d\n", L0DRVR(drv_unit));
-
- NDBGL1(L1_PRIM, "(drv %d / drvunit %d) -> unit %d", L0DRVR(drv_unit), L0UNIT(drv_unit), tab[L0UNIT(drv_unit)]);
-
- return(PH_Act_Ind(tab[L0UNIT(drv_unit)]));
-}
-
-/*---------------------------------------------------------------------------*
- * L0 -> L1 deactivate indication from hardware
- *---------------------------------------------------------------------------*/
-int
-i4b_l1_ph_deactivate_ind(int drv_unit)
-{
- register int *tab;
-
- if((tab = getl1tab(L0DRVR(drv_unit))) == NULL)
- panic("i4b_l1_ph_deactivate_ind: unknown driver type %d\n", L0DRVR(drv_unit));
-
- NDBGL1(L1_PRIM, "(drv %d / drvunit %d) -> unit %d", L0DRVR(drv_unit), L0UNIT(drv_unit), tab[L0UNIT(drv_unit)]);
-
- return(PH_Deact_Ind(tab[L0UNIT(drv_unit)]));
-}
-
-/*---------------------------------------------------------------------------*
- * L2 -> L1 command to hardware
- *---------------------------------------------------------------------------*/
-int
-i4b_l1_mph_command_req(int unit, int command, void * parm)
-{
- register int drv_unit = L0DRVR(l1drvunittab[unit]);
- register int ch_unit = L0UNIT(l1drvunittab[unit]);
-
- NDBGL1(L1_PRIM, "unit %d -> drv %d / drvunit %d", unit, drv_unit, ch_unit);
-
- if (drv_unit >= MAXL1DRVR || l1mux_func[drv_unit] == NULL
- || l1mux_func[drv_unit]->mph_command_req == NULL)
- panic("i4b_l1_mph_command_req: unknown driver type %d\n", drv_unit);
-
- return(l1mux_func[drv_unit]->mph_command_req(ch_unit, command, parm));
-}
-
-/*---------------------------------------------------------------------------*
- * L2 -> L1 data to be transmitted to hardware
- *---------------------------------------------------------------------------*/
-int
-i4b_l1_ph_data_req(int unit, struct mbuf *data, int flag)
-{
- register int drv_unit = L0DRVR(l1drvunittab[unit]);
- register int ch_unit = L0UNIT(l1drvunittab[unit]);
-
-#if 0
- NDBGL1(L1_PRIM, "unit %d -> drv %d / drvunit %d", unit, drv_unit, ch_unit);
-#endif
-
- if (drv_unit >= MAXL1DRVR || l1mux_func[drv_unit] == NULL
- || l1mux_func[drv_unit]->ph_data_req == NULL)
- panic("i4b_l1_ph_data_req: unknown driver type %d\n", drv_unit);
-
- return(l1mux_func[drv_unit]->ph_data_req(ch_unit, data, flag));
-}
-
-/*---------------------------------------------------------------------------*
- * L2 -> L1 activate request to hardware
- *---------------------------------------------------------------------------*/
-int
-i4b_l1_ph_activate_req(int unit)
-{
- register int drv_unit = L0DRVR(l1drvunittab[unit]);
- register int ch_unit = L0UNIT(l1drvunittab[unit]);
-
- NDBGL1(L1_PRIM, "unit %d -> drv %d / drvunit %d", unit, drv_unit, ch_unit);
-
- if (drv_unit >= MAXL1DRVR || l1mux_func[drv_unit] == NULL
- || l1mux_func[drv_unit]->ph_activate_req == NULL)
- panic("i4b_l1_ph_activate_req: unknown driver type %d\n", drv_unit);
-
- return(l1mux_func[drv_unit]->ph_activate_req(ch_unit));
-}
-
-/* EOF */
diff --git a/sys/i4b/layer1/i4b_l1lib.c b/sys/i4b/layer1/i4b_l1lib.c
deleted file mode 100644
index d2e69e48bf94..000000000000
--- a/sys/i4b/layer1/i4b_l1lib.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2000 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_l1lib.c - general useful L1 procedures
- * ------------------------------------------
- *
- * $Id: i4b_l1lib.c,v 1.3 2000/05/29 15:41:41 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon May 29 15:24:21 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#include <sys/param.h>
-#include <sys/systm.h>
-
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#define TEL_IDLE_MIN (BCH_MAX_DATALEN/2)
-
-/*---------------------------------------------------------------------------*
- * telephony silence detection
- *---------------------------------------------------------------------------*/
-int
-i4b_l1_bchan_tel_silence(unsigned char *data, int len)
-{
- register int i = 0;
- register int j = 0;
-
- /* count idle bytes */
-
- for(;i < len; i++)
- {
- if((*data >= 0xaa) && (*data <= 0xac))
- j++;
- data++;
- }
-
-#ifdef NOTDEF
- printf("i4b_l1_bchan_tel_silence: got %d silence bytes in frame\n", j);
-#endif
-
- if(j < (TEL_IDLE_MIN))
- return(0);
- else
- return(1);
-
-}
diff --git a/sys/i4b/layer1/ifpi/i4b_ifpi_ext.h b/sys/i4b/layer1/ifpi/i4b_ifpi_ext.h
deleted file mode 100644
index c2d4cdf6e79a..000000000000
--- a/sys/i4b/layer1/ifpi/i4b_ifpi_ext.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2000 Gary Jennejohn. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpi - Fritz!Card PCI for split layers
- * ------------------------------------------
- *
- * $Id: i4b_ifpi_ext.h,v 1.2 2000/06/02 16:14:36 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Fri Jun 2 14:53:31 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_IFPI_EXT_H_
-#define _I4B_IFPI_EXT_H_
-
-#include <i4b/include/i4b_l3l4.h>
-
-void ifpi_set_linktab(int unit, int channel, drvr_link_t * dlt);
-isdn_link_t *ifpi_ret_linktab(int unit, int channel);
-
-int ifpi_ph_data_req(int unit, struct mbuf *m, int freeflag);
-int ifpi_ph_activate_req(int unit);
-int ifpi_mph_command_req(int unit, int command, void *parm);
-
-void ifpi_isac_irq(struct l1_softc *sc, int ista);
-void ifpi_isac_l1_cmd(struct l1_softc *sc, int command);
-int ifpi_isac_init(struct l1_softc *sc);
-
-void ifpi_recover(struct l1_softc *sc);
-char * ifpi_printstate(struct l1_softc *sc);
-void ifpi_next_state(struct l1_softc *sc, int event);
-
-#define IFPI_MAXUNIT 4
-extern struct l1_softc *ifpi_scp[IFPI_MAXUNIT];
-
-#endif /* _I4B_IFPI_EXT_H_ */
diff --git a/sys/i4b/layer1/ifpi/i4b_ifpi_isac.c b/sys/i4b/layer1/ifpi/i4b_ifpi_isac.c
deleted file mode 100644
index 168506daba10..000000000000
--- a/sys/i4b/layer1/ifpi/i4b_ifpi_isac.c
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpi_isac.c - i4b Fritz PCI ISAC handler
- * --------------------------------------------
- *
- * $Id: i4b_ifpi_isac.c,v 1.3 2000/05/29 15:41:41 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon May 29 15:22:52 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#include "ifpi.h"
-#include "pci.h"
-
-#if (NIFPI > 0) && (NPCI > 0)
-
-#include "opt_i4b.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#include <i4b/layer1/ifpi/i4b_ifpi_ext.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_mbuf.h>
-
-static u_char ifpi_isac_exir_hdlr(register struct l1_softc *sc, u_char exir);
-static void ifpi_isac_ind_hdlr(register struct l1_softc *sc, int ind);
-
-/*---------------------------------------------------------------------------*
- * ISAC interrupt service routine
- *---------------------------------------------------------------------------*/
-void
-ifpi_isac_irq(struct l1_softc *sc, int ista)
-{
- register u_char c = 0;
- NDBGL1(L1_F_MSG, "unit %d: ista = 0x%02x", sc->sc_unit, ista);
-
- if(ista & ISAC_ISTA_EXI) /* extended interrupt */
- {
- c |= ifpi_isac_exir_hdlr(sc, ISAC_READ(I_EXIR));
- }
-
- if(ista & ISAC_ISTA_RME) /* receive message end */
- {
- register int rest;
- u_char rsta;
-
- /* get rx status register */
-
- rsta = ISAC_READ(I_RSTA);
-
- if((rsta & ISAC_RSTA_MASK) != 0x20)
- {
- int error = 0;
-
- if(!(rsta & ISAC_RSTA_CRC)) /* CRC error */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: CRC error", sc->sc_unit);
- }
-
- if(rsta & ISAC_RSTA_RDO) /* ReceiveDataOverflow */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: Data Overrun error", sc->sc_unit);
- }
-
- if(rsta & ISAC_RSTA_RAB) /* ReceiveABorted */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: Receive Aborted error", sc->sc_unit);
- }
-
- if(error == 0)
- NDBGL1(L1_I_ERR, "unit %d: RME unknown error, RSTA = 0x%02x!", sc->sc_unit, rsta);
-
- i4b_Dfreembuf(sc->sc_ibuf);
-
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
-
- ISAC_WRITE(I_CMDR, ISAC_CMDR_RMC|ISAC_CMDR_RRES);
- ISACCMDRWRDELAY();
-
- return;
- }
-
- rest = (ISAC_READ(I_RBCL) & (ISAC_FIFO_LEN-1));
-
- if(rest == 0)
- rest = ISAC_FIFO_LEN;
-
- if(sc->sc_ibuf == NULL)
- {
- if((sc->sc_ibuf = i4b_Dgetmbuf(rest)) != NULL)
- sc->sc_ib = sc->sc_ibuf->m_data;
- else
- panic("ifpi_isac_irq: RME, i4b_Dgetmbuf returns NULL!\n");
- sc->sc_ilen = 0;
- }
-
- if(sc->sc_ilen <= (MAX_DFRAME_LEN - rest))
- {
- ISAC_RDFIFO(sc->sc_ib, rest);
- sc->sc_ilen += rest;
-
- sc->sc_ibuf->m_pkthdr.len =
- sc->sc_ibuf->m_len = sc->sc_ilen;
-
- if(sc->sc_trace & TRACE_D_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, sc->sc_ibuf->m_len, sc->sc_ibuf->m_data);
- }
-
- c |= ISAC_CMDR_RMC;
-
- if(sc->sc_enabled &&
- (ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S))
- {
- i4b_l1_ph_data_ind(L0IFPIUNIT(sc->sc_unit), sc->sc_ibuf);
- }
- else
- {
- i4b_Dfreembuf(sc->sc_ibuf);
- }
- }
- else
- {
- NDBGL1(L1_I_ERR, "RME, input buffer overflow!");
- i4b_Dfreembuf(sc->sc_ibuf);
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
- }
-
- if(ista & ISAC_ISTA_RPF) /* receive fifo full */
- {
- if(sc->sc_ibuf == NULL)
- {
- if((sc->sc_ibuf = i4b_Dgetmbuf(MAX_DFRAME_LEN)) != NULL)
- sc->sc_ib= sc->sc_ibuf->m_data;
- else
- panic("ifpi_isac_irq: RPF, i4b_Dgetmbuf returns NULL!\n");
- sc->sc_ilen = 0;
- }
-
- if(sc->sc_ilen <= (MAX_DFRAME_LEN - ISAC_FIFO_LEN))
- {
- ISAC_RDFIFO(sc->sc_ib, ISAC_FIFO_LEN);
- sc->sc_ilen += ISAC_FIFO_LEN;
- sc->sc_ib += ISAC_FIFO_LEN;
- c |= ISAC_CMDR_RMC;
- }
- else
- {
- NDBGL1(L1_I_ERR, "RPF, input buffer overflow!");
- i4b_Dfreembuf(sc->sc_ibuf);
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
- }
-
- if(ista & ISAC_ISTA_XPR) /* transmit fifo empty (XPR bit set) */
- {
- if((sc->sc_obuf2 != NULL) && (sc->sc_obuf == NULL))
- {
- sc->sc_freeflag = sc->sc_freeflag2;
- sc->sc_obuf = sc->sc_obuf2;
- sc->sc_op = sc->sc_obuf->m_data;
- sc->sc_ol = sc->sc_obuf->m_len;
- sc->sc_obuf2 = NULL;
-#ifdef NOTDEF
- printf("ob2=%x, op=%x, ol=%d, f=%d #",
- sc->sc_obuf,
- sc->sc_op,
- sc->sc_ol,
- sc->sc_state);
-#endif
- }
- else
- {
-#ifdef NOTDEF
- printf("ob=%x, op=%x, ol=%d, f=%d #",
- sc->sc_obuf,
- sc->sc_op,
- sc->sc_ol,
- sc->sc_state);
-#endif
- }
-
- if(sc->sc_obuf)
- {
- ISAC_WRFIFO(sc->sc_op, min(sc->sc_ol, ISAC_FIFO_LEN));
-
- if(sc->sc_ol > ISAC_FIFO_LEN) /* length > 32 ? */
- {
- sc->sc_op += ISAC_FIFO_LEN; /* bufferptr+32 */
- sc->sc_ol -= ISAC_FIFO_LEN; /* length - 32 */
- c |= ISAC_CMDR_XTF; /* set XTF bit */
- }
- else
- {
- if(sc->sc_freeflag)
- {
- i4b_Dfreembuf(sc->sc_obuf);
- sc->sc_freeflag = 0;
- }
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
-
- c |= ISAC_CMDR_XTF | ISAC_CMDR_XME;
- }
- }
- else
- {
- sc->sc_state &= ~ISAC_TX_ACTIVE;
- }
- }
-
- if(ista & ISAC_ISTA_CISQ) /* channel status change CISQ */
- {
- register u_char ci;
-
- /* get command/indication rx register*/
-
- ci = ISAC_READ(I_CIRR);
-
- /* if S/Q IRQ, read SQC reg to clr SQC IRQ */
-
- if(ci & ISAC_CIRR_SQC)
- (void) ISAC_READ(I_SQRR);
-
- /* C/I code change IRQ (flag already cleared by CIRR read) */
-
- if(ci & ISAC_CIRR_CIC0)
- ifpi_isac_ind_hdlr(sc, (ci >> 2) & 0xf);
- }
-
- if(c)
- {
- ISAC_WRITE(I_CMDR, c);
- ISACCMDRWRDELAY();
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ISAC L1 Extended IRQ handler
- *---------------------------------------------------------------------------*/
-static u_char
-ifpi_isac_exir_hdlr(register struct l1_softc *sc, u_char exir)
-{
- u_char c = 0;
-
- if(exir & ISAC_EXIR_XMR)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Tx Message Repeat");
-
- c |= ISAC_CMDR_XRES;
- }
-
- if(exir & ISAC_EXIR_XDU)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Tx Data Underrun");
-
- c |= ISAC_CMDR_XRES;
- }
-
- if(exir & ISAC_EXIR_PCE)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Protocol Error");
- }
-
- if(exir & ISAC_EXIR_RFO)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Rx Frame Overflow");
-
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
-
- if(exir & ISAC_EXIR_SOV)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Sync Xfer Overflow");
- }
-
- if(exir & ISAC_EXIR_MOS)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Monitor Status");
- }
-
- if(exir & ISAC_EXIR_SAW)
- {
- /* cannot happen, STCR:TSF is set to 0 */
-
- NDBGL1(L1_I_ERR, "EXIRQ Subscriber Awake");
- }
-
- if(exir & ISAC_EXIR_WOV)
- {
- /* cannot happen, STCR:TSF is set to 0 */
-
- NDBGL1(L1_I_ERR, "EXIRQ Watchdog Timer Overflow");
- }
-
- return(c);
-}
-
-/*---------------------------------------------------------------------------*
- * ISAC L1 Indication handler
- *---------------------------------------------------------------------------*/
-static void
-ifpi_isac_ind_hdlr(register struct l1_softc *sc, int ind)
-{
- register int event;
-
- switch(ind)
- {
- case ISAC_CIRR_IAI8:
- NDBGL1(L1_I_CICO, "rx AI8 in state %s", ifpi_printstate(sc));
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- ifpi_isac_l1_cmd(sc, CMD_AR8);
- event = EV_INFO48;
- i4b_l1_mph_status_ind(L0IFPIUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- break;
-
- case ISAC_CIRR_IAI10:
- NDBGL1(L1_I_CICO, "rx AI10 in state %s", ifpi_printstate(sc));
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- ifpi_isac_l1_cmd(sc, CMD_AR10);
- event = EV_INFO410;
- i4b_l1_mph_status_ind(L0IFPIUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- break;
-
- case ISAC_CIRR_IRSY:
- NDBGL1(L1_I_CICO, "rx RSY in state %s", ifpi_printstate(sc));
- event = EV_RSY;
- break;
-
- case ISAC_CIRR_IPU:
- NDBGL1(L1_I_CICO, "rx PU in state %s", ifpi_printstate(sc));
- event = EV_PU;
- break;
-
- case ISAC_CIRR_IDR:
- NDBGL1(L1_I_CICO, "rx DR in state %s", ifpi_printstate(sc));
- ifpi_isac_l1_cmd(sc, CMD_DIU);
- event = EV_DR;
- break;
-
- case ISAC_CIRR_IDID:
- NDBGL1(L1_I_CICO, "rx DID in state %s", ifpi_printstate(sc));
- event = EV_INFO0;
- i4b_l1_mph_status_ind(L0IFPIUNIT(sc->sc_unit), STI_L1STAT, LAYER_IDLE, NULL);
- break;
-
- case ISAC_CIRR_IDIS:
- NDBGL1(L1_I_CICO, "rx DIS in state %s", ifpi_printstate(sc));
- event = EV_DIS;
- break;
-
- case ISAC_CIRR_IEI:
- NDBGL1(L1_I_CICO, "rx EI in state %s", ifpi_printstate(sc));
- ifpi_isac_l1_cmd(sc, CMD_DIU);
- event = EV_EI;
- break;
-
- case ISAC_CIRR_IARD:
- NDBGL1(L1_I_CICO, "rx ARD in state %s", ifpi_printstate(sc));
- event = EV_INFO2;
- break;
-
- case ISAC_CIRR_ITI:
- NDBGL1(L1_I_CICO, "rx TI in state %s", ifpi_printstate(sc));
- event = EV_INFO0;
- break;
-
- case ISAC_CIRR_IATI:
- NDBGL1(L1_I_CICO, "rx ATI in state %s", ifpi_printstate(sc));
- event = EV_INFO0;
- break;
-
- case ISAC_CIRR_ISD:
- NDBGL1(L1_I_CICO, "rx SD in state %s", ifpi_printstate(sc));
- event = EV_INFO0;
- break;
-
- default:
- NDBGL1(L1_I_ERR, "UNKNOWN Indication 0x%x in state %s", ind, ifpi_printstate(sc));
- event = EV_INFO0;
- break;
- }
- ifpi_next_state(sc, event);
-}
-
-/*---------------------------------------------------------------------------*
- * execute a layer 1 command
- *---------------------------------------------------------------------------*/
-void
-ifpi_isac_l1_cmd(struct l1_softc *sc, int command)
-{
- u_char cmd;
-
-#ifdef I4B_SMP_WORKAROUND
-
- /* XXXXXXXXXXXXXXXXXXX */
-
- /*
- * patch from Wolfgang Helbig:
- *
- * Here is a patch that makes i4b work on an SMP:
- * The card (TELES 16.3) didn't interrupt on an SMP machine.
- * This is a gross workaround, but anyway it works *and* provides
- * some information as how to finally fix this problem.
- */
-
- HSCX_WRITE(0, H_MASK, 0xff);
- HSCX_WRITE(1, H_MASK, 0xff);
- ISAC_WRITE(I_MASK, 0xff);
- DELAY(100);
- HSCX_WRITE(0, H_MASK, HSCX_A_IMASK);
- HSCX_WRITE(1, H_MASK, HSCX_B_IMASK);
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- /* XXXXXXXXXXXXXXXXXXX */
-
-#endif /* I4B_SMP_WORKAROUND */
-
- if(command < 0 || command > CMD_ILL)
- {
- NDBGL1(L1_I_ERR, "illegal cmd 0x%x in state %s", command, ifpi_printstate(sc));
- return;
- }
-
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- cmd = ISAC_CIX0_LOW;
- else
- cmd = 0;
-
- switch(command)
- {
- case CMD_TIM:
- NDBGL1(L1_I_CICO, "tx TIM in state %s", ifpi_printstate(sc));
- cmd |= (ISAC_CIXR_CTIM << 2);
- break;
-
- case CMD_RS:
- NDBGL1(L1_I_CICO, "tx RS in state %s", ifpi_printstate(sc));
- cmd |= (ISAC_CIXR_CRS << 2);
- break;
-
- case CMD_AR8:
- NDBGL1(L1_I_CICO, "tx AR8 in state %s", ifpi_printstate(sc));
- cmd |= (ISAC_CIXR_CAR8 << 2);
- break;
-
- case CMD_AR10:
- NDBGL1(L1_I_CICO, "tx AR10 in state %s", ifpi_printstate(sc));
- cmd |= (ISAC_CIXR_CAR10 << 2);
- break;
-
- case CMD_DIU:
- NDBGL1(L1_I_CICO, "tx DIU in state %s", ifpi_printstate(sc));
- cmd |= (ISAC_CIXR_CDIU << 2);
- break;
- }
- ISAC_WRITE(I_CIXR, cmd);
-}
-
-/*---------------------------------------------------------------------------*
- * L1 ISAC initialization
- *---------------------------------------------------------------------------*/
-int
-ifpi_isac_init(struct l1_softc *sc)
-{
- ISAC_IMASK = 0xff; /* disable all irqs */
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- if(sc->sc_bustyp != BUS_TYPE_IOM2)
- {
- NDBGL1(L1_I_SETUP, "configuring for IOM-1 mode");
-
- /* ADF2: Select mode IOM-1 */
- ISAC_WRITE(I_ADF2, 0x00);
-
- /* SPCR: serial port control register:
- * SPU - software power up = 0
- * SAC - SIP port high Z
- * SPM - timing mode 0
- * TLP - test loop = 0
- * C1C, C2C - B1 and B2 switched to/from SPa
- */
- ISAC_WRITE(I_SPCR, ISAC_SPCR_C1C1|ISAC_SPCR_C2C1);
-
- /* SQXR: S/Q channel xmit register:
- * SQIE - S/Q IRQ enable = 0
- * SQX1-4 - Fa bits = 1
- */
- ISAC_WRITE(I_SQXR, ISAC_SQXR_SQX1|ISAC_SQXR_SQX2|ISAC_SQXR_SQX3|ISAC_SQXR_SQX4);
-
- /* ADF1: additional feature reg 1:
- * WTC - watchdog = 0
- * TEM - test mode = 0
- * PFS - pre-filter = 0
- * CFS - IOM clock/frame always active
- * FSC1/2 - polarity of 8kHz strobe
- * ITF - interframe fill = idle
- */
- ISAC_WRITE(I_ADF1, ISAC_ADF1_FC2); /* ADF1 */
-
- /* STCR: sync transfer control reg:
- * TSF - terminal secific functions = 0
- * TBA - TIC bus address = 7
- * STx/SCx = 0
- */
- ISAC_WRITE(I_STCR, ISAC_STCR_TBA2|ISAC_STCR_TBA1|ISAC_STCR_TBA0);
-
- /* MODE: Mode Register:
- * MDSx - transparent mode 2
- * TMD - timer mode = external
- * RAC - Receiver enabled
- * DIMx - digital i/f mode
- */
- ISAC_WRITE(I_MODE, ISAC_MODE_MDS2|ISAC_MODE_MDS1|ISAC_MODE_RAC|ISAC_MODE_DIM0);
- }
- else
- {
- NDBGL1(L1_I_SETUP, "configuring for IOM-2 mode");
-
- /* ADF2: Select mode IOM-2 */
- ISAC_WRITE(I_ADF2, ISAC_ADF2_IMS);
-
- /* SPCR: serial port control register:
- * SPU - software power up = 0
- * SPM - timing mode 0
- * TLP - test loop = 0
- * C1C, C2C - B1 + C1 and B2 + IC2 monitoring
- */
- ISAC_WRITE(I_SPCR, 0x00);
-
- /* SQXR: S/Q channel xmit register:
- * IDC - IOM direction = 0 (master)
- * CFS - Config Select = 0 (clock always active)
- * CI1E - C/I channel 1 IRQ enable = 0
- * SQIE - S/Q IRQ enable = 0
- * SQX1-4 - Fa bits = 1
- */
- ISAC_WRITE(I_SQXR, ISAC_SQXR_SQX1|ISAC_SQXR_SQX2|ISAC_SQXR_SQX3|ISAC_SQXR_SQX4);
-
- /* ADF1: additional feature reg 1:
- * WTC - watchdog = 0
- * TEM - test mode = 0
- * PFS - pre-filter = 0
- * IOF - IOM i/f off = 0
- * ITF - interframe fill = idle
- */
- ISAC_WRITE(I_ADF1, 0x00);
-
- /* STCR: sync transfer control reg:
- * TSF - terminal secific functions = 0
- * TBA - TIC bus address = 7
- * STx/SCx = 0
- */
- ISAC_WRITE(I_STCR, ISAC_STCR_TBA2|ISAC_STCR_TBA1|ISAC_STCR_TBA0);
-
- /* MODE: Mode Register:
- * MDSx - transparent mode 2
- * TMD - timer mode = external
- * RAC - Receiver enabled
- * DIMx - digital i/f mode
- */
- ISAC_WRITE(I_MODE, ISAC_MODE_MDS2|ISAC_MODE_MDS1|ISAC_MODE_RAC|ISAC_MODE_DIM0);
- }
-
-#ifdef NOTDEF
- /*
- * XXX a transmitter reset causes an ISAC tx IRQ which will not
- * be serviced at attach time under some circumstances leaving
- * the associated IRQ line on the ISA bus active. This prevents
- * any further interrupts to be serviced because no low -> high
- * transition can take place anymore. (-hm)
- */
-
- /* command register:
- * RRES - HDLC receiver reset
- * XRES - transmitter reset
- */
- ISAC_WRITE(I_CMDR, ISAC_CMDR_RRES|ISAC_CMDR_XRES);
- ISACCMDRWRDELAY();
-#endif
-
- /* enabled interrupts:
- * ===================
- * RME - receive message end
- * RPF - receive pool full
- * XPR - transmit pool ready
- * CISQ - CI or S/Q channel change
- * EXI - extended interrupt
- */
-
- ISAC_IMASK = ISAC_MASK_RSC | /* auto mode only */
- ISAC_MASK_TIN | /* timer irq */
- ISAC_MASK_SIN; /* sync xfer irq */
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- return(0);
-}
-
-#endif /* NIFPI > 0 */
diff --git a/sys/i4b/layer1/ifpi/i4b_ifpi_l1.c b/sys/i4b/layer1/ifpi/i4b_ifpi_l1.c
deleted file mode 100644
index 3d417a35fb95..000000000000
--- a/sys/i4b/layer1/ifpi/i4b_ifpi_l1.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpi_l1.c - AVM Fritz PCI layer 1 handler
- * ---------------------------------------------
- *
- * $Id: i4b_ifpi_l1.c,v 1.4 2000/06/02 16:14:36 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Fri Jun 2 14:54:30 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#include "ifpi.h"
-#include "pci.h"
-
-#if (NIFPI > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-
-#include <i4b/layer1/ifpi/i4b_ifpi_ext.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_mbuf.h>
-#include <i4b/include/i4b_global.h>
-
-/*---------------------------------------------------------------------------*
- *
- * L2 -> L1: PH-DATA-REQUEST
- * =========================
- *
- * parms:
- * unit physical interface unit number
- * m mbuf containing L2 frame to be sent out
- * freeflag MBUF_FREE: free mbuf here after having sent
- * it out
- * MBUF_DONTFREE: mbuf is freed by Layer 2
- * returns:
- * ==0 fail, nothing sent out
- * !=0 ok, frame sent out
- *
- *---------------------------------------------------------------------------*/
-int
-ifpi_ph_data_req(int unit, struct mbuf *m, int freeflag)
-{
- u_char cmd;
- int s;
- struct l1_softc *sc = ifpi_scp[unit];
-
-#ifdef NOTDEF
- NDBGL1(L1_PRIM, "PH-DATA-REQ, unit %d, freeflag=%d", unit, freeflag);
-#endif
-
- if(m == NULL) /* failsafe */
- return (0);
-
- s = SPLI4B();
-
- if(sc->sc_I430state == ST_F3) /* layer 1 not running ? */
- {
- NDBGL1(L1_I_ERR, "still in state F3!");
- ifpi_ph_activate_req(unit);
- }
-
- if(sc->sc_state & ISAC_TX_ACTIVE)
- {
- if(sc->sc_obuf2 == NULL)
- {
- sc->sc_obuf2 = m; /* save mbuf ptr */
-
- if(freeflag)
- sc->sc_freeflag2 = 1; /* IRQ must mfree */
- else
- sc->sc_freeflag2 = 0; /* IRQ must not mfree */
-
- NDBGL1(L1_I_MSG, "using 2nd ISAC TX buffer, state = %s", ifpi_printstate(sc));
-
- if(sc->sc_trace & TRACE_D_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPIUNIT(unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
- splx(s);
- return(1);
- }
-
- NDBGL1(L1_I_ERR, "No Space in TX FIFO, state = %s", ifpi_printstate(sc));
-
- if(freeflag == MBUF_FREE)
- i4b_Dfreembuf(m);
-
- splx(s);
- return (0);
- }
-
- if(sc->sc_trace & TRACE_D_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPIUNIT(unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
-
- sc->sc_state |= ISAC_TX_ACTIVE; /* set transmitter busy flag */
-
- NDBGL1(L1_I_MSG, "ISAC_TX_ACTIVE set");
-
- sc->sc_freeflag = 0; /* IRQ must NOT mfree */
-
- ISAC_WRFIFO(m->m_data, min(m->m_len, ISAC_FIFO_LEN)); /* output to TX fifo */
-
- if(m->m_len > ISAC_FIFO_LEN) /* message > 32 bytes ? */
- {
- sc->sc_obuf = m; /* save mbuf ptr */
- sc->sc_op = m->m_data + ISAC_FIFO_LEN; /* ptr for irq hdl */
- sc->sc_ol = m->m_len - ISAC_FIFO_LEN; /* length for irq hdl */
-
- if(freeflag)
- sc->sc_freeflag = 1; /* IRQ must mfree */
-
- cmd = ISAC_CMDR_XTF;
- }
- else
- {
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
-
- if(freeflag)
- i4b_Dfreembuf(m);
-
- cmd = ISAC_CMDR_XTF | ISAC_CMDR_XME;
- }
-
- ISAC_WRITE(I_CMDR, cmd);
- ISACCMDRWRDELAY();
-
- splx(s);
-
- return(1);
-}
-
-/*---------------------------------------------------------------------------*
- *
- * L2 -> L1: PH-ACTIVATE-REQUEST
- * =============================
- *
- * parms:
- * unit physical interface unit number
- *
- * returns:
- * ==0
- * !=0
- *
- *---------------------------------------------------------------------------*/
-int
-ifpi_ph_activate_req(int unit)
-{
- struct l1_softc *sc = ifpi_scp[unit];
- NDBGL1(L1_PRIM, "PH-ACTIVATE-REQ, unit %d", unit);
- ifpi_next_state(sc, EV_PHAR);
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * command from the upper layers
- *---------------------------------------------------------------------------*/
-int
-ifpi_mph_command_req(int unit, int command, void *parm)
-{
- struct l1_softc *sc = ifpi_scp[unit];
-
- switch(command)
- {
- case CMR_DOPEN: /* daemon running */
- NDBGL1(L1_PRIM, "unit %d, command = CMR_DOPEN", unit);
- sc->sc_enabled = 1;
- break;
-
- case CMR_DCLOSE: /* daemon not running */
- NDBGL1(L1_PRIM, "unit %d, command = CMR_DCLOSE", unit);
- sc->sc_enabled = 0;
- break;
-
- case CMR_SETTRACE:
- NDBGL1(L1_PRIM, "unit %d, command = CMR_SETTRACE, parm = %d", unit, (unsigned int)parm);
- sc->sc_trace = (unsigned int)parm;
- break;
-
- default:
- NDBGL1(L1_ERROR, "ERROR, unknown command = %d, unit = %d, parm = %d", command, unit, (unsigned int)parm);
- break;
- }
-
- return(0);
-}
-
-#endif /* NIFPI > 0 */
diff --git a/sys/i4b/layer1/ifpi/i4b_ifpi_l1fsm.c b/sys/i4b/layer1/ifpi/i4b_ifpi_l1fsm.c
deleted file mode 100644
index 274ab9896906..000000000000
--- a/sys/i4b/layer1/ifpi/i4b_ifpi_l1fsm.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/*
- * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpi_l1fsm.c - AVM Fritz PCI layer 1 I.430 state machine
- * ------------------------------------------------------------
- *
- * $Id: i4b_ifpi_l1fsm.c,v 1.4 2000/05/29 15:41:41 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon May 29 15:23:15 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#include "ifpi.h"
-#include "pci.h"
-
-#if (NIFPI > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_global.h>
-
-#include <i4b/include/i4b_mbuf.h>
-
-#include <i4b/layer1/ifpi/i4b_ifpi_ext.h>
-
-#if DO_I4B_DEBUG
-static char *state_text[N_STATES] = {
- "F3 Deactivated",
- "F4 Awaiting Signal",
- "F5 Identifying Input",
- "F6 Synchronized",
- "F7 Activated",
- "F8 Lost Framing",
- "Illegal State"
-};
-
-static char *event_text[N_EVENTS] = {
- "EV_PHAR PH_ACT_REQ",
- "EV_T3 Timer 3 expired",
- "EV_INFO0 INFO0 received",
- "EV_RSY Level Detected",
- "EV_INFO2 INFO2 received",
- "EV_INFO48 INFO4 received",
- "EV_INFO410 INFO4 received",
- "EV_DR Deactivate Req",
- "EV_PU Power UP",
- "EV_DIS Disconnected",
- "EV_EI Error Ind",
- "Illegal Event"
-};
-#endif
-
-/* Function prototypes */
-
-static void timer3_expired (struct l1_softc *sc);
-static void T3_start (struct l1_softc *sc);
-static void T3_stop (struct l1_softc *sc);
-static void F_T3ex (struct l1_softc *sc);
-static void timer4_expired (struct l1_softc *sc);
-static void T4_start (struct l1_softc *sc);
-static void T4_stop (struct l1_softc *sc);
-static void F_AI8 (struct l1_softc *sc);
-static void F_AI10 (struct l1_softc *sc);
-static void F_I01 (struct l1_softc *sc);
-static void F_I02 (struct l1_softc *sc);
-static void F_I03 (struct l1_softc *sc);
-static void F_I2 (struct l1_softc *sc);
-static void F_ill (struct l1_softc *sc);
-static void F_NULL (struct l1_softc *sc);
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 expire function
- *---------------------------------------------------------------------------*/
-static void
-timer3_expired(struct l1_softc *sc)
-{
- if(sc->sc_I430T3)
- {
- NDBGL1(L1_T_ERR, "state = %s", ifpi_printstate(sc));
- sc->sc_I430T3 = 0;
-
- /* XXX try some recovery here XXX */
-
- ifpi_recover(sc);
-
- sc->sc_init_tries++; /* increment retry count */
-
-/*XXX*/ if(sc->sc_init_tries > 4)
- {
- int s = SPLI4B();
-
- sc->sc_init_tries = 0;
-
- if(sc->sc_obuf2 != NULL)
- {
- i4b_Dfreembuf(sc->sc_obuf2);
- sc->sc_obuf2 = NULL;
- }
- if(sc->sc_obuf != NULL)
- {
- i4b_Dfreembuf(sc->sc_obuf);
- sc->sc_obuf = NULL;
- sc->sc_freeflag = 0;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
- }
-
- splx(s);
-
- i4b_l1_mph_status_ind(L0IFPIUNIT(sc->sc_unit), STI_NOL1ACC, 0, NULL);
- }
-
- ifpi_next_state(sc, EV_T3);
- }
- else
- {
- NDBGL1(L1_T_ERR, "expired without starting it ....");
- }
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 start
- *---------------------------------------------------------------------------*/
-static void
-T3_start(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", ifpi_printstate(sc));
- sc->sc_I430T3 = 1;
- sc->sc_T3_callout = timeout((TIMEOUT_FUNC_T)timer3_expired,(struct l1_softc *)sc, 2*hz);
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 stop
- *---------------------------------------------------------------------------*/
-static void
-T3_stop(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", ifpi_printstate(sc));
-
- sc->sc_init_tries = 0; /* init connect retry count */
-
- if(sc->sc_I430T3)
- {
- sc->sc_I430T3 = 0;
- untimeout((TIMEOUT_FUNC_T)timer3_expired,(struct l1_softc *)sc, sc->sc_T3_callout);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 expiry
- *---------------------------------------------------------------------------*/
-static void
-F_T3ex(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_T3ex executing");
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0IFPIUNIT(sc->sc_unit));
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 expire function
- *---------------------------------------------------------------------------*/
-static void
-timer4_expired(struct l1_softc *sc)
-{
- if(sc->sc_I430T4)
- {
- NDBGL1(L1_T_MSG, "state = %s", ifpi_printstate(sc));
- sc->sc_I430T4 = 0;
- i4b_l1_mph_status_ind(L0IFPIUNIT(sc->sc_unit), STI_PDEACT, 0, NULL);
- }
- else
- {
- NDBGL1(L1_T_ERR, "expired without starting it ....");
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 start
- *---------------------------------------------------------------------------*/
-static void
-T4_start(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", ifpi_printstate(sc));
- sc->sc_I430T4 = 1;
- sc->sc_T4_callout = timeout((TIMEOUT_FUNC_T)timer4_expired,(struct l1_softc *)sc, hz);
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 stop
- *---------------------------------------------------------------------------*/
-static void
-T4_stop(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", ifpi_printstate(sc));
-
- if(sc->sc_I430T4)
- {
- sc->sc_I430T4 = 0;
- untimeout((TIMEOUT_FUNC_T)timer4_expired,(struct l1_softc *)sc, sc->sc_T4_callout);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received AI8
- *---------------------------------------------------------------------------*/
-static void
-F_AI8(struct l1_softc *sc)
-{
- T4_stop(sc);
-
- NDBGL1(L1_F_MSG, "FSM function F_AI8 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_activate_ind(L0IFPIUNIT(sc->sc_unit));
-
- T3_stop(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO4_8;
-
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received AI10
- *---------------------------------------------------------------------------*/
-static void
-F_AI10(struct l1_softc *sc)
-{
- T4_stop(sc);
-
- NDBGL1(L1_F_MSG, "FSM function F_AI10 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_activate_ind(L0IFPIUNIT(sc->sc_unit));
-
- T3_stop(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO4_10;
-
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in states F3 .. F5
- *---------------------------------------------------------------------------*/
-static void
-F_I01(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I01 executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in state F6
- *---------------------------------------------------------------------------*/
-static void
-F_I02(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I02 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0IFPIUNIT(sc->sc_unit));
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in state F7 or F8
- *---------------------------------------------------------------------------*/
-static void
-F_I03(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I03 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0IFPIUNIT(sc->sc_unit));
-
- T4_start(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: activate request
- *---------------------------------------------------------------------------*/
-static void
-F_AR(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_AR executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO1_8;
-
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_TE;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-
- ifpi_isac_l1_cmd(sc, CMD_AR8);
-
- T3_start(sc);
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO2
- *---------------------------------------------------------------------------*/
-static void
-F_I2(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I2 executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO2;
-
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-
-}
-
-/*---------------------------------------------------------------------------*
- * illegal state default action
- *---------------------------------------------------------------------------*/
-static void
-F_ill(struct l1_softc *sc)
-{
- NDBGL1(L1_F_ERR, "FSM function F_ill executing");
-}
-
-/*---------------------------------------------------------------------------*
- * No action
- *---------------------------------------------------------------------------*/
-static void
-F_NULL(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_NULL executing");
-}
-
-
-/*---------------------------------------------------------------------------*
- * layer 1 state transition table
- *---------------------------------------------------------------------------*/
-struct ifpi_state_tab {
- void (*func) (struct l1_softc *sc); /* function to execute */
- int newstate; /* next state */
-} ifpi_state_tab[N_EVENTS][N_STATES] = {
-
-/* STATE: F3 F4 F5 F6 F7 F8 ILLEGAL STATE */
-/* -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
-/* EV_PHAR x*/ {{F_AR, ST_F4}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_ill, ST_ILL}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_T3 x*/ {{F_NULL, ST_F3}, {F_T3ex, ST_F3}, {F_T3ex, ST_F3}, {F_T3ex, ST_F3}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_INFO0 */ {{F_I01, ST_F3}, {F_I01, ST_F4}, {F_I01, ST_F5}, {F_I02, ST_F3}, {F_I03, ST_F3}, {F_I03, ST_F3}, {F_ill, ST_ILL}},
-/* EV_RSY x*/ {{F_NULL, ST_F3}, {F_NULL, ST_F5}, {F_NULL, ST_F5}, {F_NULL, ST_F8}, {F_NULL, ST_F8}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_INFO2 */ {{F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_ill, ST_ILL}},
-/* EV_INFO48*/ {{F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_NULL, ST_F7}, {F_AI8, ST_F7}, {F_ill, ST_ILL}},
-/* EV_INFO41*/ {{F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_NULL, ST_F7}, {F_AI10, ST_F7}, {F_ill, ST_ILL}},
-/* EV_DR */ {{F_NULL, ST_F3}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_PU */ {{F_NULL, ST_F3}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_DIS */ {{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}},
-/* EV_EI */ {{F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_ill, ST_ILL}},
-/* EV_ILL */ {{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}}
-};
-
-/*---------------------------------------------------------------------------*
- * event handler
- *---------------------------------------------------------------------------*/
-void
-ifpi_next_state(struct l1_softc *sc, int event)
-{
- int currstate, newstate;
-
- if(event >= N_EVENTS)
- panic("i4b_l1fsm.c: event >= N_EVENTS\n");
-
- currstate = sc->sc_I430state;
-
- if(currstate >= N_STATES)
- panic("i4b_l1fsm.c: currstate >= N_STATES\n");
-
- newstate = ifpi_state_tab[event][currstate].newstate;
-
- if(newstate >= N_STATES)
- panic("i4b_l1fsm.c: newstate >= N_STATES\n");
-
- NDBGL1(L1_F_MSG, "FSM event [%s]: [%s => %s]", event_text[event],
- state_text[currstate],
- state_text[newstate]);
-
- (*ifpi_state_tab[event][currstate].func)(sc);
-
- if(newstate == ST_ILL)
- {
- newstate = ST_F3;
- NDBGL1(L1_F_ERR, "FSM Illegal State ERROR, oldstate = %s, newstate = %s, event = %s!",
- state_text[currstate],
- state_text[newstate],
- event_text[event]);
- }
-
- sc->sc_I430state = newstate;
-}
-
-#if DO_I4B_DEBUG
-/*---------------------------------------------------------------------------*
- * return pointer to current state description
- *---------------------------------------------------------------------------*/
-char *
-ifpi_printstate(struct l1_softc *sc)
-{
- return((char *) state_text[sc->sc_I430state]);
-}
-#endif
-
-#endif /* NIFPI > 0 */
diff --git a/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c b/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c
deleted file mode 100644
index d14deb4c0c0f..000000000000
--- a/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c
+++ /dev/null
@@ -1,1498 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Gary Jennejohn. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpi_pci.c: AVM Fritz!Card PCI hardware driver
- * --------------------------------------------------
- *
- * $Id: i4b_ifpi_pci.c,v 1.4 2000/06/02 11:58:56 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Fri Jan 12 17:01:26 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "ifpi.h"
-#include "opt_i4b.h"
-#include "pci.h"
-
-#if (NIFPI > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-
-#include <machine/bus.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#include <pci/pcireg.h>
-#include <pci/pcivar.h>
-
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_mbuf.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#include <i4b/layer1/ifpi/i4b_ifpi_ext.h>
-
-#define PCI_AVMA1_VID 0x1244
-#define PCI_AVMA1_DID 0x0a00
-
-/* prototypes */
-static void avma1pp_disable(device_t);
-
-static void avma1pp_intr(void *);
-static void hscx_write_reg(int, u_int, u_int, struct l1_softc *);
-static u_char hscx_read_reg(int, u_int, struct l1_softc *);
-static u_int hscx_read_reg_int(int, u_int, struct l1_softc *);
-static void hscx_read_fifo(int, void *, size_t, struct l1_softc *);
-static void hscx_write_fifo(int, void *, size_t, struct l1_softc *);
-static void avma1pp_hscx_int_handler(struct l1_softc *);
-static void avma1pp_hscx_intr(int, u_int, struct l1_softc *);
-static void avma1pp_init_linktab(struct l1_softc *);
-static void avma1pp_bchannel_setup(int, int, int, int);
-static void avma1pp_bchannel_start(int, int);
-static void avma1pp_hscx_init(struct l1_softc *, int, int);
-static void avma1pp_bchannel_stat(int, int, bchan_statistics_t *);
-static void avma1pp_set_linktab(int, int, drvr_link_t *);
-static isdn_link_t * avma1pp_ret_linktab(int, int);
-static int avma1pp_pci_probe(device_t);
-static int avma1pp_hscx_fifo(l1_bchan_state_t *, struct l1_softc *);
-int avma1pp_attach_avma1pp(device_t);
-static void ifpi_isac_intr(struct l1_softc *sc);
-
-static device_method_t avma1pp_pci_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, avma1pp_pci_probe),
- DEVMETHOD(device_attach, avma1pp_attach_avma1pp),
- DEVMETHOD(device_shutdown, avma1pp_disable),
-
- /* bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
- DEVMETHOD(bus_driver_added, bus_generic_driver_added),
-
- { 0, 0 }
-};
-
-#if 0 /* use what's in l1_softc */
-/* a minimal softc for the Fritz!Card PCI */
-struct avma1pp_softc
-{
- bus_space_handle_t avma1pp_bhandle;
- bus_space_tag_t avma1pp_btag;
- void *avma1pp_intrhand;
- struct resource *avma1pp_irq;
- struct resource *avma1pp_res;
- /* pointer to ifpi_sc */
- struct l1_softc *avma1pp_isc;
-};
-#endif
-
-static driver_t avma1pp_pci_driver = {
- "ifpi",
- avma1pp_pci_methods,
- sizeof(struct l1_softc)
-};
-
-static devclass_t avma1pp_pci_devclass;
-
-DRIVER_MODULE(avma1pp, pci, avma1pp_pci_driver, avma1pp_pci_devclass, 0, 0);
-
-/* jump table for multiplex routines */
-
-struct i4b_l1mux_func avma1pp_l1mux_func = {
- avma1pp_ret_linktab,
- avma1pp_set_linktab,
- ifpi_mph_command_req,
- ifpi_ph_data_req,
- ifpi_ph_activate_req,
-};
-
-struct l1_softc *ifpi_scp[IFPI_MAXUNIT];
-
-/*---------------------------------------------------------------------------*
- * AVM PCI Fritz!Card special registers
- *---------------------------------------------------------------------------*/
-
-/*
- * register offsets from i/o base
- */
-#define STAT0_OFFSET 0x02
-#define STAT1_OFFSET 0x03
-#define ADDR_REG_OFFSET 0x04
-/*#define MODREG_OFFSET 0x06
-#define VERREG_OFFSET 0x07*/
-
-/* these 2 are used to select an ISAC register set */
-#define ISAC_LO_REG_OFFSET 0x04
-#define ISAC_HI_REG_OFFSET 0x06
-
-/* offset higher than this goes to the HI register set */
-#define MAX_LO_REG_OFFSET 0x2f
-
-/* mask for the offset */
-#define ISAC_REGSET_MASK 0x0f
-
-/* the offset from the base to the ISAC registers */
-#define ISAC_REG_OFFSET 0x10
-
-/* the offset from the base to the ISAC FIFO */
-#define ISAC_FIFO 0x02
-
-/* not really the HSCX, but sort of */
-#define HSCX_FIFO 0x00
-#define HSCX_STAT 0x04
-
-/*
- * AVM PCI Status Latch 0 read only bits
- */
-#define ASL_IRQ_ISAC 0x01 /* ISAC interrupt, active low */
-#define ASL_IRQ_HSCX 0x02 /* HSX interrupt, active low */
-#define ASL_IRQ_TIMER 0x04 /* Timer interrupt, active low */
-#define ASL_IRQ_BCHAN ASL_IRQ_HSCX
-/* actually active LOW */
-#define ASL_IRQ_Pending (ASL_IRQ_ISAC | ASL_IRQ_HSCX | ASL_IRQ_TIMER)
-
-/*
- * AVM Status Latch 0 write only bits
- */
-#define ASL_RESET_ALL 0x01 /* reset siemens IC's, active 1 */
-#define ASL_TIMERDISABLE 0x02 /* active high */
-#define ASL_TIMERRESET 0x04 /* active high */
-#define ASL_ENABLE_INT 0x08 /* active high */
-#define ASL_TESTBIT 0x10 /* active high */
-
-/*
- * AVM Status Latch 1 write only bits
- */
-#define ASL1_INTSEL 0x0f /* active high */
-#define ASL1_ENABLE_IOM 0x80 /* active high */
-
-/*
- * "HSCX" mode bits
- */
-#define HSCX_MODE_ITF_FLG 0x01
-#define HSCX_MODE_TRANS 0x02
-#define HSCX_MODE_CCR_7 0x04
-#define HSCX_MODE_CCR_16 0x08
-#define HSCX_MODE_TESTLOOP 0x80
-
-/*
- * "HSCX" status bits
- */
-#define HSCX_STAT_RME 0x01
-#define HSCX_STAT_RDO 0x10
-#define HSCX_STAT_CRCVFRRAB 0x0E
-#define HSCX_STAT_CRCVFR 0x06
-#define HSCX_STAT_RML_MASK 0x3f00
-
-/*
- * "HSCX" interrupt bits
- */
-#define HSCX_INT_XPR 0x80
-#define HSCX_INT_XDU 0x40
-#define HSCX_INT_RPR 0x20
-#define HSCX_INT_MASK 0xE0
-
-/*
- * "HSCX" command bits
- */
-#define HSCX_CMD_XRS 0x80
-#define HSCX_CMD_XME 0x01
-#define HSCX_CMD_RRS 0x20
-#define HSCX_CMD_XML_MASK 0x3f00
-
-/*
- * Commands and parameters are sent to the "HSCX" as a long, but the
- * fields are handled as bytes.
- *
- * The long contains:
- * (prot << 16)|(txl << 8)|cmd
- *
- * where:
- * prot = protocol to use
- * txl = transmit length
- * cmd = the command to be executed
- *
- * The fields are defined as u_char in struct l1_softc.
- *
- * Macro to coalesce the byte fields into a u_int
- */
-#define AVMA1PPSETCMDLONG(f) (f) = ((sc->avma1pp_cmd) | (sc->avma1pp_txl << 8) \
- | (sc->avma1pp_prot << 16))
-
-/*
- * to prevent deactivating the "HSCX" when both channels are active we
- * define an HSCX_ACTIVE flag which is or'd into the channel's state
- * flag in avma1pp_bchannel_setup upon active and cleared upon deactivation.
- * It is set high to allow room for new flags.
- */
-#define HSCX_AVMA1PP_ACTIVE 0x1000
-
-/*---------------------------------------------------------------------------*
- * AVM read fifo routines
- *---------------------------------------------------------------------------*/
-
-static void
-avma1pp_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, ISAC_FIFO);
- bus_space_read_multi_1(btag, bhandle, ISAC_REG_OFFSET, buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- hscx_read_fifo(0, buf, size, sc);
- break;
- case ISIC_WHAT_HSCXB:
- hscx_read_fifo(1, buf, size, sc);
- break;
- }
-}
-
-static void
-hscx_read_fifo(int chan, void *buf, size_t len, struct l1_softc *sc)
-{
- u_int32_t *ip;
- size_t cnt;
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- bus_space_write_4(btag, bhandle, ADDR_REG_OFFSET, chan);
- ip = (u_int32_t *)buf;
- cnt = 0;
- /* what if len isn't a multiple of sizeof(int) and buf is */
- /* too small ???? */
- while (cnt < len)
- {
- *ip++ = bus_space_read_4(btag, bhandle, ISAC_REG_OFFSET);
- cnt += 4;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * AVM write fifo routines
- *---------------------------------------------------------------------------*/
-static void
-avma1pp_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, ISAC_FIFO);
- bus_space_write_multi_1(btag, bhandle, ISAC_REG_OFFSET, (u_int8_t*)buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- hscx_write_fifo(0, buf, size, sc);
- break;
- case ISIC_WHAT_HSCXB:
- hscx_write_fifo(1, buf, size, sc);
- break;
- }
-}
-
-static void
-hscx_write_fifo(int chan, void *buf, size_t len, struct l1_softc *sc)
-{
- u_int32_t *ip;
- size_t cnt;
- l1_bchan_state_t *Bchan = &sc->sc_chan[chan];
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
-
- sc->avma1pp_cmd &= ~HSCX_CMD_XME;
- sc->avma1pp_txl = 0;
- if (Bchan->out_mbuf_cur == NULL)
- {
- if (Bchan->bprot != BPROT_NONE)
- sc->avma1pp_cmd |= HSCX_CMD_XME;
- }
- if (len != sc->sc_bfifolen)
- sc->avma1pp_txl = len;
-
- cnt = 0; /* borrow cnt */
- AVMA1PPSETCMDLONG(cnt);
- hscx_write_reg(chan, HSCX_STAT, cnt, sc);
-
- ip = (u_int32_t *)buf;
- cnt = 0;
- while (cnt < len)
- {
- bus_space_write_4(btag, bhandle, ISAC_REG_OFFSET, *ip);
- ip++;
- cnt += 4;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * AVM write register routines
- *---------------------------------------------------------------------------*/
-
-static void
-avma1pp_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- u_char reg_bank;
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- reg_bank = (offs > MAX_LO_REG_OFFSET) ? ISAC_HI_REG_OFFSET:ISAC_LO_REG_OFFSET;
-#ifdef AVMA1PCI_DEBUG
- printf("write_reg bank %d off %ld.. ", (int)reg_bank, (long)offs);
-#endif
- /* set the register bank */
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, reg_bank);
- bus_space_write_1(btag, bhandle, ISAC_REG_OFFSET + (offs & ISAC_REGSET_MASK), data);
- break;
- case ISIC_WHAT_HSCXA:
- hscx_write_reg(0, offs, data, sc);
- break;
- case ISIC_WHAT_HSCXB:
- hscx_write_reg(1, offs, data, sc);
- break;
- }
-}
-
-static void
-hscx_write_reg(int chan, u_int off, u_int val, struct l1_softc *sc)
-{
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- /* point at the correct channel */
- bus_space_write_4(btag, bhandle, ADDR_REG_OFFSET, chan);
- bus_space_write_4(btag, bhandle, ISAC_REG_OFFSET + off, val);
-}
-
-/*---------------------------------------------------------------------------*
- * AVM read register routines
- *---------------------------------------------------------------------------*/
-static u_int8_t
-avma1pp_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- u_char reg_bank;
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- reg_bank = (offs > MAX_LO_REG_OFFSET) ? ISAC_HI_REG_OFFSET:ISAC_LO_REG_OFFSET;
-#ifdef AVMA1PCI_DEBUG
- printf("read_reg bank %d off %ld.. ", (int)reg_bank, (long)offs);
-#endif
- /* set the register bank */
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, reg_bank);
- return(bus_space_read_1(btag, bhandle, ISAC_REG_OFFSET +
- (offs & ISAC_REGSET_MASK)));
- case ISIC_WHAT_HSCXA:
- return hscx_read_reg(0, offs, sc);
- case ISIC_WHAT_HSCXB:
- return hscx_read_reg(1, offs, sc);
- }
- return 0;
-}
-
-static u_char
-hscx_read_reg(int chan, u_int off, struct l1_softc *sc)
-{
- return(hscx_read_reg_int(chan, off, sc) & 0xff);
-}
-
-/*
- * need to be able to return an int because the RBCH is in the 2nd
- * byte.
- */
-static u_int
-hscx_read_reg_int(int chan, u_int off, struct l1_softc *sc)
-{
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- /* point at the correct channel */
- bus_space_write_4(btag, bhandle, ADDR_REG_OFFSET, chan);
- return(bus_space_read_4(btag, bhandle, ISAC_REG_OFFSET + off));
-}
-
-/*---------------------------------------------------------------------------*
- * avma1pp_probe - probe for a card
- *---------------------------------------------------------------------------*/
-static int
-avma1pp_pci_probe(dev)
- device_t dev;
-{
- u_int16_t did, vid;
-
- vid = pci_get_vendor(dev);
- did = pci_get_device(dev);
-
- if ((vid == PCI_AVMA1_VID) && (did == PCI_AVMA1_DID)) {
- device_set_desc(dev, "AVM Fritz!Card PCI");
- return(0);
- }
-
- return(ENXIO);
-}
-
-/*---------------------------------------------------------------------------*
- * avma1pp_attach_avma1pp - attach Fritz!Card PCI
- *---------------------------------------------------------------------------*/
-int
-avma1pp_attach_avma1pp(device_t dev)
-{
- struct l1_softc *sc;
- u_int v;
- int unit, error = 0;
- int s;
- u_int16_t did, vid;
- void *ih = 0;
- bus_space_handle_t bhandle;
- bus_space_tag_t btag;
- l1_bchan_state_t *chan;
-
- s = splimp();
-
- vid = pci_get_vendor(dev);
- did = pci_get_device(dev);
- sc = device_get_softc(dev);
- unit = device_get_unit(dev);
- bzero(sc, sizeof(struct l1_softc));
-
- /* probably not really required */
- if(unit > IFPI_MAXUNIT) {
- printf("avma1pp%d: Error, unit > IFPI_MAXUNIT!\n", unit);
- splx(s);
- return(ENXIO);
- }
-
- if ((vid != PCI_AVMA1_VID) && (did != PCI_AVMA1_DID)) {
- printf("avma1pp%d: unknown device!?\n", unit);
- goto fail;
- }
-
- ifpi_scp[unit] = sc;
-
- sc->sc_resources.io_rid[0] = PCIR_MAPS+4;
- sc->sc_resources.io_base[0] = bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0, ~0, 1, RF_ACTIVE);
-
- if (sc->sc_resources.io_base[0] == NULL) {
- printf("avma1pp%d: couldn't map IO port\n", unit);
- error = ENXIO;
- goto fail;
- }
-
- bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- /* Allocate interrupt */
- sc->sc_resources.irq_rid = 0;
- sc->sc_resources.irq = bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);
-
- if (sc->sc_resources.irq == NULL) {
- bus_release_resource(dev, SYS_RES_IOPORT, PCIR_MAPS+4, sc->sc_resources.io_base[0]);
- printf("avma1pp%d: couldn't map interrupt\n", unit);
- error = ENXIO;
- goto fail;
- }
-
- error = bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET, avma1pp_intr, sc, &ih);
-
- if (error) {
- bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_resources.irq);
- bus_release_resource(dev, SYS_RES_IOPORT, PCIR_MAPS+4, sc->sc_resources.io_base[0]);
- printf("avma1pp%d: couldn't set up irq\n", unit);
- goto fail;
- }
-
- sc->sc_unit = unit;
-
- /* end of new-bus stuff */
-
- ISAC_BASE = (caddr_t)ISIC_WHAT_ISAC;
-
- HSCX_A_BASE = (caddr_t)ISIC_WHAT_HSCXA;
- HSCX_B_BASE = (caddr_t)ISIC_WHAT_HSCXB;
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = avma1pp_read_reg;
- sc->writereg = avma1pp_write_reg;
-
- sc->readfifo = avma1pp_read_fifo;
- sc->writefifo = avma1pp_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_AVMA1PCI;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- /* set up some other miscellaneous things */
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /* reset the card */
- /* the Linux driver does this to clear any pending ISAC interrupts */
- v = 0;
- v = ISAC_READ(I_STAR);
-#ifdef AVMA1PCI_DEBUG
- printf("avma1pp_attach: I_STAR %x...", v);
-#endif
- v = ISAC_READ(I_MODE);
-#ifdef AVMA1PCI_DEBUG
- printf("avma1pp_attach: I_MODE %x...", v);
-#endif
- v = ISAC_READ(I_ADF2);
-#ifdef AVMA1PCI_DEBUG
- printf("avma1pp_attach: I_ADF2 %x...", v);
-#endif
- v = ISAC_READ(I_ISTA);
-#ifdef AVMA1PCI_DEBUG
- printf("avma1pp_attach: I_ISTA %x...", v);
-#endif
- if (v & ISAC_ISTA_EXI)
- {
- v = ISAC_READ(I_EXIR);
-#ifdef AVMA1PCI_DEBUG
- printf("avma1pp_attach: I_EXIR %x...", v);
-#endif
- }
- v = ISAC_READ(I_CIRR);
-#ifdef AVMA1PCI_DEBUG
- printf("avma1pp_attach: I_CIRR %x...", v);
-#endif
- ISAC_WRITE(I_MASK, 0xff);
- /* the Linux driver does this to clear any pending HSCX interrupts */
- v = hscx_read_reg_int(0, HSCX_STAT, sc);
-#ifdef AVMA1PCI_DEBUG
- printf("avma1pp_attach: 0 HSCX_STAT %x...", v);
-#endif
- v = hscx_read_reg_int(1, HSCX_STAT, sc);
-#ifdef AVMA1PCI_DEBUG
- printf("avma1pp_attach: 1 HSCX_STAT %x\n", v);
-#endif
-
- bus_space_write_1(btag, bhandle, STAT0_OFFSET, ASL_RESET_ALL|ASL_TIMERDISABLE);
- DELAY(SEC_DELAY/100); /* 10 ms */
- bus_space_write_1(btag, bhandle, STAT0_OFFSET, ASL_TIMERRESET|ASL_ENABLE_INT|ASL_TIMERDISABLE);
- DELAY(SEC_DELAY/100); /* 10 ms */
-#ifdef AVMA1PCI_DEBUG
- bus_space_write_1(btag, bhandle, STAT1_OFFSET, ASL1_ENABLE_IOM|sc->sc_irq);
- DELAY(SEC_DELAY/100); /* 10 ms */
- v = bus_space_read_1(btag, bhandle, STAT1_OFFSET);
- printf("after reset: S1 %#x\n", v);
-
- v = bus_space_read_4(btag, bhandle, 0);
- printf("avma1pp_attach_avma1pp: v %#x\n", v);
-#endif
-
- /* from here to the end would normally be done in isic_pciattach */
-
- printf("ifpi%d: ISAC %s (IOM-%c)\n", unit,
- "2085 Version A1/A2 or 2086/2186 Version 1.1",
- sc->sc_bustyp == BUS_TYPE_IOM1 ? '1' : '2');
-
- /* init the ISAC */
- ifpi_isac_init(sc);
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- /* Init the channel mutexes */
- chan = &sc->sc_chan[HSCX_CH_A];
- mtx_init(&chan->rx_queue.ifq_mtx, "i4b_avma1pp_rx", MTX_DEF);
- mtx_init(&chan->tx_queue.ifq_mtx, "i4b_avma1pp_tx", MTX_DEF);
- chan = &sc->sc_chan[HSCX_CH_B];
- mtx_init(&chan->rx_queue.ifq_mtx, "i4b_avma1pp_rx", MTX_DEF);
- mtx_init(&chan->tx_queue.ifq_mtx, "i4b_avma1pp_tx", MTX_DEF);
-#endif
-
- /* init the "HSCX" */
- avma1pp_bchannel_setup(sc->sc_unit, HSCX_CH_A, BPROT_NONE, 0);
-
- avma1pp_bchannel_setup(sc->sc_unit, HSCX_CH_B, BPROT_NONE, 0);
-
- /* can't use the normal B-Channel stuff */
- avma1pp_init_linktab(sc);
-
- /* set trace level */
-
- sc->sc_trace = TRACE_OFF;
-
- sc->sc_state = ISAC_IDLE;
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
-
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
- sc->sc_freeflag = 0;
-
- sc->sc_obuf2 = NULL;
- sc->sc_freeflag2 = 0;
-
-#if defined(__FreeBSD__) && __FreeBSD__ >=3
- callout_handle_init(&sc->sc_T3_callout);
- callout_handle_init(&sc->sc_T4_callout);
-#endif
-
- /* init higher protocol layers */
-
- i4b_l1_mph_status_ind(L0IFPIUNIT(sc->sc_unit), STI_ATTACH, sc->sc_cardtyp, &avma1pp_l1mux_func);
-
- fail:
- splx(s);
- return(error);
-}
-
-/*
- * this is the real interrupt routine
- */
-static void
-avma1pp_hscx_intr(int h_chan, u_int stat, struct l1_softc *sc)
-{
- register l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- int activity = -1;
- u_int param = 0;
-
- NDBGL1(L1_H_IRQ, "%#x", stat);
-
- if((stat & HSCX_INT_XDU) && (chan->bprot != BPROT_NONE))/* xmit data underrun */
- {
- chan->stat_XDU++;
- NDBGL1(L1_H_XFRERR, "xmit data underrun");
- /* abort the transmission */
- sc->avma1pp_txl = 0;
- sc->avma1pp_cmd |= HSCX_CMD_XRS;
- AVMA1PPSETCMDLONG(param);
- hscx_write_reg(h_chan, HSCX_STAT, param, sc);
- sc->avma1pp_cmd &= ~HSCX_CMD_XRS;
- AVMA1PPSETCMDLONG(param);
- hscx_write_reg(h_chan, HSCX_STAT, param, sc);
-
- if (chan->out_mbuf_head != NULL) /* don't continue to transmit this buffer */
- {
- i4b_Bfreembuf(chan->out_mbuf_head);
- chan->out_mbuf_cur = chan->out_mbuf_head = NULL;
- }
- }
-
- /*
- * The following is based on examination of the Linux driver.
- *
- * The logic here is different than with a "real" HSCX; all kinds
- * of information (interrupt/status bits) are in stat.
- * HSCX_INT_RPR indicates a receive interrupt
- * HSCX_STAT_RDO indicates an overrun condition, abort -
- * otherwise read the bytes ((stat & HSCX_STZT_RML_MASK) >> 8)
- * HSCX_STAT_RME indicates end-of-frame and apparently any
- * CRC/framing errors are only reported in this state.
- * if ((stat & HSCX_STAT_CRCVFRRAB) != HSCX_STAT_CRCVFR)
- * CRC/framing error
- */
-
- if(stat & HSCX_INT_RPR)
- {
- register int fifo_data_len;
- int error = 0;
- /* always have to read the FIFO, so use a scratch buffer */
- u_char scrbuf[HSCX_FIFO_LEN];
-
- if(stat & HSCX_STAT_RDO)
- {
- chan->stat_RDO++;
- NDBGL1(L1_H_XFRERR, "receive data overflow");
- error++;
- }
-
- /*
- * check whether we're receiving data for an inactive B-channel
- * and discard it. This appears to happen for telephony when
- * both B-channels are active and one is deactivated. Since
- * it is not really possible to deactivate the channel in that
- * case (the ASIC seems to deactivate _both_ channels), the
- * "deactivated" channel keeps receiving data which can lead
- * to exhaustion of mbufs and a kernel panic.
- *
- * This is a hack, but it's the only solution I can think of
- * without having the documentation for the ASIC.
- * GJ - 28 Nov 1999
- */
- if (chan->state == HSCX_IDLE)
- {
- NDBGL1(L1_H_XFRERR, "toss data from %d", h_chan);
- error++;
- }
-
- fifo_data_len = ((stat & HSCX_STAT_RML_MASK) >> 8);
-
- if(fifo_data_len == 0)
- fifo_data_len = sc->sc_bfifolen;
-
- /* ALWAYS read data from HSCX fifo */
-
- HSCX_RDFIFO(h_chan, scrbuf, fifo_data_len);
- chan->rxcount += fifo_data_len;
-
- /* all error conditions checked, now decide and take action */
-
- if(error == 0)
- {
- if(chan->in_mbuf == NULL)
- {
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 avma1pp_hscx_intr: RME, cannot allocate mbuf!\n");
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- }
-
- if((chan->in_len + fifo_data_len) <= BCH_MAX_DATALEN)
- {
- /* OK to copy the data */
- bcopy(scrbuf, chan->in_cbptr, fifo_data_len);
- chan->in_cbptr += fifo_data_len;
- chan->in_len += fifo_data_len;
-
- /* setup mbuf data length */
-
- chan->in_mbuf->m_len = chan->in_len;
- chan->in_mbuf->m_pkthdr.len = chan->in_len;
-
- if(sc->sc_trace & TRACE_B_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
- }
-
- if (stat & HSCX_STAT_RME)
- {
- if((stat & HSCX_STAT_CRCVFRRAB) == HSCX_STAT_CRCVFR)
- {
- (*chan->isic_drvr_linktab->bch_rx_data_ready)(chan->isic_drvr_linktab->unit);
- activity = ACT_RX;
-
- /* mark buffer ptr as unused */
-
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- else
- {
- chan->stat_CRC++;
- NDBGL1(L1_H_XFRERR, "CRC/RAB");
- if (chan->in_mbuf != NULL)
- {
- i4b_Bfreembuf(chan->in_mbuf);
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- }
- }
- } /* END enough space in mbuf */
- else
- {
- if(chan->bprot == BPROT_NONE)
- {
- /* setup mbuf data length */
-
- chan->in_mbuf->m_len = chan->in_len;
- chan->in_mbuf->m_pkthdr.len = chan->in_len;
-
- if(sc->sc_trace & TRACE_B_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
- }
-
- if(!(i4b_l1_bchan_tel_silence(chan->in_mbuf->m_data, chan->in_mbuf->m_len)))
- activity = ACT_RX;
-
- /* move rx'd data to rx queue */
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- (void) IF_HANDOFF(&chan->rx_queue, chan->in_mbuf, NULL);
-#else
- if(!(IF_QFULL(&chan->rx_queue)))
- {
- IF_ENQUEUE(&chan->rx_queue, chan->in_mbuf);
- }
- else
- {
- i4b_Bfreembuf(chan->in_mbuf);
- }
-#endif
- /* signal upper layer that data are available */
- (*chan->isic_drvr_linktab->bch_rx_data_ready)(chan->isic_drvr_linktab->unit);
-
- /* alloc new buffer */
-
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 avma1pp_hscx_intr: RPF, cannot allocate new mbuf!\n");
-
- /* setup new data ptr */
-
- chan->in_cbptr = chan->in_mbuf->m_data;
-
- /* OK to copy the data */
- bcopy(scrbuf, chan->in_cbptr, fifo_data_len);
-
- chan->in_cbptr += fifo_data_len;
- chan->in_len = fifo_data_len;
-
- chan->rxcount += fifo_data_len;
- }
- else
- {
- NDBGL1(L1_H_XFRERR, "RAWHDLC rx buffer overflow in RPF, in_len=%d", chan->in_len);
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- }
- }
- } /* if(error == 0) */
- else
- {
- /* land here for RDO */
- if (chan->in_mbuf != NULL)
- {
- i4b_Bfreembuf(chan->in_mbuf);
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- sc->avma1pp_txl = 0;
- sc->avma1pp_cmd |= HSCX_CMD_RRS;
- AVMA1PPSETCMDLONG(param);
- hscx_write_reg(h_chan, HSCX_STAT, param, sc);
- sc->avma1pp_cmd &= ~HSCX_CMD_RRS;
- AVMA1PPSETCMDLONG(param);
- hscx_write_reg(h_chan, HSCX_STAT, param, sc);
- }
- }
-
-
- /* transmit fifo empty, new data can be written to fifo */
-
- if(stat & HSCX_INT_XPR)
- {
- /*
- * for a description what is going on here, please have
- * a look at isic_bchannel_start() in i4b_bchan.c !
- */
-
- NDBGL1(L1_H_IRQ, "unit %d, chan %d - XPR, Tx Fifo Empty!", sc->sc_unit, h_chan);
-
- if(chan->out_mbuf_cur == NULL) /* last frame is transmitted */
- {
- IF_DEQUEUE(&chan->tx_queue, chan->out_mbuf_head);
-
- if(chan->out_mbuf_head == NULL)
- {
- chan->state &= ~HSCX_TX_ACTIVE;
- (*chan->isic_drvr_linktab->bch_tx_queue_empty)(chan->isic_drvr_linktab->unit);
- }
- else
- {
- chan->state |= HSCX_TX_ACTIVE;
- chan->out_mbuf_cur = chan->out_mbuf_head;
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
-
- if(chan->bprot == BPROT_NONE)
- {
- if(!(i4b_l1_bchan_tel_silence(chan->out_mbuf_cur->m_data, chan->out_mbuf_cur->m_len)))
- activity = ACT_TX;
- }
- else
- {
- activity = ACT_TX;
- }
- }
- }
-
- avma1pp_hscx_fifo(chan, sc);
- }
-
- /* call timeout handling routine */
-
- if(activity == ACT_RX || activity == ACT_TX)
- (*chan->isic_drvr_linktab->bch_activity)(chan->isic_drvr_linktab->unit, activity);
-}
-
-/*
- * this is the main routine which checks each channel and then calls
- * the real interrupt routine as appropriate
- */
-static void
-avma1pp_hscx_int_handler(struct l1_softc *sc)
-{
- u_int stat;
-
- /* has to be a u_int because the byte count is in the 2nd byte */
- stat = hscx_read_reg_int(0, HSCX_STAT, sc);
- if (stat & HSCX_INT_MASK)
- avma1pp_hscx_intr(0, stat, sc);
- stat = hscx_read_reg_int(1, HSCX_STAT, sc);
- if (stat & HSCX_INT_MASK)
- avma1pp_hscx_intr(1, stat, sc);
-}
-
-static void
-avma1pp_disable(device_t dev)
-{
- struct l1_softc *sc = device_get_softc(dev);
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- bus_space_write_1(btag, bhandle, STAT0_OFFSET, ASL_RESET_ALL|ASL_TIMERDISABLE);
-}
-
-static void
-avma1pp_intr(void *xsc)
-{
- u_char stat;
- struct l1_softc *sc;
- bus_space_handle_t bhandle;
- bus_space_tag_t btag;
-
- sc = xsc;
- bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- stat = bus_space_read_1(btag, bhandle, STAT0_OFFSET);
- NDBGL1(L1_H_IRQ, "stat %x", stat);
- /* was there an interrupt from this card ? */
- if ((stat & ASL_IRQ_Pending) == ASL_IRQ_Pending)
- return; /* no */
- /* interrupts are low active */
- if (!(stat & ASL_IRQ_TIMER))
- NDBGL1(L1_H_IRQ, "timer interrupt ???");
- if (!(stat & ASL_IRQ_HSCX))
- {
- NDBGL1(L1_H_IRQ, "HSCX");
- avma1pp_hscx_int_handler(sc);
- }
- if (!(stat & ASL_IRQ_ISAC))
- {
- NDBGL1(L1_H_IRQ, "ISAC");
- ifpi_isac_intr(sc);
- }
-}
-
-static void
-avma1pp_hscx_init(struct l1_softc *sc, int h_chan, int activate)
-{
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- u_int param = 0;
-
- NDBGL1(L1_BCHAN, "unit=%d, channel=%d, %s",
- sc->sc_unit, h_chan, activate ? "activate" : "deactivate");
-
- if (activate == 0)
- {
- /* only deactivate if both channels are idle */
- if (sc->sc_chan[HSCX_CH_A].state != HSCX_IDLE ||
- sc->sc_chan[HSCX_CH_B].state != HSCX_IDLE)
- {
- return;
- }
- sc->avma1pp_cmd = HSCX_CMD_XRS|HSCX_CMD_RRS;
- sc->avma1pp_prot = HSCX_MODE_TRANS;
- AVMA1PPSETCMDLONG(param);
- hscx_write_reg(h_chan, HSCX_STAT, param, sc);
- return;
- }
- if(chan->bprot == BPROT_RHDLC)
- {
- NDBGL1(L1_BCHAN, "BPROT_RHDLC");
-
- /* HDLC Frames, transparent mode 0 */
- sc->avma1pp_cmd = HSCX_CMD_XRS|HSCX_CMD_RRS;
- sc->avma1pp_prot = HSCX_MODE_ITF_FLG;
- AVMA1PPSETCMDLONG(param);
- hscx_write_reg(h_chan, HSCX_STAT, param, sc);
- sc->avma1pp_cmd = HSCX_CMD_XRS;
- AVMA1PPSETCMDLONG(param);
- hscx_write_reg(h_chan, HSCX_STAT, param, sc);
- sc->avma1pp_cmd = 0;
- }
- else
- {
- NDBGL1(L1_BCHAN, "BPROT_NONE??");
-
- /* Raw Telephony, extended transparent mode 1 */
- sc->avma1pp_cmd = HSCX_CMD_XRS|HSCX_CMD_RRS;
- sc->avma1pp_prot = HSCX_MODE_TRANS;
- AVMA1PPSETCMDLONG(param);
- hscx_write_reg(h_chan, HSCX_STAT, param, sc);
- sc->avma1pp_cmd = HSCX_CMD_XRS;
- AVMA1PPSETCMDLONG(param);
- hscx_write_reg(h_chan, HSCX_STAT, param, sc);
- sc->avma1pp_cmd = 0;
- }
-}
-
-static void
-avma1pp_bchannel_setup(int unit, int h_chan, int bprot, int activate)
-{
-#ifdef __FreeBSD__
- struct l1_softc *sc = ifpi_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
-
- int s = SPLI4B();
-
- if(activate == 0)
- {
- /* deactivation */
- chan->state = HSCX_IDLE;
- avma1pp_hscx_init(sc, h_chan, activate);
- }
-
- NDBGL1(L1_BCHAN, "unit=%d, channel=%d, %s",
- sc->sc_unit, h_chan, activate ? "activate" : "deactivate");
-
- /* general part */
-
- chan->unit = sc->sc_unit; /* unit number */
- chan->channel = h_chan; /* B channel */
- chan->bprot = bprot; /* B channel protocol */
- chan->state = HSCX_IDLE; /* B channel state */
-
- /* receiver part */
-
- chan->rx_queue.ifq_maxlen = IFQ_MAXLEN;
-
- i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */
-
- chan->rxcount = 0; /* reset rx counter */
-
- i4b_Bfreembuf(chan->in_mbuf); /* clean rx mbuf */
-
- chan->in_mbuf = NULL; /* reset mbuf ptr */
- chan->in_cbptr = NULL; /* reset mbuf curr ptr */
- chan->in_len = 0; /* reset mbuf data len */
-
- /* transmitter part */
-
- chan->tx_queue.ifq_maxlen = IFQ_MAXLEN;
-
- i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */
-
- chan->txcount = 0; /* reset tx counter */
-
- i4b_Bfreembuf(chan->out_mbuf_head); /* clean tx mbuf */
-
- chan->out_mbuf_head = NULL; /* reset head mbuf ptr */
- chan->out_mbuf_cur = NULL; /* reset current mbuf ptr */
- chan->out_mbuf_cur_ptr = NULL; /* reset current mbuf data ptr */
- chan->out_mbuf_cur_len = 0; /* reset current mbuf data cnt */
-
- if(activate != 0)
- {
- /* activation */
- avma1pp_hscx_init(sc, h_chan, activate);
- chan->state |= HSCX_AVMA1PP_ACTIVE;
- }
-
- splx(s);
-}
-
-static void
-avma1pp_bchannel_start(int unit, int h_chan)
-{
-#ifdef __FreeBSD__
- struct l1_softc *sc = ifpi_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- register l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- int s;
- int activity = -1;
-
- s = SPLI4B(); /* enter critical section */
- if(chan->state & HSCX_TX_ACTIVE) /* already running ? */
- {
- splx(s);
- return; /* yes, leave */
- }
-
- /* get next mbuf from queue */
-
- IF_DEQUEUE(&chan->tx_queue, chan->out_mbuf_head);
-
- if(chan->out_mbuf_head == NULL) /* queue empty ? */
- {
- splx(s); /* leave critical section */
- return; /* yes, exit */
- }
-
- /* init current mbuf values */
-
- chan->out_mbuf_cur = chan->out_mbuf_head;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
-
- /* activity indicator for timeout handling */
-
- if(chan->bprot == BPROT_NONE)
- {
- if(!(i4b_l1_bchan_tel_silence(chan->out_mbuf_cur->m_data, chan->out_mbuf_cur->m_len)))
- activity = ACT_TX;
- }
- else
- {
- activity = ACT_TX;
- }
-
- chan->state |= HSCX_TX_ACTIVE; /* we start transmitting */
-
- if(sc->sc_trace & TRACE_B_TX) /* if trace, send mbuf to trace dev */
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
-
- avma1pp_hscx_fifo(chan, sc);
-
- /* call timeout handling routine */
-
- if(activity == ACT_RX || activity == ACT_TX)
- (*chan->isic_drvr_linktab->bch_activity)(chan->isic_drvr_linktab->unit, activity);
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * return the address of isic drivers linktab
- *---------------------------------------------------------------------------*/
-static isdn_link_t *
-avma1pp_ret_linktab(int unit, int channel)
-{
-#ifdef __FreeBSD__
- struct l1_softc *sc = ifpi_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- l1_bchan_state_t *chan = &sc->sc_chan[channel];
-
- return(&chan->isic_isdn_linktab);
-}
-
-/*---------------------------------------------------------------------------*
- * set the driver linktab in the b channel softc
- *---------------------------------------------------------------------------*/
-static void
-avma1pp_set_linktab(int unit, int channel, drvr_link_t *dlt)
-{
-#ifdef __FreeBSD__
- struct l1_softc *sc = ifpi_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- l1_bchan_state_t *chan = &sc->sc_chan[channel];
-
- chan->isic_drvr_linktab = dlt;
-}
-
-
-/*---------------------------------------------------------------------------*
- * initialize our local linktab
- *---------------------------------------------------------------------------*/
-static void
-avma1pp_init_linktab(struct l1_softc *sc)
-{
- l1_bchan_state_t *chan = &sc->sc_chan[HSCX_CH_A];
- isdn_link_t *lt = &chan->isic_isdn_linktab;
-
- /* make sure the hardware driver is known to layer 4 */
- /* avoid overwriting if already set */
- if (ctrl_types[CTRL_PASSIVE].set_linktab == NULL)
- {
- ctrl_types[CTRL_PASSIVE].set_linktab = avma1pp_set_linktab;
- ctrl_types[CTRL_PASSIVE].get_linktab = avma1pp_ret_linktab;
- }
-
- /* local setup */
- lt->unit = sc->sc_unit;
- lt->channel = HSCX_CH_A;
- lt->bch_config = avma1pp_bchannel_setup;
- lt->bch_tx_start = avma1pp_bchannel_start;
- lt->bch_stat = avma1pp_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-
- chan = &sc->sc_chan[HSCX_CH_B];
- lt = &chan->isic_isdn_linktab;
-
- lt->unit = sc->sc_unit;
- lt->channel = HSCX_CH_B;
- lt->bch_config = avma1pp_bchannel_setup;
- lt->bch_tx_start = avma1pp_bchannel_start;
- lt->bch_stat = avma1pp_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-}
-
-/*
- * use this instead of isic_bchannel_stat in i4b_bchan.c because it's static
- */
-static void
-avma1pp_bchannel_stat(int unit, int h_chan, bchan_statistics_t *bsp)
-{
-#ifdef __FreeBSD__
- struct l1_softc *sc = ifpi_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- int s;
-
- s = SPLI4B();
-
- bsp->outbytes = chan->txcount;
- bsp->inbytes = chan->rxcount;
-
- chan->txcount = 0;
- chan->rxcount = 0;
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * fill HSCX fifo with data from the current mbuf
- * Put this here until it can go into i4b_hscx.c
- *---------------------------------------------------------------------------*/
-static int
-avma1pp_hscx_fifo(l1_bchan_state_t *chan, struct l1_softc *sc)
-{
- int len;
- int nextlen;
- int i;
- int cmd = 0;
- /* using a scratch buffer simplifies writing to the FIFO */
- u_char scrbuf[HSCX_FIFO_LEN];
-
- len = 0;
-
- /*
- * fill the HSCX tx fifo with data from the current mbuf. if
- * current mbuf holds less data than HSCX fifo length, try to
- * get the next mbuf from (a possible) mbuf chain. if there is
- * not enough data in a single mbuf or in a chain, then this
- * is the last mbuf and we tell the HSCX that it has to send
- * CRC and closing flag
- */
-
- while(chan->out_mbuf_cur && len != sc->sc_bfifolen)
- {
- nextlen = min(chan->out_mbuf_cur_len, sc->sc_bfifolen - len);
-
-#ifdef NOTDEF
- printf("i:mh=%p, mc=%p, mcp=%p, mcl=%d l=%d nl=%d # ",
- chan->out_mbuf_head,
- chan->out_mbuf_cur,
- chan->out_mbuf_cur_ptr,
- chan->out_mbuf_cur_len,
- len,
- nextlen);
-#endif
-
- cmd |= HSCX_CMDR_XTF;
- /* collect the data in the scratch buffer */
- for (i = 0; i < nextlen; i++)
- scrbuf[i + len] = chan->out_mbuf_cur_ptr[i];
-
- len += nextlen;
- chan->txcount += nextlen;
-
- chan->out_mbuf_cur_ptr += nextlen;
- chan->out_mbuf_cur_len -= nextlen;
-
- if(chan->out_mbuf_cur_len == 0)
- {
- if((chan->out_mbuf_cur = chan->out_mbuf_cur->m_next) != NULL)
- {
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPIUNIT(sc->sc_unit);
- hdr.type = (chan->channel == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
- }
- else
- {
- if (chan->bprot != BPROT_NONE)
- cmd |= HSCX_CMDR_XME;
- i4b_Bfreembuf(chan->out_mbuf_head);
- chan->out_mbuf_head = NULL;
- }
- }
- }
- /* write what we have from the scratch buf to the HSCX fifo */
- if (len != 0)
- HSCX_WRFIFO(chan->channel, scrbuf, len);
- return(cmd);
-}
-
-/*---------------------------------------------------------------------------*
- * ifpi - ISAC interrupt routine
- *---------------------------------------------------------------------------*/
-static void
-ifpi_isac_intr(struct l1_softc *sc)
-{
- register u_char isac_irq_stat;
-
- for(;;)
- {
- /* get isac irq status */
- isac_irq_stat = ISAC_READ(I_ISTA);
-
- if(isac_irq_stat)
- ifpi_isac_irq(sc, isac_irq_stat); /* isac handler */
- else
- break;
- }
-
- ISAC_WRITE(I_MASK, 0xff);
-
- DELAY(100);
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-}
-
-/*---------------------------------------------------------------------------*
- * ifpi_recover - try to recover from irq lockup
- *---------------------------------------------------------------------------*/
-void
-ifpi_recover(struct l1_softc *sc)
-{
- u_char byte;
-
- /* get isac irq status */
-
- byte = ISAC_READ(I_ISTA);
-
- NDBGL1(L1_ERROR, " ISAC: ISTA = 0x%x", byte);
-
- if(byte & ISAC_ISTA_EXI)
- NDBGL1(L1_ERROR, " ISAC: EXIR = 0x%x", (u_char)ISAC_READ(I_EXIR));
-
- if(byte & ISAC_ISTA_CISQ)
- {
- byte = ISAC_READ(I_CIRR);
-
- NDBGL1(L1_ERROR, " ISAC: CISQ = 0x%x", byte);
-
- if(byte & ISAC_CIRR_SQC)
- NDBGL1(L1_ERROR, " ISAC: SQRR = 0x%x", (u_char)ISAC_READ(I_SQRR));
- }
-
- NDBGL1(L1_ERROR, " ISAC: IMASK = 0x%x", ISAC_IMASK);
-
- ISAC_WRITE(I_MASK, 0xff);
- DELAY(100);
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-}
-
-
-#endif /* NIFPI > 0 */
diff --git a/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c b/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c
deleted file mode 100644
index d91f5e1b041b..000000000000
--- a/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c
+++ /dev/null
@@ -1,1393 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Udo Schweigert. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpnp_avm.c: AVM Fritz!Card PnP hardware driver
- * ---------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Fri Jan 12 17:05:28 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "ifpnp.h"
-#include "opt_i4b.h"
-
-#if (NIFPNP > 0)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-
-#include <machine/bus.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#include <isa/isavar.h>
-
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_mbuf.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#include <i4b/layer1/ifpnp/i4b_ifpnp_ext.h>
-
-/* prototypes */
-static void avm_pnp_intr(void *);
-static void hscx_write_reg(int, u_int, struct l1_softc *, u_int);
-static void hscx_write_reg_val(int, u_int, u_int8_t, struct l1_softc *);
-static u_int hscx_read_reg(int, u_int, struct l1_softc *);
-static void hscx_read_fifo(int, void *, size_t, struct l1_softc *);
-static void hscx_write_fifo(int, void *, size_t, struct l1_softc *);
-static void avm_pnp_hscx_int_handler(struct l1_softc *);
-static void avm_pnp_hscx_intr(int, u_int, u_int, struct l1_softc *);
-static void avm_pnp_init_linktab(struct l1_softc *);
-static void avm_pnp_bchannel_setup(int, int, int, int);
-static void avm_pnp_bchannel_start(int, int);
-static void avm_pnp_hscx_init(struct l1_softc *, int, int);
-static void avm_pnp_bchannel_stat(int, int, bchan_statistics_t *);
-static void avm_pnp_set_linktab(int, int, drvr_link_t *);
-static isdn_link_t * avm_pnp_ret_linktab(int, int);
-static int avm_pnp_probe(device_t);
-static int avm_pnp_hscx_fifo(l1_bchan_state_t *, struct l1_softc *);
-int avm_pnp_attach(device_t);
-static void ifpnp_isac_intr(struct l1_softc *sc);
-
-static device_method_t avm_pnp_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, avm_pnp_probe),
- DEVMETHOD(device_attach, avm_pnp_attach),
- { 0, 0 }
-};
-
-static driver_t avm_pnp_driver = {
- "ifpnp",
- avm_pnp_methods,
- sizeof(struct l1_softc)
-};
-
-static devclass_t avm_pnp_devclass;
-
-DRIVER_MODULE(avm_pnp, isa, avm_pnp_driver, avm_pnp_devclass, 0, 0);
-
-/* jump table for multiplex routines */
-
-struct i4b_l1mux_func avm_pnp_l1mux_func = {
- avm_pnp_ret_linktab,
- avm_pnp_set_linktab,
- ifpnp_mph_command_req,
- ifpnp_ph_data_req,
- ifpnp_ph_activate_req,
-};
-
-struct l1_softc *ifpnp_scp[IFPNP_MAXUNIT];
-
-/*---------------------------------------------------------------------------*
- * AVM PnP Fritz!Card special registers
- *---------------------------------------------------------------------------*/
-
-/*
- * register offsets from i/o base
- */
-#define CLASS_OFFSET 0x00
-#define REVISION_OFFSET 0x01
-#define STAT0_OFFSET 0x02
-#define STAT1_OFFSET 0x03
-#define ADDR_REG_OFFSET 0x04
-/*#define MODREG_OFFSET 0x06
-#define VERREG_OFFSET 0x07*/
-
-/* these 2 are used to select an ISAC register set */
-#define ISAC_LO_REG_OFFSET 0x04
-#define ISAC_HI_REG_OFFSET 0x06
-
-/* offset higher than this goes to the HI register set */
-#define MAX_LO_REG_OFFSET 0x2f
-
-/* mask for the offset */
-#define ISAC_REGSET_MASK 0x0f
-
-/* the offset from the base to the ISAC registers */
-#define ISAC_REG_OFFSET 0x10
-
-/* the offset from the base to the ISAC FIFO */
-#define ISAC_FIFO 0x02
-
-/* not really the HSCX, but sort of */
-#define HSCX_FIFO 0x00
-#define HSCX_STAT 0x04
-
-/*
- * AVM PnP Status Latch 0 read only bits
- */
-#define ASL_IRQ_ISAC 0x01 /* ISAC interrupt, active low */
-#define ASL_IRQ_HSCX 0x02 /* HSX interrupt, active low */
-#define ASL_IRQ_TIMER 0x04 /* Timer interrupt, active low */
-#define ASL_IRQ_BCHAN ASL_IRQ_HSCX
-/* actually active LOW */
-#define ASL_IRQ_Pending (ASL_IRQ_ISAC | ASL_IRQ_HSCX | ASL_IRQ_TIMER)
-
-/*
- * AVM Status Latch 0 write only bits
- */
-#define ASL_RESET_ALL 0x01 /* reset siemens IC's, active 1 */
-#define ASL_TIMERDISABLE 0x02 /* active high */
-#define ASL_TIMERRESET 0x04 /* active high */
-#define ASL_ENABLE_INT 0x08 /* active high */
-#define ASL_TESTBIT 0x10 /* active high */
-
-/*
- * AVM Status Latch 1 write only bits
- */
-#define ASL1_INTSEL 0x0f /* active high */
-#define ASL1_ENABLE_IOM 0x80 /* active high */
-
-/*
- * "HSCX" mode bits
- */
-#define HSCX_MODE_ITF_FLG 0x01
-#define HSCX_MODE_TRANS 0x02
-#define HSCX_MODE_CCR_7 0x04
-#define HSCX_MODE_CCR_16 0x08
-#define HSCX_MODE_TESTLOOP 0x80
-
-/*
- * "HSCX" status bits
- */
-#define HSCX_STAT_RME 0x01
-#define HSCX_STAT_RDO 0x10
-#define HSCX_STAT_CRCVFRRAB 0x0E
-#define HSCX_STAT_CRCVFR 0x06
-#define HSCX_STAT_RML_MASK 0x3f00
-
-/*
- * "HSCX" interrupt bits
- */
-#define HSCX_INT_XPR 0x80
-#define HSCX_INT_XDU 0x40
-#define HSCX_INT_RPR 0x20
-#define HSCX_INT_MASK 0xE0
-
-/*
- * "HSCX" command bits
- */
-#define HSCX_CMD_XRS 0x80
-#define HSCX_CMD_XME 0x01
-#define HSCX_CMD_RRS 0x20
-#define HSCX_CMD_XML_MASK 0x3f00
-
-/*
- * to prevent deactivating the "HSCX" when both channels are active we
- * define an HSCX_ACTIVE flag which is or'd into the channel's state
- * flag in avm_pnp_bchannel_setup upon active and cleared upon deactivation.
- * It is set high to allow room for new flags.
- */
-#define HSCX_AVMA1PP_ACTIVE 0x1000
-
-/*---------------------------------------------------------------------------*
- * AVM read fifo routines
- *---------------------------------------------------------------------------*/
-
-static void
-avm_pnp_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, ISAC_FIFO);
- bus_space_read_multi_1(btag, bhandle, ISAC_REG_OFFSET, buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- hscx_read_fifo(0, buf, size, sc);
- break;
- case ISIC_WHAT_HSCXB:
- hscx_read_fifo(1, buf, size, sc);
- break;
- }
-}
-
-static void
-hscx_read_fifo(int chan, void *buf, size_t len, struct l1_softc *sc)
-{
- u_int8_t *ip;
- size_t cnt;
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, chan);
- ip = (u_int8_t *)buf;
- cnt = 0;
- while (cnt++ < len)
- {
- *ip++ = bus_space_read_1(btag, bhandle, ISAC_REG_OFFSET);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * AVM write fifo routines
- *---------------------------------------------------------------------------*/
-static void
-avm_pnp_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, ISAC_FIFO);
- bus_space_write_multi_1(btag, bhandle, ISAC_REG_OFFSET, (u_int8_t*)buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- hscx_write_fifo(0, buf, size, sc);
- break;
- case ISIC_WHAT_HSCXB:
- hscx_write_fifo(1, buf, size, sc);
- break;
- }
-}
-
-static void
-hscx_write_fifo(int chan, void *buf, size_t len, struct l1_softc *sc)
-{
- u_int8_t *ip;
- size_t cnt;
- l1_bchan_state_t *Bchan = &sc->sc_chan[chan];
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- sc->avma1pp_cmd &= ~HSCX_CMD_XME;
- sc->avma1pp_txl = 0;
-
- if (Bchan->out_mbuf_cur == NULL)
- {
- if (Bchan->bprot != BPROT_NONE)
- sc->avma1pp_cmd |= HSCX_CMD_XME;
- }
- if (len != sc->sc_bfifolen)
- sc->avma1pp_txl = len;
-
- hscx_write_reg(chan, HSCX_STAT, sc, 3);
-
- ip = (u_int8_t *)buf;
- cnt = 0;
- while (cnt++ < len)
- {
- bus_space_write_1(btag, bhandle, ISAC_REG_OFFSET, *ip++);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * AVM write register routines
- *---------------------------------------------------------------------------*/
-
-static void
-avm_pnp_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- u_char reg_bank;
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- reg_bank = (offs > MAX_LO_REG_OFFSET) ? ISAC_HI_REG_OFFSET:ISAC_LO_REG_OFFSET;
- /* set the register bank */
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, reg_bank);
- bus_space_write_1(btag, bhandle, ISAC_REG_OFFSET + (offs & ISAC_REGSET_MASK), data);
- break;
- case ISIC_WHAT_HSCXA:
- hscx_write_reg_val(0, offs, data, sc);
- break;
- case ISIC_WHAT_HSCXB:
- hscx_write_reg_val(1, offs, data, sc);
- break;
- }
-}
-
-static void
-hscx_write_reg(int chan, u_int off, struct l1_softc *sc, u_int which)
-{
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- /* point at the correct channel */
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, chan);
- if (which & 4)
- bus_space_write_1(btag, bhandle, ISAC_REG_OFFSET + off + 2, sc->avma1pp_prot);
- if (which & 2)
- bus_space_write_1(btag, bhandle, ISAC_REG_OFFSET + off + 1, sc->avma1pp_txl);
- if (which & 1)
- bus_space_write_1(btag, bhandle, ISAC_REG_OFFSET + off, sc->avma1pp_cmd);
-}
-
-static void
-hscx_write_reg_val(int chan, u_int off, u_int8_t val, struct l1_softc *sc)
-{
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- /* point at the correct channel */
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, chan);
- bus_space_write_1(btag, bhandle, ISAC_REG_OFFSET + off, val);
-}
-
-/*---------------------------------------------------------------------------*
- * AVM read register routines
- *---------------------------------------------------------------------------*/
-static u_int8_t
-avm_pnp_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- u_char reg_bank;
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- reg_bank = (offs > MAX_LO_REG_OFFSET) ? ISAC_HI_REG_OFFSET:ISAC_LO_REG_OFFSET;
- /* set the register bank */
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, reg_bank);
- return(bus_space_read_1(btag, bhandle, ISAC_REG_OFFSET +
- (offs & ISAC_REGSET_MASK)));
- case ISIC_WHAT_HSCXA:
- return hscx_read_reg(0, offs, sc);
- case ISIC_WHAT_HSCXB:
- return hscx_read_reg(1, offs, sc);
- }
- return 0;
-}
-
-static u_int
-hscx_read_reg(int chan, u_int off, struct l1_softc *sc)
-{
- bus_space_handle_t bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_tag_t btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- /* point at the correct channel */
- bus_space_write_1(btag, bhandle, ADDR_REG_OFFSET, chan);
- return(bus_space_read_1(btag, bhandle, ISAC_REG_OFFSET + off));
-}
-
-
-static struct ifpnp_ids {
- u_long vend_id;
- char *id_str;
-} ifpnp_ids[] = {
- { 0x0009cd06, "AVM Fritz!Card PnP" },
- { 0, 0 }
-};
-
-/*---------------------------------------------------------------------------*
- * avm_pnp_probe - probe for a card
- *---------------------------------------------------------------------------*/
-static int
-avm_pnp_probe(dev)
- device_t dev;
-{
- struct ifpnp_ids *ids; /* pnp id's */
- char *string = NULL; /* the name */
- u_int32_t vend_id = isa_get_vendorid(dev); /* vendor id */
-
- /* search table of knowd id's */
-
- for(ids = ifpnp_ids; ids->vend_id != 0; ids++)
- {
- if(vend_id == ids->vend_id)
- {
- string = ids->id_str;
- break;
- }
- }
-
- if(string) /* set name if we have one */
- {
- device_set_desc(dev, string); /* set description */
- return 0;
- }
- else
- {
- return ENXIO;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * avm_pnp_attach - attach Fritz!Card PnP
- *---------------------------------------------------------------------------*/
-int
-avm_pnp_attach(device_t dev)
-{
- struct l1_softc *sc;
- u_int v;
- int unit, error = 0;
- int s;
- u_int16_t vid;
- void *ih = 0;
- bus_space_handle_t bhandle;
- bus_space_tag_t btag;
-
- s = splimp();
-
- vid = isa_get_vendorid(dev);
- sc = device_get_softc(dev);
- unit = device_get_unit(dev);
- bzero(sc, sizeof(struct l1_softc));
-
- /* probably not really required */
- if(unit > IFPNP_MAXUNIT) {
- printf("avm_pnp%d: Error, unit > IFPNP_MAXUNIT!\n", unit);
- splx(s);
- return(ENXIO);
- }
-
- ifpnp_scp[unit] = sc;
-
-
- /* get io_base */
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0UL, ~0UL, 1, RF_ACTIVE ) ))
- {
- printf("avm_pnp_attach: Couldn't get my io_base.\n");
- return ENXIO;
- }
- if (sc->sc_resources.io_base[0] == NULL) {
- printf("avm_pnp%d: couldn't map IO port\n", unit);
- error = ENXIO;
- goto fail;
- }
-
- bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- /* will not be used for pnp devices */
- sc->sc_port = rman_get_start(sc->sc_resources.io_base[0]);
-
- /* get irq, release io_base if we don't get it */
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0UL, ~0UL, 1, RF_ACTIVE)))
- {
- printf("avm_pnp%d: Could not get irq.\n",unit);
- error = ENXIO;
- goto fail;
- }
-
- /* not needed */
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
- bus_setup_intr(dev,sc->sc_resources.irq,INTR_TYPE_NET,
- (void(*)(void*))avm_pnp_intr, sc,&ih);
- sc->sc_unit = unit;
-
- /* end of new-bus stuff */
-
- ISAC_BASE = (caddr_t)ISIC_WHAT_ISAC;
-
- HSCX_A_BASE = (caddr_t)ISIC_WHAT_HSCXA;
- HSCX_B_BASE = (caddr_t)ISIC_WHAT_HSCXB;
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = avm_pnp_read_reg;
- sc->writereg = avm_pnp_write_reg;
-
- sc->readfifo = avm_pnp_read_fifo;
- sc->writefifo = avm_pnp_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_AVM_PNP;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- /* set up some other miscellaneous things */
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /* reset the card */
- /* the Linux driver does this to clear any pending ISAC interrupts */
- v = 0;
- v = ISAC_READ(I_STAR);
- v = ISAC_READ(I_MODE);
- v = ISAC_READ(I_ADF2);
- v = ISAC_READ(I_ISTA);
- if (v & ISAC_ISTA_EXI)
- {
- v = ISAC_READ(I_EXIR);
- }
- v = ISAC_READ(I_CIRR);
- ISAC_WRITE(I_MASK, 0xff);
- /* the Linux driver does this to clear any pending HSCX interrupts */
- v = hscx_read_reg(0, HSCX_STAT, sc);
- v = hscx_read_reg(1, HSCX_STAT, sc);
-
- bus_space_write_1(btag, bhandle, STAT0_OFFSET, ASL_RESET_ALL|ASL_TIMERDISABLE);
- DELAY(SEC_DELAY/100); /* 10 ms */
- bus_space_write_1(btag, bhandle, STAT1_OFFSET, ASL1_ENABLE_IOM|sc->sc_irq);
- DELAY(SEC_DELAY/100); /* 10 ms */
- bus_space_write_1(btag, bhandle, STAT0_OFFSET, ASL_TIMERRESET|ASL_ENABLE_INT|ASL_TIMERDISABLE);
- DELAY(SEC_DELAY/100); /* 10 ms */
-
- printf("ifpnp%d: AVM Fritz!Card PnP Class %#x Revision %d \n", unit,
- bus_space_read_1(btag, bhandle, CLASS_OFFSET),
- bus_space_read_1(btag, bhandle, REVISION_OFFSET));
-
- printf("ifpnp%d: ISAC %s (IOM-%c)\n", unit,
- "2085 Version A1/A2 or 2086/2186 Version 1.1",
- sc->sc_bustyp == BUS_TYPE_IOM1 ? '1' : '2');
-
-
- /* init the ISAC */
- ifpnp_isac_init(sc);
-
- /* init the "HSCX" */
- avm_pnp_bchannel_setup(sc->sc_unit, HSCX_CH_A, BPROT_NONE, 0);
-
- avm_pnp_bchannel_setup(sc->sc_unit, HSCX_CH_B, BPROT_NONE, 0);
-
- /* can't use the normal B-Channel stuff */
- avm_pnp_init_linktab(sc);
-
- /* set trace level */
-
- sc->sc_trace = TRACE_OFF;
-
- sc->sc_state = ISAC_IDLE;
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
-
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
- sc->sc_freeflag = 0;
-
- sc->sc_obuf2 = NULL;
- sc->sc_freeflag2 = 0;
-
- callout_handle_init(&sc->sc_T3_callout);
- callout_handle_init(&sc->sc_T4_callout);
-
- /* init higher protocol layers */
-
- i4b_l1_mph_status_ind(L0IFPNPUNIT(sc->sc_unit), STI_ATTACH, sc->sc_cardtyp, &avm_pnp_l1mux_func);
-
- fail:
- splx(s);
- return(error);
-}
-
-/*
- * this is the real interrupt routine
- */
-static void
-avm_pnp_hscx_intr(int h_chan, u_int stat, u_int cnt, struct l1_softc *sc)
-{
- register l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- int activity = -1;
-
- NDBGL1(L1_H_IRQ, "%#x", stat);
-
- if((stat & HSCX_INT_XDU) && (chan->bprot != BPROT_NONE))/* xmit data underrun */
- {
- chan->stat_XDU++;
- NDBGL1(L1_H_XFRERR, "xmit data underrun");
- /* abort the transmission */
- sc->avma1pp_txl = 0;
- sc->avma1pp_cmd |= HSCX_CMD_XRS;
- hscx_write_reg(h_chan, HSCX_STAT, sc, 1);
- sc->avma1pp_cmd &= ~HSCX_CMD_XRS;
- hscx_write_reg(h_chan, HSCX_STAT, sc, 1);
-
- if (chan->out_mbuf_head != NULL) /* don't continue to transmit this buffer */
- {
- i4b_Bfreembuf(chan->out_mbuf_head);
- chan->out_mbuf_cur = chan->out_mbuf_head = NULL;
- }
- }
-
- /*
- * The following is based on examination of the Linux driver.
- *
- * The logic here is different than with a "real" HSCX; all kinds
- * of information (interrupt/status bits) are in stat.
- * HSCX_INT_RPR indicates a receive interrupt
- * HSCX_STAT_RDO indicates an overrun condition, abort -
- * otherwise read the bytes ((stat & HSCX_STZT_RML_MASK) >> 8)
- * HSCX_STAT_RME indicates end-of-frame and apparently any
- * CRC/framing errors are only reported in this state.
- * if ((stat & HSCX_STAT_CRCVFRRAB) != HSCX_STAT_CRCVFR)
- * CRC/framing error
- */
-
- if(stat & HSCX_INT_RPR)
- {
- register int fifo_data_len;
- int error = 0;
- /* always have to read the FIFO, so use a scratch buffer */
- u_char scrbuf[HSCX_FIFO_LEN];
-
- if(stat & HSCX_STAT_RDO)
- {
- chan->stat_RDO++;
- NDBGL1(L1_H_XFRERR, "receive data overflow");
- error++;
- }
-
- /*
- * check whether we're receiving data for an inactive B-channel
- * and discard it. This appears to happen for telephony when
- * both B-channels are active and one is deactivated. Since
- * it is not really possible to deactivate the channel in that
- * case (the ASIC seems to deactivate _both_ channels), the
- * "deactivated" channel keeps receiving data which can lead
- * to exhaustion of mbufs and a kernel panic.
- *
- * This is a hack, but it's the only solution I can think of
- * without having the documentation for the ASIC.
- * GJ - 28 Nov 1999
- */
- if (chan->state == HSCX_IDLE)
- {
- NDBGL1(L1_H_XFRERR, "toss data from %d", h_chan);
- error++;
- }
-
- fifo_data_len = cnt;
-
- if(fifo_data_len == 0)
- fifo_data_len = sc->sc_bfifolen;
-
- /* ALWAYS read data from HSCX fifo */
-
- HSCX_RDFIFO(h_chan, scrbuf, fifo_data_len);
- chan->rxcount += fifo_data_len;
-
- /* all error conditions checked, now decide and take action */
-
- if(error == 0)
- {
- if(chan->in_mbuf == NULL)
- {
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 avm_pnp_hscx_intr: RME, cannot allocate mbuf!\n");
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- }
-
- if((chan->in_len + fifo_data_len) <= BCH_MAX_DATALEN)
- {
- /* OK to copy the data */
- bcopy(scrbuf, chan->in_cbptr, fifo_data_len);
- chan->in_cbptr += fifo_data_len;
- chan->in_len += fifo_data_len;
-
- /* setup mbuf data length */
-
- chan->in_mbuf->m_len = chan->in_len;
- chan->in_mbuf->m_pkthdr.len = chan->in_len;
-
- if(sc->sc_trace & TRACE_B_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
- }
-
- if (stat & HSCX_STAT_RME)
- {
- if((stat & HSCX_STAT_CRCVFRRAB) == HSCX_STAT_CRCVFR)
- {
- (*chan->isic_drvr_linktab->bch_rx_data_ready)(chan->isic_drvr_linktab->unit);
- activity = ACT_RX;
-
- /* mark buffer ptr as unused */
-
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- else
- {
- chan->stat_CRC++;
- NDBGL1(L1_H_XFRERR, "CRC/RAB");
- if (chan->in_mbuf != NULL)
- {
- i4b_Bfreembuf(chan->in_mbuf);
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- }
- }
- } /* END enough space in mbuf */
- else
- {
- if(chan->bprot == BPROT_NONE)
- {
- /* setup mbuf data length */
-
- chan->in_mbuf->m_len = chan->in_len;
- chan->in_mbuf->m_pkthdr.len = chan->in_len;
-
- if(sc->sc_trace & TRACE_B_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
- }
-
- if(!(i4b_l1_bchan_tel_silence(chan->in_mbuf->m_data, chan->in_mbuf->m_len)))
- activity = ACT_RX;
-
- /* move rx'd data to rx queue */
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- (void) IF_HANDOFF(&chan->rx_queue, chan->in_mbuf, NULL);
-#else
- if(!(IF_QFULL(&chan->rx_queue)))
- {
- IF_ENQUEUE(&chan->rx_queue, chan->in_mbuf);
- }
- else
- {
- i4b_Bfreembuf(chan->in_mbuf);
- }
-#endif
- /* signal upper layer that data are available */
- (*chan->isic_drvr_linktab->bch_rx_data_ready)(chan->isic_drvr_linktab->unit);
-
- /* alloc new buffer */
-
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 avm_pnp_hscx_intr: RPF, cannot allocate new mbuf!\n");
-
- /* setup new data ptr */
-
- chan->in_cbptr = chan->in_mbuf->m_data;
-
- /* OK to copy the data */
- bcopy(scrbuf, chan->in_cbptr, fifo_data_len);
-
- chan->in_cbptr += fifo_data_len;
- chan->in_len = fifo_data_len;
-
- chan->rxcount += fifo_data_len;
- }
- else
- {
- NDBGL1(L1_H_XFRERR, "RAWHDLC rx buffer overflow in RPF, in_len=%d", chan->in_len);
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- }
- }
- } /* if(error == 0) */
- else
- {
- /* land here for RDO */
- if (chan->in_mbuf != NULL)
- {
- i4b_Bfreembuf(chan->in_mbuf);
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- sc->avma1pp_txl = 0;
- sc->avma1pp_cmd |= HSCX_CMD_RRS;
- hscx_write_reg(h_chan, HSCX_STAT, sc, 1);
- sc->avma1pp_cmd &= ~HSCX_CMD_RRS;
- hscx_write_reg(h_chan, HSCX_STAT, sc, 1);
- }
- }
-
-
- /* transmit fifo empty, new data can be written to fifo */
-
- if(stat & HSCX_INT_XPR)
- {
- /*
- * for a description what is going on here, please have
- * a look at isic_bchannel_start() in i4b_bchan.c !
- */
-
- NDBGL1(L1_H_IRQ, "unit %d, chan %d - XPR, Tx Fifo Empty!", sc->sc_unit, h_chan);
-
- if(chan->out_mbuf_cur == NULL) /* last frame is transmitted */
- {
- IF_DEQUEUE(&chan->tx_queue, chan->out_mbuf_head);
-
- if(chan->out_mbuf_head == NULL)
- {
- chan->state &= ~HSCX_TX_ACTIVE;
- (*chan->isic_drvr_linktab->bch_tx_queue_empty)(chan->isic_drvr_linktab->unit);
- }
- else
- {
- chan->state |= HSCX_TX_ACTIVE;
- chan->out_mbuf_cur = chan->out_mbuf_head;
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
-
- if(chan->bprot == BPROT_NONE)
- {
- if(!(i4b_l1_bchan_tel_silence(chan->out_mbuf_cur->m_data, chan->out_mbuf_cur->m_len)))
- activity = ACT_TX;
- }
- else
- {
- activity = ACT_TX;
- }
- }
- }
-
- avm_pnp_hscx_fifo(chan, sc);
- }
-
- /* call timeout handling routine */
-
- if(activity == ACT_RX || activity == ACT_TX)
- (*chan->isic_drvr_linktab->bch_activity)(chan->isic_drvr_linktab->unit, activity);
-}
-
-/*
- * this is the main routine which checks each channel and then calls
- * the real interrupt routine as appropriate
- */
-static void
-avm_pnp_hscx_int_handler(struct l1_softc *sc)
-{
- u_char stat = 0;
- u_char cnt = 0;
-
- stat = hscx_read_reg(0, HSCX_STAT, sc);
- if (stat & HSCX_INT_RPR)
- cnt = hscx_read_reg(0, HSCX_STAT+1, sc);
- if (stat & HSCX_INT_MASK)
- avm_pnp_hscx_intr(0, stat, cnt, sc);
-
- cnt = 0;
- stat = hscx_read_reg(1, HSCX_STAT, sc);
- if (stat & HSCX_INT_RPR)
- cnt = hscx_read_reg(1, HSCX_STAT+1, sc);
- if (stat & HSCX_INT_MASK)
- avm_pnp_hscx_intr(1, stat, cnt, sc);
-}
-
-static void
-avm_pnp_intr(void *xsc)
-{
- u_char stat;
- struct l1_softc *sc;
- bus_space_handle_t bhandle;
- bus_space_tag_t btag;
-
- sc = xsc;
- bhandle = rman_get_bushandle(sc->sc_resources.io_base[0]);
- btag = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- stat = bus_space_read_1(btag, bhandle, STAT0_OFFSET);
- NDBGL1(L1_H_IRQ, "stat %x", stat);
- /* was there an interrupt from this card ? */
- if ((stat & ASL_IRQ_Pending) == ASL_IRQ_Pending)
- return; /* no */
- /* interrupts are low active */
- if (!(stat & ASL_IRQ_TIMER))
- NDBGL1(L1_H_IRQ, "timer interrupt ???");
- if (!(stat & ASL_IRQ_HSCX))
- {
- NDBGL1(L1_H_IRQ, "HSCX");
- avm_pnp_hscx_int_handler(sc);
- }
- if (!(stat & ASL_IRQ_ISAC))
- {
- NDBGL1(L1_H_IRQ, "ISAC");
- ifpnp_isac_intr(sc);
- }
-}
-
-static void
-avm_pnp_hscx_init(struct l1_softc *sc, int h_chan, int activate)
-{
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
-
- NDBGL1(L1_BCHAN, "unit=%d, channel=%d, %s",
- sc->sc_unit, h_chan, activate ? "activate" : "deactivate");
-
- if (activate == 0)
- {
- /* only deactivate if both channels are idle */
- if (sc->sc_chan[HSCX_CH_A].state != HSCX_IDLE ||
- sc->sc_chan[HSCX_CH_B].state != HSCX_IDLE)
- {
- return;
- }
- sc->avma1pp_cmd = HSCX_CMD_XRS|HSCX_CMD_RRS;
- sc->avma1pp_prot = HSCX_MODE_TRANS;
- hscx_write_reg(h_chan, HSCX_STAT, sc, 5);
- return;
- }
- if(chan->bprot == BPROT_RHDLC)
- {
- NDBGL1(L1_BCHAN, "BPROT_RHDLC");
-
- /* HDLC Frames, transparent mode 0 */
- sc->avma1pp_cmd = HSCX_CMD_XRS|HSCX_CMD_RRS;
- sc->avma1pp_prot = HSCX_MODE_ITF_FLG;
- hscx_write_reg(h_chan, HSCX_STAT, sc, 5);
- sc->avma1pp_cmd = HSCX_CMD_XRS;
- hscx_write_reg(h_chan, HSCX_STAT, sc, 1);
- sc->avma1pp_cmd = 0;
- }
- else
- {
- NDBGL1(L1_BCHAN, "BPROT_NONE??");
-
- /* Raw Telephony, extended transparent mode 1 */
- sc->avma1pp_cmd = HSCX_CMD_XRS|HSCX_CMD_RRS;
- sc->avma1pp_prot = HSCX_MODE_TRANS;
- hscx_write_reg(h_chan, HSCX_STAT, sc, 5);
- sc->avma1pp_cmd = HSCX_CMD_XRS;
- hscx_write_reg(h_chan, HSCX_STAT, sc, 1);
- sc->avma1pp_cmd = 0;
- }
-}
-
-static void
-avm_pnp_bchannel_setup(int unit, int h_chan, int bprot, int activate)
-{
- struct l1_softc *sc = ifpnp_scp[unit];
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
-
- int s = SPLI4B();
-
- if(activate == 0)
- {
- /* deactivation */
- chan->state = HSCX_IDLE;
- avm_pnp_hscx_init(sc, h_chan, activate);
- }
-
- NDBGL1(L1_BCHAN, "unit=%d, channel=%d, %s",
- sc->sc_unit, h_chan, activate ? "activate" : "deactivate");
-
- /* general part */
-
- chan->unit = sc->sc_unit; /* unit number */
- chan->channel = h_chan; /* B channel */
- chan->bprot = bprot; /* B channel protocol */
- chan->state = HSCX_IDLE; /* B channel state */
-
- /* receiver part */
-
- chan->rx_queue.ifq_maxlen = IFQ_MAXLEN;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&chan->rx_queue.ifq_mtx, "i4b_avm_pnp_rx", MTX_DEF);
-#endif
-
- i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */
-
- chan->rxcount = 0; /* reset rx counter */
-
- i4b_Bfreembuf(chan->in_mbuf); /* clean rx mbuf */
-
- chan->in_mbuf = NULL; /* reset mbuf ptr */
- chan->in_cbptr = NULL; /* reset mbuf curr ptr */
- chan->in_len = 0; /* reset mbuf data len */
-
- /* transmitter part */
-
- chan->tx_queue.ifq_maxlen = IFQ_MAXLEN;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&chan->tx_queue.ifq_mtx, "i4b_avm_pnp_tx", MTX_DEF);
-#endif
- i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */
-
- chan->txcount = 0; /* reset tx counter */
-
- i4b_Bfreembuf(chan->out_mbuf_head); /* clean tx mbuf */
-
- chan->out_mbuf_head = NULL; /* reset head mbuf ptr */
- chan->out_mbuf_cur = NULL; /* reset current mbuf ptr */
- chan->out_mbuf_cur_ptr = NULL; /* reset current mbuf data ptr */
- chan->out_mbuf_cur_len = 0; /* reset current mbuf data cnt */
-
- if(activate != 0)
- {
- /* activation */
- avm_pnp_hscx_init(sc, h_chan, activate);
- chan->state |= HSCX_AVMA1PP_ACTIVE;
- }
-
- splx(s);
-}
-
-static void
-avm_pnp_bchannel_start(int unit, int h_chan)
-{
- struct l1_softc *sc = ifpnp_scp[unit];
- register l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- int s;
- int activity = -1;
-
- s = SPLI4B(); /* enter critical section */
- if(chan->state & HSCX_TX_ACTIVE) /* already running ? */
- {
- splx(s);
- return; /* yes, leave */
- }
-
- /* get next mbuf from queue */
-
- IF_DEQUEUE(&chan->tx_queue, chan->out_mbuf_head);
-
- if(chan->out_mbuf_head == NULL) /* queue empty ? */
- {
- splx(s); /* leave critical section */
- return; /* yes, exit */
- }
-
- /* init current mbuf values */
-
- chan->out_mbuf_cur = chan->out_mbuf_head;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
-
- /* activity indicator for timeout handling */
-
- if(chan->bprot == BPROT_NONE)
- {
- if(!(i4b_l1_bchan_tel_silence(chan->out_mbuf_cur->m_data, chan->out_mbuf_cur->m_len)))
- activity = ACT_TX;
- }
- else
- {
- activity = ACT_TX;
- }
-
- chan->state |= HSCX_TX_ACTIVE; /* we start transmitting */
-
- if(sc->sc_trace & TRACE_B_TX) /* if trace, send mbuf to trace dev */
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
-
- avm_pnp_hscx_fifo(chan, sc);
-
- /* call timeout handling routine */
-
- if(activity == ACT_RX || activity == ACT_TX)
- (*chan->isic_drvr_linktab->bch_activity)(chan->isic_drvr_linktab->unit, activity);
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * return the address of isic drivers linktab
- *---------------------------------------------------------------------------*/
-static isdn_link_t *
-avm_pnp_ret_linktab(int unit, int channel)
-{
- struct l1_softc *sc = ifpnp_scp[unit];
- l1_bchan_state_t *chan = &sc->sc_chan[channel];
-
- return(&chan->isic_isdn_linktab);
-}
-
-/*---------------------------------------------------------------------------*
- * set the driver linktab in the b channel softc
- *---------------------------------------------------------------------------*/
-static void
-avm_pnp_set_linktab(int unit, int channel, drvr_link_t *dlt)
-{
- struct l1_softc *sc = ifpnp_scp[unit];
- l1_bchan_state_t *chan = &sc->sc_chan[channel];
-
- chan->isic_drvr_linktab = dlt;
-}
-
-
-/*---------------------------------------------------------------------------*
- * initialize our local linktab
- *---------------------------------------------------------------------------*/
-static void
-avm_pnp_init_linktab(struct l1_softc *sc)
-{
- l1_bchan_state_t *chan = &sc->sc_chan[HSCX_CH_A];
- isdn_link_t *lt = &chan->isic_isdn_linktab;
-
- /* make sure the hardware driver is known to layer 4 */
- /* avoid overwriting if already set */
- if (ctrl_types[CTRL_PASSIVE].set_linktab == NULL)
- {
- ctrl_types[CTRL_PASSIVE].set_linktab = avm_pnp_set_linktab;
- ctrl_types[CTRL_PASSIVE].get_linktab = avm_pnp_ret_linktab;
- }
-
- /* local setup */
- lt->unit = sc->sc_unit;
- lt->channel = HSCX_CH_A;
- lt->bch_config = avm_pnp_bchannel_setup;
- lt->bch_tx_start = avm_pnp_bchannel_start;
- lt->bch_stat = avm_pnp_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-
- chan = &sc->sc_chan[HSCX_CH_B];
- lt = &chan->isic_isdn_linktab;
-
- lt->unit = sc->sc_unit;
- lt->channel = HSCX_CH_B;
- lt->bch_config = avm_pnp_bchannel_setup;
- lt->bch_tx_start = avm_pnp_bchannel_start;
- lt->bch_stat = avm_pnp_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-}
-
-/*
- * use this instead of isic_bchannel_stat in i4b_bchan.c because it's static
- */
-static void
-avm_pnp_bchannel_stat(int unit, int h_chan, bchan_statistics_t *bsp)
-{
- struct l1_softc *sc = ifpnp_scp[unit];
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- int s;
-
- s = SPLI4B();
-
- bsp->outbytes = chan->txcount;
- bsp->inbytes = chan->rxcount;
-
- chan->txcount = 0;
- chan->rxcount = 0;
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * fill HSCX fifo with data from the current mbuf
- * Put this here until it can go into i4b_hscx.c
- *---------------------------------------------------------------------------*/
-static int
-avm_pnp_hscx_fifo(l1_bchan_state_t *chan, struct l1_softc *sc)
-{
- int len;
- int nextlen;
- int i;
- int cmd = 0;
- /* using a scratch buffer simplifies writing to the FIFO */
- u_char scrbuf[HSCX_FIFO_LEN];
-
- len = 0;
-
- /*
- * fill the HSCX tx fifo with data from the current mbuf. if
- * current mbuf holds less data than HSCX fifo length, try to
- * get the next mbuf from (a possible) mbuf chain. if there is
- * not enough data in a single mbuf or in a chain, then this
- * is the last mbuf and we tell the HSCX that it has to send
- * CRC and closing flag
- */
-
- while(chan->out_mbuf_cur && len != sc->sc_bfifolen)
- {
- nextlen = min(chan->out_mbuf_cur_len, sc->sc_bfifolen - len);
-
-#ifdef NOTDEF
- printf("i:mh=%p, mc=%p, mcp=%p, mcl=%d l=%d nl=%d # ",
- chan->out_mbuf_head,
- chan->out_mbuf_cur,
- chan->out_mbuf_cur_ptr,
- chan->out_mbuf_cur_len,
- len,
- nextlen);
-#endif
-
- cmd |= HSCX_CMDR_XTF;
- /* collect the data in the scratch buffer */
- for (i = 0; i < nextlen; i++)
- scrbuf[i + len] = chan->out_mbuf_cur_ptr[i];
-
- len += nextlen;
- chan->txcount += nextlen;
-
- chan->out_mbuf_cur_ptr += nextlen;
- chan->out_mbuf_cur_len -= nextlen;
-
- if(chan->out_mbuf_cur_len == 0)
- {
- if((chan->out_mbuf_cur = chan->out_mbuf_cur->m_next) != NULL)
- {
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = (chan->channel == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
- }
- else
- {
- if (chan->bprot != BPROT_NONE)
- cmd |= HSCX_CMDR_XME;
- i4b_Bfreembuf(chan->out_mbuf_head);
- chan->out_mbuf_head = NULL;
- }
- }
- }
- /* write what we have from the scratch buf to the HSCX fifo */
- if (len != 0)
- HSCX_WRFIFO(chan->channel, scrbuf, len);
- return(cmd);
-}
-
-/*---------------------------------------------------------------------------*
- * ifpnp - ISAC interrupt routine
- *---------------------------------------------------------------------------*/
-static void
-ifpnp_isac_intr(struct l1_softc *sc)
-{
- register u_char isac_irq_stat;
-
- for(;;)
- {
- /* get isac irq status */
- isac_irq_stat = ISAC_READ(I_ISTA);
-
- if(isac_irq_stat)
- ifpnp_isac_irq(sc, isac_irq_stat); /* isac handler */
- else
- break;
- }
-
- ISAC_WRITE(I_MASK, 0xff);
-
- DELAY(100);
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-}
-
-/*---------------------------------------------------------------------------*
- * ifpnp_recover - try to recover from irq lockup
- *---------------------------------------------------------------------------*/
-void
-ifpnp_recover(struct l1_softc *sc)
-{
- u_char byte;
-
- /* get isac irq status */
-
- byte = ISAC_READ(I_ISTA);
-
- NDBGL1(L1_ERROR, " ISAC: ISTA = 0x%x", byte);
-
- if(byte & ISAC_ISTA_EXI)
- NDBGL1(L1_ERROR, " ISAC: EXIR = 0x%x", (u_char)ISAC_READ(I_EXIR));
-
- if(byte & ISAC_ISTA_CISQ)
- {
- byte = ISAC_READ(I_CIRR);
-
- NDBGL1(L1_ERROR, " ISAC: CISQ = 0x%x", byte);
-
- if(byte & ISAC_CIRR_SQC)
- NDBGL1(L1_ERROR, " ISAC: SQRR = 0x%x", (u_char)ISAC_READ(I_SQRR));
- }
-
- NDBGL1(L1_ERROR, " ISAC: IMASK = 0x%x", ISAC_IMASK);
-
- ISAC_WRITE(I_MASK, 0xff);
- DELAY(100);
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-}
-
-#endif /* NIFPNP > 0 */
diff --git a/sys/i4b/layer1/ifpnp/i4b_ifpnp_ext.h b/sys/i4b/layer1/ifpnp/i4b_ifpnp_ext.h
deleted file mode 100644
index 3b51860ce9c9..000000000000
--- a/sys/i4b/layer1/ifpnp/i4b_ifpnp_ext.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2000 Gary Jennejohn. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpnp - Fritz!Card PnP for split layers
- * -------------------------------------------
- *
- * $Id: i4b_ifpnp_ext.h,v 1.2 2000/06/02 16:14:36 hm Exp $
- * $Ust: src/i4b/layer1-nb/ifpnp/i4b_ifpnp_ext.h,v 1.4 2000/04/18 08:03:05 ust Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Fri Jun 2 14:54:57 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_IFPNP_EXT_H_
-#define _I4B_IFPNP_EXT_H_
-
-#include <i4b/include/i4b_l3l4.h>
-
-void ifpnp_set_linktab(int unit, int channel, drvr_link_t * dlt);
-isdn_link_t *ifpnp_ret_linktab(int unit, int channel);
-
-int ifpnp_ph_data_req(int unit, struct mbuf *m, int freeflag);
-int ifpnp_ph_activate_req(int unit);
-int ifpnp_mph_command_req(int unit, int command, void *parm);
-
-void ifpnp_isac_irq(struct l1_softc *sc, int ista);
-void ifpnp_isac_l1_cmd(struct l1_softc *sc, int command);
-int ifpnp_isac_init(struct l1_softc *sc);
-
-void ifpnp_recover(struct l1_softc *sc);
-char * ifpnp_printstate(struct l1_softc *sc);
-void ifpnp_next_state(struct l1_softc *sc, int event);
-
-#define IFPNP_MAXUNIT 4
-extern struct l1_softc *ifpnp_scp[IFPNP_MAXUNIT];
-
-#endif /* _I4B_IFPNP_EXT_H_ */
diff --git a/sys/i4b/layer1/ifpnp/i4b_ifpnp_isac.c b/sys/i4b/layer1/ifpnp/i4b_ifpnp_isac.c
deleted file mode 100644
index 83fe1bf7ef58..000000000000
--- a/sys/i4b/layer1/ifpnp/i4b_ifpnp_isac.c
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpnp_isac.c - i4b Fritz PnP ISAC handler
- * ---------------------------------------------
- *
- * $Id: i4b_ifpnp_isac.c,v 1.3 2000/05/29 15:41:41 hm Exp $
- * $Ust: src/i4b/layer1-nb/ifpnp/i4b_ifpnp_isac.c,v 1.4 2000/04/18 08:03:05 ust Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon May 29 15:24:49 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#include "ifpnp.h"
-
-#if (NIFPNP > 0)
-
-#include "opt_i4b.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#include <i4b/layer1/ifpnp/i4b_ifpnp_ext.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_mbuf.h>
-
-static u_char ifpnp_isac_exir_hdlr(register struct l1_softc *sc, u_char exir);
-static void ifpnp_isac_ind_hdlr(register struct l1_softc *sc, int ind);
-
-/*---------------------------------------------------------------------------*
- * ISAC interrupt service routine
- *---------------------------------------------------------------------------*/
-void
-ifpnp_isac_irq(struct l1_softc *sc, int ista)
-{
- register u_char c = 0;
- NDBGL1(L1_F_MSG, "unit %d: ista = 0x%02x", sc->sc_unit, ista);
-
- if(ista & ISAC_ISTA_EXI) /* extended interrupt */
- {
- c |= ifpnp_isac_exir_hdlr(sc, ISAC_READ(I_EXIR));
- }
-
- if(ista & ISAC_ISTA_RME) /* receive message end */
- {
- register int rest;
- u_char rsta;
-
- /* get rx status register */
-
- rsta = ISAC_READ(I_RSTA);
-
- if((rsta & ISAC_RSTA_MASK) != 0x20)
- {
- int error = 0;
-
- if(!(rsta & ISAC_RSTA_CRC)) /* CRC error */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: CRC error", sc->sc_unit);
- }
-
- if(rsta & ISAC_RSTA_RDO) /* ReceiveDataOverflow */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: Data Overrun error", sc->sc_unit);
- }
-
- if(rsta & ISAC_RSTA_RAB) /* ReceiveABorted */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: Receive Aborted error", sc->sc_unit);
- }
-
- if(error == 0)
- NDBGL1(L1_I_ERR, "unit %d: RME unknown error, RSTA = 0x%02x!", sc->sc_unit, rsta);
-
- i4b_Dfreembuf(sc->sc_ibuf);
-
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
-
- ISAC_WRITE(I_CMDR, ISAC_CMDR_RMC|ISAC_CMDR_RRES);
- ISACCMDRWRDELAY();
-
- return;
- }
-
- rest = (ISAC_READ(I_RBCL) & (ISAC_FIFO_LEN-1));
-
- if(rest == 0)
- rest = ISAC_FIFO_LEN;
-
- if(sc->sc_ibuf == NULL)
- {
- if((sc->sc_ibuf = i4b_Dgetmbuf(rest)) != NULL)
- sc->sc_ib = sc->sc_ibuf->m_data;
- else
- panic("ifpnp_isac_irq: RME, i4b_Dgetmbuf returns NULL!\n");
- sc->sc_ilen = 0;
- }
-
- if(sc->sc_ilen <= (MAX_DFRAME_LEN - rest))
- {
- ISAC_RDFIFO(sc->sc_ib, rest);
- sc->sc_ilen += rest;
-
- sc->sc_ibuf->m_pkthdr.len =
- sc->sc_ibuf->m_len = sc->sc_ilen;
-
- if(sc->sc_trace & TRACE_D_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, sc->sc_ibuf->m_len, sc->sc_ibuf->m_data);
- }
-
- c |= ISAC_CMDR_RMC;
-
- if(sc->sc_enabled &&
- (ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S))
- {
- i4b_l1_ph_data_ind(L0IFPNPUNIT(sc->sc_unit), sc->sc_ibuf);
- }
- else
- {
- i4b_Dfreembuf(sc->sc_ibuf);
- }
- }
- else
- {
- NDBGL1(L1_I_ERR, "RME, input buffer overflow!");
- i4b_Dfreembuf(sc->sc_ibuf);
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
- }
-
- if(ista & ISAC_ISTA_RPF) /* receive fifo full */
- {
- if(sc->sc_ibuf == NULL)
- {
- if((sc->sc_ibuf = i4b_Dgetmbuf(MAX_DFRAME_LEN)) != NULL)
- sc->sc_ib= sc->sc_ibuf->m_data;
- else
- panic("ifpnp_isac_irq: RPF, i4b_Dgetmbuf returns NULL!\n");
- sc->sc_ilen = 0;
- }
-
- if(sc->sc_ilen <= (MAX_DFRAME_LEN - ISAC_FIFO_LEN))
- {
- ISAC_RDFIFO(sc->sc_ib, ISAC_FIFO_LEN);
- sc->sc_ilen += ISAC_FIFO_LEN;
- sc->sc_ib += ISAC_FIFO_LEN;
- c |= ISAC_CMDR_RMC;
- }
- else
- {
- NDBGL1(L1_I_ERR, "RPF, input buffer overflow!");
- i4b_Dfreembuf(sc->sc_ibuf);
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
- }
-
- if(ista & ISAC_ISTA_XPR) /* transmit fifo empty (XPR bit set) */
- {
- if((sc->sc_obuf2 != NULL) && (sc->sc_obuf == NULL))
- {
- sc->sc_freeflag = sc->sc_freeflag2;
- sc->sc_obuf = sc->sc_obuf2;
- sc->sc_op = sc->sc_obuf->m_data;
- sc->sc_ol = sc->sc_obuf->m_len;
- sc->sc_obuf2 = NULL;
-#ifdef NOTDEF
- printf("ob2=%x, op=%x, ol=%d, f=%d #",
- sc->sc_obuf,
- sc->sc_op,
- sc->sc_ol,
- sc->sc_state);
-#endif
- }
- else
- {
-#ifdef NOTDEF
- printf("ob=%x, op=%x, ol=%d, f=%d #",
- sc->sc_obuf,
- sc->sc_op,
- sc->sc_ol,
- sc->sc_state);
-#endif
- }
-
- if(sc->sc_obuf)
- {
- ISAC_WRFIFO(sc->sc_op, min(sc->sc_ol, ISAC_FIFO_LEN));
-
- if(sc->sc_ol > ISAC_FIFO_LEN) /* length > 32 ? */
- {
- sc->sc_op += ISAC_FIFO_LEN; /* bufferptr+32 */
- sc->sc_ol -= ISAC_FIFO_LEN; /* length - 32 */
- c |= ISAC_CMDR_XTF; /* set XTF bit */
- }
- else
- {
- if(sc->sc_freeflag)
- {
- i4b_Dfreembuf(sc->sc_obuf);
- sc->sc_freeflag = 0;
- }
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
-
- c |= ISAC_CMDR_XTF | ISAC_CMDR_XME;
- }
- }
- else
- {
- sc->sc_state &= ~ISAC_TX_ACTIVE;
- }
- }
-
- if(ista & ISAC_ISTA_CISQ) /* channel status change CISQ */
- {
- register u_char ci;
-
- /* get command/indication rx register*/
-
- ci = ISAC_READ(I_CIRR);
-
- /* if S/Q IRQ, read SQC reg to clr SQC IRQ */
-
- if(ci & ISAC_CIRR_SQC)
- (void) ISAC_READ(I_SQRR);
-
- /* C/I code change IRQ (flag already cleared by CIRR read) */
-
- if(ci & ISAC_CIRR_CIC0)
- ifpnp_isac_ind_hdlr(sc, (ci >> 2) & 0xf);
- }
-
- if(c)
- {
- ISAC_WRITE(I_CMDR, c);
- ISACCMDRWRDELAY();
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ISAC L1 Extended IRQ handler
- *---------------------------------------------------------------------------*/
-static u_char
-ifpnp_isac_exir_hdlr(register struct l1_softc *sc, u_char exir)
-{
- u_char c = 0;
-
- if(exir & ISAC_EXIR_XMR)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Tx Message Repeat");
-
- c |= ISAC_CMDR_XRES;
- }
-
- if(exir & ISAC_EXIR_XDU)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Tx Data Underrun");
-
- c |= ISAC_CMDR_XRES;
- }
-
- if(exir & ISAC_EXIR_PCE)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Protocol Error");
- }
-
- if(exir & ISAC_EXIR_RFO)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Rx Frame Overflow");
-
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
-
- if(exir & ISAC_EXIR_SOV)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Sync Xfer Overflow");
- }
-
- if(exir & ISAC_EXIR_MOS)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Monitor Status");
- }
-
- if(exir & ISAC_EXIR_SAW)
- {
- /* cannot happen, STCR:TSF is set to 0 */
-
- NDBGL1(L1_I_ERR, "EXIRQ Subscriber Awake");
- }
-
- if(exir & ISAC_EXIR_WOV)
- {
- /* cannot happen, STCR:TSF is set to 0 */
-
- NDBGL1(L1_I_ERR, "EXIRQ Watchdog Timer Overflow");
- }
-
- return(c);
-}
-
-/*---------------------------------------------------------------------------*
- * ISAC L1 Indication handler
- *---------------------------------------------------------------------------*/
-static void
-ifpnp_isac_ind_hdlr(register struct l1_softc *sc, int ind)
-{
- register int event;
-
- switch(ind)
- {
- case ISAC_CIRR_IAI8:
- NDBGL1(L1_I_CICO, "rx AI8 in state %s", ifpnp_printstate(sc));
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- ifpnp_isac_l1_cmd(sc, CMD_AR8);
- event = EV_INFO48;
- i4b_l1_mph_status_ind(L0IFPNPUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- break;
-
- case ISAC_CIRR_IAI10:
- NDBGL1(L1_I_CICO, "rx AI10 in state %s", ifpnp_printstate(sc));
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- ifpnp_isac_l1_cmd(sc, CMD_AR10);
- event = EV_INFO410;
- i4b_l1_mph_status_ind(L0IFPNPUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- break;
-
- case ISAC_CIRR_IRSY:
- NDBGL1(L1_I_CICO, "rx RSY in state %s", ifpnp_printstate(sc));
- event = EV_RSY;
- break;
-
- case ISAC_CIRR_IPU:
- NDBGL1(L1_I_CICO, "rx PU in state %s", ifpnp_printstate(sc));
- event = EV_PU;
- break;
-
- case ISAC_CIRR_IDR:
- NDBGL1(L1_I_CICO, "rx DR in state %s", ifpnp_printstate(sc));
- ifpnp_isac_l1_cmd(sc, CMD_DIU);
- event = EV_DR;
- break;
-
- case ISAC_CIRR_IDID:
- NDBGL1(L1_I_CICO, "rx DID in state %s", ifpnp_printstate(sc));
- event = EV_INFO0;
- i4b_l1_mph_status_ind(L0IFPNPUNIT(sc->sc_unit), STI_L1STAT, LAYER_IDLE, NULL);
- break;
-
- case ISAC_CIRR_IDIS:
- NDBGL1(L1_I_CICO, "rx DIS in state %s", ifpnp_printstate(sc));
- event = EV_DIS;
- break;
-
- case ISAC_CIRR_IEI:
- NDBGL1(L1_I_CICO, "rx EI in state %s", ifpnp_printstate(sc));
- ifpnp_isac_l1_cmd(sc, CMD_DIU);
- event = EV_EI;
- break;
-
- case ISAC_CIRR_IARD:
- NDBGL1(L1_I_CICO, "rx ARD in state %s", ifpnp_printstate(sc));
- event = EV_INFO2;
- break;
-
- case ISAC_CIRR_ITI:
- NDBGL1(L1_I_CICO, "rx TI in state %s", ifpnp_printstate(sc));
- event = EV_INFO0;
- break;
-
- case ISAC_CIRR_IATI:
- NDBGL1(L1_I_CICO, "rx ATI in state %s", ifpnp_printstate(sc));
- event = EV_INFO0;
- break;
-
- case ISAC_CIRR_ISD:
- NDBGL1(L1_I_CICO, "rx SD in state %s", ifpnp_printstate(sc));
- event = EV_INFO0;
- break;
-
- default:
- NDBGL1(L1_I_ERR, "UNKNOWN Indication 0x%x in state %s", ind, ifpnp_printstate(sc));
- event = EV_INFO0;
- break;
- }
- ifpnp_next_state(sc, event);
-}
-
-/*---------------------------------------------------------------------------*
- * execute a layer 1 command
- *---------------------------------------------------------------------------*/
-void
-ifpnp_isac_l1_cmd(struct l1_softc *sc, int command)
-{
- u_char cmd;
-
-#ifdef I4B_SMP_WORKAROUND
-
- /* XXXXXXXXXXXXXXXXXXX */
-
- /*
- * patch from Wolfgang Helbig:
- *
- * Here is a patch that makes i4b work on an SMP:
- * The card (TELES 16.3) didn't interrupt on an SMP machine.
- * This is a gross workaround, but anyway it works *and* provides
- * some information as how to finally fix this problem.
- */
-
- HSCX_WRITE(0, H_MASK, 0xff);
- HSCX_WRITE(1, H_MASK, 0xff);
- ISAC_WRITE(I_MASK, 0xff);
- DELAY(100);
- HSCX_WRITE(0, H_MASK, HSCX_A_IMASK);
- HSCX_WRITE(1, H_MASK, HSCX_B_IMASK);
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- /* XXXXXXXXXXXXXXXXXXX */
-
-#endif /* I4B_SMP_WORKAROUND */
-
- if(command < 0 || command > CMD_ILL)
- {
- NDBGL1(L1_I_ERR, "illegal cmd 0x%x in state %s", command, ifpnp_printstate(sc));
- return;
- }
-
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- cmd = ISAC_CIX0_LOW;
- else
- cmd = 0;
-
- switch(command)
- {
- case CMD_TIM:
- NDBGL1(L1_I_CICO, "tx TIM in state %s", ifpnp_printstate(sc));
- cmd |= (ISAC_CIXR_CTIM << 2);
- break;
-
- case CMD_RS:
- NDBGL1(L1_I_CICO, "tx RS in state %s", ifpnp_printstate(sc));
- cmd |= (ISAC_CIXR_CRS << 2);
- break;
-
- case CMD_AR8:
- NDBGL1(L1_I_CICO, "tx AR8 in state %s", ifpnp_printstate(sc));
- cmd |= (ISAC_CIXR_CAR8 << 2);
- break;
-
- case CMD_AR10:
- NDBGL1(L1_I_CICO, "tx AR10 in state %s", ifpnp_printstate(sc));
- cmd |= (ISAC_CIXR_CAR10 << 2);
- break;
-
- case CMD_DIU:
- NDBGL1(L1_I_CICO, "tx DIU in state %s", ifpnp_printstate(sc));
- cmd |= (ISAC_CIXR_CDIU << 2);
- break;
- }
- ISAC_WRITE(I_CIXR, cmd);
-}
-
-/*---------------------------------------------------------------------------*
- * L1 ISAC initialization
- *---------------------------------------------------------------------------*/
-int
-ifpnp_isac_init(struct l1_softc *sc)
-{
- ISAC_IMASK = 0xff; /* disable all irqs */
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- if(sc->sc_bustyp != BUS_TYPE_IOM2)
- {
- NDBGL1(L1_I_SETUP, "configuring for IOM-1 mode");
-
- /* ADF2: Select mode IOM-1 */
- ISAC_WRITE(I_ADF2, 0x00);
-
- /* SPCR: serial port control register:
- * SPU - software power up = 0
- * SAC - SIP port high Z
- * SPM - timing mode 0
- * TLP - test loop = 0
- * C1C, C2C - B1 and B2 switched to/from SPa
- */
- ISAC_WRITE(I_SPCR, ISAC_SPCR_C1C1|ISAC_SPCR_C2C1);
-
- /* SQXR: S/Q channel xmit register:
- * SQIE - S/Q IRQ enable = 0
- * SQX1-4 - Fa bits = 1
- */
- ISAC_WRITE(I_SQXR, ISAC_SQXR_SQX1|ISAC_SQXR_SQX2|ISAC_SQXR_SQX3|ISAC_SQXR_SQX4);
-
- /* ADF1: additional feature reg 1:
- * WTC - watchdog = 0
- * TEM - test mode = 0
- * PFS - pre-filter = 0
- * CFS - IOM clock/frame always active
- * FSC1/2 - polarity of 8kHz strobe
- * ITF - interframe fill = idle
- */
- ISAC_WRITE(I_ADF1, ISAC_ADF1_FC2); /* ADF1 */
-
- /* STCR: sync transfer control reg:
- * TSF - terminal secific functions = 0
- * TBA - TIC bus address = 7
- * STx/SCx = 0
- */
- ISAC_WRITE(I_STCR, ISAC_STCR_TBA2|ISAC_STCR_TBA1|ISAC_STCR_TBA0);
-
- /* MODE: Mode Register:
- * MDSx - transparent mode 2
- * TMD - timer mode = external
- * RAC - Receiver enabled
- * DIMx - digital i/f mode
- */
- ISAC_WRITE(I_MODE, ISAC_MODE_MDS2|ISAC_MODE_MDS1|ISAC_MODE_RAC|ISAC_MODE_DIM0);
- }
- else
- {
- NDBGL1(L1_I_SETUP, "configuring for IOM-2 mode");
-
- /* ADF2: Select mode IOM-2 */
- ISAC_WRITE(I_ADF2, ISAC_ADF2_IMS);
-
- /* SPCR: serial port control register:
- * SPU - software power up = 0
- * SPM - timing mode 0
- * TLP - test loop = 0
- * C1C, C2C - B1 + C1 and B2 + IC2 monitoring
- */
- ISAC_WRITE(I_SPCR, 0x00);
-
- /* SQXR: S/Q channel xmit register:
- * IDC - IOM direction = 0 (master)
- * CFS - Config Select = 0 (clock always active)
- * CI1E - C/I channel 1 IRQ enable = 0
- * SQIE - S/Q IRQ enable = 0
- * SQX1-4 - Fa bits = 1
- */
- ISAC_WRITE(I_SQXR, ISAC_SQXR_SQX1|ISAC_SQXR_SQX2|ISAC_SQXR_SQX3|ISAC_SQXR_SQX4);
-
- /* ADF1: additional feature reg 1:
- * WTC - watchdog = 0
- * TEM - test mode = 0
- * PFS - pre-filter = 0
- * IOF - IOM i/f off = 0
- * ITF - interframe fill = idle
- */
- ISAC_WRITE(I_ADF1, 0x00);
-
- /* STCR: sync transfer control reg:
- * TSF - terminal secific functions = 0
- * TBA - TIC bus address = 7
- * STx/SCx = 0
- */
- ISAC_WRITE(I_STCR, ISAC_STCR_TBA2|ISAC_STCR_TBA1|ISAC_STCR_TBA0);
-
- /* MODE: Mode Register:
- * MDSx - transparent mode 2
- * TMD - timer mode = external
- * RAC - Receiver enabled
- * DIMx - digital i/f mode
- */
- ISAC_WRITE(I_MODE, ISAC_MODE_MDS2|ISAC_MODE_MDS1|ISAC_MODE_RAC|ISAC_MODE_DIM0);
- }
-
-#ifdef NOTDEF
- /*
- * XXX a transmitter reset causes an ISAC tx IRQ which will not
- * be serviced at attach time under some circumstances leaving
- * the associated IRQ line on the ISA bus active. This prevents
- * any further interrupts to be serviced because no low -> high
- * transition can take place anymore. (-hm)
- */
-
- /* command register:
- * RRES - HDLC receiver reset
- * XRES - transmitter reset
- */
- ISAC_WRITE(I_CMDR, ISAC_CMDR_RRES|ISAC_CMDR_XRES);
- ISACCMDRWRDELAY();
-#endif
-
- /* enabled interrupts:
- * ===================
- * RME - receive message end
- * RPF - receive pool full
- * XPR - transmit pool ready
- * CISQ - CI or S/Q channel change
- * EXI - extended interrupt
- */
-
- ISAC_IMASK = ISAC_MASK_RSC | /* auto mode only */
- ISAC_MASK_TIN | /* timer irq */
- ISAC_MASK_SIN; /* sync xfer irq */
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- return(0);
-}
-
-#endif /* NIFPNP > 0 */
diff --git a/sys/i4b/layer1/ifpnp/i4b_ifpnp_l1.c b/sys/i4b/layer1/ifpnp/i4b_ifpnp_l1.c
deleted file mode 100644
index f2b4ad228397..000000000000
--- a/sys/i4b/layer1/ifpnp/i4b_ifpnp_l1.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpnp_l1.c - AVM Fritz PnP layer 1 handler
- * ----------------------------------------------
- *
- * $Id: i4b_ifpnp_l1.c,v 1.4 2000/06/02 16:14:36 hm Exp $
- * $Ust: src/i4b/layer1-nb/ifpnp/i4b_ifpnp_l1.c,v 1.4 2000/04/18 08:03:05 ust Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Fri Jun 2 14:55:49 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#include "ifpnp.h"
-
-#if (NIFPNP > 0)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-
-#include <i4b/layer1/ifpnp/i4b_ifpnp_ext.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_mbuf.h>
-#include <i4b/include/i4b_global.h>
-
-/*---------------------------------------------------------------------------*
- *
- * L2 -> L1: PH-DATA-REQUEST
- * =========================
- *
- * parms:
- * unit physical interface unit number
- * m mbuf containing L2 frame to be sent out
- * freeflag MBUF_FREE: free mbuf here after having sent
- * it out
- * MBUF_DONTFREE: mbuf is freed by Layer 2
- * returns:
- * ==0 fail, nothing sent out
- * !=0 ok, frame sent out
- *
- *---------------------------------------------------------------------------*/
-int
-ifpnp_ph_data_req(int unit, struct mbuf *m, int freeflag)
-{
- u_char cmd;
- int s;
- struct l1_softc *sc = ifpnp_scp[unit];
-
-#ifdef NOTDEF
- NDBGL1(L1_PRIM, "PH-DATA-REQ, unit %d, freeflag=%d", unit, freeflag);
-#endif
-
- if(m == NULL) /* failsafe */
- return (0);
-
- s = SPLI4B();
-
- if(sc->sc_I430state == ST_F3) /* layer 1 not running ? */
- {
- NDBGL1(L1_I_ERR, "still in state F3!");
- ifpnp_ph_activate_req(unit);
- }
-
- if(sc->sc_state & ISAC_TX_ACTIVE)
- {
- if(sc->sc_obuf2 == NULL)
- {
- sc->sc_obuf2 = m; /* save mbuf ptr */
-
- if(freeflag)
- sc->sc_freeflag2 = 1; /* IRQ must mfree */
- else
- sc->sc_freeflag2 = 0; /* IRQ must not mfree */
-
- NDBGL1(L1_I_MSG, "using 2nd ISAC TX buffer, state = %s", ifpnp_printstate(sc));
-
- if(sc->sc_trace & TRACE_D_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPNPUNIT(unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
- splx(s);
- return(1);
- }
-
- NDBGL1(L1_I_ERR, "No Space in TX FIFO, state = %s", ifpnp_printstate(sc));
-
- if(freeflag == MBUF_FREE)
- i4b_Dfreembuf(m);
-
- splx(s);
- return (0);
- }
-
- if(sc->sc_trace & TRACE_D_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IFPNPUNIT(unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
-
- sc->sc_state |= ISAC_TX_ACTIVE; /* set transmitter busy flag */
-
- NDBGL1(L1_I_MSG, "ISAC_TX_ACTIVE set");
-
- sc->sc_freeflag = 0; /* IRQ must NOT mfree */
-
- ISAC_WRFIFO(m->m_data, min(m->m_len, ISAC_FIFO_LEN)); /* output to TX fifo */
-
- if(m->m_len > ISAC_FIFO_LEN) /* message > 32 bytes ? */
- {
- sc->sc_obuf = m; /* save mbuf ptr */
- sc->sc_op = m->m_data + ISAC_FIFO_LEN; /* ptr for irq hdl */
- sc->sc_ol = m->m_len - ISAC_FIFO_LEN; /* length for irq hdl */
-
- if(freeflag)
- sc->sc_freeflag = 1; /* IRQ must mfree */
-
- cmd = ISAC_CMDR_XTF;
- }
- else
- {
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
-
- if(freeflag)
- i4b_Dfreembuf(m);
-
- cmd = ISAC_CMDR_XTF | ISAC_CMDR_XME;
- }
-
- ISAC_WRITE(I_CMDR, cmd);
- ISACCMDRWRDELAY();
-
- splx(s);
-
- return(1);
-}
-
-/*---------------------------------------------------------------------------*
- *
- * L2 -> L1: PH-ACTIVATE-REQUEST
- * =============================
- *
- * parms:
- * unit physical interface unit number
- *
- * returns:
- * ==0
- * !=0
- *
- *---------------------------------------------------------------------------*/
-int
-ifpnp_ph_activate_req(int unit)
-{
- struct l1_softc *sc = ifpnp_scp[unit];
- NDBGL1(L1_PRIM, "PH-ACTIVATE-REQ, unit %d\n", unit);
- ifpnp_next_state(sc, EV_PHAR);
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * command from the upper layers
- *---------------------------------------------------------------------------*/
-int
-ifpnp_mph_command_req(int unit, int command, void *parm)
-{
- struct l1_softc *sc = ifpnp_scp[unit];
-
- switch(command)
- {
- case CMR_DOPEN: /* daemon running */
- NDBGL1(L1_PRIM, "unit %d, command = CMR_DOPEN", unit);
- sc->sc_enabled = 1;
- break;
-
- case CMR_DCLOSE: /* daemon not running */
- NDBGL1(L1_PRIM, "unit %d, command = CMR_DCLOSE", unit);
- sc->sc_enabled = 0;
- break;
-
- case CMR_SETTRACE:
- NDBGL1(L1_PRIM, "unit %d, command = CMR_SETTRACE, parm = %d", unit, (unsigned int)parm);
- sc->sc_trace = (unsigned int)parm;
- break;
-
- default:
- NDBGL1(L1_ERROR, "ERROR, unknown command = %d, unit = %d, parm = %d", command, unit, (unsigned int)parm);
- break;
- }
-
- return(0);
-}
-
-#endif /* NIFPNP > 0 */
diff --git a/sys/i4b/layer1/ifpnp/i4b_ifpnp_l1fsm.c b/sys/i4b/layer1/ifpnp/i4b_ifpnp_l1fsm.c
deleted file mode 100644
index 26b154031b5e..000000000000
--- a/sys/i4b/layer1/ifpnp/i4b_ifpnp_l1fsm.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/*
- * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ifpnp_l1fsm.c - AVM Fritz PnP layer 1 I.430 state machine
- * -------------------------------------------------------------
- *
- * $Id: i4b_ifpnp_l1fsm.c,v 1.4 2000/05/29 15:41:41 hm Exp $
- * $Ust: src/i4b/layer1-nb/ifpnp/i4b_ifpnp_l1fsm.c,v 1.4 2000/04/18 08:03:05 ust Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon May 29 15:25:04 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#include "ifpnp.h"
-
-#if (NIFPNP > 0)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_global.h>
-
-#include <i4b/include/i4b_mbuf.h>
-
-#include <i4b/layer1/ifpnp/i4b_ifpnp_ext.h>
-
-#if DO_I4B_DEBUG
-static char *state_text[N_STATES] = {
- "F3 Deactivated",
- "F4 Awaiting Signal",
- "F5 Identifying Input",
- "F6 Synchronized",
- "F7 Activated",
- "F8 Lost Framing",
- "Illegal State"
-};
-
-static char *event_text[N_EVENTS] = {
- "EV_PHAR PH_ACT_REQ",
- "EV_T3 Timer 3 expired",
- "EV_INFO0 INFO0 received",
- "EV_RSY Level Detected",
- "EV_INFO2 INFO2 received",
- "EV_INFO48 INFO4 received",
- "EV_INFO410 INFO4 received",
- "EV_DR Deactivate Req",
- "EV_PU Power UP",
- "EV_DIS Disconnected",
- "EV_EI Error Ind",
- "Illegal Event"
-};
-#endif
-
-/* Function prototypes */
-
-static void timer3_expired (struct l1_softc *sc);
-static void T3_start (struct l1_softc *sc);
-static void T3_stop (struct l1_softc *sc);
-static void F_T3ex (struct l1_softc *sc);
-static void timer4_expired (struct l1_softc *sc);
-static void T4_start (struct l1_softc *sc);
-static void T4_stop (struct l1_softc *sc);
-static void F_AI8 (struct l1_softc *sc);
-static void F_AI10 (struct l1_softc *sc);
-static void F_I01 (struct l1_softc *sc);
-static void F_I02 (struct l1_softc *sc);
-static void F_I03 (struct l1_softc *sc);
-static void F_I2 (struct l1_softc *sc);
-static void F_ill (struct l1_softc *sc);
-static void F_NULL (struct l1_softc *sc);
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 expire function
- *---------------------------------------------------------------------------*/
-static void
-timer3_expired(struct l1_softc *sc)
-{
- if(sc->sc_I430T3)
- {
- NDBGL1(L1_T_ERR, "state = %s", ifpnp_printstate(sc));
- sc->sc_I430T3 = 0;
-
- /* XXX try some recovery here XXX */
-
- ifpnp_recover(sc);
-
- sc->sc_init_tries++; /* increment retry count */
-
-/*XXX*/ if(sc->sc_init_tries > 4)
- {
- int s = SPLI4B();
-
- sc->sc_init_tries = 0;
-
- if(sc->sc_obuf2 != NULL)
- {
- i4b_Dfreembuf(sc->sc_obuf2);
- sc->sc_obuf2 = NULL;
- }
- if(sc->sc_obuf != NULL)
- {
- i4b_Dfreembuf(sc->sc_obuf);
- sc->sc_obuf = NULL;
- sc->sc_freeflag = 0;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
- }
-
- splx(s);
-
- i4b_l1_mph_status_ind(L0IFPNPUNIT(sc->sc_unit), STI_NOL1ACC, 0, NULL);
- }
-
- ifpnp_next_state(sc, EV_T3);
- }
- else
- {
- NDBGL1(L1_T_ERR, "expired without starting it ....");
- }
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 start
- *---------------------------------------------------------------------------*/
-static void
-T3_start(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", ifpnp_printstate(sc));
- sc->sc_I430T3 = 1;
- sc->sc_T3_callout = timeout((TIMEOUT_FUNC_T)timer3_expired,(struct l1_softc *)sc, 2*hz);
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 stop
- *---------------------------------------------------------------------------*/
-static void
-T3_stop(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", ifpnp_printstate(sc));
-
- sc->sc_init_tries = 0; /* init connect retry count */
-
- if(sc->sc_I430T3)
- {
- sc->sc_I430T3 = 0;
- untimeout((TIMEOUT_FUNC_T)timer3_expired,(struct l1_softc *)sc, sc->sc_T3_callout);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 expiry
- *---------------------------------------------------------------------------*/
-static void
-F_T3ex(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_T3ex executing");
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0IFPNPUNIT(sc->sc_unit));
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 expire function
- *---------------------------------------------------------------------------*/
-static void
-timer4_expired(struct l1_softc *sc)
-{
- if(sc->sc_I430T4)
- {
- NDBGL1(L1_T_MSG, "state = %s", ifpnp_printstate(sc));
- sc->sc_I430T4 = 0;
- i4b_l1_mph_status_ind(L0IFPNPUNIT(sc->sc_unit), STI_PDEACT, 0, NULL);
- }
- else
- {
- NDBGL1(L1_T_ERR, "expired without starting it ....");
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 start
- *---------------------------------------------------------------------------*/
-static void
-T4_start(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", ifpnp_printstate(sc));
- sc->sc_I430T4 = 1;
- sc->sc_T4_callout = timeout((TIMEOUT_FUNC_T)timer4_expired,(struct l1_softc *)sc, hz);
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 stop
- *---------------------------------------------------------------------------*/
-static void
-T4_stop(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", ifpnp_printstate(sc));
-
- if(sc->sc_I430T4)
- {
- sc->sc_I430T4 = 0;
- untimeout((TIMEOUT_FUNC_T)timer4_expired,(struct l1_softc *)sc, sc->sc_T4_callout);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received AI8
- *---------------------------------------------------------------------------*/
-static void
-F_AI8(struct l1_softc *sc)
-{
- T4_stop(sc);
-
- NDBGL1(L1_F_MSG, "FSM function F_AI8 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_activate_ind(L0IFPNPUNIT(sc->sc_unit));
-
- T3_stop(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO4_8;
-
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received AI10
- *---------------------------------------------------------------------------*/
-static void
-F_AI10(struct l1_softc *sc)
-{
- T4_stop(sc);
-
- NDBGL1(L1_F_MSG, "FSM function F_AI10 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_activate_ind(L0IFPNPUNIT(sc->sc_unit));
-
- T3_stop(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO4_10;
-
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in states F3 .. F5
- *---------------------------------------------------------------------------*/
-static void
-F_I01(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I01 executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in state F6
- *---------------------------------------------------------------------------*/
-static void
-F_I02(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I02 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0IFPNPUNIT(sc->sc_unit));
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in state F7 or F8
- *---------------------------------------------------------------------------*/
-static void
-F_I03(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I03 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0IFPNPUNIT(sc->sc_unit));
-
- T4_start(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: activate request
- *---------------------------------------------------------------------------*/
-static void
-F_AR(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_AR executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO1_8;
-
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_TE;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-
- ifpnp_isac_l1_cmd(sc, CMD_AR8);
-
- T3_start(sc);
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO2
- *---------------------------------------------------------------------------*/
-static void
-F_I2(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I2 executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO2;
-
- hdr.unit = L0IFPNPUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-
-}
-
-/*---------------------------------------------------------------------------*
- * illegal state default action
- *---------------------------------------------------------------------------*/
-static void
-F_ill(struct l1_softc *sc)
-{
- NDBGL1(L1_F_ERR, "FSM function F_ill executing");
-}
-
-/*---------------------------------------------------------------------------*
- * No action
- *---------------------------------------------------------------------------*/
-static void
-F_NULL(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_NULL executing");
-}
-
-
-/*---------------------------------------------------------------------------*
- * layer 1 state transition table
- *---------------------------------------------------------------------------*/
-struct ifpnp_state_tab {
- void (*func) (struct l1_softc *sc); /* function to execute */
- int newstate; /* next state */
-} ifpnp_state_tab[N_EVENTS][N_STATES] = {
-
-/* STATE: F3 F4 F5 F6 F7 F8 ILLEGAL STATE */
-/* -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
-/* EV_PHAR x*/ {{F_AR, ST_F4}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_ill, ST_ILL}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_T3 x*/ {{F_NULL, ST_F3}, {F_T3ex, ST_F3}, {F_T3ex, ST_F3}, {F_T3ex, ST_F3}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_INFO0 */ {{F_I01, ST_F3}, {F_I01, ST_F4}, {F_I01, ST_F5}, {F_I02, ST_F3}, {F_I03, ST_F3}, {F_I03, ST_F3}, {F_ill, ST_ILL}},
-/* EV_RSY x*/ {{F_NULL, ST_F3}, {F_NULL, ST_F5}, {F_NULL, ST_F5}, {F_NULL, ST_F8}, {F_NULL, ST_F8}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_INFO2 */ {{F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_ill, ST_ILL}},
-/* EV_INFO48*/ {{F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_NULL, ST_F7}, {F_AI8, ST_F7}, {F_ill, ST_ILL}},
-/* EV_INFO41*/ {{F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_NULL, ST_F7}, {F_AI10, ST_F7}, {F_ill, ST_ILL}},
-/* EV_DR */ {{F_NULL, ST_F3}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_PU */ {{F_NULL, ST_F3}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_DIS */ {{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}},
-/* EV_EI */ {{F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_ill, ST_ILL}},
-/* EV_ILL */ {{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}}
-};
-
-/*---------------------------------------------------------------------------*
- * event handler
- *---------------------------------------------------------------------------*/
-void
-ifpnp_next_state(struct l1_softc *sc, int event)
-{
- int currstate, newstate;
-
- if(event >= N_EVENTS)
- panic("i4b_l1fsm.c: event >= N_EVENTS\n");
-
- currstate = sc->sc_I430state;
-
- if(currstate >= N_STATES)
- panic("i4b_l1fsm.c: currstate >= N_STATES\n");
-
- newstate = ifpnp_state_tab[event][currstate].newstate;
-
- if(newstate >= N_STATES)
- panic("i4b_l1fsm.c: newstate >= N_STATES\n");
-
- NDBGL1(L1_F_MSG, "FSM event [%s]: [%s => %s]", event_text[event],
- state_text[currstate],
- state_text[newstate]);
-
- (*ifpnp_state_tab[event][currstate].func)(sc);
-
- if(newstate == ST_ILL)
- {
- newstate = ST_F3;
- NDBGL1(L1_F_ERR, "FSM Illegal State ERROR, oldstate = %s, newstate = %s, event = %s!",
- state_text[currstate],
- state_text[newstate],
- event_text[event]);
- }
-
- sc->sc_I430state = newstate;
-}
-
-#if DO_I4B_DEBUG
-/*---------------------------------------------------------------------------*
- * return pointer to current state description
- *---------------------------------------------------------------------------*/
-char *
-ifpnp_printstate(struct l1_softc *sc)
-{
- return((char *) state_text[sc->sc_I430state]);
-}
-#endif
-
-#endif /* NIFPNP > 0 */
diff --git a/sys/i4b/layer1/ihfc/i4b_ihfc.h b/sys/i4b/layer1/ihfc/i4b_ihfc.h
deleted file mode 100644
index 1036636629f9..000000000000
--- a/sys/i4b/layer1/ihfc/i4b_ihfc.h
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
- * Copyright (c) 2000 Hans Petter Selasky. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ihfc.h - ihfc common header file
- * ------------------------------------
- *
- * last edit-date: [Wed Jul 19 09:40:45 2000]
- *
- * $Id: i4b_ihfc.h,v 1.9 2000/09/19 13:50:36 hm Exp $
- *
- * $FreeBSD$
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_IHFC_H_
-#define _I4B_IHFC_H_
-
-#include <i4b/include/i4b_l3l4.h>
-
-/*---------------------------------------------------------------------------*
- * global stuff (HFC-1/S/SP)
- *---------------------------------------------------------------------------*/
-#define DCH_MAX_LEN 264 /* max length of a D frame */
-
-#define IHFC_ACTIVATION_TIMEOUT 3*hz /* S0-bus must activate before this time */
-
-#define IHFC_IO_BASES 1
-
-#define IHFC_DISBUSYTO 500 /* do at least 500 inb's before giving up */
-#define IHFC_NONBUSYTO 8000 /* do at least 8000 inb's before giving up */
-
-#define IHFC_NTMODE 0 /* use TE-mode as default */
-#define IHFC_DLP 0 /* use (8/9) priority as default */
-
-#define IHFC_MAXUNIT 4
-
-/* #define IHFC_DEBUG internal debugging enabled *
- * #undef IHFC_DEBUG internal debugging disabled */
-
-/* chan: *
- * 0 - D1 (tx) *
- * 1 - D1 (rx) *
- * 2 - B1 (tx) *
- * 3 - B1 (rx) *
- * 4 - B2 (tx) *
- * 5 - B2 (rx) */
-
-#define HFC_1 0x01 /* HFC 2B */
-#define HFC_S 0x02 /* HFC - S 2BDS0 */
-#define HFC_SP 0x04 /* HFC - SP 2BDS0 */
-#define HFC_SPCI 0x08 /* HFC - SPCI 2BDS0 X */
-#define HFC_S2M 0x10 /* HFC - S2M 2BDS0 X */
-#define HFC_USB 0x20 /* HFC - USB 2BDS0 X */
-
-/*---------------------------------------------------------------------------*
- * "Help Fix Corruption" macros (HFC-1/S/SP)
- *
- * NOTE: If the code does not run at splhigh, we will sporadically
- * lose bytes. On fast PC's (200 Mhz), this is very little noticable.
- *---------------------------------------------------------------------------*/
-#define HFC_VAR int _s_ /* declare variable */
-#define HFC_BEG _s_ = splhigh() /* save spl */
-#define HFC_END splx(_s_) /* restore spl */
-
-/*---------------------------------------------------------------------------*
- * macros related to i4b linking (HFC-1/S/SP)
- *---------------------------------------------------------------------------*/
-#define S_BLINK sc->sc_blinktab[(chan > 3) ? 1 : 0]
-#define S_BDRVLINK sc->sc_bdrvlinktab[(chan > 3) ? 1 : 0]
-
-/*---------------------------------------------------------------------------*
- * macros related to ihfc_sc (HFC-1/S/SP)
- *---------------------------------------------------------------------------*/
-
-/* statemachine */
-
-#define S_IOM2 (sc->sc_config.i_adf2 & 0x80)
- /* 0x80: IOM2 mode selected */
-
-#define S_DLP (sc->sc_config.dlp)
-#define S_NTMODE (sc->sc_config.ntmode)
-#define S_STDEL (sc->sc_config.stdel)
-
-#define S_PHSTATE sc->sc_statemachine.state
-#define S_STM_T3 sc->sc_statemachine.T3
-#define S_STM_T3CALLOUT sc->sc_statemachine.T3callout
-
-/* unitnumbers */
-
-#define S_UNIT sc->sc_unit
-#define S_FLAG sc->sc_flag
-#define S_I4BUNIT sc->sc_i4bunit
-#define S_I4BFLAG sc->sc_i4bflag
-
-/* ISA bus setup */
-
-#define S_IOBASE sc->sc_resources.io_base
-#define S_IORID sc->sc_resources.io_rid
-#define S_IRQ sc->sc_resources.irq
-#define S_IRQRID sc->sc_resources.irq_rid
-
-/* hardware setup */
-
-#define S_HFC sc->sc_config.chiptype
-#define S_IIO sc->sc_config.iio
-#define S_IIRQ sc->sc_config.iirq
-
-/* registers of the HFC-S/SP (write only) */
-
-#define S_HFC_CONFIG sc->sc_config.cirm
-
-#define S_CIRM sc->sc_config.cirm
-#define S_CTMT sc->sc_config.ctmt
-#define S_TEST sc->sc_config.test
-#define S_SCTRL sc->sc_config.sctrl
-#define S_CLKDEL sc->sc_config.clkdel
-#define S_INT_M1 sc->sc_config.int_m1
-#define S_INT_M2 sc->sc_config.int_m2
-#define S_CONNECT sc->sc_config.connect
-#define S_SCTRL_R sc->sc_config.sctrl_r
-#define S_MST_MODE sc->sc_config.mst_mode
-
-/* registers of the HFC-S/SP (read only) */
-
-#define S_INT_S1 sc->sc_config.int_s1
-
-/* registers of the ISAC (write only) */
-
-#define S_ISAC_CONFIG sc->sc_config.i_adf2
-
-#define S_ADF1 sc->sc_config.i_adf1
-#define S_ADF2 sc->sc_config.i_adf2
-#define S_MASK sc->sc_config.i_mask
-#define S_MODE sc->sc_config.i_mode
-#define S_SPCR sc->sc_config.i_spcr
-#define S_SQXR sc->sc_config.i_sqxr
-#define S_STCR sc->sc_config.i_stcr
-#define S_STAR2 sc->sc_config.i_star2
-
-/* registers of the ISAC (read only) */
-
-#define S_ISTA sc->sc_config.i_ista
-
-/* state of the softc */
-
-#define S_ENABLED sc->sc_enabled
-#define S_INTR_ACTIVE sc->sc_intr_active
-
-/* SOFT-HDLC */
-
-#define S_HDLC_IB sc->sc_fifo.chan[chan].hdlc.ib /* u_short */
-#define S_HDLC_CRC sc->sc_fifo.chan[chan].hdlc.crc /* u_short */
-#define S_HDLC_TMP sc->sc_fifo.chan[chan].hdlc.tmp /* u_int */
-#define S_HDLC_FLAG sc->sc_fifo.chan[chan].hdlc.flag /* u_char */
-#define S_HDLC_BLEVEL sc->sc_fifo.chan[chan].hdlc.blevel /* u_short */
-
-/* stats */
-
-#define S_BYTES sc->sc_fifo.chan[chan].bytes
-
-/* "Z"-values */
-
-#define S_HDLC_DZ_TAB sc->sc_fifo.dztable
-
-/* filters */
-
-#define S_PROT sc->sc_fifo.chan[chan].prot
-#define S_FILTER sc->sc_fifo.chan[chan].filter
-#define S_ACTIVITY sc->sc_fifo.chan[chan].activity
-#define S_LAST_CHAN sc->sc_fifo.last_chan
-
-/* soft reset */
-
-#define RESET_SOFT_CHAN(sc, chan) bzero(&sc->sc_fifo.chan[chan], sizeof(sc->sc_fifo.chan[0]))
-
-/* trace */
-
-#define S_TRACE sc->sc_trace
-#define S_DTRACECOUNT sc->sc_Dtracecount
-#define S_BTRACECOUNT sc->sc_Btracecount
-
-/* mbuf */
-
-#define S_MBUF sc->sc_fifo.chan[chan].buffer.mbuf
-#define S_MBUFDUMMY sc->sc_fifo.chan[chan].buffer.mbufdummy
-#define S_MBUFLEN sc->sc_fifo.chan[chan].buffer.mbuf->m_len
-#define S_MBUFPKTHDR sc->sc_fifo.chan[chan].buffer.mbuf->m_pkthdr
-#define S_MBUFDATA sc->sc_fifo.chan[chan].buffer.mbuf->m_data
-#define S_MBUFDAT sc->sc_fifo.chan[chan].buffer.mbuf->m_dat
-
-#define S_IFQUEUE sc->sc_fifo.chan[chan].buffer.ifqueue
-
-/* hfc control */
-
-#define HFC_INIT ihfc_init
-#define HFC_INTR ((S_HFC & HFC_1) ? ihfc_intr1 : ihfc_intr2)
-#define HFC_FSM ihfc_fsm
-#define HFC_CONTROL ihfc_control
-
-/* softc parts */
-
-struct ihfc_sc;
-
-struct sc_resources {
- struct resource * io_base[IHFC_IO_BASES];
- int io_rid [IHFC_IO_BASES];
- struct resource * irq;
- int irq_rid;
-};
-
-struct hdlc {
- u_char flag;
- u_short blevel;
- u_short crc;
- u_short ib;
- u_int tmp;
-};
-
-struct buffer {
- struct ifqueue ifqueue; /* data queue */
- struct mbuf *mbuf; /* current mbuf */
- struct mbuf *mbufdummy; /* temporary */
-};
-
-struct chan {
- struct hdlc hdlc;
- u_int bytes;
- u_int prot;
- struct buffer buffer;
- void (*filter)(struct ihfc_sc *sc, u_char chan);
-};
-
-struct sc_fifo {
- struct chan chan[6];
- u_short dztable[16];
- u_char last_chan;
-};
-
-struct sc_config {
- /* software only: */
-
- u_short chiptype; /* chiptype (eg. HFC_1) */
- u_char dlp; /* D-priority */
- u_short iio; /* internal IO */
- u_char iirq; /* internal IRQ */
- u_char ntmode; /* mode */
- u_char stdel; /* S/T delay */
-
- /* write only: */
- u_char cirm;
- u_char ctmt;
- u_char int_m1;
- u_char int_m2;
- u_char mst_mode;
- u_char clkdel;
- u_char sctrl;
- u_char connect;
- u_char test;
- u_char sctrl_r;
-
- /* isac write only - hfc-1: */
- u_char i_adf2;
- u_char i_spcr;
- u_char i_sqxr;
- u_char i_adf1;
- u_char i_stcr;
- u_char i_mode;
- u_char i_mask;
- u_char i_star2;
-
- /* read only: */
- u_char int_s1;
-
- /* isac read only - hfc-1: */
- u_char i_ista;
-};
-
-struct sc_statemachine {
- u_char state; /* see i4b_ihfc_drv.h */
- u_char usync;
- u_char T3; /* T3 running */
- struct callout_handle T3callout;
-};
-
-/*---------------------------------------------------------------------------*
- * HFC softc
- *---------------------------------------------------------------------------*/
-typedef struct ihfc_sc
-{ int sc_unit;
- int sc_flag;
-
- int sc_i4bunit; /* L0IHFCUNIT(sc_unit) */
- int sc_i4bflag; /* FLAG_TEL_S0_16_3C .. */
-
- u_char sc_enabled; /* daemon running if set */
- u_char sc_intr_active; /* interrupt is active */
-
- int sc_trace;
- u_int sc_Btracecount;
- u_int sc_Dtracecount;
-
- struct sc_config sc_config;
- struct sc_resources sc_resources;
- struct sc_statemachine sc_statemachine;
-
- isdn_link_t sc_blinktab[2];
- drvr_link_t *sc_bdrvlinktab[2];
-
- struct sc_fifo sc_fifo;
-} ihfc_sc_t;
-
-extern ihfc_sc_t ihfc_softc[];
-
-#endif /* _I4B_IHFC_H_ */
diff --git a/sys/i4b/layer1/ihfc/i4b_ihfc_drv.c b/sys/i4b/layer1/ihfc/i4b_ihfc_drv.c
deleted file mode 100644
index 68afeaafc40a..000000000000
--- a/sys/i4b/layer1/ihfc/i4b_ihfc_drv.c
+++ /dev/null
@@ -1,1760 +0,0 @@
-/*
- * Copyright (c) 2000 Hans Petter Selasky. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ihfc_drv.c - ihfc ISA PnP-bus interface
- * -------------------------------------------
- *
- * Everything which has got anything to do with the
- * HFC-1/S/SP chips has been put here.
- *
- * last edit-date: [Fri Jan 12 17:06:52 2001]
- *
- * $FreeBSD$
- *
- *---------------------------------------------------------------------------*/
-
-#include "ihfc.h"
-
-#if (NIHFC > 0)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <sys/mbuf.h>
-
-#include <i4b/include/i4b_mbuf.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/i4b_hdlc.h>
-#include <i4b/layer1/ihfc/i4b_ihfc.h>
-#include <i4b/layer1/ihfc/i4b_ihfc_ext.h>
-#include <i4b/layer1/ihfc/i4b_ihfc_drv.h>
-
-#include <machine/bus.h>
-#include <sys/rman.h>
-
-
-/*---------------------------------------------------------------------------*
- * Local prototypes
- *---------------------------------------------------------------------------*/
- void ihfc_loadconfig (ihfc_sc_t *sc);
-
-static void ihfc_trans_Bread (ihfc_sc_t *sc, u_char chan);
-static void ihfc_trans_Bwrite (ihfc_sc_t *sc, u_char chan);
-static void ihfc_hdlc_Bread (ihfc_sc_t *sc, u_char chan);
-static void ihfc_hdlc_Bwrite (ihfc_sc_t *sc, u_char chan);
-static void ihfc_hdlc_Dread (ihfc_sc_t *sc, u_char chan);
-static void ihfc_hdlc_Dwrite (ihfc_sc_t *sc, u_char chan);
-
-static void ihfc_isac_Dread (ihfc_sc_t *sc, u_char chan);
-static void ihfc_isac_Dwrite (ihfc_sc_t *sc, u_char chan);
-
- void ihfc_cmdr_hdlr (ihfc_sc_t *sc, u_char cmdr);
- void ihfc_exir_hdlr (ihfc_sc_t *sc, u_char exir);
-
- void ihfc_sq (ihfc_sc_t *sc);
-
-static void ihfc_test_Bread (ihfc_sc_t *sc, u_char chan);
-static void ihfc_test_Bwrite (ihfc_sc_t *sc, u_char chan);
-
-u_short ihfc_Bsel_fifo (ihfc_sc_t *sc, u_char chan, u_char flag);
-u_int32_t ihfc_Dsel_fifo (ihfc_sc_t *sc, u_char chan, u_char flag);
-
-
-/*---------------------------------------------------------------------------*
- * Commonly used ISA bus commands
- *---------------------------------------------------------------------------*/
-#define IHFC_DATA_OFFSET 0
-#define IHFC_REG_OFFSET 1
-
-#define BUS_VAR bus_space_handle_t h = rman_get_bushandle(S_IOBASE[0]); \
- bus_space_tag_t t = rman_get_bustag (S_IOBASE[0])
-
-#define SET_REG(reg) bus_space_write_1(t,h, IHFC_REG_OFFSET, reg)
-#define GET_STAT bus_space_read_1 (t,h, IHFC_REG_OFFSET)
-
-#define READ_DATA_1 bus_space_read_1 (t,h, IHFC_DATA_OFFSET)
-#define READ_BOTH_2 bus_space_read_2 (t,h, IHFC_DATA_OFFSET)
-
-#define WRITE_DATA_1(data) bus_space_write_1(t,h, IHFC_DATA_OFFSET, data)
-#define WRITE_BOTH_2(data) bus_space_write_2(t,h, IHFC_DATA_OFFSET, data)
-
-#define DISBUSY(okcmd, tocmd) \
-{ \
- if (GET_STAT & 1) \
- { \
- register u_char a; \
- register u_int to = IHFC_DISBUSYTO; \
- \
- while(((a = GET_STAT) & 1) && --to); \
- \
- if (!to) \
- { \
- NDBGL1(L1_ERROR, "DISBUSY-TIMEOUT! (a=%04x, " \
- "unit=%d)", a, S_UNIT); \
- tocmd; \
- } \
- else \
- { \
- okcmd; \
- } \
- } \
- else \
- { \
- okcmd; \
- } \
-}
-
-#define WAITBUSY_2(okcmd, tocmd) \
- { \
- register u_short a; \
- register u_int to = IHFC_NONBUSYTO; \
- \
- while((~(a = READ_BOTH_2) & 0x100) && --to); \
- \
- if (!to) \
- { \
- NDBGL1(L1_ERROR, "NONBUSY-TIMEOUT! (a=%04x, " \
- "unit=%d)", a, S_UNIT); \
- tocmd; \
- } \
- else \
- { \
- okcmd; \
- } \
- }
-
-/*---------------------------------------------------------------------------*
- * Control function (HFC-1/S/SP)
- *
- * Flag:
- * 1: reset and unlock chip (at boot only)
- * 2: prepare for shutdown (at shutdown only)
- * 3: reset and resume
- * 4: select TE-mode (boot default)
- * 5: select NT-mode (only HFC-S/SP/PCI)
- *
- * Returns != 0 on errornous chip
- *---------------------------------------------------------------------------*/
-int
-ihfc_control(ihfc_sc_t *sc, int flag)
-{
- BUS_VAR;
-
- if (flag == 3) goto reset0;
- if (flag == 4)
- {
- S_NTMODE = 0;
- goto mode0;
- }
- if (flag == 5)
- {
- S_NTMODE = 1;
- goto mode0;
- }
- if (flag == 1)
- {
- WRITE_BOTH_2(0x5400 | S_IIO); /* enable IO (HFC-1/S) */
-
- S_LAST_CHAN = -1;
-
- /* HFC-S/SP configuration */
-
- S_CIRM = S_IIRQ|0x10; /* IRQ, 8K fifo mode */
- S_CLKDEL = 0x00; /* 12.288mhz */
- S_CTMT = 0x03; /* transperant mode */
- S_CONNECT = 0x00; /* B channel data flow */
- S_INT_M1 = 0x40; /* interrupt mask */
- S_INT_M2 = 0x08; /* enable interrupt output */
- S_MST_MODE = 0x01; /* master mode */
- S_SCTRL = 0x50; /* S/Q on, non cap. line mode */
- S_SCTRL_R = 0x00; /* B channel receive disable */
- S_TEST = 0x00; /* no need for awake enable */
-
- if (S_HFC & (HFC_1 | HFC_S)) /* configure timer (50ms) */
- {
- S_CTMT |= 0x08;
- }
- else
- {
- S_CTMT |= 0x14;
- }
-
- /* HFC-1 ISAC configuration (IOM-2 mode) */
-
- S_ADF1 = 0x00; /* */
- S_ADF2 = 0x80; /* select mode IOM-2 */
- S_SPCR = 0x00; /* B channel send disable (0x10 for test loop) */
- S_MASK = 0xfb; /* enable CISQ */
- S_MODE = 0xc9; /* receiver enabled */
- S_SQXR = 0x0f; /* master, clock always active */
- S_STCR = 0x70; /* TIC bus address = 7 */
- S_STAR2 = 0x04; /* enable S/Q */
-
- mode0:
- if (S_NTMODE) /* configure NT- or TE-mode */
- {
- S_SCTRL |= 0x04; /* NT mode */
- S_CLKDEL &= ~0x7f; /* clear delay */
- S_CLKDEL |= 0x6c; /* set delay */
- }
- else
- {
- S_SCTRL &= ~0x04; /* TE mode */
- S_STDEL &= 0x7f; /* use mask! */
- S_CLKDEL &= ~0x7f; /* clear delay */
- S_CLKDEL |= S_STDEL; /* set delay */
- }
- if (S_DLP) /* configure D-priority */
- {
- S_SCTRL |= 0x08; /* (10/11) */
- }
- else
- {
- S_SCTRL &= ~0x08; /* (8/9) */
- }
-
- reset0:
- /* chip reset (HFC-1/S/SP) */
-
- if (S_HFC & HFC_1)
- {
- SET_REG((S_CIRM | 0xc8) & 0xdf);
-
- DELAY(10); /* HFC-2B manual recommends a 4 *
- * clock cycle delay after CIRM *
- * write with reset=1. A 1us *
- * delay, should do for 7.68mhz,*
- * but just in case I make that *
- * 10us. */
-
- SET_REG((S_CIRM | 0xc0) & 0xdf);
-
- DELAY(250); /* ISAC manual says reset pulse *
- * length is 125us. Accessing *
- * ISAC before those 125us, we *
- * may risk chip corruption and *
- * irq failure. The HFC-2B also *
- * needs some delay to recover, *
- * so we add some us. */
- }
- else
- {
- SET_REG(0x18);
-
- WRITE_DATA_1(S_CIRM | 8);
-
- DELAY(10); /* HFC-2BDS0 manual recommends *
- * a 4 clock cycle delay after *
- * CIRM write with reset=1. *
- * A 1us delay, should do for *
- * 12.288mhz, but just in case *
- * I make that 10us. */
-
- WRITE_DATA_1(S_CIRM);
-
- DELAY(25); /* HFC-2BDS0 needs some time to *
- * recover after CIRM write *
- * with reset=0. Experiments *
- * show this delay should be *
- * 8-9us. Just in case we make *
- * that 25us. */
- }
-
- {
- /* HFC-1/S/SP chip test *
- * *
- * NOTE: after reset the HFC-1/S/SP should be *
- * in a mode where it is always non-busy/non- *
- * processing, and bit[0] of STATUS/DISBUSY *
- * register, should always return binary '0' *
- * until we configure the chips for normal *
- * operation. */
-#ifdef IHFC_DEBUG
- printf("ihfc: GET_STAT value is: 0x%x\n", GET_STAT);
-#endif
- SET_REG(0x30);
-
- if ((GET_STAT & 1) || (READ_DATA_1 & 0xf)) goto f0;
- }
-
- ihfc_loadconfig(sc);
-
- if (S_HFC & HFC_1) ihfc_cmdr_hdlr(sc, 0x41); /* rres, xres */
-
- S_PHSTATE = 0;
- HFC_FSM(sc, 0);
- }
-
- if (flag == 2)
- {
- if (S_HFC & HFC_1) S_CIRM &= ~0x03; /* disable interrupt */
-
- S_SQXR |= 0x40; /* power down */
-
- S_INT_M2 &= ~0x01;
- S_MASK |= 0x02;
-
- S_SPCR &= ~0x0f; /* send 1's only */
- S_SCTRL &= ~0x83; /* send 1's only + enable oscillator */
-
- ihfc_loadconfig(sc);
- }
-
- return(0); /* success */
-
- f0:
- return(1); /* failure */
-}
-
-/*---------------------------------------------------------------------------*
- * Softc initializer and hardware setup (HFC-1/S/SP)
- *
- * Returns: 0 on success
- * 1 on failure
- *---------------------------------------------------------------------------*/
-int
-ihfc_init (ihfc_sc_t *sc, u_char chan, int prot, int activate)
-{
- if (chan > 5) goto f0;
-
- chan &= ~1;
-
- do
- { if (chan < 2) /* D-Channel */
- {
- i4b_Dfreembuf(S_MBUF);
- if (!IF_QEMPTY(&S_IFQUEUE)) i4b_Dcleanifq(&S_IFQUEUE);
-
- RESET_SOFT_CHAN(sc, chan);
-
- S_IFQUEUE.ifq_maxlen = IFQ_MAXLEN;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&S_IFQUEUE.ifq_mtx, "i4b_ihfc", MTX_DEF);
-#endif
- if (!activate) continue;
-
- if (S_HFC & HFC_1)
- {
- S_FILTER = (chan & 1) ? ihfc_isac_Dread :
- ihfc_isac_Dwrite;
- }
- else
- {
- S_FILTER = (chan & 1) ? ihfc_hdlc_Dread :
- ihfc_hdlc_Dwrite;
- }
- }
- else /* B-Channel */
- {
- i4b_Bfreembuf(S_MBUF);
- if (!IF_QEMPTY(&S_IFQUEUE)) i4b_Bcleanifq(&S_IFQUEUE);
-
- RESET_SOFT_CHAN(sc, chan);
-
- S_IFQUEUE.ifq_maxlen = IFQ_MAXLEN;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&S_IFQUEUE.ifq_mtx, "i4b_ihfc", MTX_DEF);
-#endif
- S_PROT = prot;
-
- if (!activate) continue;
-
- switch(prot)
- { case(BPROT_NONE):
- S_FILTER = (chan & 1) ?
- ihfc_trans_Bread :
- ihfc_trans_Bwrite;
- break;
- case(BPROT_RHDLC):
- S_FILTER = (chan & 1) ?
- ihfc_hdlc_Bread :
- ihfc_hdlc_Bwrite;
- break;
- case(5):
- S_FILTER = (chan & 1) ?
- ihfc_test_Bread :
- ihfc_test_Bwrite;
- break;
- }
- }
- } while (++chan & 1);
-
- S_MASK |= 0xfb; /* disable all, but CISQ interrupt (ISAC) */
- S_INT_M1 &= 0x40; /* disable all, but TE/NT state machine (HFC) */
- S_SCTRL &= ~0x03; /* B1/B2 send disable (HFC) */
- S_SPCR &= ~0x0f; /* B1/B2 send disable (ISAC) */
- S_SCTRL_R &= ~0x03; /* B1/B2 receive disable (HFC) */
-
- chan = 0;
- if (S_FILTER) /* D-Channel active */
- {
- S_MASK &= 0x2e; /* enable RME, RPF, XPR, EXI */
- S_INT_M1 |= 0x24; /* enable D-receive, D-transmit */
- }
-
- chan = 2;
- if (S_FILTER) /* B1-Channel active */
- {
- S_SCTRL |= 1; /* send enable (HFC) */
- S_SPCR |= 8; /* send enable (ISAC) */
- S_SCTRL_R |= 1; /* receive enable (HFC) */
- S_INT_M1 |= 0x80; /* timer enable (HFC) */
- S_INT_M1 &= ~0x04; /* let D-channel use timer too */
- }
-
- chan = 4;
- if (S_FILTER) /* B2-Channel active */
- {
- S_SCTRL |= 2; /* send enable (HFC) */
- S_SPCR |= 2; /* send enable (ISAC) */
- S_SCTRL_R |= 2; /* receive enable (HFC) */
- S_INT_M1 |= 0x80; /* timer enable (HFC) */
- S_INT_M1 &= ~0x04; /* let D-channel use timer too */
- }
-
- ihfc_loadconfig(sc);
-
- /* XXX reset timer? */
-
- return 0; /* success */
- f0:
- return 1; /* failure */
-}
-
-/*---------------------------------------------------------------------------*
- * Load configuration data (HFC-1/S/SP)
- *---------------------------------------------------------------------------*/
-void
-ihfc_loadconfig(ihfc_sc_t *sc)
-{
- BUS_VAR;
-
- if (S_HFC & HFC_1)
- {
- /* HFC-1 chips w/ISAC: */
-
- const u_char *src = (void *)&S_ISAC_CONFIG;
- const u_char *dst = (void *)&isac_configtable;
-
- SET_REG((S_CIRM | 0xc0) & 0xdf);
-
- S_CTMT = (S_CTMT & ~0x14) | ((S_INT_M1 >> 5) & 0x4);
-
- SET_REG((S_CTMT | 0xe0) & 0xff);
-
- while(*dst)
- {
- SET_REG(*dst++); /* set register */
-
- /* write configuration */
- DISBUSY(WRITE_DATA_1(*src++), break);
- }
- }
- else
- {
- /* HFC-S/SP chips: */
-
- const u_char *src = (void *)&S_HFC_CONFIG;
- const u_char *dst = (void *)&ihfc_configtable;
-
- while(*dst)
- {
- SET_REG(*dst++); /* set register */
- WRITE_DATA_1(*src++); /* write configuration */
- }
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Function State Machine handler (PH layer) (HFC-1/S/SP)
- *
- * Flag: 0 = Refresh softc S_PHSTATE + take hints
- * 1 = Activate
- * 2 = Deactivate
- *
- * NOTE: HFC-1 only supports TE mode.
- *---------------------------------------------------------------------------*/
-void
-ihfc_fsm(ihfc_sc_t *sc, int flag)
-{
- const struct ihfc_FSMtable *fsmtab;
- u_char ihfc_cmd = 0;
- u_char isac_cmd = 0;
- u_char tmp;
- BUS_VAR;
-
- /* get current state (rx/downstream) */
-
- if (S_HFC & HFC_1)
- {
- SET_REG(0x31); DISBUSY(tmp = (READ_DATA_1 >> 2) & 0xf, return);
-
- fsmtab = (S_NTMODE) ? &ihfc_TEtable2[tmp]:
- &ihfc_TEtable2[tmp];
- }
- else
- {
- SET_REG(0x30); tmp = READ_DATA_1 & 0xf;
-
- fsmtab = (S_NTMODE) ? &ihfc_NTtable[tmp]:
- &ihfc_TEtable[tmp];
- }
-
- if (fsmtab->string)
- {
- NDBGL1(L1_I_CICO, "%s (ind=0x%x, flag=%d, unit=%d).",
- fsmtab->string, tmp, flag, S_UNIT);
- }
- else
- {
- NDBGL1(L1_I_ERR, "Illegal indicatation (ind=0x%x, "
- "flag=%d, unit=%d).", tmp, flag, S_UNIT);
- }
-
- /* indication machine / state change *
- * *
- * Whenever the state of the S0-line changes, we check to see in which *
- * direction the change went. Generally upwards means activate, and *
- * downwards means deactivate. *
- * The test signal is used to ensure proper syncronization. */
-
- if (fsmtab->state == 0) /* deactivated indication */
- {
- if (S_PHSTATE != 0)
- {
- isac_cmd = 0x3c; /* deactivate DUI */
-
- i4b_l1_ph_deactivate_ind(S_I4BUNIT);
- }
- }
- if (fsmtab->state == 2) /* syncronized indication */
- {
- if (S_PHSTATE != 2)
- {
- if (S_NTMODE) ihfc_cmd = 0x80;
- }
- }
- if (fsmtab->state == 3) /* activated indication */
- {
- if (S_PHSTATE != 3)
- {
- isac_cmd = (S_DLP) ? 0x24 /* activate AR10 */
- : 0x20; /* activate AR8 */
-
- i4b_l1_ph_activate_ind(S_I4BUNIT);
- }
- }
- if (fsmtab->state == 4) /* error indication */
- {
- if (S_PHSTATE < 4)
- {
- isac_cmd = 0x3c; /* deactivate DUI */
- }
- }
-
- S_PHSTATE = fsmtab->state;
-
- if ((flag == 1) && (fsmtab->state != 3))
- {
- isac_cmd = (S_DLP) ? 0x24 : 0x20;
- ihfc_cmd = 0x60;
- }
- if ((flag == 2) && (fsmtab->state != 0))
- {
- isac_cmd = 0x3c;
- ihfc_cmd = 0x40;
- }
-
- /* set new state (tx / upstream) *
- * *
- * NOTE: HFC-S/SP and ISAC transmitters are always active when *
- * activated state is reached. The bytes sent to the S0-bus are all *
- * high impedance, so they do not disturb. *
- * The HFC-1 has a separate SIEMENS S0-device. */
-
- if (S_HFC & HFC_1)
- {
- if (isac_cmd)
- {
- if (S_IOM2) isac_cmd |= 3;
-
- SET_REG(0x31); DISBUSY(WRITE_DATA_1(isac_cmd), );
-
- NDBGL1(L1_I_CICO, "(isac_cmd=0x%x, unit=%d).",
- isac_cmd, S_UNIT);
- }
- }
- else
- {
- if (ihfc_cmd || (fsmtab->state == 5))
- {
- SET_REG(0x30); WRITE_DATA_1(ihfc_cmd);
-
- NDBGL1(L1_I_CICO, "(ihfc_cmd=0x%x, unit=%d).",
- ihfc_cmd, S_UNIT);
- }
- }
-}
-
-/*---------------------------------------------------------------------------*
- * S/Q - channel handler (read) (HFC-S/SP)
- *---------------------------------------------------------------------------*/
-void
-ihfc_sq (ihfc_sc_t *sc)
-{
- const struct ihfc_SQtable *SQtab;
- register u_char a = 0;
- BUS_VAR;
-
- if (S_HFC & HFC_1)
- {
- SET_REG(0x31);
- DISBUSY(a = READ_DATA_1, a = 0);
-
- if (a & 0x80)
- {
- SET_REG(0x3b);
- DISBUSY(a = READ_DATA_1, a = 0);
- }
- }
- else
- {
- SET_REG(0x34);
- a = READ_DATA_1;
- }
-
- SQtab = (S_NTMODE) ? &ihfc_Qtable[a & 7]:
- &ihfc_Stable[a & 7];
-
- if (a & 0x10)
- {
- if (SQtab->string)
- {
- NDBGL1(L1_I_CICO, "%s (unit=%d, int=%x)",
- SQtab->string, S_UNIT, S_INT_S1);
- }
- else
- {
- NDBGL1(L1_ERROR, "Unknown indication = %x (unit=%d)",
- a & 7, S_UNIT);
- }
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Interrupt handler (HFC-1)
- *---------------------------------------------------------------------------*/
-void
-ihfc_intr1 (ihfc_sc_t *sc)
-{
- u_char chan;
- u_char tmp;
- BUS_VAR;
- HFC_VAR;
-
- HFC_BEG;
-
- SET_REG(0x20); tmp = GET_STAT; DISBUSY(S_ISTA |= READ_DATA_1, );
-
- if (S_ISTA & 0x04) /* CIRQ */
- {
- HFC_FSM(sc, 0);
-
- ihfc_sq(sc);
- }
-
- S_INTR_ACTIVE = 1;
-
- if (S_ISTA & 0xc0) /* RPF or RME */
- {
- chan = 1;
- if (S_FILTER) S_FILTER(sc, chan);
- }
- if (S_ISTA & 0x10) /* XPR */
- {
- chan = 0;
- if (S_FILTER) S_FILTER(sc, chan);
- }
- if (tmp & 0x04) /* Timer elapsed (50ms) */
- {
- SET_REG((S_CTMT | 0xf0) & 0xff);
-
- chan = 6;
- while(chan--)
- {
- if (chan == 1) break;
- if (S_FILTER) S_FILTER(sc, chan);
-
- HFC_END;
- DELAY(10);
- HFC_BEG;
- }
- }
-
- S_INTR_ACTIVE = 0;
-
- if (S_ISTA & 0x01) /* EXIR */
- {
- SET_REG(0x24); DISBUSY(ihfc_exir_hdlr(sc, READ_DATA_1), );
- }
-
- S_ISTA &= ~(0x1 | 0x4);
-
- HFC_END;
-}
-
-/*---------------------------------------------------------------------------*
- * Interrupt handler (HFC-S/SP)
- *---------------------------------------------------------------------------*/
-void
-ihfc_intr2 (ihfc_sc_t *sc)
-{
- u_char chan;
- BUS_VAR;
- HFC_VAR;
-
- HFC_BEG;
-
- SET_REG(0x1e); S_INT_S1 = READ_DATA_1; /* this will enable new interrupts! */
-
- if (S_INT_S1 & 0x40)
- {
- HFC_FSM(sc, 0); /* statemachine changed */
-
- ihfc_sq(sc);
- }
-
- S_INTR_ACTIVE = 1;
-
- if (S_INT_S1 & 0x20) /* D-Channel frame (rx) */
- {
- chan = 1;
- if (S_FILTER) S_FILTER(sc, chan);
- }
- if (S_INT_S1 & 0x04) /* D-Channel frame (tx) */
- {
- chan = 0;
- if (S_FILTER && (~S_INT_S1 & 0x80)) S_FILTER(sc, chan);
- }
- if (S_INT_S1 & 0x80) /* Timer elapsed (50ms) */
- {
- chan = 6;
- while(chan--)
- {
- if (chan == 1) continue;
- if (S_FILTER) S_FILTER(sc, chan);
-
- HFC_END;
- DELAY(10);
- HFC_BEG;
- }
- }
-
- S_INTR_ACTIVE = 0;
-
- HFC_END;
-}
-
-/*---------------------------------------------------------------------------*
- * Select a Bfifo (HFC-1/S/SP)
- * and return bytes in FIFO
- *
- * (this code is optimized)
- *---------------------------------------------------------------------------*/
-u_short
-ihfc_Bsel_fifo(ihfc_sc_t *sc, u_char chan, u_char flag)
-{
- register u_char reg = 0x7e + chan;
- register u_short tmp = 0x100;
- register u_short z1;
- register u_short z2;
-
- BUS_VAR;
-
- if (S_HFC & (HFC_1 | HFC_S))
- {
- if (S_LAST_CHAN != chan)
- {
- SET_REG(reg);
- DISBUSY(WAITBUSY_2( , return 0), return 0);
-
- S_LAST_CHAN = chan;
- }
- }
- else
- {
- SET_REG(0x10);
- WRITE_DATA_1(chan - 2);
- DISBUSY( , return 0);
- }
-
-#define FAST_READ (u_char)(tmp = READ_BOTH_2)
-#define FAST_STAT if (tmp & 0x100) DISBUSY( , return 0);
-
- SET_REG(reg ); FAST_STAT; z1 = FAST_READ;
- SET_REG(reg += 4); FAST_STAT; z1 |= FAST_READ << 8;
- SET_REG(reg += 4); FAST_STAT; z2 = FAST_READ;
- SET_REG(reg += 4); FAST_STAT; z2 |= READ_DATA_1 << 8;
-
-#undef FAST_READ
-#undef FAST_STAT
-
- z1 &= 0x1fff;
- z2 &= 0x1fff;
-
- z1 = 0x5ff - (z2 = z1 - z2 + ((z2 <= z1) ? 0 : 0x600));
-
- if (chan & 1)
- return(z2); /* receive channel */
- else
- return(z1); /* transmit channel */
-}
-
-/*---------------------------------------------------------------------------*
- * Select a Dfifo (HFC-S/SP)
- * and return bytes, and frames in FIFO
- *
- * Flag values:
- * 0x00: select new fifo + update counters
- * 0x10: increment f1 + update counters
- * 0x20: increment f2 + update counters
- *
- * NOTE: The upper 16bits holds the number of frames in the FIFO.
- * NOTE: FIFO has to be selected before you can use flags 0x10/0x20.
- *---------------------------------------------------------------------------*/
-u_int32_t
-ihfc_Dsel_fifo(ihfc_sc_t *sc, u_char chan, u_char flag)
-{
- register u_char reg = 0x90 + chan;
- register u_short tmp = 0x100;
- register u_char f1;
- register u_char f2;
- register u_short z1;
- register u_short z2;
-
- BUS_VAR;
-
- if (S_HFC & (HFC_1 | HFC_S))
- {
- switch(flag)
- {
- case(0x10):
- case(0x20):
- SET_REG(reg);
- if (~GET_STAT & 1)
- WAITBUSY_2( , return 0);
-
- SET_REG(0xa2 - (flag & 0x10) + chan);
- DISBUSY(READ_DATA_1, return 0);
-
- SET_REG(reg);
- if (~GET_STAT & 1)
- WAITBUSY_2( , return 0);
- break;
-
- default:
- if (S_LAST_CHAN != chan)
- {
- SET_REG(reg);
- DISBUSY(WAITBUSY_2( , return 0), return 0);
-
- S_LAST_CHAN = chan;
- }
- break;
- }
- }
- else
- {
- switch(flag)
- {
- case(0x10):
- case(0x20):
- SET_REG(0xb8 - (flag & 0x10) + chan);
- READ_DATA_1;
-
- DISBUSY( , return 0);
-
- if (chan & 1)
- {
- /* Before reading a FIFO a change *
- * FIFO operation must be done. *
- * (see HFC-SP manual p.38) */
-
- SET_REG(0x10);
- WRITE_DATA_1(chan | 4);
-
- DISBUSY( , return 0);
- }
- break;
-
- default:
- SET_REG(0x10);
- WRITE_DATA_1(chan | 4);
-
- DISBUSY( , return 0);
- break;
- }
- }
-
-#define FAST_READ (u_char)(tmp = READ_BOTH_2)
-#define FAST_STAT if (tmp & 0x100) DISBUSY( , return 0);
-
- if (S_HFC & HFC_SP) reg = 0x80 + chan;
-
- SET_REG(reg ); FAST_STAT; z1 = FAST_READ;
- SET_REG(reg += 4); FAST_STAT; z1 |= FAST_READ << 8;
- SET_REG(reg += 4); FAST_STAT; z2 = FAST_READ;
- SET_REG(reg += 4); FAST_STAT; z2 |= FAST_READ << 8;
-
- if (S_HFC & HFC_SP) reg += 0x26;
-
- SET_REG(reg -= 2); FAST_STAT; f1 = FAST_READ;
- SET_REG(reg += 4); FAST_STAT; f2 = READ_DATA_1;
-
-#undef FAST_READ
-#undef FAST_STAT
-
- if (~chan & 1)
- { /* XXX was Z1 */
- S_HDLC_DZ_TAB[f1 & 0xf] = z2; /* We keep track of the 'Z' *
- * values for D-channel (tx),*
- * so we may calculate the # *
- * of FIFO bytes free when *
- * f1 != f2. */
- z2 = S_HDLC_DZ_TAB[f2 & 0xf];
- }
-
- z1 = 0x1ff - (z2 = (z1 - z2) & 0x1ff);
- f1 = 0xf - (f2 = (f1 - f2) & 0xf);
-
- if (chan & 1)
- return(z2 | (f2 << 16)); /* receive channel */
- else
- return(z1 | (f1 << 16)); /* transmit channel */
-}
-
-
-/*---------------------------------------------------------------------------*
- * Data handler for D channel(write) - chan 0 (HFC-S/SP)
- *---------------------------------------------------------------------------*/
-void
-ihfc_hdlc_Dwrite (ihfc_sc_t *sc, u_char chan)
-{
- register u_int32_t sendlen;
- register u_short len;
- register u_char * src;
-
- BUS_VAR;
-
- if (!S_MBUF && IF_QEMPTY(&S_IFQUEUE)) return;
-
- sendlen = ihfc_Dsel_fifo(sc, chan, 0); /* select new fifo *
- * NOTE: the 16 higher bits *
- * contain the # of frame- *
- * etries free in the FIFO */
- while (sendlen & ~0xffff)
- {
- if (!S_MBUF)
- {
- if (!(S_MBUF = ihfc_getmbuf(sc, chan))) goto j1;
- }
-
- src = S_MBUFDATA;
- len = S_MBUFLEN;
-
- if (len >= 0x1ff) goto j0; /* frame is too big: skip! */
-
- sendlen &= 0xffff; /* only keep # of *
- * bytes free */
-
- SET_REG((S_HFC & HFC_SP) ? 0xac : 0x96);
-
- while (sendlen--)
- {
- if (!len--) break;
-
- DISBUSY(WRITE_DATA_1(*src++), sendlen = -1; len++; break);
- }
-
- if (!++sendlen) /* out of fifo: suspend */
- {
- S_MBUFDATA = src;
- S_MBUFLEN = len;
- break;
- }
-
- sendlen = ihfc_Dsel_fifo(sc, chan, 0x10); /* inc F1 */
- j0:
- i4b_Dfreembuf(S_MBUF);
- S_MBUF = NULL;
- }
- j1:
-}
-
-/*---------------------------------------------------------------------------*
- * Data handler for D channel(read) - chan 1 (HFC-S/SP)
- *
- * NOTE: Max framelength is (511 - 3) = 508 bytes, when only one frame
- * is received at a time.
- *---------------------------------------------------------------------------*/
-void
-ihfc_hdlc_Dread (ihfc_sc_t *sc, u_char chan)
-{
- register u_char tmp = -1;
- register u_char to = 15;
- register u_int32_t reclen;
- register u_short crc;
- register u_short len;
- register u_char * dst;
-
- BUS_VAR;
-
- reclen = ihfc_Dsel_fifo(sc, chan, 0); /* select new fifo *
- * NOTE: the higher 16 bits *
- * contain the # of frames *
- * to receive. */
- while ((reclen & ~0xffff) && to--)
- {
- reclen &= 0xffff; /* only keep # of *
- * bytes to receive */
-
- if (!(S_MBUF = i4b_Dgetmbuf(DCH_MAX_LEN)))
- panic("ihfc_hdlc_Dread: No mbufs(unit=%d)!\n", S_UNIT);
-
- SET_REG((S_HFC & HFC_SP) ? 0xbd : 0xa7);
-
- if ((reclen > 2) && (reclen <= (DCH_MAX_LEN+2)))
- {
- dst = S_MBUFDATA;
- len = S_MBUFLEN = (reclen += 1) - 3;
- }
- else
- {
- len = 0;
- dst = NULL;
- }
-
- crc = -1; /* NOTE: after a "F1" or "Z1" hardware overflow *
- * it appears not to be necessary to reset the *
- * HFC-1/S or SP chips to continue proper *
- * operation, only and only, if we always read *
- * "Z1-Z2+1" bytes when F1!=F2 followed by a *
- * F2-counter increment. The bi-effect of doing *
- * this is the "STAT" field may say frame is ok *
- * when the frame is actually bad. *
- * The simple solution is to re-CRC the frame *
- * including "STAT" field to see if we get *
- * CRC == 0x3933. Then we're 99% sure all *
- * frames received are good. */
-
- while(reclen--)
- {
- DISBUSY(tmp = READ_DATA_1, break);
- if (len) { len--; *dst++ = tmp; }
-
- crc = (HDLC_FCS_TAB[(u_char)(tmp ^ crc)] ^ (u_char)(crc >> 8));
- }
-
- crc ^= 0x3933;
-
- if (!tmp && !crc)
- {
- ihfc_putmbuf(sc, chan, S_MBUF);
- S_MBUF = NULL;
- }
- else
- {
- NDBGL1(L1_ERROR, "Frame error (len=%d, stat=0x%x, "
- "crc=0x%x, unit=%d)", S_MBUFLEN, (u_char)tmp, crc,
- S_UNIT);
-
- i4b_Dfreembuf(S_MBUF);
- S_MBUF = NULL;
- }
-
- reclen = ihfc_Dsel_fifo(sc, chan, 0x20);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * EXIR error handler - ISAC (D - channel) (HFC-1)
- *---------------------------------------------------------------------------*/
-void
-ihfc_exir_hdlr (ihfc_sc_t *sc, u_char exir)
-{
- register u_char a;
- register u_char cmd;
-
- for (a = 0, cmd = 0; exir; a++, exir >>= 1)
- {
- if (exir & 1)
- {
- NDBGL1(L1_I_ERR, "%s. (unit=%d)",
- ihfc_EXIRtable[a].string, S_UNIT);
- cmd |= ihfc_EXIRtable[a].cmd;
- }
- }
-
- if (cmd) ihfc_cmdr_hdlr(sc, cmd);
-}
-
-/*---------------------------------------------------------------------------*
- * CMDR handler - ISAC (D - channel) (HFC-1)
- *---------------------------------------------------------------------------*/
-void
-ihfc_cmdr_hdlr (ihfc_sc_t *sc, u_char cmdr)
-{
- BUS_VAR;
-
- SET_REG(0x21); DISBUSY(WRITE_DATA_1(cmdr); DELAY(30), );
-}
-
-/*---------------------------------------------------------------------------*
- * Data handler for D channel(write) - chan 0 (HFC-1)
- *---------------------------------------------------------------------------*/
-void
-ihfc_isac_Dwrite (ihfc_sc_t *sc, u_char chan)
-{
- register u_char sendlen = 32;
- register u_char cmd = 0;
- register u_short len;
- register u_char * src;
-
- BUS_VAR;
-
- if (~S_ISTA & 0x10) goto j0;
-
- if (!S_MBUF)
- if (!(S_MBUF = ihfc_getmbuf(sc, chan))) goto j0;
-
- len = S_MBUFLEN;
- src = S_MBUFDATA;
-
- SET_REG(0x00);
-
- while(sendlen--) /* write data */
- {
- if (!len--) break;
- DISBUSY(WRITE_DATA_1(*src++), goto a0);
- }
-
- cmd |= 0x08;
-
- if (!++sendlen) /* suspend */
- {
- S_MBUFLEN = len;
- S_MBUFDATA = src;
- }
- else
- {
- a0:
- i4b_Dfreembuf(S_MBUF);
- S_MBUF = NULL;
-
- cmd |= 0x02;
- }
-
- if (cmd) ihfc_cmdr_hdlr(sc, cmd);
-
- S_ISTA &= ~0x10;
- j0:
-}
-
-/*---------------------------------------------------------------------------*
- * Data handler for D channel(read) - chan 1 (HFC-1)
- *---------------------------------------------------------------------------*/
-void
-ihfc_isac_Dread (ihfc_sc_t *sc, u_char chan)
-{
- register u_char cmd = 0;
- register u_char reclen;
- register u_short tmp;
- register u_short len;
- register u_char * dst;
-
- BUS_VAR;
-
- if (!(S_ISTA & 0xc0)) goto j1; /* only receive data *
- * on interrupt */
-
- if (!S_MBUF)
- {
- if (!(S_MBUF = i4b_Dgetmbuf(DCH_MAX_LEN)))
- panic("ihfc%d: (D) Out of mbufs!\n", S_UNIT);
- }
-
- len = S_MBUFLEN;
- dst = S_MBUFDATA + (DCH_MAX_LEN - len);
-
- if (S_ISTA & 0x80) /* RME */
- {
- SET_REG(0x27); DISBUSY(tmp = (READ_DATA_1 ^ 0x20), goto j0);
-
- if (tmp & 0x70) goto j0; /* error */
-
- SET_REG(0x25); DISBUSY(tmp = (READ_DATA_1 & 0x1f), goto j0);
-
- reclen = (tmp) ? tmp : 32;
- }
- else /* RPF */
- {
- reclen = 32;
- }
-
- if ((len -= reclen) <= DCH_MAX_LEN) /* get data */
- {
- SET_REG(0x00);
-
- while(reclen--)
- {
- DISBUSY(*dst++ = READ_DATA_1, goto j0);
- }
- }
- else /* soft rdo or error */
- {
- j0: i4b_Dfreembuf(S_MBUF);
- S_MBUF = NULL;
-
- cmd |= 0x40;
-
- NDBGL1(L1_I_ERR, "Frame error (unit=%d)", S_UNIT);
- }
-
- if (S_ISTA & 0x80) /* frame complete */
- {
- if (S_MBUF)
- {
- S_MBUFLEN = (DCH_MAX_LEN - len);
- ihfc_putmbuf(sc, chan, S_MBUF);
- S_MBUF = NULL;
- }
- }
-
- if (S_MBUF) /* suspend */
- {
- S_MBUFLEN = len;
- }
-
- ihfc_cmdr_hdlr(sc, cmd | 0x80);
-
- S_ISTA &= ~0xc0;
- j1:
-}
-
-/*---------------------------------------------------------------------------*
- * Data handler for B channel(write) - chan 2 and 4 (HFC-1/S/SP)
- *
- * NOTE: No XDU checking!
- *---------------------------------------------------------------------------*/
-void
-ihfc_trans_Bwrite (ihfc_sc_t *sc, u_char chan)
-{
- register u_short sendlen;
- register u_short len;
- register u_char * src;
-
- BUS_VAR;
-
- if (!S_MBUF && IF_QEMPTY(&S_IFQUEUE)) return;
-
- sendlen = (u_short)ihfc_Bsel_fifo(sc, chan, 0);
-
- SET_REG(0xaa + chan);
-
- while (1)
- {
- if (!S_MBUF)
- {
- S_MBUF = ihfc_getmbuf(sc, chan);
- if (!S_MBUF) break;
- }
-
- src = S_MBUFDATA;
- len = S_MBUFLEN;
-
- while (sendlen--)
- {
- if (!len--) break;
-
- DISBUSY(WRITE_DATA_1(*src++), sendlen = -1; len++; break);
- }
-
- if (!++sendlen) /* out of fifo: Suspend */
- {
- S_MBUFDATA = src;
- S_MBUFLEN = len;
- break;
- }
-
- i4b_Dfreembuf(S_MBUF);
- S_MBUF = NULL;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Data handler for B channel(read) - chan 3 and 5 (HFC-1/S/SP)
- * (this code is optimized)
- *---------------------------------------------------------------------------*/
-void
-ihfc_trans_Bread (ihfc_sc_t *sc, u_char chan)
-{
- register u_short reclen;
- register u_short tmp;
- register u_short len;
- register u_char * dst;
-
- BUS_VAR;
-
- reclen = (u_short)ihfc_Bsel_fifo(sc, chan, 0);
-
- while (1)
- {
- SET_REG(0xba + chan);
-
- tmp = 0x100;
-
- if (!S_MBUF)
- if (!(S_MBUF = i4b_Bgetmbuf(BCH_MAX_DATALEN)))
- panic("ihfc%d: (B) Out of mbufs!\n", S_UNIT);
-
- len = S_MBUFLEN;
- dst = S_MBUFDATA + (BCH_MAX_DATALEN - len);
-
- while (reclen--)
- {
- if (!len--) break;
-
- if (tmp & 0x100) DISBUSY( , reclen = -1; len++; break);
- *dst++ = (u_char)(tmp = READ_BOTH_2);
- }
-
- if (~tmp & 0x100)
- {
- SET_REG(0x30);
- READ_DATA_1; /* a read to the data port *
- * will disable the internal *
- * disbusy signal for HFC-1/S *
- * chips. This is neccessary *
- * to avvoid data loss. */
- }
-
- if (!++reclen) /* out of fifo: suspend */
- {
- S_MBUFLEN = len;
- break;
- }
-
- S_MBUFLEN = (BCH_MAX_DATALEN - ++len);
-
- ihfc_putmbuf(sc, chan, S_MBUF);
-
- S_MBUF = NULL;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Data handler for B channel(write) - chan 2 and 4 (HFC-1/S/SP)
- *
- * NOTE: Software HDLC encoding!
- *---------------------------------------------------------------------------*/
-void
-ihfc_hdlc_Bwrite (ihfc_sc_t *sc, u_char chan)
-{
- register u_short blevel = S_HDLC_BLEVEL;
- register u_char flag = S_HDLC_FLAG;
- register u_int tmp = S_HDLC_TMP;
- register u_short crc = S_HDLC_CRC;
- register u_short ib = S_HDLC_IB;
- register u_char * src = NULL;
- register u_short len = 0;
- register u_short sendlen;
- register u_short tmp2;
-
- BUS_VAR;
-
- if (!S_MBUF && IF_QEMPTY(&S_IFQUEUE) && (flag == 2)) return;
-
- sendlen = (u_short)ihfc_Bsel_fifo(sc, chan, 0);
-
- SET_REG(0xaa + chan);
-
- if (S_MBUF)
- {
- /* resume */
-
- src = S_MBUFDATA;
- len = S_MBUFLEN;
-
- if (sendlen == 0x5ff)
- {
- /* XDU */
-
- flag = -2;
- len = 0;
-
- NDBGL1(L1_S_ERR, "XDU (unit=%d)", S_UNIT);
- }
- }
-
- while (sendlen--)
- {
- HDLC_ENCODE(*src++, len, tmp, tmp2, blevel, ib, crc, flag,
- {/* gfr */
- i4b_Bfreembuf(S_MBUF);
- S_MBUF = ihfc_getmbuf(sc, chan);
-
- if (S_MBUF)
- {
- src = S_MBUFDATA;
- len = S_MBUFLEN;
- }
- else
- {
- sendlen = 0; /* Exit after final FS, *
- * else the buffer will *
- * only be filled with *
- * "0x7e"-bytes! */
- }
- },
- {/* wrd */
-
- DISBUSY(WRITE_DATA_1((u_char)tmp), sendlen = 0);
- },
- d );
- }
-
- if (S_MBUF) /* suspend */
- {
- S_MBUFDATA = src;
- S_MBUFLEN = len;
- }
-
- S_HDLC_IB = ib;
- S_HDLC_BLEVEL = blevel;
- S_HDLC_TMP = tmp;
- S_HDLC_FLAG = flag;
- S_HDLC_CRC = crc;
-}
-
-/*---------------------------------------------------------------------------*
- * Data handler for B channel(read) - chan 3 and 5 (HFC-1/S/SP)
- *
- * NOTE: Software HDLC decoding!
- *---------------------------------------------------------------------------*/
-void
-ihfc_hdlc_Bread (ihfc_sc_t *sc, u_char chan)
-{
- register u_char blevel = S_HDLC_BLEVEL;
- u_char flag = S_HDLC_FLAG;
- register u_short crc = S_HDLC_CRC;
- register u_int tmp = S_HDLC_TMP;
- register u_short ib = S_HDLC_IB;
- register u_char * dst = NULL;
- register u_short tmp2 = 0x100;
- register u_short len = 0;
- register u_short reclen;
-
- BUS_VAR;
-
- if (S_MBUF)
- {
- /* resume */
-
- len = S_MBUFLEN;
- dst = S_MBUFDATA + (BCH_MAX_DATALEN - len);
- }
-
- reclen = (u_short)ihfc_Bsel_fifo(sc, chan, 0);
-
- SET_REG(0xba + chan);
-
- while (reclen--)
- {
- HDLC_DECODE(*dst++, len, tmp, tmp2, blevel, ib, crc, flag,
- {/* rdd */
- /* if (tmp2 & 0x100) while (GET_STAT & 1);
- * tmp2 = READ_BOTH_2;
- */
-
- DISBUSY(tmp2 = READ_DATA_1, reclen = 0; tmp2 = 0);
- },
- {/* nfr */
- if (!(S_MBUF = i4b_Bgetmbuf(BCH_MAX_DATALEN)))
- panic("ihfc:(B) Out of mbufs!\n");
-
- dst = S_MBUFDATA;
- len = BCH_MAX_DATALEN;
- },
- {/* cfr */
- len = (BCH_MAX_DATALEN - len);
-
- if ((!len) || (len > BCH_MAX_DATALEN))
- {
- /* NOTE: frames without any data, *
- * only crc field, should be silently discared. */
-
- i4b_Bfreembuf(S_MBUF);
- NDBGL1(L1_S_MSG, "Bad frame (len=%d, unit=%d)", len, S_UNIT);
- goto s0;
- }
-
- if (crc)
- { i4b_Bfreembuf(S_MBUF);
- NDBGL1(L1_S_ERR, "CRC (crc=0x%04x, len=%d, unit=%d)", crc, len, S_UNIT);
- goto s0;
- }
-
- S_MBUFLEN = len;
-
- ihfc_putmbuf(sc, chan, S_MBUF);
- s0:
- S_MBUF = NULL;
- },
- {/* rab */
- i4b_Bfreembuf(S_MBUF);
- S_MBUF = NULL;
-
- NDBGL1(L1_S_MSG, "Read Abort (unit=%d)", S_UNIT);
- },
- {/* rdo */
- i4b_Bfreembuf(S_MBUF);
- S_MBUF = NULL;
-
- NDBGL1(L1_S_ERR, "RDO (unit=%d)", S_UNIT);
- },
- continue,
- d);
- }
-
- /* SET_REG(0x30);
- * if (~tmp2 & 0x100) READ_DATA_1; kill disbusy signal
- */
-
- if (S_MBUF) S_MBUFLEN = len; /* suspend */
-
- S_HDLC_IB = ib;
- S_HDLC_CRC = crc;
- S_HDLC_TMP = tmp;
- S_HDLC_FLAG = flag;
- S_HDLC_BLEVEL = blevel;
-}
-
-/*---------------------------------------------------------------------------*
- * Data handler for B channel(write) - chan 2 and 4 (HFC-1/S/SP)
- *
- * This filter generates a pattern which is recognized
- * and examinated and verified by ihfc_test_Bread.
- *
- * NOTE: This filter is only for testing purpose.
- *---------------------------------------------------------------------------*/
-void
-ihfc_test_Bwrite (ihfc_sc_t *sc, u_char chan)
-{
- struct mbuf *m;
-
- register u_char fb;
- register u_short sendlen, tlen;
- register u_short xlen = S_HDLC_IB;
- BUS_VAR;
-
- goto j0;
-
- while((m = ihfc_getmbuf(sc, chan))) /* internal loop */
- {
- if (chan == 2)
- ihfc_putmbuf(sc, 5, m);
- else
- ihfc_putmbuf(sc, 3, m);
- }
-
- j0:
-
- sendlen = /* (u_short)ihfc_Bsel_fifo(sc, chan, 0); */ 0;
-
- if (sendlen == 0x5ff) printf("(send empty)");
-
- SET_REG(0xaa + chan);
-
- S_BYTES += sendlen;
-
- tlen = S_HDLC_CRC;
-
- if (sendlen > 0x400) printf("(slow: %d)", sendlen);
-
- fb = 0x80;
-
- while (sendlen--)
- {
- if (!tlen--) fb |= 0x20;
-
- if (!xlen--)
- {
- while(GET_STAT & 1);
- WRITE_DATA_1(0x3e);
- xlen = 200;
- }
- else
- {
- while(GET_STAT & 1);
- WRITE_DATA_1((xlen + 1) & 0xef);
- }
-
- fb = 0;
- }
-
- S_HDLC_IB = xlen;
-}
-
-/*---------------------------------------------------------------------------*
- * Data handler for B channel(read) - chan 3 and 5 (HFC-1/S/SP)
- *
- * This filter examins and verifies the pattern
- * generated by ihfc_test_Bwrite.
- *
- * NOTE: This filter is only for testing purpose.
- *---------------------------------------------------------------------------*/
-void
-ihfc_test_Bread (ihfc_sc_t *sc, u_char chan)
-{
- static u_short toterrors = 0;
-
- register u_short reclen, len, tlen;
- register u_char fb, tmp;
-
- register u_short xlen = S_HDLC_IB;
- register u_char *dst = NULL;
- register u_char error = S_HDLC_TMP;
- register u_char ecount = S_HDLC_FLAG;
-
- BUS_VAR;
-
- if (S_UNIT != 0) return;
-
- reclen = /* (u_short)ihfc_Bsel_fifo(sc, chan, 0); */ 0;
-
- S_BYTES += reclen;
-
- tlen = S_HDLC_CRC;
-
- fb = 0x40;
-
- if (S_MBUF)
- {
- len = S_MBUFLEN;
- dst = S_MBUFDATA + (BCH_MAX_DATALEN - len);
- }
- else
- {
- len = 0;
- }
-
- SET_REG(0xba + chan);
-
- while (reclen--)
- {
-/* if (tmp2 & 0x100) while(GET_STAT & 1);
- * tmp = (u_char)(tmp2 = READ_BOTH_2);
- */
- if (GET_STAT & 1)
- {
- /* if (!(++busy % 4)) reclen++; */
- while(GET_STAT & 1);
- }
-
- tmp = READ_DATA_1;
-
- if ((tmp & 0x3f) == 0x3e)
- {
- if ((BCH_MAX_DATALEN - len) != 201) error |= 4;
-
- if ((S_MBUF) && (error))
- {
- if (len) { len--; *dst++ = error; }
- if (len) { len--; *dst++ = xlen+1; }
- if (len) { len--; *dst++ = ecount; }
-
- S_MBUFLEN = BCH_MAX_DATALEN - len;
-
- if (S_TRACE & TRACE_B_RX)
- ihfc_putmbuf(sc, chan, S_MBUF);
- else
- i4b_Bfreembuf(S_MBUF);
-
- S_MBUF = NULL;
- printf("(error%d, %d, %d)", S_UNIT, ecount, toterrors++);
- }
-
- i4b_Bfreembuf(S_MBUF);
- S_MBUF = i4b_Bgetmbuf(BCH_MAX_DATALEN);
-
- dst = S_MBUFDATA;
- len = BCH_MAX_DATALEN;
-
- xlen = 200;
- error = 0;
- ecount = 0;
-
- /* SET_REG(0xba + chan); */
- }
- else
- {
- if (!xlen) error |= 2;
- if ((tmp ^ xlen--) & 0xef) { error |= 1; ecount++; }
- }
- if (!tlen--) fb |= 0x20;
-
- if (len--)
- {
- *dst++ = (tmp | fb);
- }
- else
- {
- len++;
- }
-
- fb = 0;
- }
-
- if (S_MBUF)
- {
- S_MBUFLEN = len;
- }
-
- S_HDLC_IB = xlen;
- S_HDLC_TMP = error;
- S_HDLC_FLAG = ecount;
-}
-
-#endif /* NIHFC > 0 */
diff --git a/sys/i4b/layer1/ihfc/i4b_ihfc_drv.h b/sys/i4b/layer1/ihfc/i4b_ihfc_drv.h
deleted file mode 100644
index d0456ad565e8..000000000000
--- a/sys/i4b/layer1/ihfc/i4b_ihfc_drv.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2000 Hans Petter Selasky. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ihfc_drv.h - include file for the HFC-1/S/SP driver
- * -------------------------------------------------------
- *
- * last edit-date: [Wed Jul 19 09:40:55 2000]
- *
- * $Id: i4b_ihfc_drv.h,v 1.7 2000/09/19 13:50:36 hm Exp $
- *
- * $FreeBSD$
- *
- *---------------------------------------------------------------------------*/
-#ifndef I4B_IHFC_DRV_H_
-#define I4B_IHFC_DRV_H_
-
-/*---------------------------------------------------------------------------*
- * Ramptables related fifo (HFC-1/S/SP)
- *
- * The HFC-SP chip only uses ihfc_xxx[2] values for D-channel!
- * NOTE: These tables are not used anymore.
- *---------------------------------------------------------------------------*
- *
- * w - write, r - read: D1_w D1_r B1_w B1_r B2_w B2_r
- * const u_char ihfc_readtable[6] = {0xa6, 0xa7, 0xbc, 0xbd, 0xbe, 0xbf};
- * const u_char ihfc_writetable[6] = {0x96, 0x97, 0xac, 0xad, 0xae, 0xaf};
- * const u_char ihfc_f1inctable[6] = {0x92, 0x93, 0xa8, 0xa9, 0xaa, 0xab};
- * const u_char ihfc_f2inctable[6] = {0xa2, 0xa3, 0xb8, 0xb9, 0xba, 0xbb};
- *
- * const struct { u_char z1L, z1H, z2L, z2H, f1, f2, dummy; }
- * ihfc_countertable[6] = {
- * {0x90, 0x94, 0x98, 0x9c, 0x9a, 0x9e, 0x00}, D1_w
- * {0x91, 0x95, 0x99, 0x9d, 0x9b, 0x9f, 0x00}, D1_r
- * {0x80, 0x84, 0x88, 0x8c, 0xb0, 0xb4, 0x00}, B1_w
- * {0x81, 0x85, 0x89, 0x8d, 0xb1, 0xb5, 0x00}, B1_r
- * {0x82, 0x86, 0x8a, 0x8e, 0xb2, 0xb6, 0x00}, B2_w
- * {0x83, 0x87, 0x8b, 0x8f, 0xb3, 0xb7, 0x00} B2_r
- * };
- *---------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------*
- * Ramptables related to configuration (HFC-1/S/SP)
- *
- * NOTE: Write registers only
- *---------------------------------------------------------------------------*/
-const u_char ihfc_configtable[11] =
-{
- 0x18, 0x19, 0x1a, /* cirm, ctmt, int_m1 */
- 0x1b, 0x2e, 0x37, /* int_m2, mst_mode, clkdel */
- 0x31, 0x2f, 0x32, /* sctrl, connect, test/sctrl_e */
- 0x33, 0x00 /* sctrl_r */
-};
-const u_char isac_configtable[9] =
-{
- 0x39, 0x30, 0x3b, /* adf2, spcr, sqxr */
- 0x38, 0x37, 0x22, /* adf1, stcr, mode */
- 0x20, 0x2b, 0x00 /* mask, star2 */
-};
-
-/*---------------------------------------------------------------------------*
- * Ramptables related to statemachine (HFC-1/S/SP)
- *
- * state:
- * 0 = deactivated
- * 1 = pending
- * 2 = syncronized
- * 3 = activated
- * 4 = error
- * 5 = reset
- * -1 = illegal
- *---------------------------------------------------------------------------*/
-
-const struct ihfc_FSMtable { u_char state, *string; }
-
- ihfc_TEtable[16] = /* HFC-S/SP - TE */
-{
- { 0x05 ,"Reset" },
- { 0xff , 0 },
- { 0x01 ,"Sensing" },
- { 0x00 ,"Deactivated" },
- { 0x01 ,"Awaiting signal" },
- { 0x01 ,"Identifying input" },
- { 0x02 ,"Syncronized" },
- { 0x03 ,"Activated" },
- { 0x04 ,"Lost framing" },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 }
-},
- ihfc_NTtable[16] = /* HFC-S/SP - NT */
-{
- { 0x05 ,"Reset" },
- { 0x00 ,"Deactive" },
- { 0x02 ,"Pending activation" },
- { 0x03 ,"Active" },
- { 0x01 ,"Pending deactivation" },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 }
-},
- ihfc_TEtable2[16] = /* HFC-1/ISAC - TE */
-{
- { 0x00 ,"Deactivate request" },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0xff , 0 },
- { 0x01 ,"Level detected" },
- { 0xff , 0 },
- { 0x04 ,"Error indication" },
- { 0x00 ,"Power-up" },
- { 0x02 ,"Activate request downstream" },
- { 0xff , 0 },
- { 0x00 ,"Test indication" },
- { 0x00 ,"Awake test indication" },
- { 0x03 ,"Activate ind. with priority class 8" },
- { 0x03 ,"Activate ind. with priority class 10" },
- { 0xff , 0 },
- { 0x00 ,"Deactivate indication downstream" }
-};
-
-/*---------------------------------------------------------------------------*
- * Ramptable related to ISAC EXIR (HFC-1)
- *
- * cmd: command to execute, if any.
- *
- *---------------------------------------------------------------------------*/
-const struct ihfc_EXIRtable { u_char cmd, *string; }
-
- ihfc_EXIRtable[8] =
-{
- { 0x00 ,"Watchdog Timer Overflow" },
- { 0x00 ,"Subscriber Awake" },
- { 0x00 ,"Monitor Status" },
- { 0x00 ,"Rx Sync Xfer Overflow" },
- { 0xc0 ,"Rx Frame Overflow" }, /* RMC + RRES */
- { 0x00 ,"Protocol Error" },
- { 0x01 ,"Tx Data Underrun" }, /* XRES */
- { 0x01 ,"Tx Message Repeat" }, /* XRES */
-};
-
-/*---------------------------------------------------------------------------*
- * Ramptables related to S/Q - channel (HFC-1/S/SP)
- *
- * From TE's viewpoint:
- * Q: commands to NT
- * S: indications from NT
- *
- * From NT's viewpoint:
- * Q: indications from TE
- * S: commands to TE
- *
- * cmd: not used
- *---------------------------------------------------------------------------*/
-const struct ihfc_SQtable { u_char cmd, *string; }
-
- ihfc_Qtable[16] =
-{
- { 0x00, "Loss of Power indication" },
- { 0x00, "ST request" },
- { 0x00, 0 },
- { 0x00, "LoopBack request (B1/B2)" },
- { 0x00, 0 },
- { 0x00, 0 },
- { 0x00, 0 },
- { 0x00, "LoopBack request (B1)" },
- { 0x00, 0 },
- { 0x00, 0 },
- { 0x00, 0 },
- { 0x00, "LoopBack request (B2)" },
- { 0x00, "V-DCE slave mode" },
- { 0x00, "V-DTE slave mode" },
- { 0x00, 0 },
- { 0x00, "Idle" }
-},
- ihfc_Stable[16] =
-{
- { 0x00, "Idle" },
- { 0x00, "ST Fail" },
- { 0x00, "ST Pass" },
- { 0x00, "Disruptive Operation Indication" },
- { 0x00, "DTSE-OUT" },
- { 0x00, "V-DCE master mode" },
- { 0x00, "ST Indication" },
- { 0x00, "DTSE-IN" },
- { 0x00, "LoopBack indication (B1/B2)" },
- { 0x00, "Loss of Received Signal indication" },
- { 0x00, "LoopBack indication (B2)" },
- { 0x00, "DTSE-IN and OUT" },
- { 0x00, "LoopBack indication (B1)" },
- { 0x00, "Loss of power indication" }
-};
-
-
-#endif /* I4B_IHFC_DRV_H_ */
-
diff --git a/sys/i4b/layer1/ihfc/i4b_ihfc_ext.h b/sys/i4b/layer1/ihfc/i4b_ihfc_ext.h
deleted file mode 100644
index 0d1ee449a678..000000000000
--- a/sys/i4b/layer1/ihfc/i4b_ihfc_ext.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2000 Hans Petter Selasky. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ihfc_ext.h - ihfc common prototypes
- * ---------------------------------------
- *
- * last edit-date: [Wed Jul 19 09:40:59 2000]
- *
- * $Id: i4b_ihfc_ext.h,v 1.6 2000/08/20 07:14:08 hm Exp $
- *
- * $FreeBSD$
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef I4B_IHFC_EXT_H_
-#define I4B_IHFC_EXT_H_
-
-#include <i4b/include/i4b_l3l4.h>
-
-
-/* prototypes from i4b_ihfc_l1if.c */
-
-extern struct i4b_l1mux_func ihfc_l1mux_func;
-
-void ihfc_B_linkinit (ihfc_sc_t *sc);
-struct mbuf * ihfc_getmbuf (ihfc_sc_t *sc, u_char chan);
-void ihfc_putmbuf (ihfc_sc_t *sc, u_char chan, struct mbuf *m);
-
-
-/* prototypes from i4b_ihfc_drv.c */
-
-void ihfc_intr1 (ihfc_sc_t *sc);
-void ihfc_intr2 (ihfc_sc_t *sc);
-
-int ihfc_control (ihfc_sc_t *sc, int flag);
-void ihfc_fsm (ihfc_sc_t *sc, int flag);
-int ihfc_init (ihfc_sc_t *sc, u_char chan, int prot, int activate);
-
-#endif /* I4B_IHFC_EXT_H_ */
diff --git a/sys/i4b/layer1/ihfc/i4b_ihfc_l1if.c b/sys/i4b/layer1/ihfc/i4b_ihfc_l1if.c
deleted file mode 100644
index 10c639569ab8..000000000000
--- a/sys/i4b/layer1/ihfc/i4b_ihfc_l1if.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/*
- * Copyright (c) 2000 Hans Petter Selasky. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ihfc_l1.c - hfc layer 1 handler
- * -----------------------------------
- *
- * The idea of this file is to separate hfcs/sp/pci data/signal
- * handling and the I4B data/signal handling.
- *
- * Everything which has got anything to do with I4B has been put here!
- *
- * last edit-date: [Wed Jul 19 09:41:03 2000]
- *
- * $Id: i4b_ihfc_l1if.c,v 1.10 2000/09/19 13:50:36 hm Exp $
- *
- * $FreeBSD$
- *
- *---------------------------------------------------------------------------*/
-
-#include "ihfc.h"
-
-#if (NIHFC > 0)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/include/i4b_mbuf.h>
-#include <i4b/include/i4b_global.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/ihfc/i4b_ihfc.h>
-#include <i4b/layer1/ihfc/i4b_ihfc_ext.h>
-
-/*---------------------------------------------------------------------------*
- * Local prototypes
- *
- * NOTE: The prototypes for get/putmbuf and B_linkinit
- * have been put in i4b_hfc_ext.h for global hfc use.
- *
- * NOTE: channel != chan
- *---------------------------------------------------------------------------*/
-static
-isdn_link_t * ihfc_B_ret_linktab (int unit, int channel);
-static void ihfc_B_set_linktab (int unit, int channel, drvr_link_t *B_linktab);
-
-static void ihfc_B_start (int unit, int chan);
-static void ihfc_B_stat (int unit, int chan, bchan_statistics_t *bsp);
- void ihfc_B_setup (int unit, int chan, int bprot, int activate);
-
-static int ihfc_mph_command_req (int unit, int command, void *parm);
-
-static int ihfc_ph_activate_req (int unit);
-static int ihfc_ph_data_req (int unit, struct mbuf *m, int freeflag);
-
-static void ihfc_T3_expired (ihfc_sc_t *sc);
-
-/*---------------------------------------------------------------------------*
- * Our I4B L1 mulitplexer link
- *---------------------------------------------------------------------------*/
-struct i4b_l1mux_func ihfc_l1mux_func = {
- ihfc_B_ret_linktab,
- ihfc_B_set_linktab,
- ihfc_mph_command_req,
- ihfc_ph_data_req,
- ihfc_ph_activate_req,
-};
-
-/*---------------------------------------------------------------------------*
- * L2 -> L1: PH-DATA-REQUEST (D-Channel)
- *
- * NOTE: We may get called here from ihfc_hdlc_Dread or isac_hdlc_Dread
- * via the upper layers.
- *---------------------------------------------------------------------------*/
-int
-ihfc_ph_data_req(int unit, struct mbuf *m, int freeflag)
-{
- ihfc_sc_t *sc = &ihfc_softc[unit];
- u_char chan = 0;
- HFC_VAR;
-
- if (!m) return 0;
-
- HFC_BEG;
-
- if(S_PHSTATE != 3)
- {
- NDBGL1(L1_PRIM, "L1 was not running: "
- "ihfc_ph_activate_req(unit = %d)!", unit);
-
- ihfc_ph_activate_req(unit);
- }
-
- /* "Allow" I-frames (-hp) */
-
- if (freeflag == MBUF_DONTFREE) m = m_copypacket(m, M_DONTWAIT);
-
- if (!_IF_QFULL(&S_IFQUEUE) && m)
- {
- IF_ENQUEUE(&S_IFQUEUE, m);
-
- ihfc_B_start(unit, chan); /* (recycling) */
- }
- else
- {
- NDBGL1(L1_ERROR, "No frame out (unit = %d)", unit);
- if (m) i4b_Dfreembuf(m);
-
- HFC_END;
- return 0;
- }
-
- if (S_INTR_ACTIVE) S_INT_S1 |= 0x04;
-
- HFC_END;
-
- return 1;
-}
-
-/*---------------------------------------------------------------------------*
- * L2 -> L1: PH-ACTIVATE-REQUEST (B-channel and D-channel)
- *---------------------------------------------------------------------------*/
-int
-ihfc_ph_activate_req(int unit)
-{
- ihfc_sc_t *sc = &ihfc_softc[unit];
- HFC_VAR;
-
- HFC_BEG;
-
- if ((!S_STM_T3) && (S_PHSTATE != 3))
- {
- HFC_FSM(sc, 1);
-
- S_STM_T3 = 1;
- S_STM_T3CALLOUT = timeout((TIMEOUT_FUNC_T)
- ihfc_T3_expired, (ihfc_sc_t *)sc,
- IHFC_ACTIVATION_TIMEOUT);
- }
-
- HFC_END;
- return 0;
-}
-/*---------------------------------------------------------------------------*
- * T3 timeout - persistant deactivation
- *---------------------------------------------------------------------------*/
-void
-ihfc_T3_expired(ihfc_sc_t *sc)
-{
- u_char chan = 0;
- HFC_VAR;
-
- HFC_BEG;
-
- S_STM_T3 = 0;
-
- if (S_PHSTATE != 3) /* line was not activated */
- {
- i4b_Dcleanifq(&S_IFQUEUE);
- i4b_l1_ph_deactivate_ind(S_I4BUNIT);
-
- i4b_l1_mph_status_ind(S_I4BUNIT, STI_PDEACT, 0, 0);
-
- HFC_FSM(sc, 2); /* L1 deactivate */
- }
-
- HFC_END;
-}
-
-/*---------------------------------------------------------------------------*
- * Command from the upper layers (B-channel and D-channel)
- *---------------------------------------------------------------------------*/
-int
-ihfc_mph_command_req(int unit, int command, void *parm)
-{
- ihfc_sc_t *sc = &ihfc_softc[unit];
-
- switch(command)
- {
- case CMR_DOPEN: /* daemon running */
- NDBGL1(L1_PRIM,
- "unit %d, command = CMR_DOPEN", unit);
- S_ENABLED = 1;
- break;
-
- case CMR_DCLOSE: /* daemon not running */
- NDBGL1(L1_PRIM,
- "unit %d, command = CMR_DCLOSE", unit);
- S_ENABLED = 0;
- break;
-
- case CMR_SETTRACE: /* set new trace mask */
- NDBGL1(L1_PRIM,
- "unit %d, command = CMR_SETTRACE, parm = %d",
- unit, (unsigned int)parm);
- S_TRACE = (unsigned int)parm;
- break;
-
- case CMR_GCST: /* get chip statistic */
- NDBGL1(L1_PRIM,
- "unit %d, command = CMR_GCST, parm = %d",
- unit, (unsigned int)parm);
-
- #define CST ((struct chipstat *)parm)
-
- CST->driver_type = L1DRVR_IHFC;
-
- /* XXX CST->xxxx_stat = xxx; */
-
- #undef CST
- break;
-
- default:
- NDBGL1(L1_ERROR,
- "ERROR, unknown command = %d, unit = %d, parm = %d",
- command, unit, (unsigned int)parm);
- break;
- }
-
- return 0;
-}
-
-/*---------------------------------------------------------------------------*
- * Data source switch for Read channels - 1, 3 and 5 (B and D-Channel)
- *---------------------------------------------------------------------------*/
-void
-ihfc_putmbuf (ihfc_sc_t *sc, u_char chan, struct mbuf *m)
-{
- i4b_trace_hdr_t hdr;
-
- if (chan < 2)
- {
- if(S_TRACE & TRACE_D_RX)
- {
- hdr.count = ++S_DTRACECOUNT;
- hdr.dir = FROM_NT;
- hdr.type = TRC_CH_D;
- hdr.unit = S_I4BUNIT;
-
- MICROTIME(hdr.time);
-
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
-
- if (!S_ENABLED) { i4b_Dfreembuf(m); return; }
-
- m->m_pkthdr.len = m->m_len;
-
- i4b_l1_ph_data_ind(S_I4BUNIT, m);
- }
- else
- {
- if(S_TRACE & TRACE_B_RX)
- {
- hdr.count = ++S_BTRACECOUNT;
- hdr.dir = FROM_NT;
- hdr.type = (chan < 4) ? TRC_CH_B1 : TRC_CH_B2;
- hdr.unit = S_I4BUNIT;
-
- MICROTIME(hdr.time);
-
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
-
- if (!S_ENABLED) { i4b_Bfreembuf(m); return; }
-
- if (S_PROT == BPROT_NONE)
- {
- if(!i4b_l1_bchan_tel_silence(m->m_data, m->m_len))
- {
- S_BDRVLINK->bch_activity(S_BDRVLINK->unit, ACT_RX);
- }
-
- if (!_IF_QFULL(&S_IFQUEUE))
- {
- S_BYTES += m->m_len;
- IF_ENQUEUE(&S_IFQUEUE, m);
- S_BDRVLINK->bch_rx_data_ready(S_BDRVLINK->unit);
- }
-
- return;
- }
-
- if (S_PROT == BPROT_RHDLC)
- {
- S_MBUFDUMMY = m;
- S_BYTES += m->m_pkthdr.len = m->m_len;
- S_BDRVLINK->bch_rx_data_ready(S_BDRVLINK->unit);
- S_MBUFDUMMY = NULL;
-
- return;
- }
-
- NDBGL1(L1_ERROR, "Unknown protocol: %d", S_PROT);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Data destinator switch for write channels - 0, 2 and 4
- *---------------------------------------------------------------------------*/
-struct mbuf *
-ihfc_getmbuf (ihfc_sc_t *sc, u_char chan)
-{
- register struct mbuf *m;
- i4b_trace_hdr_t hdr;
-
- if (chan < 2)
- {
- IF_DEQUEUE(&S_IFQUEUE, m);
-
- if((S_TRACE & TRACE_D_TX) && m)
- {
- hdr.count = ++S_DTRACECOUNT;
- hdr.dir = FROM_TE;
- hdr.type = TRC_CH_D;
- hdr.unit = S_I4BUNIT;
-
- MICROTIME(hdr.time);
-
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
- }
- else
- {
- IF_DEQUEUE(&S_IFQUEUE, m);
-
- if (!m)
- {
- S_BDRVLINK->bch_tx_queue_empty(S_BDRVLINK->unit);
-
- IF_DEQUEUE(&S_IFQUEUE, m);
- }
- if (m)
- {
- if(!i4b_l1_bchan_tel_silence(m->m_data, m->m_len))
- {
- S_BDRVLINK->bch_activity(S_BDRVLINK->unit, ACT_TX);
- }
-
- S_BYTES += m->m_len;
-
- if(S_TRACE & TRACE_B_TX)
- {
- hdr.count = ++S_BTRACECOUNT;
- hdr.dir = FROM_TE;
- hdr.type = (chan < 4) ? TRC_CH_B1 : TRC_CH_B2;
- hdr.unit = S_I4BUNIT;
-
- MICROTIME(hdr.time);
-
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
- }
- }
-
- return(m);
-}
-
-/*---------------------------------------------------------------------------*
- * Initialize rx/tx data structures (B-channel)
- *---------------------------------------------------------------------------*/
-void
-ihfc_B_setup(int unit, int chan, int bprot, int activate)
-{
- ihfc_sc_t *sc = &ihfc_softc[unit];
- HFC_VAR;
-
- if (((u_int)chan > 5) || ((u_int)chan < 2)) return;
-
- HFC_BEG;
-
- HFC_INIT(sc, chan, bprot, activate);
-
- HFC_END;
-}
-
-/*---------------------------------------------------------------------------*
- * Start transmission (B-channel or D-channel tx)
- * NOTE: if "chan" variable is corrupted, it will not cause any harm,
- * but data may be lost and there may be software sync. errors.
- *---------------------------------------------------------------------------*/
-void
-ihfc_B_start(int unit, int chan)
-{
- ihfc_sc_t *sc = &ihfc_softc[unit];
- HFC_VAR;
-
- if ((u_int)chan > 5) return;
-
- HFC_BEG;
-
- if (S_FILTER && !S_MBUF && !S_INTR_ACTIVE)
- {
- S_INTR_ACTIVE |= 2; /* never know what *
- * they put in the *
- * L2 code */
-
- S_FILTER(sc, chan); /* quick tx */
-
- S_INTR_ACTIVE &= ~2;
- }
-
- HFC_END;
-}
-
-/*---------------------------------------------------------------------------*
- * Fill statistics struct (B-channel)
- *---------------------------------------------------------------------------*/
-void
-ihfc_B_stat(int unit, int chan, bchan_statistics_t *bsp)
-{
- ihfc_sc_t *sc = &ihfc_softc[unit];
- HFC_VAR;
-
- if ((u_int)chan > 5) return;
-
- chan &= ~1;
-
- HFC_BEG;
-
- bsp->inbytes = S_BYTES; S_BYTES = 0;
-
- chan++;
-
- bsp->outbytes = S_BYTES; S_BYTES = 0;
-
- HFC_END;
-}
-
-/*---------------------------------------------------------------------------*
- * Return the address of IHFC linktab to I4B (B-channel)
- *---------------------------------------------------------------------------*/
-isdn_link_t *
-ihfc_B_ret_linktab(int unit, int channel)
-{
- ihfc_sc_t *sc = &ihfc_softc[unit];
-
- if (channel < 2)
- return(&sc->sc_blinktab[channel]);
- else
- return 0;
-}
-
-/*---------------------------------------------------------------------------*
- * Set the I4B driver linktab for IHFC use (B-channel)
- *---------------------------------------------------------------------------*/
-void
-ihfc_B_set_linktab(int unit, int channel, drvr_link_t *B_linktab)
-{
- ihfc_sc_t *sc = &ihfc_softc[unit];
-
- if (channel < 2)
- sc->sc_bdrvlinktab[channel] = B_linktab;
-}
-
-/*---------------------------------------------------------------------------*
- * Initialize linktab for I4B use (B-channel)
- *---------------------------------------------------------------------------*/
-void
-ihfc_B_linkinit(ihfc_sc_t *sc)
-{
- u_char chan;
-
- /* make sure the hardware driver is known to layer 4 */
- ctrl_types[CTRL_PASSIVE].set_linktab = i4b_l1_set_linktab;
- ctrl_types[CTRL_PASSIVE].get_linktab = i4b_l1_ret_linktab;
-
- for (chan = 2; chan < 6; chan++)
- {
- S_BLINK.unit = S_UNIT;
- S_BLINK.channel = chan; /* point to tx-chan */
- S_BLINK.bch_config = ihfc_B_setup;
- S_BLINK.bch_tx_start = ihfc_B_start;
- S_BLINK.bch_stat = ihfc_B_stat;
-
- /* This is a transmit channel (even) */
- S_BLINK.tx_queue = &S_IFQUEUE;
- chan++;
- /* This is a receive channel (odd) */
- S_BLINK.rx_queue = &S_IFQUEUE;
- S_BLINK.rx_mbuf = &S_MBUFDUMMY;
- }
-}
-
-#endif /* NIHFC > 0 */
diff --git a/sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c b/sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c
deleted file mode 100644
index ac5658b4a57c..000000000000
--- a/sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
- * Copyright (c) 2000 Hans Petter Selasky. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ihfc_pnp.c - common hfc ISA PnP-bus interface
- * -------------------------------------------------
- *
- * - Everything which has got anything to to with "PnP" bus setup has
- * been put here, except the chip spesific "PnP" setup.
- *
- *
- * last edit-date: [Tue Jan 23 16:03:33 2001]
- *
- * $Id: i4b_ihfc_pnp.c,v 1.9 2000/09/19 13:50:36 hm Exp $
- *
- * $FreeBSD$
- *
- *---------------------------------------------------------------------------*/
-
-#include "ihfc.h"
-
-#if (NIHFC > 0)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-
-#include <i4b/include/i4b_global.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/ihfc/i4b_ihfc.h>
-#include <i4b/layer1/ihfc/i4b_ihfc_ext.h>
-
-#include <machine/bus.h>
-#include <machine/resource.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#include <isa/isavar.h>
-
-/*---------------------------------------------------------------------------*
- * Softc
- *---------------------------------------------------------------------------*/
-ihfc_sc_t ihfc_softc[IHFC_MAXUNIT];
-
-/*---------------------------------------------------------------------------*
- * Prototypes
- *---------------------------------------------------------------------------*/
-static int ihfc_isa_probe (device_t dev);
-static int ihfc_pnp_probe (device_t dev);
-static int ihfc_pnp_attach (device_t dev);
-static int ihfc_pnp_detach (device_t dev, u_int flag);
-static int ihfc_pnp_shutdown (device_t dev);
-
-const struct ihfc_pnp_ids
-{
- u_long vid; /* vendor id */
- int flag; /* */
- u_char hfc; /* chip type */
- u_char iirq; /* internal irq */
- u_short iio; /* internal io-address */
- u_char stdel; /* S/T delay compensation */
-}
- ihfc_pnp_ids[] =
-{
- { 0x10262750, CARD_TYPEP_16_3C, HFC_S, 2, 0x200, 0x2d},
- { 0x20262750, CARD_TYPEP_16_3C, HFC_SP, 0, 0x000, 0x0f},
- { 0x1411d805, CARD_TYPEP_ACERP10, HFC_S, 1, 0x300, 0x0e},
- { 0 }
-};
-
-typedef const struct ihfc_pnp_ids ihfc_id_t;
-
-/*---------------------------------------------------------------------------*
- * PCB layout
- *
- * IIRQx: Internal IRQ cross reference for a card
- * IRQx : Supported IRQ's for a card
- * IOx : Supported IO-bases for a card
- *
- * IO0, IRQ0, IIRQ0: TELEINT ISDN SPEED No. 1
- * IIRQ3: Teles 16.3c PnP (B version)
- *---------------------------------------------------------------------------*/
- /* IRQ -> 0 1 2 3 4 5 6 7 8 9 a b c d e f */
-#define IIRQ0 ((const u_char []){ 0, 0, 0, 1, 2, 3, 0, 4, 0, 0, 5, 6, 0, 0, 0, 0 })
-#define IRQ0 ((const u_char []){ 3, 4, 5, 7, 0xa, 0xb, 0 })
-
-#define IO0 ((const u_long []){ 0x300, 0x330, 0x278, 0x2e8, 0 })
-
-#define IIRQ3 ((const u_char []){ 0, 0, 0, 7, 0, 1, 0, 0, 0, 2, 3, 4, 5, 0, 0, 6 })
-
-/*---------------------------------------------------------------------------*
- * ISA PnP setup
- *---------------------------------------------------------------------------*/
-static device_method_t ihfc_pnp_methods[] =
-{
- DEVMETHOD(device_probe, ihfc_pnp_probe),
- DEVMETHOD(device_attach, ihfc_pnp_attach),
- DEVMETHOD(device_shutdown, ihfc_pnp_shutdown),
- { 0, 0 }
-};
-
-static driver_t ihfc_pnp_driver =
-{
- "ihfc",
- ihfc_pnp_methods,
- 0,
-};
-
-static devclass_t ihfc_devclass;
-
-DRIVER_MODULE(ihfcpnp, isa, ihfc_pnp_driver, ihfc_devclass, 0, 0);
-
-/*---------------------------------------------------------------------------*
- * probe for ISA "PnP" card
- *---------------------------------------------------------------------------*/
-int
-ihfc_pnp_probe(device_t dev)
-{
- u_int unit = device_get_unit(dev); /* get unit */
- u_int32_t vid = isa_get_vendorid(dev); /* vendor id */
- ihfc_id_t *ids = &ihfc_pnp_ids[0]; /* ids ptr */
- ihfc_sc_t *sc = &ihfc_softc[unit]; /* softc */
- u_char flag = 0; /* flag */
- void *dummy = 0; /* a dummy */
-
- HFC_VAR;
-
- if (unit >= IHFC_MAXUNIT)
- {
- printf("ihfc%d: Error, unit %d >= IHFC_MAXUNIT", unit, unit);
- return ENXIO;
- }
-
- if (!vid) return ihfc_isa_probe(dev);
-
- HFC_BEG;
-
- for ( ;(ids->vid); ids++)
- {
- if (ids->vid == vid)
- {
- flag = 0;
-
- bzero(sc, sizeof(ihfc_sc_t)); /* reset data structure.*
- * Zero is default for *
- * most, so calling the *
- * int. handler now will*
- * not be a problem. */
-
- S_IOBASE[0] = bus_alloc_resource(
- dev, SYS_RES_IOPORT, &S_IORID[0],
- 0UL, ~0UL, 2, RF_ACTIVE
- );
-
- S_IRQ = bus_alloc_resource(
- dev, SYS_RES_IRQ, &S_IRQRID,
- 0UL, ~0UL, 1, RF_ACTIVE
- );
-
- S_DLP = IHFC_DLP; /* set D-priority */
- S_HFC = ids->hfc; /* set chip type */
- S_I4BFLAG = ids->flag; /* set flag */
- S_NTMODE = IHFC_NTMODE; /* set mode */
- S_STDEL = ids->stdel; /* set delay */
-
- S_I4BUNIT = L0IHFCUNIT(unit); /* set "i4b" unit */
- S_TRACE = TRACE_OFF; /* set trace mask */
- S_UNIT = unit; /* set up unit numbers */
-
- if (S_IOBASE[0] && S_IRQ)
- {
- if (ids->iio)
- {
- S_IIO = ids->iio;
- S_IIRQ = ids->iirq;
- }
- else
- {
- S_IIO = rman_get_start(S_IOBASE[0]) & 0x3ff;
- S_IIRQ = IIRQ3[rman_get_start(S_IRQ) & 0xf];
- }
-
- /* setup interrupt routine now to avvoid stray *
- * interrupts. */
-
- bus_setup_intr(dev, S_IRQ, INTR_TYPE_NET, (void(*)(void*))
- HFC_INTR, sc, &dummy);
-
- flag = 1;
-
- if (!HFC_CONTROL(sc, 1))
- {
- HFC_END;
- return 0; /* success */
- }
- else
- {
- printf("ihfc%d: Chip seems corrupted. "
- "Please hard reboot your computer!\n",
- unit);
- }
- }
-
- ihfc_pnp_detach(dev, flag);
- }
- }
-
- HFC_END;
- return ENXIO; /* failure */
-}
-
-/*---------------------------------------------------------------------------*
- * probe for "ISA" cards
- *---------------------------------------------------------------------------*/
-int
-ihfc_isa_probe(device_t dev)
-{
- u_int unit = device_get_unit(dev); /* get unit */
- ihfc_sc_t *sc = &ihfc_softc[unit]; /* softc */
- const u_char *irq = &IRQ0[0]; /* irq's to try */
- const u_long *iobase = &IO0[0]; /* iobases to try */
- u_char flag = 0; /* flag */
- void *dummy = 0; /* a dummy */
-
- HFC_VAR;
-
- bzero(sc, sizeof(ihfc_sc_t)); /* reset data structure *
- * We must reset the *
- * datastructure here, *
- * else we risk zero-out *
- * our gotten resources. */
- HFC_BEG;
-
- j0: while(*irq) /* get supported IRQ */
- {
- if ((S_IRQ = bus_alloc_resource(
- dev, SYS_RES_IRQ, &S_IRQRID,
- *irq, *irq, 1, RF_ACTIVE
- )
- ))
- break;
- else
- irq++;
- }
-
- while(*iobase) /* get supported IO-PORT */
- {
- if ((S_IOBASE[0] = bus_alloc_resource(
- dev, SYS_RES_IOPORT, &S_IORID[0],
- *iobase, *iobase, 2, RF_ACTIVE
- )
- ))
- break;
- else
- iobase++;
- }
-
- flag = 0;
-
- if (*irq && *iobase) /* we got our resources, now test chip */
- {
- S_DLP = IHFC_DLP; /* set D-priority */
- S_HFC = HFC_1; /* set chip type */
- S_I4BFLAG = CARD_TYPEP_TELEINT_NO_1; /* set flag */
- S_NTMODE = IHFC_NTMODE; /* set mode */
- S_STDEL = 0x00; /* set delay (not used) */
-
- S_I4BUNIT = L0IHFCUNIT(unit); /* set "i4b" unit */
- S_TRACE = TRACE_OFF; /* set trace mask */
- S_UNIT = unit; /* set up unit numbers */
-
- S_IIRQ = IIRQ0[*irq]; /* set internal irq */
- S_IIO = *iobase; /* set internal iobase */
-
- /* setup interrupt routine now to avvoid stray *
- * interrupts. */
-
- bus_setup_intr(dev, S_IRQ, INTR_TYPE_NET, (void(*)(void*))
- HFC_INTR, sc, &dummy);
-
- flag = 1;
-
- if (!HFC_CONTROL(sc, 1))
- {
- device_set_desc(dev, "TELEINT ISDN SPEED No. 1");
-
- HFC_END;
- return 0; /* success */
- }
- }
-
- ihfc_pnp_detach(dev, flag);
-
- if (*irq && *++iobase) goto j0; /* try again */
-
- HFC_END;
-
- printf("ihfc%d: Chip not found. "
- "A hard reboot may help!\n", unit);
-
- return ENXIO; /* failure */
-}
-
-/*---------------------------------------------------------------------------*
- * attach ISA "PnP" card
- *---------------------------------------------------------------------------*/
-int
-ihfc_pnp_attach(device_t dev)
-{
- u_int unit = device_get_unit(dev); /* get unit */
- ihfc_sc_t *sc = &ihfc_softc[unit]; /* softc */
- HFC_VAR;
-
- HFC_BEG;
-
- ihfc_B_linkinit(sc); /* Setup B-Channel linktabs */
-
- i4b_l1_mph_status_ind(S_I4BUNIT, STI_ATTACH, S_I4BFLAG, &ihfc_l1mux_func);
-
- HFC_INIT(sc, 0, 0, 1); /* Setup D - Channel */
-
- HFC_INIT(sc, 2, 0, 0); /* Init B1 - Channel */
- HFC_INIT(sc, 4, 0, 0); /* Init B2 - Channel */
-
- HFC_END;
- return 0; /* success */
-
- HFC_END;
- return ENXIO; /* failure */
-}
-
-/*---------------------------------------------------------------------------*
- * shutdown for our ISA PnP card
- *---------------------------------------------------------------------------*/
-int
-ihfc_pnp_shutdown(device_t dev)
-{
- u_int unit = device_get_unit(dev); /* get unit */
- ihfc_sc_t *sc = &ihfc_softc[unit]; /* softc */
- HFC_VAR;
-
- HFC_BEG;
-
- if (unit >= IHFC_MAXUNIT)
- {
- printf("ihfc%d: Error, unit %d >= IHFC_MAXUNIT", unit, unit);
- goto f0;
- }
-
- HFC_CONTROL(sc, 2); /* shutdown chip */
-
- HFC_END;
- return 0;
- f0:
- HFC_END;
- return ENXIO;
-
-}
-
-/*---------------------------------------------------------------------------*
- * detach for our ISA PnP card
- *
- * flag: bit[0] set: teardown interrupt handler too
- *---------------------------------------------------------------------------*/
-int
-ihfc_pnp_detach (device_t dev, u_int flag)
-{
- u_int unit = device_get_unit(dev); /* get unit */
- ihfc_sc_t *sc = &ihfc_softc[unit]; /* softc */
- u_char i;
-
- if (unit >= IHFC_MAXUNIT)
- {
- printf("ihfc%d: Error, unit %d >= IHFC_MAXUNIT", unit, unit);
- return 0;
- }
-
- /* free interrupt resources */
-
- if(S_IRQ)
- {
- if (flag & 1)
- {
- /* tear down interrupt handler */
- bus_teardown_intr(dev, S_IRQ, (void(*)(void *))HFC_INTR);
- }
-
- /* free irq */
- bus_release_resource(dev, SYS_RES_IRQ, S_IRQRID, S_IRQ);
-
- S_IRQRID = 0;
- S_IRQ = 0;
- }
-
-
- /* free iobases */
-
- for (i = IHFC_IO_BASES; i--;)
- {
- if(S_IOBASE[i])
- {
- bus_release_resource(dev, SYS_RES_IOPORT,
- S_IORID[i], S_IOBASE[i]);
- S_IORID[i] = 0;
- S_IOBASE[i] = 0;
- }
- }
-
- return 0;
-}
-
-#endif /* NIHFC > 0 */
diff --git a/sys/i4b/layer1/isic/i4b_asuscom_ipac.c b/sys/i4b/layer1/isic/i4b_asuscom_ipac.c
deleted file mode 100644
index 9d440b35c333..000000000000
--- a/sys/i4b/layer1/isic/i4b_asuscom_ipac.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Copyright (c) 1999 Ari Suutari. All rights reserved.
- *
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isic - I4B Siemens ISDN Chipset Driver for Asuscom ISDNlink 128K PnP
- * =====================================================================
- *
- * This driver works with Asuscom ISDNlink 128K PnP ISA adapter,
- * which is based on Siemens IPAC chip (my card probes as ASU1690).
- * Older Asuscom ISA cards are based on different chipset
- * (containing two chips) - for those cards, one might want
- * to try the Dynalink driver.
- *
- * This driver is heavily based on ELSA Quickstep 1000pro PCI
- * driver written by Hellmuth Michaelis. Card initialization
- * code is modeled after Linux i4l driver written by Karsten
- * Keil.
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:06:30 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if (NISIC > 0) && defined (ASUSCOM_IPAC)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_ipac.h>
-
-/* masks for register encoded in base addr */
-
-#define ASI_BASE_MASK 0x0ffff
-#define ASI_OFF_MASK 0xf0000
-
-/* register id's to be encoded in base addr */
-
-#define ASI_IDISAC 0x00000
-#define ASI_IDHSCXA 0x10000
-#define ASI_IDHSCXB 0x20000
-#define ASI_IDIPAC 0x40000
-
-/* offsets from base address */
-
-#define ASI_OFF_ALE 0x00
-#define ASI_OFF_RW 0x01
-
-/*---------------------------------------------------------------------------*
- * Asuscom ISDNlink 128K ISAC get fifo routine
- *---------------------------------------------------------------------------*/
-static void
-asi_read_fifo(struct l1_softc *sc,int what,void *buf,size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,ASI_OFF_ALE,IPAC_ISAC_OFF);
- bus_space_read_multi_1(t,h,ASI_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,ASI_OFF_ALE,IPAC_HSCXA_OFF);
- bus_space_read_multi_1(t,h,ASI_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,ASI_OFF_ALE,IPAC_HSCXB_OFF);
- bus_space_read_multi_1(t,h,ASI_OFF_RW,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Asuscom ISDNlink 128K ISAC put fifo routine
- *---------------------------------------------------------------------------*/
-static void
-asi_write_fifo(struct l1_softc *sc,int what,void *buf,size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,ASI_OFF_ALE,IPAC_ISAC_OFF);
- bus_space_write_multi_1(t,h,ASI_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,ASI_OFF_ALE,IPAC_HSCXA_OFF);
- bus_space_write_multi_1(t,h,ASI_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,ASI_OFF_ALE,IPAC_HSCXB_OFF);
- bus_space_write_multi_1(t,h,ASI_OFF_RW,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Asuscom ISDNlink 128K ISAC put register routine
- *---------------------------------------------------------------------------*/
-static void
-asi_write_reg(struct l1_softc *sc,int what,bus_size_t reg,u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,ASI_OFF_ALE,reg+IPAC_ISAC_OFF);
- bus_space_write_1(t,h,ASI_OFF_RW,data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,ASI_OFF_ALE,reg+IPAC_HSCXA_OFF);
- bus_space_write_1(t,h,ASI_OFF_RW,data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,ASI_OFF_ALE,reg+IPAC_HSCXB_OFF);
- bus_space_write_1(t,h,ASI_OFF_RW,data);
- break;
- case ISIC_WHAT_IPAC:
- bus_space_write_1(t,h,ASI_OFF_ALE,reg+IPAC_IPAC_OFF);
- bus_space_write_1(t,h,ASI_OFF_RW,data);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Asuscom ISDNlink 128K ISAC get register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-asi_read_reg(struct l1_softc *sc,int what,bus_size_t reg)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,ASI_OFF_ALE,reg+IPAC_ISAC_OFF);
- return bus_space_read_1(t,h,ASI_OFF_RW);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,ASI_OFF_ALE,reg+IPAC_HSCXA_OFF);
- return bus_space_read_1(t,h,ASI_OFF_RW);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,ASI_OFF_ALE,reg+IPAC_HSCXB_OFF);
- return bus_space_read_1(t,h,ASI_OFF_RW);
- case ISIC_WHAT_IPAC:
- bus_space_write_1(t,h,ASI_OFF_ALE,reg+IPAC_IPAC_OFF);
- return bus_space_read_1(t,h,ASI_OFF_RW);
- default:
- return 0;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_siemens_isurf - attach for Asuscom ISDNlink 128K
- *---------------------------------------------------------------------------*/
-int
-isic_attach_asi(device_t dev)
-{
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = asi_read_reg;
- sc->writereg = asi_write_reg;
-
- sc->readfifo = asi_read_fifo;
- sc->writefifo = asi_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_ASUSCOMIPAC;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- /* setup chip type = IPAC ! */
-
- sc->sc_ipac = 1;
- sc->sc_bfifolen = IPAC_BFIFO_LEN;
-
- /* enable hscx/isac irq's */
-/*
- * This has been taken from Linux driver.
- * (Removed initialization that was not applicaple to
- * this board or was already register default setting.)
- */
- IPAC_WRITE (IPAC_ACFG, 0xff); /* Setup AUX pin modes */
- IPAC_WRITE (IPAC_AOE, 0x0); /* Setup AUX pin modes */
- IPAC_WRITE (IPAC_MASK, (IPAC_MASK_INT1 | IPAC_MASK_INT0));
-
- return(0);
-}
-#endif /* (NISIC > 0) && defined (ASUSCOM_IPAC) */
diff --git a/sys/i4b/layer1/isic/i4b_avm_a1.c b/sys/i4b/layer1/isic/i4b_avm_a1.c
deleted file mode 100644
index 3fbfafbf2cc6..000000000000
--- a/sys/i4b/layer1/isic/i4b_avm_a1.c
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * Copyright (c) 1996 Andrew Gordon. All rights reserved.
- *
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_avm_a1.c - AVM A1/Fritz passive card driver for isdn4bsd
- * ------------------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:25:23 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if NISIC > 0 && defined(AVM_A1)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-/*---------------------------------------------------------------------------*
- * AVM A1 and AVM Fritz! Card special registers
- *---------------------------------------------------------------------------*/
-
-#define AVM_CONF_REG 0x1800 /* base offset for config register */
-#define AVM_CONF_IRQ 0x1801 /* base offset for IRQ register */
- /* config register write */
-#define AVM_CONF_WR_RESET 0x01 /* 1 = RESET ISAC and HSCX */
-#define AVM_CONF_WR_CCL 0x02 /* 1 = clear counter low nibble */
-#define AVM_CONF_WR_CCH 0x04 /* 1 = clear counter high nibble */
-#define AVM_CONF_WR_IRQEN 0x08 /* 1 = enable IRQ */
-#define AVM_CONF_WR_TEST 0x10 /* test bit */
- /* config register read */
-#define AVM_CONF_RD_IIRQ 0x01 /* 0 = ISAC IRQ active */
-#define AVM_CONF_RD_HIRQ 0x02 /* 0 = HSCX IRQ active */
-#define AVM_CONF_RD_CIRQ 0x04 /* 0 = counter IRQ active */
-#define AVM_CONF_RD_ZER1 0x08 /* unused, always read 0 */
-#define AVM_CONF_RD_TEST 0x10 /* test bit read back */
-#define AVM_CONF_RD_ZER2 0x20 /* unused, always read 0 */
-
-#define AVM_ISAC_R_OFFS (0x1400-0x20)
-#define AVM_HSCXA_R_OFFS (0x400-0x20)
-#define AVM_HSCXB_R_OFFS (0xc00-0x20)
-#define AVM_ISAC_F_OFFS (0x1400-0x20-0x3e0)
-#define AVM_HSCXA_F_OFFS (0x400-0x20-0x3e0)
-#define AVM_HSCXB_F_OFFS (0xc00-0x20-0x3e0)
-
-/*---------------------------------------------------------------------------*
- * AVM read fifo routine
- *---------------------------------------------------------------------------*/
-static void
-avma1_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+4]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+4]);
- bus_space_read_multi_1(t, h, 0, buf, size);
-}
-
-/*---------------------------------------------------------------------------*
- * AVM write fifo routine
- *---------------------------------------------------------------------------*/
-static void
-avma1_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+4]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+4]);
- bus_space_write_multi_1(t, h, 0, (u_int8_t*)buf, size);
-}
-
-/*---------------------------------------------------------------------------*
- * AVM write register routine
- *---------------------------------------------------------------------------*/
-static void
-avma1_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+1]);
- bus_space_write_1(t, h, offs, data);
-}
-
-/*---------------------------------------------------------------------------*
- * AVM read register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-avma1_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+1]);
- return bus_space_read_1(t, h, offs);
-}
-
-/*---------------------------------------------------------------------------*
- * allocate an io port
- *---------------------------------------------------------------------------*/
-static int
-isic_alloc_port(device_t dev, int rid, u_int base, u_int len)
-{
- size_t unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
-
- sc->sc_resources.io_rid[rid] = rid;
-
- bus_set_resource(dev, SYS_RES_IOPORT, rid, base, len);
-
- if(!(sc->sc_resources.io_base[rid] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[rid],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Error, failed to reserve io #%d!\n", unit, rid);
- isic_detach_common(dev);
- return(ENXIO);
- }
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_probe_avma1 - probe for AVM A1 and compatibles
- *---------------------------------------------------------------------------*/
-int
-isic_probe_avma1(device_t dev)
-{
- size_t unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = 0; /* pointer to softc */
- void *ih = 0; /* dummy */
- bus_space_tag_t t; /* bus things */
- bus_space_handle_t h;
- u_char savebyte;
- u_char byte;
-
- /* check max unit range */
-
- if(unit >= ISIC_MAXUNIT)
- {
- printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for AVM A1/Fritz!\n",
- unit, unit);
- return(ENXIO);
- }
-
- sc = &l1_sc[unit]; /* get pointer to softc */
- sc->sc_unit = unit; /* set unit */
-
- /* see if an io base was supplied */
-
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get iobase for AVM A1/Fritz!\n",
- unit);
- return(ENXIO);
- }
-
- /* set io base */
-
- sc->sc_port = rman_get_start(sc->sc_resources.io_base[0]);
-
- /* release io base */
-
- bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_resources.io_rid[0],
- sc->sc_resources.io_base[0]);
-
- switch(sc->sc_port)
- {
- case 0x200:
- case 0x240:
- case 0x300:
- case 0x340:
- break;
-
- default:
- printf("isic%d: Error, invalid iobase 0x%x specified for AVM A1/Fritz!\n",
- unit, sc->sc_port);
- return(ENXIO);
- break;
- }
-
- if(isic_alloc_port(dev, 0, sc->sc_port+AVM_CONF_REG, 0x20))
- return(ENXIO);
-
- if(isic_alloc_port(dev, 1, sc->sc_port+AVM_ISAC_R_OFFS, 0x20))
- return(ENXIO);
-
- if(isic_alloc_port(dev, 2, sc->sc_port+AVM_HSCXA_R_OFFS, 0x20))
- return(ENXIO);
-
- if(isic_alloc_port(dev, 3, sc->sc_port+AVM_HSCXB_R_OFFS, 0x20))
- return(ENXIO);
-
- if(isic_alloc_port(dev, 4, sc->sc_port+AVM_ISAC_F_OFFS, 0x20))
- return(ENXIO);
-
- if(isic_alloc_port(dev, 5, sc->sc_port+AVM_HSCXA_F_OFFS, 0x20))
- return(ENXIO);
-
- if(isic_alloc_port(dev, 6, sc->sc_port+AVM_HSCXB_F_OFFS, 0x20))
- return(ENXIO);
-
- /* get our irq */
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get an irq for AVM A1/Fritz!\n",unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* get the irq number */
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
-
- /* register interupt routine */
- bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET,
- (void(*)(void *))(isicintr),
- sc, &ih);
-
- /* check IRQ validity */
-
- switch(sc->sc_irq)
- {
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- break;
-
- default:
- printf("isic%d: Error, invalid IRQ [%d] specified for AVM A1/Fritz!\n",
- unit, sc->sc_irq);
- isic_detach_common(dev);
- return(ENXIO);
- break;
- }
-
- sc->clearirq = NULL;
- sc->readreg = avma1_read_reg;
- sc->writereg = avma1_write_reg;
-
- sc->readfifo = avma1_read_fifo;
- sc->writefifo = avma1_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_AVMA1;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /*
- * Read HSCX A/B VSTR.
- * Expected value for AVM A1 is 0x04 or 0x05 and for the
- * AVM Fritz!Card is 0x05 in the least significant bits.
- */
-
- if( (((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) &&
- ((HSCX_READ(0, H_VSTR) & 0xf) != 0x4)) ||
- (((HSCX_READ(1, H_VSTR) & 0xf) != 0x5) &&
- ((HSCX_READ(1, H_VSTR) & 0xf) != 0x4)) )
- {
- printf("isic%d: HSCX VSTR test failed for AVM A1/Fritz\n",
- unit);
- printf("isic%d: HSC0: VSTR: %#x\n",
- unit, HSCX_READ(0, H_VSTR));
- printf("isic%d: HSC1: VSTR: %#x\n",
- unit, HSCX_READ(1, H_VSTR));
- return(ENXIO);
- }
-
- /* AVM A1 or Fritz! control register bits: */
- /* read write */
- /* 0x01 hscx irq* RESET */
- /* 0x02 isac irq* clear counter1 */
- /* 0x04 counter irq* clear counter2 */
- /* 0x08 always 0 irq enable */
- /* 0x10 read test bit set test bit */
- /* 0x20 always 0 unused */
-
- /*
- * XXX the following test may be destructive, to prevent the
- * worst case, we save the byte first, and in case the test
- * fails, we write back the saved byte .....
- */
-
- t = rman_get_bustag(sc->sc_resources.io_base[0]);
- h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- savebyte = bus_space_read_1(t, h, 0);
-
- /* write low to test bit */
-
- bus_space_write_1(t, h, 0, 0x00);
-
- /* test bit and next higher and lower bit must be 0 */
-
- if((byte = bus_space_read_1(t, h, 0) & 0x38) != 0x00)
- {
- printf("isic%d: Error, probe-1 failed, 0x%02x should be 0x00 for AVM A1/Fritz!\n",
- unit, byte);
- bus_space_write_1(t, h, 0, savebyte);
- return(ENXIO);
- }
-
- /* write high to test bit */
-
- bus_space_write_1(t, h, 0, 0x10);
-
- /* test bit must be high, next higher and lower bit must be 0 */
-
- if((byte = bus_space_read_1(t, h, 0) & 0x38) != 0x10)
- {
- printf("isic%d: Error, probe-2 failed, 0x%02x should be 0x10 for AVM A1/Fritz!\n",
- unit, byte);
- bus_space_write_1(t, h, 0, savebyte);
- return(ENXIO);
- }
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_avma1 - attach AVM A1 and compatibles
- *---------------------------------------------------------------------------*/
-int
-isic_attach_avma1(device_t dev)
-{
- size_t unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- /* reset ISAC/HSCX */
-
- bus_space_write_1(t, h, 0, 0x00);
- DELAY(SEC_DELAY / 10);
-
- bus_space_write_1(t, h, 0, AVM_CONF_WR_RESET);
- DELAY(SEC_DELAY / 10);
-
- bus_space_write_1(t, h, 0, 0x00);
- DELAY(SEC_DELAY / 10);
-
- /* setup IRQ */
-
- bus_space_write_1(t, h, 1, sc->sc_irq);
- DELAY(SEC_DELAY / 10);
-
- /* enable IRQ, disable counter IRQ */
-
- bus_space_write_1(t, h, 0, AVM_CONF_WR_IRQEN |
- AVM_CONF_WR_CCH | AVM_CONF_WR_CCL);
- DELAY(SEC_DELAY / 10);
-
- return(0);
-}
-
-#endif /* NISIC > 0 && defined(AVM_A1) */
diff --git a/sys/i4b/layer1/isic/i4b_bchan.c b/sys/i4b/layer1/isic/i4b_bchan.c
deleted file mode 100644
index 1226c175c63a..000000000000
--- a/sys/i4b/layer1/isic/i4b_bchan.c
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_bchan.c - B channel handling L1 procedures
- * ----------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:07:12 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-
-#if NISIC > 0
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#include <i4b/include/i4b_mbuf.h>
-#include <i4b/include/i4b_global.h>
-
-static void isic_bchannel_start(int unit, int h_chan);
-static void isic_bchannel_stat(int unit, int h_chan, bchan_statistics_t *bsp);
-
-/*---------------------------------------------------------------------------*
- * initialize one B channels rx/tx data structures and init/deinit HSCX
- *---------------------------------------------------------------------------*/
-void
-isic_bchannel_setup(int unit, int h_chan, int bprot, int activate)
-{
- struct l1_softc *sc = &l1_sc[unit];
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
-
- int s = SPLI4B();
-
- if(activate == 0)
- {
- /* deactivation */
- isic_hscx_init(sc, h_chan, activate);
- }
-
- NDBGL1(L1_BCHAN, "unit=%d, channel=%d, %s",
- sc->sc_unit, h_chan, activate ? "activate" : "deactivate");
-
- /* general part */
-
- chan->unit = sc->sc_unit; /* unit number */
- chan->channel = h_chan; /* B channel */
- chan->bprot = bprot; /* B channel protocol */
- chan->state = HSCX_IDLE; /* B channel state */
-
- /* receiver part */
-
- chan->rx_queue.ifq_maxlen = IFQ_MAXLEN;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&chan->rx_queue.ifq_mtx, "i4b_isic_rx", MTX_DEF);
-#endif
-
- i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */
-
- chan->rxcount = 0; /* reset rx counter */
-
- i4b_Bfreembuf(chan->in_mbuf); /* clean rx mbuf */
-
- chan->in_mbuf = NULL; /* reset mbuf ptr */
- chan->in_cbptr = NULL; /* reset mbuf curr ptr */
- chan->in_len = 0; /* reset mbuf data len */
-
- /* transmitter part */
-
- chan->tx_queue.ifq_maxlen = IFQ_MAXLEN;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&chan->tx_queue.ifq_mtx, "i4b_isic_tx", MTX_DEF);
-#endif
-
- i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */
-
- chan->txcount = 0; /* reset tx counter */
-
- i4b_Bfreembuf(chan->out_mbuf_head); /* clean tx mbuf */
-
- chan->out_mbuf_head = NULL; /* reset head mbuf ptr */
- chan->out_mbuf_cur = NULL; /* reset current mbuf ptr */
- chan->out_mbuf_cur_ptr = NULL; /* reset current mbuf data ptr */
- chan->out_mbuf_cur_len = 0; /* reset current mbuf data cnt */
-
- if(activate != 0)
- {
- /* activation */
- isic_hscx_init(sc, h_chan, activate);
- }
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * start transmission on a b channel
- *---------------------------------------------------------------------------*/
-static void
-isic_bchannel_start(int unit, int h_chan)
-{
- struct l1_softc *sc = &l1_sc[unit];
- register l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- register int next_len;
- register int len;
-
- int s;
- int activity = -1;
- int cmd = 0;
-
- s = SPLI4B(); /* enter critical section */
- if(chan->state & HSCX_TX_ACTIVE) /* already running ? */
- {
- splx(s);
- return; /* yes, leave */
- }
-
- /* get next mbuf from queue */
-
- IF_DEQUEUE(&chan->tx_queue, chan->out_mbuf_head);
-
- if(chan->out_mbuf_head == NULL) /* queue empty ? */
- {
- splx(s); /* leave critical section */
- return; /* yes, exit */
- }
-
- /* init current mbuf values */
-
- chan->out_mbuf_cur = chan->out_mbuf_head;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
-
- /* activity indicator for timeout handling */
-
- if(chan->bprot == BPROT_NONE)
- {
- if(!(i4b_l1_bchan_tel_silence(chan->out_mbuf_cur->m_data, chan->out_mbuf_cur->m_len)))
- activity = ACT_TX;
- }
- else
- {
- activity = ACT_TX;
- }
-
- chan->state |= HSCX_TX_ACTIVE; /* we start transmitting */
-
- if(sc->sc_trace & TRACE_B_TX) /* if trace, send mbuf to trace dev */
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ISICUNIT(unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
-
- len = 0; /* # of chars put into HSCX tx fifo this time */
-
- /*
- * fill the HSCX tx fifo with data from the current mbuf. if
- * current mbuf holds less data than HSCX fifo length, try to
- * get the next mbuf from (a possible) mbuf chain. if there is
- * not enough data in a single mbuf or in a chain, then this
- * is the last mbuf and we tell the HSCX that it has to send
- * CRC and closing flag
- */
-
- while((len < sc->sc_bfifolen) && chan->out_mbuf_cur)
- {
- /*
- * put as much data into the HSCX fifo as is
- * available from the current mbuf
- */
-
- if((len + chan->out_mbuf_cur_len) >= sc->sc_bfifolen)
- next_len = sc->sc_bfifolen - len;
- else
- next_len = chan->out_mbuf_cur_len;
-
-#ifdef NOTDEF
- printf("b:mh=%x, mc=%x, mcp=%x, mcl=%d l=%d nl=%d # ",
- chan->out_mbuf_head,
- chan->out_mbuf_cur,
- chan->out_mbuf_cur_ptr,
- chan->out_mbuf_cur_len,
- len,
- next_len);
-#endif
-
- /* wait for tx fifo write enabled */
-
- isic_hscx_waitxfw(sc, h_chan);
-
- /* write what we have from current mbuf to HSCX fifo */
-
- HSCX_WRFIFO(h_chan, chan->out_mbuf_cur_ptr, next_len);
-
- len += next_len; /* update # of bytes written */
- chan->txcount += next_len; /* statistics */
- chan->out_mbuf_cur_ptr += next_len; /* data ptr */
- chan->out_mbuf_cur_len -= next_len; /* data len */
-
- /*
- * in case the current mbuf (of a possible chain) data
- * has been put into the fifo, check if there is a next
- * mbuf in the chain. If there is one, get ptr to it
- * and update the data ptr and the length
- */
-
- if((chan->out_mbuf_cur_len <= 0) &&
- ((chan->out_mbuf_cur = chan->out_mbuf_cur->m_next) != NULL))
- {
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ISICUNIT(unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
- }
- }
-
- /*
- * if there is either still data in the current mbuf and/or
- * there is a successor on the chain available issue just
- * a XTF (transmit) command to HSCX. if ther is no more
- * data available from the current mbuf (-chain), issue
- * an XTF and an XME (message end) command which will then
- * send the CRC and the closing HDLC flag sequence
- */
-
- if(chan->out_mbuf_cur && (chan->out_mbuf_cur_len > 0))
- {
- /*
- * more data available, send current fifo out.
- * next xfer to HSCX tx fifo is done in the
- * HSCX interrupt routine.
- */
-
- cmd |= HSCX_CMDR_XTF;
- }
- else
- {
- /* end of mbuf chain */
-
- if(chan->bprot == BPROT_NONE)
- cmd |= HSCX_CMDR_XTF;
- else
- cmd |= HSCX_CMDR_XTF | HSCX_CMDR_XME;
-
- i4b_Bfreembuf(chan->out_mbuf_head); /* free mbuf chain */
-
- chan->out_mbuf_head = NULL;
- chan->out_mbuf_cur = NULL;
- chan->out_mbuf_cur_ptr = NULL;
- chan->out_mbuf_cur_len = 0;
- }
-
- /* call timeout handling routine */
-
- if(activity == ACT_RX || activity == ACT_TX)
- (*chan->isic_drvr_linktab->bch_activity)(chan->isic_drvr_linktab->unit, activity);
-
- if(cmd)
- isic_hscx_cmd(sc, h_chan, cmd);
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * fill statistics struct
- *---------------------------------------------------------------------------*/
-static void
-isic_bchannel_stat(int unit, int h_chan, bchan_statistics_t *bsp)
-{
- struct l1_softc *sc = &l1_sc[unit];
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- int s;
-
- s = SPLI4B();
-
- bsp->outbytes = chan->txcount;
- bsp->inbytes = chan->rxcount;
-
- chan->txcount = 0;
- chan->rxcount = 0;
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * return the address of isic drivers linktab
- *---------------------------------------------------------------------------*/
-isdn_link_t *
-isic_ret_linktab(int unit, int channel)
-{
- struct l1_softc *sc = &l1_sc[unit];
- l1_bchan_state_t *chan = &sc->sc_chan[channel];
-
- return(&chan->isic_isdn_linktab);
-}
-
-/*---------------------------------------------------------------------------*
- * set the driver linktab in the b channel softc
- *---------------------------------------------------------------------------*/
-void
-isic_set_linktab(int unit, int channel, drvr_link_t *dlt)
-{
- struct l1_softc *sc = &l1_sc[unit];
- l1_bchan_state_t *chan = &sc->sc_chan[channel];
-
- chan->isic_drvr_linktab = dlt;
-}
-
-/*---------------------------------------------------------------------------*
- * initialize our local linktab
- *---------------------------------------------------------------------------*/
-void
-isic_init_linktab(struct l1_softc *sc)
-{
- l1_bchan_state_t *chan = &sc->sc_chan[HSCX_CH_A];
- isdn_link_t *lt = &chan->isic_isdn_linktab;
-
- /* make sure the hardware driver is known to layer 4 */
- ctrl_types[CTRL_PASSIVE].set_linktab = i4b_l1_set_linktab;
- ctrl_types[CTRL_PASSIVE].get_linktab = i4b_l1_ret_linktab;
-
- /* local setup */
- lt->unit = sc->sc_unit;
- lt->channel = HSCX_CH_A;
- lt->bch_config = isic_bchannel_setup;
- lt->bch_tx_start = isic_bchannel_start;
- lt->bch_stat = isic_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-
- chan = &sc->sc_chan[HSCX_CH_B];
- lt = &chan->isic_isdn_linktab;
-
- lt->unit = sc->sc_unit;
- lt->channel = HSCX_CH_B;
- lt->bch_config = isic_bchannel_setup;
- lt->bch_tx_start = isic_bchannel_start;
- lt->bch_stat = isic_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-}
-
-#endif /* NISIC > 0 */
diff --git a/sys/i4b/layer1/isic/i4b_ctx_s0P.c b/sys/i4b/layer1/isic/i4b_ctx_s0P.c
deleted file mode 100644
index 8be6979b8094..000000000000
--- a/sys/i4b/layer1/isic/i4b_ctx_s0P.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isic - I4B Siemens ISDN Chipset Driver for Creatix/Teles PnP
- * ============================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:07:22 2001]
- *
- * Note: this driver works for the Creatix ISDN S0-16 P+P and
- * for the Teles S0/16.3 PnP card. Although they are not
- * the same hardware and don't share the same PnP config
- * information, once the base addresses are set, the
- * offsets are same and therefore they can use the same
- * driver.
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P))
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-/*---------------------------------------------------------------------------*
- * Creatix / Teles PnP ISAC get fifo routine
- *---------------------------------------------------------------------------*/
-static void
-ctxs0P_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+2]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+2]);
- bus_space_read_multi_1(t,h,0x3e,buf,size);
-}
-
-/*---------------------------------------------------------------------------*
- * Creatix / Teles PnP ISAC put fifo routine
- *---------------------------------------------------------------------------*/
-static void
-ctxs0P_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+2]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+2]);
- bus_space_write_multi_1(t,h,0x3e,buf,size);
-}
-
-/*---------------------------------------------------------------------------*
- * Creatix / Teles PnP ISAC put register routine
- *---------------------------------------------------------------------------*/
-static void
-ctxs0P_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+2]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+2]);
- bus_space_write_1(t,h,offs,data);
-}
-
-/*---------------------------------------------------------------------------*
- * Creatix / Teles PnP ISAC get register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-ctxs0P_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+2]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+2]);
- return bus_space_read_1(t,h,offs);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_Cs0P - attach Creatix / Teles PnP
- *---------------------------------------------------------------------------*/
-int
-isic_attach_Cs0P(device_t dev)
-{
- u_int32_t iobase1;
- u_int32_t iobase2;
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
- bus_space_tag_t t;
- bus_space_handle_t h;
-
- /*
- * this card needs a second io_base,
- * free resources if we don't get it
- */
-
- sc->sc_resources.io_rid[1] = 1;
-
- if(!(sc->sc_resources.io_base[1] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[1],
- 0UL, ~0UL, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get io area 1 for Creatix / Teles PnP!\n", unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* remember the io base addresses */
-
- iobase1 = rman_get_start(sc->sc_resources.io_base[0]);
- iobase2 = rman_get_start(sc->sc_resources.io_base[1]);
-
- /*
- * because overlapping resources are invalid,
- * release the first io port resource
- */
-
- bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_resources.io_rid[0],
- sc->sc_resources.io_base[0]);
-
- /* set and allocate a base io address for the ISAC chip */
-
- sc->sc_resources.io_rid[2] = 2;
-
- bus_set_resource(dev, SYS_RES_IOPORT, 2, iobase1-0x20, 0x40);
-
- if(!(sc->sc_resources.io_base[2] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[2],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get io area 2 for Creatix / Teles PnP!\n", unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /*
- * because overlapping resources are invalid,
- * release the second io port resource
- */
-
- bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_resources.io_rid[1],
- sc->sc_resources.io_base[1]);
-
- /* set and allocate a resource for the HSCX channel A */
-
- sc->sc_resources.io_rid[3] = 3;
-
-/*XXX*/ /* FIXME !!!!
- * the width of the resource is too small, there are accesses
- * to it with an offset of 0x3e into the next resource. anyway,
- * it seems to work and i have no idea how to do 2 resources
- * overlapping each other.
- */
-
-#if 0
- bus_set_resource(dev, SYS_RES_IOPORT, 3, iobase2-0x20, 0x20);
-#else
- bus_set_resource(dev, SYS_RES_IOPORT, 3, iobase2-0x20, 0x10);
-#endif
-
- if(!(sc->sc_resources.io_base[3] =
- bus_alloc_resource(dev,SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[3],
- 0ul,~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get io area 3 for Creatix / Teles PnP!\n", unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* set and allocate a resources for the HSCX channel B */
-
- sc->sc_resources.io_rid[4] = 4;
-
- bus_set_resource(dev, SYS_RES_IOPORT, 4, iobase2, 0x40);
-
- if(!(sc->sc_resources.io_base[4] =
- bus_alloc_resource(dev,SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[4],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get io area 4 for Creatix / Teles PnP!\n", unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = ctxs0P_read_reg;
- sc->writereg = ctxs0P_write_reg;
-
- sc->readfifo = ctxs0P_read_fifo;
- sc->writefifo = ctxs0P_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_CS0P;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /* enable the card */
-
- t = rman_get_bustag(sc->sc_resources.io_base[2]);
- h = rman_get_bushandle(sc->sc_resources.io_base[2]);
-
- bus_space_write_1(t, h, 0x3c, 0);
- DELAY(SEC_DELAY / 10);
-
- bus_space_write_1(t, h, 0x3c, 1);
- DELAY(SEC_DELAY / 10);
-
- return 0;
-}
-
-#endif /* (NISIC > 0) && (defined(CRTX_S0_P) || defined(TEL_S0_16_3_P)) */
-
diff --git a/sys/i4b/layer1/isic/i4b_diva.c b/sys/i4b/layer1/isic/i4b_diva.c
deleted file mode 100644
index 0177961653ff..000000000000
--- a/sys/i4b/layer1/isic/i4b_diva.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
- * Copyright (c) 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * Eicon Diehl DIVA 2.0 or 2.02 (ISA PnP) support for isic driver
- * --------------------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Fri Jan 26 13:57:10 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if NISIC > 0 && defined EICON_DIVA
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_ipac.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-/* offsets from base address */
-
-#define DIVA_IPAC_OFF_ALE 0x00
-#define DIVA_IPAC_OFF_RW 0x01
-
-#define DIVA_ISAC_OFF_RW 0x02
-#define DIVA_ISAC_OFF_ALE 0x06
-
-#define DIVA_HSCX_OFF_RW 0x00
-#define DIVA_HSCX_OFF_ALE 0x04
-
-#define DIVA_CTRL_OFF 0x07
-#define DIVA_CTRL_RDIST 0x01
-#define DIVA_CTRL_WRRST 0x08
-#define DIVA_CTRL_WRLDA 0x20
-#define DIVA_CTRL_WRLDB 0x40
-#define DIVA_CTRL_WRICL 0x80
-
-/* HSCX channel base offsets */
-
-#define DIVA_HSCXA 0x00
-#define DIVA_HSCXB 0x40
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.02
- *---------------------------------------------------------------------------*/
-static void
-diva_ipac_read_fifo(struct l1_softc *sc,int what,void *buf,size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,IPAC_ISAC_OFF);
- bus_space_read_multi_1(t,h,DIVA_IPAC_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,IPAC_HSCXA_OFF);
- bus_space_read_multi_1(t,h,DIVA_IPAC_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,IPAC_HSCXB_OFF);
- bus_space_read_multi_1(t,h,DIVA_IPAC_OFF_RW,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.02
- *---------------------------------------------------------------------------*/
-static void
-diva_ipac_write_fifo(struct l1_softc *sc,int what,void *buf,size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,IPAC_ISAC_OFF);
- bus_space_write_multi_1(t,h,DIVA_IPAC_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,IPAC_HSCXA_OFF);
- bus_space_write_multi_1(t,h,DIVA_IPAC_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,IPAC_HSCXB_OFF);
- bus_space_write_multi_1(t,h,DIVA_IPAC_OFF_RW,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.02
- *---------------------------------------------------------------------------*/
-static void
-diva_ipac_write_reg(struct l1_softc *sc,int what,bus_size_t reg,u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,reg+IPAC_ISAC_OFF);
- bus_space_write_1(t,h,DIVA_IPAC_OFF_RW,data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,reg+IPAC_HSCXA_OFF);
- bus_space_write_1(t,h,DIVA_IPAC_OFF_RW,data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,reg+IPAC_HSCXB_OFF);
- bus_space_write_1(t,h,DIVA_IPAC_OFF_RW,data);
- break;
- case ISIC_WHAT_IPAC:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,reg+IPAC_IPAC_OFF);
- bus_space_write_1(t,h,DIVA_IPAC_OFF_RW,data);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.02
- *---------------------------------------------------------------------------*/
-static u_int8_t
-diva_ipac_read_reg(struct l1_softc *sc,int what,bus_size_t reg)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,reg+IPAC_ISAC_OFF);
- return bus_space_read_1(t,h,DIVA_IPAC_OFF_RW);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,reg+IPAC_HSCXA_OFF);
- return bus_space_read_1(t,h,DIVA_IPAC_OFF_RW);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,reg+IPAC_HSCXB_OFF);
- return bus_space_read_1(t,h,DIVA_IPAC_OFF_RW);
- case ISIC_WHAT_IPAC:
- bus_space_write_1(t,h,DIVA_IPAC_OFF_ALE,reg+IPAC_IPAC_OFF);
- return bus_space_read_1(t,h,DIVA_IPAC_OFF_RW);
- default:
- return 0;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.02
- *---------------------------------------------------------------------------*/
-int
-isic_attach_diva_ipac(device_t dev)
-{
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = diva_ipac_read_reg;
- sc->writereg = diva_ipac_write_reg;
-
- sc->readfifo = diva_ipac_read_fifo;
- sc->writefifo = diva_ipac_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_DIVA_ISA;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- /* setup chip type = IPAC */
-
- sc->sc_ipac = 1;
- sc->sc_bfifolen = IPAC_BFIFO_LEN;
-
- /* enable hscx/isac irq's */
-
- IPAC_WRITE(IPAC_MASK, (IPAC_MASK_INT1 | IPAC_MASK_INT0));
-
- IPAC_WRITE(IPAC_ACFG, 0); /* outputs are open drain */
-
- IPAC_WRITE(IPAC_AOE, /* aux 5..2 are inputs, 7, 6 outputs */
- (IPAC_AOE_OE5 | IPAC_AOE_OE4 | IPAC_AOE_OE3 | IPAC_AOE_OE2));
-
- IPAC_WRITE(IPAC_ATX, 0xff); /* set all output lines high */
-
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.0
- *---------------------------------------------------------------------------*/
-static void
-diva_read_fifo(struct l1_softc *sc,int what,void *buf,size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,DIVA_ISAC_OFF_ALE,0);
- bus_space_read_multi_1(t,h,DIVA_ISAC_OFF_RW,buf,size);
- break;
-
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,DIVA_HSCX_OFF_ALE,DIVA_HSCXA);
- bus_space_read_multi_1(t,h,DIVA_HSCX_OFF_RW,buf,size);
- break;
-
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,DIVA_HSCX_OFF_ALE,DIVA_HSCXB);
- bus_space_read_multi_1(t,h,DIVA_HSCX_OFF_RW,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.0
- *---------------------------------------------------------------------------*/
-static void
-diva_write_fifo(struct l1_softc *sc,int what,void *buf,size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,DIVA_ISAC_OFF_ALE,0);
- bus_space_write_multi_1(t,h,DIVA_ISAC_OFF_RW,buf,size);
- break;
-
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,DIVA_HSCX_OFF_ALE,DIVA_HSCXA);
- bus_space_write_multi_1(t,h,DIVA_HSCX_OFF_RW,buf,size);
- break;
-
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,DIVA_HSCX_OFF_ALE,DIVA_HSCXB);
- bus_space_write_multi_1(t,h,DIVA_HSCX_OFF_RW,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.0
- *---------------------------------------------------------------------------*/
-static void
-diva_write_reg(struct l1_softc *sc,int what,bus_size_t reg,u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,DIVA_ISAC_OFF_ALE,reg);
- bus_space_write_1(t,h,DIVA_ISAC_OFF_RW,data);
- break;
-
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,DIVA_HSCX_OFF_ALE,reg+DIVA_HSCXA);
- bus_space_write_1(t,h,DIVA_HSCX_OFF_RW,data);
- break;
-
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,DIVA_HSCX_OFF_ALE,reg+DIVA_HSCXB);
- bus_space_write_1(t,h,DIVA_HSCX_OFF_RW,data);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.0
- *---------------------------------------------------------------------------*/
-static u_int8_t
-diva_read_reg(struct l1_softc *sc,int what,bus_size_t reg)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,DIVA_ISAC_OFF_ALE,reg);
- return bus_space_read_1(t,h,DIVA_ISAC_OFF_RW);
-
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,DIVA_HSCX_OFF_ALE,reg+DIVA_HSCXA);
- return bus_space_read_1(t,h,DIVA_HSCX_OFF_RW);
-
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,DIVA_HSCX_OFF_ALE,reg+DIVA_HSCXB);
- return bus_space_read_1(t,h,DIVA_HSCX_OFF_RW);
-
- default:
- return 0;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Eicon Diehl DIVA 2.0
- *---------------------------------------------------------------------------*/
-int
-isic_attach_diva(device_t dev)
-{
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = diva_read_reg;
- sc->writereg = diva_write_reg;
-
- sc->readfifo = diva_read_fifo;
- sc->writefifo = diva_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_DIVA_ISA;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- /* setup chip type = ISAC/HSCX */
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /* Read HSCX A/B VSTR. Expected value is 0x05 (V2.1). */
-
- if( ((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) ||
- ((HSCX_READ(1, H_VSTR) & 0xf) != 0x5) )
- {
- printf("isic%d: HSCX VSTR test failed for Eicon DIVA 2.0\n",
- sc->sc_unit);
- printf("isic%d: HSC0: VSTR: %#x\n",
- sc->sc_unit, HSCX_READ(0, H_VSTR));
- printf("isic%d: HSC1: VSTR: %#x\n",
- sc->sc_unit, HSCX_READ(1, H_VSTR));
- return ENXIO;
- }
- /* reset on */
- bus_space_write_1(t,h,DIVA_CTRL_OFF,0);
- DELAY(100);
- /* reset off */
- bus_space_write_1(t,h,DIVA_CTRL_OFF,DIVA_CTRL_WRRST);
- return(0);
-}
-
-#endif /* NISIC > 0 && defined EICON_DIVA */
diff --git a/sys/i4b/layer1/isic/i4b_drn_ngo.c b/sys/i4b/layer1/isic/i4b_drn_ngo.c
deleted file mode 100644
index ae9b58980fd6..000000000000
--- a/sys/i4b/layer1/isic/i4b_drn_ngo.c
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_drn_ngo.c - Dr. Neuhaus Niccy GO@ and SAGEM Cybermod
- * --------------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:07:44 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if (NISIC > 0) && defined(DRN_NGO)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-/*---------------------------------------------------------------------------*
- * Niccy GO@ definitions
- *
- * the card uses 2 i/o addressranges each using 2 bytes
- *
- * addressrange 0:
- * offset 0 - ISAC dataregister
- * offset 1 - HSCX dataregister
- * addressrange 1:
- * offset 0 - ISAC addressregister
- * offset 1 - HSCX addressregister
- *
- * to access an ISAC/HSCX register, you have to write the register
- * number into the ISAC or HSCX addressregister and then read/write
- * data for the ISAC/HSCX register into/from the corresponding
- * dataregister.
- *
- * Thanks to Klaus Muehle of Dr. Neuhaus Telekommunikation for giving
- * out this information!
- *
- *---------------------------------------------------------------------------*/
-#define NICCY_PORT_MIN 0x200
-#define NICCY_PORT_MAX 0x3e0
-
-#define HSCX_ABIT 0x1000 /* flag, HSCX A is meant */
-#define HSCX_BBIT 0x2000 /* flag, HSCX B is meant */
-
-#define HSCX_BOFF 0x40
-
-#define ADDR_OFF 2 /* address register range offset */
-
-#define ISAC_DATA 0
-#define HSCX_DATA 1
-
-#define ISAC_ADDR 0
-#define HSCX_ADDR 1
-
-/*---------------------------------------------------------------------------*
- * Dr. Neuhaus Niccy GO@ read fifo routine
- *---------------------------------------------------------------------------*/
-static void
-drnngo_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t tdata, tadr;
- bus_space_handle_t hdata, hadr;
-
- tdata = rman_get_bustag(sc->sc_resources.io_base[0]);
- hdata = rman_get_bushandle(sc->sc_resources.io_base[0]);
- tadr = rman_get_bustag(sc->sc_resources.io_base[1]);
- hadr = rman_get_bushandle(sc->sc_resources.io_base[1]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1 (tadr ,hadr, ISAC_ADDR,0x0);
- bus_space_read_multi_1(tdata,hdata,ISAC_DATA,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1 (tadr ,hadr ,HSCX_ADDR,0x0);
- bus_space_read_multi_1(tdata,hdata,HSCX_DATA,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1 (tadr ,hadr ,HSCX_ADDR,HSCX_BOFF);
- bus_space_read_multi_1(tdata,hdata,HSCX_DATA,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Dr. Neuhaus Niccy GO@ write fifo routine
- *---------------------------------------------------------------------------*/
-static void
-drnngo_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t tdata, tadr;
- bus_space_handle_t hdata, hadr;
-
- tdata = rman_get_bustag(sc->sc_resources.io_base[0]);
- hdata = rman_get_bushandle(sc->sc_resources.io_base[0]);
- tadr = rman_get_bustag(sc->sc_resources.io_base[1]);
- hadr = rman_get_bushandle(sc->sc_resources.io_base[1]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1 (tadr ,hadr, ISAC_ADDR,0x0);
- bus_space_write_multi_1(tdata,hdata,ISAC_DATA,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1 (tadr ,hadr ,HSCX_ADDR,0x0);
- bus_space_write_multi_1(tdata,hdata,HSCX_DATA,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1 (tadr ,hadr ,HSCX_ADDR,HSCX_BOFF);
- bus_space_write_multi_1(tdata,hdata,HSCX_DATA,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Dr. Neuhaus Niccy GO@ write register routine
- *---------------------------------------------------------------------------*/
-static void
-drnngo_write_reg(struct l1_softc *sc, int what, bus_size_t reg, u_int8_t data)
-{
- bus_space_tag_t tdata, tadr;
- bus_space_handle_t hdata, hadr;
-
- tdata = rman_get_bustag(sc->sc_resources.io_base[0]);
- hdata = rman_get_bushandle(sc->sc_resources.io_base[0]);
- tadr = rman_get_bustag(sc->sc_resources.io_base[1]);
- hadr = rman_get_bushandle(sc->sc_resources.io_base[1]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(tadr ,hadr, ISAC_ADDR,reg);
- bus_space_write_1(tdata,hdata,ISAC_DATA,data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(tadr ,hadr ,HSCX_ADDR,reg);
- bus_space_write_1(tdata,hdata,HSCX_DATA,data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(tadr ,hadr ,HSCX_ADDR,reg+HSCX_BOFF);
- bus_space_write_1(tdata,hdata,HSCX_DATA,data);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Dr. Neuhaus Niccy GO@ read register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-drnngo_read_reg(struct l1_softc *sc, int what, bus_size_t reg)
-{
- bus_space_tag_t tdata, tadr;
- bus_space_handle_t hdata, hadr;
-
- tdata = rman_get_bustag(sc->sc_resources.io_base[0]);
- hdata = rman_get_bushandle(sc->sc_resources.io_base[0]);
- tadr = rman_get_bustag(sc->sc_resources.io_base[1]);
- hadr = rman_get_bushandle(sc->sc_resources.io_base[1]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(tadr ,hadr, ISAC_ADDR,reg);
- return bus_space_read_1(tdata,hdata,ISAC_DATA);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(tadr ,hadr ,HSCX_ADDR,reg);
- return bus_space_read_1(tdata,hdata,HSCX_DATA);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(tadr ,hadr ,HSCX_ADDR,reg+HSCX_BOFF);
- return bus_space_read_1(tdata,hdata,HSCX_DATA);
- default:
- return 0;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * probe for ISA PnP cards
- *---------------------------------------------------------------------------*/
-int
-isic_attach_drnngo(device_t dev)
-{
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
-
- sc->sc_resources.io_rid[1] = 1;
-
- /*
- * this card needs a second io_base,
- * free resources if we don't get it
- */
-
- if(!(sc->sc_resources.io_base[1] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[1],
- 0UL, ~0UL, 1, RF_ACTIVE)))
- {
- printf("isic%d: Failed to get second io base.\n", unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* setup ISAC access routines */
-
- sc->clearirq = NULL;
- sc->readreg = drnngo_read_reg;
- sc->writereg = drnngo_write_reg;
-
- sc->readfifo = drnngo_read_fifo;
- sc->writefifo = drnngo_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_DRNNGO;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- return (0);
-}
-
-#endif /* (NISIC > 0) && defined(DRN_NGO) */
diff --git a/sys/i4b/layer1/isic/i4b_dynalink.c b/sys/i4b/layer1/isic/i4b_dynalink.c
deleted file mode 100644
index 3ed0aea3bcbb..000000000000
--- a/sys/i4b/layer1/isic/i4b_dynalink.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Copyright (c) 1998 Martijn Plak. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isdn4bsd layer1 driver for Dynalink IS64PH isdn TA
- * ==================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:08:03 2001]
- *
- *---------------------------------------------------------------------------*/
-
-/* NOTES:
-
- This driver was written for the Dynalink IS64PH ISDN TA, based on two
- Siemens chips (HSCX 21525 and ISAC 2186). It is sold in the Netherlands.
-
- model numbers found on (my) card:
- IS64PH, TAS100H-N, P/N:89590555, TA200S100045521
-
- chips:
- Siemens PSB 21525N, HSCX TE V2.1
- Siemens PSB 2186N, ISAC-S TE V1.1
- 95MS14, PNP
-
- plug-and-play info:
- device id "ASU1688"
- vendor id 0x88167506
- serial 0x00000044
- i/o port 4 byte alignment, 4 bytes requested,
- 10 bit i/o decoding, 0x100-0x3f8 (?)
- irq 3,4,5,9,10,11,12,15, high true, edge sensitive
-
- At the moment I'm writing this Dynalink is replacing this card with
- one based on a single Siemens chip (IPAC). It will apparently be sold
- under the same model name.
-
- This driver might also work for Asuscom cards.
-*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if (NISIC > 0) && defined(DYNALINK)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-/* io address mapping */
-#define ISAC 0
-#define HSCX 1
-#define ADDR 2
-
-/* ADDR bits */
-#define ADDRMASK 0x7F
-#define RESET 0x80
-
-/* HSCX register offsets */
-#define HSCXA 0x00
-#define HSCXB 0x40
-
-/* LOW-LEVEL DEVICE ACCESS
-*/
-
-static void
-dynalink_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ADDR, 0);
- bus_space_read_multi_1(t, h, ISAC, buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ADDR, HSCXA);
- bus_space_read_multi_1(t, h, HSCX, buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ADDR, HSCXB);
- bus_space_read_multi_1(t, h, HSCX, buf, size);
- break;
- }
-}
-
-static void
-dynalink_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ADDR, 0);
- bus_space_write_multi_1(t, h, ISAC, (u_int8_t*)buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ADDR, HSCXA);
- bus_space_write_multi_1(t, h, HSCX, (u_int8_t*)buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ADDR, HSCXB);
- bus_space_write_multi_1(t, h, HSCX, (u_int8_t*)buf, size);
- break;
- }
-}
-
-static void
-dynalink_write_reg(struct l1_softc *sc, int what, bus_size_t reg, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ADDR, reg);
- bus_space_write_1(t, h, ISAC, data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ADDR, HSCXA+reg);
- bus_space_write_1(t, h, HSCX, data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ADDR, HSCXB+reg);
- bus_space_write_1(t, h, HSCX, data);
- break;
- }
-}
-
-static u_int8_t
-dynalink_read_reg(struct l1_softc *sc, int what, bus_size_t reg)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ADDR, reg);
- return bus_space_read_1(t, h, ISAC);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ADDR, HSCXA+reg);
- return bus_space_read_1(t, h, HSCX);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ADDR, HSCXB+reg);
- return bus_space_read_1(t, h, HSCX);
- }
- return 0;
-}
-
-/* attach callback routine */
-int
-isic_attach_Dyn(device_t dev)
-{
- int unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = &l1_sc[unit]; /* pointer to softc */
-
- struct i4b_info * info = &(sc->sc_resources);
- bus_space_tag_t t = rman_get_bustag(info->io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(info->io_base[0]);
-
- /* fill in l1_softc structure */
- sc->readreg = dynalink_read_reg;
- sc->writereg = dynalink_write_reg;
- sc->readfifo = dynalink_read_fifo;
- sc->writefifo = dynalink_write_fifo;
- sc->clearirq = NULL;
- sc->sc_cardtyp = CARD_TYPEP_DYNALINK;
- sc->sc_bustyp = BUS_TYPE_IOM2;
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /* Read HSCX A/B VSTR. Expected value is 0x05 (V2.1). */
- if( ((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) ||
- ((HSCX_READ(1, H_VSTR) & 0xf) != 0x5) )
- {
- printf("isic%d: HSCX VSTR test failed for Dynalink\n",
- sc->sc_unit);
- printf("isic%d: HSC0: VSTR: %#x\n",
- sc->sc_unit, HSCX_READ(0, H_VSTR));
- printf("isic%d: HSC1: VSTR: %#x\n",
- sc->sc_unit, HSCX_READ(1, H_VSTR));
- return ENXIO;
- }
-
- /* reset card */
- bus_space_write_1(t,h,ADDR,RESET);
- DELAY(SEC_DELAY / 10);
- bus_space_write_1(t,h,ADDR,0);
- DELAY(SEC_DELAY / 10);
-
- return 0;
-}
-
-#endif /* (NISIC > 0) && defined(DYNALINK) */
diff --git a/sys/i4b/layer1/isic/i4b_elsa_pcc16.c b/sys/i4b/layer1/isic/i4b_elsa_pcc16.c
deleted file mode 100644
index 5fdfe8c6421b..000000000000
--- a/sys/i4b/layer1/isic/i4b_elsa_pcc16.c
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * Copyright (c) 1999, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isic - I4B driver for ELSA MicroLink ISDN/PCC-16 and ELSA PCFpro
- * ================================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:26:33 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if (NISIC > 0) && defined(ELSA_PCC16)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-static void i4b_epcc16_clrirq(struct l1_softc *sc);
-
-/* masks for register encoded in base addr */
-
-#define ELSA_BASE_MASK 0x0ffff
-#define ELSA_OFF_MASK 0xf0000
-
-/* register id's to be encoded in base addr */
-
-#define ELSA_IDISAC 0x00000
-#define ELSA_IDHSCXA 0x10000
-#define ELSA_IDHSCXB 0x20000
-
-/* offsets from base address */
-
-#define ELSA_OFF_ISAC 0x00
-#define ELSA_OFF_HSCX 0x02
-#define ELSA_OFF_OFF 0x03
-#define ELSA_OFF_CTRL 0x04
-#define ELSA_OFF_CFG 0x05
-#define ELSA_OFF_TIMR 0x06
-#define ELSA_OFF_IRQ 0x07
-
-/* control register (write access) */
-
-#define ELSA_CTRL_LED_YELLOW 0x02
-#define ELSA_CTRL_LED_GREEN 0x08
-#define ELSA_CTRL_RESET 0x20
-#define ELSA_CTRL_TIMEREN 0x80
-#define ELSA_CTRL_SECRET 0x50
-
-/*---------------------------------------------------------------------------*
- * ELSA MicroLink ISDN/PCC-16 clear IRQ routine
- *---------------------------------------------------------------------------*/
-static void
-i4b_epcc16_clrirq(struct l1_softc *sc)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_write_1(t, h, ELSA_OFF_IRQ, 0);
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA MicroLink ISDN/PCC-16 ISAC get fifo routine
- *---------------------------------------------------------------------------*/
-static void
-epcc16_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0);
- bus_space_read_multi_1(t, h, ELSA_OFF_ISAC, buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0);
- bus_space_read_multi_1(t, h, ELSA_OFF_HSCX, buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0x40);
- bus_space_read_multi_1(t, h, ELSA_OFF_HSCX, buf, size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA MicroLink ISDN/PCC-16 ISAC put fifo routine
- *---------------------------------------------------------------------------*/
-static void
-epcc16_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0);
- bus_space_write_multi_1(t, h, ELSA_OFF_ISAC, buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0);
- bus_space_write_multi_1(t, h, ELSA_OFF_HSCX, buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0x40);
- bus_space_write_multi_1(t, h, ELSA_OFF_HSCX, buf, size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA MicroLink ISDN/PCC-16 ISAC put register routine
- *---------------------------------------------------------------------------*/
-static void
-epcc16_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_OFF, offs);
- bus_space_write_1(t, h, ELSA_OFF_ISAC, data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_OFF, offs);
- bus_space_write_1(t, h, ELSA_OFF_HSCX, data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0x40+offs);
- bus_space_write_1(t, h, ELSA_OFF_HSCX, data);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA MicroLink ISDN/PCC-16 ISAC get register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-epcc16_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_OFF, offs);
- return bus_space_read_1(t, h, ELSA_OFF_ISAC);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_OFF, offs);
- return bus_space_read_1(t, h, ELSA_OFF_HSCX);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0x40+offs);
- return bus_space_read_1(t, h, ELSA_OFF_HSCX);
- }
- return 0;
-}
-
-/*---------------------------------------------------------------------------*
- * isic_detach_Epcc16 - detach for ELSA MicroLink ISDN/PCC-16
- *---------------------------------------------------------------------------*/
-static void
-isic_detach_Epcc16(device_t dev)
-{
- struct l1_softc *sc = &l1_sc[device_get_unit(dev)];
-
- if ( sc->sc_resources.irq )
- {
- bus_teardown_intr(dev,sc->sc_resources.irq,
- (void(*)(void *))isicintr);
- bus_release_resource(dev,SYS_RES_IRQ,
- sc->sc_resources.irq_rid,
- sc->sc_resources.irq);
- sc->sc_resources.irq = 0;
- }
-
- if ( sc->sc_resources.io_base[0] ) {
- bus_release_resource(dev,SYS_RES_IOPORT,
- sc->sc_resources.io_rid[0],
- sc->sc_resources.io_base[0]);
- sc->sc_resources.io_base[0] = 0;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * isic_probe_Epcc16 - probe for ELSA MicroLink ISDN/PCC-16
- *---------------------------------------------------------------------------*/
-int
-isic_probe_Epcc16(device_t dev)
-{
- size_t unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = 0; /* pointer to softc */
- void *ih = 0; /* dummy */
-
- /* check max unit range */
- if(unit >= ISIC_MAXUNIT)
- {
- printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for ELSA PCC-16!\n",
- unit, unit);
- return(ENXIO);
- }
-
- sc = &l1_sc[unit]; /* get pointer to softc */
- sc->sc_unit = unit; /* set unit */
-
- /* see if an io base was supplied */
-
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get iobase for ELSA PCC-16.\n",
- unit);
- return(ENXIO);
- }
-
- /* check if we got an iobase */
-
- sc->sc_port = rman_get_start(sc->sc_resources.io_base[0]);
-
- switch(sc->sc_port)
- {
- case 0x160:
- case 0x170:
- case 0x260:
- case 0x360:
- break;
- default:
- printf("isic%d: Error, invalid iobase 0x%x specified for ELSA MicroLink ISDN/PCC-16!\n",
- unit, sc->sc_port);
- isic_detach_Epcc16(dev);
- return(ENXIO);
- break;
- }
-
- /* setup access routines */
-
- sc->clearirq = i4b_epcc16_clrirq;
- sc->readreg = epcc16_read_reg;
- sc->writereg = epcc16_write_reg;
-
- sc->readfifo = epcc16_read_fifo;
- sc->writefifo = epcc16_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_ELSAQS1ISA;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /*
- * Read HSCX A/B VSTR. Expected value for the ELSA PCC-16
- * is 0x05 ( = version 2.1 ) in the least significant bits.
- */
-
- if( ((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) ||
- ((HSCX_READ(1, H_VSTR) & 0xf) != 0x5) )
- {
- /* patch from "Doobee R . Tzeck" <drt@ailis.de>:
- * I own an ELSA PCFpro. To my knowledge, the ELSA PCC16 is
- * a stripped down Version on the PCFpro. By patching the
- * card detection routine for the PPC16 I was able to use
- * the PPC16 driver for the PCFpro.
- */
- if( ((HSCX_READ(0, H_VSTR) & 0xf) != 0x85) ||
- ((HSCX_READ(1, H_VSTR) & 0xf) != 0x85) )
- {
- printf("isic%d: HSCX VSTR test failed for ELSA MicroLink ISDN/PCC-16\n",
- unit);
- isic_detach_Epcc16(dev);
- printf("isic%d: HSC0: VSTR: %#x\n",
- unit, HSCX_READ(0, H_VSTR));
- printf("isic%d: HSC1: VSTR: %#x\n",
- unit, HSCX_READ(1, H_VSTR));
- return (ENXIO);
- }
- else
- {
- printf("isic%d: ELSA MicroLink ISDN/PCFpro found, going to tread it as PCC-16\n",
- unit);
- }
- }
-
- /* get our irq */
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get an irq.\n",unit);
- isic_detach_Epcc16(dev);
- return ENXIO;
- }
-
- /* get the irq number */
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
-
- /* check IRQ validity */
- switch(sc->sc_irq)
- {
- case 2:
- case 9:
- case 3:
- case 5:
- case 10:
- case 11:
- case 15:
- break;
-
- default:
- printf("isic%d: Error, invalid IRQ [%d] specified for ELSA MicroLink ISDN/PCC-16!\n",
- unit, sc->sc_irq);
- isic_detach_Epcc16(dev);
- return(ENXIO);
- break;
- }
-
- /* register interupt routine */
- bus_setup_intr(dev,sc->sc_resources.irq,INTR_TYPE_NET,
- (void(*)(void *))(isicintr),
- sc,&ih);
-
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_Epcc16 - attach for ELSA MicroLink ISDN/PCC-16
- *---------------------------------------------------------------------------*/
-int
-isic_attach_Epcc16(device_t dev)
-{
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- u_char byte = ELSA_CTRL_SECRET;
-
- byte &= ~ELSA_CTRL_RESET;
- bus_space_write_1(t, h, ELSA_OFF_CTRL, byte);
- DELAY(20);
- byte |= ELSA_CTRL_RESET;
- bus_space_write_1(t, h, ELSA_OFF_CTRL, byte);
-
- DELAY(20);
- bus_space_write_1(t, h, ELSA_OFF_IRQ, 0xff);
-
- return 0;
-}
-
-#endif /* (NISIC > 0) && defined(ELSA_PCC16) */
diff --git a/sys/i4b/layer1/isic/i4b_elsa_qs1i.c b/sys/i4b/layer1/isic/i4b_elsa_qs1i.c
deleted file mode 100644
index 9b184e90992e..000000000000
--- a/sys/i4b/layer1/isic/i4b_elsa_qs1i.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isic - I4B Siemens ISDN Chipset Driver for ELSA Quickstep 1000pro ISA
- * =====================================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:09:03 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if (NISIC > 0) && defined(ELSA_QS1ISA)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-static void i4b_eq1i_clrirq(struct l1_softc *sc);
-
-/* masks for register encoded in base addr */
-
-#define ELSA_BASE_MASK 0x0ffff
-#define ELSA_OFF_MASK 0xf0000
-
-/* register id's to be encoded in base addr */
-
-#define ELSA_IDISAC 0x00000
-#define ELSA_IDHSCXA 0x10000
-#define ELSA_IDHSCXB 0x20000
-
-/* offsets from base address */
-
-#define ELSA_OFF_ISAC 0x00
-#define ELSA_OFF_HSCX 0x02
-#define ELSA_OFF_OFF 0x03
-#define ELSA_OFF_CTRL 0x04
-#define ELSA_OFF_CFG 0x05
-#define ELSA_OFF_TIMR 0x06
-#define ELSA_OFF_IRQ 0x07
-
-/* control register (write access) */
-
-#define ELSA_CTRL_LED_YELLOW 0x02
-#define ELSA_CTRL_LED_GREEN 0x08
-#define ELSA_CTRL_RESET 0x20
-#define ELSA_CTRL_TIMEREN 0x80
-#define ELSA_CTRL_SECRET 0x50
-
-/*---------------------------------------------------------------------------*
- * ELSA QuickStep 1000pro/ISA clear IRQ routine
- *---------------------------------------------------------------------------*/
-static void
-i4b_eq1i_clrirq(struct l1_softc *sc)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
- bus_space_write_1(t, h, ELSA_OFF_IRQ, 0);
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA QuickStep 1000pro/ISA ISAC get fifo routine
- *---------------------------------------------------------------------------*/
-static void
-eqs1pi_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0);
- bus_space_read_multi_1(t, h, ELSA_OFF_ISAC, buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0);
- bus_space_read_multi_1(t, h, ELSA_OFF_HSCX, buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0x40);
- bus_space_read_multi_1(t, h, ELSA_OFF_HSCX, buf, size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA QuickStep 1000pro/ISA ISAC put fifo routine
- *---------------------------------------------------------------------------*/
-static void
-eqs1pi_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0);
- bus_space_write_multi_1(t, h, ELSA_OFF_ISAC, buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0);
- bus_space_write_multi_1(t, h, ELSA_OFF_HSCX, buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0x40);
- bus_space_write_multi_1(t, h, ELSA_OFF_HSCX, buf, size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA QuickStep 1000pro/ISA ISAC put register routine
- *---------------------------------------------------------------------------*/
-static void
-eqs1pi_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_OFF, offs);
- bus_space_write_1(t, h, ELSA_OFF_ISAC, data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_OFF, offs);
- bus_space_write_1(t, h, ELSA_OFF_HSCX, data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0x40+offs);
- bus_space_write_1(t, h, ELSA_OFF_HSCX, data);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA QuickStep 1000pro/ISA ISAC get register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-eqs1pi_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch (what) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_OFF, offs);
- return bus_space_read_1(t, h, ELSA_OFF_ISAC);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_OFF, offs);
- return bus_space_read_1(t, h, ELSA_OFF_HSCX);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_OFF, 0x40+offs);
- return bus_space_read_1(t, h, ELSA_OFF_HSCX);
- }
- return 0;
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_Eqs1pi - attach for ELSA QuickStep 1000pro/ISA
- *---------------------------------------------------------------------------*/
-int
-isic_attach_Eqs1pi(device_t dev)
-{
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- u_char byte = ELSA_CTRL_SECRET;
-
- /* setup access routines */
-
- sc->clearirq = i4b_eq1i_clrirq;
- sc->readreg = eqs1pi_read_reg;
- sc->writereg = eqs1pi_write_reg;
-
- sc->readfifo = eqs1pi_read_fifo;
- sc->writefifo = eqs1pi_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_ELSAQS1ISA;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /* enable the card */
-
- byte &= ~ELSA_CTRL_RESET;
- bus_space_write_1(t, h, ELSA_OFF_CTRL, byte);
- DELAY(20);
- byte |= ELSA_CTRL_RESET;
- bus_space_write_1(t, h, ELSA_OFF_CTRL, byte);
-
- DELAY(20);
- bus_space_write_1(t, h, ELSA_OFF_IRQ, 0xff);
-
- return 0;
-}
-#endif /* (NISIC > 0) && defined(ELSA_QS1ISA) */
diff --git a/sys/i4b/layer1/isic/i4b_elsa_qs1p.c b/sys/i4b/layer1/isic/i4b_elsa_qs1p.c
deleted file mode 100644
index 88caee710a7e..000000000000
--- a/sys/i4b/layer1/isic/i4b_elsa_qs1p.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isic - I4B Siemens ISDN Chipset Driver for ELSA MicroLink ISDN/PCI
- * ==================================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:09:28 2001]
- *
- * Note: ELSA Quickstep 1000pro PCI = ELSA MicroLink ISDN/PCI
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-#include "pci.h"
-
-#if (NISIC > 0) && (NPCI > 0) && defined(ELSA_QS1PCI)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-
-#include <machine/bus.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#include <pci/pcireg.h>
-#include <pci/pcivar.h>
-
-#include <machine/i4b_ioctl.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_ipac.h>
-
-#define MEM0_MAPOFF 0
-#define PORT0_MAPOFF 4
-#define PORT1_MAPOFF 12
-
-#define ELSA_PORT0_MAPOFF (PCIR_MAPS+PORT0_MAPOFF)
-#define ELSA_PORT1_MAPOFF (PCIR_MAPS+PORT1_MAPOFF)
-
-#define PCI_QS1000_DID 0x1000
-#define PCI_QS1000_VID 0x1048
-
-/* masks for register encoded in base addr */
-
-#define ELSA_BASE_MASK 0x0ffff
-#define ELSA_OFF_MASK 0xf0000
-
-/* register id's to be encoded in base addr */
-
-#define ELSA_IDISAC 0x00000
-#define ELSA_IDHSCXA 0x10000
-#define ELSA_IDHSCXB 0x20000
-#define ELSA_IDIPAC 0x40000
-
-/* offsets from base address */
-
-#define ELSA_OFF_ALE 0x00
-#define ELSA_OFF_RW 0x01
-
-
-static int eqs1p_pci_probe(device_t dev);
-static int eqs1p_pci_attach(device_t dev);
-
-static device_method_t eqs1p_pci_methods[] = {
- /* Device interface */
- DEVMETHOD(device_probe, eqs1p_pci_probe),
- DEVMETHOD(device_attach, eqs1p_pci_attach),
- { 0, 0 }
-};
-
-static driver_t eqs1p_pci_driver = {
- "isic",
- eqs1p_pci_methods,
- 0
-};
-
-static devclass_t eqs1p_pci_devclass;
-
-DRIVER_MODULE(eqs1p, pci, eqs1p_pci_driver, eqs1p_pci_devclass, 0, 0);
-
-/*---------------------------------------------------------------------------*
- * ELSA MicroLink ISDN/PCI fifo read routine
- *---------------------------------------------------------------------------*/
-static void
-eqs1pp_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[1]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_ISAC_OFF);
- bus_space_read_multi_1(t, h, ELSA_OFF_RW, buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXA_OFF);
- bus_space_read_multi_1(t, h, ELSA_OFF_RW, buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXB_OFF);
- bus_space_read_multi_1(t, h, ELSA_OFF_RW, buf, size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA MicroLink ISDN/PCI fifo write routine
- *---------------------------------------------------------------------------*/
-static void
-eqs1pp_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[1]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_ISAC_OFF);
- bus_space_write_multi_1(t, h, ELSA_OFF_RW, (u_int8_t*)buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXA_OFF);
- bus_space_write_multi_1(t, h, ELSA_OFF_RW, (u_int8_t*)buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXB_OFF);
- bus_space_write_multi_1(t, h, ELSA_OFF_RW, (u_int8_t*)buf, size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA MicroLink ISDN/PCI register write routine
- *---------------------------------------------------------------------------*/
-static void
-eqs1pp_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[1]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_ISAC_OFF+offs);
- bus_space_write_1(t, h, ELSA_OFF_RW, data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXA_OFF+offs);
- bus_space_write_1(t, h, ELSA_OFF_RW, data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXB_OFF+offs);
- bus_space_write_1(t, h, ELSA_OFF_RW, data);
- break;
- case ISIC_WHAT_IPAC:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_IPAC_OFF+offs);
- bus_space_write_1(t, h, ELSA_OFF_RW, data);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ELSA MicroLink ISDN/PCI register read routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-eqs1pp_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[1]);
-
- switch(what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_ISAC_OFF+offs);
- return bus_space_read_1(t, h, ELSA_OFF_RW);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXA_OFF+offs);
- return bus_space_read_1(t, h, ELSA_OFF_RW);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXB_OFF+offs);
- return bus_space_read_1(t, h, ELSA_OFF_RW);
- case ISIC_WHAT_IPAC:
- bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_IPAC_OFF+offs);
- return bus_space_read_1(t, h, ELSA_OFF_RW);
- }
- return 0;
-}
-
-/*---------------------------------------------------------------------------*
- * avma1pp_probe - probe for a card
- *---------------------------------------------------------------------------*/
-static int
-eqs1p_pci_probe(device_t dev)
-{
- if((pci_get_vendor(dev) == PCI_QS1000_VID) &&
- (pci_get_device(dev) == PCI_QS1000_DID))
- {
- device_set_desc(dev, "ELSA MicroLink ISDN/PCI");
- return(0);
- }
- return(ENXIO);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_Eqs1pp - attach for ELSA MicroLink ISDN/PCI
- *---------------------------------------------------------------------------*/
-static int
-eqs1p_pci_attach(device_t dev)
-{
- bus_space_tag_t t;
- bus_space_handle_t h;
- struct l1_softc *sc;
- void *ih = 0;
- int unit = device_get_unit(dev);
-
- /* check max unit range */
-
- if(unit >= ISIC_MAXUNIT)
- {
- printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for ELSA MicroLink ISDN/PCI!\n",
- unit, unit);
- return(ENXIO);
- }
-
- sc = &l1_sc[unit]; /* get softc */
-
- sc->sc_unit = unit;
-
- /* get io_base */
-
- sc->sc_resources.io_rid[0] = ELSA_PORT0_MAPOFF;
-
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0UL, ~0UL, 1, RF_ACTIVE)))
- {
- printf("isic%d: Couldn't get first iobase for ELSA MicroLink ISDN/PCI!\n", unit);
- return(ENXIO);
- }
-
- sc->sc_resources.io_rid[1] = ELSA_PORT1_MAPOFF;
-
- if(!(sc->sc_resources.io_base[1] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[1],
- 0UL, ~0UL, 1, RF_ACTIVE)))
- {
- printf("isic%d: Couldn't get second iobase for ELSA MicroLink ISDN/PCI!\n", unit);
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- sc->sc_port = rman_get_start(sc->sc_resources.io_base[1]);
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0UL, ~0UL, 1, RF_ACTIVE | RF_SHAREABLE)))
- {
- printf("isic%d: Could not get irq for ELSA MicroLink ISDN/PCI!\n",unit);
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = eqs1pp_read_reg;
- sc->writereg = eqs1pp_write_reg;
-
- sc->readfifo = eqs1pp_read_fifo;
- sc->writefifo = eqs1pp_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_ELSAQS1PCI;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- /* setup chip type = IPAC ! */
-
- sc->sc_ipac = 1;
- sc->sc_bfifolen = IPAC_BFIFO_LEN;
-
- if(isic_attach_common(dev))
- {
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- if(bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET,
- (void(*)(void*))isicintr,
- sc, &ih))
- {
- printf("isic%d: Couldn't set up irq for ELSA MicroLink ISDN/PCI!\n", unit);
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- /* enable hscx/isac irq's */
-
- IPAC_WRITE(IPAC_MASK, (IPAC_MASK_INT1 | IPAC_MASK_INT0));
-
- IPAC_WRITE(IPAC_ACFG, 0); /* outputs are open drain */
- IPAC_WRITE(IPAC_AOE, /* aux 5..2 are inputs, 7, 6 outputs */
- (IPAC_AOE_OE5 | IPAC_AOE_OE4 | IPAC_AOE_OE3 | IPAC_AOE_OE2));
- IPAC_WRITE(IPAC_ATX, 0xff); /* set all output lines high */
-
- t = rman_get_bustag(sc->sc_resources.io_base[0]);
- h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- bus_space_write_1(t, h, 0x4c, 0x41); /* enable card interrupt */
-
- return(0);
-}
-
-#endif /* (NISIC > 0) && (NPCI > 0) && defined(ELSA_QS1PCI) */
diff --git a/sys/i4b/layer1/isic/i4b_hscx.c b/sys/i4b/layer1/isic/i4b_hscx.c
deleted file mode 100644
index cac4a13650b6..000000000000
--- a/sys/i4b/layer1/isic/i4b_hscx.c
+++ /dev/null
@@ -1,663 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b - Siemens HSCX chip (B-channel) handling
- * --------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:09:42 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-
-#if NISIC > 0
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_mbuf.h>
-
-/*---------------------------------------------------------------------------*
- * HSCX IRQ Handler
- *---------------------------------------------------------------------------*/
-void
-isic_hscx_irq(register struct l1_softc *sc, u_char ista, int h_chan, u_char ex_irq)
-{
- register l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- u_char exir = 0;
- int activity = -1;
- u_char cmd = 0;
-
- NDBGL1(L1_H_IRQ, "%#x", ista);
-
- if(ex_irq)
- {
- /* get channel extended irq reg */
-
- exir = HSCX_READ(h_chan, H_EXIR);
-
- if(exir & HSCX_EXIR_RFO)
- {
- chan->stat_RFO++;
- NDBGL1(L1_H_XFRERR, "ex_irq: receive data overflow");
- }
-
- if((exir & HSCX_EXIR_XDU) && (chan->bprot != BPROT_NONE))/* xmit data underrun */
- {
- chan->stat_XDU++;
- NDBGL1(L1_H_XFRERR, "ex_irq: xmit data underrun");
- isic_hscx_cmd(sc, h_chan, HSCX_CMDR_XRES);
-
- if (chan->out_mbuf_head != NULL) /* don't continue to transmit this buffer */
- {
- i4b_Bfreembuf(chan->out_mbuf_head);
- chan->out_mbuf_cur = chan->out_mbuf_head = NULL;
- }
- }
-
- }
-
- /* rx message end, end of frame */
-
- if(ista & HSCX_ISTA_RME)
- {
- register int fifo_data_len;
- u_char rsta;
- int error = 0;
-
- rsta = HSCX_READ(h_chan, H_RSTA);
-
- if((rsta & 0xf0) != 0xa0)
- {
- if((rsta & HSCX_RSTA_VFR) == 0)
- {
- chan->stat_VFR++;
- cmd |= (HSCX_CMDR_RHR);
- NDBGL1(L1_H_XFRERR, "received invalid Frame");
- error++;
- }
-
- if(rsta & HSCX_RSTA_RDO)
- {
- chan->stat_RDO++;
- NDBGL1(L1_H_XFRERR, "receive data overflow");
- error++;
- }
-
- if((rsta & HSCX_RSTA_CRC) == 0)
- {
- chan->stat_CRC++;
- cmd |= (HSCX_CMDR_RHR);
- NDBGL1(L1_H_XFRERR, "CRC check failed");
- error++;
- }
-
- if(rsta & HSCX_RSTA_RAB)
- {
- chan->stat_RAB++;
- NDBGL1(L1_H_XFRERR, "Receive message aborted");
- error++;
- }
- }
-
- fifo_data_len = ((HSCX_READ(h_chan, H_RBCL)) &
- ((sc->sc_bfifolen)-1));
-
- if(fifo_data_len == 0)
- fifo_data_len = sc->sc_bfifolen;
-
- /* all error conditions checked, now decide and take action */
-
- if(error == 0)
- {
- if(chan->in_mbuf == NULL)
- {
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 isic_hscx_irq: RME, cannot allocate mbuf!\n");
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- }
-
- fifo_data_len -= 1; /* last byte in fifo is RSTA ! */
-
- if((chan->in_len + fifo_data_len) <= BCH_MAX_DATALEN)
- {
- /* read data from HSCX fifo */
-
- HSCX_RDFIFO(h_chan, chan->in_cbptr, fifo_data_len);
-
- cmd |= (HSCX_CMDR_RMC);
- isic_hscx_cmd(sc, h_chan, cmd);
- cmd = 0;
-
- chan->in_len += fifo_data_len;
- chan->rxcount += fifo_data_len;
-
- /* setup mbuf data length */
-
- chan->in_mbuf->m_len = chan->in_len;
- chan->in_mbuf->m_pkthdr.len = chan->in_len;
-
- if(sc->sc_trace & TRACE_B_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
- }
-
- (*chan->isic_drvr_linktab->bch_rx_data_ready)(chan->isic_drvr_linktab->unit);
-
- activity = ACT_RX;
-
- /* mark buffer ptr as unused */
-
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- else
- {
- NDBGL1(L1_H_XFRERR, "RAWHDLC rx buffer overflow in RME, in_len=%d, fifolen=%d", chan->in_len, fifo_data_len);
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- cmd |= (HSCX_CMDR_RHR | HSCX_CMDR_RMC);
- }
- }
- else
- {
- if (chan->in_mbuf != NULL)
- {
- i4b_Bfreembuf(chan->in_mbuf);
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- cmd |= (HSCX_CMDR_RMC);
- }
- }
-
- /* rx fifo full */
-
- if(ista & HSCX_ISTA_RPF)
- {
- if(chan->in_mbuf == NULL)
- {
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 isic_hscx_irq: RPF, cannot allocate mbuf!\n");
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- }
-
- chan->rxcount += sc->sc_bfifolen;
-
- if((chan->in_len + sc->sc_bfifolen) <= BCH_MAX_DATALEN)
- {
- /* read data from HSCX fifo */
-
- HSCX_RDFIFO(h_chan, chan->in_cbptr, sc->sc_bfifolen);
-
- chan->in_cbptr += sc->sc_bfifolen;
- chan->in_len += sc->sc_bfifolen;
- }
- else
- {
- if(chan->bprot == BPROT_NONE)
- {
- /* setup mbuf data length */
-
- chan->in_mbuf->m_len = chan->in_len;
- chan->in_mbuf->m_pkthdr.len = chan->in_len;
-
- if(sc->sc_trace & TRACE_B_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
- }
-
- /* silence detection */
-
- if(!(i4b_l1_bchan_tel_silence(chan->in_mbuf->m_data, chan->in_mbuf->m_len)))
- activity = ACT_RX;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- (void) IF_HANDOFF(&chan->rx_queue, chan->in_mbuf, NULL);
-#else
- if(!(IF_QFULL(&chan->rx_queue)))
- {
- IF_ENQUEUE(&chan->rx_queue, chan->in_mbuf);
- }
- else
- {
- i4b_Bfreembuf(chan->in_mbuf);
- }
-#endif
- /* signal upper driver that data is available */
-
- (*chan->isic_drvr_linktab->bch_rx_data_ready)(chan->isic_drvr_linktab->unit);
-
- /* alloc new buffer */
-
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 isic_hscx_irq: RPF, cannot allocate new mbuf!\n");
-
- /* setup new data ptr */
-
- chan->in_cbptr = chan->in_mbuf->m_data;
-
- /* read data from HSCX fifo */
-
- HSCX_RDFIFO(h_chan, chan->in_cbptr, sc->sc_bfifolen);
-
- chan->in_cbptr += sc->sc_bfifolen;
- chan->in_len = sc->sc_bfifolen;
-
- chan->rxcount += sc->sc_bfifolen;
- }
- else
- {
- NDBGL1(L1_H_XFRERR, "RAWHDLC rx buffer overflow in RPF, in_len=%d", chan->in_len);
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- cmd |= (HSCX_CMDR_RHR);
- }
- }
-
- /* command to release fifo space */
-
- cmd |= HSCX_CMDR_RMC;
- }
-
- /* transmit fifo empty, new data can be written to fifo */
-
- if(ista & HSCX_ISTA_XPR)
- {
- /*
- * for a description what is going on here, please have
- * a look at isic_bchannel_start() in i4b_bchan.c !
- */
-
- int activity = -1;
- int len;
- int nextlen;
-
- NDBGL1(L1_H_IRQ, "unit %d, chan %d - XPR, Tx Fifo Empty!", sc->sc_unit, h_chan);
-
- if(chan->out_mbuf_cur == NULL) /* last frame is transmitted */
- {
- IF_DEQUEUE(&chan->tx_queue, chan->out_mbuf_head);
-
- if(chan->out_mbuf_head == NULL)
- {
- chan->state &= ~HSCX_TX_ACTIVE;
- (*chan->isic_drvr_linktab->bch_tx_queue_empty)(chan->isic_drvr_linktab->unit);
- }
- else
- {
- chan->state |= HSCX_TX_ACTIVE;
- chan->out_mbuf_cur = chan->out_mbuf_head;
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
-
- if(chan->bprot == BPROT_NONE)
- {
- if(!(i4b_l1_bchan_tel_silence(chan->out_mbuf_cur->m_data, chan->out_mbuf_cur->m_len)))
- activity = ACT_TX;
- }
- else
- {
- activity = ACT_TX;
- }
- }
- }
-
- len = 0;
-
- while(chan->out_mbuf_cur && len != sc->sc_bfifolen)
- {
- nextlen = min(chan->out_mbuf_cur_len, sc->sc_bfifolen - len);
-
-#ifdef NOTDEF
- printf("i:mh=%x, mc=%x, mcp=%x, mcl=%d l=%d nl=%d # ",
- chan->out_mbuf_head,
- chan->out_mbuf_cur,
- chan->out_mbuf_cur_ptr,
- chan->out_mbuf_cur_len,
- len,
- next_len);
-#endif
-
- isic_hscx_waitxfw(sc, h_chan); /* necessary !!! */
-
- HSCX_WRFIFO(h_chan, chan->out_mbuf_cur_ptr, nextlen);
- cmd |= HSCX_CMDR_XTF;
-
- len += nextlen;
- chan->txcount += nextlen;
-
- chan->out_mbuf_cur_ptr += nextlen;
- chan->out_mbuf_cur_len -= nextlen;
-
- if(chan->out_mbuf_cur_len == 0)
- {
- if((chan->out_mbuf_cur = chan->out_mbuf_cur->m_next) != NULL)
- {
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = (h_chan == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
- }
- else
- {
- if (chan->bprot != BPROT_NONE)
- cmd |= HSCX_CMDR_XME;
- i4b_Bfreembuf(chan->out_mbuf_head);
- chan->out_mbuf_head = NULL;
- }
-
- }
- }
- }
-
- if(cmd) /* is there a command for the HSCX ? */
- {
- isic_hscx_cmd(sc, h_chan, cmd); /* yes, to HSCX */
- }
-
- /* call timeout handling routine */
-
- if(activity == ACT_RX || activity == ACT_TX)
- (*chan->isic_drvr_linktab->bch_activity)(chan->isic_drvr_linktab->unit, activity);
-}
-
-/*---------------------------------------------------------------------------*
- * HSCX initialization
- *
- * for telephony: extended transparent mode 1
- * for raw hdlc: transparent mode 0
- *---------------------------------------------------------------------------*/
-void
-isic_hscx_init(struct l1_softc *sc, int h_chan, int activate)
-{
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
-
- HSCX_WRITE(h_chan, H_MASK, 0xff); /* mask irq's */
-
- if(sc->sc_ipac)
- {
- /* CCR1: Power Up, Clock Mode 5 */
- HSCX_WRITE(h_chan, H_CCR1, HSCX_CCR1_PU | /* power up */
- HSCX_CCR1_CM1); /* IPAC clock mode 5 */
- }
- else
- {
- /* CCR1: Power Up, Clock Mode 5 */
- HSCX_WRITE(h_chan, H_CCR1, HSCX_CCR1_PU | /* power up */
- HSCX_CCR1_CM2 | /* HSCX clock mode 5 */
- HSCX_CCR1_CM0);
- }
-
- /* XAD1: Transmit Address Byte 1 */
- HSCX_WRITE(h_chan, H_XAD1, 0xff);
-
- /* XAD2: Transmit Address Byte 2 */
- HSCX_WRITE(h_chan, H_XAD2, 0xff);
-
- /* RAH2: Receive Address Byte High Reg. 2 */
- HSCX_WRITE(h_chan, H_RAH2, 0xff);
-
- /* XBCH: reset Transmit Byte Count High */
- HSCX_WRITE(h_chan, H_XBCH, 0x00);
-
- /* RLCR: reset Receive Length Check Register */
- HSCX_WRITE(h_chan, H_RLCR, 0x00);
-
- /* CCR2: set tx/rx clock shift bit 0 */
- /* disable CTS irq, disable RIE irq*/
- HSCX_WRITE(h_chan, H_CCR2, HSCX_CCR2_XCS0|HSCX_CCR2_RCS0);
-
- /* XCCR: tx bit count per time slot */
- HSCX_WRITE(h_chan, H_XCCR, 0x07);
-
- /* RCCR: rx bit count per time slot */
- HSCX_WRITE(h_chan, H_RCCR, 0x07);
-
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- {
- switch(h_chan)
- {
- case HSCX_CH_A: /* Prepare HSCX channel A */
- /* TSAX: tx clock shift bits 1 & 2 */
- /* tx time slot number */
- HSCX_WRITE(h_chan, H_TSAX, 0x2f);
-
- /* TSAR: rx clock shift bits 1 & 2 */
- /* rx time slot number */
- HSCX_WRITE(h_chan, H_TSAR, 0x2f);
- break;
-
- case HSCX_CH_B: /* Prepare HSCX channel B */
- /* TSAX: tx clock shift bits 1 & 2 */
- /* tx time slot number */
- HSCX_WRITE(h_chan, H_TSAX, 0x03);
-
- /* TSAR: rx clock shift bits 1 & 2 */
- /* rx time slot number */
- HSCX_WRITE(h_chan, H_TSAR, 0x03);
- break;
- }
- }
- else /* IOM 1 setup */
- {
- /* TSAX: tx clock shift bits 1 & 2 */
- /* tx time slot number */
- HSCX_WRITE(h_chan, H_TSAX, 0x07);
-
- /* TSAR: rx clock shift bits 1 & 2 */
- /* rx time slot number */
- HSCX_WRITE(h_chan, H_TSAR, 0x07);
- }
-
- if(activate)
- {
- if(chan->bprot == BPROT_RHDLC)
- {
- /* HDLC Frames, transparent mode 0 */
- HSCX_WRITE(h_chan, H_MODE,
- HSCX_MODE_MDS1|HSCX_MODE_RAC|HSCX_MODE_RTS);
- }
- else
- {
- /* Raw Telephony, extended transparent mode 1 */
- HSCX_WRITE(h_chan, H_MODE,
- HSCX_MODE_MDS1|HSCX_MODE_MDS0|HSCX_MODE_ADM|HSCX_MODE_RTS);
- }
-#if 0
- isic_hscx_cmd(sc, h_chan, HSCX_CMDR_RHR|HSCX_CMDR_XRES);
-#else
- isic_hscx_cmd(sc, h_chan, HSCX_CMDR_RHR);
-#endif
- }
- else
- {
- /* TSAX: tx time slot */
- HSCX_WRITE(h_chan, H_TSAX, 0xff);
-
- /* TSAR: rx time slot */
- HSCX_WRITE(h_chan, H_TSAR, 0xff);
-
- /* Raw Telephony, extended transparent mode 1 */
- HSCX_WRITE(h_chan, H_MODE,
- HSCX_MODE_MDS1|HSCX_MODE_MDS0|HSCX_MODE_ADM|HSCX_MODE_RTS);
- }
-
- /* don't touch ICA, EXA and EXB bits, this could be HSCX_CH_B */
- /* always disable RSC and TIN */
-
- chan->hscx_mask |= HSCX_MASK_RSC | HSCX_MASK_TIN;
-
- if(activate)
- {
- /* enable */
- chan->hscx_mask &= ~(HSCX_MASK_RME | HSCX_MASK_RPF | HSCX_MASK_XPR);
- }
- else
- {
- /* disable */
- chan->hscx_mask |= HSCX_MASK_RME | HSCX_MASK_RPF | HSCX_MASK_XPR;
- }
-
- /* handle ICA, EXA, and EXB via interrupt mask of channel b */
-
- if (h_chan == HSCX_CH_A)
- {
- if (activate)
- HSCX_B_IMASK &= ~(HSCX_MASK_EXA | HSCX_MASK_ICA);
- else
- HSCX_B_IMASK |= HSCX_MASK_EXA | HSCX_MASK_ICA;
- HSCX_WRITE(HSCX_CH_A, H_MASK, HSCX_A_IMASK);
- HSCX_WRITE(HSCX_CH_B, H_MASK, HSCX_B_IMASK);
- }
- else
- {
- if (activate)
- HSCX_B_IMASK &= ~HSCX_MASK_EXB;
- else
- HSCX_B_IMASK |= HSCX_MASK_EXB;
- HSCX_WRITE(HSCX_CH_B, H_MASK, HSCX_B_IMASK);
- }
-
- /* clear spurious interrupts left over */
-
- if(h_chan == HSCX_CH_A)
- {
- HSCX_READ(h_chan, H_EXIR);
- HSCX_READ(h_chan, H_ISTA);
- }
- else /* mask ICA, because it must not be cleared by reading ISTA */
- {
- HSCX_WRITE(HSCX_CH_B, H_MASK, HSCX_B_IMASK | HSCX_MASK_ICA);
- HSCX_READ(h_chan, H_EXIR);
- HSCX_READ(h_chan, H_ISTA);
- HSCX_WRITE(HSCX_CH_B, H_MASK, HSCX_B_IMASK);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * write command to HSCX command register
- *---------------------------------------------------------------------------*/
-void
-isic_hscx_cmd(struct l1_softc *sc, int h_chan, unsigned char cmd)
-{
- int timeout = 20;
-
- while(((HSCX_READ(h_chan, H_STAR)) & HSCX_STAR_CEC) && timeout)
- {
- DELAY(10);
- timeout--;
- }
-
- if(timeout == 0)
- {
- NDBGL1(L1_H_ERR, "HSCX wait for CEC timeout!");
- }
-
- HSCX_WRITE(h_chan, H_CMDR, cmd);
-}
-
-/*---------------------------------------------------------------------------*
- * wait for HSCX transmit FIFO write enable
- *---------------------------------------------------------------------------*/
-void
-isic_hscx_waitxfw(struct l1_softc *sc, int h_chan)
-{
-#define WAITVAL 50
-#define WAITTO 200
-
- int timeout = WAITTO;
-
- while((!(((HSCX_READ(h_chan, H_STAR)) &
- (HSCX_STAR_CEC | HSCX_STAR_XFW)) == HSCX_STAR_XFW)) && timeout)
- {
- DELAY(WAITVAL);
- timeout--;
- }
-
- if(timeout == 0)
- {
- NDBGL1(L1_H_ERR, "HSCX wait for XFW timeout!");
- }
- else if (timeout != WAITTO)
- {
- NDBGL1(L1_H_XFRERR, "HSCX wait for XFW time: %d uS", (WAITTO-timeout)*50);
- }
-}
-
-#endif /* NISIC > 0 */
diff --git a/sys/i4b/layer1/isic/i4b_hscx.h b/sys/i4b/layer1/isic/i4b_hscx.h
deleted file mode 100644
index d65d2fcfe82c..000000000000
--- a/sys/i4b/layer1/isic/i4b_hscx.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 1996, 2000 Gary Jennejohn. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:09:51 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef I4B_HSCX_H_
-#define I4B_HSCX_H_
-
-enum HSCX_VERSIONS {
- HSCX_VA1, /* 82525 A1 */
- HSCX_UNKN1, /* unknown 1 */
- HSCX_VA2, /* 82525 A2 */
- HSCX_UNKN3, /* unknown 3 */
- HSCX_VA3, /* 82525 A3 */
- HSCX_V21, /* 82525 2.1 */
- HSCX_UNKN /* unknown version */
-};
-
-#define HSCX_CH_A 0 /* channel A */
-#define HSCX_CH_B 1 /* channel B */
-
-#define HSCX_FIFO_LEN 32 /* 32 bytes FIFO on chip */
-
-/*
- * definitions of registers and bits for the HSCX ISDN chip.
- */
-
-typedef struct hscx_reg {
-
- /* 32 byte deep FIFO always first */
-
- unsigned char hscx_fifo [HSCX_FIFO_LEN];
-
- /* most registers can be read/written, but have different names */
- /* so define a union with read/write names to make that clear */
-
- union {
- struct {
- unsigned char hscx_ista;
- unsigned char hscx_star;
- unsigned char hscx_mode;
- unsigned char hscx_timr;
- unsigned char hscx_exir;
- unsigned char hscx_rbcl;
- unsigned char dummy_26;
- unsigned char hscx_rsta;
- unsigned char hscx_ral1;
- unsigned char hscx_rhcr;
- unsigned char dummy_2a;
- unsigned char dummy_2b;
- unsigned char hscx_ccr2;
- unsigned char hscx_rbch;
- unsigned char hscx_vstr;
- unsigned char hscx_ccr;
- unsigned char dummy_30;
- unsigned char dummy_31;
- unsigned char dummy_32;
- unsigned char dummy_33;
- } hscx_r;
- struct {
- unsigned char hscx_mask;
- unsigned char hscx_cmdr;
- unsigned char hscx_mode;
- unsigned char hscx_timr;
- unsigned char hscx_xad1;
- unsigned char hscx_xad2;
- unsigned char hscx_rah1;
- unsigned char hscx_rah2;
- unsigned char hscx_ral1;
- unsigned char hscx_ral2;
- unsigned char hscx_xbcl;
- unsigned char hscx_bgr;
- unsigned char hscx_ccr2;
- unsigned char hscx_xbch;
- unsigned char hscx_rlcr;
- unsigned char hscx_ccr1;
- unsigned char hscx_tsax;
- unsigned char hscx_tsar;
- unsigned char hscx_xccr;
- unsigned char hscx_rccr;
- } hscx_w;
- } hscx_rw;
-} hscx_reg_t;
-
-#define REG_OFFSET(type, field) (int)(&(((type *)0)->field))
-
-/* HSCX read registers */
-
-#define h_ista hscx_rw.hscx_r.hscx_ista
-#define H_ISTA REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_ista)
-#define h_star hscx_rw.hscx_r.hscx_star
-#define H_STAR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_star)
-#define h_mode hscx_rw.hscx_r.hscx_mode
-#define H_MODE REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_mode)
-#define h_timr hscx_rw.hscx_r.hscx_timr
-#define H_TIMR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_timr)
-#define h_exir hscx_rw.hscx_r.hscx_exir
-#define H_EXIR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_exir)
-#define h_rbcl hscx_rw.hscx_r.hscx_rbcl
-#define H_RBCL REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_rbcl)
-#define h_rsta hscx_rw.hscx_r.hscx_rsta
-#define H_RSTA REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_rsta)
-#define h_ral1 hscx_rw.hscx_r.hscx_ral1
-#define H_RAL1 REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_ral1)
-#define h_rhcr hscx_rw.hscx_r.hscx_rhcr
-#define H_RHCR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_rhcr)
-#define h_ccr2 hscx_rw.hscx_r.hscx_ccr2
-#define H_CCR2 REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_ccr2)
-#define h_rbch hscx_rw.hscx_r.hscx_rbch
-#define H_RBCH REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_rbch)
-#define h_vstr hscx_rw.hscx_r.hscx_vstr
-#define H_VSTR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_vstr)
-#define h_ccr hscx_rw.hscx_r.hscx_ccr
-#define H_CCR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_r.hscx_ccr)
-
-/* HSCX write registers - for hscx_mode, hscx_timr, hscx_ral1, hscx_ccr2 */
-/* see read registers */
-
-#define h_mask hscx_rw.hscx_w.hscx_mask
-#define H_MASK REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_mask)
-#define h_cmdr hscx_rw.hscx_w.hscx_cmdr
-#define H_CMDR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_cmdr)
-#define h_xad1 hscx_rw.hscx_w.hscx_xad1
-#define H_XAD1 REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_xad1)
-#define h_xad2 hscx_rw.hscx_w.hscx_xad2
-#define H_XAD2 REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_xad2)
-#define h_rah1 hscx_rw.hscx_w.hscx_rah1
-#define H_RAH1 REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_rah1)
-#define h_rah2 hscx_rw.hscx_w.hscx_rah2
-#define H_RAH2 REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_rah2)
-#define h_ral2 hscx_rw.hscx_w.hscx_ral2
-#define H_RAL2 REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_ral2)
-#define h_xbcl hscx_rw.hscx_w.hscx_xbcl
-#define H_XBCL REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_xbcl)
-#define h_bgr hscx_rw.hscx_w.hscx_bgr
-#define H_BGR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_bgr)
-#define h_xbch hscx_rw.hscx_w.hscx_xbch
-#define H_XBCH REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_xbch)
-#define h_rlcr hscx_rw.hscx_w.hscx_rlcr
-#define H_RLCR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_rlcr)
-#define h_ccr1 hscx_rw.hscx_w.hscx_ccr1
-#define H_CCR1 REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_ccr1)
-#define h_tsax hscx_rw.hscx_w.hscx_tsax
-#define H_TSAX REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_tsax)
-#define h_tsar hscx_rw.hscx_w.hscx_tsar
-#define H_TSAR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_tsar)
-#define h_xccr hscx_rw.hscx_w.hscx_xccr
-#define H_XCCR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_xccr)
-#define h_rccr hscx_rw.hscx_w.hscx_rccr
-#define H_RCCR REG_OFFSET(hscx_reg_t, hscx_rw.hscx_w.hscx_rccr)
-
-#define HSCX_ISTA_RME 0x80
-#define HSCX_ISTA_RPF 0x40
-#define HSCX_ISTA_RSC 0x20
-#define HSCX_ISTA_XPR 0x10
-#define HSCX_ISTA_TIN 0x08
-#define HSCX_ISTA_ICA 0x04
-#define HSCX_ISTA_EXA 0x02
-#define HSCX_ISTA_EXB 0x01
-
-#define HSCX_MASK_RME 0x80
-#define HSCX_MASK_RPF 0x40
-#define HSCX_MASK_RSC 0x20
-#define HSCX_MASK_XPR 0x10
-#define HSCX_MASK_TIN 0x08
-#define HSCX_MASK_ICA 0x04
-#define HSCX_MASK_EXA 0x02
-#define HSCX_MASK_EXB 0x01
-
-#define HSCX_EXIR_XMR 0x80
-#define HSCX_EXIR_XDU 0x40
-#define HSCX_EXIR_PCE 0x20
-#define HSCX_EXIR_RFO 0x10
-#define HSCX_EXIR_CSC 0x08
-#define HSCX_EXIR_RFS 0x04
-
-/* the other bits are always 0 */
-
-#define HSCX_STAR_XDOV 0x80
-#define HSCX_STAR_XFW 0x40
-#define HSCX_STAR_XRNR 0x20
-#define HSCX_STAR_RRNR 0x10
-#define HSCX_STAR_RLI 0x08
-#define HSCX_STAR_CEC 0x04
-#define HSCX_STAR_CTS 0x02
-#define HSCX_STAR_WFA 0x01
-
-#define HSCX_CMDR_RMC 0x80
-#define HSCX_CMDR_RHR 0x40
-/* also known as XREP in transparent mode */
-#define HSCX_CMDR_RNR 0x20
-#define HSCX_CMDR_STI 0x10
-#define HSCX_CMDR_XTF 0x08
-#define HSCX_CMDR_XIF 0x04
-#define HSCX_CMDR_XME 0x02
-#define HSCX_CMDR_XRES 0x01
-
-#define HSCX_MODE_MDS1 0x80
-#define HSCX_MODE_MDS0 0x40
-#define HSCX_MODE_ADM 0x20
-#define HSCX_MODE_TMD 0x10
-#define HSCX_MODE_RAC 0x08
-#define HSCX_MODE_RTS 0x04
-#define HSCX_MODE_TRS 0x02
-#define HSCX_MODE_TLP 0x01
-
-#define HSCX_RSTA_VFR 0x80
-#define HSCX_RSTA_RDO 0x40
-#define HSCX_RSTA_CRC 0x20
-#define HSCX_RSTA_RAB 0x10
-#define HSCX_RSTA_HA1 0x08
-#define HSCX_RSTA_HA0 0x04
-#define HSCX_RSTA_CR 0x02
-#define HSCX_RSTA_LA 0x01
-
-#define HSCX_RSTA_MASK 0xf0 /* the interesting ones */
-
-/* only used in DMA mode */
-#define HSCX_XBCH_DMA 0x80
-#define HSCX_XBCH_NRM 0x40
-#define HSCX_XBCH_CAS 0x20
-#define HSCX_XBCH_XC 0x10
-/* the rest are bits 11 thru 8 of the byte count */
-
-#define HSCX_RBCH_DMA 0x80
-#define HSCX_RBCH_NRM 0x40
-#define HSCX_RBCH_CAS 0x20
-#define HSCX_RBCH_OV 0x10
-/* the rest are bits 11 thru 8 of the byte count */
-
-#define HSCX_VSTR_CD 0x80
-/* bits 6 thru 4 are 0 */
-/* bits 3 thru 0 are the version number */
-
-#define HSCX_RLCR_RC 0x80
-/* the rest of the bits are used to set the received length */
-
-#define HSCX_CCR1_PU 0x80
-/* bits 6 and 5 are SC1 SC0 */
-#define HSCX_CCR1_ODS 0x10
-#define HSCX_CCR1_ITF 0x08
-#define HSCX_CCR1_CM2 0x04
-#define HSCX_CCR1_CM1 0x02
-#define HSCX_CCR1_CM0 0x01
-
-/* for clock mode 5 */
-#define HSCX_CCR2_SOC2 0x80
-#define HSCX_CCR2_SOC1 0x40
-#define HSCX_CCR2_XCS0 0x20
-#define HSCX_CCR2_RCS0 0x10
-#define HSCX_CCR2_TIO 0x08
-#define HSCX_CCR2_CIE 0x04
-#define HSCX_CCR2_RIE 0x02
-#define HSCX_CCR2_DIV 0x01
-
-/* bits 7 thru 2 are TSNX */
-#define HSCX_TSAX_XCS2 0x02
-#define HSCX_TSAX_XCS1 0x01
-
-/* bits 7 thru 2 are TSNR */
-#define HSCX_TSAR_RCS2 0x02
-#define HSCX_TSAR_RCS1 0x01
-
-#endif /* I4B_HSCX_H_ */
diff --git a/sys/i4b/layer1/isic/i4b_ipac.h b/sys/i4b/layer1/isic/i4b_ipac.h
deleted file mode 100644
index 8892288957ca..000000000000
--- a/sys/i4b/layer1/isic/i4b_ipac.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_ipac.h - definitions for the Siemens IPAC PSB2115 chip
- * ==========================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:10:09 2001]
- *
- *---------------------------------------------------------------------------
- */
-
-#ifndef _I4B_IPAC_H_
-#define _I4B_IPAC_H_
-
-#define IPAC_BFIFO_LEN 64 /* 64 bytes B-channel FIFO on chip */
-
-#define IPAC_HSCXA_OFF 0x00
-#define IPAC_HSCXB_OFF 0x40
-#define IPAC_ISAC_OFF 0x80
-#define IPAC_IPAC_OFF 0xc0
-
-/* chip version */
-
-#define IPAC_V11 0x01 /* IPAC Version 1.1 */
-#define IPAC_V12 0x02 /* IPAC Version 1.2 */
-
-/*
- * definitions of registers and bits for the IPAC ISDN chip.
- */
-
-typedef struct ipac_reg {
-
- /* most registers can be read/written, but have different names */
- /* so define a union with read/write names to make that clear */
-
- union {
- struct {
- unsigned char ipac_conf;
- unsigned char ipac_ista;
- unsigned char ipac_id;
- unsigned char ipac_acfg;
- unsigned char ipac_aoe;
- unsigned char ipac_arx;
- unsigned char ipac_pita1;
- unsigned char ipac_pita2;
- unsigned char ipac_pota1;
- unsigned char ipac_pota2;
- unsigned char ipac_pcfg;
- unsigned char ipac_scfg;
- unsigned char ipac_timr2;
- } ipac_r;
- struct {
- unsigned char ipac_conf;
- unsigned char ipac_mask;
- unsigned char ipac_dummy;
- unsigned char ipac_acfg;
- unsigned char ipac_aoe;
- unsigned char ipac_atx;
- unsigned char ipac_pita1;
- unsigned char ipac_pita2;
- unsigned char ipac_pota1;
- unsigned char ipac_pota2;
- unsigned char ipac_pcfg;
- unsigned char ipac_scfg;
- unsigned char ipac_timr2;
- } ipac_w;
- } ipac_rw;
-} ipac_reg_t;
-
-#define REG_OFFSET(type, field) (int)(&(((type *)0)->field))
-
-/* IPAC read registers */
-
-#define IPAC_CONF REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_conf)
-#define IPAC_ISTA REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_ista)
-#define IPAC_ID REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_id)
-#define IPAC_ACFG REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_acfg)
-#define IPAC_AOE REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_aoe)
-#define IPAC_ARX REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_arx)
-#define IPAC_PITA1 REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_pita1)
-#define IPAC_PITA2 REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_pita2)
-#define IPAC_POTA1 REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_pota1)
-#define IPAC_POTA2 REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_pota2)
-#define IPAC_PCFG REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_pcfg)
-#define IPAC_SCFG REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_scfg)
-#define IPAC_TIMR2 REG_OFFSET(ipac_reg_t, ipac_rw.ipac_r.ipac_timr2)
-
-/* IPAC write registers */
-
-#define IPAC_MASK REG_OFFSET(ipac_reg_t, ipac_rw.ipac_w.ipac_mask)
-#define IPAC_ATX REG_OFFSET(ipac_reg_t, ipac_rw.ipac_w.ipac_atx)
-
-/* register bits */
-
-#define IPAC_CONF_AMP 0x80
-#define IPAC_CONF_CFS 0x40
-#define IPAC_CONF_TEM 0x20
-#define IPAC_CONF_PDS 0x10
-#define IPAC_CONF_IDH 0x08
-#define IPAC_CONF_SGO 0x04
-#define IPAC_CONF_ODS 0x02
-#define IPAC_CONF_IOF 0x01
-
-#define IPAC_ISTA_INT1 0x80
-#define IPAC_ISTA_INT0 0x40
-#define IPAC_ISTA_ICD 0x20
-#define IPAC_ISTA_EXD 0x10
-#define IPAC_ISTA_ICA 0x08
-#define IPAC_ISTA_EXA 0x04
-#define IPAC_ISTA_ICB 0x02
-#define IPAC_ISTA_EXB 0x01
-
-#define IPAC_MASK_INT1 0x80
-#define IPAC_MASK_INT0 0x40
-#define IPAC_MASK_ICD 0x20
-#define IPAC_MASK_EXD 0x10
-#define IPAC_MASK_ICA 0x08
-#define IPAC_MASK_EXA 0x04
-#define IPAC_MASK_ICB 0x02
-#define IPAC_MASK_EXB 0x01
-
-#define IPAC_ACFG_OD7 0x80
-#define IPAC_ACFG_OD6 0x40
-#define IPAC_ACFG_OD5 0x20
-#define IPAC_ACFG_OD4 0x10
-#define IPAC_ACFG_OD3 0x08
-#define IPAC_ACFG_OD2 0x04
-#define IPAC_ACFG_EL1 0x02
-#define IPAC_ACFG_EL2 0x01
-
-#define IPAC_AOE_OE7 0x80
-#define IPAC_AOE_OE6 0x40
-#define IPAC_AOE_OE5 0x20
-#define IPAC_AOE_OE4 0x10
-#define IPAC_AOE_OE3 0x08
-#define IPAC_AOE_OE2 0x04
-
-#define IPAC_ARX_AR7 0x80
-#define IPAC_ARX_AR6 0x40
-#define IPAC_ARX_AR5 0x20
-#define IPAC_ARX_AR4 0x10
-#define IPAC_ARX_AR3 0x08
-#define IPAC_ARX_AR2 0x04
-
-#define IPAC_ATX_AT7 0x80
-#define IPAC_ATX_AT6 0x40
-#define IPAC_ATX_AT5 0x20
-#define IPAC_ATX_AT4 0x10
-#define IPAC_ATX_AT3 0x08
-#define IPAC_ATX_AT2 0x04
-
-#define IPAC_PITA1_ENA 0x80
-#define IPAC_PITA1_DUDD 0x40
-
-#define IPAC_PITA2_ENA 0x80
-#define IPAC_PITA2_DUDD 0x40
-
-#define IPAC_POTA1_ENA 0x80
-#define IPAC_POTA1_DUDD 0x40
-
-#define IPAC_POTA2_ENA 0x80
-#define IPAC_POTA2_DUDD 0x40
-
-#define IPAC_PCFG_DPS 0x80
-#define IPAC_PCFG_ACL 0x40
-#define IPAC_PCFG_LED 0x20
-#define IPAC_PCFG_PLD 0x10
-#define IPAC_PCFG_FBS 0x08
-#define IPAC_PCFG_CSL2 0x04
-#define IPAC_PCFG_CSL1 0x02
-#define IPAC_PCFG_CSL0 0x01
-
-#define IPAC_SCFG_PRI 0x80
-#define IPAC_SCFG_TXD 0x40
-#define IPAC_SCFG_TLEN 0x20
-
-#define IPAC_TIMR2_TMD 0x80
-
-#endif /* _I4B_IPAC_H_ */
diff --git a/sys/i4b/layer1/isic/i4b_isac.c b/sys/i4b/layer1/isic/i4b_isac.c
deleted file mode 100644
index f66aaa0cc6fd..000000000000
--- a/sys/i4b/layer1/isic/i4b_isac.c
+++ /dev/null
@@ -1,660 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_isac.c - i4b siemens isdn chipset driver ISAC handler
- * ---------------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:10:36 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-
-#if NISIC > 0
-
-#include "opt_i4b.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_mbuf.h>
-
-static u_char isic_isac_exir_hdlr(register struct l1_softc *sc, u_char exir);
-static void isic_isac_ind_hdlr(register struct l1_softc *sc, int ind);
-
-/*---------------------------------------------------------------------------*
- * ISAC interrupt service routine
- *---------------------------------------------------------------------------*/
-void
-isic_isac_irq(struct l1_softc *sc, int ista)
-{
- register u_char c = 0;
- NDBGL1(L1_F_MSG, "unit %d: ista = 0x%02x", sc->sc_unit, ista);
-
- if(ista & ISAC_ISTA_EXI) /* extended interrupt */
- {
- c |= isic_isac_exir_hdlr(sc, ISAC_READ(I_EXIR));
- }
-
- if(ista & ISAC_ISTA_RME) /* receive message end */
- {
- register int rest;
- u_char rsta;
-
- /* get rx status register */
-
- rsta = ISAC_READ(I_RSTA);
-
- if((rsta & ISAC_RSTA_MASK) != 0x20)
- {
- int error = 0;
-
- if(!(rsta & ISAC_RSTA_CRC)) /* CRC error */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: CRC error", sc->sc_unit);
- }
-
- if(rsta & ISAC_RSTA_RDO) /* ReceiveDataOverflow */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: Data Overrun error", sc->sc_unit);
- }
-
- if(rsta & ISAC_RSTA_RAB) /* ReceiveABorted */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: Receive Aborted error", sc->sc_unit);
- }
-
- if(error == 0)
- NDBGL1(L1_I_ERR, "unit %d: RME unknown error, RSTA = 0x%02x!", sc->sc_unit, rsta);
-
- i4b_Dfreembuf(sc->sc_ibuf);
-
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
-
- ISAC_WRITE(I_CMDR, ISAC_CMDR_RMC|ISAC_CMDR_RRES);
- ISACCMDRWRDELAY();
-
- return;
- }
-
- rest = (ISAC_READ(I_RBCL) & (ISAC_FIFO_LEN-1));
-
- if(rest == 0)
- rest = ISAC_FIFO_LEN;
-
- if(sc->sc_ibuf == NULL)
- {
- if((sc->sc_ibuf = i4b_Dgetmbuf(rest)) != NULL)
- sc->sc_ib = sc->sc_ibuf->m_data;
- else
- panic("isic_isac_irq: RME, i4b_Dgetmbuf returns NULL!\n");
- sc->sc_ilen = 0;
- }
-
- if(sc->sc_ilen <= (MAX_DFRAME_LEN - rest))
- {
- ISAC_RDFIFO(sc->sc_ib, rest);
- sc->sc_ilen += rest;
-
- sc->sc_ibuf->m_pkthdr.len =
- sc->sc_ibuf->m_len = sc->sc_ilen;
-
- if(sc->sc_trace & TRACE_D_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, sc->sc_ibuf->m_len, sc->sc_ibuf->m_data);
- }
-
- c |= ISAC_CMDR_RMC;
-
- if(sc->sc_enabled &&
- (ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S))
- {
- i4b_l1_ph_data_ind(L0ISICUNIT(sc->sc_unit), sc->sc_ibuf);
- }
- else
- {
- i4b_Dfreembuf(sc->sc_ibuf);
- }
- }
- else
- {
- NDBGL1(L1_I_ERR, "RME, input buffer overflow!");
- i4b_Dfreembuf(sc->sc_ibuf);
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
- }
-
- if(ista & ISAC_ISTA_RPF) /* receive fifo full */
- {
- if(sc->sc_ibuf == NULL)
- {
- if((sc->sc_ibuf = i4b_Dgetmbuf(MAX_DFRAME_LEN)) != NULL)
- sc->sc_ib= sc->sc_ibuf->m_data;
- else
- panic("isic_isac_irq: RPF, i4b_Dgetmbuf returns NULL!\n");
- sc->sc_ilen = 0;
- }
-
- if(sc->sc_ilen <= (MAX_DFRAME_LEN - ISAC_FIFO_LEN))
- {
- ISAC_RDFIFO(sc->sc_ib, ISAC_FIFO_LEN);
- sc->sc_ilen += ISAC_FIFO_LEN;
- sc->sc_ib += ISAC_FIFO_LEN;
- c |= ISAC_CMDR_RMC;
- }
- else
- {
- NDBGL1(L1_I_ERR, "RPF, input buffer overflow!");
- i4b_Dfreembuf(sc->sc_ibuf);
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
- }
-
- if(ista & ISAC_ISTA_XPR) /* transmit fifo empty (XPR bit set) */
- {
- if((sc->sc_obuf2 != NULL) && (sc->sc_obuf == NULL))
- {
- sc->sc_freeflag = sc->sc_freeflag2;
- sc->sc_obuf = sc->sc_obuf2;
- sc->sc_op = sc->sc_obuf->m_data;
- sc->sc_ol = sc->sc_obuf->m_len;
- sc->sc_obuf2 = NULL;
-#ifdef NOTDEF
- printf("ob2=%x, op=%x, ol=%d, f=%d #",
- sc->sc_obuf,
- sc->sc_op,
- sc->sc_ol,
- sc->sc_state);
-#endif
- }
- else
- {
-#ifdef NOTDEF
- printf("ob=%x, op=%x, ol=%d, f=%d #",
- sc->sc_obuf,
- sc->sc_op,
- sc->sc_ol,
- sc->sc_state);
-#endif
- }
-
- if(sc->sc_obuf)
- {
- ISAC_WRFIFO(sc->sc_op, min(sc->sc_ol, ISAC_FIFO_LEN));
-
- if(sc->sc_ol > ISAC_FIFO_LEN) /* length > 32 ? */
- {
- sc->sc_op += ISAC_FIFO_LEN; /* bufferptr+32 */
- sc->sc_ol -= ISAC_FIFO_LEN; /* length - 32 */
- c |= ISAC_CMDR_XTF; /* set XTF bit */
- }
- else
- {
- if(sc->sc_freeflag)
- {
- i4b_Dfreembuf(sc->sc_obuf);
- sc->sc_freeflag = 0;
- }
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
-
- c |= ISAC_CMDR_XTF | ISAC_CMDR_XME;
- }
- }
- else
- {
- sc->sc_state &= ~ISAC_TX_ACTIVE;
- }
- }
-
- if(ista & ISAC_ISTA_CISQ) /* channel status change CISQ */
- {
- register u_char ci;
-
- /* get command/indication rx register*/
-
- ci = ISAC_READ(I_CIRR);
-
- /* if S/Q IRQ, read SQC reg to clr SQC IRQ */
-
- if(ci & ISAC_CIRR_SQC)
- (void) ISAC_READ(I_SQRR);
-
- /* C/I code change IRQ (flag already cleared by CIRR read) */
-
- if(ci & ISAC_CIRR_CIC0)
- isic_isac_ind_hdlr(sc, (ci >> 2) & 0xf);
- }
-
- if(c)
- {
- ISAC_WRITE(I_CMDR, c);
- ISACCMDRWRDELAY();
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ISAC L1 Extended IRQ handler
- *---------------------------------------------------------------------------*/
-static u_char
-isic_isac_exir_hdlr(register struct l1_softc *sc, u_char exir)
-{
- u_char c = 0;
-
- if(exir & ISAC_EXIR_XMR)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Tx Message Repeat");
-
- c |= ISAC_CMDR_XRES;
- }
-
- if(exir & ISAC_EXIR_XDU)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Tx Data Underrun");
-
- c |= ISAC_CMDR_XRES;
- }
-
- if(exir & ISAC_EXIR_PCE)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Protocol Error");
- }
-
- if(exir & ISAC_EXIR_RFO)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Rx Frame Overflow");
-
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
-
- if(exir & ISAC_EXIR_SOV)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Sync Xfer Overflow");
- }
-
- if(exir & ISAC_EXIR_MOS)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Monitor Status");
- }
-
- if(exir & ISAC_EXIR_SAW)
- {
- /* cannot happen, STCR:TSF is set to 0 */
-
- NDBGL1(L1_I_ERR, "EXIRQ Subscriber Awake");
- }
-
- if(exir & ISAC_EXIR_WOV)
- {
- /* cannot happen, STCR:TSF is set to 0 */
-
- NDBGL1(L1_I_ERR, "EXIRQ Watchdog Timer Overflow");
- }
-
- return(c);
-}
-
-/*---------------------------------------------------------------------------*
- * ISAC L1 Indication handler
- *---------------------------------------------------------------------------*/
-static void
-isic_isac_ind_hdlr(register struct l1_softc *sc, int ind)
-{
- register int event;
-
- switch(ind)
- {
- case ISAC_CIRR_IAI8:
- NDBGL1(L1_I_CICO, "rx AI8 in state %s", isic_printstate(sc));
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- isic_isac_l1_cmd(sc, CMD_AR8);
- event = EV_INFO48;
- i4b_l1_mph_status_ind(L0ISICUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- break;
-
- case ISAC_CIRR_IAI10:
- NDBGL1(L1_I_CICO, "rx AI10 in state %s", isic_printstate(sc));
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- isic_isac_l1_cmd(sc, CMD_AR10);
- event = EV_INFO410;
- i4b_l1_mph_status_ind(L0ISICUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- break;
-
- case ISAC_CIRR_IRSY:
- NDBGL1(L1_I_CICO, "rx RSY in state %s", isic_printstate(sc));
- event = EV_RSY;
- break;
-
- case ISAC_CIRR_IPU:
- NDBGL1(L1_I_CICO, "rx PU in state %s", isic_printstate(sc));
- event = EV_PU;
- break;
-
- case ISAC_CIRR_IDR:
- NDBGL1(L1_I_CICO, "rx DR in state %s", isic_printstate(sc));
- isic_isac_l1_cmd(sc, CMD_DIU);
- event = EV_DR;
- break;
-
- case ISAC_CIRR_IDID:
- NDBGL1(L1_I_CICO, "rx DID in state %s", isic_printstate(sc));
- event = EV_INFO0;
- i4b_l1_mph_status_ind(L0ISICUNIT(sc->sc_unit), STI_L1STAT, LAYER_IDLE, NULL);
- break;
-
- case ISAC_CIRR_IDIS:
- NDBGL1(L1_I_CICO, "rx DIS in state %s", isic_printstate(sc));
- event = EV_DIS;
- break;
-
- case ISAC_CIRR_IEI:
- NDBGL1(L1_I_CICO, "rx EI in state %s", isic_printstate(sc));
- isic_isac_l1_cmd(sc, CMD_DIU);
- event = EV_EI;
- break;
-
- case ISAC_CIRR_IARD:
- NDBGL1(L1_I_CICO, "rx ARD in state %s", isic_printstate(sc));
- event = EV_INFO2;
- break;
-
- case ISAC_CIRR_ITI:
- NDBGL1(L1_I_CICO, "rx TI in state %s", isic_printstate(sc));
- event = EV_INFO0;
- break;
-
- case ISAC_CIRR_IATI:
- NDBGL1(L1_I_CICO, "rx ATI in state %s", isic_printstate(sc));
- event = EV_INFO0;
- break;
-
- case ISAC_CIRR_ISD:
- NDBGL1(L1_I_CICO, "rx SD in state %s", isic_printstate(sc));
- event = EV_INFO0;
- break;
-
- default:
- NDBGL1(L1_I_ERR, "UNKNOWN Indication 0x%x in state %s", ind, isic_printstate(sc));
- event = EV_INFO0;
- break;
- }
- isic_next_state(sc, event);
-}
-
-/*---------------------------------------------------------------------------*
- * execute a layer 1 command
- *---------------------------------------------------------------------------*/
-void
-isic_isac_l1_cmd(struct l1_softc *sc, int command)
-{
- u_char cmd;
-
-#ifdef I4B_SMP_WORKAROUND
-
- /* XXXXXXXXXXXXXXXXXXX */
-
- /*
- * patch from Wolfgang Helbig:
- *
- * Here is a patch that makes i4b work on an SMP:
- * The card (TELES 16.3) didn't interrupt on an SMP machine.
- * This is a gross workaround, but anyway it works *and* provides
- * some information as how to finally fix this problem.
- */
-
- HSCX_WRITE(0, H_MASK, 0xff);
- HSCX_WRITE(1, H_MASK, 0xff);
- ISAC_WRITE(I_MASK, 0xff);
- DELAY(100);
- HSCX_WRITE(0, H_MASK, HSCX_A_IMASK);
- HSCX_WRITE(1, H_MASK, HSCX_B_IMASK);
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- /* XXXXXXXXXXXXXXXXXXX */
-
-#endif /* I4B_SMP_WORKAROUND */
-
- if(command < 0 || command > CMD_ILL)
- {
- NDBGL1(L1_I_ERR, "illegal cmd 0x%x in state %s", command, isic_printstate(sc));
- return;
- }
-
- if(sc->sc_bustyp == BUS_TYPE_IOM2)
- cmd = ISAC_CIX0_LOW;
- else
- cmd = 0;
-
- switch(command)
- {
- case CMD_TIM:
- NDBGL1(L1_I_CICO, "tx TIM in state %s", isic_printstate(sc));
- cmd |= (ISAC_CIXR_CTIM << 2);
- break;
-
- case CMD_RS:
- NDBGL1(L1_I_CICO, "tx RS in state %s", isic_printstate(sc));
- cmd |= (ISAC_CIXR_CRS << 2);
- break;
-
- case CMD_AR8:
- NDBGL1(L1_I_CICO, "tx AR8 in state %s", isic_printstate(sc));
- cmd |= (ISAC_CIXR_CAR8 << 2);
- break;
-
- case CMD_AR10:
- NDBGL1(L1_I_CICO, "tx AR10 in state %s", isic_printstate(sc));
- cmd |= (ISAC_CIXR_CAR10 << 2);
- break;
-
- case CMD_DIU:
- NDBGL1(L1_I_CICO, "tx DIU in state %s", isic_printstate(sc));
- cmd |= (ISAC_CIXR_CDIU << 2);
- break;
- }
- ISAC_WRITE(I_CIXR, cmd);
-}
-
-/*---------------------------------------------------------------------------*
- * L1 ISAC initialization
- *---------------------------------------------------------------------------*/
-int
-isic_isac_init(struct l1_softc *sc)
-{
- ISAC_IMASK = 0xff; /* disable all irqs */
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- if(sc->sc_bustyp != BUS_TYPE_IOM2)
- {
- NDBGL1(L1_I_SETUP, "configuring for IOM-1 mode");
-
- /* ADF2: Select mode IOM-1 */
- ISAC_WRITE(I_ADF2, 0x00);
-
- /* SPCR: serial port control register:
- * SPU - software power up = 0
- * SAC - SIP port high Z
- * SPM - timing mode 0
- * TLP - test loop = 0
- * C1C, C2C - B1 and B2 switched to/from SPa
- */
- ISAC_WRITE(I_SPCR, ISAC_SPCR_C1C1|ISAC_SPCR_C2C1);
-
- /* SQXR: S/Q channel xmit register:
- * SQIE - S/Q IRQ enable = 0
- * SQX1-4 - Fa bits = 1
- */
- ISAC_WRITE(I_SQXR, ISAC_SQXR_SQX1|ISAC_SQXR_SQX2|ISAC_SQXR_SQX3|ISAC_SQXR_SQX4);
-
- /* ADF1: additional feature reg 1:
- * WTC - watchdog = 0
- * TEM - test mode = 0
- * PFS - pre-filter = 0
- * CFS - IOM clock/frame always active
- * FSC1/2 - polarity of 8kHz strobe
- * ITF - interframe fill = idle
- */
- ISAC_WRITE(I_ADF1, ISAC_ADF1_FC2); /* ADF1 */
-
- /* STCR: sync transfer control reg:
- * TSF - terminal secific functions = 0
- * TBA - TIC bus address = 7
- * STx/SCx = 0
- */
- ISAC_WRITE(I_STCR, ISAC_STCR_TBA2|ISAC_STCR_TBA1|ISAC_STCR_TBA0);
-
- /* MODE: Mode Register:
- * MDSx - transparent mode 2
- * TMD - timer mode = external
- * RAC - Receiver enabled
- * DIMx - digital i/f mode
- */
- ISAC_WRITE(I_MODE, ISAC_MODE_MDS2|ISAC_MODE_MDS1|ISAC_MODE_RAC|ISAC_MODE_DIM0);
- }
- else
- {
- NDBGL1(L1_I_SETUP, "configuring for IOM-2 mode");
-
- /* ADF2: Select mode IOM-2 */
- ISAC_WRITE(I_ADF2, ISAC_ADF2_IMS);
-
- /* SPCR: serial port control register:
- * SPU - software power up = 0
- * SPM - timing mode 0
- * TLP - test loop = 0
- * C1C, C2C - B1 + C1 and B2 + IC2 monitoring
- */
- ISAC_WRITE(I_SPCR, 0x00);
-
- /* SQXR: S/Q channel xmit register:
- * IDC - IOM direction = 0 (master)
- * CFS - Config Select = 0 (clock always active)
- * CI1E - C/I channel 1 IRQ enable = 0
- * SQIE - S/Q IRQ enable = 0
- * SQX1-4 - Fa bits = 1
- */
- ISAC_WRITE(I_SQXR, ISAC_SQXR_SQX1|ISAC_SQXR_SQX2|ISAC_SQXR_SQX3|ISAC_SQXR_SQX4);
-
- /* ADF1: additional feature reg 1:
- * WTC - watchdog = 0
- * TEM - test mode = 0
- * PFS - pre-filter = 0
- * IOF - IOM i/f off = 0
- * ITF - interframe fill = idle
- */
- ISAC_WRITE(I_ADF1, 0x00);
-
- /* STCR: sync transfer control reg:
- * TSF - terminal secific functions = 0
- * TBA - TIC bus address = 7
- * STx/SCx = 0
- */
- ISAC_WRITE(I_STCR, ISAC_STCR_TBA2|ISAC_STCR_TBA1|ISAC_STCR_TBA0);
-
- /* MODE: Mode Register:
- * MDSx - transparent mode 2
- * TMD - timer mode = external
- * RAC - Receiver enabled
- * DIMx - digital i/f mode
- */
- ISAC_WRITE(I_MODE, ISAC_MODE_MDS2|ISAC_MODE_MDS1|ISAC_MODE_RAC|ISAC_MODE_DIM0);
- }
-
-#ifdef NOTDEF
- /*
- * XXX a transmitter reset causes an ISAC tx IRQ which will not
- * be serviced at attach time under some circumstances leaving
- * the associated IRQ line on the ISA bus active. This prevents
- * any further interrupts to be serviced because no low -> high
- * transition can take place anymore. (-hm)
- */
-
- /* command register:
- * RRES - HDLC receiver reset
- * XRES - transmitter reset
- */
- ISAC_WRITE(I_CMDR, ISAC_CMDR_RRES|ISAC_CMDR_XRES);
- ISACCMDRWRDELAY();
-#endif
-
- /* enabled interrupts:
- * ===================
- * RME - receive message end
- * RPF - receive pool full
- * XPR - transmit pool ready
- * CISQ - CI or S/Q channel change
- * EXI - extended interrupt
- */
-
- ISAC_IMASK = ISAC_MASK_RSC | /* auto mode only */
- ISAC_MASK_TIN | /* timer irq */
- ISAC_MASK_SIN; /* sync xfer irq */
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- return(0);
-}
-
-#endif /* NISIC > 0 */
diff --git a/sys/i4b/layer1/isic/i4b_isac.h b/sys/i4b/layer1/isic/i4b_isac.h
deleted file mode 100644
index 42c6a5c296be..000000000000
--- a/sys/i4b/layer1/isic/i4b_isac.h
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * Copyright (c) 1996, 2000 Gary Jennejohn. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:10:42 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef I4B_ISAC_H_
-#define I4B_ISAC_H_
-
-/*
- * The ISAC databook specifies a delay of 2.5 DCL clock cycles between
- * writes to the ISAC command register CMDR. This is the delay used to
- * satisfy this requirement.
- */
-
-#define I4B_ISAC_CMDRWRDELAY 30
-
-#if (I4B_ISAC_CMDRWRDELAY > 0)
-#define ISACCMDRWRDELAY() DELAY(I4B_ISAC_CMDRWRDELAY)
-#else
-#warning "I4B_ISAC_CMDRWRDELAY set to 0!"
-#define ISACCMDRWRDELAY()
-#endif
-
-enum ISAC_VERSIONS {
- ISAC_VA, /* 2085 A1 or A2, 2086/2186 V1.1 */
- ISAC_VB1, /* 2085 B1 */
- ISAC_VB2, /* 2085 B2 */
- ISAC_VB3, /* 2085 B3/V2.3 */
- ISAC_UNKN /* unknown version */
-};
-
-#define ISAC_FIFO_LEN 32 /* 32 bytes FIFO on chip */
-
-/*
- * definitions of registers and bits for the ISAC ISDN chip.
- */
-
-typedef struct isac_reg {
-
- /* 32 byte deep FIFO always first */
-
- unsigned char isac_fifo [ISAC_FIFO_LEN];
-
- /* most registers can be read/written, but have different names */
- /* so define a union with read/write names to make that clear */
-
- union {
- struct {
- unsigned char isac_ista;
- unsigned char isac_star;
- unsigned char isac_mode;
- unsigned char isac_timr;
- unsigned char isac_exir;
- unsigned char isac_rbcl;
- unsigned char isac_sapr;
- unsigned char isac_rsta;
- unsigned char dummy_28;
- unsigned char isac_rhcr;
- unsigned char isac_rbch;
- unsigned char isac_star2;
- unsigned char dummy_2c;
- unsigned char dummy_2d;
- unsigned char dummy_2e;
- unsigned char dummt_2f;
- unsigned char isac_spcr;
- unsigned char isac_cirr;
- unsigned char isac_mor;
- unsigned char isac_sscr;
- unsigned char isac_sfcr;
- unsigned char isac_c1r;
- unsigned char isac_c2r;
- unsigned char isac_b1cr;
- unsigned char isac_b2cr;
- unsigned char isac_adf2;
- unsigned char isac_mosr;
- unsigned char isac_sqrr;
- } isac_r;
- struct {
- unsigned char isac_mask;
- unsigned char isac_cmdr;
- unsigned char isac_mode;
- unsigned char isac_timr;
- unsigned char isac_xad1;
- unsigned char isac_xad2;
- unsigned char isac_sap1;
- unsigned char isac_sap2;
- unsigned char isac_tei1;
- unsigned char isac_tei2;
- unsigned char dummy_2a;
- unsigned char isac_star2;
- unsigned char dummy_2c;
- unsigned char dummy_2d;
- unsigned char dummy_2e;
- unsigned char dummt_2f;
- unsigned char isac_spcr;
- unsigned char isac_cixr;
- unsigned char isac_mox;
- unsigned char isac_sscx;
- unsigned char isac_sfcw;
- unsigned char isac_c1r;
- unsigned char isac_c2r;
- unsigned char isac_stcr;
- unsigned char isac_adf1;
- unsigned char isac_adf2;
- unsigned char isac_mocr;
- unsigned char isac_sqxr;
- } isac_w;
- } isac_rw;
-} isac_reg_t;
-
-#define REG_OFFSET(type, field) (int)(&(((type *)0)->field))
-
-/* ISAC read registers */
-
-#define i_ista isac_rw.isac_r.isac_ista
-#define I_ISTA REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_ista)
-#define i_star isac_rw.isac_r.isac_star
-#define I_STAR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_star)
-#define i_mode isac_rw.isac_r.isac_mode
-#define I_MODE REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_mode)
-#define i_timr isac_rw.isac_r.isac_timr
-#define I_TIMR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_timr)
-#define i_exir isac_rw.isac_r.isac_exir
-#define I_EXIR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_exir)
-#define i_rbcl isac_rw.isac_r.isac_rbcl
-#define I_RBCL REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_rbcl)
-#define i_sapr isac_rw.isac_r.isac_sapr
-#define I_SAPR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_sapr)
-#define i_rsta isac_rw.isac_r.isac_rsta
-#define I_RSTA REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_rsta)
-#define i_rhcr isac_rw.isac_r.isac_rhcr
-#define I_RHCR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_rhcr)
-#define i_rbch isac_rw.isac_r.isac_rbch
-#define I_RBCH REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_rbch)
-#define i_star2 isac_rw.isac_r.isac_star2
-#define I_STAR2 REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_star2)
-#define i_spcr isac_rw.isac_r.isac_spcr
-#define I_SPCR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_spcr)
-#define i_cirr isac_rw.isac_r.isac_cirr
-#define I_CIRR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_cirr)
-#define i_mor isac_rw.isac_r.isac_mor
-#define I_MOR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_mor)
-#define i_sscr isac_rw.isac_r.isac_sscr
-#define I_SSCR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_sscr)
-#define i_sfcr isac_rw.isac_r.isac_sfcr
-#define I_SFCR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_sfcr)
-#define i_c1r isac_rw.isac_r.isac_c1r
-#define I_C1R REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_c1r)
-#define i_c2r isac_rw.isac_r.isac_c2r
-#define I_C2R REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_c2r)
-#define i_b1cr isac_rw.isac_r.isac_b1cr
-#define I_B1CR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_b1cr)
-#define i_b2cr isac_rw.isac_r.isac_b2cr
-#define I_B2CR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_b2cr)
-#define i_adf2 isac_rw.isac_r.isac_adf2
-#define I_ADF2 REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_adf2)
-#define i_mosr isac_rw.isac_r.isac_mosr
-#define I_MOSR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_mosr)
-#define i_sqrr isac_rw.isac_r.isac_sqrr
-#define I_SQRR REG_OFFSET(isac_reg_t, isac_rw.isac_r.isac_sqrr)
-
-/* ISAC write registers - isac_mode, isac_timr, isac_star2, isac_spcr, */
-/* isac_c1r, isac_c2r, isac_adf2 see read registers */
-
-#define i_mask isac_rw.isac_w.isac_mask
-#define I_MASK REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_mask)
-#define i_cmdr isac_rw.isac_w.isac_cmdr
-#define I_CMDR REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_cmdr)
-#define i_xad1 isac_rw.isac_w.isac_xad1
-#define I_XAD1 REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_xad1)
-#define i_xad2 isac_rw.isac_w.isac_xad2
-#define I_XAD2 REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_xad2)
-#define i_sap1 isac_rw.isac_w.isac_sap1
-#define I_SAP1 REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_sap1)
-#define i_sap2 isac_rw.isac_w.isac_sap2
-#define I_SAP2 REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_sap2)
-#define i_tei1 isac_rw.isac_w.isac_tei1
-#define i_tei2 isac_rw.isac_w.isac_tei2
-#define i_cixr isac_rw.isac_w.isac_cixr
-#define I_CIXR REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_cixr)
-#define I_CIX0 I_CIXR
-#define i_mox isac_rw.isac_w.isac_mox
-#define I_MOX REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_mox)
-#define i_sscx isac_rw.isac_w.isac_sscx
-#define I_SSCX REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_sscx)
-#define i_sfcw isac_rw.isac_w.isac_sfcw
-#define I_SFCW REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_sfcw)
-#define i_stcr isac_rw.isac_w.isac_stcr
-#define I_STCR REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_stcr)
-#define i_adf1 isac_rw.isac_w.isac_adf1
-#define I_ADF1 REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_adf1)
-#define i_mocr isac_rw.isac_w.isac_mocr
-#define I_MOCR REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_mocr)
-#define i_sqxr isac_rw.isac_w.isac_sqxr
-#define I_SQXR REG_OFFSET(isac_reg_t, isac_rw.isac_w.isac_sqxr)
-
-#define ISAC_ISTA_RME 0x80
-#define ISAC_ISTA_RPF 0x40
-#define ISAC_ISTA_RSC 0x20
-#define ISAC_ISTA_XPR 0x10
-#define ISAC_ISTA_TIN 0x08
-#define ISAC_ISTA_CISQ 0x04
-#define ISAC_ISTA_SIN 0x02
-#define ISAC_ISTA_EXI 0x01
-
-#define ISAC_MASK_RME 0x80
-#define ISAC_MASL_RPF 0x40
-#define ISAC_MASK_RSC 0x20
-#define ISAC_MASK_XPR 0x10
-#define ISAC_MASK_TIN 0x08
-#define ISAC_MASK_CISQ 0x04
-#define ISAC_MASK_SIN 0x02
-#define ISAC_MASK_EXI 0x01
-#define ISAC_MASK_ALL 0xff
-
-#define ISAC_STAR_XDOV 0x80
-#define ISAC_STAR_XFW 0x40
-#define ISAC_STAR_XRNR 0x20
-#define ISAC_STAR_RRNR 0x10
-#define ISAC_STAR_MBR 0x08
-#define ISAC_STAR_MAC1 0x04
-#define ISAC_STAR_BVS 0x02
-#define ISAC_STAR_MAC0 0x01
-
-#define ISAC_CMDR_RMC 0x80
-#define ISAC_CMDR_RRES 0x40
-#define ISAC_CMDR_RNR 0x20
-#define ISAC_CMDR_STI 0x10
-#define ISAC_CMDR_XTF 0x08
-#define ISAC_CMDR_XIF 0x04
-#define ISAC_CMDR_XME 0x02
-#define ISAC_CMDR_XRES 0x01
-
-#define ISAC_MODE_MDS2 0x80
-#define ISAC_MODE_MDS1 0x40
-#define ISAC_MODE_MDS0 0x20
-#define ISAC_MODE_TMD 0x10
-#define ISAC_MODE_RAC 0x08
-#define ISAC_MODE_DIM2 0x04
-#define ISAC_MODE_DIM1 0x02
-#define ISAC_MODE_DIM0 0x01
-
-#define ISAC_EXIR_XMR 0x80
-#define ISAC_EXIR_XDU 0x40
-#define ISAC_EXIR_PCE 0x20
-#define ISAC_EXIR_RFO 0x10
-#define ISAC_EXIR_SOV 0x08
-#define ISAC_EXIR_MOS 0x04
-#define ISAC_EXIR_SAW 0x02
-#define ISAC_EXIR_WOV 0x01
-
-#define ISAC_RSTA_RDA 0x80
-#define ISAC_RSTA_RDO 0x40
-#define ISAC_RSTA_CRC 0x20
-#define ISAC_RSTA_RAB 0x10
-#define ISAC_RSTA_SA1 0x08
-#define ISAC_RSTA_SA0 0x04
-#define ISAC_RSTA_CR 0x02
-#define ISAC_RSTA_TA 0x01
-
-#define ISAC_RSTA_MASK 0x70 /* the interesting bits */
-
-#define ISAC_RBCH_XAC 0x80
-#define ISAC_RBCH_VN1 0x40
-#define ISAC_RBCH_VN0 0x20
-#define ISAC_RBCH_OV 0x10
-/* the other 4 bits are the high bits of the receive byte count */
-
-#define ISAC_SPCR_SPU 0x80
-#define ISAC_SPCR_SAC 0x40
-#define ISAC_SPCR_SPM 0x20
-#define ISAC_SPCR_TLP 0x10
-#define ISAC_SPCR_C1C1 0x08
-#define ISAC_SPCR_C1C0 0x04
-#define ISAC_SPCR_C2C1 0x02
-#define ISAC_SPCR_C2C0 0x01
-
-#define ISAC_CIRR_SQC 0x80
-#define ISAC_CIRR_BAS 0x40
-/* bits 5-2 CODR */
-#define ISAC_CIRR_CIC0 0x02
-/* bit 0 is always 0 */
-/* C/I codes from bits 5-2 (>> 2 & 0xf) */
-/* the indications */
-#define ISAC_CIRR_IPU 0x07
-#define ISAC_CIRR_IDR 0x00
-#define ISAC_CIRR_ISD 0x02
-#define ISAC_CIRR_IDIS 0x03
-#define ISAC_CIRR_IEI 0x06
-#define ISAC_CIRR_IRSY 0x04
-#define ISAC_CIRR_IARD 0x08
-#define ISAC_CIRR_ITI 0x0a
-#define ISAC_CIRR_IATI 0x0b
-#define ISAC_CIRR_IAI8 0x0c
-#define ISAC_CIRR_IAI10 0x0d
-#define ISAC_CIRR_IDID 0x0f
-
-#define ISAC_CI_MASK 0x0f
-
-#define ISAC_CIXR_RSS 0x80
-#define ISAC_CIXR_BAC 0x40
-/* bits 5-2 CODX */
-#define ISAC_CIXR_TCX 0x02
-#define ISAC_CIXR_ECX 0x01
-/* in IOM-2 mode the low bits are always 1 */
-#define ISAC_CIX0_LOW 0x03
-/* C/I codes from bits 5-2 (>> 2 & 0xf) */
-/* the commands */
-#define ISAC_CIXR_CTIM 0
-#define ISAC_CIXR_CRS 0x01
-#define ISAC_CIXR_CSCZ 0x04
-#define ISAC_CIXR_CSSZ 0x02
-#define ISAC_CIXR_CAR8 0x08
-#define ISAC_CIXR_CAR10 0x09
-#define ISAC_CIXR_CARL 0x0a
-#define ISAC_CIXR_CDIU 0x0f
-
-#define ISAC_STCR_TSF 0x80
-#define ISAC_STCR_TBA2 0x40
-#define ISAC_STCR_TBA1 0x20
-#define ISAC_STCR_TBA0 0x10
-#define ISAC_STCR_ST1 0x08
-#define ISAC_STCR_ST0 0x04
-#define ISAC_STCR_SC1 0x02
-#define ISAC_STCR_SC0 0x01
-
-#define ISAC_ADF1_WTC1 0x80
-#define ISAC_ADF1_WTC2 0x40
-#define ISAC_ADF1_TEM 0x20
-#define ISAC_ADF1_PFS 0x10
-#define ISAC_ADF1_CFS 0x08
-#define ISAC_ADF1_FC2 0x04
-#define ISAC_ADF1_FC1 0x02
-#define ISAC_ADF1_ITF 0x01
-
-#define ISAC_ADF2_IMS 0x80
-/* all other bits are 0 */
-
-/* bits 7-5 are always 0 */
-#define ISAC_SQRR_SYN 0x10
-#define ISAC_SQRR_SQR1 0x08
-#define ISAC_SQRR_SQR2 0x04
-#define ISAC_SQRR_SQR3 0x02
-#define ISAC_SQRR_SQR4 0x01
-
-#define ISAC_SQXR_IDC 0x80
-#define ISAC_SQXR_CFS 0x40
-#define ISAC_SQXR_CI1E 0x20
-#define ISAC_SQXR_SQIE 0x10
-#define ISAC_SQXR_SQX1 0x08
-#define ISAC_SQXR_SQX2 0x04
-#define ISAC_SQXR_SQX3 0x02
-#define ISAC_SQXR_SQX4 0x01
-
-#endif /* I4B_ISAC_H_ */
diff --git a/sys/i4b/layer1/isic/i4b_isic.c b/sys/i4b/layer1/isic/i4b_isic.c
deleted file mode 100644
index 751c568cd5dd..000000000000
--- a/sys/i4b/layer1/isic/i4b_isic.c
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_isic.c - global isic stuff
- * ==============================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:29:42 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if NISIC > 0
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isic_ext.h>
-#include <i4b/layer1/isic/i4b_ipac.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#include <i4b/include/i4b_global.h>
-
-static char *ISACversion[] = {
- "2085 Version A1/A2 or 2086/2186 Version 1.1",
- "2085 Version B1",
- "2085 Version B2",
- "2085 Version V2.3 (B3)",
- "Unknown Version"
-};
-
-static char *HSCXversion[] = {
- "82525 Version A1",
- "Unknown (0x01)",
- "82525 Version A2",
- "Unknown (0x03)",
- "82525 Version A3",
- "82525 or 21525 Version 2.1",
- "Unknown Version"
-};
-
-/* jump table for multiplex routines */
-struct i4b_l1mux_func isic_l1mux_func = {
- isic_ret_linktab,
- isic_set_linktab,
- isic_mph_command_req,
- isic_ph_data_req,
- isic_ph_activate_req,
-};
-
-/*---------------------------------------------------------------------------*
- * isic - device driver interrupt routine
- *---------------------------------------------------------------------------*/
-void
-isicintr(struct l1_softc *sc)
-{
- if(sc->sc_ipac == 0) /* HSCX/ISAC interupt routine */
- {
- u_char was_hscx_irq = 0;
- u_char was_isac_irq = 0;
-
- register u_char hscx_irq_stat;
- register u_char isac_irq_stat;
-
- for(;;)
- {
- /* get hscx irq status from hscx b ista */
- hscx_irq_stat =
- HSCX_READ(HSCX_CH_B, H_ISTA) & ~HSCX_B_IMASK;
-
- /* get isac irq status */
- isac_irq_stat = ISAC_READ(I_ISTA);
-
- /* do as long as there are pending irqs in the chips */
- if(!hscx_irq_stat && !isac_irq_stat)
- break;
-
- if(hscx_irq_stat & (HSCX_ISTA_RME | HSCX_ISTA_RPF |
- HSCX_ISTA_RSC | HSCX_ISTA_XPR |
- HSCX_ISTA_TIN | HSCX_ISTA_EXB))
- {
- isic_hscx_irq(sc, hscx_irq_stat,
- HSCX_CH_B,
- hscx_irq_stat & HSCX_ISTA_EXB);
- was_hscx_irq = 1;
- }
-
- if(hscx_irq_stat & (HSCX_ISTA_ICA | HSCX_ISTA_EXA))
- {
- isic_hscx_irq(sc,
- HSCX_READ(HSCX_CH_A, H_ISTA) & ~HSCX_A_IMASK,
- HSCX_CH_A,
- hscx_irq_stat & HSCX_ISTA_EXA);
- was_hscx_irq = 1;
- }
-
- if(isac_irq_stat)
- {
- isic_isac_irq(sc, isac_irq_stat); /* isac handler */
- was_isac_irq = 1;
- }
- }
-
- HSCX_WRITE(0, H_MASK, 0xff);
- ISAC_WRITE(I_MASK, 0xff);
- HSCX_WRITE(1, H_MASK, 0xff);
-
-#ifdef ELSA_QS1ISA
- DELAY(80);
-
- if((sc->sc_cardtyp == CARD_TYPEP_ELSAQS1ISA) && (sc->clearirq))
- {
- sc->clearirq(sc);
- }
-#else
- DELAY(100);
-#endif
-
- HSCX_WRITE(0, H_MASK, HSCX_A_IMASK);
- ISAC_WRITE(I_MASK, ISAC_IMASK);
- HSCX_WRITE(1, H_MASK, HSCX_B_IMASK);
- }
- else /* IPAC interrupt routine */
- {
- register u_char ipac_irq_stat;
- register u_char was_ipac_irq = 0;
-
- for(;;)
- {
- /* get global irq status */
-
- ipac_irq_stat = (IPAC_READ(IPAC_ISTA)) & 0x3f;
-
- /* check hscx a */
-
- if(ipac_irq_stat & (IPAC_ISTA_ICA | IPAC_ISTA_EXA))
- {
- /* HSCX A interrupt */
- isic_hscx_irq(sc, HSCX_READ(HSCX_CH_A, H_ISTA),
- HSCX_CH_A,
- ipac_irq_stat & IPAC_ISTA_EXA);
- was_ipac_irq = 1;
- }
- if(ipac_irq_stat & (IPAC_ISTA_ICB | IPAC_ISTA_EXB))
- {
- /* HSCX B interrupt */
- isic_hscx_irq(sc, HSCX_READ(HSCX_CH_B, H_ISTA),
- HSCX_CH_B,
- ipac_irq_stat & IPAC_ISTA_EXB);
- was_ipac_irq = 1;
- }
- if(ipac_irq_stat & IPAC_ISTA_ICD)
- {
- /* ISAC interrupt */
- isic_isac_irq(sc, ISAC_READ(I_ISTA));
- was_ipac_irq = 1;
- }
- if(ipac_irq_stat & IPAC_ISTA_EXD)
- {
- /* force ISAC interrupt handling */
- isic_isac_irq(sc, ISAC_ISTA_EXI);
- was_ipac_irq = 1;
- }
-
- /* do as long as there are pending irqs in the chip */
- if(!ipac_irq_stat)
- break;
- }
-
- IPAC_WRITE(IPAC_MASK, 0xff);
- DELAY(50);
- IPAC_WRITE(IPAC_MASK, 0xc0);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * isic_recover - try to recover from irq lockup
- *---------------------------------------------------------------------------*/
-void
-isic_recover(struct l1_softc *sc)
-{
- u_char byte;
-
- /* get hscx irq status from hscx b ista */
-
- byte = HSCX_READ(HSCX_CH_B, H_ISTA);
-
- NDBGL1(L1_ERROR, "HSCX B: ISTA = 0x%x", byte);
-
- if(byte & HSCX_ISTA_ICA)
- NDBGL1(L1_ERROR, "HSCX A: ISTA = 0x%x", (u_char)HSCX_READ(HSCX_CH_A, H_ISTA));
-
- if(byte & HSCX_ISTA_EXB)
- NDBGL1(L1_ERROR, "HSCX B: EXIR = 0x%x", (u_char)HSCX_READ(HSCX_CH_B, H_EXIR));
-
- if(byte & HSCX_ISTA_EXA)
- NDBGL1(L1_ERROR, "HSCX A: EXIR = 0x%x", (u_char)HSCX_READ(HSCX_CH_A, H_EXIR));
-
- /* get isac irq status */
-
- byte = ISAC_READ(I_ISTA);
-
- NDBGL1(L1_ERROR, " ISAC: ISTA = 0x%x", byte);
-
- if(byte & ISAC_ISTA_EXI)
- NDBGL1(L1_ERROR, " ISAC: EXIR = 0x%x", (u_char)ISAC_READ(I_EXIR));
-
- if(byte & ISAC_ISTA_CISQ)
- {
- byte = ISAC_READ(I_CIRR);
-
- NDBGL1(L1_ERROR, " ISAC: CISQ = 0x%x", byte);
-
- if(byte & ISAC_CIRR_SQC)
- NDBGL1(L1_ERROR, " ISAC: SQRR = 0x%x", (u_char)ISAC_READ(I_SQRR));
- }
-
- NDBGL1(L1_ERROR, "HSCX B: IMASK = 0x%x", HSCX_B_IMASK);
- NDBGL1(L1_ERROR, "HSCX A: IMASK = 0x%x", HSCX_A_IMASK);
-
- HSCX_WRITE(0, H_MASK, 0xff);
- HSCX_WRITE(1, H_MASK, 0xff);
- DELAY(100);
- HSCX_WRITE(0, H_MASK, HSCX_A_IMASK);
- HSCX_WRITE(1, H_MASK, HSCX_B_IMASK);
- DELAY(100);
-
- NDBGL1(L1_ERROR, " ISAC: IMASK = 0x%x", ISAC_IMASK);
-
- ISAC_WRITE(I_MASK, 0xff);
- DELAY(100);
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_common - common attach routine for all busses
- *---------------------------------------------------------------------------*/
-int
-isic_attach_common(device_t dev)
-{
- char *drvid = NULL;
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
-
- sc->sc_unit = unit;
-
- sc->sc_isac_version = 0;
- sc->sc_hscx_version = 0;
-
- if(sc->sc_ipac)
- {
- sc->sc_ipac_version = IPAC_READ(IPAC_ID);
-
- switch(sc->sc_ipac_version)
- {
- case IPAC_V11:
- case IPAC_V12:
- break;
-
- default:
- printf("isic%d: Error, IPAC version %d unknown!\n",
- unit, sc->sc_ipac_version);
- return(0);
- break;
- }
- }
- else
- {
- sc->sc_isac_version = ((ISAC_READ(I_RBCH)) >> 5) & 0x03;
-
- switch(sc->sc_isac_version)
- {
- case ISAC_VA:
- case ISAC_VB1:
- case ISAC_VB2:
- case ISAC_VB3:
- break;
-
- default:
- printf("isic%d: Error, ISAC version %d unknown!\n",
- unit, sc->sc_isac_version);
- return ENXIO;
- break;
- }
-
- sc->sc_hscx_version = HSCX_READ(0, H_VSTR) & 0xf;
-
- switch(sc->sc_hscx_version)
- {
- case HSCX_VA1:
- case HSCX_VA2:
- case HSCX_VA3:
- case HSCX_V21:
- break;
-
- default:
- printf("isic%d: Error, HSCX version %d unknown!\n",
- unit, sc->sc_hscx_version);
- return ENXIO;
- break;
- }
- }
-
- isic_isac_init(sc); /* ISAC setup */
-
- /* HSCX setup */
-
- isic_bchannel_setup(sc->sc_unit, HSCX_CH_A, BPROT_NONE, 0);
-
- isic_bchannel_setup(sc->sc_unit, HSCX_CH_B, BPROT_NONE, 0);
-
- isic_init_linktab(sc); /* setup linktab */
-
- sc->sc_trace = TRACE_OFF; /* set trace level */
-
- sc->sc_state = ISAC_IDLE; /* set state */
-
- sc->sc_ibuf = NULL; /* input buffering */
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
-
- sc->sc_obuf = NULL; /* output buffering */
- sc->sc_op = NULL;
- sc->sc_ol = 0;
- sc->sc_freeflag = 0;
-
- sc->sc_obuf2 = NULL; /* second output buffer */
- sc->sc_freeflag2 = 0;
-
- /* timer setup */
-
- callout_handle_init(&sc->sc_T3_callout);
- callout_handle_init(&sc->sc_T4_callout);
-
- /* init higher protocol layers */
-
- i4b_l1_mph_status_ind(L0ISICUNIT(sc->sc_unit), STI_ATTACH, sc->sc_cardtyp, &isic_l1mux_func);
-
- /* announce manufacturer and card type for ISA cards */
-
- switch(sc->sc_cardtyp)
- {
- case CARD_TYPEP_8:
- drvid = "Teles S0/8 (or compatible)";
- break;
-
- case CARD_TYPEP_16:
- drvid = "Teles S0/16 (or compatible)";
- break;
-
- case CARD_TYPEP_16_3:
- drvid = "Teles S0/16.3";
- break;
-
- case CARD_TYPEP_AVMA1:
- drvid = "AVM A1 or Fritz!Card Classic";
- break;
-
- case CARD_TYPEP_PCFRITZ:
- drvid = "AVM Fritz!Card PCMCIA";
- break;
-
- case CARD_TYPEP_USRTA:
- drvid = "USRobotics Sportster ISDN TA intern";
- break;
-
- case CARD_TYPEP_ITKIX1:
- drvid = "ITK ix1 micro";
- break;
-
- case CARD_TYPEP_PCC16:
- drvid = "ELSA MicroLink ISDN/PCC-16";
- break;
-
- default:
- drvid = NULL; /* pnp/pci cards announce themselves */
- break;
- }
-
- if(drvid)
- printf("isic%d: %s\n", unit, drvid);
-
- if(bootverbose)
- {
- /* announce chip versions */
-
- if(sc->sc_ipac)
- {
- if(sc->sc_ipac_version == IPAC_V11)
- printf("isic%d: IPAC PSB2115 Version 1.1\n", unit);
- else
- printf("isic%d: IPAC PSB2115 Version 1.2\n", unit);
- }
- else
- {
- printf("isic%d: ISAC %s (IOM-%c)\n",
- unit,
- ISACversion[sc->sc_isac_version],
- sc->sc_bustyp == BUS_TYPE_IOM1 ? '1' : '2');
-
- printf("isic%d: HSCX %s\n",
- unit,
- HSCXversion[sc->sc_hscx_version]);
- }
- }
- return 0;
-}
-
-/*---------------------------------------------------------------------------*
- * isic_detach_common - common detach routine for all busses
- *---------------------------------------------------------------------------*/
-void
-isic_detach_common(device_t dev)
-{
- struct l1_softc *sc = &l1_sc[device_get_unit(dev)];
- int i;
-
- sc->sc_cardtyp = CARD_TYPEP_UNK;
-
- /* free interrupt resources */
-
- if(sc->sc_resources.irq)
- {
- /* tear down interupt handler */
- bus_teardown_intr(dev, sc->sc_resources.irq,
- (void(*)(void *))isicintr);
-
- /* free irq */
- bus_release_resource(dev, SYS_RES_IRQ,
- sc->sc_resources.irq_rid,
- sc->sc_resources.irq);
- sc->sc_resources.irq_rid = 0;
- sc->sc_resources.irq = 0;
- }
-
- /* free memory resource */
-
- if(sc->sc_resources.mem)
- {
- bus_release_resource(dev,SYS_RES_MEMORY,
- sc->sc_resources.mem_rid,
- sc->sc_resources.mem);
- sc->sc_resources.mem_rid = 0;
- sc->sc_resources.mem = 0;
- }
-
- /* free iobases */
-
- for(i=0; i < INFO_IO_BASES ; i++)
- {
- if(sc->sc_resources.io_base[i])
- {
- bus_release_resource(dev, SYS_RES_IOPORT,
- sc->sc_resources.io_rid[i],
- sc->sc_resources.io_base[i]);
- sc->sc_resources.io_rid[i] = 0;
- sc->sc_resources.io_base[i] = 0;
- }
- }
-}
-
-#endif /* NISIC > 0 */
-
diff --git a/sys/i4b/layer1/isic/i4b_isic.h b/sys/i4b/layer1/isic/i4b_isic.h
deleted file mode 100644
index feb06afe6463..000000000000
--- a/sys/i4b/layer1/isic/i4b_isic.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------*
- *
- * i4b_l1.h - isdn4bsd layer 1 header file
- * ---------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Fri Jan 26 13:55:12 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_ISIC_H_
-#define _I4B_ISIC_H_
-
-#include <sys/resource.h>
-#include <sys/bus.h>
-#include <i386/include/bus.h>
-#include <sys/rman.h>
-#include <i386/include/resource.h>
-
-#include <i4b/include/i4b_l3l4.h>
-
-#include <i4b/layer1/isic/i4b_isic_ext.h>
-
-/*---------------------------------------------------------------------------
- * isic driver: max no of units
- * Teles/Creatix/Neuhaus cards have a hardware limitation
- * as one is able to set 3 (sometimes 4) different configurations by
- * jumpers so a maximum of 3 (4) cards per ISA bus is possible.
- *---------------------------------------------------------------------------*/
-#define ISIC_MAXUNIT 3 /* max no of supported units 0..3 */
-
-#define INFO_IO_BASES 50 /* 49 needed for USR */
-
-struct i4b_info {
- struct resource * io_base[INFO_IO_BASES];
- int io_rid [INFO_IO_BASES];
- struct resource * irq;
- int irq_rid;
- struct resource * mem;
- int mem_rid;
-};
-
-/*---------------------------------------------------------------------------*
- * l1_bchan_state: the state of one B channel
- *---------------------------------------------------------------------------*/
-typedef struct
-{
- int unit; /* cards unit number */
- int channel; /* which channel is this*/
- caddr_t hscx; /* HSCX address */
- u_char hscx_mask; /* HSCX interrupt mask */
- int bprot; /* B channel protocol */
- int state; /* this channels state */
-#define HSCX_IDLE 0x00 /* channel idle */
-#define HSCX_TX_ACTIVE 0x01 /* tx running */
-
- /* receive data from ISDN */
-
- struct ifqueue rx_queue; /* receiver queue */
-
- int rxcount; /* rx statistics counter*/
-
- struct mbuf *in_mbuf; /* rx input buffer */
- u_char *in_cbptr; /* curr buffer pointer */
- int in_len; /* rx input buffer len */
-
- /* transmit data to ISDN */
-
- struct ifqueue tx_queue; /* transmitter queue */
-
- int txcount; /* tx statistics counter*/
-
- struct mbuf *out_mbuf_head; /* first mbuf in possible chain */
- struct mbuf *out_mbuf_cur; /* current mbuf in possbl chain */
- unsigned char *out_mbuf_cur_ptr; /* data pointer into mbuf */
- int out_mbuf_cur_len; /* remaining bytes in mbuf */
-
- /* link between b channel and driver */
-
- isdn_link_t isic_isdn_linktab; /* b channel addresses */
- drvr_link_t *isic_drvr_linktab; /* ptr to driver linktab*/
-
- /* statistics */
-
- /* RSTA */
-
- int stat_VFR; /* HSCX RSTA Valid FRame */
- int stat_RDO; /* HSCX RSTA Rx Data Overflow */
- int stat_CRC; /* HSCX RSTA CRC */
- int stat_RAB; /* HSCX RSTA Rx message ABorted */
-
- /* EXIR */
-
- int stat_XDU; /* HSCX EXIR tx data underrun */
- int stat_RFO; /* HSCX EXIR rx frame overflow */
-
-} l1_bchan_state_t;
-
-/*---------------------------------------------------------------------------*
- * l1_softc: the state of the layer 1 of the D channel
- *---------------------------------------------------------------------------*/
-struct l1_softc
-{
- int sc_unit; /* unit number */
- int sc_irq; /* interrupt vector */
- struct i4b_info sc_resources;
-
- int sc_port; /* port base address */
-
- int sc_cardtyp; /* CARD_TYPEP_xxxx */
-
- int sc_bustyp; /* IOM1 or IOM2 */
-#define BUS_TYPE_IOM1 0x01
-#define BUS_TYPE_IOM2 0x02
-
- int sc_trace; /* output protocol data for tracing */
- unsigned int sc_trace_dcount;/* d channel trace frame counter */
- unsigned int sc_trace_bcount;/* b channel trace frame counter */
-
- int sc_state; /* ISAC state flag */
-#define ISAC_IDLE 0x00 /* state = idle */
-#define ISAC_TX_ACTIVE 0x01 /* state = transmitter active */
-
- int sc_init_tries; /* no of out tries to access S0 */
-
- caddr_t sc_vmem_addr; /* card RAM virtual memory base */
- caddr_t sc_isac; /* ISAC port base addr */
-#define ISAC_BASE (sc->sc_isac)
-
- caddr_t sc_ipacbase; /* IPAC port base addr */
-#define IPAC_BASE (sc->sc_ipacbase)
-
- u_char sc_isac_mask; /* ISAC IRQ mask */
-#define ISAC_IMASK (sc->sc_isac_mask)
-
- l1_bchan_state_t sc_chan[2]; /* B-channel state */
-#define HSCX_A_BASE (sc->sc_chan[0].hscx)
-#define HSCX_A_IMASK (sc->sc_chan[0].hscx_mask)
-#define HSCX_B_BASE (sc->sc_chan[1].hscx)
-#define HSCX_B_IMASK (sc->sc_chan[1].hscx_mask)
-
- struct mbuf *sc_ibuf; /* input buffer mgmt */
- u_short sc_ilen;
- u_char *sc_ib;
- /* this is for the irq TX routine */
- struct mbuf *sc_obuf; /* pointer to an mbuf with TX frame */
- u_char *sc_op; /* ptr to next chunk of frame to tx */
- int sc_ol; /* length of remaining frame to tx */
- int sc_freeflag; /* m_freem mbuf if set */
-
- struct mbuf *sc_obuf2; /* pointer to an mbuf with TX frame */
- int sc_freeflag2; /* m_freem mbuf if set */
-
- int sc_isac_version; /* version number of ISAC */
- int sc_hscx_version; /* version number of HSCX */
- int sc_ipac_version; /* version number of IPAC */
-
- int sc_I430state; /* I.430 state F3 .... F8 */
-
- int sc_I430T3; /* I.430 Timer T3 running */
-
- struct callout_handle sc_T3_callout;
-
- int sc_I430T4; /* Timer T4 running */
-
- struct callout_handle sc_T4_callout;
-
- /*
- * byte fields for the AVM Fritz!Card PCI. These are packed into
- * a u_int in the driver.
- */
- u_char avma1pp_cmd;
- u_char avma1pp_txl;
- u_char avma1pp_prot;
-
- int sc_enabled; /* daemon is running */
-
- int sc_ipac; /* flag, running on ipac */
- int sc_bfifolen; /* length of b channel fifos */
-
-#define ISIC_WHAT_ISAC 0
-#define ISIC_WHAT_HSCXA 1
-#define ISIC_WHAT_HSCXB 2
-#define ISIC_WHAT_IPAC 3
-
- u_int8_t (*readreg) (struct l1_softc *sc, int what, bus_size_t offs);
- void (*writereg) (struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data);
- void (*readfifo) (struct l1_softc *sc, int what, void *buf, size_t size);
- void (*writefifo) (struct l1_softc *sc, int what, void *data, size_t size);
- void (*clearirq) (struct l1_softc *sc);
-
-#define ISAC_READ(r) (*sc->readreg)(sc, ISIC_WHAT_ISAC, (r))
-#define ISAC_WRITE(r,v) (*sc->writereg)(sc, ISIC_WHAT_ISAC, (r), (v))
-#define ISAC_RDFIFO(b,s) (*sc->readfifo)(sc, ISIC_WHAT_ISAC, (b), (s))
-#define ISAC_WRFIFO(b,s) (*sc->writefifo)(sc, ISIC_WHAT_ISAC, (b), (s))
-
-#define HSCX_READ(n,r) (*sc->readreg)(sc, ISIC_WHAT_HSCXA+(n), (r))
-#define HSCX_WRITE(n,r,v) (*sc->writereg)(sc, ISIC_WHAT_HSCXA+(n), (r), (v))
-#define HSCX_RDFIFO(n,b,s) (*sc->readfifo)(sc, ISIC_WHAT_HSCXA+(n), (b), (s))
-#define HSCX_WRFIFO(n,b,s) (*sc->writefifo)(sc, ISIC_WHAT_HSCXA+(n), (b), (s))
-
-#define IPAC_READ(r) (*sc->readreg)(sc, ISIC_WHAT_IPAC, (r))
-#define IPAC_WRITE(r, v) (*sc->writereg)(sc, ISIC_WHAT_IPAC, (r), (v))
-};
-
-/*---------------------------------------------------------------------------*
- * possible I.430/ISAC states
- *---------------------------------------------------------------------------*/
-enum I430states {
- ST_F3, /* F3 Deactivated */
- ST_F4, /* F4 Awaiting Signal */
- ST_F5, /* F5 Identifying Input */
- ST_F6, /* F6 Synchronized */
- ST_F7, /* F7 Activated */
- ST_F8, /* F8 Lost Framing */
- ST_ILL, /* Illegal State */
- N_STATES
-};
-
-/*---------------------------------------------------------------------------*
- * possible I.430/ISAC events
- *---------------------------------------------------------------------------*/
-enum I430events {
- EV_PHAR, /* PH ACTIVATE REQUEST */
- EV_T3, /* Timer 3 expired */
- EV_INFO0, /* receiving INFO0 */
- EV_RSY, /* receiving any signal */
- EV_INFO2, /* receiving INFO2 */
- EV_INFO48, /* receiving INFO4 pri 8/9 */
- EV_INFO410, /* receiving INFO4 pri 10/11 */
- EV_DR, /* Deactivate Request */
- EV_PU, /* Power UP */
- EV_DIS, /* Disconnected (only 2085) */
- EV_EI, /* Error Indication */
- EV_ILL, /* Illegal Event */
- N_EVENTS
-};
-
-enum I430commands {
- CMD_TIM, /* Timing */
- CMD_RS, /* Reset */
- CMD_AR8, /* Activation request pri 8 */
- CMD_AR10, /* Activation request pri 10 */
- CMD_DIU, /* Deactivate Indication Upstream */
- CMD_ILL /* Illegal command */
-};
-
-#define N_COMMANDS CMD_ILL
-
-extern struct l1_softc l1_sc[];
-
-extern void isicintr(struct l1_softc *sc);
-extern int isic_attach_common(device_t dev);
-extern void isic_detach_common(device_t dev);
-extern void isic_recover(struct l1_softc *sc);
-
-extern void isic_bchannel_setup (int unit, int hscx_channel, int bprot, int activate );
-
-extern void isic_init_linktab ( struct l1_softc *sc );
-extern int isic_isac_init ( struct l1_softc *sc );
-extern void isic_isac_irq ( struct l1_softc *sc, int r );
-extern void isic_isac_l1_cmd ( struct l1_softc *sc, int command );
-extern void isic_next_state ( struct l1_softc *sc, int event );
-extern char *isic_printstate ( struct l1_softc *sc );
-
-extern int isic_hscx_fifo(l1_bchan_state_t *, struct l1_softc *);
-extern void isic_hscx_init ( struct l1_softc *sc, int hscx_channel, int activate );
-extern void isic_hscx_irq ( struct l1_softc *sc, u_char ista, int hscx_channel, u_char ex_irq );
-extern int isic_hscx_silence ( unsigned char *data, int len );
-extern void isic_hscx_cmd( struct l1_softc *sc, int h_chan, unsigned char cmd );
-extern void isic_hscx_waitxfw( struct l1_softc *sc, int h_chan );
-
-extern int isic_probe_s016 (device_t dev);
-extern int isic_attach_s016 (device_t dev);
-
-extern int isic_probe_s08 (device_t dev);
-extern int isic_attach_s08 (device_t dev);
-
-extern int isic_probe_Epcc16 (device_t dev);
-extern int isic_attach_Epcc16 (device_t dev);
-
-extern int isic_probe_s0163 (device_t dev);
-extern int isic_attach_s0163 (device_t dev);
-
-extern int isic_probe_avma1 (device_t dev);
-extern int isic_attach_avma1 (device_t dev);
-
-extern int isic_probe_usrtai (device_t dev);
-extern int isic_attach_usrtai (device_t dev);
-
-extern int isic_probe_itkix1 (device_t dev);
-extern int isic_attach_itkix1 (device_t dev);
-
-extern int isic_attach_drnngo (device_t dev);
-extern int isic_attach_Cs0P (device_t dev);
-extern int isic_attach_Eqs1pi(device_t dev);
-extern int isic_attach_sws(device_t dev);
-extern int isic_attach_siemens_isurf(device_t dev);
-extern int isic_attach_asi(device_t dev);
-extern int isic_attach_Dyn(device_t dev);
-extern int isic_attach_diva(device_t dev);
-extern int isic_attach_diva_ipac(device_t dev);
-
-#endif /* _I4B_ISIC_H_ */
diff --git a/sys/i4b/layer1/isic/i4b_isic_ext.h b/sys/i4b/layer1/isic/i4b_isic_ext.h
deleted file mode 100644
index ba5ae4cc7594..000000000000
--- a/sys/i4b/layer1/isic/i4b_isic_ext.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------*
- *
- * i4b_l1.h - isdn4bsd layer 1 header file
- * ---------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:11:12 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_ISIC_EXT_H_
-#define _I4B_ISIC_EXT_H_
-
-#include <i4b/include/i4b_l3l4.h>
-
-int isic_ph_data_req(int unit, struct mbuf *m, int freeflag);
-int isic_ph_activate_req(int unit);
-int isic_mph_command_req(int unit, int command, void *parm);
-
-void isic_set_linktab(int unit, int channel, drvr_link_t *dlt);
-isdn_link_t *isic_ret_linktab(int unit, int channel);
-
-#endif /* _I4B_ISIC_H_ */
diff --git a/sys/i4b/layer1/isic/i4b_isic_isa.c b/sys/i4b/layer1/isic/i4b_isic_isa.c
deleted file mode 100644
index 87c9f0477cd5..000000000000
--- a/sys/i4b/layer1/isic/i4b_isic_isa.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_isic_isa.c - ISA bus interface
- * ==================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:30:19 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if NISIC > 0
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-
-#include <sys/bus.h>
-#include <isa/isavar.h>
-
-struct l1_softc l1_sc[ISIC_MAXUNIT];
-
-static int isic_isa_probe(device_t dev);
-static int isic_isa_attach(device_t dev);
-
-static device_method_t isic_methods[] = {
- DEVMETHOD(device_probe, isic_isa_probe),
- DEVMETHOD(device_attach, isic_isa_attach),
- { 0, 0 }
-};
-
-static driver_t isic_driver = {
- "isic",
- isic_methods,
- 0
-};
-
-static devclass_t isic_devclass;
-
-DRIVER_MODULE(isic, isa, isic_driver, isic_devclass, 0, 0);
-
-/*---------------------------------------------------------------------------*
- * probe for ISA non-PnP cards
- *---------------------------------------------------------------------------*/
-static int
-isic_isa_probe(device_t dev)
-{
- int ret = ENXIO;
-
- if(isa_get_vendorid(dev)) /* no PnP probes here */
- return ENXIO;
-
- switch(device_get_flags(dev))
- {
-#ifdef TEL_S0_16
- case CARD_TYPEP_16:
- ret = isic_probe_s016(dev);
- break;
-#endif
-
-#ifdef TEL_S0_8
- case CARD_TYPEP_8:
- ret = isic_probe_s08(dev);
- break;
-#endif
-
-#ifdef ELSA_PCC16
- case CARD_TYPEP_PCC16:
- ret = isic_probe_Epcc16(dev);
- break;
-#endif
-
-#ifdef TEL_S0_16_3
- case CARD_TYPEP_16_3:
- ret = isic_probe_s0163(dev);
- break;
-#endif
-
-#ifdef AVM_A1
- case CARD_TYPEP_AVMA1:
- ret = isic_probe_avma1(dev);
- break;
-#endif
-
-#ifdef USR_STI
- case CARD_TYPEP_USRTA:
- ret = isic_probe_usrtai(dev);
- break;
-#endif
-
-#ifdef ITKIX1
- case CARD_TYPEP_ITKIX1:
- ret = isic_probe_itkix1(dev);
- break;
-#endif
-
- default:
- printf("isic%d: probe, unknown flag: %d\n",
- device_get_unit(dev), device_get_flags(dev));
- break;
- }
- return(ret);
-}
-
-/*---------------------------------------------------------------------------*
- * attach for ISA non-PnP cards
- *---------------------------------------------------------------------------*/
-static int
-isic_isa_attach(device_t dev)
-{
- int ret = ENXIO;
-
- struct l1_softc *sc = &l1_sc[device_get_unit(dev)];
-
- sc->sc_unit = device_get_unit(dev);
-
- /* card dependent setup */
-
- switch(sc->sc_cardtyp)
- {
-#ifdef TEL_S0_16
- case CARD_TYPEP_16:
- ret = isic_attach_s016(dev);
- break;
-#endif
-
-#ifdef TEL_S0_8
- case CARD_TYPEP_8:
- ret = isic_attach_s08(dev);
- break;
-#endif
-
-#ifdef ELSA_PCC16
- case CARD_TYPEP_PCC16:
- ret = isic_attach_Epcc16(dev);
- break;
-#endif
-
-#ifdef TEL_S0_16_3
- case CARD_TYPEP_16_3:
- ret = isic_attach_s0163(dev);
- break;
-#endif
-
-#ifdef AVM_A1
- case CARD_TYPEP_AVMA1:
- ret = isic_attach_avma1(dev);
- break;
-#endif
-
-#ifdef USR_STI
- case CARD_TYPEP_USRTA:
- ret = isic_attach_usrtai(dev);
- break;
-#endif
-
-#ifdef ITKIX1
- case CARD_TYPEP_ITKIX1:
- ret = isic_attach_itkix1(dev);
- break;
-#endif
-
- default:
- printf("isic%d: attach, unknown flag: %d\n",
- device_get_unit(dev), device_get_flags(dev));
- break;
- }
-
- if(ret)
- return(ret);
-
- ret = isic_attach_common(dev);
-
- return(ret);
-}
-#endif /* NISIC > 0 */
diff --git a/sys/i4b/layer1/isic/i4b_isic_pnp.c b/sys/i4b/layer1/isic/i4b_isic_pnp.c
deleted file mode 100644
index e02878d31a96..000000000000
--- a/sys/i4b/layer1/isic/i4b_isic_pnp.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright (c) 1998 Eivind Eklund. All rights reserved.
- *
- * Copyright (c) 1998, 1999 German Tischler. All rights reserved.
- *
- * Copyright (c) 1998, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_isic_pnp.c - i4b pnp support
- * --------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Fri Jan 26 14:01:04 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if (NISIC > 0)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-
-#include <isa/isavar.h>
-
-#define VID_TEL163PNP 0x10212750 /* Teles 16.3 PnP */
-#define VID_CREATIXPP 0x0000980e /* Creatix S0/16 P+P */
-#define VID_DYNALINK 0x88167506 /* Dynalink */
-#define VID_SEDLBAUER 0x0100274c /* Sedlbauer WinSpeed */
-#define VID_NICCYGO 0x5001814c /* Neuhaus Niccy GO@ */
-#define VID_ELSAQS1P 0x33019315 /* ELSA Quickstep1000pro*/
-#define VID_ITK0025 0x25008b26 /* ITK Ix1 Micro V3 */
-#define VID_AVMPNP 0x0009cd06 /* AVM Fritz! PnP */
-#define VID_SIESURF2 0x2000254d /* Siemens I-Surf 2.0 PnP*/
-#define VID_ASUSCOM_IPAC 0x90167506 /* Asuscom (with IPAC) */
-#define VID_EICON_DIVA_20 0x7100891c /* Eicon DIVA 2.0 ISAC/HSCX */
-#define VID_EICON_DIVA_202 0xa100891c /* Eicon DIVA 2.02 IPAC */
-
-static struct isic_pnp_ids {
- u_long vend_id;
- char *id_str;
-} isic_pnp_ids[] = {
-#if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P)
- { VID_TEL163PNP, "Teles S0/16.3 PnP" },
- { VID_CREATIXPP, "Creatix S0/16 PnP" },
-#endif
-#ifdef DYNALINK
- { VID_DYNALINK, "Dynalink IS64PH" },
-#endif
-#ifdef SEDLBAUER
- { VID_SEDLBAUER, "Sedlbauer WinSpeed" },
-#endif
-#ifdef DRN_NGO
- { VID_NICCYGO, "Dr.Neuhaus Niccy Go@" },
-#endif
-#ifdef ELSA_QS1ISA
- { VID_ELSAQS1P, "ELSA QuickStep 1000pro" },
-#endif
-#ifdef ITKIX1
- { VID_ITK0025, "ITK ix1 Micro V3.0" },
-#endif
-#ifdef AVM_PNP
- { VID_AVMPNP, "AVM Fritz!Card PnP" },
-#endif
-#ifdef SIEMENS_ISURF2
- { VID_SIESURF2, "Siemens I-Surf 2.0 PnP" },
-#endif
-#ifdef ASUSCOM_IPAC
- { VID_ASUSCOM_IPAC, "Asuscom ISDNLink 128 PnP" },
-#endif
-#ifdef EICON_DIVA
- { VID_EICON_DIVA_20, "Eicon.Diehl DIVA 2.0 ISA PnP" },
- { VID_EICON_DIVA_202, "Eicon.Diehl DIVA 2.02 ISA PnP" },
-#endif
- { 0, 0 }
-};
-
-static int isic_pnp_probe(device_t dev);
-static int isic_pnp_attach(device_t dev);
-
-static device_method_t isic_pnp_methods[] = {
- DEVMETHOD(device_probe, isic_pnp_probe),
- DEVMETHOD(device_attach, isic_pnp_attach),
- { 0, 0 }
-};
-
-static driver_t isic_pnp_driver = {
- "isic",
- isic_pnp_methods,
- 0,
-};
-
-static devclass_t isic_devclass;
-
-DRIVER_MODULE(isicpnp, isa, isic_pnp_driver, isic_devclass, 0, 0);
-
-/*---------------------------------------------------------------------------*
- * probe for ISA PnP cards
- *---------------------------------------------------------------------------*/
-int
-isic_pnp_probe(device_t dev)
-{
- struct isic_pnp_ids *ids; /* pnp id's */
- char *string = NULL; /* the name */
- u_int32_t vend_id = isa_get_vendorid(dev); /* vendor id */
-
- /* search table of knowd id's */
-
- for(ids = isic_pnp_ids; ids->vend_id != 0; ids++)
- {
- if(vend_id == ids->vend_id)
- {
- string = ids->id_str;
- break;
- }
- }
-
- if(string) /* set name if we have one */
- {
- device_set_desc(dev, string); /* set description */
- return 0;
- }
- else
- {
- return ENXIO;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * attach for ISA PnP cards
- *---------------------------------------------------------------------------*/
-int
-isic_pnp_attach(device_t dev)
-{
- u_int32_t vend_id = isa_get_vendorid(dev); /* vendor id */
- unsigned int unit = device_get_unit(dev); /* get unit */
- const char *name = device_get_desc(dev); /* get description */
- struct l1_softc *sc = 0; /* softc */
- void *ih = 0; /* a dummy */
- int ret;
-
- /* see if we are out of bounds */
-
- if(unit >= ISIC_MAXUNIT)
- {
- printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for %s\n", unit, unit, name);
- return ENXIO;
- }
-
- /* get information structure for this unit */
-
- sc = &l1_sc[unit];
-
- /* get io_base */
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0UL, ~0UL, 1, RF_ACTIVE ) ))
- {
- printf("isic_pnp_attach: Couldn't get my io_base.\n");
- return ENXIO;
- }
-
- /* will not be used for pnp devices */
-
- sc->sc_port = rman_get_start(sc->sc_resources.io_base[0]);
-
- /* get irq, release io_base if we don't get it */
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0UL, ~0UL, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get irq.\n",unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* not needed */
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
-
-
- /* set flag so we know what this card is */
-
- ret = ENXIO;
-
- switch(vend_id)
- {
-#if defined(TEL_S0_16_3_P) || defined(CRTX_S0_P)
- case VID_TEL163PNP:
- sc->sc_cardtyp = CARD_TYPEP_163P;
- ret = isic_attach_Cs0P(dev);
- break;
-
- case VID_CREATIXPP:
- sc->sc_cardtyp = CARD_TYPEP_CS0P;
- ret = isic_attach_Cs0P(dev);
- break;
-#endif
-#ifdef DYNALINK
- case VID_DYNALINK:
- sc->sc_cardtyp = CARD_TYPEP_DYNALINK;
- ret = isic_attach_Dyn(dev);
- break;
-#endif
-#ifdef SEDLBAUER
- case VID_SEDLBAUER:
- sc->sc_cardtyp = CARD_TYPEP_SWS;
- ret = isic_attach_sws(dev);
- break;
-#endif
-#ifdef DRN_NGO
- case VID_NICCYGO:
- sc->sc_cardtyp = CARD_TYPEP_DRNNGO;
- ret = isic_attach_drnngo(dev);
- break;
-#endif
-#ifdef ELSA_QS1ISA
- case VID_ELSAQS1P:
- sc->sc_cardtyp = CARD_TYPEP_ELSAQS1ISA;
- ret = isic_attach_Eqs1pi(dev);
- break;
-#endif
-#ifdef ITKIX1
- case VID_ITK0025:
- sc->sc_cardtyp = CARD_TYPEP_ITKIX1;
- ret = isic_attach_itkix1(dev);
- break;
-#endif
-#ifdef SIEMENS_ISURF2
- case VID_SIESURF2:
- sc->sc_cardtyp = CARD_TYPEP_SIE_ISURF2;
- ret = isic_attach_siemens_isurf(dev);
- break;
-#endif
-#ifdef ASUSCOM_IPAC
- case VID_ASUSCOM_IPAC:
- sc->sc_cardtyp = CARD_TYPEP_ASUSCOMIPAC;
- ret = isic_attach_asi(dev);
- break;
-#endif
-#ifdef EICON_DIVA
- case VID_EICON_DIVA_20:
- sc->sc_cardtyp = CARD_TYPEP_DIVA_ISA;
- ret = isic_attach_diva(dev);
- break;
-
- case VID_EICON_DIVA_202:
- sc->sc_cardtyp = CARD_TYPEP_DIVA_ISA;
- ret = isic_attach_diva_ipac(dev);
- break;
-#endif
- default:
- printf("isic%d: Error, no driver for %s\n", unit, name);
- ret = ENXIO;
- break;
- }
-
- if(ret)
- {
- isic_detach_common(dev);
- return ENXIO;
- }
-
- if(isic_attach_common(dev))
- {
- /* unset flag */
- sc->sc_cardtyp = CARD_TYPEP_UNK;
-
- /* free irq here, it hasn't been attached yet */
- bus_release_resource(dev,SYS_RES_IRQ,sc->sc_resources.irq_rid,
- sc->sc_resources.irq);
- sc->sc_resources.irq = 0;
- isic_detach_common(dev);
- return ENXIO;
- }
- else
- {
- /* setup intr routine */
- bus_setup_intr(dev,sc->sc_resources.irq,INTR_TYPE_NET,
- (void(*)(void*))isicintr,
- sc,&ih);
- return 0;
- }
-}
-#endif /* (NISIC > 0) */
diff --git a/sys/i4b/layer1/isic/i4b_itk_ix1.c b/sys/i4b/layer1/isic/i4b_itk_ix1.c
deleted file mode 100644
index 71307736cd7a..000000000000
--- a/sys/i4b/layer1/isic/i4b_itk_ix1.c
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * Copyright (c) 1998, 1999 Martin Husemann <martin@rumolt.teuto.de>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_itk_ix1.c - ITK ix1 micro passive card driver for isdn4bsd
- * --------------------------------------------------------------
- *
- * last edit-date: [Wed Jan 24 09:27:06 2001]
- *
- * $FreeBSD$
- *
- *---------------------------------------------------------------------------
- *
- * The ITK ix1 micro ISDN card is an ISA card with one region
- * of four io ports mapped and a fixed irq all jumpered on the card.
- * Access to the board is straight forward and simmilar to
- * the ELSA and DYNALINK cards. If a PCI version of this card
- * exists all we need is probably a pci-bus attachment, all
- * this low level routines should work imediately.
- *
- * To reset the card:
- * - write 0x01 to ITK_CONFIG
- * - wait >= 10 ms
- * - write 0x00 to ITK_CONFIG
- *
- * To read or write data:
- * - write address to ITK_ALE port
- * - read data from or write data to ITK_ISAC_DATA port or ITK_HSCX_DATA port
- * The two HSCX channel registers are offset by HSCXA (0x00) and HSCXB (0x40).
- *
- * The probe routine was derived by trial and error from a representative
- * sample of two cards ;-) The standard way (checking HSCX versions)
- * was extended by reading a zero from a non existant HSCX register (register
- * 0xff). Reading the config register gives varying results, so this doesn't
- * seem to be used as an id register (like the Teles S0/16.3).
- *
- * If the probe fails for your card use "options ITK_PROBE_DEBUG" to get
- * additional debug output.
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if NISIC > 0 && defined(ITKIX1)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-/* Register offsets */
-#define ITK_ISAC_DATA 0
-#define ITK_HSCX_DATA 1
-#define ITK_ALE 2
-#define ITK_CONFIG 3
-
-/* Size of IO range to allocate for this card */
-#define ITK_IO_SIZE 4
-
-/* Register offsets for the two HSCX channels */
-#define HSCXA 0
-#define HSCXB 0x40
-
-static void
-itkix1_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
- switch (what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ITK_ALE, 0);
- bus_space_read_multi_1(t, h, ITK_ISAC_DATA, buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ITK_ALE, HSCXA);
- bus_space_read_multi_1(t, h, ITK_HSCX_DATA, buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ITK_ALE, HSCXB);
- bus_space_read_multi_1(t, h, ITK_HSCX_DATA, buf, size);
- break;
- }
-}
-
-static void
-itkix1_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
- switch (what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ITK_ALE, 0);
- bus_space_write_multi_1(t, h, ITK_ISAC_DATA, (u_int8_t*)buf, size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ITK_ALE, HSCXA);
- bus_space_write_multi_1(t, h, ITK_HSCX_DATA, (u_int8_t*)buf, size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ITK_ALE, HSCXB);
- bus_space_write_multi_1(t, h, ITK_HSCX_DATA, (u_int8_t*)buf, size);
- break;
- }
-}
-
-static void
-itkix1_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
- switch (what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ITK_ALE, offs);
- bus_space_write_1(t, h, ITK_ISAC_DATA, data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ITK_ALE, HSCXA+offs);
- bus_space_write_1(t, h, ITK_HSCX_DATA, data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ITK_ALE, HSCXB+offs);
- bus_space_write_1(t, h, ITK_HSCX_DATA, data);
- break;
- }
-}
-
-static u_int8_t
-itkix1_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
- switch (what)
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t, h, ITK_ALE, offs);
- return bus_space_read_1(t, h, ITK_ISAC_DATA);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t, h, ITK_ALE, HSCXA+offs);
- return bus_space_read_1(t, h, ITK_HSCX_DATA);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t, h, ITK_ALE, HSCXB+offs);
- return bus_space_read_1(t, h, ITK_HSCX_DATA);
- }
- return 0;
-}
-
-/*
- * Probe for card
- */
-int
-isic_probe_itkix1(device_t dev)
-{
- size_t unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = 0; /* softc */
- void *ih = 0; /* dummy */
- bus_space_tag_t t; /* bus things */
- bus_space_handle_t h;
- u_int8_t hd, hv1, hv2, saveale;
- int ret;
-
- #if defined(ITK_PROBE_DEBUG)
- printf("Checking unit %u\n", unit);
- #endif
-
- /* check max unit range */
- if(unit >= ISIC_MAXUNIT)
- {
- printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for ITK IX1!\n",
- unit, unit);
- return ENXIO;
- }
-
- sc = &l1_sc[unit]; /* get pointer to softc */
- sc->sc_unit = unit; /* set unit */
-
- #if defined(ITK_PROBE_DEBUG)
- printf("Allocating io base...");
- #endif
-
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not allocate i/o port for ITK IX1.\n", unit);
- return ENXIO;
- }
-
- #if defined(ITK_PROBE_DEBUG)
- printf("done.\n");
- #endif
-
- sc->sc_port = rman_get_start(sc->sc_resources.io_base[0]);
- t = rman_get_bustag(sc->sc_resources.io_base[0]);
- h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- #if defined(ITK_PROBE_DEBUG)
- printf("Allocating irq...");
- #endif
-
- /* get our irq */
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not allocate irq for ITK IX1.\n", unit);
- bus_release_resource(dev,SYS_RES_IOPORT,
- sc->sc_resources.io_rid[0],
- sc->sc_resources.io_base[0]);
- return ENXIO;
- }
-
- #if defined(ITK_PROBE_DEBUG)
- printf("done.\n");
- #endif
-
- /* get the irq number */
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
-
- #if defined(ITK_PROBE_DEBUG)
- printf("Setting up access routines...");
- #endif
-
- /* setup access routines */
- sc->clearirq = NULL;
- sc->readreg = itkix1_read_reg;
- sc->writereg = itkix1_write_reg;
- sc->readfifo = itkix1_read_fifo;
- sc->writefifo = itkix1_write_fifo;
-
- /* setup card type */
- sc->sc_cardtyp = CARD_TYPEP_ITKIX1;
-
- /* setup IOM bus type */
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- #if defined(ITK_PROBE_DEBUG)
- printf("done.\n");
- #endif
-
- /* register interupt routine */
-
- #if defined(ITK_PROBE_DEBUG)
- printf("Setting up access interupt...");
- #endif
-
- bus_setup_intr(dev, sc->sc_resources.irq,
- INTR_TYPE_NET,
- (void(*)(void *))(isicintr),
- sc, &ih);
-
- #if defined(ITK_PROBE_DEBUG)
- printf("done.\n");
-
- printf("Doing probe stuff...");
- #endif
-
- /* save old value of this port, we're stomping over it */
- saveale = bus_space_read_1(t, h, ITK_ALE);
-
- /* select invalid register */
- bus_space_write_1(t, h, ITK_ALE, 0xff);
- /* get HSCX data for this non existent register */
- hd = bus_space_read_1(t, h, ITK_HSCX_DATA);
- /* get HSCX version info */
- bus_space_write_1(t, h, ITK_ALE, HSCXA + H_VSTR);
- hv1 = bus_space_read_1(t, h, ITK_HSCX_DATA);
- bus_space_write_1(t, h, ITK_ALE, HSCXB + H_VSTR);
- hv2 = bus_space_read_1(t, h, ITK_HSCX_DATA);
-
- ret = (hd == 0) && ((hv1 & 0x0f) == 0x05) && ((hv2 & 0x0f) == 0x05);
- /* succeed if version bits are OK and we got a zero from the
- * non existent register. we found verison 0x05 and 0x04
- * out there... */
- ret = (hd == 0)
- && (((hv1 & 0x0f) == 0x05) || ((hv1 & 0x0f) == 0x04))
- && (((hv2 & 0x0f) == 0x05) || ((hv2 & 0x0f) == 0x04));
-
- /* retstore save value if we fail (if we succeed the old value
- * has no meaning) */
- if (!ret)
- bus_space_write_1(t, h, ITK_ALE, saveale);
-
- #if defined(ITK_PROBE_DEBUG)
- printf("done.\n");
-
- printf("Doing second probe stuff...");
- #endif
-
- hv1 = HSCX_READ(0, H_VSTR) & 0xf;
- hv2 = HSCX_READ(1, H_VSTR) & 0xf;
- /* Read HSCX A/B VSTR. Expected value is 0x05 (V2.1) or 0x04 (V2.0). */
- if((hv1 != 0x05 && hv1 != 0x04) || (hv2 != 0x05 && hv2 != 0x04))
- {
- printf("isic%d: HSCX VSTR test failed for ITK ix1 micro\n",
- unit);
- printf("isic%d: HSC0: VSTR: %#x\n",
- unit, HSCX_READ(0, H_VSTR));
- printf("isic%d: HSC1: VSTR: %#x\n",
- unit, HSCX_READ(1, H_VSTR));
- isic_detach_common(dev);
- return ENXIO;
- }
-
- #if defined(ITK_PROBE_DEBUG)
- printf("done.\n");
- #endif
-
-#if defined(ITK_PROBE_DEBUG)
- printf("\nITK ix1 micro probe: hscx = 0x%02x, v1 = 0x%02x, v2 = 0x%02x, would have %s\n",
- hd, hv1, hv2, ret ? "succeeded" : "failed");
- isic_detach_common(dev);
- return ENXIO;
-#else
- if ( ret )
- {
- return 0;
- }
- else
- {
- isic_detach_common(dev);
- return ENXIO;
- }
-#endif
-}
-
-/*
- * Attach card
- */
-int
-isic_attach_itkix1(device_t dev)
-{
- size_t unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = &l1_sc[unit];
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- /* setup access routines */
- sc->clearirq = NULL;
- sc->readreg = itkix1_read_reg;
- sc->writereg = itkix1_write_reg;
- sc->readfifo = itkix1_read_fifo;
- sc->writefifo = itkix1_write_fifo;
-
- /* setup card type */
- sc->sc_cardtyp = CARD_TYPEP_ITKIX1;
-
- /* setup IOM bus type */
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- bus_space_write_1(t, h, ITK_CONFIG, 1);
- DELAY(SEC_DELAY / 10);
- bus_space_write_1(t, h, ITK_CONFIG, 0);
- DELAY(SEC_DELAY / 10);
-
- return 0;
-}
-
-#endif /* ITKIX1 */
diff --git a/sys/i4b/layer1/isic/i4b_l1.c b/sys/i4b/layer1/isic/i4b_l1.c
deleted file mode 100644
index d68a480b2281..000000000000
--- a/sys/i4b/layer1/isic/i4b_l1.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_l1.c - isdn4bsd layer 1 handler
- * -----------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:12:03 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-
-#if NISIC > 0
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_mbuf.h>
-#include <i4b/include/i4b_global.h>
-
-/*---------------------------------------------------------------------------*
- *
- * L2 -> L1: PH-DATA-REQUEST
- * =========================
- *
- * parms:
- * unit physical interface unit number
- * m mbuf containing L2 frame to be sent out
- * freeflag MBUF_FREE: free mbuf here after having sent
- * it out
- * MBUF_DONTFREE: mbuf is freed by Layer 2
- * returns:
- * ==0 fail, nothing sent out
- * !=0 ok, frame sent out
- *
- *---------------------------------------------------------------------------*/
-int
-isic_ph_data_req(int unit, struct mbuf *m, int freeflag)
-{
- u_char cmd;
- int s;
- struct l1_softc *sc = &l1_sc[unit];
-
-#ifdef NOTDEF
- NDBGL1(L1_PRIM, "unit %d, freeflag=%d", unit, freeflag);
-#endif
-
- if(m == NULL) /* failsafe */
- return (0);
-
- s = SPLI4B();
-
- if(sc->sc_I430state == ST_F3) /* layer 1 not running ? */
- {
- NDBGL1(L1_I_ERR, "still in state F3!");
- isic_ph_activate_req(unit);
- }
-
- if(sc->sc_state & ISAC_TX_ACTIVE)
- {
- if(sc->sc_obuf2 == NULL)
- {
- sc->sc_obuf2 = m; /* save mbuf ptr */
-
- if(freeflag)
- sc->sc_freeflag2 = 1; /* IRQ must mfree */
- else
- sc->sc_freeflag2 = 0; /* IRQ must not mfree */
-
- NDBGL1(L1_I_MSG, "using 2nd ISAC TX buffer, state = %s", isic_printstate(sc));
-
- if(sc->sc_trace & TRACE_D_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ISICUNIT(unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
- splx(s);
- return(1);
- }
-
- NDBGL1(L1_I_ERR, "No Space in TX FIFO, state = %s", isic_printstate(sc));
-
- if(freeflag == MBUF_FREE)
- i4b_Dfreembuf(m);
-
- splx(s);
- return (0);
- }
-
- if(sc->sc_trace & TRACE_D_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ISICUNIT(unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
-
- sc->sc_state |= ISAC_TX_ACTIVE; /* set transmitter busy flag */
-
- NDBGL1(L1_I_MSG, "ISAC_TX_ACTIVE set");
-
- sc->sc_freeflag = 0; /* IRQ must NOT mfree */
-
- ISAC_WRFIFO(m->m_data, min(m->m_len, ISAC_FIFO_LEN)); /* output to TX fifo */
-
- if(m->m_len > ISAC_FIFO_LEN) /* message > 32 bytes ? */
- {
- sc->sc_obuf = m; /* save mbuf ptr */
- sc->sc_op = m->m_data + ISAC_FIFO_LEN; /* ptr for irq hdl */
- sc->sc_ol = m->m_len - ISAC_FIFO_LEN; /* length for irq hdl */
-
- if(freeflag)
- sc->sc_freeflag = 1; /* IRQ must mfree */
-
- cmd = ISAC_CMDR_XTF;
- }
- else
- {
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
-
- if(freeflag)
- i4b_Dfreembuf(m);
-
- cmd = ISAC_CMDR_XTF | ISAC_CMDR_XME;
- }
-
- ISAC_WRITE(I_CMDR, cmd);
- ISACCMDRWRDELAY();
-
- splx(s);
-
- return(1);
-}
-
-/*---------------------------------------------------------------------------*
- *
- * L2 -> L1: PH-ACTIVATE-REQUEST
- * =============================
- *
- * parms:
- * unit physical interface unit number
- *
- * returns:
- * ==0
- * !=0
- *
- *---------------------------------------------------------------------------*/
-int
-isic_ph_activate_req(int unit)
-{
- struct l1_softc *sc = &l1_sc[unit];
- NDBGL1(L1_PRIM, "unit %d", unit);
- isic_next_state(sc, EV_PHAR);
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * command from the upper layers
- *---------------------------------------------------------------------------*/
-int
-isic_mph_command_req(int unit, int command, void *parm)
-{
- struct l1_softc *sc = &l1_sc[unit];
-
- switch(command)
- {
- case CMR_DOPEN: /* daemon running */
- NDBGL1(L1_PRIM, "unit %d, command = CMR_DOPEN", unit);
- sc->sc_enabled = 1;
- break;
-
- case CMR_DCLOSE: /* daemon not running */
- NDBGL1(L1_PRIM, "unit %d, command = CMR_DCLOSE", unit);
- sc->sc_enabled = 0;
- break;
-
- case CMR_SETTRACE:
- NDBGL1(L1_PRIM, "unit %d, command = CMR_SETTRACE, parm = %d", unit, (unsigned int)parm);
- sc->sc_trace = (unsigned int)parm;
- break;
-
- case CMR_GCST:
- {
- struct chipstat *cst;
- NDBGL1(L1_PRIM, "unit %d, command = CMR_GCST, parm = %d", unit, (unsigned int)parm);
- cst = (struct chipstat *)parm;
- cst->driver_type = L1DRVR_ISIC;
- cst->stats.hscxstat.unit = sc->sc_unit;
- cst->stats.hscxstat.chan = cst->driver_bchannel;
- cst->stats.hscxstat.vfr = sc->sc_chan[cst->driver_bchannel].stat_VFR;
- cst->stats.hscxstat.rdo = sc->sc_chan[cst->driver_bchannel].stat_RDO;
- cst->stats.hscxstat.crc = sc->sc_chan[cst->driver_bchannel].stat_CRC;
- cst->stats.hscxstat.rab = sc->sc_chan[cst->driver_bchannel].stat_RAB;
- cst->stats.hscxstat.xdu = sc->sc_chan[cst->driver_bchannel].stat_XDU;
- cst->stats.hscxstat.rfo = sc->sc_chan[cst->driver_bchannel].stat_RFO;
- break;
- }
- default:
- NDBGL1(L1_ERROR, "ERROR, unknown command = %d, unit = %d, parm = %d", command, unit, (unsigned int)parm);
- break;
- }
-
- return(0);
-}
-
-#endif /* NISIC > 0 */
diff --git a/sys/i4b/layer1/isic/i4b_l1fsm.c b/sys/i4b/layer1/isic/i4b_l1fsm.c
deleted file mode 100644
index 11c261d9e377..000000000000
--- a/sys/i4b/layer1/isic/i4b_l1fsm.c
+++ /dev/null
@@ -1,512 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_l1fsm.c - isdn4bsd layer 1 I.430 state machine
- * --------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:12:18 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-
-#if NISIC > 0
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_global.h>
-
-#include <i4b/include/i4b_mbuf.h>
-
-#if DO_I4B_DEBUG
-static char *state_text[N_STATES] = {
- "F3 Deactivated",
- "F4 Awaiting Signal",
- "F5 Identifying Input",
- "F6 Synchronized",
- "F7 Activated",
- "F8 Lost Framing",
- "Illegal State"
-};
-
-static char *event_text[N_EVENTS] = {
- "EV_PHAR PH_ACT_REQ",
- "EV_T3 Timer 3 expired",
- "EV_INFO0 INFO0 received",
- "EV_RSY Level Detected",
- "EV_INFO2 INFO2 received",
- "EV_INFO48 INFO4 received",
- "EV_INFO410 INFO4 received",
- "EV_DR Deactivate Req",
- "EV_PU Power UP",
- "EV_DIS Disconnected",
- "EV_EI Error Ind",
- "Illegal Event"
-};
-#endif
-
-/* Function prototypes */
-
-static void timer3_expired (struct l1_softc *sc);
-static void T3_start (struct l1_softc *sc);
-static void T3_stop (struct l1_softc *sc);
-static void F_T3ex (struct l1_softc *sc);
-static void timer4_expired (struct l1_softc *sc);
-static void T4_start (struct l1_softc *sc);
-static void T4_stop (struct l1_softc *sc);
-static void F_AI8 (struct l1_softc *sc);
-static void F_AI10 (struct l1_softc *sc);
-static void F_I01 (struct l1_softc *sc);
-static void F_I02 (struct l1_softc *sc);
-static void F_I03 (struct l1_softc *sc);
-static void F_I2 (struct l1_softc *sc);
-static void F_ill (struct l1_softc *sc);
-static void F_NULL (struct l1_softc *sc);
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 expire function
- *---------------------------------------------------------------------------*/
-static void
-timer3_expired(struct l1_softc *sc)
-{
- if(sc->sc_I430T3)
- {
- NDBGL1(L1_T_ERR, "state = %s", isic_printstate(sc));
- sc->sc_I430T3 = 0;
-
- /* XXX try some recovery here XXX */
-
- isic_recover(sc);
-
- sc->sc_init_tries++; /* increment retry count */
-
-/*XXX*/ if(sc->sc_init_tries > 4)
- {
- int s = SPLI4B();
-
- sc->sc_init_tries = 0;
-
- if(sc->sc_obuf2 != NULL)
- {
- i4b_Dfreembuf(sc->sc_obuf2);
- sc->sc_obuf2 = NULL;
- }
- if(sc->sc_obuf != NULL)
- {
- i4b_Dfreembuf(sc->sc_obuf);
- sc->sc_obuf = NULL;
- sc->sc_freeflag = 0;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
- }
-
- splx(s);
-
- i4b_l1_mph_status_ind(L0ISICUNIT(sc->sc_unit), STI_NOL1ACC, 0, NULL);
- }
-
- isic_next_state(sc, EV_T3);
- }
- else
- {
- NDBGL1(L1_T_ERR, "expired without starting it ....");
- }
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 start
- *---------------------------------------------------------------------------*/
-static void
-T3_start(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", isic_printstate(sc));
- sc->sc_I430T3 = 1;
- sc->sc_T3_callout = timeout((TIMEOUT_FUNC_T)timer3_expired,(struct l1_softc *)sc, 2*hz);
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 stop
- *---------------------------------------------------------------------------*/
-static void
-T3_stop(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", isic_printstate(sc));
-
- sc->sc_init_tries = 0; /* init connect retry count */
-
- if(sc->sc_I430T3)
- {
- sc->sc_I430T3 = 0;
- untimeout((TIMEOUT_FUNC_T)timer3_expired,(struct l1_softc *)sc, sc->sc_T3_callout);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 expiry
- *---------------------------------------------------------------------------*/
-static void
-F_T3ex(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_T3ex executing");
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0ISICUNIT(sc->sc_unit));
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 expire function
- *---------------------------------------------------------------------------*/
-static void
-timer4_expired(struct l1_softc *sc)
-{
- if(sc->sc_I430T4)
- {
- NDBGL1(L1_T_MSG, "state = %s", isic_printstate(sc));
- sc->sc_I430T4 = 0;
- i4b_l1_mph_status_ind(L0ISICUNIT(sc->sc_unit), STI_PDEACT, 0, NULL);
- }
- else
- {
- NDBGL1(L1_T_ERR, "expired without starting it ....");
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 start
- *---------------------------------------------------------------------------*/
-static void
-T4_start(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", isic_printstate(sc));
- sc->sc_I430T4 = 1;
- sc->sc_T4_callout = timeout((TIMEOUT_FUNC_T)timer4_expired,(struct l1_softc *)sc, hz);
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 stop
- *---------------------------------------------------------------------------*/
-static void
-T4_stop(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", isic_printstate(sc));
-
- if(sc->sc_I430T4)
- {
- sc->sc_I430T4 = 0;
- untimeout((TIMEOUT_FUNC_T)timer4_expired,(struct l1_softc *)sc, sc->sc_T4_callout);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received AI8
- *---------------------------------------------------------------------------*/
-static void
-F_AI8(struct l1_softc *sc)
-{
- T4_stop(sc);
-
- NDBGL1(L1_F_MSG, "FSM function F_AI8 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_activate_ind(L0ISICUNIT(sc->sc_unit));
-
- T3_stop(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO4_8;
-
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received AI10
- *---------------------------------------------------------------------------*/
-static void
-F_AI10(struct l1_softc *sc)
-{
- T4_stop(sc);
-
- NDBGL1(L1_F_MSG, "FSM function F_AI10 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_activate_ind(L0ISICUNIT(sc->sc_unit));
-
- T3_stop(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO4_10;
-
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in states F3 .. F5
- *---------------------------------------------------------------------------*/
-static void
-F_I01(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I01 executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in state F6
- *---------------------------------------------------------------------------*/
-static void
-F_I02(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I02 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0ISICUNIT(sc->sc_unit));
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in state F7 or F8
- *---------------------------------------------------------------------------*/
-static void
-F_I03(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I03 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0ISICUNIT(sc->sc_unit));
-
- T4_start(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: activate request
- *---------------------------------------------------------------------------*/
-static void
-F_AR(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_AR executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO1_8;
-
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_TE;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-
- isic_isac_l1_cmd(sc, CMD_AR8);
-
- T3_start(sc);
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO2
- *---------------------------------------------------------------------------*/
-static void
-F_I2(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I2 executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO2;
-
- hdr.unit = L0ISICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-
-}
-
-/*---------------------------------------------------------------------------*
- * illegal state default action
- *---------------------------------------------------------------------------*/
-static void
-F_ill(struct l1_softc *sc)
-{
- NDBGL1(L1_F_ERR, "FSM function F_ill executing");
-}
-
-/*---------------------------------------------------------------------------*
- * No action
- *---------------------------------------------------------------------------*/
-static void
-F_NULL(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_NULL executing");
-}
-
-
-/*---------------------------------------------------------------------------*
- * layer 1 state transition table
- *---------------------------------------------------------------------------*/
-struct isic_state_tab {
- void (*func) (struct l1_softc *sc); /* function to execute */
- int newstate; /* next state */
-} isic_state_tab[N_EVENTS][N_STATES] = {
-
-/* STATE: F3 F4 F5 F6 F7 F8 ILLEGAL STATE */
-/* -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
-/* EV_PHAR x*/ {{F_AR, ST_F4}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_ill, ST_ILL}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_T3 x*/ {{F_NULL, ST_F3}, {F_T3ex, ST_F3}, {F_T3ex, ST_F3}, {F_T3ex, ST_F3}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_INFO0 */ {{F_I01, ST_F3}, {F_I01, ST_F4}, {F_I01, ST_F5}, {F_I02, ST_F3}, {F_I03, ST_F3}, {F_I03, ST_F3}, {F_ill, ST_ILL}},
-/* EV_RSY x*/ {{F_NULL, ST_F3}, {F_NULL, ST_F5}, {F_NULL, ST_F5}, {F_NULL, ST_F8}, {F_NULL, ST_F8}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_INFO2 */ {{F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_ill, ST_ILL}},
-/* EV_INFO48*/ {{F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_NULL, ST_F7}, {F_AI8, ST_F7}, {F_ill, ST_ILL}},
-/* EV_INFO41*/ {{F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_NULL, ST_F7}, {F_AI10, ST_F7}, {F_ill, ST_ILL}},
-/* EV_DR */ {{F_NULL, ST_F3}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_PU */ {{F_NULL, ST_F3}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_DIS */ {{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}},
-/* EV_EI */ {{F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_ill, ST_ILL}},
-/* EV_ILL */ {{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}}
-};
-
-/*---------------------------------------------------------------------------*
- * event handler
- *---------------------------------------------------------------------------*/
-void
-isic_next_state(struct l1_softc *sc, int event)
-{
- int currstate, newstate;
-
- if(event >= N_EVENTS)
- panic("i4b_l1fsm.c: event >= N_EVENTS\n");
-
- currstate = sc->sc_I430state;
-
- if(currstate >= N_STATES)
- panic("i4b_l1fsm.c: currstate >= N_STATES\n");
-
- newstate = isic_state_tab[event][currstate].newstate;
-
- if(newstate >= N_STATES)
- panic("i4b_l1fsm.c: newstate >= N_STATES\n");
-
- NDBGL1(L1_F_MSG, "FSM event [%s]: [%s => %s]", event_text[event],
- state_text[currstate],
- state_text[newstate]);
-
- (*isic_state_tab[event][currstate].func)(sc);
-
- if(newstate == ST_ILL)
- {
- newstate = ST_F3;
- NDBGL1(L1_F_ERR, "FSM Illegal State ERROR, oldstate = %s, newstate = %s, event = %s!",
- state_text[currstate],
- state_text[newstate],
- event_text[event]);
- }
-
- sc->sc_I430state = newstate;
-}
-
-#if DO_I4B_DEBUG
-/*---------------------------------------------------------------------------*
- * return pointer to current state description
- *---------------------------------------------------------------------------*/
-char *
-isic_printstate(struct l1_softc *sc)
-{
- return((char *) state_text[sc->sc_I430state]);
-}
-#endif
-
-#endif /* NISIC > 0 */
-
diff --git a/sys/i4b/layer1/isic/i4b_siemens_isurf.c b/sys/i4b/layer1/isic/i4b_siemens_isurf.c
deleted file mode 100644
index d846d437503e..000000000000
--- a/sys/i4b/layer1/isic/i4b_siemens_isurf.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Udo Schweigert. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * Siemens I-Surf 2.0 PnP specific routines for isic driver
- * --------------------------------------------------------
- *
- * Based on ELSA Quickstep 1000pro PCI driver (i4b_elsa_qs1p.c)
- * In case of trouble please contact Udo Schweigert <ust@cert.siemens.de>
-
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:13:25 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if NISIC > 0 && defined(SIEMENS_ISURF2)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_ipac.h>
-
-/* masks for register encoded in base addr */
-
-#define SIE_ISURF_BASE_MASK 0x0ffff
-#define SIE_ISURF_OFF_MASK 0xf0000
-
-/* register id's to be encoded in base addr */
-
-#define SIE_ISURF_IDISAC 0x00000
-#define SIE_ISURF_IDHSCXA 0x10000
-#define SIE_ISURF_IDHSCXB 0x20000
-#define SIE_ISURF_IDIPAC 0x40000
-
-/* offsets from base address */
-
-#define SIE_ISURF_OFF_ALE 0x00
-#define SIE_ISURF_OFF_RW 0x01
-
-/*---------------------------------------------------------------------------*
- * Siemens I-Surf 2.0 PnP ISAC get fifo routine
- *---------------------------------------------------------------------------*/
-static void
-siemens_isurf_read_fifo(struct l1_softc *sc,int what,void *buf,size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,IPAC_ISAC_OFF);
- bus_space_read_multi_1(t,h,SIE_ISURF_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,IPAC_HSCXA_OFF);
- bus_space_read_multi_1(t,h,SIE_ISURF_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,IPAC_HSCXB_OFF);
- bus_space_read_multi_1(t,h,SIE_ISURF_OFF_RW,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Siemens I-Surf 2.0 PnP ISAC put fifo routine
- *---------------------------------------------------------------------------*/
-static void
-siemens_isurf_write_fifo(struct l1_softc *sc,int what,void *buf,size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,IPAC_ISAC_OFF);
- bus_space_write_multi_1(t,h,SIE_ISURF_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,IPAC_HSCXA_OFF);
- bus_space_write_multi_1(t,h,SIE_ISURF_OFF_RW,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,IPAC_HSCXB_OFF);
- bus_space_write_multi_1(t,h,SIE_ISURF_OFF_RW,buf,size);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Siemens I-Surf 2.0 PnP ISAC put register routine
- *---------------------------------------------------------------------------*/
-static void
-siemens_isurf_write_reg(struct l1_softc *sc,int what,bus_size_t reg,u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,reg+IPAC_ISAC_OFF);
- bus_space_write_1(t,h,SIE_ISURF_OFF_RW,data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,reg+IPAC_HSCXA_OFF);
- bus_space_write_1(t,h,SIE_ISURF_OFF_RW,data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,reg+IPAC_HSCXB_OFF);
- bus_space_write_1(t,h,SIE_ISURF_OFF_RW,data);
- break;
- case ISIC_WHAT_IPAC:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,reg+IPAC_IPAC_OFF);
- bus_space_write_1(t,h,SIE_ISURF_OFF_RW,data);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Siemens I-Surf 2.0 PnP ISAC get register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-siemens_isurf_read_reg(struct l1_softc *sc,int what,bus_size_t reg)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what )
- {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,reg+IPAC_ISAC_OFF);
- return bus_space_read_1(t,h,SIE_ISURF_OFF_RW);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,reg+IPAC_HSCXA_OFF);
- return bus_space_read_1(t,h,SIE_ISURF_OFF_RW);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,reg+IPAC_HSCXB_OFF);
- return bus_space_read_1(t,h,SIE_ISURF_OFF_RW);
- case ISIC_WHAT_IPAC:
- bus_space_write_1(t,h,SIE_ISURF_OFF_ALE,reg+IPAC_IPAC_OFF);
- return bus_space_read_1(t,h,SIE_ISURF_OFF_RW);
- default:
- return 0;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_siemens_isurf - attach for Siemens I-Surf 2.0 PnP
- *---------------------------------------------------------------------------*/
-int
-isic_attach_siemens_isurf(device_t dev)
-{
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = siemens_isurf_read_reg;
- sc->writereg = siemens_isurf_write_reg;
-
- sc->readfifo = siemens_isurf_read_fifo;
- sc->writefifo = siemens_isurf_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_SIE_ISURF2;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- /* setup chip type = IPAC ! */
-
- sc->sc_ipac = 1;
- sc->sc_bfifolen = IPAC_BFIFO_LEN;
-
- /* enable hscx/isac irq's */
-
- IPAC_WRITE(IPAC_MASK, (IPAC_MASK_INT1 | IPAC_MASK_INT0));
-
- IPAC_WRITE(IPAC_ACFG, 0); /* outputs are open drain */
- IPAC_WRITE(IPAC_AOE, /* aux 5..2 are inputs, 7, 6 outputs */
- (IPAC_AOE_OE5 | IPAC_AOE_OE4 | IPAC_AOE_OE3 | IPAC_AOE_OE2));
- IPAC_WRITE(IPAC_ATX, 0xff); /* set all output lines high */
-
- return(0);
-}
-#endif /* NISIC > 0 && defined(SIEMENS_ISURF2) */
diff --git a/sys/i4b/layer1/isic/i4b_sws.c b/sys/i4b/layer1/isic/i4b_sws.c
deleted file mode 100644
index cfe9372ca7d2..000000000000
--- a/sys/i4b/layer1/isic/i4b_sws.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 1998, 2000 German Tischler. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * Card format:
- *
- * iobase + 0 : reset on (0x03)
- * iobase + 1 : reset off (0x0)
- * iobase + 2 : isac read/write
- * iobase + 3 : hscx read/write ( offset 0-0x3f hscx0 ,
- * offset 0x40-0x7f hscx1 )
- * iobase + 4 : offset for indirect adressing
- *
- *---------------------------------------------------------------------------
- *
- * isic - I4B Siemens ISDN Chipset Driver for SWS cards
- * ====================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 08:58:57 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if defined (SEDLBAUER) && NISIC > 0
-
-#define SWS_RESON 0 /* reset on */
-#define SWS_RESOFF 1 /* reset off */
-#define SWS_ISAC 2 /* ISAC */
-#define SWS_HSCX0 3 /* HSCX0 */
-#define SWS_RW 4 /* indirect access register */
-#define SWS_HSCX1 5 /* this is for fakeing that we mean hscx1, though */
- /* access is done through hscx0 */
-
-#define SWS_REGS 8 /* we use an area of 8 bytes for io */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-/*---------------------------------------------------------------------------*
- * SWS P&P ISAC get fifo routine
- *---------------------------------------------------------------------------*/
-static void
-sws_read_fifo(struct l1_softc *sc,int what,void *buf,size_t size) {
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what ) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,SWS_RW,0x0);
- bus_space_read_multi_1(t,h,SWS_ISAC,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,SWS_RW,0x0);
- bus_space_read_multi_1(t,h,SWS_HSCX0,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,SWS_RW,0x0+0x40);
- bus_space_read_multi_1(t,h,SWS_HSCX0,buf,size);
- break;
- }
-}
-
-static void
-sws_write_fifo(struct l1_softc *sc,int what,void *buf,size_t size) {
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what ) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,SWS_RW,0x0);
- bus_space_write_multi_1(t,h,SWS_ISAC,buf,size);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,SWS_RW,0x0);
- bus_space_write_multi_1(t,h,SWS_HSCX0,buf,size);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,SWS_RW,0x0+0x40);
- bus_space_write_multi_1(t,h,SWS_HSCX0,buf,size);
- break;
- }
-}
-
-static void
-sws_write_reg(struct l1_softc *sc,int what,bus_size_t reg,u_int8_t data) {
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what ) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,SWS_RW,reg);
- bus_space_write_1(t,h,SWS_ISAC,data);
- break;
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,SWS_RW,reg);
- bus_space_write_1(t,h,SWS_HSCX0,data);
- break;
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,SWS_RW,reg+0x40);
- bus_space_write_1(t,h,SWS_HSCX0,data);
- break;
- }
-}
-
-static u_char
-sws_read_reg (struct l1_softc *sc,int what,bus_size_t reg) {
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- switch ( what ) {
- case ISIC_WHAT_ISAC:
- bus_space_write_1(t,h,SWS_RW,reg);
- return bus_space_read_1(t,h,SWS_ISAC);
- case ISIC_WHAT_HSCXA:
- bus_space_write_1(t,h,SWS_RW,reg);
- return bus_space_read_1(t,h,SWS_HSCX0);
- case ISIC_WHAT_HSCXB:
- bus_space_write_1(t,h,SWS_RW,reg+0x40);
- return bus_space_read_1(t,h,SWS_HSCX0);
- default:
- return 0;
- }
-}
-
-/* attach callback routine */
-int
-isic_attach_sws(device_t dev)
-{
- int unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
-
- struct i4b_info * info = &(sc->sc_resources);
- bus_space_tag_t t = rman_get_bustag(info->io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(info->io_base[0]);
-
- /* fill in l1_softc structure */
- sc->readreg = sws_read_reg;
- sc->writereg = sws_write_reg;
- sc->readfifo = sws_read_fifo;
- sc->writefifo = sws_write_fifo;
- sc->clearirq = NULL;
- sc->sc_cardtyp = CARD_TYPEP_SWS;
- sc->sc_bustyp = BUS_TYPE_IOM2;
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /*
- * Read HSCX A/B VSTR. Expected value for the SWS PnP card is
- * 0x05 ( = version 2.1 ) in the least significant bits.
- */
-
- if( ((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) ||
- ((HSCX_READ(1, H_VSTR) & 0xf) != 0x5) )
- {
- printf("isic%d: HSCX VSTR test failed for SWS PnP\n",
- sc->sc_unit);
- printf("isic%d: HSC0: VSTR: %#x\n",
- sc->sc_unit, HSCX_READ(0, H_VSTR));
- printf("isic%d: HSC1: VSTR: %#x\n",
- sc->sc_unit, HSCX_READ(1, H_VSTR));
- return (ENXIO);
- }
-
- /* reset card */
- bus_space_write_1(t,h,SWS_RESON,0x3);
- DELAY(SEC_DELAY / 5);
- bus_space_write_1(t,h,SWS_RESOFF,0x0);
- DELAY(SEC_DELAY / 5);
-
- return(0);
-}
-#endif /* defined(SEDLBAUER) && NISIC > 0 */
diff --git a/sys/i4b/layer1/isic/i4b_tel_s016.c b/sys/i4b/layer1/isic/i4b_tel_s016.c
deleted file mode 100644
index 4e2b67fc1874..000000000000
--- a/sys/i4b/layer1/isic/i4b_tel_s016.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright (c) 1996 Arne Helme. All rights reserved.
- *
- * Copyright (c) 1996 Gary Jennejohn. All rights reserved.
- *
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isic - I4B Siemens ISDN Chipset Driver for Teles S0/16 and clones
- * =================================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:27:24 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if NISIC > 0 && defined(TEL_S0_16)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/md_var.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#define TELES_S016_MEMSIZE 0x1000
-
-static u_char intr_no[] = { 1, 1, 0, 2, 4, 6, 1, 1, 1, 0, 8, 10, 12, 1, 1, 14 };
-static const bus_size_t offset[] = { 0x100, 0x180, 0x1c0 };
-
-/*---------------------------------------------------------------------------*
- * Teles S0/16 write register routine
- *---------------------------------------------------------------------------*/
-static void
-tels016_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.mem);
-
- offs += offset[what];
-
- if (offs & 0x01)
- offs |= 0x200;
-
- bus_space_write_1(t, h, offs, data);
-}
-
-/*---------------------------------------------------------------------------*
- * Teles S0/16 read register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-tels016_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.mem);
-
- offs += offset[what];
-
- if(offs & 0x01)
- offs |= 0x200;
-
- return bus_space_read_1(t, h, offs);
-}
-
-/*---------------------------------------------------------------------------*
- * Teles S0/16 fifo write routine
- *---------------------------------------------------------------------------*/
-static void
-tels016_write_fifo(struct l1_softc *sc, int what, void *data, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.mem);
- bus_space_write_region_1(t, h, offset[what], data, size);
-}
-
-/*---------------------------------------------------------------------------*
- * Teles S0/16 fifo read routine
- *---------------------------------------------------------------------------*/
-static void
-tels016_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.mem);
- bus_space_read_region_1(t, h, offset[what], buf, size);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_probe_s016 - probe for Teles S0/16 and compatibles
- *---------------------------------------------------------------------------*/
-int
-isic_probe_s016(device_t dev)
-{
- size_t unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = 0; /* softc */
- void *ih = 0; /* dummy */
- u_int8_t b0,b1,b2; /* for signature */
- bus_space_tag_t t; /* bus things */
- bus_space_handle_t h;
-
- /* check max unit range */
-
- if(unit >= ISIC_MAXUNIT)
- {
- printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for Teles S0/16!\n",
- unit, unit);
- return(ENXIO);
- }
-
- sc = &l1_sc[unit]; /* get pointer to softc */
- sc->sc_unit = unit; /* set unit */
-
- /* see if an io base was supplied */
-
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not allocate i/o port for Teles S0/16.\n", unit);
- return(ENXIO);
- }
-
- sc->sc_port = rman_get_start(sc->sc_resources.io_base[0]);
-
- /*
- * check if the provided io port is valid
- */
-
- switch(sc->sc_port)
- {
- case 0xd80:
- case 0xe80:
- case 0xf80:
- break;
-
- default:
- printf("isic%d: Error, invalid iobase 0x%x specified for Teles S0/16!\n",
- unit, sc->sc_port);
- isic_detach_common(dev);
- return(ENXIO);
- break;
- }
-
- /* allocate memory resource */
-
- if(!(sc->sc_resources.mem =
- bus_alloc_resource(dev, SYS_RES_MEMORY,
- &sc->sc_resources.mem_rid,
- 0ul, ~0ul, TELES_S016_MEMSIZE,
- RF_ACTIVE)))
- {
- printf("isic%d: Could not allocate memory for Teles S0/16.\n", unit);
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- /*
- * get virtual addr.
- */
- sc->sc_vmem_addr = rman_get_virtual(sc->sc_resources.mem);
-
- /*
- * check for valid adresses
- */
- switch(kvtop(sc->sc_vmem_addr))
- {
- case 0xc0000:
- case 0xc2000:
- case 0xc4000:
- case 0xc6000:
- case 0xc8000:
- case 0xca000:
- case 0xcc000:
- case 0xce000:
- case 0xd0000:
- case 0xd2000:
- case 0xd4000:
- case 0xd6000:
- case 0xd8000:
- case 0xda000:
- case 0xdc000:
- case 0xde000:
- break;
-
- default:
- printf("isic%d: Error, invalid memory address 0x%lx for Teles S0/16!\n",
- unit, kvtop(sc->sc_vmem_addr));
- isic_detach_common(dev);
- return(ENXIO);
- break;
- }
-
- /* setup ISAC access routines */
-
- sc->clearirq = NULL;
-
- sc->readreg = tels016_read_reg;
- sc->writereg = tels016_write_reg;
-
- sc->readfifo = tels016_read_fifo;
- sc->writefifo = tels016_write_fifo;
-
- /* setup card type */
- sc->sc_cardtyp = CARD_TYPEP_16;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM1;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /* setup ISAC base addr, though we don't really need it */
-
- ISAC_BASE = (caddr_t)((sc->sc_vmem_addr) + 0x100);
-
- /* setup HSCX base addr */
-
- HSCX_A_BASE = (caddr_t)((sc->sc_vmem_addr) + 0x180);
- HSCX_B_BASE = (caddr_t)((sc->sc_vmem_addr) + 0x1c0);
-
- t = rman_get_bustag(sc->sc_resources.io_base[0]);
- h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- /* get signature bytes */
- b0 = bus_space_read_1(t, h, 0);
- b1 = bus_space_read_1(t, h, 1);
- b2 = bus_space_read_1(t, h, 2);
-
- /* check signature bytes */
- if(b0 != 0x51)
- {
- printf("isic%d: Error, signature 1 0x%x != 0x51 for Teles S0/16!\n",
- unit, b0);
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- if(b1 != 0x93)
- {
- printf("isic%d: Error, signature 2 0x%x != 0x93 for Teles S0/16!\n",
- unit, b1);
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- if((b2 != 0x1e) && (b2 != 0x1f))
- {
- printf("isic%d: Error, signature 3 0x%x != 0x1e or 0x1f for Teles S0/16!\n",
- unit, b2);
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- /* get our irq */
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not allocate irq for Teles S0/16.\n", unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* register interupt routine */
-
- bus_setup_intr(dev, sc->sc_resources.irq,
- INTR_TYPE_NET,
- (void(*)(void *))(isicintr),
- sc, &ih);
-
- /* get the irq number */
-
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
-
- /* check IRQ validity */
-
- if((intr_no[sc->sc_irq]) == 1)
- {
- printf("isic%d: Error, invalid IRQ [%d] specified for Teles S0/16!\n",
- unit, sc->sc_irq);
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_s016 - attach Teles S0/16 and compatibles
- *---------------------------------------------------------------------------*/
-int
-isic_attach_s016(device_t dev)
-{
- struct l1_softc *sc = &l1_sc[device_get_unit(dev)];
- u_long irq;
-
- bus_space_tag_t ta = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t ha = rman_get_bushandle(sc->sc_resources.mem);
- bus_space_tag_t tb = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t hb = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- /* is this right for FreeBSD or off by one ? */
- irq = intr_no[sc->sc_irq];
-
- /* configure IRQ */
-
- irq |= ((u_long) sc->sc_vmem_addr) >> 9;
-
- DELAY(SEC_DELAY / 10);
- bus_space_write_1(tb, hb, 4, irq);
-
- DELAY(SEC_DELAY / 10);
- bus_space_write_1(tb, hb, 4, irq | 0x01);
-
- DELAY(SEC_DELAY / 5);
-
- /* set card bit off */
-
- bus_space_write_1(ta, ha, 0x80, 0);
- DELAY(SEC_DELAY / 5);
-
- /* set card bit on */
-
- bus_space_write_1(ta, ha, 0x80, 1);
- DELAY(SEC_DELAY / 5);
-
- return 0;
-}
-#endif /* ISIC > 0 */
diff --git a/sys/i4b/layer1/isic/i4b_tel_s0163.c b/sys/i4b/layer1/isic/i4b_tel_s0163.c
deleted file mode 100644
index 150306df8861..000000000000
--- a/sys/i4b/layer1/isic/i4b_tel_s0163.c
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Copyright (c) 1996 Arne Helme. All rights reserved.
- *
- * Copyright (c) 1996 Gary Jennejohn. All rights reserved.
- *
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isic - I4B Siemens ISDN Chipset Driver for Teles S0/16.3
- * ========================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:27:40 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if NISIC > 0 && defined(TEL_S0_16_3)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-static u_char intr_no[] = { 1, 1, 0, 2, 4, 6, 1, 1, 1, 0, 8, 10, 12, 1, 1, 14 };
-
-#define ISAC_OFFS 0x400
-#define HSCXA_OFFS 0xc00
-#define HSCXB_OFFS 0x800
-
-/*---------------------------------------------------------------------------*
- * Teles S0/16.3 read fifo routine
- *---------------------------------------------------------------------------*/
-static void
-tels0163_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+1]);
- bus_space_read_multi_1(t,h,0x1e,buf,size);
-}
-
-/*---------------------------------------------------------------------------*
- * Teles S0/16.3 write fifo routine
- *---------------------------------------------------------------------------*/
-static void
-tels0163_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+1]);
- bus_space_write_multi_1(t,h,0x1e,buf,size);
-}
-
-/*---------------------------------------------------------------------------*
- * Teles S0/16.3 ISAC put register routine
- *---------------------------------------------------------------------------*/
-static void
-tels0163_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+1]);
- bus_space_write_1(t,h,offs - 0x20,data);
-}
-
-/*---------------------------------------------------------------------------*
- * Teles S0/16.3 ISAC get register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-tels0163_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[what+1]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[what+1]);
- return bus_space_read_1(t,h,offs - 0x20);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_probe_s0163 - probe routine for Teles S0/16.3
- *---------------------------------------------------------------------------*/
-int
-isic_probe_s0163(device_t dev)
-{
- size_t unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = 0; /* pointer to softc */
- void *ih = 0; /* dummy */
- bus_space_tag_t t; /* bus things */
- bus_space_handle_t h;
- u_int8_t b0,b1,b2; /* signature */
-
- /* check max unit range */
-
- if(unit >= ISIC_MAXUNIT)
- {
- printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for Teles 16.3!\n",
- unit, unit);
- return(ENXIO);
- }
-
- sc = &l1_sc[unit]; /* get pointer to softc */
- sc->sc_unit = unit; /* set unit */
-
- /* see if an io base was supplied */
-
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get iobase for Teles S0/16.3.\n",
- unit);
- return(ENXIO);
- }
-
- /* set io base */
-
- sc->sc_port = rman_get_start(sc->sc_resources.io_base[0]);
- /* Release the resource - re-allocate later with correct size */
- bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_resources.io_rid[0],
- sc->sc_resources.io_base[0]);
-
- switch(sc->sc_port)
- {
- case 0xd80:
- case 0xe80:
- case 0xf80:
- break;
-
- case 0x180:
- case 0x280:
- case 0x380:
- printf("isic%d: Error, instead of using iobase 0x%x for your Teles S0/16.3,\n",
- unit, sc->sc_port);
- printf("isic%d: please use 0x%x in the kernel configuration file!\n",
- unit, sc->sc_port+0xc00);
- isic_detach_common(dev);
- return(ENXIO);
- break;
-
- default:
- printf("isic%d: Error, invalid iobase 0x%x specified for Teles S0/16.3!\n",
- unit, sc->sc_port);
- isic_detach_common(dev);
- return(ENXIO);
- break;
- }
-
- /* set io port resources */
-
- sc->sc_resources.io_rid[0] = 0;
- bus_set_resource(dev, SYS_RES_IOPORT, 0, sc->sc_port, 0x20);
- sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0ul, ~0ul, 1, RF_ACTIVE);
- if(!sc->sc_resources.io_base[0])
- {
- printf("isic%d: Error allocating io at 0x%x for Teles S0/16.3!\n",
- unit, sc->sc_port);
- isic_detach_common(dev);
- return ENXIO;
- }
- sc->sc_resources.io_rid[1] = 1;
- bus_set_resource(dev, SYS_RES_IOPORT, 1,
- sc->sc_port-ISAC_OFFS, 0x20);
- sc->sc_resources.io_base[1] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[1],
- 0ul, ~0ul, 1, RF_ACTIVE);
- if(!sc->sc_resources.io_base[1])
- {
- printf("isic%d: Error allocating io at 0x%x for Teles S0/16.3!\n",
- unit, sc->sc_port-ISAC_OFFS);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- sc->sc_resources.io_rid[2] = 2;
- bus_set_resource(dev, SYS_RES_IOPORT, 2,
- sc->sc_port-HSCXA_OFFS, 0x20);
- sc->sc_resources.io_base[2] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[2],
- 0ul, ~0ul, 1, RF_ACTIVE);
- if(!sc->sc_resources.io_base[2])
- {
- printf("isic%d: Error allocating io at 0x%x for Teles S0/16.3!\n",
- unit, sc->sc_port-HSCXA_OFFS);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- sc->sc_resources.io_rid[3] = 3;
- bus_set_resource(dev, SYS_RES_IOPORT, 3,
- sc->sc_port-HSCXB_OFFS, 0x20);
- sc->sc_resources.io_base[3] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[3],
- 0ul, ~0ul, 1, RF_ACTIVE);
- if(!sc->sc_resources.io_base[3])
- {
- printf("isic%d: Error allocating io at 0x%x for Teles S0/16.3!\n",
- unit, sc->sc_port-HSCXB_OFFS);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = tels0163_read_reg;
- sc->writereg = tels0163_write_reg;
-
- sc->readfifo = tels0163_read_fifo;
- sc->writefifo = tels0163_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp= CARD_TYPEP_16_3;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- t = rman_get_bustag(sc->sc_resources.io_base[0]);
- h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- b0 = bus_space_read_1(t, h, 0);
- b1 = bus_space_read_1(t, h, 1);
- b2 = bus_space_read_1(t, h, 2);
-
- if ( b0 != 0x51 && b0 != 0x10 ) {
- printf("isic%d: Error, signature 1 0x%x != 0x51 or 0x10 for Teles S0/16.3!\n",
- unit, b0);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- if ( b1 != 0x93 ) {
- printf("isic%d: Error, signature 2 0x%x != 0x93 for Teles S0/16.3!\n",
- unit, b1);
- isic_detach_common(dev);
- return ENXIO;
- }
- if (( b2 != 0x1c ) && ( b2 != 0x1f )) {
- printf("isic%d: Error, signature 3 0x%x != (0x1c || 0x1f) for Teles S0/16.3!\n",
- unit, b2);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /*
- * Read HSCX A/B VSTR. Expected value for the S0/16.3 card is
- * 0x05 or 0x04 (for older 16.3's) in the least significant bits.
- */
-
- if( (((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) &&
- ((HSCX_READ(0, H_VSTR) & 0xf) != 0x4)) ||
- (((HSCX_READ(1, H_VSTR) & 0xf) != 0x5) &&
- ((HSCX_READ(1, H_VSTR) & 0xf) != 0x4)) )
- {
- printf("isic%d: HSCX VSTR test failed for Teles S0/16.3\n",
- unit);
- printf("isic%d: HSC0: VSTR: %#x\n",
- unit, HSCX_READ(0, H_VSTR));
- printf("isic%d: HSC1: VSTR: %#x\n",
- unit, HSCX_READ(1, H_VSTR));
- isic_detach_common(dev);
- return (ENXIO);
- }
-
- /* get our irq */
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get IRQ for Teles S0/16.3.\n",unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* get the irq number */
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
-
- switch(sc->sc_irq)
- {
- case 2:
- case 9:
- case 5:
- case 10:
- case 12:
- case 15:
- break;
-
- default:
- printf("isic%d: Error, invalid IRQ [%d] specified for Teles S0/16.3!\n",
- unit, sc->sc_irq);
- isic_detach_common(dev);
- return(ENXIO);
- break;
- }
-
- /* register interupt routine */
- bus_setup_intr(dev, sc->sc_resources.irq,
- INTR_TYPE_NET,
- (void(*)(void *))(isicintr),
- sc, &ih);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_s0163 - attach Teles S0/16.3 and compatibles
- *---------------------------------------------------------------------------*/
-int
-isic_attach_s0163(device_t dev)
-{
- unsigned int unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = &l1_sc[unit];
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.io_base[0]);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.io_base[0]);
-
- /* configure IRQ */
-
- DELAY(SEC_DELAY / 10);
- bus_space_write_1(t, h, 4, intr_no[sc->sc_irq]);
-
- DELAY(SEC_DELAY / 10);
- bus_space_write_1(t, h, 4, intr_no[sc->sc_irq] | 0x01);
-
- return (0);
-}
-
-#endif /* ISIC > 0 */
-
diff --git a/sys/i4b/layer1/isic/i4b_tel_s08.c b/sys/i4b/layer1/isic/i4b_tel_s08.c
deleted file mode 100644
index d1d69b2f631a..000000000000
--- a/sys/i4b/layer1/isic/i4b_tel_s08.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * Copyright (c) 1996 Arne Helme. All rights reserved.
- *
- * Copyright (c) 1996 Gary Jennejohn. All rights reserved.
- *
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isic - I4B Siemens ISDN Chipset Driver for Teles S0/8 and clones
- * ================================================================
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:27:58 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if NISIC > 0 && defined(TEL_S0_8)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/md_var.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#define TELES_S08_MEMSIZE 0x1000
-
-static const bus_size_t offset[] = { 0x100, 0x180, 0x1c0 };
-
-/*---------------------------------------------------------------------------*
- * Teles S0/8 write register routine
- *---------------------------------------------------------------------------*/
-static void
-tels08_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.mem);
-
- offs += offset[what];
-
- if (offs & 0x01)
- offs |= 0x200;
-
- bus_space_write_1(t, h, offs, data);
-}
-
-/*---------------------------------------------------------------------------*
- * Teles S0/8 read register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-tels08_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.mem);
-
- offs += offset[what];
-
- if (offs & 0x01)
- offs |= 0x200;
-
- return bus_space_read_1(t, h, offs);
-}
-
-/*---------------------------------------------------------------------------*
- * Teles S0/8 fifo write access
- *---------------------------------------------------------------------------*/
-static void
-tels08_write_fifo(struct l1_softc *sc, int what, void *data, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.mem);
- bus_space_write_region_1(t, h, offset[what], data, size);
-}
-
-/*---------------------------------------------------------------------------*
- * Teles S0/8 fifo read access
- *---------------------------------------------------------------------------*/
-static void
-tels08_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.mem);
- bus_space_read_region_1(t, h, offset[what], buf, size);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_probe_s08 - probe for Teles S0/8 and compatibles
- *---------------------------------------------------------------------------*/
-int
-isic_probe_s08(device_t dev)
-{
- size_t unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = 0; /* pointer to softc */
- void *ih = 0; /* dummy */
-
- /* check max unit range */
-
- if(unit >= ISIC_MAXUNIT)
- {
- printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for Teles S0/8!\n",
- unit, unit);
- return(ENXIO);
- }
-
- sc = &l1_sc[unit]; /* get pointer to softc */
- sc->sc_unit = unit; /* set unit */
-
- /* see if an io base was supplied */
-
- if((sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- /* the S0/8 is completely memory mapped ! */
-
- bus_release_resource(dev,SYS_RES_IOPORT,
- sc->sc_resources.io_rid[0],
- sc->sc_resources.io_base[0]);
- printf("isic%d: Error, iobase specified for Teles S0/8!\n", unit);
- return(ENXIO);
- }
-
- /* allocate memory */
-
- if(!(sc->sc_resources.mem =
- bus_alloc_resource(dev, SYS_RES_MEMORY,
- &sc->sc_resources.mem_rid,
- 0ul, ~0ul, TELES_S08_MEMSIZE, RF_ACTIVE)))
- {
- printf("isic%d: Could not allocate memory for Teles S0/8!\n", unit);
- return(ENXIO);
- }
-
- /*
- * get virtual addr. it's just needed to see if it is in
- * the valid range
- */
-
- sc->sc_vmem_addr = rman_get_virtual(sc->sc_resources.mem);
-
- /* check if inside memory range of 0xA0000 .. 0xDF000 */
-
- if((kvtop(sc->sc_vmem_addr) < 0xa0000) ||
- (kvtop(sc->sc_vmem_addr) > 0xdf000))
- {
- printf("isic%d: Error, mem addr 0x%lx outside 0xA0000-0xDF000 for Teles S0/8!\n",
- unit, kvtop(sc->sc_vmem_addr));
- bus_release_resource(dev,SYS_RES_MEMORY,
- sc->sc_resources.mem_rid,
- sc->sc_resources.mem);
- sc->sc_resources.mem = 0;
- return(ENXIO);
- }
-
- /* setup ISAC access routines */
-
- sc->clearirq = NULL;
-
- sc->readreg = tels08_read_reg;
- sc->writereg = tels08_write_reg;
-
- sc->readfifo = tels08_read_fifo;
- sc->writefifo = tels08_write_fifo;
-
- sc->sc_cardtyp = CARD_TYPEP_8; /* setup card type */
-
- sc->sc_bustyp = BUS_TYPE_IOM1; /* setup IOM bus type */
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /* setup ISAC base addr, though we don't really need it */
-
- ISAC_BASE = (caddr_t)((sc->sc_vmem_addr) + 0x100);
-
- /* setup HSCX base addr */
-
- HSCX_A_BASE = (caddr_t)((sc->sc_vmem_addr) + 0x180);
- HSCX_B_BASE = (caddr_t)((sc->sc_vmem_addr) + 0x1c0);
-
- /* allocate our irq */
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not allocate irq for Teles S0/8!\n",unit);
-
- bus_release_resource(dev,SYS_RES_MEMORY,
- sc->sc_resources.mem_rid,
- sc->sc_resources.mem);
-
- sc->sc_resources.mem = 0;
- return ENXIO;
- }
-
- /* get the irq number */
-
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
-
- /* check IRQ validity */
-
- switch(sc->sc_irq)
- {
- case 2:
- case 9: /* XXX */
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- break;
-
- default:
- printf("isic%d: Error, invalid IRQ [%d] specified for Teles S0/8!\n",
- unit, sc->sc_irq);
- bus_release_resource(dev,SYS_RES_IRQ,
- sc->sc_resources.irq_rid,
- sc->sc_resources.irq);
- sc->sc_resources.irq = 0;
- bus_release_resource(dev,SYS_RES_MEMORY,
- sc->sc_resources.mem_rid,
- sc->sc_resources.mem);
- sc->sc_resources.mem = 0;
- return(ENXIO);
- break;
- }
-
- /* register interupt routine */
-
- bus_setup_intr(dev, sc->sc_resources.irq,
- INTR_TYPE_NET,
- (void(*)(void *))(isicintr),
- sc, &ih);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_s08 - attach Teles S0/8 and compatibles
- *---------------------------------------------------------------------------*/
-int
-isic_attach_s08(device_t dev)
-{
- struct l1_softc *sc = &l1_sc[device_get_unit(dev)];
- bus_space_tag_t t = rman_get_bustag(sc->sc_resources.mem);
- bus_space_handle_t h = rman_get_bushandle(sc->sc_resources.mem);
-
- /* set card off */
-
- bus_space_write_1(t, h, 0x80, 0);
-
- DELAY(SEC_DELAY / 5);
-
- /* set card on */
-
- bus_space_write_1(t, h, 0x80, 1);
-
- DELAY(SEC_DELAY / 5);
-
- return 0;
-}
-#endif /* ISIC > 0 */
diff --git a/sys/i4b/layer1/isic/i4b_usr_sti.c b/sys/i4b/layer1/isic/i4b_usr_sti.c
deleted file mode 100644
index 4a3a0e024568..000000000000
--- a/sys/i4b/layer1/isic/i4b_usr_sti.c
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_usr_sti.c - USRobotics Sportster ISDN TA intern (Tina-pp)
- * -------------------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 24 09:28:12 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "isic.h"
-#include "opt_i4b.h"
-
-#if (NISIC > 0) && defined(USR_STI)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/bus.h>
-#include <machine/bus.h>
-#include <sys/rman.h>
-
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-/*---------------------------------------------------------------------------*
- * USR Sportster TA intern special registers
- *---------------------------------------------------------------------------*/
-#define USR_HSCXA_OFF 0x0000
-#define USR_HSCXB_OFF 0x4000
-#define USR_INTL_OFF 0x8000
-#define USR_ISAC_OFF 0xc000
-
-#define USR_RES_BIT 0x80 /* 0 = normal, 1 = reset ISAC/HSCX */
-#define USR_INTE_BIT 0x40 /* 0 = IRQ disabled, 1 = IRQ's enabled */
-#define USR_IL_MASK 0x07 /* IRQ level config */
-
-static u_char intr_no[] = { 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 3, 4, 5, 0, 6, 7 };
-
-#define ADDR(reg) \
- (((reg/4) * 1024) + ((reg%4) * 2))
-
-#ifdef USRTA_DEBUG_PORTACCESS
-int debugcntr;
-#define USRTA_DEBUG(fmt) \
- if (++debugcntr < 1000) printf fmt;
-#else
-#define USRTA_DEBUG(fmt)
-#endif
-
-/*---------------------------------------------------------------------------*
- * USRobotics read fifo routine
- *---------------------------------------------------------------------------*/
-static void
-usrtai_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- register int offset = 0;
- register unsigned int base = 0;
-
-USRTA_DEBUG(("usrtai_read_fifo: what %d size %d\n", what, size))
- switch (what)
- {
- case ISIC_WHAT_ISAC:
- base = (unsigned int)ISAC_BASE;
- break;
- case ISIC_WHAT_HSCXA:
- base = (unsigned int)HSCX_A_BASE;
- break;
- case ISIC_WHAT_HSCXB:
- base = (unsigned int)HSCX_B_BASE;
- break;
- default:
- printf("usrtai_read_fifo: invalid what %d\n", what);
- return;
- }
-
- for(;size > 0; size--, offset++)
- {
- *((u_char *)buf + offset) = inb(base + ADDR(offset));
- }
-}
-
-/*---------------------------------------------------------------------------*
- * USRobotics write fifo routine
- *---------------------------------------------------------------------------*/
-static void
-usrtai_write_fifo(struct l1_softc *sc, int what, void *data, size_t size)
-{
- register int offset = 0;
- register unsigned int base = 0;
-
-USRTA_DEBUG(("usrtai_write_fifo: what %d size %d\n", what, size))
- switch (what)
- {
- case ISIC_WHAT_ISAC:
- base = (unsigned int)ISAC_BASE;
- break;
- case ISIC_WHAT_HSCXA:
- base = (unsigned int)HSCX_A_BASE;
- break;
- case ISIC_WHAT_HSCXB:
- base = (unsigned int)HSCX_B_BASE;
- break;
- default:
- printf("usrtai_write_fifo: invalid what %d\n", what);
- return;
- }
-
-
- for(;size > 0; size--, offset++)
- {
- outb(base + ADDR(offset), *((u_char *)data + offset));
- }
-}
-
-/*---------------------------------------------------------------------------*
- * USRobotics write register routine
- *---------------------------------------------------------------------------*/
-static void
-usrtai_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- register unsigned int base = 0;
-
-USRTA_DEBUG(("usrtai_write_reg: what %d ADDR(%d) %d data %#x\n", what, offs, ADDR(offs), data))
- switch (what)
- {
- case ISIC_WHAT_ISAC:
- base = (unsigned int)ISAC_BASE;
- break;
- case ISIC_WHAT_HSCXA:
- base = (unsigned int)HSCX_A_BASE;
- break;
- case ISIC_WHAT_HSCXB:
- base = (unsigned int)HSCX_B_BASE;
- break;
- default:
- printf("usrtai_write_reg invalid what %d\n", what);
- return;
- }
-
- outb(base + ADDR(offs), (u_char)data);
-}
-
-/*---------------------------------------------------------------------------*
- * USRobotics read register routine
- *---------------------------------------------------------------------------*/
-static u_int8_t
-usrtai_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- register unsigned int base = 0;
- u_int8_t byte;
-
-USRTA_DEBUG(("usrtai_read_reg: what %d ADDR(%d) %d..", what, offs, ADDR(offs)))
- switch (what)
- {
- case ISIC_WHAT_ISAC:
- base = (unsigned int)ISAC_BASE;
- break;
- case ISIC_WHAT_HSCXA:
- base = (unsigned int)HSCX_A_BASE;
- break;
- case ISIC_WHAT_HSCXB:
- base = (unsigned int)HSCX_B_BASE;
- break;
- default:
- printf("usrtai_read_reg: invalid what %d\n", what);
- return(0);
- }
-
- byte = inb(base + ADDR(offs));
-USRTA_DEBUG(("usrtai_read_reg: got %#x\n", byte))
- return(byte);
-}
-
-/*---------------------------------------------------------------------------*
- * allocate an io port - based on code in isa_isic.c
- *---------------------------------------------------------------------------*/
-static int
-usrtai_alloc_port(device_t dev)
-{
- size_t unit = device_get_unit(dev);
- struct l1_softc *sc = &l1_sc[unit];
- int i, num = 0;
- bus_size_t base;
-
- /* 49 io mappings: 1 config and 48x8 registers */
-
- /* config at offset 0x8000 */
- base = sc->sc_port + 0x8000;
- if (base < 0 || base > 0x0ffff)
- return 1;
- sc->sc_resources.io_rid[num] = num;
-
- bus_set_resource(dev, SYS_RES_IOPORT, num, base, 1);
-
- if(!(sc->sc_resources.io_base[num] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[num],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Error, failed to reserve io #%dport %#x!\n", unit, num, base);
- isic_detach_common(dev);
- return(ENXIO);
- }
- num++;
-
- /* HSCX A at offset 0 */
- base = sc->sc_port;
- for (i = 0; i < 16; i++) {
- if (base+i*1024 < 0 || base+i*1024+8 > 0x0ffff)
- return 1;
- sc->sc_resources.io_rid[num] = num;
-
- bus_set_resource(dev, SYS_RES_IOPORT, num, base+i*1024, 8);
-
- if(!(sc->sc_resources.io_base[num] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[num],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Error, failed to reserve io #%d port %#x!\n", unit, num, base+i*1024);
- isic_detach_common(dev);
- return(ENXIO);
- }
- ++num;
- }
-
- /* HSCX B at offset 0x4000 */
- base = sc->sc_port + 0x4000;
- for (i = 0; i < 16; i++) {
- if (base+i*1024 < 0 || base+i*1024+8 > 0x0ffff)
- return 1;
- sc->sc_resources.io_rid[num] = num;
-
- bus_set_resource(dev, SYS_RES_IOPORT, num, base+i*1024, 8);
-
- if(!(sc->sc_resources.io_base[num] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[num],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Error, failed to reserve io #%d port %#x!\n", unit, num, base+i*1024);
- isic_detach_common(dev);
- return(ENXIO);
- }
- ++num;
- }
-
- /* ISAC at offset 0xc000 */
- base = sc->sc_port + 0xc000;
- for (i = 0; i < 16; i++) {
- if (base+i*1024 < 0 || base+i*1024+8 > 0x0ffff)
- return 1;
- sc->sc_resources.io_rid[num] = num;
-
- bus_set_resource(dev, SYS_RES_IOPORT, num, base+i*1024, 8);
-
- if(!(sc->sc_resources.io_base[num] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[num],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Error, failed to reserve io #%d port %#x!\n", unit, num, base+i*1024);
- isic_detach_common(dev);
- return(ENXIO);
- }
- ++num;
- }
-
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_probe_usrtai - probe for USR
- *---------------------------------------------------------------------------*/
-int
-isic_probe_usrtai(device_t dev)
-{
- size_t unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = 0; /* pointer to softc */
- void *ih = 0; /* dummy */
-
- /* check max unit range */
-
- if(unit >= ISIC_MAXUNIT)
- {
- printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for USR Sportster TA!\n",
- unit, unit);
- return(ENXIO);
- }
-
- sc = &l1_sc[unit]; /* get pointer to softc */
- sc->sc_unit = unit; /* set unit */
-
- /* see if an io base was supplied */
-
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get iobase for USR Sportster TA!\n",
- unit);
- return(ENXIO);
- }
-
- /* set io base */
-
- sc->sc_port = rman_get_start(sc->sc_resources.io_base[0]);
-
- /* release io base */
-
- bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_resources.io_rid[0],
- sc->sc_resources.io_base[0]);
-
-
- /* check if we got an iobase */
-
- switch(sc->sc_port)
- {
- case 0x200:
- case 0x208:
- case 0x210:
- case 0x218:
- case 0x220:
- case 0x228:
- case 0x230:
- case 0x238:
- case 0x240:
- case 0x248:
- case 0x250:
- case 0x258:
- case 0x260:
- case 0x268:
- case 0x270:
- case 0x278:
- break;
-
- default:
- printf("isic%d: Error, invalid iobase 0x%x specified for USR Sportster TA!\n",
- unit, sc->sc_port);
- return(0);
- break;
- }
-
- /* allocate all the ports needed */
-
- if(usrtai_alloc_port(dev))
- {
- printf("isic%d: Could not get the ports for USR Sportster TA!\n", unit);
- isic_detach_common(dev);
- return(ENXIO);
- }
-
- /* get our irq */
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0ul, ~0ul, 1, RF_ACTIVE)))
- {
- printf("isic%d: Could not get an irq for USR Sportster TA!\n",unit);
- isic_detach_common(dev);
- return ENXIO;
- }
-
- /* get the irq number */
- sc->sc_irq = rman_get_start(sc->sc_resources.irq);
-
- /* register interrupt routine */
- bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET,
- (void(*)(void *))(isicintr),
- sc, &ih);
-
- /* check IRQ validity */
-
- if(intr_no[sc->sc_irq] == 0)
- {
- printf("isic%d: Error, invalid IRQ [%d] specified for USR Sportster TA!\n",
- unit, sc->sc_irq);
- return(1);
- }
-
- /* setup ISAC access routines */
-
- sc->clearirq = NULL;
- sc->readreg = usrtai_read_reg;
- sc->writereg = usrtai_write_reg;
-
- sc->readfifo = usrtai_read_fifo;
- sc->writefifo = usrtai_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_USRTA;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- sc->sc_ipac = 0;
- sc->sc_bfifolen = HSCX_FIFO_LEN;
-
- /* setup ISAC and HSCX base addr */
-
- ISAC_BASE = (caddr_t)sc->sc_port + USR_ISAC_OFF;
- HSCX_A_BASE = (caddr_t)sc->sc_port + USR_HSCXA_OFF;
- HSCX_B_BASE = (caddr_t)sc->sc_port + USR_HSCXB_OFF;
-
- /*
- * Read HSCX A/B VSTR. Expected value for USR Sportster TA based
- * boards is 0x05 in the least significant bits.
- */
-
- if( ((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) ||
- ((HSCX_READ(1, H_VSTR) & 0xf) != 0x5) )
- {
- printf("isic%d: HSCX VSTR test failed for USR Sportster TA\n",
- unit);
- printf("isic%d: HSC0: VSTR: %#x\n",
- unit, HSCX_READ(0, H_VSTR));
- printf("isic%d: HSC1: VSTR: %#x\n",
- unit, HSCX_READ(1, H_VSTR));
- return (1);
- }
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------*
- * isic_attach_usrtai - attach USR
- *---------------------------------------------------------------------------*/
-int
-isic_attach_usrtai(device_t dev)
-{
- u_char irq = 0;
- size_t unit = device_get_unit(dev); /* get unit */
- struct l1_softc *sc = 0; /* pointer to softc */
-
- sc = &l1_sc[unit]; /* get pointer to softc */
-
- /* reset the HSCX and ISAC chips */
-
- outb(sc->sc_port + USR_INTL_OFF, USR_RES_BIT);
- DELAY(SEC_DELAY / 10);
-
- outb(sc->sc_port + USR_INTL_OFF, 0x00);
- DELAY(SEC_DELAY / 10);
-
- /* setup IRQ */
-
- if((irq = intr_no[sc->sc_irq]) == 0)
- {
- printf("isic%d: Attach error, invalid IRQ [%d] specified for USR Sportster TA!\n",
- unit, sc->sc_irq);
- return(1);
- }
-
- /* configure and enable irq */
-
- outb(sc->sc_port + USR_INTL_OFF, irq | USR_INTE_BIT);
- DELAY(SEC_DELAY / 10);
-
- return (0);
-}
-
-#endif /* ISIC > 0 */
diff --git a/sys/i4b/layer1/itjc/i4b_hdlc.h b/sys/i4b/layer1/itjc/i4b_hdlc.h
deleted file mode 100644
index ccc60caeebbf..000000000000
--- a/sys/i4b/layer1/itjc/i4b_hdlc.h
+++ /dev/null
@@ -1,412 +0,0 @@
-/*
- * Copyright (c) 2000 Hans Petter Selasky. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_hdlc.h - software-HDLC header file
- * --------------------------------------
- *
- * $Id: i4b_hdlc.h,v 1.5 2000/08/28 07:41:19 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Thu Jan 11 11:31:01 2001]
- *
- * Please conform "ihfc/i4b_ihfc_drv.c" (ihfc_hdlc_Bxxxx)
- * for correct usage! (-hp)
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_HDLC_H_
-#define _I4B_HDLC_H_
-
-/*---------------------------------------------------------------------------*
- * HDLC CRC table
- *
- * Usage:
- * crc = (HDLC_FCS_TAB[(u_char)(crc ^ byte of data)] ^ (u_char)(crc >> 8));
- *
- * For more information see RFC 1662 (p. 10)
- *---------------------------------------------------------------------------*/
-static const u_short HDLC_FCS_TAB[256] = { 0x0000,
- 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48,
- 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 0x1081,
- 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 0x9cc9,
- 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, 0x2102,
- 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 0xad4a,
- 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 0x3183,
- 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, 0xbdcb,
- 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 0x4204,
- 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, 0xce4c,
- 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 0x5285,
- 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, 0xdecd,
- 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 0x6306,
- 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 0xef4e,
- 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, 0x7387,
- 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 0xffcf,
- 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, 0x8408,
- 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 0x0840,
- 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, 0x9489,
- 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 0x18c1,
- 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 0xa50a,
- 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, 0x2942,
- 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 0xb58b,
- 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, 0x39c3,
- 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 0xc60c,
- 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, 0x4a44,
- 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 0xd68d,
- 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 0x5ac5,
- 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, 0xe70e,
- 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 0x6b46,
- 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, 0xf78f,
- 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7,
- 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
-};
-
-/*---------------------------------------------------------------------------*
- * HDLC bit table
- * ==============
- *
- * bits[0..3]: A value which tells how many set bits there are at the
- * beginning of the byte.
- *
- * bits[4..7]: Special bytes like 0x7e, 0x7d, 0xfd ... are flagged here
- * NOTE: Special bytes also means 'abort' bytes (7 or more
- * continuous set bits)
- *
- * bits[8..11]: A copy of bits[0..3] but only incremented by one.
- * NOTE: 0x7e has value '8' instead of '0'. Internal reasons.
- *
- * bits[12..15]: A value which tells how many set bits there are at the
- * end of the byte.
- * NOTE: 0xff has both '8' incoming and '8' outgoing bits.
- *
- *---------------------------------------------------------------------------*/
-static const u_short HDLC_BIT_TAB[256] = { 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0504, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0605, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0504, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0160, 0x0706, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0504, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0605, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0504, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x0100, 0x0201, 0x0100, 0x0403, 0x0100,
- 0x0201, 0x0100, 0x0302, 0x01a0, 0x02a1, 0x0860, 0x0807, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1403, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1504, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1403, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1605, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1403, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1504, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1100, 0x1403, 0x1100,
- 0x1201, 0x1100, 0x1302, 0x1100, 0x1201, 0x1160, 0x1706, 0x2100,
- 0x2201, 0x2100, 0x2302, 0x2100, 0x2201, 0x2100, 0x2403, 0x2100,
- 0x2201, 0x2100, 0x2302, 0x2100, 0x2201, 0x2100, 0x2504, 0x2100,
- 0x2201, 0x2100, 0x2302, 0x2100, 0x2201, 0x2100, 0x2403, 0x2100,
- 0x2201, 0x2100, 0x2302, 0x2100, 0x2201, 0x2100, 0x2605, 0x3100,
- 0x3201, 0x3100, 0x3302, 0x3100, 0x3201, 0x3100, 0x3403, 0x3100,
- 0x3201, 0x3100, 0x3302, 0x3100, 0x3201, 0x3100, 0x3504, 0x4100,
- 0x4201, 0x4100, 0x4302, 0x4100, 0x4201, 0x4100, 0x4403, 0x5100,
- 0x5201, 0x5100, 0x5302, 0x6180, 0x6281, 0x7150, 0x8908
-};
-
-/*---------------------------------------------------------------------------*
- * HDLC_DECODE
- * ===========
- *
- * u_char: flag, blevel
- * u_short: crc, ib, tmp, tmp2, len
- *
- * next: 'continue' or 'goto xxx'
- *
- * cfr: complete frame
- * nfr: new frame
- * NOTE: must setup 'len' and 'dst', so that 'dst' may be written
- * at most 'len' times.
- *
- * rab: abort
- * rdd: read data (read byte is stored in 'tmp2')
- * rdo: overflow
- *
- * d: dummy
- *
- * NOTE: setting flag to '0' and len to '0' => recover from rdu
- * NOTE: bits[8 .. ] of tmp2 may be used to store custom data/flags
- * NOTE: these variables have to be 'suspended' / 'resumed' somehow:
- * flag, blevel, crc, ib, tmp, len
- * NOTE: zero is default value for all variables.
- * NOTE: each time 'dst' is written, 'len' is decreased by one.
- *---------------------------------------------------------------------------*/
-
-#define HDLC_DECODE(dst, len, tmp, tmp2, blevel, ib, crc, flag, rddcmd, nfrcmd, \
- cfrcmd, rabcmd, rdocmd, nextcmd, d) \
- \
- rddcmd; \
- \
- ib += HDLC_BIT_TAB[(u_char)tmp2]; \
- \
- if ((u_char)ib >= 5) \
- { \
- if (ib & 0x20) /* de-stuff (msb) */ \
- { \
- if ((u_char)tmp2 == 0x7e) goto j0##d; \
- tmp2 += tmp2 & 0x7f; \
- blevel--; \
- \
- if ((ib += 0x100) & 0xc) tmp2 |= 1; /* */ \
- } \
- \
- ib &= ~0xe0; \
- \
- if ((u_char)ib == 6) /* flag seq (lsb) */ \
- { \
- j0##d: if (flag >= 2) \
- { \
- len += (4 - flag) & 3; /* remove CRC bytes */ \
- crc ^= 0xf0b8; \
- cfrcmd; \
- len = 0; \
- } \
- \
- flag = 1; \
- \
- blevel = (ib >> 8) & 0xf; \
- tmp = ((u_char)tmp2) >> blevel; \
- blevel = 8 - blevel; \
- \
- ib >>= 12; \
- \
- nextcmd; \
- } \
- if ((u_char)ib >= 7) /* abort (msb & lsb) */ \
- { \
- if (flag >= 2) \
- { \
- rabcmd; \
- len = 0; \
- } \
- \
- flag = 0; \
- \
- ib >>= 12; \
- \
- nextcmd; \
- } \
- if ((u_char)ib == 5) /* de-stuff (lsb) */ \
- { \
- tmp2 = (tmp2 | (tmp2 + 1)) & ~0x1; \
- blevel--; \
- } \
- if (blevel > 7) /* EO - bits */ \
- { \
- tmp |= (u_char)tmp2 >> (8 - (blevel &= 7)); \
- \
- ib >>= 12; \
- \
- nextcmd; \
- } \
- } \
- \
- tmp |= (u_char)tmp2 << blevel; \
- \
- if (!len--) \
- { \
- len++; \
- \
- if (!flag++) { flag--; goto j5##d;} /* hunt mode */ \
- \
- switch (flag) \
- { case 2: /* new frame */ \
- nfrcmd; \
- crc = -1; \
- if (!len--) { len++; flag++; goto j4##d; } \
- goto j3##d; \
- case 3: /* CRC (lsb's) */ \
- case 4: /* CRC (msb's) */ \
- goto j4##d; \
- case 5: /* RDO */ \
- rdocmd; \
- flag = 0; \
- break; \
- } \
- } \
- else \
- { \
- j3##d: dst = (u_char)tmp; \
- j4##d: crc = (HDLC_FCS_TAB[(u_char)(tmp ^ crc)] ^ (u_char)(crc >> 8)); \
- } \
- \
- j5##d: ib >>= 12; \
- tmp >>= 8; \
-
-/*------ end of HDLC_DECODE -------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------*
- * HDLC_ENCODE
- * ===========
- *
- * u_char: flag, src
- * u_short: tmp2, blevel, ib, crc, len
- * u_int: tmp
- *
- * gfr: This is the place where you free the last [mbuf] chain, and get
- * the next one. If a mbuf is available the code should setup 'len'
- * and 'src' so that 'src' may be read 'len' times. If no mbuf is
- * available leave 'len' and 'src' untouched.
- *
- * nmb: If your implementation accept/use chained mbufs, this is the
- * place where you update 'len' and 'src' to the next mbuf of
- * the chain that makes up a frame. If no further mbuf is
- * available leave 'len' and 'src' untouched. This is not the
- * place where you free the mbuf. Leave the block empty if your
- * implementation does not accept/use chained mbufs.
- *
- * wrd: write data (output = (u_char)tmp)
- *
- * d: dummy
- *
- * NOTE: setting flag to '-2' and len to '0' => abort bytes will be sent
- * NOTE: these variables have to be 'suspended' / 'resumed' somehow:
- * flag, blevel, crc, ib, tmp, len
- * NOTE: zero is default value for all variables.
- * NOTE: each time 'src' is read, 'len' is decreased by one.
- * NOTE: neither cmd's should exit through 'goto' or 'break' statements.
- *---------------------------------------------------------------------------*/
-
-#define HDLC_ENCODE(src, len, tmp, tmp2, blevel, ib, crc, flag, gfrcmd, nmbcmd, wrdcmd, d) \
- \
- if (blevel >= 0x800) { blevel -= 0x800; goto j4##d; } \
- \
- if (!len--) \
- { \
- len++; \
- \
- switch(++flag) \
- { default: /* abort */ \
- tmp = blevel = 0; /* zero is default */ \
- tmp2 = 0xff; \
- goto j3##d; \
- case 1: /* 1st time FS */ \
- case 2: /* 2nd time FS */ \
- tmp2 = 0x7e; \
- goto j3##d; \
- case 3: \
- gfrcmd; /* get new frame */ \
- if (!len--) \
- { \
- len++; \
- flag--; /* don't proceed */ \
- tmp2 = 0x7e; \
- goto j3##d; /* final FS */ \
- } \
- else \
- { \
- crc = -1; \
- ib = 0; \
- goto j1##d; /* first byte */ \
- } \
- case 4: \
- nmbcmd; /* get next mbuf in chain */ \
- if (!len--) \
- { \
- len++; \
- crc ^= -1; \
- tmp2 = (u_char)crc; \
- goto j2##d; /* CRC (lsb's) */ \
- } \
- else \
- { \
- flag--; \
- goto j1##d; /* proceed with the frame */ \
- } \
- case 5: \
- tmp2 = (u_char)(crc >> 8); \
- flag = 1; \
- goto j2##d; /* CRC (msb's) */ \
- } \
- } \
- else \
- { j1##d : \
- tmp2 = (u_char)src; \
- crc =(HDLC_FCS_TAB[(u_char)(crc ^ tmp2)] ^ (u_char)(crc >> 8)); \
- j2##d: \
- \
- ib >>= 12; \
- ib += HDLC_BIT_TAB[(u_char)tmp2]; \
- \
- if ((u_char)ib >= 5) /* stuffing */ \
- { \
- blevel &= ~0xff; \
- \
- if (ib & 0xc0) /* bit stuff (msb) */ \
- { \
- tmp2 += tmp2 & (0xff * (ib & 0xc0)); \
- ib %= 0x5000; \
- blevel++; \
- } \
- \
- ib &= ~0xf0; \
- \
- if ((u_char)ib >= 5) /* bit stuff (lsb) */ \
- { \
- tmp2 += tmp2 & ~0x1f >> ((ib - (ib >> 8) + 1) \
- & 7); \
- blevel++; \
- \
- if ((u_char)ib >= 10) /* bit stuff (msb) */ \
- { \
- tmp2 += tmp2 & ~0x7ff >> ((ib - \
- (ib >> 8) + 1) & 7); \
- blevel++; \
- } \
- if (ib & 0x8000) /* bit walk */ \
- { \
- ib = ((u_char)ib % 5) << 12; \
- } \
- } \
- \
- tmp |= tmp2 << (u_char)(blevel >> 8); \
- blevel += (u_char)blevel << 8; \
- } \
- else /* no stuffing */ \
- { \
- j3##d:tmp |= tmp2 << (u_char)(blevel >> 8); \
- } \
- } \
- \
- j4##d: wrdcmd; \
- tmp >>= 8; \
-
-/*------ end of HDLC_ENCODE -------------------------------------------------*/
-
-
-#endif /* _I4B_HDLC_H_ */
diff --git a/sys/i4b/layer1/itjc/i4b_itjc_ext.h b/sys/i4b/layer1/itjc/i4b_itjc_ext.h
deleted file mode 100644
index 72631e510d96..000000000000
--- a/sys/i4b/layer1/itjc/i4b_itjc_ext.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2000, 2001 Sergio Prallon. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_itjc - NetJet PCI for split layers
- * ------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 10 17:15:31 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_ITJC_EXT_H_
-#define _I4B_ITJC_EXT_H_
-
-#include <i4b/include/i4b_l3l4.h>
-
-void itjc_set_linktab(int unit, int channel, drvr_link_t * dlt);
-isdn_link_t *itjc_ret_linktab(int unit, int channel);
-
-int itjc_ph_data_req(int unit, struct mbuf *m, int freeflag);
-int itjc_ph_activate_req(int unit);
-int itjc_mph_command_req(int unit, int command, void *parm);
-
-void itjc_isac_irq(struct l1_softc *sc, int ista);
-void itjc_isac_l1_cmd(struct l1_softc *sc, int command);
-int itjc_isac_init(struct l1_softc *sc);
-
-void itjc_recover(struct l1_softc *sc);
-char * itjc_printstate(struct l1_softc *sc);
-void itjc_next_state(struct l1_softc *sc, int event);
-
-#define ITJC_MAXUNIT 4
-extern struct l1_softc *itjc_scp[ITJC_MAXUNIT];
-
-#endif /* _I4B_ITJC_EXT_H_ */
diff --git a/sys/i4b/layer1/itjc/i4b_itjc_isac.c b/sys/i4b/layer1/itjc/i4b_itjc_isac.c
deleted file mode 100644
index d0d80c6e2653..000000000000
--- a/sys/i4b/layer1/itjc/i4b_itjc_isac.c
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_itjc_isac.c - i4b NetJet-S ISAC handler
- * --------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 10 17:15:54 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "itjc.h"
-#include "pci.h"
-
-#if (NITJC > 0)
-
-#include "opt_i4b.h"
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-#include <machine/stdarg.h>
-#include <machine/clock.h>
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-
-#include <i4b/layer1/itjc/i4b_itjc_ext.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_mbuf.h>
-
-static u_char itjc_isac_exir_hdlr(register struct l1_softc *sc, u_char exir);
-static void itjc_isac_ind_hdlr(register struct l1_softc *sc, int ind);
-
-/*---------------------------------------------------------------------------*
- * ISAC interrupt service routine
- *---------------------------------------------------------------------------*/
-void
-itjc_isac_irq(struct l1_softc *sc, int ista)
-{
- register u_char c = 0;
- NDBGL1(L1_F_MSG, "unit %d: ista = 0x%02x", sc->sc_unit, ista);
-
- if(ista & ISAC_ISTA_EXI) /* extended interrupt */
- {
- c |= itjc_isac_exir_hdlr(sc, ISAC_READ(I_EXIR));
- }
-
- if(ista & ISAC_ISTA_RME) /* receive message end */
- {
- register int rest;
- u_char rsta;
-
- /* get rx status register */
-
- rsta = ISAC_READ(I_RSTA);
-
- if((rsta & ISAC_RSTA_MASK) != 0x20)
- {
- int error = 0;
-
- if(!(rsta & ISAC_RSTA_CRC)) /* CRC error */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: CRC error", sc->sc_unit);
- }
-
- if(rsta & ISAC_RSTA_RDO) /* ReceiveDataOverflow */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: Data Overrun error", sc->sc_unit);
- }
-
- if(rsta & ISAC_RSTA_RAB) /* ReceiveABorted */
- {
- error++;
- NDBGL1(L1_I_ERR, "unit %d: Receive Aborted error", sc->sc_unit);
- }
-
- if(error == 0)
- NDBGL1(L1_I_ERR, "unit %d: RME unknown error, RSTA = 0x%02x!", sc->sc_unit, rsta);
-
- i4b_Dfreembuf(sc->sc_ibuf);
-
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
-
- ISAC_WRITE(I_CMDR, ISAC_CMDR_RMC|ISAC_CMDR_RRES);
- ISACCMDRWRDELAY();
-
- return;
- }
-
- rest = (ISAC_READ(I_RBCL) & (ISAC_FIFO_LEN-1));
-
- if(rest == 0)
- rest = ISAC_FIFO_LEN;
-
- if(sc->sc_ibuf == NULL)
- {
- if((sc->sc_ibuf = i4b_Dgetmbuf(rest)) != NULL)
- sc->sc_ib = sc->sc_ibuf->m_data;
- else
- panic("itjc_isac_irq: RME, i4b_Dgetmbuf returns NULL!\n");
- sc->sc_ilen = 0;
- }
-
- if(sc->sc_ilen <= (MAX_DFRAME_LEN - rest))
- {
- ISAC_RDFIFO(sc->sc_ib, rest);
- sc->sc_ilen += rest;
-
- sc->sc_ibuf->m_pkthdr.len =
- sc->sc_ibuf->m_len = sc->sc_ilen;
-
- if(sc->sc_trace & TRACE_D_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, sc->sc_ibuf->m_len, sc->sc_ibuf->m_data);
- }
-
- c |= ISAC_CMDR_RMC;
-
- if(sc->sc_enabled &&
- (ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S))
- {
- i4b_l1_ph_data_ind(L0ITJCUNIT(sc->sc_unit), sc->sc_ibuf);
- }
- else
- {
- i4b_Dfreembuf(sc->sc_ibuf);
- }
- }
- else
- {
- NDBGL1(L1_I_ERR, "RME, input buffer overflow!");
- i4b_Dfreembuf(sc->sc_ibuf);
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
- }
-
- if(ista & ISAC_ISTA_RPF) /* receive fifo full */
- {
- if(sc->sc_ibuf == NULL)
- {
- if((sc->sc_ibuf = i4b_Dgetmbuf(MAX_DFRAME_LEN)) != NULL)
- sc->sc_ib= sc->sc_ibuf->m_data;
- else
- panic("itjc_isac_irq: RPF, i4b_Dgetmbuf returns NULL!\n");
- sc->sc_ilen = 0;
- }
-
- if(sc->sc_ilen <= (MAX_DFRAME_LEN - ISAC_FIFO_LEN))
- {
- ISAC_RDFIFO(sc->sc_ib, ISAC_FIFO_LEN);
- sc->sc_ilen += ISAC_FIFO_LEN;
- sc->sc_ib += ISAC_FIFO_LEN;
- c |= ISAC_CMDR_RMC;
- }
- else
- {
- NDBGL1(L1_I_ERR, "RPF, input buffer overflow!");
- i4b_Dfreembuf(sc->sc_ibuf);
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
- }
-
- if(ista & ISAC_ISTA_XPR) /* transmit fifo empty (XPR bit set) */
- {
- if((sc->sc_obuf2 != NULL) && (sc->sc_obuf == NULL))
- {
- sc->sc_freeflag = sc->sc_freeflag2;
- sc->sc_obuf = sc->sc_obuf2;
- sc->sc_op = sc->sc_obuf->m_data;
- sc->sc_ol = sc->sc_obuf->m_len;
- sc->sc_obuf2 = NULL;
- }
-
- if(sc->sc_obuf)
- {
- ISAC_WRFIFO(sc->sc_op, min(sc->sc_ol, ISAC_FIFO_LEN));
-
- if(sc->sc_ol > ISAC_FIFO_LEN) /* length > 32 ? */
- {
- sc->sc_op += ISAC_FIFO_LEN; /* bufferptr+32 */
- sc->sc_ol -= ISAC_FIFO_LEN; /* length - 32 */
- c |= ISAC_CMDR_XTF; /* set XTF bit */
- }
- else
- {
- if(sc->sc_freeflag)
- {
- i4b_Dfreembuf(sc->sc_obuf);
- sc->sc_freeflag = 0;
- }
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
-
- c |= ISAC_CMDR_XTF | ISAC_CMDR_XME;
- }
- }
- else
- {
- sc->sc_state &= ~ISAC_TX_ACTIVE;
- }
- }
-
- if(ista & ISAC_ISTA_CISQ) /* channel status change CISQ */
- {
- register u_char ci;
-
- /* get command/indication rx register*/
-
- ci = ISAC_READ(I_CIRR);
-
- /* if S/Q IRQ, read SQC reg to clr SQC IRQ */
-
- if(ci & ISAC_CIRR_SQC)
- (void) ISAC_READ(I_SQRR);
-
- /* C/I code change IRQ (flag already cleared by CIRR read) */
-
- if(ci & ISAC_CIRR_CIC0)
- itjc_isac_ind_hdlr(sc, (ci >> 2) & 0xf);
- }
-
- if(c)
- {
- ISAC_WRITE(I_CMDR, c);
- ISACCMDRWRDELAY();
- }
-}
-
-/*---------------------------------------------------------------------------*
- * ISAC L1 Extended IRQ handler
- *---------------------------------------------------------------------------*/
-static u_char
-itjc_isac_exir_hdlr(register struct l1_softc *sc, u_char exir)
-{
- u_char c = 0;
-
- if(exir & ISAC_EXIR_XMR)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Tx Message Repeat");
-
- c |= ISAC_CMDR_XRES;
- }
-
- if(exir & ISAC_EXIR_XDU)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Tx Data Underrun");
-
- c |= ISAC_CMDR_XRES;
- }
-
- if(exir & ISAC_EXIR_PCE)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Protocol Error");
- }
-
- if(exir & ISAC_EXIR_RFO)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Rx Frame Overflow");
-
- c |= ISAC_CMDR_RMC|ISAC_CMDR_RRES;
- }
-
- if(exir & ISAC_EXIR_SOV)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Sync Xfer Overflow");
- }
-
- if(exir & ISAC_EXIR_MOS)
- {
- NDBGL1(L1_I_ERR, "EXIRQ Monitor Status");
- }
-
- if(exir & ISAC_EXIR_SAW)
- {
- /* cannot happen, STCR:TSF is set to 0 */
-
- NDBGL1(L1_I_ERR, "EXIRQ Subscriber Awake");
- }
-
- if(exir & ISAC_EXIR_WOV)
- {
- /* cannot happen, STCR:TSF is set to 0 */
-
- NDBGL1(L1_I_ERR, "EXIRQ Watchdog Timer Overflow");
- }
-
- return(c);
-}
-
-/*---------------------------------------------------------------------------*
- * ISAC L1 Indication handler
- *---------------------------------------------------------------------------*/
-static void
-itjc_isac_ind_hdlr(register struct l1_softc *sc, int ind)
-{
- register int event;
-
- switch(ind)
- {
- case ISAC_CIRR_IAI8:
- NDBGL1(L1_I_CICO, "rx AI8 in state %s", itjc_printstate(sc));
- itjc_isac_l1_cmd(sc, CMD_AR8);
- event = EV_INFO48;
- i4b_l1_mph_status_ind(L0ITJCUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- break;
-
- case ISAC_CIRR_IAI10:
- NDBGL1(L1_I_CICO, "rx AI10 in state %s", itjc_printstate(sc));
- itjc_isac_l1_cmd(sc, CMD_AR10);
- event = EV_INFO410;
- i4b_l1_mph_status_ind(L0ITJCUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- break;
-
- case ISAC_CIRR_IRSY:
- NDBGL1(L1_I_CICO, "rx RSY in state %s", itjc_printstate(sc));
- event = EV_RSY;
- break;
-
- case ISAC_CIRR_IPU:
- NDBGL1(L1_I_CICO, "rx PU in state %s", itjc_printstate(sc));
- event = EV_PU;
- break;
-
- case ISAC_CIRR_IDR:
- NDBGL1(L1_I_CICO, "rx DR in state %s", itjc_printstate(sc));
- itjc_isac_l1_cmd(sc, CMD_DIU);
- event = EV_DR;
- break;
-
- case ISAC_CIRR_IDID:
- NDBGL1(L1_I_CICO, "rx DID in state %s", itjc_printstate(sc));
- event = EV_INFO0;
- i4b_l1_mph_status_ind(L0ITJCUNIT(sc->sc_unit), STI_L1STAT, LAYER_IDLE, NULL);
- break;
-
- case ISAC_CIRR_IDIS:
- NDBGL1(L1_I_CICO, "rx DIS in state %s", itjc_printstate(sc));
- event = EV_DIS;
- break;
-
- case ISAC_CIRR_IEI:
- NDBGL1(L1_I_CICO, "rx EI in state %s", itjc_printstate(sc));
- itjc_isac_l1_cmd(sc, CMD_DIU);
- event = EV_EI;
- break;
-
- case ISAC_CIRR_IARD:
- NDBGL1(L1_I_CICO, "rx ARD in state %s", itjc_printstate(sc));
- event = EV_INFO2;
- break;
-
- case ISAC_CIRR_ITI:
- NDBGL1(L1_I_CICO, "rx TI in state %s", itjc_printstate(sc));
- event = EV_INFO0;
- break;
-
- case ISAC_CIRR_IATI:
- NDBGL1(L1_I_CICO, "rx ATI in state %s", itjc_printstate(sc));
- event = EV_INFO0;
- break;
-
- case ISAC_CIRR_ISD:
- NDBGL1(L1_I_CICO, "rx SD in state %s", itjc_printstate(sc));
- event = EV_INFO0;
- break;
-
- default:
- NDBGL1(L1_I_ERR, "UNKNOWN Indication 0x%x in state %s", ind, itjc_printstate(sc));
- event = EV_INFO0;
- break;
- }
- itjc_next_state(sc, event);
-}
-
-/*---------------------------------------------------------------------------*
- * execute a layer 1 command
- *---------------------------------------------------------------------------*/
-void
-itjc_isac_l1_cmd(struct l1_softc *sc, int command)
-{
- u_char cmd;
-
- if(command < 0 || command > CMD_ILL)
- {
- NDBGL1(L1_I_ERR, "illegal cmd 0x%x in state %s", command, itjc_printstate(sc));
- return;
- }
-
- cmd = ISAC_CIX0_LOW;
-
- switch(command)
- {
- case CMD_TIM:
- NDBGL1(L1_I_CICO, "tx TIM in state %s", itjc_printstate(sc));
- cmd |= (ISAC_CIXR_CTIM << 2);
- break;
-
- case CMD_RS:
- NDBGL1(L1_I_CICO, "tx RS in state %s", itjc_printstate(sc));
- cmd |= (ISAC_CIXR_CRS << 2);
- break;
-
- case CMD_AR8:
- NDBGL1(L1_I_CICO, "tx AR8 in state %s", itjc_printstate(sc));
- cmd |= (ISAC_CIXR_CAR8 << 2);
- break;
-
- case CMD_AR10:
- NDBGL1(L1_I_CICO, "tx AR10 in state %s", itjc_printstate(sc));
- cmd |= (ISAC_CIXR_CAR10 << 2);
- break;
-
- case CMD_DIU:
- NDBGL1(L1_I_CICO, "tx DIU in state %s", itjc_printstate(sc));
- cmd |= (ISAC_CIXR_CDIU << 2);
- break;
- }
- ISAC_WRITE(I_CIXR, cmd);
-}
-
-/*---------------------------------------------------------------------------*
- * L1 ISAC initialization
- *---------------------------------------------------------------------------*/
-int
-itjc_isac_init(struct l1_softc *sc)
-{
- ISAC_IMASK = 0xff; /* disable all irqs */
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- NDBGL1(L1_I_SETUP, "configuring for IOM-2 mode");
-
- /* ADF2: Select mode IOM-2 */
- ISAC_WRITE(I_ADF2, ISAC_ADF2_IMS);
-
- /* SPCR: serial port control register:
- * SPU - software power up = 0
- * SPM - timing mode 0
- * TLP - test loop = 0
- * C1C, C2C - B1 + C1 and B2 + IC2 monitoring
- */
- ISAC_WRITE(I_SPCR, 0x00);
-
- /* SQXR: S/Q channel xmit register:
- * IDC - IOM direction = 0 (master)
- * CFS - Config Select = 0 (clock always active)
- * CI1E - C/I channel 1 IRQ enable = 0
- * SQIE - S/Q IRQ enable = 0
- * SQX1-4 - Fa bits = 1
- */
- ISAC_WRITE(I_SQXR, ISAC_SQXR_SQX1|ISAC_SQXR_SQX2|ISAC_SQXR_SQX3|ISAC_SQXR_SQX4);
-
- /* ADF1: additional feature reg 1:
- * WTC - watchdog = 0
- * TEM - test mode = 0
- * PFS - pre-filter = 0
- * IOF - IOM i/f off = 0
- * ITF - interframe fill = idle
- */
- ISAC_WRITE(I_ADF1, 0x00);
-
- /* STCR: sync transfer control reg:
- * TSF - terminal secific functions = 0
- * TBA - TIC bus address = 7
- * STx/SCx = 0
- */
- ISAC_WRITE(I_STCR, ISAC_STCR_TBA2|ISAC_STCR_TBA1|ISAC_STCR_TBA0);
-
- /* MODE: Mode Register:
- * MDSx - transparent mode 2
- * TMD - timer mode = external
- * RAC - Receiver enabled
- * DIMx - digital i/f mode
- */
- ISAC_WRITE(I_MODE, ISAC_MODE_MDS2|ISAC_MODE_MDS1|ISAC_MODE_RAC|ISAC_MODE_DIM0);
-
- /* enabled interrupts:
- * ===================
- * RME - receive message end
- * RPF - receive pool full
- * XPR - transmit pool ready
- * CISQ - CI or S/Q channel change
- * EXI - extended interrupt
- */
-
- ISAC_IMASK = ISAC_MASK_RSC | /* auto mode only */
- ISAC_MASK_TIN | /* timer irq */
- ISAC_MASK_SIN; /* sync xfer irq */
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-
- return(0);
-}
-
-#endif /* NITJC > 0 */
diff --git a/sys/i4b/layer1/itjc/i4b_itjc_l1.c b/sys/i4b/layer1/itjc/i4b_itjc_l1.c
deleted file mode 100644
index 6952caf67c23..000000000000
--- a/sys/i4b/layer1/itjc/i4b_itjc_l1.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_itjc_l1.c - NetJet-S layer 1 handler
- * ---------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 10 17:16:19 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "itjc.h"
-#include "pci.h"
-
-#if (NITJC > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-#include <machine/stdarg.h>
-#include <machine/clock.h>
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-
-#include <i4b/layer1/itjc/i4b_itjc_ext.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_mbuf.h>
-#include <i4b/include/i4b_global.h>
-
-/*---------------------------------------------------------------------------*
- *
- * L2 -> L1: PH-DATA-REQUEST
- * =========================
- *
- * parms:
- * unit physical interface unit number
- * m mbuf containing L2 frame to be sent out
- * freeflag MBUF_FREE: free mbuf here after having sent
- * it out
- * MBUF_DONTFREE: mbuf is freed by Layer 2
- * returns:
- * ==0 fail, nothing sent out
- * !=0 ok, frame sent out
- *
- *---------------------------------------------------------------------------*/
-int
-itjc_ph_data_req(int unit, struct mbuf *m, int freeflag)
-{
- u_char cmd;
- int s;
- struct l1_softc *sc = itjc_scp[unit];
-
- NDBGL1(L1_PRIM, "PH-DATA-REQ, unit %d, freeflag=%d", unit, freeflag);
-
- if(m == NULL) /* failsafe */
- return (0);
-
- s = SPLI4B();
-
- if(sc->sc_I430state == ST_F3) /* layer 1 not running ? */
- {
- NDBGL1(L1_I_ERR, "still in state F3!");
- itjc_ph_activate_req(unit);
- }
-
- if(sc->sc_state & ISAC_TX_ACTIVE)
- {
- if(sc->sc_obuf2 == NULL)
- {
- sc->sc_obuf2 = m; /* save mbuf ptr */
-
- if(freeflag)
- sc->sc_freeflag2 = 1; /* IRQ must mfree */
- else
- sc->sc_freeflag2 = 0; /* IRQ must not mfree */
-
- NDBGL1(L1_I_MSG, "using 2nd ISAC TX buffer, state = %s", itjc_printstate(sc));
-
- if(sc->sc_trace & TRACE_D_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ITJCUNIT(unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
- splx(s);
- return(1);
- }
-
- NDBGL1(L1_I_ERR, "No Space in TX FIFO, state = %s", itjc_printstate(sc));
-
- if(freeflag == MBUF_FREE)
- i4b_Dfreembuf(m);
-
- splx(s);
- return (0);
- }
-
- if(sc->sc_trace & TRACE_D_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0ITJCUNIT(unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_dcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, m->m_len, m->m_data);
- }
-
- sc->sc_state |= ISAC_TX_ACTIVE; /* set transmitter busy flag */
-
- NDBGL1(L1_I_MSG, "ISAC_TX_ACTIVE set");
-
- sc->sc_freeflag = 0; /* IRQ must NOT mfree */
-
- ISAC_WRFIFO(m->m_data, min(m->m_len, ISAC_FIFO_LEN)); /* output to TX fifo */
-
- if(m->m_len > ISAC_FIFO_LEN) /* message > 32 bytes ? */
- {
- sc->sc_obuf = m; /* save mbuf ptr */
- sc->sc_op = m->m_data + ISAC_FIFO_LEN; /* ptr for irq hdl */
- sc->sc_ol = m->m_len - ISAC_FIFO_LEN; /* length for irq hdl */
-
- if(freeflag)
- sc->sc_freeflag = 1; /* IRQ must mfree */
-
- cmd = ISAC_CMDR_XTF;
- }
- else
- {
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
-
- if(freeflag)
- i4b_Dfreembuf(m);
-
- cmd = ISAC_CMDR_XTF | ISAC_CMDR_XME;
- }
-
- ISAC_WRITE(I_CMDR, cmd);
- ISACCMDRWRDELAY();
-
- splx(s);
-
- return(1);
-}
-
-/*---------------------------------------------------------------------------*
- *
- * L2 -> L1: PH-ACTIVATE-REQUEST
- * =============================
- *
- * parms:
- * unit physical interface unit number
- *
- * returns:
- * ==0
- * !=0
- *
- *---------------------------------------------------------------------------*/
-int
-itjc_ph_activate_req(int unit)
-{
- struct l1_softc *sc = itjc_scp[unit];
- NDBGL1(L1_PRIM, "PH-ACTIVATE-REQ, unit %d", unit);
- itjc_next_state(sc, EV_PHAR);
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * command from the upper layers
- *---------------------------------------------------------------------------*/
-int
-itjc_mph_command_req(int unit, int command, void *parm)
-{
- struct l1_softc *sc = itjc_scp[unit];
-
- switch(command)
- {
- case CMR_DOPEN: /* daemon running */
- NDBGL1(L1_PRIM, "unit %d, command = CMR_DOPEN", unit);
- sc->sc_enabled = 1;
- break;
-
- case CMR_DCLOSE: /* daemon not running */
- NDBGL1(L1_PRIM, "unit %d, command = CMR_DCLOSE", unit);
- sc->sc_enabled = 0;
- break;
-
- case CMR_SETTRACE:
- NDBGL1(L1_PRIM, "unit %d, command = CMR_SETTRACE, parm = %d", unit, (unsigned int)parm);
- sc->sc_trace = (unsigned int)parm;
- break;
-
- default:
- NDBGL1(L1_ERROR, "ERROR, unknown command = %d, unit = %d, parm = %d", command, unit, (unsigned int)parm);
- break;
- }
-
- return(0);
-}
-
-#endif /* NITJC > 0 */
diff --git a/sys/i4b/layer1/itjc/i4b_itjc_l1fsm.c b/sys/i4b/layer1/itjc/i4b_itjc_l1fsm.c
deleted file mode 100644
index 2bc902a3341e..000000000000
--- a/sys/i4b/layer1/itjc/i4b_itjc_l1fsm.c
+++ /dev/null
@@ -1,520 +0,0 @@
-/*
- * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_itjc_l1fsm.c - NetJet-S layer 1 I.430 state machine
- * ------------------------------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Wed Jan 10 17:16:33 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "itjc.h"
-#include "pci.h"
-
-#if (NITJC > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-#include <machine/stdarg.h>
-#include <machine/clock.h>
-
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-#include <i4b/layer1/isic/i4b_hscx.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_global.h>
-
-#include <i4b/include/i4b_mbuf.h>
-
-#include <i4b/layer1/itjc/i4b_itjc_ext.h>
-
-#if DO_I4B_DEBUG
-static char *state_text[N_STATES] = {
- "F3 Deactivated",
- "F4 Awaiting Signal",
- "F5 Identifying Input",
- "F6 Synchronized",
- "F7 Activated",
- "F8 Lost Framing",
- "Illegal State"
-};
-
-static char *event_text[N_EVENTS] = {
- "EV_PHAR PH_ACT_REQ",
- "EV_T3 Timer 3 expired",
- "EV_INFO0 INFO0 received",
- "EV_RSY Level Detected",
- "EV_INFO2 INFO2 received",
- "EV_INFO48 INFO4 received",
- "EV_INFO410 INFO4 received",
- "EV_DR Deactivate Req",
- "EV_PU Power UP",
- "EV_DIS Disconnected",
- "EV_EI Error Ind",
- "Illegal Event"
-};
-#endif
-
-/* Function prototypes */
-
-static void timer3_expired (struct l1_softc *sc);
-static void T3_start (struct l1_softc *sc);
-static void T3_stop (struct l1_softc *sc);
-static void F_T3ex (struct l1_softc *sc);
-static void timer4_expired (struct l1_softc *sc);
-static void T4_start (struct l1_softc *sc);
-static void T4_stop (struct l1_softc *sc);
-static void F_AI8 (struct l1_softc *sc);
-static void F_AI10 (struct l1_softc *sc);
-static void F_I01 (struct l1_softc *sc);
-static void F_I02 (struct l1_softc *sc);
-static void F_I03 (struct l1_softc *sc);
-static void F_I2 (struct l1_softc *sc);
-static void F_ill (struct l1_softc *sc);
-static void F_NULL (struct l1_softc *sc);
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 expire function
- *---------------------------------------------------------------------------*/
-static void
-timer3_expired(struct l1_softc *sc)
-{
- if(sc->sc_I430T3)
- {
- NDBGL1(L1_T_ERR, "state = %s", itjc_printstate(sc));
- sc->sc_I430T3 = 0;
-
- /* XXX try some recovery here XXX */
-
- itjc_recover(sc);
-
- sc->sc_init_tries++; /* increment retry count */
-
-/*XXX*/ if(sc->sc_init_tries > 4)
- {
- int s = SPLI4B();
-
- sc->sc_init_tries = 0;
-
- if(sc->sc_obuf2 != NULL)
- {
- i4b_Dfreembuf(sc->sc_obuf2);
- sc->sc_obuf2 = NULL;
- }
- if(sc->sc_obuf != NULL)
- {
- i4b_Dfreembuf(sc->sc_obuf);
- sc->sc_obuf = NULL;
- sc->sc_freeflag = 0;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
- }
-
- splx(s);
-
- i4b_l1_mph_status_ind(L0ITJCUNIT(sc->sc_unit), STI_NOL1ACC, 0, NULL);
- }
-
- itjc_next_state(sc, EV_T3);
- }
- else
- {
- NDBGL1(L1_T_ERR, "expired without starting it ....");
- }
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 start
- *---------------------------------------------------------------------------*/
-static void
-T3_start(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", itjc_printstate(sc));
- sc->sc_I430T3 = 1;
- sc->sc_T3_callout = timeout((TIMEOUT_FUNC_T)timer3_expired,(struct l1_softc *)sc, 2*hz);
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 stop
- *---------------------------------------------------------------------------*/
-static void
-T3_stop(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", itjc_printstate(sc));
-
- sc->sc_init_tries = 0; /* init connect retry count */
-
- if(sc->sc_I430T3)
- {
- sc->sc_I430T3 = 0;
- untimeout((TIMEOUT_FUNC_T)timer3_expired,(struct l1_softc *)sc, sc->sc_T3_callout);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * I.430 Timer T3 expiry
- *---------------------------------------------------------------------------*/
-static void
-F_T3ex(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_T3ex executing");
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0ITJCUNIT(sc->sc_unit));
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 expire function
- *---------------------------------------------------------------------------*/
-static void
-timer4_expired(struct l1_softc *sc)
-{
- if(sc->sc_I430T4)
- {
- NDBGL1(L1_T_MSG, "state = %s", itjc_printstate(sc));
- sc->sc_I430T4 = 0;
- i4b_l1_mph_status_ind(L0ITJCUNIT(sc->sc_unit), STI_PDEACT, 0, NULL);
- }
- else
- {
- NDBGL1(L1_T_ERR, "expired without starting it ....");
- }
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 start
- *---------------------------------------------------------------------------*/
-static void
-T4_start(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", itjc_printstate(sc));
- sc->sc_I430T4 = 1;
- sc->sc_T4_callout = timeout((TIMEOUT_FUNC_T)timer4_expired,(struct l1_softc *)sc, hz);
-}
-
-/*---------------------------------------------------------------------------*
- * Timer T4 stop
- *---------------------------------------------------------------------------*/
-static void
-T4_stop(struct l1_softc *sc)
-{
- NDBGL1(L1_T_MSG, "state = %s", itjc_printstate(sc));
-
- if(sc->sc_I430T4)
- {
- sc->sc_I430T4 = 0;
- untimeout((TIMEOUT_FUNC_T)timer4_expired,(struct l1_softc *)sc, sc->sc_T4_callout);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received AI8
- *---------------------------------------------------------------------------*/
-static void
-F_AI8(struct l1_softc *sc)
-{
- T4_stop(sc);
-
- NDBGL1(L1_F_MSG, "FSM function F_AI8 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_activate_ind(L0ITJCUNIT(sc->sc_unit));
-
- T3_stop(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO4_8;
-
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received AI10
- *---------------------------------------------------------------------------*/
-static void
-F_AI10(struct l1_softc *sc)
-{
- T4_stop(sc);
-
- NDBGL1(L1_F_MSG, "FSM function F_AI10 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_activate_ind(L0ITJCUNIT(sc->sc_unit));
-
- T3_stop(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO4_10;
-
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in states F3 .. F5
- *---------------------------------------------------------------------------*/
-static void
-F_I01(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I01 executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in state F6
- *---------------------------------------------------------------------------*/
-static void
-F_I02(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I02 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0ITJCUNIT(sc->sc_unit));
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO 0 in state F7 or F8
- *---------------------------------------------------------------------------*/
-static void
-F_I03(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I03 executing");
-
- if(ctrl_desc[sc->sc_unit].protocol != PROTOCOL_D64S)
- i4b_l1_ph_deactivate_ind(L0ITJCUNIT(sc->sc_unit));
-
- T4_start(sc);
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO0;
-
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: activate request
- *---------------------------------------------------------------------------*/
-static void
-F_AR(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_AR executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO1_8;
-
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_TE;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-
- itjc_isac_l1_cmd(sc, CMD_AR8);
-
- T3_start(sc);
-}
-
-/*---------------------------------------------------------------------------*
- * FSM function: received INFO2
- *---------------------------------------------------------------------------*/
-static void
-F_I2(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_I2 executing");
-
- if(sc->sc_trace & TRACE_I)
- {
- i4b_trace_hdr_t hdr;
- char info = INFO2;
-
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = TRC_CH_I;
- hdr.dir = FROM_NT;
- hdr.count = 0;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, 1, &info);
- }
-
-}
-
-/*---------------------------------------------------------------------------*
- * illegal state default action
- *---------------------------------------------------------------------------*/
-static void
-F_ill(struct l1_softc *sc)
-{
- NDBGL1(L1_F_ERR, "FSM function F_ill executing");
-}
-
-/*---------------------------------------------------------------------------*
- * No action
- *---------------------------------------------------------------------------*/
-static void
-F_NULL(struct l1_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_NULL executing");
-}
-
-
-/*---------------------------------------------------------------------------*
- * layer 1 state transition table
- *---------------------------------------------------------------------------*/
-struct itjc_state_tab {
- void (*func) (struct l1_softc *sc); /* function to execute */
- int newstate; /* next state */
-} itjc_state_tab[N_EVENTS][N_STATES] = {
-
-/* STATE: F3 F4 F5 F6 F7 F8 ILLEGAL STATE */
-/* -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
-/* EV_PHAR x*/ {{F_AR, ST_F4}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_ill, ST_ILL}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_T3 x*/ {{F_NULL, ST_F3}, {F_T3ex, ST_F3}, {F_T3ex, ST_F3}, {F_T3ex, ST_F3}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_INFO0 */ {{F_I01, ST_F3}, {F_I01, ST_F4}, {F_I01, ST_F5}, {F_I02, ST_F3}, {F_I03, ST_F3}, {F_I03, ST_F3}, {F_ill, ST_ILL}},
-/* EV_RSY x*/ {{F_NULL, ST_F3}, {F_NULL, ST_F5}, {F_NULL, ST_F5}, {F_NULL, ST_F8}, {F_NULL, ST_F8}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_INFO2 */ {{F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_I2, ST_F6}, {F_ill, ST_ILL}},
-/* EV_INFO48*/ {{F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_AI8, ST_F7}, {F_NULL, ST_F7}, {F_AI8, ST_F7}, {F_ill, ST_ILL}},
-/* EV_INFO41*/ {{F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_AI10, ST_F7}, {F_NULL, ST_F7}, {F_AI10, ST_F7}, {F_ill, ST_ILL}},
-/* EV_DR */ {{F_NULL, ST_F3}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_PU */ {{F_NULL, ST_F3}, {F_NULL, ST_F4}, {F_NULL, ST_F5}, {F_NULL, ST_F6}, {F_NULL, ST_F7}, {F_NULL, ST_F8}, {F_ill, ST_ILL}},
-/* EV_DIS */ {{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}},
-/* EV_EI */ {{F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_NULL, ST_F3}, {F_ill, ST_ILL}},
-/* EV_ILL */ {{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}}
-};
-
-/*---------------------------------------------------------------------------*
- * event handler
- *---------------------------------------------------------------------------*/
-void
-itjc_next_state(struct l1_softc *sc, int event)
-{
- int currstate, newstate;
-
- if(event >= N_EVENTS)
- panic("i4b_l1fsm.c: event >= N_EVENTS\n");
-
- currstate = sc->sc_I430state;
-
- if(currstate >= N_STATES)
- panic("i4b_l1fsm.c: currstate >= N_STATES\n");
-
- newstate = itjc_state_tab[event][currstate].newstate;
-
- if(newstate >= N_STATES)
- panic("i4b_l1fsm.c: newstate >= N_STATES\n");
-
- NDBGL1(L1_F_MSG, "FSM event [%s]: [%s => %s]", event_text[event],
- state_text[currstate],
- state_text[newstate]);
-
- (*itjc_state_tab[event][currstate].func)(sc);
-
- if(newstate == ST_ILL)
- {
- newstate = ST_F3;
- NDBGL1(L1_F_ERR, "FSM Illegal State ERROR, oldstate = %s, newstate = %s, event = %s!",
- state_text[currstate],
- state_text[newstate],
- event_text[event]);
- }
-
- sc->sc_I430state = newstate;
-}
-
-#if DO_I4B_DEBUG
-/*---------------------------------------------------------------------------*
- * return pointer to current state description
- *---------------------------------------------------------------------------*/
-char *
-itjc_printstate(struct l1_softc *sc)
-{
- return((char *) state_text[sc->sc_I430state]);
-}
-#endif
-
-#endif /* NITJC > 0 */
diff --git a/sys/i4b/layer1/itjc/i4b_itjc_pci.c b/sys/i4b/layer1/itjc/i4b_itjc_pci.c
deleted file mode 100644
index 28bea9074e5a..000000000000
--- a/sys/i4b/layer1/itjc/i4b_itjc_pci.c
+++ /dev/null
@@ -1,2134 +0,0 @@
-/*
- * Copyright (c) 2000, 2001 Sergio Prallon. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- * 4. Altered versions must be plainly marked as such, and must not be
- * misrepresented as being the original software and/or documentation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_itjc_pci.c: NetJet-S hardware driver
- * ----------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Thu Jan 11 11:29:38 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "itjc.h"
-#include "opt_i4b.h"
-#include "pci.h"
-
-#if (NITJC > 0)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-
-#include <machine/clock.h>
-#include <machine/bus_pio.h>
-#include <machine/bus.h>
-#include <machine/resource.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#include <pci/pcireg.h>
-#include <pci/pcivar.h>
-
-#include <sys/socket.h>
-#include <net/if.h>
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_mbuf.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/itjc/i4b_hdlc.h> /* XXXXXXXXXXXXXXXXXXXXXXXX */
-
-#include <i4b/layer1/isic/i4b_isic.h>
-#include <i4b/layer1/isic/i4b_isac.h>
-
-#include <i4b/layer1/itjc/i4b_itjc_ext.h>
-
-#define PCI_TJNET_VID (0xe159)
-#define PCI_TJ300_DID (0x0001)
-
-
-/*
- * Function prototypes
- */
-
-static int itjc_probe(device_t dev);
-static int itjc_attach(device_t dev);
-static void itjc_shutdown(device_t dev);
-static void itjc_intr(void *xsc);
-static int itjc_dma_start(struct l1_softc *sc);
-static void itjc_dma_stop(struct l1_softc *sc);
-static void itjc_isac_intr(struct l1_softc *sc);
-static void itjc_init_linktab(struct l1_softc *sc);
-static void itjc_bchannel_setup(int unit, int h_chan, int bprot,
- int activate);
-static void itjc_bchannel_stat(int unit, int h_chan, bchan_statistics_t *bsp);
-
-
-/*
- * Shorter names to bus resource manager routines.
- */
-
-#define itjc_bus_setup(sc) \
- bus_space_handle_t h = \
- rman_get_bushandle((sc)->sc_resources.io_base[0]); \
- bus_space_tag_t t = \
- rman_get_bustag((sc)->sc_resources.io_base[0]);
-
-#define itjc_read_1(port) (bus_space_read_1(t, h, (port)))
-#define itjc_read_4(port) (bus_space_read_4(t, h, (port)))
-#define itjc_write_1(port, data) (bus_space_write_1(t, h, (port), (data)))
-#define itjc_write_4(port, data) (bus_space_write_4(t, h, (port), (data)))
-#define itjc_read_multi_1(port, buf, size) \
- (bus_space_read_multi_1(t, h, (port), (buf), (size)))
-#define itjc_write_multi_1(port, buf, size) \
- (bus_space_write_multi_1(t, h, (port), (buf), (size)))
-
-
-/*---------------------------------------------------------------------------*
- * Glue data to register ourselves as a PCI device driver.
- *---------------------------------------------------------------------------*/
-
-static device_method_t itjc_pci_methods[] =
-{
- /* Device interface */
- DEVMETHOD(device_probe, itjc_probe),
- DEVMETHOD(device_attach, itjc_attach),
- DEVMETHOD(device_shutdown, itjc_shutdown),
-
- /* bus interface */
- DEVMETHOD(bus_print_child, bus_generic_print_child),
- DEVMETHOD(bus_driver_added, bus_generic_driver_added),
-
- { 0, 0 }
-};
-
-static driver_t itjc_pci_driver =
-{
- "itjc",
- itjc_pci_methods,
- sizeof(struct l1_softc)
-};
-
-static devclass_t itjc_pci_devclass;
-
-DRIVER_MODULE(netjet, pci, itjc_pci_driver, itjc_pci_devclass, 0, 0);
-
-/*
- * Jump table for multiplex routines.
- */
-
-struct i4b_l1mux_func itjc_l1mux_func =
-{
- itjc_ret_linktab,
- itjc_set_linktab,
- itjc_mph_command_req,
- itjc_ph_data_req,
- itjc_ph_activate_req,
-};
-
-struct l1_softc *itjc_scp[ITJC_MAXUNIT];
-
-
-/*---------------------------------------------------------------------------*
- * Tiger300/320 PCI ASIC registers.
- *---------------------------------------------------------------------------*/
-
-/*
- * Register offsets from i/o base.
- */
-enum tiger_regs
-{
- TIGER_RESET_PIB_CL_TIME = 0x00,
- TIGER_DMA_OPER = 0x01,
- TIGER_AUX_PORT_CNTL = 0x02,
- TIGER_AUX_PORT_DATA = 0x03,
- TIGER_INT0_MASK = 0x04,
- TIGER_INT1_MASK = 0x05,
- TIGER_INT0_STATUS = 0x06,
- TIGER_INT1_STATUS = 0x07,
- TIGER_DMA_WR_START_ADDR = 0x08,
- TIGER_DMA_WR_INT_ADDR = 0x0C,
- TIGER_DMA_WR_END_ADDR = 0x10,
- TIGER_DMA_WR_CURR_ADDR = 0x14,
- TIGER_DMA_RD_START_ADDR = 0x18,
- TIGER_DMA_RD_INT_ADDR = 0x1C,
- TIGER_DMA_RD_END_ADDR = 0x20,
- TIGER_DMA_RD_CURR_ADDR = 0x24,
- TIGER_PULSE_COUNTER = 0x28,
-};
-
-/*
- * Bits on the above registers.
- */
-
-enum tiger_reg_bits
-{
-/* Reset and PIB Cycle Timing */
-
- TIGER_DMA_OP_MODE_MASK = 0x80,
- TIGER_SELF_ADDR_DMA = 0x00, /* Wrap around ending addr */
- TIGER_NORMAL_DMA = 0x80, /* Stop at ending addr */
-
- TIGER_DMA_INT_MODE_MASK = 0x40,
- TIGER_DONT_LATCH_DMA_INT= 0x00, /* Bits on int0 status will be
- set only while curr addr
- equals int or end addr */
- TIGER_LATCH_DMA_INT = 0x40, /* Bits on int0 status remain
- set until cleared by CPU */
-
- TIGER_PIB_CYCLE_TIMING_MASK = 0x30,
- TIGER_PIB_3_CYCLES = 0x00,
- TIGER_PIB_5_CYCLES = 0x01,
- TIGER_PIB_12_CYCLES = 0x10,
-
- TIGER_RESET_MASK = 0x0F,
- TIGER_RESET_PULSE_COUNT = 0x08,
- TIGER_RESET_SERIAL_PORT = 0x04,
- TIGER_RESET_DMA_LOGIC = 0x02,
- TIGER_RESET_EXTERNAL = 0x01,
- TIGER_RESET_ALL = 0x0F,
-
-/* DMA Operation */
- TIGER_DMA_RESTART_MASK = 0x02,
- TIGER_HOLD_DMA = 0x00,
- TIGER_RESTART_DMA = 0x00,
-
- TIGER_DMA_ENABLE_MASK = 0x01,
- TIGER_ENABLE_DMA = 0x01,
- TIGER_DISABLE_DMA = 0x00,
-
-/* AUX Port Control & Data plus Interrupt 1 Mask & Status */
- TIGER_AUX_7_MASK = 0x80,
- TIGER_AUX_6_MASK = 0x40,
- TIGER_AUX_5_MASK = 0x20,
- TIGER_AUX_4_MASK = 0x10,
- TIGER_ISAC_INT_MASK = 0x10,
- TIGER_AUX_3_MASK = 0x08,
- TIGER_AUX_2_MASK = 0x04,
- TIGER_AUX_1_MASK = 0x02,
- TIGER_AUX_0_MASK = 0x01,
-
-/* AUX Port Control */
- TIGER_AUX_7_IS_INPUT = 0x00,
- TIGER_AUX_7_IS_OUTPUT = 0x80,
- TIGER_AUX_6_IS_INPUT = 0x00,
- TIGER_AUX_6_IS_OUTPUT = 0x40,
- TIGER_AUX_5_IS_INPUT = 0x00,
- TIGER_AUX_5_IS_OUTPUT = 0x20,
- TIGER_AUX_4_IS_INPUT = 0x00,
- TIGER_AUX_4_IS_OUTPUT = 0x10,
- TIGER_AUX_3_IS_INPUT = 0x00,
- TIGER_AUX_3_IS_OUTPUT = 0x80,
- TIGER_AUX_2_IS_INPUT = 0x00,
- TIGER_AUX_2_IS_OUTPUT = 0x40,
- TIGER_AUX_1_IS_INPUT = 0x00,
- TIGER_AUX_1_IS_OUTPUT = 0x20,
- TIGER_AUX_0_IS_INPUT = 0x00,
- TIGER_AUX_0_IS_OUTPUT = 0x10,
- TIGER_AUX_NJ_DEFAULT = 0xEF, /* All but ISAC int is output */
-
-/* Interrupt 0 Mask & Status */
- TIGER_PCI_TARGET_ABORT_INT_MASK = 0x20,
- TIGER_NO_TGT_ABORT_INT = 0x00,
- TIGER_TARGET_ABORT_INT = 0x20,
- TIGER_PCI_MASTER_ABORT_INT_MASK = 0x10,
- TIGER_NO_MST_ABORT_INT = 0x00,
- TIGER_MASTER_ABORT_INT = 0x10,
- TIGER_DMA_RD_END_INT_MASK = 0x08,
- TIGER_NO_RD_END_INT = 0x00,
- TIGER_RD_END_INT = 0x08,
- TIGER_DMA_RD_INT_INT_MASK = 0x04,
- TIGER_NO_RD_INT_INT = 0x00,
- TIGER_RD_INT_INT = 0x04,
- TIGER_DMA_WR_END_INT_MASK = 0x02,
- TIGER_NO_WR_END_INT = 0x00,
- TIGER_WR_END_INT = 0x02,
- TIGER_DMA_WR_INT_INT_MASK = 0x01,
- TIGER_NO_WR_INT_INT = 0x00,
- TIGER_WR_INT_INT = 0x01,
-
-/* Interrupt 1 Mask & Status */
- TIGER_NO_AUX_7_INT = 0x00,
- TIGER_AUX_7_INT = 0x80,
- TIGER_NO_AUX_6_INT = 0x00,
- TIGER_AUX_6_INT = 0x40,
- TIGER_NO_AUX_5_INT = 0x00,
- TIGER_AUX_5_INT = 0x20,
- TIGER_NO_AUX_4_INT = 0x00,
- TIGER_AUX_4_INT = 0x10,
- TIGER_NO_ISAC_INT = 0x00,
- TIGER_ISAC_INT = 0x10,
- TIGER_NO_AUX_3_INT = 0x00,
- TIGER_AUX_3_INT = 0x08,
- TIGER_NO_AUX_2_INT = 0x00,
- TIGER_AUX_2_INT = 0x04,
- TIGER_NO_AUX_1_INT = 0x00,
- TIGER_AUX_1_INT = 0x02,
- TIGER_NO_AUX_0_INT = 0x00,
- TIGER_AUX_0_INT = 0x01
-};
-
-/*
- * Peripheral Interface Bus definitions. This is an ISA like bus
- * created by the Tiger ASIC to keep ISA chips like the ISAC happy
- * on a PCI environment.
- *
- * Since the PIB only supplies 4 addressing lines, the 2 higher bits
- * (A4 & A5) of the ISAC register addresses are wired on the 2 lower
- * AUX lines. Another restriction is that all I/O to the PIB (8bit
- * wide) is mapped on the PCI side as 32bit data. So the PCI address
- * of a given ISAC register has to be multiplied by 4 before being
- * added to the PIB base offset.
- */
-enum tiger_pib_regs_defs
-{
- /* Offset from the I/O base to the ISAC registers. */
- PIB_OFFSET = 0xC0,
- PIB_LO_ADDR_MASK = 0x0F,
- PIB_HI_ADDR_MASK = 0x30,
- PIB_LO_ADDR_SHIFT = 2, /* Align on dword boundary */
- PIB_HI_ADDR_SHIFT = 4 /* Right shift to AUX_1 & AUX_0 */
-};
-
-
-#define itjc_set_pib_addr_msb(a) \
-( \
- itjc_write_1(TIGER_AUX_PORT_DATA, \
- ((a) & PIB_HI_ADDR_MASK) >> PIB_HI_ADDR_SHIFT) \
-)
-
-#define itjc_pib_2_pci(a) \
-( \
- (((a) & PIB_LO_ADDR_MASK) << PIB_LO_ADDR_SHIFT) + PIB_OFFSET \
-)
-
-#define itjc_get_dma_offset(ctx,reg) \
-( \
- (u_int16_t)((bus_addr_t)itjc_read_4((reg)) - (ctx)->bus_addr) \
-)
-
-
-/*
- * IOM-2 serial channel 0 DMA data ring buffers.
- *
- * The Tiger300/320 ASIC do not nothing more than transfer via DMA the
- * first 32 bits of every IOM-2 frame on the serial interface to the
- * ISAC. So we have no framing/deframing facilities like we would have
- * with an HSCX, having to do the job with CPU cycles. On the plus side
- * we are able to specify large rings which can limit the occurrence of
- * over/underruns.
- */
-
-enum
-{
- ITJC_RING_SLOT_WORDS = 64,
- ITJC_RING_WORDS = 3 * ITJC_RING_SLOT_WORDS,
- ITJC_RING_SLOT_BYTES = 4 * ITJC_RING_SLOT_WORDS,
- ITJC_RING_BYTES = 4 * ITJC_RING_WORDS,
- ITJC_DMA_POOL_WORDS = 2 * ITJC_RING_WORDS,
- ITJC_DMA_POOL_BYTES = 4 * ITJC_DMA_POOL_WORDS
-};
-
-#define itjc_ring_add(x, d) (((x) + 4 * (d)) % ITJC_RING_BYTES)
-#define itjc_ring_sub(x, d) (((x) + ITJC_RING_BYTES - 4 * (d)) \
- % ITJC_RING_BYTES)
-
-
-enum
-{
- TIGER_CH_A = 0,
- TIGER_CH_B = 1,
-
- HSCX_CH_A = 0, /* For compatibility reasons. */
- HSCX_CH_B = 1,
-};
-
-enum
-{
- ITJC_TEL_SILENCE_BYTE = 0x00,
- ITJC_HDLC_FLAG_BYTE = 0x7E,
- ITJC_HDLC_ABORT_BYTE = 0xFF
-};
-
-/*
- * Hardware DMA control block (one per card).
- */
-typedef enum
-{
- ITJC_DS_LOAD_FAILED = -1,
- ITJC_DS_FREE = 0,
- ITJC_DS_LOADING,
- ITJC_DS_STOPPED,
- ITJC_DS_RUNNING
-}
- dma_state_t;
-
-typedef struct
-{
- dma_state_t state;
- u_int8_t *pool;
- bus_addr_t bus_addr;
- bus_dma_tag_t tag;
- bus_dmamap_t map;
- int error;
-}
- dma_context_t;
-
-dma_context_t
- dma_context [ ITJC_MAXUNIT ];
-
-/*
- * B-channel DMA control blocks (4 per card -- 1 RX & 1 TX per channel).
- */
-typedef enum
-{
- ITJC_RS_IDLE = 0,
- ITJC_RS_ACTIVE
-}
- dma_rx_state_t;
-
-typedef enum
-{
- ITJC_TS_IDLE = 0,
- ITJC_TS_ACTIVE,
- ITJC_TS_AFTER_XDU
-}
- dma_tx_state_t;
-
-typedef struct
-{
- u_int8_t *ring;
- bus_addr_t bus_addr;
- u_int16_t next_read;
- u_int16_t hdlc_len;
- u_int16_t hdlc_tmp;
- u_int16_t hdlc_crc;
- u_int16_t hdlc_ib;
- u_int8_t hdlc_blevel;
- u_int8_t hdlc_flag;
- dma_rx_state_t state;
-}
- dma_rx_context_t;
-
-typedef struct
-{
- u_int8_t *ring;
- bus_addr_t bus_addr;
- u_int16_t next_write;
- u_int32_t hdlc_tmp;
- u_int16_t hdlc_blevel;
- u_int16_t hdlc_crc;
- u_int16_t hdlc_ib;
- u_int16_t next_frame;
- u_int16_t filled;
- u_int8_t hdlc_flag;
- dma_tx_state_t state;
-}
- dma_tx_context_t;
-
-dma_rx_context_t
- dma_rx_context [ ITJC_MAXUNIT ] [ 2 ];
-
-dma_tx_context_t
- dma_tx_context [ ITJC_MAXUNIT ] [ 2 ];
-
-/*
- * Used by the mbuf handling functions.
- */
-typedef enum
-{
- ITJC_MB_CURR = 0,
- ITJC_MB_NEXT = 1,
- ITJC_MB_NEW = 2
-}
- which_mb_t;
-
-
-/*---------------------------------------------------------------------------*
- * itjc_map_callback - get DMA bus address from resource mgr.
- *---------------------------------------------------------------------------*/
-static void
-itjc_map_callback(void *arg, bus_dma_segment_t *segs, int nseg, int error)
-{
- dma_context_t *ctx = (dma_context_t *)arg;
-
- if (error)
- {
- ctx->error = error;
- ctx->state = ITJC_DS_LOAD_FAILED;
- return;
- }
-
- ctx->bus_addr = segs->ds_addr;
- ctx->state = ITJC_DS_STOPPED;
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_dma_start - Complete DMA setup & start the Tiger DMA engine.
- *---------------------------------------------------------------------------*/
-static int
-itjc_dma_start(struct l1_softc *sc)
-{
- int unit = sc->sc_unit;
- dma_context_t *ctx = &dma_context[unit];
- dma_rx_context_t *rxc = &dma_rx_context[unit][0];
- dma_tx_context_t *txc = &dma_tx_context[unit][0];
- bus_addr_t ba;
- u_int8_t i;
- u_int32_t *pool_end,
- *ip;
-
- itjc_bus_setup(sc);
-
- /* See if it is already running. */
-
- if (ctx->state == ITJC_DS_RUNNING)
- return 0;
-
- if (ctx->state == ITJC_DS_LOAD_FAILED)
- {
- NDBGL1(L1_ERROR, "itjc%d: dma_start: DMA map loading "
- "failed (error=%d).\n", unit, ctx->error);
- return 1;
- }
-
- if (ctx->state != ITJC_DS_STOPPED)
- {
- NDBGL1(L1_ERROR, "itjc%d: dma_start: Unexpected DMA "
- "state (%d).\n", unit, ctx->state);
- return 1;
- }
-
- /*
- * Initialize the DMA control structures (hardware & B-channel).
- */
- ba = ctx->bus_addr;
-
- txc->ring = ctx->pool + TIGER_CH_A;
- rxc->ring = ctx->pool + TIGER_CH_A + ITJC_RING_BYTES;
-
- txc->bus_addr = ba;
- rxc->bus_addr = ba + ITJC_RING_BYTES;
-
- ++rxc; ++txc;
-
- txc->ring = ctx->pool + TIGER_CH_B;
- rxc->ring = ctx->pool + TIGER_CH_B + ITJC_RING_BYTES;
-
- txc->bus_addr = ba;
- rxc->bus_addr = ba + ITJC_RING_BYTES;
-
- /*
- * Fill the DMA ring buffers with IOM-2 channel 0 frames made of
- * idle/abort sequences for the B & D channels and NOP for IOM-2
- * cmd/ind, monitor handshake & data.
- */
- pool_end = (u_int32_t *)ctx->pool + ITJC_DMA_POOL_WORDS;
- for (ip = (u_int32_t *)ctx->pool; ip < pool_end; ++ip)
- *ip = 0xFFFFFFFF;
-
- /*
- * Program the Tiger DMA gears.
- */
-
- itjc_write_4(TIGER_DMA_WR_START_ADDR, ba);
- itjc_write_4(TIGER_DMA_WR_INT_ADDR, ba + ITJC_RING_SLOT_BYTES - 4);
- itjc_write_4(TIGER_DMA_WR_END_ADDR, ba + ITJC_RING_BYTES - 4);
-
- ba += ITJC_RING_BYTES;
-
- itjc_write_4(TIGER_DMA_RD_START_ADDR, ba);
- itjc_write_4(TIGER_DMA_RD_INT_ADDR, ba + ITJC_RING_SLOT_BYTES * 2 - 4);
- itjc_write_4(TIGER_DMA_RD_END_ADDR, ba + ITJC_RING_BYTES - 4);
-
- itjc_write_1(TIGER_INT0_MASK,
- TIGER_WR_END_INT | TIGER_WR_INT_INT | TIGER_RD_INT_INT);
-
- itjc_write_1(TIGER_DMA_OPER, TIGER_ENABLE_DMA);
-
- /*
- * See if it really started.
- */
- ba = itjc_read_4(TIGER_DMA_RD_CURR_ADDR);
- for (i = 0; i < 10; ++i)
- {
- DELAY(SEC_DELAY/1000);
- if (ba != itjc_read_4(TIGER_DMA_RD_CURR_ADDR))
- {
- ctx->state = ITJC_DS_RUNNING;
- return 0;
- }
- }
-
- NDBGL1(L1_ERROR, "itjc%d: dma_start: DMA start failed.\n ", unit);
- return 1;
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_dma_stop - Stop the Tiger DMA engine.
- *---------------------------------------------------------------------------*/
-void
-itjc_dma_stop(struct l1_softc *sc)
-{
- dma_context_t *ctx = &dma_context[sc->sc_unit];
-
- itjc_bus_setup(sc);
-
- /* Only stop the DMA if it is running. */
-
- if (ctx->state != ITJC_DS_RUNNING)
- return;
-
- itjc_write_1(TIGER_DMA_OPER, TIGER_DISABLE_DMA);
- DELAY(SEC_DELAY/1000);
-
- ctx->state = ITJC_DS_STOPPED;
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_bchannel_dma_setup - The DMA side of itjc_bchannel_setup.
- *---------------------------------------------------------------------------*/
-static void
-itjc_bchannel_dma_setup(struct l1_softc *sc, int h_chan, int activate)
-{
- dma_rx_context_t *rxc = &dma_rx_context[sc->sc_unit][h_chan];
- dma_tx_context_t *txc = &dma_tx_context[sc->sc_unit][h_chan];
-
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
-
- u_int8_t fill_byte,
- *ring_end,
- *cp;
-
- int s = SPLI4B();
-
- itjc_bus_setup(sc);
-
- if (activate)
- {
- /*
- * Get the DMA engine going if it's not running already.
- */
- itjc_dma_start(sc);
-
- rxc->hdlc_len = rxc->hdlc_tmp = rxc->hdlc_crc = 0;
- rxc->hdlc_ib = rxc->hdlc_blevel = rxc->hdlc_flag = 0;
-
- txc->hdlc_tmp = txc->hdlc_blevel = txc->hdlc_crc = 0;
- txc->hdlc_ib = 0;
- txc->hdlc_flag = 2;
- txc->filled = 0;
-
- if (chan->bprot == BPROT_NONE)
- fill_byte = ITJC_TEL_SILENCE_BYTE;
- else
- fill_byte = ITJC_HDLC_ABORT_BYTE;
-
- ring_end = rxc->ring + ITJC_RING_BYTES;
- for (cp = rxc->ring; cp < ring_end; cp += 4)
- *cp = fill_byte;
-
- ring_end = txc->ring + ITJC_RING_BYTES;
- for (cp = txc->ring; cp < ring_end; cp += 4)
- *cp = fill_byte;
-
- rxc->next_read =
- itjc_get_dma_offset(rxc, TIGER_DMA_RD_CURR_ADDR);
-
- txc->next_frame = txc->next_write =
- itjc_get_dma_offset(txc, TIGER_DMA_WR_CURR_ADDR);
-
- rxc->state = ITJC_RS_ACTIVE;
- txc->state = ITJC_TS_AFTER_XDU;
- }
- else
- {
- dma_rx_context_t *rxc2;
-
- txc->state = ITJC_TS_IDLE;
- rxc->state = ITJC_RS_IDLE;
-
- rxc2 = &dma_rx_context[sc->sc_unit][0];
-
- if (rxc2->state == ITJC_RS_IDLE
- && rxc2[1].state == ITJC_RS_IDLE)
- itjc_dma_stop(sc);
- }
-
- splx(s);
-}
-
-
-/*---------------------------------------------------------------------------*
- * Mbuf & if_queues management routines.
- *---------------------------------------------------------------------------*/
-
-static u_int8_t *
-itjc_get_rx_mbuf(l1_bchan_state_t *chan, u_int8_t **dst_end_p,
-which_mb_t which)
-{
- struct mbuf *mbuf = chan->in_mbuf;
-
- if (mbuf == NULL && which == ITJC_MB_NEW)
- {
- if ((mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("itjc_get_rx_mbuf: cannot allocate mbuf!");
-
- chan->in_mbuf = mbuf;
- chan->in_cbptr = (u_int8_t *)mbuf->m_data;
- chan->in_len = 0;
- }
-
- if (dst_end_p != NULL)
- {
- if (mbuf != NULL)
- *dst_end_p = (u_int8_t *)(mbuf->m_data)
- + BCH_MAX_DATALEN;
- else
- *dst_end_p = NULL;
- }
-
- return chan->in_cbptr;
-}
-
-
-static void
-itjc_save_rx_mbuf(l1_bchan_state_t *chan, u_int8_t * dst)
-{
- struct mbuf *mbuf = chan->in_mbuf;
-
- if (dst != NULL && mbuf != NULL)
- {
- chan->in_cbptr = dst;
- chan->in_len = dst - (u_int8_t *)mbuf->m_data;
- }
- else if (dst == NULL && mbuf == NULL)
- {
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- else
- panic("itjc_save_rx_mbuf: stale pointer dst=%p mbuf=%p "
- "in_cbptr=%p in_len=%d", dst, mbuf,
- chan->in_cbptr, chan->in_len);
-}
-
-
-static void
-itjc_free_rx_mbuf(l1_bchan_state_t *chan)
-{
- struct mbuf *mbuf = chan->in_mbuf;
-
- if (mbuf != NULL)
- i4b_Bfreembuf(mbuf);
-
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
-}
-
-
-static void
-itjc_put_rx_mbuf(struct l1_softc *sc, l1_bchan_state_t *chan, u_int16_t len)
-{
- i4b_trace_hdr_t hdr;
- struct mbuf *mbuf = chan->in_mbuf;
- u_int8_t *data = mbuf->m_data;
- int activity = 1;
-
- mbuf->m_pkthdr.len = mbuf->m_len = len;
-
- if (sc->sc_trace & TRACE_B_RX)
- {
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = (chan->channel == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, len, data);
- }
-
- if (chan->bprot == BPROT_NONE)
- {
- activity = ! i4b_l1_bchan_tel_silence(data, len);
-
- /* move rx'd data to rx queue */
-
- if (! _IF_QFULL(&chan->rx_queue))
- {
- IF_ENQUEUE(&chan->rx_queue, mbuf);
- }
- else
- {
- i4b_Bfreembuf(mbuf);
- len = 0;
- }
- }
-
- if (len != 0)
- {
- chan->rxcount += len;
-
- (*chan->isic_drvr_linktab->bch_rx_data_ready)
- (chan->isic_drvr_linktab->unit);
- }
-
- if (activity)
- (*chan->isic_drvr_linktab->bch_activity)
- (chan->isic_drvr_linktab->unit, ACT_RX);
-
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
-}
-
-
-#define itjc_free_tx_mbufs(chan) \
-{ \
- i4b_Bfreembuf((chan)->out_mbuf_head); \
- (chan)->out_mbuf_cur = (chan)->out_mbuf_head = NULL; \
- (chan)->out_mbuf_cur_ptr = NULL; \
- (chan)->out_mbuf_cur_len = 0; \
-}
-
-
-static u_int16_t
-itjc_get_tx_mbuf(struct l1_softc *sc, l1_bchan_state_t *chan,
- u_int8_t **src_p, which_mb_t which)
-{
- i4b_trace_hdr_t hdr;
- struct mbuf *mbuf = chan->out_mbuf_cur;
- u_int8_t activity = 1;
- u_int16_t len;
- void *data;
-
- switch (which)
- {
- case ITJC_MB_CURR:
- if (mbuf != NULL)
- {
- *src_p = chan->out_mbuf_cur_ptr;
- return chan->out_mbuf_cur_len;
- }
-
- break;
-
- case ITJC_MB_NEXT:
- if (mbuf != NULL)
- {
- chan->txcount += mbuf->m_len;
-
- mbuf = mbuf->m_next;
-
- if (mbuf != NULL)
- goto new_mbuf;
- }
-
- chan->out_mbuf_cur_ptr = *src_p = NULL;
- chan->out_mbuf_cur_len = 0;
-
- if (chan->out_mbuf_head != NULL)
- {
- i4b_Bfreembuf(chan->out_mbuf_head);
- chan->out_mbuf_head = NULL;
- }
-
- return 0;
-
- case ITJC_MB_NEW:
- if (mbuf != NULL)
- chan->txcount += mbuf->m_len;
- }
-
- if (chan->out_mbuf_head != NULL)
- i4b_Bfreembuf(chan->out_mbuf_head);
-
- IF_DEQUEUE(&chan->tx_queue, mbuf);
-
- if (mbuf == NULL)
- {
- chan->out_mbuf_cur = chan->out_mbuf_head = NULL;
- chan->out_mbuf_cur_ptr = *src_p = NULL;
- chan->out_mbuf_cur_len = 0;
-
- chan->state &= ~(HSCX_TX_ACTIVE);
-
- (*chan->isic_drvr_linktab->bch_tx_queue_empty)
- (chan->isic_drvr_linktab->unit);
-
- return 0;
- }
-
- chan->out_mbuf_head = mbuf;
-
-new_mbuf:
- chan->out_mbuf_cur = mbuf;
- chan->out_mbuf_cur_ptr = data = mbuf->m_data;
- chan->out_mbuf_cur_len = len = mbuf->m_len;
-
- chan->state |= HSCX_TX_ACTIVE;
-
- if (sc->sc_trace & TRACE_B_TX)
- {
- hdr.unit = L0ITJCUNIT(sc->sc_unit);
- hdr.type = (chan->channel == HSCX_CH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, len, data);
- }
-
- if (chan->bprot == BPROT_NONE)
- activity = ! i4b_l1_bchan_tel_silence(data, len);
-
- if (activity)
- (*chan->isic_drvr_linktab->bch_activity)
- (chan->isic_drvr_linktab->unit, ACT_TX);
-
- *src_p = data;
- return len;
-}
-
-
-#define itjc_save_tx_mbuf(chan, src, dst) \
-( \
- (chan)->out_mbuf_cur != NULL ? \
- ( \
- (chan)->out_mbuf_cur_ptr = (src), \
- (chan)->out_mbuf_cur_len = (len) \
- ) \
- : \
- 0 \
-)
-
-
-/*---------------------------------------------------------------------------*
- * B-channel interrupt service routines.
- *---------------------------------------------------------------------------*/
-
-/*
- * Since the Tiger ASIC doesn't produce a XMIT underflow indication,
- * we need to deduce it ourselves. This is somewhat tricky because we
- * are dealing with modulo m arithmetic. The idea here is to have a
- * "XDU zone" ahead of the writing pointer sized 1/3 of total ring
- * length (a ring slot). If the hardware DMA pointer is found there we
- * consider that a XDU has occurred. To complete the scheme, we never
- * let the ring have more than 2 slots of (unsent) data and adjust the
- * interrupt registers to cause an interrupt at every slot.
- */
-static u_int8_t
-itjc_xdu(struct l1_softc *sc, l1_bchan_state_t *chan, dma_tx_context_t *ctx,
-u_int16_t *dst_p, u_int16_t *dst_end_p, u_int8_t tx_restart)
-{
- u_int8_t xdu;
-
- u_int16_t dst_end,
- dst,
- dma,
- dma_l,
- dma_h,
- xdu_l,
- xdu_h;
-
- itjc_bus_setup(sc);
-
- /*
- * Since the hardware is running, be conservative and assume
- * the pointer location has a `fuzy' error factor.
- */
- dma = itjc_get_dma_offset(ctx, TIGER_DMA_WR_CURR_ADDR);
- dma_l = dma;
- dma_h = itjc_ring_add(dma, 1);
-
- dst_end = itjc_ring_sub(dma_l, ITJC_RING_SLOT_WORDS);
-
- if (ctx->state != ITJC_TS_ACTIVE)
- {
- xdu = (ctx->state == ITJC_TS_AFTER_XDU);
- dst = itjc_ring_add(dma_h, 4);
- goto done;
- }
-
- /*
- * Check for xmit underruns.
- */
- xdu_l = dst = ctx->next_write;
- xdu_h = itjc_ring_add(dst, ITJC_RING_SLOT_WORDS);
-
- if (xdu_l < xdu_h)
- xdu = (xdu_l <= dma_l && dma_l < xdu_h)
- || (xdu_l <= dma_h && dma_h < xdu_h);
- else
- xdu = (xdu_l <= dma_l || dma_l < xdu_h)
- || (xdu_l <= dma_h || dma_h < xdu_h);
-
- if (xdu)
- {
- ctx->state = ITJC_TS_AFTER_XDU;
-
- dst = itjc_ring_add(dma_h, 4);
- }
- else if (tx_restart)
- {
- /*
- * See if we still can restart from immediately
- * after the last frame sent. It's a XDU test but
- * using the real data end on the comparsions. We
- * don't consider XDU an error here because we were
- * just trying to avoid send a filling gap between
- * frames. If it's already sent no harm is done.
- */
- xdu_l = dst = ctx->next_frame;
- xdu_h = itjc_ring_add(dst, ITJC_RING_SLOT_WORDS);
-
- if (xdu_l < xdu_h)
- xdu = (xdu_l <= dma_l && dma_l < xdu_h)
- || (xdu_l <= dma_h && dma_h < xdu_h);
- else
- xdu = (xdu_l <= dma_l || dma_l < xdu_h)
- || (xdu_l <= dma_h || dma_h < xdu_h);
-
- if (xdu)
- dst = itjc_ring_add(dma_h, 4);
-
- xdu = 0;
- }
-
-done:
- if (dst_p != NULL)
- *dst_p = dst;
-
- if (dst_end_p != NULL)
- *dst_end_p = dst_end;
-
- ctx->next_write = dst_end;
-
- return xdu;
-}
-
-
-#define itjc_rotate_hdlc_flag(blevel) \
- ((u_int8_t)(0x7E7E >> (8 - (u_int8_t)((blevel) >> 8))))
-
-
-static void
-itjc_dma_rx_intr(struct l1_softc *sc, l1_bchan_state_t *chan,
-dma_rx_context_t *ctx)
-{
- u_int8_t *ring,
- *dst,
- *dst_end,
- flag,
- blevel;
-
- u_int16_t dma,
- src,
- tmp2,
- tmp,
- len,
- crc,
- ib;
-
- itjc_bus_setup(sc);
-
-
- if (ctx->state == ITJC_RS_IDLE)
- return;
-
- ring = ctx->ring;
- dma = itjc_get_dma_offset(ctx, TIGER_DMA_RD_CURR_ADDR);
- dma = itjc_ring_sub(dma, 1);
- src = ctx->next_read;
-
- if (chan->bprot == BPROT_NONE)
- {
- dst = itjc_get_rx_mbuf(chan, &dst_end, ITJC_MB_CURR);
-
- while (src != dma)
- {
- if (dst == NULL)
- dst = itjc_get_rx_mbuf(chan, &dst_end,
- ITJC_MB_NEW);
-
- *dst++ = ring[src];
- src = itjc_ring_add(src, 1);
-
- if (dst >= dst_end)
- {
- itjc_put_rx_mbuf(sc, chan, BCH_MAX_DATALEN);
- dst = dst_end = NULL;
- }
- }
- ctx->next_read = src;
- itjc_save_rx_mbuf(chan, dst);
- return;
- }
-
- blevel = ctx->hdlc_blevel;
- flag = ctx->hdlc_flag;
- len = ctx->hdlc_len;
- tmp = ctx->hdlc_tmp;
- crc = ctx->hdlc_crc;
- ib = ctx->hdlc_ib;
-
- dst = itjc_get_rx_mbuf(chan, NULL, ITJC_MB_CURR);
-
- while (src != dma)
- {
- HDLC_DECODE(*dst++, len, tmp, tmp2, blevel, ib, crc, flag,
- {/* rdd */
- tmp2 = ring[src];
- src = itjc_ring_add(src, 1);
- },
- {/* nfr */
- if (dst != NULL)
- panic("itjc_dma_rx_intr: nfrcmd with "
- "valid current frame");
-
- dst = itjc_get_rx_mbuf(chan, &dst_end, ITJC_MB_NEW);
- len = dst_end - dst;
- },
- {/* cfr */
- len = BCH_MAX_DATALEN - len;
-
- if ((!len) || (len > BCH_MAX_DATALEN))
- {
- /*
- * NOTE: frames without any data, only crc
- * field, should be silently discared.
- */
- NDBGL1(L1_S_MSG, "itjc_dma_rx_intr: "
- "bad frame (len=%d, unit=%d)",
- len, sc->sc_unit);
-
- itjc_free_rx_mbuf(chan);
-
- goto s0;
- }
-
- if (crc)
- {
- NDBGL1(L1_S_ERR,
- "CRC (crc=0x%04x, len=%d, unit=%d)",
- crc, len, sc->sc_unit);
-
- itjc_free_rx_mbuf(chan);
-
- goto s0;
- }
-
- itjc_put_rx_mbuf(sc, chan, len);
-
- s0:
- dst = NULL;
- len = 0;
- },
- {/* rab */
- NDBGL1(L1_S_ERR, "Read Abort (unit=%d)", sc->sc_unit);
-
- itjc_free_rx_mbuf(chan);
- dst = NULL;
- len = 0;
- },
- {/* rdo */
- NDBGL1(L1_S_ERR, "RDO (unit=%d) dma=%d src=%d",
- sc->sc_unit, dma, src);
-
- itjc_free_rx_mbuf(chan);
- dst = NULL;
- len = 0;
- },
- continue,
- d);
- }
-
- itjc_save_rx_mbuf(chan, dst);
-
- ctx->next_read = src;
- ctx->hdlc_blevel= blevel;
- ctx->hdlc_flag = flag;
- ctx->hdlc_len = len;
- ctx->hdlc_tmp = tmp;
- ctx->hdlc_crc = crc;
- ctx->hdlc_ib = ib;
-}
-
-
-/*
- * The HDLC side of itjc_dma_tx_intr. We made a separate function
- * to improve readability and (perhaps) help the compiler with
- * register allocation.
- */
-static void
-itjc_hdlc_encode(struct l1_softc *sc, l1_bchan_state_t *chan,
-dma_tx_context_t * ctx)
-{
- u_int8_t *ring,
- *src,
- xdu,
- flag,
- flag_byte,
- tx_restart;
-
- u_int16_t saved_len,
- dst_end,
- dst_end1,
- dst,
- filled,
- blevel,
- tmp2,
- len,
- crc,
- ib;
-
- u_int32_t tmp;
-
-
- saved_len = len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_CURR);
-
- filled = ctx->filled;
- flag = ctx->hdlc_flag;
-
- if (src == NULL && flag == 2 && filled >= ITJC_RING_WORDS)
- return;
-
- tx_restart = (flag == 2 && src != NULL);
- xdu = itjc_xdu(sc, chan, ctx, &dst, &dst_end, tx_restart);
-
- ring = ctx->ring;
-
- ib = ctx->hdlc_ib;
- crc = ctx->hdlc_crc;
- tmp = ctx->hdlc_tmp;
- blevel = ctx->hdlc_blevel;
-
- if (xdu)
- {
- if (flag != 2)
- {
- NDBGL1(L1_H_XFRERR, "XDU");
- ++chan->stat_XDU;
-
- /*
- * Abort the current frame and
- * prepare for a full restart.
- */
- itjc_free_tx_mbufs(chan);
- saved_len = len = filled = 0;
- flag = (u_int8_t)-2;
- }
- else if (filled < ITJC_RING_SLOT_WORDS)
- {
- /*
- * A little garbage may have been retransmitted.
- * Send an abort before any new data.
- */
- filled = 0;
- flag = (u_int8_t)-2;
- }
- }
-
- if (flag != 3)
- len = 0;
-
- while (dst != dst_end)
- {
- HDLC_ENCODE(
- *src++, len, tmp, tmp2, blevel, ib, crc, flag,
- {/* gfr */
- if ((len = saved_len) == 0)
- len = itjc_get_tx_mbuf(sc, chan, &src,
- ITJC_MB_NEW);
-
- if (len == 0)
- {
- ctx->next_frame = dst;
-
- flag_byte = itjc_rotate_hdlc_flag(blevel);
-
- for (dst_end1 = itjc_ring_sub(dst_end, 1);
- dst != dst_end1;
- dst = itjc_ring_add(dst, 1))
- {
- ring[dst] = flag_byte;
- ++filled;
- }
- }
- else
- filled = 0;
-
- ctx->state = ITJC_TS_ACTIVE;
- },
- {/* nmb */
- saved_len = 0;
- len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_NEXT);
- },
- {/* wrd */
- ring[dst] = (u_int8_t)tmp;
- dst = itjc_ring_add(dst, 1);
- },
- d1);
- }
-
- ctx->hdlc_blevel = blevel;
- ctx->hdlc_flag = flag;
- ctx->hdlc_tmp = tmp;
- ctx->hdlc_crc = crc;
- ctx->hdlc_ib = ib;
-
- ctx->filled = filled;
- ctx->next_write = dst;
-
- itjc_save_tx_mbuf(chan, src, len);
-}
-
-
-static void
-itjc_dma_tx_intr(struct l1_softc *sc, l1_bchan_state_t *chan,
-dma_tx_context_t * ctx)
-{
- u_int8_t *data_end,
- *ring,
- *src,
- xdu;
-
- u_int16_t dst,
- dst_end,
- filled,
- len;
-
-
- if (ctx->state == ITJC_TS_IDLE)
- goto done;
-
- if (chan->bprot != BPROT_NONE)
- {
- itjc_hdlc_encode(sc, chan, ctx);
- goto done;
- }
-
- ring = ctx->ring;
- filled = ctx->filled;
-
- len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_CURR);
-
- if (len == 0 && filled >= ITJC_RING_WORDS)
- goto done;
-
- xdu = itjc_xdu(sc, chan, ctx, &dst, &dst_end, len != 0);
-
- if (xdu && filled < ITJC_RING_WORDS)
- {
- NDBGL1(L1_H_XFRERR, "XDU");
- ++chan->stat_XDU;
- filled = 0;
- }
-
- if (len == 0)
- goto fill_ring;
-
- ctx->state = ITJC_TS_ACTIVE;
-
- data_end = src + len;
- while (dst != dst_end)
- {
- ring[dst] = *src++; --len;
-
- dst = itjc_ring_add(dst, 1);
-
- if (src >= data_end)
- {
- len = itjc_get_tx_mbuf(sc, chan, &src, ITJC_MB_NEXT);
- if (len == 0)
- len = itjc_get_tx_mbuf(sc, chan,
- &src, ITJC_MB_NEW);
-
- if (len == 0)
- {
- data_end = NULL;
- break;
- }
- data_end = src + len;
- }
- }
-
- itjc_save_tx_mbuf(chan, src, len);
-
- filled = 0;
-
-fill_ring:
- ctx->next_frame = dst;
-
- for (; dst != dst_end; dst = itjc_ring_add(dst, 1))
- {
- ring[dst] = ITJC_TEL_SILENCE_BYTE;
- ++filled;
- }
-
- ctx->next_write = dst;
- ctx->filled = filled;
-
-done:
-}
-
-
-/*---------------------------------------------------------------------------*
- * NetJet fifo read/write routines.
- *---------------------------------------------------------------------------*/
-
-static void
-itjc_read_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- itjc_bus_setup(sc);
-
- if (what != ISIC_WHAT_ISAC)
- panic("itjc_write_fifo: Trying to read from HSCX fifo.\n");
-
- itjc_set_pib_addr_msb(0);
- itjc_read_multi_1(PIB_OFFSET, buf, size);
-}
-
-
-static void
-itjc_write_fifo(struct l1_softc *sc, int what, void *buf, size_t size)
-{
- itjc_bus_setup(sc);
-
- if (what != ISIC_WHAT_ISAC)
- panic("itjc_write_fifo: Trying to write to HSCX fifo.\n");
-
- itjc_set_pib_addr_msb(0);
- itjc_write_multi_1(PIB_OFFSET, buf, size);
-}
-
-
-/*---------------------------------------------------------------------------*
- * Read an ISAC register.
- *---------------------------------------------------------------------------*/
-static u_int8_t
-itjc_read_reg(struct l1_softc *sc, int what, bus_size_t offs)
-{
- itjc_bus_setup(sc);
-
- if (what != ISIC_WHAT_ISAC)
- {
- panic("itjc_read_reg: what(%d) != ISIC_WHAT_ISAC\n",
- what);
- return 0;
- }
-
- itjc_set_pib_addr_msb(offs);
- return itjc_read_1(itjc_pib_2_pci(offs));
-}
-
-
-/*---------------------------------------------------------------------------*
- * Write an ISAC register.
- *---------------------------------------------------------------------------*/
-static void
-itjc_write_reg(struct l1_softc *sc, int what, bus_size_t offs, u_int8_t data)
-{
- itjc_bus_setup(sc);
-
- if (what != ISIC_WHAT_ISAC)
- {
- panic("itjc_write_reg: what(%d) != ISIC_WHAT_ISAC\n",
- what);
- return;
- }
-
- itjc_set_pib_addr_msb(offs);
- itjc_write_1(itjc_pib_2_pci(offs), data);
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_probe - probe for a card.
- *---------------------------------------------------------------------------*/
-static int itjc_probe(device_t dev)
-{
- u_int16_t vid = pci_get_vendor(dev),
- did = pci_get_device(dev);
-
- if ((vid == PCI_TJNET_VID) && (did == PCI_TJ300_DID))
- {
- device_set_desc(dev, "NetJet-S");
- return 0;
- }
-
- return ENXIO;
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_attach - attach a (previously probed) card.
- *---------------------------------------------------------------------------*/
-int
-itjc_attach(device_t dev)
-{
- bus_space_handle_t h;
- bus_space_tag_t t;
-
- struct l1_softc *sc = device_get_softc(dev);
-
- u_int16_t vid = pci_get_vendor(dev),
- did = pci_get_device(dev);
-
- int unit = device_get_unit(dev),
- s = splimp(),
- res_init_level = 0,
- error = 0;
-
- void *ih = 0;
-
- dma_context_t *ctx = &dma_context[unit];
-
- bzero(sc, sizeof(struct l1_softc));
-
- /* Probably not really required. */
- if (unit > ITJC_MAXUNIT)
- {
- printf("itjc%d: Error, unit > ITJC_MAXUNIT!\n", unit);
- splx(s);
- return ENXIO;
- }
-
- if (!(vid == PCI_TJNET_VID && did == PCI_TJ300_DID))
- {
- printf("itjc%d: unknown device (%04X,%04X)!\n", unit, vid, did);
- goto fail;
- }
-
- itjc_scp[unit] = sc;
-
- sc->sc_resources.io_rid[0] = PCIR_MAPS+0;
- sc->sc_resources.io_base[0] = bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0], 0, ~0, 1, RF_ACTIVE);
-
- if (sc->sc_resources.io_base[0] == NULL)
- {
- printf("itjc%d: couldn't map IO port\n", unit);
- error = ENXIO;
- goto fail;
- }
-
- h = rman_get_bushandle(sc->sc_resources.io_base[0]);
- t = rman_get_bustag(sc->sc_resources.io_base[0]);
-
- ++res_init_level;
-
- /* Allocate interrupt. */
- sc->sc_resources.irq_rid = 0;
- sc->sc_resources.irq = bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);
-
- if (sc->sc_resources.irq == NULL)
- {
- printf("itjc%d: couldn't map interrupt\n", unit);
- error = ENXIO;
- goto fail;
- }
-
- ++res_init_level;
-
- error = bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET,
- itjc_intr, sc, &ih);
-
- if (error)
- {
- printf("itjc%d: couldn't set up irq handler\n", unit);
- error = ENXIO;
- goto fail;
- }
-
- /*
- * Reset the ASIC & the ISAC.
- */
- itjc_write_1(TIGER_RESET_PIB_CL_TIME, TIGER_RESET_ALL);
-
- DELAY(SEC_DELAY/100); /* Give it 10 ms to reset ...*/
-
- itjc_write_1(TIGER_RESET_PIB_CL_TIME,
- TIGER_SELF_ADDR_DMA | TIGER_PIB_3_CYCLES);
-
- DELAY(SEC_DELAY/100); /* ... and more 10 to recover. */
-
- /*
- * First part of DMA initialization. Create & map the memory
- * pool that will be used to bear the rx & tx ring buffers.
- */
- ctx->state = ITJC_DS_LOADING;
-
- error = bus_dma_tag_create(
- NULL, /* parent */
- 4, /* alignment*/
- 0, /* boundary*/
- BUS_SPACE_MAXADDR_32BIT, /* lowaddr*/
- BUS_SPACE_MAXADDR, /* highaddr*/
- NULL, /* filter*/
- NULL, /* filterarg*/
- ITJC_DMA_POOL_BYTES, /* maxsize*/
- 1, /* nsegments*/
- ITJC_DMA_POOL_BYTES, /* maxsegsz*/
- BUS_DMA_ALLOCNOW | BUS_DMAMEM_NOSYNC, /* flags*/
- &ctx->tag);
-
- if (error)
- {
- printf("itjc%d: couldn't create bus DMA tag.\n", unit);
- goto fail;
- }
-
- ++res_init_level;
-
- error = bus_dmamem_alloc(
- ctx->tag, /* DMA tag */
- (void **)&ctx->pool, /* KV addr of the allocated memory */
- BUS_DMA_NOWAIT | BUS_DMAMEM_NOSYNC, /* flags */
- &ctx->map); /* KV <-> PCI map */
-
- if (error)
- goto fail;
-
- /*
- * Load the KV <-> PCI map so the device sees the same
- * memory segment as pointed by pool. Note: since the
- * load may happen assyncronously (completion indicated by
- * the execution of the callback function) we have to
- * delay the initialization of the DMA engine to a moment we
- * actually have the proper bus addresses to feed the Tiger
- * and our DMA control blocks. This will be done in
- * itjc_bchannel_setup via a call to itjc_dma_start.
- */
- bus_dmamap_load(
- ctx->tag, /* DMA tag */
- ctx->map, /* DMA map */
- ctx->pool, /* KV addr of buffer */
- ITJC_DMA_POOL_BYTES, /* buffer size */
- itjc_map_callback, /* this receive the bus addr/error */
- ctx, /* callback aux arg */
- 0); /* flags */
-
- ++res_init_level;
-
- /*
- * Setup the AUX port so we can talk to the ISAC.
- */
- itjc_write_1(TIGER_AUX_PORT_CNTL, TIGER_AUX_NJ_DEFAULT);
- itjc_write_1(TIGER_INT1_MASK, TIGER_ISAC_INT);
-
- /*
- * From now on, almost like a `normal' ISIC driver.
- */
-
- sc->sc_unit = unit;
-
- ISAC_BASE = (caddr_t)ISIC_WHAT_ISAC;
-
- HSCX_A_BASE = (caddr_t)ISIC_WHAT_HSCXA;
- HSCX_B_BASE = (caddr_t)ISIC_WHAT_HSCXB;
-
- /* setup access routines */
-
- sc->clearirq = NULL;
- sc->readreg = itjc_read_reg;
- sc->writereg = itjc_write_reg;
-
- sc->readfifo = itjc_read_fifo;
- sc->writefifo = itjc_write_fifo;
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_NETJET_S;
-
- /* setup IOM bus type */
-
- sc->sc_bustyp = BUS_TYPE_IOM2;
-
- /* set up some other miscellaneous things */
- sc->sc_ipac = 0;
- sc->sc_bfifolen = 2 * ITJC_RING_SLOT_WORDS;
-
- printf("itjc%d: ISAC 2186 Version 1.1 (IOM-2)\n", unit);
-
- /* init the ISAC */
- itjc_isac_init(sc);
-
- /* init the "HSCX" */
- itjc_bchannel_setup(sc->sc_unit, HSCX_CH_A, BPROT_NONE, 0);
-
- itjc_bchannel_setup(sc->sc_unit, HSCX_CH_B, BPROT_NONE, 0);
-
- /* can't use the normal B-Channel stuff */
- itjc_init_linktab(sc);
-
- /* set trace level */
-
- sc->sc_trace = TRACE_OFF;
-
- sc->sc_state = ISAC_IDLE;
-
- sc->sc_ibuf = NULL;
- sc->sc_ib = NULL;
- sc->sc_ilen = 0;
-
- sc->sc_obuf = NULL;
- sc->sc_op = NULL;
- sc->sc_ol = 0;
- sc->sc_freeflag = 0;
-
- sc->sc_obuf2 = NULL;
- sc->sc_freeflag2 = 0;
-
-#if defined(__FreeBSD__) && __FreeBSD__ >=3
- callout_handle_init(&sc->sc_T3_callout);
- callout_handle_init(&sc->sc_T4_callout);
-#endif
-
- /* init higher protocol layers */
-
- i4b_l1_mph_status_ind(L0ITJCUNIT(sc->sc_unit), STI_ATTACH,
- sc->sc_cardtyp, &itjc_l1mux_func);
-
- splx(s);
- return 0;
-
- fail:
- switch (res_init_level)
- {
- case 5:
- bus_dmamap_unload(ctx->tag, ctx->map);
- /* FALL TRHU */
-
- case 4:
- bus_dmamem_free(ctx->tag, ctx->pool, ctx->map);
- bus_dmamap_destroy(ctx->tag, ctx->map);
- /* FALL TRHU */
-
- case 3:
- bus_dma_tag_destroy(ctx->tag);
- /* FALL TRHU */
-
- case 2:
- bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_resources.irq);
- /* FALL TRHU */
-
- case 1:
- bus_release_resource(dev, SYS_RES_IOPORT, PCIR_MAPS+0,
- sc->sc_resources.io_base[0]);
- /* FALL TRHU */
-
- case 0:
- }
-
- itjc_scp[unit] = NULL;
-
- splx(s);
- return error;
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_intr - main interrupt service routine.
- *---------------------------------------------------------------------------*/
-static void
-itjc_intr(void *xsc)
-{
- struct l1_softc *sc = xsc;
- l1_bchan_state_t *chan = &sc->sc_chan[0];
- dma_context_t *dma = &dma_context[sc->sc_unit];
- dma_rx_context_t *rxc = &dma_rx_context[sc->sc_unit][0];
- dma_tx_context_t *txc = &dma_tx_context[sc->sc_unit][0];
-
- itjc_bus_setup(sc);
-
- /* Honor interrupts from successfully configured cards only. */
- if (dma->state < ITJC_DS_STOPPED)
- return;
-
- /* First, we check the ISAC... */
- if (! (itjc_read_1(TIGER_AUX_PORT_DATA) & TIGER_ISAC_INT_MASK))
- {
- itjc_write_1(TIGER_INT1_STATUS, TIGER_ISAC_INT);
- NDBGL1(L1_H_IRQ, "ISAC");
- itjc_isac_intr(sc);
- }
-
- /* ... after what we always have a look at the DMA rings. */
-
- NDBGL1(L1_H_IRQ, "Tiger");
-
- itjc_read_1(TIGER_INT0_STATUS);
- itjc_write_1(TIGER_INT0_STATUS, TIGER_TARGET_ABORT_INT
- | TIGER_MASTER_ABORT_INT | TIGER_RD_END_INT
- | TIGER_RD_INT_INT | TIGER_WR_END_INT | TIGER_WR_INT_INT);
-
- itjc_dma_rx_intr(sc, chan, rxc);
- itjc_dma_tx_intr(sc, chan, txc);
-
- ++chan; ++rxc; ++txc;
-
- itjc_dma_rx_intr(sc, chan, rxc);
- itjc_dma_tx_intr(sc, chan, txc);
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_bchannel_setup - (Re)initialize and start/stop a Bchannel.
- *---------------------------------------------------------------------------*/
-static void
-itjc_bchannel_setup(int unit, int h_chan, int bprot, int activate)
-{
-#ifdef __FreeBSD__
- struct l1_softc *sc = itjc_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- int s = SPLI4B();
-
- NDBGL1(L1_BCHAN, "unit=%d, channel=%d, %s",
- unit, h_chan, activate ? "activate" : "deactivate");
-
- /*
- * If we are deactivating the channel, we have to stop
- * the DMA before we reset the channel control structures.
- */
- if (! activate)
- itjc_bchannel_dma_setup(sc, h_chan, activate);
-
- /* general part */
-
- chan->state = HSCX_IDLE;
-
- chan->unit = sc->sc_unit; /* unit number */
- chan->channel = h_chan; /* B channel */
- chan->bprot = bprot; /* B channel protocol */
-
- /* receiver part */
-
- i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */
-
- chan->rx_queue.ifq_maxlen = IFQ_MAXLEN;
-
- chan->rxcount = 0; /* reset rx counter */
-
- i4b_Bfreembuf(chan->in_mbuf); /* clean rx mbuf */
-
- chan->in_mbuf = NULL; /* reset mbuf ptr */
- chan->in_cbptr = NULL; /* reset mbuf curr ptr */
- chan->in_len = 0; /* reset mbuf data len */
-
- /* transmitter part */
-
- i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */
-
- chan->tx_queue.ifq_maxlen = IFQ_MAXLEN;
-
- chan->txcount = 0; /* reset tx counter */
-
- i4b_Bfreembuf(chan->out_mbuf_head); /* clean tx mbuf */
-
- chan->out_mbuf_head = NULL; /* reset head mbuf ptr */
- chan->out_mbuf_cur = NULL; /* reset current mbuf ptr */
- chan->out_mbuf_cur_ptr = NULL; /* reset current mbuf data ptr */
- chan->out_mbuf_cur_len = 0; /* reset current mbuf data cnt */
-
- /*
- * Only setup & start the DMA after all other channel
- * control structures are in place.
- */
- if (activate)
- itjc_bchannel_dma_setup(sc, h_chan, activate);
-
- splx(s);
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_bchannel_start - Signal us we have more data to send.
- *---------------------------------------------------------------------------*/
-static void
-itjc_bchannel_start(int unit, int h_chan)
-{
-#if Buggy_code
- /*
- * I disabled this routine because it was causing crashes when
- * this driver was used with the ISP (kernel SPPP) protocol driver.
- * The scenario is reproductible:
- * Use the -link1 (dial on demand) ifconfig option.
- * Start an interactive TCP connection to somewhere.
- * Wait until the PPP connection times out and is dropped.
- * Try to send something on the TCP connection.
- * The machine will print some garbage and halt or reboot
- * (no panic messages).
- *
- * I've nailed down the problem to the fact that this routine
- * was being called before the B channel had been setup again.
- *
- * For now, I don't have a good solution other than this one.
- * But, don't despair. The impact of it is unnoticeable.
- */
-
-#ifdef __FreeBSD__
- struct l1_softc *sc = itjc_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
-
- int s = SPLI4B();
-
- dma_tx_context_t *txc = &dma_tx_context[unit][h_chan];
-
- if (chan->state & HSCX_TX_ACTIVE)
- {
- splx(s);
- return;
- }
-
- itjc_dma_tx_intr(sc, chan, txc);
-
- splx(s);
-#endif
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_shutdown - Stop the driver and reset the card.
- *---------------------------------------------------------------------------*/
-static void
-itjc_shutdown(device_t dev)
-{
- struct l1_softc *sc = device_get_softc(dev);
-
- itjc_bus_setup(sc);
-
- /*
- * Stop the DMA the nice and easy way.
- */
- itjc_bchannel_setup(sc->sc_unit, 0, BPROT_NONE, 0);
- itjc_bchannel_setup(sc->sc_unit, 1, BPROT_NONE, 0);
-
- /*
- * Reset the card.
- */
- itjc_write_1(TIGER_RESET_PIB_CL_TIME, TIGER_RESET_ALL);
-
- DELAY(SEC_DELAY/100); /* Give it 10 ms to reset ...*/
-
- itjc_write_1(TIGER_RESET_PIB_CL_TIME,
- TIGER_SELF_ADDR_DMA | TIGER_LATCH_DMA_INT | TIGER_PIB_3_CYCLES);
-
- DELAY(SEC_DELAY/100); /* ... and more 10 to recover */
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_ret_linktab - Return the address of itjc drivers linktab.
- *---------------------------------------------------------------------------*/
-isdn_link_t *
-itjc_ret_linktab(int unit, int channel)
-{
-#ifdef __FreeBSD__
- struct l1_softc *sc = itjc_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- l1_bchan_state_t *chan = &sc->sc_chan[channel];
-
- return(&chan->isic_isdn_linktab);
-}
-
-/*---------------------------------------------------------------------------*
- * itjc_set_linktab - Set the driver linktab in the b channel softc.
- *---------------------------------------------------------------------------*/
-void
-itjc_set_linktab(int unit, int channel, drvr_link_t *dlt)
-{
-#ifdef __FreeBSD__
- struct l1_softc *sc = itjc_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- l1_bchan_state_t *chan = &sc->sc_chan[channel];
-
- chan->isic_drvr_linktab = dlt;
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_init_linktab - Initialize our local linktab.
- *---------------------------------------------------------------------------*/
-static void
-itjc_init_linktab(struct l1_softc *sc)
-{
- l1_bchan_state_t *chan = &sc->sc_chan[HSCX_CH_A];
- isdn_link_t *lt = &chan->isic_isdn_linktab;
-
- /* make sure the hardware driver is known to layer 4 */
- /* avoid overwriting if already set */
- if (ctrl_types[CTRL_PASSIVE].set_linktab == NULL)
- {
- ctrl_types[CTRL_PASSIVE].set_linktab = itjc_set_linktab;
- ctrl_types[CTRL_PASSIVE].get_linktab = itjc_ret_linktab;
- }
-
- /* local setup */
- lt->unit = sc->sc_unit;
- lt->channel = HSCX_CH_A;
- lt->bch_config = itjc_bchannel_setup;
- lt->bch_tx_start = itjc_bchannel_start;
- lt->bch_stat = itjc_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-
- chan = &sc->sc_chan[HSCX_CH_B];
- lt = &chan->isic_isdn_linktab;
-
- lt->unit = sc->sc_unit;
- lt->channel = HSCX_CH_B;
- lt->bch_config = itjc_bchannel_setup;
- lt->bch_tx_start = itjc_bchannel_start;
- lt->bch_stat = itjc_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_bchannel_stat - Collect link statistics for a given B channel.
- *---------------------------------------------------------------------------*/
-static void
-itjc_bchannel_stat(int unit, int h_chan, bchan_statistics_t *bsp)
-{
-#ifdef __FreeBSD__
- struct l1_softc *sc = itjc_scp[unit];
-#else
- struct l1_softc *sc = isic_find_sc(unit);
-#endif
- l1_bchan_state_t *chan = &sc->sc_chan[h_chan];
- int s;
-
- s = SPLI4B();
-
- bsp->outbytes = chan->txcount;
- bsp->inbytes = chan->rxcount;
-
- chan->txcount = 0;
- chan->rxcount = 0;
-
- splx(s);
-}
-
-
-/*---------------------------------------------------------------------------*
- * Netjet - ISAC interrupt routine.
- *---------------------------------------------------------------------------*/
-static void
-itjc_isac_intr(struct l1_softc *sc)
-{
- register u_char irq_stat;
-
- do
- {
- /* get isac irq status */
- irq_stat = ISAC_READ(I_ISTA);
-
- if(irq_stat)
- itjc_isac_irq(sc, irq_stat); /* isac handler */
- }
- while(irq_stat);
-
- ISAC_WRITE(I_MASK, 0xff);
-
- DELAY(100);
-
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-}
-
-
-/*---------------------------------------------------------------------------*
- * itjc_recover - Try to recover from ISAC irq lockup.
- *---------------------------------------------------------------------------*/
-void
-itjc_recover(struct l1_softc *sc)
-{
- u_char byte;
-
- /* get isac irq status */
-
- byte = ISAC_READ(I_ISTA);
-
- NDBGL1(L1_ERROR, " ISAC: ISTA = 0x%x", byte);
-
- if(byte & ISAC_ISTA_EXI)
- NDBGL1(L1_ERROR, " ISAC: EXIR = 0x%x", (u_char)ISAC_READ(I_EXIR));
-
- if(byte & ISAC_ISTA_CISQ)
- {
- byte = ISAC_READ(I_CIRR);
-
- NDBGL1(L1_ERROR, " ISAC: CISQ = 0x%x", byte);
-
- if(byte & ISAC_CIRR_SQC)
- NDBGL1(L1_ERROR, " ISAC: SQRR = 0x%x", (u_char)ISAC_READ(I_SQRR));
- }
-
- NDBGL1(L1_ERROR, " ISAC: IMASK = 0x%x", ISAC_IMASK);
-
- ISAC_WRITE(I_MASK, 0xff);
- DELAY(100);
- ISAC_WRITE(I_MASK, ISAC_IMASK);
-}
-
-#endif /* NITJC > 0 */
diff --git a/sys/i4b/layer1/iwic/i4b_iwic.h b/sys/i4b/layer1/iwic/i4b_iwic.h
deleted file mode 100644
index 183bee361ac2..000000000000
--- a/sys/i4b/layer1/iwic/i4b_iwic.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Dave Boyce. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_iwic - isdn4bsd Winbond W6692 driver
- * ----------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Sun Jan 21 11:08:44 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_IWIC_H_
-#define _I4B_IWIC_H_
-
-#include <i4b/layer1/iwic/i4b_iwic_ext.h>
-
-/*---------------------------------------------------------------------------*
- * PCI resources used
- *---------------------------------------------------------------------------*/
-
-#define INFO_IO_BASES 2
-
-struct i4b_info {
- struct resource * io_base[INFO_IO_BASES];
- int io_rid [INFO_IO_BASES];
- struct resource * irq;
- int irq_rid;
- struct resource * mem;
- int mem_rid;
-};
-
-/*---------------------------------------------------------------------------*
- * state of a B channel
- *---------------------------------------------------------------------------*/
-struct iwic_bchan
-{
- int unit; /* unit number */
- int channel; /* channel number */
- int offset; /* offset from iobase */
- int bprot; /* b channel protocol used */
- int state; /* transceiver state: */
-#define ST_IDLE 0x00 /* channel idle */
-#define ST_TX_ACTIVE 0x01 /* tx running */
-
- int sc_trace_bcount;
-
- /* receive data from ISDN */
-
- struct ifqueue rx_queue; /* receiver queue */
- int rxcount; /* rx statistics counter*/
- struct mbuf *in_mbuf; /* rx input buffer */
- u_char *in_cbptr; /* curr buffer pointer */
- int in_len; /* rx input buffer len */
-
- /* transmit data to ISDN */
-
- struct ifqueue tx_queue; /* transmitter queue */
- int txcount; /* tx statistics counter */
- struct mbuf *out_mbuf_head; /* first mbuf in possible chain */
- struct mbuf *out_mbuf_cur; /* current mbuf in possbl chain */
- unsigned char *out_mbuf_cur_ptr; /* data pointer into mbuf */
- int out_mbuf_cur_len; /* remaining bytes in mbuf */
-
- /* linktab */
-
- isdn_link_t iwic_isdn_linktab;
- drvr_link_t *iwic_drvr_linktab;
-};
-
-/*---------------------------------------------------------------------------*
- * state of a D channel
- *---------------------------------------------------------------------------*/
-struct iwic_dchan
-{
- int enabled;
- int trace_count;
- struct mbuf *ibuf;
- u_char *ibuf_ptr; /* Input buffer pointer */
- int ibuf_len; /* Current length of input buffer */
- int ibuf_max_len; /* Max length in input buffer */
- int rx_count;
-
- int tx_ready; /* Can send next 64 bytes of data. */
- int tx_count;
-
- struct mbuf *obuf;
- int free_obuf;
- u_char *obuf_ptr;
- int obuf_len;
-
- struct mbuf *obuf2;
- int free_obuf2;
-};
-
-/*---------------------------------------------------------------------------*
- * state of one iwic unit
- *---------------------------------------------------------------------------*/
-struct iwic_softc
-{
- int sc_unit;
- u_int32_t sc_iobase;
- int sc_trace;
- int sc_cardtyp;
-
- int sc_I430state;
- int sc_I430T3;
-
- int enabled;
-
- struct iwic_dchan sc_dchan;
- struct iwic_bchan sc_bchan[2];
-
- struct i4b_info sc_resources;
-};
-
-/*---------------------------------------------------------------------------*
- * rd/wr register/fifo macros
- *---------------------------------------------------------------------------*/
-#define IWIC_READ(sc,reg) (inb ((sc)->sc_iobase + (u_int32_t)(reg)))
-#define IWIC_WRITE(sc,reg,val) (outb ((sc)->sc_iobase + (u_int32_t)(reg), (val)))
-#define IWIC_WRDFIFO(sc,p,l) (outsb ((sc)->sc_iobase + D_XFIFO, (p), (l)))
-#define IWIC_RDDFIFO(sc,p,l) (insb ((sc)->sc_iobase + D_RFIFO, (p), (l)))
-#define IWIC_WRBFIFO(sc,b,p,l) (outsb (((sc)->sc_iobase + (b)->offset + B_XFIFO), (p), (l)))
-#define IWIC_RDBFIFO(sc,b,p,l) (insb (((sc)->sc_iobase + (b)->offset + B_RFIFO), (p), (l)))
-
-/*---------------------------------------------------------------------------*
- * possible I.430 states
- *---------------------------------------------------------------------------*/
-enum I430states
-{
- ST_F3N, /* F3 Deactivated, no clock */
- ST_F3, /* F3 Deactivated */
- ST_F4, /* F4 Awaiting Signal */
- ST_F5, /* F5 Identifying Input */
- ST_F6, /* F6 Synchronized */
- ST_F7, /* F7 Activated */
- ST_F8, /* F8 Lost Framing */
- ST_ILL, /* Illegal State */
- N_STATES
-};
-
-/*---------------------------------------------------------------------------*
- * possible I.430 events
- *---------------------------------------------------------------------------*/
-enum I430events
-{
- EV_PHAR, /* PH ACTIVATE REQUEST */
- EV_CE, /* Clock enabled */
- EV_T3, /* Timer 3 expired */
- EV_INFO0, /* receiving INFO0 */
- EV_RSY, /* receiving any signal */
- EV_INFO2, /* receiving INFO2 */
- EV_INFO48, /* receiving INFO4 pri 8/9 */
- EV_INFO410, /* receiving INFO4 pri 10/11 */
- EV_DR, /* Deactivate Request */
- EV_PU, /* Power UP */
- EV_DIS, /* Disconnected (only 2085) */
- EV_EI, /* Error Indication */
- EV_ILL, /* Illegal Event */
- N_EVENTS
-};
-
-/*---------------------------------------------------------------------------*
- * available commands
- *---------------------------------------------------------------------------*/
-enum I430commands
-{
- CMD_ECK, /* Enable clock */
- CMD_TIM, /* Timing */
- CMD_RT, /* Reset */
- CMD_AR8, /* Activation request pri 8 */
- CMD_AR10, /* Activation request pri 10 */
- CMD_DIU, /* Deactivate Indication Upstream */
- CMD_ILL /* Illegal command */
-};
-
-
-extern struct iwic_softc iwic_sc[];
-
-#define iwic_find_sc(unit) (&iwic_sc[(unit)])
-
-extern void iwic_init(struct iwic_softc *);
-extern void iwic_next_state(struct iwic_softc *, int);
-
-extern void iwic_dchan_init(struct iwic_softc *);
-extern void iwic_dchan_xirq(struct iwic_softc *);
-extern void iwic_dchan_xfer_irq(struct iwic_softc *, int);
-extern void iwic_dchan_disable(struct iwic_softc *sc);
-extern int iwic_dchan_data_req(struct iwic_softc *sc, struct mbuf *m, int freeflag);
-extern void iwic_dchan_transmit(struct iwic_softc *sc);
-
-char *iwic_printstate(struct iwic_softc *sc);
-
-void iwic_init_linktab(struct iwic_softc *sc);
-void iwic_bchan_xirq(struct iwic_softc *, int);
-void iwic_bchannel_setup(int unit, int h_chan, int bprot, int activate);
-
-#endif /* _I4B_IWIC_H_ */
diff --git a/sys/i4b/layer1/iwic/i4b_iwic_bchan.c b/sys/i4b/layer1/iwic/i4b_iwic_bchan.c
deleted file mode 100644
index 5e6948f4f938..000000000000
--- a/sys/i4b/layer1/iwic/i4b_iwic_bchan.c
+++ /dev/null
@@ -1,771 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Dave Boyce. All rights reserved.
- *
- * Copyright (c) 2000, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_iwic - isdn4bsd Winbond W6692 driver
- * ----------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Tue Jan 16 13:21:24 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "iwic.h"
-#include "opt_i4b.h"
-#include "pci.h"
-
-#if (NIWIC > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/iwic/i4b_iwic.h>
-#include <i4b/layer1/iwic/i4b_w6692.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_mbuf.h>
-
-static void iwic_bchan_init(struct iwic_softc *sc, int chan_no, int activate);
-
-/*---------------------------------------------------------------------------*
- * B-channel interrupt handler
- *---------------------------------------------------------------------------*/
-void
-iwic_bchan_xirq(struct iwic_softc *sc, int chan_no)
-{
- int irq_stat;
- struct iwic_bchan *chan;
- int cmd = 0;
- int activity = 0;
-
- chan = &sc->sc_bchan[chan_no];
-
- irq_stat = IWIC_READ(sc, chan->offset + B_EXIR);
-
- NDBGL1(L1_H_IRQ, "irq_stat = 0x%x", irq_stat);
-
- if((irq_stat & (B_EXIR_RMR | B_EXIR_RME | B_EXIR_RDOV | B_EXIR_XFR | B_EXIR_XDUN)) == 0)
- {
- NDBGL1(L1_H_XFRERR, "spurious IRQ!");
- return;
- }
-
- if (irq_stat & B_EXIR_RDOV)
- {
- NDBGL1(L1_H_XFRERR, "iwic%d: EXIR B-channel Receive Data Overflow", sc->sc_unit);
- }
-
- if (irq_stat & B_EXIR_XDUN)
- {
- NDBGL1(L1_H_XFRERR, "iwic%d: EXIR B-channel Transmit Data Underrun", sc->sc_unit);
- cmd |= (B_CMDR_XRST); /*XXX must retransmit frame ! */
- }
-
-/* RX message end interrupt */
-
- if(irq_stat & B_EXIR_RME)
- {
- int error;
-
- NDBGL1(L1_H_IRQ, "B_EXIR_RME");
-
- error = (IWIC_READ(sc,chan->offset+B_STAR) &
- (B_STAR_RDOV | B_STAR_CRCE | B_STAR_RMB));
-
- if(error)
- {
- if(error & B_STAR_RDOV)
- NDBGL1(L1_H_XFRERR, "iwic%d: B-channel Receive Data Overflow", sc->sc_unit);
- if(error & B_STAR_CRCE)
- NDBGL1(L1_H_XFRERR, "iwic%d: B-channel CRC Error", sc->sc_unit);
- if(error & B_STAR_RMB)
- NDBGL1(L1_H_XFRERR, "iwic%d: B-channel Receive Message Aborted", sc->sc_unit);
- }
-
- /* all error conditions checked, now decide and take action */
-
- if(error == 0)
- {
- register int fifo_data_len;
- fifo_data_len = ((IWIC_READ(sc,chan->offset+B_RBCL)) &
- ((IWIC_BCHAN_FIFO_LEN)-1));
-
- if(fifo_data_len == 0)
- fifo_data_len = IWIC_BCHAN_FIFO_LEN;
-
-
- if(chan->in_mbuf == NULL)
- {
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 iwic_bchan_irq: RME, cannot allocate mbuf!\n");
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- }
-
- if((chan->in_len + fifo_data_len) <= BCH_MAX_DATALEN)
- {
- /* read data from fifo */
-
- NDBGL1(L1_H_IRQ, "B_EXIR_RME, rd fifo, len = %d", fifo_data_len);
-
- IWIC_RDBFIFO(sc, chan, chan->in_cbptr, fifo_data_len);
-
- cmd |= (B_CMDR_RACK | B_CMDR_RACT);
- IWIC_WRITE(sc, chan->offset + B_CMDR, cmd);
- cmd = 0;
-
- chan->in_len += fifo_data_len;
- chan->rxcount += fifo_data_len;
-
- /* setup mbuf data length */
-
- chan->in_mbuf->m_len = chan->in_len;
- chan->in_mbuf->m_pkthdr.len = chan->in_len;
-
- if(sc->sc_trace & TRACE_B_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IWICUNIT(sc->sc_unit);
- hdr.type = (chan_no == IWIC_BCH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_bchan[chan_no].sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
- }
-
- (*chan->iwic_drvr_linktab->bch_rx_data_ready)(chan->iwic_drvr_linktab->unit);
-
- activity = ACT_RX;
-
- /* mark buffer ptr as unused */
-
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- else
- {
- NDBGL1(L1_H_XFRERR, "RAWHDLC rx buffer overflow in RME, in_len=%d, fifolen=%d", chan->in_len, fifo_data_len);
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- cmd |= (B_CMDR_RRST | B_CMDR_RACK);
- }
- }
- else
- {
- if (chan->in_mbuf != NULL)
- {
- i4b_Bfreembuf(chan->in_mbuf);
- chan->in_mbuf = NULL;
- chan->in_cbptr = NULL;
- chan->in_len = 0;
- }
- cmd |= (B_CMDR_RRST | B_CMDR_RACK);
- }
- }
-
-/* RX fifo full interrupt */
-
- if(irq_stat & B_EXIR_RMR)
- {
- NDBGL1(L1_H_IRQ, "B_EXIR_RMR");
-
- if(chan->in_mbuf == NULL)
- {
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 iwic_bchan_irq: RMR, cannot allocate mbuf!\n");
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- }
-
- chan->rxcount += IWIC_BCHAN_FIFO_LEN;
-
- if((chan->in_len + IWIC_BCHAN_FIFO_LEN) <= BCH_MAX_DATALEN)
- {
- /* read data from fifo */
-
- NDBGL1(L1_H_IRQ, "B_EXIR_RMR, rd fifo, len = max (64)");
-
- IWIC_RDBFIFO(sc, chan, chan->in_cbptr, IWIC_BCHAN_FIFO_LEN);
-
- chan->in_cbptr += IWIC_BCHAN_FIFO_LEN;
- chan->in_len += IWIC_BCHAN_FIFO_LEN;
- }
- else
- {
- if(chan->bprot == BPROT_NONE)
- {
- /* setup mbuf data length */
-
- chan->in_mbuf->m_len = chan->in_len;
- chan->in_mbuf->m_pkthdr.len = chan->in_len;
-
- if(sc->sc_trace & TRACE_B_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IWICUNIT(sc->sc_unit);
- hdr.type = (chan_no == IWIC_BCH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_bchan[chan_no].sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->in_mbuf->m_len, chan->in_mbuf->m_data);
- }
-
- /* silence detection */
-
- if(!(i4b_l1_bchan_tel_silence(chan->in_mbuf->m_data, chan->in_mbuf->m_len)))
- activity = ACT_RX;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- (void) IF_HANDOFF(&chan->rx_queue, chan->in_mbuf, NULL);
-#else
- if(!(IF_QFULL(&chan->rx_queue)))
- {
- IF_ENQUEUE(&chan->rx_queue, chan->in_mbuf);
- }
- else
- {
- i4b_Bfreembuf(chan->in_mbuf);
- }
-#endif
- /* signal upper driver that data is available */
-
- (*chan->iwic_drvr_linktab->bch_rx_data_ready)(chan->iwic_drvr_linktab->unit);
-
- /* alloc new buffer */
-
- if((chan->in_mbuf = i4b_Bgetmbuf(BCH_MAX_DATALEN)) == NULL)
- panic("L1 iwic_bchan_irq: RMR, cannot allocate new mbuf!\n");
-
- /* setup new data ptr */
-
- chan->in_cbptr = chan->in_mbuf->m_data;
-
- /* read data from fifo */
-
- NDBGL1(L1_H_IRQ, "B_EXIR_RMR, rd fifo1, len = max (64)");
-
- IWIC_RDBFIFO(sc, chan, chan->in_cbptr, IWIC_BCHAN_FIFO_LEN);
-
- chan->in_cbptr += IWIC_BCHAN_FIFO_LEN;
- chan->in_len = IWIC_BCHAN_FIFO_LEN;
-
- chan->rxcount += IWIC_BCHAN_FIFO_LEN;
- }
- else
- {
- NDBGL1(L1_H_XFRERR, "RAWHDLC rx buffer overflow in RPF, in_len=%d", chan->in_len);
- chan->in_cbptr = chan->in_mbuf->m_data;
- chan->in_len = 0;
- cmd |= (B_CMDR_RRST | B_CMDR_RACK);
- }
- }
-
- /* command to release fifo space */
-
- cmd |= B_CMDR_RACK;
- }
-
-/* TX interrupt */
-
- if (irq_stat & B_EXIR_XFR)
- {
- /* transmit fifo empty, new data can be written to fifo */
-
- int activity = -1;
- int len;
- int nextlen;
-
- NDBGL1(L1_H_IRQ, "B_EXIR_XFR");
-
- if(chan->out_mbuf_cur == NULL) /* last frame is transmitted */
- {
- IF_DEQUEUE(&chan->tx_queue, chan->out_mbuf_head);
-
- if(chan->out_mbuf_head == NULL)
- {
- chan->state &= ~ST_TX_ACTIVE;
- (*chan->iwic_drvr_linktab->bch_tx_queue_empty)(chan->iwic_drvr_linktab->unit);
- }
- else
- {
- chan->state |= ST_TX_ACTIVE;
- chan->out_mbuf_cur = chan->out_mbuf_head;
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IWICUNIT(sc->sc_unit);
- hdr.type = (chan_no == IWIC_BCH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_bchan[chan_no].sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
-
- if(chan->bprot == BPROT_NONE)
- {
- if(!(i4b_l1_bchan_tel_silence(chan->out_mbuf_cur->m_data, chan->out_mbuf_cur->m_len)))
- activity = ACT_TX;
- }
- else
- {
- activity = ACT_TX;
- }
- }
- }
-
- len = 0;
-
- while(chan->out_mbuf_cur && len != IWIC_BCHAN_FIFO_LEN)
- {
- nextlen = min(chan->out_mbuf_cur_len, IWIC_BCHAN_FIFO_LEN - len);
-
- NDBGL1(L1_H_IRQ, "B_EXIR_XFR, wr fifo, len = %d", nextlen);
-
- IWIC_WRBFIFO(sc, chan, chan->out_mbuf_cur_ptr, nextlen);
-
- cmd |= B_CMDR_XMS;
-
- len += nextlen;
- chan->txcount += nextlen;
-
- chan->out_mbuf_cur_ptr += nextlen;
- chan->out_mbuf_cur_len -= nextlen;
-
- if(chan->out_mbuf_cur_len == 0)
- {
- if((chan->out_mbuf_cur = chan->out_mbuf_cur->m_next) != NULL)
- {
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IWICUNIT(sc->sc_unit);
- hdr.type = (chan_no == IWIC_BCH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_bchan[chan_no].sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
- }
- else
- {
- if (chan->bprot != BPROT_NONE)
- cmd |= B_CMDR_XME;
- i4b_Bfreembuf(chan->out_mbuf_head);
- chan->out_mbuf_head = NULL;
- }
- }
- }
- }
- if(cmd)
- {
- cmd |= B_CMDR_RACT;
- IWIC_WRITE(sc, chan->offset + B_CMDR, cmd);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * initialize one B channels rx/tx data structures
- *---------------------------------------------------------------------------*/
-void
-iwic_bchannel_setup(int unit, int chan_no, int bprot, int activate)
-{
- struct iwic_softc *sc = &iwic_sc[unit];
- struct iwic_bchan *chan = &sc->sc_bchan[chan_no];
-
- int s = SPLI4B();
-
- NDBGL1(L1_BCHAN, "unit %d, chan %d, bprot %d, activate %d", unit, chan_no, bprot, activate);
-
- /* general part */
-
- chan->bprot = bprot; /* B channel protocol */
- chan->state = ST_IDLE; /* B channel state */
-
- if(activate == 0)
- {
- /* deactivation */
- iwic_bchan_init(sc, chan_no, activate);
- }
-
- /* receiver part */
-
- chan->rx_queue.ifq_maxlen = IFQ_MAXLEN;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&chan->rx_queue.ifq_mtx, "i4b_iwic_rx", MTX_DEF);
-#endif
-
- i4b_Bcleanifq(&chan->rx_queue); /* clean rx queue */
-
- chan->rxcount = 0; /* reset rx counter */
-
- i4b_Bfreembuf(chan->in_mbuf); /* clean rx mbuf */
-
- chan->in_mbuf = NULL; /* reset mbuf ptr */
- chan->in_cbptr = NULL; /* reset mbuf curr ptr */
- chan->in_len = 0; /* reset mbuf data len */
-
- /* transmitter part */
-
- chan->tx_queue.ifq_maxlen = IFQ_MAXLEN;
-
-#if defined (__FreeBSD__) && __FreeBSD__ > 4
- mtx_init(&chan->tx_queue.ifq_mtx, "i4b_iwic_tx", MTX_DEF);
-#endif
-
- i4b_Bcleanifq(&chan->tx_queue); /* clean tx queue */
-
- chan->txcount = 0; /* reset tx counter */
-
- i4b_Bfreembuf(chan->out_mbuf_head); /* clean tx mbuf */
-
- chan->out_mbuf_head = NULL; /* reset head mbuf ptr */
- chan->out_mbuf_cur = NULL; /* reset current mbuf ptr */
- chan->out_mbuf_cur_ptr = NULL; /* reset current mbuf data ptr */
- chan->out_mbuf_cur_len = 0; /* reset current mbuf data cnt */
-
- if(activate != 0)
- {
- /* activation */
- iwic_bchan_init(sc, chan_no, activate);
- }
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * initalize / deinitialize B-channel hardware
- *---------------------------------------------------------------------------*/
-static void
-iwic_bchan_init(struct iwic_softc *sc, int chan_no, int activate)
-{
- struct iwic_bchan *bchan = &sc->sc_bchan[chan_no];
-
- NDBGL1(L1_BCHAN, "chan %d, activate %d", chan_no, activate);
-
- if(activate)
- {
- if(bchan->bprot == BPROT_NONE)
- {
- /* Extended transparent mode */
- IWIC_WRITE(sc, bchan->offset + B_MODE, B_MODE_MMS);
- }
- else
- {
- /* Transparent mode */
- IWIC_WRITE(sc, bchan->offset + B_MODE, 0);
- /* disable address comparation */
- IWIC_WRITE (sc, bchan->offset+B_ADM1, 0xff);
- IWIC_WRITE (sc, bchan->offset+B_ADM2, 0xff);
- }
-
- /* reset & start receiver */
- IWIC_WRITE(sc, bchan->offset + B_CMDR, B_CMDR_RRST|B_CMDR_RACT);
-
- /* clear irq mask */
- IWIC_WRITE(sc, bchan->offset + B_EXIM, 0);
- }
- else
- {
- /* mask all irqs */
- IWIC_WRITE(sc, bchan->offset + B_EXIM, 0xff);
-
- /* reset mode */
- IWIC_WRITE(sc, bchan->offset + B_MODE, 0);
-
- /* Bring interface down */
- IWIC_WRITE(sc, bchan->offset + B_CMDR, B_CMDR_RRST | B_CMDR_XRST);
-
- /* Flush pending interrupts */
- IWIC_READ(sc, bchan->offset + B_EXIR);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * start transmission on a b channel
- *---------------------------------------------------------------------------*/
-static void
-iwic_bchannel_start(int unit, int chan_no)
-{
- struct iwic_softc *sc = &iwic_sc[unit];
- register struct iwic_bchan *chan = &sc->sc_bchan[chan_no];
- register int next_len;
- register int len;
-
- int s;
- int activity = -1;
- int cmd = 0;
-
- s = SPLI4B(); /* enter critical section */
-
- NDBGL1(L1_BCHAN, "unit %d, channel %d", unit, chan_no);
-
- if(chan->state & ST_TX_ACTIVE) /* already running ? */
- {
- splx(s);
- return; /* yes, leave */
- }
-
- /* get next mbuf from queue */
-
- IF_DEQUEUE(&chan->tx_queue, chan->out_mbuf_head);
-
- if(chan->out_mbuf_head == NULL) /* queue empty ? */
- {
- splx(s); /* leave critical section */
- return; /* yes, exit */
- }
-
- /* init current mbuf values */
-
- chan->out_mbuf_cur = chan->out_mbuf_head;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
-
- /* activity indicator for timeout handling */
-
- if(chan->bprot == BPROT_NONE)
- {
- if(!(i4b_l1_bchan_tel_silence(chan->out_mbuf_cur->m_data, chan->out_mbuf_cur->m_len)))
- activity = ACT_TX;
- }
- else
- {
- activity = ACT_TX;
- }
-
- chan->state |= ST_TX_ACTIVE; /* we start transmitting */
-
- if(sc->sc_trace & TRACE_B_TX) /* if trace, send mbuf to trace dev */
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IWICUNIT(unit);
- hdr.type = (chan_no == IWIC_BCH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_bchan[chan_no].sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
-
- len = 0; /* # of chars put into tx fifo this time */
-
- /*
- * fill the tx fifo with data from the current mbuf. if
- * current mbuf holds less data than fifo length, try to
- * get the next mbuf from (a possible) mbuf chain. if there is
- * not enough data in a single mbuf or in a chain, then this
- * is the last mbuf and we tell the chip that it has to send
- * CRC and closing flag
- */
-
- while((len < IWIC_BCHAN_FIFO_LEN) && chan->out_mbuf_cur)
- {
- /*
- * put as much data into the fifo as is
- * available from the current mbuf
- */
-
- if((len + chan->out_mbuf_cur_len) >= IWIC_BCHAN_FIFO_LEN)
- next_len = IWIC_BCHAN_FIFO_LEN - len;
- else
- next_len = chan->out_mbuf_cur_len;
-
- /* write what we have from current mbuf to fifo */
-
- IWIC_WRBFIFO(sc, chan, chan->out_mbuf_cur_ptr, next_len);
-
- len += next_len; /* update # of bytes written */
- chan->txcount += next_len; /* statistics */
- chan->out_mbuf_cur_ptr += next_len; /* data ptr */
- chan->out_mbuf_cur_len -= next_len; /* data len */
-
- /*
- * in case the current mbuf (of a possible chain) data
- * has been put into the fifo, check if there is a next
- * mbuf in the chain. If there is one, get ptr to it
- * and update the data ptr and the length
- */
-
- if((chan->out_mbuf_cur_len <= 0) &&
- ((chan->out_mbuf_cur = chan->out_mbuf_cur->m_next) != NULL))
- {
- chan->out_mbuf_cur_ptr = chan->out_mbuf_cur->m_data;
- chan->out_mbuf_cur_len = chan->out_mbuf_cur->m_len;
-
- if(sc->sc_trace & TRACE_B_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IWICUNIT(unit);
- hdr.type = (chan_no == IWIC_BCH_A ? TRC_CH_B1 : TRC_CH_B2);
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_bchan[chan_no].sc_trace_bcount;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, chan->out_mbuf_cur->m_len, chan->out_mbuf_cur->m_data);
- }
- }
- }
-
- /*
- * if there is either still data in the current mbuf and/or
- * there is a successor on the chain available issue just
- * a XTF (transmit) command to the chip. if there is no more
- * data available from the current mbuf (-chain), issue
- * an XTF and an XME (message end) command which will then
- * send the CRC and the closing HDLC flag sequence
- */
-
- if(chan->out_mbuf_cur && (chan->out_mbuf_cur_len > 0))
- {
- /*
- * more data available, send current fifo out.
- * next xfer to tx fifo is done in the
- * interrupt routine.
- */
-
- cmd |= B_CMDR_XMS;
- }
- else
- {
- /* end of mbuf chain */
-
- if(chan->bprot == BPROT_NONE)
- cmd |= B_CMDR_XMS;
- else
- cmd |= (B_CMDR_XMS | B_CMDR_XME);
-
- i4b_Bfreembuf(chan->out_mbuf_head); /* free mbuf chain */
-
- chan->out_mbuf_head = NULL;
- chan->out_mbuf_cur = NULL;
- chan->out_mbuf_cur_ptr = NULL;
- chan->out_mbuf_cur_len = 0;
- }
-
- /* call timeout handling routine */
-
- if(activity == ACT_RX || activity == ACT_TX)
- (*chan->iwic_drvr_linktab->bch_activity)(chan->iwic_drvr_linktab->unit, activity);
-
- if(cmd)
- {
- cmd |= B_CMDR_RACT;
- IWIC_WRITE(sc, chan->offset + B_CMDR, cmd);
- }
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * return B-channel statistics
- *---------------------------------------------------------------------------*/
-static void
-iwic_bchannel_stat(int unit, int chan_no, bchan_statistics_t *bsp)
-{
- struct iwic_softc *sc = iwic_find_sc(unit);
- struct iwic_bchan *bchan = &sc->sc_bchan[chan_no];
-
- int s = SPLI4B();
-
- bsp->outbytes = bchan->txcount;
- bsp->inbytes = bchan->rxcount;
-
- bchan->txcount = 0;
- bchan->rxcount = 0;
-
- splx(s);
-}
-
-/*---------------------------------------------------------------------------*
- * initialize our local linktab
- *---------------------------------------------------------------------------*/
-void
-iwic_init_linktab(struct iwic_softc *sc)
-{
- struct iwic_bchan *chan;
- isdn_link_t *lt;
-
- /* make sure the hardware driver is known to layer 4 */
- ctrl_types[CTRL_PASSIVE].set_linktab = i4b_l1_set_linktab;
- ctrl_types[CTRL_PASSIVE].get_linktab = i4b_l1_ret_linktab;
-
- /* channel A */
-
- chan = &sc->sc_bchan[IWIC_BCH_A];
- lt = &chan->iwic_isdn_linktab;
-
- lt->unit = sc->sc_unit;
- lt->channel = IWIC_BCH_A;
- lt->bch_config = iwic_bchannel_setup;
- lt->bch_tx_start = iwic_bchannel_start;
- lt->bch_stat = iwic_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-
- /* channel B */
-
- chan = &sc->sc_bchan[IWIC_BCH_B];
- lt = &chan->iwic_isdn_linktab;
-
- lt->unit = sc->sc_unit;
- lt->channel = IWIC_BCH_B;
- lt->bch_config = iwic_bchannel_setup;
- lt->bch_tx_start = iwic_bchannel_start;
- lt->bch_stat = iwic_bchannel_stat;
- lt->tx_queue = &chan->tx_queue;
-
- /* used by non-HDLC data transfers, i.e. telephony drivers */
- lt->rx_queue = &chan->rx_queue;
-
- /* used by HDLC data transfers, i.e. ipr and isp drivers */
- lt->rx_mbuf = &chan->in_mbuf;
-}
-
-#endif /* NIWIC > 0 */
diff --git a/sys/i4b/layer1/iwic/i4b_iwic_dchan.c b/sys/i4b/layer1/iwic/i4b_iwic_dchan.c
deleted file mode 100644
index d33dc295c15a..000000000000
--- a/sys/i4b/layer1/iwic/i4b_iwic_dchan.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Dave Boyce. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_iwic - isdn4bsd Winbond W6692 driver
- * ----------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Tue Jan 16 13:20:14 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "iwic.h"
-#include "opt_i4b.h"
-#include "pci.h"
-
-#if (NIWIC > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-
-#include <net/if.h>
-
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_l3l4.h>
-#include <i4b/include/i4b_mbuf.h>
-
-#include <i4b/layer1/iwic/i4b_iwic.h>
-#include <i4b/layer1/iwic/i4b_w6692.h>
-
-#define MAX_DFRAME_LEN 264
-
-static void dchan_receive(struct iwic_softc *sc, int ista);
-
-/*---------------------------------------------------------------------------*
- * initialize D-channel variables and registers
- *---------------------------------------------------------------------------*/
-void
-iwic_dchan_init(struct iwic_softc *sc)
-{
- sc->sc_dchan.ibuf = NULL;
- sc->sc_dchan.rx_count = 0;
-
- sc->sc_dchan.obuf = NULL;
- sc->sc_dchan.obuf2 = NULL;
- sc->sc_dchan.tx_count = 0;
- sc->sc_dchan.tx_ready = 0;
-
- IWIC_WRITE(sc, D_CTL, D_CTL_SRST);
-
- DELAY(5000);
-
- IWIC_WRITE(sc, D_CTL, 0);
-
- IWIC_WRITE(sc, SQX, SQX_SCIE);
-
- IWIC_WRITE(sc, PCTL, 0x00);
- IWIC_WRITE(sc, MOCR, 0x00);
- IWIC_WRITE(sc, GCR, 0x00);
-
- IWIC_WRITE(sc, D_CMDR, D_CMDR_RRST | D_CMDR_XRST);
- IWIC_WRITE(sc, D_MODE, D_MODE_RACT);
-
- IWIC_WRITE(sc, D_SAM, 0xff);
- IWIC_WRITE(sc, D_TAM, 0xff);
-
- IWIC_WRITE(sc, D_EXIM, 0x00);
-}
-
-/*---------------------------------------------------------------------------*
- * Extended IRQ handler for the D-channel
- *---------------------------------------------------------------------------*/
-void
-iwic_dchan_xirq(struct iwic_softc *sc)
-{
- int irq_stat;
- int stat;
-
- irq_stat = IWIC_READ(sc, D_EXIR);
-
- if (irq_stat & D_EXIR_RDOV)
- {
- NDBGL1(L1_I_ERR, "RDOV in state %s", iwic_printstate(sc));
- IWIC_WRITE(sc, D_CMDR, D_CMDR_RRST);
- }
- if (irq_stat & D_EXIR_XDUN)
- {
- NDBGL1(L1_I_ERR, "XDUN in state %s", iwic_printstate(sc));
- sc->sc_dchan.tx_ready = 0;
- }
- if (irq_stat & D_EXIR_XCOL)
- {
- NDBGL1(L1_I_ERR, "XCOL in state %s", iwic_printstate(sc));
- IWIC_WRITE(sc, D_CMDR, D_CMDR_XRST);
- sc->sc_dchan.tx_ready = 0;
- }
- if (irq_stat & D_EXIR_TIN2)
- {
- NDBGL1(L1_I_ERR, "TIN2 in state %s", iwic_printstate(sc));
- }
- if (irq_stat & D_EXIR_MOC)
- {
- stat = IWIC_READ(sc, MOR);
- NDBGL1(L1_I_ERR, "MOC in state %s, byte = 0x%x", iwic_printstate(sc), stat);
- }
-
- if (irq_stat & D_EXIR_ISC)
- {
- stat = (IWIC_READ(sc, CIR)) & 0x0f;
-
- switch (stat)
- {
- case CIR_CE:
- NDBGL1(L1_I_CICO, "rx CE in state %s", iwic_printstate(sc));
- iwic_next_state(sc, EV_CE);
- break;
- case CIR_DRD:
- NDBGL1(L1_I_CICO, "rx DRD in state %s", iwic_printstate(sc));
- iwic_next_state(sc, EV_INFO0);
- i4b_l1_mph_status_ind(L0IWICUNIT(sc->sc_unit), STI_L1STAT, LAYER_IDLE, NULL);
- break;
- case CIR_LD:
- NDBGL1(L1_I_CICO, "rx LD in state %s", iwic_printstate(sc));
- iwic_next_state(sc, EV_RSY);
- break;
- case CIR_ARD:
- NDBGL1(L1_I_CICO, "rx ARD in state %s", iwic_printstate(sc));
- iwic_next_state(sc, EV_INFO2);
- break;
- case CIR_TI:
- NDBGL1(L1_I_CICO, "rx TI in state %s", iwic_printstate(sc));
- iwic_next_state(sc, EV_INFO0);
- break;
- case CIR_ATI:
- NDBGL1(L1_I_CICO, "rx ATI in state %s", iwic_printstate(sc));
- iwic_next_state(sc, EV_INFO0);
- break;
- case CIR_AI8:
- NDBGL1(L1_I_CICO, "rx AI8 in state %s", iwic_printstate(sc));
- i4b_l1_mph_status_ind(L0IWICUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- iwic_next_state(sc, EV_INFO48);
- break;
- case CIR_AI10:
- NDBGL1(L1_I_CICO, "rx AI10 in state %s", iwic_printstate(sc));
- i4b_l1_mph_status_ind(L0IWICUNIT(sc->sc_unit), STI_L1STAT, LAYER_ACTIVE, NULL);
- iwic_next_state(sc, EV_INFO410);
- break;
- case CIR_CD:
- NDBGL1(L1_I_CICO, "rx DIS in state %s", iwic_printstate(sc));
- iwic_next_state(sc, EV_DIS);
- break;
- default:
- NDBGL1(L1_I_ERR, "ERROR, unknown indication 0x%x in state %s", stat, iwic_printstate(sc));
- iwic_next_state(sc, EV_INFO0);
- break;
- }
- }
-
- if (irq_stat & D_EXIR_TEXP)
- {
- NDBGL1(L1_I_ERR, "TEXP in state %s", iwic_printstate(sc));
- }
-
- if (irq_stat & D_EXIR_WEXP)
- {
- NDBGL1(L1_I_ERR, "WEXP in state %s", iwic_printstate(sc));
- }
-}
-
-/*---------------------------------------------------------------------------*
- * All receiving and transmitting takes place here.
- *---------------------------------------------------------------------------*/
-void
-iwic_dchan_xfer_irq(struct iwic_softc *sc, int ista)
-{
- NDBGL1(L1_I_MSG, "ISTA = 0x%x", ista);
-
- if (ista & (ISTA_D_RMR | ISTA_D_RME))
- {
- /* Receive message ready */
- dchan_receive(sc, ista);
- }
- if (ista & ISTA_D_XFR)
- {
- /* Transmitter ready */
- sc->sc_dchan.tx_ready = 1;
-
- iwic_dchan_transmit(sc);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * disable D-channel
- *---------------------------------------------------------------------------*/
-void
-iwic_dchan_disable(struct iwic_softc *sc)
-{
- int s;
-
- s = SPLI4B();
-
- if (sc->sc_dchan.obuf)
- {
- if (sc->sc_dchan.free_obuf)
- i4b_Dfreembuf(sc->sc_dchan.obuf);
- sc->sc_dchan.obuf = NULL;
- }
-
- if (sc->sc_dchan.obuf2)
- {
- if (sc->sc_dchan.free_obuf2)
- i4b_Dfreembuf(sc->sc_dchan.obuf2);
- sc->sc_dchan.obuf2 = NULL;
- }
-
- splx(s);
-
- IWIC_WRITE(sc, CIX, CIX_DRC);
-}
-
-/*---------------------------------------------------------------------------*
- * queue D-channel message for transmission
- *---------------------------------------------------------------------------*/
-int
-iwic_dchan_data_req(struct iwic_softc *sc, struct mbuf *m, int freeflag)
-{
- int s;
-
- if (!m)
- return 0;
-
- s = SPLI4B();
-
- /* Queue message */
-
- if (sc->sc_dchan.obuf)
- {
- if (sc->sc_dchan.obuf2)
- {
- NDBGL1(L1_I_ERR, "no buffer space!");
- }
- else
- {
- sc->sc_dchan.obuf2 = m;
- sc->sc_dchan.free_obuf2 = freeflag;
- }
- }
- else
- {
- sc->sc_dchan.obuf = m;
- sc->sc_dchan.obuf_ptr = m->m_data;
- sc->sc_dchan.obuf_len = m->m_len;
- sc->sc_dchan.free_obuf = freeflag;
- }
-
- iwic_dchan_transmit(sc);
-
- splx(s);
-
- return (0);
-}
-
-/*---------------------------------------------------------------------------*
- * allocate an mbuf
- *---------------------------------------------------------------------------*/
-static void
-dchan_get_mbuf(struct iwic_softc *sc, int len)
-{
- sc->sc_dchan.ibuf = i4b_Dgetmbuf(len);
-
- if (!sc->sc_dchan.ibuf)
- panic("dchan_get_mbuf: unable to allocate %d bytes for mbuf!\n", len);
-
- sc->sc_dchan.ibuf_ptr = sc->sc_dchan.ibuf->m_data;
- sc->sc_dchan.ibuf_max_len = sc->sc_dchan.ibuf->m_len;
- sc->sc_dchan.ibuf_len = 0;
-}
-
-/*---------------------------------------------------------------------------*
- * D-channel receive data interrupt
- *---------------------------------------------------------------------------*/
-static void
-dchan_receive(struct iwic_softc *sc, int ista)
-{
- int command = D_CMDR_RACK;
-
- if (ista & ISTA_D_RMR)
- {
- /* Got 64 bytes in FIFO */
-
- if (!sc->sc_dchan.ibuf)
- {
- dchan_get_mbuf(sc, MAX_DFRAME_LEN);
-
- }
- else if ((sc->sc_dchan.ibuf_len + MAX_DFRAME_LEN) >
- sc->sc_dchan.ibuf_max_len)
- {
- panic("dchan_receive: not enough space in buffer!\n");
- }
-
- IWIC_RDDFIFO(sc, sc->sc_dchan.ibuf_ptr, 64);
-
- sc->sc_dchan.ibuf_ptr += 64;
- sc->sc_dchan.ibuf_len += 64;
- sc->sc_dchan.rx_count += 64;
- }
- if (ista & ISTA_D_RME)
- {
- /* Got end of frame */
- int status;
-
- status = IWIC_READ(sc, D_RSTA);
-
- if (status & (D_RSTA_RDOV | D_RSTA_CRCE | D_RSTA_RMB))
- {
- if (status & D_RSTA_RDOV)
- NDBGL1(L1_I_ERR, "iwic%d: D-channel Receive Data Overflow", sc->sc_unit);
- if (status & D_RSTA_CRCE)
- NDBGL1(L1_I_ERR, "iwic%d: D-channel CRC Error", sc->sc_unit);
- if (status & D_RSTA_RMB)
- NDBGL1(L1_I_ERR, "iwic%d: D-channel Receive Message Aborted", sc->sc_unit);
- command |= D_CMDR_RRST;
- }
- else
- {
- int hi, lo;
- int total_frame_len;
-
- lo = IWIC_READ(sc, D_RBCL);
- hi = IWIC_READ(sc, D_RBCH);
- total_frame_len = D_RBC(hi, lo);
- lo = lo & 0x3f;
-
- if (lo == 0)
- lo = IWIC_DCHAN_FIFO_LEN;
-
- if (!sc->sc_dchan.ibuf)
- {
- dchan_get_mbuf(sc, lo);
- }
- else if ((sc->sc_dchan.ibuf_len + lo) >
- sc->sc_dchan.ibuf_max_len)
- {
- panic("dchan_receive: buffer not long enough");
- }
-
- IWIC_RDDFIFO(sc, sc->sc_dchan.ibuf_ptr, lo);
- sc->sc_dchan.ibuf_len += lo;
- sc->sc_dchan.rx_count += lo;
-
- sc->sc_dchan.ibuf->m_len = sc->sc_dchan.ibuf_len;
-
- if(sc->sc_trace & TRACE_D_RX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IWICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_NT;
- hdr.count = ++sc->sc_dchan.trace_count;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, sc->sc_dchan.ibuf->m_len, sc->sc_dchan.ibuf->m_data);
- }
- i4b_l1_ph_data_ind(L0IWICUNIT(sc->sc_unit), sc->sc_dchan.ibuf);
-
- sc->sc_dchan.ibuf = NULL;
- }
- }
- IWIC_WRITE(sc, D_CMDR, command);
-}
-
-/*---------------------------------------------------------------------------*
- * transmit D-channel frame
- *---------------------------------------------------------------------------*/
-void
-iwic_dchan_transmit(struct iwic_softc *sc)
-{
- int cmd;
- u_char *ptr;
- int len;
-
- if (!sc->sc_dchan.tx_ready)
- return;
-
- if (!sc->sc_dchan.obuf)
- return;
-
- if (sc->sc_I430state != ST_F7)
- return;
-
- ptr = sc->sc_dchan.obuf_ptr;
- len = min(sc->sc_dchan.obuf_len, IWIC_DCHAN_FIFO_LEN);
-
- if(sc->sc_trace & TRACE_D_TX)
- {
- i4b_trace_hdr_t hdr;
- hdr.unit = L0IWICUNIT(sc->sc_unit);
- hdr.type = TRC_CH_D;
- hdr.dir = FROM_TE;
- hdr.count = ++sc->sc_dchan.trace_count;
- MICROTIME(hdr.time);
- i4b_l1_trace_ind(&hdr, len, ptr);
- }
-
- IWIC_WRDFIFO(sc, ptr, len);
-
- sc->sc_dchan.tx_count += len;
-
- if (len < sc->sc_dchan.obuf_len)
- {
- sc->sc_dchan.obuf_ptr += len;
- sc->sc_dchan.obuf_len -= len;
-
- cmd = D_CMDR_XMS;
-
- }
- else
- {
- if (sc->sc_dchan.free_obuf)
- i4b_Dfreembuf(sc->sc_dchan.obuf);
-
- sc->sc_dchan.obuf = NULL;
- sc->sc_dchan.obuf_ptr = NULL;
- sc->sc_dchan.obuf_len = 0;
-
- if (sc->sc_dchan.obuf2)
- {
- sc->sc_dchan.obuf = sc->sc_dchan.obuf2;
- sc->sc_dchan.obuf_ptr = sc->sc_dchan.obuf->m_data;
- sc->sc_dchan.obuf_len = sc->sc_dchan.obuf->m_len;
- sc->sc_dchan.free_obuf = sc->sc_dchan.free_obuf2;
-
- sc->sc_dchan.obuf2 = NULL;
- }
- cmd = D_CMDR_XMS | D_CMDR_XME;
- }
- sc->sc_dchan.tx_ready = 0;
- IWIC_WRITE(sc, D_CMDR, cmd);
-}
-
-#endif /* (NIWIC > 0) && (NPCI > 0) */
diff --git a/sys/i4b/layer1/iwic/i4b_iwic_ext.h b/sys/i4b/layer1/iwic/i4b_iwic_ext.h
deleted file mode 100644
index 210731ec84a5..000000000000
--- a/sys/i4b/layer1/iwic/i4b_iwic_ext.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2000, 2001 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_iwic - isdn4bsd Winbond W6692 driver
- * ----------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Sun Jan 21 11:09:14 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_IWIC_EXT_H_
-#define _I4B_IWIC_EXT_H_
-
-#include <i4b/include/i4b_l3l4.h>
-
-void iwic_set_linktab(int unit, int channel, drvr_link_t * dlt);
-isdn_link_t *iwic_ret_linktab(int unit, int channel);
-
-int iwic_ph_data_req(int unit, struct mbuf *m, int freeflag);
-int iwic_ph_activate_req(int unit);
-int iwic_mph_command_req(int unit, int command, void *parm);
-
-#endif /* _I4B_IWIC_EXT_H_ */
diff --git a/sys/i4b/layer1/iwic/i4b_iwic_fsm.c b/sys/i4b/layer1/iwic/i4b_iwic_fsm.c
deleted file mode 100644
index b093907beae3..000000000000
--- a/sys/i4b/layer1/iwic/i4b_iwic_fsm.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Dave Boyce. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_iwic - isdn4bsd Winbond W6692 driver
- * ----------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Sun Jan 21 11:09:24 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "iwic.h"
-#include "opt_i4b.h"
-#include "pci.h"
-
-#if (NIWIC > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/include/i4b_l3l4.h>
-
-#include <i4b/layer1/iwic/i4b_iwic.h>
-#include <i4b/layer1/iwic/i4b_w6692.h>
-
-#if DO_I4B_DEBUG
-static char *state_names[] = {
- "F3N",
- "F3",
- "F4",
- "F5",
- "F6",
- "F7",
- "F8",
- "ILLEGAL",
-};
-
-static char *event_names[] = {
- "PHAR",
- "CE",
- "T3",
- "INFO0",
- "RSY",
- "INFO2",
- "INFO48",
- "INFO410",
- "DR",
- "PU",
- "DIS",
- "EI",
- "ILLEGAL"
-};
-#endif
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-static void
-F_NULL(struct iwic_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_NULL executing");
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-static void
-F_AR(struct iwic_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_AR executing");
- IWIC_WRITE(sc, CIX, CIX_ECK);
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-static void
-F_AR3(struct iwic_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_AR3 executing");
- IWIC_WRITE(sc, CIX, CIX_AR8);
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-static void
-F_I0I(struct iwic_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_IOI executing");
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-static void
-F_I0A(struct iwic_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_IOA executing");
- iwic_dchan_disable(sc);
- i4b_l1_ph_deactivate_ind(L0IWICUNIT(sc->sc_unit));
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-static void
-F_AI8(struct iwic_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_AI8 executing");
- iwic_dchan_transmit(sc);
- i4b_l1_ph_activate_ind(L0IWICUNIT(sc->sc_unit));
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-static void
-F_AI10(struct iwic_softc *sc)
-{
- NDBGL1(L1_F_MSG, "FSM function F_AI10 executing");
- iwic_dchan_transmit(sc);
- i4b_l1_ph_activate_ind(L0IWICUNIT(sc->sc_unit));
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-struct iwic_state_tab {
- void (*func) (struct iwic_softc *sc); /* function to execute */
- int newstate; /* next state */
-} iwic_state_tab[N_EVENTS][N_STATES] = {
-
-/* STATE: F3N F3 F4 F5 F6 F7 F8 ILLEGAL STATE */
-/* ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ */
-/* EV_PHAR */ {{F_AR, ST_F3 }, {F_AR3, ST_F4 }, {F_NULL, ST_F4 }, {F_NULL, ST_F5 }, {F_NULL, ST_F6 }, {F_NULL, ST_F7 }, {F_NULL, ST_F8 }, {F_NULL, ST_ILL }},
-/* EV_CE */ {{F_NULL, ST_F3 }, {F_AR3, ST_F4 }, {F_NULL, ST_F4 }, {F_NULL, ST_F4 }, {F_NULL, ST_F4 }, {F_NULL, ST_F4 }, {F_NULL, ST_F4 }, {F_NULL, ST_ILL }},
-/* EV_T3 */ {{F_NULL, ST_F3N }, {F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F7 }, {F_NULL, ST_F8 }, {F_NULL, ST_ILL }},
-/* EV_INFO0 */ {{F_I0I, ST_F3 }, {F_I0I, ST_F3 }, {F_I0I, ST_F3 }, {F_I0I, ST_F3 }, {F_I0A, ST_F3 }, {F_I0A, ST_F3 }, {F_I0A, ST_F3 }, {F_NULL, ST_ILL }},
-/* EV_RSY */ {{F_NULL, ST_F3 }, {F_NULL, ST_F5 }, {F_NULL, ST_F5 }, {F_NULL, ST_F5 }, {F_NULL, ST_F8 }, {F_NULL, ST_F8 }, {F_NULL, ST_F8 }, {F_NULL, ST_ILL }},
-/* EV_INFO2 */ {{F_NULL, ST_F6 }, {F_NULL, ST_F6 }, {F_NULL, ST_F6 }, {F_NULL, ST_F6 }, {F_NULL, ST_F6 }, {F_NULL, ST_F6 }, {F_NULL, ST_F6 }, {F_NULL, ST_ILL }},
-/* EV_INFO48 */ {{F_AI8 , ST_F7 }, {F_AI8, ST_F7 }, {F_AI8, ST_F7 }, {F_AI8, ST_F7 }, {F_AI8, ST_F7 }, {F_AI8, ST_F7 }, {F_AI8, ST_F7 }, {F_NULL, ST_ILL }},
-/* EV_INFO410*/ {{F_AI10, ST_F7 }, {F_AI10, ST_F7 }, {F_AI10, ST_F7 }, {F_AI10, ST_F7 }, {F_AI10, ST_F7 }, {F_AI10, ST_F7 }, {F_AI10, ST_F7 }, {F_NULL, ST_ILL }},
-/* EV_DR */ {{F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F4 }, {F_NULL, ST_F5 }, {F_NULL, ST_F6 }, {F_NULL, ST_F7 }, {F_NULL, ST_F8 }, {F_NULL, ST_ILL }},
-/* EV_PU */ {{F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F4 }, {F_NULL, ST_F5 }, {F_NULL, ST_F6 }, {F_NULL, ST_F7 }, {F_NULL, ST_F8 }, {F_NULL, ST_ILL }},
-/* EV_DIS */ {{F_NULL, ST_F3N }, {F_NULL, ST_F3N }, {F_NULL, ST_F3N }, {F_NULL, ST_F3N }, {F_NULL, ST_F3N }, {F_I0A, ST_F3N }, {F_I0A, ST_F3N }, {F_NULL, ST_ILL }},
-/* EV_EI */ {{F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_F3 }, {F_NULL, ST_ILL }},
-/* EV_ILL */ {{F_NULL, ST_ILL }, {F_NULL, ST_ILL }, {F_NULL, ST_ILL }, {F_NULL, ST_ILL }, {F_NULL, ST_ILL }, {F_NULL, ST_ILL }, {F_NULL, ST_ILL }, {F_NULL, ST_ILL }},
-};
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-void
-iwic_next_state(struct iwic_softc *sc, int event)
-{
- int currstate, newstate;
-
- NDBGL1(L1_F_MSG, "event %s", event_names[event]);
-
- if (event >= N_EVENTS)
- {
- printf("iwic_next_state: event >= N_EVENTS\n");
- return;
- }
-
- currstate = sc->sc_I430state;
-
- newstate = iwic_state_tab[event][currstate].newstate;
- if (newstate >= N_STATES)
- {
- printf("iwic_next_state: newstate >= N_STATES\n");
- return;
- }
-
- NDBGL1(L1_F_MSG, "state %s -> %s",
- state_names[currstate], state_names[newstate]);
-
- sc->sc_I430state = newstate;
-
- (*iwic_state_tab[event][currstate].func) (sc);
-}
-
-#if DO_I4B_DEBUG
-/*---------------------------------------------------------------------------*
- * return pointer to current state description
- *---------------------------------------------------------------------------*/
-char *
-iwic_printstate(struct iwic_softc *sc)
-{
- return((char *)state_names[sc->sc_I430state]);
-}
-#endif
-
-#endif
diff --git a/sys/i4b/layer1/iwic/i4b_iwic_l1if.c b/sys/i4b/layer1/iwic/i4b_iwic_l1if.c
deleted file mode 100644
index 2b654e3e2a95..000000000000
--- a/sys/i4b/layer1/iwic/i4b_iwic_l1if.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Dave Boyce. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_iwic - isdn4bsd Winbond W6692 driver
- * ----------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Sun Jan 21 11:09:33 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "iwic.h"
-#include "opt_i4b.h"
-#include "pci.h"
-
-#if (NIWIC > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-
-
-
-#include <machine/i4b_debug.h>
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_l3l4.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/iwic/i4b_iwic.h>
-#include <i4b/layer1/iwic/i4b_iwic_ext.h>
-
-/* jump table for multiplex routines */
-
-struct i4b_l1mux_func iwic_l1mux_func = {
- iwic_ret_linktab,
- iwic_set_linktab,
- iwic_mph_command_req,
- iwic_ph_data_req,
- iwic_ph_activate_req,
-};
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-int
-iwic_ph_data_req(int unit, struct mbuf *m, int freeflag)
-{
- struct iwic_softc *sc = iwic_find_sc(unit);
-
- return iwic_dchan_data_req(sc, m, freeflag);
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-int
-iwic_ph_activate_req(int unit)
-{
- struct iwic_softc *sc = iwic_find_sc(unit);
-
- iwic_next_state(sc, EV_PHAR);
-
- return 0;
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-int
-iwic_mph_command_req(int unit, int command, void *parm)
-{
- struct iwic_softc *sc = iwic_find_sc(unit);
-
- switch (command)
- {
- case CMR_DOPEN: /* Daemon running */
- NDBGL1(L1_PRIM, "CMR_DOPEN");
- sc->enabled = TRUE;
- break;
-
- case CMR_DCLOSE: /* Daemon not running */
- NDBGL1(L1_PRIM, "CMR_DCLOSE");
- sc->enabled = FALSE;
- break;
-
- case CMR_SETTRACE:
- NDBGL1(L1_PRIM, "CMR_SETTRACE, parm = %d", (unsigned int)parm);
- sc->sc_trace = (unsigned int)parm;
- break;
-
- default:
- NDBGL1(L1_PRIM, "unknown command = %d", command);
- break;
- }
-
- return 0;
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-isdn_link_t *
-iwic_ret_linktab(int unit, int channel)
-{
- struct iwic_softc *sc = iwic_find_sc(unit);
- struct iwic_bchan *bchan = &sc->sc_bchan[channel];
-
- return &bchan->iwic_isdn_linktab;
-}
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-void
-iwic_set_linktab (int unit, int channel, drvr_link_t *dlt)
-{
- struct iwic_softc *sc = iwic_find_sc(unit);
- struct iwic_bchan *bchan = &sc->sc_bchan[channel];
-
- bchan->iwic_drvr_linktab = dlt;
-}
-
-#endif
diff --git a/sys/i4b/layer1/iwic/i4b_iwic_pci.c b/sys/i4b/layer1/iwic/i4b_iwic_pci.c
deleted file mode 100644
index 7f92fdb49dd8..000000000000
--- a/sys/i4b/layer1/iwic/i4b_iwic_pci.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Dave Boyce. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_iwic - isdn4bsd Winbond W6692 driver
- * ----------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Tue Jan 16 10:53:03 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#include "iwic.h"
-#include "opt_i4b.h"
-#include "pci.h"
-
-#if (NIWIC > 0) && (NPCI > 0)
-
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/socket.h>
-#include <net/if.h>
-
-
-#include <machine/bus.h>
-#include <machine/resource.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#include <pci/pcireg.h>
-#include <pci/pcivar.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_trace.h>
-
-#include <i4b/include/i4b_global.h>
-#include <i4b/include/i4b_l3l4.h>
-
-#include <i4b/layer1/i4b_l1.h>
-
-#include <i4b/layer1/iwic/i4b_iwic.h>
-#include <i4b/layer1/iwic/i4b_w6692.h>
-
-extern struct i4b_l1mux_func iwic_l1mux_func;
-
-/* Winbond PCI Configuration Space */
-
-#define BASEREG0_MAPOFF 0x00
-#define BASEREG1_MAPOFF 0x04
-
-#define BADDR0 (PCIR_MAPS + BASEREG0_MAPOFF)
-#define BADDR1 (PCIR_MAPS + BASEREG1_MAPOFF)
-
-
-static void iwic_pci_intr(struct iwic_softc *sc);
-static int iwic_pci_probe(device_t dev);
-static int iwic_pci_attach(device_t dev);
-
-static device_method_t iwic_pci_methods[] =
-{
- DEVMETHOD(device_probe, iwic_pci_probe),
- DEVMETHOD(device_attach, iwic_pci_attach),
- { 0, 0 }
-};
-
-static driver_t iwic_pci_driver =
-{
- "iwic",
- iwic_pci_methods,
- 0
-};
-
-static devclass_t iwic_pci_devclass;
-
-DRIVER_MODULE(iwic, pci, iwic_pci_driver, iwic_pci_devclass, 0, 0);
-
-#define IWIC_MAXUNIT 4
-
-struct iwic_softc iwic_sc[IWIC_MAXUNIT];
-
-/*---------------------------------------------------------------------------*
- * PCI ID list for ASUSCOM card got from Asuscom in March 2000:
- *
- * Vendor ID: 0675 Device ID: 1702
- * Vendor ID: 0675 Device ID: 1703
- * Vendor ID: 0675 Device ID: 1707
- * Vendor ID: 10CF Device ID: 105E
- * Vendor ID: 1043 Device ID: 0675 SubVendor: 144F SubDevice ID: 2000
- * Vendor ID: 1043 Device ID: 0675 SubVendor: 144F SubDevice ID: 1702
- * Vendor ID: 1043 Device ID: 0675 SubVendor: 144F SubDevice ID: 1707
- * Vendor ID: 1043 Device ID: 0675 SubVendor: 1043 SubDevice ID: 1702
- * Vendor ID: 1043 Device ID: 0675 SubVendor: 1043 SubDevice ID: 1707
- * Vendor ID: 1050 Device ID: 6692 SubVendor: 0675 SubDevice ID: 1702
- *---------------------------------------------------------------------------*/
-
-static struct winids {
- u_int32_t type;
- int sv;
- int sd;
- const char *desc;
-} win_ids[] = {
- { 0x66921050, -1, -1, "Generic Winbond W6692 ISDN PCI (0x66921050)" },
- { 0x66921050, 0x144F, 0x1707, "Planet PCI ISDN Adapter (Model IA128P-STDV)" },
- { 0x17020675, -1, -1, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x17020675)" },
- { 0x17030675, -1, -1, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x17030675)" },
- { 0x17070675, -1, -1, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x17070675)" },
- { 0x105e10cf, -1, -1, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x105e10cf)" },
- { 0x06751043, 0x144F, 0x2000, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x06751043)" },
- { 0x06751043, 0x144F, 0x1702, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x06751043)" },
- { 0x06751043, 0x144F, 0x1707, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x06751043)" },
- { 0x06751043, 0x1443, 0x1702, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x06751043)" },
- { 0x06751043, 0x1443, 0x1707, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x06751043)" },
- { 0x06751043, 0x144F, 0x2000, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x06751043)" },
- { 0x06751043, 0x144F, 0x2000, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x06751043)" },
- { 0x06751043, 0x144F, 0x2000, "ASUSCOM P-IN100-ST-D (Winbond W6692, 0x06751043)" },
- { 0x00000000, 0, 0, NULL }
-};
-
-/*---------------------------------------------------------------------------*
- * iwic PCI probe
- *---------------------------------------------------------------------------*/
-static int
-iwic_pci_probe(device_t dev)
-{
- u_int32_t type = pci_get_devid(dev);
- u_int32_t sv = pci_get_subvendor(dev);
- u_int32_t sd = pci_get_subdevice(dev);
-
- struct winids *wip = win_ids;
-
- while(wip->type)
- {
- if(wip->type == type)
- {
- if(((wip->sv == -1) && (wip->sd == -1)) ||
- ((wip->sv == sv) && (wip->sd == sd)))
- break;
- }
- ++wip;
- }
-
- if(wip->desc)
- {
- if(bootverbose)
- {
- printf("iwic_pci_probe: vendor = 0x%x, device = 0x%x\n", pci_get_vendor(dev), pci_get_device(dev));
- printf("iwic_pci_probe: subvendor = 0x%x, subdevice = 0x%x\n", sv, sd);
- }
- device_set_desc(dev, wip->desc);
- return(0);
- }
- else
- {
- return(ENXIO);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * PCI attach
- *---------------------------------------------------------------------------*/
-static int
-iwic_pci_attach(device_t dev)
-{
- unsigned short iobase;
- struct iwic_softc *sc;
- void *ih = 0;
- int unit = device_get_unit(dev);
- struct iwic_bchan *bchan;
-
- /* check max unit range */
-
- if(unit >= IWIC_MAXUNIT)
- {
- printf("iwic%d: Error, unit %d >= IWIC_MAXUNIT!\n", unit, unit);
- return(ENXIO);
- }
-
- sc = iwic_find_sc(unit); /* get softc */
-
- sc->sc_unit = unit;
-
- /* use the i/o mapped base address */
-
- sc->sc_resources.io_rid[0] = BADDR1;
-
- if(!(sc->sc_resources.io_base[0] =
- bus_alloc_resource(dev, SYS_RES_IOPORT,
- &sc->sc_resources.io_rid[0],
- 0UL, ~0UL, 1, RF_ACTIVE)))
- {
- printf("iwic%d: Couldn't alloc io port!\n", unit);
- return(ENXIO);
- }
-
- iobase = rman_get_start(sc->sc_resources.io_base[0]);
-
- if(!(sc->sc_resources.irq =
- bus_alloc_resource(dev, SYS_RES_IRQ,
- &sc->sc_resources.irq_rid,
- 0UL, ~0UL, 1, RF_SHAREABLE|RF_ACTIVE)))
- {
- printf("iwic%d: Couldn't alloc irq!\n",unit);
- return(ENXIO);
- }
-
- /* setup card type */
-
- sc->sc_cardtyp = CARD_TYPEP_WINB6692;
- sc->sc_iobase = (u_int32_t) iobase;
- sc->sc_trace = TRACE_OFF;
- sc->sc_I430state = ST_F3N; /* Deactivated */
- sc->enabled = FALSE;
-
- if(bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET,
- (void(*)(void*))iwic_pci_intr,
- sc, &ih))
- {
- printf("iwic%d: Couldn't set up irq!\n", unit);
- return(ENXIO);
- }
-
- /* disable interrupts */
- IWIC_WRITE(sc, IMASK, 0xff);
-
- iwic_dchan_init(sc);
-
- bchan = &sc->sc_bchan[IWIC_BCH_A];
- bchan->unit = unit;
- bchan->offset = B1_CHAN_OFFSET;
- bchan->channel = IWIC_BCH_A;
- bchan->state = ST_IDLE;
-
- iwic_bchannel_setup(unit, IWIC_BCH_A, BPROT_NONE, 0);
-
- bchan = &sc->sc_bchan[IWIC_BCH_B];
- bchan->unit = unit;
- bchan->offset = B2_CHAN_OFFSET;
- bchan->channel = IWIC_BCH_B;
- bchan->state = ST_IDLE;
-
- iwic_bchannel_setup(unit, IWIC_BCH_B, BPROT_NONE, 0);
-
- iwic_init_linktab(sc);
-
- if(bootverbose)
- {
- int ver = IWIC_READ(sc, D_RBCH);
- printf("iwic%d: W6692 chip version = %d\n", unit, D_RBCH_VN(ver));
- }
-
- i4b_l1_mph_status_ind(L0IWICUNIT(sc->sc_unit), STI_ATTACH, sc->sc_cardtyp, &iwic_l1mux_func);
-
- IWIC_READ(sc, ISTA);
-
- /* Enable interrupts */
- IWIC_WRITE(sc, IMASK, IMASK_XINT0 | IMASK_XINT1);
-
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * IRQ handler
- *---------------------------------------------------------------------------*/
-static void
-iwic_pci_intr(struct iwic_softc *sc)
-{
- while (1)
- {
- int irq_stat = IWIC_READ(sc, ISTA);
-
- if (irq_stat == 0)
- break;
-
- if (irq_stat & (ISTA_D_RME | ISTA_D_RMR | ISTA_D_XFR))
- {
- iwic_dchan_xfer_irq(sc, irq_stat);
- }
- if (irq_stat & ISTA_D_EXI)
- {
- iwic_dchan_xirq(sc);
- }
- if (irq_stat & ISTA_B1_EXI)
- {
- iwic_bchan_xirq(sc, 0);
- }
- if (irq_stat & ISTA_B2_EXI)
- {
- iwic_bchan_xirq(sc, 1);
- }
- }
-}
-
-#endif
diff --git a/sys/i4b/layer1/iwic/i4b_w6692.h b/sys/i4b/layer1/iwic/i4b_w6692.h
deleted file mode 100644
index ec3112fac61e..000000000000
--- a/sys/i4b/layer1/iwic/i4b_w6692.h
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (c) 1999, 2000 Dave Boyce. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * i4b_iwic - isdn4bsd Winbond W6692 driver
- * ----------------------------------------
- *
- * $FreeBSD$
- *
- * last edit-date: [Sun Jan 21 11:09:46 2001]
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef _I4B_W6692_H_
-#define _I4B_W6692_H_
-
-#define IWIC_BCH_A 0 /* channel A */
-#define IWIC_BCH_B 1 /* channel B */
-
-/*---------------------------------------------------------------------------*
- * FIFO depths
- *---------------------------------------------------------------------------*/
-#define IWIC_DCHAN_FIFO_LEN 64
-#define IWIC_BCHAN_FIFO_LEN 64
-
-/*---------------------------------------------------------------------------*
- * D-Channel register offsets
- *---------------------------------------------------------------------------*/
-#define D_RFIFO 0x00 /* D channel receive FIFO */
-#define D_XFIFO 0x04 /* D channel transmit FIFO */
-#define D_CMDR 0x08 /* D channel command register */
-#define D_MODE 0x0c /* D channel mode control */
-#define D_TIMR 0x10 /* D channel timer control */
-#define D_EXIR 0x1c /* D channel extended interrupt */
-#define D_EXIM 0x20 /* D channel extended interrupt mask */
-#define D_STAR 0x24 /* D channel status register */
-#define D_RSTA 0x28 /* D channel receive status */
-#define D_SAM 0x2c /* D channel address mask 1 */
-#define D_SAP1 0x30 /* D channel individual SAPI 1 */
-#define D_SAP2 0x34 /* D channel individual SAPI 2 */
-#define D_TAM 0x38 /* D channel address mask 2 */
-#define D_TEI1 0x3c /* D channel individual TEI 1 */
-#define D_TEI2 0x40 /* D channel individual TEI 2 */
-#define D_RBCH 0x44 /* D channel receive frame byte count high */
-#define D_RBCL 0x48 /* D channel receive frame byte count low */
-#define D_CTL 0x54 /* D channel control register */
-
-/*---------------------------------------------------------------------------*
- * B-channel base offsets
- *---------------------------------------------------------------------------*/
-#define B1_CHAN_OFFSET 0x80 /* B1 channel offset */
-#define B2_CHAN_OFFSET 0xc0 /* B2 channel offset */
-
-/*---------------------------------------------------------------------------*
- * B-channel register offsets, from base
- *---------------------------------------------------------------------------*/
-#define B_RFIFO 0x00 /* B channel receive FIFO */
-#define B_XFIFO 0x04 /* B channel transmit FIFO */
-#define B_CMDR 0x08 /* B channel command register */
-#define B_MODE 0x0c /* B channel mode control */
-#define B_EXIR 0x10 /* B channel extended interrupt */
-#define B_EXIM 0x14 /* B channel extended interrupt mask */
-#define B_STAR 0x18 /* B channel status register */
-#define B_ADM1 0x1c /* B channel address mask 1 */
-#define B_ADM2 0x20 /* B channel address mask 2 */
-#define B_ADR1 0x24 /* B channel address 1 */
-#define B_ADR2 0x28 /* B channel address 2 */
-#define B_RBCL 0x2c /* B channel receive frame byte count high */
-#define B_RBCH 0x30 /* B channel receive frame byte count low */
-
-/*---------------------------------------------------------------------------*
- * Remaining control register offsets.
- *---------------------------------------------------------------------------*/
-#define ISTA 0x14 /* Interrupt status register */
-#define IMASK 0x18 /* Interrupt mask register */
-#define TIMR2 0x4c /* Timer 2 */
-#define L1_RC 0x50 /* GCI layer 1 ready code */
-#define CIR 0x58 /* Command/Indication receive */
-#define CIX 0x5c /* Command/Indication transmit */
-#define SQR 0x60 /* S/Q channel receive register */
-#define SQX 0x64 /* S/Q channel transmit register */
-#define PCTL 0x68 /* Peripheral control register */
-#define MOR 0x6c /* Monitor receive channel */
-#define MOX 0x70 /* Monitor transmit channel */
-#define MOSR 0x74 /* Monitor channel status register */
-#define MOCR 0x78 /* Monitor channel control register */
-#define GCR 0x7c /* GCI mode control register */
-#define XADDR 0xf4 /* Peripheral address register */
-#define XDATA 0xf8 /* Peripheral data register */
-#define EPCTL 0xfc /* Serial EEPROM control */
-
-/*---------------------------------------------------------------------------*
- * register bits
- *---------------------------------------------------------------------------*/
-#define D_CMDR_RACK 0x80
-#define D_CMDR_RRST 0x40
-#define D_CMDR_STT 0x10
-#define D_CMDR_XMS 0x08
-#define D_CMDR_XME 0x02
-#define D_CMDR_XRST 0x01
-
-#define D_MODE_MMS 0x80
-#define D_MODE_RACT 0x40
-#define D_MODE_TMS 0x10
-#define D_MODE_TEE 0x08
-#define D_MODE_MFD 0x04
-#define D_MODE_DLP 0x02
-#define D_MODE_RLP 0x01
-
-#define D_TIMR_CNT(i) (((i) >> 5) & 0x07)
-#define D_TIMR_VAL(i) ((i) & 0x1f)
-
-#define ISTA_D_RMR 0x80
-#define ISTA_D_RME 0x40
-#define ISTA_D_XFR 0x20
-#define ISTA_XINT1 0x10
-#define ISTA_XINT0 0x08
-#define ISTA_D_EXI 0x04
-#define ISTA_B1_EXI 0x02
-#define ISTA_B2_EXI 0x01
-
-#define IMASK_D_RMR 0x80
-#define IMASK_D_RME 0x40
-#define IMASK_D_XFR 0x20
-#define IMASK_XINT1 0x10
-#define IMASK_XINT0 0x08
-#define IMASK_D_EXI 0x04
-#define IMASK_B1_EXI 0x02
-#define IMASK_B2_EXI 0x01
-
-#define D_EXIR_RDOV 0x80
-#define D_EXIR_XDUN 0x40
-#define D_EXIR_XCOL 0x20
-#define D_EXIR_TIN2 0x10
-#define D_EXIR_MOC 0x08
-#define D_EXIR_ISC 0x04
-#define D_EXIR_TEXP 0x02
-#define D_EXIR_WEXP 0x01
-
-#define D_EXIM_RDOV 0x80
-#define D_EXIM_XDUN 0x40
-#define D_EXIM_XCOL 0x20
-#define D_EXIM_TIM2 0x10
-#define D_EXIM_MOC 0x08
-#define D_EXIM_ISC 0x04
-#define D_EXIM_TEXP 0x02
-#define D_EXIM_WEXP 0x01
-
-#define D_STAR_XDOW 0x80
-#define D_STAR_XBZ 0x20
-#define D_STAR_DRDY 0x10
-
-#define D_RSTA_RDOV 0x40
-#define D_RSTA_CRCE 0x20
-#define D_RSTA_RMB 0x10
-
-#define D_RBCH_VN(i) (((i) >> 6) & 0x03)
-#define D_RBCH_LOV 0x20
-#define D_RBC(h,l) (((((h) & 0x1f)) << 8) + (l))
-
-#define D_TIMR2_TMD 0x80
-#define D_TIMR2_TBCN(i) ((i) & 0x3f)
-
-#define L1_RC_RC(i) ((i) & 0x0f)
-
-#define D_CTL_WTT(i) (((i) > 6) & 0x03)
-#define D_CTL_SRST 0x20
-#define D_CTL_TPS 0x04
-#define D_CTL_OPS(i) ((i) & 0x03)
-
-#define CIR_SCC 0x80
-#define CIR_ICC 0x40
-#define CIR_CODR(i) ((i) & 0x0f)
-
-#define CIX_ECK 0x00
-#define CIX_RST 0x01
-#define CIX_SCP 0x04
-#define CIX_SSP 0x02
-#define CIX_AR8 0x08
-#define CIX_AR10 0x09
-#define CIX_EAL 0x0a
-#define CIX_DRC 0x0f
-
-#define CIR_CE 0x07
-#define CIR_DRD 0x00
-#define CIR_LD 0x04
-#define CIR_ARD 0x08
-#define CIR_TI 0x0a
-#define CIR_ATI 0x0b
-#define CIR_AI8 0x0c
-#define CIR_AI10 0x0d
-#define CIR_CD 0x0f
-
-#define SQR_XIND1 0x80
-#define SQR_XIND0 0x40
-#define SQR_MSYN 0x20
-#define SQR_SCIE 0x10
-#define SQR_S(i) ((i) & 0x0f)
-
-#define SQX_SCIE 0x10
-#define SQX_Q(i) ((i) & 0x0f)
-
-
-#define B_CMDR_RACK 0x80
-#define B_CMDR_RRST 0x40
-#define B_CMDR_RACT 0x20
-#define B_CMDR_XMS 0x04
-#define B_CMDR_XME 0x02
-#define B_CMDR_XRST 0x01
-
-#define B_MODE_MMS 0x80
-#define B_MODE_ITF 0x40
-#define B_MODE_EPCM 0x20
-#define B_MODE_BSW1 0x10
-#define B_MODE_BSW0 0x08
-#define B_MODE_SW56 0x04
-#define B_MODE_FTS1 0x02
-#define B_MODE_FTS0 0x01
-
-#define B_EXIR_RMR 0x40
-#define B_EXIR_RME 0x20
-#define B_EXIR_RDOV 0x10
-#define B_EXIR_XFR 0x02
-#define B_EXIR_XDUN 0x01
-
-#define B_EXIM_RMR 0x40
-#define B_EXIM_RME 0x20
-#define B_EXIM_RDOV 0x10
-#define B_EXIM_XFR 0x02
-#define B_EXIM_XDUN 0x01
-
-#define B_STAR_RDOV 0x40
-#define B_STAR_CRCE 0x20
-#define B_STAR_RMB 0x10
-#define B_STAR_XDOW 0x04
-#define B_STAR_XBZ 0x01
-
-#define B_RBC(h,l) (((((h) & 0x1f)) << 8) + (l))
-
-#endif /* _I4B_W6692_H_ */
diff --git a/sys/kern/md4c.c b/sys/kern/md4c.c
deleted file mode 100644
index e3a0bfa9c497..000000000000
--- a/sys/kern/md4c.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/* MD4C.C - RSA Data Security, Inc., MD4 message-digest algorithm
- * $FreeBSD$
- */
-
-/* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
-
- License to copy and use this software is granted provided that it
- is identified as the "RSA Data Security, Inc. MD4 Message-Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
-
- License is also granted to make and use derivative works provided
- that such works are identified as "derived from the RSA Data
- Security, Inc. MD4 Message-Digest Algorithm" in all material
- mentioning or referencing the derived work.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/md4.h>
-
-typedef unsigned char *POINTER;
-typedef u_int16_t UINT2;
-typedef u_int32_t UINT4;
-
-#define PROTO_LIST(list) list
-
-/* Constants for MD4Transform routine.
- */
-#define S11 3
-#define S12 7
-#define S13 11
-#define S14 19
-#define S21 3
-#define S22 5
-#define S23 9
-#define S24 13
-#define S31 3
-#define S32 9
-#define S33 11
-#define S34 15
-
-static void MD4Transform PROTO_LIST ((UINT4 [4], const unsigned char [64]));
-static void Encode PROTO_LIST
- ((unsigned char *, UINT4 *, unsigned int));
-static void Decode PROTO_LIST
- ((UINT4 *, const unsigned char *, unsigned int));
-
-static unsigned char PADDING[64] = {
- 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/* F, G and H are basic MD4 functions.
- */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-
-/* ROTATE_LEFT rotates x left n bits.
- */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/* FF, GG and HH are transformations for rounds 1, 2 and 3 */
-/* Rotation is separate from addition to prevent recomputation */
-#define FF(a, b, c, d, x, s) { \
- (a) += F ((b), (c), (d)) + (x); \
- (a) = ROTATE_LEFT ((a), (s)); \
- }
-#define GG(a, b, c, d, x, s) { \
- (a) += G ((b), (c), (d)) + (x) + (UINT4)0x5a827999; \
- (a) = ROTATE_LEFT ((a), (s)); \
- }
-#define HH(a, b, c, d, x, s) { \
- (a) += H ((b), (c), (d)) + (x) + (UINT4)0x6ed9eba1; \
- (a) = ROTATE_LEFT ((a), (s)); \
- }
-
-/* MD4 initialization. Begins an MD4 operation, writing a new context.
- */
-void MD4Init (context)
-MD4_CTX *context; /* context */
-{
- context->count[0] = context->count[1] = 0;
-
- /* Load magic initialization constants.
- */
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
-}
-
-/* MD4 block update operation. Continues an MD4 message-digest
- operation, processing another message block, and updating the
- context.
- */
-void MD4Update (context, input, inputLen)
-MD4_CTX *context; /* context */
-const unsigned char *input; /* input block */
-unsigned int inputLen; /* length of input block */
-{
- unsigned int i, index, partLen;
-
- /* Compute number of bytes mod 64 */
- index = (unsigned int)((context->count[0] >> 3) & 0x3F);
- /* Update number of bits */
- if ((context->count[0] += ((UINT4)inputLen << 3))
- < ((UINT4)inputLen << 3))
- context->count[1]++;
- context->count[1] += ((UINT4)inputLen >> 29);
-
- partLen = 64 - index;
- /* Transform as many times as possible.
- */
- if (inputLen >= partLen) {
- bcopy(input, &context->buffer[index], partLen);
- MD4Transform (context->state, context->buffer);
-
- for (i = partLen; i + 63 < inputLen; i += 64)
- MD4Transform (context->state, &input[i]);
-
- index = 0;
- }
- else
- i = 0;
-
- /* Buffer remaining input */
- bcopy(&input[i], &context->buffer[index], inputLen-i);
-}
-
-/* MD4 padding. */
-void MD4Pad (context)
-MD4_CTX *context; /* context */
-{
- unsigned char bits[8];
- unsigned int index, padLen;
-
- /* Save number of bits */
- Encode (bits, context->count, 8);
-
- /* Pad out to 56 mod 64.
- */
- index = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (index < 56) ? (56 - index) : (120 - index);
- MD4Update (context, PADDING, padLen);
-
- /* Append length (before padding) */
- MD4Update (context, bits, 8);
-}
-
-/* MD4 finalization. Ends an MD4 message-digest operation, writing the
- the message digest and zeroizing the context.
- */
-void MD4Final (digest, context)
-unsigned char digest[16]; /* message digest */
-MD4_CTX *context; /* context */
-{
- /* Do padding */
- MD4Pad (context);
-
- /* Store state in digest */
- Encode (digest, context->state, 16);
-
- /* Zeroize sensitive information.
- */
- bzero((POINTER)context, sizeof (*context));
-}
-
-/* MD4 basic transformation. Transforms state based on block.
- */
-static void MD4Transform (state, block)
-UINT4 state[4];
-const unsigned char block[64];
-{
- UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- Decode (x, block, 64);
-
- /* Round 1 */
- FF (a, b, c, d, x[ 0], S11); /* 1 */
- FF (d, a, b, c, x[ 1], S12); /* 2 */
- FF (c, d, a, b, x[ 2], S13); /* 3 */
- FF (b, c, d, a, x[ 3], S14); /* 4 */
- FF (a, b, c, d, x[ 4], S11); /* 5 */
- FF (d, a, b, c, x[ 5], S12); /* 6 */
- FF (c, d, a, b, x[ 6], S13); /* 7 */
- FF (b, c, d, a, x[ 7], S14); /* 8 */
- FF (a, b, c, d, x[ 8], S11); /* 9 */
- FF (d, a, b, c, x[ 9], S12); /* 10 */
- FF (c, d, a, b, x[10], S13); /* 11 */
- FF (b, c, d, a, x[11], S14); /* 12 */
- FF (a, b, c, d, x[12], S11); /* 13 */
- FF (d, a, b, c, x[13], S12); /* 14 */
- FF (c, d, a, b, x[14], S13); /* 15 */
- FF (b, c, d, a, x[15], S14); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, x[ 0], S21); /* 17 */
- GG (d, a, b, c, x[ 4], S22); /* 18 */
- GG (c, d, a, b, x[ 8], S23); /* 19 */
- GG (b, c, d, a, x[12], S24); /* 20 */
- GG (a, b, c, d, x[ 1], S21); /* 21 */
- GG (d, a, b, c, x[ 5], S22); /* 22 */
- GG (c, d, a, b, x[ 9], S23); /* 23 */
- GG (b, c, d, a, x[13], S24); /* 24 */
- GG (a, b, c, d, x[ 2], S21); /* 25 */
- GG (d, a, b, c, x[ 6], S22); /* 26 */
- GG (c, d, a, b, x[10], S23); /* 27 */
- GG (b, c, d, a, x[14], S24); /* 28 */
- GG (a, b, c, d, x[ 3], S21); /* 29 */
- GG (d, a, b, c, x[ 7], S22); /* 30 */
- GG (c, d, a, b, x[11], S23); /* 31 */
- GG (b, c, d, a, x[15], S24); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, x[ 0], S31); /* 33 */
- HH (d, a, b, c, x[ 8], S32); /* 34 */
- HH (c, d, a, b, x[ 4], S33); /* 35 */
- HH (b, c, d, a, x[12], S34); /* 36 */
- HH (a, b, c, d, x[ 2], S31); /* 37 */
- HH (d, a, b, c, x[10], S32); /* 38 */
- HH (c, d, a, b, x[ 6], S33); /* 39 */
- HH (b, c, d, a, x[14], S34); /* 40 */
- HH (a, b, c, d, x[ 1], S31); /* 41 */
- HH (d, a, b, c, x[ 9], S32); /* 42 */
- HH (c, d, a, b, x[ 5], S33); /* 43 */
- HH (b, c, d, a, x[13], S34); /* 44 */
- HH (a, b, c, d, x[ 3], S31); /* 45 */
- HH (d, a, b, c, x[11], S32); /* 46 */
- HH (c, d, a, b, x[ 7], S33); /* 47 */
- HH (b, c, d, a, x[15], S34); /* 48 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* Zeroize sensitive information.
- */
- bzero((POINTER)x, sizeof (x));
-}
-
-/* Encodes input (UINT4) into output (unsigned char). Assumes len is
- a multiple of 4.
- */
-static void Encode (output, input, len)
-unsigned char *output;
-UINT4 *input;
-unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (unsigned char)(input[i] & 0xff);
- output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
- }
-}
-
-/* Decodes input (unsigned char) into output (UINT4). Assumes len is
- a multiple of 4.
- */
-static void Decode (output, input, len)
-
-UINT4 *output;
-const unsigned char *input;
-unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
- (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
-}
diff --git a/sys/kern/subr_mchain.c b/sys/kern/subr_mchain.c
deleted file mode 100644
index 3020f56f9162..000000000000
--- a/sys/kern/subr_mchain.c
+++ /dev/null
@@ -1,547 +0,0 @@
-/*
- * Copyright (c) 2000, 2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/errno.h>
-#include <sys/mbuf.h>
-#include <sys/module.h>
-#include <sys/uio.h>
-
-#include <sys/mchain.h>
-
-MODULE_VERSION(libmchain, 1);
-
-#define MBERROR(format, args...) printf("%s(%d): "format, __FUNCTION__ , \
- __LINE__ ,## args)
-
-#define MBPANIC(format, args...) printf("%s(%d): "format, __FUNCTION__ , \
- __LINE__ ,## args)
-
-/*
- * Various helper functions
- */
-int
-m_fixhdr(struct mbuf *m0)
-{
- struct mbuf *m = m0;
- int len = 0;
-
- while (m) {
- len += m->m_len;
- m = m->m_next;
- }
- m0->m_pkthdr.len = len;
- return len;
-}
-
-int
-mb_init(struct mbchain *mbp)
-{
- struct mbuf *m;
-
- m = m_gethdr(M_TRYWAIT, MT_DATA);
- if (m == NULL)
- return ENOBUFS;
- m->m_len = 0;
- mb_initm(mbp, m);
- return 0;
-}
-
-void
-mb_initm(struct mbchain *mbp, struct mbuf *m)
-{
- bzero(mbp, sizeof(*mbp));
- mbp->mb_top = mbp->mb_cur = m;
- mbp->mb_mleft = M_TRAILINGSPACE(m);
-}
-
-void
-mb_done(struct mbchain *mbp)
-{
- if (mbp->mb_top) {
- m_freem(mbp->mb_top);
- mbp->mb_top = NULL;
- }
-}
-
-struct mbuf *
-mb_detach(struct mbchain *mbp)
-{
- struct mbuf *m;
-
- m = mbp->mb_top;
- mbp->mb_top = NULL;
- return m;
-}
-
-int
-mb_fixhdr(struct mbchain *mbp)
-{
- return mbp->mb_top->m_pkthdr.len = m_fixhdr(mbp->mb_top);
-}
-
-/*
- * Check if object of size 'size' fit to the current position and
- * allocate new mbuf if not. Advance pointers and increase length of mbuf(s).
- * Return pointer to the object placeholder or NULL if any error occured.
- * Note: size should be <= MLEN
- */
-caddr_t
-mb_reserve(struct mbchain *mbp, int size)
-{
- struct mbuf *m, *mn;
- caddr_t bpos;
-
- if (size > MLEN)
- panic("mb_reserve: size = %d\n", size);
- m = mbp->mb_cur;
- if (mbp->mb_mleft < size) {
- mn = m_get(M_TRYWAIT, MT_DATA);
- if (mn == NULL)
- return NULL;
- mbp->mb_cur = m->m_next = mn;
- m = mn;
- m->m_len = 0;
- mbp->mb_mleft = M_TRAILINGSPACE(m);
- }
- mbp->mb_mleft -= size;
- mbp->mb_count += size;
- bpos = mtod(m, caddr_t) + m->m_len;
- m->m_len += size;
- return bpos;
-}
-
-int
-mb_put_uint8(struct mbchain *mbp, u_int8_t x)
-{
- return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
-}
-
-int
-mb_put_uint16be(struct mbchain *mbp, u_int16_t x)
-{
- x = htobes(x);
- return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
-}
-
-int
-mb_put_uint16le(struct mbchain *mbp, u_int16_t x)
-{
- x = htoles(x);
- return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
-}
-
-int
-mb_put_uint32be(struct mbchain *mbp, u_int32_t x)
-{
- x = htobel(x);
- return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
-}
-
-int
-mb_put_uint32le(struct mbchain *mbp, u_int32_t x)
-{
- x = htolel(x);
- return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
-}
-
-int
-mb_put_int64be(struct mbchain *mbp, int64_t x)
-{
- x = htobeq(x);
- return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
-}
-
-int
-mb_put_int64le(struct mbchain *mbp, int64_t x)
-{
- x = htoleq(x);
- return mb_put_mem(mbp, (caddr_t)&x, sizeof(x), MB_MSYSTEM);
-}
-
-int
-mb_put_mem(struct mbchain *mbp, c_caddr_t source, int size, int type)
-{
- struct mbuf *m;
- caddr_t dst;
- c_caddr_t src;
- int cplen, error, mleft, count;
-
- m = mbp->mb_cur;
- mleft = mbp->mb_mleft;
-
- while (size > 0) {
- if (mleft == 0) {
- if (m->m_next == NULL) {
- m = m_getm(m, size, M_TRYWAIT, MT_DATA);
- if (m == NULL)
- return ENOBUFS;
- }
- m = m->m_next;
- mleft = M_TRAILINGSPACE(m);
- continue;
- }
- cplen = mleft > size ? size : mleft;
- dst = mtod(m, caddr_t) + m->m_len;
- switch (type) {
- case MB_MCUSTOM:
- error = mbp->mb_copy(mbp, source, dst, cplen);
- if (error)
- return error;
- break;
- case MB_MINLINE:
- for (src = source, count = cplen; count; count--)
- *dst++ = *src++;
- break;
- case MB_MSYSTEM:
- bcopy(source, dst, cplen);
- break;
- case MB_MUSER:
- error = copyin(source, dst, cplen);
- if (error)
- return error;
- break;
- case MB_MZERO:
- bzero(dst, cplen);
- break;
- }
- size -= cplen;
- source += cplen;
- m->m_len += cplen;
- mleft -= cplen;
- mbp->mb_count += cplen;
- }
- mbp->mb_cur = m;
- mbp->mb_mleft = mleft;
- return 0;
-}
-
-int
-mb_put_mbuf(struct mbchain *mbp, struct mbuf *m)
-{
- mbp->mb_cur->m_next = m;
- while (m) {
- mbp->mb_count += m->m_len;
- if (m->m_next == NULL)
- break;
- m = m->m_next;
- }
- mbp->mb_mleft = M_TRAILINGSPACE(m);
- mbp->mb_cur = m;
- return 0;
-}
-
-/*
- * copies a uio scatter/gather list to an mbuf chain.
- * NOTE: can ony handle iovcnt == 1
- */
-int
-mb_put_uio(struct mbchain *mbp, struct uio *uiop, int size)
-{
- long left;
- int mtype, error;
-
-#ifdef DIAGNOSTIC
- if (uiop->uio_iovcnt != 1)
- MBPANIC("iovcnt != 1");
-#endif
- mtype = (uiop->uio_segflg == UIO_SYSSPACE) ? MB_MSYSTEM : MB_MUSER;
-
- while (size > 0) {
- left = uiop->uio_iov->iov_len;
- if (left > size)
- left = size;
- error = mb_put_mem(mbp, uiop->uio_iov->iov_base, left, mtype);
- if (error)
- return error;
- uiop->uio_offset += left;
- uiop->uio_resid -= left;
- uiop->uio_iov->iov_base += left;
- uiop->uio_iov->iov_len -= left;
- size -= left;
- }
- return 0;
-}
-
-/*
- * Routines for fetching data from an mbuf chain
- */
-int
-md_init(struct mdchain *mdp)
-{
- struct mbuf *m;
-
- m = m_gethdr(M_TRYWAIT, MT_DATA);
- if (m == NULL)
- return ENOBUFS;
- m->m_len = 0;
- md_initm(mdp, m);
- return 0;
-}
-
-void
-md_initm(struct mdchain *mdp, struct mbuf *m)
-{
- bzero(mdp, sizeof(*mdp));
- mdp->md_top = mdp->md_cur = m;
- mdp->md_pos = mtod(m, u_char*);
-}
-
-void
-md_done(struct mdchain *mdp)
-{
- if (mdp->md_top) {
- m_freem(mdp->md_top);
- mdp->md_top = NULL;
- }
-}
-
-/*
- * Append a separate mbuf chain. It is caller responsibility to prevent
- * multiple calls to fetch/record routines.
- */
-void
-md_append_record(struct mdchain *mdp, struct mbuf *top)
-{
- struct mbuf *m;
-
- if (mdp->md_top == NULL) {
- md_initm(mdp, top);
- return;
- }
- m = mdp->md_top;
- while (m->m_nextpkt)
- m = m->m_nextpkt;
- m->m_nextpkt = top;
- top->m_nextpkt = NULL;
- return;
-}
-
-/*
- * Put next record in place of existing
- */
-int
-md_next_record(struct mdchain *mdp)
-{
- struct mbuf *m;
-
- if (mdp->md_top == NULL)
- return ENOENT;
- m = mdp->md_top->m_nextpkt;
- md_done(mdp);
- if (m == NULL)
- return ENOENT;
- md_initm(mdp, m);
- return 0;
-}
-
-int
-md_get_uint8(struct mdchain *mdp, u_int8_t *x)
-{
- return md_get_mem(mdp, x, 1, MB_MINLINE);
-}
-
-int
-md_get_uint16(struct mdchain *mdp, u_int16_t *x)
-{
- return md_get_mem(mdp, (caddr_t)x, 2, MB_MINLINE);
-}
-
-int
-md_get_uint16le(struct mdchain *mdp, u_int16_t *x)
-{
- u_int16_t v;
- int error = md_get_uint16(mdp, &v);
-
- *x = letohs(v);
- return error;
-}
-
-int
-md_get_uint16be(struct mdchain *mdp, u_int16_t *x) {
- u_int16_t v;
- int error = md_get_uint16(mdp, &v);
-
- *x = betohs(v);
- return error;
-}
-
-int
-md_get_uint32(struct mdchain *mdp, u_int32_t *x)
-{
- return md_get_mem(mdp, (caddr_t)x, 4, MB_MINLINE);
-}
-
-int
-md_get_uint32be(struct mdchain *mdp, u_int32_t *x)
-{
- u_int32_t v;
- int error;
-
- error = md_get_uint32(mdp, &v);
- *x = betohl(v);
- return error;
-}
-
-int
-md_get_uint32le(struct mdchain *mdp, u_int32_t *x)
-{
- u_int32_t v;
- int error;
-
- error = md_get_uint32(mdp, &v);
- *x = letohl(v);
- return error;
-}
-
-int
-md_get_int64(struct mdchain *mdp, int64_t *x)
-{
- return md_get_mem(mdp, (caddr_t)x, 8, MB_MINLINE);
-}
-
-int
-md_get_int64be(struct mdchain *mdp, int64_t *x)
-{
- int64_t v;
- int error;
-
- error = md_get_int64(mdp, &v);
- *x = betohq(v);
- return error;
-}
-
-int
-md_get_int64le(struct mdchain *mdp, int64_t *x)
-{
- int64_t v;
- int error;
-
- error = md_get_int64(mdp, &v);
- *x = letohq(v);
- return error;
-}
-
-int
-md_get_mem(struct mdchain *mdp, caddr_t target, int size, int type)
-{
- struct mbuf *m = mdp->md_cur;
- int error;
- u_int count;
- u_char *s;
-
- while (size > 0) {
- if (m == NULL) {
- MBERROR("incomplete copy\n");
- return EBADRPC;
- }
- s = mdp->md_pos;
- count = mtod(m, u_char*) + m->m_len - s;
- if (count == 0) {
- mdp->md_cur = m = m->m_next;
- if (m)
- s = mdp->md_pos = mtod(m, caddr_t);
- continue;
- }
- if (count > size)
- count = size;
- size -= count;
- mdp->md_pos += count;
- if (target == NULL)
- continue;
- switch (type) {
- case MB_MUSER:
- error = copyout(s, target, count);
- if (error)
- return error;
- break;
- case MB_MSYSTEM:
- bcopy(s, target, count);
- break;
- case MB_MINLINE:
- while (count--)
- *target++ = *s++;
- continue;
- }
- target += count;
- }
- return 0;
-}
-
-int
-md_get_mbuf(struct mdchain *mdp, int size, struct mbuf **ret)
-{
- struct mbuf *m = mdp->md_cur, *rm;
-
- rm = m_copym(m, mdp->md_pos - mtod(m, u_char*), size, M_TRYWAIT);
- if (rm == NULL)
- return EBADRPC;
- md_get_mem(mdp, NULL, size, MB_MZERO);
- *ret = rm;
- return 0;
-}
-
-int
-md_get_uio(struct mdchain *mdp, struct uio *uiop, int size)
-{
- char *uiocp;
- long left;
- int mtype, error;
-
- mtype = (uiop->uio_segflg == UIO_SYSSPACE) ? MB_MSYSTEM : MB_MUSER;
- while (size > 0) {
- if (uiop->uio_iovcnt <= 0 || uiop->uio_iov == NULL)
- return EFBIG;
- left = uiop->uio_iov->iov_len;
- uiocp = uiop->uio_iov->iov_base;
- if (left > size)
- left = size;
- error = md_get_mem(mdp, uiocp, left, mtype);
- if (error)
- return error;
- uiop->uio_offset += left;
- uiop->uio_resid -= left;
- if (uiop->uio_iov->iov_len <= size) {
- uiop->uio_iovcnt--;
- uiop->uio_iov++;
- } else {
- uiop->uio_iov->iov_base += left;
- uiop->uio_iov->iov_len -= left;
- }
- size -= left;
- }
- return 0;
-}
diff --git a/sys/libkern/iconv.c b/sys/libkern/iconv.c
deleted file mode 100644
index 8eafa281d88e..000000000000
--- a/sys/libkern/iconv.c
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/iconv.h>
-#include <sys/malloc.h>
-
-#include "iconv_converter_if.h"
-
-SYSCTL_DECL(_kern_iconv);
-
-SYSCTL_NODE(_kern, OID_AUTO, iconv, CTLFLAG_RW, NULL, "kernel iconv interface");
-
-MALLOC_DEFINE(M_ICONV, "ICONV", "ICONV structures");
-MALLOC_DEFINE(M_ICONVDATA, "ICONV data", "ICONV data");
-
-MODULE_VERSION(libiconv, 1);
-
-#ifdef notnow
-/*
- * iconv converter instance
- */
-struct iconv_converter {
- KOBJ_FIELDS;
- void * c_data;
-};
-#endif
-
-struct sysctl_oid *iconv_oid_hook = &sysctl___kern_iconv;
-
-/*
- * List of loaded converters
- */
-static TAILQ_HEAD(iconv_converter_list, iconv_converter_class)
- iconv_converters = TAILQ_HEAD_INITIALIZER(iconv_converters);
-
-/*
- * List of supported/loaded charsets pairs
- */
-static TAILQ_HEAD(, iconv_cspair)
- iconv_cslist = TAILQ_HEAD_INITIALIZER(iconv_cslist);
-static int iconv_csid = 1;
-
-static char iconv_unicode_string[] = "unicode"; /* save eight bytes when possible */
-
-static void iconv_unregister_cspair(struct iconv_cspair *csp);
-
-static int
-iconv_mod_unload(void)
-{
- struct iconv_cspair *csp;
-
- while ((csp = TAILQ_FIRST(&iconv_cslist)) != NULL) {
- if (csp->cp_refcount)
- return EBUSY;
- iconv_unregister_cspair(csp);
- }
- return 0;
-}
-
-static int
-iconv_mod_handler(module_t mod, int type, void *data)
-{
- int error;
-
- switch (type) {
- case MOD_LOAD:
- error = 0;
- break;
- case MOD_UNLOAD:
- error = iconv_mod_unload();
- break;
- default:
- error = EINVAL;
- }
- return error;
-}
-
-static moduledata_t iconv_mod = {
- "iconv", iconv_mod_handler, NULL
-};
-
-DECLARE_MODULE(iconv, iconv_mod, SI_SUB_DRIVERS, SI_ORDER_SECOND);
-
-static int
-iconv_register_converter(struct iconv_converter_class *dcp)
-{
- kobj_class_compile((struct kobj_class*)dcp);
- dcp->refs++;
- TAILQ_INSERT_TAIL(&iconv_converters, dcp, cc_link);
- return 0;
-}
-
-static int
-iconv_unregister_converter(struct iconv_converter_class *dcp)
-{
- if (dcp->refs > 1) {
- ICDEBUG("converter have %d referenses left\n", dcp->refs);
- return EBUSY;
- }
- TAILQ_REMOVE(&iconv_converters, dcp, cc_link);
- kobj_class_free((struct kobj_class*)dcp);
- return 0;
-}
-
-static int
-iconv_lookupconv(const char *name, struct iconv_converter_class **dcpp)
-{
- struct iconv_converter_class *dcp;
-
- TAILQ_FOREACH(dcp, &iconv_converters, cc_link) {
- if (name == NULL)
- continue;
- if (strcmp(name, ICONV_CONVERTER_NAME(dcp)) == 0) {
- if (dcpp)
- *dcpp = dcp;
- return 0;
- }
- }
- return ENOENT;
-}
-
-static int
-iconv_lookupcs(const char *to, const char *from, struct iconv_cspair **cspp)
-{
- struct iconv_cspair *csp;
-
- TAILQ_FOREACH(csp, &iconv_cslist, cp_link) {
- if (strcmp(csp->cp_to, to) == 0 &&
- strcmp(csp->cp_from, from) == 0) {
- if (cspp)
- *cspp = csp;
- return 0;
- }
- }
- return ENOENT;
-}
-
-static int
-iconv_register_cspair(const char *to, const char *from,
- struct iconv_converter_class *dcp, void *data,
- struct iconv_cspair **cspp)
-{
- struct iconv_cspair *csp;
- char *cp;
- int csize, ucsto, ucsfrom;
-
- if (iconv_lookupcs(to, from, NULL) == 0)
- return EEXIST;
- csize = sizeof(*csp);
- ucsto = strcmp(to, iconv_unicode_string) == 0;
- if (!ucsto)
- csize += strlen(to) + 1;
- ucsfrom = strcmp(from, iconv_unicode_string) == 0;
- if (!ucsfrom)
- csize += strlen(from) + 1;
- csp = malloc(csize, M_ICONV, M_WAITOK);
- bzero(csp, csize);
- csp->cp_id = iconv_csid++;
- csp->cp_dcp = dcp;
- cp = (char*)(csp + 1);
- if (!ucsto) {
- strcpy(cp, to);
- csp->cp_to = cp;
- cp += strlen(cp) + 1;
- } else
- csp->cp_to = iconv_unicode_string;
- if (!ucsfrom) {
- strcpy(cp, from);
- csp->cp_from = cp;
- } else
- csp->cp_from = iconv_unicode_string;
- csp->cp_data = data;
-
- TAILQ_INSERT_TAIL(&iconv_cslist, csp, cp_link);
- *cspp = csp;
- return 0;
-}
-
-static void
-iconv_unregister_cspair(struct iconv_cspair *csp)
-{
- TAILQ_REMOVE(&iconv_cslist, csp, cp_link);
- if (csp->cp_data)
- free(csp->cp_data, M_ICONVDATA);
- free(csp, M_ICONV);
-}
-
-/*
- * Lookup and create an instance of converter.
- * Currently this layer didn't have associated 'instance' structure
- * to avoid unnesessary memory allocation.
- */
-int
-iconv_open(const char *to, const char *from, void **handle)
-{
- struct iconv_cspair *csp, *cspfrom, *cspto;
- struct iconv_converter_class *dcp;
- const char *cnvname;
- int error;
-
- /*
- * First, lookup fully qualified cspairs
- */
- error = iconv_lookupcs(to, from, &csp);
- if (error == 0)
- return ICONV_CONVERTER_OPEN(csp->cp_dcp, csp, NULL, handle);
-
- /*
- * Well, nothing found. Now try to construct a composite conversion
- * ToDo: add a 'capability' field to converter
- */
- TAILQ_FOREACH(dcp, &iconv_converters, cc_link) {
- cnvname = ICONV_CONVERTER_NAME(dcp);
- if (cnvname == NULL)
- continue;
- error = iconv_lookupcs(cnvname, from, &cspfrom);
- if (error)
- continue;
- error = iconv_lookupcs(to, cnvname, &cspto);
- if (error)
- continue;
- /*
- * Fine, we're found a pair which can be combined together
- */
- return ICONV_CONVERTER_OPEN(dcp, cspto, cspfrom, handle);
- }
- return ENOENT;
-}
-
-int
-iconv_close(void *handle)
-{
- return ICONV_CONVERTER_CLOSE(handle);
-}
-
-int
-iconv_conv(void *handle, const char **inbuf,
- size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
-{
- return ICONV_CONVERTER_CONV(handle, inbuf, inbytesleft, outbuf, outbytesleft);
-}
-
-/*
- * Give a list of loaded converters. Each name terminated with 0.
- * An empty string terminates the list.
- */
-static int
-iconv_sysctl_drvlist(SYSCTL_HANDLER_ARGS)
-{
- struct iconv_converter_class *dcp;
- const char *name;
- char spc;
- int error;
-
- error = 0;
-
- TAILQ_FOREACH(dcp, &iconv_converters, cc_link) {
- name = ICONV_CONVERTER_NAME(dcp);
- if (name == NULL)
- continue;
- error = SYSCTL_OUT(req, name, strlen(name) + 1);
- if (error)
- break;
- }
- if (error)
- return error;
- spc = 0;
- error = SYSCTL_OUT(req, &spc, sizeof(spc));
- return error;
-}
-
-SYSCTL_PROC(_kern_iconv, OID_AUTO, drvlist, CTLFLAG_RD | CTLTYPE_OPAQUE,
- NULL, 0, iconv_sysctl_drvlist, "S,xlat", "registered converters");
-
-/*
- * List all available charset pairs.
- */
-static int
-iconv_sysctl_cslist(SYSCTL_HANDLER_ARGS)
-{
- struct iconv_cspair *csp;
- struct iconv_cspair_info csi;
- int error;
-
- error = 0;
- bzero(&csi, sizeof(csi));
- csi.cs_version = ICONV_CSPAIR_INFO_VER;
-
- TAILQ_FOREACH(csp, &iconv_cslist, cp_link) {
- csi.cs_id = csp->cp_id;
- csi.cs_refcount = csp->cp_refcount;
- csi.cs_base = csp->cp_base ? csp->cp_base->cp_id : 0;
- strcpy(csi.cs_to, csp->cp_to);
- strcpy(csi.cs_from, csp->cp_from);
- error = SYSCTL_OUT(req, &csi, sizeof(csi));
- if (error)
- break;
- }
- return error;
-}
-
-SYSCTL_PROC(_kern_iconv, OID_AUTO, cslist, CTLFLAG_RD | CTLTYPE_OPAQUE,
- NULL, 0, iconv_sysctl_cslist, "S,xlat", "registered charset pairs");
-
-/*
- * Add new charset pair
- */
-static int
-iconv_sysctl_add(SYSCTL_HANDLER_ARGS)
-{
- struct iconv_converter_class *dcp;
- struct iconv_cspair *csp;
- struct iconv_add_in din;
- struct iconv_add_out dout;
- int error;
-
- error = SYSCTL_IN(req, &din, sizeof(din));
- if (error)
- return error;
- if (din.ia_version != ICONV_ADD_VER)
- return EINVAL;
- if (din.ia_datalen > ICONV_CSMAXDATALEN)
- return EINVAL;
- if (iconv_lookupconv(din.ia_converter, &dcp) != 0)
- return EINVAL;
- error = iconv_register_cspair(din.ia_to, din.ia_from, dcp, NULL, &csp);
- if (error)
- return error;
- if (din.ia_datalen) {
- csp->cp_data = malloc(din.ia_datalen, M_ICONVDATA, M_WAITOK);
- error = copyin(din.ia_data, csp->cp_data, din.ia_datalen);
- if (error)
- goto bad;
- }
- dout.ia_csid = csp->cp_id;
- error = SYSCTL_OUT(req, &dout, sizeof(dout));
- if (error)
- goto bad;
- return 0;
-bad:
- iconv_unregister_cspair(csp);
- return error;
-}
-
-SYSCTL_PROC(_kern_iconv, OID_AUTO, add, CTLFLAG_RW | CTLTYPE_OPAQUE,
- NULL, 0, iconv_sysctl_add, "S,xlat", "register charset pair");
-
-/*
- * Default stubs for converters
- */
-int
-iconv_converter_initstub(struct iconv_converter_class *dp)
-{
- return 0;
-}
-
-int
-iconv_converter_donestub(struct iconv_converter_class *dp)
-{
- return 0;
-}
-
-int
-iconv_converter_handler(module_t mod, int type, void *data)
-{
- struct iconv_converter_class *dcp = data;
- int error;
-
- switch (type) {
- case MOD_LOAD:
- error = iconv_register_converter(dcp);
- if (error)
- break;
- error = ICONV_CONVERTER_INIT(dcp);
- if (error)
- iconv_unregister_converter(dcp);
- break;
- case MOD_UNLOAD:
- ICONV_CONVERTER_DONE(dcp);
- error = iconv_unregister_converter(dcp);
- break;
- default:
- error = EINVAL;
- }
- return error;
-}
-
-/*
- * Common used functions
- */
-char *
-iconv_convstr(void *handle, char *dst, const char *src)
-{
- char *p = dst;
- int inlen, outlen, error;
-
- if (handle == NULL) {
- strcpy(dst, src);
- return dst;
- }
- inlen = outlen = strlen(src);
- error = iconv_conv(handle, NULL, NULL, &p, &outlen);
- if (error)
- return NULL;
- error = iconv_conv(handle, &src, &inlen, &p, &outlen);
- if (error)
- return NULL;
- *p = 0;
- return dst;
-}
-
-void *
-iconv_convmem(void *handle, void *dst, const void *src, int size)
-{
- const char *s = src;
- char *d = dst;
- int inlen, outlen, error;
-
- if (size == 0)
- return dst;
- if (handle == NULL) {
- memcpy(dst, src, size);
- return dst;
- }
- inlen = outlen = size;
- error = iconv_conv(handle, NULL, NULL, &d, &outlen);
- if (error)
- return NULL;
- error = iconv_conv(handle, &s, &inlen, &d, &outlen);
- if (error)
- return NULL;
- return dst;
-}
-
-int
-iconv_lookupcp(char **cpp, const char *s)
-{
- if (cpp == NULL) {
- ICDEBUG("warning a NULL list passed\n");
- return ENOENT;
- }
- for (; *cpp; cpp++)
- if (strcmp(*cpp, s) == 0)
- return 0;
- return ENOENT;
-}
diff --git a/sys/libkern/iconv_converter_if.m b/sys/libkern/iconv_converter_if.m
deleted file mode 100644
index 0b2901c45c54..000000000000
--- a/sys/libkern/iconv_converter_if.m
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2000-2001, Boris Popov
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by Boris Popov.
-# 4. Neither the name of the author nor the names of any co-contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $FreeBSD$
-#
-
-#include <sys/iconv.h>
-
-INTERFACE iconv_converter;
-
-STATICMETHOD int open {
- struct iconv_converter_class *dcp;
- struct iconv_cspair *cspto;
- struct iconv_cspair *cspfrom;
- void **hpp;
-};
-
-METHOD int close {
- void *handle;
-};
-
-METHOD int conv {
- void *handle;
- const char **inbuf;
- size_t *inbytesleft;
- char **outbuf;
- size_t *outbytesleft;
-};
-
-STATICMETHOD int init {
- struct iconv_converter_class *dcp;
-} DEFAULT iconv_converter_initstub;
-
-STATICMETHOD void done {
- struct iconv_converter_class *dcp;
-} DEFAULT iconv_converter_donestub;
-
-STATICMETHOD const char * name {
- struct iconv_converter_class *dcp;
-};
diff --git a/sys/libkern/iconv_xlat.c b/sys/libkern/iconv_xlat.c
deleted file mode 100644
index 6dd2800a535f..000000000000
--- a/sys/libkern/iconv_xlat.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/malloc.h>
-#include <sys/iconv.h>
-
-#include "iconv_converter_if.h"
-
-/*
- * "XLAT" converter
- */
-
-#ifdef MODULE_DEPEND
-MODULE_DEPEND(iconv_xlat, libiconv, 1, 1, 1);
-#endif
-
-/*
- * XLAT converter instance
- */
-struct iconv_xlat {
- KOBJ_FIELDS;
- u_char * d_table;
- struct iconv_cspair * d_csp;
-};
-
-static int
-iconv_xlat_open(struct iconv_converter_class *dcp,
- struct iconv_cspair *csp, struct iconv_cspair *cspf, void **dpp)
-{
- struct iconv_xlat *dp;
-
- dp = (struct iconv_xlat *)kobj_create((struct kobj_class*)dcp, M_ICONV, M_WAITOK);
- dp->d_table = csp->cp_data;
- dp->d_csp = csp;
- csp->cp_refcount++;
- *dpp = (void*)dp;
- return 0;
-}
-
-static int
-iconv_xlat_close(void *data)
-{
- struct iconv_xlat *dp = data;
-
- dp->d_csp->cp_refcount--;
- kobj_delete((struct kobj*)data, M_ICONV);
- return 0;
-}
-
-static int
-iconv_xlat_conv(void *d2p, const char **inbuf,
- size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
-{
- struct iconv_xlat *dp = (struct iconv_xlat*)d2p;
- const char *src;
- char *dst;
- int n, r;
-
- if (inbuf == NULL || *inbuf == NULL || outbuf == NULL || *outbuf == NULL)
- return 0;
- r = n = min(*inbytesleft, *outbytesleft);
- src = *inbuf;
- dst = *outbuf;
- while(r--)
- *dst++ = dp->d_table[(u_char)*src++];
- *inbuf += n;
- *outbuf += n;
- *inbytesleft += n;
- *outbytesleft -= n;
- return 0;
-}
-
-static const char *
-iconv_xlat_name(struct iconv_converter_class *dcp)
-{
- return "xlat";
-}
-
-static kobj_method_t iconv_xlat_methods[] = {
- KOBJMETHOD(iconv_converter_open, iconv_xlat_open),
- KOBJMETHOD(iconv_converter_close, iconv_xlat_close),
- KOBJMETHOD(iconv_converter_conv, iconv_xlat_conv),
-#if 0
- KOBJMETHOD(iconv_converter_init, iconv_xlat_init),
- KOBJMETHOD(iconv_converter_done, iconv_xlat_done),
-#endif
- KOBJMETHOD(iconv_converter_name, iconv_xlat_name),
- {0, 0}
-};
-
-KICONV_CONVERTER(xlat, sizeof(struct iconv_xlat));
diff --git a/sys/modules/ar/Makefile b/sys/modules/ar/Makefile
deleted file mode 100644
index 3951fd46fb9f..000000000000
--- a/sys/modules/ar/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../../dev/ar
-KMOD = if_ar
-SRCS = if_ar.c if_ar_isa.c if_ar_pci.c
-SRCS += device_if.h bus_if.h pci_if.h isa_if.h opt_netgraph.h
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/libmchain/Makefile b/sys/modules/libmchain/Makefile
deleted file mode 100644
index 39cfeb042767..000000000000
--- a/sys/modules/libmchain/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../../kern
-
-KMOD= libmchain
-SRCS= subr_mchain.c
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/netgraph/sync_ar/Makefile b/sys/modules/netgraph/sync_ar/Makefile
deleted file mode 100644
index bc51040f0d15..000000000000
--- a/sys/modules/netgraph/sync_ar/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../../../dev/ar
-KMOD = ng_sync_ar
-SRCS = if_ar.c if_ar_isa.c if_ar_pci.c
-SRCS += device_if.h bus_if.h pci_if.h isa_if.h opt_netgraph.h
-
-opt_netgraph.h:
- echo "#define NETGRAPH" > opt_netgraph.h
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/netgraph/sync_sr/Makefile b/sys/modules/netgraph/sync_sr/Makefile
deleted file mode 100644
index 16a291ca4654..000000000000
--- a/sys/modules/netgraph/sync_sr/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../../../dev/sr
-KMOD = ng_sync_sr
-SRCS = if_sr.c if_sr_isa.c if_sr_pci.c
-SRCS += device_if.h bus_if.h pci_if.h isa_if.h opt_netgraph.h
-
-opt_netgraph.h:
- echo "#define NETGRAPH" > opt_netgraph.h
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/nmdm/Makefile b/sys/modules/nmdm/Makefile
deleted file mode 100644
index d74b7d3d6ac7..000000000000
--- a/sys/modules/nmdm/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../../dev/nmdm
-
-KMOD= nmdm
-SRCS= nmdm.c
-SRCS+= opt_compat.h vnode_if.h
-
-opt_compat.h:
- echo "#define COMPAT_43 1" >opt_compat.h
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/smbfs/Makefile b/sys/modules/smbfs/Makefile
deleted file mode 100644
index 800a634747e8..000000000000
--- a/sys/modules/smbfs/Makefile
+++ /dev/null
@@ -1,62 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../../crypto/des \
- ${.CURDIR}/../../kern \
- ${.CURDIR}/../../libkern \
- ${.CURDIR}/../../netsmb \
- ${.CURDIR}/../../fs/smbfs
-
-KMOD= smbfs
-
-SRCS= vnode_if.h \
- opt_inet.h opt_ipx.h \
- opt_netsmb.h opt_smbfs.h opt_vmpage.h \
- iconv_converter_if.h \
- md4c.c \
- smb_conn.c smb_dev.c smb_trantcp.c smb_smb.c smb_subr.c smb_rq.c \
- smb_usr.c smb_crypt.c smb_iod.c \
- smbfs_vfsops.c smbfs_node.c smbfs_io.c smbfs_vnops.c \
- smbfs_subr.c smbfs_smb.c
-
-NOMAN=true
-
-NETSMBCRYPTO=yes
-
-.if defined(NETSMBCRYPTO)
-SRCS+= des_ecb.c des_setkey.c
-.endif
-
-# Build with IPX support (1|0)
-SMB_IPX?= 0
-
-# Build with INET support (1|0)
-SMB_INET?= 1
-
-CFLAGS+= ${KDEBUG}
-
-.if defined(VNPRINT)
-CFLAGS+= -DVNPRINT
-.endif
-
-opt_inet.h:
- touch ${.TARGET}
-.if ${SMB_INET} > 0
- echo "#define INET 1" > ${.TARGET}
-.endif
-
-opt_ipx.h:
- touch ${.TARGET}
-.if ${SMB_IPX} > 0
- echo "#define IPX 1" > ${.TARGET}
-.endif
-
-opt_netsmb.h:
- echo "#define NETSMB 1" > ${.TARGET}
-.if defined(NETSMBCRYPTO)
- echo "#define NETSMBCRYPTO 1" >> ${.TARGET}
-.endif
-
-unload:
- @(if kldunload ${KMOD}; then true; else true; fi)
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/sound/driver/vibes/Makefile b/sys/modules/sound/driver/vibes/Makefile
deleted file mode 100644
index 3411bf1ef1ea..000000000000
--- a/sys/modules/sound/driver/vibes/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../../../../dev/sound/pci
-
-KMOD= snd_vibes
-SRCS= device_if.h bus_if.h isa_if.h pci_if.h
-SRCS+= vibes.c
-
-.include <bsd.kmod.mk>
diff --git a/sys/modules/sr/Makefile b/sys/modules/sr/Makefile
deleted file mode 100644
index 7b173ab26ad1..000000000000
--- a/sys/modules/sr/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-.PATH: ${.CURDIR}/../../dev/sr
-KMOD = if_sr
-SRCS = if_sr.c if_sr_isa.c if_sr_pci.c
-SRCS += device_if.h bus_if.h pci_if.h isa_if.h opt_netgraph.h
-
-.include <bsd.kmod.mk>
diff --git a/sys/netgraph/ng_eiface.h b/sys/netgraph/ng_eiface.h
deleted file mode 100644
index ed639be6f2f3..000000000000
--- a/sys/netgraph/ng_eiface.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * ng_eiface.h
- *
- * Copyright (c) 1999-2001, Vitaly V Belekhov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice unmodified, this list of conditions, and the following
- * disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _NETGRAPH_EIFACE_H_
-#define _NETGRAPH_EIFACE_H_
-
-/* Node type name and magic cookie */
-#define NG_EIFACE_NODE_TYPE "eiface"
-#define NGM_EIFACE_COOKIE 948105892
-
-/* Interface base name */
-#define NG_EIFACE_EIFACE_NAME "nge"
-#define NG_EIFACE_EIFACE_NAME_MAX 15
-
-/* My hook names */
-#define NG_EIFACE_HOOK_ETHER "ether"
-
-/* MTU bounds */
-#define NG_EIFACE_MTU_MIN 72
-#define NG_EIFACE_MTU_MAX 2312
-#define NG_EIFACE_MTU_DEFAULT 1500
-
-/* Netgraph commands */
-enum {
- NGM_EIFACE_GET_IFNAME = 1, /* returns struct ng_eiface_ifname */
- NGM_EIFACE_GET_IFADDRS, /* returns list of addresses */
- NGM_EIFACE_SET, /* set ethernet address */
-};
-
-struct ng_eiface_ifname {
- char ngif_name[NG_EIFACE_EIFACE_NAME_MAX + 1];
-};
-
-struct ng_eiface_par {
- u_char oct0;
- u_char oct1;
- u_char oct2;
- u_char oct3;
- u_char oct4;
- u_char oct5;
-};
-
-static const struct ng_parse_struct_info ng_eiface_par_fields = {
- {
- { "oct0", &ng_parse_int8_type },
- { "oct1", &ng_parse_int8_type },
- { "oct2", &ng_parse_int8_type },
- { "oct3", &ng_parse_int8_type },
- { "oct4", &ng_parse_int8_type },
- { "oct5", &ng_parse_int8_type },
- { NULL },
- }
-};
-
-
-#endif /* _NETGRAPH_EIFACE_H_ */
diff --git a/sys/netsmb/netbios.h b/sys/netsmb/netbios.h
deleted file mode 100644
index 961f5be80c5e..000000000000
--- a/sys/netsmb/netbios.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _NETSMB_NETBIOS_H_
-#define _NETSMB_NETBIOS_H_
-
-/*
- * make this file dirty...
- */
-#ifndef _NETINET_IN_H_
-#include <netinet/in.h>
-#endif
-
-#ifndef _NETIPX_IPX_H_
-#include <netipx/ipx.h>
-#endif
-
-#define AF_NETBIOS AF_NS /* XXX: should go to socket.h */
-#define PF_NETBIOS AF_NETBIOS
-
-#define NBPROTO_TCPSSN 1 /* NETBIOS session over TCP */
-#define NBPROTO_IPXSSN 11 /* NETBIOS over IPX */
-
-#define NB_NAMELEN 16
-#define NB_ENCNAMELEN NB_NAMELEN * 2
-#define NB_MAXLABLEN 63
-
-#define NB_MINSALEN (sizeof(struct sockaddr_nb))
-
-/*
- * name types
- */
-#define NBT_WKSTA 0x00
-#define NBT_SERVER 0x20
-
-/*
- * Session packet types
- */
-#define NB_SSN_MESSAGE 0x0
-#define NB_SSN_REQUEST 0x81
-#define NB_SSN_POSRESP 0x82
-#define NB_SSN_NEGRESP 0x83
-#define NB_SSN_RTGRESP 0x84
-#define NB_SSN_KEEPALIVE 0x85
-
-/*
- * resolver: Opcodes
- */
-#define NBNS_OPCODE_QUERY 0x00
-#define NBNS_OPCODE_REGISTER 0x05
-#define NBNS_OPCODE_RELEASE 0x06
-#define NBNS_OPCODE_WACK 0x07
-#define NBNS_OPCODE_REFRESH 0x08
-#define NBNS_OPCODE_RESPONSE 0x10 /* or'ed with other opcodes */
-
-/*
- * resolver: NM_FLAGS
- */
-#define NBNS_NMFLAG_BCAST 0x01
-#define NBNS_NMFLAG_RA 0x08 /* recursion available */
-#define NBNS_NMFLAG_RD 0x10 /* recursion desired */
-#define NBNS_NMFLAG_TC 0x20 /* truncation occured */
-#define NBNS_NMFLAG_AA 0x40 /* authoritative answer */
-
-/*
- * resolver: Question types
- */
-#define NBNS_QUESTION_TYPE_NB 0x0020
-#define NBNS_QUESTION_TYPE_NBSTAT 0x0021
-
-/*
- * resolver: Question class
- */
-#define NBNS_QUESTION_CLASS_IN 0x0001
-
-/*
- * resolver: Limits
- */
-#define NBNS_MAXREDIRECTS 3 /* maximum number of accepted redirects */
-#define NBDG_MAXSIZE 576 /* maximum nbns datagram size */
-
-/*
- * NETBIOS addressing
- */
-union nb_tran {
- struct sockaddr_in x_in;
- struct sockaddr_ipx x_ipx;
-};
-
-struct nb_name {
- u_int nn_type;
- u_char nn_name[NB_NAMELEN + 1];
- u_char * nn_scope;
-};
-
-/*
- * Socket address
- */
-struct sockaddr_nb {
- u_char snb_len;
- u_char snb_family;
- union nb_tran snb_tran; /* transport */
- u_char snb_name[1 + NB_ENCNAMELEN + 1]; /* encoded */
-};
-
-#define snb_addrin snb_tran.x_in
-
-#endif /* !_NETSMB_NETBIOS_H_ */
diff --git a/sys/netsmb/smb.h b/sys/netsmb/smb.h
deleted file mode 100644
index 4bd30969bbe6..000000000000
--- a/sys/netsmb/smb.h
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Common definintions and structures for SMB/CIFS protocol
- */
-
-#ifndef _NETSMB_SMB_H_
-#define _NETSMB_SMB_H_
-
-#define SMB_TCP_PORT 139
-/*
- * SMB dialects that we have to deal with.
- */
-enum smb_dialects {
- SMB_DIALECT_NONE,
- SMB_DIALECT_CORE, /* PC NETWORK PROGRAM 1.0, PCLAN1.0 */
- SMB_DIALECT_COREPLUS, /* MICROSOFT NETWORKS 1.03 */
- SMB_DIALECT_LANMAN1_0, /* MICROSOFT NETWORKS 3.0, LANMAN1.0 */
- SMB_DIALECT_LANMAN2_0, /* LM1.2X002, DOS LM1.2X002, Samba */
- SMB_DIALECT_LANMAN2_1, /* DOS LANMAN2.1, LANMAN2.1 */
- SMB_DIALECT_NTLM0_12 /* NT LM 0.12, Windows for Workgroups 3.1a,
- * NT LANMAN 1.0 */
-};
-
-/*
- * Formats of data/string buffers
- */
-#define SMB_DT_DATA 1
-#define SMB_DT_DIALECT 2
-#define SMB_DT_PATHNAME 3
-#define SMB_DT_ASCII 4
-#define SMB_DT_VARIABLE 5
-
-/*
- * SMB header
- */
-#define SMB_SIGNATURE "\xFFSMB"
-#define SMB_SIGLEN 4
-#define SMB_HDRMID(p) (*(u_short*)((u_char*)(p) + 30))
-#define SMB_HDRLEN 32
-/*
- * bits in the smb_flags field
- */
-#define SMB_FLAGS_CASELESS 0x08
-#define SMB_FLAGS_SERVER_RESP 0x80 /* indicates a response */
-
-/*
- * bits in the smb_flags2 field
- */
-#define SMB_FLAGS2_KNOWS_LONG_NAMES 0x0001
-#define SMB_FLAGS2_KNOWS_EAS 0x0002 /* client know about EAs */
-#define SMB_FLAGS2_SECURITY_SIGNATURE 0x0004 /* check SMB integrity */
-#define SMB_FLAGS2_IS_LONG_NAME 0x0040 /* any path name is a long name */
-#define SMB_FLAGS2_EXT_SEC 0x0800 /* client aware of Extended
- * Security negotiation */
-#define SMB_FLAGS2_DFS 0x1000 /* resolve paths in DFS */
-#define SMB_FLAGS2_PAGING_IO 0x2000 /* for exec */
-#define SMB_FLAGS2_ERR_STATUS 0x4000 /* 1 - status.status */
-#define SMB_FLAGS2_UNICODE 0x8000 /* use Unicode for all strings */
-
-#define SMB_UID_UNKNOWN 0xffff
-#define SMB_TID_UNKNOWN 0xffff
-
-/*
- * Security mode bits
- */
-#define SMB_SM_USER 0x01 /* server in the user security mode */
-#define SMB_SM_ENCRYPT 0x02 /* use challenge/responce */
-
-/*
- * NTLM capabilities
- */
-#define SMB_CAP_RAW_MODE 0x0001
-#define SMB_CAP_MPX_MODE 0x0002
-#define SMB_CAP_UNICODE 0x0004
-#define SMB_CAP_LARGE_FILES 0x0008 /* 64 bit offsets supported */
-#define SMB_CAP_NT_SMBS 0x0010
-#define SMB_CAP_NT_FIND 0x0200
-#define SMB_CAP_EXT_SECURITY 0x80000000
-
-/*
- * File attributes
- */
-#define SMB_FA_RDONLY 0x01
-#define SMB_FA_HIDDEN 0x02
-#define SMB_FA_SYSTEM 0x04
-#define SMB_FA_VOLUME 0x08
-#define SMB_FA_DIR 0x10
-#define SMB_FA_ARCHIVE 0x20
-
-/*
- * Extended file attributes
- */
-#define SMB_EFA_RDONLY 0x0001
-#define SMB_EFA_HIDDEN 0x0002
-#define SMB_EFA_SYSTEM 0x0004
-#define SMB_EFA_ARCHIVE 0x0020
-#define SMB_EFA_NORMAL 0x0080
-#define SMB_EFA_TEMPORARY 0x0100
-#define SMB_EFA_COMPRESSED 0x0800
-#define SMB_EFA_POSIX_SEMANTICS 0x00100000
-#define SMB_EFA_BACKUP_SEMANTICS 0x02000000
-#define SMB_EFA_DELETE_ON_CLOSE 0x04000000
-#define SMB_EFA_SEQUENTIAL_SCAN 0x08000000
-#define SMB_EFA_RANDOM_ACCESS 0x10000000
-#define SMB_EFA_NO_BUFFERING 0x20000000
-#define SMB_EFA_WRITE_THROUGH 0x80000000
-
-/*
- * Access Mode Encoding
- */
-#define SMB_AM_OPENREAD 0x0000
-#define SMB_AM_OPENWRITE 0x0001
-#define SMB_AM_OPENRW 0x0002
-#define SMB_AM_OPENEXEC 0x0003
-#define SMB_SM_COMPAT 0x0000
-#define SMB_SM_EXCLUSIVE 0x0010
-#define SMB_SM_DENYWRITE 0x0020
-#define SMB_SM_DENYREADEXEC 0x0030
-#define SMB_SM_DENYNONE 0x0040
-
-/*
- * SMB commands
- */
-#define SMB_COM_CREATE_DIRECTORY 0x00
-#define SMB_COM_DELETE_DIRECTORY 0x01
-#define SMB_COM_OPEN 0x02
-#define SMB_COM_CREATE 0x03
-#define SMB_COM_CLOSE 0x04
-#define SMB_COM_FLUSH 0x05
-#define SMB_COM_DELETE 0x06
-#define SMB_COM_RENAME 0x07
-#define SMB_COM_QUERY_INFORMATION 0x08
-#define SMB_COM_SET_INFORMATION 0x09
-#define SMB_COM_READ 0x0A
-#define SMB_COM_WRITE 0x0B
-#define SMB_COM_LOCK_BYTE_RANGE 0x0C
-#define SMB_COM_UNLOCK_BYTE_RANGE 0x0D
-#define SMB_COM_CREATE_TEMPORARY 0x0E
-#define SMB_COM_CREATE_NEW 0x0F
-#define SMB_COM_CHECK_DIRECTORY 0x10
-#define SMB_COM_PROCESS_EXIT 0x11
-#define SMB_COM_SEEK 0x12
-#define SMB_COM_LOCK_AND_READ 0x13
-#define SMB_COM_WRITE_AND_UNLOCK 0x14
-#define SMB_COM_READ_RAW 0x1A
-#define SMB_COM_READ_MPX 0x1B
-#define SMB_COM_READ_MPX_SECONDARY 0x1C
-#define SMB_COM_WRITE_RAW 0x1D
-#define SMB_COM_WRITE_MPX 0x1E
-#define SMB_COM_WRITE_COMPLETE 0x20
-#define SMB_COM_SET_INFORMATION2 0x22
-#define SMB_COM_QUERY_INFORMATION2 0x23
-#define SMB_COM_LOCKING_ANDX 0x24
-#define SMB_COM_TRANSACTION 0x25
-#define SMB_COM_TRANSACTION_SECONDARY 0x26
-#define SMB_COM_IOCTL 0x27
-#define SMB_COM_IOCTL_SECONDARY 0x28
-#define SMB_COM_COPY 0x29
-#define SMB_COM_MOVE 0x2A
-#define SMB_COM_ECHO 0x2B
-#define SMB_COM_WRITE_AND_CLOSE 0x2C
-#define SMB_COM_OPEN_ANDX 0x2D
-#define SMB_COM_READ_ANDX 0x2E
-#define SMB_COM_WRITE_ANDX 0x2F
-#define SMB_COM_CLOSE_AND_TREE_DISC 0x31
-#define SMB_COM_TRANSACTION2 0x32
-#define SMB_COM_TRANSACTION2_SECONDARY 0x33
-#define SMB_COM_FIND_CLOSE2 0x34
-#define SMB_COM_FIND_NOTIFY_CLOSE 0x35
-#define SMB_COM_TREE_CONNECT 0x70
-#define SMB_COM_TREE_DISCONNECT 0x71
-#define SMB_COM_NEGOTIATE 0x72
-#define SMB_COM_SESSION_SETUP_ANDX 0x73
-#define SMB_COM_LOGOFF_ANDX 0x74
-#define SMB_COM_TREE_CONNECT_ANDX 0x75
-#define SMB_COM_QUERY_INFORMATION_DISK 0x80
-#define SMB_COM_SEARCH 0x81
-#define SMB_COM_FIND 0x82
-#define SMB_COM_FIND_UNIQUE 0x83
-#define SMB_COM_NT_TRANSACT 0xA0
-#define SMB_COM_NT_TRANSACT_SECONDARY 0xA1
-#define SMB_COM_NT_CREATE_ANDX 0xA2
-#define SMB_COM_NT_CANCEL 0xA4
-#define SMB_COM_OPEN_PRINT_FILE 0xC0
-#define SMB_COM_WRITE_PRINT_FILE 0xC1
-#define SMB_COM_CLOSE_PRINT_FILE 0xC2
-#define SMB_COM_GET_PRINT_QUEUE 0xC3
-#define SMB_COM_READ_BULK 0xD8
-#define SMB_COM_WRITE_BULK 0xD9
-#define SMB_COM_WRITE_BULK_DATA 0xDA
-
-/*
- * TRANS2 commands
- */
-#define SMB_TRANS2_OPEN2 0x00
-#define SMB_TRANS2_FIND_FIRST2 0x01
-#define SMB_TRANS2_FIND_NEXT2 0x02
-#define SMB_TRANS2_QUERY_FS_INFORMATION 0x03
-#define SMB_TRANS2_QUERY_PATH_INFORMATION 0x05
-#define SMB_TRANS2_SET_PATH_INFORMATION 0x06
-#define SMB_TRANS2_QUERY_FILE_INFORMATION 0x07
-#define SMB_TRANS2_SET_FILE_INFORMATION 0x08
-#define SMB_TRANS2_FSCTL 0x09
-#define SMB_TRANS2_IOCTL2 0x0A
-#define SMB_TRANS2_FIND_NOTIFY_FIRST 0x0B
-#define SMB_TRANS2_FIND_NOTIFY_NEXT 0x0C
-#define SMB_TRANS2_CREATE_DIRECTORY 0x0D
-#define SMB_TRANS2_SESSION_SETUP 0x0E
-#define SMB_TRANS2_GET_DFS_REFERRAL 0x10
-#define SMB_TRANS2_REPORT_DFS_INCONSISTENCY 0x11
-
-/*
- * SMB_TRANS2_QUERY_FS_INFORMATION levels
- */
-#define SMB_INFO_ALLOCATION 1
-#define SMB_INFO_VOLUME 2
-#define SMB_QUERY_FS_VOLUME_INFO 0x102
-#define SMB_QUERY_FS_SIZE_INFO 0x103
-#define SMB_QUERY_FS_DEVICE_INFO 0x104
-#define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105
-
-/*
- * SMB_TRANS2_FIND_FIRST2 information levels
- */
-#define SMB_INFO_STANDARD 1
-#define SMB_INFO_QUERY_EA_SIZE 2
-#define SMB_INFO_QUERY_EAS_FROM_LIST 3
-#define SMB_FIND_FILE_DIRECTORY_INFO 0x101
-#define SMB_FIND_FULL_DIRECTORY_INFO 0x102
-#define SMB_FIND_FILE_NAMES_INFO 0x103
-#define SMB_FIND_BOTH_DIRECTORY_INFO 0x104
-
-/*
- * Set PATH/FILE information levels
- */
-#define SMB_SET_FILE_BASIC_INFO 0x101
-
-/*
- * LOCKING_ANDX LockType flags
- */
-#define SMB_LOCKING_ANDX_SHARED_LOCK 0x01
-#define SMB_LOCKING_ANDX_OPLOCK_RELEASE 0x02
-#define SMB_LOCKING_ANDX_CHANGE_LOCKTYPE 0x04
-#define SMB_LOCKING_ANDX_CANCEL_LOCK 0x08
-#define SMB_LOCKING_ANDX_LARGE_FILES 0x10
-
-/*
- * Some names length limitations. Some of them aren't declared by specs,
- * but we need reasonable limits.
- */
-#define SMB_MAXSRVNAMELEN 15 /* NetBIOS limit */
-#define SMB_MAXUSERNAMELEN 128
-#define SMB_MAXPASSWORDLEN 128
-#define SMB_MAXSHARENAMELEN 128
-#define SMB_MAXPKTLEN 0x1FFFF
-#define SMB_MAXCHALLENGELEN 8
-#define SMB_MAXFNAMELEN 255 /* Keep in sync with MAXNAMLEN */
-
-#define SMB_MAXRCN 3 /* number of reconnect attempts */
-
-/*
- * Error classes
- */
-#define SMBSUCCESS 0x00
-#define ERRDOS 0x01
-#define ERRSRV 0x02
-#define ERRHRD 0x03 /* Error is an hardware error. */
-#define ERRCMD 0xFF /* Command was not in the "SMB" format. */
-
-/*
- * Error codes for the ERRDOS class
- */
-#define ERRbadfunc 1 /* Invalid function */
-#define ERRbadfile 2 /* File not found (last component) */
-#define ERRbadpath 3 /* Directory invalid */
-#define ERRnofids 4 /* Too many open files */
-#define ERRnoaccess 5 /* Access denied */
-#define ERRbadfid 6 /* Invalid file handle */
-#define ERRbadmcb 7 /* Memory control blocks destroyed (huh ?) */
-#define ERRnomem 8 /* Insufficient memory */
-#define ERRbadmem 9 /* Invalid memory block address */
-#define ERRbadenv 10 /* Invalid environment */
-#define ERRbadformat 11 /* Invalid format */
-#define ERRbadaccess 12 /* Invalid open mode */
-#define ERRbaddata 13 /* Invalid data */
-#define ERRbaddrive 15 /* Invalid drive specified */
-#define ERRremcd 16 /* An attempt to delete current directory */
-#define ERRdiffdevice 17 /* cross fs rename/move */
-#define ERRnofiles 18 /* no more files found in file search */
-#define ERRbadshare 32 /* Share mode can't be granted */
-#define ERRlock 33 /* A lock request conflicts with existing lock */
-#define ERRfilexists 80 /* The file named in the request already exists */
-
-/*
- * Error codes for the ERRSRV class
- */
-#define ERRerror 1 /* Non-specific error code */
-#define ERRbadpw 2 /* Bad password */
-#define ERRaccess 4 /* The client doesn't have enough access rights */
-#define ERRinvnid 5 /* The Tid specified in a command is invalid */
-#define ERRinvnetname 6 /* Invalid server name in the tree connect */
-#define ERRinvdevice 7 /* Printer and not printer devices are mixed */
-#define ERRqfull 49 /* Print queue full */
-#define ERRqtoobig 50 /* Print queue full - no space */
-#define ERRinvpfid 52 /* Invalid print file FID */
-#define ERRsmbcmd 64 /* The server did not recognise the command */
-#define ERRsrverror 65 /* The server encountered and internal error */
-#define ERRfilespecs 67 /* The Fid and path name contains an invalid combination */
-#define ERRbadpermits 69 /* Access mode invalid */
-#define ERRsetattrmode 71 /* Attribute mode invalid */
-#define ERRpaused 81 /* Server is paused */
-#define ERRmsgoff 82 /* Not receiving messages */
-#define ERRnoroom 83 /* No room to buffer message */
-#define ERRrmuns 87 /* Too many remote user names */
-#define ERRtimeout 88 /* Operation timed out */
-#define ERRnoresource 89 /* No resources currently available for request */
-#define ERRtoomanyuids 90 /* Too many UIDs active on this session */
-#define ERRbaduid 91 /* The UID is not known in this session */
-#define ERRusempx 250 /* Temporarily unable to support Raw, use MPX mode */
-#define ERRusestd 251 /* Temporarily unable to support Raw, use stdandard r/w */
-#define ERRcontmpx 252 /* Continue in MPX mode */
-#define ERRnosupport 65535 /* Invalid function */
-
-/*
- * Error codes for the ERRHRD class
- */
-#define ERRnowrite 19 /* write protected media */
-#define ERRbadunit 20 /* Unknown unit */
-#define ERRnotready 21 /* Drive not ready */
-#define ERRbadcmd 22 /* Unknown command */
-#define ERRdata 23 /* Data error (CRC) */
-#define ERRbadreq 24 /* Bad request structure length */
-#define ERRseek 25 /* Seek error */
-#define ERRbadmedia 26 /* Unknown media type */
-#define ERRbadsector 27 /* Sector not found */
-#define ERRnopaper 28 /* Printer out of paper */
-#define ERRwrite 29 /* Write fault */
-#define ERRread 30 /* Read fault */
-#define ERRgeneral 31 /* General failure */
-#define ERRbadshare 32 /* A open conflicts with an existing open */
-#define ERRlock 33 /* lock/unlock conflict */
-#define ERRwrongdisk 34 /* The wrong disk was found in a drive */
-#define ERRFCBunavail 35 /* No FCBs available */
-#define ERRsharebufexc 36 /* A sharing buffer has been exceeded */
-
-/*
- * RAP error codes (it seems that they returned not only by RAP)
- */
-#define SMB_ERROR_ACCESS_DENIED 5
-#define SMB_ERROR_NETWORK_ACCESS_DENIED 65
-#define SMB_ERROR_MORE_DATA 234
-
-typedef u_int16_t smbfh;
-
-#endif /* _NETSMB_SMB_H_ */
diff --git a/sys/netsmb/smb_conn.c b/sys/netsmb/smb_conn.c
deleted file mode 100644
index 54f5c0b82879..000000000000
--- a/sys/netsmb/smb_conn.c
+++ /dev/null
@@ -1,874 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Connection engine.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/proc.h>
-#include <sys/lock.h>
-#include <sys/sysctl.h>
-#include <sys/socketvar.h>
-
-#include <sys/iconv.h>
-
-#include <netsmb/smb.h>
-#include <netsmb/smb_subr.h>
-#include <netsmb/smb_conn.h>
-#include <netsmb/smb_tran.h>
-#include <netsmb/smb_trantcp.h>
-
-static struct smb_connobj smb_vclist;
-static int smb_vcnext = 1; /* next unique id for VC */
-
-extern struct linker_set sysctl_net_smb;
-
-SYSCTL_NODE(_net, OID_AUTO, smb, CTLFLAG_RW, NULL, "SMB protocol");
-
-MALLOC_DEFINE(M_SMBCONN, "SMB conn", "SMB connection");
-
-static void smb_co_init(struct smb_connobj *cp, int level, char *objname,
- struct proc *p);
-static void smb_co_done(struct smb_connobj *cp);
-static int smb_co_lockstatus(struct smb_connobj *cp, struct proc *p);
-
-static int smb_vc_disconnect(struct smb_vc *vcp);
-static void smb_vc_free(struct smb_connobj *cp);
-static void smb_vc_gone(struct smb_connobj *cp, struct smb_cred *scred);
-static smb_co_free_t smb_share_free;
-static smb_co_gone_t smb_share_gone;
-
-static int smb_sysctl_treedump(SYSCTL_HANDLER_ARGS);
-
-SYSCTL_PROC(_net_smb, OID_AUTO, treedump, CTLFLAG_RD | CTLTYPE_OPAQUE,
- NULL, 0, smb_sysctl_treedump, "S,treedump", "Requester tree");
-
-int
-smb_sm_init(void)
-{
-
- smb_co_init(&smb_vclist, SMBL_SM, "smbsm", curproc);
- smb_co_unlock(&smb_vclist, 0, curproc);
- return 0;
-}
-
-int
-smb_sm_done(void)
-{
-
- /* XXX: hold the mutex */
- if (smb_vclist.co_usecount > 1) {
- SMBERROR("%d connections still active\n", smb_vclist.co_usecount - 1);
- return EBUSY;
- }
- smb_co_done(&smb_vclist);
- return 0;
-}
-
-static int
-smb_sm_lockvclist(int flags, struct proc *p)
-{
-
- return smb_co_lock(&smb_vclist, flags | LK_CANRECURSE, p);
-}
-
-static void
-smb_sm_unlockvclist(struct proc *p)
-{
-
- smb_co_unlock(&smb_vclist, LK_RELEASE, p);
-}
-
-static int
-smb_sm_lookupint(struct smb_vcspec *vcspec, struct smb_sharespec *shspec,
- struct smb_cred *scred, struct smb_vc **vcpp)
-{
- struct proc *p = scred->scr_p;
- struct smb_vc *vcp;
- int exact = 1;
- int error;
-
- vcspec->shspec = shspec;
- error = ENOENT;
- SMBCO_FOREACH((struct smb_connobj*)vcp, &smb_vclist) {
- error = smb_vc_lock(vcp, LK_EXCLUSIVE, p);
- if (error)
- continue;
- itry {
- if ((vcp->obj.co_flags & SMBV_PRIVATE) ||
- !CONNADDREQ(vcp->vc_paddr, vcspec->sap) ||
- strcmp(vcp->vc_username, vcspec->username) != 0)
- ithrow(1);
- if (vcspec->owner != SMBM_ANY_OWNER) {
- if (vcp->vc_uid != vcspec->owner)
- ithrow(1);
- } else
- exact = 0;
- if (vcspec->group != SMBM_ANY_GROUP) {
- if (vcp->vc_grp != vcspec->group)
- ithrow(1);
- } else
- exact = 0;
-
- if (vcspec->mode & SMBM_EXACT) {
- if (!exact ||
- (vcspec->mode & SMBM_MASK) != vcp->vc_mode)
- ithrow(1);
- }
- if (smb_vc_access(vcp, scred, vcspec->mode) != 0)
- ithrow(1);
- vcspec->ssp = NULL;
- if (shspec)
- ithrow(smb_vc_lookupshare(vcp, shspec, scred, &vcspec->ssp));
- error = 0;
- break;
- } icatch(error) {
- smb_vc_unlock(vcp, 0, p);
- } ifinally {
- } iendtry;
- if (error == 0)
- break;
- }
- if (vcp) {
- smb_vc_ref(vcp, p);
- *vcpp = vcp;
- }
- return error;
-}
-
-int
-smb_sm_lookup(struct smb_vcspec *vcspec, struct smb_sharespec *shspec,
- struct smb_cred *scred, struct smb_vc **vcpp)
-{
- struct proc *p = scred->scr_p;
- struct smb_vc *vcp;
- struct smb_share *ssp = NULL;
- int error;
-
- *vcpp = vcp = NULL;
-
- error = smb_sm_lockvclist(LK_EXCLUSIVE, p);
- if (error)
- return error;
- error = smb_sm_lookupint(vcspec, shspec, scred, vcpp);
- if (error == 0 || (vcspec->flags & SMBV_CREATE) == 0) {
- smb_sm_unlockvclist(p);
- return error;
- }
- error = smb_sm_lookupint(vcspec, NULL, scred, &vcp);
- if (error) {
- error = smb_vc_create(vcspec, scred, &vcp);
- if (error)
- goto out;
- error = smb_vc_connect(vcp, scred);
- if (error)
- goto out;
- }
- if (shspec == NULL)
- goto out;
- error = smb_share_create(vcp, shspec, scred, &ssp);
- if (error)
- goto out;
- error = smb_smb_treeconnect(ssp, scred);
- if (error == 0)
- vcspec->ssp = ssp;
- else
- smb_share_put(ssp, scred);
-out:
- smb_sm_unlockvclist(p);
- if (error == 0)
- *vcpp = vcp;
- else if (vcp)
- smb_vc_put(vcp, scred);
- return error;
-}
-
-/*
- * Common code for connection object
- */
-static void
-smb_co_init(struct smb_connobj *cp, int level, char *objname, struct proc *p)
-{
- SLIST_INIT(&cp->co_children);
- smb_sl_init(&cp->co_interlock, objname);
- lockinit(&cp->co_lock, PZERO, objname, 0, 0);
- cp->co_level = level;
- cp->co_usecount = 1;
- KASSERT(smb_co_lock(cp, LK_EXCLUSIVE, p) == 0, ("smb_co_init: lock failed"));
-}
-
-static void
-smb_co_done(struct smb_connobj *cp)
-{
- smb_sl_destroy(&cp->co_interlock);
- lockdestroy(&cp->co_lock);
-}
-
-static void
-smb_co_gone(struct smb_connobj *cp, struct smb_cred *scred)
-{
- struct smb_connobj *parent;
-
- if (cp->co_gone)
- cp->co_gone(cp, scred);
- parent = cp->co_parent;
- if (parent) {
- smb_co_lock(parent, LK_EXCLUSIVE, scred->scr_p);
- SLIST_REMOVE(&parent->co_children, cp, smb_connobj, co_next);
- smb_co_put(parent, scred);
- }
- if (cp->co_free)
- cp->co_free(cp);
-}
-
-void
-smb_co_ref(struct smb_connobj *cp, struct proc *p)
-{
-
- SMB_CO_LOCK(cp);
- cp->co_usecount++;
- SMB_CO_UNLOCK(cp);
-}
-
-void
-smb_co_rele(struct smb_connobj *cp, struct smb_cred *scred)
-{
- struct proc *p = scred->scr_p;
-
- SMB_CO_LOCK(cp);
- if (cp->co_usecount > 1) {
- cp->co_usecount--;
- SMB_CO_UNLOCK(cp);
- return;
- }
- if (cp->co_usecount == 0) {
- SMBERROR("negative use_count for object %d", cp->co_level);
- SMB_CO_UNLOCK(cp);
- return;
- }
- cp->co_usecount--;
- cp->co_flags |= SMBO_GONE;
-
- lockmgr(&cp->co_lock, LK_DRAIN | LK_INTERLOCK, &cp->co_interlock, p);
- smb_co_gone(cp, scred);
-}
-
-int
-smb_co_get(struct smb_connobj *cp, int flags, struct smb_cred *scred)
-{
- int error;
-
- if ((flags & LK_INTERLOCK) == 0)
- SMB_CO_LOCK(cp);
- cp->co_usecount++;
- error = smb_co_lock(cp, flags | LK_INTERLOCK, scred->scr_p);
- if (error) {
- SMB_CO_LOCK(cp);
- cp->co_usecount--;
- SMB_CO_UNLOCK(cp);
- return error;
- }
- return 0;
-}
-
-void
-smb_co_put(struct smb_connobj *cp, struct smb_cred *scred)
-{
- struct proc *p = scred->scr_p;
- int flags;
-
- flags = LK_RELEASE;
- SMB_CO_LOCK(cp);
- if (cp->co_usecount > 1) {
- cp->co_usecount--;
- } else if (cp->co_usecount == 1) {
- cp->co_usecount--;
- cp->co_flags |= SMBO_GONE;
- flags = LK_DRAIN;
- } else {
- SMBERROR("negative usecount");
- }
- lockmgr(&cp->co_lock, LK_RELEASE | LK_INTERLOCK, &cp->co_interlock, p);
- if ((cp->co_flags & SMBO_GONE) == 0)
- return;
- lockmgr(&cp->co_lock, LK_DRAIN, NULL, p);
- smb_co_gone(cp, scred);
-}
-
-int
-smb_co_lockstatus(struct smb_connobj *cp, struct proc *p)
-{
- return lockstatus(&cp->co_lock, p);
-}
-
-int
-smb_co_lock(struct smb_connobj *cp, int flags, struct proc *p)
-{
-
- if (cp->co_flags & SMBO_GONE)
- return EINVAL;
- if ((flags & LK_TYPE_MASK) == 0)
- flags |= LK_EXCLUSIVE;
- if (smb_co_lockstatus(cp, p) == LK_EXCLUSIVE &&
- (flags & LK_CANRECURSE) == 0) {
- SMBERROR("recursive lock for object %d\n", cp->co_level);
- return 0;
- }
- return lockmgr(&cp->co_lock, flags, &cp->co_interlock, p);
-}
-
-void
-smb_co_unlock(struct smb_connobj *cp, int flags, struct proc *p)
-{
- (void)lockmgr(&cp->co_lock, flags | LK_RELEASE, &cp->co_interlock, p);
-}
-
-static void
-smb_co_addchild(struct smb_connobj *parent, struct smb_connobj *child)
-{
- KASSERT(smb_co_lockstatus(parent, curproc) == LK_EXCLUSIVE, ("smb_co_addchild: parent not locked"));
- KASSERT(smb_co_lockstatus(child, curproc) == LK_EXCLUSIVE, ("smb_co_addchild: child not locked"));
-
- smb_co_ref(parent, curproc);
- SLIST_INSERT_HEAD(&parent->co_children, child, co_next);
- child->co_parent = parent;
-}
-
-/*
- * Session implementation
- */
-
-int
-smb_vc_create(struct smb_vcspec *vcspec,
- struct smb_cred *scred, struct smb_vc **vcpp)
-{
- struct smb_vc *vcp;
- struct proc *p = scred->scr_p;
- struct ucred *cred = scred->scr_cred;
- uid_t uid = vcspec->owner;
- gid_t gid = vcspec->group;
- uid_t realuid = cred->cr_uid;
- char *domain = vcspec->domain;
- int error, isroot;
-
- isroot = smb_suser(cred) == 0;
- /*
- * Only superuser can create VCs with different uid and gid
- */
- if (uid != SMBM_ANY_OWNER && uid != realuid && !isroot)
- return EPERM;
- if (gid != SMBM_ANY_GROUP && !groupmember(gid, cred) && !isroot)
- return EPERM;
-
- vcp = smb_zmalloc(sizeof(*vcp), M_SMBCONN, M_WAITOK);
- smb_co_init(VCTOCP(vcp), SMBL_VC, "smb_vc", p);
- vcp->obj.co_free = smb_vc_free;
- vcp->obj.co_gone = smb_vc_gone;
- vcp->vc_number = smb_vcnext++;
- vcp->vc_timo = SMB_DEFRQTIMO;
- vcp->vc_smbuid = SMB_UID_UNKNOWN;
- vcp->vc_mode = vcspec->rights & SMBM_MASK;
- vcp->obj.co_flags = vcspec->flags & (SMBV_PRIVATE | SMBV_SINGLESHARE);
- vcp->vc_tdesc = &smb_tran_nbtcp_desc;
-
- if (uid == SMBM_ANY_OWNER)
- uid = realuid;
- if (gid == SMBM_ANY_GROUP)
- gid = cred->cr_groups[0];
- vcp->vc_uid = uid;
- vcp->vc_grp = gid;
-
- smb_sl_init(&vcp->vc_stlock, "vcstlock");
- error = 0;
- itry {
- vcp->vc_paddr = dup_sockaddr(vcspec->sap, 1);
- ierror(vcp->vc_paddr == NULL, ENOMEM);
-
- vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1);
- ierror(vcp->vc_laddr == NULL, ENOMEM);
-
- ierror((vcp->vc_pass = smb_strdup(vcspec->pass)) == NULL, ENOMEM);
-
- vcp->vc_domain = smb_strdup((domain && domain[0]) ? domain : "NODOMAIN");
- ierror(vcp->vc_domain == NULL, ENOMEM);
-
- ierror((vcp->vc_srvname = smb_strdup(vcspec->srvname)) == NULL, ENOMEM);
- ierror((vcp->vc_username = smb_strdup(vcspec->username)) == NULL, ENOMEM);
-
- ithrow(iconv_open("tolower", vcspec->localcs, &vcp->vc_tolower));
- ithrow(iconv_open("toupper", vcspec->localcs, &vcp->vc_toupper));
- if (vcspec->servercs[0]) {
- ithrow(iconv_open(vcspec->servercs, vcspec->localcs,
- &vcp->vc_toserver));
- ithrow(iconv_open(vcspec->localcs, vcspec->servercs,
- &vcp->vc_tolocal));
- }
-
- ithrow(smb_iod_create(vcp));
- *vcpp = vcp;
- smb_co_addchild(&smb_vclist, VCTOCP(vcp));
- } icatch(error) {
- smb_vc_put(vcp, scred);
- } ifinally {
- } iendtry;
- return error;
-}
-
-static void
-smb_vc_free(struct smb_connobj *cp)
-{
- struct smb_vc *vcp = CPTOVC(cp);
-
- if (vcp->vc_iod)
- smb_iod_destroy(vcp->vc_iod);
- SMB_STRFREE(vcp->vc_username);
- SMB_STRFREE(vcp->vc_srvname);
- SMB_STRFREE(vcp->vc_pass);
- SMB_STRFREE(vcp->vc_domain);
- if (vcp->vc_paddr)
- free(vcp->vc_paddr, M_SONAME);
- if (vcp->vc_laddr)
- free(vcp->vc_laddr, M_SONAME);
- if (vcp->vc_tolower)
- iconv_close(vcp->vc_tolower);
- if (vcp->vc_toupper)
- iconv_close(vcp->vc_toupper);
- if (vcp->vc_tolocal)
- iconv_close(vcp->vc_tolocal);
- if (vcp->vc_toserver)
- iconv_close(vcp->vc_toserver);
- smb_co_done(VCTOCP(vcp));
- smb_sl_destroy(&vcp->vc_stlock);
- free(vcp, M_SMBCONN);
-}
-
-/*
- * Called when use count of VC dropped to zero.
- * VC should be locked on enter with LK_DRAIN.
- */
-static void
-smb_vc_gone(struct smb_connobj *cp, struct smb_cred *scred)
-{
- struct smb_vc *vcp = CPTOVC(cp);
-
- smb_vc_disconnect(vcp);
-}
-
-void
-smb_vc_ref(struct smb_vc *vcp, struct proc *p)
-{
- smb_co_ref(VCTOCP(vcp), p);
-}
-
-void
-smb_vc_rele(struct smb_vc *vcp, struct smb_cred *scred)
-{
- smb_co_rele(VCTOCP(vcp), scred);
-}
-
-int
-smb_vc_get(struct smb_vc *vcp, int flags, struct smb_cred *scred)
-{
- return smb_co_get(VCTOCP(vcp), flags, scred);
-}
-
-void
-smb_vc_put(struct smb_vc *vcp, struct smb_cred *scred)
-{
- smb_co_put(VCTOCP(vcp), scred);
-}
-
-int
-smb_vc_lock(struct smb_vc *vcp, int flags, struct proc *p)
-{
- return smb_co_lock(VCTOCP(vcp), flags, p);
-}
-
-void
-smb_vc_unlock(struct smb_vc *vcp, int flags, struct proc *p)
-{
- smb_co_unlock(VCTOCP(vcp), flags, p);
-}
-
-int
-smb_vc_access(struct smb_vc *vcp, struct smb_cred *scred, mode_t mode)
-{
- struct ucred *cred = scred->scr_cred;
-
- if (smb_suser(cred) == 0 || cred->cr_uid == vcp->vc_uid)
- return 0;
- mode >>= 3;
- if (!groupmember(vcp->vc_grp, cred))
- mode >>= 3;
- return (vcp->vc_mode & mode) == mode ? 0 : EACCES;
-}
-
-static int
-smb_vc_cmpshare(struct smb_share *ssp, struct smb_sharespec *dp)
-{
- int exact = 1;
-
- if (strcmp(ssp->ss_name, dp->name) != 0)
- return 1;
- if (dp->owner != SMBM_ANY_OWNER) {
- if (ssp->ss_uid != dp->owner)
- return 1;
- } else
- exact = 0;
- if (dp->group != SMBM_ANY_GROUP) {
- if (ssp->ss_grp != dp->group)
- return 1;
- } else
- exact = 0;
-
- if (dp->mode & SMBM_EXACT) {
- if (!exact)
- return 1;
- return (dp->mode & SMBM_MASK) == ssp->ss_mode ? 0 : 1;
- }
- if (smb_share_access(ssp, dp->scred, dp->mode) != 0)
- return 1;
- return 0;
-}
-
-/*
- * Lookup share in the given VC. Share referenced and locked on return.
- * VC expected to be locked on entry and will be left locked on exit.
- */
-int
-smb_vc_lookupshare(struct smb_vc *vcp, struct smb_sharespec *dp,
- struct smb_cred *scred, struct smb_share **sspp)
-{
- struct proc *p = scred->scr_p;
- struct smb_share *ssp = NULL;
- int error;
-
- *sspp = NULL;
- dp->scred = scred;
- SMBCO_FOREACH((struct smb_connobj*)ssp, VCTOCP(vcp)) {
- error = smb_share_lock(ssp, LK_EXCLUSIVE, p);
- if (error)
- continue;
- if (smb_vc_cmpshare(ssp, dp) == 0)
- break;
- smb_share_unlock(ssp, 0, p);
- }
- if (ssp) {
- smb_share_ref(ssp, p);
- *sspp = ssp;
- error = 0;
- } else
- error = ENOENT;
- return error;
-}
-
-int
-smb_vc_connect(struct smb_vc *vcp, struct smb_cred *scred)
-{
-
- return smb_iod_request(vcp->vc_iod, SMBIOD_EV_CONNECT | SMBIOD_EV_SYNC, NULL);
-}
-
-/*
- * Destroy VC to server, invalidate shares linked with it.
- * Transport should be locked on entry.
- */
-int
-smb_vc_disconnect(struct smb_vc *vcp)
-{
-
- smb_iod_request(vcp->vc_iod, SMBIOD_EV_DISCONNECT | SMBIOD_EV_SYNC, NULL);
- return 0;
-}
-
-static char smb_emptypass[] = "";
-
-const char *
-smb_vc_getpass(struct smb_vc *vcp)
-{
- if (vcp->vc_pass)
- return vcp->vc_pass;
- return smb_emptypass;
-}
-
-static int
-smb_vc_getinfo(struct smb_vc *vcp, struct smb_vc_info *vip)
-{
- bzero(vip, sizeof(struct smb_vc_info));
- vip->itype = SMB_INFO_VC;
- vip->usecount = vcp->obj.co_usecount;
- vip->uid = vcp->vc_uid;
- vip->gid = vcp->vc_grp;
- vip->mode = vcp->vc_mode;
- vip->flags = vcp->obj.co_flags;
- vip->sopt = vcp->vc_sopt;
- vip->iodstate = vcp->vc_iod->iod_state;
- bzero(&vip->sopt.sv_skey, sizeof(vip->sopt.sv_skey));
- snprintf(vip->srvname, sizeof(vip->srvname), "%s", vcp->vc_srvname);
- snprintf(vip->vcname, sizeof(vip->vcname), "%s", vcp->vc_username);
- return 0;
-}
-
-u_short
-smb_vc_nextmid(struct smb_vc *vcp)
-{
- u_short r;
-
- SMB_CO_LOCK(&vcp->obj);
- r = vcp->vc_mid++;
- SMB_CO_UNLOCK(&vcp->obj);
- return r;
-}
-
-/*
- * Share implementation
- */
-/*
- * Allocate share structure and attach it to the given VC
- * Connection expected to be locked on entry. Share will be returned
- * in locked state.
- */
-int
-smb_share_create(struct smb_vc *vcp, struct smb_sharespec *shspec,
- struct smb_cred *scred, struct smb_share **sspp)
-{
- struct smb_share *ssp;
- struct proc *p = scred->scr_p;
- struct ucred *cred = scred->scr_cred;
- uid_t realuid = cred->cr_uid;
- uid_t uid = shspec->owner;
- gid_t gid = shspec->group;
- int error, isroot;
-
- isroot = smb_suser(cred) == 0;
- /*
- * Only superuser can create shares with different uid and gid
- */
- if (uid != SMBM_ANY_OWNER && uid != realuid && !isroot)
- return EPERM;
- if (gid != SMBM_ANY_GROUP && !groupmember(gid, cred) && !isroot)
- return EPERM;
- error = smb_vc_lookupshare(vcp, shspec, scred, &ssp);
- if (!error) {
- smb_share_put(ssp, scred);
- return EEXIST;
- }
- if (uid == SMBM_ANY_OWNER)
- uid = realuid;
- if (gid == SMBM_ANY_GROUP)
- gid = cred->cr_groups[0];
- ssp = smb_zmalloc(sizeof(*ssp), M_SMBCONN, M_WAITOK);
- smb_co_init(SSTOCP(ssp), SMBL_SHARE, "smbss", p);
- ssp->obj.co_free = smb_share_free;
- ssp->obj.co_gone = smb_share_gone;
- smb_sl_init(&ssp->ss_stlock, "ssstlock");
- ssp->ss_name = smb_strdup(shspec->name);
- if (shspec->pass && shspec->pass[0])
- ssp->ss_pass = smb_strdup(shspec->pass);
- ssp->ss_type = shspec->stype;
- ssp->ss_tid = SMB_TID_UNKNOWN;
- ssp->ss_uid = uid;
- ssp->ss_grp = gid;
- ssp->ss_mode = shspec->rights & SMBM_MASK;
- smb_co_addchild(VCTOCP(vcp), SSTOCP(ssp));
- *sspp = ssp;
- return 0;
-}
-
-static void
-smb_share_free(struct smb_connobj *cp)
-{
- struct smb_share *ssp = CPTOSS(cp);
-
- SMB_STRFREE(ssp->ss_name);
- SMB_STRFREE(ssp->ss_pass);
- smb_sl_destroy(&ssp->ss_stlock);
- smb_co_done(SSTOCP(ssp));
- free(ssp, M_SMBCONN);
-}
-
-static void
-smb_share_gone(struct smb_connobj *cp, struct smb_cred *scred)
-{
- struct smb_share *ssp = CPTOSS(cp);
-
- smb_smb_treedisconnect(ssp, scred);
-}
-
-void
-smb_share_ref(struct smb_share *ssp, struct proc *p)
-{
- smb_co_ref(SSTOCP(ssp), p);
-}
-
-void
-smb_share_rele(struct smb_share *ssp, struct smb_cred *scred)
-{
- smb_co_rele(SSTOCP(ssp), scred);
-}
-
-int
-smb_share_get(struct smb_share *ssp, int flags, struct smb_cred *scred)
-{
- return smb_co_get(SSTOCP(ssp), flags, scred);
-}
-
-void
-smb_share_put(struct smb_share *ssp, struct smb_cred *scred)
-{
- smb_co_put(SSTOCP(ssp), scred);
-}
-
-int
-smb_share_lock(struct smb_share *ssp, int flags, struct proc *p)
-{
- return smb_co_lock(SSTOCP(ssp), flags, p);
-}
-
-void
-smb_share_unlock(struct smb_share *ssp, int flags, struct proc *p)
-{
- smb_co_unlock(SSTOCP(ssp), flags, p);
-}
-
-int
-smb_share_access(struct smb_share *ssp, struct smb_cred *scred, mode_t mode)
-{
- struct ucred *cred = scred->scr_cred;
-
- if (smb_suser(cred) == 0 || cred->cr_uid == ssp->ss_uid)
- return 0;
- mode >>= 3;
- if (!groupmember(ssp->ss_grp, cred))
- mode >>= 3;
- return (ssp->ss_mode & mode) == mode ? 0 : EACCES;
-}
-
-void
-smb_share_invalidate(struct smb_share *ssp)
-{
- ssp->ss_tid = SMB_TID_UNKNOWN;
-}
-
-int
-smb_share_valid(struct smb_share *ssp)
-{
- return ssp->ss_tid != SMB_TID_UNKNOWN &&
- ssp->ss_vcgenid == SSTOVC(ssp)->vc_genid;
-}
-
-const char*
-smb_share_getpass(struct smb_share *ssp)
-{
- struct smb_vc *vcp;
-
- if (ssp->ss_pass)
- return ssp->ss_pass;
- vcp = SSTOVC(ssp);
- if (vcp->vc_pass)
- return vcp->vc_pass;
- return smb_emptypass;
-}
-
-static int
-smb_share_getinfo(struct smb_share *ssp, struct smb_share_info *sip)
-{
- bzero(sip, sizeof(struct smb_share_info));
- sip->itype = SMB_INFO_SHARE;
- sip->usecount = ssp->obj.co_usecount;
- sip->tid = ssp->ss_tid;
- sip->type= ssp->ss_type;
- sip->uid = ssp->ss_uid;
- sip->gid = ssp->ss_grp;
- sip->mode= ssp->ss_mode;
- sip->flags = ssp->obj.co_flags;
- snprintf(sip->sname, sizeof(sip->sname), "%s", ssp->ss_name);
- return 0;
-}
-
-/*
- * Dump an entire tree into sysctl call
- */
-static int
-smb_sysctl_treedump(SYSCTL_HANDLER_ARGS)
-{
- struct proc *p = req->p;
- struct smb_cred scred;
- struct smb_vc *vcp;
- struct smb_share *ssp;
- struct smb_vc_info vci;
- struct smb_share_info ssi;
- int error, itype;
-
- smb_makescred(&scred, p, p->p_ucred);
- error = smb_sm_lockvclist(LK_SHARED, p);
- if (error)
- return error;
- SMBCO_FOREACH((struct smb_connobj*)vcp, &smb_vclist) {
- error = smb_vc_lock(vcp, LK_SHARED, p);
- if (error)
- continue;
- smb_vc_getinfo(vcp, &vci);
- error = SYSCTL_OUT(req, &vci, sizeof(struct smb_vc_info));
- if (error) {
- smb_vc_unlock(vcp, 0, p);
- break;
- }
- SMBCO_FOREACH((struct smb_connobj*)ssp, VCTOCP(vcp)) {
- error = smb_share_lock(ssp, LK_SHARED, p);
- if (error) {
- error = 0;
- continue;
- }
- smb_share_getinfo(ssp, &ssi);
- smb_share_unlock(ssp, 0, p);
- error = SYSCTL_OUT(req, &ssi, sizeof(struct smb_share_info));
- if (error)
- break;
- }
- smb_vc_unlock(vcp, 0, p);
- if (error)
- break;
- }
- if (!error) {
- itype = SMB_INFO_NONE;
- error = SYSCTL_OUT(req, &itype, sizeof(itype));
- }
- smb_sm_unlockvclist(p);
- return error;
-}
diff --git a/sys/netsmb/smb_conn.h b/sys/netsmb/smb_conn.h
deleted file mode 100644
index 3467f9a77ecb..000000000000
--- a/sys/netsmb/smb_conn.h
+++ /dev/null
@@ -1,464 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _NETINET_IN_H_
-#include <netinet/in.h>
-#endif
-
-/*
- * Two levels of connection hierarchy
- */
-#define SMBL_SM 0
-#define SMBL_VC 1
-#define SMBL_SHARE 2
-#define SMBL_NUM 3
-#define SMBL_NONE (-1)
-
-#define SMB_CS_NONE 0x0000
-#define SMB_CS_UPPER 0x0001 /* convert passed string to upper case */
-#define SMB_CS_LOWER 0x0002 /* convert passed string to lower case */
-
-/*
- * Common object flags
- */
-#define SMBO_GONE 0x1000000
-
-/*
- * access modes
- */
-#define SMBM_READ 0400 /* read conn attrs.(like list shares) */
-#define SMBM_WRITE 0200 /* modify conn attrs */
-#define SMBM_EXEC 0100 /* can send SMB requests */
-#define SMBM_READGRP 0040
-#define SMBM_WRITEGRP 0020
-#define SMBM_EXECGRP 0010
-#define SMBM_READOTH 0004
-#define SMBM_WRITEOTH 0002
-#define SMBM_EXECOTH 0001
-#define SMBM_MASK 0777
-#define SMBM_EXACT 010000 /* check for specified mode exactly */
-#define SMBM_ALL (SMBM_READ | SMBM_WRITE | SMBM_EXEC)
-#define SMBM_DEFAULT (SMBM_READ | SMBM_WRITE | SMBM_EXEC)
-#define SMBM_ANY_OWNER ((uid_t)-1)
-#define SMBM_ANY_GROUP ((gid_t)-1)
-
-/*
- * VC flags
- */
-#define SMBV_PERMANENT 0x0002
-#define SMBV_LONGNAMES 0x0004 /* connection is configured to use long names */
-#define SMBV_ENCRYPT 0x0008 /* server asked for encrypted password */
-#define SMBV_WIN95 0x0010 /* used to apply bugfixes for this OS */
-#define SMBV_PRIVATE 0x0020 /* connection can be used only by creator */
-#define SMBV_RECONNECTING 0x0040 /* conn is in the process of reconnection */
-#define SMBV_SINGLESHARE 0x0080 /* only one share connectin should be allowed */
-#define SMBV_CREATE 0x0100 /* lookup for create opeartion */
-/*#define SMBV_FAILED 0x0200*/ /* last reconnect attempt has failed */
-
-
-/*
- * smb_share flags
- */
-#define SMBS_PERMANENT 0x0001
-#define SMBS_RECONNECTING 0x0002
-#define SMBS_CONNECTED 0x0004
-
-/*
- * share types
- */
-#define SMB_ST_DISK 0x0 /* A: */
-#define SMB_ST_PRINTER 0x1 /* LPT: */
-#define SMB_ST_PIPE 0x2 /* IPC */
-#define SMB_ST_COMM 0x3 /* COMM */
-#define SMB_ST_ANY 0x4
-#define SMB_ST_MAX 0x4
-#define SMB_ST_NONE 0xff /* not a part of protocol */
-
-/*
- * Negotiated protocol parameters
- */
-struct smb_sopt {
- int sv_proto;
- int16_t sv_tz; /* offset in min relative to UTC */
- u_int32_t sv_maxtx; /* maximum transmit buf size */
- u_char sv_sm; /* security mode */
- u_int16_t sv_maxmux; /* max number of outstanding rq's */
- u_int16_t sv_maxvcs; /* max number of VCs */
- u_int16_t sv_rawmode;
- u_int32_t sv_maxraw; /* maximum raw-buffer size */
- u_int32_t sv_skey; /* session key */
- u_int32_t sv_caps; /* capabilites SMB_CAP_ */
-};
-
-/*
- * network IO daemon states
- */
-enum smbiod_state {
- SMBIOD_ST_NOTCONN, /* no connect request was made */
- SMBIOD_ST_RECONNECT, /* a [re]connect attempt is in progress */
- SMBIOD_ST_TRANACTIVE, /* transport level is up */
- SMBIOD_ST_VCACTIVE, /* session established */
- SMBIOD_ST_DEAD /* connection broken, transport is down */
-};
-
-
-/*
- * Info structures
- */
-#define SMB_INFO_NONE 0
-#define SMB_INFO_VC 2
-#define SMB_INFO_SHARE 3
-
-struct smb_vc_info {
- int itype;
- int usecount;
- uid_t uid; /* user id of connection */
- gid_t gid; /* group of connection */
- mode_t mode; /* access mode */
- int flags;
- enum smbiod_state iodstate;
- struct smb_sopt sopt;
- char srvname[SMB_MAXSRVNAMELEN];
- char vcname[128];
-};
-
-struct smb_share_info {
- int itype;
- int usecount;
- u_short tid; /* TID */
- int type; /* share type */
- uid_t uid; /* user id of connection */
- gid_t gid; /* group of connection */
- mode_t mode; /* access mode */
- int flags;
- char sname[128];
-};
-
-#ifdef _KERNEL
-
-#include <sys/lock.h>
-#include <netsmb/smb_subr.h>
-
-#define CONNADDREQ(a1,a2) ((a1)->sa_len == (a2)->sa_len && \
- bcmp(a1, a2, (a1)->sa_len) == 0)
-
-struct smb_vc;
-struct smb_share;
-struct smb_cred;
-struct smb_rq;
-struct mbdata;
-struct smbioc_oshare;
-struct smbioc_ossn;
-struct uio;
-
-TAILQ_HEAD(smb_rqhead, smb_rq);
-
-#define SMB_DEFRQTIMO 5
-
-#define SMB_DIALECT(vcp) ((vcp)->vc_sopt.sv_proto)
-
-struct smb_tran_desc;
-
-/*
- * Connection object
- */
-struct smb_connobj;
-
-typedef void smb_co_gone_t (struct smb_connobj *cp, struct smb_cred *scred);
-typedef void smb_co_free_t (struct smb_connobj *cp);
-
-#define SMB_CO_LOCK(cp) smb_sl_lock(&(cp)->co_interlock)
-#define SMB_CO_UNLOCK(cp) smb_sl_unlock(&(cp)->co_interlock)
-
-struct smb_connobj {
- int co_level; /* SMBL_ */
- int co_flags;
- struct lock co_lock;
- struct smb_slock co_interlock;
- int co_usecount;
- struct smb_connobj * co_parent;
- SLIST_HEAD(,smb_connobj)co_children;
- SLIST_ENTRY(smb_connobj)co_next;
- smb_co_gone_t * co_gone;
- smb_co_free_t * co_free;
-};
-
-#define SMBCO_FOREACH(var, cp) SLIST_FOREACH((var), &(cp)->co_children, co_next)
-
-/*
- * Virtual Circuit (session) to a server.
- * This is the most (over)complicated part of SMB protocol.
- * For the user security level (usl), each session with different remote
- * user name has its own VC.
- * It is unclear however, should share security level (ssl) allow additional
- * VCs, because user name is not used and can be the same. On other hand,
- * multiple VCs allows us to create separate sessions to server on a per
- * user basis.
- */
-
-/*
- * This lock protects vc_flags
- */
-#define SMBC_ST_LOCK(vcp) smb_sl_lock(&(vcp)->vc_stlock)
-#define SMBC_ST_UNLOCK(vcp) smb_sl_unlock(&(vcp)->vc_stlock)
-
-
-struct smb_vc {
- struct smb_connobj obj;
- char * vc_srvname;
- struct sockaddr*vc_paddr; /* server addr */
- struct sockaddr*vc_laddr; /* local addr, if any */
- char * vc_username;
- char * vc_pass; /* password for usl case */
- char * vc_domain; /* workgroup/primary domain */
-
- u_int vc_timo; /* default request timeout */
- int vc_maxvcs; /* maximum number of VC per connection */
-
- void * vc_tolower; /* local charset */
- void * vc_toupper; /* local charset */
- void * vc_toserver; /* local charset to server one */
- void * vc_tolocal; /* server charset to local one */
- int vc_number; /* number of this VC from the client side */
- int vc_genid;
- uid_t vc_uid; /* user id of connection */
- gid_t vc_grp; /* group of connection */
- mode_t vc_mode; /* access mode */
- struct tnode * vc_tnode; /* backing object */
- u_short vc_smbuid; /* unique vc id assigned by server */
-
- u_char vc_hflags; /* or'ed with flags in the smb header */
- u_short vc_hflags2; /* or'ed with flags in the smb header */
- void * vc_tdata; /* transport control block */
- struct smb_tran_desc *vc_tdesc;
- int vc_chlen; /* actual challenge length */
- u_char vc_ch[SMB_MAXCHALLENGELEN];
- u_short vc_mid; /* multiplex id */
- struct smb_sopt vc_sopt; /* server options */
- struct smb_cred*vc_scred; /* used in reconnect procedure */
- int vc_txmax; /* max tx/rx packet size */
- struct smbiod * vc_iod;
- struct smb_slock vc_stlock;
-};
-
-#define vc_maxmux vc_sopt.sv_maxmux
-#define vc_flags obj.co_flags
-
-
-/*
- * smb_share structure describes connection to the given SMB share (tree).
- * Connection to share is always built on top of the VC.
- */
-
-/*
- * This lock protects ss_flags
- */
-#define SMBS_ST_LOCK(ssp) smb_sl_lock(&(ssp)->ss_stlock)
-#define SMBS_ST_LOCKPTR(ssp) (&(ssp)->ss_stlock)
-#define SMBS_ST_UNLOCK(ssp) smb_sl_unlock(&(ssp)->ss_stlock)
-
-struct smb_share {
- struct smb_connobj obj;
- char * ss_name;
- u_short ss_tid; /* TID */
- int ss_type; /* share type */
- uid_t ss_uid; /* user id of connection */
- gid_t ss_grp; /* group of connection */
- mode_t ss_mode; /* access mode */
- int ss_vcgenid;
- char * ss_pass; /* password to a share, can be null */
- struct smb_slock ss_stlock;
- struct smb_cred *ss_cred; /* used in reconnect procedure */
-};
-
-#define ss_flags obj.co_flags
-
-#define CPTOVC(cp) ((struct smb_vc*)(cp))
-#define VCTOCP(vcp) (&(vcp)->obj)
-#define CPTOSS(cp) ((struct smb_share*)(cp))
-#define SSTOVC(ssp) CPTOVC(((ssp)->obj.co_parent))
-#define SSTOCP(ssp) (&(ssp)->obj)
-
-struct smb_vcspec {
- char * srvname;
- struct sockaddr*sap;
- struct sockaddr*lap;
- int flags;
- char * username;
- char * pass;
- char * domain;
- mode_t mode;
- mode_t rights;
- uid_t owner;
- gid_t group;
- char * localcs;
- char * servercs;
- struct smb_sharespec *shspec;
- struct smb_share *ssp; /* returned */
- /*
- * The rest is an internal data
- */
- struct smb_cred *scred;
-};
-
-struct smb_sharespec {
- char * name;
- char * pass;
- mode_t mode;
- mode_t rights;
- uid_t owner;
- gid_t group;
- int stype;
- /*
- * The rest is an internal data
- */
- struct smb_cred *scred;
-};
-
-/*
- * Session level functions
- */
-int smb_sm_init(void);
-int smb_sm_done(void);
-int smb_sm_lookup(struct smb_vcspec *vcspec,
- struct smb_sharespec *shspec, struct smb_cred *scred,
- struct smb_vc **vcpp);
-
-/*
- * Connection object
- */
-void smb_co_ref(struct smb_connobj *cp, struct proc *p);
-void smb_co_rele(struct smb_connobj *cp, struct smb_cred *scred);
-int smb_co_get(struct smb_connobj *cp, int flags, struct smb_cred *scred);
-void smb_co_put(struct smb_connobj *cp, struct smb_cred *scred);
-int smb_co_lock(struct smb_connobj *cp, int flags, struct proc *p);
-void smb_co_unlock(struct smb_connobj *cp, int flags, struct proc *p);
-
-/*
- * session level functions
- */
-int smb_vc_create(struct smb_vcspec *vcspec,
- struct smb_cred *scred, struct smb_vc **vcpp);
-int smb_vc_connect(struct smb_vc *vcp, struct smb_cred *scred);
-int smb_vc_access(struct smb_vc *vcp, struct smb_cred *scred, mode_t mode);
-int smb_vc_get(struct smb_vc *vcp, int flags, struct smb_cred *scred);
-void smb_vc_put(struct smb_vc *vcp, struct smb_cred *scred);
-void smb_vc_ref(struct smb_vc *vcp, struct proc *p);
-void smb_vc_rele(struct smb_vc *vcp, struct smb_cred *scred);
-int smb_vc_lock(struct smb_vc *vcp, int flags, struct proc *p);
-void smb_vc_unlock(struct smb_vc *vcp, int flags, struct proc *p);
-int smb_vc_lookupshare(struct smb_vc *vcp, struct smb_sharespec *shspec,
- struct smb_cred *scred, struct smb_share **sspp);
-const char * smb_vc_getpass(struct smb_vc *vcp);
-u_short smb_vc_nextmid(struct smb_vc *vcp);
-
-/*
- * share level functions
- */
-int smb_share_create(struct smb_vc *vcp, struct smb_sharespec *shspec,
- struct smb_cred *scred, struct smb_share **sspp);
-int smb_share_access(struct smb_share *ssp, struct smb_cred *scred, mode_t mode);
-void smb_share_ref(struct smb_share *ssp, struct proc *p);
-void smb_share_rele(struct smb_share *ssp, struct smb_cred *scred);
-int smb_share_get(struct smb_share *ssp, int flags, struct smb_cred *scred);
-void smb_share_put(struct smb_share *ssp, struct smb_cred *scred);
-int smb_share_lock(struct smb_share *ssp, int flags, struct proc *p);
-void smb_share_unlock(struct smb_share *ssp, int flags, struct proc *p);
-void smb_share_invalidate(struct smb_share *ssp);
-int smb_share_valid(struct smb_share *ssp);
-const char * smb_share_getpass(struct smb_share *ssp);
-
-/*
- * SMB protocol level functions
- */
-int smb_smb_negotiate(struct smb_vc *vcp, struct smb_cred *scred);
-int smb_smb_ssnsetup(struct smb_vc *vcp, struct smb_cred *scred);
-int smb_smb_ssnclose(struct smb_vc *vcp, struct smb_cred *scred);
-int smb_smb_treeconnect(struct smb_share *ssp, struct smb_cred *scred);
-int smb_smb_treedisconnect(struct smb_share *ssp, struct smb_cred *scred);
-int smb_read(struct smb_share *ssp, u_int16_t fid, struct uio *uio,
- struct smb_cred *scred);
-int smb_write(struct smb_share *ssp, u_int16_t fid, struct uio *uio,
- struct smb_cred *scred);
-int smb_smb_echo(struct smb_vc *vcp, struct smb_cred *scred);
-
-/*
- * smbiod thread
- */
-
-#define SMBIOD_EV_NEWRQ 0x0001
-#define SMBIOD_EV_SHUTDOWN 0x0002
-#define SMBIOD_EV_CONNECT 0x0003
-#define SMBIOD_EV_DISCONNECT 0x0004
-#define SMBIOD_EV_TREECONNECT 0x0005
-#define SMBIOD_EV_MASK 0x00ff
-#define SMBIOD_EV_SYNC 0x0100
-#define SMBIOD_EV_PROCESSING 0x0200
-
-struct smbiod_event {
- int ev_type;
- int ev_error;
- void * ev_ident;
- STAILQ_ENTRY(smbiod_event) ev_link;
-};
-
-#define SMBIOD_SHUTDOWN 0x0001
-
-struct smbiod {
- int iod_id;
- int iod_flags;
- enum smbiod_state iod_state;
- int iod_muxcnt; /* number of active outstanding requests */
- int iod_sleeptimo;
- struct smb_vc * iod_vc;
- struct smb_slock iod_rqlock; /* iod_rqlist, iod_muxwant */
- struct smb_rqhead iod_rqlist; /* list of outstanding requests */
- int iod_muxwant;
- struct proc * iod_p;
- struct smb_cred iod_scred;
- struct smb_slock iod_evlock; /* iod_evlist */
- STAILQ_HEAD(,smbiod_event) iod_evlist;
- struct timespec iod_lastrqsent;
- struct timespec iod_pingtimo;
-};
-
-int smb_iod_init(void);
-int smb_iod_done(void);
-int smb_iod_create(struct smb_vc *vcp);
-int smb_iod_destroy(struct smbiod *iod);
-int smb_iod_request(struct smbiod *iod, int event, void *ident);
-int smb_iod_addrq(struct smb_rq *rqp);
-int smb_iod_waitrq(struct smb_rq *rqp);
-int smb_iod_removerq(struct smb_rq *rqp);
-
-#endif /* _KERNEL */
diff --git a/sys/netsmb/smb_crypt.c b/sys/netsmb/smb_crypt.c
deleted file mode 100644
index e72a385304f9..000000000000
--- a/sys/netsmb/smb_crypt.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#include <sys/param.h>
-#include <sys/malloc.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/conf.h>
-#include <sys/proc.h>
-#include <sys/fcntl.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/sysctl.h>
-
-#include <sys/md4.h>
-#include <sys/iconv.h>
-
-#include <netsmb/smb.h>
-#include <netsmb/smb_conn.h>
-#include <netsmb/smb_subr.h>
-#include <netsmb/smb_dev.h>
-
-#include "opt_netsmb.h"
-
-#ifdef NETSMBCRYPTO
-
-#include <crypto/des/des.h>
-
-static u_char N8[] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
-
-
-static void
-smb_E(const u_char *key, u_char *data, u_char *dest)
-{
- des_key_schedule *ksp;
- u_char kk[8];
-
- kk[0] = key[0] & 0xfe;
- kk[1] = key[0] << 7 | (key[1] >> 1 & 0xfe);
- kk[2] = key[1] << 6 | (key[2] >> 2 & 0xfe);
- kk[3] = key[2] << 5 | (key[3] >> 3 & 0xfe);
- kk[4] = key[3] << 4 | (key[4] >> 4 & 0xfe);
- kk[5] = key[4] << 3 | (key[5] >> 5 & 0xfe);
- kk[6] = key[5] << 2 | (key[6] >> 6 & 0xfe);
- kk[7] = key[6] << 1;
- ksp = malloc(sizeof(des_key_schedule), M_SMBTEMP, M_WAITOK);
- des_set_key((C_Block*)kk, *ksp);
- des_ecb_encrypt((C_Block*)data, (C_Block*)dest, *ksp, 1);
- free(ksp, M_SMBTEMP);
-}
-#endif
-
-
-int
-smb_encrypt(const u_char *apwd, u_char *C8, u_char *RN)
-{
-#ifdef NETSMBCRYPTO
- u_char *p, *P14, *S21;
-
- p = malloc(14 + 21, M_SMBTEMP, M_WAITOK);
- bzero(p, 14 + 21);
- P14 = p;
- S21 = p + 14;
- bcopy(apwd, P14, min(14, strlen(apwd)));
- /*
- * S21 = concat(Ex(P14, N8), zeros(5));
- */
- smb_E(P14, N8, S21);
- smb_E(P14 + 7, N8, S21 + 8);
-
- smb_E(S21, C8, RN);
- smb_E(S21 + 7, C8, RN + 8);
- smb_E(S21 + 14, C8, RN + 16);
- free(p, M_SMBTEMP);
- return 0;
-#else
- SMBERROR("password encryption is not available\n");
- bzero(RN, 24);
- return EAUTH;
-#endif
-}
-
-int
-smb_ntencrypt(const u_char *apwd, u_char *C8, u_char *RN)
-{
-#ifdef NETSMBCRYPTO
- u_char S21[21];
- u_int16_t *unipwd;
- MD4_CTX *ctxp;
- int len;
-
- len = strlen(apwd);
- unipwd = malloc(len * sizeof(u_int16_t), M_SMBTEMP, M_WAITOK);
- /*
- * S21 = concat(MD4(U(apwd)), zeros(5));
- */
- smb_strtouni(unipwd, apwd);
- ctxp = malloc(sizeof(MD4_CTX), M_SMBTEMP, M_WAITOK);
- MD4Init(ctxp);
- MD4Update(ctxp, (u_char*)unipwd, len * sizeof(u_int16_t));
- free(unipwd, M_SMBTEMP);
- bzero(S21, 21);
- MD4Final(S21, ctxp);
- free(ctxp, M_SMBTEMP);
-
- smb_E(S21, C8, RN);
- smb_E(S21 + 7, C8, RN + 8);
- smb_E(S21 + 14, C8, RN + 16);
- return 0;
-#else
- SMBERROR("password encryption is not available\n");
- bzero(RN, 24);
- return EAUTH;
-#endif
-}
-
diff --git a/sys/netsmb/smb_dev.h b/sys/netsmb/smb_dev.h
deleted file mode 100644
index 6229834b82b7..000000000000
--- a/sys/netsmb/smb_dev.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _NETSMB_DEV_H_
-#define _NETSMB_DEV_H_
-
-#ifndef _KERNEL
-#include <sys/types.h>
-#endif
-#include <sys/ioccom.h>
-
-#include <netsmb/smb.h>
-
-#define NSMB_NAME "nsmb"
-#define NSMB_MAJOR 144
-
-#define NSMB_VERMAJ 1
-#define NSMB_VERMIN 3006
-#define NSMB_VERSION (NSMB_VERMAJ * 100000 + NSMB_VERMIN)
-
-#define NSMBFL_OPEN 0x0001
-
-#define SMBVOPT_CREATE 0x0001 /* create object if necessary */
-#define SMBVOPT_PRIVATE 0x0002 /* connection should be private */
-#define SMBVOPT_SINGLESHARE 0x0004 /* keep only one share at this VC */
-#define SMBVOPT_PERMANENT 0x0010 /* object will keep last reference */
-
-#define SMBSOPT_CREATE 0x0001 /* create object if necessary */
-#define SMBSOPT_PERMANENT 0x0010 /* object will keep last reference */
-
-/*
- * SMBIOC_LOOKUP flags
- */
-#define SMBLK_CREATE 0x0001
-
-struct smbioc_ossn {
- int ioc_opt;
- int ioc_svlen; /* size of ioc_server address */
- struct sockaddr*ioc_server;
- int ioc_lolen; /* size of ioc_local address */
- struct sockaddr*ioc_local;
- char ioc_srvname[SMB_MAXSRVNAMELEN + 1];
- int ioc_timeout;
- int ioc_retrycount; /* number of retries before giveup */
- char ioc_localcs[16];/* local charset */
- char ioc_servercs[16];/* server charset */
- char ioc_user[SMB_MAXUSERNAMELEN + 1];
- char ioc_workgroup[SMB_MAXUSERNAMELEN + 1];
- char ioc_password[SMB_MAXPASSWORDLEN + 1];
- uid_t ioc_owner; /* proposed owner */
- gid_t ioc_group; /* proposed group */
- mode_t ioc_mode; /* desired access mode */
- mode_t ioc_rights; /* SMBM_* */
-};
-
-struct smbioc_oshare {
- int ioc_opt;
- int ioc_stype; /* share type */
- char ioc_share[SMB_MAXSHARENAMELEN + 1];
- char ioc_password[SMB_MAXPASSWORDLEN + 1];
- uid_t ioc_owner; /* proposed owner of share */
- gid_t ioc_group; /* proposed group of share */
- mode_t ioc_mode; /* desired access mode to share */
- mode_t ioc_rights; /* SMBM_* */
-};
-
-struct smbioc_rq {
- u_char ioc_cmd;
- u_char ioc_twc;
- void * ioc_twords;
- u_short ioc_tbc;
- void * ioc_tbytes;
- int ioc_rpbufsz;
- char * ioc_rpbuf;
- u_char ioc_rwc;
- u_short ioc_rbc;
- u_int8_t ioc_errclass;
- u_int16_t ioc_serror;
- u_int32_t ioc_error;
-};
-
-struct smbioc_t2rq {
- u_int16_t ioc_setup[3];
- int ioc_setupcnt;
- char * ioc_name;
- u_short ioc_tparamcnt;
- void * ioc_tparam;
- u_short ioc_tdatacnt;
- void * ioc_tdata;
- u_short ioc_rparamcnt;
- void * ioc_rparam;
- u_short ioc_rdatacnt;
- void * ioc_rdata;
-};
-
-struct smbioc_flags {
- int ioc_level; /* 0 - session, 1 - share */
- int ioc_mask;
- int ioc_flags;
-};
-
-struct smbioc_lookup {
- int ioc_level;
- int ioc_flags;
- struct smbioc_ossn ioc_ssn;
- struct smbioc_oshare ioc_sh;
-};
-
-struct smbioc_rw {
- smbfh ioc_fh;
- char * ioc_base;
- off_t ioc_offset;
- int ioc_cnt;
-};
-
-/*
- * Device IOCTLs
- */
-#define SMBIOC_OPENSESSION _IOW('n', 100, struct smbioc_ossn)
-#define SMBIOC_OPENSHARE _IOW('n', 101, struct smbioc_oshare)
-#define SMBIOC_REQUEST _IOWR('n', 102, struct smbioc_rq)
-#define SMBIOC_T2RQ _IOWR('n', 103, struct smbioc_t2rq)
-#define SMBIOC_SETFLAGS _IOW('n', 104, struct smbioc_flags)
-#define SMBIOC_LOOKUP _IOW('n', 106, struct smbioc_lookup)
-#define SMBIOC_READ _IOWR('n', 107, struct smbioc_rw)
-#define SMBIOC_WRITE _IOWR('n', 108, struct smbioc_rw)
-
-#ifdef _KERNEL
-
-#define SMBST_CONNECTED 1
-
-STAILQ_HEAD(smbrqh, smb_rq);
-
-struct smb_dev {
- int sd_opened;
- int sd_level;
- struct smb_vc * sd_vc; /* reference to VC */
- struct smb_share *sd_share; /* reference to share if any */
- int sd_poll;
- int sd_seq;
-/* struct ifqueue sd_rdqueue;
- struct ifqueue sd_wrqueue;
- struct selinfo sd_pollinfo;
- struct smbrqh sd_rqlist;
- struct smbrqh sd_rplist;
- struct ucred *sd_owner;*/
- int sd_flags;
-};
-
-struct smb_cred;
-/*
- * Compound user interface
- */
-int smb_usr_lookup(struct smbioc_lookup *dp, struct smb_cred *scred,
- struct smb_vc **vcpp, struct smb_share **sspp);
-int smb_usr_opensession(struct smbioc_ossn *data,
- struct smb_cred *scred, struct smb_vc **vcpp);
-int smb_usr_openshare(struct smb_vc *vcp, struct smbioc_oshare *data,
- struct smb_cred *scred, struct smb_share **sspp);
-int smb_usr_simplerequest(struct smb_share *ssp, struct smbioc_rq *data,
- struct smb_cred *scred);
-int smb_usr_t2request(struct smb_share *ssp, struct smbioc_t2rq *data,
- struct smb_cred *scred);
-int smb_dev2share(int fd, int mode, struct smb_cred *scred,
- struct smb_share **sspp);
-
-
-#endif /* _KERNEL */
-
-#endif /* _NETSMB_DEV_H_ */
diff --git a/sys/netsmb/smb_iod.c b/sys/netsmb/smb_iod.c
deleted file mode 100644
index 805330389d08..000000000000
--- a/sys/netsmb/smb_iod.c
+++ /dev/null
@@ -1,709 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/kernel.h>
-#include <sys/kthread.h>
-#include <sys/malloc.h>
-#include <sys/mbuf.h>
-#include <sys/unistd.h>
-
-#include <netsmb/smb.h>
-#include <netsmb/smb_conn.h>
-#include <netsmb/smb_rq.h>
-#include <netsmb/smb_tran.h>
-#include <netsmb/smb_trantcp.h>
-
-
-#define SMBIOD_SLEEP_TIMO 2
-#define SMBIOD_PING_TIMO 60 /* seconds */
-
-#define SMB_IOD_EVLOCKPTR(iod) (&((iod)->iod_evlock))
-#define SMB_IOD_EVLOCK(iod) smb_sl_lock(&((iod)->iod_evlock))
-#define SMB_IOD_EVUNLOCK(iod) smb_sl_unlock(&((iod)->iod_evlock))
-
-#define SMB_IOD_RQLOCKPTR(iod) (&((iod)->iod_rqlock))
-#define SMB_IOD_RQLOCK(iod) smb_sl_lock(&((iod)->iod_rqlock))
-#define SMB_IOD_RQUNLOCK(iod) smb_sl_unlock(&((iod)->iod_rqlock))
-
-#define smb_iod_wakeup(iod) wakeup(&(iod)->iod_flags)
-
-
-static MALLOC_DEFINE(M_SMBIOD, "SMBIOD", "SMB network io daemon");
-
-static int smb_iod_next;
-
-static int smb_iod_sendall(struct smbiod *iod);
-static int smb_iod_disconnect(struct smbiod *iod);
-static void smb_iod_thread(void *);
-
-static __inline void
-smb_iod_rqprocessed(struct smb_rq *rqp, int error)
-{
- SMBRQ_SLOCK(rqp);
- rqp->sr_lerror = error;
- rqp->sr_rpgen++;
- rqp->sr_state = SMBRQ_NOTIFIED;
- wakeup(&rqp->sr_state);
- SMBRQ_SUNLOCK(rqp);
-}
-
-static void
-smb_iod_invrq(struct smbiod *iod)
-{
- struct smb_rq *rqp;
-
- /*
- * Invalidate all outstanding requests for this connection
- */
- SMB_IOD_RQLOCK(iod);
- TAILQ_FOREACH(rqp, &iod->iod_rqlist, sr_link) {
- if (rqp->sr_flags & SMBR_INTERNAL)
- SMBRQ_SUNLOCK(rqp);
- rqp->sr_flags |= SMBR_RESTART;
- smb_iod_rqprocessed(rqp, ENOTCONN);
- }
- SMB_IOD_RQUNLOCK(iod);
-}
-
-static void
-smb_iod_closetran(struct smbiod *iod)
-{
- struct smb_vc *vcp = iod->iod_vc;
- struct proc *p = iod->iod_p;
-
- if (vcp->vc_tdata == NULL)
- return;
- SMB_TRAN_DISCONNECT(vcp, p);
- SMB_TRAN_DONE(vcp, p);
- vcp->vc_tdata = NULL;
-}
-
-static void
-smb_iod_dead(struct smbiod *iod)
-{
- iod->iod_state = SMBIOD_ST_DEAD;
- smb_iod_closetran(iod);
- smb_iod_invrq(iod);
-}
-
-static int
-smb_iod_connect(struct smbiod *iod)
-{
- struct smb_vc *vcp = iod->iod_vc;
- struct proc *p = iod->iod_p;
- int error;
-
- SMBIODEBUG("%d\n", iod->iod_state);
- switch(iod->iod_state) {
- case SMBIOD_ST_VCACTIVE:
- SMBERROR("called for already opened connection\n");
- return EISCONN;
- case SMBIOD_ST_DEAD:
- return ENOTCONN; /* XXX: last error code ? */
- default:
- break;
- }
- vcp->vc_genid++;
- error = 0;
- itry {
- ithrow(SMB_TRAN_CREATE(vcp, p));
- SMBIODEBUG("tcreate\n");
- if (vcp->vc_laddr) {
- ithrow(SMB_TRAN_BIND(vcp, vcp->vc_laddr, p));
- }
- SMBIODEBUG("tbind\n");
- ithrow(SMB_TRAN_CONNECT(vcp, vcp->vc_paddr, p));
- SMB_TRAN_SETPARAM(vcp, SMBTP_SELECTID, &iod->iod_flags);
- iod->iod_state = SMBIOD_ST_TRANACTIVE;
- SMBIODEBUG("tconnect\n");
-/* vcp->vc_mid = 0;*/
- ithrow(smb_smb_negotiate(vcp, &iod->iod_scred));
- SMBIODEBUG("snegotiate\n");
- ithrow(smb_smb_ssnsetup(vcp, &iod->iod_scred));
- iod->iod_state = SMBIOD_ST_VCACTIVE;
- SMBIODEBUG("completed\n");
- smb_iod_invrq(iod);
- } icatch(error) {
- smb_iod_dead(iod);
- } ifinally {
- } iendtry;
- return error;
-}
-
-static int
-smb_iod_disconnect(struct smbiod *iod)
-{
- struct smb_vc *vcp = iod->iod_vc;
-
- SMBIODEBUG("\n");
- if (iod->iod_state == SMBIOD_ST_VCACTIVE) {
- smb_smb_ssnclose(vcp, &iod->iod_scred);
- iod->iod_state = SMBIOD_ST_TRANACTIVE;
- }
- vcp->vc_smbuid = SMB_UID_UNKNOWN;
- smb_iod_closetran(iod);
- iod->iod_state = SMBIOD_ST_NOTCONN;
- return 0;
-}
-
-static int
-smb_iod_treeconnect(struct smbiod *iod, struct smb_share *ssp)
-{
- int error;
-
- if (iod->iod_state != SMBIOD_ST_VCACTIVE) {
- if (iod->iod_state != SMBIOD_ST_DEAD)
- return ENOTCONN;
- iod->iod_state = SMBIOD_ST_RECONNECT;
- error = smb_iod_connect(iod);
- if (error)
- return error;
- }
- SMBIODEBUG("tree reconnect\n");
- SMBS_ST_LOCK(ssp);
- ssp->ss_flags |= SMBS_RECONNECTING;
- SMBS_ST_UNLOCK(ssp);
- error = smb_smb_treeconnect(ssp, &iod->iod_scred);
- SMBS_ST_LOCK(ssp);
- ssp->ss_flags &= ~SMBS_RECONNECTING;
- SMBS_ST_UNLOCK(ssp);
- wakeup(&ssp->ss_vcgenid);
- return error;
-}
-
-static int
-smb_iod_sendrq(struct smbiod *iod, struct smb_rq *rqp)
-{
- struct proc *p = iod->iod_p;
- struct smb_vc *vcp = iod->iod_vc;
- struct smb_share *ssp = rqp->sr_share;
- struct mbuf *m;
- int error;
-
- SMBIODEBUG("iod_state = %d\n", iod->iod_state);
- switch (iod->iod_state) {
- case SMBIOD_ST_NOTCONN:
- smb_iod_rqprocessed(rqp, ENOTCONN);
- return 0;
- case SMBIOD_ST_DEAD:
- iod->iod_state = SMBIOD_ST_RECONNECT;
- return 0;
- case SMBIOD_ST_RECONNECT:
- return 0;
- default:
- break;
- }
- if (rqp->sr_sendcnt == 0) {
-#ifdef movedtoanotherplace
- if (vcp->vc_maxmux != 0 && iod->iod_muxcnt >= vcp->vc_maxmux)
- return 0;
-#endif
- *rqp->sr_rqtid = htoles(ssp ? ssp->ss_tid : SMB_TID_UNKNOWN);
- *rqp->sr_rquid = htoles(vcp ? vcp->vc_smbuid : 0);
- mb_fixhdr(&rqp->sr_rq);
- }
- if (rqp->sr_sendcnt++ > 5) {
- rqp->sr_flags |= SMBR_RESTART;
- smb_iod_rqprocessed(rqp, rqp->sr_lerror);
- /*
- * If all attempts to send a request failed, then
- * something is seriously hosed.
- */
- return ENOTCONN;
- }
- SMBSDEBUG("M:%04x, P:%04x, U:%04x, T:%04x\n", rqp->sr_mid, 0, 0, 0);
- m_dumpm(rqp->sr_rq.mb_top);
- m = m_copym(rqp->sr_rq.mb_top, 0, M_COPYALL, M_WAIT);
- error = rqp->sr_lerror = m ? SMB_TRAN_SEND(vcp, m, p) : ENOBUFS;
- if (error == 0) {
- getnanotime(&rqp->sr_timesent);
- iod->iod_lastrqsent = rqp->sr_timesent;
- rqp->sr_flags |= SMBR_SENT;
- rqp->sr_state = SMBRQ_SENT;
- return 0;
- }
- /*
- * Check for fatal errors
- */
- if (SMB_TRAN_FATAL(vcp, error)) {
- /*
- * No further attempts should be made
- */
- return ENOTCONN;
- }
- if (smb_rq_intr(rqp))
- smb_iod_rqprocessed(rqp, EINTR);
- return 0;
-}
-
-/*
- * Process incoming packets
- */
-static int
-smb_iod_recvall(struct smbiod *iod)
-{
- struct smb_vc *vcp = iod->iod_vc;
- struct proc *p = iod->iod_p;
- struct smb_rq *rqp;
- struct mbuf *m;
- u_char *hp;
- u_short mid;
- int error;
-
- switch (iod->iod_state) {
- case SMBIOD_ST_NOTCONN:
- case SMBIOD_ST_DEAD:
- case SMBIOD_ST_RECONNECT:
- return 0;
- default:
- break;
- }
- for (;;) {
- m = NULL;
- error = SMB_TRAN_RECV(vcp, &m, p);
- if (error == EWOULDBLOCK)
- break;
- if (SMB_TRAN_FATAL(vcp, error)) {
- smb_iod_dead(iod);
- break;
- }
- if (error)
- break;
- if (m == NULL) {
- SMBERROR("tran return NULL without error\n");
- error = EPIPE;
- continue;
- }
- m = m_pullup(m, SMB_HDRLEN);
- if (m == NULL)
- continue; /* wait for a good packet */
- /*
- * Now we got an entire and possibly invalid SMB packet.
- * Be careful while parsing it.
- */
- m_dumpm(m);
- hp = mtod(m, u_char*);
- if (bcmp(hp, SMB_SIGNATURE, SMB_SIGLEN) != 0) {
- m_freem(m);
- continue;
- }
- mid = SMB_HDRMID(hp);
- SMBSDEBUG("mid %04x\n", (u_int)mid);
- SMB_IOD_RQLOCK(iod);
- TAILQ_FOREACH(rqp, &iod->iod_rqlist, sr_link) {
- if (rqp->sr_mid != mid)
- continue;
- SMBRQ_SLOCK(rqp);
- if (rqp->sr_rp.md_top == NULL) {
- md_initm(&rqp->sr_rp, m);
- } else {
- if (rqp->sr_flags & SMBR_MULTIPACKET) {
- md_append_record(&rqp->sr_rp, m);
- } else {
- SMBRQ_SUNLOCK(rqp);
- SMBERROR("duplicate response %d (ignored)\n", mid);
- break;
- }
- }
- SMBRQ_SUNLOCK(rqp);
- smb_iod_rqprocessed(rqp, 0);
- break;
- }
- SMB_IOD_RQUNLOCK(iod);
- if (rqp == NULL) {
- SMBERROR("drop resp with mid %d\n", (u_int)mid);
-/* smb_printrqlist(vcp);*/
- m_freem(m);
- }
- }
- /*
- * check for interrupts
- */
- SMB_IOD_RQLOCK(iod);
- TAILQ_FOREACH(rqp, &iod->iod_rqlist, sr_link) {
- if (smb_proc_intr(rqp->sr_cred->scr_p)) {
- smb_iod_rqprocessed(rqp, EINTR);
- }
- }
- SMB_IOD_RQUNLOCK(iod);
- return 0;
-}
-
-int
-smb_iod_request(struct smbiod *iod, int event, void *ident)
-{
- struct smbiod_event *evp;
- int error;
-
- SMBIODEBUG("\n");
- evp = smb_zmalloc(sizeof(*evp), M_SMBIOD, M_WAITOK);
- evp->ev_type = event;
- evp->ev_ident = ident;
- SMB_IOD_EVLOCK(iod);
- STAILQ_INSERT_TAIL(&iod->iod_evlist, evp, ev_link);
- if ((event & SMBIOD_EV_SYNC) == 0) {
- SMB_IOD_EVUNLOCK(iod);
- smb_iod_wakeup(iod);
- return 0;
- }
- smb_iod_wakeup(iod);
- msleep(evp, SMB_IOD_EVLOCKPTR(iod), PWAIT | PDROP, "90evw", 0);
- error = evp->ev_error;
- free(evp, M_SMBIOD);
- return error;
-}
-
-/*
- * Place request in the queue.
- * Request from smbiod have a high priority.
- */
-int
-smb_iod_addrq(struct smb_rq *rqp)
-{
- struct smb_vc *vcp = rqp->sr_vc;
- struct smbiod *iod = vcp->vc_iod;
- int error;
-
- SMBIODEBUG("\n");
- if (rqp->sr_cred->scr_p == iod->iod_p) {
- rqp->sr_flags |= SMBR_INTERNAL;
- SMB_IOD_RQLOCK(iod);
- TAILQ_INSERT_HEAD(&iod->iod_rqlist, rqp, sr_link);
- SMB_IOD_RQUNLOCK(iod);
- for (;;) {
- if (smb_iod_sendrq(iod, rqp) != 0) {
- smb_iod_dead(iod);
- break;
- }
- /*
- * we don't need to lock state field here
- */
- if (rqp->sr_state != SMBRQ_NOTSENT)
- break;
- tsleep(&iod->iod_flags, PWAIT, "90sndw", hz);
- }
- if (rqp->sr_lerror)
- smb_iod_removerq(rqp);
- return rqp->sr_lerror;
- }
-
- switch (iod->iod_state) {
- case SMBIOD_ST_NOTCONN:
- return ENOTCONN;
- case SMBIOD_ST_DEAD:
- error = smb_iod_request(vcp->vc_iod, SMBIOD_EV_CONNECT | SMBIOD_EV_SYNC, NULL);
- if (error)
- return error;
- return EXDEV;
- default:
- break;
- }
-
- SMB_IOD_RQLOCK(iod);
- for (;;) {
- if (vcp->vc_maxmux == 0) {
- SMBERROR("maxmux == 0\n");
- break;
- }
- if (iod->iod_muxcnt < vcp->vc_maxmux)
- break;
- iod->iod_muxwant++;
- msleep(&iod->iod_muxwant, SMB_IOD_RQLOCKPTR(iod),
- PWAIT, "90mux", 0);
- }
- iod->iod_muxcnt++;
- TAILQ_INSERT_TAIL(&iod->iod_rqlist, rqp, sr_link);
- SMB_IOD_RQUNLOCK(iod);
- smb_iod_wakeup(iod);
- return 0;
-}
-
-int
-smb_iod_removerq(struct smb_rq *rqp)
-{
- struct smb_vc *vcp = rqp->sr_vc;
- struct smbiod *iod = vcp->vc_iod;
-
- SMBIODEBUG("\n");
- if (rqp->sr_flags & SMBR_INTERNAL) {
- SMB_IOD_RQLOCK(iod);
- TAILQ_REMOVE(&iod->iod_rqlist, rqp, sr_link);
- SMB_IOD_RQUNLOCK(iod);
- return 0;
- }
- SMB_IOD_RQLOCK(iod);
- while (rqp->sr_flags & SMBR_XLOCK) {
- rqp->sr_flags |= SMBR_XLOCKWANT;
- msleep(rqp, SMB_IOD_RQLOCKPTR(iod), PWAIT, "90xrm", 0);
- }
- TAILQ_REMOVE(&iod->iod_rqlist, rqp, sr_link);
- iod->iod_muxcnt--;
- if (iod->iod_muxwant) {
- iod->iod_muxwant--;
- wakeup(&iod->iod_muxwant);
- }
- SMB_IOD_RQUNLOCK(iod);
- return 0;
-}
-
-int
-smb_iod_waitrq(struct smb_rq *rqp)
-{
- struct smbiod *iod = rqp->sr_vc->vc_iod;
- int error;
-
- SMBIODEBUG("\n");
- if (rqp->sr_flags & SMBR_INTERNAL) {
- for (;;) {
- smb_iod_sendall(iod);
- smb_iod_recvall(iod);
- if (rqp->sr_rpgen != rqp->sr_rplast)
- break;
- tsleep(&iod->iod_flags, PWAIT, "90irq", hz);
- }
- smb_iod_removerq(rqp);
- return rqp->sr_lerror;
-
- }
- SMBRQ_SLOCK(rqp);
- if (rqp->sr_rpgen == rqp->sr_rplast)
- msleep(&rqp->sr_state, SMBRQ_SLOCKPTR(rqp), PWAIT, "90wrq", 0);
- rqp->sr_rplast++;
- SMBRQ_SUNLOCK(rqp);
- error = rqp->sr_lerror;
- if (rqp->sr_flags & SMBR_MULTIPACKET) {
- /*
- * If request should stay in the list, then reinsert it
- * at the end of queue so other waiters have chance to concur
- */
- SMB_IOD_RQLOCK(iod);
- TAILQ_REMOVE(&iod->iod_rqlist, rqp, sr_link);
- TAILQ_INSERT_TAIL(&iod->iod_rqlist, rqp, sr_link);
- SMB_IOD_RQUNLOCK(iod);
- } else
- smb_iod_removerq(rqp);
- return error;
-}
-
-
-static int
-smb_iod_sendall(struct smbiod *iod)
-{
- struct smb_vc *vcp = iod->iod_vc;
- struct smb_rq *rqp;
- struct timespec ts, tstimeout;
- int herror;
-
- herror = 0;
- /*
- * Loop through the list of requests and send them if possible
- */
- SMB_IOD_RQLOCK(iod);
- TAILQ_FOREACH(rqp, &iod->iod_rqlist, sr_link) {
- switch (rqp->sr_state) {
- case SMBRQ_NOTSENT:
- rqp->sr_flags |= SMBR_XLOCK;
- SMB_IOD_RQUNLOCK(iod);
- herror = smb_iod_sendrq(iod, rqp);
- SMB_IOD_RQLOCK(iod);
- rqp->sr_flags &= ~SMBR_XLOCK;
- if (rqp->sr_flags & SMBR_XLOCKWANT) {
- rqp->sr_flags &= ~SMBR_XLOCKWANT;
- wakeup(rqp);
- }
- break;
- case SMBRQ_SENT:
- SMB_TRAN_GETPARAM(vcp, SMBTP_TIMEOUT, &tstimeout);
- timespecadd(&tstimeout, &tstimeout);
- getnanotime(&ts);
- timespecsub(&ts, &tstimeout);
- if (timespeccmp(&ts, &rqp->sr_timesent, >)) {
- smb_iod_rqprocessed(rqp, ETIMEDOUT);
- }
- break;
- default:
- }
- if (herror)
- break;
- }
- SMB_IOD_RQUNLOCK(iod);
- if (herror == ENOTCONN)
- smb_iod_dead(iod);
- return 0;
-}
-
-/*
- * "main" function for smbiod daemon
- */
-static __inline void
-smb_iod_main(struct smbiod *iod)
-{
-/* struct smb_vc *vcp = iod->iod_vc;*/
- struct smbiod_event *evp;
-/* struct timespec tsnow;*/
- int error;
-
- SMBIODEBUG("\n");
- error = 0;
-
- /*
- * Check all interesting events
- */
- for (;;) {
- SMB_IOD_EVLOCK(iod);
- evp = STAILQ_FIRST(&iod->iod_evlist);
- if (evp == NULL) {
- SMB_IOD_EVUNLOCK(iod);
- break;
- }
- STAILQ_REMOVE_HEAD(&iod->iod_evlist, ev_link);
- evp->ev_type |= SMBIOD_EV_PROCESSING;
- SMB_IOD_EVUNLOCK(iod);
- switch (evp->ev_type & SMBIOD_EV_MASK) {
- case SMBIOD_EV_CONNECT:
- iod->iod_state = SMBIOD_ST_RECONNECT;
- evp->ev_error = smb_iod_connect(iod);
- break;
- case SMBIOD_EV_DISCONNECT:
- evp->ev_error = smb_iod_disconnect(iod);
- break;
- case SMBIOD_EV_TREECONNECT:
- evp->ev_error = smb_iod_treeconnect(iod, evp->ev_ident);
- break;
- case SMBIOD_EV_SHUTDOWN:
- iod->iod_flags |= SMBIOD_SHUTDOWN;
- break;
- case SMBIOD_EV_NEWRQ:
- break;
- }
- if (evp->ev_type & SMBIOD_EV_SYNC) {
- SMB_IOD_EVLOCK(iod);
- wakeup(evp);
- SMB_IOD_EVUNLOCK(iod);
- } else
- free(evp, M_SMBIOD);
- }
-#if 0
- if (iod->iod_state == SMBIOD_ST_VCACTIVE) {
- getnanotime(&tsnow);
- timespecsub(&tsnow, &iod->iod_pingtimo);
- if (timespeccmp(&tsnow, &iod->iod_lastrqsent, >)) {
- smb_smb_echo(vcp, &iod->iod_scred);
- }
- }
-#endif
- smb_iod_sendall(iod);
- smb_iod_recvall(iod);
- return;
-}
-
-#ifndef FB_CURRENT
-#define kthread_create_compat kthread_create2
-#else
-#define kthread_create_compat kthread_create
-#endif
-
-
-void
-smb_iod_thread(void *arg)
-{
- struct smbiod *iod = arg;
-
- mtx_lock(&Giant);
- smb_makescred(&iod->iod_scred, iod->iod_p, NULL);
- while ((iod->iod_flags & SMBIOD_SHUTDOWN) == 0) {
- smb_iod_main(iod);
- SMBIODEBUG("going to sleep for %d ticks\n", iod->iod_sleeptimo);
-/* mtx_unlock(&Giant, MTX_DEF);*/
- if (iod->iod_flags & SMBIOD_SHUTDOWN)
- break;
- tsleep(&iod->iod_flags, PWAIT, "90idle", iod->iod_sleeptimo);
- }
-/* mtx_lock(&Giant, MTX_DEF);*/
- kthread_exit(0);
-}
-
-int
-smb_iod_create(struct smb_vc *vcp)
-{
- struct smbiod *iod;
- int error;
-
- iod = smb_zmalloc(sizeof(*iod), M_SMBIOD, M_WAITOK);
- iod->iod_id = smb_iod_next++;
- iod->iod_state = SMBIOD_ST_NOTCONN;
- iod->iod_vc = vcp;
- iod->iod_sleeptimo = hz * SMBIOD_SLEEP_TIMO;
- iod->iod_pingtimo.tv_sec = SMBIOD_PING_TIMO;
- getnanotime(&iod->iod_lastrqsent);
- vcp->vc_iod = iod;
- smb_sl_init(&iod->iod_rqlock, "90rql");
- TAILQ_INIT(&iod->iod_rqlist);
- smb_sl_init(&iod->iod_evlock, "90evl");
- STAILQ_INIT(&iod->iod_evlist);
- error = kthread_create_compat(smb_iod_thread, iod, &iod->iod_p,
- RFNOWAIT, "smbiod%d", iod->iod_id);
- if (error) {
- SMBERROR("can't start smbiod: %d", error);
- free(iod, M_SMBIOD);
- return error;
- }
- return 0;
-}
-
-int
-smb_iod_destroy(struct smbiod *iod)
-{
- smb_iod_request(iod, SMBIOD_EV_SHUTDOWN | SMBIOD_EV_SYNC, NULL);
- mtx_destroy(&iod->iod_rqlock);
- mtx_destroy(&iod->iod_evlock);
- free(iod, M_SMBIOD);
- return 0;
-}
-
-int
-smb_iod_init(void)
-{
- return 0;
-}
-
-int
-smb_iod_done(void)
-{
- return 0;
-}
-
diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c
deleted file mode 100644
index 9b105bc2b164..000000000000
--- a/sys/netsmb/smb_rq.c
+++ /dev/null
@@ -1,752 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/proc.h>
-#include <sys/lock.h>
-#include <sys/sysctl.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/mbuf.h>
-
-#include <netsmb/smb.h>
-#include <netsmb/smb_conn.h>
-#include <netsmb/smb_rq.h>
-#include <netsmb/smb_subr.h>
-#include <netsmb/smb_tran.h>
-
-MALLOC_DEFINE(M_SMBRQ, "SMBRQ", "SMB request");
-
-MODULE_DEPEND(netsmb, libmchain, 1, 1, 1);
-
-static int smb_rq_reply(struct smb_rq *rqp);
-static int smb_rq_enqueue(struct smb_rq *rqp);
-static int smb_rq_getenv(struct smb_connobj *layer,
- struct smb_vc **vcpp, struct smb_share **sspp);
-static int smb_rq_new(struct smb_rq *rqp, u_char cmd);
-static int smb_t2_reply(struct smb_t2rq *t2p);
-
-int
-smb_rq_alloc(struct smb_connobj *layer, u_char cmd, struct smb_cred *scred,
- struct smb_rq **rqpp)
-{
- struct smb_rq *rqp;
- int error;
-
- MALLOC(rqp, struct smb_rq *, sizeof(*rqp), M_SMBRQ, M_WAITOK);
- if (rqp == NULL)
- return ENOMEM;
- error = smb_rq_init(rqp, layer, cmd, scred);
- rqp->sr_flags |= SMBR_ALLOCED;
- if (error) {
- smb_rq_done(rqp);
- return error;
- }
- *rqpp = rqp;
- return 0;
-}
-
-static char tzero[12];
-
-int
-smb_rq_init(struct smb_rq *rqp, struct smb_connobj *layer, u_char cmd,
- struct smb_cred *scred)
-{
- int error;
-
- bzero(rqp, sizeof(*rqp));
- smb_sl_init(&rqp->sr_slock, "srslock");
- error = smb_rq_getenv(layer, &rqp->sr_vc, &rqp->sr_share);
- if (error)
- return error;
- error = smb_vc_access(rqp->sr_vc, scred, SMBM_EXEC);
- if (error)
- return error;
- if (rqp->sr_share) {
- error = smb_share_access(rqp->sr_share, scred, SMBM_EXEC);
- if (error)
- return error;
- }
- rqp->sr_cred = scred;
- rqp->sr_mid = smb_vc_nextmid(rqp->sr_vc);
- return smb_rq_new(rqp, cmd);
-}
-
-static int
-smb_rq_new(struct smb_rq *rqp, u_char cmd)
-{
- struct smb_vc *vcp = rqp->sr_vc;
- struct mbchain *mbp = &rqp->sr_rq;
- int error;
-
- rqp->sr_sendcnt = 0;
- mb_done(mbp);
- md_done(&rqp->sr_rp);
- error = mb_init(mbp);
- if (error)
- return error;
- mb_put_mem(mbp, SMB_SIGNATURE, SMB_SIGLEN, MB_MSYSTEM);
- mb_put_uint8(mbp, cmd);
- mb_put_uint32le(mbp, 0); /* DosError */
- mb_put_uint8(mbp, vcp->vc_hflags);
- mb_put_uint16le(mbp, vcp->vc_hflags2);
- mb_put_mem(mbp, tzero, 12, MB_MSYSTEM);
- rqp->sr_rqtid = (u_int16_t*)mb_reserve(mbp, sizeof(u_int16_t));
- mb_put_uint16le(mbp, 1 /*scred->sc_p->p_pid & 0xffff*/);
- rqp->sr_rquid = (u_int16_t*)mb_reserve(mbp, sizeof(u_int16_t));
- mb_put_uint16le(mbp, rqp->sr_mid);
- return 0;
-}
-
-void
-smb_rq_done(struct smb_rq *rqp)
-{
- mb_done(&rqp->sr_rq);
- md_done(&rqp->sr_rp);
- smb_sl_destroy(&rqp->sr_slock);
- if (rqp->sr_flags & SMBR_ALLOCED)
- free(rqp, M_SMBRQ);
-}
-
-/*
- * Simple request-reply exchange
- */
-int
-smb_rq_simple(struct smb_rq *rqp)
-{
- struct smb_vc *vcp = rqp->sr_vc;
- int error = EINVAL, i;
-
- for (i = 0; i < SMB_MAXRCN; i++) {
- rqp->sr_flags &= ~SMBR_RESTART;
- rqp->sr_timo = vcp->vc_timo;
- rqp->sr_state = SMBRQ_NOTSENT;
- error = smb_rq_enqueue(rqp);
- if (error)
- return error;
- error = smb_rq_reply(rqp);
- if (error == 0)
- break;
- if ((rqp->sr_flags & (SMBR_RESTART | SMBR_NORESTART)) != SMBR_RESTART)
- break;
- }
- return error;
-}
-
-static int
-smb_rq_enqueue(struct smb_rq *rqp)
-{
- struct smb_share *ssp = rqp->sr_share;
- int error;
-
- if (ssp == NULL || rqp->sr_cred == &rqp->sr_vc->vc_iod->iod_scred) {
- return smb_iod_addrq(rqp);
- }
- for (;;) {
- SMBS_ST_LOCK(ssp);
- if (ssp->ss_flags & SMBS_RECONNECTING) {
- msleep(&ssp->ss_vcgenid, SMBS_ST_LOCKPTR(ssp),
- PWAIT | PDROP, "90trcn", hz);
- if (smb_proc_intr(rqp->sr_cred->scr_p))
- return EINTR;
- continue;
- }
- if (smb_share_valid(ssp) || (ssp->ss_flags & SMBS_CONNECTED) == 0) {
- SMBS_ST_UNLOCK(ssp);
- } else {
- SMBS_ST_UNLOCK(ssp);
- error = smb_iod_request(rqp->sr_vc->vc_iod,
- SMBIOD_EV_TREECONNECT | SMBIOD_EV_SYNC, ssp);
- if (error)
- return error;
- }
- error = smb_iod_addrq(rqp);
- if (error != EXDEV)
- break;
- }
- return error;
-}
-
-void
-smb_rq_wstart(struct smb_rq *rqp)
-{
- rqp->sr_wcount = mb_reserve(&rqp->sr_rq, sizeof(u_int8_t));
- rqp->sr_rq.mb_count = 0;
-}
-
-void
-smb_rq_wend(struct smb_rq *rqp)
-{
- if (rqp->sr_wcount == NULL) {
- SMBERROR("no wcount\n"); /* actually panic */
- return;
- }
- if (rqp->sr_rq.mb_count & 1)
- SMBERROR("odd word count\n");
- *rqp->sr_wcount = rqp->sr_rq.mb_count / 2;
-}
-
-void
-smb_rq_bstart(struct smb_rq *rqp)
-{
- rqp->sr_bcount = (u_short*)mb_reserve(&rqp->sr_rq, sizeof(u_short));
- rqp->sr_rq.mb_count = 0;
-}
-
-void
-smb_rq_bend(struct smb_rq *rqp)
-{
- int bcnt;
-
- if (rqp->sr_bcount == NULL) {
- SMBERROR("no bcount\n"); /* actually panic */
- return;
- }
- bcnt = rqp->sr_rq.mb_count;
- if (bcnt > 0xffff)
- SMBERROR("byte count too large (%d)\n", bcnt);
- *rqp->sr_bcount = bcnt;
-}
-
-int
-smb_rq_intr(struct smb_rq *rqp)
-{
- struct proc *p = rqp->sr_cred->scr_p;
-
- if (rqp->sr_flags & SMBR_INTR)
- return EINTR;
- return smb_proc_intr(p);
-}
-
-int
-smb_rq_getrequest(struct smb_rq *rqp, struct mbchain **mbpp)
-{
- *mbpp = &rqp->sr_rq;
- return 0;
-}
-
-int
-smb_rq_getreply(struct smb_rq *rqp, struct mdchain **mbpp)
-{
- *mbpp = &rqp->sr_rp;
- return 0;
-}
-
-static int
-smb_rq_getenv(struct smb_connobj *layer,
- struct smb_vc **vcpp, struct smb_share **sspp)
-{
- struct smb_vc *vcp = NULL;
- struct smb_share *ssp = NULL;
- struct smb_connobj *cp;
- int error = 0;
-
- switch (layer->co_level) {
- case SMBL_VC:
- vcp = CPTOVC(layer);
- if (layer->co_parent == NULL) {
- SMBERROR("zombie VC %s\n", vcp->vc_srvname);
- error = EINVAL;
- break;
- }
- break;
- case SMBL_SHARE:
- ssp = CPTOSS(layer);
- cp = layer->co_parent;
- if (cp == NULL) {
- SMBERROR("zombie share %s\n", ssp->ss_name);
- error = EINVAL;
- break;
- }
- error = smb_rq_getenv(cp, &vcp, NULL);
- if (error)
- break;
- break;
- default:
- SMBERROR("invalid layer %d passed\n", layer->co_level);
- error = EINVAL;
- }
- if (vcpp)
- *vcpp = vcp;
- if (sspp)
- *sspp = ssp;
- return error;
-}
-
-/*
- * Wait for reply on the request
- */
-static int
-smb_rq_reply(struct smb_rq *rqp)
-{
- struct mdchain *mdp = &rqp->sr_rp;
- u_int32_t tdw;
- u_int8_t tb;
- int error, rperror = 0;
-
- error = smb_iod_waitrq(rqp);
- if (error)
- return error;
- error = md_get_uint32(mdp, &tdw);
- if (error)
- return error;
- error = md_get_uint8(mdp, &tb);
- if (rqp->sr_vc->vc_hflags2 & SMB_FLAGS2_ERR_STATUS) {
- error = md_get_uint32le(mdp, &rqp->sr_error);
- } else {
- error = md_get_uint8(mdp, &rqp->sr_errclass);
- error = md_get_uint8(mdp, &tb);
- error = md_get_uint16le(mdp, &rqp->sr_serror);
- if (!error)
- rperror = smb_maperror(rqp->sr_errclass, rqp->sr_serror);
- }
- error = md_get_uint8(mdp, &rqp->sr_rpflags);
- error = md_get_uint16le(mdp, &rqp->sr_rpflags2);
-
- error = md_get_uint32(mdp, &tdw);
- error = md_get_uint32(mdp, &tdw);
- error = md_get_uint32(mdp, &tdw);
-
- error = md_get_uint16le(mdp, &rqp->sr_rptid);
- error = md_get_uint16le(mdp, &rqp->sr_rppid);
- error = md_get_uint16le(mdp, &rqp->sr_rpuid);
- error = md_get_uint16le(mdp, &rqp->sr_rpmid);
-
- SMBSDEBUG("M:%04x, P:%04x, U:%04x, T:%04x, E: %d:%d\n",
- rqp->sr_rpmid, rqp->sr_rppid, rqp->sr_rpuid, rqp->sr_rptid,
- rqp->sr_errclass, rqp->sr_serror);
- return error ? error : rperror;
-}
-
-
-#define ALIGN4(a) (((a) + 3) & ~3)
-
-/*
- * TRANS2 request implementation
- */
-int
-smb_t2_alloc(struct smb_connobj *layer, u_short setup, struct smb_cred *scred,
- struct smb_t2rq **t2pp)
-{
- struct smb_t2rq *t2p;
- int error;
-
- MALLOC(t2p, struct smb_t2rq *, sizeof(*t2p), M_SMBRQ, M_WAITOK);
- if (t2p == NULL)
- return ENOMEM;
- error = smb_t2_init(t2p, layer, setup, scred);
- t2p->t2_flags |= SMBT2_ALLOCED;
- if (error) {
- smb_t2_done(t2p);
- return error;
- }
- *t2pp = t2p;
- return 0;
-}
-
-int
-smb_t2_init(struct smb_t2rq *t2p, struct smb_connobj *source, u_short setup,
- struct smb_cred *scred)
-{
- int error;
-
- bzero(t2p, sizeof(*t2p));
- t2p->t2_source = source;
- t2p->t2_setupcount = 1;
- t2p->t2_setupdata = t2p->t2_setup;
- t2p->t2_setup[0] = setup;
- t2p->t2_fid = 0xffff;
- t2p->t2_cred = scred;
- error = smb_rq_getenv(source, &t2p->t2_vc, NULL);
- if (error)
- return error;
- return 0;
-}
-
-void
-smb_t2_done(struct smb_t2rq *t2p)
-{
- mb_done(&t2p->t2_tparam);
- mb_done(&t2p->t2_tdata);
- md_done(&t2p->t2_rparam);
- md_done(&t2p->t2_rdata);
- if (t2p->t2_flags & SMBT2_ALLOCED)
- free(t2p, M_SMBRQ);
-}
-
-static int
-smb_t2_placedata(struct mbuf *mtop, u_int16_t offset, u_int16_t count,
- struct mdchain *mdp)
-{
- struct mbuf *m, *m0;
- int len;
-
- m0 = m_split(mtop, offset, M_WAIT);
- if (m0 == NULL)
- return EBADRPC;
- for(len = 0, m = m0; m->m_next; m = m->m_next)
- len += m->m_len;
- len += m->m_len;
- m->m_len -= len - count;
- if (mdp->md_top == NULL) {
- md_initm(mdp, m0);
- } else
- m_cat(mdp->md_top, m0);
- return 0;
-}
-
-static int
-smb_t2_reply(struct smb_t2rq *t2p)
-{
- struct mdchain *mdp;
- struct smb_rq *rqp = t2p->t2_rq;
- int error, totpgot, totdgot;
- u_int16_t totpcount, totdcount, pcount, poff, doff, pdisp, ddisp;
- u_int16_t tmp, bc, dcount;
- u_int8_t wc;
-
- error = smb_rq_reply(rqp);
- if (error)
- return error;
- if ((t2p->t2_flags & SMBT2_ALLSENT) == 0) {
- /*
- * this is an interim response, ignore it.
- */
- SMBRQ_SLOCK(rqp);
- md_next_record(&rqp->sr_rp);
- SMBRQ_SUNLOCK(rqp);
- return 0;
- }
- /*
- * Now we have to get all subseqent responses. The CIFS specification
- * says that they can be misordered which is weird.
- * TODO: timo
- */
- totpgot = totdgot = 0;
- totpcount = totdcount = 0xffff;
- mdp = &rqp->sr_rp;
- for (;;) {
- m_dumpm(mdp->md_top);
- if ((error = md_get_uint8(mdp, &wc)) != 0)
- break;
- if (wc < 10) {
- error = ENOENT;
- break;
- }
- if ((error = md_get_uint16le(mdp, &tmp)) != 0)
- break;
- if (totpcount > tmp)
- totpcount = tmp;
- md_get_uint16le(mdp, &tmp);
- if (totdcount > tmp)
- totdcount = tmp;
- if ((error = md_get_uint16le(mdp, &tmp)) != 0 || /* reserved */
- (error = md_get_uint16le(mdp, &pcount)) != 0 ||
- (error = md_get_uint16le(mdp, &poff)) != 0 ||
- (error = md_get_uint16le(mdp, &pdisp)) != 0)
- break;
- if (pcount != 0 && pdisp != totpgot) {
- SMBERROR("Can't handle misordered parameters %d:%d\n",
- pdisp, totpgot);
- error = EINVAL;
- break;
- }
- if ((error = md_get_uint16le(mdp, &dcount)) != 0 ||
- (error = md_get_uint16le(mdp, &doff)) != 0 ||
- (error = md_get_uint16le(mdp, &ddisp)) != 0)
- break;
- if (dcount != 0 && ddisp != totdgot) {
- SMBERROR("Can't handle misordered data\n");
- error = EINVAL;
- break;
- }
- md_get_uint8(mdp, &wc);
- md_get_uint8(mdp, NULL);
- tmp = wc;
- while (tmp--)
- md_get_uint16(mdp, NULL);
- if ((error = md_get_uint16le(mdp, &bc)) != 0)
- break;
-/* tmp = SMB_HDRLEN + 1 + 10 * 2 + 2 * wc + 2;*/
- if (dcount) {
- error = smb_t2_placedata(mdp->md_top, doff, dcount,
- &t2p->t2_rdata);
- if (error)
- break;
- }
- if (pcount) {
- error = smb_t2_placedata(mdp->md_top, poff, pcount,
- &t2p->t2_rparam);
- if (error)
- break;
- }
- totpgot += pcount;
- totdgot += dcount;
- if (totpgot >= totpcount && totdgot >= totdcount) {
- error = 0;
- t2p->t2_flags |= SMBT2_ALLRECV;
- break;
- }
- /*
- * We're done with this reply, look for the next one.
- */
- SMBRQ_SLOCK(rqp);
- md_next_record(&rqp->sr_rp);
- SMBRQ_SUNLOCK(rqp);
- error = smb_rq_reply(rqp);
- if (error)
- break;
- }
- return error;
-}
-
-/*
- * Perform a full round of TRANS2 request
- */
-static int
-smb_t2_request_int(struct smb_t2rq *t2p)
-{
- struct smb_vc *vcp = t2p->t2_vc;
- struct smb_cred *scred = t2p->t2_cred;
- struct mbchain *mbp;
- struct mdchain *mdp, mbparam, mbdata;
- struct mbuf *m;
- struct smb_rq *rqp;
- int totpcount, leftpcount, totdcount, leftdcount, len, txmax, i;
- int error, doff, poff, txdcount, txpcount, nmlen;
-
- m = t2p->t2_tparam.mb_top;
- if (m) {
- md_initm(&mbparam, m); /* do not free it! */
- totpcount = m_fixhdr(m);
- if (totpcount > 0xffff) /* maxvalue for u_short */
- return EINVAL;
- } else
- totpcount = 0;
- m = t2p->t2_tdata.mb_top;
- if (m) {
- md_initm(&mbdata, m); /* do not free it! */
- totdcount = m_fixhdr(m);
- if (totdcount > 0xffff)
- return EINVAL;
- } else
- totdcount = 0;
- leftdcount = totdcount;
- leftpcount = totpcount;
- txmax = vcp->vc_txmax;
- error = smb_rq_alloc(t2p->t2_source, t2p->t_name ?
- SMB_COM_TRANSACTION : SMB_COM_TRANSACTION2, scred, &rqp);
- if (error)
- return error;
- rqp->sr_flags |= SMBR_MULTIPACKET;
- t2p->t2_rq = rqp;
- mbp = &rqp->sr_rq;
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, totpcount);
- mb_put_uint16le(mbp, totdcount);
- mb_put_uint16le(mbp, t2p->t2_maxpcount);
- mb_put_uint16le(mbp, t2p->t2_maxdcount);
- mb_put_uint8(mbp, t2p->t2_maxscount);
- mb_put_uint8(mbp, 0); /* reserved */
- mb_put_uint16le(mbp, 0); /* flags */
- mb_put_uint32le(mbp, 0); /* Timeout */
- mb_put_uint16le(mbp, 0); /* reserved 2 */
- len = mb_fixhdr(mbp);
- /*
- * now we have known packet size as
- * ALIGN4(len + 5 * 2 + setupcount * 2 + 2 + strlen(name) + 1),
- * and need to decide which parts should go into the first request
- */
- nmlen = t2p->t_name ? strlen(t2p->t_name) : 0;
- len = ALIGN4(len + 5 * 2 + t2p->t2_setupcount * 2 + 2 + nmlen + 1);
- if (len + leftpcount > txmax) {
- txpcount = min(leftpcount, txmax - len);
- poff = len;
- txdcount = 0;
- doff = 0;
- } else {
- txpcount = leftpcount;
- poff = txpcount ? len : 0;
- len = ALIGN4(len + txpcount);
- txdcount = min(leftdcount, txmax - len);
- doff = txdcount ? len : 0;
- }
- leftpcount -= txpcount;
- leftdcount -= txdcount;
- mb_put_uint16le(mbp, txpcount);
- mb_put_uint16le(mbp, poff);
- mb_put_uint16le(mbp, txdcount);
- mb_put_uint16le(mbp, doff);
- mb_put_uint8(mbp, t2p->t2_setupcount);
- mb_put_uint8(mbp, 0);
- for (i = 0; i < t2p->t2_setupcount; i++)
- mb_put_uint16le(mbp, t2p->t2_setupdata[i]);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- /* TDUNICODE */
- if (t2p->t_name)
- mb_put_mem(mbp, t2p->t_name, nmlen, MB_MSYSTEM);
- mb_put_uint8(mbp, 0); /* terminating zero */
- len = mb_fixhdr(mbp);
- if (txpcount) {
- mb_put_mem(mbp, NULL, ALIGN4(len) - len, MB_MZERO);
- error = md_get_mbuf(&mbparam, txpcount, &m);
- SMBSDEBUG("%d:%d:%d\n", error, txpcount, txmax);
- if (error)
- goto freerq;
- mb_put_mbuf(mbp, m);
- }
- len = mb_fixhdr(mbp);
- if (txdcount) {
- mb_put_mem(mbp, NULL, ALIGN4(len) - len, MB_MZERO);
- error = md_get_mbuf(&mbdata, txdcount, &m);
- if (error)
- goto freerq;
- mb_put_mbuf(mbp, m);
- }
- smb_rq_bend(rqp); /* incredible, but thats it... */
- error = smb_rq_enqueue(rqp);
- if (error)
- goto freerq;
- if (leftpcount == 0 && leftdcount == 0)
- t2p->t2_flags |= SMBT2_ALLSENT;
- error = smb_t2_reply(t2p);
- if (error)
- goto bad;
- while (leftpcount || leftdcount) {
- error = smb_rq_new(rqp, t2p->t_name ?
- SMB_COM_TRANSACTION_SECONDARY : SMB_COM_TRANSACTION2_SECONDARY);
- if (error)
- goto bad;
- mbp = &rqp->sr_rq;
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, totpcount);
- mb_put_uint16le(mbp, totdcount);
- len = mb_fixhdr(mbp);
- /*
- * now we have known packet size as
- * ALIGN4(len + 7 * 2 + 2) for T2 request, and -2 for T one,
- * and need to decide which parts should go into request
- */
- len = ALIGN4(len + 6 * 2 + 2);
- if (t2p->t_name == NULL)
- len += 2;
- if (len + leftpcount > txmax) {
- txpcount = min(leftpcount, txmax - len);
- poff = len;
- txdcount = 0;
- doff = 0;
- } else {
- txpcount = leftpcount;
- poff = txpcount ? len : 0;
- len = ALIGN4(len + txpcount);
- txdcount = min(leftdcount, txmax - len);
- doff = txdcount ? len : 0;
- }
- mb_put_uint16le(mbp, txpcount);
- mb_put_uint16le(mbp, poff);
- mb_put_uint16le(mbp, totpcount - leftpcount);
- mb_put_uint16le(mbp, txdcount);
- mb_put_uint16le(mbp, doff);
- mb_put_uint16le(mbp, totdcount - leftdcount);
- leftpcount -= txpcount;
- leftdcount -= txdcount;
- if (t2p->t_name == NULL)
- mb_put_uint16le(mbp, t2p->t2_fid);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, 0); /* name */
- len = mb_fixhdr(mbp);
- if (txpcount) {
- mb_put_mem(mbp, NULL, ALIGN4(len) - len, MB_MZERO);
- error = md_get_mbuf(&mbparam, txpcount, &m);
- if (error)
- goto bad;
- mb_put_mbuf(mbp, m);
- }
- len = mb_fixhdr(mbp);
- if (txdcount) {
- mb_put_mem(mbp, NULL, ALIGN4(len) - len, MB_MZERO);
- error = md_get_mbuf(&mbdata, txdcount, &m);
- if (error)
- goto bad;
- mb_put_mbuf(mbp, m);
- }
- smb_rq_bend(rqp);
- rqp->sr_state = SMBRQ_NOTSENT;
- error = smb_iod_request(vcp->vc_iod, SMBIOD_EV_NEWRQ, NULL);
- if (error)
- goto bad;
- } /* while left params or data */
- t2p->t2_flags |= SMBT2_ALLSENT;
- mdp = &t2p->t2_rdata;
- if (mdp->md_top) {
- m_fixhdr(mdp->md_top);
- md_initm(mdp, mdp->md_top);
- }
- mdp = &t2p->t2_rparam;
- if (mdp->md_top) {
- m_fixhdr(mdp->md_top);
- md_initm(mdp, mdp->md_top);
- }
-bad:
- smb_iod_removerq(rqp);
-freerq:
- smb_rq_done(rqp);
- if (error) {
- if (rqp->sr_flags & SMBR_RESTART)
- t2p->t2_flags |= SMBT2_RESTART;
- md_done(&t2p->t2_rparam);
- md_done(&t2p->t2_rdata);
- }
- return error;
-}
-
-int
-smb_t2_request(struct smb_t2rq *t2p)
-{
- int error = EINVAL, i;
-
- for (i = 0; i < SMB_MAXRCN; i++) {
- t2p->t2_flags &= ~SMBR_RESTART;
- error = smb_t2_request_int(t2p);
- if (error == 0)
- break;
- if ((t2p->t2_flags & (SMBT2_RESTART | SMBT2_NORESTART)) != SMBT2_RESTART)
- break;
- }
- return error;
-}
diff --git a/sys/netsmb/smb_rq.h b/sys/netsmb/smb_rq.h
deleted file mode 100644
index d37647b4c8d3..000000000000
--- a/sys/netsmb/smb_rq.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _NETSMB_SMB_RQ_H_
-#define _NETSMB_SMB_RQ_H_
-
-#ifndef MB_MSYSTEM
-#include <sys/mchain.h>
-#endif
-
-#define SMBR_ALLOCED 0x0001 /* structure was malloced */
-#define SMBR_SENT 0x0002 /* request successfully transmitted */
-#define SMBR_REXMIT 0x0004 /* request should be retransmitted */
-#define SMBR_INTR 0x0008 /* request interrupted */
-#define SMBR_RESTART 0x0010 /* request should be repeated if possible */
-#define SMBR_NORESTART 0x0020 /* request is not restartable */
-#define SMBR_MULTIPACKET 0x0040 /* multiple packets can be sent and received */
-#define SMBR_INTERNAL 0x0080 /* request is internal to smbrqd */
-#define SMBR_XLOCK 0x0100 /* request locked and can't be moved */
-#define SMBR_XLOCKWANT 0x0200 /* waiter on XLOCK */
-
-#define SMBT2_ALLSENT 0x0001 /* all data and params are sent */
-#define SMBT2_ALLRECV 0x0002 /* all data and params are received */
-#define SMBT2_ALLOCED 0x0004
-#define SMBT2_RESTART 0x0008
-#define SMBT2_NORESTART 0x0010
-
-#define SMBRQ_SLOCK(rqp) smb_sl_lock(&(rqp)->sr_slock)
-#define SMBRQ_SUNLOCK(rqp) smb_sl_unlock(&(rqp)->sr_slock)
-#define SMBRQ_SLOCKPTR(rqp) (&(rqp)->sr_slock)
-
-
-enum smbrq_state {
- SMBRQ_NOTSENT, /* rq have data to send */
- SMBRQ_SENT, /* send procedure completed */
- SMBRQ_REPLYRECEIVED,
- SMBRQ_NOTIFIED /* owner notified about completion */
-};
-
-struct smb_vc;
-struct smb_t2rq;
-
-struct smb_rq {
- enum smbrq_state sr_state;
- struct smb_vc * sr_vc;
- struct smb_share* sr_share;
- u_short sr_mid;
- struct mbchain sr_rq;
- u_int8_t sr_rqflags;
- u_int16_t sr_rqflags2;
- u_char * sr_wcount;
- u_short * sr_bcount;
- struct mdchain sr_rp;
- int sr_rpgen;
- int sr_rplast;
- int sr_flags; /* SMBR_* */
- int sr_rpsize;
- struct smb_cred * sr_cred;
- int sr_timo;
- int sr_rexmit;
- int sr_sendcnt;
- struct timespec sr_timesent;
- int sr_lerror;
- u_int16_t * sr_rqtid;
- u_int16_t * sr_rquid;
- u_int8_t sr_errclass;
- u_int16_t sr_serror;
- u_int32_t sr_error;
- u_int8_t sr_rpflags;
- u_int16_t sr_rpflags2;
- u_int16_t sr_rptid;
- u_int16_t sr_rppid;
- u_int16_t sr_rpuid;
- u_int16_t sr_rpmid;
- struct smb_slock sr_slock; /* short term locks */
-/* struct smb_t2rq*sr_t2;*/
- TAILQ_ENTRY(smb_rq) sr_link;
-};
-
-struct smb_t2rq {
- u_int16_t t2_setupcount;
- u_int16_t * t2_setupdata;
- u_int16_t t2_setup[2]; /* most of rqs has setupcount of 1 */
- u_int8_t t2_maxscount; /* max setup words to return */
- u_int16_t t2_maxpcount; /* max param bytes to return */
- u_int16_t t2_maxdcount; /* max data bytes to return */
- u_int16_t t2_fid; /* for T2 request */
- char * t_name; /* for T request, should be zero for T2 */
- int t2_flags; /* SMBT2_ */
- struct mbchain t2_tparam; /* parameters to transmit */
- struct mbchain t2_tdata; /* data to transmit */
- struct mdchain t2_rparam; /* received paramters */
- struct mdchain t2_rdata; /* received data */
- struct smb_cred*t2_cred;
- struct smb_connobj *t2_source;
- struct smb_rq * t2_rq;
- struct smb_vc * t2_vc;
-};
-
-int smb_rq_alloc(struct smb_connobj *layer, u_char cmd,
- struct smb_cred *scred, struct smb_rq **rqpp);
-int smb_rq_init(struct smb_rq *rqp, struct smb_connobj *layer, u_char cmd,
- struct smb_cred *scred);
-void smb_rq_done(struct smb_rq *rqp);
-int smb_rq_getrequest(struct smb_rq *rqp, struct mbchain **mbpp);
-int smb_rq_getreply(struct smb_rq *rqp, struct mdchain **mbpp);
-void smb_rq_wstart(struct smb_rq *rqp);
-void smb_rq_wend(struct smb_rq *rqp);
-void smb_rq_bstart(struct smb_rq *rqp);
-void smb_rq_bend(struct smb_rq *rqp);
-int smb_rq_intr(struct smb_rq *rqp);
-int smb_rq_simple(struct smb_rq *rqp);
-
-int smb_t2_alloc(struct smb_connobj *layer, u_short setup, struct smb_cred *scred,
- struct smb_t2rq **rqpp);
-int smb_t2_init(struct smb_t2rq *rqp, struct smb_connobj *layer, u_short setup,
- struct smb_cred *scred);
-void smb_t2_done(struct smb_t2rq *t2p);
-int smb_t2_request(struct smb_t2rq *t2p);
-
-#endif /* !_NETSMB_SMB_RQ_H_ */
diff --git a/sys/netsmb/smb_smb.c b/sys/netsmb/smb_smb.c
deleted file mode 100644
index 0f3179d38c56..000000000000
--- a/sys/netsmb/smb_smb.c
+++ /dev/null
@@ -1,660 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-/*
- * various SMB requests. Most of the routines merely packs data into mbufs.
- */
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/proc.h>
-#include <sys/lock.h>
-#include <sys/sysctl.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-
-#include <sys/iconv.h>
-
-#include <netsmb/smb.h>
-#include <netsmb/smb_subr.h>
-#include <netsmb/smb_rq.h>
-#include <netsmb/smb_conn.h>
-#include <netsmb/smb_tran.h>
-
-struct smb_dialect {
- int d_id;
- const char * d_name;
-};
-
-static struct smb_dialect smb_dialects[] = {
- {SMB_DIALECT_CORE, "PC NETWORK PROGRAM 1.0"},
- {SMB_DIALECT_COREPLUS, "MICROSOFT NETWORKS 1.03"},
- {SMB_DIALECT_LANMAN1_0, "MICROSOFT NETWORKS 3.0"},
- {SMB_DIALECT_LANMAN1_0, "LANMAN1.0"},
- {SMB_DIALECT_LANMAN2_0, "LM1.2X002"},
- {SMB_DIALECT_LANMAN2_0, "Samba"},
- {SMB_DIALECT_NTLM0_12, "NT LANMAN 1.0"},
- {SMB_DIALECT_NTLM0_12, "NT LM 0.12"},
- {-1, NULL}
-};
-
-#define SMB_DIALECT_MAX (sizeof(smb_dialects) / sizeof(struct smb_dialect) - 2)
-
-static int
-smb_smb_nomux(struct smb_vc *vcp, struct smb_cred *scred, const char *name)
-{
- if (scred->scr_p == vcp->vc_iod->iod_p)
- return 0;
- SMBERROR("wrong function called(%s)\n", name);
- return EINVAL;
-}
-
-int
-smb_smb_negotiate(struct smb_vc *vcp, struct smb_cred *scred)
-{
- struct smb_dialect *dp;
- struct smb_sopt *sp = NULL;
- struct smb_rq *rqp;
- struct mbchain *mbp;
- struct mdchain *mdp;
- u_int8_t wc, stime[8], sblen;
- u_int16_t dindex, tw, tw1, swlen, bc;
- int error, maxqsz;
-
- if (smb_smb_nomux(vcp, scred, __FUNCTION__) != 0)
- return EINVAL;
- vcp->vc_hflags = 0;
- vcp->vc_hflags2 = 0;
- vcp->obj.co_flags &= ~(SMBV_ENCRYPT);
- sp = &vcp->vc_sopt;
- bzero(sp, sizeof(struct smb_sopt));
- error = smb_rq_alloc(VCTOCP(vcp), SMB_COM_NEGOTIATE, scred, &rqp);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- for(dp = smb_dialects; dp->d_id != -1; dp++) {
- mb_put_uint8(mbp, SMB_DT_DIALECT);
- smb_put_dstring(mbp, vcp, dp->d_name, SMB_CS_NONE);
- }
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- SMBSDEBUG("%d\n", error);
- if (error)
- goto bad;
- smb_rq_getreply(rqp, &mdp);
- do {
- error = md_get_uint8(mdp, &wc);
- if (error)
- break;
- error = md_get_uint16le(mdp, &dindex);
- if (error)
- break;
- if (dindex > 7) {
- SMBERROR("Don't know how to talk with server %s (%d)\n", "xxx", dindex);
- error = EBADRPC;
- break;
- }
- dp = smb_dialects + dindex;
- sp->sv_proto = dp->d_id;
- SMBSDEBUG("Dialect %s (%d, %d)\n", dp->d_name, dindex, wc);
- error = EBADRPC;
- if (dp->d_id >= SMB_DIALECT_NTLM0_12) {
- if (wc != 17)
- break;
- md_get_uint8(mdp, &sp->sv_sm);
- md_get_uint16le(mdp, &sp->sv_maxmux);
- md_get_uint16le(mdp, &sp->sv_maxvcs);
- md_get_uint32le(mdp, &sp->sv_maxtx);
- md_get_uint32le(mdp, &sp->sv_maxraw);
- md_get_uint32le(mdp, &sp->sv_skey);
- md_get_uint32le(mdp, &sp->sv_caps);
- md_get_mem(mdp, stime, 8, MB_MSYSTEM);
- md_get_uint16le(mdp, (u_int16_t*)&sp->sv_tz);
- md_get_uint8(mdp, &sblen);
- if (sblen && (sp->sv_sm & SMB_SM_ENCRYPT)) {
- if (sblen != SMB_MAXCHALLENGELEN) {
- SMBERROR("Unexpected length of security blob (%d)\n", sblen);
- break;
- }
- error = md_get_uint16(mdp, &bc);
- if (error)
- break;
- if (sp->sv_caps & SMB_CAP_EXT_SECURITY)
- md_get_mem(mdp, NULL, 16, MB_MSYSTEM);
- error = md_get_mem(mdp, vcp->vc_ch, sblen, MB_MSYSTEM);
- if (error)
- break;
- vcp->vc_chlen = sblen;
- vcp->obj.co_flags |= SMBV_ENCRYPT;
- }
- vcp->vc_hflags2 |= SMB_FLAGS2_KNOWS_LONG_NAMES;
- if (dp->d_id == SMB_DIALECT_NTLM0_12 &&
- sp->sv_maxtx < 4096 &&
- (sp->sv_caps & SMB_CAP_NT_SMBS) == 0) {
- vcp->obj.co_flags |= SMBV_WIN95;
- SMBSDEBUG("Win95 detected\n");
- }
- } else if (dp->d_id > SMB_DIALECT_CORE) {
- md_get_uint16le(mdp, &tw);
- sp->sv_sm = tw;
- md_get_uint16le(mdp, &tw);
- sp->sv_maxtx = tw;
- md_get_uint16le(mdp, &sp->sv_maxmux);
- md_get_uint16le(mdp, &sp->sv_maxvcs);
- md_get_uint16le(mdp, &tw); /* rawmode */
- md_get_uint32le(mdp, &sp->sv_skey);
- if (wc == 13) { /* >= LANMAN1 */
- md_get_uint16(mdp, &tw); /* time */
- md_get_uint16(mdp, &tw1); /* date */
- md_get_uint16le(mdp, (u_int16_t*)&sp->sv_tz);
- md_get_uint16le(mdp, &swlen);
- if (swlen > SMB_MAXCHALLENGELEN)
- break;
- md_get_uint16(mdp, NULL); /* mbz */
- if (md_get_uint16(mdp, &bc) != 0)
- break;
- if (bc < swlen)
- break;
- if (swlen && (sp->sv_sm & SMB_SM_ENCRYPT)) {
- error = md_get_mem(mdp, vcp->vc_ch, swlen, MB_MSYSTEM);
- if (error)
- break;
- vcp->vc_chlen = swlen;
- vcp->obj.co_flags |= SMBV_ENCRYPT;
- }
- }
- vcp->vc_hflags2 |= SMB_FLAGS2_KNOWS_LONG_NAMES;
- } else { /* an old CORE protocol */
- sp->sv_maxmux = 1;
- }
- error = 0;
- } while (0);
- if (error == 0) {
- vcp->vc_maxvcs = sp->sv_maxvcs;
- if (vcp->vc_maxvcs <= 1) {
- if (vcp->vc_maxvcs == 0)
- vcp->vc_maxvcs = 1;
- }
- if (sp->sv_maxtx <= 0 || sp->sv_maxtx > 0xffff)
- sp->sv_maxtx = 1024;
- SMB_TRAN_GETPARAM(vcp, SMBTP_SNDSZ, &maxqsz);
- vcp->vc_txmax = min(sp->sv_maxtx, maxqsz);
- SMBSDEBUG("TZ = %d\n", sp->sv_tz);
- SMBSDEBUG("CAPS = %x\n", sp->sv_caps);
- SMBSDEBUG("MAXMUX = %d\n", sp->sv_maxmux);
- SMBSDEBUG("MAXVCS = %d\n", sp->sv_maxvcs);
- SMBSDEBUG("MAXRAW = %d\n", sp->sv_maxraw);
- SMBSDEBUG("MAXTX = %d\n", sp->sv_maxtx);
- }
-bad:
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smb_smb_ssnsetup(struct smb_vc *vcp, struct smb_cred *scred)
-{
- struct smb_rq *rqp;
- struct mbchain *mbp;
-/* u_int8_t wc;
- u_int16_t tw, tw1;*/
- smb_uniptr unipp, ntencpass = NULL;
- char *pp, *up, *pbuf, *encpass;
- int error, plen, uniplen, ulen;
-
- vcp->vc_smbuid = SMB_UID_UNKNOWN;
-
- if (smb_smb_nomux(vcp, scred, __FUNCTION__) != 0)
- return EINVAL;
-
- error = smb_rq_alloc(VCTOCP(vcp), SMB_COM_SESSION_SETUP_ANDX, scred, &rqp);
- if (error)
- return error;
- pbuf = malloc(SMB_MAXPASSWORDLEN + 1, M_SMBTEMP, M_WAITOK);
- encpass = malloc(24, M_SMBTEMP, M_WAITOK);
- if (vcp->vc_sopt.sv_sm & SMB_SM_USER) {
- iconv_convstr(vcp->vc_toupper, pbuf, smb_vc_getpass(vcp));
- iconv_convstr(vcp->vc_toserver, pbuf, pbuf);
- if (vcp->vc_sopt.sv_sm & SMB_SM_ENCRYPT) {
- uniplen = plen = 24;
- smb_encrypt(pbuf, vcp->vc_ch, encpass);
- ntencpass = malloc(uniplen, M_SMBTEMP, M_WAITOK);
- iconv_convstr(vcp->vc_toserver, pbuf, smb_vc_getpass(vcp));
- smb_ntencrypt(pbuf, vcp->vc_ch, (u_char*)ntencpass);
- pp = encpass;
- unipp = ntencpass;
- } else {
- plen = strlen(pbuf) + 1;
- pp = pbuf;
- uniplen = plen * 2;
- ntencpass = malloc(uniplen, M_SMBTEMP, M_WAITOK);
- smb_strtouni(ntencpass, smb_vc_getpass(vcp));
- plen--;
- uniplen = 0/*-= 2*/;
- unipp = ntencpass;
- }
- } else {
- /*
- * In the share security mode password will be used
- * only in the tree authentication
- */
- pp = "";
- plen = 1;
- unipp = &smb_unieol;
- uniplen = sizeof(smb_unieol);
- }
- smb_rq_wstart(rqp);
- mbp = &rqp->sr_rq;
- up = vcp->vc_username;
- ulen = strlen(up) + 1;
- mb_put_uint8(mbp, 0xff);
- mb_put_uint8(mbp, 0);
- mb_put_uint16le(mbp, 0);
- mb_put_uint16le(mbp, vcp->vc_sopt.sv_maxtx);
- mb_put_uint16le(mbp, vcp->vc_sopt.sv_maxmux);
- mb_put_uint16le(mbp, vcp->vc_number);
- mb_put_uint32le(mbp, vcp->vc_sopt.sv_skey);
- mb_put_uint16le(mbp, plen);
- if (SMB_DIALECT(vcp) < SMB_DIALECT_NTLM0_12) {
- mb_put_uint32le(mbp, 0);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_mem(mbp, pp, plen, MB_MSYSTEM);
- smb_put_dstring(mbp, vcp, up, SMB_CS_NONE);
- } else {
- mb_put_uint16le(mbp, uniplen);
- mb_put_uint32le(mbp, 0); /* reserved */
- mb_put_uint32le(mbp, 0); /* my caps */
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_mem(mbp, pp, plen, MB_MSYSTEM);
- mb_put_mem(mbp, (caddr_t)unipp, uniplen, MB_MSYSTEM);
- smb_put_dstring(mbp, vcp, up, SMB_CS_NONE); /* AccountName */
- smb_put_dstring(mbp, vcp, vcp->vc_domain, SMB_CS_NONE); /* PrimaryDomain */
- smb_put_dstring(mbp, vcp, "FreeBSD", SMB_CS_NONE); /* Client's OS */
- smb_put_dstring(mbp, vcp, "NETSMB", SMB_CS_NONE); /* Client name */
- }
- smb_rq_bend(rqp);
- if (ntencpass)
- free(ntencpass, M_SMBTEMP);
- error = smb_rq_simple(rqp);
- SMBSDEBUG("%d\n", error);
- if (error) {
- if (rqp->sr_errclass == ERRDOS && rqp->sr_serror == ERRnoaccess)
- error = EAUTH;
- goto bad;
- }
- vcp->vc_smbuid = rqp->sr_rpuid;
-bad:
- free(encpass, M_SMBTEMP);
- free(pbuf, M_SMBTEMP);
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smb_smb_ssnclose(struct smb_vc *vcp, struct smb_cred *scred)
-{
- struct smb_rq *rqp;
- struct mbchain *mbp;
- int error;
-
- if (vcp->vc_smbuid == SMB_UID_UNKNOWN)
- return 0;
-
- if (smb_smb_nomux(vcp, scred, __FUNCTION__) != 0)
- return EINVAL;
-
- error = smb_rq_alloc(VCTOCP(vcp), SMB_COM_LOGOFF_ANDX, scred, &rqp);
- if (error)
- return error;
- mbp = &rqp->sr_rq;
- smb_rq_wstart(rqp);
- mb_put_uint8(mbp, 0xff);
- mb_put_uint8(mbp, 0);
- mb_put_uint16le(mbp, 0);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- SMBSDEBUG("%d\n", error);
- smb_rq_done(rqp);
- return error;
-}
-
-static char smb_any_share[] = "?????";
-
-static char *
-smb_share_typename(int stype)
-{
- char *pp;
-
- switch (stype) {
- case SMB_ST_DISK:
- pp = "A:";
- break;
- case SMB_ST_PRINTER:
- pp = smb_any_share; /* can't use LPT: here... */
- break;
- case SMB_ST_PIPE:
- pp = "IPC";
- break;
- case SMB_ST_COMM:
- pp = "COMM";
- break;
- case SMB_ST_ANY:
- default:
- pp = smb_any_share;
- break;
- }
- return pp;
-}
-
-int
-smb_smb_treeconnect(struct smb_share *ssp, struct smb_cred *scred)
-{
- struct smb_vc *vcp;
- struct smb_rq rq, *rqp = &rq;
- struct mbchain *mbp;
- char *pp, *pbuf, *encpass;
- int error, plen, caseopt;
-
- ssp->ss_tid = SMB_TID_UNKNOWN;
- error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_TREE_CONNECT_ANDX, scred, &rqp);
- if (error)
- return error;
- vcp = rqp->sr_vc;
- caseopt = SMB_CS_NONE;
- if (vcp->vc_sopt.sv_sm & SMB_SM_USER) {
- plen = 1;
- pp = "";
- pbuf = NULL;
- encpass = NULL;
- } else {
- pbuf = malloc(SMB_MAXPASSWORDLEN + 1, M_SMBTEMP, M_WAITOK);
- encpass = malloc(24, M_SMBTEMP, M_WAITOK);
- iconv_convstr(vcp->vc_toupper, pbuf, smb_share_getpass(ssp));
- iconv_convstr(vcp->vc_toserver, pbuf, pbuf);
- if (vcp->vc_sopt.sv_sm & SMB_SM_ENCRYPT) {
- plen = 24;
- smb_encrypt(pbuf, vcp->vc_ch, encpass);
- pp = encpass;
- } else {
- plen = strlen(pbuf) + 1;
- pp = pbuf;
- }
- }
- mbp = &rqp->sr_rq;
- smb_rq_wstart(rqp);
- mb_put_uint8(mbp, 0xff);
- mb_put_uint8(mbp, 0);
- mb_put_uint16le(mbp, 0);
- mb_put_uint16le(mbp, 0); /* Flags */
- mb_put_uint16le(mbp, plen);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_mem(mbp, pp, plen, MB_MSYSTEM);
- smb_put_dmem(mbp, vcp, "\\\\", 2, caseopt);
- pp = vcp->vc_srvname;
- smb_put_dmem(mbp, vcp, pp, strlen(pp), caseopt);
- smb_put_dmem(mbp, vcp, "\\", 1, caseopt);
- pp = ssp->ss_name;
- smb_put_dstring(mbp, vcp, pp, caseopt);
- pp = smb_share_typename(ssp->ss_type);
- smb_put_dstring(mbp, vcp, pp, caseopt);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- SMBSDEBUG("%d\n", error);
- if (error)
- goto bad;
- ssp->ss_tid = rqp->sr_rptid;
- ssp->ss_vcgenid = vcp->vc_genid;
- ssp->ss_flags |= SMBS_CONNECTED;
-bad:
- if (encpass)
- free(encpass, M_SMBTEMP);
- if (pbuf)
- free(pbuf, M_SMBTEMP);
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smb_smb_treedisconnect(struct smb_share *ssp, struct smb_cred *scred)
-{
- struct smb_rq *rqp;
- struct mbchain *mbp;
- int error;
-
- if (ssp->ss_tid == SMB_TID_UNKNOWN)
- return 0;
- error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_TREE_DISCONNECT, scred, &rqp);
- if (error)
- return error;
- mbp = &rqp->sr_rq;
- smb_rq_wstart(rqp);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- SMBSDEBUG("%d\n", error);
- smb_rq_done(rqp);
- ssp->ss_tid = SMB_TID_UNKNOWN;
- return error;
-}
-
-static __inline int
-smb_smb_read(struct smb_share *ssp, u_int16_t fid,
- int *len, int *rresid, struct uio *uio, struct smb_cred *scred)
-{
- struct smb_rq *rqp;
- struct mbchain *mbp;
- struct mdchain *mdp;
- u_int16_t resid, bc;
- u_int8_t wc;
- int error, rlen, blksz;
-
- error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_READ, scred, &rqp);
- if (error)
- return error;
-
- blksz = SSTOVC(ssp)->vc_txmax - SMB_HDRLEN - 16;
- rlen = *len = min(blksz, *len);
-
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_mem(mbp, (caddr_t)&fid, sizeof(fid), MB_MSYSTEM);
- mb_put_uint16le(mbp, rlen);
- mb_put_uint32le(mbp, uio->uio_offset);
- mb_put_uint16le(mbp, min(uio->uio_resid, 0xffff));
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- smb_rq_bend(rqp);
- do {
- error = smb_rq_simple(rqp);
- if (error)
- break;
- smb_rq_getreply(rqp, &mdp);
- md_get_uint8(mdp, &wc);
- if (wc != 5) {
- error = EBADRPC;
- break;
- }
- md_get_uint16le(mdp, &resid);
- md_get_mem(mdp, NULL, 4 * 2, MB_MSYSTEM);
- md_get_uint16le(mdp, &bc);
- md_get_uint8(mdp, NULL); /* ignore buffer type */
- md_get_uint16le(mdp, &resid);
- if (resid == 0) {
- *rresid = resid;
- break;
- }
- error = md_get_uio(mdp, uio, resid);
- if (error)
- break;
- *rresid = resid;
- } while(0);
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smb_read(struct smb_share *ssp, u_int16_t fid, struct uio *uio,
- struct smb_cred *scred)
-{
- int tsize, len, resid;
- int error = 0;
-
- tsize = uio->uio_resid;
- while (tsize > 0) {
- len = tsize;
- error = smb_smb_read(ssp, fid, &len, &resid, uio, scred);
- if (error)
- break;
- tsize -= resid;
- if (resid < len)
- break;
- }
- return error;
-}
-
-static __inline int
-smb_smb_write(struct smb_share *ssp, u_int16_t fid, int *len, int *rresid,
- struct uio *uio, struct smb_cred *scred)
-{
- struct smb_rq *rqp;
- struct mbchain *mbp;
- struct mdchain *mdp;
- u_int16_t resid;
- u_int8_t wc;
- int error, blksz;
-
- blksz = SSTOVC(ssp)->vc_txmax - SMB_HDRLEN - 16;
- if (blksz > 0xffff)
- blksz = 0xffff;
-
- resid = *len = min(blksz, *len);
-
- error = smb_rq_alloc(SSTOCP(ssp), SMB_COM_WRITE, scred, &rqp);
- if (error)
- return error;
- smb_rq_getrequest(rqp, &mbp);
- smb_rq_wstart(rqp);
- mb_put_mem(mbp, (caddr_t)&fid, sizeof(fid), MB_MSYSTEM);
- mb_put_uint16le(mbp, resid);
- mb_put_uint32le(mbp, uio->uio_offset);
- mb_put_uint16le(mbp, min(uio->uio_resid, 0xffff));
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint8(mbp, SMB_DT_DATA);
- mb_put_uint16le(mbp, resid);
- do {
- error = mb_put_uio(mbp, uio, resid);
- if (error)
- break;
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- if (error)
- break;
- smb_rq_getreply(rqp, &mdp);
- md_get_uint8(mdp, &wc);
- if (wc != 1) {
- error = EBADRPC;
- break;
- }
- md_get_uint16le(mdp, &resid);
- *rresid = resid;
- } while(0);
- smb_rq_done(rqp);
- return error;
-}
-
-int
-smb_write(struct smb_share *ssp, u_int16_t fid, struct uio *uio,
- struct smb_cred *scred)
-{
- int error = 0, len, tsize, resid;
- struct uio olduio;
-
- /*
- * review: manage iov more precisely
- */
- if (uio->uio_iovcnt != 1) {
- SMBERROR("can't handle iovcnt > 1\n");
- return EIO;
- }
- tsize = uio->uio_resid;
- olduio = *uio;
- while (tsize > 0) {
- len = tsize;
- error = smb_smb_write(ssp, fid, &len, &resid, uio, scred);
- if (error)
- break;
- if (resid < len) {
- error = EIO;
- break;
- }
- tsize -= resid;
- }
- if (error) {
- *uio = olduio;
- }
- return error;
-}
-
-int
-smb_smb_echo(struct smb_vc *vcp, struct smb_cred *scred)
-{
- struct smb_rq *rqp;
- struct mbchain *mbp;
- int error;
-
- error = smb_rq_alloc(VCTOCP(vcp), SMB_COM_ECHO, scred, &rqp);
- if (error)
- return error;
- mbp = &rqp->sr_rq;
- smb_rq_wstart(rqp);
- mb_put_uint16le(mbp, 1);
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- mb_put_uint32le(mbp, 0);
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- SMBSDEBUG("%d\n", error);
- smb_rq_done(rqp);
- return error;
-}
diff --git a/sys/netsmb/smb_subr.c b/sys/netsmb/smb_subr.c
deleted file mode 100644
index 8346629e4637..000000000000
--- a/sys/netsmb/smb_subr.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/proc.h>
-#include <sys/lock.h>
-#include <sys/sysctl.h>
-#include <sys/socket.h>
-#include <sys/signalvar.h>
-#include <sys/mbuf.h>
-
-#include <sys/iconv.h>
-
-#include <netsmb/smb.h>
-#include <netsmb/smb_conn.h>
-#include <netsmb/smb_rq.h>
-#include <netsmb/smb_subr.h>
-
-MALLOC_DEFINE(M_SMBDATA, "SMBDATA", "Misc netsmb data");
-MALLOC_DEFINE(M_SMBSTR, "SMBSTR", "netsmb string data");
-MALLOC_DEFINE(M_SMBTEMP, "SMBTEMP", "Temp netsmb data");
-
-smb_unichar smb_unieol = 0;
-
-void
-smb_makescred(struct smb_cred *scred, struct proc *p, struct ucred *cred)
-{
- if (p) {
- scred->scr_p = p;
- scred->scr_cred = cred ? cred : p->p_ucred;
- } else {
- scred->scr_p = NULL;
- scred->scr_cred = cred ? cred : NULL;
- }
-}
-
-int
-smb_proc_intr(struct proc *p)
-{
-#if __FreeBSD_version < 400009
-
- if (p && p->p_siglist &&
- (((p->p_siglist & ~p->p_sigmask) & ~p->p_sigignore) & SMB_SIGMASK))
- return EINTR;
- return 0;
-#else
- sigset_t tmpset;
-
- if (p == NULL)
- return 0;
- tmpset = p->p_siglist;
- SIGSETNAND(tmpset, p->p_sigmask);
- SIGSETNAND(tmpset, p->p_sigignore);
- if (SIGNOTEMPTY(p->p_siglist) && SMB_SIGMASK(tmpset))
- return EINTR;
- return 0;
-#endif
-}
-
-char *
-smb_strdup(const char *s)
-{
- char *p;
- int len;
-
- len = s ? strlen(s) + 1 : 1;
- p = malloc(len, M_SMBSTR, M_WAITOK);
- if (s)
- bcopy(s, p, len);
- else
- *p = 0;
- return p;
-}
-
-/*
- * duplicate string from a user space.
- */
-char *
-smb_strdupin(char *s, int maxlen)
-{
- char *p, bt;
- int len = 0;
-
- for (p = s; ;p++) {
- if (copyin(p, &bt, 1))
- return NULL;
- len++;
- if (maxlen && len > maxlen)
- return NULL;
- if (bt == 0)
- break;
- }
- p = malloc(len, M_SMBSTR, M_WAITOK);
- copyin(s, p, len);
- return p;
-}
-
-/*
- * duplicate memory block from a user space.
- */
-void *
-smb_memdupin(void *umem, int len)
-{
- char *p;
-
- if (len > 8 * 1024)
- return NULL;
- p = malloc(len, M_SMBSTR, M_WAITOK);
- if (copyin(umem, p, len) == 0)
- return p;
- free(p, M_SMBSTR);
- return NULL;
-}
-
-/*
- * duplicate memory block in the kernel space.
- */
-void *
-smb_memdup(const void *umem, int len)
-{
- char *p;
-
- if (len > 8 * 1024)
- return NULL;
- p = malloc(len, M_SMBSTR, M_WAITOK);
- if (p == NULL)
- return NULL;
- bcopy(umem, p, len);
- return p;
-}
-
-void
-smb_strfree(char *s)
-{
- free(s, M_SMBSTR);
-}
-
-void
-smb_memfree(void *s)
-{
- free(s, M_SMBSTR);
-}
-
-void *
-smb_zmalloc(unsigned long size, struct malloc_type *type, int flags)
-{
-
- return malloc(size, type, flags | M_ZERO);
-}
-
-void
-smb_strtouni(u_int16_t *dst, const char *src)
-{
- while (*src) {
- *dst++ = htoles(*src++);
- }
- *dst = 0;
-}
-
-#ifdef SMB_SOCKETDATA_DEBUG
-void
-m_dumpm(struct mbuf *m) {
- char *p;
- int len;
- printf("d=");
- while(m) {
- p=mtod(m,char *);
- len=m->m_len;
- printf("(%d)",len);
- while(len--){
- printf("%02x ",((int)*(p++)) & 0xff);
- }
- m=m->m_next;
- };
- printf("\n");
-}
-#endif
-
-int
-smb_maperror(int eclass, int eno)
-{
- if (eclass == 0 && eno == 0)
- return 0;
- switch (eclass) {
- case ERRDOS:
- switch (eno) {
- case ERRbadfunc:
- case ERRbadmcb:
- case ERRbadenv:
- case ERRbadformat:
- case ERRrmuns:
- return EINVAL;
- case ERRbadfile:
- case ERRbadpath:
- case ERRremcd:
- case 66: /* nt returns it when share not available */
- return ENOENT;
- case ERRnofids:
- return EMFILE;
- case ERRnoaccess:
- case ERRbadshare:
- return EACCES;
- case ERRbadfid:
- return EBADF;
- case ERRnomem:
- return ENOMEM; /* actually remote no mem... */
- case ERRbadmem:
- return EFAULT;
- case ERRbadaccess:
- return EACCES;
- case ERRbaddata:
- return E2BIG;
- case ERRbaddrive:
- case ERRnotready: /* nt */
- return ENXIO;
- case ERRdiffdevice:
- return EXDEV;
- case ERRnofiles:
- return 0; /* eeof ? */
- return ETXTBSY;
- case ERRlock:
- return EDEADLK;
- case ERRfilexists:
- return EEXIST;
- case 123: /* dunno what is it, but samba maps as noent */
- return ENOENT;
- case 145: /* samba */
- return ENOTEMPTY;
- case 183:
- return EEXIST;
- }
- break;
- case ERRSRV:
- switch (eno) {
- case ERRerror:
- return EINVAL;
- case ERRbadpw:
- return EAUTH;
- case ERRaccess:
- return EACCES;
- case ERRinvnid:
- return ENETRESET;
- case ERRinvnetname:
- SMBERROR("NetBIOS name is invalid\n");
- return EAUTH;
- case 3: /* reserved and returned */
- return EIO;
- case 2239: /* NT: account exists but disabled */
- return EPERM;
- }
- break;
- case ERRHRD:
- switch (eno) {
- case ERRnowrite:
- return EROFS;
- case ERRbadunit:
- return ENODEV;
- case ERRnotready:
- case ERRbadcmd:
- case ERRdata:
- return EIO;
- case ERRbadreq:
- return EBADRPC;
- case ERRbadshare:
- return ETXTBSY;
- case ERRlock:
- return EDEADLK;
- }
- break;
- }
- SMBERROR("Unmapped error %d:%d\n", eclass, eno);
- return EBADRPC;
-}
-
-static int
-smb_copy_iconv(struct mbchain *mbp, c_caddr_t src, caddr_t dst, int len)
-{
- int outlen = len;
-
- return iconv_conv((struct iconv_drv*)mbp->mb_udata, &src, &len, &dst, &outlen);
-}
-
-int
-smb_put_dmem(struct mbchain *mbp, struct smb_vc *vcp, const char *src,
- int size, int caseopt)
-{
- struct iconv_drv *dp = vcp->vc_toserver;
-
- if (size == 0)
- return 0;
- if (dp == NULL) {
- return mb_put_mem(mbp, src, size, MB_MSYSTEM);
- }
- mbp->mb_copy = smb_copy_iconv;
- mbp->mb_udata = dp;
- return mb_put_mem(mbp, src, size, MB_MCUSTOM);
-}
-
-int
-smb_put_dstring(struct mbchain *mbp, struct smb_vc *vcp, const char *src,
- int caseopt)
-{
- int error;
-
- error = smb_put_dmem(mbp, vcp, src, strlen(src), caseopt);
- if (error)
- return error;
- return mb_put_uint8(mbp, 0);
-}
-
-int
-smb_put_asunistring(struct smb_rq *rqp, const char *src)
-{
- struct mbchain *mbp = &rqp->sr_rq;
- struct iconv_drv *dp = rqp->sr_vc->vc_toserver;
- u_char c;
- int error;
-
- while (*src) {
- iconv_convmem(dp, &c, src++, 1);
- error = mb_put_uint16le(mbp, c);
- if (error)
- return error;
- }
- return mb_put_uint16le(mbp, 0);
-}
diff --git a/sys/netsmb/smb_subr.h b/sys/netsmb/smb_subr.h
deleted file mode 100644
index 16ce212db399..000000000000
--- a/sys/netsmb/smb_subr.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _NETSMB_SMB_SUBR_H_
-#define _NETSMB_SMB_SUBR_H_
-
-#ifndef _KERNEL
-#error "This file shouldn't be included from userland programs"
-#endif
-
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_SMBTEMP);
-#endif
-
-#if __FreeBSD_version > 500000
-#define FB_CURRENT
-#else
-# if __FreeBSD_version > 400000
-# define FB_RELENG4
-# else
-# error "Unsupported version of FreeBSD"
-# endif
-#endif
-
-#define SMBERROR(format, args...) printf("%s: "format, __FUNCTION__ ,## args)
-#define SMBPANIC(format, args...) printf("%s: "format, __FUNCTION__ ,## args)
-
-#ifdef SMB_SOCKET_DEBUG
-#define SMBSDEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args)
-#else
-#define SMBSDEBUG(format, args...)
-#endif
-
-#ifdef SMB_IOD_DEBUG
-#define SMBIODEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args)
-#else
-#define SMBIODEBUG(format, args...)
-#endif
-
-#ifdef SMB_SOCKETDATA_DEBUG
-void m_dumpm(struct mbuf *m);
-#else
-#define m_dumpm(m)
-#endif
-
-#if __FreeBSD_version > 400009
-#define SMB_SIGMASK(set) \
- (SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \
- SIGISMEMBER(set, SIGHUP) || SIGISMEMBER(set, SIGKILL) || \
- SIGISMEMBER(set, SIGQUIT))
-
-#define smb_suser(cred) suser_xxx(cred, NULL, 0)
-#else
-#define SMB_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \
- sigmask(SIGHUP)|sigmask(SIGQUIT))
-
-#define smb_suser(cred) suser((cred), NULL)
-#endif
-
-/*
- * Compatibility wrappers for simple locks
- */
-#if __FreeBSD_version < 500000
-
-#include <sys/lock.h>
-
-#define lockdestroy(lock)
-#define smb_slock simplelock
-#define smb_sl_init(mtx, desc) simple_lock_init(mtx)
-#define smb_sl_destroy(mtx)
-#define smb_sl_lock(mtx) simple_lock(mtx)
-#define smb_sl_unlock(mtx) simple_unlock(mtx)
-/*
-#define mtx lock
-#define mtx_init(mtx, desc, flags) lockinit(mtx, PWAIT, desc, 0, 0)
-#define mtx_lock(mtx) lockmgr(mtx, LK_EXCLUSIVE, NULL, curproc)
-#define mtx_unlock(mtx) lockmgr(mtx, LK_RELEASE, NULL, curproc)
-#define mtx_destroy(mtx)
-*/
-#else
-
-#include <sys/mutex.h>
-
-#define smb_slock mtx
-#define smb_sl_init(mtx, desc) mtx_init(mtx, desc, MTX_DEF)
-#define smb_sl_destroy(mtx) mtx_destroy(mtx)
-#define smb_sl_lock(mtx) mtx_lock(mtx)
-#define smb_sl_unlock(mtx) mtx_unlock(mtx)
-
-#endif
-
-#define SMB_STRFREE(p) do { if (p) smb_strfree(p); } while(0)
-
-/*
- * The simple try/catch/finally interface.
- * With GCC it is possible to allow more than one try/finally block per
- * function, but we'll avoid it to maintain portability.
- */
-#define itry { \
- __label__ _finlab, _catchlab; \
- int _tval; \
-
-#define icatch(var) \
- goto _finlab; \
- (void)&&_catchlab; \
- _catchlab: \
- var = _tval;
-
-#define ifinally (void)&&_finlab; \
- _finlab:
-#define iendtry }
-
-#define inocatch \
- goto _finlab; \
- (void)&&_catchlab; \
- _catchlab: \
-
-#define ithrow(t) do { \
- if ((_tval = (int)(t)) != 0) \
- goto _catchlab; \
- } while (0)
-
-#define ierror(t,e) do { \
- if (t) { \
- _tval = e; \
- goto _catchlab; \
- } \
- } while (0)
-
-typedef u_int16_t smb_unichar;
-typedef smb_unichar *smb_uniptr;
-
-/*
- * Crediantials of user/process being processing in the connection procedures
- */
-struct smb_cred {
- struct proc * scr_p;
- struct ucred * scr_cred;
-};
-
-extern smb_unichar smb_unieol;
-
-struct mbchain;
-struct smb_vc;
-struct smb_rq;
-
-void smb_makescred(struct smb_cred *scred, struct proc *p, struct ucred *cred);
-int smb_proc_intr(struct proc *);
-char *smb_strdup(const char *s);
-void *smb_memdup(const void *umem, int len);
-char *smb_strdupin(char *s, int maxlen);
-void *smb_memdupin(void *umem, int len);
-void smb_strtouni(u_int16_t *dst, const char *src);
-void smb_strfree(char *s);
-void smb_memfree(void *s);
-void *smb_zmalloc(unsigned long size, struct malloc_type *type, int flags);
-
-int smb_encrypt(const u_char *apwd, u_char *C8, u_char *RN);
-int smb_ntencrypt(const u_char *apwd, u_char *C8, u_char *RN);
-int smb_maperror(int eclass, int eno);
-int smb_put_dmem(struct mbchain *mbp, struct smb_vc *vcp,
- const char *src, int len, int caseopt);
-int smb_put_dstring(struct mbchain *mbp, struct smb_vc *vcp,
- const char *src, int caseopt);
-int smb_put_string(struct smb_rq *rqp, const char *src);
-int smb_put_asunistring(struct smb_rq *rqp, const char *src);
-
-#endif /* !_NETSMB_SMB_SUBR_H_ */
diff --git a/sys/netsmb/smb_tran.h b/sys/netsmb/smb_tran.h
deleted file mode 100644
index 7403d21240e0..000000000000
--- a/sys/netsmb/smb_tran.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _NETSMB_SMB_TRAN_H_
-#define _NETSMB_SMB_TRAN_H_
-
-#include <sys/socket.h>
-
-/*
- * Known transports
- */
-#define SMBT_NBTCP 1
-
-/*
- * Transport parameters
- */
-#define SMBTP_SNDSZ 1 /* R - int */
-#define SMBTP_RCVSZ 2 /* R - int */
-#define SMBTP_TIMEOUT 3 /* RW - struct timespec */
-#define SMBTP_SELECTID 4 /* RW - (void *) */
-
-struct smb_tran_ops;
-
-struct smb_tran_desc {
- sa_family_t tr_type;
- int (*tr_create)(struct smb_vc *vcp, struct proc *p);
- int (*tr_done)(struct smb_vc *vcp, struct proc *p);
- int (*tr_bind)(struct smb_vc *vcp, struct sockaddr *sap, struct proc *p);
- int (*tr_connect)(struct smb_vc *vcp, struct sockaddr *sap, struct proc *p);
- int (*tr_disconnect)(struct smb_vc *vcp, struct proc *p);
- int (*tr_send)(struct smb_vc *vcp, struct mbuf *m0, struct proc *p);
- int (*tr_recv)(struct smb_vc *vcp, struct mbuf **mpp, struct proc *p);
- void (*tr_timo)(struct smb_vc *vcp);
- void (*tr_intr)(struct smb_vc *vcp);
- int (*tr_getparam)(struct smb_vc *vcp, int param, void *data);
- int (*tr_setparam)(struct smb_vc *vcp, int param, void *data);
- int (*tr_fatal)(struct smb_vc *vcp, int error);
-#ifdef notyet
- int (*tr_poll)(struct smb_vc *vcp, struct proc *p);
- int (*tr_cmpaddr)(void *addr1, void *addr2);
-#endif
- LIST_ENTRY(smb_tran_desc) tr_link;
-};
-
-#define SMB_TRAN_CREATE(vcp,p) (vcp)->vc_tdesc->tr_create(vcp,p)
-#define SMB_TRAN_DONE(vcp,p) (vcp)->vc_tdesc->tr_done(vcp,p)
-#define SMB_TRAN_BIND(vcp,sap,p) (vcp)->vc_tdesc->tr_bind(vcp,sap,p)
-#define SMB_TRAN_CONNECT(vcp,sap,p) (vcp)->vc_tdesc->tr_connect(vcp,sap,p)
-#define SMB_TRAN_DISCONNECT(vcp,p) (vcp)->vc_tdesc->tr_disconnect(vcp,p)
-#define SMB_TRAN_SEND(vcp,m0,p) (vcp)->vc_tdesc->tr_send(vcp,m0,p)
-#define SMB_TRAN_RECV(vcp,m,p) (vcp)->vc_tdesc->tr_recv(vcp,m,p)
-#define SMB_TRAN_TIMO(vcp) (vcp)->vc_tdesc->tr_timo(vcp)
-#define SMB_TRAN_INTR(vcp) (vcp)->vc_tdesc->tr_intr(vcp)
-#define SMB_TRAN_GETPARAM(vcp,par,data) (vcp)->vc_tdesc->tr_getparam(vcp, par, data)
-#define SMB_TRAN_SETPARAM(vcp,par,data) (vcp)->vc_tdesc->tr_setparam(vcp, par, data)
-#define SMB_TRAN_FATAL(vcp, error) (vcp)->vc_tdesc->tr_fatal(vcp, error)
-
-#endif /* _NETSMB_SMB_TRAN_H_ */
diff --git a/sys/netsmb/smb_trantcp.h b/sys/netsmb/smb_trantcp.h
deleted file mode 100644
index 6c625faa57c4..000000000000
--- a/sys/netsmb/smb_trantcp.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _NETSMB_SMB_TRANTCP_H_
-#define _NETSMB_SMB_TRANTCP_H_
-
-#ifdef _KERNEL
-
-#ifdef NB_DEBUG
-#define NBDEBUG(format, args...) printf("%s(%d): "format, \
- __FUNCTION__ , __LINE__ ,## args)
-#else
-#define NBDEBUG(format, args...)
-#endif
-
-enum nbstate {
- NBST_CLOSED,
- NBST_RQSENT,
- NBST_SESSION,
- NBST_RETARGET,
- NBST_REFUSED
-};
-
-
-/*
- * socket specific data
- */
-struct nbpcb {
- struct smb_vc * nbp_vc;
- struct socket * nbp_tso; /* transport socket */
- struct sockaddr_nb *nbp_laddr; /* local address */
- struct sockaddr_nb *nbp_paddr; /* peer address */
-
- int nbp_flags;
-#define NBF_LOCADDR 0x0001 /* has local addr */
-#define NBF_CONNECTED 0x0002
-#define NBF_RECVLOCK 0x0004
-
- enum nbstate nbp_state;
- struct timespec nbp_timo;
- int nbp_sndbuf;
- int nbp_rcvbuf;
- void * nbp_selectid;
-
-/* LIST_ENTRY(nbpcb) nbp_link;*/
-};
-
-/*
- * Nominal space allocated per a NETBIOS socket.
- */
-#define NB_SNDQ (10 * 1024)
-#define NB_RCVQ (20 * 1024)
-
-extern struct smb_tran_desc smb_tran_nbtcp_desc;
-
-#endif /* _KERNEL */
-
-#endif /* !_NETSMB_SMB_TRANTCP_H_ */
diff --git a/sys/netsmb/smb_usr.c b/sys/netsmb/smb_usr.c
deleted file mode 100644
index 275917357a54..000000000000
--- a/sys/netsmb/smb_usr.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright (c) 2000-2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#include <sys/param.h>
-#include <sys/malloc.h>
-#include <sys/kernel.h>
-#include <sys/systm.h>
-#include <sys/conf.h>
-#include <sys/proc.h>
-#include <sys/fcntl.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/sysctl.h>
-
-#include <sys/iconv.h>
-
-#include <netsmb/smb.h>
-#include <netsmb/smb_conn.h>
-#include <netsmb/smb_rq.h>
-#include <netsmb/smb_subr.h>
-#include <netsmb/smb_dev.h>
-
-/*
- * helpers for nsmb device. Can be moved to the smb_dev.c file.
- */
-static void smb_usr_vcspec_free(struct smb_vcspec *spec);
-
-static int
-smb_usr_vc2spec(struct smbioc_ossn *dp, struct smb_vcspec *spec)
-{
- int flags = 0;
-
- bzero(spec, sizeof(*spec));
- if (dp->ioc_user[0] == 0)
- return EINVAL;
- if (dp->ioc_server == NULL)
- return EINVAL;
- if (dp->ioc_localcs[0] == 0) {
- SMBERROR("no local charset ?\n");
- return EINVAL;
- }
-
- spec->sap = smb_memdupin(dp->ioc_server, dp->ioc_svlen);
- if (spec->sap == NULL)
- return ENOMEM;
- if (dp->ioc_local) {
- spec->lap = smb_memdupin(dp->ioc_local, dp->ioc_lolen);
- if (spec->lap == NULL) {
- smb_usr_vcspec_free(spec);
- return ENOMEM;
- }
- }
- spec->srvname = dp->ioc_srvname;
- spec->pass = dp->ioc_password;
- spec->domain = dp->ioc_workgroup;
- spec->username = dp->ioc_user;
- spec->mode = dp->ioc_mode;
- spec->rights = dp->ioc_rights;
- spec->owner = dp->ioc_owner;
- spec->group = dp->ioc_group;
- spec->localcs = dp->ioc_localcs;
- spec->servercs = dp->ioc_servercs;
- if (dp->ioc_opt & SMBVOPT_PRIVATE)
- flags |= SMBV_PRIVATE;
- if (dp->ioc_opt & SMBVOPT_SINGLESHARE)
- flags |= SMBV_PRIVATE | SMBV_SINGLESHARE;
- spec->flags = flags;
- return 0;
-}
-
-static void
-smb_usr_vcspec_free(struct smb_vcspec *spec)
-{
- if (spec->sap)
- smb_memfree(spec->sap);
- if (spec->lap)
- smb_memfree(spec->lap);
-}
-
-static int
-smb_usr_share2spec(struct smbioc_oshare *dp, struct smb_sharespec *spec)
-{
- bzero(spec, sizeof(*spec));
- spec->mode = dp->ioc_mode;
- spec->rights = dp->ioc_rights;
- spec->owner = dp->ioc_owner;
- spec->group = dp->ioc_group;
- spec->name = dp->ioc_share;
- spec->stype = dp->ioc_stype;
- spec->pass = dp->ioc_password;
- return 0;
-}
-
-int
-smb_usr_lookup(struct smbioc_lookup *dp, struct smb_cred *scred,
- struct smb_vc **vcpp, struct smb_share **sspp)
-{
- struct smb_vc *vcp = NULL;
- struct smb_vcspec vspec;
- struct smb_sharespec sspec, *sspecp = NULL;
- int error;
-
- if (dp->ioc_level < SMBL_VC || dp->ioc_level > SMBL_SHARE)
- return EINVAL;
- error = smb_usr_vc2spec(&dp->ioc_ssn, &vspec);
- if (error)
- return error;
- if (dp->ioc_flags & SMBLK_CREATE)
- vspec.flags |= SMBV_CREATE;
-
- if (dp->ioc_level >= SMBL_SHARE) {
- error = smb_usr_share2spec(&dp->ioc_sh, &sspec);
- if (error)
- goto out;
- sspecp = &sspec;
- }
- error = smb_sm_lookup(&vspec, sspecp, scred, &vcp);
- if (error == 0) {
- *vcpp = vcp;
- *sspp = vspec.ssp;
- }
-out:
- smb_usr_vcspec_free(&vspec);
- return error;
-}
-
-/*
- * Connect to the resource specified by smbioc_ossn structure.
- * It may either find an existing connection or try to establish a new one.
- * If no errors occured smb_vc returned locked and referenced.
- */
-int
-smb_usr_opensession(struct smbioc_ossn *dp, struct smb_cred *scred,
- struct smb_vc **vcpp)
-{
- struct smb_vc *vcp = NULL;
- struct smb_vcspec vspec;
- int error;
-
- error = smb_usr_vc2spec(dp, &vspec);
- if (error)
- return error;
- if (dp->ioc_opt & SMBVOPT_CREATE)
- vspec.flags |= SMBV_CREATE;
-
- error = smb_sm_lookup(&vspec, NULL, scred, &vcp);
- smb_usr_vcspec_free(&vspec);
- return error;
-}
-
-int
-smb_usr_openshare(struct smb_vc *vcp, struct smbioc_oshare *dp,
- struct smb_cred *scred, struct smb_share **sspp)
-{
- struct smb_share *ssp;
- struct smb_sharespec shspec;
- int error;
-
- error = smb_usr_share2spec(dp, &shspec);
- if (error)
- return error;
- error = smb_vc_lookupshare(vcp, &shspec, scred, &ssp);
- if (error == 0) {
- *sspp = ssp;
- return 0;
- }
- if ((dp->ioc_opt & SMBSOPT_CREATE) == 0)
- return error;
- error = smb_share_create(vcp, &shspec, scred, &ssp);
- if (error)
- return error;
- error = smb_smb_treeconnect(ssp, scred);
- if (error) {
- smb_share_put(ssp, scred);
- } else
- *sspp = ssp;
- return error;
-}
-
-int
-smb_usr_simplerequest(struct smb_share *ssp, struct smbioc_rq *dp,
- struct smb_cred *scred)
-{
- struct smb_rq rq, *rqp = &rq;
- struct mbchain *mbp;
- struct mdchain *mdp;
- u_int8_t wc;
- u_int16_t bc;
- int error;
-
- switch (dp->ioc_cmd) {
- case SMB_COM_TRANSACTION2:
- case SMB_COM_TRANSACTION2_SECONDARY:
- case SMB_COM_CLOSE_AND_TREE_DISC:
- case SMB_COM_TREE_CONNECT:
- case SMB_COM_TREE_DISCONNECT:
- case SMB_COM_NEGOTIATE:
- case SMB_COM_SESSION_SETUP_ANDX:
- case SMB_COM_LOGOFF_ANDX:
- case SMB_COM_TREE_CONNECT_ANDX:
- return EPERM;
- }
- error = smb_rq_init(rqp, SSTOCP(ssp), dp->ioc_cmd, scred);
- if (error)
- return error;
- mbp = &rqp->sr_rq;
- smb_rq_wstart(rqp);
- error = mb_put_mem(mbp, dp->ioc_twords, dp->ioc_twc * 2, MB_MUSER);
- if (error)
- goto bad;
- smb_rq_wend(rqp);
- smb_rq_bstart(rqp);
- error = mb_put_mem(mbp, dp->ioc_tbytes, dp->ioc_tbc, MB_MUSER);
- if (error)
- goto bad;
- smb_rq_bend(rqp);
- error = smb_rq_simple(rqp);
- if (error)
- goto bad;
- mdp = &rqp->sr_rp;
- md_get_uint8(mdp, &wc);
- dp->ioc_rwc = wc;
- wc *= 2;
- if (wc > dp->ioc_rpbufsz) {
- error = EBADRPC;
- goto bad;
- }
- error = md_get_mem(mdp, dp->ioc_rpbuf, wc, MB_MUSER);
- if (error)
- goto bad;
- md_get_uint16le(mdp, &bc);
- if ((wc + bc) > dp->ioc_rpbufsz) {
- error = EBADRPC;
- goto bad;
- }
- dp->ioc_rbc = bc;
- error = md_get_mem(mdp, dp->ioc_rpbuf + wc, bc, MB_MUSER);
-bad:
- dp->ioc_errclass = rqp->sr_errclass;
- dp->ioc_serror = rqp->sr_serror;
- dp->ioc_error = rqp->sr_error;
- smb_rq_done(rqp);
- return error;
-
-}
-
-static int
-smb_cpdatain(struct mbchain *mbp, int len, caddr_t data)
-{
- int error;
-
- if (len == 0)
- return 0;
- error = mb_init(mbp);
- if (error)
- return error;
- return mb_put_mem(mbp, data, len, MB_MUSER);
-}
-
-int
-smb_usr_t2request(struct smb_share *ssp, struct smbioc_t2rq *dp,
- struct smb_cred *scred)
-{
- struct smb_t2rq t2, *t2p = &t2;
- struct mdchain *mdp;
- int error, len;
-
- if (dp->ioc_tparamcnt > 0xffff || dp->ioc_tdatacnt > 0xffff ||
- dp->ioc_setupcnt > 3)
- return EINVAL;
- error = smb_t2_init(t2p, SSTOCP(ssp), dp->ioc_setup[0], scred);
- if (error)
- return error;
- len = t2p->t2_setupcount = dp->ioc_setupcnt;
- if (len > 1)
- t2p->t2_setupdata = dp->ioc_setup;
- if (dp->ioc_name) {
- t2p->t_name = smb_strdupin(dp->ioc_name, 128);
- if (t2p->t_name == NULL) {
- error = ENOMEM;
- goto bad;
- }
- }
- t2p->t2_maxscount = 0;
- t2p->t2_maxpcount = dp->ioc_rparamcnt;
- t2p->t2_maxdcount = dp->ioc_rdatacnt;
- error = smb_cpdatain(&t2p->t2_tparam, dp->ioc_tparamcnt, dp->ioc_tparam);
- if (error)
- goto bad;
- error = smb_cpdatain(&t2p->t2_tdata, dp->ioc_tdatacnt, dp->ioc_tdata);
- if (error)
- goto bad;
- error = smb_t2_request(t2p);
- if (error)
- goto bad;
- mdp = &t2p->t2_rparam;
- if (mdp->md_top) {
- len = m_fixhdr(mdp->md_top);
- if (len > dp->ioc_rparamcnt) {
- error = EMSGSIZE;
- goto bad;
- }
- dp->ioc_rparamcnt = len;
- error = md_get_mem(mdp, dp->ioc_rparam, len, MB_MUSER);
- if (error)
- goto bad;
- } else
- dp->ioc_rparamcnt = 0;
- mdp = &t2p->t2_rdata;
- if (mdp->md_top) {
- len = m_fixhdr(mdp->md_top);
- if (len > dp->ioc_rdatacnt) {
- error = EMSGSIZE;
- goto bad;
- }
- dp->ioc_rdatacnt = len;
- error = md_get_mem(mdp, dp->ioc_rdata, len, MB_MUSER);
- } else
- dp->ioc_rdatacnt = 0;
-bad:
- if (t2p->t_name)
- smb_strfree(t2p->t_name);
- smb_t2_done(t2p);
- return error;
-}
diff --git a/sys/sys/iconv.h b/sys/sys/iconv.h
deleted file mode 100644
index 4764aaf0bfda..000000000000
--- a/sys/sys/iconv.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2000-2001, Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _SYS_ICONV_H_
-#define _SYS_ICONV_H_
-
-#define ICONV_CSNMAXLEN 31 /* maximum length of charset name */
-#define ICONV_CNVNMAXLEN 31 /* maximum length of converter name */
-#define ICONV_CSMAXDATALEN 1024 /* maximum size of data associated with cs pair */
-
-/*
- * Entry for cslist sysctl
- */
-#define ICONV_CSPAIR_INFO_VER 1
-
-struct iconv_cspair_info {
- int cs_version;
- int cs_id;
- int cs_base;
- int cs_refcount;
- char cs_to[ICONV_CSNMAXLEN];
- char cs_from[ICONV_CSNMAXLEN];
-};
-
-/*
- * Paramters for 'add' sysctl
- */
-#define ICONV_ADD_VER 1
-
-struct iconv_add_in {
- int ia_version;
- char ia_converter[ICONV_CNVNMAXLEN];
- char ia_to[ICONV_CSNMAXLEN];
- char ia_from[ICONV_CSNMAXLEN];
- int ia_datalen;
- const void *ia_data;
-};
-
-struct iconv_add_out {
- int ia_csid;
-};
-
-#ifndef _KERNEL
-
-__BEGIN_DECLS
-
-int kiconv_add_xlat_table(const char *, const char *, const u_char *);
-
-__END_DECLS
-
-#else /* !_KERNEL */
-
-#include <sys/kobj.h>
-#include <sys/queue.h> /* can't avoid that */
-#include <sys/sysctl.h> /* can't avoid that */
-
-struct iconv_cspair;
-struct iconv_cspairdata;
-
-/*
- * iconv converter class definition
- */
-struct iconv_converter_class {
- KOBJ_CLASS_FIELDS;
- TAILQ_ENTRY(iconv_converter_class) cc_link;
-};
-
-struct iconv_cspair {
- int cp_id; /* unique id of charset pair */
- int cp_refcount; /* number of references from other pairs */
- const char * cp_from;
- const char * cp_to;
- void * cp_data;
- struct iconv_converter_class * cp_dcp;
- struct iconv_cspair *cp_base;
- TAILQ_ENTRY(iconv_cspair) cp_link;
-};
-
-#define KICONV_CONVERTER(name,size) \
- static DEFINE_CLASS(iconv_ ## name, iconv_ ## name ## _methods, (size)); \
- static moduledata_t iconv_ ## name ## _mod = { \
- "iconv_"#name, iconv_converter_handler, \
- (void*)&iconv_ ## name ## _class \
- }; \
- DECLARE_MODULE(iconv_ ## name, iconv_ ## name ## _mod, SI_SUB_DRIVERS, SI_ORDER_ANY);
-
-#define KICONV_CES(name,size) \
- static DEFINE_CLASS(iconv_ces_ ## name, iconv_ces_ ## name ## _methods, (size)); \
- static moduledata_t iconv_ces_ ## name ## _mod = { \
- "iconv_ces_"#name, iconv_cesmod_handler, \
- (void*)&iconv_ces_ ## name ## _class \
- }; \
- DECLARE_MODULE(iconv_ces_ ## name, iconv_ces_ ## name ## _mod, SI_SUB_DRIVERS, SI_ORDER_ANY);
-
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_ICONV);
-#endif
-
-/*
- * Basic conversion functions
- */
-int iconv_open(const char *to, const char *from, void **handle);
-int iconv_close(void *handle);
-int iconv_conv(void *handle, const char **inbuf,
- size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
-char* iconv_convstr(void *handle, char *dst, const char *src);
-void* iconv_convmem(void *handle, void *dst, const void *src, int size);
-
-/*
- * Internal functions
- */
-int iconv_lookupcp(char **cpp, const char *s);
-
-int iconv_converter_initstub(struct iconv_converter_class *dp);
-int iconv_converter_donestub(struct iconv_converter_class *dp);
-int iconv_converter_handler(module_t mod, int type, void *data);
-
-#ifdef ICONV_DEBUG
-#define ICDEBUG(format, args...) printf("%s: "format, __FUNCTION__ ,## args)
-#else
-#define ICDEBUG(format, args...)
-#endif
-
-#endif /* !_KERNEL */
-
-#endif /* !_SYS_ICONV_H_ */
diff --git a/sys/sys/mchain.h b/sys/sys/mchain.h
deleted file mode 100644
index e79fbfb03524..000000000000
--- a/sys/sys/mchain.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2000, 2001 Boris Popov
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Boris Popov.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-#ifndef _SYS_MCHAIN_H_
-#define _SYS_MCHAIN_H_
-
-#include <machine/endian.h>
-
-/*
- * This macros probably belongs to the endian.h
- */
-#if (BYTE_ORDER == LITTLE_ENDIAN)
-
-#define htoles(x) ((u_int16_t)(x))
-#define letohs(x) ((u_int16_t)(x))
-#define htolel(x) ((u_int32_t)(x))
-#define letohl(x) ((u_int32_t)(x))
-#define htoleq(x) ((int64_t)(x))
-#define letohq(x) ((int64_t)(x))
-
-#define htobes(x) (htons(x))
-#define betohs(x) (ntohs(x))
-#define htobel(x) (htonl(x))
-#define betohl(x) (ntohl(x))
-
-static __inline int64_t
-htobeq(int64_t x)
-{
- return (int64_t)htonl((u_int32_t)(x >> 32)) |
- (int64_t)htonl((u_int32_t)(x & 0xffffffff)) << 32;
-}
-
-static __inline int64_t
-betohq(int64_t x)
-{
- return (int64_t)ntohl((u_int32_t)(x >> 32)) |
- (int64_t)ntohl((u_int32_t)(x & 0xffffffff)) << 32;
-}
-
-#else /* (BYTE_ORDER == LITTLE_ENDIAN) */
-
-#error "Macros for Big-Endians are incomplete"
-
-/*
-#define htoles(x) ((u_int16_t)(x))
-#define letohs(x) ((u_int16_t)(x))
-#define htolel(x) ((u_int32_t)(x))
-#define letohl(x) ((u_int32_t)(x))
-*/
-#endif /* (BYTE_ORDER == LITTLE_ENDIAN) */
-
-
-#ifdef _KERNEL
-
-/*
- * Type of copy for mb_{put|get}_mem()
- */
-#define MB_MSYSTEM 0 /* use bcopy() */
-#define MB_MUSER 1 /* use copyin()/copyout() */
-#define MB_MINLINE 2 /* use an inline copy loop */
-#define MB_MZERO 3 /* bzero(), mb_put_mem only */
-#define MB_MCUSTOM 4 /* use an user defined function */
-
-struct mbuf;
-struct mbchain;
-
-typedef int mb_copy_t(struct mbchain *mbp, c_caddr_t src, caddr_t dst, int len);
-
-struct mbchain {
- struct mbuf * mb_top; /* head of mbufs chain */
- struct mbuf * mb_cur; /* current mbuf */
- int mb_mleft; /* free space in the current mbuf */
- int mb_count; /* total number of bytes */
- mb_copy_t * mb_copy; /* user defined copy function */
- void * mb_udata; /* user data */
-};
-
-struct mdchain {
- struct mbuf * md_top; /* head of mbufs chain */
- struct mbuf * md_cur; /* current mbuf */
- u_char * md_pos; /* offset in the current mbuf */
-};
-
-int m_fixhdr(struct mbuf *m);
-
-int mb_init(struct mbchain *mbp);
-void mb_initm(struct mbchain *mbp, struct mbuf *m);
-void mb_done(struct mbchain *mbp);
-struct mbuf *mb_detach(struct mbchain *mbp);
-int mb_fixhdr(struct mbchain *mbp);
-caddr_t mb_reserve(struct mbchain *mbp, int size);
-
-int mb_put_uint8(struct mbchain *mbp, u_int8_t x);
-int mb_put_uint16be(struct mbchain *mbp, u_int16_t x);
-int mb_put_uint16le(struct mbchain *mbp, u_int16_t x);
-int mb_put_uint32be(struct mbchain *mbp, u_int32_t x);
-int mb_put_uint32le(struct mbchain *mbp, u_int32_t x);
-int mb_put_int64be(struct mbchain *mbp, int64_t x);
-int mb_put_int64le(struct mbchain *mbp, int64_t x);
-int mb_put_mem(struct mbchain *mbp, c_caddr_t source, int size, int type);
-int mb_put_mbuf(struct mbchain *mbp, struct mbuf *m);
-int mb_put_uio(struct mbchain *mbp, struct uio *uiop, int size);
-
-int md_init(struct mdchain *mdp);
-void md_initm(struct mdchain *mbp, struct mbuf *m);
-void md_done(struct mdchain *mdp);
-void md_append_record(struct mdchain *mdp, struct mbuf *top);
-int md_next_record(struct mdchain *mdp);
-int md_get_uint8(struct mdchain *mdp, u_int8_t *x);
-int md_get_uint16(struct mdchain *mdp, u_int16_t *x);
-int md_get_uint16le(struct mdchain *mdp, u_int16_t *x);
-int md_get_uint16be(struct mdchain *mdp, u_int16_t *x);
-int md_get_uint32(struct mdchain *mdp, u_int32_t *x);
-int md_get_uint32be(struct mdchain *mdp, u_int32_t *x);
-int md_get_uint32le(struct mdchain *mdp, u_int32_t *x);
-int md_get_int64(struct mdchain *mdp, int64_t *x);
-int md_get_int64be(struct mdchain *mdp, int64_t *x);
-int md_get_int64le(struct mdchain *mdp, int64_t *x);
-int md_get_mem(struct mdchain *mdp, caddr_t target, int size, int type);
-int md_get_mbuf(struct mdchain *mdp, int size, struct mbuf **m);
-int md_get_uio(struct mdchain *mdp, struct uio *uiop, int size);
-
-#endif /* ifdef _KERNEL */
-
-#endif /* !_SYS_MCHAIN_H_ */
diff --git a/sys/sys/md4.h b/sys/sys/md4.h
deleted file mode 100644
index 5a648c87f63a..000000000000
--- a/sys/sys/md4.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* MD4.H - header file for MD4C.C
- * $FreeBSD$
- */
-
-/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- rights reserved.
-
- License to copy and use this software is granted provided that it
- is identified as the "RSA Data Security, Inc. MD4 Message-Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
- License is also granted to make and use derivative works provided
- that such works are identified as "derived from the RSA Data
- Security, Inc. MD4 Message-Digest Algorithm" in all material
- mentioning or referencing the derived work.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
- */
-
-#ifndef _MD4_H_
-#define _MD4_H_
-/* MD4 context. */
-typedef struct MD4Context {
- u_int32_t state[4]; /* state (ABCD) */
- u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
- unsigned char buffer[64]; /* input buffer */
-} MD4_CTX;
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-void MD4Init(MD4_CTX *);
-void MD4Update(MD4_CTX *, const unsigned char *, unsigned int);
-void MD4Pad(MD4_CTX *);
-void MD4Final(unsigned char [16], MD4_CTX *);
-char * MD4End(MD4_CTX *, char *);
-char * MD4File(const char *, char *);
-char * MD4Data(const unsigned char *, unsigned int, char *);
-__END_DECLS
-
-#endif /* _MD4_H_ */
diff --git a/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all b/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all
deleted file mode 100644
index 9cdd9641bb0f..000000000000
--- a/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.all
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * òÕÓÓËÉÊ ËÁÌÅÎÄÁÒØ
- *
- * $FreeBSD$
- */
-
-#ifndef _ru_RU_KOI8_R_all
-#define _ru_RU_KOI8_R_all
-
-#include <ru_RU.KOI8-R/calendar.common>
-#include <ru_RU.KOI8-R/calendar.msk>
-#include <ru_RU.KOI8-R/calendar.pagan>
-#include <ru_RU.KOI8-R/calendar.orthodox>
-
-#endif /* !_ru_RU_KOI8_R_all */
diff --git a/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.msk b/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.msk
deleted file mode 100644
index 4db9563703d2..000000000000
--- a/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.msk
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * ðÅÒÅ×ÏÄ ÞÁÓÏ× ÄÌÑ ÍÏÓËÏ×ÓËÏÊ ×ÒÅÍÅÎÎÏÊ ÚÏÎÙ
- *
- * $FreeBSD$
- */
-
-#ifndef _ru_RU_KOI8_R_msk_
-#define _ru_RU_KOI8_R_msk_
-
-LANG=ru_RU.KOI8-R
-
-03/SunLast îÁÞÁÌÏ ÍÏÓËÏ×ÓËÏÇÏ ÌÅÔÎÅÇÏ ×ÒÅÍÅÎÉ; ÞÁÓÙ ÐÅÒÅ×ÏÄÑÔÓÑ ×ÐÅÒÅÄ
-10/SunLast ëÏÎÅà ÍÏÓËÏ×ÓËÏÇÏ ÌÅÔÎÅÇÏ ×ÒÅÍÅÎÉ; ÞÁÓÙ ÐÅÒÅ×ÏÄÑÔÓÑ ÎÁÚÁÄ
-
-#endif /* !_ru_RU_KOI8_R_msk_ */
-
diff --git a/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox b/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox
deleted file mode 100644
index ac38458d4a68..000000000000
--- a/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * ðÒÁ×ÏÓÌÁ×ÎÙÅ ÐÒÁÚÄÎÉËÉ
- *
- * $FreeBSD$
- */
-
-#ifndef _ru_RU_KOI8_R_orthodox_
-#define _ru_RU_KOI8_R_orthodox_
-
-LANG=ru_RU.KOI8-R
-Paskha=ðÁÓÈÁ
-
-21 ÓÅÎ òÏÖÄÅÓÔ×Ï ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
-28 ÓÅÎ ÷ÏÚÄ×ÉÖÅÎÉÅ ëÒÅÓÔÁ çÏÓÐÏÄÎÑ
-14 ÏËÔ ðÏËÒÏ× ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
- 4 ÄÅË ÷×ÅÄÅÎÉÅ ×Ï ÈÒÁÍ ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
- 7 ÑÎ× òÏÖÄÅÓÔ×Ï èÒÉÓÔÏ×Ï
-19 ÑÎ× âÏÇÏÑ×ÌÅÎÉÅ ÉÌÉ ëÒÅÝÅÎÉÅ çÏÓÐÏÄÎÅ
-15 ÆÅ× óÒÅÔÅÎÉÅ çÏÓÐÏÄÎÅ
-ðÁÓÈÁ-46 ÷ÅÌÉËÉÊ ðÏÓÔ
-ðÁÓÈÁ-7 ÷ÅÒÂÎÏÅ ÷ÏÓËÒÅÓÅÎØÅ
-ðÁÓÈÁ-3 ÷ÅÌÉËÉÊ þÅÔ×ÅÒÇ
-ðÁÓÈÁ-2 óÔÒÁÓÔÎÁÑ ðÑÔÎÉÃÁ
-ðÁÓÈÁ ÷ÏÓËÒÅÓÅÎÉÅ èÒÉÓÔÏ×Ï
-ðÁÓÈÁ+39 ÷ÏÚÎÅÓÅÎÉÅ
-ðÁÓÈÁ+49 ðÑÔÉÄÅÓÑÔÎÉÃÁ
-ðÁÓÈÁ+56 ôÒÏÉÃÉÎ äÅÎØ
-ðÁÓÈÁ+60 ðÒÁÚÄÎÉË ôÅÌÁ èÒÉÓÔÏ×Á
- 7 ÁÐÒ âÌÁÇÏ×ÅÝÅÎÉÅ ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
-19 Á×Ç ðÒÅÏÂÒÁÖÅÎÉÅ çÏÓÐÏÄÎÅ
-28 Á×Ç õÓÐÅÎÉÅ ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
-
-#endif /* !_ru_RU_KOI8_R_orthodox_ */
-
diff --git a/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan b/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan
deleted file mode 100644
index afcd809e4987..000000000000
--- a/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * ñÚÙÞÅÓËÉÅ ÐÒÁÚÄÎÉËÉ
- *
- * $FreeBSD$
- */
-
-#ifndef _ru_RU_KOI8_R_pagan_
-#define _ru_RU_KOI8_R_pagan_
-
-LANG=ru_RU.KOI8-R
-Paskha=ðÁÓÈÁ
-
-21 ÄÅË* úÉÍÎÅÅ ÓÏÌÎÃÅÓÔÏÑÎÉÅ
-25 ÄÅË ëÏÌÑÄÁ (ÓÄ×ÉÎÕÔÏÅ ÚÉÍÎÅÅ ÓÏÌÎÃÅÓÔÏÑÎÉÅ)
-31 ÄÅË îÅÄÅÌÑ ðÒÁÏÔÃÏ×
- 6 ÑÎ× äÅÎØ ëÁÝÅÑ É ÷ÅÌÅÓÁ, ÐÏÓÔ
-24 ÆÅ× äÅÎØ ÷ÅÌÅÓÁ
-29 ÆÅ× äÅÎØ ëÁÝÅÑ
- 1 ÍÁÒ äÅÎØ íÁÒÅÎÙ
-14 ÍÁÒ îÏ×ÙÊ çÏÄ, ï×ÓÅÎØ ÍÁÌÙÊ
-ðÁÓÈÁ-47 íÁÓÌÅÎÉÃÁ
-ðÁÓÈÁ+7 ëÒÁÓÎÁÑ çÏÒËÁ
-ðÁÓÈÁ+16 òÁÄÕÎÉÃÁ
-20 ÍÁÒ* ÷ÅÓÅÎÎÉÅ ÒÁ×ÎÏÄÅÎÓÔ×ÉÅ
- 7 ÁÐÒ äÅÎØ íÁÒÅÎÙ (ÓÄ×ÉÎÕÔÏÅ ×ÅÓÅÎÎÅÅ ÒÁ×ÎÏÄÅÎÓÔ×ÉÅ)
- 6 ÍÁÊ äÅÎØ äÁÖØÂÏÇÁ, ï×ÓÅÎØ ÂÏÌØÛÏÊ
-22 ÍÁÊ ñÒÉÌÉÎ äÅÎØ
-21 ÉÀÎ* ìÅÔÎÅÅ ÓÏÌÎÃÅÓÔÏÑÎÉÅ
- 1 ÉÀÌ òÕÓÁÌØÎÁÑ îÅÄÅÌÑ
- 7 ÉÀÌ ëÕÐÁÌÁ (ÓÄ×ÉÎÕÔÏÅ ÌÅÔÎÅÅ ÓÏÌÎÃÅÓÔÏÑÎÉÅ)
-27 ÉÀÌ ïÔÂÏÒ ÖÅÒÔ× ðÅÒÕÎÕ, ÒÕÓÁÌÉÉ
- 2 Á×Ç ðÅÒÕÎÏ× äÅÎØ
-21 Á×Ç äÅÎØ óÔÒÉÂÏÇÁ
-28 Á×Ç õÓÐÅÎÉÅ úÌÁÔÏÇÏÒËÉ
-14 ÓÅÎ äÅÎØ ÷ÏÌÈÁ úÍÅÅ×ÉÞÁ
-22 ÓÅÎ* ðÏ×ÏÒÏÔ Ë ÚÉÍÅ (ÏÓÅÎÎÅÅ ÒÁ×ÎÏÄÅÎÓÔ×ÉÅ)
-10 ÎÏÑ äÅÎØ íÁËÏÛÉ
-21 ÎÏÑ äÅÎØ ó×ÁÒÏÇÁ É óÅÍÁÒÇÌÁ
- 9 ÄÅË äÅÎØ äÁÖØÂÏÇÁ É íÁÒÅÎÙ
-
-#endif /* !_ru_RU_KOI8_R_pagan_ */
-
diff --git a/usr.bin/ee/FREEBSD-upgrade b/usr.bin/ee/FREEBSD-upgrade
deleted file mode 100644
index 9e012989ca16..000000000000
--- a/usr.bin/ee/FREEBSD-upgrade
+++ /dev/null
@@ -1,28 +0,0 @@
-$FreeBSD$
-
-Hugh F. Mahon's EasyEditor
- originals can be found at: http://mahon.cwx.net/
- http://www.users.qwest.net/~hmahon/
-
-Imported by:
-
- cvs import -m "Virgin import of Hugh F. Mahon's EasyEditor 1.4.1." \
- src/usr.bin/ee HUGH_F_MAHON ee_1_4_1
-
-Notes:
- 1. Due to an error this release was imported as 1.4.1, while in fact
- it is version 1.4.2.
-
- 2. Due to historical reasons files layout has been changed from the
- vendor's one. The following log shows details:
-
- $ tar xvfz tar xvfz ee-1.4.2.src.tgz
- $ cd easyedit
- $ rm Makefile create.make genstr make.default
- $ mv README.ee README
- $ mkdir -p nls/en_US.ISO_8859-1
- $ mv ee.msg nls/en_US.ISO_8859-1/
-
-
-sobomax@FreeBSD.org
-27 May 2000
diff --git a/usr.bin/ee/nls/de_DE.ISO8859-1/ee.msg b/usr.bin/ee/nls/de_DE.ISO8859-1/ee.msg
deleted file mode 100644
index 80a99616df6e..000000000000
--- a/usr.bin/ee/nls/de_DE.ISO8859-1/ee.msg
+++ /dev/null
@@ -1,185 +0,0 @@
-$ This file contains the messages for ee ("easy editor"). See the file
-$ ee.i18n.guide for more information
-$
-$ For ee patchlevel 3
-$
-$ $FreeBSD$
-$
-$
-$set 1
-$quote "
-1 "Modus-Menü"
-2 "Tab -> Leerzeichen "
-3 "Suche ohne Groß/Klein"
-4 "Ränder beachten "
-5 "Automatische Absätze "
-6 "8-Bit Zeichen (Uml.) "
-7 "Hilfefenster "
-8 "rechter Rand "
-9 "Ende-Menü"
-10 "Speichern"
-11 "Verwerfen"
-12 "Dateimenü"
-13 "Öffnen"
-14 "Schreiben in Datei"
-15 "Speichern"
-16 "Aktuellen Inhalt drucken"
-17 "Textsuche"
-18 "Suche nach ..."
-19 "Suchen"
-20 "Rechtschreibung"
-21 "'spell' benutzen"
-22 "'ispell' benutzen"
-23 "Verschiedenes"
-24 "Absatz formatieren"
-25 "Unix-Kommando"
-26 "Rechtschreibung prüfen"
-27 "Hauptmenü"
-28 "Editor beenden"
-29 "Hilfe"
-30 "Dateioperationen"
-31 "Bildschirm regenerieren"
-32 "Einstellungen"
-33 "Suche"
-34 "Verschiedenes"
-35 "Steuertasten: "
-36 "^a ASCII-Code direkt ^i Tabulator ^r nach rechts "
-37 "^b Ende des Textes ^j neue Zeile ^t Anfang des Textes "
-38 "^c Befehl ^k Zeichen löschen ^u hoch "
-39 "^d runter ^l nach links ^v Wort zurückholen "
-40 "^e Textsuche (Menü) ^m neue Zeile ^w Wort löschen "
-41 "^f Zeichen zurückholen ^n nächste Seite ^x Weitersuchen "
-42 "^g zum Zeilenanfang ^o zum Zeilenende ^y Zeile löschen "
-43 "^h Rückschritt ^p vorige Seite ^z Zeile zurückholen "
-44 "^[ (Escape) Menü ESC-Enter: ee beenden "
-45 " "
-46 "Befehle: "
-47 "hilfe : diese Hilfe anzeigen datei : Dateinamen anzeigen "
-48 "lesen : Datei öffnen zeichen : ASCII-Code anzeigen "
-49 "schreiben:Datei schreiben grosskl : Suche mit Groß/Kleinschr."
-50 "ende : Sichern und Beenden klein : Suche ohne Groß/Klein. "
-51 "abbruch : Abbruch ohne Sichern !bef : Unix-Befehl \"bef\" ausf. "
-52 "zeile : Zeilennummer anzeigen 0-9 : Zur angegebenen Zeile "
-53 "leer : Tabulat. in Leerz. wandeln tabs : Tabulatoren belassen "
-54 " "
-55 " ee [+#] [-i] [-e] [-h] [datei(en)] "
-56 "+#: zu Zeile # -i: k. Hilfefenster -e: Tabulatoren lassen -h: k. Hervorheb."
-57 "^[ (Escape) Menü ^e Textsuche ^y Zeile löschen ^u hoch ^p Seite zur. "
-58 "^a ASCII-Code ^x Weitersuchen ^z Zeile rückhl. ^d runter ^n Seite vor "
-59 "^b Textende ^g Zeilenanfang ^w Wort löschen ^l links "
-60 "^t Textanfang ^o Zeilenende ^v Wort rückhol. ^r rechts "
-61 "^c Befehl ^k Zeichen lösch. ^f Zeichen rückholen ESC-Enter: Ende ee "
-62 "hilfe: Hilfe |datei : Dateiname anzeigen |zeile: Zeilennumer "
-63 "lesen: Datei lesen |zeichen:ASCII-Code des Zeichens |0-9 : zur Zeile "
-64 "schre: Datei schreib. |grosskl:Suche mit Groß/Klein |ende : Speichern,Ende "
-65 "!bef : Unix-\"bef\" |klein: Suche ohne Groß/Klein |abbr : Abbruch "
-66 "leer : Tab -> Leerz. |tabs : Tabulatoren belassen "
-67 " Escape (^[) drücken für Menü"
-68 "Keine Datei"
-69 "ASCII-Code: "
-70 "Pufferinhalt nach \"%s\" schreiben "
-71 "Befehl: "
-72 "Dateiname zum Schreiben: "
-73 "Dateiname zum Lesen: "
-74 "Zeichen = %d"
-75 "Unbekannter Befehl \"%s\""
-76 "Angegebener Befehl ist nicht eindeutig"
-77 "Zeile %d "
-78 "Länge = %d"
-79 "Aktuelle Datei ist \"%s\" "
-80 "Benutzung: %s [-i] [-e] [-h] [+zeilennummer] [dateien]\n"
-81 " -i Hilfefenster ausschalten\n"
-82 " -e Tabulatoren nicht in Leerzeichen wandeln\n"
-83 " -h keine Hervorhebungen\n"
-84 "Datei \"%s\" ist ein Verzeichnis"
-85 "Neue Datei \"%s\""
-86 "Datei \"%s\" kann nicht geöffnet werden"
-87 "Datei \"%s\", %d Zeilen"
-88 "Lesen der Datei \"%s\" beendet"
-89 "Lese die Datei \"%s\""
-90 ", schreibgeschützt"
-91 "Datei \"%s\", %d Zeilen"
-92 "Dateinamen eingeben: "
-93 "Kein Name angegeben; Datei nicht gespeichert"
-94 "Pufferinhalt geändert, wirklich verlassen? (j/n [n]) "
-95 "j"
-96 "Datei existiert bereits, überschreiben? (j/n) [n] "
-97 "Datei \"%s\" kann nicht erzeugt werden"
-98 "Schreibe Datei \"%s\""
-99 "\"%s\" %d Zeilen, %d Zeichen"
-100 " ...Suche läuft"
-101 "Zeichenfolge \"%s\" nicht gefunden"
-102 "Suchen nach: "
-103 "Kann %s nicht ausführen"
-104 "Bitte die Eingabetaste drücken "
-105 "Escape zum Beenden"
-106 "Menü ist zu groß für das Fenster"
-107 "eine beliebige Taste drücken "
-108 "Unix-Befehl: "
-109 "...formatiere Absatz..."
-110 "<!echo 'Liste der nicht gefundenen Wörter'; echo -=-=-=-=-=-"
-111 "Sende den Pufferinhalt an 'spell'"
-112 "Rechter Rand: "
-113 "Eingeschränkter Modus: gewünschte Operation unzulässig"
-114 "EIN"
-115 "AUS"
-116 "HILFE"
-117 "SCHREIBEN"
-118 "LESEN"
-119 "ZEILE"
-120 "DATEI"
-121 "ZEICHEN"
-122 "REGENERIEREN"
-123 "UMNUMERIEREN"
-124 "AUTOR"
-125 "VERSION"
-126 "GROSSKL"
-127 "KLEIN"
-128 "LEER"
-129 "TABS"
-130 "ENDE"
-131 "ABBRUCH"
-132 "INFO"
-133 "[INFO]"
-134 "RAND"
-135 "[RAND]"
-136 "FORMAT."
-137 "[FORMAT.]"
-138 "ECHO"
-139 "DRUCKBEFEHL"
-140 "RECHTERRAND"
-141 "HERVORHEB."
-142 "[HERVORHEB.]"
-143 "8-BIT"
-144 "[8-BIT]"
-145 "Emacs-Tastenbelegung "
-146 "^a Zeilenanfang ^i Tabulator ^r Wort zurückholen "
-147 "^b ein Zeichen zurück ^j Zeichen zurückholen ^t Textanfang "
-148 "^c Befehl ^k Zeile löschen ^u Textende "
-149 "^d Zeichen löschen ^l Zeile zurückholen ^v nächste Seite "
-150 "^e Zeilenendee ^m neue Zeile ^w Wort löschen "
-151 "^f ein Zeichen vorwärts ^n neue Zeile ^x Weitersuchen "
-152 "^g vorige Seite ^o ASCII-Zeichen einfü. ^y Textsuche "
-153 "^h Rückschritt ^p vorige Zeile ^z nächstes Wort "
-154 "^[ (Escape) Menü ^y Suchtext eing. ^k Zeile löschen ^p vor.Zeile ^g vor.Seite"
-155 "^o ASCII-Zeichen ^x Weitersuchen ^l Zeile rückhol ^n nä. Zeile ^v nä. Seite"
-156 "^u Textende ^a Zeilenanfang ^w Wort löschen ^b ein Zeichen zurück "
-157 "^t Textanfang ^e Zeilenende ^r Wort rückhol. ^f ein Zeichen vor "
-158 "^c Befehl ^d Zeichen lösch. ^j Zeich. rückh. ^z nächstes Wort "
-159 "EMACS"
-160 "[EMACS]"
-161 " +<zahl> Zeiger auf Zeile <zahl> setzen"
-162 "Kann die Datei .init.ee nicht schreiben, Konfiguration nicht gespeichert!"
-163 "ee-Konfiguration in Datei %s gespeichert"
-164 "speichere Editor-Konfiguration"
-165 "speichere ee-Konfiguration"
-166 "speichern im aktuellen Verzeichnis"
-167 "speichern im Home-Verzeichnis"
-168 "ee-Konfiguration nicht gespeichert"
-169 "beim Aufruf von ree muß ein Dateiname angegeben werden"
-180 "Menü zu groß für den Bildschirm"
-181 "^^weiter^^"
-182 "VVweiterVV"
-183 "16-bit Zeichen "
-184 "16BIT"
-185 "NO16BIT"
diff --git a/usr.bin/ee/nls/en_US.US-ASCII/ee.msg b/usr.bin/ee/nls/en_US.US-ASCII/ee.msg
deleted file mode 100644
index ccefcc4b3e62..000000000000
--- a/usr.bin/ee/nls/en_US.US-ASCII/ee.msg
+++ /dev/null
@@ -1,185 +0,0 @@
-$ This file contains the messages for ee ("easy editor"). See the file
-$ ee.i18n.guide for more information
-$
-$ For ee patchlevel 3
-$
-$ $FreeBSD$
-$
-$
-$set 1
-$quote "
-1 "modes menu"
-2 "tabs to spaces "
-3 "case sensitive search"
-4 "margins observed "
-5 "auto-paragraph format"
-6 "eightbit characters "
-7 "info window "
-8 "right margin "
-9 "leave menu"
-10 "save changes"
-11 "no save"
-12 "file menu"
-13 "read a file"
-14 "write a file"
-15 "save file"
-16 "print editor contents"
-17 "search menu"
-18 "search for ..."
-19 "search"
-20 "spell menu"
-21 "use 'spell'"
-22 "use 'ispell'"
-23 "miscellaneous menu"
-24 "format paragraph"
-25 "shell command"
-26 "check spelling"
-27 "main menu"
-28 "leave editor"
-29 "help"
-30 "file operations"
-31 "redraw screen"
-32 "settings"
-33 "search"
-34 "miscellaneous"
-35 "Control keys: "
-36 "^a ascii code ^i tab ^r right "
-37 "^b bottom of text ^j newline ^t top of text "
-38 "^c command ^k delete char ^u up "
-39 "^d down ^l left ^v undelete word "
-40 "^e search prompt ^m newline ^w delete word "
-41 "^f undelete char ^n next page ^x search "
-42 "^g begin of line ^o end of line ^y delete line "
-43 "^h backspace ^p prev page ^z undelete line "
-44 "^[ (escape) menu ESC-Enter: exit ee "
-45 " "
-46 "Commands: "
-47 "help : get this info file : print file name "
-48 "read : read a file char : ascii code of char "
-49 "write : write a file case : case sensitive search "
-50 "exit : leave and save nocase : case insensitive search "
-51 "quit : leave, no save !cmd : execute \"cmd\" in shell "
-52 "line : display line # 0-9 : go to line \"#\" "
-53 "expand : expand tabs noexpand: do not expand tabs "
-54 " "
-55 " ee [+#] [-i] [-e] [-h] [file(s)] "
-56 "+# :go to line # -i :no info window -e : don't expand tabs -h :no highlight"
-57 "^[ (escape) menu ^e search prompt ^y delete line ^u up ^p prev page "
-58 "^a ascii code ^x search ^z undelete line ^d down ^n next page "
-59 "^b bottom of text ^g begin of line ^w delete word ^l left "
-60 "^t top of text ^o end of line ^v undelete word ^r right "
-61 "^c command ^k delete char ^f undelete char ESC-Enter: exit ee "
-62 "help : get help info |file : print file name |line : print line # "
-63 "read : read a file |char : ascii code of char |0-9 : go to line \"#\""
-64 "write: write a file |case : case sensitive search |exit : leave and save "
-65 "!cmd : shell \"cmd\" |nocase: ignore case in search |quit : leave, no save"
-66 "expand: expand tabs |noexpand: do not expand tabs "
-67 " press Escape (^[) for menu"
-68 "no file"
-69 "ascii code: "
-70 "sending contents of buffer to \"%s\" "
-71 "command: "
-72 "name of file to write: "
-73 "name of file to read: "
-74 "character = %d"
-75 "unknown command \"%s\""
-76 "entered command is not unique"
-77 "line %d "
-78 "length = %d"
-79 "current file is \"%s\" "
-80 "usage: %s [-i] [-e] [-h] [+line_number] [file(s)]\n"
-81 " -i turn off info window\n"
-82 " -e do not convert tabs to spaces\n"
-83 " -h do not use highlighting\n"
-84 "file \"%s\" is a directory"
-85 "new file \"%s\""
-86 "can't open \"%s\""
-87 "file \"%s\", %d lines"
-88 "finished reading file \"%s\""
-89 "reading file \"%s\""
-90 ", read only"
-91 "file \"%s\", %d lines"
-92 "enter name of file: "
-93 "no filename entered: file not saved"
-94 "changes have been made, are you sure? (y/n [n]) "
-95 "y"
-96 "file already exists, overwrite? (y/n) [n] "
-97 "unable to create file \"%s\""
-98 "writing file \"%s\""
-99 "\"%s\" %d lines, %d characters"
-100 " ...searching"
-101 "string \"%s\" not found"
-102 "search for: "
-103 "could not exec %s"
-104 "press return to continue "
-105 "press Esc to cancel"
-106 "menu too large for window"
-107 "press any key to continue "
-108 "shell command: "
-109 "...formatting paragraph..."
-110 "<!echo 'list of unrecognized words'; echo -=-=-=-=-=-"
-111 "sending contents of edit buffer to 'spell'"
-112 "right margin is: "
-113 "restricted mode: unable to perform requested operation"
-114 "ON"
-115 "OFF"
-116 "HELP"
-117 "WRITE"
-118 "READ"
-119 "LINE"
-120 "FILE"
-121 "CHARACTER"
-122 "REDRAW"
-123 "RESEQUENCE"
-124 "AUTHOR"
-125 "VERSION"
-126 "CASE"
-127 "NOCASE"
-128 "EXPAND"
-129 "NOEXPAND"
-130 "EXIT"
-131 "QUIT"
-132 "INFO"
-133 "NOINFO"
-134 "MARGINS"
-135 "NOMARGINS"
-136 "AUTOFORMAT"
-137 "NOAUTOFORMAT"
-138 "ECHO"
-139 "PRINTCOMMAND"
-140 "RIGHTMARGIN"
-141 "HIGHLIGHT"
-142 "NOHIGHLIGHT"
-143 "EIGHTBIT"
-144 "NOEIGHTBIT"
-145 "emacs key bindings "
-146 "^a beginning of line ^i tab ^r restore word "
-147 "^b back 1 char ^j undel char ^t begin of file "
-148 "^c command ^k delete line ^u end of file "
-149 "^d delete char ^l undelete line ^v next page "
-150 "^e end of line ^m newline ^w delete word "
-151 "^f forward 1 char ^n next line ^x search "
-152 "^g go back 1 page ^o ascii char insert ^y search prompt "
-153 "^h backspace ^p prev line ^z next word "
-154 "^[ (escape) menu ^y search prompt ^k delete line ^p prev li ^g prev page"
-155 "^o ascii code ^x search ^l undelete line ^n next li ^v next page"
-156 "^u end of file ^a begin of line ^w delete word ^b back 1 char "
-157 "^t begin of file ^e end of line ^r restore word ^f forward 1 char "
-158 "^c command ^d delete char ^j undelete char ^z next word "
-159 "EMACS"
-160 "NOEMACS"
-161 " +# put cursor at line #\n"
-162 "unable to open .init.ee for writing, no configuration saved!"
-163 "ee configuration saved in file %s"
-164 "save editor configuration"
-165 "save ee configuration"
-166 "save in current directory"
-167 "save in home directory"
-168 "ee configuration not saved"
-169 "must specify a file when invoking ree"
-180 "menu too large for window"
-181 "^^more^^"
-182 "VVmoreVV"
-183 "16 bit characters "
-184 "16BIT"
-185 "NO16BIT"
diff --git a/usr.bin/ee/nls/fr_FR.ISO8859-1/ee.msg b/usr.bin/ee/nls/fr_FR.ISO8859-1/ee.msg
deleted file mode 100644
index e93ff22dfa59..000000000000
--- a/usr.bin/ee/nls/fr_FR.ISO8859-1/ee.msg
+++ /dev/null
@@ -1,185 +0,0 @@
-$ This file contains the messages for ee ("easy editor"). See the file
-$ ee.i18n.guide for more information
-$
-$ For ee patchlevel 3
-$
-$ $FreeBSD$
-$
-$
-$set 1
-$quote "
-1 "menu de configuration "
-2 "tabulation -> espaces "
-3 "recherche sensible aux maj/min "
-4 "respect des marges "
-5 "formattage automatique des paragraphes"
-6 "caractères 8 bits "
-7 "fenêtre d'informations "
-8 "marge de droite "
-9 "menu de sortie"
-10 "enregistrer les modifications"
-11 "ne pas enregistrer"
-12 "menu fichiers"
-13 "lire un fichier"
-14 "écrire un fichier"
-15 "enregistrer un fichier"
-16 "imprimer le contenu de l'éditeur"
-17 "menu recherche"
-18 "recherche de..."
-19 "rechercher"
-20 "menu correcteur orthographique"
-21 "utiliser 'spell'"
-22 "utiliser 'ispell'"
-23 "menu divers"
-24 "formatter le paragraphe"
-25 "commande du shell"
-26 "vérifier l'orthographe"
-27 "menu principal"
-28 "quitter l'éditeur"
-29 "aide"
-30 "opérations sur les fichiers"
-31 "rafraîchir l'écran"
-32 "configuration"
-33 "recherche"
-34 "divers"
-35 "Contrôle + touche: "
-36 "^a code ascii ^i tabulation ^r droite "
-37 "^b fin du texte ^j nouvelle ligne ^t début du texte "
-38 "^c commande ^k effacer caractère ^u haut "
-39 "^d bas ^l gauche ^v annuler effacement mot "
-40 "^e entrer recherche ^m nouvelle ligne ^w effacer un mot "
-41 "^f annuler eff. caract. ^n page suivante ^x recherche "
-42 "^g début de ligne ^o fin de ligne ^y effacer ligne "
-43 "^h arrière ^p page précédente ^z annuler effacement ligne"
-44 "^[ (échappement) menu ESC-Enter: quitter ee "
-45 " "
-46 "Commandes: "
-47 "aide : pour cet écran d'info fichier: donne le nom du fichier "
-48 "lire : lire un fichier caract : code ascii d'un caractère"
-49 "écrire : créer un fichier minmaj : recherche sensible aux maj/min"
-50 "fin : quitter et enregistrer pasmin : recherche insensible aux maj/min"
-51 "quitter: quitter, ne pas enregistrer !cmd : exécute \"cmd\" par le shell"
-52 "ligne : indique le numéro de ligne 0-9 : aller à la ligne \"#\" "
-53 "tabs : étendre les tabulations pastabs: ne pas étendre les tabulations"
-54 " "
-55 " ee [+#] [-i] [-e] [-h] [fichier(s)] "
-56 " -i : pas de fenêtre d'info -e : ne pas étendre les tabs -h : pas de surbrillance"
-57 "^[ (échap.) menu ^e rechercher... ^y efface ligne ^u haut ^p page préc."
-58 "^a code ascii ^x rechercher ^z annul. eff. ligne ^d bas ^n page suiv."
-59 "^b fin du texte ^g début de ligne ^w efface mot ^l gauche "
-60 "^t début du texte ^o fin de ligne ^v annul. eff. mot ^r droite "
-61 "^c commande ^k efface caract. ^f annul. eff. caract. ESC-Enter: quitter "
-62 "aide: fenêtre d'aide |fichier: nom du fichier |ligne: numéro de ligne"
-63 "lire: lecture fichier|caract : code ascii du car. |0-9: aller ligne \"#\""
-64 "écrire: crée un fich. |minmaj: rech. sensible min/maj|fin: quitte et sauve"
-65 "!cmd: shell \"cmd\" |pasmin: rech. insens. min/maj |quitte: quitte sans sauver"
-66 "tabs: étend les tabs |pastabs: n'étend pas les tabulations"
-67 " pressez sur échap. (^[) pour le menu"
-68 "pas de fichier"
-69 "code ascii : "
-70 "le contenu du buffer est imprimé sur \"%s\" "
-71 "commande : "
-72 "nom du fichier à créer : "
-73 "nom du fichier à lire : "
-74 "caractère = %d"
-75 "commande inconnue : \"%s\""
-76 "la commande tapée est ambiguë"
-77 "ligne %d "
-78 "longueur = %d"
-79 "le fichier courant est \"%s\" "
-80 "utilisation : %s [-i] [-e] [-h] [+numéro_de_ligne] [fichier(s)]\n"
-81 " -i supprime la fenêtre d'informations\n"
-82 " -e ne convertit pas les tabs en espaces\n"
-83 " -h n'utilise pas de surbrillance\n"
-84 "le fichier \"%s\" est un répertoire"
-85 "nouveau fichier \"%s\""
-86 "impossible de d'ouvrir \"%s\""
-87 "fichier \"%s\", %d lignes"
-88 "le fichier \"%s\" a été lu"
-89 "lecture du fichier \"%s\""
-90 ", lecture seule"
-91 "fichier \"%s\", %d lignes"
-92 "entrez un nom de fichier : "
-93 "pas de nom de fichier donné : fichier non enregistré"
-94 "des changements ont été effectués, êtes vous sûr ? (o/n [n]) "
-95 "o"
-96 "le fichier existe déjà, réécrire ? (o/n) [n] "
-97 "impossible de créer le fichier \"%s\""
-98 "écriture du fichier \"%s\""
-99 "\"%s\" %d lignes, %d caractères"
-100 " ...recherche"
-101 "chaîne \"%s\" non trouvée"
-102 "rechercher : "
-103 "impossible d'exécuter %s"
-104 "tapez entrée pour continuer "
-105 "pressez sur échap. pour annuler"
-106 "menu trop grand pour la fenêtre"
-107 "appuyez sur une touche pour continuer "
-108 "commande du shell : "
-109 "...formattage du paragraphe..."
-110 "<!echo 'liste des mots non reconnus'; echo -=-=-=-=-=-"
-111 "envoi du contenu du buffer à 'spell'"
-112 "colonne de la marge de droite : "
-113 "mode restreint : impossible d'effectuer l'opération demandée"
-114 "OUI"
-115 "NON"
-116 "AIDE"
-117 "ECRIRE"
-118 "LIRE"
-119 "LIGNE"
-120 "FICHIER"
-121 "CARACTERE"
-122 "RAFRAICHIR"
-123 "RENUMEROTER"
-124 "AUTEUR"
-125 "VERSION"
-126 "MINMAJ"
-127 "PASMINMAJ"
-128 "TABS"
-129 "PASTABS"
-130 "FIN"
-131 "QUITTE"
-132 "INFO"
-133 "PASINFO"
-134 "MARGES"
-135 "PASMARGES"
-136 "AUTOFORMAT"
-137 "PASAUTOFORMAT"
-138 "ECHO"
-139 "COMMANDEIMPRESSION"
-140 "MARGEDROITE"
-141 "SURBRILLANT"
-142 "PASSURBRILLANT"
-143 "8BIT"
-144 "PAS8BIT"
-145 "caractères de contrôle comme emacs "
-146 "^a début de ligne ^i tabulation ^r annule effacement mot "
-147 "^b arrière ^j annule eff. caract. ^t début du texte "
-148 "^c commande ^k efface ligne ^u fin du texte "
-149 "^d efface caractère ^l annule eff. ligne ^v page suivante "
-150 "^e fin de ligne ^m nouvelle ligne ^w effacer un mot "
-151 "^f caractère suivant ^n ligne suivante ^x recherche "
-152 "^g page précédente ^o insère caract. ascii ^y rechercher... "
-153 "^h efface en arrière ^p ligne précédente ^z mot suivant "
-154 "^[ (échap.) menu ^y rechercher... ^k efface ligne ^p ligne préc ^g page préc"
-155 "^o code ascii ^x recherche ^l annul. eff.li ^n ligne suiv ^v page suiv"
-156 "^u fin du fichier ^a début de ligne ^w efface mot ^b arrière "
-157 "^t début du texte ^e fin de ligne ^r annul.eff.mot ^f avance 1 caractère "
-158 "^c commande ^d efface caract. ^j annul.eff.car ^z mot suivant "
-159 "EMACS"
-160 "PASEMACS"
-161 " +# positionne le curseur sur la ligne #\n"
-162 "impossible d'écrire .init.ee, configuration non sauvée !"
-163 "configuration de ee sauvée en %s"
-164 "sauvegarde configuration de l'éditeur"
-165 "sauvegarde configuration de ee"
-166 "sauvegarde dans le répertoire courant"
-167 "sauvegarde dans le répertoire d'accueil"
-168 "configuration de ee non sauvée"
-169 "nom de fichier manquant pour ree"
-180 "menu trop large pour la fenêtre"
-181 "^^encore^^"
-182 "VVencoreVV"
-183 "16 bit characters "
-184 "16BIT"
-185 "NO16BIT"
diff --git a/usr.bin/ee/nls/pl_PL.ISO8859-2/ee.msg b/usr.bin/ee/nls/pl_PL.ISO8859-2/ee.msg
deleted file mode 100644
index 5eb2f50c8667..000000000000
--- a/usr.bin/ee/nls/pl_PL.ISO8859-2/ee.msg
+++ /dev/null
@@ -1,187 +0,0 @@
-$ This file contains the messages for ee ("easy editor"). See the file
-$ ee.i18n.guide for more information
-$
-$ For ee patchlevel 3
-$
-$ $FreeBSD$
-$
-$
-$set 1
-$quote "
-1 "menu Tryb pracy"
-2 "tabulacje na spacje "
-3 "szukaj (ma³e!=du¿e) "
-4 "ustawiony margines "
-5 "auto-formatuj akapit "
-6 "znaki o¶miobitowe "
-7 "okno informacyjne "
-8 "prawy margines "
-9 "wyjd¼ z menu"
-10 "zachowaj zmiany"
-11 "brak zachowania"
-12 "menu Plik"
-13 "wczytaj plik"
-14 "zapisz do pliku"
-15 "zachowaj plik"
-16 "drukuj zawarto¶æ edytora"
-17 "menu Szukanie"
-18 "szukaj ..."
-19 "szukanie"
-20 "menu Pisownia"
-21 "u¿yj 'spell'"
-22 "u¿yj 'ispell'"
-23 "menu Inne"
-24 "formatuj akapit"
-25 "polecenie shell"
-26 "sprawd¼ pisowniê"
-27 "menu g³ówne"
-28 "wyjd¼ z edytora"
-29 "pomoc"
-30 "operacje na plikach"
-31 "od¶wie¿ ekran"
-32 "ustawienia"
-33 "szukanie"
-34 "inne"
-35 "Klawisze kontrolne: "
-36 "^a kod ASCII ^i tabulator ^r w prawo "
-37 "^b na dó³ tekstu ^j nowy wiersz ^t do góry tekstu "
-38 "^c polecenie ^k usuñ znak ^u do góry "
-39 "^d do do³u ^l w lewo ^v przywróæ s³owo "
-40 "^e szukanie ^m nowy wiersz ^w usuñ s³owo "
-41 "^f przywróæ znak ^n nastêpna strona ^x szukaj "
-42 "^g na pocz±tek wiersza ^o na koniec wiersza ^y usuñ wiersz "
-43 "^h backspace ^p poprzednia strona ^z przywróæ wiersz "
-44 "^[ (escape) menu ESC-Enter: wyj¶cie z ee "
-45 " "
-46 "Polecenia: "
-47 "help : wy¶wietl tê informacjê file : wy¶wietl nazwê pliku "
-48 "read : wczytaj plik char : kod ASCII znaku "
-49 "write : zapisz do pliku case : szukaj (ma³e!=du¿e) "
-50 "exit : zachowaj i wyjd¼ nocase : szukaj (ma³e==du¿e) "
-51 "quit : wyjd¼ bez zachowania !cmd : wykonaj \"cmd\" w shellu
- "
-52 "line : wy¶wietl numer wiersza 0-9 : id¼ do wiersza \"#\" "
-53 "expand : rozwiñ tabulacje na spacje noexpand: nie rozwijaj tabulacji "
-54 " "
-55 " ee [+#] [-i] [-e] [-h] [plik(i)] "
-56 " -i : bez okna inform. -e : nie rozwijaj tab. -h : bez pod¶wietl."
-57 "^[ (escape) menu ^e szukanie ^y usuñ wiersz ^u do góry ^p poprz. str "
-58 "^a kod ASCII ^x szukaj ^z przywróæ wiersz ^d do do³u ^n nast. str. "
-59 "^b na dó³ tekstu ^g na pocz. wiersza ^w usuñ s³owo ^l w lewo "
-60 "^t do góry tekstu ^o na koniec wiersza ^v przywróæ s³owo ^r w prawo "
-61 "^c polecenie ^k usuñ znak ^f przywróæ znak ESC-Enter: wyj¶cie "
-62 "help : pomoc |file : podaj nazwê pliku |line : numer wiersza"
-63 "read : wczytaj plik |char : kod ASCII znaku |0-9 : id¼ do wr \"#\""
-64 "write: zapisz plik |case : szukaj (ma³e!=du¿e) |exit : zpisz i wyjd¼"
-65 "!cmd : \"cmd\" w shellu |nocase: ma³e==du¿e w szukaniu |quit : wyjd¼, nie
-zapisuj"
-66 "expand: rozwiñ tabulacje na spacje |noexpand: nie rozwijaj tabulacji "
-67 " naci¶nij Escape (^[) do menu"
-68 "brak pliku"
-69 "kod ASCII: "
-70 "wysy³am zawarto¶æ bufora do \"%s\" "
-71 "polecenie: "
-72 "nazwa pliku do zapisania: "
-73 "nazwa pliku do wczytania: "
-74 "znak = %d"
-75 "nieznane polecenie \"%s\""
-76 "podane polecenie nie jest jednoznaczne"
-77 "wiersz %d "
-78 "d³ugo¶æ = %d"
-79 "aktualny plik to \"%s\" "
-80 "sposób u¿ycia: %s [-i] [-e] [-h] [+numer_wiersza] [plik(i)]\n"
-81 " -i zamknij okno informacyjne\n"
-82 " -e nie rozwijaj tabulacji na spacje\n"
-83 " -h nie u¿ywaj pod¶wietleñ\n"
-84 "plik \"%s\" jest katalogiem"
-85 "nowy plik \"%s\""
-86 "nie mogê otworzyæ \"%s\""
-87 "plik \"%s\", %d wierszy"
-88 "koniec wczytywania pliku \"%s\""
-89 "wczytywanie pliku \"%s\""
-90 ", tylko do odczytu"
-91 "plik \"%s\", %d wierszy"
-92 "podaj nazwê pliku: "
-93 "nie podano nazwy pliku: plik nie zosta³ zachowany"
-94 "plik zosta³ zmieniony, jeste¶ pewien? (t/n [n]) "
-95 "t"
-96 "plik ju¿ istnieje, zast±piæ? (t/n) [n] "
-97 "nie mo¿na utworzyæ pliku \"%s\""
-98 "zapisywanie pliku \"%s\""
-99 "\"%s\" %d wierszy, %d znaków"
-100 " ...szukam"
-101 "napis \"%s\" nie zosta³ znaleziony"
-102 "szukaj: "
-103 "nie mo¿na wykonaæ %s"
-104 "naci¶nij Enter ¿eby kontynuowaæ "
-105 "naci¶nij Esc ¿eby anulowaæ"
-106 "menu zbyt du¿e dla tego okna"
-107 "naci¶nij dowolny klawisz "
-108 "polecenie shella: "
-109 "...formatowanie akapitu..."
-110 "<!echo 'lista nieznalezionych s³ów'; echo -=-=-=-=-=-"
-111 "wysy³am zawarto¶æ edytora do programu 'spell'"
-112 "prawy margines: "
-113 "tryb ograniczony: nie mo¿na przeprowadziæ tej operacji"
-114 "ON"
-115 "OFF"
-116 "HELP"
-117 "WRITE"
-118 "READ"
-119 "LINE"
-120 "FILE"
-121 "CHARACTER"
-122 "REDRAW"
-123 "RESEQUENCE"
-124 "AUTHOR"
-125 "VERSION"
-126 "CASE"
-127 "NOCASE"
-128 "EXPAND"
-129 "NOEXPAND"
-130 "EXIT"
-131 "QUIT"
-132 "INFO"
-133 "NOINFO"
-134 "MARGINS"
-135 "NOMARGINS"
-136 "AUTOFORMAT"
-137 "NOAUTOFORMAT"
-138 "ECHO"
-139 "PRINTCOMMAND"
-140 "RIGHTMARGIN"
-141 "HIGHLIGHT"
-142 "NOHIGHLIGHT"
-143 "EIGHTBIT"
-144 "NOEIGHTBIT"
-145 "klawisze emacs "
-146 "^a pocz±tek wiersza ^i tabulacja ^r przywróæ s³owo "
-147 "^b jeden znak wstecz ^j przywróæ znak ^t do góry tekstu "
-148 "^c polecenie ^k usuñ wiersz ^u na dó³ tekstu "
-149 "^d usuñ znak ^l przywróæ wiersz ^v nastêpna strona "
-150 "^e na koniec wiersza ^m nowy wiersz ^w usuñ s³owo "
-151 "^f 1 znak do przodu ^n nastêpny wiersz ^x szukaj "
-152 "^g 1 strona wstecz ^o wstaw znak ASCII ^y szukanie "
-153 "^h backspace ^p poprzedni wiersz ^z nastêpne s³owo "
-154 "^[ (escape) menu ^y szukanie ^k usuñ wiersz ^p <-wiersz ^g <-strona "
-155 "^o kod ASCII ^x szukaj ^l przywr wiersz ^n wiersz-> ^v strona-> "
-156 "^u koniec pliku ^a pocz. wiersza ^w usuñ s³owo ^b 1 znak wstecz "
-157 "^t pocz. tekstu ^e koniec wiersza ^r przywr s³owo ^f 1 znak do przodu "
-158 "^c polecenie ^d usuñ znak ^j przywróæ znak ^z nastêpne s³owo "
-159 "EMACS"
-160 "NIE-EMACS"
-161 " +# umie¶æ kursor w wierszu #\n"
-162 "nie mo¿na otworzyæ .init.ee do zapisu, nie zachowano konfiguracji!"
-163 "konfiguracja ee zachowana do pliku %s"
-164 "zachowaj konfiguracjê edytora"
-165 "zachowaj konfiguracjê ee"
-166 "zachowaj w bie¿±cym katalogu"
-167 "zachowaj w katalogu home"
-168 "nie zachowano konfiguracji ee"
-169 "musisz podaæ nazwê pliku przy wywo³aniu ree"
-180 "menu zbyt du¿e dla tego okna"
-181 "^^dalej^^"
-182 "VVdalejVV"
-183 "16 bit characters "
-184 "16BIT"
-185 "NO16BIT"
diff --git a/usr.bin/ee/nls/uk_UA.KOI8-U/ee.msg b/usr.bin/ee/nls/uk_UA.KOI8-U/ee.msg
deleted file mode 100644
index 1556d916742e..000000000000
--- a/usr.bin/ee/nls/uk_UA.KOI8-U/ee.msg
+++ /dev/null
@@ -1,185 +0,0 @@
-$ This file contains the messages for ee ("easy editor"). See the file
-$ ee.i18n.guide for more information
-$
-$ For ee patchlevel 3
-$
-$ $FreeBSD$
-$
-$
-$set 1
-$quote "
-1 "ÍÅÎÀ ÒÅÖÉͦ×"
-2 "ÔÁÂÕÌÑæÑ->ÐÒϦÌÉ "
-3 "ÒÅ­¦ÓÔÒÏ-ÚÁÌÅÖÎÉÊ ÐÏÛÕË "
-4 "Á×ÔÏ-ÐÅÒÅ×ÅÄÅÎÎÑ ÒÑÄËÕ "
-5 "Á×ÔÏ-ÆÏÒÍÁÔ ÐÁÒÁÇÒÁÆÕ "
-6 "8-¦ÔΦ ÓÉÍ×ÏÌÉ "
-7 "¦ÎÆÏÒÍÁæÊΊצËÎÏ "
-8 "ÐÒÁ×Á ÍÅÖÁ "
-9 "ÍÅÎÀ ×ÉÈÏÄÕ"
-10 "ÚÂÅÒÅÇÔÉ ÚͦÎÉ"
-11 "ÎÅ ÚÂÅÒ¦ÇÁÔÉ"
-12 "ÆÁÊÌÏ×Å ÍÅÎÀ"
-13 "ÐÒÏÞÉÔÁÔÉ ÆÁÊÌ"
-14 "ÚÁÐÉÓÁÔÉ ÆÁÊÌ"
-15 "ÚÂÅÒÅÇÔÉ ÆÁÊÌ"
-16 "ÒÏÚÄÒÕËÕ×ÁÔÉ ×ͦÓÔ ÒÅÄÁËÔÏÒÁ"
-17 "ÍÅÎÀ ÐÏÛÕËÕ"
-18 "ÝÏ ÛÕËÁÔÉ..."
-19 "ÐÏÛÕË"
-20 "íÅÎÀ ÐÅÒÅצÒËÉ ÐÒÁ×ÏÐÉÓÕ"
-21 "×ÉËÏÒÉÓÔÕ×Õ×ÁÔÉ 'spell'"
-22 "×ÉËÏÒÉÓÔÕ×Õ×ÁÔÉ 'ispell'"
-23 "Ò¦ÚÎÅ..."
-24 "ÆÏÒÍÁÔÕ×ÁÎÎÑ ÐÁÒÁÇÒÁÆÕ"
-25 "ËÏÍÁÎÄÁ ÏÂÏÌÏÎËÉ"
-26 "ÐÅÒÅצÒËÁ ÐÒÁ×ÏÐÉÓÕ"
-27 "ÇÏÌÏ×ÎÅ ÍÅÎÀ"
-28 "×ÉÊÔÉ Ú ÒÅÄÁËÔÏÒÕ"
-29 "ÄÏצÄËÁ"
-30 "ÏÐÅÒÁæ§ Ú ÆÁÊÌÁÍÉ"
-31 "ÏÎÏ×ÉÔÉ ÅËÒÁÎ"
-32 "ËÏÎƦÇÕÒÁæÑ"
-33 "ÐÏÛÕË"
-34 "Ò¦ÚÎÅ"
-35 "ëÌÁצۦ ËÅÒÕ×ÁÎÎÑ: "
-36 "^a ascii-ËÏÄ ^i ÔÁÂÕÌÑÃ¦Ñ ^r ×ÐÒÁ×Ï "
-37 "^b ÎÉÚ ÔÅËÓÔÕ ^j ÎÏ×ÉÊ ÒÑÄÏË ^t ×ÅÒÈ ÔÅËÓÔÕ "
-38 "^c ËÏÍÁÎÄÁ ^k ÓÔÅÒÔÉ ÓÉÍ×ÏÌ ^u ××ÅÒÈ "
-39 "^d ×ÎÉÚ ^l ×̦×Ï ^v צÄÎÏ×ÉÔÉ ÓÌÏ×Ï "
-40 "^e ÝÏ ÛÕËÁÔÉ... ^m ÎÏ×ÉÊ ÒÑÄÏË ^w ÓÔÅÒÔÉ ÓÌÏ×Ï "
-41 "^f צÄÎÏ×ÉÔÉ ÓÉÍ×ÏÌ ^n ÎÁÓÔÕÐÎÁ ÓÔÏÒ¦ÎËÁ ^x ÛÕËÁÔÉ "
-42 "^g ÐÏÞÁÔÏË ÒÑÄËÕ ^o ˦ÎÅÃØ ÒÑÄËÕ ^y ÓÔÅÒÔÉ ÒÑÄÏË "
-43 "^h ÚÁÔÅÒÔÉ ^p ÐÏÐÅÒÅÄÎÑ ÓÔÏÒ¦ÎËÁ ^z צÄÎÏ×ÉÔÉ ÒÑÄÏË "
-44 "^[ (escape) ÍÅÎÀ ESC-Enter: ×ÉÊÔÉ Ú ee "
-45 " "
-46 "ëÏÍÁÎÄÉ: "
-47 "help : ÃÑ ÄÏצÄËÁ file : ÐÏËÁÚÁÔÉ ¦Í'Ñ ÆÁÊÌÕ "
-48 "read : ÐÒÏÞÉÔÁÔÉ ÆÁÊÌ char : ascii-ËÏÄ ÓÉÍ×ÏÌÕ "
-49 "write : ÚÁÐÉÓÁÔÉ ÆÁÊÌ case : ÒÅ­¦ÓÔÒÏ-ÚÁÌÅÖÎÉÊ ÐÏÛÕË "
-50 "exit : ÚÂÅÒÅÇÔÉ +×ÉÈ¦Ä nocase : ÒÅ­¦ÓÔÒÏ-ÎÅÚÁÌÅÖÎÉÊ ÐÏÛÕË"
-51 "quit : ×ÉÊÔÉ ÂÅÚ ÚͦΠ!ËÏÍÁÎÄÁ: ×ÉËÏÎÁÔÉ ËÏÍÁÎÄÕ ÏÂÏÌÏÎËÉ "
-52 "line : ÐÏËÁÚÁÔÉ ÎÏÍÅÒ ÒÑÄËÕ 0-9 : ÐÅÒÅÊÔÉ ÄÏ ÒÑÄËÕ "
-53 "expand : ÒÏÚÛÉÒÀ×ÁÔÉ ÔÁÂÕÌÑæÀ noexpand: ÎÅ ÒÏÚÛÉÒÀ×ÁÔÉ ÔÁÂÕÌÑæÀ "
-54 " "
-55 " ee [+#] [-i] [-e] [-h] [ÆÁÊÌ(É)] "
-56 "+# ËÕÒÓÏÒ ÎÁ ÒÑÄÏË -i:ÂÅÚ ¦ÎÆÏ-צËÎÁ -e:ÎÅ ÒÏÚÛÉÒÀ×ÁÔÉ ôáâÉ -h:ÂÅÚ Ð¦ÄÓצÔËÉ"
-57 "^[ (ESC) ÍÅÎÀ ^e ÝÏ ÛÕËÁÔÉ... ^y ÓÔÅÒÔÉ ÒÑÄÏË ^u ××ÅÒÈ ^p -ÓÔÏÒ¦ÎËÁ "
-58 "^a ascii-ËÏÄ ^x ÐÏÛÕË ^z צÄÎÏ×. ÒÑÄÏË ^d ×ÎÉÚ ^n +ÓÔÏÒ¦ÎËÁ "
-59 "^b ÎÉÚ ÔÅËÓÔÕ ^g ÐÏÞÁÔÏË ÒÑÄËÕ ^w ÓÔÅÒÔÉ ÓÌÏ×Ï ^l ×̦×Ï "
-60 "^t ×ÅÒÈ ÔÅËÓÔÕ ^o ˦ÎÅÃØ ÒÑÄËÕ ^v צÄÎÏ×. ÓÌÏ×Ï ^r ×ÐÒÁ×Ï "
-61 "^c ËÏÍÁÎÄÁ ^k ÓÔÅÒÔÉ ÓÉÍ×ÏÌ ^f צÄÎÏ×ÉÔÉ ÓÉÍ×ÏÌ ESC-Enter: ×ÉÊÔÉ Ú ee"
-62 "help : ÄÏצÄËÁ |file : ÐÏËÁÚÁÔÉ ¦'ÍÑ ÆÁÊÌÕ |line : ÎÏÍÅÒ ÒÑÄËÕ "
-63 "read : ÐÒÏÞÉÔÁÔÉ ÆÁÊÌ |char : ascii-ËÏÄ ÓÉÍ×ÏÌÕ |0-9 : ÐÅÒÅÊÔÉ ÄÏ ÒÑÄËÕ"
-64 "write: ÚÁÐÉÓÁÔÉ ÆÁÊÌ |case : ÒÅ­¦ÓÔÒÏ-ÚÁÌÅÖÎÉÊ ÐÏÛÕË |exit : ÚÂÅÒÅÇÔÉ +×ÉȦÄ"
-65 "!ËÍÄ : ÚÏ×Î. ËÏÍÁÎÄÁ |nocase: ÒÅ­¦ÓÔÒÏ-ÎÅÚÁÌ. ÐÏÛÕË |quit : ×ÉÊÔÉ ÂÅÚ ÚͦÎ"
-66 "expand: ÒÏÚÛÉÒÀ×ÁÔÉ |noexpand: ÎÅ ÒÏÚÛÉÒÀ×ÁÔÉ ôáâÉ × ÐÒϦÌÉ "
-67 " ÎÁÔÉÓΦÔØ Esc (^[) ÝÏ ×ÉËÌÉËÁÔÉ ÍÅÎÀ"
-68 "ÎÅÍÁ¤ ÆÁÊÌÕ"
-69 "ascii-ËÏÄ: "
-70 "צÄÓÉÌÁÎÎÑ ×ͦÓÔÕ ÂÕÆÅÒÕ ÄÏ \"%s\" "
-71 "ËÏÍÁÎÄÁ: "
-72 "¦Í'Ñ ÆÁÊÌÕ ÄÌÑ ÚÁÐÉÓÕ: "
-73 "¦Í'Ñ ÆÁÊÌÕ ÄÌÑ ÞÉÔÁÎÎÑ: "
-74 "ÓÉÍ×ÏÌ = %d"
-75 "ÎÅצÄÏÍÁ ËÏÍÁÎÄÁ \"%s\""
-76 "ÃÑ ËÏÍÁÎÄÁ ÎÅ ÕΦËÁÌØÎÁ"
-77 "ÒÑÄÏË %d "
-78 "ÄÏ×ÖÉÎÁ = %d"
-79 "ÐÏÔÏÞÎÉÊ ÆÁÊÌ: \"%s\" "
-80 "÷ÉËÏÒÉÓÔÁÎÎÑ: %s [-i] [-e] [-h] [+ÎÏÍÅÒ_ÒÑÄËÕ] [ÆÁÊÌ(É)]\n"
-81 " -i ÎÅ ÐÏËÁÚÕ×ÁÔÉ ¦ÎÆÏÒÍÁæÊΊצËÎÏ\n"
-82 " -e ÎÅ ÐÅÒÅÔ×ÏÒÀ×ÁÔÉ ÔÁÂÕÌÑæÀ × ÐÒϦÌÉ\n"
-83 " -h ÎÅ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉ Ð¦ÄÓצÔËÕ\n"
-84 " ÆÁÊÌ \"%s\" - ÎÁÓÐÒÁ×Ħ ËÁÔÁÌÏÇ"
-85 "ÎÏ×ÉÊ ÆÁÊÌ \"%s\""
-86 "ÎÅ ÍÏÖÕ ×¦ÄËÒÉÔÉ \"%s\""
-87 "ÆÁÊÌ \"%s\", ÒÑÄ˦×: %d"
-88 "ÆÁÊÌ \"%s\" ÐÒÏÞÉÔÁÎÏ"
-89 "ÞÉÔÁÎÎÑ ÆÁÊÌÕ \"%s\""
-90 ", ÔiÌØËu ÄÌÑ ÞÉÔÁÎÎÑ"
-91 "ÆÁÊÌ \"%s\", ÒÑÄ˦×: %d"
-92 "××ÅĦÔØ ¦Í'Ñ ÆÁÊÌÕ: "
-93 "¦Í'Ñ ÆÁÊÌÕ ÎÅ ÚÁÄÁÎÏ: ÆÁÊÌ ÎÅ ÚÁÐÉÓÁÎÏ "
-94 "×ÎÅÓÅÎÏ ÚͦÎÉ, ×É ×ÐÅ×ÎÅΦ? (y/n [n]) "
-95 "y"
-96 "ÆÁÊÌ ×ÖÅ ¦ÓÎÕ¤, ÐÅÒÅÚÁÐÉÓÁÔÉ? (y/n) [n] "
-97 "ÎÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÆÁÊÌ \"%s\""
-98 "ÚÁÐÉÓ ÆÁÊÌÕ \"%s\""
-99 "\"%s\", ÒÑÄ˦×: %d, ÓÉÍ×Ï̦×: %d"
-100 " ...ÐÏÛÕË"
-101 "ÒÑÄÏË \"%s\" ÎÅ ÚÎÁÊÄÅÎÏ"
-102 "ÝÏ ÛÕËÁÔÉ: "
-103 "ÎÅ ÍÏÖÕ ×ÉËÏÎÁÔÉ %s"
-104 "ÎÁÔÉÓΦÔØ <enter> ÄÌÑ ÐÒÏÄÏ×ÖÅÎÎÑ..."
-105 "Esc - צÄͦÎÁ"
-106 "ÍÅÎÀ ÚÁ×ÅÌÉËÅ ÄÌÑ ÅËÒÁÎÕ"
-107 "ÎÁÔÉÓΦÔØ ÂÕÄØ-ÑËÕ ËÌÁצÛÕ ÄÌÑ ÐÒÏÄÏ×ÖÅÎÎÑ..."
-108 "ËÏÍÁÎÄÁ ÏÂÏÌÏÎËÉ: "
-109 "...ÆÏÒÍÁÔÕÀ ÐÁÒÁÇÒÁÆ..."
-110 "<!echo 'ÓÐÉÓÏË ÎÅÒÏÚЦÚÎÁÎÉÈ Ó̦×'; echo -=-=-=-=-=-"
-111 "צÄÓÉÌÁÎÎÑ ×ͦÓÔÕ ÂÕÆÅÒÕ ÄÏ 'spell'"
-112 "ÐÒÁ×Á ÍÅÖÁ: "
-113 "ïÂÍÅÖÅÎÉÊ ÒÅÖÉÍ: ÎÅ ÍÏÖÕ ×ÉËÏÎÁÔÉ ÃÀ ÏÐÅÒÁæÀ"
-114 "ON"
-115 "OFF"
-116 "HELP"
-117 "WRITE"
-118 "READ"
-119 "LINE"
-120 "FILE"
-121 "CHARACTER"
-122 "REDRAW"
-123 "RESEQUENCE"
-124 "AUTHOR"
-125 "VERSION"
-126 "CASE"
-127 "NOCASE"
-128 "EXPAND"
-129 "NOEXPAND"
-130 "EXIT"
-131 "QUIT"
-132 "INFO"
-133 "NOINFO"
-134 "MARGINS"
-135 "NOMARGINS"
-136 "AUTOFORMAT"
-137 "NOAUTOFORMAT"
-138 "ECHO"
-139 "PRINTCOMMAND"
-140 "RIGHTMARGIN"
-141 "HIGHLIGHT"
-142 "NOHIGHLIGHT"
-143 "EIGHTBIT"
-144 "NOEIGHTBIT"
-145 "ÐÒÉ×'ÑÚËÁ ËÌÁ×¦Û Emacs "
-146 "^a ÐÏÞÁÔÏË ÒÑÄËÕ ^i ÔÁÂÕÌÑÃ¦Ñ ^r צÄÎÏ×ÉÔÉ ÓÌÏ×Ï "
-147 "^b ÎÁÚÁÄ 1 ÓÉÍ×ÏÌ ^j צÄÎÏ×ÉÔÉ ÓÉÍ×ÏÌ ^t ÐÏÞÁÔÏË ÆÁÊÌÕ "
-148 "^c ËÏÍÁÎÄÁ ^k ÓÔÅÒÔÉ ÒÑÄÏË ^u ˦ÎÅÃØ ÆÁÊÌÕ "
-149 "^d ÓÔÅÒÔÉ ÓÉÍ×ÏÌ ^l צÄÎÏ×ÉÔÉ ÓÉÍ×ÏÌ ^v ÎÁÓÔÕÐÎÁ ÓÔÏÒ¦ÎËÁ "
-150 "^e ˦ÎÅÃØ ÒÑÄËÕ ^m ÎÏ×ÉÊ ÒÑÄÏË ^w ÓÔÅÒÔÉ ÓÌÏ×Ï "
-151 "^f ×ÐÅÒÅÄ 1 ÓÉÍ×ÏÌ ^n ÎÁÓÔÕÐÎÉÊ ÒÑÄÏË ^x ÐÏÛÕË "
-152 "^g ÎÁÚÁÄ 1 ÓÔÏÒ¦ÎËÕ ^o ×ÓÔÁ×ÉÔÉ ASCII ^y ÝÏ ÛÕËÁÔÉ... "
-153 "^h ÚÁÔÅÒÔÉ ^p ÐÏÐÅÒÅÄÎ¦Ê ÒÑÄÏË ^z ÎÁÓÔÕÐÎÅ ÓÌÏ×Ï "
-154 "^[ (ESC) ÍÅÎÀ ^y ÝÏ ÛÕËÁÔÉ ^k ÓÔÅÒÔÉ ÒÑÄÏË ^p -ÒÑÄÏË ^g -ÓÔÏÒ¦ÎËÁ"
-155 "^o ascii-ËÏÄ ^x ÐÏÛÕË ^l צÄÎÏ×. ÒÑÄÏË ^n +ÒÑÄÏË ^v +ÓÔÏÒ¦ÎËÁ"
-156 "^u ˦ÎÅÃØ ÆÁÊÌÕ ^a ÐÏÞÁÔÏË ÒÑÄËÕ ^w ÓÔÅÒÔÉ ÓÌÏ×Ï ^b ÎÁÚÁÄ 1 ÓÉÍ×ÏÌ "
-157 "^t ÐÏÞÁÔÏË ÆÁÊÌÕ ^e ˦ÎÅÃØ ÒÑÄËÕ ^r צÄÎÏ×. ÓÌÏ×Ï ^f ×ÐÅÒÅÄ 1 ÓÉÍ×ÏÌ "
-158 "^c ËÏÍÁÎÄÁ ^d ÓÔÅÒÔÉ ÓÉÍ×ÏÌ ^j צÄÎ. ÓÉÍ×ÏÌ ^z ÎÁÓÔÕÐÎÅ ÓÌÏ×Ï "
-159 "EMACS"
-160 "NOEMACS"
-161 " +# ÐÏÓÔÁ×ÉÔÉ ËÕÒÓÏÒ × ÒÑÄÏË Ú ÎÏÍÅÒÏÍ\n"
-162 "ÎÅ ÍÏÖÕ ×¦ÄËÒÉÔÉ .init.ee ÄÌÑ ÚÁÐÉÓÕ, ËÏÎƦÇÕÒÁæÀ Îe ÚÁÐÉÓÁÎÏ!"
-163 "ËÏÎƦÇÕÒÁæÀ ee ÚÁÐÉÓÁÎÏ Õ ÆÁÊÌ %s"
-164 "ÚÂÅÒÅÇÔÉ ËÏÎƦÇÕÒÁæÀ "
-165 "ÚÂÅÒÅÇÔÉ ËÏÎƦÇÕÒÁæÀ ee"
-166 "ÚÂÅÒÅÇÔÉ × ÐÏÔÏÞÎÏÍÕ ËÁÔÁÌÏÚ¦"
-167 "ÚÂÅÒÅÇÔÉ × ÄÏÍÁÛÎØÏÍÕ ËÁÔÁÌÏÚ¦"
-168 "ËÏÎƦÇÕÒÁæÀ ee Îe ÚÁÐÉÓÁÎÏ"
-169 "Ð¦Ä ÞÁÓ ÚÁÐÕÓËÕ ree ÓÌ¦Ä ×ËÁÚÕ×ÁÔÉ ¦Í'Ñ ÆÁÊÌÕ"
-180 "ÍÅÎÀ ÚÁ×ÅÌÉËÅ ÄÌÑ ÅËÒÁÎÕ"
-181 "^^ÄÁ̦^^"
-182 "VVÄÁ̦VV"
-183 "16-¦ÔÏצ ÓÉÍ×ÏÌÉ "
-184 "16â¶ô"
-185 "ÎÅ16â¶ô"
diff --git a/usr.bin/makewhatis/makewhatis.local.sh b/usr.bin/makewhatis/makewhatis.local.sh
deleted file mode 100644
index 8be25300b75d..000000000000
--- a/usr.bin/makewhatis/makewhatis.local.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) April 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# makewhatis.local - start makewhatis(1) only for file systems
-# physically mounted on the system
-#
-# Running makewhatis from /etc/periodic/weekly/320.whatis for rw nfs-mounted
-# /usr may kill your NFS server -- all clients start makewhatis at the same
-# time! So use this wrapper instead calling makewhatis directly.
-#
-# PS: this wrapper works also for catman(1)
-#
-# $FreeBSD$
-
-PATH=/bin:/usr/bin:$PATH; export PATH
-opt= dirs= localdirs=
-
-for arg
-do
- case "$arg" in
- -*) opt="$opt $arg";;
- *) dirs="$dirs $arg";;
- esac
-done
-
-dirs=`echo $dirs | sed 's/:/ /g'`
-case X"$dirs" in X) echo "usage: $0 [options] directories ..."; exit 1;; esac
-
-localdirs=`find -H $dirs -fstype local -type d -prune -print`
-
-case X"$localdirs" in
- X) echo "$0: no local-mounted manual directories found: $dirs"
- exit 1;;
- *) exec `basename $0 .local` $opt $localdirs;;
-esac
diff --git a/usr.bin/usbhidctl/usbhidctl.1 b/usr.bin/usbhidctl/usbhidctl.1
deleted file mode 100644
index 3a9a49a8aeb3..000000000000
--- a/usr.bin/usbhidctl/usbhidctl.1
+++ /dev/null
@@ -1,92 +0,0 @@
-.\" $NetBSD: usbhidctl.1,v 1.8 1999/05/11 21:03:58 augustss Exp $
-.\" $FreeBSD$
-.\"
-.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Lennart Augustsson.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation nor the names of its
-.\" contributors may be used to endorse or promote products derived
-.\" from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd July 12, 1998
-.Dt USBHIDCTL 1
-.Os
-.Sh NAME
-.Nm usbhidctl
-.Nd manipulate USB HID devices
-.Sh SYNOPSIS
-.Nm
-.Op Fl a
-.Fl f Ar device
-.Op Fl l
-.Op Fl n
-.Op Fl r
-.Op Fl t Ar table
-.Op Fl v
-.Op Ar item ...
-.Sh DESCRIPTION
-.Nm
-can be used to dump the state of a USB HID (Human Interface Device).
-Each named
-.Ar item
-is printed.
-.Pp
-The options are as follows:
-.Bl -tag -width Ds
-.It Fl a
-Show all items.
-.It Fl f Ar device
-Specify a path name for the device to operate on.
-.It Fl l
-Loop and dump the device data every time it changes.
-.It Fl n
-Suppress printing of the item name.
-.It Fl r
-Dump the report descriptor.
-.It Fl t Ar table
-Specify a path name for the HID usage table file.
-.It Fl v
-Be verbose.
-.El
-.Sh FILES
-.Pa /usr/share/misc/usb_hid_usages
-The default HID usage table.
-.Sh BUGS
-.Nm
-cannot show nor set output and feature items.
-.Sh SEE ALSO
-.Xr usb 3 ,
-.Xr uhid 4 ,
-.Xr usb 4
-.Sh HISTORY
-The
-.Nm
-command appeared in
-.Nx 1.4 .
diff --git a/usr.sbin/i4b/isdnphone/audio.c b/usr.sbin/i4b/isdnphone/audio.c
deleted file mode 100644
index 2dc88d6afc2e..000000000000
--- a/usr.sbin/i4b/isdnphone/audio.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 1999 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isdnphone - audio operations
- * ============================
- *
- * $Id: audio.c,v 1.5 1999/12/13 21:25:26 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon Dec 13 21:52:39 1999]
- *
- *----------------------------------------------------------------------------*/
-
-#include "defs.h"
-
-/*---------------------------------------------------------------------------*
- *
- *---------------------------------------------------------------------------*/
-int
-init_audio(char *audiodevice)
-{
- int ret;
- int fd;
- u_long fmt = 0;
-
- snd_chan_param pa;
- struct snd_size sz;
- snd_capabilities soundcaps;
-
- if((fd = open(audiodevice, O_RDWR)) < 0)
- {
- fprintf(stderr, "unable to open %s: %s\n", audiodevice, strerror(errno));
- return(-1);
- }
-
- ret = ioctl(fd, AIOGCAP, &soundcaps);
-
- if(ret == -1)
- {
- fprintf(stderr, "ERROR: ioctl AIOGCAP %s: %s\n", audiodevice, strerror(errno));
- return(-1);
- }
-
- fmt = soundcaps.formats;
-
- if((fmt & AFMT_FULLDUPLEX) && (!(fmt & AFMT_WEIRD)))
- {
-#ifdef NOTDEF
- if(fmt & AFMT_A_LAW)
- {
- play_fmt = rec_fmt = AFMT_A_LAW;
- }
- else
-#endif
- if(fmt & AFMT_MU_LAW)
- {
- play_fmt = rec_fmt = AFMT_MU_LAW;
- }
- else
- {
- printf("sorry, A-law or u-law not supported!\n");
- close(fd);
- return(-1);
- }
- }
- else
- {
- printf("no full-duplex available!\n");
- close (fd);
- return(-1);
- }
-
- pa.play_format = play_fmt;
- pa.rec_format = rec_fmt;
- pa.play_rate = pa.rec_rate = AUDIORATE;
-
- ret = ioctl(fd, AIOSFMT, &pa);
-
- if(ret == -1)
- {
- fprintf(stderr, "ERROR: ioctl AIOSFMT %s: %s\n", audiodevice, strerror(errno));
- return(-1);
- }
-
- sz.play_size = BCH_MAX_DATALEN;
- sz.rec_size = BCH_MAX_DATALEN;
-
- ret = ioctl(fd, AIOSSIZE, &sz);
-
- if(ret == -1)
- {
- fprintf(stderr, "ERROR: ioctl AIOSSIZE %s: %s\n", audiodevice, strerror(errno));
- return(-1);
- }
-
- return(fd);
-}
-
-/*---------------------------------------------------------------------------*
- * audio device has speech data from microphone
- *---------------------------------------------------------------------------*/
-void
-audio_hdlr(void)
-{
- unsigned char buffer[BCH_MAX_DATALEN];
- int ret;
-
- ret = read(audiofd, buffer, BCH_MAX_DATALEN);
-
- if(ret < 0)
- {
- fatal("read audio failed: %s", strerror(errno));
- }
-
- debug("audio_hdlr: read %d bytes\n", ret);
-
- if(ret > 0)
- {
- telwrite(ret, buffer);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * write audio data to loudspeaker
- *---------------------------------------------------------------------------*/
-void
-audiowrite(int len, unsigned char *buf)
-{
- if((write(audiofd, buf, len)) < 0)
- {
- fatal("write audio failed: %s", strerror(errno));
- }
-}
-
-/* EOF */
diff --git a/usr.sbin/i4b/isdnphone/defs.h b/usr.sbin/i4b/isdnphone/defs.h
deleted file mode 100644
index 18da037afe90..000000000000
--- a/usr.sbin/i4b/isdnphone/defs.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 1999 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isdnphone - header file
- * =======================
- *
- * $Id: defs.h,v 1.6 1999/12/13 21:25:26 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon Dec 13 21:52:46 1999]
- *
- *----------------------------------------------------------------------------*/
-
-#include <ncurses.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <signal.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <ctype.h>
-
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-#include <sys/soundcard.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/param.h>
-
-#include <machine/i4b_ioctl.h>
-#include <machine/i4b_tel_ioctl.h>
-
-/* device file prefixes */
-
-#define I4BTELDEVICE "/dev/i4btel"
-#define I4BTELDDEVICE "/dev/i4bteld"
-#define AUDIODEVICE "/dev/audio"
-
-#define GOOD 0
-#define ERROR (-1)
-#define WARNING (-2)
-
-/* main window dimensions */
-
-#define MW_ROW 5
-#define MW_COL 8
-
-#define MW_WIDTH 60
-#define MW_HEIGHT 8
-
-#define DB_ROW 15
-#define DB_COL 1
-#define DB_WID 79
-#define DB_HGT 9
-
-#define MW_STATEY 2
-#define MW_STATEX 1
-#define MW_STX 10
-
-#define MW_NUMY 4
-#define MW_NUMX 1
-#define MW_NUX 10
-
-#define MW_MSGY 6
-#define MW_MSGX 1
-#define MW_MSX 10
-
-/* fullscreen mode menu window */
-
-#define WMITEMS 4 /* no of items */
-#define WMENU_LEN 18 /* window width */
-#define WMENU_HGT (WMITEMS+4) /* window height */
-#define WMENU_TITLE "Command"
-#define WMENU_POSLN 8 /* window position: lines */
-#define WMENU_POSCO 20 /* window position: columns */
-
-#define CR 0x0d
-#define LF 0x0a
-#define TAB 0x09
-#define CNTRL_D 0x04
-#define CNTRL_L 0x0c
-
-#define ST_IDLE 0
-#define ST_DIALING 1
-#define ST_ACTIVE 2
-#define ST_MAX 2
-
-#define AUDIORATE 8000
-
-#ifdef MAIN
-
-WINDOW *main_w; /* curses main window pointer */
-WINDOW *dbg_w;
-
-int curses_ready = 0; /* flag, curses display is initialized */
-int state = ST_IDLE;
-
-char *states[] = {
- "IDLE",
- "DIALING",
- "ACTIVE"
-};
-
-int dialerfd = -1;
-int audiofd = -1;
-int telfd = -1;
-int curx;
-char numberbuffer[TELNO_MAX];
-
-int play_fmt = AFMT_MU_LAW;
-int rec_fmt = AFMT_MU_LAW;
-
-int opt_unit = 0;
-int opt_d = 0;
-#else
-
-extern WINDOW *main_w;
-extern WINDOW *dbg_w;
-
-extern int curses_ready;
-extern int state;
-
-extern char *states[];
-
-extern int dialerfd;
-extern int audiofd;
-extern int telfd;
-extern int curx;
-extern char numberbuffer[];
-
-extern int play_fmt;
-extern int rec_fmt;
-
-int opt_unit;
-int opt_d;
-
-#endif
-
-extern void audio_hdlr ( void );
-extern void tel_hdlr ( void );
-extern void init_mainw ( void );
-extern int init_audio ( char * );
-extern void do_menu ( void );
-extern int main ( int argc, char **argv );
-extern void do_quit ( int exitval );
-extern void fatal ( char *fmt, ... );
-extern void message ( char *fmt, ... );
-extern void do_dial ( char *number );
-extern void do_hangup ( void );
-
-extern void audiowrite ( int, unsigned char * );
-extern void telwrite ( int, unsigned char * );
-
-extern void newstate ( int newstate );
-
-int init_dial(char *device);
-void dial_hdlr(void);
-int init_tel(char *device);
-
-extern void debug ( char *fmt, ... );
-
-/* EOF */
diff --git a/usr.sbin/i4b/isdnphone/display.c b/usr.sbin/i4b/isdnphone/display.c
deleted file mode 100644
index 1dff9a16f3f9..000000000000
--- a/usr.sbin/i4b/isdnphone/display.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 1999 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isdnphone - some display operations
- * ===================================
- *
- * $Id: display.c,v 1.4 1999/12/13 21:25:26 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon Dec 13 21:52:55 1999]
- *
- *----------------------------------------------------------------------------*/
-
-#include "defs.h"
-
-/*---------------------------------------------------------------------------*
- * init curses fullscreen display
- *---------------------------------------------------------------------------*/
-void
-init_mainw(void)
-{
- char buffer[512];
-
- initscr(); /* curses init */
-
- if((COLS < 80) || (LINES < 24))
- fatal(0, "ERROR, minimal screensize must be 80x24, is %dx%d, terminating!", COLS, LINES);
-
-
- if((main_w = newwin(MW_HEIGHT, MW_WIDTH, MW_ROW, MW_COL)) == NULL)
- fatal("ERROR, curses init main window, terminating!");
-
- if(opt_d)
- {
- if((dbg_w = newwin(DB_HGT, DB_WID, DB_ROW, DB_COL)) == NULL)
- fatal("ERROR, curses init debug window, terminating!");
- scrollok(dbg_w, TRUE);
- }
-
- raw(); /* raw input */
- noecho(); /* do not echo input */
- keypad(stdscr, TRUE); /* use special keys */
- keypad(main_w, TRUE); /* use special keys */
-
- box(main_w, 0, 0);
-
- sprintf(buffer, "isdnphone %d.%d ", VERSION, REL);
-
- wstandout(main_w);
- mvwaddstr(main_w, 0, (MW_WIDTH / 2) - (strlen(buffer) / 2), buffer);
- wstandend(main_w);
-
- mvwaddstr(main_w, MW_STATEY, MW_STATEX, " state: ");
- mvwprintw(main_w, MW_STATEY, MW_STX, "%s", states[state]);
- wmove(main_w, MW_STATEY+1, 1);
- whline(main_w, 0, MW_WIDTH-2);
-
- mvwaddstr(main_w, MW_NUMY, MW_NUMX, " number: ");
- wmove(main_w, MW_NUMY+1, 1);
- whline(main_w, 0, MW_WIDTH-2);
-
- mvwaddstr(main_w, MW_MSGY, MW_MSGX, "message: ");
-
- wrefresh(main_w);
-
- curses_ready = 1;
-}
-
-/*---------------------------------------------------------------------------*
- * curses menu for fullscreen command mode
- *---------------------------------------------------------------------------*/
-void
-do_menu(void)
-{
- static char *menu[WMITEMS] =
- {
- "Hangup",
-#define HANGUP 0
- "Dial",
-#define DIAL 1
- "Refresh",
-#define REFRESH 2
- "Exit",
-#define EXIT 3
- };
-
- WINDOW *menu_w;
- int c;
- int mpos;
-
- /* create a new window in the lower screen area */
-
- if((menu_w = newwin(WMENU_HGT, WMENU_LEN, WMENU_POSLN, WMENU_POSCO )) == NULL)
- return;
-
- keypad(menu_w, TRUE); /* use special keys */
-
- /* draw border around the window */
-
- box(menu_w, 0, 0);
-
- /* add a title */
-
- wstandout(menu_w);
- mvwaddstr(menu_w, 0, (WMENU_LEN / 2) - (strlen(WMENU_TITLE) / 2), WMENU_TITLE);
- wstandend(menu_w);
-
- /* fill the window with the menu options */
-
- for(mpos=0; mpos <= (WMITEMS-1); mpos++)
- mvwaddstr(menu_w, mpos + 2, 2, menu[mpos]);
-
- /* highlight the first menu option */
-
- mpos = 0;
- wstandout(menu_w);
- mvwaddstr(menu_w, mpos + 2, 2, menu[mpos]);
- wstandend(menu_w);
-
- /* input loop */
-
- for(;;)
- {
- wrefresh(menu_w);
-
- c = wgetch(menu_w);
-
- switch(c)
- {
- case TAB:
- case KEY_DOWN: /* down-move cursor */
- case ' ':
- mvwaddstr(menu_w, mpos + 2, 2, menu[mpos]);
- mpos++;
- if(mpos >= WMITEMS)
- mpos = 0;
- wstandout(menu_w);
- mvwaddstr(menu_w, mpos + 2, 2, menu[mpos]);
- wstandend(menu_w);
- break;
-
- case KEY_UP: /* up-move cursor */
- mvwaddstr(menu_w, mpos + 2, 2, menu[mpos]);
- if(mpos)
- mpos--;
- else
- mpos = WMITEMS-1;
- wstandout(menu_w);
- mvwaddstr(menu_w, mpos + 2, 2, menu[mpos]);
- wstandend(menu_w);
- break;
-
- case 'R':
- case 'r':
- wrefresh(curscr);
- goto mexit;
-
- case 'E':
- case 'e':
- case 'Q':
- case 'q':
- case 'X':
- case 'x':
- do_quit(0);
- goto mexit;
- break;
-
- case 'H':
- case 'h':
- do_hangup();
- goto mexit;
- break;
-
- case 'D':
- case 'd':
- goto mexit;
- break;
-
- case CR:
- case LF: /* exec highlighted option */
-#ifdef KEY_ENTER
- case KEY_ENTER:
-#endif
- switch(mpos)
- {
- case DIAL:
- goto mexit;
- break;
- case HANGUP:
- do_hangup();
- goto mexit;
- break;
- case REFRESH:
- wrefresh(curscr);
- break;
- case EXIT:
- do_quit(0);
- break;
- }
- goto mexit;
- break;
-
- default:
- goto mexit;
- break;
- }
- }
-
-mexit:
- /* delete the menu window */
-
- wclear(menu_w);
- wrefresh(menu_w);
- delwin(menu_w);
-
- /* re-display the original lower window contents */
-
- touchwin(main_w);
- wrefresh(main_w);
-}
-
-/* EOF */
diff --git a/usr.sbin/i4b/isdnphone/isdn.c b/usr.sbin/i4b/isdnphone/isdn.c
deleted file mode 100644
index 34719c727269..000000000000
--- a/usr.sbin/i4b/isdnphone/isdn.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 1999 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isdnphone - isdn (i4b) handling
- * ===============================
- *
- * $Id: isdn.c,v 1.4 1999/12/13 21:25:26 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon Dec 13 21:53:05 1999]
- *
- *---------------------------------------------------------------------------*/
-
-#include "defs.h"
-
-/*---------------------------------------------------------------------------*
- * dialer init
- *---------------------------------------------------------------------------*/
-int
-init_dial(char *device)
-{
- int ret;
-
- if((ret = open(device, O_RDWR)) < 0)
- {
- fprintf(stderr, "unable to open %s: %s\n", device, strerror(errno));
- return(-1);
- }
- return(ret);
-}
-
-/*---------------------------------------------------------------------------*
- * i4bteld data available handler
- *---------------------------------------------------------------------------*/
-void
-dial_hdlr(void)
-{
- char result;
-
- if((read (dialerfd, &result, 1) < 0))
- {
- fatal("read failed: %s", strerror(errno));
- }
-
- switch(result)
- {
- case RSP_CONN:
- newstate(ST_ACTIVE);
- message("connected to remote!");
- break;
-
- case RSP_BUSY:
- message("remote is busy!");
- break;
-
- case RSP_HUP:
- newstate(ST_IDLE);
- message("disconnected from remote!");
- break;
-
- case RSP_NOA:
- message("no answer from remote!");
- break;
-
- default:
- message("unknown response = 0x%2x!", result);
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * telephone init
- *---------------------------------------------------------------------------*/
-int
-init_tel(char *device)
-{
- int ret;
- int format;
-
- if(play_fmt == AFMT_MU_LAW)
- format = CVT_ALAW2ULAW;
- else
- format = CVT_NONE;
-
- if((ret = open(device, O_RDWR)) < 0)
- fatal("unable to open %s: %s\n", device, strerror(errno));
-
- if((ioctl(ret, I4B_TEL_SETAUDIOFMT, &format)) < 0)
- fatal("ioctl I4B_TEL_SETAUDIOFMT failed: %s", strerror(errno));
-
- return(ret);
-}
-
-/*---------------------------------------------------------------------------*
- * dial number
- *---------------------------------------------------------------------------*/
-void
-do_dial(char *number)
-{
- char commandbuffer[80];
- sprintf(commandbuffer, "D%s", number);
-
- if((write(dialerfd, commandbuffer, strlen(commandbuffer))) < 0)
- {
- fatal("write commandbuffer failed: %s", strerror(errno));
- }
-}
-
-/*---------------------------------------------------------------------------*
- * hangup
- *---------------------------------------------------------------------------*/
-void
-do_hangup(void)
-{
- char commandbuffer[80];
-
- if(state == ST_IDLE)
- {
- message("tried hangup while ST_IDLE");
- return;
- }
-
- sprintf(commandbuffer, "H");
-
- if((write(dialerfd, commandbuffer, strlen(commandbuffer))) < 0)
- {
- fatal("write commandbuffer failed: %s", strerror(errno));
- }
-}
-
-/*---------------------------------------------------------------------------*
- * i4btel speech data available handler
- *---------------------------------------------------------------------------*/
-void
-tel_hdlr(void)
-{
- unsigned char buffer[BCH_MAX_DATALEN];
- int ret;
-
- ret = read(telfd, buffer, BCH_MAX_DATALEN);
-
- if(ret < 0)
- {
- fatal("read telfd failed: %s", strerror(errno));
- }
-
- debug("tel_hdlr: read %d bytes\n", ret);
-
- if(ret > 0)
- {
- audiowrite(ret, buffer);
- }
-}
-
-/*---------------------------------------------------------------------------*
- * write audio data to ISDN
- *---------------------------------------------------------------------------*/
-void
-telwrite(int len, unsigned char *buf)
-{
- if((write(telfd, buf, len)) < 0)
- {
- fatal("write tel failed: %s", strerror(errno));
- }
-}
-
-/* EOF */
diff --git a/usr.sbin/i4b/isdnphone/main.c b/usr.sbin/i4b/isdnphone/main.c
deleted file mode 100644
index af463570c909..000000000000
--- a/usr.sbin/i4b/isdnphone/main.c
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * Copyright (c) 1999 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * isdnphone - main module
- * =======================
- *
- * $Id: main.c,v 1.12 1999/12/13 21:25:26 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Mon Dec 13 21:53:25 1999]
- *
- *---------------------------------------------------------------------------*/
-
-#define MAIN
-#include "defs.h"
-
-static void kbd_hdlr(void);
-
-/*---------------------------------------------------------------------------*
- * usage display and exit
- *---------------------------------------------------------------------------*/
-static void
-usage(void)
-{
- fprintf(stderr, "\n");
- fprintf(stderr, "isdnphone - i4b phone program, version %d.%d.%d, compiled %s %s\n",VERSION, REL, STEP, __DATE__, __TIME__);
- fprintf(stderr, "usage: isdnphone -d -h -n <number> -u <unit>\n");
- fprintf(stderr, " -d debug\n");
- fprintf(stderr, " -h hangup\n");
- fprintf(stderr, " -n number dial number\n");
- fprintf(stderr, " -u unit set unit number\n");
- fprintf(stderr, "\n");
- exit(1);
-}
-
-/*---------------------------------------------------------------------------*
- * program entry
- *---------------------------------------------------------------------------*/
-int
-main(int argc, char **argv)
-{
- int c;
- char namebuffer[128];
- int bschar;
- int ret;
- int opt_n = 0;
- int opt_h = 0;
- char *number = "";
-
- numberbuffer[0] = '\0';
-
- while ((c = getopt(argc, argv, "dhn:u:")) != -1)
- {
- switch(c)
- {
- case 'd':
- opt_d = 1;
- break;
-
- case 'h':
- opt_h = 1;
- break;
-
- case 'n':
- number = optarg;
- opt_n = 1;
- break;
-
- case 'u':
- opt_unit = atoi(optarg);
- if(opt_unit < 0 || opt_unit > 9)
- usage();
- break;
-
- case '?':
- default:
- usage();
- break;
- }
- }
-
- sprintf(namebuffer,"%s%d", I4BTELDDEVICE, opt_unit);
-
- if((dialerfd = init_dial(namebuffer)) == -1)
- exit(1);
-
- if(opt_n || opt_h)
- {
- char commandbuffer[80];
-
- /* commandline operation goes here */
-
- if(opt_n)
- {
- sprintf(commandbuffer, "D%s", number);
-
- }
- else if(opt_h)
- {
- sprintf(commandbuffer, "H");
- }
-
- if((ret = write(dialerfd, commandbuffer, strlen(commandbuffer))) < 0)
- {
- fprintf(stderr, "write commandbuffer failed: %s", strerror(errno));
- exit(1);
- }
-
- close(dialerfd);
-
- exit(0);
- }
-
- if((audiofd = init_audio(AUDIODEVICE)) == -1)
- exit(1);
-
- /* fullscreen operation here */
-
- init_mainw();
-
- bschar = erasechar();
- curx = 0;
-
- wmove(main_w, MW_NUMY, MW_NUX + curx);
-
- /* go into loop */
-
- for (;;)
- {
- int maxfd = 0;
- fd_set set;
- struct timeval timeout;
-
- FD_ZERO(&set);
-
- FD_SET(STDIN_FILENO, &set);
- if(STDIN_FILENO > maxfd)
- maxfd = STDIN_FILENO;
-
- FD_SET(dialerfd, &set);
- if(dialerfd > maxfd)
- maxfd = dialerfd;
-
- if(state == ST_ACTIVE)
- {
- if(audiofd != -1)
- {
- FD_SET(audiofd, &set);
- if(audiofd > maxfd)
- maxfd = audiofd;
- }
-
- if(telfd != -1)
- {
- FD_SET(telfd, &set);
- if(telfd > maxfd)
- maxfd = telfd;
- }
- }
-
- timeout.tv_sec = 2;
- timeout.tv_usec = 0;
-
- wrefresh(main_w);
-
- /* if no char is available within timeout, do something */
-
-#ifdef NOTDEF
- ret = select(maxfd+1, &set, NULL, NULL, &timeout);
-#else
- ret = select(maxfd+1, &set, NULL, NULL, NULL);
-#endif
-
- if(ret > 0)
- {
- if((telfd != -1) && (FD_ISSET(telfd, &set)))
- {
- message("select from ISDN");
- tel_hdlr();
- }
- if((audiofd != -1) && (FD_ISSET(audiofd, &set)))
- {
- message("select from audio");
- audio_hdlr();
- }
- if(FD_ISSET(dialerfd, &set))
- {
- message("select from tel");
- dial_hdlr();
- }
- if(FD_ISSET(STDIN_FILENO, &set))
- {
- message("select from kbd");
- kbd_hdlr();
- }
- }
- }
- do_quit(0);
-
- return(0);
-}
-
-/*---------------------------------------------------------------------------*
- * keyboard character available handler
- *---------------------------------------------------------------------------*/
-static void
-kbd_hdlr(void)
-{
- int kchar;
-
- kchar = wgetch(main_w); /* get char */
-
- switch (kchar)
- {
- case CR:
- case LF:
-#ifdef KEY_ENTER
- case KEY_ENTER:
-#endif
- if((state == ST_IDLE) &&
- (numberbuffer[0] != '\0'))
- {
- message("dialing .....");
- do_dial(&numberbuffer[0]);
- }
- else
- {
- do_menu();
- }
- break;
-
- case CNTRL_D:
- if(state == ST_IDLE)
- {
- do_quit(0);
- }
- else
- {
- message("cannot exit while not idle!");
- beep();
- }
-
- break;
-
- case CNTRL_L: /* refresh */
- touchwin(curscr);
- wrefresh(curscr);
- break;
-
- case KEY_BACKSPACE:
- case KEY_DC:
- if (curx == 0)
- break;
-
- curx--;
- mvwaddch(main_w, MW_NUMY, MW_NUX + curx, ' ');
- numberbuffer[curx] = '\0';
- wmove(main_w, MW_NUMY, MW_NUX + curx);
-
- if(curx == 0)
- message(" ");
-
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if(curx > (TELNO_MAX-1))
- break;
-
- mvwaddch(main_w, MW_NUMY, MW_NUX + curx, kchar);
-
- numberbuffer[curx] = kchar;
-
- curx++;
-
- numberbuffer[curx] = '\0';
-
- message("press ENTER to dial number .....");
- break;
- }
-}
-
-/*---------------------------------------------------------------------------*
- * exit program
- *---------------------------------------------------------------------------*/
-void
-do_quit(int exitval)
-{
- close(dialerfd);
- move(LINES-1, 0);
- clrtoeol();
- refresh();
- endwin();
- exit(exitval);
-}
-
-/*---------------------------------------------------------------------------*
- * fatal error exit
- *---------------------------------------------------------------------------*/
-void
-fatal(char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
-
- do_hangup(); /* failsafe */
-
- if(curses_ready)
- {
- close(dialerfd);
- move(LINES-1, 0);
- clrtoeol();
- refresh();
- endwin();
- }
-
- fprintf(stderr, "\nFatal error: ");
- vfprintf(stderr, fmt, ap);
- fprintf(stderr, "\n\n");
-
- va_end(ap);
-
- exit(1);
-}
-
-/*---------------------------------------------------------------------------*
- * message printing
- *---------------------------------------------------------------------------*/
-void
-message(char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
-
- if(curses_ready)
- {
- int i;
- char sbuf[MW_WIDTH];
-
- wmove(main_w, MW_MSGY, MW_MSX);
- vsnprintf(sbuf, MW_WIDTH-MW_MSX-1, fmt, ap);
- waddstr(main_w, sbuf);
- for(i=strlen(sbuf);i < MW_WIDTH-MW_MSX-2; i++)
- waddch(main_w, ' ');
- wmove(main_w, MW_NUMY, MW_NUX + curx);
- wrefresh(main_w);
- }
- else
- {
- fprintf(stderr, "ERROR: ");
- vfprintf(stderr, fmt, ap);
- fprintf(stderr, "\n");
- }
-
- va_end(ap);
-}
-
-/*---------------------------------------------------------------------------*
- * message printing
- *---------------------------------------------------------------------------*/
-void
-debug(char *fmt, ...)
-{
- va_list ap;
-
- if(opt_d == 0)
- return;
-
- va_start(ap, fmt);
-
- vwprintw(dbg_w, fmt, ap);
- wrefresh(dbg_w);
-
- va_end(ap);
-}
-
-/*---------------------------------------------------------------------------*
- * go to new state
- *---------------------------------------------------------------------------*/
-void
-newstate(int newstate)
-{
- int i;
-
- if(newstate < 0 || newstate > ST_MAX)
- {
- message("newstate %d undefined!", newstate);
- return;
- }
-
- state = newstate;
-
- if(newstate == ST_ACTIVE)
- {
- char namebuffer[128];
-
- sprintf(namebuffer,"%s%d", I4BTELDEVICE, opt_unit);
- telfd = init_tel(namebuffer);
- }
-
- if(newstate == ST_IDLE)
- {
- close(telfd);
- telfd = -1;
- }
-
- wmove(main_w, MW_STATEY, MW_STX);
- waddstr(main_w, states[newstate]);
-
- for(i=strlen(states[newstate]);i < MW_WIDTH-MW_STX-2; i++)
- waddch(main_w, ' ');
-
- wmove(main_w, MW_NUMY, MW_NUX + curx);
- wrefresh(main_w);
-}
-
-/* EOF */
diff --git a/usr.sbin/i4b/isdntrace/unknownl3.c b/usr.sbin/i4b/isdntrace/unknownl3.c
deleted file mode 100644
index 8967a6a9b037..000000000000
--- a/usr.sbin/i4b/isdntrace/unknownl3.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2000 Hellmuth Michaelis. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *---------------------------------------------------------------------------
- *
- * unknownl3.c - print L3 packets with unknown PD
- * ----------------------------------------------
- *
- * $Id: unknownl3.c,v 1.2 2000/02/13 15:26:52 hm Exp $
- *
- * $FreeBSD$
- *
- * last edit-date: [Sun Feb 13 14:16:44 2000]
- *
- *---------------------------------------------------------------------------*/
-
-#include "trace.h"
-
-/*---------------------------------------------------------------------------*
- * decode unknown protocol
- *---------------------------------------------------------------------------*/
-void
-decode_unknownl3(char *pbuf, int n, int off, unsigned char *buf, int raw)
-{
- int pd;
- int j;
- int i;
-
- if(n <= 0)
- return;
-
- *pbuf = '\0';
-
- if(raw)
- {
- for (i = 0; i < n; i += 16)
- {
- sprintf((pbuf+strlen(pbuf)),"Dump:%.3d ", i+off);
- for (j = 0; j < 16; j++)
- if (i + j < n)
- sprintf((pbuf+strlen(pbuf)),"%02x ", buf[i + j]);
- else
- sprintf((pbuf+strlen(pbuf))," ");
- sprintf((pbuf+strlen(pbuf))," ");
- for (j = 0; j < 16 && i + j < n; j++)
- if (isprint(buf[i + j]))
- sprintf((pbuf+strlen(pbuf)),"%c", buf[i + j]);
- else
- sprintf((pbuf+strlen(pbuf)),".");
- sprintf((pbuf+strlen(pbuf)),"\n");
- }
- }
-
- i = 0;
-
- /* protocol discriminator */
-
- pd = buf[i];
-
- sprintf((pbuf+strlen(pbuf)), "PD%02X: ", pd);
-
- if(pd >= 0x00 && pd <= 0x07)
- sprintf((pbuf+strlen(pbuf)), "pd=User-User (0x%02x)",pd);
- else if(pd == 0x08)
- sprintf((pbuf+strlen(pbuf)), "pd=Q.931/I.451");
- else if(pd >= 0x10 && pd <= 0x3f)
- sprintf((pbuf+strlen(pbuf)), "pd=Other Layer 3 or X.25 (0x%02x)",pd);
- else if(pd >= 0x40 && pd <= 0x4f)
- sprintf((pbuf+strlen(pbuf)), "pd=National Use (0x%02x)",pd);
- else if(pd >= 0x50 && pd <= 0xfe)
- sprintf((pbuf+strlen(pbuf)), "pd=Other Layer 3 or X.25 (0x%02x)",pd);
- else
- sprintf((pbuf+strlen(pbuf)), "pd=Reserved (0x%02x)",pd);
-
- sprintf((pbuf+strlen(pbuf)), "\n [");
- for(j = 0; j < (n-i); j++)
- {
- sprintf((pbuf+strlen(pbuf)),"0x%02x ", buf[j+i]);
- }
-
- sprintf((pbuf+strlen(pbuf)),"]\n");
-}
-
-/* EOF */
-
diff --git a/usr.sbin/i4b/ispppcontrol/ispppcontrol.c b/usr.sbin/i4b/ispppcontrol/ispppcontrol.c
deleted file mode 100644
index ef4dc64cb48d..000000000000
--- a/usr.sbin/i4b/ispppcontrol/ispppcontrol.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (c) 1997 Joerg Wunsch
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * From: spppcontrol.c,v 1.3 1998/01/07 07:55:26 charnier Exp
- *
- *---------------------------------------------------------------------------
- *
- * last edit-date: [Mon Oct 9 16:21:15 2000]
- *
- *---------------------------------------------------------------------------
- *
- * $FreeBSD$
- */
-
-#ifndef lint
-static const char rcsid[] =
- "$Id: ispppcontrol.c,v 1.4 2000/08/24 11:48:57 hm Exp $";
-#endif /* not lint */
-
-#include <sys/param.h>
-#include <sys/callout.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-
-#if (defined (__FreeBSD__) && __FreeBSD__ >= 3)
-#include <net/if_var.h>
-#endif
-
-#if defined (__FreeBSD__) || defined (__OpenBSD__)
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#include <net/slcompress.h>
-#endif
-
-#ifdef __NetBSD__
-#include <net/if_sppp.h>
-#else
-#include <machine/i4b_isppp.h>
-#endif
-
-#include <err.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sysexits.h>
-#include <unistd.h>
-
-static void usage(void);
-void print_vals(const char *ifname, struct spppreq *sp);
-const char *phase_name(enum ppp_phase phase);
-const char *proto_name(u_short proto);
-const char *authflags(u_short flags);
-
-#define PPP_PAP 0xc023
-#define PPP_CHAP 0xc223
-
-int hz = 0;
-
-int
-main(int argc, char **argv)
-{
- int s, c;
- int errs = 0, verbose = 0;
- size_t off;
- const char *ifname, *cp;
- struct ifreq ifr;
- struct spppreq spr;
- int len;
- int mib[2];
- struct clockinfo clockinfo;
-
- while ((c = getopt(argc, argv, "v")) != -1)
- switch (c) {
- case 'v':
- verbose++;
- break;
-
- default:
- errs++;
- break;
- }
- argv += optind;
- argc -= optind;
-
- if (errs || argc < 1)
- usage();
-
- ifname = argv[0];
- strncpy(ifr.ifr_name, ifname, sizeof ifr.ifr_name);
-
- /* use a random AF to create the socket */
- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
- err(EX_UNAVAILABLE, "ifconfig: socket");
-
- argc--;
- argv++;
-
- spr.cmd = (int)SPPPIOGDEFS;
- ifr.ifr_data = (caddr_t)&spr;
-
- if (ioctl(s, SIOCGIFGENERIC, &ifr) == -1)
- err(EX_OSERR, "SIOCGIFGENERIC(SPPPIOGDEFS)");
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_CLOCKRATE;
- len = sizeof(clockinfo);
- if(sysctl(mib, 2, &clockinfo, &len, NULL, 0) == -1)
- {
- fprintf(stderr, "error, cannot sysctl kern.clockrate!\n");
- exit(1);
- }
-
- hz = clockinfo.hz;
-
- if (argc == 0) {
- /* list only mode */
- print_vals(ifname, &spr);
- return 0;
- }
-
-#define startswith(s) strncmp(argv[0], s, (off = strlen(s))) == 0
-
- while (argc > 0) {
- if (startswith("authproto=")) {
- cp = argv[0] + off;
- if (strcmp(cp, "pap") == 0)
- spr.defs.myauth.proto =
- spr.defs.hisauth.proto = PPP_PAP;
- else if (strcmp(cp, "chap") == 0)
- spr.defs.myauth.proto =
- spr.defs.hisauth.proto = PPP_CHAP;
- else if (strcmp(cp, "none") == 0)
- spr.defs.myauth.proto =
- spr.defs.hisauth.proto = 0;
- else
- errx(EX_DATAERR, "bad auth proto: %s", cp);
- } else if (startswith("myauthproto=")) {
- cp = argv[0] + off;
- if (strcmp(cp, "pap") == 0)
- spr.defs.myauth.proto = PPP_PAP;
- else if (strcmp(cp, "chap") == 0)
- spr.defs.myauth.proto = PPP_CHAP;
- else if (strcmp(cp, "none") == 0)
- spr.defs.myauth.proto = 0;
- else
- errx(EX_DATAERR, "bad auth proto: %s", cp);
- } else if (startswith("myauthname="))
- strncpy(spr.defs.myauth.name, argv[0] + off,
- AUTHNAMELEN);
- else if (startswith("myauthsecret=") ||
- startswith("myauthkey="))
- strncpy(spr.defs.myauth.secret, argv[0] + off,
- AUTHKEYLEN);
- else if (startswith("hisauthproto=")) {
- cp = argv[0] + off;
- if (strcmp(cp, "pap") == 0)
- spr.defs.hisauth.proto = PPP_PAP;
- else if (strcmp(cp, "chap") == 0)
- spr.defs.hisauth.proto = PPP_CHAP;
- else if (strcmp(cp, "none") == 0)
- spr.defs.hisauth.proto = 0;
- else
- errx(EX_DATAERR, "bad auth proto: %s", cp);
- } else if (startswith("hisauthname="))
- strncpy(spr.defs.hisauth.name, argv[0] + off,
- AUTHNAMELEN);
- else if (startswith("hisauthsecret=") ||
- startswith("hisauthkey="))
- strncpy(spr.defs.hisauth.secret, argv[0] + off,
- AUTHKEYLEN);
- else if (strcmp(argv[0], "callin") == 0)
- spr.defs.hisauth.flags |= AUTHFLAG_NOCALLOUT;
- else if (strcmp(argv[0], "always") == 0)
- spr.defs.hisauth.flags &= ~AUTHFLAG_NOCALLOUT;
- else if (strcmp(argv[0], "norechallenge") == 0)
- spr.defs.hisauth.flags |= AUTHFLAG_NORECHALLENGE;
- else if (strcmp(argv[0], "rechallenge") == 0)
- spr.defs.hisauth.flags &= ~AUTHFLAG_NORECHALLENGE;
-#ifndef __NetBSD__
- else if (strcmp(argv[0], "enable-vj") == 0)
- spr.defs.enable_vj = 1;
- else if (strcmp(argv[0], "disable-vj") == 0)
- spr.defs.enable_vj = 0;
-#endif
- else if (startswith("lcp-timeout=")) {
- int timeout_arg = atoi(argv[0]+off);
- if ((timeout_arg > 20000) || (timeout_arg <= 0))
- errx(EX_DATAERR, "bad lcp timeout value: %s",
- argv[0]+off);
- spr.defs.lcp.timeout = timeout_arg * hz / 1000;
- } else
- errx(EX_DATAERR, "bad parameter: \"%s\"", argv[0]);
-
- argv++;
- argc--;
- }
-
- spr.cmd = (int)SPPPIOSDEFS;
-
- if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1)
- err(EX_OSERR, "SIOCSIFGENERIC(SPPPIOSDEFS)");
-
- if (verbose)
- print_vals(ifname, &spr);
-
- return 0;
-}
-
-static void
-usage(void)
-{
- fprintf(stderr, "%s\n%s\n",
- "usage: ispppcontrol [-v] ifname [{my|his}auth{proto|name|secret}=...]",
- " ispppcontrol [-v] ifname callin|always");
- exit(EX_USAGE);
-}
-
-void
-print_vals(const char *ifname, struct spppreq *sp)
-{
-#ifndef __NetBSD__
- time_t send, recv;
-#endif
-
- printf("%s:\tphase=%s\n", ifname, phase_name(sp->defs.pp_phase));
- if (sp->defs.myauth.proto) {
- printf("\tmyauthproto=%s myauthname=\"%.*s\"\n",
- proto_name(sp->defs.myauth.proto),
- AUTHNAMELEN, sp->defs.myauth.name);
- }
- if (sp->defs.hisauth.proto) {
- printf("\thisauthproto=%s hisauthname=\"%.*s\"%s\n",
- proto_name(sp->defs.hisauth.proto),
- AUTHNAMELEN, sp->defs.hisauth.name,
- authflags(sp->defs.hisauth.flags));
- }
-#ifndef __NetBSD__
- if (sp->defs.pp_phase > PHASE_DEAD) {
- send = time(NULL) - sp->defs.pp_last_sent;
- recv = time(NULL) - sp->defs.pp_last_recv;
- printf("\tidle_time=%ld\n", (send<recv)? send : recv);
- }
-#endif
- printf("\tlcp timeout: %.3f s\n",
- (double)sp->defs.lcp.timeout / hz);
-#ifndef __NetBSD__
- printf("\tenable_vj: %s\n",
- sp->defs.enable_vj ? "on" : "off");
-#endif
-}
-
-const char *
-phase_name(enum ppp_phase phase)
-{
- switch (phase) {
- case PHASE_DEAD: return "dead";
- case PHASE_ESTABLISH: return "establish";
- case PHASE_TERMINATE: return "terminate";
- case PHASE_AUTHENTICATE: return "authenticate";
- case PHASE_NETWORK: return "network";
- }
- return "illegal";
-}
-
-const char *
-proto_name(u_short proto)
-{
- static char buf[12];
- switch (proto) {
- case PPP_PAP: return "pap";
- case PPP_CHAP: return "chap";
- }
- sprintf(buf, "0x%x", (unsigned)proto);
- return buf;
-}
-
-const char *
-authflags(u_short flags)
-{
- static char buf[32];
- buf[0] = '\0';
- if (flags & AUTHFLAG_NOCALLOUT)
- strcat(buf, " callin");
- if (flags & AUTHFLAG_NORECHALLENGE)
- strcat(buf, " norechallenge");
- return buf;
-}
diff --git a/usr.sbin/kgzip/aouthdr.c b/usr.sbin/kgzip/aouthdr.c
deleted file mode 100644
index 27541e6cae11..000000000000
--- a/usr.sbin/kgzip/aouthdr.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2000 Robert Nordier
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <stddef.h>
-#include "aouthdr.h"
-
-#define KGZ_FIX_NSIZE 0 /* Run-time fixup */
-
-const struct kgz_aouthdr0 aouthdr0 = {
- /* a.out header */
- {
- MID_I386 << 020 | OMAGIC, /* a_midmag */
- 0, /* a_text */
- sizeof(struct kgz_hdr) + KGZ_FIX_NSIZE, /* a_data */
- 0, /* a_bss */
- sizeof(struct nlist) * KGZ__STNUM, /* a_syms */
- 0, /* a_entry */
- 0, /* a_trsize */
- 0 /* a_drsize */
- }
-};
-
-const struct kgz_aouthdr1 aouthdr1 = {
- /* Symbol table */
- {
- {
- {
- (char *)offsetof(struct kgz__strtab,
- kgz) /* n_un */
- },
- N_DATA | N_EXT, /* n_type */
- AUX_OBJECT, /* n_other */
- 0, /* n_desc */
- 0 /* n_value */
- },
- {
- {
- (char *)offsetof(struct kgz__strtab,
- kgz_ndata) /* n_un */
- },
- N_DATA | N_EXT, /* n_type */
- AUX_OBJECT, /* n_other */
- 0, /* n_desc */
- sizeof(struct kgz_hdr) /* n_value */
- }
- },
- /* String table */
- {
- sizeof(struct kgz__strtab), /* length */
- KGZ__STR_KGZ, /* kgz */
- KGZ__STR_KGZ_NDATA /* kgz_ndata */
- }
-};
diff --git a/usr.sbin/kgzip/aouthdr.h b/usr.sbin/kgzip/aouthdr.h
deleted file mode 100644
index 63c2dff66904..000000000000
--- a/usr.sbin/kgzip/aouthdr.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2000 Robert Nordier
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
- * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#include <a.out.h>
-#include "kgz.h"
-
-/* Relocatable header: part 0 */
-struct kgz_aouthdr0 {
- struct exec a;
-};
-
-/* Symbol table entries */
-#define KGZ__STNUM 2
-
-/* Symbol table strings */
-#define KGZ__STR_KGZ "_kgz"
-#define KGZ__STR_KGZ_NDATA "_kgz_ndata"
-
-/* String table */
-struct kgz__strtab {
- unsigned long length;
- char kgz[sizeof(KGZ__STR_KGZ)];
- char kgz_ndata[sizeof(KGZ__STR_KGZ_NDATA)];
-};
-
-/* Relocatable header: part 1 */
-struct kgz_aouthdr1 {
- struct nlist st[KGZ__STNUM];
- struct kgz__strtab strtab;
-};
-
-extern const struct kgz_aouthdr0 aouthdr0;
-extern const struct kgz_aouthdr1 aouthdr1;
diff --git a/usr.sbin/ppp/atm.h b/usr.sbin/ppp/atm.h
deleted file mode 100644
index 3fbc0c5c98e8..000000000000
--- a/usr.sbin/ppp/atm.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*-
- * Copyright (c) 2000 Jakob Stoklund Olesen <stoklund@taxidriver.dk>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-struct physical;
-struct device;
-
-extern struct device *atm_Create(struct physical *);
-extern struct device *atm_iov2device(int, struct physical *,
- struct iovec *, int *, int, int *, int *);
-extern int atm_DeviceSize(void);